gnu: Add python-k5test.
[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>
44d10b1f
RW
71;;;
72;;; This file is part of GNU Guix.
73;;;
74;;; GNU Guix is free software; you can redistribute it and/or modify it
75;;; under the terms of the GNU General Public License as published by
76;;; the Free Software Foundation; either version 3 of the License, or (at
77;;; your option) any later version.
78;;;
79;;; GNU Guix is distributed in the hope that it will be useful, but
80;;; WITHOUT ANY WARRANTY; without even the implied warranty of
81;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
82;;; GNU General Public License for more details.
83;;;
84;;; You should have received a copy of the GNU General Public License
85;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
86
87(define-module (gnu packages python-xyz)
88 #:use-module ((guix licenses) #:prefix license:)
89 #:use-module (gnu packages)
90 #:use-module (gnu packages algebra)
91 #:use-module (gnu packages adns)
92 #:use-module (gnu packages attr)
93 #:use-module (gnu packages backup)
94 #:use-module (gnu packages bash)
95 #:use-module (gnu packages check)
96 #:use-module (gnu packages compression)
97 #:use-module (gnu packages crypto)
98 #:use-module (gnu packages databases)
f825e605 99 #:use-module (gnu packages dbm)
44d10b1f
RW
100 #:use-module (gnu packages file)
101 #:use-module (gnu packages fontutils)
102 #:use-module (gnu packages gcc)
103 #:use-module (gnu packages geo)
104 #:use-module (gnu packages ghostscript)
105 #:use-module (gnu packages gl)
106 #:use-module (gnu packages glib)
e2ebbbcc 107 #:use-module (gnu packages gnome)
44d10b1f
RW
108 #:use-module (gnu packages graphviz)
109 #:use-module (gnu packages graphics)
110 #:use-module (gnu packages gstreamer)
111 #:use-module (gnu packages gtk)
112 #:use-module (gnu packages icu4c)
113 #:use-module (gnu packages image)
114 #:use-module (gnu packages imagemagick)
72c2478a 115 #:use-module (gnu packages kerberos)
44d10b1f
RW
116 #:use-module (gnu packages libevent)
117 #:use-module (gnu packages libffi)
118 #:use-module (gnu packages linux)
119 #:use-module (gnu packages llvm)
120 #:use-module (gnu packages man)
121 #:use-module (gnu packages maths)
42f0b0c2 122 #:use-module (gnu packages monitoring)
44d10b1f
RW
123 #:use-module (gnu packages multiprecision)
124 #:use-module (gnu packages networking)
125 #:use-module (gnu packages ncurses)
126 #:use-module (gnu packages openstack)
127 #:use-module (gnu packages pcre)
128 #:use-module (gnu packages perl)
129 #:use-module (gnu packages pkg-config)
130 #:use-module (gnu packages python)
d362b11d 131 #:use-module (gnu packages python-check)
15b65617 132 #:use-module (gnu packages python-compression)
44d10b1f 133 #:use-module (gnu packages python-crypto)
ca7c3653 134 #:use-module (gnu packages python-science)
44d10b1f
RW
135 #:use-module (gnu packages python-web)
136 #:use-module (gnu packages qt)
137 #:use-module (gnu packages readline)
138 #:use-module (gnu packages sdl)
139 #:use-module (gnu packages search)
140 #:use-module (gnu packages shells)
9d0c291e 141 #:use-module (gnu packages sphinx)
44d10b1f
RW
142 #:use-module (gnu packages ssh)
143 #:use-module (gnu packages terminals)
144 #:use-module (gnu packages tex)
145 #:use-module (gnu packages texinfo)
146 #:use-module (gnu packages time)
147 #:use-module (gnu packages tls)
148 #:use-module (gnu packages version-control)
149 #:use-module (gnu packages video)
150 #:use-module (gnu packages web)
151 #:use-module (gnu packages base)
152 #:use-module (gnu packages xml)
153 #:use-module (gnu packages xorg)
154 #:use-module (gnu packages xdisorg)
155 #:use-module (gnu packages tcl)
156 #:use-module (gnu packages bdw-gc)
f98232a3 157 #:use-module (gnu packages serialization)
44d10b1f
RW
158 #:use-module (guix packages)
159 #:use-module (guix download)
160 #:use-module (guix git-download)
a042d348 161 #:use-module (guix hg-download)
44d10b1f
RW
162 #:use-module (guix utils)
163 #:use-module (guix build-system gnu)
164 #:use-module (guix build-system cmake)
165 #:use-module (guix build-system python)
166 #:use-module (guix build-system trivial)
167 #:use-module (srfi srfi-1)
168 #:use-module (srfi srfi-26))
169
170(define-public python-psutil
171 (package
172 (name "python-psutil")
e9119ac1 173 (version "5.6.5")
44d10b1f
RW
174 (source
175 (origin
176 (method url-fetch)
177 (uri (pypi-uri "psutil" version))
178 (sha256
e9119ac1 179 (base32 "0isil5jxwwd8awz54qk28rpgjg43i5l6yl70g40vxwa4r4m56lfh"))))
44d10b1f
RW
180 (build-system python-build-system)
181 (arguments
182 ;; FIXME: some tests does not return and times out.
183 '(#:tests? #f))
184 (home-page "https://www.github.com/giampaolo/psutil")
185 (synopsis "Library for retrieving information on running processes")
186 (description
187 "psutil (Python system and process utilities) is a library for retrieving
188information on running processes and system utilization (CPU, memory, disks,
189network) in Python. It is useful mainly for system monitoring, profiling and
190limiting process resources and management of running processes. It implements
191many functionalities offered by command line tools such as: ps, top, lsof,
192netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
193pidof, tty, taskset, pmap.")
194 (properties `((python2-variant . ,(delay python2-psutil))))
195 (license license:bsd-3)))
196
197(define-public python2-psutil
198 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
199 (package
200 (inherit base)
201 (propagated-inputs
202 `(("python2-enum34" ,python2-enum34) ;optional
203 ,@(package-propagated-inputs base))))))
204
205(define-public python-shapely
206 (package
207 (name "python-shapely")
6d94465b 208 (version "1.6.4.post2")
44d10b1f
RW
209 (source
210 (origin
211 (method url-fetch)
212 (uri (pypi-uri "Shapely" version))
213 (sha256
214 (base32
6d94465b 215 "03r42fmd9alp6r3q95ad6rldq2f7n1wimrw53zy5kpn33yv7pf64"))))
44d10b1f
RW
216 (build-system python-build-system)
217 (native-inputs
218 `(("python-cython" ,python-cython)
219 ("python-matplotlib" ,python-matplotlib)
220 ("python-pytest" ,python-pytest)
221 ("python-pytest-cov" ,python-pytest-cov)))
222 (inputs
223 `(("geos" ,geos)))
224 (propagated-inputs
225 `(("python-numpy" ,python-numpy)))
226 (arguments
227 `(#:phases
228 (modify-phases %standard-phases
229 (add-after 'unpack 'patch-geos-path
230 (lambda* (#:key inputs #:allow-other-keys)
231 (let ((geos (assoc-ref inputs "geos"))
232 (glibc (assoc-ref inputs ,(if (%current-target-system)
233 "cross-libc" "libc"))))
234 (substitute* "shapely/geos.py"
235 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
236 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
237 geos "/lib/libgeos_c.so'])"))
238 (("free = load_dll\\('c'\\)\\.free")
239 (string-append "free = load_dll('c', fallbacks=['"
240 glibc "/lib/libc.so.6']).free"))))
241 #t)))))
242 (home-page "https://github.com/Toblerity/Shapely")
243 (synopsis "Library for the manipulation and analysis of geometric objects")
244 (description "Shapely is a Python package for manipulation and analysis of
245planar geometric objects. It is based on the @code{GEOS} library.")
246 (license license:bsd-3)))
247
a91f4eba
S
248(define-public python-shortuuid
249 (package
250 (name "python-shortuuid")
251 (version "0.5.0")
252 (source
253 (origin
254 (method url-fetch)
255 (uri (pypi-uri "shortuuid" version))
256 (sha256
257 (base32
258 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
259 (build-system python-build-system)
260 (native-inputs
261 `(("python-pep8" ,python-pep8)))
262 (home-page "https://github.com/skorokithakis/shortuuid")
263 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
264 (description
265 "@code{shortuuid} is a Python library for generating concise, unambiguous
266and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
267module and then similar looking characters are removed.")
268 (license license:bsd-3)))
269
44d10b1f
RW
270(define-public python-logwrap
271 (package
272 (name "python-logwrap")
273 (version "3.2.1")
274 (source
275 (origin
276 (method url-fetch)
277 (uri (pypi-uri "logwrap" version ".zip"))
278 (sha256
279 (base32
280 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
281 (build-system python-build-system)
282 (propagated-inputs
283 `(("python-six" ,python-six)
284 ("python-typing" ,python-typing)))
285 (native-inputs
286 `(("unzip" ,unzip)
287 ("python-cython" ,python-cython)
288 ("python-pytest" ,python-pytest)
289 ("python-pytest-cov" ,python-pytest-cov)
290 ("python-pytest-runner" ,python-pytest-runner)))
291 (home-page "https://github.com/penguinolog/logwrap")
292 (synopsis "Decorator for logging function arguments")
293 (description "This package provides a decorator to log function arguments
294and function call return values in a human-readable way.")
295 (license license:asl2.0)))
296
297(define-public python2-shapely
298 (package-with-python2 python-shapely))
299
300(define-public python-clyent
301 (package
302 (name "python-clyent")
303 (version "1.2.1")
304 (source
305 (origin
306 (method url-fetch)
307 (uri (pypi-uri "clyent" version))
308 (sha256
309 (base32
310 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
311 (build-system python-build-system)
312 (native-inputs
313 `(("python-mock" ,python-mock)))
314 (home-page "https://github.com/binstar/clyent")
315 (synopsis "Command line client library")
316 (description "Clyent is a Python command line utiliy library. It is used
317by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
318 (license license:bsd-3)))
319
320(define-public python2-clyent
321 (package-with-python2 python-clyent))
322
323(define-public python-babel
324 (package
325 (name "python-babel")
93253411 326 (version "2.7.0")
44d10b1f
RW
327 (source
328 (origin
329 (method url-fetch)
330 (uri (pypi-uri "Babel" version))
331 (sha256
332 (base32
93253411 333 "0a7wawx8vsg7igvz6p3x909fskhg4b2y1910xk4f4c8y22p3aqg8"))))
44d10b1f
RW
334 (build-system python-build-system)
335 (native-inputs
336 `(("python-freezegun" ,python-freezegun)
337 ("python-pytest" ,python-pytest)))
338 (propagated-inputs
339 `(("python-pytz" ,python-pytz)))
340 (arguments
341 `(#:phases (modify-phases %standard-phases
342 (replace 'check
8acd1e90
MB
343 (lambda _
344 (invoke "pytest" "-vv" "-k"
345 (string-append
346 ;; XXX: These tests fail when using Pytest 4.x and
347 ;; Babel 2.6.0. Try removing this for later versions.
348 "not test_no_inherit_metazone_marker_never_in_output"
349 " and not test_smoke_dates"
350 " and not test_smoke_numbers")))))))
44d10b1f
RW
351 (home-page "http://babel.pocoo.org/")
352 (synopsis
353 "Tools for internationalizing Python applications")
354 (description
355 "Babel is composed of two major parts:
356- tools to build and work with gettext message catalogs
357- a Python interface to the CLDR (Common Locale Data Repository), providing
358access to various locale display names, localized number and date formatting,
359etc. ")
360 (license license:bsd-3)))
361
362(define-public python2-babel
363 (package-with-python2 python-babel))
364
93253411
MB
365;; Sphinx < 2.0 requires this version. Remove once no longer needed.
366(define-public python2-babel-2.6
367 (package
368 (inherit python2-babel)
369 (version "2.6.0")
370 (source (origin
371 (method url-fetch)
372 (uri (pypi-uri "Babel" version))
373 (sha256
374 (base32
375 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))))
376
44d10b1f
RW
377(define-public python2-backport-ssl-match-hostname
378 (package
379 (name "python2-backport-ssl-match-hostname")
380 (version "3.5.0.1")
381 (source
382 (origin
383 (method url-fetch)
2c1f0d09 384 (uri (pypi-uri "backports.ssl_match_hostname" version))
44d10b1f
RW
385 (sha256
386 (base32
387 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
388 (build-system python-build-system)
389 (arguments
390 `(#:python ,python-2
391 #:tests? #f)) ; no test target
392 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
393 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
394 (description
395 "This backport brings the ssl.match_hostname() function to users of
396earlier versions of Python. The function checks the hostname in the
397certificate returned by the server to which a connection has been established,
398and verifies that it matches the intended target hostname.")
399 (license license:psfl)))
400
dc827867
TGR
401(define-public python-boolean.py
402 (package
403 (name "python-boolean.py")
404 (version "3.6")
405 (source
406 (origin
407 ;; There's no source tarball on PyPI.
408 (method git-fetch)
409 (uri (git-reference
410 (url "https://github.com/bastikr/boolean.py")
411 (commit (string-append "v" version))))
412 (file-name (git-file-name name version))
413 (sha256
414 (base32 "1wc89y73va58cj7dsx6c199zpxsy9q53dsffsdj6zmc90inqz6qs"))))
415 (build-system python-build-system)
416 (home-page "https://github.com/bastikr/boolean.py")
417 (synopsis "Boolean algebra in one Python module")
418 (description
419 "This is a small Python library that implements boolean algebra.
420It defines two base elements, @code{TRUE} and @code{FALSE}, and a
421@code{Symbol} class that can take on one of these two values. Calculations
422are done only in terms of @code{AND}, @code{OR}, and @code{NOT}---other
423compositions like @code{XOR} and @code{NAND} are emulated on top of them.
424Expressions are constructed from parsed strings or directly in Python.")
425 (license license:bsd-2)))
426
44d10b1f
RW
427(define-public python-hdf4
428 (package
429 (name "python-hdf4")
430 (version "0.9")
431 (source
432 (origin
433 (method url-fetch)
434 (uri (pypi-uri name version))
435 (sha256
436 (base32
437 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
438 (build-system python-build-system)
439 (native-inputs `(("nose" ,python-nose)))
440 (propagated-inputs `(("numpy" ,python-numpy)))
441 (inputs
442 `(("hdf4" ,hdf4)
443 ("libjpeg" ,libjpeg)
444 ("zlib" ,zlib)))
445 (arguments
446 `(#:phases
447 (modify-phases %standard-phases
448 (replace 'check
449 (lambda _
450 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
451 ;; on to import numpy. Somehow this works on their CI system.
452 ;; Let's just manage PYTHONPATH here instead.
453 (substitute* "runexamples.sh"
454 (("export PYTHONPATH=.*") ""))
455 (setenv "PYTHONPATH"
456 (string-append (getcwd) ":"
457 (getenv "PYTHONPATH")))
458 (invoke "./runexamples.sh")
459 (invoke "nosetests" "-v"))))))
460 (home-page "https://github.com/fhs/python-hdf4")
461 (synopsis "Python interface to the NCSA HDF4 library")
462 (description
463 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
464which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
465NetCDF files can also be read and modified. Python-HDF4 is a fork of
466@url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
467 (license license:expat)))
468
469(define-public python2-hdf4
470 (package-with-python2 python-hdf4))
471
472(define-public python-h5py
473 (package
474 (name "python-h5py")
475 (version "2.8.0")
476 (source
477 (origin
478 (method url-fetch)
479 (uri (pypi-uri "h5py" version))
480 (sha256
481 (base32
482 "0mdr6wrq02ac93m1aqx9kad0ppfzmm4imlxqgyy1x4l7hmdcc9p6"))))
483 (build-system python-build-system)
484 (arguments
485 `(#:tests? #f ; no test target
486 #:phases
487 (modify-phases %standard-phases
488 (add-after 'unpack 'fix-hdf5-paths
489 (lambda* (#:key inputs #:allow-other-keys)
490 (let ((prefix (assoc-ref inputs "hdf5")))
491 (substitute* "setup_build.py"
492 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
493 (string-append "['" prefix "/lib" "']"))
494 (("'/opt/local/include', '/usr/local/include'")
495 (string-append "'" prefix "/include" "'")))
496 (substitute* "setup_configure.py"
497 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
498 (string-append "['" prefix "/lib" "']")))
499 #t))))))
500 (propagated-inputs
501 `(("python-six" ,python-six)
502 ("python-numpy" ,python-numpy)))
503 (inputs
504 `(("hdf5" ,hdf5)))
505 (native-inputs
506 `(("python-cython" ,python-cython)
507 ("python-pkgconfig" ,python-pkgconfig)))
508 (home-page "http://www.h5py.org/")
509 (synopsis "Read and write HDF5 files from Python")
510 (description
511 "The h5py package provides both a high- and low-level interface to the
512HDF5 library from Python. The low-level interface is intended to be a
513complete wrapping of the HDF5 API, while the high-level component supports
514access to HDF5 files, datasets and groups using established Python and NumPy
515concepts.")
516 (license license:bsd-3)))
517
518(define-public python2-h5py
519 (package-with-python2 python-h5py))
520
8b89dedc
RW
521(define-public python-sh
522 (package
523 (name "python-sh")
524 (version "1.12.14")
525 (source
526 (origin
527 (method url-fetch)
528 (uri (pypi-uri "sh" version))
529 (sha256
530 (base32
531 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
532 (build-system python-build-system)
fd3638d8
EF
533 (arguments
534 '(#:phases
535 (modify-phases %standard-phases
536 (replace 'check
537 (lambda _
ca983a2f
NG
538 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
539 (setenv "HOME" "/tmp")
fd3638d8
EF
540 (invoke "python" "sh.py" "test"))))))
541 (native-inputs
542 `(("python-coverage" ,python-coverage)))
8b89dedc
RW
543 (home-page "https://github.com/amoffat/sh")
544 (synopsis "Python subprocess replacement")
545 (description "This package provides a replacement for Python's
546@code{subprocess} feature.")
547 (license license:expat)))
548
3869effd
RW
549(define-public python2-sh
550 (package-with-python2 python-sh))
551
d362b11d
RW
552(define-public python-cftime
553 (package
554 (name "python-cftime")
da107cf5 555 (version "1.0.4.2")
d362b11d
RW
556 (source
557 (origin
558 (method url-fetch)
559 (uri (pypi-uri "cftime" version))
560 (sha256
da107cf5 561 (base32 "0w0gi6jnch38hiygl62j4xkcirv4y3dcwrvxl9p7bsk6j27lzihs"))))
d362b11d
RW
562 (build-system python-build-system)
563 (propagated-inputs
564 `(("python-numpy" ,python-numpy)))
565 (native-inputs
566 `(("python-coveralls" ,python-coveralls)
567 ("python-cython" ,python-cython)
568 ("python-pytest-cov" ,python-pytest-cov)))
569 (home-page "https://github.com/Unidata/cftime")
570 (synopsis "Library for time handling")
571 (description
572 "This package provides time-handling functionality that used to be part
573of the netcdf4 package before.")
574 ;; This package claims to include code under the GPLv3 but is released
575 ;; under ISC.
576 (license (list license:isc license:gpl3+))))
577
44d10b1f
RW
578(define-public python-netcdf4
579 (package
580 (name "python-netcdf4")
93e7b209 581 (version "1.4.2")
44d10b1f
RW
582 (source
583 (origin
584 (method url-fetch)
585 (uri (pypi-uri "netCDF4" version))
586 (sha256
587 (base32
93e7b209 588 "0c0sklgrmv15ygliin8qq0hp7vanmbi74m6zpi0r1ksr0hssyd5r"))))
44d10b1f 589 (build-system python-build-system)
93e7b209
RW
590 (arguments
591 '(#:phases
592 (modify-phases %standard-phases
593 (add-after 'unpack 'configure-locations
594 (lambda* (#:key inputs #:allow-other-keys)
595 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
596 #t)))))
44d10b1f
RW
597 (native-inputs
598 `(("python-cython" ,python-cython)))
599 (propagated-inputs
93e7b209
RW
600 `(("python-numpy" ,python-numpy)
601 ("python-cftime" ,python-cftime)))
44d10b1f
RW
602 (inputs
603 `(("netcdf" ,netcdf)
604 ("hdf4" ,hdf4)
605 ("hdf5" ,hdf5)))
93e7b209 606 (home-page "https://github.com/Unidata/netcdf4-python")
44d10b1f
RW
607 (synopsis "Python/numpy interface to the netCDF library")
608 (description "Netcdf4-python is a Python interface to the netCDF C
609library. netCDF version 4 has many features not found in earlier
610versions of the library and is implemented on top of HDF5. This module
611can read and write files in both the new netCDF 4 and the old netCDF 3
612format, and can create files that are readable by HDF5 clients. The
613API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
614to users of that module.")
615 ;; The software is mainly ISC, but includes some files covered
616 ;; by the Expat license.
617 (license (list license:isc license:expat))))
618
619(define-public python2-netcdf4
620 (package-with-python2 python-netcdf4))
621
d6803445
TGR
622(define-public python-license-expression
623 (package
624 (name "python-license-expression")
625 (version "0.999")
626 (source
627 (origin
628 (method url-fetch)
629 (uri (pypi-uri "license-expression" version))
630 (sha256
631 (base32 "08ppb0bxbrsxazy88sgpl9yffvdsabw6dkk1nc332wcz2mphwwyf"))))
632 (build-system python-build-system)
633 (propagated-inputs
634 `(("python-boolean.py" ,python-boolean.py)))
635 (home-page "https://github.com/nexB/license-expression")
636 (synopsis "Apply boolean logic to license expressions")
637 (description
638 "This Python module defines a tiny language to evaluate and compare
639license expressions using boolean logic. Logical combinations of licenses can
640be tested for equality, containment, and equivalence. They can be normalised
641and simplified. It supports SPDX license expressions as well as other naming
642conventions and aliases in the same expression.")
643 (license license:gpl2+)))
644
44d10b1f
RW
645(define-public python-lockfile
646 (package
647 (name "python-lockfile")
648 (version "0.12.2")
649 (source
650 (origin
651 (method url-fetch)
8318bf07 652 (uri (pypi-uri "lockfile" version))
44d10b1f
RW
653 (sha256
654 (base32
655 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
656 (build-system python-build-system)
657 (arguments '(#:test-target "check"))
658 (native-inputs
659 `(("python-pbr" ,python-pbr)))
660 (home-page "https://launchpad.net/pylockfile")
661 (synopsis "Platform-independent file locking module")
662 (description
663 "The lockfile package exports a LockFile class which provides a simple
664API for locking files.")
665 (license license:expat)))
666
667(define-public python2-lockfile
668 (package-with-python2 python-lockfile))
669
670(define-public python-semantic-version
671 (package
672 (name "python-semantic-version")
673 (version "2.6.0")
674 (source
675 (origin
676 (method url-fetch)
677 (uri (pypi-uri "semantic_version" version))
678 (sha256
679 (base32
680 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
681 (build-system python-build-system)
682 (arguments
683 `(#:tests? #f)) ; PyPI tarball lacks tests
684 (home-page "https://github.com/rbarrois/python-semanticversion")
685 (synopsis "Semantic versioning module for Python")
686 (description
687 "The @code{semantic_version} class is a small library for handling
688@uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
689
690It can compare versions, generate a new version that represents a bump in one of
691the version levels, and check whether any given string is a proper semantic
692version identifier.")
693 (license license:bsd-3)))
694
695(define-public python2-semantic-version
696 (package-with-python2 python-semantic-version))
697
698(define-public python-serpent
699 (package
700 (name "python-serpent")
fa9d14ac 701 (version "1.28")
44d10b1f
RW
702 (source
703 (origin
704 (method url-fetch)
705 (uri (pypi-uri "serpent" version))
706 (sha256
fa9d14ac 707 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
44d10b1f 708 (build-system python-build-system)
fa9d14ac
TGR
709 (native-inputs
710 `(("python-attrs" ,python-attrs)
711 ("python-pytz" ,python-pytz)))
44d10b1f
RW
712 (home-page "https://github.com/irmen/Serpent")
713 (synopsis "Serializer for literal Python expressions")
714 (description
1d3c7803
TGR
715 "Serpent provides @code{ast.literal_eval()}-compatible object tree
716serialization. It serializes an object tree into bytes (an utf-8 encoded
717string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
718to rebuild the original object tree.
719
720Because only safe literals are encoded, it is safe to send serpent data to
721other machines, such as over the network.")
44d10b1f
RW
722 (license license:expat)))
723
724(define-public python-setuptools
725 (package
726 (name "python-setuptools")
e39d4933 727 (version "41.0.1")
44d10b1f
RW
728 (source
729 (origin
730 (method url-fetch)
731 (uri (pypi-uri "setuptools" version ".zip"))
732 (sha256
733 (base32
e39d4933 734 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
44d10b1f
RW
735 (modules '((guix build utils)))
736 (snippet
737 '(begin
738 ;; Remove included binaries which are used to build self-extracting
739 ;; installers for Windows.
740 ;; TODO: Find some way to build them ourself so we can include them.
741 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
742 #t))))
743 (build-system python-build-system)
744 ;; FIXME: Tests require pytest, which itself relies on setuptools.
745 ;; One could bootstrap with an internal untested setuptools.
746 (arguments
747 `(#:tests? #f))
748 (home-page "https://pypi.python.org/pypi/setuptools")
749 (synopsis
750 "Library designed to facilitate packaging Python projects")
751 (description
752 "Setuptools is a fully-featured, stable library designed to facilitate
753packaging Python projects, where packaging includes:
754Python package and module definitions,
755distribution package metadata,
756test hooks,
757project installation,
758platform-specific details,
759Python 3 support.")
760 ;; TODO: setuptools now bundles the following libraries:
761 ;; packaging, pyparsing, six and appdirs. How to unbundle?
762 (license (list license:psfl ; setuptools itself
763 license:expat ; six, appdirs, pyparsing
764 license:asl2.0 ; packaging is dual ASL2/BSD-2
765 license:bsd-2))))
766
767(define-public python2-setuptools
768 (package-with-python2 python-setuptools))
769
0fdec2a3
MB
770;; The setuptools provided by Python 3.7.4 is too new for Tensorflow.
771(define-public python-setuptools-for-tensorflow
772 (hidden-package
773 (package
774 (inherit python-setuptools)
775 (version "39.1.0")
776 (source (origin
777 (inherit (package-source python-setuptools))
778 (uri (pypi-uri "setuptools" version ".zip"))
779 (sha256
780 (base32
781 "1mzdhvfhnv4lggxa8rjl0dzqxvfx377gg5sqs57v89wrp09lwj65")))))))
782
44d10b1f
RW
783(define-public python-uniseg
784 (package
785 (name "python-uniseg")
786 (version "0.7.1")
787 (source
788 (origin
789 (method url-fetch)
790 (uri (pypi-uri "uniseg" version ".zip"))
791 (sha256
792 (base32
793 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
794 (build-system python-build-system)
795 (arguments
796 '(#:tests? #f)) ; The test suite requires network access.
797 (native-inputs
798 `(("unzip" ,unzip)))
799 (home-page
800 "https://bitbucket.org/emptypage/uniseg-python")
801 (synopsis
802 "Python library to determine Unicode text segmentations")
803 (description
804 "Uniseg is a Python package used to determine Unicode text segmentations.
805Supported segmentations include:
806@enumerate
807@item @dfn{Code point} (any value in the Unicode codespace)
808@item @dfn{Grapheme cluster} (user-perceived character made of a single or
809multiple Unicode code points, e.g. \"G\" + acute-accent)
810@item Word break
811@item Sentence break
812@item Line break
813@end enumerate")
814 (license license:expat)))
815
816(define-public python2-uniseg
817 (package-with-python2 python-uniseg))
818
819(define-public python-humanfriendly
820 (package
821 (name "python-humanfriendly")
822 (version "4.4.1")
823 (source
824 (origin
825 (method url-fetch)
826 (uri (pypi-uri "humanfriendly" version))
827 (sha256
828 (base32
829 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
830 (build-system python-build-system)
831 (arguments
832 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
833 #:tests? #f))
834 (propagated-inputs
835 `(("python-monotonic" ,python-monotonic)))
836 (home-page "https://humanfriendly.readthedocs.io")
837 (synopsis "Human-friendly input and output in Python")
838 (description
839 "The functions and classes in @code{humanfriendly} can be used to make
840text interfaces more user-friendly. It includes tools to parse and format
841numbers, file sizes, and timespans, timers for long-running operations, menus
842to allow the user to choose from a list of options, and terminal interaction
843helpers.")
844 (license license:expat)))
845
846(define-public python2-humanfriendly
847 (package-with-python2 python-humanfriendly))
848
849(define-public python-capturer
850 (package
851 (name "python-capturer")
852 (version "2.4")
853 (source
854 (origin
855 (method url-fetch)
856 (uri (pypi-uri "capturer" version))
857 (sha256
858 (base32
859 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
860 (build-system python-build-system)
861 (arguments
862 `(#:tests? #f))
863 (propagated-inputs
864 `(("python-humanfriendly" ,python-humanfriendly)))
865 (home-page "https://capturer.readthedocs.io")
866 (synopsis "Capture stdout and stderr streams of the current process")
867 (description
868 "The capturer package makes it easy to capture the stdout and stderr
869streams of the current process and subprocesses. Output can be relayed
870to the terminal in real time but is also available to the Python program
871for additional processing.")
872 (license license:expat)))
873
874(define-public python2-capturer
875 (package-with-python2 python-capturer))
876
877(define-public python-case
878 (package
879 (name "python-case")
880 (version "1.5.3")
881 (source
882 (origin
883 (method url-fetch)
884 (uri (pypi-uri "case" version))
885 (sha256
886 (base32
887 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
888 (build-system python-build-system)
889 (propagated-inputs
890 `(("python-mock" ,python-mock)
891 ("python-nose" ,python-nose)
892 ("python-six" ,python-six)
893 ("python-unittest2" ,python-unittest2)))
894 (native-inputs
895 `(("python-coverage" ,python-coverage)))
896 (home-page "https://github.com/celery/case")
897 (synopsis "Unittest utilities and convenience methods")
898 (description
899 "The @code{case} package provides utilities on top of unittest, including
900some helpful Python 2 compatibility convenience methods.")
901 (license license:bsd-3)))
902
903(define-public python-verboselogs
904 (package
905 (name "python-verboselogs")
906 (version "1.7")
907 (source
908 (origin
909 (method url-fetch)
910 (uri (pypi-uri "verboselogs" version))
911 (sha256
912 (base32
913 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
914 (build-system python-build-system)
1760c970
MO
915 (arguments
916 `(#:phases
917 (modify-phases %standard-phases
918 (replace 'check
919 (lambda _
920 ;; Do not run pylint plugin test, as astroid is an old
921 ;; unsupported version.
922 (invoke "pytest" "-v" "-k" "not test_pylint_plugin"
923 "verboselogs/tests.py"))))))
44d10b1f
RW
924 (native-inputs
925 `(("python-mock" ,python-mock)
1760c970 926 ("python-pytest" ,python-pytest)))
44d10b1f
RW
927 (home-page "https://verboselogs.readthedocs.io")
928 (synopsis "Verbose logging level for Python's logging module")
929 (description
930 "The @code{verboselogs} package extends Python's @code{logging} module to
931add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
932 (license license:expat)))
933
934(define-public python2-verboselogs
935 (package-with-python2 python-verboselogs))
936
937(define-public python-coloredlogs
938 (package
939 (name "python-coloredlogs")
b2b8a39c 940 (version "10.0")
44d10b1f
RW
941 (source
942 (origin
943 (method url-fetch)
944 (uri (pypi-uri "coloredlogs" version))
945 (sha256
946 (base32
b2b8a39c 947 "0dkw6xp0r1dwgz4s2f58npx5nxfq51wf4l6qkm5ib27slgfs4sdq"))))
44d10b1f
RW
948 (build-system python-build-system)
949 (arguments
950 `(;Tests require some updated modules
951 #:tests? #f))
952 (propagated-inputs
953 `(("python-capturer" ,python-capturer)))
954 (home-page "https://coloredlogs.readthedocs.io")
955 (synopsis "Colored stream handler for Python's logging module")
956 (description
957 "The @code{coloredlogs} package enables colored terminal output for
958Python's logging module. The @code{ColoredFormatter} class inherits from
959@code{logging.Formatter} and uses ANSI escape sequences to render your logging
960messages in color.")
961 (license license:expat)))
962
963(define-public python2-coloredlogs
964 (package-with-python2 python-coloredlogs))
965
af760990
VC
966(define-public python-editorconfig
967 (package
968 (name "python-editorconfig")
969 (version "0.12.2")
970 (source
971 (origin
972 (method url-fetch)
973 (uri (pypi-uri "EditorConfig" version))
974 (sha256
975 (base32
976 "0v55z351p9qkyp3bbspwywwn28sbcknhirngjbj779n3z52z63hv"))))
977 (build-system python-build-system)
978 (home-page "https://editorconfig.org/")
979 (synopsis "EditorConfig bindings for python")
980 (description "The EditorConfig project consists of a file format for
981defining coding styles and a collection of text editor plugins that enable
982editors to read the file format and adhere to defined styles. EditorConfig
983files are easily readable and they work nicely with version control systems.")
984 ;; "fnmatch.py" and "ini.py" are licensed under psfl, the rest is bsd-2.
985 (license (list license:bsd-2 license:psfl))))
986
4caf37b0
MC
987(define-public python-et-xmlfile
988 (package
989 (name "python-et-xmlfile")
990 (version "1.0.1")
991 (source
992 (origin
993 (method url-fetch)
994 (uri (pypi-uri "et_xmlfile" version))
995 (sha256
996 (base32
997 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
998 (build-system python-build-system)
999 (arguments
1000 `(#:phases (modify-phases %standard-phases
1001 (replace 'check
1002 (lambda _
1003 (invoke "pytest"))))))
1004 (native-inputs
1005 `(("python-pytest" ,python-pytest)
1006 ("python-lxml" ,python-lxml))) ;used for the tests
1007 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
1008 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
1009 (description "This Python library is based upon the @code{xmlfile} module
1010from @code{lxml}. It aims to provide a low memory, compatible implementation
1011of @code{xmlfile}.")
1012 (license license:expat)))
1013
1014(define-public python2-et-xmlfile
1015 (package-with-python2 python-et-xmlfile))
1016
a042d348
MC
1017(define-public python-openpyxl
1018 (package
1019 (name "python-openpyxl")
441e6d93 1020 (version "2.6.2")
a042d348
MC
1021 (source
1022 (origin
1023 ;; We use the upstream repository, as the tests are not included in the
1024 ;; PyPI releases.
1025 (method hg-fetch)
1026 (uri (hg-reference
1027 (url "https://bitbucket.org/openpyxl/openpyxl")
1028 (changeset version)))
1029 (file-name (string-append name "-" version "-checkout"))
1030 (sha256
441e6d93 1031 (base32 "1qhij6kcvdxqjy4g6193nsv4q7fy8n4fwyd3c2z047idlm6s3j4w"))))
a042d348
MC
1032 (build-system python-build-system)
1033 (arguments
1034 `(#:phases (modify-phases %standard-phases
1035 (replace 'check
1036 (lambda _
1037 (invoke "pytest"))))))
1038 (native-inputs
1039 ;; For the test suite.
1040 `(("python-lxml" ,python-lxml)
1041 ("python-pillow" ,python-pillow)
1042 ("python-pytest" ,python-pytest)))
1043 (propagated-inputs
1044 `(("python-et-xmlfile" ,python-et-xmlfile)
1045 ("python-jdcal" ,python-jdcal)))
1046 (home-page "https://openpyxl.readthedocs.io")
1047 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
1048 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
1049XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
1050standard.")
1051 (license license:expat)))
1052
44d10b1f
RW
1053(define-public python-eventlet
1054 (package
1055 (name "python-eventlet")
c9876c9b 1056 (version "0.25.1")
44d10b1f
RW
1057 (source
1058 (origin
1059 (method url-fetch)
1060 (uri (pypi-uri "eventlet" version))
1061 (sha256
1062 (base32
c9876c9b 1063 "1hgz8jq19wlz8vwqj900ry8cjv578nz4scc91mlc8944yid6573c"))))
44d10b1f
RW
1064 (build-system python-build-system)
1065 (propagated-inputs
1066 `(("python-greenlet" ,python-greenlet)))
1067 (arguments
1068 ;; TODO: Requires unpackaged 'enum-compat'.
1069 '(#:tests? #f))
bff36617 1070 (home-page "https://eventlet.net")
44d10b1f
RW
1071 (synopsis "Concurrent networking library for Python")
1072 (description
1073 "Eventlet is a concurrent networking library for Python that
1074allows you to change how you run your code, not how you write it.
1075It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1076Coroutines ensure that the developer uses a blocking style of programming
1077that is similar to threading, but provide the benefits of non-blocking I/O.
1078The event dispatch is implicit, which means you can easily use @code{Eventlet}
1079from the Python interpreter, or as a small part of a larger application.")
1080 (license license:expat)))
1081
1082(define-public python2-eventlet
1083 (let ((base (package-with-python2
1084 (strip-python2-variant python-eventlet))))
1085 (package (inherit base)
1086 (propagated-inputs
1087 `(("python2-enum34" ,python2-enum34)
1088 ,@(package-propagated-inputs base))))))
1089
1090(define-public python-six
1091 (package
1092 (name "python-six")
6c58a06e 1093 (version "1.12.0")
44d10b1f
RW
1094 (source
1095 (origin
1096 (method url-fetch)
1097 (uri (pypi-uri "six" version))
1098 (sha256
1099 (base32
6c58a06e 1100 "0wxs1q74v07ssjywbbm7x6h5v9qx209ld2yfsif4060sxi0h2sni"))))
44d10b1f
RW
1101 (build-system python-build-system)
1102 (arguments
1103 `(#:phases
1104 (modify-phases %standard-phases
1105 (replace 'check
1106 (lambda _
1107 (invoke "py.test" "-v"))))))
1108 (native-inputs
1109 `(("python-py" ,python-py)
1110 ("python-pytest" ,python-pytest-bootstrap)))
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")
08eba545 1706 (version "1.8.0")
44d10b1f
RW
1707 (source
1708 (origin
1709 (method url-fetch)
1710 (uri (pypi-uri "py" version))
1711 (sha256
1712 (base32
08eba545 1713 "0lsy1gajva083pzc7csj1cvbmminb7b4l6a0prdzyb3fd829nqyw"))))
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
44d10b1f
RW
2587(define-public python-docutils
2588 (package
2589 (name "python-docutils")
2590 (version "0.14")
2591 (source
2592 (origin
2593 (method url-fetch)
2594 (uri (pypi-uri "docutils" version))
2595 (sha256
2596 (base32
2597 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2598 (build-system python-build-system)
2599 (arguments
2600 '(#:tests? #f)) ; no setup.py test command
2601 (home-page "http://docutils.sourceforge.net/")
2602 (synopsis "Python Documentation Utilities")
2603 (description
2604 "Docutils is a modular system for processing documentation into useful
2605formats, such as HTML, XML, and LaTeX. For input Docutils supports
2606reStructuredText.")
2607 ;; Most of the source code is public domain, but some source files are
2608 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2609 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2610
2611(define-public python2-docutils
2612 (package-with-python2 python-docutils))
2613
2614(define-public python-pygments
2615 (package
2616 (name "python-pygments")
eed81080 2617 (version "2.4.2")
44d10b1f
RW
2618 (source
2619 (origin
2620 (method url-fetch)
2621 (uri (pypi-uri "Pygments" version))
2622 (sha256
2623 (base32
eed81080 2624 "15v2sqm5g12bqa0c7wikfh9ck2nl97ayizy1hpqhmws5gqalq748"))))
44d10b1f
RW
2625 (build-system python-build-system)
2626 (arguments
2627 ;; FIXME: Tests require sphinx, which depends on this.
2628 '(#:tests? #f))
2629 (home-page "http://pygments.org/")
2630 (synopsis "Syntax highlighting")
2631 (description
2632 "Pygments is a syntax highlighting package written in Python.")
2633 (license license:bsd-2)))
2634
2635(define-public python2-pygments
2636 (package-with-python2 python-pygments))
2637
0f0a5ef9
MC
2638(define-public python-bumpversion
2639 (package
2640 (name "python-bumpversion")
2641 (version "0.5.3")
2642 (source
2643 (origin
2644 (method url-fetch)
2645 (uri (pypi-uri "bumpversion" version))
2646 (sha256
2647 (base32
2648 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
2649 (build-system python-build-system)
2650 (home-page "https://github.com/peritus/bumpversion")
2651 (synopsis "Tool to bump software version")
2652 (description "This tool provides a command-line interface (CLI) to bump a
2653software version simply.")
2654 (license license:expat)))
2655
b24fd2c2
MC
2656(define-public python-deprecated
2657 (package
2658 (name "python-deprecated")
2659 (version "1.2.5")
2660 (source
2661 (origin
2662 (method git-fetch)
2663 (uri (git-reference
2664 (url "https://github.com/tantale/deprecated.git")
2665 (commit (string-append "v" version))))
2666 (file-name (git-file-name name version))
2667 (sha256
2668 (base32
2669 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
2670 (build-system python-build-system)
2671 (arguments
2672 `(#:phases (modify-phases %standard-phases
2673 (replace 'check
2674 (lambda _
2675 (invoke "pytest"))))))
2676 (propagated-inputs
2677 `(("python-wrapt" ,python-wrapt)))
2678 (native-inputs
2679 `(("python-bumpversion" ,python-bumpversion)
2680 ("python-pytest" ,python-pytest)
2681 ("python-pytest-cov" ,python-pytest-cov)
2682 ("python-sphinx" ,python-sphinx)
2683 ("python-tox" ,python-tox)))
2684 (home-page "https://github.com/tantale/deprecated")
2685 (synopsis "Python decorator to deprecate classes, functions or methods")
2686 (description "The @code{deprecated} decorator provides a convenient way to deprecate
2687to deprecate classes, functions or methods.")
2688 (license license:expat)))
2689
d5a998fa
MC
2690(define-public python-pygithub
2691 (package
2692 (name "python-pygithub")
749e38d7 2693 (version "1.43.8")
d5a998fa
MC
2694 (source
2695 ;; We fetch from the Git repo because there are no tests in the PyPI
2696 ;; archive.
2697 (origin
2698 (method git-fetch)
2699 (uri (git-reference
2700 (url "https://github.com/PyGithub/PyGithub.git")
2701 (commit (string-append "v" version))))
2702 (file-name (git-file-name name version))
2703 (sha256
749e38d7 2704 (base32 "1625v558xga5mwhl9jqmibywy5qafmg1vqrirqz6zfq1la1d22mw"))))
d5a998fa
MC
2705 (build-system python-build-system)
2706 (arguments
2707 `(#:phases (modify-phases %standard-phases
2708 ;; Some tests rely on the network.
2709 (add-after 'unpack 'disable-failing-tests
2710 (lambda _
2711 (substitute* "tests/Issue142.py"
2712 (("testDecodeJson") "disabled_testDecodeJson"))
2713 #t))
2714 (add-before 'check 'prepare-for-tests
2715 (lambda _
2716 (for-each (lambda (f)
2717 (chmod f #o666))
2718 (find-files "./tests"))
2719 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
2720 (setenv "PYTHONPATH"
2721 (string-append "./tests:" (getenv "PYTHONPATH")))
2722 #t)))))
2723 (propagated-inputs
2724 `(("python-deprecated" ,python-deprecated)
2725 ("python-pyjwt" ,python-pyjwt)
2726 ("python-requests" ,python-requests)))
2727 (native-inputs `(("python-httpretty" ,python-httpretty)))
2728 (home-page "https://pygithub.readthedocs.io/en/latest/")
2729 (synopsis "Python library for the GitHub API")
2730 (description "This library allows managing GitHub resources such as
2731repositories, user profiles, and organizations in your Python applications,
2732using version 3 of the GitHub application programming interface (API).")
2733 (license license:lgpl3+)))
2734
c0c0bb38
MC
2735(define-public python-rellu
2736 (package
2737 (name "python-rellu")
2738 (version "0.7")
2739 (source
2740 (origin
2741 (method url-fetch)
2742 (uri (pypi-uri "rellu" version))
2743 (sha256
2744 (base32
2745 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
2746 (build-system python-build-system)
2747 (propagated-inputs
2748 `(("python-invoke" ,python-invoke)
2749 ("python-pygithub" ,python-pygithub)))
2750 (home-page "https://github.com/robotframework/rellu")
2751 (synopsis "Utilities to create PyPI releases")
2752 (description "This collection of utilities contains tooling and templates
2753to assist in creating releases on GitHub and publishing them on PyPI. It is
2754designed to be used by Robot Framework and tools and libraries in its
2755ecosystem, but can naturally be used also by other projects.")
2756 (license license:asl2.0)))
2757
b9790285
MC
2758(define-public python-robotframework
2759 (package
2760 (name "python-robotframework")
1710b8f8 2761 (version "3.1.2")
b9790285
MC
2762 ;; There are no tests in the PyPI archive.
2763 (source
2764 (origin
2765 (method git-fetch)
2766 (uri (git-reference
2767 (url "https://github.com/robotframework/robotframework.git")
2768 (commit (string-append "v" version))))
2769 (file-name (git-file-name name version))
2770 (sha256
1710b8f8 2771 (base32 "16gnxy0qinh8fhs0qvhff5z2xh49c3cqgm0d7bfjw120df6x7fym"))
b9790285
MC
2772 (patches (search-patches
2773 "python-robotframework-honor-source-date-epoch.patch"))))
2774 (build-system python-build-system)
2775 (arguments
2776 `(#:phases (modify-phases %standard-phases
2777 (add-before 'build 'build-and-install-doc
2778 (lambda* (#:key outputs #:allow-other-keys)
2779 (let* ((doc-output (assoc-ref outputs "doc"))
2780 (doc (string-append doc-output "/share/"
2781 ,name "-" ,version "/")))
2782 (invoke "invoke" "library-docs" "all")
2783 (mkdir-p doc)
2784 (copy-recursively "doc/libraries"
2785 (string-append doc "/libraries"))
2786 #t)))
2787 (replace 'check
2788 (lambda _
2789 (invoke "python" "utest/run.py"))))))
2790 (native-inputs
2791 `(("python-invoke" ,python-invoke)
2792 ("python-rellu" ,python-rellu)
2793 ("python:tk" ,python "tk"))) ;used when building the HTML doc
2794 (outputs '("out" "doc"))
2795 (home-page "https://robotframework.org")
2796 (synopsis "Generic automation framework")
2797 (description "Robot Framework is a generic automation framework for
2798acceptance testing, acceptance test driven development (ATDD), and robotic
2799process automation (RPA).")
2800 (license license:asl2.0)))
2801
5b84c120
MC
2802(define-public python-robotframework-lint
2803 ;; There is no properly tagged release; the commit below seems to correspond
2804 ;; to the 0.9 stable release available from PyPI. The tests are not
2805 ;; included in the PyPI archive, so we fetch the sources from the upstream
2806 ;; Git repo.
2807 (let ((commit "e851879bab1f63e4e53b34a4dc8a67ed95102830")
2808 (revision "1"))
2809 (package
2810 (name "python-robotframework-lint")
2811 (version (git-version "0.9.0" revision commit))
2812 (source
2813 (origin
2814 (method git-fetch)
2815 (uri (git-reference
2816 (url "https://github.com/boakley/robotframework-lint.git")
2817 (commit commit)))
2818 (file-name (git-file-name name version))
2819 (sha256
2820 (base32
2821 "1p6fknqg5sb9qz5857ji4a877657vgfjm5v3zn45994parx6ml1m"))))
2822 (build-system python-build-system)
2823 (arguments
2824 `(#:phases
2825 (modify-phases %standard-phases
2826 (replace 'check
2827 (lambda _
2828 (invoke "python" "-m" "robot" "-A"
2829 "tests/conf/default.args" "tests"))))))
2830 (propagated-inputs
2831 `(("python-robotframework" ,python-robotframework)))
2832 (home-page "https://github.com/boakley/robotframework-lint/")
2833 (synopsis "Static analysis tool (linter) for Robot Framework")
2834 (description "This package provides the @code{rflint} command-line
2835utility, a static analysis tool (linter) for Robot Framework source files.")
2836 (license license:asl2.0))))
2837
c0c64f17
MC
2838(define-public python-robotframework-sshlibrary
2839 (package
2840 (name "python-robotframework-sshlibrary")
2841 (version "3.3.0")
2842 ;; There are no tests in the PyPI archive.
2843 (source
2844 (origin
2845 (method git-fetch)
2846 (uri (git-reference
2847 (url "https://github.com/robotframework/SSHLibrary.git")
2848 (commit (string-append "v" version))))
2849 (file-name (git-file-name name version))
2850 (sha256
2851 (base32
2852 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
2853 (build-system python-build-system)
2854 (arguments
2855 `(#:phases
2856 (modify-phases %standard-phases
2857 (add-before 'build 'build-and-install-doc
2858 (lambda* (#:key outputs #:allow-other-keys)
2859 (let* ((doc-output (assoc-ref outputs "doc"))
2860 (doc (string-append doc-output "/share/"
2861 ,name "-" ,version "/")))
2862 (invoke "chmod" "-R" "+w" "docs")
2863 (invoke "invoke" "kw-docs" "project-docs")
2864 (mkdir-p doc)
2865 (for-each delete-file (find-files "docs" "\\.rst"))
2866 (copy-recursively "docs" doc)
2867 #t)))
2868 (replace 'check
2869 (lambda _
2870 ;; Some tests require an SSH server; we remove them.
2871 (delete-file "utest/test_client_api.py")
2872 (delete-file "utest/test_scp.py")
2873 (invoke "python" "utest/run.py"))))))
2874 (propagated-inputs
2875 `(("python-robotframework" ,python-robotframework)
2876 ("python-paramiko" ,python-paramiko)
2877 ("python-scp" ,python-scp)))
2878 (native-inputs
2879 `(("openssh" ,openssh)
2880 ("which" ,which)
2881 ;; To generate the documentation
2882 ("python-docutils" ,python-docutils)
2883 ("python-invoke" ,python-invoke)
2884 ("python-pygments" ,python-pygments)
2885 ("python-rellu" ,python-rellu)))
2886 (outputs '("out" "doc"))
2887 (home-page "https://github.com/robotframework/SSHLibrary")
2888 (synopsis "Robot Framework library for SSH and SFTP")
2889 (description "SSHLibrary is a Robot Framework library providing support
2890for SSH and SFTP. It has the following main usages:
2891@itemize @bullet
2892@item Executing commands on the remote machine, either blocking or non-blocking.
2893@item Writing and reading in an interactive shell.
2894@item Transferring files and directories over SFTP.
2895@item Ensuring that files and directories exist on the remote machine.
2896@end itemize")
2897 (license license:asl2.0)))
2898
13d825fc
MC
2899(define-public python-scp
2900 (package
2901 (name "python-scp")
2902 (version "0.13.2")
2903 (source
2904 (origin
2905 (method url-fetch)
2906 (uri (pypi-uri "scp" version))
2907 (sha256
2908 (base32
2909 "1crlpw9lnn58fs1c1rmh7s7s9y5gkgpgjsqlvg9qa51kq1knx7gg"))))
2910 (build-system python-build-system)
2911 (arguments
2912 '(#:tests? #f)) ;tests require an SSH server
2913 (propagated-inputs
2914 `(("python-paramiko" ,python-paramiko)))
2915 (home-page "https://github.com/jbardin/scp.py")
2916 (synopsis "SCP protocol module for Python and Paramiko")
2917 (description "The scp module extends the Paramiko library to send and
2918receive files via the SCP1 protocol, as implemented by the OpenSSH
2919@command{scp} program.")
2920 (license license:gpl2+)))
2921
44d10b1f
RW
2922(define-public python-rst.linker
2923 (package
2924 (name "python-rst.linker")
d37e8e53 2925 (version "1.11")
44d10b1f
RW
2926 (source
2927 (origin
2928 (method url-fetch)
2929 (uri (pypi-uri "rst.linker" version))
2930 (sha256
d37e8e53 2931 (base32 "0pqsfqqx8h0pq21k8l3k62kznrgaj2ala93c64s4d9rpbr4mgkd2"))))
44d10b1f
RW
2932 (build-system python-build-system)
2933 (propagated-inputs
2934 `(("python-dateutil" ,python-dateutil)
2935 ("python-six" ,python-six)))
2936 (native-inputs
2937 `(("python-setuptools-scm" ,python-setuptools-scm)))
2938 ;; Test would require path.py, which would introduce a cyclic dependence.
2939 (arguments `(#:tests? #f))
2940 ;; Note: As of version 1.7 the documentation is not worth building.
2941 (home-page "https://github.com/jaraco/rst.linker")
2942 (synopsis "Sphinx plugin to add links and timestamps")
2943 (description "rst.linker allows to automatically replace text by a
2944reStructuredText external reference or timestamps. It's primary purpose is to
2945augment the changelog, but it can be used for other documents, too.")
2946 (license license:expat)))
2947
2948(define-public python2-rst.linker
2949 (package-with-python2 python-rst.linker))
2950
2951(define-public python-feedgenerator
2952 (package
2953 (name "python-feedgenerator")
2954 (version "1.9")
2955 (source
2956 (origin
2957 (method url-fetch)
2958 (uri (pypi-uri "feedgenerator" version))
2959 (sha256
2960 (base32
2961 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
2962 (modules '((guix build utils)))
2963 (snippet
2964 '(begin
2965 ;; Remove pre-compiled .pyc files from source.
2966 (for-each delete-file-recursively
2967 (find-files "." "__pycache__" #:directories? #t))
2968 (for-each delete-file (find-files "." "\\.pyc$"))
2969 #t))))
2970 (build-system python-build-system)
2971 (propagated-inputs
2972 `(("python-pytz" ,python-pytz)
2973 ("python-six" ,python-six)))
2974 (home-page "https://github.com/getpelican/feedgenerator")
2975 (synopsis
2976 "Standalone version of Django's Atom/RSS feed generator")
2977 (description
2978 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2979which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
2980 (license license:bsd-3)))
2981
2982(define-public python2-feedgenerator
2983 (package-with-python2 python-feedgenerator))
2984
2985(define-public python-toml
2986 (package
2987 (name "python-toml")
2988 (version "0.9.4")
2989 (source
2990 (origin
2991 (method url-fetch)
2992 (uri (pypi-uri "toml" version))
2993 (sha256
2994 (base32
2995 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
2996 (build-system python-build-system)
2997 (arguments
2998 `(#:tests? #f)) ;no tests suite in release
2999 (home-page "https://github.com/uiri/toml")
3000 (synopsis "Library for TOML")
3001 (description
3002 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
3003Language (TOML) configuration files.")
3004 (license license:expat)))
3005
346c8752
BG
3006(define-public python-jsonrpc-server
3007 (package
3008 (name "python-jsonrpc-server")
d6cf4c6e 3009 (version "0.3.2")
346c8752
BG
3010 (source
3011 (origin
3012 (method url-fetch)
3013 (uri (pypi-uri "python-jsonrpc-server" version))
3014 (sha256
3015 (base32
d6cf4c6e 3016 "0ddgdp26dfxaz6isjbb12974b3rxavgsqrn2zrmck62cmipg5g05"))))
346c8752
BG
3017 (build-system python-build-system)
3018 (propagated-inputs
3019 `(("python-future" ,python-future)
3020 ("python-mock" ,python-mock)
d6cf4c6e
BG
3021 ("python-pytest" ,python-pytest)
3022 ("python-ujson" ,python-ujson)))
346c8752
BG
3023 (home-page
3024 "https://github.com/palantir/python-jsonrpc-server")
3025 (synopsis "JSON RPC 2.0 server library")
3026 (description
1df5407c 3027 "This package provides a JSON RPC 2.0 server library for Python.")
346c8752
BG
3028 (license license:expat)))
3029
56f4ad47
BG
3030(define-public python-pydocstyle
3031 (package
3032 (name "python-pydocstyle")
3033 (version "3.0.0")
3034 (source
3035 (origin
3036 (method url-fetch)
3037 (uri (pypi-uri "pydocstyle" version))
3038 (sha256
3039 (base32
3040 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
3041 (build-system python-build-system)
3042 (propagated-inputs
3043 `(("python-six" ,python-six)
3044 ("python-snowballstemmer" ,python-snowballstemmer)))
3045 (home-page
3046 "https://github.com/PyCQA/pydocstyle/")
3047 (synopsis "Python docstring style checker")
3048 (description
3049 "This package provides a style checker for the Python Language
3050Server (PLS).")
3051 (license license:expat)))
3052
be4d840c 3053(define-public python-language-server
808dd2d0
BL
3054 (package
3055 (name "python-language-server")
81e3ba03 3056 (version "0.31.6")
808dd2d0
BL
3057 (source
3058 (origin
3059 (method url-fetch)
3060 (uri (pypi-uri "python-language-server" version))
3061 (sha256
3062 (base32
81e3ba03 3063 "0cqrffd5272p2hifa35rf1h1g6dss741jmjkwa43jninifmbz0df"))))
808dd2d0
BL
3064 (build-system python-build-system)
3065 (propagated-inputs
3066 `(("python-pluggy" ,python-pluggy)
3067 ("python-jsonrpc-server" ,python-jsonrpc-server)
3068 ("python-jedi" ,python-jedi)
3069 ("python-yapf" ,python-yapf)
3070 ("python-pyflakes" ,python-pyflakes)
3071 ("python-pydocstyle" ,python-pydocstyle)
3072 ("python-pycodestyle" ,python-pycodestyle)
3073 ("python-mccabe" ,python-mccabe)
3074 ("python-rope" ,python-rope)
3075 ("python-autopep8" ,python-autopep8)
3076 ("python-flake8" ,python-flake8)
3077 ("python-pylint" ,python-pylint)))
3078 (home-page "https://github.com/palantir/python-language-server")
3079 (synopsis "Python implementation of the Language Server Protocol")
3080 (description
3081 "The Python Language Server (pyls) is an implementation of the Python 3
be4d840c
BG
3082language specification for the Language Server Protocol (LSP). This tool is
3083used in text editing environments to provide a complete and integrated
3084feature-set for programming Python effectively.")
808dd2d0 3085 (license license:expat)))
be4d840c 3086
44d10b1f
RW
3087(define-public python-black
3088 (package
3089 (name "python-black")
3090 (version "18.6b4")
3091 (source
3092 (origin
3093 (method url-fetch)
3094 (uri (pypi-uri "black" version))
3095 (sha256
3096 (base32
3097 "0i4sfqgz6w15vd50kbhi7g7rifgqlf8yfr8y78rypd56q64qn592"))))
3098 (build-system python-build-system)
3099 (arguments
3100 `(#:phases
3101 (modify-phases %standard-phases
3102 (add-after 'patch-source-shebangs 'patch-extra-shebangs
3103 (lambda _
3104 (let ((python3 (which "python3")))
3105 (substitute* '("tests/data/fmtonoff.py"
3106 "tests/data/string_prefixes.py"
3107 "tests/data/function.py")
3108 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
3109 (string-append "#!" python3 (if (string? minor-version)
3110 minor-version
3111 ""))))))))))
3112 (propagated-inputs
3113 `(("python-click" ,python-click)
3114 ("python-attrs" ,python-attrs)
3115 ("python-appdirs" ,python-appdirs)
3116 ("python-toml" ,python-toml)))
3117 (home-page "https://github.com/ambv/black")
3118 (synopsis "The uncompromising code formatter")
3119 (description "Black is the uncompromising Python code formatter.")
3120 (license license:expat)))
3121
3122(define-public python-blinker
3123 (package
3124 (name "python-blinker")
3125 (version "1.4")
3126 (source
3127 (origin
3128 (method url-fetch)
3129 (uri (pypi-uri "blinker" version))
3130 (sha256
3131 (base32
3132 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3133 (build-system python-build-system)
3134 (home-page "http://pythonhosted.org/blinker/")
3135 (synopsis "Fast, simple object-to-object and broadcast signaling")
3136 (description
3137 "Blinker provides a fast dispatching system that allows any number of
3138interested parties to subscribe to events, or \"signals\".")
3139 (license license:expat)))
3140
3141(define-public python2-blinker
3142 (package-with-python2 python-blinker))
3143
3144(define-public pelican
3145 (package
3146 (name "pelican")
fa9e3b5e 3147 (version "4.2.0")
44d10b1f
RW
3148 (source
3149 (origin
3150 (method url-fetch)
3151 (uri (pypi-uri "pelican" version))
3152 (sha256
3153 (base32
fa9e3b5e 3154 "0mp7hjyhs38ag1hyfcy882g400z0babqi72pnli46dqijfhajzmy"))))
44d10b1f
RW
3155 (build-system python-build-system)
3156 (propagated-inputs
fa9e3b5e
VC
3157 `(("python-blinker" ,python-blinker)
3158 ("python-dateutil" ,python-dateutil)
3159 ("python-docutils" ,python-docutils)
3160 ("python-feedgenerator" ,python-feedgenerator)
44d10b1f 3161 ("python-jinja2" ,python-jinja2)
fa9e3b5e 3162 ("python-markdown" ,python-markdown)
44d10b1f 3163 ("python-pygments" ,python-pygments)
44d10b1f 3164 ("python-pytz" ,python-pytz)
44d10b1f 3165 ("python-six" ,python-six)
fa9e3b5e 3166 ("python-unidecode" ,python-unidecode)))
44d10b1f
RW
3167 (home-page "https://getpelican.com/")
3168 (arguments
3169 `(;; XXX Requires a lot more packages to do unit tests :P
fa9e3b5e 3170 #:tests? #f))
44d10b1f
RW
3171 (synopsis "Python-based static site publishing system")
3172 (description
3173 "Pelican is a tool to generate a static blog from reStructuredText,
3174Markdown input files, and more. Pelican uses Jinja2 for templating
3175and is very extensible.")
3176 (license license:agpl3+)))
3177
8c141421
JH
3178(define-public mallard-ducktype
3179 (package
3180 (name "mallard-ducktype")
12cc3da5 3181 (version "1.0.2")
8c141421
JH
3182 (source
3183 (origin
3184 (method git-fetch)
12cc3da5
JH
3185 ;; git-reference because tests are not included in pypi source tarball
3186 ;; https://issues.guix.gnu.org/issue/36755#2
8c141421
JH
3187 (uri (git-reference
3188 (url "https://github.com/projectmallard/mallard-ducktype.git")
3189 (commit version)))
3190 (file-name (git-file-name name version))
3191 (sha256
3192 (base32
12cc3da5 3193 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
8c141421 3194 (build-system python-build-system)
5246655f
EF
3195 (arguments
3196 '(#:phases
3197 (modify-phases %standard-phases
3198 (replace 'check
3199 (lambda _
3200 (with-directory-excursion "tests"
3201 (invoke "sh" "runtests")))))))
8c141421
JH
3202 (home-page "http://projectmallard.org")
3203 (synopsis "Convert Ducktype to Mallard documentation markup")
3204 (description
3205 "Ducktype is a lightweight syntax that can represent all the semantics
3206of the Mallard XML documentation system. Ducktype files can be converted to
3207Mallard using the @command{ducktype} tool. The yelp-tools package
3208provides additional functionality on the produced Mallard documents.")
3209 (license license:expat)))
3210
44d10b1f
RW
3211(define-public python-cython
3212 (package
3213 (name "python-cython")
6fd27a71 3214 (version "0.29.13")
44d10b1f
RW
3215 (source
3216 (origin
3217 (method url-fetch)
3218 (uri (pypi-uri "Cython" version))
3219 (sha256
6fd27a71
TGR
3220 (base32
3221 "13k37lrcgagwwnzr5bzririsscb793vndj234d475x1h9ad0d7f2"))))
44d10b1f
RW
3222 (build-system python-build-system)
3223 ;; we need the full python package and not just the python-wrapper
3224 ;; because we need libpython3.3m.so
3225 (inputs
3226 `(("python" ,python)))
3227 (arguments
3228 `(#:phases
3229 (modify-phases %standard-phases
3230 (add-before 'check 'set-HOME
3231 ;; some tests require access to "$HOME/.cython"
3232 (lambda _ (setenv "HOME" "/tmp") #t))
3233
3234 ;; FIXME: These tests started failing on armhf after the 0.28 update
3235 ;; (commit c69d11c5930), both with an error such as this:
3236 ;; compiling (cpp) and running dictcomp ...
3237 ;; === C/C++ compiler error output: ===
3238 ;; ‘
3239 ;; dictcomp.cpp:5221: confused by earlier errors, bailing out
3240 ;; See <https://hydra.gnu.org/build/2948724> for logs.
3241 ,@(if (target-arm32?)
3242 `((add-before 'check 'disable-failing-tests
3243 (lambda _
3244 (let ((disabled-tests (open-file "tests/bugs.txt" "a")))
3245 (for-each (lambda (test)
3246 (format disabled-tests "~a\n" test))
3247 '("memslice" "dictcomp"))
3248 (close-port disabled-tests)))))
3249 '())
3250
3251 (replace 'check
3252 (lambda _
e9194eb0
MB
3253 ;; Disable compiler optimizations to greatly reduce the running
3254 ;; time of the test suite.
3255 (setenv "CFLAGS" "-O0")
3256
3257 (invoke "python" "runtests.py" "-vv"
3258 "-j" (number->string (parallel-job-count))))))))
f319409b 3259 (home-page "https://cython.org/")
44d10b1f
RW
3260 (synopsis "C extensions for Python")
3261 (description "Cython is an optimising static compiler for both the Python
3262programming language and the extended Cython programming language. It makes
3263writing C extensions for Python as easy as Python itself.")
3264 (license license:asl2.0)
3265 (properties `((python2-variant . ,(delay python2-cython))))))
3266
3267(define-public python2-cython
da460865
MB
3268 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
3269 (package
3270 (inherit base)
3271 (name "python2-cython")
3272 (inputs
3273 `(("python-2" ,python-2))) ;this is not automatically changed
3274 (arguments
3275 (substitute-keyword-arguments (package-arguments base)
3276 ((#:phases phases)
3277 `(modify-phases ,phases
3278 (add-before 'check 'adjust-test_embed
3279 (lambda _
3280 (substitute* "runtests.py"
3281 ;; test_embed goes great lengths to find the static libpythonX.Y.a
3282 ;; so it can give the right -L flag to GCC when embedding static
3283 ;; builds of Python. It is unaware that the Python "config"
3284 ;; directory (where the static library lives) was renamed in
3285 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
3286 ;; which works fine, because that is where the shared library is.
3287 ;;
3288 ;; It also appears to be unaware that the Makefile in Demos/embed
3289 ;; already unconditionally pass the static library location to GCC,
3290 ;; after checking sysconfig.get_config_var('LIBPL).
3291 ;;
3292 ;; The effect is that the linker is unable to resolve libexpat
3293 ;; symbols when building for Python 2, because neither the Python 2
3294 ;; shared library nor Expat is available. To fix it, we can either
3295 ;; add Expat as an input and make it visible to the linker, or just
3296 ;; prevent it from overriding the Python shared library location.
3297 ;; The end result is identical, so we take the easy route.
3298 ((" or libname not in os\\.listdir\\(libdir\\)")
3299 ""))
3300 #t)))))))))
44d10b1f
RW
3301
3302;; The RPython toolchain currently does not support Python 3.
3303(define-public python2-rpython
3304 (package
3305 (name "python2-rpython")
3306 (version "0.2.1")
3307 (source
3308 (origin
3309 (method url-fetch)
3310 (uri (pypi-uri "rpython" version))
3311 (sha256
3312 (base32
3313 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
3314 (build-system python-build-system)
3315 (arguments `(#:python ,python-2))
3316 (native-inputs
3317 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3318 (home-page "https://rpython.readthedocs.org")
3319 (synopsis "Framework for implementing interpreters and virtual machines")
3320 (description "RPython is a translation and support framework for
3321producing implementations of dynamic languages, emphasizing a clean separation
3322between language specification and implementation aspects.")
3323 (license license:expat)))
3324
3325;; NOTE: when upgrading numpy please make sure that python-pandas and
3326;; python-scipy still build, as these three packages are often used together.
3327(define-public python-numpy
3328 (package
3329 (name "python-numpy")
8e5fbd5d 3330 (version "1.17.3")
44d10b1f
RW
3331 (source
3332 (origin
3333 (method url-fetch)
3334 (uri (string-append
3335 "https://github.com/numpy/numpy/releases/download/v"
3336 version "/numpy-" version ".tar.gz"))
3337 (sha256
3338 (base32
8e5fbd5d 3339 "1ak9dmjja0q90a7fsxli51ypcwssh8c4pb6f8wkrsnf2xgdk6dy9"))))
44d10b1f
RW
3340 (build-system python-build-system)
3341 (inputs
3342 `(("openblas" ,openblas)
3343 ("lapack" ,lapack)))
3344 (native-inputs
3345 `(("python-cython" ,python-cython)
3346 ("python-pytest" ,python-pytest)
3347 ("gfortran" ,gfortran)))
3348 (arguments
3349 `(#:phases
3350 (modify-phases %standard-phases
3351 (add-before 'build 'configure-blas-lapack
3352 (lambda* (#:key inputs #:allow-other-keys)
3353 (call-with-output-file "site.cfg"
3354 (lambda (port)
3355 (format port
3356 "[openblas]
3357libraries = openblas
3358library_dirs = ~a/lib
3359include_dirs = ~a/include
3360
3361# backslash-n to make emacs happy
3362\n[lapack]
3363lapack_libs = lapack
3364library_dirs = ~a/lib
3365include_dirs = ~a/include
3366"
3367 (assoc-ref inputs "openblas")
3368 (assoc-ref inputs "openblas")
3369 (assoc-ref inputs "lapack")
3370 (assoc-ref inputs "lapack"))))
3371 #t))
3372 (add-before 'build 'fix-executable-paths
3373 (lambda* (#:key inputs #:allow-other-keys)
3374 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
3375 ;; instead of /bin/sh.
3376 (substitute* "numpy/distutils/exec_command.py"
3377 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
3378 (string-append match-start (assoc-ref inputs "bash") match-end)))
3379 ;; Use "gcc" executable, not "cc".
3380 (substitute* "numpy/distutils/system_info.py"
3381 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3382 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3383 #t))
3384 ;; Tests can only be run after the library has been installed and not
3385 ;; within the source directory.
3386 (delete 'check)
3387 (add-after 'install 'check
3388 (lambda* (#:key outputs inputs #:allow-other-keys)
3389 ;; Make installed package available for running the tests
3390 (add-installed-pythonpath inputs outputs)
3391 ;; Make sure "f2py" etc is found.
3392 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
3393 ":" (getenv "PATH")))
3394 (with-directory-excursion "/tmp"
3395 (invoke "python" "-c"
3396 "import numpy; numpy.test(verbose=2)")))))))
3397 (home-page "http://www.numpy.org/")
3398 (synopsis "Fundamental package for scientific computing with Python")
3399 (description "NumPy is the fundamental package for scientific computing
3400with Python. It contains among other things: a powerful N-dimensional array
3401object, sophisticated (broadcasting) functions, tools for integrating C/C++
3402and Fortran code, useful linear algebra, Fourier transform, and random number
3403capabilities.")
adb396ea 3404 (properties `((python2-variant . ,(delay python2-numpy))))
44d10b1f
RW
3405 (license license:bsd-3)))
3406
adb396ea 3407;; Numpy 1.16.x are the last versions that support Python 2.
44d10b1f 3408(define-public python2-numpy
adb396ea
MB
3409 (let ((numpy (package-with-python2
3410 (strip-python2-variant python-numpy))))
3411 (package/inherit
3412 numpy
3413 (version "1.16.5")
3414 (source (origin
3415 (method url-fetch)
3416 (uri (string-append
3417 "https://github.com/numpy/numpy/releases/download/v"
3418 version "/numpy-" version ".tar.gz"))
3419 (sha256
3420 (base32
3421 "0lg1cycxzi4rvvrd5zxinpdz0ni792fpx6xjd75z1923zcac8qrb")))))))
44d10b1f
RW
3422
3423;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
3424;; interest only for legacy code going back to NumPy's predecessor
3425;; Numeric.
3426(define-public python2-numpy-1.8
3427 (package (inherit python2-numpy)
3428 (version "1.8.2")
3429 (source
3430 (origin
6b61fc47
EF
3431 (method git-fetch)
3432 (uri (git-reference
3433 (url "https://github.com/numpy/numpy")
3434 (commit (string-append "v" version))))
3435 (file-name (git-file-name "numpy" version))
44d10b1f
RW
3436 (sha256
3437 (base32
6b61fc47 3438 "0ikgi15rsqwbkfsjjxrwh40lqyal2wvyp3923y6w6ch3dcr82sfk"))))
44d10b1f
RW
3439 (arguments
3440 (substitute-keyword-arguments (package-arguments python2-numpy)
3441 ((#:phases phases)
3442 `(modify-phases ,phases
3443 (replace 'configure-blas-lapack
3444 (lambda* (#:key inputs #:allow-other-keys)
3445 (call-with-output-file "site.cfg"
3446 (lambda (port)
3447 (format port
3448 "[openblas]
3449libraries = openblas,lapack
3450library_dirs = ~a/lib:~a/lib
3451include_dirs = ~a/include:~a/include
3452"
3453 (assoc-ref inputs "openblas")
3454 (assoc-ref inputs "lapack")
3455 (assoc-ref inputs "openblas")
3456 (assoc-ref inputs "lapack"))))
3457 #t))))))
3458 (native-inputs
3459 `(("python2-nose" ,python2-nose)))
3460 (description "NumPy is the fundamental package for scientific computing
3461with Python. It contains among other things: a powerful N-dimensional array
3462object, sophisticated (broadcasting) functions, tools for integrating C/C++
3463and Fortran code, useful linear algebra, Fourier transform, and random number
3464capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
3465that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
3466Numeric.")
3467 (license license:bsd-3)))
3468
3469(define-public python-munch
3470 (package
3471 (name "python-munch")
3472 (version "2.0.4")
3473 (source
3474 (origin
3475 (method url-fetch)
3476 (uri (pypi-uri "munch" version))
3477 (sha256
3478 (base32
3479 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3480 (build-system python-build-system)
3481 (home-page "https://github.com/Infinidat/munch")
3482 (synopsis "Dot-accessible dictionary")
3483 (description "Munch is a dot-accessible dictionary similar to JavaScript
3484objects.")
3485 (license license:expat)))
3486
3487(define-public python2-munch
3488 (package-with-python2 python-munch))
3489
3490(define-public python-colormath
3491 (package
3492 (name "python-colormath")
3493 (version "3.0.0")
3494 (source
3495 (origin
3496 (method url-fetch)
3497 (uri (pypi-uri "colormath" version))
3498 (sha256
3499 (base32
3500 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3501 (build-system python-build-system)
3502 (propagated-inputs
3503 `(("python-networkx" ,python-networkx)
3504 ("python-numpy" ,python-numpy)))
3505 (home-page "https://github.com/gtaylor/python-colormath")
3506 (synopsis "Color math and conversion library")
3507 (description
3508 "This is a Python library for color math and conversions.")
3509 (license license:bsd-3)))
3510
3511(define-public python2-colormath
3512 (package-with-python2 python-colormath))
3513
3514(define-public python-spectra
3515 (package
3516 (name "python-spectra")
3517 (version "0.0.11")
3518 (source
3519 (origin
3520 (method url-fetch)
3521 (uri (pypi-uri "spectra" version))
3522 (sha256
3523 (base32
3524 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3525 (build-system python-build-system)
3526 (arguments
3527 `(#:phases
3528 (modify-phases %standard-phases
3529 (replace 'check
38ec0f6a 3530 (lambda _ (invoke "nosetests" "-v"))))))
44d10b1f
RW
3531 (propagated-inputs
3532 `(("python-colormath" ,python-colormath)))
3533 (native-inputs
3534 `(("python-nose" ,python-nose)))
3535 (home-page "https://github.com/jsvine/spectra")
3536 (synopsis "Color scales and color conversion")
3537 (description
3538 "This package provides a Python library intended to make color math,
3539color scales, and color space conversion easy. It has support for:
3540
3541@enumerate
3542@item Color scales
3543@item Color ranges
3544@item Color blending
3545@item Brightening/darkening colors
3546@item Saturating/desaturating colors
3547@item Conversion to/from multiple color spaces.
3548@end enumerate\n")
3549 (license license:expat)))
3550
3551(define-public python2-spectra
3552 (package-with-python2 python-spectra))
3553
3554(define-public python-numpy-documentation
3555 (package
3556 (name "python-numpy-documentation")
3557 (version (package-version python-numpy))
3558 (source (package-source python-numpy))
3559 (build-system python-build-system)
3560 (native-inputs
3561 `(("python-matplotlib" ,python-matplotlib)
3562 ("python-numpy" ,python-numpy)
3563 ("pkg-config" ,pkg-config)
3564 ("python-sphinx" ,python-sphinx)
3565 ("python-numpydoc" ,python-numpydoc)
f75aa97f 3566 ("texlive" ,(texlive-union (list texlive-fonts-cm-super
44d10b1f
RW
3567 texlive-fonts-ec
3568 texlive-generic-ifxetex
3569 texlive-generic-pdftex
f75aa97f 3570 texlive-amsfonts
44d10b1f
RW
3571 texlive-latex-capt-of
3572 texlive-latex-cmap
3573 texlive-latex-environ
3574 texlive-latex-eqparbox
3575 texlive-latex-etoolbox
3576 texlive-latex-expdlist
3577 texlive-latex-fancyhdr
3578 texlive-latex-fancyvrb
3579 texlive-latex-fncychap
3580 texlive-latex-float
3581 texlive-latex-framed
3582 texlive-latex-geometry
3583 texlive-latex-graphics
3584 texlive-latex-hyperref
3585 texlive-latex-mdwtools
3586 texlive-latex-multirow
3587 texlive-latex-needspace
3588 texlive-latex-oberdiek
3589 texlive-latex-parskip
3590 texlive-latex-preview
3591 texlive-latex-tabulary
3592 texlive-latex-threeparttable
3593 texlive-latex-titlesec
3594 texlive-latex-trimspaces
3595 texlive-latex-ucs
3596 texlive-latex-upquote
3597 texlive-latex-url
3598 texlive-latex-varwidth
3599 texlive-latex-wrapfig)))
3600 ("texinfo" ,texinfo)
3601 ("perl" ,perl)
3602 ("scipy-sphinx-theme"
3603 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3604 (method git-fetch)
3605 (uri (git-reference
3606 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3607 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3608 (sha256
3609 (base32
3610 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3611 ,@(package-native-inputs python-numpy)))
3612 (arguments
3613 `(#:tests? #f ; we're only generating the documentation
3614 #:phases
3615 (modify-phases %standard-phases
3616 (delete 'build)
3617 (replace 'install
3618 (lambda* (#:key inputs outputs #:allow-other-keys)
3619 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3620 (doc (string-append
3621 data "/doc/" ,name "-"
3622 ,(package-version python-numpy)))
3623 (info-reader (string-append data "/info"))
3624 (html (string-append doc "/html"))
3625 (scipy-sphinx-theme "scipy-sphinx-theme")
3626 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3627 (pyver ,(string-append "PYVER=")))
3628
3629 ;; FIXME: this is needed to for texlive-union to generate
3630 ;; fonts, which are not found.
3631 (setenv "HOME" "/tmp")
3632
3633 (with-directory-excursion "doc"
3634 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3635 (mkdir-p html)
4fc898da
RW
3636 (invoke "make" "html" pyver)
3637 (invoke "make" "latex" "PAPER=a4" pyver)
3638 (invoke "make" "-C" "build/latex"
44d10b1f
RW
3639 "all-pdf" "PAPER=a4" pyver)
3640 ;; FIXME: Generation of the info file fails.
4fc898da 3641 ;; (invoke "make" "info" pyver)
44d10b1f
RW
3642 ;; (mkdir-p info)
3643 ;; (copy-file "build/texinfo/numpy.info"
3644 ;; (string-append info "/numpy.info"))
3645 (for-each (lambda (file)
3646 (copy-file (string-append "build/latex" file)
3647 (string-append doc file)))
3648 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3649 (with-directory-excursion "build/html"
3650 (for-each (lambda (file)
3651 (let* ((dir (dirname file))
3652 (tgt-dir (string-append html "/" dir)))
3653 (unless (equal? "." dir)
3654 (mkdir-p tgt-dir))
3655 (install-file file html)))
3656 (find-files "." ".*")))))
3657 #t)))))
3658 (home-page (package-home-page python-numpy))
3659 (synopsis "Documentation for the python-numpy package")
3660 (description (package-description python-numpy))
3661 (license (package-license python-numpy))))
3662
3663(define-public python2-numpy-documentation
3664 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3665 (package
3666 (inherit numpy-documentation)
3667 (native-inputs `(("python2-functools32" ,python2-functools32)
3668 ,@(package-native-inputs numpy-documentation))))))
3669
3670(define-public python-pygit2
3671 (package
3672 (name "python-pygit2")
dac8b275 3673 (version "0.28.2")
44d10b1f
RW
3674 (source
3675 (origin
3676 (method url-fetch)
3677 (uri (pypi-uri "pygit2" version))
3678 (sha256
dac8b275 3679 (base32 "11kzj5mjkspvplnpdb6bj8dcj6rgmkk986k8hjcklyg5yaxkz32d"))))
44d10b1f
RW
3680 (build-system python-build-system)
3681 (arguments
c3ecab0d 3682 '(#:tests? #f)) ; tests don't run correctly in our environment
44d10b1f
RW
3683 (propagated-inputs
3684 `(("python-six" ,python-six)
3685 ("python-cffi" ,python-cffi)
3686 ("libgit2" ,libgit2)
3687 ("python-tox" ,python-tox)))
3688 (native-inputs
3689 `(("python-pytest" ,python-pytest)))
3690 (home-page "https://github.com/libgit2/pygit2")
3691 (synopsis "Python bindings for libgit2")
3692 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3693library, libgit2 implements Git plumbing.")
3694 ;; GPL2.0 only, with linking exception.
3695 (license license:gpl2)))
3696
3697(define-public python2-pygit2
3698 (package-with-python2 python-pygit2))
3699
3700(define-public python-pyparsing
3701 (package
3702 (name "python-pyparsing")
6d3cff5a 3703 (version "2.3.1")
44d10b1f
RW
3704 (source
3705 (origin
3706 (method url-fetch)
3707 (uri (pypi-uri "pyparsing" version))
3708 (sha256
6d3cff5a 3709 (base32 "0yk6xl885b91dmlhlsap7x78hk2rdr879fln9anbq6k4ca42djb6"))))
44d10b1f
RW
3710 (build-system python-build-system)
3711 (outputs '("out" "doc"))
3712 (arguments
3713 `(#:tests? #f ; no test target
3714 #:phases
3715 (modify-phases %standard-phases
3716 (add-after 'install 'install-doc
3717 (lambda* (#:key outputs #:allow-other-keys)
3718 (let* ((doc (string-append (assoc-ref outputs "doc")
3719 "/share/doc/" ,name "-" ,version))
3720 (html-doc (string-append doc "/html"))
3721 (examples (string-append doc "/examples")))
3722 (mkdir-p html-doc)
3723 (mkdir-p examples)
3724 (for-each
3725 (lambda (dir tgt)
3726 (map (lambda (file)
3727 (install-file file tgt))
3728 (find-files dir ".*")))
3729 (list "docs" "htmldoc" "examples")
3730 (list doc html-doc examples))
3731 #t))))))
3732 (home-page "https://github.com/pyparsing/pyparsing")
3733 (synopsis "Python parsing class library")
3734 (description
3735 "The pyparsing module is an alternative approach to creating and
3736executing simple grammars, vs. the traditional lex/yacc approach, or the use
3737of regular expressions. The pyparsing module provides a library of classes
3738that client code uses to construct the grammar directly in Python code.")
3739 (license license:expat)))
3740
3741(define-public python2-pyparsing
3742 (package-with-python2 python-pyparsing))
3743
3744(define-public python-numpydoc
3745 (package
3746 (name "python-numpydoc")
3747 (version "0.8.0")
3748 (source
3749 (origin
3750 (method url-fetch)
3751 (uri (pypi-uri "numpydoc" version))
3752 (sha256
3753 (base32
3754 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
3755 (build-system python-build-system)
3756 (propagated-inputs
3757 `(("python-sphinx" ,python-sphinx)))
3758 (native-inputs
3759 `(("python-nose" ,python-nose)))
3760 (home-page "https://pypi.python.org/pypi/numpydoc")
3761 (synopsis
3762 "Numpy's Sphinx extensions")
3763 (description
3764 "Sphinx extension to support docstrings in Numpy format.")
3765 (license license:bsd-2)))
3766
3767(define-public python2-numpydoc
3768 (package-with-python2 python-numpydoc))
3769
3770(define-public python-numexpr
3771 (package
3772 (name "python-numexpr")
3773 (version "2.6.5")
3774 (source
3775 (origin
3776 (method url-fetch)
3777 (uri (pypi-uri "numexpr" version))
3778 (sha256
3779 (base32
3780 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3781 (build-system python-build-system)
3782 (arguments `(#:tests? #f)) ; no tests included
3783 (propagated-inputs
3784 `(("python-numpy" ,python-numpy)))
3785 (home-page "https://github.com/pydata/numexpr")
3786 (synopsis "Fast numerical expression evaluator for NumPy")
3787 (description
3788 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3789expressions that operate on arrays are accelerated and use less memory than
3790doing the same calculation in Python. In addition, its multi-threaded
3791capabilities can make use of all your cores, which may accelerate
3792computations, most specially if they are not memory-bounded (e.g. those using
3793transcendental functions).")
3794 (license license:expat)))
3795
3796(define-public python2-numexpr
3797 (package-with-python2 python-numexpr))
3798
3799(define-public python-cycler
3800 (package
3801 (name "python-cycler")
3802 (version "0.10.0")
3803 (source (origin
3804 (method url-fetch)
3805 (uri (pypi-uri "cycler" version))
3806 (sha256
3807 (base32
3808 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3809 (build-system python-build-system)
3810 (arguments
3811 ;; XXX: The current version requires 'coveralls' which we don't have.
3812 ;; Enable this for the next release which uses 'python-pytest'.
3813 '(#:tests? #f))
3814 (propagated-inputs
3815 `(("python-six" ,python-six)))
3816 (home-page "http://matplotlib.org/cycler/")
3817 (synopsis "Composable keyword argument iterator")
3818 (description
3819 "When using @code{matplotlib} and plotting more than one line, it is
3820common to want to be able to want to be able to cycle over one or more artist
3821styles; but the plotting logic can quickly become involved.
3822To address this and enable easy cycling over arbitrary @code{kwargs}, the
3823@code{Cycler} class was developed.")
3824 (license license:bsd-3)))
3825
3826(define-public python2-cycler
3827 (package-with-python2 python-cycler))
3828
3829(define-public python-colorspacious
3830 (package
3831 (name "python-colorspacious")
53a3ebed 3832 (version "1.1.2")
44d10b1f 3833 (source
dee92e65
TGR
3834 (origin
3835 (method git-fetch)
3836 (uri (git-reference
3837 (url "https://github.com/njsmith/colorspacious.git")
3838 (commit (string-append "v" version))))
3839 (file-name (git-file-name name version))
3840 (sha256
53a3ebed 3841 (base32 "0x7nkphr6g5ql5fvgss8l56rgiyjgh6fm8zzs73i94ci9wzlm63w"))))
44d10b1f
RW
3842 (build-system python-build-system)
3843 (propagated-inputs
3844 `(("python-numpy" ,python-numpy)))
3845 (native-inputs
3846 `(("python-nose" ,python-nose)))
3847 (arguments
3848 `(#:phases
3849 (modify-phases %standard-phases
3850 (replace 'check
3851 (lambda _
c988afda 3852 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
44d10b1f
RW
3853 (home-page "https://github.com/njsmith/colorspacious")
3854 (synopsis "Python library for colorspace conversions")
3855 (description "@code{colorspacious} is a Python library that lets you
3856convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3857 (license license:expat)))
3858
3859(define-public python2-colorspacious
3860 (package-with-python2 python-colorspacious))
3861
3862(define-public python-matplotlib
3863 (package
3864 (name "python-matplotlib")
9e7cb2f1 3865 (version "3.1.2")
44d10b1f
RW
3866 (source
3867 (origin
3868 (method url-fetch)
3869 (uri (pypi-uri "matplotlib" version))
3870 (sha256
3871 (base32
9e7cb2f1 3872 "1nmshfqh7wyg15i16hx1yiylcvzkws29ivn66n3i0wyqwcpjr3lf"))))
44d10b1f
RW
3873 (build-system python-build-system)
3874 (propagated-inputs ; the following packages are all needed at run time
3875 `(("python-cycler" ,python-cycler)
3876 ("python-kiwisolver" ,python-kiwisolver)
3877 ("python-pyparsing" ,python-pyparsing)
3878 ("python-pygobject" ,python-pygobject)
3879 ("gobject-introspection" ,gobject-introspection)
3880 ("python-tkinter" ,python "tk")
3881 ("python-dateutil" ,python-dateutil)
3882 ("python-numpy" ,python-numpy)
3883 ("python-pillow" ,python-pillow)
3884 ("python-pytz" ,python-pytz)
3885 ("python-six" ,python-six)
44d10b1f
RW
3886 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3887 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3888 ;; object. For this reason we need to import both libraries.
5ea654cf 3889 ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi
44d10b1f 3890 ("python-pycairo" ,python-pycairo)
44d10b1f
RW
3891 ("python-cairocffi" ,python-cairocffi)))
3892 (inputs
3893 `(("libpng" ,libpng)
3894 ("imagemagick" ,imagemagick)
3895 ("freetype" ,freetype)
3896 ("cairo" ,cairo)
3897 ("glib" ,glib)
3898 ;; FIXME: Add backends when available.
3899 ;("python-wxpython" ,python-wxpython)
3900 ("tcl" ,tcl)
3901 ("tk" ,tk)))
3902 (native-inputs
3903 `(("pkg-config" ,pkg-config)
5ea654cf
RW
3904 ("python-pytest" ,python-pytest)
3905 ("python-mock" ,python-mock)
3906 ("unzip" ,unzip)
3907 ("jquery-ui"
3908 ,(origin
3909 (method url-fetch)
3910 (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip")
3911 (sha256
3912 (base32
3913 "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq"))))))
44d10b1f
RW
3914 (arguments
3915 `(#:phases
3916 (modify-phases %standard-phases
5ea654cf
RW
3917 ;; XXX We disable all image comparison tests because we're using a
3918 ;; newer version of FreeType than matplotlib expects. This leads to
3919 ;; minor differences throughout the tests.
3920 (add-after 'unpack 'fix-and-disable-failing-tests
3921 (lambda _
3922 (substitute* (append (find-files "lib/matplotlib/tests/"
3923 "test_.*\\.py$")
3924 (find-files "lib/mpl_toolkits/tests"
3925 "test_.*\\.py$"))
3926 (("^from matplotlib" match)
3927 (string-append "import pytest\n" match))
3928 (("( *)@image_comparison" match indent)
3929 (string-append indent
3930 "@pytest.mark.skip(reason=\"unknown minor image differences\")\n"
3931 match)))
3932 (substitute* "lib/matplotlib/tests/test_animation.py"
3933 (("/bin/sh") (which "sh")))
3934 (for-each delete-file
3935 ;; test_normal_axes, test_get_tightbbox_polar
3936 '("lib/matplotlib/tests/test_axes.py"
9e7cb2f1
RW
3937 ;; We don't use the webagg backend and this test forces it.
3938 "lib/matplotlib/tests/test_backend_webagg.py"
5ea654cf
RW
3939 ;; test_outward_ticks
3940 "lib/matplotlib/tests/test_tightlayout.py"
9e7cb2f1
RW
3941 ;; test_hidden_axes fails with minor extent
3942 ;; differences, possibly due to the use of a
3943 ;; different version of FreeType.
3944 "lib/matplotlib/tests/test_constrainedlayout.py"
5ea654cf
RW
3945 ;; Fontconfig returns no fonts.
3946 "lib/matplotlib/tests/test_font_manager.py"))
3947 #t))
3948 (add-before 'install 'install-jquery-ui
3949 (lambda* (#:key outputs inputs #:allow-other-keys)
3950 (let ((dir (string-append (assoc-ref outputs "out")
3951 "/lib/python3.7/site-packages/matplotlib/backends/web_backend/")))
3952 (mkdir-p dir)
3953 (invoke "unzip"
3954 (assoc-ref inputs "jquery-ui")
3955 "-d" dir))
3956 #t))
c09f598d 3957 (replace 'check
5ea654cf
RW
3958 (lambda* (#:key outputs inputs #:allow-other-keys)
3959 (add-installed-pythonpath inputs outputs)
3960 (invoke "python" "tests.py" "-v"
9e7cb2f1 3961 "-m" "not network and not webagg")))
44d10b1f
RW
3962 (add-before 'build 'configure-environment
3963 (lambda* (#:key outputs inputs #:allow-other-keys)
34c2a16b
RW
3964 (let ((cairo (assoc-ref inputs "cairo")))
3965 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
44d10b1f 3966 ;; has not effect.
34c2a16b 3967 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
44d10b1f
RW
3968 (setenv "HOME" (getcwd))
3969 (call-with-output-file "setup.cfg"
3970 (lambda (port)
3971 (format port "[directories]~%
3972basedirlist = ~a,~a~%
5ea654cf
RW
3973[packages]~%
3974tests = True~%"
44d10b1f
RW
3975 (assoc-ref inputs "tcl")
3976 (assoc-ref inputs "tk")))))
3977 #t)))))
339b5828 3978 (home-page "https://matplotlib.org/")
44d10b1f
RW
3979 (synopsis "2D plotting library for Python")
3980 (description
3981 "Matplotlib is a Python 2D plotting library which produces publication
3982quality figures in a variety of hardcopy formats and interactive environments
3983across platforms. Matplotlib can be used in Python scripts, the python and
3984ipython shell, web application servers, and six graphical user interface
3985toolkits.")
3986 (license license:psfl)
3987 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3988
3989(define-public python2-matplotlib
3990 (let ((matplotlib (package-with-python2
3991 (strip-python2-variant python-matplotlib))))
3992 (package (inherit matplotlib)
7380df73 3993 (version "2.2.4")
5ea654cf
RW
3994 (source
3995 (origin
3996 (method url-fetch)
3997 (uri (pypi-uri "matplotlib" version))
3998 (sha256
3999 (base32
7380df73 4000 "09i1gnrra1590brc1f8d5rh2zvnknmfgzp613ab0462qkrwj15h2"))))
5d484f42
EF
4001 (arguments
4002 (substitute-keyword-arguments (package-arguments matplotlib)
4003 ((#:phases phases)
4004 `(modify-phases ,phases
66a3c2db
EF
4005 (replace 'install-jquery-ui
4006 (lambda* (#:key outputs inputs #:allow-other-keys)
4007 (let ((dir (string-append (assoc-ref outputs "out")
4008 "/lib/python2.7/site-packages/"
4009 "matplotlib/backends/web_backend/")))
4010 (mkdir-p dir)
4011 (invoke "unzip"
4012 (assoc-ref inputs "jquery-ui")
4013 "-d" dir))
4014 #t))
38a404d5 4015 (delete 'fix-and-disable-failing-tests)
5d484f42 4016 (delete 'check))))) ; These tests weren't run the the past.
44d10b1f
RW
4017 ;; Make sure to use special packages for Python 2 instead
4018 ;; of those automatically rewritten by package-with-python2.
4019 (propagated-inputs
4020 `(("python2-pycairo" ,python2-pycairo)
4021 ("python2-backports-functools-lru-cache"
4022 ,python2-backports-functools-lru-cache)
4023 ("python2-functools32" ,python2-functools32)
4024 ("python2-pygobject-2" ,python2-pygobject-2)
4025 ("python2-subprocess32" ,python2-subprocess32)
4026 ("python2-tkinter" ,python-2 "tk")
4027 ,@(fold alist-delete (package-propagated-inputs matplotlib)
4028 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
4029
4030(define-public python-matplotlib-documentation
4031 (package
4032 (name "python-matplotlib-documentation")
4033 (version (package-version python-matplotlib))
4034 (source (package-source python-matplotlib))
4035 (build-system python-build-system)
4036 (native-inputs
4037 `(("python-matplotlib" ,python-matplotlib)
4038 ("python-colorspacious" ,python-colorspacious)
4039 ("python-sphinx" ,python-sphinx)
5ad0a452 4040 ("python-sphinx-copybutton" ,python-sphinx-copybutton)
44d10b1f
RW
4041 ("python-sphinx-gallery" ,python-sphinx-gallery)
4042 ("python-numpydoc" ,python-numpydoc)
4043 ("python-ipython" ,python-ipython)
e7a53914 4044 ("python-ipykernel" ,python-ipykernel)
44d10b1f
RW
4045 ("python-mock" ,python-mock)
4046 ("graphviz" ,graphviz)
f75aa97f 4047 ("texlive" ,(texlive-union (list texlive-amsfonts
e7a53914
RW
4048 texlive-latex-amsmath
4049 texlive-latex-enumitem
4050 texlive-latex-expdlist
4051 texlive-latex-geometry
4052 texlive-latex-preview
4053 texlive-latex-type1cm
4054 texlive-latex-ucs
4055
4056 texlive-generic-pdftex
4057
e7a53914
RW
4058 texlive-fonts-ec
4059 texlive-fonts-adobe-times
4060 texlive-fonts-txfonts)))
44d10b1f
RW
4061 ("texinfo" ,texinfo)
4062 ,@(package-native-inputs python-matplotlib)))
4063 (arguments
4064 `(#:tests? #f ; we're only generating documentation
4065 #:phases
4066 (modify-phases %standard-phases
5ea654cf
RW
4067 ;; The tests in python-matplotlib are run after the install phase, so
4068 ;; we need to delete the extra phase here.
4069 (delete 'check)
44d10b1f
RW
4070 (replace 'build
4071 (lambda _
4072 (chdir "doc")
e7a53914
RW
4073 (setenv "PYTHONPATH"
4074 (string-append (getenv "PYTHONPATH")
4075 ":" (getcwd) "/../examples/units"))
44d10b1f 4076 (substitute* "conf.py"
e7a53914
RW
4077 ;; Don't use git.
4078 (("^SHA = check_output.*")
4079 (string-append "SHA = \"" ,version "\"\n"))
4080 ;; Don't fetch intersphinx files from the Internet
4081 (("^explicit_order_folders" m)
4082 (string-append "intersphinx_mapping = {}\n" m))
4083 (("'sphinx.ext.intersphinx',") "")
4084 ;; Disable URL embedding which requires internet access.
4085 (("'https://docs.scipy.org/doc/numpy'") "None")
4086 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
4087 (invoke "make"
4088 "SPHINXBUILD=sphinx-build"
4089 "SPHINXOPTS=" ; don't abort on warnings
4090 "html" "texinfo")))
44d10b1f
RW
4091 (replace 'install
4092 (lambda* (#:key inputs outputs #:allow-other-keys)
4093 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4094 (doc (string-append data "/doc/python-matplotlib-" ,version))
4095 (info (string-append data "/info"))
4096 (html (string-append doc "/html")))
4097 (mkdir-p html)
4098 (mkdir-p info)
4099 (copy-recursively "build/html" html)
4100 (symlink (string-append html "/_images")
4101 (string-append info "/matplotlib-figures"))
4102 (with-directory-excursion "build/texinfo"
4103 (substitute* "matplotlib.texi"
4104 (("@image\\{([^,]*)" all file)
4105 (string-append "@image{matplotlib-figures/" file)))
4106 (symlink (string-append html "/_images")
4107 "./matplotlib-figures")
e7a53914
RW
4108 (invoke "makeinfo" "--no-split"
4109 "-o" "matplotlib.info" "matplotlib.texi"))
4110 (install-file "build/texinfo/matplotlib.info" info))
44d10b1f
RW
4111 #t)))))
4112 (home-page (package-home-page python-matplotlib))
4113 (synopsis "Documentation for the python-matplotlib package")
4114 (description (package-description python-matplotlib))
4115 (license (package-license python-matplotlib))))
4116
4117(define-public python2-matplotlib-documentation
5ad0a452
RW
4118 (let ((parent (package-with-python2 python-matplotlib-documentation)))
4119 (package
4120 (inherit parent)
4121 (native-inputs
4122 (alist-delete "python-sphinx-copybutton"
4123 (package-native-inputs parent))))))
44d10b1f 4124
55dae98f
RW
4125(define-public python-matplotlib-venn
4126 (package
4127 (name "python-matplotlib-venn")
4128 (version "0.11.5")
4129 (source
4130 (origin
4131 (method url-fetch)
4132 (uri (pypi-uri "matplotlib-venn" version ".zip"))
4133 (sha256
4134 (base32
4135 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
4136 (build-system python-build-system)
4137 (arguments '(#:tests? #f)) ; tests are not included
4138 (propagated-inputs
4139 `(("python-matplotlib" ,python-matplotlib)
4140 ("python-numpy" ,python-numpy)
4141 ("python-scipy" ,python-scipy)))
4142 (native-inputs
4143 `(("unzip" ,unzip)))
4144 (home-page "https://github.com/konstantint/matplotlib-venn")
4145 (synopsis "Plot area-proportional Venn diagrams")
4146 (description
4147 "This package provides tools for plotting area-proportional two- and
4148three-way Venn diagrams in @code{matplotlib}.")
4149 (license license:expat)))
4150
44d10b1f
RW
4151(define-public python2-pysnptools
4152 (package
4153 (name "python2-pysnptools")
5d1ade85 4154 (version "0.3.13")
44d10b1f
RW
4155 (source
4156 (origin
4157 (method url-fetch)
5d1ade85 4158 (uri (pypi-uri "pysnptools" version))
44d10b1f
RW
4159 (sha256
4160 (base32
5d1ade85 4161 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
44d10b1f
RW
4162 (build-system python-build-system)
4163 (arguments
5d1ade85
RW
4164 `(#:python ,python-2 ; only Python 2.7 is supported
4165 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
44d10b1f
RW
4166 (propagated-inputs
4167 `(("python2-numpy" ,python2-numpy)
4168 ("python2-scipy" ,python2-scipy)
4169 ("python2-pandas" ,python2-pandas)))
44d10b1f 4170 (native-inputs
5d1ade85 4171 `(("python2-cython" ,python2-cython)))
1b66989b 4172 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
44d10b1f
RW
4173 (synopsis "Library for reading and manipulating genetic data")
4174 (description
4175 "PySnpTools is a library for reading and manipulating genetic data. It
4176can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4177those files. It can also efficiently manipulate ranges of integers using set
4178operators such as union, intersection, and difference.")
4179 (license license:asl2.0)))
4180
44d10b1f
RW
4181(define-public python-socksipy-branch
4182 (package
4183 (name "python-socksipy-branch")
4184 (version "1.01")
4185 (source
4186 (origin
4187 (method url-fetch)
4188 (uri (pypi-uri "SocksiPy-branch" version))
4189 (sha256
4190 (base32
4191 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4192 (build-system python-build-system)
4193 (arguments
4194 `(#:tests? #f)) ; There are no tests
4195 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4196 (synopsis "Python SOCKS module")
4197 (description
4198 "SocksiPy - A Python SOCKS client module. It provides a
4199socket-like interface that supports connections to any TCP
4200service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4201The original version was developed by Dan Haim, this is a
4202branch created by Mario Vilas to address some open issues,
4203as the original project seems to have been abandoned circa 2007.")
4204 (license license:bsd-3)))
4205
4206(define-public python2-socksipy-branch
4207 (package-with-python2 python-socksipy-branch))
4208
6fcceb23
AG
4209(define-public python-socksipychain
4210 (package
4211 (name "python-socksipychain")
d97cdff1 4212 (version "2.1.0")
6fcceb23
AG
4213 (source
4214 (origin
4215 (method git-fetch)
4216 (uri (git-reference
4217 (url "https://github.com/pagekite/PySocksipyChain.git")
4218 (commit (string-append "v" version))))
4219 (file-name (git-file-name name version))
4220 (sha256
4221 (base32
d97cdff1 4222 "0idm9a050rd2kbgbz2sk9ib9589kj4xh1xdnggs6xbq2v2y8f6zn"))))
6fcceb23
AG
4223 (build-system python-build-system)
4224 (arguments
4225 `(#:tests? #f)) ; Tests try to access the network.
4226 (home-page "http://pagekite.net/wiki/Floss/PySocksipyChain/")
4227 (synopsis "Python SOCKS module with chained proxies support")
4228 (description
4229 "SocksiPyChain is a modified version of the SocksiPy SOCKS module, which
4230adds support for arbitrary chaining of proxy servers and various modes of
4231TLS/SSL encryption. It was developed for use in PageKite, and also includes
4232a simple netcat replacement with chaining support.")
4233 (license license:bsd-3)))
4234
44d10b1f
RW
4235(define-public python-pycodestyle
4236 (package
4237 (name "python-pycodestyle")
d16ef28b 4238 (version "2.5.0")
44d10b1f 4239 (source
ba88eea2
RW
4240 (origin
4241 (method url-fetch)
4242 (uri (pypi-uri "pycodestyle" version))
4243 (sha256
4244 (base32
d16ef28b 4245 "0v4prb05n21bm8650v0a01k1nyqjdmkrsm3zycfxh2j5k9n962p4"))))
44d10b1f
RW
4246 (build-system python-build-system)
4247 (home-page "https://pycodestyle.readthedocs.io/")
4248 (synopsis "Python style guide checker")
4249 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4250Python code against some of the style conventions in
4251@url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4252 (license license:expat)))
4253
4254(define-public python2-pycodestyle
4255 (package-with-python2 python-pycodestyle))
4256
4257(define-public python-multidict
4258 (package
4259 (name "python-multidict")
4260 (version "4.2.0")
4261 (source
4262 (origin
4263 (method url-fetch)
4264 (uri (pypi-uri "multidict" version))
4265 (sha256
4266 (base32
4267 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
4268 (build-system python-build-system)
4269 (native-inputs
4270 `(("python-pytest" ,python-pytest)
4271 ("python-pytest-runner" ,python-pytest-runner)))
4272 (home-page "https://github.com/aio-libs/multidict/")
4273 (synopsis "Multidict implementation")
4274 (description "Multidict is dict-like collection of key-value pairs
4275where key might be occurred more than once in the container.")
4276 (license license:asl2.0)))
4277
4278(define-public python-orderedmultidict
4279 (package
4280 (name "python-orderedmultidict")
4281 (version "0.7.11")
4282 (source
4283 (origin
4284 (method url-fetch)
4285 (uri (pypi-uri "orderedmultidict" version))
4286 (sha256
4287 (base32
4288 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4289 (build-system python-build-system)
4290 (arguments
4291 `(#:phases
4292 (modify-phases %standard-phases
4293 (add-after 'unpack 'fix-tests
4294 (lambda _
4295 ;; The package uses nosetest for running the tests.
4296 ;; Adding this initfile allows to run the test suite
4297 ;; without requiring nosetest.
d1c4f329
RW
4298 (with-output-to-file "tests/__init__.py" newline)
4299 #t)))))
44d10b1f
RW
4300 (propagated-inputs
4301 `(("python-six" ,python-six)))
4302 (native-inputs
4303 `(("python-pycodestyle" ,python-pycodestyle)))
4304 (home-page "https://github.com/gruns/orderedmultidict")
4305 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4306 (description "This package contains a library for ordered multivalue
4307dictionaries. A multivalue dictionary is a dictionary that can store
4308multiple values for the same key. An ordered multivalue dictionary is a
4309multivalue dictionary that retains the order of insertions and deletions.")
4310 (license license:unlicense)))
4311
4312(define-public python2-orderedmultidict
4313 (package-with-python2 python-orderedmultidict))
4314
4315(define-public python-autopep8
4316 (package
4317 (name "python-autopep8")
4318 (version "1.3.5")
4319 (source
4320 (origin
4321 (method url-fetch)
4322 (uri (pypi-uri "autopep8" version))
4323 (sha256
4324 (base32
4325 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
4326 (build-system python-build-system)
4327 (propagated-inputs
4328 `(("python-pycodestyle" ,python-pycodestyle)))
4329 (home-page "https://github.com/hhatto/autopep8")
4330 (synopsis "Format Python code according to the PEP 8 style guide")
4331 (description
4332 "@code{autopep8} automatically formats Python code to conform to
4333the PEP 8 style guide. It uses the pycodestyle utility to determine
4334what parts of the code needs to be formatted. @code{autopep8} is
4335capable of fixing most of the formatting issues that can be reported
4336by pycodestyle.")
4337 (license (license:non-copyleft
4338 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4339
4340(define-public python2-autopep8
4341 (package-with-python2 python-autopep8))
4342
4343(define-public python-distutils-extra
4344 (package
4345 (name "python-distutils-extra")
4346 (version "2.38")
4347 (source
4348 (origin
4349 (method url-fetch)
4350 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4351 version "/+download/python-distutils-extra-"
4352 version ".tar.gz"))
4353 (sha256
4354 (base32
4355 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4356 (build-system python-build-system)
4357 (home-page "https://launchpad.net/python-distutils-extra/")
4358 (synopsis "Enhancements to Python's distutils")
4359 (description
4360 "The python-distutils-extra module enables you to easily integrate
4361gettext support, themed icons, and scrollkeeper-based documentation into
4362Python's distutils.")
4363 (license license:gpl2)))
4364
4365(define-public python2-distutils-extra
4366 (package-with-python2 python-distutils-extra))
4367
4368(define-public python2-elib.intl
4369 (package
4370 (name "python2-elib.intl")
4371 (version "0.0.3")
4372 (source
4373 (origin
4374 ;; This project doesn't tag releases or publish tarballs, so we take
4375 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4376 (method git-fetch)
4377 (uri (git-reference
4378 (url "https://github.com/dieterv/elib.intl.git")
4379 (commit "d09997cfef")))
4380 (file-name (string-append name "-" version "-checkout"))
4381 (sha256
4382 (base32
4383 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4384 (build-system python-build-system)
4385 (arguments
4386 ;; incompatible with Python 3 (exception syntax)
4387 `(#:python ,python-2
4388 #:tests? #f))
4389 (home-page "https://github.com/dieterv/elib.intl")
4390 (synopsis "Enhanced internationalization for Python")
4391 (description
4392 "The elib.intl module provides enhanced internationalization (I18N)
4393services for your Python modules and applications.")
4394 (license license:lgpl3+)))
4395
4396(define-public python-olefile
4397 (package
4398 (name "python-olefile")
5bef0f10 4399 (version "0.46")
44d10b1f
RW
4400 (source
4401 (origin
4402 (method url-fetch)
5bef0f10
MB
4403 (uri (string-append "https://github.com/decalage2/olefile/releases/"
4404 "download/v" version "/olefile-" version ".tar.gz"))
44d10b1f
RW
4405 (file-name (string-append name "-" version ".tar.gz"))
4406 (sha256
4407 (base32
5bef0f10 4408 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
44d10b1f 4409 (build-system python-build-system)
5bef0f10 4410 (home-page "https://www.decalage.info/python/olefileio")
44d10b1f
RW
4411 (synopsis "Read and write Microsoft OLE2 files.")
4412 (description
4413 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
4414Storage or Compound Document, Microsoft Office). It is an improved version of
4415the OleFileIO module from PIL, the Python Image Library.")
4416 (license license:bsd-3)))
4417
4418(define-public python2-olefile
4419 (package-with-python2 python-olefile))
4420
4421(define-public python-pillow
4422 (package
4423 (name "python-pillow")
5fbdd917 4424 (version "6.2.1")
44d10b1f
RW
4425 (source
4426 (origin
4427 (method url-fetch)
4428 (uri (pypi-uri "Pillow" version))
4429 (sha256
4430 (base32
5fbdd917 4431 "1c8wkzc58f5wdh006jvmwdk3wxld1xgagcbdvj7iv17qi0m9fkmz"))))
44d10b1f
RW
4432 (build-system python-build-system)
4433 (native-inputs
4434 `(("python-pytest" ,python-pytest)))
4435 (inputs
4436 `(("freetype" ,freetype)
4437 ("lcms" ,lcms)
44d10b1f 4438 ("libjpeg" ,libjpeg)
44d10b1f 4439 ("libtiff" ,libtiff)
0c4e1c5f
EF
4440 ("libwebp" ,libwebp)
4441 ("openjpeg" ,openjpeg)
4442 ("zlib" ,zlib)))
44d10b1f
RW
4443 (propagated-inputs
4444 `(("python-olefile" ,python-olefile)))
4445 (arguments
4446 `(#:phases
4447 (modify-phases %standard-phases
4448 (add-after 'unpack 'patch-ldconfig
4449 (lambda _
4450 (substitute* "setup.py"
4451 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
61b77ff3 4452 (replace 'check
979d8464
EF
4453 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
4454 (if tests?
4455 (begin
4456 (setenv "HOME" (getcwd))
4457 ;; Make installed package available for running the tests.
4458 (add-installed-pythonpath inputs outputs)
4459 (invoke "python" "selftest.py" "--installed")
4460 (invoke "python" "-m" "pytest" "-vv"))
4461 #t))))))
44d10b1f
RW
4462 (home-page "https://python-pillow.org")
4463 (synopsis "Fork of the Python Imaging Library")
4464 (description
4465 "The Python Imaging Library adds image processing capabilities to your
4466Python interpreter. This library provides extensive file format support, an
4467efficient internal representation, and fairly powerful image processing
4468capabilities. The core image library is designed for fast access to data
4469stored in a few basic pixel formats. It should provide a solid foundation for
4470a general image processing tool.")
4471 (license (license:x11-style
4472 "http://www.pythonware.com/products/pil/license.htm"
4473 "The PIL Software License"))))
4474
4475(define-public python2-pillow
4476 (package-with-python2 python-pillow))
4477
4478(define-public python-pycparser
4479 (package
4480 (name "python-pycparser")
c6c0940e 4481 (version "2.19")
44d10b1f
RW
4482 (source
4483 (origin
4484 (method url-fetch)
4485 (uri (pypi-uri "pycparser" version))
4486 (sha256
4487 (base32
c6c0940e 4488 "1cr5dcj9628lkz1qlwq3fv97c25363qppkmcayqvd05dpy573259"))))
44d10b1f
RW
4489 (outputs '("out" "doc"))
4490 (build-system python-build-system)
4491 (native-inputs
4492 `(("pkg-config" ,pkg-config)))
4493 (arguments
4494 `(#:phases
4495 (modify-phases %standard-phases
4496 (replace 'check
4497 (lambda _
4498 (with-directory-excursion "tests"
acb75c03
RW
4499 (invoke "python" "all_tests.py"))
4500 #t))
44d10b1f
RW
4501 (add-after 'install 'install-doc
4502 (lambda* (#:key outputs #:allow-other-keys)
4503 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4504 (doc (string-append data "/doc/" ,name "-" ,version))
4505 (examples (string-append doc "/examples")))
4506 (mkdir-p examples)
4507 (for-each (lambda (file)
4508 (copy-file (string-append "." file)
4509 (string-append doc file)))
4510 '("/README.rst" "/CHANGES" "/LICENSE"))
c6c0940e
MB
4511 (copy-recursively "examples" examples)
4512 #t))))))
44d10b1f
RW
4513 (home-page "https://github.com/eliben/pycparser")
4514 (synopsis "C parser in Python")
4515 (description
4516 "Pycparser is a complete parser of the C language, written in pure Python
4517using the PLY parsing library. It parses C code into an AST and can serve as
4518a front-end for C compilers or analysis tools.")
4519 (license license:bsd-3)))
4520
4521(define-public python2-pycparser
4522 (package-with-python2 python-pycparser))
4523
4524(define-public python-pywavelets
4525 (package
4526 (name "python-pywavelets")
4527 (version "1.0.1")
4528 (home-page "https://github.com/PyWavelets/pywt")
4529 (source (origin
4530 (method url-fetch)
4531 (uri (pypi-uri "PyWavelets" version))
4532 (sha256
4533 (base32
4534 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
4535 (build-system python-build-system)
4536 (arguments
4537 '(#:modules ((ice-9 ftw)
4538 (srfi srfi-1)
4539 (srfi srfi-26)
4540 (guix build utils)
4541 (guix build python-build-system))
4542 #:phases (modify-phases %standard-phases
4543 (replace 'check
4544 (lambda _
4545 (let ((cwd (getcwd))
4546 (libdir (find (cut string-prefix? "lib." <>)
4547 (scandir "build"))))
4548 (with-directory-excursion (string-append cwd "/build/" libdir)
4549 (invoke "nosetests" "-v" "."))))))))
4550 (native-inputs
4551 `(("python-matplotlib" ,python-matplotlib) ;for tests
4552 ("python-nose" ,python-nose)))
4553 (propagated-inputs
4554 `(("python-numpy" ,python-numpy)))
4555 (synopsis "Wavelet transforms in Python")
4556 (description
4557 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
4558mathematical basis functions that are localized in both time and frequency.
4559Wavelet transforms are time-frequency transforms employing wavelets. They are
4560similar to Fourier transforms, the difference being that Fourier transforms are
4561localized only in frequency instead of in time and frequency.")
4562 (license license:expat)))
4563
4564(define-public python2-pywavelets
4565 (package-with-python2 python-pywavelets))
4566
4567(define-public python-xcffib
4568 (package
4569 (name "python-xcffib")
4570 (version "0.6.0")
4571 (source
4572 (origin
4573 (method url-fetch)
4574 (uri (pypi-uri "xcffib" version))
4575 (sha256
4576 (base32
4577 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
4578 (build-system python-build-system)
4579 (inputs
4580 `(("libxcb" ,libxcb)))
4581 (propagated-inputs
4582 `(("python-cffi" ,python-cffi) ; used at run time
4583 ("python-six" ,python-six)))
4584 (arguments
4585 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4586 #:tests? #f
4587 #:phases
4588 (modify-phases %standard-phases
4589 (add-after 'unpack 'fix-libxcb-path
4590 (lambda* (#:key inputs #:allow-other-keys)
4591 (let ((libxcb (assoc-ref inputs "libxcb")))
4592 (substitute* '("xcffib/__init__.py")
4593 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4594 #t)))
4595 (add-after 'install 'install-doc
4596 (lambda* (#:key outputs #:allow-other-keys)
4597 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4598 "/doc/" ,name "-" ,version)))
4599 (mkdir-p doc)
4600 (copy-file "README.md"
4601 (string-append doc "/README.md"))
4602 #t))))))
4603 (home-page "https://github.com/tych0/xcffib")
4604 (synopsis "XCB Python bindings")
4605 (description
4606 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4607support for Python 3 and PyPy. It is based on cffi.")
4608 (license license:expat)))
4609
4610(define-public python2-xcffib
4611 (package-with-python2 python-xcffib))
4612
4613(define-public python-cairocffi
4614 (package
4615 (name "python-cairocffi")
4616 (version "0.9.0")
4617 (source
4618 (origin
4619 (method url-fetch)
4620 (uri (pypi-uri "cairocffi" version))
4621 (sha256
4622 (base32
4623 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
4624 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
4625 (build-system python-build-system)
4626 (outputs '("out" "doc"))
4627 (inputs
4628 `(("glib" ,glib)
4629 ("gtk+" ,gtk+)
4630 ("gdk-pixbuf" ,gdk-pixbuf)
4631 ("cairo" ,cairo)
4632 ("pango" ,pango)))
4633 (native-inputs
4634 `(("pkg-config" ,pkg-config)
4635 ("python-pytest" ,python-pytest)
4636 ("python-pytest-cov" ,python-pytest-cov)
4637 ("python-pytest-runner" ,python-pytest-runner)
4638 ("python-sphinx" ,python-sphinx)
4639 ("python-docutils" ,python-docutils)))
4640 (propagated-inputs
4641 `(("python-xcffib" ,python-xcffib))) ; used at run time
4642 (arguments
4643 `(#:phases
4644 (modify-phases %standard-phases
4645 (add-after 'unpack 'patch-paths
4646 (lambda* (#:key inputs outputs #:allow-other-keys)
4647 (substitute* (find-files "." "\\.py$")
4648 (("dlopen\\(ffi, 'cairo'")
4649 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
4650 "/lib/libcairo.so.2'"))
4651 (("dlopen\\(ffi, 'gdk-3'")
4652 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
4653 "/lib/libgtk-3.so.0'"))
4654 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
4655 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
4656 "/lib/libgdk_pixbuf-2.0.so.0'"))
4657 (("dlopen\\(ffi, 'glib-2.0'")
4658 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4659 "/lib/libglib-2.0.so.0'"))
4660 (("dlopen\\(ffi, 'gobject-2.0'")
4661 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4662 "/lib/libgobject-2.0.so.0'"))
4663 (("dlopen\\(ffi, 'pangocairo-1.0'")
4664 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4665 "/lib/libpangocairo-1.0.so.0'"))
4666 (("dlopen\\(ffi, 'pango-1.0'")
4667 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4668 "/lib/libpango-1.0.so.0'")))
4669 #t))
4670 (add-after 'install 'install-doc
4671 (lambda* (#:key inputs outputs #:allow-other-keys)
4672 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4673 (doc (string-append data "/doc/" ,name "-" ,version))
4674 (html (string-append doc "/html")))
4675 (setenv "LD_LIBRARY_PATH"
4676 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4677 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4678 (setenv "LANG" "en_US.UTF-8")
4679 (mkdir-p html)
4680 (for-each (lambda (file)
4681 (copy-file (string-append "." file)
4682 (string-append doc file)))
4683 '("/README.rst" "/CHANGES" "/LICENSE"))
4684 (system* "python" "setup.py" "build_sphinx")
4685 (copy-recursively "docs/_build/html" html)
4686 #t))))))
4687 (home-page "https://github.com/Kozea/cairocffi")
4688 (synopsis "Python bindings and object-oriented API for Cairo")
4689 (description
4690 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4691Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4692graphics library with support for multiple backends including image buffers,
4693PNG, PostScript, PDF, and SVG file output.")
4694 (license license:bsd-3)))
4695
4696(define-public python2-cairocffi
4697 (package-with-python2 python-cairocffi))
4698
4699(define-public python-decorator
4700 (package
4701 (name "python-decorator")
4702 (version "4.3.0")
4703 (source
4704 (origin
4705 (method url-fetch)
4706 (uri (pypi-uri "decorator" version))
4707 (sha256
4708 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4709 (build-system python-build-system)
4710 (home-page "https://pypi.python.org/pypi/decorator/")
4711 (synopsis "Python module to simplify usage of decorators")
4712 (description
4713 "The aim of the decorator module is to simplify the usage of decorators
4714for the average programmer, and to popularize decorators usage giving examples
4715of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4716etc. The core of this module is a decorator factory.")
4717 (license license:expat)))
4718
4719(define-public python2-decorator
4720 (package-with-python2 python-decorator))
4721
4722(define-public python-drmaa
4723 (package
4724 (name "python-drmaa")
4725 (version "0.7.7")
4726 (source
4727 (origin
4728 (method url-fetch)
4729 (uri (pypi-uri "drmaa" version))
4730 (sha256
4731 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4732 (build-system python-build-system)
4733 ;; The test suite requires libdrmaa which is provided by the cluster
4734 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4735 ;; should be set to the path of the libdrmaa library.
4736 (arguments '(#:tests? #f))
4737 (native-inputs
4738 `(("python-nose" ,python-nose)))
4739 (home-page "https://pypi.python.org/pypi/drmaa")
4740 (synopsis "Python bindings for the DRMAA library")
4741 (description
4742 "A Python package for Distributed Resource Management (DRM) job
4743submission and control. This package is an implementation of the DRMAA 1.0
4744Python language binding specification.")
4745 (license license:bsd-3)))
4746
4747(define-public python2-drmaa
4748 (package-with-python2 python-drmaa))
4749
4750(define-public python-grako
4751 (package
4752 (name "python-grako")
4753 (version "3.99.9")
4754 (source
4755 (origin
4756 (method url-fetch)
4757 (uri
4758 (pypi-uri "grako" version ".zip"))
4759 (sha256
4760 (base32
4761 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4762 (build-system python-build-system)
4763 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4764 (native-inputs
4765 `(("unzip" ,unzip)
4766 ("python-pytest" ,python-pytest)
4767 ("python-pytest-runner" ,python-pytest-runner)))
4768 (home-page "https://bitbucket.org/neogeny/grako")
4769 (synopsis "EBNF parser generator")
4770 (description
4771 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4772memoizing PEG/Packrat parser in Python.")
4773 (license license:bsd-3)))
4774
4775(define-public python2-grako
4776 (package-with-python2 python-grako))
4777
4778(define-public python-gridmap
4779 (package
4780 (name "python-gridmap")
4781 (version "0.13.0")
4782 (source
4783 (origin
768fea0f
TGR
4784 (method git-fetch)
4785 (uri (git-reference
4786 (url "https://github.com/pygridtools/gridmap.git")
4787 (commit (string-append "v" version))))
4788 (file-name (git-file-name name version))
44d10b1f 4789 (sha256
768fea0f 4790 (base32 "1478lbwsr1w24cii2x01m2910fvh8r43ghnb78nc972a96hqiknm"))))
44d10b1f
RW
4791 (build-system python-build-system)
4792 (arguments
4793 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4794 (propagated-inputs
4795 `(("python-psutil" ,python-psutil)
4796 ("python-drmaa" ,python-drmaa)
4797 ("python-pyzmq" ,python-pyzmq)))
4798 (home-page "https://github.com/pygridtools/gridmap")
4799 (synopsis "Create jobs on a cluster directly from Python")
4800 (description
4801 "Gridmap is a Python package to allow you to easily create jobs on the
4802cluster directly from Python. You can directly map Python functions onto the
4803cluster without needing to write any wrapper code yourself.")
4804 (license license:gpl3+)))
4805
4806(define-public python2-gridmap
4807 (package-with-python2 python-gridmap))
4808
4809(define-public python-honcho
4810 (package
4811 (name "python-honcho")
4812 (version "1.0.1")
4813 (source
4814 (origin
8524d130
TGR
4815 (method git-fetch)
4816 (uri (git-reference
4817 (url "https://github.com/nickstenning/honcho.git")
4818 (commit (string-append "v" version))))
4819 (file-name (git-file-name name version))
44d10b1f 4820 (sha256
8524d130 4821 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
44d10b1f
RW
4822 (build-system python-build-system)
4823 (native-inputs
4824 `(("python-pytest" ,python-pytest)
4825 ("python-mock" ,python-mock)
4826 ("python-tox" ,python-tox)
4827 ("which" ,which))) ;for tests
4828 (propagated-inputs
4829 `(("python-jinja2" ,python-jinja2)))
4830 (arguments
4831 `(#:phases
4832 (modify-phases %standard-phases
4833 (delete 'check)
4834 (add-after 'install 'check
4835 (lambda* (#:key outputs inputs #:allow-other-keys)
4836 ;; fix honcho path in testsuite
4837 (substitute* "tests/conftest.py"
4838 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4839 "/bin/honcho" "'")))
4840 ;; It's easier to run tests after install.
4841 ;; Make installed package available for running the tests
4842 (add-installed-pythonpath inputs outputs)
95b707fb 4843 (invoke "py.test" "-v"))))))
44d10b1f
RW
4844 (home-page "https://github.com/nickstenning/honcho")
4845 (synopsis "Manage Procfile-based applications")
4846 (description
4847 "A Procfile is a file which describes how to run an application
50fceab0 4848consisting of several processes. honcho starts all listed processes.
44d10b1f
RW
4849The output of all running processes is collected by honcho and
4850displayed.")
4851 (license license:expat)))
4852
4853(define-public python2-honcho
4854 (package-with-python2 python-honcho))
4855
4856(define-public python-pexpect
4857 (package
4858 (name "python-pexpect")
4859 (version "4.6.0")
4860 (source
4861 (origin
4862 (method url-fetch)
4863 (uri (pypi-uri "pexpect" version))
4864 (sha256
4865 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
4866 (build-system python-build-system)
4867 (arguments
4868 `(#:phases
4869 (modify-phases %standard-phases
4870 (add-before 'check 'prepare-tests
4871 (lambda _
4872 (substitute* (find-files "tests")
4873 (("/bin/ls") (which "ls"))
4874 (("/bin/echo") (which "echo"))
4875 (("/bin/which") (which "which"))
4876 ;; Many tests try to use the /bin directory which
4877 ;; is not present in the build environment.
4878 ;; Use one that's non-empty and unlikely to change.
4879 (("/bin'") "/dev'"))
4880 ;; XXX: Socket connection test gets "Connection reset by peer".
4881 ;; Why does it not work? Delete for now.
4882 (delete-file "tests/test_socket.py")
4883 #t))
4884 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
4885 (native-inputs
4886 `(("python-nose" ,python-nose)
4887 ("python-pytest" ,python-pytest)
4888 ("man-db" ,man-db)
4889 ("which" ,which)
4890 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
4891 (propagated-inputs
4892 `(("python-ptyprocess" ,python-ptyprocess)))
4893 (home-page "http://pexpect.readthedocs.org/")
4894 (synopsis "Controlling interactive console applications")
4895 (description
4896 "Pexpect is a pure Python module for spawning child applications;
4897controlling them; and responding to expected patterns in their output.
4898Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4899child application and control it as if a human were typing commands.")
4900 (license license:isc)))
4901
4902(define-public python2-pexpect
4903 (package-with-python2 python-pexpect))
4904
4905(define-public python-setuptools-scm
4906 (package
4907 (name "python-setuptools-scm")
85092643 4908 (version "3.2.0")
44d10b1f
RW
4909 (source (origin
4910 (method url-fetch)
4911 (uri (pypi-uri "setuptools_scm" version))
4912 (sha256
4913 (base32
85092643 4914 "0n3knn3p1sqlx31k2lahn7z9bacvlv8nhlfidj77vz50bxqlgasj"))))
44d10b1f
RW
4915 (build-system python-build-system)
4916 (home-page "https://github.com/pypa/setuptools_scm/")
4917 (synopsis "Manage Python package versions in SCM metadata")
4918 (description
4919 "Setuptools_scm handles managing your Python package versions in
4920@dfn{software configuration management} (SCM) metadata instead of declaring
4921them as the version argument or in a SCM managed file.")
4922 (license license:expat)))
4923
a0b2accf
MO
4924;; Needed by python-lazy-object-proxy, remove on next update cycle.
4925(define-public python-setuptools-scm-3.3
4926 (package
4927 (inherit python-setuptools-scm)
4928 (version "3.3.3")
4929 (source (origin
4930 (method url-fetch)
4931 (uri (pypi-uri "setuptools_scm" version))
4932 (sha256
4933 (base32
4934 "19cyndx23xmpbhz4qrwmfwsmnnaczd0dw7qg977ksq2dbvxy29dx"))))))
4935
44d10b1f
RW
4936(define-public python2-setuptools-scm
4937 (package-with-python2 python-setuptools-scm))
4938
bb74ea09
RW
4939(define-public python-pathlib2
4940 (package
4941 (name "python-pathlib2")
4942 (version "2.3.3")
4943 (source
4944 (origin
4945 (method url-fetch)
4946 (uri (pypi-uri "pathlib2" version))
4947 (sha256
4948 (base32
4949 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
4950 (build-system python-build-system)
4951 (propagated-inputs
4952 `(("python-scandir" ,python-scandir)
4953 ("python-six" ,python-six)))
4954 (home-page "https://pypi.python.org/pypi/pathlib2/")
746d3384 4955 (synopsis "Object-oriented file system paths")
bb74ea09
RW
4956 (description "The goal of pathlib2 is to provide a backport of the
4957standard @code{pathlib} module which tracks the standard library module, so
4958all the newest features of the standard @code{pathlib} can be used also on
4959older Python versions.")
4960 (license license:expat)))
4961
fd5c264a
MB
4962(define-public python2-importlib-resources
4963 (package
4964 (name "python2-importlib-resources")
4965 (version "1.0.2")
4966 (source (origin
4967 (method url-fetch)
4968 (uri (pypi-uri "importlib_resources" version))
4969 (sha256
4970 (base32
4971 "0y3hg12iby1qyaspnbisz4s4vxax7syikk3skznwqizqyv89y9yk"))))
4972 (build-system python-build-system)
4973 (arguments
4974 `(#:python ,python-2))
4975 (native-inputs
4976 `(("python-wheel" ,python2-wheel)))
4977 (propagated-inputs
4978 `(("python-pathlib2" ,python2-pathlib2)
4979 ("python-typing" ,python2-typing)))
4980 (home-page "https://gitlab.com/python-devs/importlib_resources")
4981 (synopsis "Backport of @code{importlib.resources} from Python 3.7")
4982 (description
4983 "This package provides an implementation of @code{importlib.resources}
4984for older versions of Python.")
4985 (license license:asl2.0)))
4986
15b65617
RW
4987(define-public python-importlib-metadata
4988 (package
4989 (name "python-importlib-metadata")
4dc04d11 4990 (version "1.4.0")
15b65617
RW
4991 (source
4992 (origin
4993 (method url-fetch)
4994 (uri (pypi-uri "importlib_metadata" version))
4995 (sha256
4dc04d11 4996 (base32 "1n76444v7zn910xrhh8954jdn4byxbn9f1jck6b85a716mbh2z7i"))))
15b65617
RW
4997 (build-system python-build-system)
4998 (propagated-inputs
4dc04d11 4999 `(("python-zipp" ,python-zipp)))
15b65617
RW
5000 (native-inputs
5001 `(("python-setuptools-scm" ,python-setuptools-scm)
4dc04d11 5002 ("python-packaging" ,python-packaging)))
15b65617
RW
5003 (home-page "https://importlib-metadata.readthedocs.io/")
5004 (synopsis "Read metadata from Python packages")
5005 (description
5006 "@code{importlib_metadata} is a library which provides an API for
5007accessing an installed Python package's metadata, such as its entry points or
5008its top-level name. This functionality intends to replace most uses of
5009@code{pkg_resources} entry point API and metadata API. Along with
5010@code{importlib.resources} in Python 3.7 and newer, this can eliminate the
5011need to use the older and less efficient @code{pkg_resources} package.")
3dfb3d44 5012 (properties `((python2-variant . ,(delay python2-importlib-metadata))))
15b65617
RW
5013 (license license:asl2.0)))
5014
5efa04dd
MB
5015(define-public python2-importlib-metadata
5016 (let ((base (package-with-python2 (strip-python2-variant
5017 python-importlib-metadata))))
5018 (package/inherit
5019 base
5020 (name "python2-importlib-metadata")
5021 (propagated-inputs
5022 `(("python-configparser" ,python2-configparser)
5023 ("python-contextlib2" ,python2-contextlib2)
5024 ("python-importlib-resources" ,python2-importlib-resources)
5025 ("python-pathlib2" ,python2-pathlib2)
5026 ,@(package-propagated-inputs base))))))
5027
37c173d1
RW
5028(define-public python-jaraco-packaging
5029 (package
5030 (name "python-jaraco-packaging")
5031 (version "6.1")
5032 (source
5033 (origin
5034 (method url-fetch)
5035 (uri (pypi-uri "jaraco.packaging" version))
5036 (sha256
5037 (base32
5038 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
5039 (build-system python-build-system)
5040 (propagated-inputs
5041 `(("python-pytest" ,python-pytest)
5042 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
5043 ("python-pytest-flake8" ,python-pytest-flake8)
5044 ("python-rst.linker" ,python-rst.linker)
5045 ("python-setuptools" ,python-setuptools)
5046 ("python-setuptools-scm" ,python-setuptools-scm)
5047 ("python-six" ,python-six)
5048 ("python-sphinx" ,python-sphinx)))
5049 (home-page "https://github.com/jaraco/jaraco.packaging")
5050 (synopsis "Tools to supplement packaging Python releases")
5051 (description
5052 "This package provides various tools to supplement packaging Python
5053releases.")
5054 (license license:expat)))
5055
44d10b1f
RW
5056(define-public python-pathpy
5057 (package
5058 (name "python-pathpy")
a3dd8871 5059 (version "11.5.1")
44d10b1f
RW
5060 (source
5061 (origin
5062 (method url-fetch)
5063 (uri (pypi-uri "path.py" version))
5064 (sha256
a3dd8871 5065 (base32 "0ir9j1haq2jbi7aip6k2fa9l7q1l03k4hp1awxhjhcwzsnwp3ll8"))))
49ad11e9 5066 (outputs '("out" "doc"))
44d10b1f
RW
5067 (build-system python-build-system)
5068 (propagated-inputs
01a53e0b
MC
5069 `(("python-appdirs" ,python-appdirs)
5070 ("python-importlib-metadata" ,python-importlib-metadata)))
44d10b1f
RW
5071 (native-inputs
5072 `(("python-setuptools-scm" ,python-setuptools-scm)
5073 ("python-sphinx" ,python-sphinx)
5074 ("python-rst.linker" ,python-rst.linker)
5075 ("python-pytest" ,python-pytest)
49ad11e9
RW
5076 ("python-pytest-runner" ,python-pytest-runner)
5077 ("python-jaraco-packaging" ,python-jaraco-packaging)))
44d10b1f 5078 (arguments
49ad11e9
RW
5079 `(#:phases
5080 (modify-phases %standard-phases
5081 (add-after 'build 'build-doc
5082 (lambda _
5083 (setenv "LANG" "en_US.UTF-8")
5084 (invoke "python" "setup.py" "build_sphinx")))
5085 (add-after 'install 'install-doc
5086 (lambda* (#:key outputs #:allow-other-keys)
5087 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5088 (doc (string-append data "/doc/" ,name "-" ,version))
5089 (html (string-append doc "/html")))
5090 (mkdir-p html)
5091 (for-each (lambda (file)
5092 (copy-file file (string-append doc "/" file)))
5093 '("README.rst" "CHANGES.rst"))
5094 (copy-recursively "build/sphinx/html" html)
5095 #t)))
5096 (replace 'check
5097 (lambda _
5098 ;; The import time test aborts if an import takes longer than
5099 ;; 100ms. It may very well take a little longer than that.
5100 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
44d10b1f
RW
5101 (home-page "https://github.com/jaraco/path.py")
5102 (synopsis "Python module wrapper for built-in os.path")
5103 (description
5104 "@code{path.py} implements path objects as first-class entities, allowing
5105common operations on files to be invoked on those path objects directly.")
5106 (license license:expat)))
5107
5108(define-public python2-pathpy
5109 (package-with-python2 python-pathpy))
5110
5111(define-public python-simplegeneric
5112 (package
5113 (name "python-simplegeneric")
5114 (version "0.8.1")
5115 (source
5116 (origin
5117 (method url-fetch)
6c8c3980 5118 (uri (pypi-uri "simplegeneric" version ".zip"))
44d10b1f
RW
5119 (sha256
5120 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5121 (build-system python-build-system)
5122 (native-inputs
5123 `(("unzip" ,unzip)))
5124 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5125 (synopsis "Python module for simple generic functions")
5126 (description
5127 "The simplegeneric module lets you define simple single-dispatch generic
5128functions, akin to Python’s built-in generic functions like @code{len()},
5129@code{iter()} and so on. However, instead of using specially-named methods,
5130these generic functions use simple lookup tables, akin to those used by
5131e.g. @code{pickle.dump()} and other generic functions found in the Python
5132standard library.")
5133 (license license:zpl2.1)))
5134
5135(define-public python2-simplegeneric
5136 (package-with-python2 python-simplegeneric))
5137
5138(define-public python-ipython-genutils
5139 ;; TODO: This package is retired, check if can be removed, see description.
5140 (package
5141 (name "python-ipython-genutils")
5142 (version "0.1.0")
5143 (source
5144 (origin
5145 (method url-fetch)
c9671d4b 5146 (uri (pypi-uri "ipython_genutils" version))
44d10b1f
RW
5147 (sha256
5148 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5149 (build-system python-build-system)
5150 (arguments `(#:tests? #f)) ; no tests
5151 (home-page "https://ipython.org")
5152 (synopsis "Vestigial utilities from IPython")
5153 (description
5154 "This package provides retired utilities from IPython. No packages
5155outside IPython/Jupyter should depend on it.
5156
5157This package shouldn't exist. It contains some common utilities shared by
5158Jupyter and IPython projects during The Big Split. As soon as possible, those
5159packages will remove their dependency on this, and this package will go
5160away.")
5161 (license license:bsd-3)))
5162
5163(define-public python2-ipython-genutils
5164 (package-with-python2 python-ipython-genutils))
5165
5166(define-public python-traitlets
5167 (package
5168 (name "python-traitlets")
ac5e205a 5169 (version "4.3.3")
44d10b1f
RW
5170 (source
5171 (origin
5172 (method url-fetch)
5173 (uri (pypi-uri "traitlets" version))
5174 (sha256
5175 (base32
ac5e205a 5176 "1xsrwgivpkxlbr4dfndfsi098s29yqgswgjc1qqn69yxklvfw8yh"))))
44d10b1f
RW
5177 (build-system python-build-system)
5178 (arguments
5179 `(#:phases
5180 (modify-phases %standard-phases
5181 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
5182 (propagated-inputs
5183 `(("python-ipython-genutils" ,python-ipython-genutils)
ac5e205a 5184 ("python-decorator" ,python-decorator)))
44d10b1f
RW
5185 (native-inputs
5186 `(("python-pytest" ,python-pytest)))
5187 (properties `((python2-variant . ,(delay python2-traitlets))))
5188 (home-page "https://ipython.org")
5189 (synopsis "Configuration system for Python applications")
5190 (description
5191 "Traitlets is a framework that lets Python classes have attributes with
5192type checking, dynamically calculated default values, and ‘on change’
5193callbacks. The package also includes a mechanism to use traitlets for
5194configuration, loading values from files or from command line arguments. This
5195is a distinct layer on top of traitlets, so you can use traitlets in your code
5196without using the configuration machinery.")
5197 (license license:bsd-3)))
5198
5199(define-public python2-traitlets
5200 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
5201 (package
5202 (inherit traitlets)
5203 (propagated-inputs
5204 `(("python2-enum34" ,python2-enum34)
5205 ,@(package-propagated-inputs traitlets))))))
5206
5207(define-public python-jupyter-core
5208 (package
5209 (name "python-jupyter-core")
5210 (version "4.4.0")
5211 (source
5212 (origin
5213 (method url-fetch)
5214 (uri (string-append (pypi-uri "jupyter_core" version)))
5215 (sha256
5216 (base32
5217 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
5218 (build-system python-build-system)
5219 ;; FIXME: not sure how to run the tests
5220 (arguments `(#:tests? #f))
5221 (propagated-inputs
5222 `(("python-traitlets" ,python-traitlets)))
5223 (home-page "http://jupyter.org/")
5224 (synopsis "Jupyter base package")
5225 (description
5226 "Jupyter core is the base package on which Jupyter projects rely.")
5227 (license license:bsd-3)))
5228
5229(define-public python2-jupyter-core
5230 (package-with-python2 python-jupyter-core))
5231
5232(define-public python-jupyter-client
5233 (package
5234 (name "python-jupyter-client")
5235 (version "5.2.4")
5236 (source
5237 (origin
5238 (method url-fetch)
5239 (uri (pypi-uri "jupyter_client" version))
5240 (sha256
5241 (base32
5242 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
5243 (build-system python-build-system)
5244 ;; Tests fail because of missing native python kernel which I assume is
5245 ;; provided by the ipython package, which we cannot use because it would
5246 ;; cause a dependency cycle.
ddc586ea
LC
5247 (arguments
5248 `(#:tests? #f
5249
5250 #:phases (modify-phases %standard-phases
5251 (add-after 'unpack 'set-tool-file-names
5252 (lambda* (#:key inputs #:allow-other-keys)
5253 (let ((iproute (assoc-ref inputs "iproute")))
5254 (substitute* "jupyter_client/localinterfaces.py"
5255 (("'ip'")
5256 (string-append "'" iproute "/sbin/ip'")))
5257 #t))))))
5258 (inputs
5259 `(("iproute" ,iproute)))
44d10b1f
RW
5260 (propagated-inputs
5261 `(("python-pyzmq" ,python-pyzmq)
5262 ("python-traitlets" ,python-traitlets)
5263 ("python-jupyter-core" ,python-jupyter-core)))
5264 (home-page "http://jupyter.org/")
5265 (synopsis "Jupyter protocol implementation and client libraries")
5266 (description
5267 "The @code{jupyter_client} package contains the reference implementation
5268of the Jupyter protocol. It also provides client and kernel management APIs
5269for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5270installing @code{kernelspec}s for use with Jupyter frontends.")
5271 (license license:bsd-3)))
5272
5273(define-public python2-jupyter-client
5274 (package-with-python2 python-jupyter-client))
5275
5276(define-public python-ipykernel
5277 (package
5278 (name "python-ipykernel")
08d0a355 5279 (version "5.1.3")
44d10b1f
RW
5280 (source
5281 (origin
5282 (method url-fetch)
5283 (uri (pypi-uri "ipykernel" version))
5284 (sha256
08d0a355 5285 (base32 "1a08y677lpn80qzvv7z0smgggmr5m5ayf0bs6vds47xpxl9sss5k"))))
44d10b1f
RW
5286 (build-system python-build-system)
5287 (arguments
5288 `(#:phases
5289 (modify-phases %standard-phases
5290 (replace 'check
5291 (lambda _
5292 (setenv "HOME" "/tmp")
5293 (invoke "pytest" "-v")
aa856d02
LC
5294 #t))
5295 (add-after 'install 'set-python-file-name
5296 (lambda* (#:key outputs #:allow-other-keys)
5297 ;; Record the absolute file name of the 'python' executable in
5298 ;; 'kernel.json'.
5299 (let ((out (assoc-ref outputs "out")))
5300 (substitute* (string-append out "/share/jupyter"
5301 "/kernels/python3/kernel.json")
5302 (("\"python\"")
5303 (string-append "\"" (which "python") "\"")))
5304 #t))))))
44d10b1f
RW
5305 (propagated-inputs
5306 `(("python-ipython" ,python-ipython)
5307 ;; imported at runtime during connect
5308 ("python-jupyter-client" ,python-jupyter-client)))
5309 (native-inputs
08d0a355
TGR
5310 `(("python-flaky" ,python-flaky)
5311 ("python-nose" ,python-nose)
5312 ("python-pytest" ,python-pytest)))
44d10b1f
RW
5313 (home-page "https://ipython.org")
5314 (synopsis "IPython Kernel for Jupyter")
5315 (description
5316 "This package provides the IPython kernel for Jupyter.")
5317 (license license:bsd-3)))
5318
0f378947 5319;; Version 5.1.1 and above no longer support Python 2.
44d10b1f 5320(define-public python2-ipykernel
0f378947
RW
5321 (package
5322 (name "python2-ipykernel")
5323 (version "5.1.0")
5324 (source
5325 (origin
5326 (method url-fetch)
5327 (uri (pypi-uri "ipykernel" version))
5328 (sha256
5329 (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g"))))
5330 (build-system python-build-system)
5331 (arguments
5332 `(#:python ,python-2
5333 #:phases
5334 (modify-phases %standard-phases
5335 (replace 'check
5336 (lambda _
5337 (setenv "HOME" "/tmp")
5338 (invoke "pytest" "-v")
5339 #t)))))
5340 (propagated-inputs
5341 `(("python2-ipython" ,python2-ipython)
5342 ;; imported at runtime during connect
5343 ("python2-jupyter-client" ,python2-jupyter-client)))
5344 (native-inputs
5345 `(("python2-pytest" ,python2-pytest)
5346 ("python2-nose" ,python2-nose)))
5347 (home-page "https://ipython.org")
5348 (synopsis "IPython Kernel for Jupyter")
5349 (description
5350 "This package provides the IPython kernel for Jupyter.")
5351 (license license:bsd-3)))
44d10b1f 5352
966aa714
AE
5353(define-public python-pari-jupyter
5354 (package
5355 (name "python-pari-jupyter")
5356 (version "1.3.2")
5357 (source
5358 (origin
5359 (method url-fetch)
5360 (uri (pypi-uri "pari_jupyter" version))
5361 (sha256
5362 (base32
5363 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
5364 (build-system python-build-system)
5365 (propagated-inputs
5366 `(("python-ipykernel" ,python-ipykernel)))
5367 (inputs
5368 `(("pari-gp" ,pari-gp)
5369 ("readline" ,readline)))
5370 (arguments
5371 `(#:tests? #f)) ; no test suite
5372 (home-page
5373 "https://github.com/jdemeyer/pari_jupyter")
5374 (synopsis "A Jupyter kernel for PARI/GP")
5375 (description "The package provides a PARI/GP kernel for Jupyter.")
5376 (license license:gpl3+)))
5377
dede052a
RW
5378(define-public python-backcall
5379 (package
5380 (name "python-backcall")
5381 (version "0.1.0")
5382 (source
5383 (origin
5384 (method url-fetch)
5385 (uri (pypi-uri "backcall" version))
5386 (sha256
5387 (base32
5388 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
5389 (build-system python-build-system)
5390 (home-page "https://github.com/takluyver/backcall/")
5391 (synopsis "Specifications for callback functions passed in to an API")
5392 (description
5393 "If your code lets other people supply callback functions, it's important
5394to specify the function signature you expect, and check that functions support
5395that. Adding extra parameters later would break other peoples code unless
5396you're careful. The @code{backcall} package provides a way of specifying the
5397callback signature using a prototype function.")
5398 (license license:bsd-3)))
5399
44d10b1f
RW
5400;; This is the latest release of the LTS version of ipython with support for
5401;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
8b5f756c
RW
5402;; dropped support for Python 2.7.
5403(define-public python2-ipython
44d10b1f 5404 (package
8b5f756c 5405 (name "python2-ipython")
44d10b1f
RW
5406 (version "5.8.0")
5407 (source
5408 (origin
5409 (method url-fetch)
5410 (uri (pypi-uri "ipython" version ".tar.gz"))
5411 (sha256
5412 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
5413 (build-system python-build-system)
44d10b1f 5414 (propagated-inputs
8b5f756c
RW
5415 `(("python2-backports-shutil-get-terminal-size"
5416 ,python2-backports-shutil-get-terminal-size)
5417 ("python2-pathlib2" ,python2-pathlib2)
5418 ("python2-pyzmq" ,python2-pyzmq)
5419 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
5420 ("python2-terminado" ,python2-terminado)
5421 ("python2-matplotlib" ,python2-matplotlib)
5422 ("python2-numpy" ,python2-numpy)
5423 ("python2-numpydoc" ,python2-numpydoc)
5424 ("python2-jinja2" ,python2-jinja2)
5425 ("python2-mistune" ,python2-mistune)
5426 ("python2-pexpect" ,python2-pexpect)
5427 ("python2-pickleshare" ,python2-pickleshare)
5428 ("python2-simplegeneric" ,python2-simplegeneric)
5429 ("python2-jsonschema" ,python2-jsonschema)
5430 ("python2-traitlets" ,python2-traitlets)
5431 ("python2-nbformat" ,python2-nbformat)
5432 ("python2-pygments" ,python2-pygments)))
5433 (inputs
5434 `(("readline" ,readline)
5435 ("which" ,which)))
5436 (native-inputs
5437 `(("graphviz" ,graphviz)
5438 ("pkg-config" ,pkg-config)
5439 ("python2-requests" ,python2-requests) ;; for tests
5440 ("python2-testpath" ,python2-testpath)
5441 ("python2-mock" ,python2-mock)
5442 ("python2-nose" ,python2-nose)))
5443 (arguments
5444 `(#:python ,python-2
5445 #:phases
5446 (modify-phases %standard-phases
5447 (add-before 'check 'delete-broken-tests
5448 (lambda* (#:key inputs #:allow-other-keys)
5449 ;; These tests throw errors for unknown reasons.
5450 (delete-file "IPython/core/tests/test_profile.py")
5451 (delete-file "IPython/core/tests/test_interactiveshell.py")
5452 (delete-file "IPython/core/tests/test_magic.py")
5453 #t)))))
5454 (home-page "https://ipython.org")
5455 (synopsis "IPython is a tool for interactive computing in Python")
5456 (description
5457 "IPython provides a rich architecture for interactive computing with:
5458Powerful interactive shells, a browser-based notebook, support for interactive
5459data visualization, embeddable interpreters and tools for parallel
5460computing.")
5461 (license license:bsd-3)))
5462
5463(define-public python-ipython
5464 (package
5465 (name "python-ipython")
ee515773 5466 (version "7.9.0")
8b5f756c
RW
5467 (source
5468 (origin
5469 (method url-fetch)
5470 (uri (pypi-uri "ipython" version ".tar.gz"))
5471 (sha256
ee515773 5472 (base32 "103jkw18z7fnwdal1mdbijjxi1fndzn31g887lmj7ddpf2r07lyz"))))
8b5f756c
RW
5473 (build-system python-build-system)
5474 (propagated-inputs
5475 `(("python-backcall" ,python-backcall)
5476 ("python-pyzmq" ,python-pyzmq)
5477 ("python-prompt-toolkit" ,python-prompt-toolkit)
44d10b1f
RW
5478 ("python-terminado" ,python-terminado)
5479 ("python-matplotlib" ,python-matplotlib)
5480 ("python-numpy" ,python-numpy)
5481 ("python-numpydoc" ,python-numpydoc)
8b5f756c 5482 ("python-jedi" ,python-jedi)
44d10b1f
RW
5483 ("python-jinja2" ,python-jinja2)
5484 ("python-mistune" ,python-mistune)
5485 ("python-pexpect" ,python-pexpect)
5486 ("python-pickleshare" ,python-pickleshare)
5487 ("python-simplegeneric" ,python-simplegeneric)
5488 ("python-jsonschema" ,python-jsonschema)
5489 ("python-traitlets" ,python-traitlets)
5490 ("python-nbformat" ,python-nbformat)
5491 ("python-pygments" ,python-pygments)))
5492 (inputs
5493 `(("readline" ,readline)
5494 ("which" ,which)))
5495 (native-inputs
5496 `(("graphviz" ,graphviz)
5497 ("pkg-config" ,pkg-config)
5498 ("python-requests" ,python-requests) ;; for tests
5499 ("python-testpath" ,python-testpath)
8b5f756c 5500 ("python-nose" ,python-nose)))
44d10b1f
RW
5501 (arguments
5502 `(#:phases
5503 (modify-phases %standard-phases
0f272518
RW
5504 (add-after 'unpack 'make-docs-reproducible
5505 (lambda _
5506 (substitute* "IPython/sphinxext/ipython_directive.py"
5507 ((".*import datetime") "")
5508 ((".*datetime.datetime.now\\(\\)") "")
5509 (("%timeit") "# %timeit"))
5510 #t))
44d10b1f
RW
5511 ;; Tests can only be run after the library has been installed and not
5512 ;; within the source directory.
5513 (delete 'check)
5514 (add-after 'install 'check
5515 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5516 (if tests?
5517 (begin
5518 ;; Make installed package available for running the tests
5519 (add-installed-pythonpath inputs outputs)
5520 (setenv "HOME" "/tmp/") ;; required by a test
5521 ;; We only test the core because one of the other tests
5522 ;; tries to import ipykernel.
5523 (invoke "python" "IPython/testing/iptest.py"
5524 "-v" "IPython/core/tests"))
5525 #t)))
5526 (add-before 'check 'fix-tests
5527 (lambda* (#:key inputs #:allow-other-keys)
5528 (substitute* "./IPython/utils/_process_posix.py"
5529 (("/usr/bin/env', 'which") (which "which")))
5530 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5531 (("#!/usr/bin/env python")
5532 (string-append "#!" (which "python"))))
44d10b1f
RW
5533 ;; This test introduces a circular dependency on ipykernel
5534 ;; (which depends on ipython).
5535 (delete-file "IPython/core/tests/test_display.py")
8b5f756c 5536 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
44d10b1f 5537 (delete-file "IPython/core/tests/test_interactiveshell.py")
44d10b1f
RW
5538 #t)))))
5539 (home-page "https://ipython.org")
5540 (synopsis "IPython is a tool for interactive computing in Python")
5541 (description
5542 "IPython provides a rich architecture for interactive computing with:
5543Powerful interactive shells, a browser-based notebook, support for interactive
5544data visualization, embeddable interpreters and tools for parallel
5545computing.")
8b5f756c 5546 (license license:bsd-3)))
44d10b1f 5547
8b5f756c
RW
5548(define-public python-ipython-documentation
5549 (package
5550 (inherit python-ipython)
5551 (name "python-ipython-documentation")
5552 (version (package-version python-ipython))
5553 (arguments
5554 `(#:phases
5555 (modify-phases %standard-phases
5556 (delete 'build)
5557 (delete 'check)
5558 (replace 'install
5559 (lambda* (#:key outputs #:allow-other-keys)
5560 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5561 (doc (string-append data "/doc/" ,name "-" ,version))
5562 (html (string-append doc "/html"))
5563 (man1 (string-append data "/man/man1"))
5564 (info (string-append data "/info"))
5565 (examples (string-append doc "/examples"))
5566 (python-arg (string-append "PYTHON=" (which "python"))))
5567 (setenv "LANG" "en_US.utf8")
5568 (with-directory-excursion "docs"
5569 ;; FIXME: pdf fails to build
5570 ;;(system* "make" "pdf" "PAPER=a4")
5571 (system* "make" python-arg "html")
5572 ;; FIXME: the generated texi file contains ^@^@, which trips
5573 ;; up the parser.
5574 ;; (system* "make" python-arg "info")
5575 )
5576 (copy-recursively "docs/man" man1)
5577 (copy-recursively "examples" examples)
5578 (copy-recursively "docs/build/html" html)
5579 ;; (copy-file "docs/build/latex/ipython.pdf"
5580 ;; (string-append doc "/ipython.pdf"))
5581 (mkdir-p info)
5582 ;; (copy-file "docs/build/texinfo/ipython.info"
5583 ;; (string-append info "/ipython.info"))
5584 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
5585 #t)))))
5586 (inputs
5587 `(("python-ipython" ,python-ipython)
5588 ("python-ipykernel" ,python-ipykernel)))
5589 (native-inputs
5590 `(("python-sphinx" ,python-sphinx)
5591 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
5592 ;; FIXME: It's possible that a smaller union would work just as well.
f75aa97f 5593 ("texlive" ,(texlive-union (list texlive-amsfonts
8b5f756c
RW
5594 texlive-fonts-ec
5595 texlive-generic-ifxetex
5596 texlive-generic-pdftex
8b5f756c
RW
5597 texlive-latex-capt-of
5598 texlive-latex-cmap
5599 texlive-latex-environ
5600 texlive-latex-eqparbox
5601 texlive-latex-etoolbox
5602 texlive-latex-expdlist
5603 texlive-latex-fancyhdr
5604 texlive-latex-fancyvrb
5605 texlive-latex-fncychap
5606 texlive-latex-float
5607 texlive-latex-framed
5608 texlive-latex-geometry
5609 texlive-latex-graphics
5610 texlive-latex-hyperref
5611 texlive-latex-mdwtools
5612 texlive-latex-multirow
5613 texlive-latex-needspace
5614 texlive-latex-oberdiek
5615 texlive-latex-parskip
5616 texlive-latex-preview
5617 texlive-latex-tabulary
5618 texlive-latex-threeparttable
5619 texlive-latex-titlesec
5620 texlive-latex-trimspaces
5621 texlive-latex-ucs
5622 texlive-latex-upquote
5623 texlive-latex-url
5624 texlive-latex-varwidth
5625 texlive-latex-wrapfig)))
5626 ("texinfo" ,texinfo)))))
44d10b1f
RW
5627
5628(define-public python-urwid
5629 (package
5630 (name "python-urwid")
5631 (version "2.0.1")
5632 (source
5633 (origin
5634 (method url-fetch)
5635 (uri (pypi-uri "urwid" version))
5636 (sha256
5637 (base32
5638 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
5639 (build-system python-build-system)
5640 (home-page "http://urwid.org")
5641 (synopsis "Console user interface library for Python")
5642 (description
5643 "Urwid is a curses-based UI/widget library for Python. It includes many
5644features useful for text console applications.")
5645 (license license:lgpl2.1+)))
5646
5647(define-public python2-urwid
5648 (package-with-python2 python-urwid))
5649
5650(define-public python-urwidtrees
5651 (package
5652 (name "python-urwidtrees")
5653 (version "1.0.2")
5654 (source
5655 (origin
c8364072 5656 (method git-fetch)
44d10b1f
RW
5657 ;; package author intends on distributing via github rather than pypi:
5658 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
c8364072
EF
5659 (uri (git-reference
5660 (url "https://github.com/pazz/urwidtrees")
5661 (commit version)))
5662 (file-name (git-file-name name version))
44d10b1f
RW
5663 (sha256
5664 (base32
c8364072 5665 "1n1kpidvkdnsqyb82vlvk78gmly96kh8351lqxn2pzgwwns6fml2"))))
44d10b1f
RW
5666 (build-system python-build-system)
5667 (arguments
26bb7fc6
EF
5668 '(#:use-setuptools? #f
5669 #:tests? #f)) ; no tests
44d10b1f
RW
5670 (propagated-inputs `(("python-urwid" ,python-urwid)))
5671 (home-page "https://github.com/pazz/urwidtrees")
5672 (synopsis "Tree widgets for urwid")
5673 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5674toolkit. Use it to build trees of widgets.")
5675 (license license:gpl3+)))
5676
5677(define-public python2-urwidtrees
5678 (package-with-python2 python-urwidtrees))
5679
5680(define-public python-ua-parser
5681 (package
5682 (name "python-ua-parser")
5683 (version "0.8.0")
5684 (source
5685 (origin
5686 (method url-fetch)
5687 (uri (pypi-uri "ua-parser" version))
5688 (sha256
5689 (base32
5690 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
5691 (build-system python-build-system)
5692 (arguments
5693 `(#:tests? #f)) ;no test suite in release
5694 (native-inputs
5695 `(("python-pyyaml" ,python-pyyaml)))
5696 (home-page "https://github.com/ua-parser/uap-python")
5697 (synopsis "User agent parser")
5698 (description
5699 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
5700 (license license:asl2.0)))
5701
5702(define-public python2-ua-parser
5703 (package-with-python2 python-ua-parser))
5704
5705(define-public python-user-agents
5706 (package
5707 (name "python-user-agents")
5708 (version "1.1.0")
5709 (source
5710 (origin
5711 (method url-fetch)
5712 (uri (pypi-uri "user-agents" version))
5713 (sha256
5714 (base32
5715 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
5716 (build-system python-build-system)
5717 (arguments
5718 `(#:tests? #f)) ;missing devices.json test file in release
5719 (propagated-inputs
5720 `(("python-ua-parser" ,python-ua-parser)))
5721 (home-page "https://github.com/selwin/python-user-agents")
5722 (synopsis "User Agent strings parsing library")
5723 (description
5724 "A library to identify devices (phones, tablets) and their capabilities by
5725parsing (browser/HTTP) user agent strings.")
5726 (license license:expat)))
5727
5728(define-public python2-user-agents
5729 (package-with-python2 python-user-agents))
5730
5731(define-public python-dbus
5732 (package
5733 (name "python-dbus")
ba5ef999 5734 (version "1.2.14")
44d10b1f
RW
5735 (source
5736 (origin
5737 (method url-fetch)
5738 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
5739 "dbus-python-" version ".tar.gz"))
5740 (sha256
ba5ef999 5741 (base32 "0cdchkgnivlka4lf8q4qfk0yxq483i3r3aqickjf8hfn7nx0c0mi"))))
44d10b1f 5742 (build-system gnu-build-system)
44d10b1f
RW
5743 (native-inputs
5744 `(("pkg-config" ,pkg-config)))
5745 (inputs
5746 `(("python" ,python-wrapper)
5747 ("dbus-glib" ,dbus-glib)))
5748 (synopsis "Python bindings for D-bus")
5749 (description "python-dbus provides bindings for libdbus, the reference
5750implementation of D-Bus.")
5751 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
5752 (license license:expat)))
5753
5754(define-public python2-dbus
5755 (package (inherit python-dbus)
5756 (name "python2-dbus")
5757 (inputs `(("python" ,python-2)
5758 ,@(alist-delete "python"
5759 (package-inputs python-dbus)
ba5ef999 5760 equal?)))))
44d10b1f 5761
fb236fdd
AG
5762(define-public python-notify2
5763 (package
5764 (name "python-notify2")
5765 (version "0.3.1")
5766 (source
5767 (origin
5768 (method url-fetch)
5769 (uri (pypi-uri "notify2" version))
5770 (sha256
5771 (base32
5772 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
5773 (build-system python-build-system)
5774 (arguments `(#:tests? #f)) ; tests depend on system state
5775 (native-inputs
5776 `(("python-dbus" ,python-dbus)))
5777 (home-page "https://bitbucket.org/takluyver/pynotify2")
5778 (synopsis "Python interface to D-Bus notifications")
5779 (description
5780 "Pynotify2 provides a Python interface for sending D-Bus notifications.
5781It is a reimplementation of pynotify in pure Python, and an alternative to
5782the GObject Introspection bindings to libnotify for non-GTK applications.")
5783 (license (list license:bsd-2
5784 license:lgpl2.1+))))
5785
5786(define-public python2-notify2
5787 (package-with-python2 python-notify2))
5788
44d10b1f
RW
5789;; beautifulsoup4 has a totally different namespace than 3.x,
5790;; and pypi seems to put it under its own name, so I guess we should too
5791(define-public python-beautifulsoup4
5792 (package
5793 (name "python-beautifulsoup4")
abb53e6f 5794 (version "4.7.1")
44d10b1f
RW
5795 (source
5796 (origin
5797 (method url-fetch)
5798 (uri (pypi-uri "beautifulsoup4" version))
5799 (sha256
5800 (base32
abb53e6f 5801 "0j2kycz2dxgx68xzjm7rxg5xn6v61gq5ifvxyg99slmqkybnal4l"))))
44d10b1f
RW
5802 (build-system python-build-system)
5803 (arguments
5804 `(#:phases
5805 (modify-phases %standard-phases
5806 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5807 ;; must use this conversion script when building with Python 3. The
5808 ;; conversion script also runs the tests.
5809 ;; For more information, see the file 'convert-py3k' in the source
5810 ;; distribution.
5811 (replace 'check
dff0197e 5812 (lambda _ (invoke "./convert-py3k"))))))
f83e10e4 5813 (propagated-inputs
abb53e6f 5814 `(("python-soupsieve" ,python-soupsieve)))
44d10b1f
RW
5815 (home-page
5816 "https://www.crummy.com/software/BeautifulSoup/bs4/")
5817 (synopsis
5818 "Python screen-scraping library")
5819 (description
5820 "Beautiful Soup is a Python library designed for rapidly setting up
5821screen-scraping projects. It offers Pythonic idioms for navigating,
5822searching, and modifying a parse tree, providing a toolkit for
5823dissecting a document and extracting what you need. It automatically
5824converts incoming documents to Unicode and outgoing documents to UTF-8.")
5825 (license license:expat)
5826 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5827
5828(define-public python2-beautifulsoup4
5829 (package
5830 (inherit (package-with-python2
5831 (strip-python2-variant python-beautifulsoup4)))
5832 (arguments `(#:python ,python-2))))
5833
ad74978a
BT
5834(define-public python-soupsieve
5835 (package
5836 (name "python-soupsieve")
3367df31 5837 (version "1.9.5")
ad74978a
BT
5838 (source
5839 (origin
5840 (method url-fetch)
5841 (uri (pypi-uri "soupsieve" version))
5842 (sha256
5843 (base32
3367df31 5844 "1nhd0q0ifwva9wn645s6pn74p1rd97asn3qfg75nphx1wkgcbhg2"))))
ad74978a
BT
5845 (build-system python-build-system)
5846 (arguments `(#:tests? #f))
5847 ;;XXX: 2 tests fail currently despite claming they were to be
5848 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
5849 ;;don't want to create a circular dependency.
5850 (home-page "https://github.com/facelessuser/soupsieve")
5851 (synopsis "CSS selector library")
5852 (description
5853 "Soup Sieve is a CSS selector library designed to be used with Beautiful
5854Soup 4. It aims to provide selecting, matching, and filtering using modern
5855CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
5856specifications up through the latest CSS level 4 drafts and beyond (though
5857some are not yet implemented).")
d00b83fb 5858 (properties `((python2-variant . ,(delay python2-soupsieve))))
ad74978a
BT
5859 (license license:expat)))
5860
5861(define-public python2-soupsieve
d00b83fb 5862 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
ad74978a
BT
5863 (package
5864 (inherit base)
5865 (propagated-inputs
d00b83fb
MB
5866 `(("python2-backports-functools-lru-cache"
5867 ,python2-backports-functools-lru-cache)
5868 ,@(package-propagated-inputs base))))))
ad74978a 5869
44d10b1f
RW
5870(define-public python-netifaces
5871 (package
5872 (name "python-netifaces")
5873 (version "0.10.7")
5874 (source
5875 (origin
5876 (method url-fetch)
5877 (uri (pypi-uri "netifaces" version))
5878 (sha256
5879 (base32
5880 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
5881 (build-system python-build-system)
5882 (home-page "https://github.com/al45tair/netifaces")
5883 (synopsis
5884 "Python module for portable network interface information")
5885 (description
5886 "Netifaces is a Python module providing information on network
5887interfaces in an easy and portable manner.")
5888 (license license:expat)))
5889
5890(define-public python2-netifaces
5891 (package-with-python2 python-netifaces))
5892
5893(define-public python-networkx
5894 (package
5895 (name "python-networkx")
5896 (version "2.2")
5897 (source
5898 (origin
5899 (method url-fetch)
5900 (uri (pypi-uri "networkx" version ".zip"))
5901 (sha256
5902 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
5903 (build-system python-build-system)
5904 ;; python-decorator is needed at runtime.
5905 (propagated-inputs
5906 `(("python-decorator" ,python-decorator)))
5907 (native-inputs
5908 `(("python-nose" ,python-nose)
5909 ("unzip" ,unzip)))
5910 (home-page "https://networkx.github.io/")
5911 (synopsis "Python module for creating and manipulating graphs and networks")
5912 (description
5913 "NetworkX is a Python package for the creation, manipulation, and study
5914of the structure, dynamics, and functions of complex networks.")
5915 (license license:bsd-3)))
5916
5917(define-public python2-networkx
5918 (package-with-python2 python-networkx))
5919
5920(define-public python-datrie
5921 (package
5922 (name "python-datrie")
0b58cb42 5923 (version "0.8")
44d10b1f
RW
5924 (source
5925 (origin
5926 (method url-fetch)
5927 (uri (pypi-uri "datrie" version))
5928 (sha256
5929 (base32
0b58cb42 5930 "0338r8xgmpy78556jhms0h6qkvyjr10p8bpgdvcpqzm9lrmxmmdx"))))
44d10b1f 5931 (build-system python-build-system)
44d10b1f
RW
5932 (native-inputs
5933 `(("python-cython" ,python-cython)
5934 ("python-hypothesis" ,python-hypothesis)
5935 ("python-pytest" ,python-pytest)
5936 ("python-pytest-runner" ,python-pytest-runner)))
5937 (home-page "https://github.com/kmike/datrie")
5938 (synopsis "Fast, efficiently stored trie for Python")
5939 (description
5940 "This package provides a fast, efficiently stored trie implementation for
5941Python.")
5942 (license license:lgpl2.1+)))
5943
5944(define-public snakemake
5945 (package
5946 (name "snakemake")
93803c6b 5947 (version "5.7.1")
44d10b1f
RW
5948 (source
5949 (origin
5950 (method url-fetch)
5951 (uri (pypi-uri "snakemake" version))
5952 (sha256
93803c6b 5953 (base32 "1pnpvvn8n2a78cg360wz3ldmpqrsm2wzi0c0dmvki9fnsw6fxdas"))))
44d10b1f
RW
5954 (build-system python-build-system)
5955 (arguments
5956 ;; TODO: Package missing test dependencies.
5957 '(#:tests? #f
5958 #:phases
5959 (modify-phases %standard-phases
5960 ;; For cluster execution Snakemake will call Python. Since there is
5961 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
5962 ;; this by calling the snakemake wrapper instead.
5963 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
5964 (lambda* (#:key outputs #:allow-other-keys)
5965 (substitute* "snakemake/executors.py"
5966 (("\\{sys.executable\\} -m snakemake")
5967 (string-append (assoc-ref outputs "out")
5968 "/bin/snakemake")))
5969 #t)))))
5970 (propagated-inputs
8994ae34 5971 `(("python-appdirs" ,python-appdirs)
44d10b1f
RW
5972 ("python-configargparse" ,python-configargparse)
5973 ("python-datrie" ,python-datrie)
5974 ("python-docutils" ,python-docutils)
8994ae34 5975 ("python-gitpython" ,python-gitpython)
44d10b1f
RW
5976 ("python-jinja2" ,python-jinja2)
5977 ("python-jsonschema" ,python-jsonschema)
5978 ("python-networkx" ,python-networkx)
93803c6b 5979 ("python-psutil" ,python-psutil)
44d10b1f 5980 ("python-pyyaml" ,python-pyyaml)
8994ae34
TGR
5981 ("python-ratelimiter" ,python-ratelimiter)
5982 ("python-requests" ,python-requests)
5983 ("python-wrapt" ,python-wrapt)))
44d10b1f
RW
5984 (home-page "https://snakemake.readthedocs.io")
5985 (synopsis "Python-based execution environment for make-like workflows")
5986 (description
5987 "Snakemake aims to reduce the complexity of creating workflows by
5988providing a clean and modern domain specific specification language (DSL) in
5989Python style, together with a fast and comfortable execution environment.")
5990 (license license:expat)))
5991
44d10b1f
RW
5992(define-public python-pyqrcode
5993 (package
5994 (name "python-pyqrcode")
5995 (version "1.2.1")
5996 (source
5997 (origin
5998 (method url-fetch)
5999 (uri (pypi-uri "PyQRCode" version))
6000 (sha256
6001 (base32
6002 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
6003 (build-system python-build-system)
6004 (home-page
6005 "https://github.com/mnooner256/pyqrcode")
6006 (synopsis "QR code generator")
6007 (description
6008 "Pyqrcode is a QR code generator written purely in Python with
6009SVG, EPS, PNG and terminal output.")
6010 (license license:bsd-3)))
6011
6012(define-public python-seaborn
6013 (package
6014 (name "python-seaborn")
6015 (version "0.9.0")
6016 (source
6017 (origin
6018 (method url-fetch)
6019 (uri (pypi-uri "seaborn" version))
6020 (sha256
f9bd82e7
RW
6021 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))
6022 (patches
6023 (list (origin
6024 (method url-fetch)
6025 ;; This has already been merged, but there is no new
6026 ;; release including this patch. It fixes problems
6027 ;; with axis rotation that would lead to test
6028 ;; failures.
6029 (uri "https://patch-diff.githubusercontent.com/raw/mwaskom/seaborn/pull/1716.diff")
6030 (sha256
6031 (base32
6032 "1lm870z316n9ivsyr86hpk1gxaraw0mrjvq42lqsm0znhjdp9q9w"))
6033 (file-name "seaborn-0.9.0-axis-rotation.patch"))))))
44d10b1f
RW
6034 (build-system python-build-system)
6035 (arguments
6036 `(#:phases
6037 (modify-phases %standard-phases
6038 (add-before 'check 'start-xserver
6039 (lambda* (#:key inputs #:allow-other-keys)
6040 (let ((xorg-server (assoc-ref inputs "xorg-server")))
6041 ;; There must be a running X server and make check doesn't
6042 ;; start one. Therefore we must do it.
6043 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
6044 (setenv "DISPLAY" ":1")
6045 #t)))
a1322765
RW
6046 (add-after 'unpack 'fix-tests
6047 (lambda _
6048 ;; test_cbar_ticks fails probably because of matplotlib's
6049 ;; expectation of using an older version of FreeType.
6050 (delete-file "seaborn/tests/test_matrix.py")
6051 #t))
44d10b1f
RW
6052 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
6053 (propagated-inputs
6054 `(("python-pandas" ,python-pandas)
6055 ("python-matplotlib" ,python-matplotlib)
6056 ("python-numpy" ,python-numpy)
6057 ("python-scipy" ,python-scipy)))
6058 (native-inputs
6059 `(("python-pytest" ,python-pytest)
ff337525 6060 ("xorg-server" ,xorg-server-for-tests)))
44d10b1f
RW
6061 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
6062 (synopsis "Statistical data visualization")
6063 (description
6064 "Seaborn is a library for making attractive and informative statistical
6065graphics in Python. It is built on top of matplotlib and tightly integrated
6066with the PyData stack, including support for numpy and pandas data structures
6067and statistical routines from scipy and statsmodels.")
6068 (license license:bsd-3)))
6069
6070(define-public python2-seaborn
6071 (package-with-python2 python-seaborn))
6072
6073(define-public python-mpmath
6074 (package
6075 (name "python-mpmath")
6076 (version "0.19")
6077 (source (origin
6078 (method url-fetch)
6079 (uri (string-append "http://mpmath.org/files/mpmath-"
6080 version ".tar.gz"))
6081 (sha256
6082 (base32
6083 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
6084 (build-system python-build-system)
6085 (arguments
6086 '(#:phases
6087 (modify-phases %standard-phases
6088 (replace 'check
6089 (lambda _
5d7a6f1c 6090 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
44d10b1f
RW
6091 (home-page "http://mpmath.org")
6092 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6093 (description
6094 "@code{mpmath} can be used as an arbitrary-precision substitute for
6095Python's float/complex types and math/cmath modules, but also does much
6096more advanced mathematics.")
6097 (license license:bsd-3)))
6098
6099(define-public python2-mpmath
6100 (package-with-python2 python-mpmath))
6101
6102(define-public python-bigfloat
6103 (package
6104 (name "python-bigfloat")
6105 (version "0.3.0")
6106 (source
6107 (origin
6108 (method url-fetch)
6109 (uri (pypi-uri "bigfloat" version))
6110 (sha256
6111 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
6112 (build-system python-build-system)
6113 (inputs
6114 `(("mpfr" ,mpfr)))
6115 (home-page "https://github.com/mdickinson/bigfloat")
6116 (synopsis "Arbitrary precision floating-point arithmetic for Python")
6117 (description
e36de31b 6118 "This package provides a Python interface to the MPFR library for
44d10b1f
RW
6119multiprecision arithmetic.")
6120 (license license:lgpl3+)))
6121
6122(define-public python2-bigfloat
6123 (package-with-python2 python-bigfloat))
6124
6125(define-public python-sympy
6126 (package
6127 (name "python-sympy")
6128 (version "1.1.1")
6129 (source
6130 (origin
6131 (method url-fetch)
6132 (uri (string-append
6133 "https://github.com/sympy/sympy/releases/download/sympy-"
6134 version "/sympy-" version ".tar.gz"))
6135 (sha256
6136 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
6137 (build-system python-build-system)
6138 (arguments
6139 `(#:phases
6140 (modify-phases %standard-phases
6141 ;; Run the core tests after installation. By default it would run
6142 ;; *all* tests, which take a very long time to complete and are known
6143 ;; to be flaky.
6144 (delete 'check)
6145 (add-after 'install 'check
6146 (lambda* (#:key outputs #:allow-other-keys)
6147 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
6148 #t)))))
6149 (propagated-inputs
6150 `(("python-mpmath" ,python-mpmath)))
6151 (home-page "http://www.sympy.org/")
6152 (synopsis "Python library for symbolic mathematics")
6153 (description
6154 "SymPy is a Python library for symbolic mathematics. It aims to become a
6155full-featured computer algebra system (CAS) while keeping the code as simple
6156as possible in order to be comprehensible and easily extensible.")
6157 (license license:bsd-3)))
6158
6159(define-public python2-sympy
6160 (package
6161 (inherit (package-with-python2 python-sympy))
6162 (arguments
6163 `(#:phases
6164 (modify-phases %standard-phases
6165 ;; Run the core tests after installation. By default it would run
6166 ;; *all* tests, which take a very long time to complete and are known
6167 ;; to be flaky.
6168 (delete 'check)
6169 (add-after 'install 'check
6170 (lambda* (#:key outputs #:allow-other-keys)
6171 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
6172 #t)))))))
6173
6174(define-public python-q
6175 (package
6176 (name "python-q")
6177 (version "2.6")
6178 (source
6179 (origin
6180 (method url-fetch)
6181 (uri (pypi-uri "q" version))
6182 (sha256
6183 (base32
6184 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6185 (build-system python-build-system)
6186 (home-page "https://github.com/zestyping/q")
6187 (synopsis "Quick-and-dirty debugging output for tired programmers")
6188 (description
6189 "q is a Python module for \"print\" style of debugging Python code. It
6190provides convenient short API for print out of values, tracebacks, and
6191falling into the Python interpreter.")
6192 (license license:asl2.0)))
6193
6194(define-public python2-q
6195 (package-with-python2 python-q))
6196
6197(define-public python2-xlib
6198 (package
6199 (name "python2-xlib")
6200 (version "0.14")
6201 (source (origin
6202 (method url-fetch)
6203 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6204 "/" version "/"
6205 "python-xlib-" version ".tar.gz"))
6206 (sha256
6207 (base32
6208 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6209 (build-system python-build-system)
6210 (arguments
6211 `(#:python ,python-2 ;Python 2 only
6212 #:tests? #f)) ;no tests
6213 (home-page "http://python-xlib.sourceforge.net/")
6214 (synopsis "Python X11 client library")
6215 (description
6216 "The Python X Library is intended to be a fully functional X client
6217library for Python programs. It is useful to implement low-level X clients.
6218It is written entirely in Python.")
6219 (license license:gpl2+)))
6220
6221(define-public python-singledispatch
6222 (package
6223 (name "python-singledispatch")
6224 (version "3.4.0.3")
6225 (source
6226 (origin
6227 (method url-fetch)
6228 (uri (pypi-uri "singledispatch" version))
6229 (sha256
6230 (base32
6231 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6232 (build-system python-build-system)
6233 (native-inputs
6234 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6235 (home-page
6236 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
6237 (synopsis "Backport of singledispatch feature from Python 3.4")
6238 (description
6239 "This library brings functools.singledispatch from Python 3.4 to Python
62402.6-3.3.")
6241 (license license:expat)))
6242
6243(define-public python2-singledispatch
6244 (package-with-python2 python-singledispatch))
6245
6246;; the python- version can be removed with python-3.5
6247(define-public python-backports-abc
6248 (package
6249 (name "python-backports-abc")
6250 (version "0.5")
6251 (source
6252 (origin
6253 (method url-fetch)
6254 (uri (pypi-uri "backports_abc" version))
6255 (sha256
6256 (base32
6257 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6258 (build-system python-build-system)
6259 (home-page "https://github.com/cython/backports_abc")
6260 (synopsis "Backport of additions to the 'collections.abc' module")
6261 (description
6262 "Python-backports-abc provides a backport of additions to the
36a4366d 6263@code{collections.abc} module in Python-3.5.")
44d10b1f
RW
6264 (license license:psfl)))
6265
6266(define-public python2-backports-abc
6267 (package-with-python2 python-backports-abc))
6268
6269(define-public python-backports-csv
6270 (package
6271 (name "python-backports-csv")
6272 (version "1.0.5")
6273 (source
6274 (origin
6275 (method url-fetch)
6276 (uri (pypi-uri "backports.csv" version))
6277 (sha256
6278 (base32
6279 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
6280 (build-system python-build-system)
6281 (home-page "https://github.com/ryanhiebert/backports.csv")
6282 (synopsis "Backport of Python 3's csv module for Python 2")
6283 (description
6284 "Provides a backport of Python 3's @code{csv} module for parsing
6285comma separated values. The API of the @code{csv} module in Python 2
6286is drastically different from the @code{csv} module in Python 3.
6287This is due, for the most part, to the difference between str in
6288Python 2 and Python 3.")
6289 (license license:psfl)))
6290
6291(define-public python2-backports-csv
6292 (package-with-python2 python-backports-csv))
6293
6294(define-public python2-backports-shutil-get-terminal-size
6295 (package
6296 (name "python2-backports-shutil-get-terminal-size")
6297 (version "1.0.0")
6298 (source
6299 (origin
6300 (method url-fetch)
6301 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6302 (sha256
6303 (base32
6304 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6305 (build-system python-build-system)
6306 (arguments
6307 `(#:python ,python-2
6308 #:phases
6309 (modify-phases %standard-phases
6310 (replace 'check
6311 (lambda _
4a4a7d9a 6312 (invoke "py.test" "-v"))))))
44d10b1f
RW
6313 (native-inputs
6314 `(("python2-pytest" ,python2-pytest)))
6315 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6316 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6317 (description
6318 "This package provides a backport of the @code{get_terminal_size
6319function} from Python 3.3's @code{shutil}.
6320Unlike the original version it is written in pure Python rather than C,
6321so it might be a tiny bit slower.")
6322 (license license:expat)))
6323
6324(define-public python-waf
6325 (package
6326 (name "python-waf")
6c2c11fa 6327 (version "2.0.19")
44d10b1f
RW
6328 (source (origin
6329 (method url-fetch)
6330 (uri (string-append "https://waf.io/"
6331 "waf-" version ".tar.bz2"))
6332 (sha256
6333 (base32
6c2c11fa 6334 "19dvqbsvxz7ch03dh1v0znklrwxlz6yzddc3k9smzrrgny4jch6q"))))
44d10b1f
RW
6335 (build-system python-build-system)
6336 (arguments
6337 '(#:phases
6338 (modify-phases %standard-phases
6339 (replace 'build
6340 (lambda _
633c8b71
MO
6341 ;; XXX: Find a way to add all extra tools.
6342 (let ((tools '("gccdeps"
6343 "clang_compilation_database")))
6344 (invoke "python" "waf-light" "configure" "build"
6345 (string-append "--tools="
6346 (string-join tools ","))))))
44d10b1f
RW
6347 (replace 'check
6348 (lambda _
6349 (invoke "python" "waf" "--version")))
6350 (replace 'install
6351 (lambda* (#:key outputs #:allow-other-keys)
6352 (let ((out (assoc-ref outputs "out")))
6353 (install-file "waf" (string-append out "/bin")))
6354 #t))
6355 ;; waf breaks when it is wrapped.
6356 (delete 'wrap))))
6357 (home-page "https://waf.io/")
6358 (synopsis "Python-based build system")
6359 (description
6360 "Waf is a Python-based framework for configuring, compiling and installing
6361applications.")
6362 (license license:bsd-3)))
6363
6364(define-public python2-waf
6365 (package-with-python2 python-waf))
6366
6367(define-public python-pyzmq
6368 (package
6369 (name "python-pyzmq")
6370 (version "17.1.2")
6371 (source
6372 (origin
6373 (method url-fetch)
6374 (uri (pypi-uri "pyzmq" version))
6375 (sha256
6376 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
6377 (build-system python-build-system)
6378 (arguments
6379 `(#:configure-flags
6380 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6381 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6382 ;; --inplace' for 'python setup.py test' to work.
6383 #:tests? #f))
6384 (inputs
6385 `(("zeromq" ,zeromq)))
6386 (native-inputs
6387 `(("pkg-config" ,pkg-config)
6388 ("python-nose" ,python-nose)))
6389 (home-page "https://github.com/zeromq/pyzmq")
6390 (synopsis "Python bindings for 0MQ")
6391 (description
6392 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6393 (license license:bsd-4)))
6394
6395(define-public python2-pyzmq
6396 (package-with-python2 python-pyzmq))
6397
6398(define-public python-pep8
6399 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
6400 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
6401 ;; some dependents' test suites, and nothing more.
6402 (package
6403 (name "python-pep8")
6404 (version "1.7.0")
6405 (source
6406 (origin
6407 (method url-fetch)
6408 (uri (pypi-uri "pep8" version))
6409 (sha256
6410 (base32
2be878d8
CB
6411 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
6412 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
44d10b1f
RW
6413 (build-system python-build-system)
6414 (home-page "https://pep8.readthedocs.org/")
6415 (synopsis "Python style guide checker")
6416 (description
6417 "This tools checks Python code against some of the style conventions in
6418PEP 8.")
6419 (license license:expat)))
6420
6421(define-public python2-pep8
6422 (package-with-python2 python-pep8))
6423
6424(define-public python-pyflakes
6425 (package
6426 (name "python-pyflakes")
d0cba11b 6427 (version "2.1.1")
44d10b1f
RW
6428 (source
6429 (origin
6430 (method url-fetch)
6431 (uri (pypi-uri "pyflakes" version))
6432 (sha256
6433 (base32
d0cba11b 6434 "18pq95a1xj2dgdd0m85gyfsn40jajj4xc3lp8wfv7igqhrc86xnr"))))
44d10b1f
RW
6435 (build-system python-build-system)
6436 (home-page
6437 "https://github.com/pyflakes/pyflakes")
6438 (synopsis "Passive checker of Python programs")
6439 (description
6440 "Pyflakes statically checks Python source code for common errors.")
6441 (license license:expat)))
6442
6443(define-public python2-pyflakes
6444 (package-with-python2 python-pyflakes))
6445
6446(define-public python-mccabe
6447 (package
6448 (name "python-mccabe")
6449 (version "0.6.1")
6450 (source
6451 (origin
6452 (method url-fetch)
6453 (uri (pypi-uri "mccabe" version))
6454 (sha256
6455 (base32
6456 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
6457 (build-system python-build-system)
6458 (native-inputs
6459 `(("python-pytest" ,python-pytest-bootstrap)
6460 ("python-pytest-runner" ,python-pytest-runner)))
6461 (home-page "https://github.com/flintwork/mccabe")
6462 (synopsis "McCabe checker, plugin for flake8")
6463 (description
6464 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6465complexity of Python source code.")
6466 (license license:expat)))
6467
6468(define-public python2-mccabe
6469 (package-with-python2 python-mccabe))
6470
6471(define-public python-mccabe-0.2.1
6472 (package (inherit python-mccabe)
6473 (version "0.2.1")
6474 (source
6475 (origin
6476 (method url-fetch)
6477 (uri (pypi-uri "mccabe" version))
6478 (sha256
6479 (base32
6480 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6481
6482(define-public python2-mccabe-0.2.1
6483 (package-with-python2 python-mccabe-0.2.1))
6484
6485;; Flake8 2.4.1 requires an older version of pep8.
6486;; This should be removed ASAP.
6487(define-public python-pep8-1.5.7
6488 (package (inherit python-pep8)
6489 (version "1.5.7")
6490 (source
f3576970
RW
6491 (origin
6492 (method url-fetch)
6493 (uri (pypi-uri "pep8" version))
6494 (sha256
6495 (base32
6496 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
44d10b1f
RW
6497 (arguments
6498 ;; XXX Tests not compatible with Python 3.5.
6499 '(#:tests? #f))))
6500
6501(define-public python2-pep8-1.5.7
6502 (package-with-python2 python-pep8-1.5.7))
6503
6504;; Flake8 2.4.1 requires an older version of pyflakes.
6505;; This should be removed ASAP.
6506(define-public python-pyflakes-0.8.1
6507 (package (inherit python-pyflakes)
6508 (version "0.8.1")
6509 (source
8c4dffb5
RW
6510 (origin
6511 (method url-fetch)
6512 (uri (pypi-uri "pyflakes" version))
6513 (sha256
6514 (base32
6515 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
44d10b1f
RW
6516 (arguments
6517 ;; XXX Tests not compatible with Python 3.5.
6518 '(#:tests? #f))))
6519
6520(define-public python2-pyflakes-0.8.1
6521 (package-with-python2 python-pyflakes-0.8.1))
6522
ac63cf0a 6523(define-public python-flake8
44d10b1f
RW
6524 (package
6525 (name "python-flake8")
beaff4a8 6526 (version "3.7.7")
ac63cf0a
MB
6527 (source (origin
6528 (method url-fetch)
6529 (uri (pypi-uri "flake8" version))
6530 (sha256
6531 (base32
beaff4a8 6532 "0qg6zggqigrd4k3gv88shd1a27d0cwgfql8vfiq2c7rl7w3rd6c5"))))
44d10b1f
RW
6533 (build-system python-build-system)
6534 (arguments
6535 `(#:phases
6536 (modify-phases %standard-phases
44d10b1f
RW
6537 (delete 'check)
6538 (add-after 'install 'check
6539 (lambda* (#:key inputs outputs #:allow-other-keys)
6540 (add-installed-pythonpath inputs outputs)
6541 (invoke "pytest" "-v")
6542 #t)))))
6543 (propagated-inputs
6544 `(("python-pycodestyle" ,python-pycodestyle)
beaff4a8 6545 ("python-entrypoints" ,python-entrypoints)
44d10b1f
RW
6546 ("python-pyflakes" ,python-pyflakes)
6547 ("python-mccabe" ,python-mccabe)))
6548 (native-inputs
6549 `(("python-mock" ,python-mock)
6550 ("python-pytest" ,python-pytest-bootstrap)
6551 ("python-pytest-runner" ,python-pytest-runner)))
6552 (home-page "https://gitlab.com/pycqa/flake8")
6553 (synopsis
6554 "The modular source code checker: pep8, pyflakes and co")
6555 (description
6556 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
ac63cf0a 6557 (properties `((python2-variant . ,(delay python2-flake8))))
44d10b1f
RW
6558 (license license:expat)))
6559
ac63cf0a
MB
6560(define-public python2-flake8
6561 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
44d10b1f
RW
6562 (package (inherit base)
6563 (propagated-inputs
6564 `(("python2-configparser" ,python2-configparser)
6565 ("python2-enum34" ,python2-enum34)
beaff4a8 6566 ("python2-typing" ,python2-typing)
44d10b1f
RW
6567 ,@(package-propagated-inputs base))))))
6568
44d10b1f
RW
6569;; python-hacking requires flake8 <2.6.0.
6570(define-public python-flake8-2.5
6571 (package
6572 (inherit python-flake8)
6573 (version "2.5.5")
6574 (source (origin
6575 (method url-fetch)
6576 (uri (pypi-uri "flake8" version))
6577 (sha256
6578 (base32
6579 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
6580 (propagated-inputs
6581 `(("python-pep8" ,python-pep8)
6582 ,@(package-propagated-inputs python-flake8)))
6583 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
6584
6585(define-public python2-flake8-2.5
6586 (package
6587 (inherit python2-flake8)
6588 (version (package-version python-flake8-2.5))
6589 (source (origin
6590 (inherit (package-source python-flake8-2.5))))
6591 (propagated-inputs
6592 `(("python2-pep8" ,python2-pep8)
6593 ,@(package-propagated-inputs python2-flake8)))))
6594
6595(define-public python-flake8-polyfill
6596 (package
6597 (name "python-flake8-polyfill")
6598 (version "1.0.2")
6599 (source
6600 (origin
6601 (method url-fetch)
6602 (uri (pypi-uri "flake8-polyfill" version))
6603 (sha256
6604 (base32
6605 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
6606 (build-system python-build-system)
6607 (arguments
6608 '(#:phases
6609 (modify-phases %standard-phases
6610 (replace 'check
6611 (lambda _
40a7153d
MB
6612 ;; Be compatible with Pytest 4:
6613 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
6614 (substitute* "setup.cfg"
6615 (("\\[pytest\\]")
6616 "[tool:pytest]"))
6617
44d10b1f
RW
6618 (setenv "PYTHONPATH"
6619 (string-append (getcwd) "/build/lib:"
6620 (getenv "PYTHONPATH")))
4f0a0894 6621 (invoke "py.test" "-v"))))))
44d10b1f
RW
6622 (native-inputs
6623 `(("python-flake8" ,python-flake8)
6624 ("python-mock" ,python-mock)
6625 ("python-pep8" ,python-pep8)
6626 ("python-pycodestyle" ,python-pycodestyle)
6627 ("python-pytest" ,python-pytest)))
6628 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6629 (synopsis "Polyfill package for Flake8 plugins")
6630 (description
6631 "This package that provides some compatibility helpers for Flake8
6632plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6633 (license license:expat)))
6634
6635(define-public python2-flake8-polyfill
6636 (package-with-python2 python-flake8-polyfill))
6637
6638(define-public python-mistune
6639 (package
6640 (name "python-mistune")
6641 (version "0.8.4")
6642 (source
6643 (origin
6644 (method url-fetch)
6645 (uri (pypi-uri "mistune" version))
6646 (sha256
6647 (base32
6648 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
6649 (build-system python-build-system)
6650 (native-inputs
6651 `(("python-nose" ,python-nose)
6652 ("python-cython" ,python-cython)))
6653 (home-page "https://github.com/lepture/mistune")
6654 (synopsis "Markdown parser in pure Python")
6655 (description "This package provides a fast markdown parser in pure
6656Python.")
6657 (license license:bsd-3)))
6658
6659(define-public python2-mistune
6660 (package-with-python2 python-mistune))
6661
6662(define-public python-markdown
6663 (package
6664 (name "python-markdown")
ceb1936a 6665 (version "3.1.1")
44d10b1f
RW
6666 (source
6667 (origin
6668 (method url-fetch)
6669 (uri (pypi-uri "Markdown" version))
6670 (sha256
6671 (base32
ceb1936a 6672 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f"))))
44d10b1f
RW
6673 (build-system python-build-system)
6674 (native-inputs
6675 `(("python-nose" ,python-nose)
6676 ("python-pyyaml" ,python-pyyaml)))
6677 (home-page "https://python-markdown.github.io/")
6678 (synopsis "Python implementation of Markdown")
6679 (description
6680 "This package provides a Python implementation of John Gruber's
6681Markdown. The library features international input, various Markdown
6682extensions, and several HTML output formats. A command line wrapper
6683markdown_py is also provided to convert Markdown files to HTML.")
6684 (license license:bsd-3)))
6685
6686(define-public python2-markdown
6687 (package-with-python2 python-markdown))
6688
6689(define-public python-ptyprocess
6690 (package
6691 (name "python-ptyprocess")
6692 (version "0.5.2")
6693 (source
6694 (origin
6695 (method url-fetch)
6696 (uri (pypi-uri "ptyprocess" version))
6697 (sha256
6698 (base32
6699 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
6700 (build-system python-build-system)
6701 (native-inputs
6702 `(("python-nose" ,python-nose)))
6703 (arguments
6704 `(#:phases
6705 (modify-phases %standard-phases
6706 (replace 'check
7904d6fa 6707 (lambda _ (invoke "nosetests"))))))
44d10b1f
RW
6708 (home-page "https://github.com/pexpect/ptyprocess")
6709 (synopsis "Run a subprocess in a pseudo terminal")
6710 (description
6711 "This package provides a Python library used to launch a subprocess in a
6712pseudo terminal (pty), and interact with both the process and its pty.")
6713 (license license:isc)))
6714
6715(define-public python2-ptyprocess
6716 (package-with-python2 python-ptyprocess))
6717
6718(define-public python-cram
6719 (package
6720 (name "python-cram")
6721 (version "0.7")
6722 (home-page "https://bitheap.org/cram/")
6723 (source (origin
6724 (method url-fetch)
6725 (uri (list (string-append home-page "cram-"
6726 version ".tar.gz")
6727 (pypi-uri "cram" version)))
6728 (sha256
6729 (base32
6730 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6731 (arguments
6732 '(#:phases
6733 (modify-phases %standard-phases
6734 (add-after 'unpack 'patch-source
6735 (lambda _
6736 (substitute* (find-files "cram" ".*\\.py$")
6737 ;; Replace default shell path.
6738 (("/bin/sh") (which "sh")))
6739 (substitute* (find-files "tests" ".*\\.t$")
6740 (("md5") "md5sum")
6741 (("/bin/bash") (which "bash"))
6742 (("/bin/sh") (which "sh")))
6743 (substitute* "cram/_test.py"
6744 ;; This hack works around a bug triggered by substituting
6745 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6746 ;; "cram -h", which breaks the output at 80 characters. This
6747 ;; causes the line showing the default shell to break into two
6748 ;; lines, but the test expects a single line...
6749 (("env\\['COLUMNS'\\] = '80'")
6750 "env['COLUMNS'] = '160'"))
ff1e80d7
MB
6751
6752 (substitute* "Makefile"
6753 ;; Recent versions of python-coverage have caused the test
6754 ;; coverage to decrease (as of version 0.7). Allow that.
6755 (("--fail-under=100")
6756 "--fail-under=90"))
6757
44d10b1f 6758 #t))
ff1e80d7 6759 (replace 'check
44d10b1f 6760 ;; The test phase uses the built library and executable.
44d10b1f
RW
6761 (lambda* (#:key inputs outputs #:allow-other-keys)
6762 (add-installed-pythonpath inputs outputs)
6763 (setenv "PATH" (string-append (getenv "PATH") ":"
6764 (assoc-ref outputs "out") "/bin"))
2d7db192 6765 (invoke "make" "test"))))))
44d10b1f
RW
6766 (build-system python-build-system)
6767 (native-inputs
6768 `(("python-coverage" ,python-coverage)
6769 ("which" ,which)))
6770 (synopsis "Simple testing framework for command line applications")
6771 (description
6772 "Cram is a functional testing framework for command line applications.
6773Cram tests look like snippets of interactive shell sessions. Cram runs each
6774command and compares the command output in the test with the command’s actual
6775output.")
6776 (license license:gpl2+)))
6777
6778(define-public python2-cram
6779 (package-with-python2 python-cram))
6780
6781(define-public python-straight-plugin
6782 (package
6783 (name "python-straight-plugin")
6784 (version "1.4.1")
6785 (source
6786 (origin
6787 (method url-fetch)
6788 (uri (pypi-uri "straight.plugin" version))
6789 (sha256
6790 (base32
6791 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6792 (build-system python-build-system)
6793 (home-page "https://github.com/ironfroggy/straight.plugin")
6794 (synopsis "Simple namespaced plugin facility")
6795 (description "Straight Plugin provides a type of plugin you can create from
6796almost any existing Python modules, and an easy way for outside developers to
6797add functionality and customization to your projects with their own plugins.")
6798 (license license:expat)))
6799
6800(define-public python2-straight-plugin
6801 (package-with-python2 python-straight-plugin))
6802
6803(define-public python-fonttools
6804 (package
6805 (name "python-fonttools")
1a4bb420 6806 (version "3.38.0")
44d10b1f
RW
6807 (source (origin
6808 (method url-fetch)
6809 (uri (pypi-uri "fonttools" version ".zip"))
6810 (sha256
6811 (base32
1a4bb420 6812 "12ripk3s7skgxr1bs9r8n13r94ym3s8iir7ivfixls9fa4dabmlh"))))
44d10b1f
RW
6813 (build-system python-build-system)
6814 (native-inputs
6815 `(("unzip" ,unzip)
6816 ("python-pytest" ,python-pytest)
6817 ("python-pytest-runner" ,python-pytest-runner)))
9d25a454 6818 (home-page "https://github.com/fonttools/fonttools")
44d10b1f
RW
6819 (synopsis "Tools to manipulate font files")
6820 (description
6821 "FontTools/TTX is a library to manipulate font files from Python. It
6822supports reading and writing of TrueType/OpenType fonts, reading and writing
6823of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6824also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6825from an XML-based format.")
6826 (license license:expat)))
6827
6828(define-public python2-fonttools
6829 (package-with-python2 python-fonttools))
6830
6831(define-public python-ly
6832 (package
6833 (name "python-ly")
6834 (version "0.9.5")
6835 (source
6836 (origin
6837 (method url-fetch)
6838 (uri (pypi-uri name version))
6839 (sha256
6840 (base32
6841 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
6842 (build-system python-build-system)
6843 (arguments
6844 ;; FIXME: Some tests need network access.
6845 '(#:tests? #f))
6846 (synopsis "Tool and library for manipulating LilyPond files")
6847 (description "This package provides a Python library to parse, manipulate
6848or create documents in LilyPond format. A command line program ly is also
6849provided that can be used to do various manipulations with LilyPond files.")
6850 (home-page "https://pypi.python.org/pypi/python-ly")
6851 (license license:gpl2+)))
6852
6853(define-public python-appdirs
6854 (package
6855 (name "python-appdirs")
6856 (version "1.4.3")
6857 (source
6858 (origin
6859 (method url-fetch)
6860 (uri (pypi-uri "appdirs" version))
6861 (sha256
6862 (base32
6863 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
6864 (build-system python-build-system)
6865 (home-page "https://github.com/ActiveState/appdirs")
6866 (synopsis
6867 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6868 (description
6869 "This module provides a portable way of finding out where user data
6870should be stored on various operating systems.")
6871 (license license:expat)))
6872
6873(define-public python2-appdirs
6874 (package-with-python2 python-appdirs))
6875
6876(define-public python-llfuse
6877 (package
6878 (name "python-llfuse")
6879 (version "1.3.5")
6880 (source (origin
6881 (method url-fetch)
6882 (uri (pypi-uri "llfuse" version ".tar.bz2"))
6883 (sha256
6884 (base32
6885 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
6886 (build-system python-build-system)
6887 (inputs
6888 `(("fuse" ,fuse)
6889 ("attr" ,attr)))
6890 (native-inputs
6891 `(("pkg-config" ,pkg-config)))
6892 (synopsis "Python bindings for FUSE")
6893 (description
6894 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6895 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
6896 (license license:lgpl2.0+)
6897 (properties `((python2-variant . ,(delay python2-llfuse))))))
6898
6899(define-public python2-llfuse
6900 (package (inherit (package-with-python2
6901 (strip-python2-variant python-llfuse)))
6902 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6903
6904;; For attic-0.16
6905(define-public python-llfuse-0.41
6906 (package (inherit python-llfuse)
6907 (version "0.41.1")
6908 (source (origin
6909 (method url-fetch)
6910 (uri (string-append
6911 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6912 "llfuse-" version ".tar.bz2"))
6913 (sha256
6914 (base32
6915 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
6916 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6917 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
6918 (license (list license:expat license:lgpl2.0+))))
6919
6920(define-public python-msgpack
6921 (package
6922 (name "python-msgpack")
6923 (version "0.5.6")
6924 (source (origin
6925 (method url-fetch)
6926 (uri (pypi-uri "msgpack" version))
6927 (sha256
6928 (base32
6929 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
6930 (build-system python-build-system)
6931 (arguments
6932 `(#:modules ((guix build utils)
6933 (guix build python-build-system)
6934 (ice-9 ftw)
6935 (srfi srfi-1)
6936 (srfi srfi-26))
6937 #:phases
6938 (modify-phases %standard-phases
6939 (replace 'check
6940 (lambda _
6941 (let ((cwd (getcwd)))
6942 (setenv "PYTHONPATH"
6943 (string-append cwd "/build/"
6944 (find (cut string-prefix? "lib" <>)
6945 (scandir (string-append cwd "/build")))
6946 ":"
6947 (getenv "PYTHONPATH")))
6948 (invoke "pytest" "-v" "test")))))))
6949 (native-inputs
6950 `(("python-pytest" ,python-pytest)))
6951 (synopsis "MessagePack (de)serializer")
6952 (description "MessagePack is a fast, compact binary serialization format,
6953suitable for similar data to JSON. This package provides CPython bindings for
6954reading and writing MessagePack data.")
6955 (home-page "https://pypi.python.org/pypi/msgpack/")
6956 (license license:asl2.0)))
6957
6958;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
6959;; release 0.5. Some packages like borg still call it by the old name for now.
6960;; <https://bugs.gnu.org/30662>
6961(define-public python-msgpack-transitional
6962 (package
6963 (inherit python-msgpack)
6964 (name "python-msgpack-transitional")
6965 (arguments
6966 (substitute-keyword-arguments (package-arguments python-msgpack)
6967 ((#:phases phases)
6968 `(modify-phases ,phases
6969 (add-after 'unpack 'configure-transitional
6970 (lambda _
6971 ;; Keep using the old name.
6972 (substitute* "setup.py"
6973 (("TRANSITIONAL = False")
6974 "TRANSITIONAL = 1"))
6975 #t))))))))
6976
6977(define-public python2-msgpack
6978 (package-with-python2 python-msgpack))
6979
6980(define-public python-netaddr
6981 (package
6982 (name "python-netaddr")
6983 (version "0.7.19")
6984 (source
6985 (origin
6986 (method url-fetch)
6987 (uri (pypi-uri "netaddr" version))
6988 (sha256
6989 (base32
6990 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
6991 (build-system python-build-system)
6992 (arguments `(#:tests? #f)) ;; No tests.
6993 (home-page "https://github.com/drkjam/netaddr/")
6994 (synopsis "Pythonic manipulation of network addresses")
6995 (description
6996 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6997and MAC network addresses.")
6998 (license license:bsd-3)))
6999
7000(define-public python2-netaddr
7001 (package-with-python2 python-netaddr))
7002
dd85eca0
AG
7003(define-public python2-pyroute2
7004 (package
7005 (name "python2-pyroute2")
7006 (version "0.5.6")
7007 (source
7008 (origin
7009 (method url-fetch)
7010 (uri (pypi-uri "pyroute2" version))
7011 (sha256
7012 (base32
7013 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
7014 (build-system python-build-system)
7015 (arguments
7016 `(#:python ,python-2)) ;Python 3.x is not supported
7017 (home-page "https://github.com/svinota/pyroute2")
7018 (synopsis "Python netlink library")
7019 (description
7020 "Pyroute2 is a pure Python netlink library with minimal dependencies.
7021Supported netlink families and protocols include:
7022@itemize
7023@item rtnl, network settings - addresses, routes, traffic controls
7024@item nfnetlink - netfilter API: ipset, nftables, ...
7025@item ipq - simplest userspace packet filtering, iptables QUEUE target
7026@item devlink - manage and monitor devlink-enabled hardware
7027@item generic - generic netlink families
7028 @itemize
7029 @item nl80211 - wireless functions API (basic support)
7030 @item taskstats - extended process statistics
7031 @item acpi_events - ACPI events monitoring
7032 @item thermal_events - thermal events monitoring
7033 @item VFS_DQUOT - disk quota events monitoring
7034 @end itemize
7035@end itemize")
7036 (license license:gpl2+)))
7037
44d10b1f
RW
7038(define-public python-wrapt
7039 (package
7040 (name "python-wrapt")
2271a1dc 7041 (version "1.11.2")
44d10b1f 7042 (source
2271a1dc
MB
7043 (origin
7044 (method url-fetch)
7045 (uri (pypi-uri "wrapt" version))
7046 (sha256
7047 (base32
7048 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
44d10b1f
RW
7049 (build-system python-build-system)
7050 (arguments
7051 ;; Tests are not included in the tarball, they are only available in the
7052 ;; git repository.
7053 `(#:tests? #f))
7054 (home-page "https://github.com/GrahamDumpleton/wrapt")
7055 (synopsis "Module for decorators, wrappers and monkey patching")
7056 (description
2271a1dc 7057 "The aim of the wrapt module is to provide a transparent object proxy for
44d10b1f
RW
7058 Python, which can be used as the basis for the construction of function
7059 wrappers and decorator functions.")
7060 (license license:bsd-2)))
7061
7062(define-public python2-wrapt
7063 (package-with-python2 python-wrapt))
7064
7065(define-public python-xlrd
7066 (package
7067 (name "python-xlrd")
3a2b1a3c 7068 (version "1.2.0")
44d10b1f
RW
7069 (source (origin
7070 (method url-fetch)
7071 (uri (pypi-uri "xlrd" version))
7072 (sha256
7073 (base32
3a2b1a3c 7074 "1ci93fda4n67qhdvfl16zasyxrpygzk53hs6m8z0rd4dxrnb6vjl"))))
44d10b1f
RW
7075 (build-system python-build-system)
7076 (arguments
7077 `(#:phases
7078 (modify-phases %standard-phases
3ccdd3a5
MO
7079 ;; Some tests depend on writing a temporary file to the user's home
7080 ;; directory.
3a2b1a3c
GL
7081 (add-after 'unpack 'fix-tests
7082 (lambda _
7083 (delete-file "tests/test_open_workbook.py")
7084 #t)))))
44d10b1f
RW
7085 (home-page "http://www.python-excel.org/")
7086 (synopsis "Library for extracting data from Excel files")
a0909286 7087 (description "This package provides a library to extract data from
44d10b1f
RW
7088spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
7089@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
7090Unicode-aware. It is not intended as an end-user tool.")
7091 (license license:bsd-3)))
7092
7093(define-public python2-xlrd
7094 (package-with-python2 python-xlrd))
7095
7096(define-public python-prettytable
7097 (package
7098 (name "python-prettytable")
7099 (version "0.7.2")
7100 (source
7101 (origin
7102 (method url-fetch)
337c3a1e 7103 (uri (pypi-uri "prettytable" version ".tar.bz2"))
44d10b1f
RW
7104 (sha256
7105 (base32
7106 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7107 (build-system python-build-system)
7108 (home-page "http://code.google.com/p/prettytable/")
7109 (synopsis "Display tabular data in an ASCII table format")
7110 (description
7111 "A library designed to represent tabular data in visually appealing ASCII
7112tables. PrettyTable allows for selection of which columns are to be printed,
7113independent alignment of columns (left or right justified or centred) and
7114printing of sub-tables by specifying a row range.")
7115 (license license:bsd-3)))
7116
7117(define-public python2-prettytable
7118 (package-with-python2 python-prettytable))
7119
7120(define-public python-tables
7121 (package
7122 (name "python-tables")
7123 (version "3.4.4")
7124 (source
7125 (origin
7126 (method url-fetch)
7127 (uri (pypi-uri "tables" version))
7128 (sha256
7129 (base32
7130 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
7131 (modules '((guix build utils)))
7132 (snippet
7133 '(begin
7134 ;; Remove pre-compiled .pyc files from source.
7135 (for-each delete-file-recursively
7136 (find-files "." "__pycache__" #:directories? #t))
7137 (for-each delete-file (find-files "." "\\.pyc$"))
7138 #t))))
7139 (build-system python-build-system)
7140 (arguments
7141 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7142 ;; or "check", so we must override the build and check phases.
7143 #:phases
7144 (modify-phases %standard-phases
7145 (add-after 'unpack 'use-gcc
7146 (lambda _
7147 (substitute* "setup.py"
7148 (("compiler = new_compiler\\(\\)" line)
7149 (string-append line
7150 "\ncompiler.set_executables(compiler='gcc',"
7151 "compiler_so='gcc',"
7152 "linker_exe='gcc',"
7153 "linker_so='gcc -shared')")))
7154 #t))
7155 (replace 'build
7156 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
7157 (invoke "python" "setup.py" "build"
7158 (string-append "--hdf5="
7159 (assoc-ref inputs "hdf5")))))
44d10b1f
RW
7160 (replace 'check
7161 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
7162 (invoke "python" "setup.py" "check"
7163 (string-append "--hdf5="
7164 (assoc-ref inputs "hdf5"))))))))
44d10b1f
RW
7165 (propagated-inputs
7166 `(("python-numexpr" ,python-numexpr)
7167 ("python-numpy" ,python-numpy)))
7168 (native-inputs
7169 `(("python-cython" ,python-cython)
7170 ("pkg-config" ,pkg-config)))
7171 (inputs
7172 `(("hdf5" ,hdf5)
7173 ("bzip2" ,bzip2)
7174 ("zlib" ,zlib)))
7175 (home-page "http://www.pytables.org/")
7176 (synopsis "Hierarchical datasets for Python")
7177 (description "PyTables is a package for managing hierarchical datasets and
7178designed to efficiently cope with extremely large amounts of data.")
7179 (license license:bsd-3)))
7180
7181(define-public python2-tables
7182 (package-with-python2 python-tables))
7183
7184(define-public python-pyasn1
7185 (package
7186 (name "python-pyasn1")
7187 (version "0.4.3")
7188 (source
7189 (origin
7190 (method url-fetch)
7191 (uri (pypi-uri "pyasn1" version))
7192 (sha256
7193 (base32
7194 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
7195 (build-system python-build-system)
7196 (home-page "http://pyasn1.sourceforge.net/")
7197 (synopsis "ASN.1 types and codecs")
7198 (description
7199 "This is an implementation of ASN.1 types and codecs in Python. It is
7200suitable for a wide range of protocols based on the ASN.1 specification.")
7201 (license license:bsd-2)))
7202
7203(define-public python2-pyasn1
7204 (package-with-python2 python-pyasn1))
7205
7206(define-public python-pyasn1-modules
7207 (package
7208 (name "python-pyasn1-modules")
7209 (version "0.2.2")
7210 (source
7211 (origin
7212 (method url-fetch)
7213 (uri (pypi-uri "pyasn1-modules" version))
7214 (sha256
7215 (base32
7216 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
7217 (build-system python-build-system)
7218 (propagated-inputs
7219 `(("python-pyasn1" ,python-pyasn1)))
7220 (home-page "https://sourceforge.net/projects/pyasn1/")
7221 (synopsis "ASN.1 codec implementations")
7222 (description
7223 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7224implementations of ASN.1-based codecs and protocols.")
7225 (license license:bsd-3)))
7226
7227(define-public python2-pyasn1-modules
7228 (package-with-python2 python-pyasn1-modules))
7229
7230(define-public python-ipaddress
7231 (package
7232 (name "python-ipaddress")
7233 (version "1.0.22")
7234 (source (origin
7235 (method url-fetch)
7236 (uri (pypi-uri "ipaddress" version))
7237 (sha256
7238 (base32
7239 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
7240 (build-system python-build-system)
7241 (home-page "https://github.com/phihag/ipaddress")
7242 (synopsis "IP address manipulation library")
7243 (description
7244 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7245 in Python. This library is used to create, poke at, and manipulate IPv4 and
7246 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7247 module to older versions of Python.")
7248 (license license:psfl)))
7249
7250(define-public python2-ipaddress
7251 (package-with-python2 python-ipaddress))
7252
7253(define-public python2-ipaddr
7254 (package
7255 (name "python2-ipaddr")
7256 (version "2.1.11")
7257 (source
7258 (origin
7259 (method url-fetch)
7260 (uri (pypi-uri "ipaddr" version))
7261 (sha256
7262 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7263 (build-system python-build-system)
7264 (arguments
7265 `(#:python ,python-2 ;version 2 only
7266 #:phases
7267 (modify-phases %standard-phases
7268 (replace 'check
40b8c4e3 7269 (lambda _ (invoke "python" "ipaddr_test.py"))))))
44d10b1f
RW
7270 (home-page "https://github.com/google/ipaddr-py")
7271 (synopsis "IP address manipulation library")
7272 (description
7273 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7274IPv6 addresses and networks.
7275
7276For new implementations you may prefer to use the standard module
7277@code{ipaddress}, which was introduced in Python 3.3 and backported to older
7278versions of Python.")
7279 (license license:asl2.0)))
7280
7281(define-public python-idna
7282 (package
7283 (name "python-idna")
e95c9837 7284 (version "2.8")
44d10b1f
RW
7285 (source
7286 (origin
7287 (method url-fetch)
7288 (uri (pypi-uri "idna" version))
7289 (sha256
7290 (base32
e95c9837 7291 "01rlkigdxg17sf9yar1jl8n18ls59367wqh59hnawlyg53vb6my3"))))
44d10b1f
RW
7292 (build-system python-build-system)
7293 (home-page "https://github.com/kjd/idna")
7294 (synopsis "Internationalized domain names in applications")
7295 (description
7296 "This is a library to support the Internationalised Domain Names in
7297Applications (IDNA) protocol as specified in RFC 5891. This version of the
7298protocol is often referred to as “IDNA2008” and can produce different results
7299from the earlier standard from 2003. The library is also intended to act as a
7300suitable drop-in replacement for the “encodings.idna” module that comes with
7301the Python standard library but currently only supports the older 2003
7302specification.")
7303 (license license:bsd-4)))
7304
a76e6a69
JM
7305(define-public python-idna-2.7
7306 (package (inherit python-idna)
7307 (version "2.7")
7308 (source (origin
7309 (method url-fetch)
7310 (uri (pypi-uri "idna" version))
7311 (sha256
7312 (base32
7313 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
7314
7315
44d10b1f
RW
7316(define-public python2-idna
7317 (package-with-python2 python-idna))
7318
7319(define-public python-idna-ssl
7320 (package
7321 (name "python-idna-ssl")
7322 (version "1.0.1")
7323 (source
7324 (origin
7325 (method url-fetch)
7326 (uri (pypi-uri "idna-ssl" version))
7327 (sha256
7328 (base32
7329 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
7330 (build-system python-build-system)
7331 (arguments
7332 `(#:tests? #f)) ;circular dependency with python-aiohttp
7333 (home-page "https://github.com/aio-libs/idna-ssl")
7334 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
7335 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
7336domains support.")
7337 (license license:expat)))
7338
7339(define-public python-pretend
7340 (package
7341 (name "python-pretend")
7342 (version "1.0.9")
7343 (source
7344 (origin
7345 (method url-fetch)
9f1f22ee 7346 (uri (pypi-uri "pretend" version))
44d10b1f
RW
7347 (sha256
7348 (base32
7349 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
7350 (build-system python-build-system)
7351 (home-page "https://github.com/alex/pretend")
7352 (synopsis "Library for stubbing in Python")
7353 (description
7354 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7355technique for writing tests. You may hear the term mixed up with mocks,
7356fakes, or doubles. Basically, a stub is an object that returns pre-canned
7357responses, rather than doing any computation.")
7358 (license license:bsd-3)))
7359
7360(define-public python2-pretend
7361 (package-with-python2 python-pretend))
7362
7363(define-public python-pip
7364 (package
7365 (name "python-pip")
523ba4b1 7366 (version "19.2.1")
44d10b1f
RW
7367 (source
7368 (origin
7369 (method url-fetch)
7370 (uri (pypi-uri "pip" version))
7371 (sha256
7372 (base32
523ba4b1 7373 "100sd12ss4mbdj5lf3wawad29cm573b27765mq098x6xhcj71395"))))
44d10b1f
RW
7374 (build-system python-build-system)
7375 (arguments
7376 '(#:tests? #f)) ; there are no tests in the pypi archive.
7377 (home-page "https://pip.pypa.io/")
7378 (synopsis "Package manager for Python software")
7379 (description
7380 "Pip is a package manager for Python software, that finds packages on the
7381Python Package Index (PyPI).")
7382 (license license:expat)))
7383
7384(define-public python2-pip
7385 (package-with-python2 python-pip))
7386
7387(define-public python-tlsh
7388 (package
7389 (name "python-tlsh")
7390 (version "3.4.5")
7391 (home-page "https://github.com/trendmicro/tlsh")
3e3ff8ad
TGR
7392 (source
7393 (origin
7394 (method git-fetch)
7395 (uri (git-reference
7396 (url "https://github.com/trendmicro/tlsh.git")
7397 (commit (string-append "v" version))))
7398 (file-name (git-file-name name version))
7399 (sha256
7400 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
44d10b1f
RW
7401 (build-system cmake-build-system)
7402 (arguments
7403 '(#:out-of-source? #f
7404 #:phases (modify-phases %standard-phases
7405 (replace
7406 'install
7407 (lambda* (#:key outputs #:allow-other-keys)
7408 ;; Build and install the Python bindings. The underlying
7409 ;; C++ library is apparently not meant to be installed.
7410 (let ((out (assoc-ref outputs "out")))
7411 (with-directory-excursion "py_ext"
7412 (and (system* "python" "setup.py" "build")
7413 (system* "python" "setup.py" "install"
7414 (string-append "--prefix=" out))))))))))
7415 (inputs `(("python" ,python-wrapper))) ;for the bindings
7416 (synopsis "Fuzzy matching library for Python")
7417 (description
7418 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7419Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7420value which can be used for similarity comparisons. Similar objects have
7421similar hash values, which allows for the detection of similar objects by
7422comparing their hash values. The byte stream should have a sufficient amount
7423of complexity; for example, a byte stream of identical bytes will not generate
7424a hash value.")
7425 (license license:asl2.0)))
7426
7427(define-public python2-tlsh
7428 (package
7429 (inherit python-tlsh)
7430 (name "python2-tlsh")
7431 (inputs `(("python" ,python-2)))))
7432
7433(define-public python-termcolor
7434 (package
7435 (name "python-termcolor")
7436 (version "1.1.0")
7437 (source
7438 (origin
7439 (method url-fetch)
7440 (uri (pypi-uri "termcolor" version))
7441 (sha256
7442 (base32
7443 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7444 (build-system python-build-system)
7445 (arguments
7446 ;; There are no tests.
7447 `(#:tests? #f))
7448 (home-page "https://pypi.python.org/pypi/termcolor")
7449 (synopsis "ANSII Color formatting for terminal output")
7450 (description
7451 "This package provides ANSII Color formatting for output in terminals.")
7452 (license license:expat)))
7453
7454(define-public python2-termcolor
7455 (package-with-python2 python-termcolor))
7456
7457(define-public python-libarchive-c
7458 (package
7459 (name "python-libarchive-c")
7460 (version "2.8")
7461 (source (origin
7462 (method url-fetch)
7463 (uri (pypi-uri "libarchive-c" version))
7464 (sha256
7465 (base32
7466 "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06"))))
7467 (build-system python-build-system)
7468 (arguments
7469 '(#:phases (modify-phases %standard-phases
7470 (add-before
7471 'build 'reference-libarchive
7472 (lambda* (#:key inputs #:allow-other-keys)
7473 ;; Retain the absolute file name of libarchive.so.
7474 (let ((libarchive (assoc-ref inputs "libarchive")))
7475 (substitute* "libarchive/ffi.py"
7476 (("find_library\\('archive'\\)")
7477 (string-append "'" libarchive
7478 "/lib/libarchive.so'"))))))
7479 (replace 'check
7480 (lambda _ (invoke "pytest" "-vv"))))))
7481 (native-inputs
7482 `(("python-mock" ,python-mock)
7483 ("python-pytest" ,python-pytest)))
7484 (inputs
7485 `(("libarchive" ,libarchive)))
7486 (home-page "https://github.com/Changaco/python-libarchive-c")
7487 (synopsis "Python interface to libarchive")
7488 (description
7489 "This package provides Python bindings to libarchive, a C library to
7490access possibly compressed archives in many different formats. It uses
7491Python's @code{ctypes} foreign function interface (FFI).")
7492 (license license:lgpl2.0+)))
7493
7494(define-public python2-libarchive-c
7495 (package-with-python2 python-libarchive-c))
7496
7497(define-public python-file
7498 (package
7499 (inherit file)
7500 (name "python-file")
7501 (build-system python-build-system)
7502 (arguments
7503 '(#:tests? #f ;no tests
7504 #:configure-flags '("--single-version-externally-managed" "--root=/")
7505 #:phases (modify-phases %standard-phases
7506 (add-before 'build 'change-directory
7507 (lambda _
7508 (chdir "python")
7509 #t))
7510 (add-before 'build 'set-library-file-name
7511 (lambda* (#:key inputs #:allow-other-keys)
7512 (let ((file (assoc-ref inputs "file")))
7513 (substitute* "magic.py"
7514 (("find_library\\('magic'\\)")
7515 (string-append "'" file "/lib/libmagic.so'")))
7516 #t))))))
7517 (inputs `(("file" ,file)))
528ea990
LC
7518 (native-inputs (if (%current-target-system)
7519 `(("self" ,this-package))
7520 '()))
44d10b1f
RW
7521 (synopsis "Python bindings to the libmagic file type guesser. Note that
7522this module and the python-magic module both provide a \"magic.py\" file;
7523these two modules, which are different and were developed separately, both
7524serve the same purpose: provide Python bindings for libmagic.")))
7525
7526(define-public python2-file
7527 (package-with-python2 python-file))
7528
7529(define-public python-debian
7530 (package
7531 (name "python-debian")
7532 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
9f74bd31 7533 (version "0.1.36")
44d10b1f
RW
7534 (source
7535 (origin
9f74bd31
VC
7536 ;; Use git-fetch, as pypi doesn't include test suite.
7537 (method git-fetch)
7538 (uri (git-reference
7539 (url home-page)
7540 (commit version)))
7541 (file-name (git-file-name name version))
44d10b1f
RW
7542 (sha256
7543 (base32
9f74bd31 7544 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
44d10b1f 7545 (build-system python-build-system)
9f74bd31
VC
7546 (arguments
7547 `(#:phases (modify-phases %standard-phases
7548 (add-after 'unpack 'remove-debian-specific-tests
7549 ;; python-apt, apt and dpkg are not yet available in guix,
7550 ;; and these tests heavily depend on them.
7551 (lambda _
7552 (delete-file "lib/debian/tests/test_deb822.py")
7553 (delete-file "lib/debian/tests/test_debfile.py")
7554 #t)))))
44d10b1f 7555 (propagated-inputs
9f74bd31
VC
7556 `(("python-six" ,python-six)
7557 ("python-chardet" ,python-chardet)))
44d10b1f
RW
7558 (synopsis "Debian package related modules")
7559 (description
7560 ;; XXX: Use @enumerate instead of @itemize to work around
7561 ;; <http://bugs.gnu.org/21772>.
7562 "This package provides Python modules that abstract many formats of
7563Debian-related files, such as:
7564
7565@enumerate
7566@item Debtags information;
7567@item @file{debian/changelog} files;
7568@item packages files, pdiffs;
7569@item control files of single or multiple RFC822-style paragraphs---e.g.
7570 @file{debian/control}, @file{.changes}, @file{.dsc};
7571@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7572 contained files and meta-information.
7573@end enumerate\n")
7574
7575 ;; Modules are either GPLv2+ or GPLv3+.
7576 (license license:gpl3+)))
7577
7578(define-public python2-debian
7579 (package-with-python2 python-debian))
7580
7581(define-public python-nbformat
7582 (package
7583 (name "python-nbformat")
7584 (version "4.4.0")
7585 (source
7586 (origin
7587 (method url-fetch)
7588 (uri (pypi-uri "nbformat" version))
7589 (sha256
7590 (base32
7591 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
7592 (build-system python-build-system)
7593 (arguments `(#:tests? #f)) ; no test target
7594 (propagated-inputs
7595 `(("python-ipython-genutils" ,python-ipython-genutils)
7596 ("python-jsonschema" ,python-jsonschema)
7597 ("python-jupyter-core" ,python-jupyter-core)
7598 ("python-traitlets" ,python-traitlets)))
7599 (home-page "http://jupyter.org")
7600 (synopsis "Jupyter Notebook format")
7601 (description "This package provides the reference implementation of the
7602Jupyter Notebook format and Python APIs for working with notebooks.")
7603 (license license:bsd-3)))
7604
7605(define-public python2-nbformat
7606 (package-with-python2 python-nbformat))
7607
7608(define-public python-bleach
7609 (package
7610 (name "python-bleach")
ff0efc8f 7611 (version "3.1.0")
44d10b1f
RW
7612 (source
7613 (origin
7614 (method url-fetch)
7615 (uri (pypi-uri "bleach" version))
7616 (sha256
7617 (base32
ff0efc8f 7618 "1yhrgrhkln8bd6gn3imj69g1h4xqah9gaz9q26crqr6gmmvpzprz"))))
44d10b1f
RW
7619 (build-system python-build-system)
7620 (propagated-inputs
ff0efc8f 7621 `(("python-webencodings" ,python-webencodings)
44d10b1f
RW
7622 ("python-six" ,python-six)))
7623 (native-inputs
ff0efc8f
MB
7624 `(("python-pytest" ,python-pytest)
7625 ("python-pytest-runner" ,python-pytest-runner-2)))
44d10b1f
RW
7626 (home-page "https://github.com/jsocol/bleach")
7627 (synopsis "Whitelist-based HTML-sanitizing tool")
7628 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7629 (license license:asl2.0)))
7630
7631(define-public python2-bleach
7632 (package-with-python2 python-bleach))
7633
7634(define-public python-entrypoints
7635 (package
7636 (name "python-entrypoints")
a7f1b718 7637 (version "0.3")
44d10b1f
RW
7638 (source
7639 (origin
7640 (method url-fetch)
a7f1b718 7641 (uri (pypi-uri "entrypoints" version))
44d10b1f
RW
7642 (sha256
7643 (base32
a7f1b718 7644 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
44d10b1f
RW
7645 (build-system python-build-system)
7646 ;; The package does not come with a setup.py file, so we have to generate
7647 ;; one ourselves.
7648 (arguments
7649 `(#:tests? #f
7650 #:phases
7651 (modify-phases %standard-phases
7652 (add-after 'unpack 'create-setup.py
7653 (lambda _
7654 (call-with-output-file "setup.py"
7655 (lambda (port)
7656 (format port "\
7657from setuptools import setup
7658setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7659" ,version))))))))
7660 (home-page "https://github.com/takluyver/entrypoints")
7661 (synopsis "Discover and load entry points from installed Python packages")
7662 (description "Entry points are a way for Python packages to advertise
7663objects with some common interface. The most common examples are
7664@code{console_scripts} entry points, which define shell commands by
7665identifying a Python function to run. The @code{entrypoints} module contains
7666functions to find and load entry points.")
7667 (license license:expat)))
7668
7669(define-public python2-entrypoints
7670 (package-with-python2 python-entrypoints))
7671
7672(define-public python-nbconvert
7673 (package
7674 (name "python-nbconvert")
7675 (version "5.0.0b1")
7676 (source
7677 (origin
7678 (method url-fetch)
7679 (uri (pypi-uri "nbconvert" version))
7680 (sha256
7681 (base32
7682 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7683 (build-system python-build-system)
7684 (arguments
7685 `(;; The "bdist_egg" target is disabled by default, causing the installation
7686 ;; to fail.
7687 #:configure-flags (list "bdist_egg")
7688 ;; FIXME: 5 failures, 40 errors.
7689 #:tests? #f))
7690 ;; #:phases
7691 ;; (modify-phases %standard-phases
7692 ;; (replace 'check
7693 ;; (lambda _
7694 ;; (zero? (system* "py.test" "-v")))))
7695 (native-inputs
7696 `(("python-pytest" ,python-pytest)))
7697 (propagated-inputs
7698 `(("python-bleach" ,python-bleach)
7699 ("python-entrypoints" ,python-entrypoints)
7700 ("python-jinja2" ,python-jinja2)
7701 ("python-jupyter-core" ,python-jupyter-core)
7702 ("python-mistune" ,python-mistune)
7703 ("python-nbformat" ,python-nbformat)
7704 ("python-pygments" ,python-pygments)
7705 ("python-traitlets" ,python-traitlets)))
7706 (home-page "http://jupyter.org")
7707 (synopsis "Converting Jupyter Notebooks")
7708 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7709notebooks to various other formats via Jinja templates. It allows you to
7710convert an @code{.ipynb} notebook file into various static formats including:
7711
7712@enumerate
7713@item HTML
7714@item LaTeX
7715@item PDF
7716@item Reveal JS
7717@item Markdown (md)
7718@item ReStructured Text (rst)
7719@item executable script
7720@end enumerate\n")
7721 (license license:bsd-3)))
7722
7723(define-public python2-nbconvert
7724 (package-with-python2 python-nbconvert))
7725
44d10b1f
RW
7726(define-public python-notebook
7727 (package
7728 (name "python-notebook")
7729 (version "5.7.4")
7730 (source (origin
7731 (method url-fetch)
7732 (uri (pypi-uri "notebook" version))
7733 (sha256
7734 (base32
7735 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
7736 (build-system python-build-system)
7737 (arguments
7738 `(#:phases
7739 (modify-phases %standard-phases
7740 (replace 'check
7741 (lambda _
7742 ;; These tests require a browser
7743 (delete-file-recursively "notebook/tests/selenium")
7744 ;; Some tests need HOME
7745 (setenv "HOME" "/tmp")
7746 ;; This file contains "warningfilters", which are not supported
7747 ;; by this version of nose.
7748 (delete-file "setup.cfg")
7749 (with-directory-excursion "/tmp"
7750 (invoke "nosetests" "-v"))
7751 #t)))))
7752 (propagated-inputs
7753 `(("python-jupyter-core" ,python-jupyter-core)
7754 ("python-nbformat" ,python-nbformat)
7755 ("python-nbconvert" ,python-nbconvert)
7756 ("python-prometheus-client" ,python-prometheus-client)
7757 ("python-send2trash" ,python-send2trash)
7758 ("python-terminado" ,python-terminado)))
7759 (native-inputs
7760 `(("python-nose" ,python-nose)
7761 ("python-sphinx" ,python-sphinx)
7762 ("python-requests" ,python-requests)))
7763 (home-page "http://jupyter.org/")
7764 (synopsis "Web-based notebook environment for interactive computing")
7765 (description
7766 "The Jupyter HTML notebook is a web-based notebook environment for
7767interactive computing.")
7768 (properties `((python2-variant . ,(delay python2-notebook))))
7769 (license license:bsd-3)))
7770
7771(define-public python2-notebook
7772 (let ((base (package-with-python2
7773 (strip-python2-variant python-notebook))))
7774 (package (inherit base)
7775 (native-inputs
7776 `(("python2-mock" ,python2-mock)
7777 ,@(package-native-inputs base)))
7778 (arguments
7779 (substitute-keyword-arguments (package-arguments base)
7780 ((#:phases phases)
7781 `(modify-phases ,phases
7782 (add-before 'check 'disable-test-case
7783 ;; The test requires network access to localhost. Curiously it
7784 ;; fails with Python 2 only. Simply make the test-case return
7785 ;; immediately.
7786 (lambda _
7787 (substitute*
7788 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7789 (("formats = self.nbconvert_api") "return #")))))))))))
7790
7791(define-public python-widgetsnbextension
7792 (package
7793 (name "python-widgetsnbextension")
7794 (version "3.4.2")
7795 (source
7796 (origin
7797 (method url-fetch)
7798 (uri (pypi-uri "widgetsnbextension" version))
7799 (sha256
7800 (base32
7801 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
7802 (build-system python-build-system)
7803 (propagated-inputs
7804 `(("python-ipykernel" ,python-ipykernel)
7805 ("python-notebook" ,python-notebook)))
7806 (native-inputs
7807 `(("python-certifi" ,python-certifi)
7808 ("python-nose" ,python-nose)))
7809 (home-page "https://ipython.org")
7810 (synopsis "IPython HTML widgets for Jupyter")
7811 (description "This package provides interactive HTML widgets for Jupyter
7812notebooks.")
7813 (license license:bsd-3)))
7814
7815(define-public python2-widgetsnbextension
7816 (package-with-python2 python-widgetsnbextension))
7817
7818(define-public python-ipywidgets
7819 (package
7820 (name "python-ipywidgets")
7821 (version "5.2.2")
7822 (source
7823 (origin
7824 (method url-fetch)
7825 (uri (pypi-uri "ipywidgets" version))
7826 (sha256
7827 (base32
7828 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7829 (build-system python-build-system)
7830 (propagated-inputs
7831 `(("python-ipython" ,python-ipython)
7832 ("python-traitlets" ,python-traitlets)
7833 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7834 (native-inputs
7835 `(("python-nose" ,python-nose)
7836 ("python-pytest" ,python-pytest)))
7837 (home-page "https://ipython.org")
7838 (synopsis "IPython HTML widgets for Jupyter")
7839 (description "Ipywidgets are interactive HTML widgets for Jupyter
7840notebooks and the IPython kernel. Notebooks come alive when interactive
7841widgets are used. Users gain control of their data and can visualize changes
7842in the data.")
7843 (license license:bsd-3)))
7844
7845(define-public python2-ipywidgets
7846 (package-with-python2 python-ipywidgets))
7847
7848(define-public python-jupyter-console
7849 (package
7850 (name "python-jupyter-console")
becb9cbf 7851 (version "6.0.0")
44d10b1f
RW
7852 (source
7853 (origin
7854 (method url-fetch)
7855 (uri (pypi-uri "jupyter_console" version))
7856 (sha256
7857 (base32
becb9cbf 7858 "1xdjw11cppf1fxvwkw2bk13ckkwas3bdah8baingn9296mvfi31h"))))
44d10b1f 7859 (build-system python-build-system)
44d10b1f
RW
7860 (propagated-inputs
7861 `(("python-ipykernel" ,python-ipykernel)
7862 ("python-jupyter-client" ,python-jupyter-client)
becb9cbf 7863 ("python-prompt-toolkit" ,python-prompt-toolkit)
44d10b1f
RW
7864 ("python-pygments" ,python-pygments)))
7865 (native-inputs
7866 `(("python-nose" ,python-nose)))
7867 (home-page "https://jupyter.org")
7868 (synopsis "Jupyter terminal console")
7869 (description "This package provides a terminal-based console frontend for
7870Jupyter kernels. It also allows for console-based interaction with non-Python
7871Jupyter kernels such as IJulia and IRKernel.")
7872 (license license:bsd-3)))
7873
7874(define-public python2-jupyter-console
8e590c81
RW
7875 (package
7876 (name "python2-jupyter-console")
7877 (version "5.2.0")
7878 (source
7879 (origin
7880 (method url-fetch)
7881 (uri (pypi-uri "jupyter_console" version))
7882 (sha256
7883 (base32
7884 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
7885 (build-system python-build-system)
7886 ;; Tests only run in an TTY.
7887 (arguments `(#:tests? #f))
7888 (propagated-inputs
7889 `(("python2-ipykernel" ,python2-ipykernel)
7890 ("python2-jupyter-client" ,python2-jupyter-client)
7891 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
7892 ("python2-pygments" ,python2-pygments)))
7893 (native-inputs
7894 `(("python2-nose" ,python2-nose)))
7895 (home-page "https://jupyter.org")
7896 (synopsis "Jupyter terminal console")
7897 (description "This package provides a terminal-based console frontend for
7898Jupyter kernels. It also allows for console-based interaction with non-Python
7899Jupyter kernels such as IJulia and IRKernel.")
7900 (license license:bsd-3)))
44d10b1f
RW
7901
7902;; The python-ipython and python-jupyter-console require each other. To get
7903;; the functionality in both packages working, strip down the
7904;; python-jupyter-console package when using it as an input to python-ipython.
7905(define python-jupyter-console-minimal
7906 (package
7907 (inherit python-jupyter-console)
7908 (name "python-jupyter-console-minimal")
7909 (arguments
7910 (substitute-keyword-arguments
7911 (package-arguments python-jupyter-console)
7912 ((#:phases phases)
7913 `(modify-phases ,phases
7914 (add-after 'install 'delete-bin
7915 (lambda* (#:key outputs #:allow-other-keys)
7916 ;; Delete the bin files, to avoid conflicts in profiles
7917 ;; where python-ipython and python-jupyter-console are
7918 ;; both present.
7919 (delete-file-recursively
7920 (string-append
7921 (assoc-ref outputs "out") "/bin"))))))))
7922 ;; Remove the python-ipython propagated input, to avoid the cycle
7923 (propagated-inputs
7924 (alist-delete
7925 "python-ipython"
7926 (package-propagated-inputs python-jupyter-console)))))
7927
7928(define-public python-qtconsole
7929 (package
7930 (name "python-qtconsole")
7931 (version "4.4.3")
7932 (source
7933 (origin
7934 (method url-fetch)
7935 (uri (pypi-uri "qtconsole" version))
7936 (sha256
7937 (base32
7938 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
7939 (build-system python-build-system)
7940 (arguments
7941 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
7942 ;; but we only have the LTS version 5.x. This means that there might be
7943 ;; runtime errors, but since this is a dependency of the Jupyter package,
7944 ;; and Jupyter can be used without the qtconsole we can overlook this for
7945 ;; now.
7946 `(#:tests? #f
7947 #:phases
7948 (modify-phases %standard-phases
7949 (add-before 'check 'pre-check
7950 (lambda _
7951 (setenv "QT_QPA_PLATFORM" "offscreen")
7952 #t)))))
7953 (propagated-inputs
7954 `(("python-ipykernel" ,python-ipykernel)
7955 ("python-ipython" ,python-ipython)))
7956 (native-inputs
7957 `(("python-pytest" ,python-pytest)))
7958 (home-page "http://jupyter.org")
7959 (synopsis "Jupyter Qt console")
7960 (description "This package provides a Qt-based console for Jupyter with
7961support for rich media output.")
7962 (license license:bsd-3)))
7963
6ec87223
VC
7964(define-public python-jsbeautifier
7965 (package
7966 (name "python-jsbeautifier")
7967 (version "1.10.2")
7968 (home-page "https://github.com/beautify-web/js-beautify")
7969 (source (origin
7970 (method git-fetch)
7971 (uri (git-reference
7972 (url home-page)
7973 (commit (string-append "v" version))))
7974 (file-name (git-file-name name version))
7975 (sha256
7976 (base32
7977 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
7978 (build-system python-build-system)
7979 (arguments
7980 `(#:phases (modify-phases %standard-phases
7981 (add-after 'unpack 'chdir
7982 (lambda _
7983 ;; The upstream Git repository contains all the code,
7984 ;; but this package only builds the python code.
7985 (chdir "python")
7986 #t))
7987 (add-after 'unpack 'patch-python-six-requirements
7988 (lambda _
7989 (substitute* "python/setup.py"
7990 (("six>=1.12.0")
7991 "six>=1.11.0"))
7992 #t)))))
7993 (propagated-inputs
7994 `(("python-editorconfig" ,python-editorconfig)
7995 ("python-six" ,python-six)))
7996 (native-inputs
7997 `(("python-pytest" ,python-pytest)))
7998 (synopsis "JavaScript unobfuscator and beautifier")
7999 (description "Beautify, unpack or deobfuscate JavaScript, leveraging
8000popular online obfuscators.")
8001 (license license:expat)))
8002
44d10b1f
RW
8003(define-public jupyter
8004 (package
8005 (name "jupyter")
8006 (version "1.0.0")
8007 (source
8008 (origin
8009 (method url-fetch)
8010 (uri (pypi-uri "jupyter" version))
8011 (sha256
8012 (base32
8013 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
8014 (build-system python-build-system)
8015 (arguments '(#:tests? #f)) ; there are none.
8016 (propagated-inputs
8017 `(("python-ipykernel" ,python-ipykernel)
8018 ("python-ipywidgets" ,python-ipywidgets)
8019 ("python-jupyter-console" ,python-jupyter-console)
8020 ("python-nbconvert" ,python-nbconvert)
8021 ("python-notebook" ,python-notebook)
8022 ("python-qtconsole" ,python-qtconsole)))
8023 (native-search-paths
8024 (list (search-path-specification
8025 (variable "JUPYTER_PATH")
8026 (files '("share/jupyter")))))
8027 (home-page "https://jupyter.org")
8028 (synopsis "Web application for interactive documents")
8029 (description
8030 "The Jupyter Notebook is a web application that allows you to create and
8031share documents that contain live code, equations, visualizations and
8032explanatory text. Uses include: data cleaning and transformation, numerical
8033simulation, statistical modeling, machine learning and much more.")
8034 (license license:bsd-3)))
8035
8036(define-public python-chardet
8037 (package
8038 (name "python-chardet")
8039 (version "3.0.4")
8040 (source
8041 (origin
8042 (method url-fetch)
8043 (uri (pypi-uri "chardet" version))
8044 (sha256
8045 (base32
8046 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
8047 (native-inputs
8048 `(("python-hypothesis" ,python-hypothesis)
8049 ("python-pytest" ,python-pytest)
8050 ("python-pytest-runner" ,python-pytest-runner)))
8051 (build-system python-build-system)
3d369407
MB
8052 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
8053 (arguments `(#:tests? #f))
44d10b1f
RW
8054 (home-page "https://github.com/chardet/chardet")
8055 (synopsis "Universal encoding detector for Python 2 and 3")
8056 (description
8057 "This package provides @code{chardet}, a Python module that can
8058automatically detect a wide range of file encodings.")
8059 (license license:lgpl2.1+)))
8060
8061(define-public python2-chardet
8062 (package-with-python2 python-chardet))
8063
8064(define-public python-docopt
8065 (package
8066 (name "python-docopt")
8067 (version "0.6.2")
8068 (source
8069 (origin
11e46326 8070 (method git-fetch)
44d10b1f 8071 ;; The release on PyPI does not include tests.
11e46326
EF
8072 (uri (git-reference
8073 (url "https://github.com/docopt/docopt")
8074 (commit version)))
8075 (file-name (git-file-name name version))
44d10b1f
RW
8076 (sha256
8077 (base32
11e46326 8078 "0aad9gbswnnhssin2q0m5lmpm0ahyf80ahs2zjigbn5y7fvljnd0"))))
44d10b1f
RW
8079 (build-system python-build-system)
8080 (native-inputs
8081 `(("python-pytest" ,python-pytest)))
8082 (arguments
8083 `(#:phases
8084 (modify-phases %standard-phases
8085 (replace 'check
8086 (lambda _ (invoke "py.test"))))))
8087 (home-page "http://docopt.org")
8088 (synopsis "Command-line interface description language for Python")
8089 (description "This library allows the user to define a command-line
8090interface from a program's help message rather than specifying it
4ca7207b 8091programmatically with command-line parsers like @code{getopt} and
44d10b1f
RW
8092@code{argparse}.")
8093 (license license:expat)))
8094
8095(define-public python2-docopt
8096 (package-with-python2 python-docopt))
8097
8098(define-public python-pythondialog
8099 (package
8100 (name "python-pythondialog")
8101 (version "3.4.0")
8102 (source
8103 (origin
8104 (method url-fetch)
8105 (uri (pypi-uri "pythondialog" version))
8106 (sha256
8107 (base32
8108 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
8109 (build-system python-build-system)
8110 (arguments
8111 `(#:phases
8112 (modify-phases %standard-phases
8113 (add-after 'unpack 'patch-path
8114 (lambda* (#:key inputs #:allow-other-keys)
8115 (let* ((dialog (assoc-ref inputs "dialog")))
8116 ;; Since this library really wants to grovel the search path, we
8117 ;; must hardcode dialog's store path into it.
8118 (substitute* "dialog.py"
8119 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8120 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8121 #t))))
8122 #:tests? #f)) ; no test suite
8123 (propagated-inputs
8124 `(("dialog" ,dialog)))
8125 (home-page "http://pythondialog.sourceforge.net/")
8126 (synopsis "Python interface to the UNIX dialog utility")
8127 (description "A Python wrapper for the dialog utility. Its purpose is to
8128provide an easy to use, pythonic and comprehensive Python interface to dialog.
8129This allows one to make simple text-mode user interfaces on Unix-like systems")
8130 (license license:lgpl2.1)
8131 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8132
8133(define-public python2-pythondialog
8134 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8135 (package
8136 (inherit base)
8137 (version (package-version python-pythondialog))
8138 (source (origin
8139 (method url-fetch)
8140 (uri (pypi-uri "python2-pythondialog" version))
8141 (sha256
8142 (base32
8143 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
8144
8145(define-public python-configobj
8146 (package
8147 (name "python-configobj")
8148 (version "5.0.6")
8149 (source (origin
8150 (method url-fetch)
b0758fbb 8151 (uri (pypi-uri "configobj" version))
44d10b1f
RW
8152 (sha256
8153 (base32
8154 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8155 ;; Patch setup.py so it looks for python-setuptools, which is
8156 ;; required to parse the keyword 'install_requires' in setup.py.
8157 (patches (search-patches "python-configobj-setuptools.patch"))))
8158 (build-system python-build-system)
8159 (propagated-inputs
8160 `(("python-six" ,python-six)))
8161 (synopsis "Config file reading, writing and validation")
8162 (description "ConfigObj is a simple but powerful config file reader and
8163writer: an ini file round tripper. Its main feature is that it is very easy to
8164use, with a straightforward programmer’s interface and a simple syntax for
8165config files.")
8166 (home-page "https://github.com/DiffSK/configobj")
8167 (license license:bsd-3)))
8168
8169(define-public python2-configobj
8170 (package-with-python2 python-configobj))
8171
8172(define-public python-configargparse
8173 (package
8174 (name "python-configargparse")
86ae491f 8175 (version "0.14.0")
44d10b1f
RW
8176 (source (origin
8177 (method url-fetch)
8178 (uri (pypi-uri "ConfigArgParse" version))
8179 (sha256
8180 (base32
86ae491f 8181 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
44d10b1f
RW
8182 (build-system python-build-system)
8183 (native-inputs
8184 `(("python-pyyaml" ,python-pyyaml)))
8185 (arguments
8186 `(#:phases
8187 (modify-phases %standard-phases
8188 (replace 'check
8189 (lambda _
8190 ;; Bypass setuptools-shim because one test relies on "setup.py"
8191 ;; being the first argument passed to the python call.
8192 ;;
8193 ;; NOTE: Many tests do not run because they rely on Python's
8194 ;; built-in test.test_argparse, but we remove the unit tests from
8195 ;; our Python installation.
8196 (invoke "python" "setup.py" "test"))))))
8197 (synopsis "Replacement for argparse")
8198 (description "A drop-in replacement for argparse that allows options to also
8199be set via config files and/or environment variables.")
8200 (home-page "https://github.com/bw2/ConfigArgParse")
8201 (license license:expat)))
8202
8203(define-public python2-configargparse
8204 (package-with-python2 python-configargparse))
8205
8206(define-public python-argparse-manpage
8207 (package
8208 (name "python-argparse-manpage")
8209 (version "1.1")
8210 (source
8211 (origin
8212 (method url-fetch)
8213 (uri (pypi-uri "argparse-manpage" version))
8214 (sha256
8215 (base32
8216 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
8217 (build-system python-build-system)
8218 (home-page "https://github.com/praiskup/argparse-manpage")
8219 (synopsis "Build manual page from Python's ArgumentParser object")
8220 (description
8221 "This package provides tools to build manual pages from Python's
8222@code{ArgumentParser} object.")
8223 (license license:asl2.0)))
8224
3e8f76d8
RW
8225(define-public python-contextlib2
8226 (package
8227 (name "python-contextlib2")
8228 (version "0.5.5")
8229 (source
8230 (origin
8231 (method url-fetch)
8232 (uri (pypi-uri "contextlib2" version))
8233 (sha256
8234 (base32
8235 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8236 (build-system python-build-system)
8237 (home-page "http://contextlib2.readthedocs.org/")
8238 (synopsis "Tools for decorators and context managers")
8239 (description "This module is primarily a backport of the Python
82403.2 contextlib to earlier Python versions. Like contextlib, it
8241provides utilities for common tasks involving decorators and context
8242managers. It also contains additional features that are not part of
8243the standard library.")
1e158ba1 8244 (properties `((python2-variant . ,(delay python2-contextlib2))))
3e8f76d8
RW
8245 (license license:psfl)))
8246
44d10b1f 8247(define-public python2-contextlib2
1e158ba1
EF
8248 (let ((base (package-with-python2
8249 (strip-python2-variant python-contextlib2))))
8250 (package
8251 (inherit base)
8252 (arguments
8253 (substitute-keyword-arguments (package-arguments base)
8254 ((#:phases phases)
8255 `(modify-phases ,phases
8256 (replace 'check
8257 (lambda _ (invoke "python" "test_contextlib2.py" "-v")))))))
8258 (native-inputs
8259 `(("python2-unittest2" ,python2-unittest2))))))
44d10b1f
RW
8260
8261(define-public python-texttable
8262 (package
8263 (name "python-texttable")
52cc4892 8264 (version "0.9.1")
44d10b1f
RW
8265 (source
8266 (origin
8267 (method url-fetch)
8268 (uri (pypi-uri "texttable" version))
8269 (sha256
8270 (base32
52cc4892 8271 "0yawv64c0zbawwv6zz84whb32fnb2n9jylwjcfsrcdgh7xvl340i"))))
44d10b1f
RW
8272 (build-system python-build-system)
8273 (arguments '(#:tests? #f)) ; no tests
8274 (home-page "https://github.com/foutaise/texttable/")
8275 (synopsis "Python module for creating simple ASCII tables")
8276 (description "Texttable is a Python module for creating simple ASCII
8277tables.")
8278 (license license:lgpl2.1+)))
8279
8280(define-public python2-texttable
8281 (package-with-python2 python-texttable))
8282
8283(define-public python-atomicwrites
8284 (package
8285 (name "python-atomicwrites")
14f10479 8286 (version "1.3.0")
44d10b1f
RW
8287 (source (origin
8288 (method url-fetch)
8289 (uri (pypi-uri "atomicwrites" version))
8290 (sha256
8291 (base32
14f10479 8292 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
44d10b1f
RW
8293 (build-system python-build-system)
8294 (synopsis "Atomic file writes in Python")
8295 (description "Library for atomic file writes using platform dependent tools
8296for atomic file system operations.")
8297 (home-page "https://github.com/untitaker/python-atomicwrites")
8298 (license license:expat)))
8299
8300(define-public python2-atomicwrites
8301 (package-with-python2 python-atomicwrites))
8302
8303(define-public python-click-threading
8304 (package
8305 (name "python-click-threading")
8306 (version "0.4.4")
8307 (source (origin
8308 (method url-fetch)
8309 (uri (pypi-uri "click-threading" version))
8310 (sha256
8311 (base32
8312 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
8313 (build-system python-build-system)
8314 (propagated-inputs
8315 `(("python-click" ,python-click)))
8316 (synopsis "Utilities for multithreading in Click")
8317 (description "This package provides utilities for multithreading in Click
8318applications.")
8319 (home-page "https://github.com/click-contrib/click-threading")
8320 (license license:expat)))
8321
8322(define-public python-click-log
8323 (package
8324 (name "python-click-log")
8325 (version "0.3.2")
8326 (source (origin
8327 (method url-fetch)
8328 (uri (pypi-uri "click-log" version))
8329 (sha256
8330 (base32
8331 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
8332 (build-system python-build-system)
8333 (propagated-inputs
8334 `(("python-click" ,python-click)))
8335 (synopsis "Logging for click applications")
8336 (description "This package provides a Python library for logging Click
8337applications.")
8338 (home-page "https://github.com/click-contrib/click-log")
8339 (license license:expat)))
8340
8341(define-public python-apipkg
8342 (package
8343 (name "python-apipkg")
8344 (version "1.4")
8345 (source (origin
8346 (method url-fetch)
8347 (uri (pypi-uri "apipkg" version))
8348 (sha256
8349 (base32
8350 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8351 (build-system python-build-system)
8352 (native-inputs
8353 `(("python-pytest" ,python-pytest)))
8354 (synopsis "Namespace control and lazy-import mechanism")
8355 (description "With apipkg you can control the exported namespace of a Python
8356package and greatly reduce the number of imports for your users. It is a small
8357pure Python module that works on virtually all Python versions.")
8358 (home-page "https://github.com/pytest-dev/apipkg")
8359 (license license:expat)))
8360
8361(define-public python2-apipkg
8362 (package-with-python2 python-apipkg))
8363
8364(define-public python-execnet
8365 (package
8366 (name "python-execnet")
8367 (version "1.4.1")
8368 (source (origin
8369 (method url-fetch)
8370 (uri (pypi-uri "execnet" version))
8371 (sha256
8372 (base32
8373 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8374 (build-system python-build-system)
8375 (arguments
8376 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8377 ;; The two test failures are caused by the lack of an `ssh` executable.
8378 ;; The test suite can be run with pytest after the 'install' phase.
8379 #:tests? #f))
8380 (native-inputs
8381 `(("python-pytest" ,python-pytest)
8382 ("python-setuptools-scm" ,python-setuptools-scm)))
8383 (propagated-inputs
8384 `(("python-apipkg" ,python-apipkg)))
8385 (synopsis "Rapid multi-Python deployment")
8386 (description "Execnet provides a share-nothing model with
8387channel-send/receive communication for distributing execution across many
8388Python interpreters across version, platform and network barriers. It has a
8389minimal and fast API targeting the following uses:
8390@enumerate
8391@item distribute tasks to (many) local or remote CPUs
8392@item write and deploy hybrid multi-process applications
8393@item write scripts to administer multiple environments
8394@end enumerate")
8395 (home-page "http://codespeak.net/execnet/")
8396 (license license:expat)))
8397
8398(define-public python2-execnet
8399 (package-with-python2 python-execnet))
8400
8401(define-public python-icalendar
8402 (package
8403 (name "python-icalendar")
43ae8f79 8404 (version "4.0.4")
44d10b1f
RW
8405 (source (origin
8406 (method url-fetch)
8407 (uri (pypi-uri "icalendar" version))
8408 (sha256
8409 (base32
43ae8f79 8410 "16gjvqv0n05jrb9g228pdjgzd3amz2pdhvcgsn1jypszjg5m2w9l"))))
44d10b1f
RW
8411 (build-system python-build-system)
8412 (propagated-inputs
8413 `(("python-dateutil" ,python-dateutil)
8414 ("python-pytz" ,python-pytz)))
8415 (synopsis "Python library for parsing iCalendar files")
8416 (description "The icalendar package is a parser/generator of iCalendar
8417files for use with Python.")
8418 (home-page "https://github.com/collective/icalendar")
8419 (license license:bsd-2)))
8420
44d10b1f
RW
8421(define-public python-args
8422 (package
8423 (name "python-args")
8424 (version "0.1.0")
8425 (source (origin
8426 (method url-fetch)
8427 (uri (pypi-uri "args" version))
8428 (sha256
8429 (base32
8430 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8431 (build-system python-build-system)
8432 (home-page "https://github.com/kennethreitz/args")
8433 (synopsis "Command-line argument parser")
8434 (description
8435 "This library provides a Python module to parse command-line arguments.")
8436 (license license:bsd-3)))
8437
8438(define-public python2-args
8439 (package-with-python2 python-args))
8440
8441(define-public python-clint
8442 (package
8443 (name "python-clint")
8444 (version "0.5.1")
8445 (source (origin
8446 (method url-fetch)
8447 (uri (pypi-uri "clint" version))
8448 (sha256
8449 (base32
8450 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8451 (build-system python-build-system)
8452 (arguments
8453 '(#:phases
8454 (modify-phases %standard-phases
8455 (replace 'check
8456 (lambda _ (invoke "py.test" "-v"))))))
8457 (native-inputs
8458 `(("python-pytest" ,python-pytest)))
8459 (propagated-inputs
8460 `(("python-args" ,python-args)))
8461 (home-page "https://github.com/kennethreitz/clint")
8462 (synopsis "Command-line interface tools")
8463 (description
8464 "Clint is a Python module filled with a set of tools for developing
8465command-line applications, including tools for colored and indented
8466output, progress bar display, and pipes.")
8467 (license license:isc)))
8468
8469(define-public python2-clint
8470 (package-with-python2 python-clint))
8471
44d10b1f
RW
8472(define-public python-rply
8473 (package
8474 (name "python-rply")
8475 (version "0.7.5")
8476 (source (origin
8477 (method url-fetch)
8478 (uri (pypi-uri "rply" version))
8479 (sha256
8480 (base32
8481 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
8482 (build-system python-build-system)
8483 (propagated-inputs
8484 `(("python-appdirs" ,python-appdirs)))
8485 (home-page "https://github.com/alex/rply")
8486 (synopsis "Parser generator for Python")
8487 (description
8488 "This package provides a pure Python based parser generator, that also
8489works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8490with a new public API, and RPython support.")
8491 (license license:bsd-3)))
8492
8493(define-public python2-rply
8494 (package-with-python2 python-rply))
8495
8496(define-public python-hy
8497 (package
8498 (name "python-hy")
c215051d 8499 (version "0.17.0")
44d10b1f
RW
8500 (source (origin
8501 (method url-fetch)
8502 (uri (pypi-uri "hy" version))
8503 (sha256
8504 (base32
c215051d 8505 "1gdbqsirsdxj320wnp7my5awzs1kfs6m4fqmkzbd1zd47qzj0zfi"))))
44d10b1f
RW
8506 (build-system python-build-system)
8507 (arguments
8508 '(#:phases
8509 (modify-phases %standard-phases
6ba6a1c1
JG
8510 (add-before 'install 'set-HOME
8511 (lambda _
8512 (setenv "HOME" "/tmp")))
44d10b1f
RW
8513 (replace 'check
8514 (lambda _
8515 ;; Tests require write access to HOME.
8516 (setenv "HOME" "/tmp")
8517 (invoke "nosetests"))))))
8518 (native-inputs
8519 `(("python-coverage" ,python-coverage)
8520 ("python-nose" ,python-nose)))
8521 (propagated-inputs
8522 `(("python-astor" ,python-astor)
8523 ("python-clint" ,python-clint)
c215051d
JG
8524 ("python-rply" ,python-rply)
8525 ("python-fastentrypoints"
8526 ,python-fastentrypoints)
8527 ("python-funcparserlib"
8528 ,python-funcparserlib)))
44d10b1f
RW
8529 (home-page "http://hylang.org/")
8530 (synopsis "Lisp frontend to Python")
8531 (description
8532 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8533its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8534Python at your fingertips, in Lisp form.")
8535 (license license:expat)))
8536
8537(define-public python2-hy
8538 (package-with-python2 python-hy))
8539
8540(define-public python2-functools32
8541 (package
8542 (name "python2-functools32")
8543 (version "3.2.3-2")
8544 (source
8545 (origin
8546 (method url-fetch)
8547 (uri (pypi-uri "functools32" version))
8548 (sha256
8549 (base32
8550 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8551 (build-system python-build-system)
8552 (arguments
8553 `(#:python ,python-2
8554 #:tests? #f)) ; no test target
8555 (home-page "https://github.com/MiCHiLU/python-functools32")
8556 (synopsis
8557 "Backport of the functools module from Python 3.2.3")
8558 (description
8559 "This package is a backport of the @code{functools} module from Python
85603.2.3 for use with older versions of Python and PyPy.")
8561 (license license:expat)))
8562
8563(define-public python2-subprocess32
8564 (package
8565 (name "python2-subprocess32")
8566 (version "3.2.7")
8567 (source (origin
8568 (method url-fetch)
8569 (uri (pypi-uri "subprocess32" version))
8570 (sha256
8571 (base32
8572 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
8573 (patches
8574 (search-patches "python2-subprocess32-disable-input-test.patch"))))
8575 (build-system python-build-system)
8576 (arguments
8577 `(#:python ,python-2
8578 ;; The test suite fails with Python > 2.7.13:
8579 ;; import test.support
8580 ;; ImportError: No module named support
8581 #:tests? #f
8582 #:phases
8583 (modify-phases %standard-phases
8584 (add-after 'unpack 'patch-/bin/sh
8585 (lambda _
8586 (substitute* '("subprocess32.py"
8587 "test_subprocess32.py")
8588 (("/bin/sh") (which "sh")))
8589 #t)))))
8590 (home-page "https://github.com/google/python-subprocess32")
8591 (synopsis "Backport of the subprocess module from Python 3.2")
8592 (description
8593 "This is a backport of the @code{subprocess} standard library module
8594from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
8595new features. On POSIX systems it is guaranteed to be reliable when used
8596in threaded applications. It includes timeout support from Python 3.3 but
8597otherwise matches 3.2’s API.")
8598 (license license:psfl)))
8599
8600(define-public python2-futures
8601 (package
8602 (name "python2-futures")
8603 (version "3.2.0")
8604 (source
8605 (origin
8606 (method url-fetch)
8607 (uri (pypi-uri "futures" version))
8608 (sha256
8609 (base32
8610 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
8611 (build-system python-build-system)
ba88eea2
RW
8612 (arguments
8613 `(#:python ,python-2
8614 #:phases
8615 (modify-phases %standard-phases
8616 (replace 'check
8617 (lambda _
8618 (invoke "python" "test_futures.py")
8619 #t)))))
44d10b1f
RW
8620 (home-page "https://github.com/agronholm/pythonfutures")
8621 (synopsis
8622 "Backport of the concurrent.futures package from Python 3.2")
8623 (description
8624 "The concurrent.futures module provides a high-level interface for
8625asynchronously executing callables. This package backports the
8626concurrent.futures package from Python 3.2")
8627 (license license:bsd-3)))
8628
8629(define-public python-promise
8630 (package
8631 (name "python-promise")
8632 (version "0.4.2")
8633 (source
8634 (origin
8635 (method url-fetch)
8636 (uri (pypi-uri "promise" version))
8637 (sha256
8638 (base32
8639 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8640 (build-system python-build-system)
8641 ;; Tests wants python-futures, which is a python2 only program, and
8642 ;; can't be found by python-promise at test time.
8643 (arguments `(#:tests? #f))
8644 (home-page "https://github.com/syrusakbary/promise")
8645 (synopsis "Promises/A+ implementation for Python")
8646 (description
8647 "Promises/A+ implementation for Python")
8648 (properties `((python2-variant . ,(delay python2-promise))))
8649 (license license:expat)))
8650
8651(define-public python2-promise
8652 (let ((promise (package-with-python2
8653 (strip-python2-variant python-promise))))
8654 (package (inherit promise)
8655 (arguments (substitute-keyword-arguments (package-arguments promise)
8656 ((#:tests? _) #t)))
8657 (native-inputs
8658 `(("python2-futures" ,python2-futures)
8659 ("python2-pytest" ,python2-pytest)
8660 ,@(package-native-inputs promise))))))
8661
d71d85cd
RW
8662(define-public python-progressbar33
8663 (package
8664 (name "python-progressbar33")
8665 (version "2.4")
8666 (source
8667 (origin
8668 (method url-fetch)
8669 (uri (pypi-uri "progressbar33" version))
8670 (sha256
8671 (base32
8672 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
8673 (build-system python-build-system)
8674 (home-page "http://github.com/germangh/python-progressbar")
8675 (synopsis "Text progress bar library for Python")
8676 (description
8677 "This package provides a text progress bar library for Python. This
8678version only differs from the original @code{progressbar} package in that it
8679uses relative package imports instead of absolute imports, which is necessary
8680for the module to work under Python 3.3.")
8681 ;; Either or both of these licenses may be selected.
8682 (license (list license:lgpl2.1+ license:bsd-3))))
8683
44d10b1f
RW
8684(define-public python-colorama
8685 (package
8686 (name "python-colorama")
8687 (version "0.3.9")
8688 (source
8689 (origin
8690 (method url-fetch)
8691 (uri (pypi-uri "colorama" version))
8692 (sha256
8693 (base32
8694 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
8695 (build-system python-build-system)
8696 (synopsis "Colored terminal text rendering for Python")
8697 (description "Colorama is a Python library for rendering colored terminal
8698text.")
8699 (home-page "https://pypi.python.org/pypi/colorama")
8700 (license license:bsd-3)))
8701
8702(define-public python2-colorama
8703 (package-with-python2 python-colorama))
8704
8705(define-public python-rsa
8706 (package
8707 (name "python-rsa")
8708 (version "3.4.2")
8709 (source
8710 (origin
8711 (method url-fetch)
8712 (uri (pypi-uri "rsa" version))
8713 (sha256
8714 (base32
8715 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
8716 (build-system python-build-system)
8717 (propagated-inputs
8718 `(("python-pyasn1" ,python-pyasn1)))
8719 (synopsis "Pure-Python RSA implementation")
8720 (description "Python-RSA is a pure-Python RSA implementation. It supports
8721encryption and decryption, signing and verifying signatures, and key
8722generation according to PKCS#1 version 1.5. It can be used as a Python
8723library as well as on the command line.")
8724 (home-page "https://stuvel.eu/rsa")
8725 (license license:asl2.0)))
8726
8727(define-public python2-rsa
8728 (package-with-python2 python-rsa))
8729
8730(define-public python-pluggy
8731 (package
8732 (name "python-pluggy")
e5731c03 8733 (version "0.11.0")
44d10b1f
RW
8734 (source
8735 (origin
8736 (method url-fetch)
8737 (uri (pypi-uri "pluggy" version))
8738 (sha256
8739 (base32
e5731c03 8740 "10511a54dvafw1jrk75mrhml53c7b7w4yaw7241696lc2hfvr895"))))
44d10b1f
RW
8741 (build-system python-build-system)
8742 (native-inputs
8743 `(("python-setuptools-scm" ,python-setuptools-scm)))
8744 (synopsis "Plugin and hook calling mechanism for Python")
8745 (description "Pluggy is an extraction of the plugin manager as used by
8746Pytest but stripped of Pytest specific details.")
8747 (home-page "https://pypi.python.org/pypi/pluggy")
8748 (license license:expat)))
8749
8750(define-public python2-pluggy
8751 (package-with-python2 python-pluggy))
8752
8753(define-public python-tox
8754 (package
8755 (name "python-tox")
8756 (version "2.8.1")
8757 (source
8758 (origin
8759 (method url-fetch)
8760 (uri (pypi-uri "tox" version))
8761 (sha256
8762 (base32
8763 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
8764 (build-system python-build-system)
8765 (arguments
8766 ;; FIXME: Tests require pytest-timeout, which itself requires
8767 ;; pytest>=2.8.0 for installation.
8768 '(#:tests? #f))
8769 (propagated-inputs
8770 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
8771 ("python-py" ,python-py)
8772 ("python-virtualenv" ,python-virtualenv)))
8773 (native-inputs
8774 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
8775 ("python-pytest" ,python-pytest) ; >= 2.3.5
8776 ("python-setuptools-scm" ,python-setuptools-scm)))
8777 (home-page "http://tox.testrun.org/")
8778 (synopsis "Virtualenv-based automation of test activities")
8779 (description "Tox is a generic virtualenv management and test command line
8780tool. It can be used to check that a package installs correctly with
8781different Python versions and interpreters, or run tests in each type of
8782supported environment, or act as a frontend to continuous integration
8783servers.")
8784 (license license:expat)))
8785
8786(define-public python2-tox
8787 (package-with-python2 python-tox))
8788
8789(define-public python-jmespath
8790 (package
8791 (name "python-jmespath")
27fb781f 8792 (version "0.9.4")
44d10b1f
RW
8793 (source
8794 (origin
8795 (method url-fetch)
8796 (uri (pypi-uri "jmespath" version))
8797 (sha256
8798 (base32
27fb781f 8799 "0k0765x1mybcrzajh3hiqkl8sy9hs0bmn4900frxy0j3ykvaxqmx"))))
44d10b1f
RW
8800 (build-system python-build-system)
8801 (native-inputs
8802 `(("python-nose" ,python-nose)))
8803 (synopsis "JSON Matching Expressions")
8804 (description "JMESPath (pronounced “james path”) is a Python library that
8805allows one to declaratively specify how to extract elements from a JSON
8806document.")
8807 (home-page "https://github.com/jmespath/jmespath.py")
8808 (license license:expat)))
8809
8810(define-public python2-jmespath
8811 (package-with-python2 python-jmespath))
8812
8813(define-public python-botocore
8814 (package
7bcf827c
RW
8815 (name "python-botocore")
8816 (version "1.12.149")
8817 (source
8818 (origin
8819 (method url-fetch)
8820 (uri (pypi-uri "botocore" version))
8821 (sha256
8822 (base32
8823 "12597f74khp3ngwr282cb949w0gcqj20rkfc3x275dijavyy5cmf"))))
8824 (build-system python-build-system)
8825 (arguments
8826 ;; FIXME: Many tests are failing.
8827 '(#:tests? #f))
8828 (propagated-inputs
8829 `(("python-dateutil" ,python-dateutil)
8830 ("python-docutils" ,python-docutils)
8831 ("python-jmespath" ,python-jmespath)))
8832 (native-inputs
8833 `(("python-mock" ,python-mock)
8834 ("python-nose" ,python-nose)
8835 ("behave" ,behave)
8836 ("python-tox" ,python-tox)
8837 ("python-urllib3" ,python-urllib3)
8838 ("python-wheel" ,python-wheel)))
8839 (home-page "https://github.com/boto/botocore")
8840 (synopsis "Low-level interface to AWS")
8841 (description "Botocore is a Python library that provides a low-level
44d10b1f 8842interface to the Amazon Web Services (AWS) API.")
7bcf827c 8843 (license license:asl2.0)))
44d10b1f
RW
8844
8845(define-public python2-botocore
8846 (package-with-python2 python-botocore))
8847
8848(define-public python-xdo
8849 (package
8850 (name "python-xdo")
8851 (version "0.3")
8852 (source (origin
8853 (method url-fetch)
8854 (uri (string-append
8855 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8856 "python-xdo_" version ".orig.tar.gz"))
8857 (sha256
8858 (base32
8859 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
8860 (build-system python-build-system)
8861 (arguments
8862 '(#:phases
8863 (modify-phases %standard-phases
8864 (add-before 'install 'patch-libxdo-path
8865 ;; Hardcode the path of dynamically loaded libxdo library.
8866 (lambda* (#:key inputs #:allow-other-keys)
8867 (let ((libxdo (string-append
8868 (assoc-ref inputs "xdotool")
8869 "/lib/libxdo.so")))
8870 (substitute* "xdo/_xdo.py"
8871 (("find_library\\(\"xdo\"\\)")
8872 (simple-format #f "\"~a\"" libxdo)))
8873 #t))))
8874 #:tests? #f)) ; no tests provided
8875 (propagated-inputs
8876 `(("python-six" ,python-six)))
8877 (inputs
8878 `(("xdotool" ,xdotool)
8879 ("libX11" ,libx11)))
8880 (home-page "https://tracker.debian.org/pkg/python-xdo")
8881 (synopsis "Python library for simulating X11 keyboard/mouse input")
8882 (description "Provides bindings to libxdo for manipulating X11 via simulated
8883input. (Note that this is mostly a legacy library; you may wish to look at
8884python-xdo for newer bindings.)")
8885 (license license:bsd-3)))
8886
8887(define-public python2-xdo
8888 (package-with-python2 python-xdo))
8889
8890(define-public python-mako
8891 (package
8892 (name "python-mako")
6bf53ad5 8893 (version "1.1.0")
44d10b1f
RW
8894 (source
8895 (origin
8896 (method url-fetch)
8897 (uri (pypi-uri "Mako" version))
8898 (sha256
8899 (base32
6bf53ad5 8900 "0jqa3qfpykyn4fmkn0kh6043sfls7br8i2bsdbccazcvk9cijsd3"))))
44d10b1f 8901 (build-system python-build-system)
6bf53ad5
MB
8902 (arguments
8903 `(#:phases (modify-phases %standard-phases
8904 (replace 'check
8905 (lambda _
8906 (invoke "pytest" "-vv"))))))
44d10b1f
RW
8907 (propagated-inputs
8908 `(("python-markupsafe" ,python-markupsafe)))
8909 (native-inputs
8910 `(("python-mock" ,python-mock)
44d10b1f 8911 ("python-pytest" ,python-pytest)))
7016e620 8912 (home-page "https://www.makotemplates.org/")
44d10b1f
RW
8913 (synopsis "Templating language for Python")
8914 (description "Mako is a templating language for Python that compiles
8915templates into Python modules.")
8916 (license license:expat)))
8917
8918(define-public python2-mako
8919 (package-with-python2 python-mako))
8920
8921(define-public python-waitress
8922 (package
8923 (name "python-waitress")
8924 (version "1.1.0")
8925 (source
8926 (origin
8927 (method url-fetch)
8928 (uri (pypi-uri "waitress" version))
8929 (patches (search-patches "python-waitress-fix-tests.patch"))
8930 (sha256
8931 (base32
8932 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
8933 (build-system python-build-system)
8934 (home-page "https://github.com/Pylons/waitress")
8935 (synopsis "Waitress WSGI server")
8936 (description "Waitress is meant to be a production-quality pure-Python WSGI
8937server with very acceptable performance.")
8938 (license license:zpl2.1)))
8939
8940(define-public python2-waitress
8941 (package-with-python2 python-waitress))
8942
b2b23d12
TLC
8943(define-public python-whichcraft
8944 (package
8945 (name "python-whichcraft")
8946 (version "0.6.1")
8947 (source
8948 (origin
8949 (method url-fetch)
8950 (uri (pypi-uri "whichcraft" version))
8951 (sha256
8952 (base32
8953 "11yfkzyplizdgndy34vyd5qlmr1n5mxis3a3svxmx8fnccdvknxc"))))
8954 (build-system python-build-system)
8955 (native-inputs
8956 `(("python-pytest" ,python-pytest)))
8957 (home-page "https://github.com/pydanny/whichcraft")
8958 (synopsis "Cross-platform cross-python shutil.which functionality")
8959 (description
8960 "This package provides a shim of the shutil.which function that's
8961designed to work across multiple versions of Python.")
8962 (license license:bsd-3)))
8963
1133ca44
TLC
8964(define-public python-cookiecutter
8965 (package
8966 (name "python-cookiecutter")
8967 (version "1.6.0")
8968 (source
8969 (origin
8970 (method url-fetch)
8971 (uri (pypi-uri "cookiecutter" version))
8972 (sha256
8973 (base32
8974 "0glsvaz8igi2wy1hsnhm9fkn6560vdvdixzvkq6dn20z3hpaa5hk"))))
8975 (build-system python-build-system)
8976 (native-inputs
8977 `(("python-freezegun" ,python-freezegun)
8978 ("python-pytest" ,python-pytest)
8979 ("python-pytest-catchlog" ,python-pytest-catchlog)
8980 ("python-pytest-cov" ,python-pytest-cov)
8981 ("python-pytest-mock" ,python-pytest-mock)))
8982 (propagated-inputs
8983 `(("python-binaryornot" ,python-binaryornot)
8984 ("python-click" ,python-click)
8985 ("python-future" ,python-future)
8986 ("python-jinja2" ,python-jinja2)
8987 ("python-jinja2-time" ,python-jinja2-time)
8988 ("python-poyo" ,python-poyo)
8989 ("python-requests" ,python-requests)
8990 ("python-whichcraft" ,python-whichcraft)))
8991 (home-page "https://github.com/audreyr/cookiecutter")
8992 (synopsis
8993 "Command-line utility that creates projects from project templates")
8994 (description
8995 "This package provides a command-line utility that creates projects from
8996project templates, e.g. creating a Python package project from a Python package
8997project template.")
8998 (license license:bsd-3)))
8999
44d10b1f
RW
9000(define-public python-pyquery
9001 (package
9002 (name "python-pyquery")
9003 (version "1.2.17")
9004 (source
9005 (origin
9006 (method url-fetch)
9007 (uri (pypi-uri "pyquery" version))
9008 (sha256
9009 (base32
9010 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
9011 (build-system python-build-system)
9012 (native-inputs
9013 `(("python-webob" ,python-webob)
9014 ("python-webtest" ,python-webtest)))
9015 (propagated-inputs
9016 `(("python-lxml" ,python-lxml)
9017 ("python-cssselect" ,python-cssselect)))
9018 (home-page "https://github.com/gawel/pyquery")
9019 (synopsis "Make jQuery-like queries on xml documents")
9020 (description "pyquery allows you to make jQuery queries on xml documents.
9021The API is as much as possible the similar to jQuery. pyquery uses lxml for
9022fast xml and html manipulation.")
9023 (license license:bsd-3)))
9024
44d10b1f
RW
9025(define-public python-anyjson
9026 (package
9027 (name "python-anyjson")
9028 (version "0.3.3")
9029 (source
9030 (origin
9031 (method url-fetch)
9032 (uri (pypi-uri "anyjson" version))
9033 (sha256
9034 (base32
9035 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
9036 (build-system python-build-system)
9037 (arguments
9038 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
9039 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
9040 ;; whatever) so this transformation needs to be done before the tests
9041 ;; can be run. Maybe we could add a build step to transform beforehand
9042 ;; but it could be annoying/difficult.
9043 ;; We can enable tests for the Python 2 version, though, and do below.
9044 #:tests? #f))
9045 (home-page "https://bitbucket.org/runeh/anyjson/")
9046 (synopsis
9047 "Wraps best available JSON implementation in a common interface")
9048 (description
9049 "Anyjson loads whichever is the fastest JSON module installed
9050and provides a uniform API regardless of which JSON implementation is used.")
9051 (license license:bsd-3)
9052 (properties `((python2-variant . ,(delay python2-anyjson))))))
9053
9054(define-public python2-anyjson
9055 (let ((anyjson (package-with-python2
9056 (strip-python2-variant python-anyjson))))
9057 (package
9058 (inherit anyjson)
9059 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
9060 #:tests? #t
9061 ,@(package-arguments anyjson)))
9062 (native-inputs `(("python2-nose" ,python2-nose))))))
9063
9064(define-public python-amqp
9065 (package
9066 (name "python-amqp")
9067 (version "2.3.2")
9068 (source
9069 (origin
9070 (method url-fetch)
9071 (uri (pypi-uri "amqp" version))
9072 (sha256
9073 (base32
9074 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
9075 (build-system python-build-system)
9076 (native-inputs
9077 `(("python-case" ,python-case)
9078 ("python-pytest-sugar" ,python-pytest-sugar)
9079 ("python-mock" ,python-mock)))
9080 (propagated-inputs
9081 `(("python-vine" ,python-vine)))
9082 (home-page "https://github.com/celery/py-amqp")
9083 (synopsis
9084 "Low-level AMQP client for Python (fork of amqplib)")
9085 (description
9086 "This is a fork of amqplib which was originally written by Barry Pederson.
9087It is maintained by the Celery project, and used by kombu as a pure python
9088alternative when librabbitmq is not available.")
9089 (license license:lgpl2.1+)
9090 (properties `((python2-variant . ,(delay python2-amqp))))))
9091
9092(define-public python2-amqp
9093 (let ((amqp (package-with-python2
9094 (strip-python2-variant python-amqp))))
9095 (package
9096 (inherit amqp)
9097 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
9098 ;; unmaintained. Weirdly, does not do this on the python 3
9099 ;; version?
9100 #:tests? #f
9101 ,@(package-arguments amqp))))))
9102
9103(define-public python-txamqp
9104 (package
9105 (name "python-txamqp")
9106 (version "0.8.2")
9107 (source
9108 (origin
9109 (method url-fetch)
9110 (uri (pypi-uri "txAMQP" version))
9111 (sha256
9112 (base32
9113 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
9114 (build-system python-build-system)
9115 (propagated-inputs
9116 `(("python-six" ,python-six)
9117 ("python-twisted" ,python-twisted)))
9118 (home-page "https://github.com/txamqp/txamqp")
9119 (synopsis "Communicate with AMQP peers and brokers using Twisted")
9120 (description
9121 "This package provides a Python library for communicating with AMQP peers
9122and brokers using the asynchronous networking framework Twisted. It contains
9123all the necessary code to connect, send and receive messages to/from an
9124AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
9125also includes support for using Thrift RPC over AMQP in Twisted
9126applications.")
9127 (license license:asl2.0)))
9128
9129(define-public python2-txamqp
9130 (package-with-python2 python-txamqp))
9131
9132(define-public python-kombu
9133 (package
9134 (name "python-kombu")
9135 (version "4.2.2")
9136 (source
9137 (origin
9138 (method url-fetch)
9139 (uri (pypi-uri "kombu" version))
9140 (sha256
9141 (base32
9142 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
9143 (build-system python-build-system)
9144 (native-inputs
9145 `(("python-mock" ,python-mock)
9146 ("python-case" ,python-case)
9147 ("python-pyro4" ,python-pyro4)
9148 ("python-pytest-sugar" ,python-pytest-sugar)
9149 ("python-pytz" ,python-pytz)))
9150 (propagated-inputs
9151 `(("python-anyjson" ,python-anyjson)
9152 ("python-amqp" ,python-amqp)
9153 ("python-redis" ,python-redis)))
9154 (home-page "https://kombu.readthedocs.io")
9155 (synopsis "Message passing library for Python")
9156 (description "The aim of Kombu is to make messaging in Python as easy as
9157possible by providing an idiomatic high-level interface for the AMQ protocol,
9158and also provide proven and tested solutions to common messaging problems.
9159AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9160message orientation, queuing, routing, reliability and security, for which the
9161RabbitMQ messaging server is the most popular implementation.")
9162 (license license:bsd-3)
9163 (properties `((python2-variant . ,(delay python2-kombu))))))
9164
9165(define-public python2-kombu
9166 (let ((kombu (package-with-python2
9167 (strip-python2-variant python-kombu))))
9168 (package
9169 (inherit kombu)
9170 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
9171 ;; It works fine on the python3 variant.
9172 #:tests? #f
9173 ,@(package-arguments kombu)))
9174 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9175 ,@(package-native-inputs kombu))))))
9176
9177(define-public python-billiard
9178 (package
9179 (name "python-billiard")
9180 (version "3.5.0.5")
9181 (source
9182 (origin
9183 (method url-fetch)
9184 (uri (pypi-uri "billiard" version))
9185 (sha256
9186 (base32
9187 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
9188 (build-system python-build-system)
9189 (native-inputs
9190 `(("python-case" ,python-case)
9191 ("python-pytest" ,python-pytest)))
9192 (home-page "https://github.com/celery/billiard")
9193 (synopsis
9194 "Python multiprocessing fork with improvements and bugfixes")
9195 (description
9196 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9197multiprocessing package itself is a renamed and updated version of R Oudkerk's
9198pyprocessing package. This standalone variant is intended to be compatible with
9199Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
9200 (license license:bsd-3)
9201 (properties `((python2-variant . ,(delay python2-billiard))))))
9202
9203(define-public python2-billiard
9204 (let ((billiard (package-with-python2
9205 (strip-python2-variant python-billiard))))
9206 (package
9207 (inherit billiard)
9208 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9209 ("python2-mock" ,python2-mock)
9210 ,@(package-native-inputs billiard))))))
9211
9212(define-public python-celery
9213 (package
9214 (name "python-celery")
9215 (version "4.2.1")
9216 (source
9217 (origin
9218 (method url-fetch)
9219 (uri (pypi-uri "celery" version))
9220 (sha256
9221 (base32
9222 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
9223 (build-system python-build-system)
9224 (arguments
9225 '(;; TODO The tests fail with Python 3.7
9226 ;; https://github.com/celery/celery/issues/4849
9227 #:tests? #f
9228 #:phases
9229 (modify-phases %standard-phases
9230 (add-after 'unpack 'patch-requirements
9231 (lambda _
9232 (substitute* "requirements/test.txt"
9233 (("pytest>=3\\.0,<3\\.3")
9234 "pytest>=3.0"))
9235 #t)))))
9236 (native-inputs
9237 `(("python-case" ,python-case)
9238 ("python-pytest" ,python-pytest)))
9239 (propagated-inputs
9240 `(("python-pytz" ,python-pytz)
9241 ("python-billiard" ,python-billiard)
9242 ("python-kombu" ,python-kombu)))
9243 (home-page "https://celeryproject.org")
9244 (synopsis "Distributed Task Queue")
9245 (description "Celery is an asynchronous task queue/job queue based on
9246distributed message passing. It is focused on real-time operation, but
9247supports scheduling as well. The execution units, called tasks, are executed
9248concurrently on a single or more worker servers using multiprocessing,
9249Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9250synchronously (wait until ready).")
9251 (license license:bsd-3)
9252 (properties `((python2-variant . ,(delay python2-celery))))))
9253
9254(define-public python2-celery
9255 (let ((celery (package-with-python2
9256 (strip-python2-variant python-celery))))
9257 (package
9258 (inherit celery)
9259 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9260 ("python2-mock" ,python2-mock)
9261 ,@(package-native-inputs celery))))))
9262
9263(define-public python-translitcodec
9264 (package
9265 (name "python-translitcodec")
9266 (version "0.4.0")
9267 (source
9268 (origin
9269 (method url-fetch)
9270 (uri (pypi-uri "translitcodec" version))
9271 (sha256
9272 (base32
9273 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9274 (build-system python-build-system)
9275 (arguments
9276 `(#:tests? #f)) ; no tests provided
9277 (home-page
9278 "https://github.com/claudep/translitcodec")
9279 (synopsis
9280 "Unicode to 8-bit charset transliteration codec")
9281 (description
9282 "This package contains codecs for transliterating ISO 10646 texts into
9283best-effort representations using smaller coded character sets (ASCII,
9284ISO 8859, etc.).")
9285 (license license:expat)))
9286
9287(define-public python2-translitcodec
9288 (package-with-python2 python-translitcodec))
9289
9290(define-public python-editor
9291 (package
9292 (name "python-editor")
9293 (version "0.5")
9294 (source
9295 (origin
9296 (method url-fetch)
9297 (uri (pypi-uri "python-editor" version))
9298 (sha256
9299 (base32
9300 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9301 (build-system python-build-system)
9302 (home-page
9303 "https://github.com/fmoo/python-editor")
9304 (synopsis
9305 "Programmatically open an editor, capture the result")
9306 (description
9307 "python-editor is a library that provides the editor module for
9308programmatically interfacing with your system's $EDITOR.")
9309 (license license:asl2.0)))
9310
9311(define-public python2-editor
9312 (package-with-python2 python-editor))
9313
44d10b1f
RW
9314(define-public python-vobject
9315 (package
9316 (name "python-vobject")
9317 (version "0.9.5")
9318 (source (origin
9319 (method url-fetch)
9320 (uri (pypi-uri "vobject" version))
9321 (sha256
9322 (base32
9323 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
9324 (build-system python-build-system)
9325 (arguments
9326 '(;; The test suite relies on some non-portable Windows interfaces.
9327 #:tests? #f))
9328 (propagated-inputs
9329 `(("python-dateutil" ,python-dateutil)
9330 ("python-pyicu" ,python-pyicu)))
9331 (synopsis "Parse and generate vCard and vCalendar files")
9332 (description "Vobject is intended to be a full featured Python package for
9333parsing and generating vCard and vCalendar files. Currently, iCalendar files
9334are supported and well tested. vCard 3.0 files are supported, and all data
9335should be imported, but only a few components are understood in a sophisticated
9336way.")
9337 (home-page "http://eventable.github.io/vobject/")
9338 (license license:asl2.0)))
9339
9340(define-public python2-vobject
9341 (package-with-python2 python-vobject))
9342
9343(define-public python-munkres
9344 (package
9345 (name "python-munkres")
9346 (version "1.0.8")
9347 (source (origin
9348 (method url-fetch)
9349 (uri (pypi-uri "munkres" version))
9350 (sha256
9351 (base32
9352 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
9353 (build-system python-build-system)
9354 (arguments
9355 '(#:tests? #f)) ; no test suite
9356 (home-page "http://software.clapper.org/munkres/")
9357 (synopsis "Implementation of the Munkres algorithm")
9358 (description "The Munkres module provides an implementation of the Munkres
9359algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9360useful for solving the Assignment Problem.")
9361 (license license:bsd-3)))
9362
9363(define-public python2-munkres
9364 (package-with-python2 python-munkres))
9365
9366(define-public python-whoosh
9367 (package
9368 (name "python-whoosh")
9369 (version "2.7.4")
9370 (source
9371 (origin
9372 (method url-fetch)
9373 (uri (pypi-uri "Whoosh" version))
9374 (sha256
9375 (base32
9376 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9377 (build-system python-build-system)
2679d9a4 9378 (arguments '(#:tests? #f)) ; Test invocation is no longer supported by Python.
44d10b1f
RW
9379 (native-inputs
9380 `(("python-pytest" ,python-pytest)))
9381 (home-page "https://bitbucket.org/mchaput/whoosh")
9382 (synopsis "Full text indexing, search, and spell checking library")
9383 (description
9384 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9385checking library.")
9386 (license license:bsd-2)))
9387
9388(define-public python2-whoosh
9389 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9390 (package (inherit whoosh)
9391 (propagated-inputs
9392 `(("python2-backport-ssl-match-hostname"
9393 ,python2-backport-ssl-match-hostname)
9394 ,@(package-propagated-inputs whoosh))))))
9395
9396(define-public python-pathlib
9397 (package
9398 (name "python-pathlib")
9399 (version "1.0.1")
9400 (source (origin
9401 (method url-fetch)
9402 (uri (pypi-uri "pathlib" version))
9403 (sha256
9404 (base32
9405 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9406 (build-system python-build-system)
9407 ;; The tests depend on the internal "test" module, which does not provide
9408 ;; a stable interface.
9409 (arguments `(#:tests? #f))
9410 (home-page "https://pathlib.readthedocs.org/")
9411 (synopsis "Object-oriented file system paths")
9412 (description "Pathlib offers a set of classes to handle file system paths.
9413It offers the following advantages over using string objects:
9414
9415@enumerate
9416@item No more cumbersome use of os and os.path functions. Everything can
9417be done easily through operators, attribute accesses, and method calls.
9418@item Embodies the semantics of different path types. For example,
9419comparing Windows paths ignores casing.
9420@item Well-defined semantics, eliminating any inconsistencies or
9421ambiguities (forward vs. backward slashes, etc.).
9422@end enumerate
9423
9424Note: In Python 3.4, pathlib is now part of the standard library. For other
9425Python versions please consider python-pathlib2 instead, which tracks the
9426standard library module. This module (python-pathlib) isn't maintained
9427anymore.")
9428 (license license:expat)))
9429
9430(define-public python2-pathlib
9431 (package-with-python2 python-pathlib))
9432
9433(define-public python2-pathlib2
9434 (package
9435 (name "python2-pathlib2")
54da6f9f 9436 (version "2.3.3")
44d10b1f
RW
9437 (source (origin
9438 (method url-fetch)
9439 (uri (pypi-uri "pathlib2" version))
9440 (sha256
9441 (base32
54da6f9f 9442 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
44d10b1f
RW
9443 (build-system python-build-system)
9444 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9445 ;; version is 3.4 which already includes this package as part of the
9446 ;; standard library.
9447 (arguments
9448 `(#:python ,python-2))
9449 (propagated-inputs
9450 `(("python2-scandir" ,python2-scandir)
9451 ("python2-six" ,python2-six)))
9452 (home-page "https://pypi.python.org/pypi/pathlib2/")
9453 (synopsis "Object-oriented file system paths - backport of standard
9454pathlib module")
9455 (description "The goal of pathlib2 is to provide a backport of standard
9456pathlib module which tracks the standard library module, so all the newest
9457features of the standard pathlib can be used also on older Python versions.
9458
9459Pathlib offers a set of classes to handle file system paths. It offers the
9460following advantages over using string objects:
9461
9462@enumerate
9463@item No more cumbersome use of os and os.path functions. Everything can
9464be done easily through operators, attribute accesses, and method calls.
9465@item Embodies the semantics of different path types. For example,
9466comparing Windows paths ignores casing.
9467@item Well-defined semantics, eliminating any inconsistencies or
9468ambiguities (forward vs. backward slashes, etc.).
9469@end enumerate")
9470 (license license:expat)))
9471
9472(define-public python2-pathlib2-bootstrap
9473 (hidden-package
9474 (package
9475 (inherit python2-pathlib2)
9476 (name "python2-pathlib2-bootstrap")
9477 (propagated-inputs
9478 `(("python2-scandir" ,python2-scandir)
9479 ("python2-six" ,python2-six-bootstrap))))))
9480
9481(define-public python-jellyfish
9482 (package
9483 (name "python-jellyfish")
9484 (version "0.5.6")
9485 (source (origin
9486 (method url-fetch)
9487 (uri (pypi-uri "jellyfish" version))
9488 (sha256
9489 (base32
9490 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
9491 (build-system python-build-system)
9492 (native-inputs
9493 `(("python-pytest" ,python-pytest)))
9494 (home-page "https://github.com/jamesturk/jellyfish")
9495 (synopsis "Approximate and phonetic matching of strings")
9496 (description "Jellyfish uses a variety of string comparison and phonetic
9497encoding algorithms to do fuzzy string matching.")
9498 (license license:bsd-2)
9499 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9500
9501(define-public python2-jellyfish
9502 (let ((jellyfish (package-with-python2
9503 (strip-python2-variant python-jellyfish))))
9504 (package (inherit jellyfish)
9505 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
9506 ,@(package-native-inputs jellyfish))))))
9507
9508(define-public python2-unicodecsv
9509 (package
9510 (name "python2-unicodecsv")
9511 (version "0.14.1")
9512 (source (origin
f711b71b 9513 (method git-fetch)
44d10b1f
RW
9514 ;; The test suite is not included in the PyPi release.
9515 ;; https://github.com/jdunck/python-unicodecsv/issues/19
f711b71b
EF
9516 (uri (git-reference
9517 (url "https://github.com/jdunck/python-unicodecsv")
9518 (commit version)))
9519 (file-name (git-file-name name version))
44d10b1f
RW
9520 (sha256
9521 (base32
f711b71b 9522 "15hx2k41a2lpv4hcml9zp4cvlx1171mnb5s4s13xc1pxkq3vgdjy"))))
44d10b1f
RW
9523 (build-system python-build-system)
9524 (arguments
9525 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9526 #:python ,python-2))
9527 (native-inputs
9528 `(("python2-unittest2" ,python2-unittest2)))
9529 (home-page "https://github.com/jdunck/python-unicodecsv")
9530 (synopsis "Unicode CSV module for Python 2")
9531 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9532module, adding support for Unicode strings.")
9533 (license license:bsd-2)))
9534
9535(define-public python-rarfile
9536 (package
9537 (name "python-rarfile")
9538 (version "2.8")
9539 (source (origin
9540 (method url-fetch)
9541 (uri (pypi-uri "rarfile" version))
9542 (sha256
9543 (base32
9544 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
9545 (build-system python-build-system)
9546 (arguments
9547 '(#:phases
9548 (modify-phases %standard-phases
9549 (replace 'check
9550 ;; Many tests fail, but the installation proceeds.
e59dd341 9551 (lambda _ (invoke "make" "-C" "test" "test"))))))
44d10b1f
RW
9552 (native-inputs
9553 `(("which" ,which))) ; required for tests
9554 (propagated-inputs
9555 `(("libarchive" ,libarchive)))
9556 (home-page "https://github.com/markokr/rarfile")
9557 (synopsis "RAR archive reader for Python")
9558 (description "This is Python module for RAR archive reading. The interface
9559is made as zipfile like as possible.")
9560 (license license:isc)))
9561
9562(define-public python2-rarfile
9563 (package-with-python2 python-rarfile))
9564
9565(define-public python-magic
9566 (package
9567 (name "python-magic")
9568 (version "0.4.15")
9569 (source
9570 (origin
9571 (method url-fetch)
9572 (uri (pypi-uri "python-magic" version))
9573 (sha256
9574 (base32
9575 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
9576 (file-name (string-append name "-" version "-checkout"))))
9577 (build-system python-build-system)
9578 (arguments
9579 ;; The tests are unreliable, so don't run them. The tests fail
9580 ;; under Python3 because they were written for Python2 and
9581 ;; contain import statements that do not work in Python3. One of
9582 ;; the tests fails under Python2 because its assertions are
9583 ;; overly stringent; it relies on comparing output strings which
9584 ;; are brittle and can change depending on the version of
9585 ;; libmagic being used and the system on which the test is
9586 ;; running. In my case, under GuixSD 0.10.0, only one test
9587 ;; failed, and it seems to have failed only because the version
9588 ;; of libmagic that is packaged in Guix outputs a slightly
9589 ;; different (but not wrong) string than the one that the test
9590 ;; expected.
9591 '(#:tests? #f
9592 #:phases (modify-phases %standard-phases
9593 ;; Replace a specific method call with a hard-coded
9594 ;; path to the necessary libmagic.so file in the
9595 ;; store. If we don't do this, then the method call
9596 ;; will fail to find the libmagic.so file, which in
9597 ;; turn will cause any application using
9598 ;; python-magic to fail.
9599 (add-before 'build 'hard-code-path-to-libmagic
9600 (lambda* (#:key inputs #:allow-other-keys)
9601 (let ((file (assoc-ref inputs "file")))
9602 (substitute* "magic.py"
9603 (("ctypes.util.find_library\\('magic'\\)")
9604 (string-append "'" file "/lib/libmagic.so'")))
9605 #t)))
9606 (add-before 'install 'disable-egg-compression
9607 (lambda _
9608 (let ((port (open-file "setup.cfg" "a")))
9609 (display "\n[easy_install]\nzip_ok = 0\n"
9610 port)
9611 (close-port port)
9612 #t))))))
9613 (inputs
9614 ;; python-magic needs to be able to find libmagic.so.
9615 `(("file" ,file)))
9616 (home-page
9617 "https://github.com/ahupp/python-magic")
9618 (synopsis
9619 "File type identification using libmagic")
9620 (description
9621 "This module uses ctypes to access the libmagic file type
9622identification library. It makes use of the local magic database and
9623supports both textual and MIME-type output. Note that this module and
9624the python-file module both provide a \"magic.py\" file; these two
9625modules, which are different and were developed separately, both serve
9626the same purpose: to provide Python bindings for libmagic.")
9627 (license license:expat)))
9628
9629(define-public python2-magic
9630 (package-with-python2 python-magic))
9631
9632(define-public python2-s3cmd
9633 (package
9634 (name "python2-s3cmd")
9635 (version "1.6.1")
9636 (source
9637 (origin
9638 (method url-fetch)
9639 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
9640 "s3cmd-" version ".tar.gz"))
9641 (sha256
9642 (base32
9643 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9644 (build-system python-build-system)
9645 (arguments
9646 ;; s3cmd is written for python2 only and contains no tests.
9647 `(#:python ,python-2
9648 #:tests? #f))
9649 (propagated-inputs
9650 `(("python2-dateutil" ,python2-dateutil)
9651 ;; The python-file package also provides a magic.py module.
9652 ;; This is an unfortunate state of affairs; however, s3cmd
9653 ;; fails to install if it cannot find specifically the
9654 ;; python-magic package. Thus we include it, instead of using
9655 ;; python-file. Ironically, s3cmd sometimes works better
9656 ;; without libmagic bindings at all:
9657 ;; https://github.com/s3tools/s3cmd/issues/198
9658 ("python2-magic" ,python2-magic)))
9659 (home-page "http://s3tools.org/s3cmd")
9660 (synopsis "Command line tool for S3-compatible storage services")
9661 (description
9662 "S3cmd is a command line tool for uploading, retrieving and managing data
9663in storage services that are compatible with the Amazon Simple Storage
9664Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9665GnuPG encryption, and more. It also supports management of Amazon's
9666CloudFront content delivery network.")
9667 (license license:gpl2+)))
9668
9669(define-public python-pkgconfig
9670 (package
9671 (name "python-pkgconfig")
9672 (version "1.3.1")
9673 (source
9674 (origin
9675 (method url-fetch)
9676 (uri (pypi-uri "pkgconfig" version))
9677 (sha256
9678 (base32
9679 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
9680 (build-system python-build-system)
9681 (native-inputs
9682 `(("python-nose" ,python-nose)))
9683 (inputs
9684 `(("pkg-config" ,pkg-config)))
9685 (arguments
9686 `(#:phases
9687 (modify-phases %standard-phases
9688 (add-before 'build 'patch
9689 ;; Hard-code the path to pkg-config.
9690 (lambda _
9691 (substitute* "pkgconfig/pkgconfig.py"
9692 (("cmd = 'pkg-config")
9693 (string-append "cmd = '" (which "pkg-config"))))
9694 #t))
9695 (replace 'check
9696 (lambda _
9697 (invoke "nosetests" "test.py"))))))
9698 (home-page "https://github.com/matze/pkgconfig")
9699 (synopsis "Python interface for pkg-config")
9700 (description "This module provides a Python interface to pkg-config. It
9701can be used to find all pkg-config packages, check if a package exists,
9702check if a package meets certain version requirements, query CFLAGS and
9703LDFLAGS and parse the output to build extensions with setup.py.")
9704 (license license:expat)))
9705
9706(define-public python2-pkgconfig
9707 (package-with-python2 python-pkgconfig))
9708
9709(define-public python-bz2file
9710 (package
9711 (name "python-bz2file")
9712 (version "0.98")
9713 (source
9714 (origin
9715 (method url-fetch)
9716 (uri (pypi-uri "bz2file" version))
9717 (sha256
9718 (base32
9719 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9720 (build-system python-build-system)
9721 (arguments
9722 `(#:tests? #f)) ; Tests use deprecated python modules.
9723 (home-page "https://github.com/nvawda/bz2file")
9724 (synopsis "Read and write bzip2-compressed files")
9725 (description
9726 "Bz2file is a Python library for reading and writing bzip2-compressed
9727files. It contains a drop-in replacement for the I/O interface in the
9728standard library's @code{bz2} module, including features from the latest
9729development version of CPython that are not available in older releases.")
9730 (license license:asl2.0)))
9731
9732(define-public python2-bz2file
9733 (package-with-python2 python-bz2file))
9734
9735(define-public python-future
9736 (package
9737 (name "python-future")
d5d54030 9738 (version "0.17.1")
44d10b1f
RW
9739 (source
9740 (origin
9741 (method url-fetch)
9742 (uri (pypi-uri "future" version))
9743 (sha256
9744 (base32
d5d54030 9745 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
44d10b1f
RW
9746 (build-system python-build-system)
9747 ;; Many tests connect to the network or are otherwise flawed.
9748 ;; https://github.com/PythonCharmers/python-future/issues/210
9749 (arguments
9750 `(#:tests? #f))
9751 (home-page "http://python-future.org")
9752 (synopsis "Single-source support for Python 3 and 2")
9753 (description
9754 "@code{python-future} is the missing compatibility layer between Python 2 and
9755Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9756to support both Python 2 and Python 3 with minimal overhead.")
9757 (license license:expat)))
9758
9759(define-public python2-future
9760 (package-with-python2 python-future))
9761
9762(define-public python-cysignals
9763 (package
9764 (name "python-cysignals")
8e3e51df 9765 (version "1.9.0")
44d10b1f
RW
9766 (source
9767 (origin
9768 (method url-fetch)
8e3e51df 9769 (uri (pypi-uri "cysignals" version))
44d10b1f
RW
9770 (sha256
9771 (base32
8e3e51df 9772 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
44d10b1f
RW
9773 (build-system python-build-system)
9774 (native-inputs
9775 `(("python-cython" ,python-cython)
9776 ("python-sphinx" ,python-sphinx)))
9777 (inputs
9778 `(("pari-gp" ,pari-gp)))
9779 (arguments
9780 `(#:modules ((guix build python-build-system)
9781 ((guix build gnu-build-system) #:prefix gnu:)
9782 (guix build utils))
9783 ;; FIXME: Tests are executed after installation and currently fail
9784 ;; when not installing into standard locations; the author is working
9785 ;; on a fix.
9786 #:tests? #f
9787 #:phases
9788 (modify-phases %standard-phases
9789 (add-before
9790 'build 'configure
9791 (assoc-ref gnu:%standard-phases 'configure)))))
9792 (home-page
9793 "https://github.com/sagemath/cysignals")
9794 (synopsis
9795 "Handling of interrupts and signals for Cython")
9796 (description
9797 "The cysignals package provides mechanisms to handle interrupts (and
9798other signals and errors) in Cython code, using two related approaches,
9799for mixed Cython/Python code or external C libraries and pure Cython code,
9800respectively.")
9801 (license license:lgpl3+)))
9802
9803(define-public python2-cysignals
9804 (package-with-python2 python-cysignals))
9805
9806(define-public python2-shedskin
9807 (package
9808 (name "python2-shedskin")
9809 (version "0.9.4")
9810 (source
9811 (origin
9812 (method url-fetch)
9813 (uri (string-append "https://github.com/shedskin/shedskin/"
9814 "releases/download/v" version
9815 "/shedskin-" version ".tgz"))
9816 (sha256
9817 (base32
9818 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9819 (build-system python-build-system)
9820 (arguments
9821 `(#:python ,python-2
9822 #:phases (modify-phases %standard-phases
9823 (add-after 'unpack 'fix-resulting-include-libs
9824 (lambda* (#:key inputs #:allow-other-keys)
9825 (let ((libgc (assoc-ref inputs "libgc"))
9826 (pcre (assoc-ref inputs "pcre")))
9827 (substitute* "shedskin/makefile.py"
9828 (("variable == 'CCFLAGS':[ ]*")
9829 (string-append "variable == 'CCFLAGS':\n"
9830 " line += ' -I " pcre "/include"
9831 " -I " libgc "/include'"))
9832 (("variable == 'LFLAGS':[ ]*")
9833 (string-append "variable == 'LFLAGS':\n"
9834 " line += ' -L" pcre "/lib"
9835 " -L " libgc "/lib'")))
9836 #t))))))
9837 (inputs `(("pcre" ,pcre)
9838 ("libgc" ,libgc)))
9839 (home-page "https://shedskin.github.io/")
9840 (synopsis "Experimental Python-2 to C++ Compiler")
9841 (description (string-append "This is an experimental compiler for a subset of
9842Python. It generates C++ code and a Makefile."))
9843 (license (list license:gpl3 license:bsd-3 license:expat))))
9844
9845(define-public python2-rope
9846 (package
9847 (name "python2-rope")
a9ba0a31 9848 (version "0.11.0")
44d10b1f
RW
9849 (source
9850 (origin
9851 (method url-fetch)
9852 (uri (pypi-uri "rope" version))
9853 (sha256
9854 (base32
a9ba0a31 9855 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
44d10b1f 9856 (arguments
afb29715 9857 ;; Rope has only partial python3 support, see `python-rope'
44d10b1f
RW
9858 `(#:python ,python-2))
9859 (build-system python-build-system)
9860 (native-inputs
9861 `(("python2-unittest2" ,python2-unittest2)))
9862 (home-page "https://github.com/python-rope/rope")
9863 (synopsis "Refactoring library for Python")
9864 (description "Rope is a refactoring library for Python. It facilitates
9865the renaming, moving and extracting of attributes, functions, modules, fields
9866and parameters in Python 2 source code. These refactorings can also be applied
9867to occurrences in strings and comments.")
9868 (license license:gpl2)))
9869
2c880ef4
LC
9870(define-public python-rope
9871 (package
9872 (inherit python2-rope)
9873 (name "python-rope")
9874 (arguments `(#:python ,python-wrapper
9875 ;; XXX: Only partial python3 support, results in some failing
9876 ;; tests: <https://github.com/python-rope/rope/issues/247>.
9877 #:tests? #f))
9878 (properties `((python2-variant . ,(delay python2-rope))))))
9879
44d10b1f
RW
9880(define-public python-py3status
9881 (package
9882 (name "python-py3status")
ef68b35d 9883 (version "3.21")
44d10b1f
RW
9884 (source
9885 (origin
9886 (method url-fetch)
9887 (uri (pypi-uri "py3status" version))
9888 (sha256
ef68b35d 9889 (base32 "16z8zq83hxy48g6hh4xczbdz50qvxv9k1aahr4fqq7jis60cc262"))))
44d10b1f
RW
9890 (build-system python-build-system)
9891 (inputs
9892 `(("file" ,file)))
9893 (arguments
9894 '(#:phases
9895 (modify-phases %standard-phases
9896 ;; 'file' is used for detection of configuration file encoding
9897 ;; let's make link the dependency to particular input
9898 (add-before 'build 'patch-file-path
9899 (lambda* (#:key inputs #:allow-other-keys)
9900 (let ((file-path (assoc-ref inputs "file")))
9901 (substitute* "py3status/parse_config.py"
6a6b8a3f 9902 (("\\[\"file\", \"-b\"")
44d10b1f
RW
9903 (string-append "['" file-path "/bin/file', '-b'")))
9904 #t))))
9905 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
9906 (home-page "https://github.com/ultrabug/py3status")
9907 (synopsis "Extensible i3status wrapper written in Python")
9908 (description "py3status is an i3status wrapper which extends i3status
9909functionality in a modular way, allowing you to extend your panel with your
9910own code, responding to click events and updating clock every second.")
9911 (license license:bsd-3)))
9912
9913(define-public python-tblib
9914 (package
9915 (name "python-tblib")
9916 (version "1.3.2")
9917 (source (origin
9918 (method url-fetch)
9919 (uri (pypi-uri "tblib" version))
9920 (sha256 (base32
9921 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
9922 (build-system python-build-system)
9923 (arguments
9924 `(#:phases
9925 (modify-phases %standard-phases
9926 (add-before 'check 'adjust-tests
9927 (lambda _
9928 (when (which "python3")
9929 ;; Adjust the example output to match that of Python 3.7:
9930 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
9931 (substitute* "README.rst"
9932 (("Exception\\('fail',") "Exception('fail'"))
9933 #t)))
9934 (replace 'check
9935 (lambda _
9936 ;; Upstream runs tests after installation and the package itself
9937 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
9938 ;; found.
9939 (setenv "PYTHONPATH"
9940 (string-append (getcwd) "/build/lib:"
9941 (getenv "PYTHONPATH")))
9942 (invoke "py.test" "-vv" "tests" "README.rst"))))))
9943 (native-inputs
9944 `(("python-pytest" ,python-pytest)
9945 ("python-six" ,python-six)))
9946 (home-page "https://github.com/ionelmc/python-tblib")
9947 (synopsis "Traceback serialization library")
9948 (description
9949 "Traceback serialization allows you to:
9950
9951@enumerate
9952@item Pickle tracebacks and raise exceptions with pickled tracebacks in
9953different processes. This allows better error handling when running code over
9954multiple processes (imagine multiprocessing, billiard, futures, celery etc).
9955
9956@item Parse traceback strings and raise with the parsed tracebacks.
9957@end enumerate\n")
9958 (license license:bsd-3)))
9959
9960(define-public python2-tblib
9961 (package-with-python2 python-tblib))
9962
9963(define-public python-greenlet
9964 (package
9965 (name "python-greenlet")
9966 (version "0.4.15")
9967 (source (origin
9968 (method url-fetch)
9969 (uri (pypi-uri "greenlet" version))
9970 (sha256
9971 (base32
9972 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
9973 (build-system python-build-system)
9974 (home-page "https://greenlet.readthedocs.io/")
9975 (synopsis "Lightweight in-process concurrent programming")
9976 (description
9977 "Greenlet package is a spin-off of Stackless, a version of CPython
9978that supports micro-threads called \"tasklets\". Tasklets run
9979pseudo-concurrently (typically in a single or a few OS-level threads) and
9980are synchronized with data exchanges on \"channels\".")
9981 (license (list license:psfl license:expat))))
9982
9983(define-public python2-greenlet
9984 (package-with-python2 python-greenlet))
9985
9986(define-public python-objgraph
9987 (package
9988 (name "python-objgraph")
eebc03bb 9989 (version "3.4.1")
44d10b1f
RW
9990 (source
9991 (origin
9992 (method url-fetch)
9993 (uri (pypi-uri "objgraph" version))
9994 (sha256
9995 (base32
eebc03bb 9996 "19qmqsh984zq1rzzjy4vqnmviaqnymcyl8h7z99pnicbgwnm2adz"))))
44d10b1f
RW
9997 (build-system python-build-system)
9998 (propagated-inputs
9999 `(("python-graphviz" ,python-graphviz)))
10000 (native-inputs
10001 `(("python-mock" ,python-mock)
10002 ("graphviz" ,graphviz)))
10003 (home-page "https://mg.pov.lt/objgraph/")
10004 (synopsis "Draw Python object reference graphs with graphviz")
10005 (description
10006 "This package provides tools to draw Python object reference graphs with
10007graphviz.")
10008 (license license:expat)))
10009
ffe58d1d
MB
10010(define-public python2-objgraph
10011 (package-with-python2 python-objgraph))
10012
44d10b1f
RW
10013(define-public python-gevent
10014 (package
10015 (name "python-gevent")
10016 (version "1.3.7")
10017 (source (origin
10018 (method url-fetch)
10019 (uri (pypi-uri "gevent" version))
10020 (sha256
10021 (base32
10022 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
10023 (modules '((guix build utils)))
10024 (snippet
10025 '(begin
10026 ;; unbunding libev and c-ares
10027 (delete-file-recursively "deps")
10028 #t))))
10029 (build-system python-build-system)
10030 (arguments
10031 `(#:modules ((ice-9 ftw)
10032 (ice-9 match)
10033 (srfi srfi-26)
10034 (guix build utils)
10035 (guix build python-build-system))
10036 #:phases (modify-phases %standard-phases
44d10b1f
RW
10037 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
10038 (lambda _
10039 (substitute* "src/gevent/subprocess.py"
10040 (("/bin/sh") (which "sh")))
10041 (for-each (lambda (file)
10042 (substitute* file
10043 (("/bin/sh") (which "sh"))
10044 (("/bin/true") (which "true"))))
10045 (find-files "src/greentest" "\\.py$"))
10046 #t))
10047 (add-before 'build 'do-not-use-bundled-sources
10048 (lambda* (#:key inputs #:allow-other-keys)
10049 (setenv "CONFIG_SHELL" (which "bash"))
10050 (setenv "LIBEV_EMBED" "false")
10051 (setenv "CARES_EMBED" "false")
10052 (setenv "EMBED" "false")
10053
b5b56b7f
MB
10054 ;; Prevent building bundled libev.
10055 (substitute* "setup.py"
10056 (("run_make=_BUILDING")
10057 "run_make=False"))
10058
44d10b1f
RW
10059 (let ((greenlet (string-append
10060 (assoc-ref inputs "python-greenlet")
10061 "/include")))
10062 (match (scandir greenlet
10063 (lambda (item)
10064 (string-prefix? "python" item)))
10065 ((python)
b5b56b7f 10066 (setenv "C_INCLUDE_PATH"
44d10b1f
RW
10067 (string-append greenlet "/" python)))))
10068 #t))
10069 (add-before 'check 'skip-timer-test
10070 (lambda _
10071 ;; XXX: Skip 'TestTimerResolution', which appears to be
10072 ;; unreliable.
10073 (substitute* "src/greentest/test__core_timer.py"
10074 (("not greentest.RUNNING_ON_CI") "False"))
10075 #t))
10076 (replace 'check
10077 (lambda _
10078 ;; Make sure the build directory is on PYTHONPATH.
10079 (setenv "PYTHONPATH"
10080 (string-append
10081 (getenv "PYTHONPATH") ":"
10082 (getcwd) "/build/"
10083 (car (scandir "build" (cut string-prefix? "lib." <>)))))
10084 (with-directory-excursion "src/greentest"
10085 ;; XXX: Many tests require network access. Instead we only
10086 ;; run known-good tests. Unfortunately we cannot use
10087 ;; recursion here since this directory also contains
10088 ;; Python-version-specific subfolders.
10089 (apply invoke "python" "testrunner.py" "--config"
10090 "known_failures.py"
10091 (scandir "." (cut regexp-exec
10092 (make-regexp "test_+(subprocess|core)")
10093 <>)))))))))
10094 (propagated-inputs
10095 `(("python-greenlet" ,python-greenlet)
10096 ("python-objgraph" ,python-objgraph)))
10097 (native-inputs
b5b56b7f 10098 `(("python-six" ,python-six)))
44d10b1f
RW
10099 (inputs
10100 `(("c-ares" ,c-ares)
10101 ("libev" ,libev)))
10102 (home-page "http://www.gevent.org/")
10103 (synopsis "Coroutine-based network library")
10104 (description
10105 "gevent is a coroutine-based Python networking library that uses greenlet
10106to provide a high-level synchronous API on top of the libev event loop.")
10107 (license license:expat)
10108 (properties `((python2-variant . ,(delay python2-gevent))))))
10109
10110(define-public python2-gevent
10111 (let ((base (package-with-python2
10112 (strip-python2-variant python-gevent))))
10113 (package
10114 (inherit base)
10115 (native-inputs `(,@(package-native-inputs python-gevent)
10116 ("python-mock" ,python2-mock))))))
10117
10118(define-public python-fastimport
10119 (package
10120 (name "python-fastimport")
10121 (version "0.9.6")
10122 (source
10123 (origin
10124 (method url-fetch)
10125 (uri (pypi-uri "fastimport" version))
10126 (sha256
10127 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
10128 (build-system python-build-system)
10129 (home-page "https://github.com/jelmer/python-fastimport")
10130 (synopsis "VCS fastimport parser and generator in Python")
10131 (description "This package provides a parser for and generator of the Git
10132@url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
10133format.")
10134 (license license:gpl2+)))
10135
10136(define-public python2-fastimport
10137 (package-with-python2 python-fastimport))
10138
10139(define-public python-twisted
10140 (package
10141 (name "python-twisted")
fdfad2fc 10142 (version "19.7.0")
44d10b1f
RW
10143 (source (origin
10144 (method url-fetch)
10145 (uri (pypi-uri "Twisted" version ".tar.bz2"))
10146 (sha256
10147 (base32
fdfad2fc 10148 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
44d10b1f
RW
10149 (build-system python-build-system)
10150 (arguments
0107c9b8 10151 '(#:tests? #f)) ; FIXME: some tests fail
44d10b1f
RW
10152 (propagated-inputs
10153 `(("python-zope-interface" ,python-zope-interface)
52ca1c4a 10154 ("python-pyhamcrest" ,python-pyhamcrest)
44d10b1f 10155 ("python-incremental" ,python-incremental)
e5ba2fe3 10156 ("python-hyperlink" ,python-hyperlink)
44d10b1f
RW
10157 ("python-constantly" ,python-constantly)
10158 ("python-automat" ,python-automat)))
10159 (home-page "https://twistedmatrix.com/")
10160 (synopsis "Asynchronous networking framework written in Python")
10161 (description
10162 "Twisted is an extensible framework for Python programming, with special
10163focus on event-based network programming and multiprotocol integration.")
10164 (license license:expat)))
10165
10166(define-public python2-twisted
10167 (package-with-python2 python-twisted))
10168
10169(define-public python-pika
10170 (package
10171 (name "python-pika")
10172 (version "0.12.0")
10173 (source
10174 (origin
10175 (method url-fetch)
10176 (uri (pypi-uri "pika" version))
10177 (sha256
10178 (base32
10179 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
10180 (build-system python-build-system)
10181 (native-inputs
10182 `(("python-pyev" ,python-pyev)
10183 ("python-tornado" ,python-tornado)
10184 ("python-twisted" ,python-twisted)))
10185 (home-page "https://pika.readthedocs.org")
10186 (synopsis "Pure Python AMQP Client Library")
10187 (description
10188 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
10189Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
10190network support library.")
10191 (license license:bsd-3)))
10192
10193(define-public python2-pika
10194 (package-with-python2 python-pika))
10195
10196(define-public python-ply
10197 (package
10198 (name "python-ply")
10199 (version "3.10")
10200 (source
10201 (origin
10202 (method url-fetch)
10203 (uri (pypi-uri "ply" version))
10204 (sha256
10205 (base32
10206 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
10207 (build-system python-build-system)
10208 (home-page "http://www.dabeaz.com/ply/")
10209 (synopsis "Python Lex & Yacc")
10210 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
10211It uses LR parsing and does extensive error checking.")
10212 (license license:bsd-3)))
10213
10214(define-public python2-ply
10215 (package-with-python2 python-ply))
10216
10217(define-public python-tabulate
10218 (package
10219 (name "python-tabulate")
10220 (version "0.7.7")
10221 (source (origin
10222 (method url-fetch)
10223 (uri (pypi-uri "tabulate" version))
10224 (sha256
10225 (base32
10226 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
10227 (build-system python-build-system)
10228 (arguments
10229 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
10230 ;; and the latest release is not tagged in the upstream repository.
10231 '(#:tests? #f))
10232 (home-page "https://bitbucket.org/astanin/python-tabulate")
10233 (synopsis "Pretty-print tabular data")
10234 (description
10235 "Tabulate is a library and command-line utility to pretty-print tabular
10236data in Python.")
10237 (license license:expat)))
10238
10239(define-public python2-tabulate
10240 (package-with-python2 python-tabulate))
10241
10242(define-public python-kazoo
10243 (package
10244 (name "python-kazoo")
10245 (version "2.4.0")
10246 (source
10247 (origin
10248 (method url-fetch)
10249 (uri (pypi-uri "kazoo" version))
10250 (sha256
10251 (base32
10252 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
10253 (build-system python-build-system)
10254 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
10255 (propagated-inputs
10256 `(("python-six" ,python-six)))
10257 (home-page "https://kazoo.readthedocs.org")
10258 (synopsis "High-level Zookeeper client library")
10259 (description
10260 "Kazoo is a Python client library for the Apache Zookeeper distributed
10261application service. It is designed to be easy to use and to avoid common
10262programming errors.")
10263 (license license:asl2.0)))
10264
10265(define-public python2-kazoo
10266 (package-with-python2 python-kazoo))
10267
10268(define-public python-pykafka
10269 (package
10270 (name "python-pykafka")
10271 (version "2.4.0")
10272 (source (origin
10273 (method url-fetch)
0ca1d040 10274 (uri (pypi-uri "pykafka" version))
44d10b1f
RW
10275 (sha256
10276 (base32
10277 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10278 (build-system python-build-system)
10279 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
10280 (propagated-inputs
10281 `(("python-gevent" ,python-gevent)
10282 ("python-kazoo" ,python-kazoo)
10283 ("python-tabulate" ,python-tabulate)))
10284 (inputs
10285 `(("librdkafka" ,librdkafka)))
10286 (home-page "https://pykafka.readthedocs.io/")
10287 (synopsis "Apache Kafka client for Python")
10288 (description
10289 "PyKafka is a client for the Apache Kafka distributed messaging system.
10290It includes Python implementations of Kafka producers and consumers, which
10291are optionally backed by a C extension built on librdkafka.")
10292 (license license:asl2.0)))
10293
10294(define-public python2-pykafka
10295 (package-with-python2 python-pykafka))
10296
10297(define-public python-wcwidth
28ac442b
MB
10298 (package
10299 (name "python-wcwidth")
574a71a7 10300 (version "0.1.8")
28ac442b
MB
10301 (source (origin
10302 (method url-fetch)
10303 (uri (pypi-uri "wcwidth" version))
10304 (sha256
10305 (base32
574a71a7 10306 "1a1pzds3xzfylm5mnc5f6c1p8kiig0daqjc9gygd9rc3cj53x2zj"))))
28ac442b
MB
10307 (build-system python-build-system)
10308 (home-page "https://github.com/jquast/wcwidth")
10309 (synopsis "Measure number of terminal column cells of wide-character codes")
10310 (description "Wcwidth measures the number of terminal column cells of
44d10b1f
RW
10311wide-character codes. It is useful for those implementing a terminal emulator,
10312or programs that carefully produce output to be interpreted by one. It is a
10313Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10314specified in POSIX.1-2001 and POSIX.1-2008.")
28ac442b 10315 (license license:expat)))
44d10b1f
RW
10316
10317(define-public python2-wcwidth
10318 (package-with-python2 python-wcwidth))
10319
10320(define-public python2-jsonrpclib
10321 (package
10322 (name "python2-jsonrpclib")
10323 (version "0.1.7")
10324 (source (origin
10325 (method url-fetch)
6571bba0 10326 (uri (pypi-uri "jsonrpclib" version))
44d10b1f
RW
10327 (sha256
10328 (base32
10329 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10330 (build-system python-build-system)
10331 (arguments
10332 `(#:tests? #f
10333 #:python ,python-2))
10334 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10335 (synopsis "Implementation of JSON-RPC specification for Python")
10336 (description
10337 "This library is an implementation of the JSON-RPC specification.
10338It supports both the original 1.0 specification, as well as the
10339new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10340etc.")
10341 (license license:asl2.0)))
10342
10343(define-public python-chai
10344 (package
10345 (name "python-chai")
10346 (version "1.1.2")
10347 (source (origin
10348 (method url-fetch)
10349 (uri (pypi-uri "chai" version))
10350 (sha256
10351 (base32
10352 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
10353 (build-system python-build-system)
10354 (home-page "https://github.com/agoragames/chai")
10355 (synopsis "Mocking framework for Python")
10356 (description
10357 "Chai provides an api for mocking, stubbing and spying your python
10358objects, patterned after the Mocha library for Ruby.")
10359 (license license:bsd-3)))
10360
10361(define-public python2-chai
10362 (package-with-python2 python-chai))
10363
10364(define-public python-inflection
10365 (package
10366 (name "python-inflection")
10367 (version "0.3.1")
10368 (source
10369 (origin (method url-fetch)
10370 (uri (pypi-uri "inflection" version))
10371 (sha256
10372 (base32
10373 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10374 (build-system python-build-system)
10375 (native-inputs
10376 `(("python-pytest" ,python-pytest)))
10377 (home-page "https://github.com/jpvanhal/inflection")
10378 (synopsis "Python string transformation library")
10379 (description
10380 "Inflection is a string transformation library. It singularizes
10381and pluralizes English words, and transforms strings from CamelCase to
10382underscored string.")
10383 (license license:expat)))
10384
10385(define-public python2-inflection
10386 (package-with-python2 python-inflection))
10387
10388(define-public python-pylev
10389 (package
10390 (name "python-pylev")
10391 (version "1.3.0")
10392 (source (origin
10393 (method url-fetch)
10394 (uri (pypi-uri "pylev" version))
10395 (sha256
10396 (base32
10397 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10398 (build-system python-build-system)
10399 (home-page "https://github.com/toastdriven/pylev")
10400 (synopsis "Levenshtein distance implementation in Python")
10401 (description "Pure Python Levenshtein implementation, based off the
10402Wikipedia code samples at
10403@url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
10404 (license license:bsd-3)))
10405
10406(define-public python2-pylev
10407 (package-with-python2 python-pylev))
10408
10409(define-public python-cleo
10410 (package
10411 (name "python-cleo")
af2d3713 10412 (version "0.6.8")
44d10b1f
RW
10413 (source (origin
10414 (method url-fetch)
10415 (uri (pypi-uri "cleo" version))
10416 (sha256
10417 (base32
af2d3713 10418 "06zp695hq835rkaq6irr1ds1dp2qfzyf32v60vxpd8rcnxv319l5"))))
44d10b1f
RW
10419 (build-system python-build-system)
10420 (native-inputs
af2d3713 10421 `( ;; For testing
44d10b1f
RW
10422 ("python-mock" ,python-mock)
10423 ("python-pytest-mock" ,python-pytest-mock)
10424 ("python-pytest" ,python-pytest)))
10425 (propagated-inputs
10426 `(("python-backpack" ,python-backpack)
10427 ("python-pastel" ,python-pastel)
10428 ("python-pylev" ,python-pylev)))
10429 (home-page "https://github.com/sdispater/cleo")
10430 (synopsis "Command-line arguments library for Python")
10431 (description
10432 "Cleo allows you to create command-line commands with signature in
10433docstring and colored output.")
10434 (license license:expat)))
10435
10436(define-public python2-cleo
10437 (package-with-python2 python-cleo))
10438
2be85c45
TLC
10439(define-public python-tomlkit
10440 (package
10441 (name "python-tomlkit")
10442 (version "0.5.7")
10443 (source
10444 (origin
10445 (method url-fetch)
10446 (uri (pypi-uri "tomlkit" version))
10447 (sha256
10448 (base32
10449 "18820ga5z3if1w8dvykxrfm000akracq01ic402xrbljgbn5grn4"))))
10450 (build-system python-build-system)
10451 (native-inputs
10452 `(("python-pytest" ,python-pytest)))
10453 (home-page
10454 "https://github.com/sdispater/tomlkit")
10455 (synopsis "Style preserving TOML library")
10456 (description
10457 "TOML Kit is a 0.5.0-compliant TOML library. It includes a parser that
10458preserves all comments, indentations, whitespace and internal element ordering,
10459and makes them accessible and editable via an intuitive API. It can also
10460create new TOML documents from scratch using the provided helpers. Part of the
10461implementation as been adapted, improved and fixed from Molten.")
10462 (license license:expat)))
10463
0bb32201
TLC
10464(define-public python-shellingham
10465 (package
10466 (name "python-shellingham")
10467 (version "1.3.1")
10468 (source
10469 (origin
10470 (method url-fetch)
10471 (uri (pypi-uri "shellingham" version))
10472 (sha256
10473 (base32
10474 "1q7kws7w4x2hji3g7y0ni9ddk4sd676ylrb3db54gbpys6xj6nwq"))))
10475 (build-system python-build-system)
10476 (home-page
10477 "https://github.com/sarugaku/shellingham")
10478 (synopsis "Tool to detect surrounding shell")
10479 (description
10480 "Shellingham detects what shell the current Python executable is
10481running in.")
10482 (license license:isc)))
10483
aee92957
TLC
10484(define-public python-memcached
10485 (package
10486 (name "python-memcached")
10487 (version "1.59")
10488 (source
10489 (origin
10490 (method url-fetch)
10491 (uri (pypi-uri "python-memcached" version))
10492 (sha256
10493 (base32
10494 "0kvyapavbirk2x3n1jx4yb9nyigrj1s3x15nm3qhpvhkpqvqdqm2"))))
10495 (build-system python-build-system)
10496 (propagated-inputs `(("python-six" ,python-six)))
10497 (home-page
10498 "https://github.com/linsomniac/python-memcached")
10499 (synopsis "Pure python memcached client")
10500 (description
10501 "This software is a pure Python interface to the memcached memory cache
10502daemon. It is the client side software which allows storing values in one or
10503more, possibly remote, memcached servers.")
10504 (license license:psfl)))
10505
b2ac2508
TLC
10506(define-public python-clikit
10507 (package
10508 (name "python-clikit")
10509 (version "0.2.4")
10510 (source
10511 (origin
10512 (method url-fetch)
10513 (uri (pypi-uri "clikit" version))
10514 (sha256
10515 (base32
10516 "0dc8czib5f4j9px1ivcpqnmivnx2zjpc0xb00ldrhsqylks7r06n"))))
10517 (build-system python-build-system)
10518 (propagated-inputs
10519 `(("python-pastel" ,python-pastel)
10520 ("python-pylev" ,python-pylev)))
10521 (home-page "https://github.com/sdispater/clikit")
10522 (synopsis "Group of utilities to build command line interfaces")
10523 (description
10524 "CliKit is a group of utilities to build testable command line
10525interfaces.")
10526 (license license:expat)))
10527
c6f008d6
TLC
10528(define-public python-msgpack-python
10529 (package
10530 (name "python-msgpack-python")
10531 (version "0.5.6")
10532 (source
10533 (origin
10534 (method url-fetch)
10535 (uri (pypi-uri "msgpack-python" version))
10536 (sha256
10537 (base32
10538 "16wh8qgybmfh4pjp8vfv78mdlkxfmcasg78lzlnm6nslsfkci31p"))))
10539 (build-system python-build-system)
10540 (home-page "http://msgpack.org/")
10541 (synopsis "Package to deserialize messages in MessagePack binary format")
10542 (description
10543 "MessagePack is an efficient binary serialization format. It lets you
10544exchange data among multiple languages like JSON. But it's faster and
10545smaller. Small integers are encoded into a single byte, and typical short
10546strings require only one extra byte in addition to the strings themselves.")
10547 (license license:asl2.0)))
10548
badc1c63
TLC
10549(define-public python-cachy
10550 (package
10551 (name "python-cachy")
10552 (version "0.2.0")
10553 (source
10554 (origin
10555 (method url-fetch)
10556 (uri (pypi-uri "cachy" version))
10557 (sha256
10558 (base32
10559 "0v6mjyhgx6j7ya20bk69cr3gdzdkdf6psay0h090rscclgji65dp"))))
10560 (build-system python-build-system)
10561 (native-inputs
10562 `(("python-fakeredis" ,python-fakeredis)
10563 ("python-flexmock" ,python-flexmock)
10564 ("python-pytest" ,python-pytest)))
10565 (propagated-inputs
10566 `(("python-memcached" ,python-memcached)
10567 ("python-msgpack-python" ,python-msgpack-python)
10568 ("python-redis" ,python-redis)))
10569 (home-page "https://github.com/sdispater/cachy")
10570 (synopsis "Simple yet effective caching library")
10571 (description
10572 "Cachy provides a simple yet effective caching library. A simple but
10573powerful API: thread-safety; decorator syntax; support for memcached, redis,
10574database, file, dict stores. Cachy supports python versions 2.7+ and 3.2+.")
10575 (license license:expat)))
10576
617bb67b
TLC
10577(define-public poetry
10578 (package
10579 (name "poetry")
10580 (version "0.12.17")
10581 ;; Poetry can only be built from source with poetry.
10582 (source
10583 (origin
10584 (method url-fetch)
10585 (uri (pypi-uri "poetry" version))
10586 (sha256
10587 (base32
10588 "0gxwcd65qjmzqzppf53x51sic1rbcd9py6cdzx3aprppipimslvf"))))
10589 (build-system python-build-system)
10590 (arguments
10591 `(#:tests? #f ;; Pypi does not have tests.
10592 #:phases
10593 (modify-phases %standard-phases
10594 (replace 'build
10595 (lambda _
10596 ;; Bug in poetry https://github.com/sdispater/poetry/issues/866.
10597 (invoke "sed" "-i" "-e" "s/from distutils.core/from setuptools/"
10598 "setup.py")
10599 #t)))))
10600 (propagated-inputs
10601 `(("python-cachecontrol" ,python-cachecontrol)
10602 ("python-cachy" ,python-cachy)
10603 ("python-cleo" ,python-cleo)
10604 ("python-glob2" ,python-glob2)
10605 ("python-html5lib" ,python-html5lib)
10606 ("python-jsonschema" ,python-jsonschema)
10607 ("python-msgpack" ,python-msgpack)
617bb67b
TLC
10608 ("python-pkginfo" ,python-pkginfo)
10609 ("python-pyparsing" ,python-pyparsing)
10610 ("python-pyrsistent" ,python-pyrsistent)
10611 ("python-requests" ,python-requests)
10612 ("python-requests-toolbelt" ,python-requests-toolbelt)
10613 ("python-shellingham" ,python-shellingham)
10614 ("python-tomlkit" ,python-tomlkit)
10615 ("python-virtualenv" ,python-virtualenv)))
10616 (home-page "https://poetry.eustace.io/")
10617 (synopsis "Python dependency management and packaging made easy")
10618 (description "Poetry is a tool for dependency management and packaging
10619in Python. It allows you to declare the libraries your project depends on and
10620it will manage (install/update) them for you.")
10621 (license license:expat)))
10622
44d10b1f
RW
10623(define-public python-lazy-object-proxy
10624 (package
10625 (name "python-lazy-object-proxy")
7454078a 10626 (version "1.4.3")
44d10b1f
RW
10627 (source (origin
10628 (method url-fetch)
10629 (uri (pypi-uri "lazy-object-proxy" version))
10630 (sha256
10631 (base32
7454078a 10632 "1w1aaay424ciz8fz3fkzxb0pxzfxn184f2whpyn4fx72bn50x47k"))))
63d4873b
MO
10633 (native-inputs
10634 `(("python-setuptools-scm" ,python-setuptools-scm-3.3)))
44d10b1f
RW
10635 (build-system python-build-system)
10636 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10637 (synopsis "Lazy object proxy for python")
10638 (description
10639 "Lazy object proxy is an object that wraps a callable but defers the call
10640until the object is actually required, and caches the result of said call.")
10641 (license license:bsd-2)))
10642
10643(define-public python2-lazy-object-proxy
10644 (package-with-python2 python-lazy-object-proxy))
10645
10646(define-public python-dnspython
10647 (package
10648 (name "python-dnspython")
10649 (version "1.15.0")
10650 (source (origin
10651 (method url-fetch)
10652 (uri (string-append "http://www.dnspython.org/kits/"
10653 version "/dnspython-" version ".tar.gz"))
10654 (sha256
10655 (base32
10656 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
10657 (build-system python-build-system)
10658 (arguments '(#:tests? #f)) ; XXX: requires internet access
10659 (home-page "http://www.dnspython.org")
10660 (synopsis "DNS toolkit for Python")
10661 (description
10662 "dnspython is a DNS toolkit for Python. It supports almost all record
10663types. It can be used for queries, zone transfers, and dynamic updates.
10664It supports TSIG authenticated messages and EDNS0.")
10665 (license license:expat)))
10666
10667(define-public python2-dnspython
10668 (package-with-python2 python-dnspython))
10669
10670(define-public python-email-validator
10671 (package
10672 (name "python-email-validator")
10673 (version "1.0.2")
10674 (source
10675 (origin (method url-fetch)
10676 (uri (pypi-uri "email_validator" version))
10677 (sha256
10678 (base32
10679 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
10680 (build-system python-build-system)
10681 (arguments
10682 '(#:phases
10683 (modify-phases %standard-phases
10684 (add-before 'build 'use-dnspython
10685 (lambda _
10686 (substitute* "setup.py"
10687 (("dnspython3") "dnspython"))
10688 #t)))))
10689 (propagated-inputs
10690 `(("python-dnspython" ,python-dnspython)
10691 ("python-idna" ,python-idna)))
10692 (home-page "https://github.com/JoshData/python-email-validator")
10693 (synopsis "Email address validation library for Python")
10694 (description
10695 "This library validates email address syntax and deliverability.")
10696 (license license:cc0)))
10697
10698(define-public python2-email-validator
10699 (package-with-python2 python-email-validator))
10700
10701(define-public python-ukpostcodeparser
10702 (package
10703 (name "python-ukpostcodeparser")
10704 (version "1.0.3")
10705 (source (origin
10706 (method url-fetch)
10707 (uri (pypi-uri "UkPostcodeParser" version))
10708 (sha256
10709 (base32
10710 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10711 (build-system python-build-system)
10712 (home-page "https://github.com/hamstah/ukpostcodeparser")
10713 (synopsis "UK Postcode parser for Python")
10714 (description
10715 "This library provides the @code{parse_uk_postcode} function for
10716parsing UK postcodes.")
10717 (license license:expat)))
10718
10719(define-public python2-ukpostcodeparser
10720 (package-with-python2 python-ukpostcodeparser))
10721
10722(define-public python-faker
10723 (package
10724 (name "python-faker")
10725 (version "0.7.9")
10726 (source (origin
10727 (method url-fetch)
10728 (uri (pypi-uri "Faker" version))
10729 (sha256
10730 (base32
10731 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
10732 (patches
10733 (search-patches "python-faker-fix-build-32bit.patch"))
10734 (modules '((guix build utils)))
10735 (snippet
10736 '(begin
10737 (for-each delete-file (find-files "." "\\.pyc$"))
10738 #t))))
10739 (build-system python-build-system)
10740 (arguments
10741 '(#:phases
10742 (modify-phases %standard-phases
10743 (replace 'check
49ff8827 10744 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
44d10b1f
RW
10745 (native-inputs
10746 `(;; For testing
10747 ("python-email-validator" ,python-email-validator)
10748 ("python-mock" ,python-mock)
10749 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
10750 (propagated-inputs
10751 `(("python-dateutil" ,python-dateutil)
10752 ("python-six" ,python-six)))
10753 (home-page "https://github.com/joke2k/faker")
10754 (synopsis "Python package that generates fake data")
10755 (description
10756 "Faker is a Python package that generates fake data such as names,
10757addresses, and phone numbers.")
10758 (license license:expat)
10759 (properties `((python2-variant . ,(delay python2-faker))))))
10760
10761(define-public python2-faker
10762 (let ((base (package-with-python2 (strip-python2-variant
10763 python-faker))))
10764 (package
10765 (inherit base)
10766 (propagated-inputs
10767 `(("python2-ipaddress" ,python2-ipaddress)
10768 ,@(package-propagated-inputs base))))))
10769
10770(define-public python-pyaml
10771 (package
10772 (name "python-pyaml")
10773 (version "18.11.0")
10774 (source (origin
10775 (method url-fetch)
10776 (uri (pypi-uri "pyaml" version))
10777 (sha256
10778 (base32
10779 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
10780 (build-system python-build-system)
10781 (native-inputs
10782 `(("python-unidecode" ,python-unidecode)))
10783 (propagated-inputs
10784 `(("python-pyyaml" ,python-pyyaml)))
10785 (home-page "https://github.com/mk-fg/pretty-yaml")
10786 (synopsis "YAML pretty-print library for Python")
10787 (description
10788 "pyaml is a PyYAML based python module to produce pretty and readable
10789YAML-serialized data.")
492e3a7a 10790 (license license:wtfpl2)))
44d10b1f
RW
10791
10792(define-public python2-pyaml
10793 (package-with-python2 python-pyaml))
10794
10795(define-public python-backpack
10796 (package
10797 (name "python-backpack")
10798 (version "0.1")
10799 (source
10800 (origin
10801 (method url-fetch)
10802 (uri (pypi-uri "backpack" version))
10803 (sha256
10804 (base32
10805 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
10806 (build-system python-build-system)
10807 (native-inputs
10808 `(("python-pytest" ,python-pytest)
10809 ("python-nose" ,python-nose)))
10810 (propagated-inputs
10811 `(("python-simplejson" ,python-simplejson)))
10812 (home-page "https://github.com/sdispater/backpack")
10813 (synopsis "Utilities for working with Python collections")
10814 (description "Backpack provides some useful utilities for working with
10815collections of data.")
10816 (license license:expat)))
10817
10818(define-public python2-backpack
10819 (package-with-python2 python-backpack))
10820
10821(define-public python-prompt-toolkit
10822 (package
10823 (name "python-prompt-toolkit")
10824 (version "2.0.7")
10825 (source
10826 (origin
10827 (method url-fetch)
10828 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10829 (sha256
10830 (base32
10831 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
10832 (build-system python-build-system)
10833 (arguments
10834 `(#:phases
10835 (modify-phases %standard-phases
10836 (delete 'check)
10837 (add-after 'install 'post-install-check
10838 (lambda* (#:key inputs outputs #:allow-other-keys)
10839 ;; HOME is needed for the test
10840 ;; "test_pathcompleter_can_expanduser".
10841 (setenv "HOME" "/tmp")
10842 (add-installed-pythonpath inputs outputs)
10843 (invoke "py.test"))))))
10844 (propagated-inputs
10845 `(("python-wcwidth" ,python-wcwidth)
10846 ("python-six" ,python-six)
10847 ("python-pygments" ,python-pygments)))
10848 (native-inputs
10849 `(("python-pytest" ,python-pytest)))
10850 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10851 (synopsis "Library for building command line interfaces in Python")
10852 (description
10853 "Prompt-Toolkit is a library for building interactive command line
10854interfaces in Python. It's like GNU Readline but it also features syntax
10855highlighting while typing, out-of-the-box multi-line input editing, advanced
10856code completion, incremental search, support for Chinese double-width
10857characters, mouse support, and auto suggestions.")
10858 (license license:bsd-3)))
10859
10860(define-public python2-prompt-toolkit
10861 (package-with-python2 python-prompt-toolkit))
10862
10863(define-public python-prompt-toolkit-1
10864 (package (inherit python-prompt-toolkit)
10865 (version "1.0.15")
10866 (source
10867 (origin
10868 (method url-fetch)
10869 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10870 (sha256
10871 (base32
10872 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
10873
10874(define-public python2-prompt-toolkit-1
10875 (package-with-python2 python-prompt-toolkit-1))
10876
10877(define-public python-jedi
10878 (package
10879 (name "python-jedi")
296e1aea 10880 (version "0.15.1")
44d10b1f
RW
10881 (source
10882 (origin
10883 (method url-fetch)
10884 (uri (pypi-uri "jedi" version))
10885 (sha256
10886 (base32
296e1aea 10887 "0bp4pxhsynaarbvzblsn5x32lzp29svy3sxfy8i6m5iwz9s9r1ds"))))
44d10b1f
RW
10888 (build-system python-build-system)
10889 (arguments
296e1aea 10890 `(#:phases
44d10b1f 10891 (modify-phases %standard-phases
296e1aea
MC
10892 (add-after 'unpack 'disable-file-completion-test
10893 ;; A single parameterized test currently fail (see:
10894 ;; https://github.com/davidhalter/jedi/issues/1395). Remove it.
10895 (lambda _
10896 (substitute* "test/test_api/test_completion.py"
10897 ((".*'example.py', 'rb\"' \\+ join\\('\\.\\.'.*") ""))
10898 #t))
44d10b1f 10899 (replace 'check
296e1aea
MC
10900 (lambda _
10901 (setenv "HOME" "/tmp")
10902 (invoke "python" "-m" "pytest"))))))
44d10b1f
RW
10903 (native-inputs
10904 `(("python-pytest" ,python-pytest)
10905 ("python-docopt" ,python-docopt)))
10906 (propagated-inputs
10907 `(("python-parso" ,python-parso)))
10908 (home-page "https://github.com/davidhalter/jedi")
10909 (synopsis "Autocompletion and static analysis library for Python")
10910 (description
10911 "Jedi is a static analysis tool for Python that can be used in Integrated
10912Development Environments (@dfn{IDE}s) and text editors. It understands Python
10913on a deeper level than many other static analysis frameworks for Python.
10914
10915Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
10916well.")
10917 (license license:expat)))
10918
10919(define-public python2-jedi
296e1aea 10920 (package-with-python2 python-jedi))
44d10b1f
RW
10921
10922(define-public ptpython
10923 (package
10924 (name "ptpython")
10925 (version "0.34")
10926 (source (origin
10927 (method url-fetch)
10928 (uri (pypi-uri "ptpython" version))
10929 (sha256
10930 (base32
10931 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10932 (build-system python-build-system)
10933 (arguments
10934 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
10935 (propagated-inputs
10936 `(("python-docopt" ,python-docopt)
10937 ("python-jedi" ,python-jedi)
10938 ("python-prompt-toolkit" ,python-prompt-toolkit)
10939 ("python-pygments" ,python-pygments)))
10940 (home-page "https://github.com/jonathanslenders/ptpython")
10941 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10942 (description
10943 "ptpython is a Python read-eval-print loop with IDE-like features.
10944It supports syntax highlighting, multiline editing, autocompletion, mouse,
10945color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10946etc.")
10947 (license license:bsd-3)
10948 (properties `((python2-variant . ,(delay ptpython-2))))))
10949
10950(define-public ptpython-2
10951 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10952 (package
10953 (inherit base)
10954 (name "ptpython2"))))
10955
10956(define-public python-stem
10957 (package
10958 (name "python-stem")
e746d1c3 10959 (version "1.7.1")
44d10b1f
RW
10960 (source
10961 (origin
10962 (method url-fetch)
10963 (uri (pypi-uri "stem" version))
10964 (sha256
10965 (base32
e746d1c3 10966 "18lc95pmc7i089nlsb06dsxyjl5wbhxfqgdxbjcia35ndh8z7sn9"))))
44d10b1f
RW
10967 (build-system python-build-system)
10968 (arguments
10969 `(#:phases
10970 (modify-phases %standard-phases
10971 (replace 'check
10972 (lambda _
10973 (invoke "./run_tests.py" "--unit")
10974 #t)))))
10975 (native-inputs
10976 `(("python-mock" ,python-mock)
10977 ("python-pycodestyle" ,python-pycodestyle)
10978 ("python-pyflakes" ,python-pyflakes)))
10979 (home-page "https://stem.torproject.org/")
10980 (synopsis
10981 "Python controller library that allows applications to interact with Tor")
10982 (description
10983 "Stem is a Python controller library for Tor. With it you can use Tor's
10984control protocol to script against the Tor process and read descriptor data
10985relays publish about themselves.")
10986 (license license:lgpl3)))
10987
10988(define-public python2-stem
10989 (package-with-python2 python-stem))
10990
10991(define-public python-pyserial
10992 (package
10993 (name "python-pyserial")
00d81f98 10994 (version "3.4")
44d10b1f
RW
10995 (source
10996 (origin
10997 (method url-fetch)
10998 (uri (pypi-uri "pyserial" version))
10999 (sha256
11000 (base32
00d81f98 11001 "09y68bczw324a4jb9a1cfwrbjhq179vnfkkkrybbksp0vqgl0bbf"))))
44d10b1f
RW
11002 (build-system python-build-system)
11003 (arguments
11004 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
11005 ;; #:phases
11006 ;; (modify-phases %standard-phases
11007 ;; (replace 'check
11008 ;; (lambda _
11009 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
11010 (home-page
11011 "https://github.com/pyserial/pyserial")
11012 (synopsis "Python Serial Port Bindings")
11013 (description "@code{pyserial} provide serial port bindings for Python. It
11014supports different byte sizes, stop bits, parity and flow control with RTS/CTS
11015and/or Xon/Xoff. The port is accessed in RAW mode.")
11016 (license license:bsd-3)))
11017
11018(define-public python2-pyserial
11019 (package-with-python2 python-pyserial))
11020
11021(define-public python-kivy
11022 (package
11023 (name "python-kivy")
11024 (version "1.10.1")
11025 (source
11026 (origin
11027 (method url-fetch)
11028 (uri (pypi-uri "Kivy" version))
11029 (file-name (string-append name "-" version ".tar.gz"))
11030 (sha256
11031 (base32
11032 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
11033 (build-system python-build-system)
11034 (arguments
11035 `(#:tests? #f ; Tests require many optional packages
11036 #:phases
11037 (modify-phases %standard-phases
11038 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
11039 (lambda* (#:key inputs #:allow-other-keys)
11040 (setenv "KIVY_SDL2_PATH"
11041 (string-append (assoc-ref inputs "sdl-union")
11042 "/include/SDL2"))
11043 #t)))))
11044 (native-inputs
11045 `(("git" ,git)
11046 ("pkg-config" ,pkg-config)
11047 ("python-cython" ,python-cython)))
11048 (inputs
11049 `(("gstreamer" ,gstreamer)
11050 ("mesa" ,mesa)
11051 ("sdl-union"
11052 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
11053 (home-page "http://kivy.org")
11054 (synopsis
11055 "Multitouch application framework")
11056 (description
11057 "A software library for rapid development of
11058hardware-accelerated multitouch applications.")
11059 (license license:expat)))
11060
11061(define-public python2-kivy
11062 (package-with-python2 python-kivy))
11063
11064(define-public python-kivy-next
11065 (deprecated-package "python-kivy-next" python-kivy))
11066
11067(define-public python2-kivy-next
11068 (deprecated-package "python2-kivy-next" python2-kivy))
11069
11070(define-public python-binaryornot
11071 (package
11072 (name "python-binaryornot")
11073 (version "0.4.4")
11074 (source (origin
11075 (method url-fetch)
11076 (uri (pypi-uri "binaryornot" version))
11077 (sha256
11078 (base32
11079 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
11080 (build-system python-build-system)
86723f98
DM
11081 (arguments
11082 `(#:phases
11083 (modify-phases %standard-phases
ee623903 11084 (add-after 'unpack 'patch-tests
86723f98
DM
11085 (lambda _
11086 ;; TypeError: binary() got an unexpected keyword argument
11087 ;; 'average_size'.
11088 (substitute* "tests/test_check.py"
11089 (("average_size=512") ""))
11090 #t)))))
44d10b1f
RW
11091 (propagated-inputs
11092 `(("python-chardet" ,python-chardet)
11093 ("python-hypothesis" ,python-hypothesis)))
11094 (home-page "https://github.com/audreyr/binaryornot")
11095 (synopsis "Package to check if a file is binary or text")
11096 (description "Ultra-lightweight pure Python package to check if a file is
11097binary or text.")
11098 (license license:bsd-3)
11099 (properties `((python2-variant . ,(delay python2-binaryornot))))))
11100
11101(define-public python2-binaryornot
11102 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
11103 (package (inherit base)
11104 (propagated-inputs
11105 `(("python2-enum34" ,python2-enum34)
11106 ,@(package-propagated-inputs base))))))
11107
f315673d
VC
11108(define-public python-binwalk
11109 (let ((commit "64201acfb5b0a9cdd9faa58c40a36dcff8612e29")
11110 (revision "0"))
11111 (package
11112 (name "python-binwalk")
11113 (version (git-version "2.1.1" revision commit))
11114 (source
11115 (origin
11116 (method git-fetch)
11117 (uri (git-reference
11118 (url "https://github.com/ReFirmLabs/binwalk")
11119 (commit commit)))
11120 (file-name (git-file-name name version))
11121 (sha256
11122 (base32
11123 "1z7ca6rfp887hw5jc3sb45mm4fa0xid4lsp2z8g4r590dr7k7w15"))))
11124 (build-system python-build-system)
11125 (arguments
11126 `(#:phases
11127 (modify-phases %standard-phases
11128 (add-before 'check 'set-pythonpath
11129 (lambda _
11130 (setenv "PYTHONPATH"
11131 (string-append
11132 (getcwd) "/src/"
11133 ":" (getenv "PYTHONPATH")))
11134 (setenv "HOME" "")
11135 #t)))))
11136 (native-inputs
11137 `(("python-coverage" ,python-coverage)
11138 ("python-nose" ,python-nose)))
11139 (home-page "https://github.com/ReFirmLabs/binwalk")
11140 (synopsis "Firmware analysis tool")
11141 (description "Binwalk is a tool for analyzing, reverse engineering, and extracting firmware images")
11142 (license license:expat))))
11143
44d10b1f
RW
11144(define-public python-nltk
11145 (package
11146 (name "python-nltk")
11147 (version "3.2.1")
11148 (source (origin
11149 (method url-fetch)
11150 (uri (pypi-uri "nltk" version))
11151 (sha256
11152 (base32
11153 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
11154 (build-system python-build-system)
11155 (arguments
11156 '(;; The tests require some extra resources to be downloaded.
11157 ;; TODO Try packaging these resources.
11158 #:tests? #f))
11159 (home-page "http://nltk.org/")
11160 (synopsis "Natural Language Toolkit")
11161 (description "It provides interfaces to over 50 corpora and lexical
11162resources such as WordNet, along with a suite of text processing libraries
11163for classification, tokenization, stemming, tagging, parsing, and semantic
11164reasoning, wrappers for natural language processing libraries.")
11165 (license license:asl2.0)))
11166
11167(define-public python2-nltk
11168 (package-with-python2 python-nltk))
11169
11170(define-public python-pymongo
11171 (package
11172 (name "python-pymongo")
11173 (version "3.7.2")
11174 (source (origin
11175 (method url-fetch)
11176 (uri (pypi-uri "pymongo" version))
11177 (sha256
11178 (base32
11179 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
11180 (build-system python-build-system)
11181 (propagated-inputs
11182 `(("python-certifi" ,python-certifi)))
11183 (home-page "https://github.com/mongodb/mongo-python-driver")
11184 (synopsis "Python driver for MongoDB")
11185 (description "Python driver for MongoDB.")
11186 (license license:asl2.0)))
11187
11188(define-public python2-pymongo
11189 (package-with-python2 python-pymongo))
11190
44d10b1f
RW
11191(define-public python-consul
11192 (package
11193 (name "python-consul")
11194 (version "0.6.1")
11195 (source
11196 (origin
11197 (method url-fetch)
11198 (uri (pypi-uri "python-consul" version))
11199 (sha256
11200 (base32
11201 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
11202 (build-system python-build-system)
11203 (arguments
11204 '(#:tests? #f)) ; The tests are not distributed
11205 (propagated-inputs
11206 `(("python-requests" ,python-requests)
11207 ("python-six" ,python-six)))
11208 (home-page "https://github.com/cablehead/python-consul")
11209 (synopsis "Python client for Consul")
11210 (description
11211 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
11212discovery, monitoring and configuration.")
11213 (license license:expat)))
11214
11215(define-public python2-consul
11216 (package-with-python2 python-consul))
11217
11218(define-public python-schematics
11219 (package
11220 (name "python-schematics")
11221 (version "1.1.1")
11222 (source
1961d187
TGR
11223 (origin
11224 (method git-fetch)
11225 (uri (git-reference
11226 (url "https://github.com/schematics/schematics.git")
11227 (commit (string-append "v" version))))
11228 (file-name (git-file-name name version))
11229 (sha256
11230 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
44d10b1f
RW
11231 (build-system python-build-system)
11232 (propagated-inputs
11233 `(("python-six" ,python-six)))
11234 (arguments
1961d187
TGR
11235 ;; The tests require a bunch of not very nice packages with fixed
11236 ;; version requirements (e.g. python-coveralls).
11237 `(#:tests? #f))
44d10b1f
RW
11238 (home-page "https://github.com/schematics/schematics")
11239 (synopsis "Python Data Structures for Humans")
11240 (description "Python Data Structures for Humans.")
11241 (license license:bsd-3)))
11242
11243(define-public python2-schematics
11244 (package-with-python2 python-schematics))
11245
11246(define-public python-odfpy
11247 (package
11248 (name "python-odfpy")
11249 (version "1.3.3")
11250 (source (origin
11251 (method url-fetch)
11252 (uri (pypi-uri "odfpy" version))
11253 (sha256
11254 (base32
11255 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
11256 (arguments
11257 `(#:modules ((srfi srfi-1)
11258 (guix build python-build-system)
11259 (guix build utils))
11260 #:phases
11261 (modify-phases %standard-phases
11262 (replace 'check
11263 ;; The test runner invokes python2 and python3 for test*.py.
11264 ;; To avoid having both in inputs, we replicate it here.
11265 (lambda _
21ccc01d
RW
11266 (for-each (lambda (test-file) (invoke "python" test-file))
11267 (find-files "tests" "^test.*\\.py$"))
11268 #t)))))
44d10b1f
RW
11269 (build-system python-build-system)
11270 (home-page "https://github.com/eea/odfpy")
11271 (synopsis "Python API and tools to manipulate OpenDocument files")
11272 (description "Collection of libraries and utility programs written in
11273Python to manipulate OpenDocument 1.2 files.")
11274 (license
11275 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
11276 ;; number of files with other licenses.
11277 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
11278
11279(define-public python2-odfpy
11280 (package-with-python2 python-odfpy))
11281
11282(define-public python-natsort
11283 (package
11284 (name "python-natsort")
11285 (version "5.4.1")
11286 (source (origin
11287 (method url-fetch)
11288 (uri (pypi-uri "natsort" version))
11289 (sha256
11290 (base32
11291 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
11292 (build-system python-build-system)
11293 (arguments
11294 `(#:modules ((guix build utils)
11295 (guix build python-build-system)
11296 (srfi srfi-1)
11297 (srfi srfi-26)
11298 (ice-9 ftw))
11299 #:phases
11300 (modify-phases %standard-phases
11301 (add-before 'check 'set-cachedir
11302 ;; Tests require write access to $HOME by default
11303 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
11304 (replace 'check
11305 (lambda _
11306 (let ((cwd (getcwd)))
11307 (setenv "PYTHONPATH"
11308 (string-append
11309 cwd "/build/"
11310 (find (cut string-prefix? "lib" <>)
11311 (scandir (string-append cwd "/build")))
11312 ":"
11313 (getenv "PYTHONPATH")))
11314 (invoke "pytest" "-v")))))))
11315 (native-inputs
11316 `(("python-hypothesis" ,python-hypothesis)
11317 ("python-pytest-cov" ,python-pytest-cov)
11318 ("python-pytest-mock" ,python-pytest-mock)
11319 ("python-pytest" ,python-pytest)))
11320 (propagated-inputs ; TODO: Add python-fastnumbers.
11321 `(("python-pyicu" ,python-pyicu)))
11322 (home-page "https://github.com/SethMMorton/natsort")
11323 (synopsis "Natural sorting for python and shell")
11324 (description
11325 "Natsort lets you apply natural sorting on lists instead of
11326lexicographical. If you use the built-in @code{sorted} method in python
36a4366d
EF
11327on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
11328@code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
11329@code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
11330identifies numbers and sorts them separately from strings. It can also sort
11331version numbers, real numbers, mixed types and more, and comes with a shell
11332command @command{natsort} that exposes this functionality in the command line.")
44d10b1f
RW
11333 (license license:expat)
11334 (properties `((python2-variant . ,(delay python2-natsort))))))
11335
11336(define-public python2-natsort
11337 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
11338 (package (inherit base)
11339 (native-inputs
11340 `(("python2-pathlib" ,python2-pathlib)
11341 ,@(package-native-inputs base))))))
11342
11343(define-public python-glances
11344 (package
11345 (name "python-glances")
a4ac25df 11346 (version "3.1.2")
44d10b1f
RW
11347 (source
11348 (origin
11349 (method url-fetch)
11350 (uri (pypi-uri "Glances" version))
11351 (sha256
a4ac25df 11352 (base32 "15384pbvw9wj4sb8zgvd9v1812vrypbyjg0acicjf1hdb3p30fkk"))
15b4c911
TGR
11353 (modules '((guix build utils)))
11354 (snippet
11355 '(begin
11356 ;; Glances phones PyPI for weekly update checks by default.
11357 ;; Disable these. The user can re-enable them if desired.
11358 (substitute* "glances/outdated.py"
11359 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
11360 (string-append indentation
11361 "self.args.disable_check_update = True\n"
11362 line)))
11363 #t))))
44d10b1f
RW
11364 (build-system python-build-system)
11365 (propagated-inputs
9898a2d3
TGR
11366 `(("python-future" ,python-future)
11367 ("python-psutil" ,python-psutil)))
a4ac25df 11368 (home-page "https://github.com/nicolargo/glances")
bab94ffa 11369 (synopsis "Cross-platform curses-based monitoring tool")
44d10b1f
RW
11370 (description
11371 "Glances is a curses-based monitoring tool for a wide variety of platforms.
bab94ffa
TGR
11372Glances uses the PsUtil library to get information from your system. It
11373monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
44d10b1f
RW
11374 (license license:lgpl3+)))
11375
11376(define-public python2-glances
11377 (package-with-python2 python-glances))
11378
11379(define-public python-graphql-core
11380 (package
11381 (name "python-graphql-core")
11382 (version "0.5.3")
11383 (source
11384 (origin
11385 (method url-fetch)
11386 (uri (pypi-uri "graphql-core" version))
11387 (sha256
11388 (base32
11389 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
11390 (build-system python-build-system)
11391 (arguments
11392 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
11393 #:phases
11394 (modify-phases %standard-phases
11395 (add-after 'unpack 'patch-hardcoded-version
11396 (lambda _ (substitute*
11397 "setup.py"
11398 (("'gevent==1.1rc1'") "'gevent'"))
11399 #t)))))
11400 (native-inputs
11401 `(("python-gevent" ,python-gevent)
11402 ("python-mock" ,python-mock)
11403 ("python-pytest-mock" ,python-pytest-mock)))
11404 (propagated-inputs
11405 `(("python-promise" ,python-promise)
11406 ("python-six" ,python-six)))
11407 (home-page "https://github.com/graphql-python/graphql-core")
11408 (synopsis "GraphQL implementation for Python")
11409 (description
11410 "GraphQL implementation for Python. GraphQL is a data query language and
11411runtime designed and used to request and deliver data to mobile and web apps.
11412This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
11413to Python.")
11414 (license license:expat)))
11415
11416(define-public python2-graphql-core
11417 (package-with-python2 python-graphql-core))
11418
11419(define-public python-graphql-relay
11420 (package
11421 (name "python-graphql-relay")
11422 (version "0.4.5")
11423 (source
11424 (origin
11425 (method url-fetch)
11426 (uri (pypi-uri "graphql-relay" version))
11427 (sha256
11428 (base32
11429 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
11430 (build-system python-build-system)
11431 (arguments
11432 '(#:tests? #f)) ; The tests are not distributed
11433 (propagated-inputs
11434 `(("python-graphql-core" ,python-graphql-core)
11435 ("python-promise" ,python-promise)
11436 ("python-six" ,python-six)))
11437 (home-page "https://github.com/graphql-python/graphql-relay-py")
11438 (synopsis "Relay implementation for Python")
11439 (description
11440 "This is a library to allow the easy creation of Relay-compliant servers
11441using the GraphQL Python reference implementation of a GraphQL server. It
11442should be noted that the code is a exact port of the original
11443@url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11444from Facebook.")
11445 (license license:expat)))
11446
11447(define-public python2-graphql-relay
11448 (package-with-python2 python-graphql-relay))
11449
11450(define-public python-graphene
11451 (package
11452 (name "python-graphene")
11453 (version "0.10.2")
11454 (source
11455 (origin
11456 (method url-fetch)
11457 (uri (pypi-uri "graphene" version))
11458 (sha256
11459 (base32
11460 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11461 (build-system python-build-system)
11462 (propagated-inputs
11463 `(("python-graphql-core" ,python-graphql-core)
11464 ("python-graphql-relay" ,python-graphql-relay)
11465 ("python-iso8601" ,python-iso8601)
11466 ("python-promise" ,python-promise)
11467 ("python-six" ,python-six)))
11468 (arguments
11469 `(#:tests? #f)) ; no tests/ in the PyPI tarball
11470 (home-page "http://graphene-python.org/")
11471 (synopsis "GraphQL Framework for Python")
11472 (description
11473 "Graphene is a Python library for building GraphQL schemas/types.
11474A GraphQL schema describes your data model, and provides a GraphQL server
11475with an associated set of resolve methods that know how to fetch data.")
11476 (properties `((python2-variant . ,(delay python2-graphene))))
11477 (license license:expat)))
11478
11479(define-public python2-graphene
11480 (let ((base (package-with-python2
11481 (strip-python2-variant python-graphene))))
11482 (package (inherit base)
11483 (native-inputs
11484 `(("python2-sqlalchemy" ,python2-sqlalchemy)
11485 ,@(package-native-inputs base))))))
11486
11487(define-public python-nautilus
11488 (package
11489 (name "python-nautilus")
11490 (version "0.4.9")
11491 (source
11492 (origin
11493 (method url-fetch)
11494 (uri (pypi-uri "nautilus" version))
11495 (sha256
11496 (base32
11497 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11498 (build-system python-build-system)
11499 (arguments `(#:tests? #f)) ; fails to import test modules
11500 (propagated-inputs
11501 `(("python-bcrypt" ,python-bcrypt)
11502 ("python-click" ,python-click)
11503 ("python-consul" ,python-consul)
11504 ("python-graphene" ,python-graphene)
11505 ("python-jinja2" ,python-jinja2)
11506 ("python-peewee" ,python-peewee)
11507 ("python-pika" ,python-pika)
11508 ("python-tornado" ,python-tornado)
11509 ("python-wtforms" ,python-wtforms)))
11510 (native-inputs
11511 `(("python-nose2" ,python-nose2)))
11512 (home-page "https://github.com/AlecAivazis/nautilus")
11513 (synopsis "Library for creating microservice applications")
11514 (description
11515 "Nautilus is a framework for flux based microservices that looks to
11516provide extendible implementations of common aspects of a cloud so that you can
11517focus on building massively scalable web applications.")
11518 (license license:expat)))
11519
11520(define-public python-snowballstemmer
11521 (package
11522 (name "python-snowballstemmer")
11523 (version "1.2.1")
11524 (source (origin
11525 (method url-fetch)
11526 (uri (pypi-uri "snowballstemmer" version))
11527 (sha256
11528 (base32
11529 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
11530 (build-system python-build-system)
11531 (arguments
11532 `(;; No tests exist
11533 #:tests? #f))
11534 (home-page "https://github.com/shibukawa/snowball_py")
11535 (synopsis "Snowball stemming library collection for Python")
11536 (description "This package provides 16 word stemmer algorithms generated
11537from Snowball algorithms. It includes the 15 original ones plus the Poerter
11538English stemmer.")
11539 (license license:bsd-3)))
11540
11541(define-public python2-snowballstemmer
11542 (package-with-python2 python-snowballstemmer))
11543
44d10b1f
RW
11544(define-public python-setproctitle
11545(package
11546 (name "python-setproctitle")
11547 (version "1.1.10")
11548 (source
11549 (origin
11550 (method url-fetch)
11551 (uri (pypi-uri "setproctitle" version))
11552 (sha256
11553 (base32
11554 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11555 (build-system python-build-system)
11556 (arguments
11557 '(#:phases
11558 (modify-phases %standard-phases
11559 (add-before 'check 'patch-Makefile
11560 ;; Stricly this is only required for the python2 variant.
11561 ;; But adding a phase in an inherited package seems to be
11562 ;; cumbersum. So we patch even for python3.
11563 (lambda _
11564 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11565 (when nose
11566 (substitute* "Makefile"
11567 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11568 (string-append nose "/bin/nosetests "))))
11569 #t)))
11570 (replace 'check
11571 (lambda _
11572 (setenv "PYTHON" (or (which "python3") (which "python")))
11573 (setenv "PYCONFIG" (or (which "python3-config")
11574 (which "python-config")))
11575 (setenv "CC" "gcc")
11576 ;; No need to extend PYTHONPATH to find the built package, since
11577 ;; the Makefile will build anyway
11578 (invoke "make" "check"))))))
11579 (native-inputs
11580 `(("procps" ,procps))) ; required for tests
11581 (home-page
11582 "https://github.com/dvarrazzo/py-setproctitle")
11583 (synopsis
11584 "Setproctitle implementation for Python to customize the process title")
11585 (description "The library allows a process to change its title (as displayed
11586by system tools such as ps and top).
11587
11588Changing the title is mostly useful in multi-process systems, for
11589example when a master process is forked: changing the children's title
11590allows to identify the task each process is busy with. The technique
11591is used by PostgreSQL and the OpenSSH Server for example.")
11592 (license license:bsd-3)
11593 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11594
11595(define-public python2-setproctitle
11596 (let ((base (package-with-python2
11597 (strip-python2-variant python-setproctitle))))
11598 (package
11599 (inherit base)
11600 (native-inputs `(("python2-nose" ,python2-nose)
11601 ,@(package-native-inputs base))))))
11602
11603(define-public python-validictory
11604 (package
11605 (name "python-validictory")
11606 (version "1.0.1")
11607 (source
11608 (origin
11609 (method url-fetch)
11610 (uri (pypi-uri "validictory" version))
11611 (sha256
11612 (base32
11613 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11614 (build-system python-build-system)
11615 (arguments
11616 '(#:phases
11617 (modify-phases %standard-phases
11618 (add-after 'unpack 'bootstrap
11619 ;; Move the tests out of the package directory to avoid
11620 ;; packaging them.
11621 (lambda* _
11622 (rename-file "validictory/tests" "tests")
11623 (delete-file "tests/__init__.py")))
11624 (replace 'check
11625 (lambda _
11626 ;; Extend PYTHONPATH so the built package will be found.
11627 (setenv "PYTHONPATH"
11628 (string-append (getcwd) "/build/lib:"
11629 (getenv "PYTHONPATH")))
6568bd5d 11630 (invoke "py.test" "-vv" ))))))
44d10b1f
RW
11631 (native-inputs
11632 `(("python-pytest" ,python-pytest)))
11633 (home-page
11634 "https://github.com/jamesturk/validictory")
11635 (synopsis "General purpose Python data validator")
11636 (description "It allows validation of arbitrary Python data structures.
11637
11638The schema format is based on the JSON Schema
11639proposal (http://json-schema.org), so combined with json the library is also
11640useful as a validator for JSON data.")
11641 (license license:expat)))
11642
11643(define-public python2-validictory
11644 (package-with-python2 python-validictory))
11645
11646(define-public python-pyelftools
11647 (package
11648 (name "python-pyelftools")
11649 (version "0.25")
11650 (source
11651 (origin
11652 (method url-fetch)
11653 (uri (pypi-uri "pyelftools" version))
11654 (sha256
11655 (base32
11656 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
11657 (build-system python-build-system)
11658 (arguments
11659 `(#:phases
11660 (modify-phases %standard-phases
11661 (add-before 'check 'set-pythonpath
11662 (lambda _
11663 (setenv "PYTHONPATH"
11664 (string-append
11665 (getcwd) "/test/"
11666 ":" (getenv "PYTHONPATH")))
11667 #t)))))
11668 (home-page
11669 "https://github.com/eliben/pyelftools")
11670 (synopsis
11671 "Analyze binary and library file information")
11672 (description "This Python library provides interfaces for parsing and
11673analyzing two binary and library file formats; the Executable and Linking
11674Format (ELF), and debugging information in the Debugging With Attributed
11675Record Format (DWARF).")
11676 (license license:public-domain)))
11677
11678(define-public python-pyev
11679 (package
11680 (name "python-pyev")
11681 (version "0.9.0")
11682 (source
11683 (origin
11684 (method url-fetch)
11685 (uri (pypi-uri "pyev" version))
11686 (sha256
11687 (base32
11688 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11689 (build-system python-build-system)
11690 (arguments
11691 `(#:tests? #f ; no test suite
11692 #:phases
11693 (modify-phases %standard-phases
11694 (add-after 'unpack 'patch
11695 (lambda* (#:key inputs #:allow-other-keys)
11696 (let ((libev (string-append (assoc-ref inputs "libev")
11697 "/lib/libev.so.4")))
11698 (substitute* "setup.py"
11699 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
11700 (string-append "libev_dll_name = \"" libev "\"")))))))))
11701 (inputs
11702 `(("libev" ,libev)))
11703 (home-page "http://pythonhosted.org/pyev/")
11704 (synopsis "Python libev interface")
11705 (description "Pyev provides a Python interface to libev.")
11706 (license license:gpl3)))
11707
11708(define-public python2-pyev
11709 (package-with-python2 python-pyev))
11710
11711(define-public python-imagesize
11712 (package
11713 (name "python-imagesize")
11714 (version "1.1.0")
11715 (source
11716 (origin
11717 (method url-fetch)
11718 (uri (pypi-uri "imagesize" version))
11719 (sha256
11720 (base32
11721 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
11722 (build-system python-build-system)
11723 (home-page "https://github.com/shibukawa/imagesize_py")
11724 (synopsis "Gets image size of files in various formats in Python")
11725 (description
11726 "This package allows determination of image size from
11727PNG, JPEG, JPEG2000 and GIF files in pure Python.")
11728 (license license:expat)))
11729
11730(define-public python2-imagesize
11731 (package-with-python2 python-imagesize))
11732
11733(define-public python-termstyle
11734 (package
11735 (name "python-termstyle")
11736 (version "0.1.11")
11737 (source
11738 (origin
11739 (method url-fetch)
11740 (uri (pypi-uri "termstyle" version))
11741 (sha256
11742 (base32
11743 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
11744 (build-system python-build-system)
11745 (arguments
11746 '(#:phases
11747 (modify-phases %standard-phases
11748 (replace 'check
11749 (lambda _
831080a6 11750 (invoke "python" "test3.py"))))))
44d10b1f
RW
11751 (home-page "https://github.com/gfxmonk/termstyle")
11752 (synopsis "Console text coloring for Python")
11753 (description "This package provides console text coloring for Python.")
11754 (license license:bsd-3)))
11755
11756(define-public python-argcomplete
11757 (package
11758 (name "python-argcomplete")
98aecd3a 11759 (version "1.10.3")
44d10b1f 11760 (source
98aecd3a
RW
11761 (origin
11762 (method url-fetch)
11763 (uri (pypi-uri "argcomplete" version))
11764 (sha256
11765 (base32
11766 "02jkc44drb0yjz6x28lvg6rj607n8r2irdpdvyylm8xnycn54zx3"))))
44d10b1f 11767 (build-system python-build-system)
98aecd3a
RW
11768 (arguments
11769 `(#:phases
11770 (modify-phases %standard-phases
11771 (add-after 'unpack 'embed-tool-references
11772 (lambda _
11773 (substitute* "argcomplete/bash_completion.d/python-argcomplete.sh"
11774 ((" grep")
11775 (string-append " " (which "grep")))
11776 ((" egrep")
11777 (string-append " " (which "egrep")))
11778 (("elif which")
11779 (string-append "elif " (which "which")))
11780 (("\\$\\(which")
11781 (string-append "$(" (which "which"))))
11782 #t)))))
11783 (inputs
11784 `(("grep" ,grep)
11785 ("which" ,which)))
44d10b1f 11786 (native-inputs
98aecd3a
RW
11787 `(("python-coverage" ,python-coverage)
11788 ("python-flake8" ,python-flake8)
11789 ("python-pexpect" ,python-pexpect)
11790 ("python-wheel" ,python-wheel)
44d10b1f 11791 ("tcsh" ,tcsh)
98aecd3a
RW
11792 ("fish" ,fish)
11793 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
44d10b1f
RW
11794 (home-page "https://github.com/kislyuk/argcomplete")
11795 (synopsis "Shell tab completion for Python argparse")
11796 (description "argcomplete provides extensible command line tab completion
11797of arguments and options for Python scripts using @code{argparse}. It's
11798particularly useful for programs with many options or sub-parsers that can
11799dynamically suggest completions; for example, when browsing resources over the
11800network.")
11801 (license license:asl2.0)))
11802
11803(define-public python2-argcomplete
11804 (package-with-python2 python-argcomplete))
11805
11806(define-public python-xopen
11807 (package
11808 (name "python-xopen")
24d64989 11809 (version "0.5.0")
44d10b1f
RW
11810 (source
11811 (origin
11812 (method url-fetch)
11813 (uri (pypi-uri "xopen" version))
11814 (sha256
11815 (base32
24d64989 11816 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
44d10b1f 11817 (build-system python-build-system)
24d64989
RW
11818 (propagated-inputs
11819 `(("python-setuptools-scm" ,python-setuptools-scm)))
44d10b1f
RW
11820 (home-page "https://github.com/marcelm/xopen/")
11821 (synopsis "Open compressed files transparently")
11822 (description "This module provides an @code{xopen} function that works like
11823Python's built-in @code{open} function, but can also deal with compressed files.
11824Supported compression formats are gzip, bzip2 and, xz, and are automatically
11825recognized by their file extensions. The focus is on being as efficient as
11826possible on all supported Python versions.")
11827 (license license:expat)))
11828
11829(define-public python2-xopen
11830 (let ((base (package-with-python2
11831 (strip-python2-variant python-xopen))))
11832 (package
11833 (inherit base)
11834 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
11835 ,@(package-propagated-inputs base))))))
11836
11837(define-public python-cheetah
11838 (package
11839 (name "python-cheetah")
11840 (version "3.1.0")
11841 (source
11842 (origin
11843 (method url-fetch)
11844 (uri (pypi-uri "Cheetah3" version))
11845 (sha256
11846 (base32
11847 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
11848 (build-system python-build-system)
11849 (arguments
11850 `(#:modules ((guix build utils)
11851 (guix build python-build-system)
11852 (ice-9 ftw)
11853 (srfi srfi-1)
11854 (srfi srfi-26))
11855 #:phases (modify-phases %standard-phases
11856 (add-after 'unpack 'use-absolute-python
11857 (lambda _
11858 (substitute* "Cheetah/CheetahWrapper.py"
11859 (("#!/usr/bin/env python")
11860 (string-append "#!" (which "python"))))
11861 #t))
11862 (replace 'check
11863 (lambda _
11864 (let ((cwd (getcwd)))
11865 (setenv "PYTHONPATH"
11866 (string-append
11867 cwd "/build/"
11868 (find (cut string-prefix? "lib" <>)
11869 (scandir (string-append cwd "/build")))
11870 ":" (getenv "PYTHONPATH")))
11871 (setenv "PATH"
11872 (string-append (getenv "PATH")
11873 ":" cwd "/bin"))
11874 (setenv "TMPDIR" "/tmp")
11875
11876 (substitute* "Cheetah/Tests/Test.py"
11877 (("unittest.TextTestRunner\\(\\)")
11878 "unittest.TextTestRunner(verbosity=2)"))
11879
11880 (invoke "python" "Cheetah/Tests/Test.py")))))))
11881 (propagated-inputs
11882 `(("python-markdown" ,python-markdown))) ;optional
11883 (home-page "http://cheetahtemplate.org/")
11884 (synopsis "Template engine")
11885 (description "Cheetah is a text-based template engine and Python code
11886generator.
11887
11888Cheetah can be used as a standalone templating utility or referenced as
11889a library from other Python applications. It has many potential uses,
11890but web developers looking for a viable alternative to ASP, JSP, PHP and
11891PSP are expected to be its principle user group.
11892
11893Features:
11894@enumerate
11895@item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
11896 text-based format.
11897@item Cleanly separates content, graphic design, and program code.
11898@item Blends the power and flexibility of Python with a simple template language
11899 that non-programmers can understand.
11900@item Gives template writers full access to any Python data structure, module,
11901 function, object, or method in their templates.
11902@item Makes code reuse easy by providing an object-orientated interface to
11903 templates that is accessible from Python code or other Cheetah templates.
11904 One template can subclass another and selectively reimplement sections of it.
11905@item Provides a simple, yet powerful, caching mechanism that can dramatically
11906 improve the performance of a dynamic website.
11907@item Compiles templates into optimized, yet readable, Python code.
11908@end enumerate")
11909 (license (license:x11-style "file://LICENSE"))))
11910
11911(define-public python2-cheetah
11912 (package-with-python2 python-cheetah))
11913
11914(define-public python-dulwich
11915 (package
11916 (name "python-dulwich")
11917 (version "0.18.6")
11918 (source
11919 (origin
11920 (method url-fetch)
11921 (uri (list (string-append "https://www.dulwich.io/releases/"
11922 "dulwich-" version ".tar.gz")
11923 (pypi-uri "dulwich" version)))
11924 (sha256
11925 (base32
11926 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
11927 (build-system python-build-system)
11928 (arguments
11929 `(#:phases
11930 (modify-phases %standard-phases
11931 (add-before 'check 'fix-tests
11932 (lambda* (#:key inputs #:allow-other-keys)
11933 ;; The tests use Popen with a custom environment which doesn't
11934 ;; include PATH.
11935 (substitute* "dulwich/tests/compat/utils.py"
11936 (("'git'") (string-append "'"
11937 (which "git")
11938 "'")))
11939 (substitute* '("dulwich/tests/test_repository.py"
11940 "dulwich/tests/test_hooks.py")
11941 (("#!/bin/sh") (string-append "#!" (which "sh"))))
11942 (setenv "TEST_RUNNER" "unittest")
11943 (setenv "PYTHONHASHSEED" "random")
11944 #t)))))
11945 (propagated-inputs
11946 `(("python-fastimport" ,python-fastimport)))
11947 (native-inputs
11948 `(("python-mock" ,python-mock)
11949 ("python-geventhttpclient" ,python-geventhttpclient)
11950 ("git" ,git)))
11951 (home-page "https://www.dulwich.io/")
11952 (synopsis "Git implementation in Python")
11953 (description "Dulwich is an implementation of the Git file formats and
11954protocols written in pure Python.")
11955 ;; Can be used with either license.
11956 (license (list license:asl2.0 license:gpl2+))))
11957
11958(define-public python2-dulwich
11959 (package-with-python2 python-dulwich))
11960
11961(define-public python-pbkdf2
11962 (package
11963 (name "python-pbkdf2")
11964 (version "1.3")
11965 (source
11966 (origin
11967 (method url-fetch)
11968 (uri (pypi-uri "pbkdf2" version))
11969 (sha256
11970 (base32
11971 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
11972 (build-system python-build-system)
11973 (arguments
11974 '(#:phases
11975 (modify-phases %standard-phases
11976 (replace 'check
11977 (lambda _
11978 (setenv "PYTHONPATH"
11979 (string-append (getcwd) "/build/lib:"
11980 (getenv "PYTHONPATH")))
ee2bb944 11981 (invoke "python" "test/test_pbkdf2.py"))))))
44d10b1f
RW
11982 (propagated-inputs
11983 `(("python-pycrypto" ,python-pycrypto))) ; optional
11984 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
11985 (synopsis "Password-based key derivation")
11986 (description "This module implements the password-based key derivation
11987function, PBKDF2, specified in RSA PKCS#5 v2.0.
11988
11989PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
11990is part of the RSA Public Key Cryptography Standards series. The provided
11991implementation takes a password or a passphrase and a salt value (and
11992optionally a iteration count, a digest module, and a MAC module) and provides
11993a file-like object from which an arbitrarly-sized key can be read.")
11994 (license license:expat)))
11995
11996(define-public python2-pbkdf2
11997 (package-with-python2 python-pbkdf2))
11998
11999(define-public python-qrcode
12000 (package
12001 (name "python-qrcode")
217ea1a1 12002 (version "6.1")
44d10b1f
RW
12003 (source
12004 (origin
12005 (method url-fetch)
12006 (uri (pypi-uri "qrcode" version))
12007 (sha256
217ea1a1 12008 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
44d10b1f
RW
12009 (build-system python-build-system)
12010 (arguments
12011 ;; FIXME: Tests require packaging 'pymaging'.
12012 '(#:tests? #f))
12013 (propagated-inputs
12014 `(("python-lxml" ,python-lxml) ; for SVG output
12015 ("python-pillow" ,python-pillow) ; for PNG output
12016 ("python-six" ,python-six)))
44d10b1f
RW
12017 (home-page "https://github.com/lincolnloop/python-qrcode")
12018 (synopsis "QR Code image generator")
12019 (description "This package provides a pure Python QR Code generator
12020module. It uses the Python Imaging Library (PIL) to allow for the generation
12021of QR Codes.
12022
12023In addition this package provides a command line tool to generate QR codes and
12024either write these QR codes to a file or do the output as ascii art at the
12025console.")
12026 (license license:bsd-3)))
12027
12028(define-public python2-qrcode
12029 (package-with-python2 python-qrcode))
12030
12031(define-public python-rst2ansi
12032 (package
12033 (name "python-rst2ansi")
12034 (version "0.1.5")
12035 (source
12036 (origin
12037 (method url-fetch)
12038 (uri (pypi-uri "rst2ansi" version))
12039 (sha256
12040 (base32
12041 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
12042 (build-system python-build-system)
12043 (propagated-inputs
12044 `(("python-docutils" ,python-docutils)))
12045 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
12046 (synopsis "Convert RST to ANSI-decorated console output")
12047 (description
12048 "Python module dedicated to rendering RST (reStructuredText) documents
12049to ansi-escaped strings suitable for display in a terminal.")
12050 (license license:expat)))
12051
12052(define-public python-ansi2html
12053 (package
12054 (name "python-ansi2html")
12055 (version "1.2.0")
12056 (source
12057 (origin
12058 (method url-fetch)
12059 (uri (pypi-uri "ansi2html" version))
12060 (sha256
12061 (base32
12062 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
12063 (build-system python-build-system)
12064 (native-inputs
12065 `(("python-mock" ,python-mock)
12066 ("python-nose" ,python-nose)))
12067 (propagated-inputs
12068 `(("python-six" ,python-six)))
12069 (home-page "https://github.com/ralphbean/ansi2html")
12070 (synopsis "Convert ANSI-decorated console output to HTML")
12071 (description
12072 "@command{ansi2html} is a Python library and command line utility for
12073convering text with ANSI color codes to HTML or LaTeX.")
12074 (license license:gpl3+)))
12075
12076(define-public python2-ansi2html
12077 (package-with-python2 python-ansi2html))
12078
12079(define-public python-ddt
12080 (package
12081 (name "python-ddt")
12082 (version "1.1.3")
12083 (source
12084 (origin
12085 (method url-fetch)
12086 (uri (pypi-uri "ddt" version))
12087 (sha256
12088 (base32
12089 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
12090 (build-system python-build-system)
12091 (native-inputs
12092 `(("python-mock" ,python-mock)
12093 ("python-nose" ,python-nose)))
12094 (propagated-inputs
12095 `(("python-six" ,python-six)
12096 ("python-pyyaml" ,python-pyyaml)))
12097 (home-page "https://github.com/txels/ddt")
12098 (synopsis "Data-Driven Tests")
12099 (description
12100 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
12101running it with different test data, and make it appear as multiple test
12102cases.")
12103 (license license:expat)))
12104
12105(define-public python2-ddt
12106 (package-with-python2 python-ddt))
12107
12108(define-public python-pycountry
12109 (package
12110 (name "python-pycountry")
12111 (version "18.5.26")
12112 (source
12113 (origin
12114 (method url-fetch)
12115 (uri (pypi-uri "pycountry" version))
12116 (sha256
12117 (base32
12118 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
12119 (build-system python-build-system)
12120 (home-page "https://bitbucket.org/flyingcircus/pycountry")
12121 (synopsis "ISO databases for languages, countries, currencies, etc.")
12122 (description
12123 "@code{pycountry} provides the ISO databases for the standards:
12124@enumerate
12125@item 639-3 (Languages)
12126@item 3166 (Countries)
12127@item 3166-3 (Deleted Countries)
12128@item 3166-2 (Subdivisions of countries)
12129@item 4217 (Currencies)
12130@item 15924 (Scripts)
12131@end enumerate
12132It includes a copy from Debian’s pkg-isocodes and makes the data accessible
12133through a Python API.")
12134 (license license:lgpl2.1+)))
12135
12136(define-public python2-pycountry
12137 (package-with-python2 python-pycountry))
12138
12139(define-public python-pycosat
12140 (package
12141 (name "python-pycosat")
12142 (version "0.6.1")
12143 (source
12144 (origin
12145 (method url-fetch)
12146 (uri (pypi-uri "pycosat" version))
12147 (sha256
12148 (base32
12149 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
12150 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
12151 (build-system python-build-system)
12152 (home-page "https://github.com/ContinuumIO/pycosat")
12153 (synopsis "Bindings to picosat (a SAT solver)")
12154 (description
12155 "This package provides efficient Python bindings to @code{picosat} on
12156the C level. When importing pycosat, the @code{picosat} solver becomes part
12157of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
12158Problem} (SAT) solver.")
12159 (license license:expat)))
12160
12161(define-public python2-pycosat
12162 (package-with-python2 python-pycosat))
12163
12164(define-public python2-ruamel.ordereddict
12165 (package
12166 (name "python2-ruamel.ordereddict")
12167 (version "0.4.9")
12168 (source
12169 (origin
12170 (method url-fetch)
12171 (uri (pypi-uri "ruamel.ordereddict" version))
12172 (sha256
12173 (base32
12174 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
12175 (build-system python-build-system)
12176 (arguments
12177 `(#:python ,python-2
12178 #:phases
12179 (modify-phases %standard-phases
12180 (delete 'check)
12181 (add-after 'install 'check
12182 (lambda* (#:key inputs outputs #:allow-other-keys)
12183 (add-installed-pythonpath inputs outputs)
f987ac30 12184 (invoke "python" "test/testordereddict.py"))))))
44d10b1f
RW
12185 (home-page "https://bitbucket.org/ruamel/ordereddict")
12186 (synopsis "Version of dict that keeps keys in insertion order")
12187 (description
12188 "This is an implementation of an ordered dictionary with @dfn{Key
12189Insertion Order} (KIO: updates of values do not affect the position of the
12190key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
12191removed and put at the back). The standard library module @code{OrderedDict},
12192implemented later, implements a subset of @code{ordereddict} functionality.
12193Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
12194Order} (KSO, no sorting function can be specified, but a transform can be
12195specified to apply on the key before comparison (e.g. @code{string.lower})).")
12196 (license license:expat)))
12197
12198(define-public python-pypeg2
12199 (package
12200 (name "python-pypeg2")
12201 (version "2.15.2")
12202 (source
12203 (origin
12204 (method url-fetch)
12205 (uri (pypi-uri "pyPEG2" version))
12206 (sha256
12207 (base32
12208 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
12209 (build-system python-build-system)
12210 (propagated-inputs `(("python-lxml" ,python-lxml)))
12211 (arguments
12212 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
12213 '(#:tests? #f))
12214 (home-page "https://fdik.org/pyPEG/")
12215 (synopsis "Parsering Expression Grammars in Python")
12216 (description "PyPEG is an intrinsic parser interpreter framework for
12217Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
12218parse many formal languages.")
12219 (license license:gpl2)))
12220
12221(define-public python-incremental
12222 (package
12223 (name "python-incremental")
12224 (version "17.5.0")
12225 (source
12226 (origin
12227 (method url-fetch)
12228 (uri (pypi-uri "incremental" version))
12229 (sha256
12230 (base32
12231 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
12232 (build-system python-build-system)
12233 (home-page "https://github.com/hawkowl/incremental")
12234 (synopsis "Library for versioning Python projects")
12235 (description "Incremental is a small library that versions your Python
12236projects.")
12237 (license license:expat)))
12238
12239(define-public python2-incremental
12240 (package-with-python2 python-incremental))
12241
12242(define-public python-invoke
12243 (package
12244 (name "python-invoke")
12245 (home-page "http://www.pyinvoke.org/")
a5662319 12246 (version "1.3.0")
44d10b1f
RW
12247 (source (origin
12248 (method url-fetch)
12249 (uri (pypi-uri "invoke" version))
12250 (sha256
12251 (base32
a5662319 12252 "1nn7gad0rvy492acpyhkrp01zsk86acf34qhsvq4xmm6x39788n5"))))
44d10b1f
RW
12253 (build-system python-build-system)
12254 (arguments
12255 ;; XXX: Requires many dependencies that are not yet in Guix.
12256 `(#:tests? #f))
12257 (synopsis "Pythonic task execution")
12258 (description
12259 "Invoke is a Python task execution tool and library, drawing inspiration
12260from various sources to arrive at a powerful and clean feature set. It is
12261evolved from the Fabric project, but focuses on local and abstract concerns
12262instead of servers and network commands.")
12263 (license license:bsd-3)))
12264
12265(define-public python2-invoke
12266 (package-with-python2 python-invoke))
12267
12268(define-public python-automat
12269 (package
12270 (name "python-automat")
919d80a0 12271 (version "0.7.0")
44d10b1f
RW
12272 (source (origin
12273 (method url-fetch)
12274 (uri (pypi-uri "Automat" version))
12275 (sha256
12276 (base32
919d80a0 12277 "03ivg70n3b1cbcd2zvjhk8y4kmqxcvhmili39lmgx09dza1qpmyb"))))
44d10b1f
RW
12278 (build-system python-build-system)
12279 ;; We disable the tests because they require python-twisted, while
12280 ;; python-twisted depends on python-automat. Twisted is optional, but the
12281 ;; tests fail if it is not available. Also see
12282 ;; <https://github.com/glyph/automat/issues/71>.
12283 (arguments '(#:tests? #f))
12284 (native-inputs
12285 `(("python-m2r" ,python-m2r)
12286 ("python-setuptools-scm" ,python-setuptools-scm)
12287 ("python-graphviz" ,python-graphviz)))
12288 (propagated-inputs
12289 `(("python-six" ,python-six)
12290 ("python-attrs" ,python-attrs)))
12291 (home-page "https://github.com/glyph/Automat")
12292 (synopsis "Self-service finite-state machines")
12293 (description "Automat is a library for concise, idiomatic Python
12294expression of finite-state automata (particularly deterministic finite-state
12295transducers).")
12296 (license license:expat)))
12297
12298(define-public python2-automat
12299 (package-with-python2 python-automat))
12300
12301(define-public python-m2r
12302 (package
12303 (name "python-m2r")
bcfb8fac 12304 (version "0.2.1")
44d10b1f
RW
12305 (source (origin
12306 (method url-fetch)
12307 (uri (pypi-uri "m2r" version))
12308 (sha256
12309 (base32
bcfb8fac 12310 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
44d10b1f
RW
12311 (build-system python-build-system)
12312 (propagated-inputs
12313 `(("python-docutils" ,python-docutils)
12314 ("python-mistune" ,python-mistune)))
12315 (native-inputs
12316 `(("python-pygments" ,python-pygments)
12317 ("python-mock" ,python-mock)))
12318 (home-page "https://github.com/miyakogi/m2r")
12319 (synopsis "Markdown to reStructuredText converter")
12320 (description "M2R converts a markdown file including reST markups to valid
12321reST format.")
12322 (license license:expat)))
12323
12324(define-public python2-m2r
12325 (package-with-python2 python-m2r))
12326
12327(define-public python-constantly
12328 (package
12329 (name "python-constantly")
12330 (version "15.1.0")
12331 (source (origin
12332 (method url-fetch)
12333 (uri (pypi-uri "constantly" version))
12334 (sha256
12335 (base32
12336 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
12337 (build-system python-build-system)
12338 (home-page "https://github.com/twisted/constantly")
12339 (synopsis "Symbolic constants in Python")
12340 (description "Constantly is a Python library that provides symbolic
12341constant support. It includes collections and constants with text, numeric,
12342and bit flag values.")
12343 (license license:expat)))
12344
12345(define-public python2-constantly
12346 (package-with-python2 python-constantly))
12347
12348(define-public python-attrs
12349 (package
12350 (name "python-attrs")
c41d5144 12351 (version "19.1.0")
44d10b1f
RW
12352 (source (origin
12353 (method url-fetch)
12354 (uri (pypi-uri "attrs" version))
12355 (sha256
12356 (base32
c41d5144 12357 "16g33zr5f449lqc5wgvzpknxryfzrfsxcr6kpgxwn7l5fkv71f7h"))))
44d10b1f
RW
12358 (build-system python-build-system)
12359 (arguments
12360 `(#:modules ((guix build utils)
12361 (guix build python-build-system)
12362 (ice-9 ftw)
12363 (srfi srfi-1)
12364 (srfi srfi-26))
12365 #:phases (modify-phases %standard-phases
12366 (replace 'check
12367 (lambda _
12368 (let ((cwd (getcwd)))
12369 (setenv "PYTHONPATH"
12370 (string-append
12371 cwd "/build/"
12372 (find (cut string-prefix? "lib" <>)
12373 (scandir (string-append cwd "/build")))
12374 ":"
12375 (getenv "PYTHONPATH")))
12376 (invoke "python" "-m" "pytest")))))))
12377 (native-inputs
12378 `(("python-coverage" ,python-coverage)
12379 ("python-hypothesis" ,python-hypothesis)
12380 ("python-pympler" ,python-pympler)
12381 ("python-pytest" ,python-pytest)
12382 ("python-six" ,python-six)
12383 ("python-sphinx" ,python-sphinx)
12384 ("python-zope-interface" ,python-zope-interface)))
12385 (home-page "https://github.com/python-attrs/attrs/")
12386 (synopsis "Attributes without boilerplate")
12387 (description "@code{attrs} is a Python package with class decorators that
12388ease the chores of implementing the most common attribute-related object
12389protocols.")
12390 (license license:expat)))
12391
12392(define-public python2-attrs
12393 (package-with-python2 python-attrs))
12394
12395(define-public python-attrs-bootstrap
12396 (package
12397 (inherit python-attrs)
12398 (name "python-attrs-bootstrap")
44d10b1f
RW
12399 (native-inputs `())
12400 (arguments `(#:tests? #f))))
12401
12402(define-public python2-attrs-bootstrap
12403 (package-with-python2 python-attrs-bootstrap))
12404
12405(define-public python2-cliapp
12406 (package
12407 (name "python2-cliapp")
9064b84e 12408 (version "1.20180812.1")
44d10b1f
RW
12409 (source
12410 (origin
12411 (method url-fetch)
12412 (uri (string-append
12413 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
12414 version ".tar.gz"))
12415 (sha256
12416 (base32
9064b84e 12417 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
44d10b1f
RW
12418 (build-system python-build-system)
12419 (arguments
12420 `(#:python ,python-2
12421 #:phases
12422 (modify-phases %standard-phases
12423 ;; check phase needs to be run before the build phase. If not,
12424 ;; coverage-test-runner looks for tests for the built source files,
12425 ;; and fails.
12426 (delete 'check)
12427 (add-before 'build 'check
12428 (lambda _
12429 ;; Disable python3 tests
12430 (substitute* "check"
12431 (("python3") "# python3"))
6c826d32 12432 (invoke "./check"))))))
44d10b1f
RW
12433 (native-inputs
12434 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12435 ("python2-pep8" ,python2-pep8)))
12436 (propagated-inputs
12437 `(("python2-pyaml" ,python2-pyaml)))
12438 (home-page "https://liw.fi/cliapp/")
12439 (synopsis "Python framework for command line programs")
12440 (description "@code{python2-cliapp} is a python framework for
12441command line programs. It contains the typical stuff such programs
12442need to do, such as parsing the command line for options, and
12443iterating over input files.")
12444 (license license:gpl2+)))
12445
12446(define-public python2-ttystatus
12447 (package
12448 (name "python2-ttystatus")
e516a9c2 12449 (version "0.36")
44d10b1f
RW
12450 (source
12451 (origin
12452 (method url-fetch)
12453 (uri (string-append
12454 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
12455 version ".tar.gz"))
12456 (sha256
12457 (base32
e516a9c2 12458 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
44d10b1f
RW
12459 (build-system python-build-system)
12460 (native-inputs
12461 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12462 ("python2-pep8" ,python2-pep8)))
12463 (arguments
12464 `(#:python ,python-2
12465 #:phases
12466 (modify-phases %standard-phases
12467 ;; check phase needs to be run before the build phase. If not,
12468 ;; coverage-test-runner looks for tests for the built source files,
12469 ;; and fails.
12470 (delete 'check)
12471 (add-before 'build 'check
cbeee881 12472 (lambda _ (invoke "make" "check"))))))
44d10b1f
RW
12473 (home-page "https://liw.fi/ttystatus/")
12474 (synopsis "Python library for showing progress reporting and
12475status updates on terminals")
12476 (description "@code{python2-ttystatus} is a python library for
12477showing progress reporting and status updates on terminals, for
12478command line programs. Output is automatically adapted to the width
12479of the terminal: truncated if it does not fit, and resized if the
12480terminal size changes.")
12481 (license license:gpl3+)))
12482
12483(define-public python2-tracing
12484 (package
12485 (name "python2-tracing")
12486 (version "0.10")
12487 (source
12488 (origin
12489 (method url-fetch)
12490 (uri (string-append
12491 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
12492 version ".tar.gz"))
12493 (sha256
12494 (base32
12495 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
12496 (build-system python-build-system)
12497 (arguments
12498 `(#:python ,python-2))
12499 (home-page "https://liw.fi/tracing/")
12500 (synopsis "Python debug logging helper")
12501 (description "@code{python2-tracing} is a python library for
12502logging debug messages. It provides a way to turn debugging messages
12503on and off, based on the filename they occur in. It is much faster
12504than using @code{logging.Filter} to accomplish the same thing, which
12505matters when code is run in production mode. The actual logging still
12506happens using the @code{logging} library.")
12507 (license license:gpl3+)))
12508
12509(define-public python2-larch
12510 (package
12511 (name "python2-larch")
12512 (version "1.20151025")
12513 (source
12514 (origin
12515 (method url-fetch)
12516 (uri (string-append
12517 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
12518 version ".tar.gz"))
12519 (patches (search-patches
12520 "python2-larch-coverage-4.0a6-compatibility.patch"))
12521 (sha256
12522 (base32
12523 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
12524 (build-system python-build-system)
12525 (arguments
12526 `(#:python ,python-2
12527 #:phases
12528 (modify-phases %standard-phases
12529 ;; check phase needs to be run before the build phase. If not,
12530 ;; coverage-test-runner looks for tests for the built source files,
12531 ;; and fails.
12532 (delete 'check)
12533 (add-before 'build 'check
204ad455 12534 (lambda _ (invoke "make" "check"))))))
44d10b1f
RW
12535 (native-inputs
12536 `(("cmdtest" ,cmdtest)
12537 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
12538 (propagated-inputs
12539 `(("python2-tracing" ,python2-tracing)))
12540 (home-page "https://liw.fi/larch/")
12541 (synopsis "Python copy-on-write B-tree library")
12542 (description "@code{python2-larch} is an implementation of
12543particular kind of B-tree, based on research by Ohad Rodeh. See
12544@url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
12545on the data structure.
12546
12547The distinctive feature of this B-tree is that a node is never
12548(conceptually) modified. Instead, all updates are done by
12549copy-on-write. This makes it easy to clone a tree, and modify only the
12550clone, while other processes access the original tree.")
12551 (license license:gpl3+)))
12552
12553(define-public python-astroid
12554 (package
12555 (name "python-astroid")
1c43c698 12556 (version "2.3.3")
44d10b1f
RW
12557 (source
12558 (origin
12559 (method url-fetch)
12560 (uri (pypi-uri "astroid" version))
12561 (sha256
1c43c698 12562 (base32 "0fnibsl2cb5mvzbfm7sycj85smx48f8w8m7ks1sqlmpr9ps0gski"))))
44d10b1f
RW
12563 (build-system python-build-system)
12564 (propagated-inputs
12565 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
12566 ("python-six" ,python-six)
f0935460 12567 ("python-typed-ast" ,python-typed-ast)
44d10b1f
RW
12568 ("python-wrapt" ,python-wrapt)))
12569 (native-inputs
12570 `(("python-dateutil" ,python-dateutil)
12571 ("python-nose" ,python-nose)
12572 ("python-pytest" ,python-pytest)
12573 ("python-pytest-runner" ,python-pytest-runner)))
12574 (arguments
12575 `(#:phases
12576 (modify-phases %standard-phases
12577 (add-after 'unpack 'remove-spurious-test
12578 (lambda _
12579 ;; This can be removed after upgrading from python-3.7
12580 ;; https://github.com/PyCQA/astroid/issues/593
12581 ;; https://bugs.python.org/issue34056
12582 (delete-file "astroid/tests/unittest_modutils.py")
12583 #t))
12584 (replace 'check
12585 (lambda _
12586 (invoke "pytest" "astroid"))))))
12587 (home-page "https://github.com/PyCQA/astroid")
12588 (synopsis "Common base representation of python source code for pylint and
12589other projects")
12590 (description "@code{python-astroid} provides a common base representation
12591of python source code for projects such as pychecker, pyreverse, pylint, etc.
12592
12593It provides a compatible representation which comes from the _ast module. It
12594rebuilds the tree generated by the builtin _ast module by recursively walking
12595down the AST and building an extended ast. The new node classes have
12596additional methods and attributes for different usages. They include some
12597support for static inference and local name scopes. Furthermore, astroid
12598builds partial trees by inspecting living objects.")
12599 (license license:lgpl2.1+)
12600 (properties `((python2-variant . ,(delay python2-astroid))))))
12601
12602(define-public python2-astroid
12603 (let ((base (package-with-python2
12604 (strip-python2-variant python-astroid))))
12605 (package (inherit base)
12606 ;; Version 2.x removes python2 support.
12607 (version "1.6.5")
12608 (source
12609 (origin
12610 (method url-fetch)
12611 (uri (pypi-uri "astroid" version))
12612 (sha256
12613 (base32
12614 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
12615 (arguments
12616 (substitute-keyword-arguments (package-arguments base)
12617 ((#:phases phases)
12618 `(modify-phases ,phases
12619 (add-after 'unpack 'remove-spurious-test
12620 (lambda _
12621 ;; https://github.com/PyCQA/astroid/issues/276
12622 (delete-file "astroid/tests/unittest_brain.py")
12623 #t))
12624 (replace 'check
12625 (lambda _
12626 (invoke"python" "-m" "unittest" "discover"
12627 "-p" "unittest*.py")))))))
12628 (native-inputs `())
12629 (propagated-inputs
12630 `(("python2-backports-functools-lru-cache"
12631 ,python2-backports-functools-lru-cache)
12632 ("python2-enum34" ,python2-enum34)
12633 ("python2-singledispatch" ,python2-singledispatch)
741f98b3
MO
12634 ,@(alist-delete "python-typed-ast"
12635 (package-propagated-inputs base)))))))
44d10b1f
RW
12636
12637(define-public python-isort
12638 (package
12639 (name "python-isort")
e2227b6a 12640 (version "4.3.4")
44d10b1f
RW
12641 (source
12642 (origin
e2227b6a
EF
12643 (method git-fetch)
12644 (uri (git-reference
12645 ;; Tests pass only from the Github sources
12646 (url "https://github.com/timothycrosley/isort")
12647 (commit version)))
12648 (file-name (git-file-name name version))
44d10b1f
RW
12649 (sha256
12650 (base32
e2227b6a 12651 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
44d10b1f
RW
12652 (build-system python-build-system)
12653 (native-inputs
12654 `(("python-mock" ,python-mock)
12655 ("python-pytest" ,python-pytest)))
12656 (home-page "https://github.com/timothycrosley/isort")
12657 (synopsis "Python utility/library to sort python imports")
12658 (description "@code{python-isort} is a python utility/library to sort
12659imports alphabetically, and automatically separated into sections. It
12660provides a command line utility, a python library and plugins for various
12661editors.")
e2227b6a
EF
12662 (license license:expat)
12663 (properties `((python2-variant . ,(delay python2-isort))))))
44d10b1f
RW
12664
12665(define-public python2-isort
e2227b6a
EF
12666 (let ((base (package-with-python2
12667 (strip-python2-variant python-isort))))
12668 (package (inherit base)
12669 (native-inputs
12670 `(("python2-futures" ,python2-futures)
12671 ,@(package-native-inputs base))))))
44d10b1f
RW
12672
12673(define-public python2-backports-functools-lru-cache
12674 (package
12675 (name "python2-backports-functools-lru-cache")
12676 (version "1.5")
12677 (source
12678 (origin
12679 (method url-fetch)
12680 ;; only the pypi tarballs contain the necessary metadata
12681 (uri (pypi-uri "backports.functools_lru_cache" version))
12682 (sha256
12683 (base32
12684 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
12685 (build-system python-build-system)
12686 (native-inputs
12687 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
12688 (arguments
12689 `(#:python ,python-2))
12690 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
12691 (synopsis "Backport of functools.lru_cache from Python 3.3")
12692 (description "@code{python2-backports-functools-lru-cache} is a backport
12693of @code{functools.lru_cache} from python 3.3.")
12694 (license license:expat)))
12695
12696(define-public python-configparser
12697 (package
12698 (name "python-configparser")
84127f8c 12699 (version "3.7.1")
44d10b1f
RW
12700 (source
12701 (origin
12702 (method url-fetch)
84127f8c 12703 (uri (pypi-uri "configparser" version))
44d10b1f
RW
12704 (sha256
12705 (base32
84127f8c 12706 "0cnz213il9lhgda6x70fw7mfqr8da43s3wm343lwzhqx94mgmmav"))))
44d10b1f 12707 (build-system python-build-system)
809f003f 12708 (home-page "https://github.com/jaraco/configparser/")
44d10b1f
RW
12709 (synopsis "Backport of configparser from python 3.5")
12710 (description "@code{python-configparser} is a backport of
12711@code{configparser} from Python 3.5 so that it can be used directly
12712in other versions.")
12713 (license license:expat)))
12714
12715(define-public python2-configparser
12716 (package-with-python2 python-configparser))
12717
12718(define-public python-mando
12719 (package
12720 (name "python-mando")
12721 (version "0.6.4")
12722 (source (origin
12723 (method url-fetch)
12724 (uri (pypi-uri "mando" version))
12725 (sha256
12726 (base32
12727 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
12728 (build-system python-build-system)
12729 (propagated-inputs
12730 `(("python-rst2ansi" ,python-rst2ansi)
12731 ("python-six" ,python-six)))
12732 (native-inputs
12733 `(("python-pytest" ,python-pytest)))
12734 (home-page "https://mando.readthedocs.org/")
12735 (synopsis
12736 "Wrapper around argparse, allowing creation of complete CLI applications")
12737 (description
12738 "This package is a wrapper around argparse, allowing you to write complete CLI
12739applications in seconds while maintaining all the flexibility.")
12740 (license license:expat)))
12741
12742(define-public python2-mando
12743 (package-with-python2 python-mando))
12744
70daf82f
RW
12745(define-public python2-argparse
12746 (package
12747 (name "python2-argparse")
12748 (version "1.4.0")
12749 (source
12750 (origin
12751 (method url-fetch)
12752 (uri (pypi-uri "argparse" version))
12753 (sha256
12754 (base32
12755 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
12756 (build-system python-build-system)
12757 (arguments
12758 `(#:python ,python-2))
12759 (home-page "https://github.com/ThomasWaldmann/argparse/")
12760 (synopsis "Python command-line parsing library")
12761 (description
12762 "This package is mostly for people who want to have @code{argparse} on
12763older Pythons because it was not part of the standard library back then.")
12764 (license license:psfl)))
12765
44d10b1f
RW
12766(define-public python-fudge
12767 (package
12768 (name "python-fudge")
12769 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
12770 ;; package, which is currently the only use of this package.
12771 (version "0.9.6")
12772 (source
12773 (origin
12774 (method url-fetch)
12775 (uri (pypi-uri "fudge" version))
12776 (sha256
12777 (base32
12778 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
12779 (build-system python-build-system)
12780 (arguments
12781 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
12782 (home-page "https://github.com/fudge-py/fudge")
12783 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
12784 (description
12785 "Fudge is a Python module for using fake objects (mocks and stubs) to
12786test real ones.
12787
12788In readable Python code, you declare the methods available on your fake object
12789and how they should be called. Then you inject that into your application and
12790start testing. This declarative approach means you don’t have to record and
12791playback actions and you don’t have to inspect your fakes after running code.
12792If the fake object was used incorrectly then you’ll see an informative
12793exception message with a traceback that points to the culprit.")
12794 (license license:expat)))
12795
12796(define-public python2-fudge
12797 (package-with-python2 python-fudge))
12798
12799(define-public python-mwclient
12800 (package
12801 (name "python-mwclient")
957c6833 12802 (version "0.10.0")
44d10b1f
RW
12803 (source
12804 (origin
957c6833 12805 (method git-fetch)
44d10b1f 12806 ;; The PyPI version wouldn't contain tests.
957c6833
EF
12807 (uri (git-reference
12808 (url "https://github.com/mwclient/mwclient")
12809 (commit (string-append "v" version))))
12810 (file-name (git-file-name name version))
44d10b1f
RW
12811 (sha256
12812 (base32
957c6833 12813 "1c3q6lwmb05yqywc4ya98ca7hsl15niili8rccl4n1yqp77c103v"))))
44d10b1f
RW
12814 (build-system python-build-system)
12815 (propagated-inputs
957c6833 12816 `(("python-requests-oauthlib" ,python-requests-oauthlib)
44d10b1f
RW
12817 ("python-six" ,python-six)))
12818 (native-inputs
12819 `(("python-mock" ,python-mock)
12820 ("python-pytest" ,python-pytest)
44d10b1f 12821 ("python-pytest-cov" ,python-pytest-cov)
957c6833 12822 ("python-pytest-runner" ,python-pytest-runner)
44d10b1f
RW
12823 ("python-responses" ,python-responses)))
12824 (home-page "https://github.com/btongminh/mwclient")
12825 (synopsis "MediaWiki API client")
12826 (description "This package provides a MediaWiki API client.")
12827 (license license:expat)))
12828
12829(define-public python2-mwclient
12830 (package-with-python2 python-mwclient))
12831
12832(define-public python-utils
12833 (package
12834 (name "python-utils")
12835 (version "2.1.0")
12836 (source (origin
12837 (method url-fetch)
12838 (uri (pypi-uri "python-utils" version))
12839 (sha256
12840 (base32
12841 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
12842 (build-system python-build-system)
12843 (native-inputs
12844 `(("pytest-runner" ,python-pytest-runner)
12845 ("pytest" ,python-pytest)
12846 ("six" ,python-six)))
12847 (home-page "https://github.com/WoLpH/python-utils")
12848 (synopsis "Convenient utilities not included with the standard Python install")
12849 (description
12850 "Python Utils is a collection of small Python functions and classes which
12851make common patterns shorter and easier.")
12852 (license license:bsd-2)))
12853
12854(define-public python2-utils
12855 (package-with-python2 python-utils))
12856
44d10b1f
RW
12857(define-public python-diff-match-patch
12858 (package
12859 (name "python-diff-match-patch")
12860 (version "20121119")
12861 (source
12862 (origin
12863 (method url-fetch)
12864 (uri (pypi-uri "diff-match-patch" version))
12865 (sha256
12866 (base32
12867 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
12868 (build-system python-build-system)
12869 (home-page "https://code.google.com/p/google-diff-match-patch")
12870 (synopsis "Synchronize plain text")
12871 (description "Diff Match and Patch libraries offer robust algorithms to
12872perform the operations required for synchronizing plain text.")
12873 (license license:asl2.0)))
12874
12875(define-public python2-diff-match-patch
12876 (package-with-python2 python-diff-match-patch))
12877
12878(define-public python-dirsync
12879 (package
12880 (name "python-dirsync")
12881 (version "2.2.3")
12882 (source
12883 (origin
12884 (method url-fetch)
12885 (uri (pypi-uri "dirsync" version))
12886 (sha256
12887 (base32
12888 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
12889 (build-system python-build-system)
12890 (propagated-inputs
12891 `(("six" ,python-six)))
12892 (home-page "https://bitbucket.org/tkhyn/dirsync")
12893 (synopsis "Advanced directory tree synchronisation tool")
12894 (description "Advanced directory tree synchronisation tool.")
12895 (license license:expat)))
12896
12897(define-public python2-dirsync
12898 (package-with-python2 python-dirsync))
12899
12900(define-public python-levenshtein
12901 (package
12902 (name "python-levenshtein")
12903 (version "0.12.0")
12904 (source
12905 (origin
12906 (method url-fetch)
12907 (uri (pypi-uri "python-Levenshtein" version))
12908 (sha256
12909 (base32
12910 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
12911 (build-system python-build-system)
12912 (home-page "https://github.com/ztane/python-Levenshtein")
12913 (synopsis "Fast computation of Levenshtein distance and string similarity")
12914 (description
12915 "The Levenshtein Python C extension module contains functions for fast computation of
12916@enumerate
12917@item Levenshtein (edit) distance, and edit operations
12918@item string similarity
12919@item approximate median strings, and generally string averaging
12920@item string sequence and set similarity
12921@end enumerate
12922It supports both normal and Unicode strings.")
12923 (license license:gpl2+)))
12924
12925(define-public python2-levenshtein
12926 (package-with-python2 python-levenshtein))
12927
12928(define-public python-scandir
12929 (package
12930 (name "python-scandir")
12931 (version "1.9.0")
12932 (source
12933 (origin
12934 (method url-fetch)
12935 (uri (pypi-uri "scandir" version))
12936 (sha256
12937 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
12938 (build-system python-build-system)
12939 (arguments
12940 `(#:phases (modify-phases %standard-phases
12941 (replace 'check
12942 (lambda _
12943 (invoke "python" "test/run_tests.py"))))))
12944 (home-page "https://github.com/benhoyt/scandir")
12945 (synopsis "Directory iteration function")
12946 (description
12947 "Directory iteration function like os.listdir(), except that instead of
12948returning a list of bare filenames, it yields DirEntry objects that include
12949file type and stat information along with the name. Using scandir() increases
12950the speed of os.walk() by 2-20 times (depending on the platform and file
12951system) by avoiding unnecessary calls to os.stat() in most cases.
12952
12953This package is part of the Python standard library since version 3.5.")
12954 (license license:bsd-3)))
12955
12956(define-public python2-scandir
12957 (package-with-python2 python-scandir))
12958
12959(define-public python2-stemming
12960 (package
12961 (name "python2-stemming")
12962 (version "1.0.1")
12963 (source
12964 (origin
12965 (method url-fetch)
12966 (uri (pypi-uri "stemming" version))
12967 (sha256
12968 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
12969 (build-system python-build-system)
12970 (arguments
12971 `(#:python ,python-2))
12972 (home-page "https://bitbucket.org/mchaput/stemming/overview")
12973 (synopsis "Python implementations of various stemming algorithms")
12974 (description
12975 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
12976stemming algorithms for English. These implementations are straightforward and
12977efficient, unlike some Python versions of the same algorithms available on the
12978Web. This package is an extraction of the stemming code included in the Whoosh
12979search engine.")
12980 (license license:public-domain)))
12981
12982(define-public python-factory-boy
12983 (package
12984 (name "python-factory-boy")
12985 (version "2.8.1")
12986 (source
12987 (origin
12988 (method url-fetch)
12989 (uri (pypi-uri "factory_boy" version))
12990 (sha256
12991 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
12992 (build-system python-build-system)
12993 (arguments
12994 ;; Tests are not included in the tarball.
12995 `(#:tests? #f))
12996 (propagated-inputs
12997 `(("faker" ,python-faker)))
12998 (home-page "https://github.com/benhoyt/scandir")
12999 (synopsis "Versatile test fixtures replacement")
13000 (description
13001 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
13002
13003As a fixtures replacement tool, it aims to replace static, hard to maintain
13004fixtures with easy-to-use factories for complex object.
13005
13006Instead of building an exhaustive test setup with every possible combination
13007of corner cases, factory_boy allows you to use objects customized for the
13008current test, while only declaring the test-specific fields")
13009 (license license:expat)))
13010
13011(define-public python2-factory-boy
13012 (package-with-python2 python-factory-boy))
13013
13014(define-public python-translate-toolkit
13015 (package
13016 (name "python-translate-toolkit")
13017 (version "2.1.0")
13018 (source
13019 (origin
13020 (method url-fetch)
13021 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
13022 (sha256
13023 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
13024 (build-system python-build-system)
13025 (native-inputs
13026 `(("python-pytest" ,python-pytest)
13027 ("python-sphinx" ,python-sphinx)))
13028 (propagated-inputs
13029 `(("python-babel" ,python-babel)
13030 ("python-beautifulsoup4" ,python-beautifulsoup4)
13031 ("python-chardet" ,python-chardet)
13032 ("python-diff-match-patch" ,python-diff-match-patch)
13033 ("python-levenshtein" ,python-levenshtein)
13034 ("python-lxml" ,python-lxml)
13035 ("python-six" ,python-six)
13036 ("python-vobject" ,python-vobject)
13037 ("python-pyyaml" ,python-pyyaml)))
13038 (arguments
13039 ;; TODO: tests are not run, because they end with
13040 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
13041 ;; 'parse_funcs'
13042 ;; during test setup.
13043 `(#:tests? #f))
18919cf9 13044 (home-page "https://toolkit.translatehouse.org")
44d10b1f
RW
13045 (synopsis "Tools and API for translation and localization engineering")
13046 (description
13047 "Tools and API for translation and localization engineering. It contains
13048several utilities, as well as an API for building localization tools.")
13049 (license license:gpl2+)))
13050
13051(define-public python2-translate-toolkit
13052 (package-with-python2 python-translate-toolkit))
13053
13054(define-public python-packaging
13055 (package
13056 (name "python-packaging")
a72a1892 13057 (version "20.0")
44d10b1f
RW
13058 (source
13059 (origin
13060 (method url-fetch)
13061 (uri (pypi-uri "packaging" version))
fdd0c369 13062 (patches (search-patches "python-packaging-test-arch.patch"))
44d10b1f
RW
13063 (sha256
13064 (base32
a72a1892 13065 "1y2ip3a4ykkpgnwgn85j6hkspcl0cg3mzms97f40mk57vwqq67gy"))))
44d10b1f
RW
13066 (build-system python-build-system)
13067 (arguments
13068 `(#:phases (modify-phases %standard-phases
13069 (replace 'check
13070 (lambda _ (invoke "py.test" "-vv"))))))
13071 (native-inputs
13072 `(("python-pretend" ,python-pretend)
13073 ("python-pytest" ,python-pytest)))
13074 (propagated-inputs
13075 `(("python-pyparsing" ,python-pyparsing)
13076 ("python-six" ,python-six)))
13077 (home-page "https://github.com/pypa/packaging")
13078 (synopsis "Core utilities for Python packages")
13079 (description "Packaging is a Python module for dealing with Python packages.
13080It offers an interface for working with package versions, names, and dependency
13081information.")
13082 ;; From 'LICENSE': This software is made available under the terms of
13083 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
13084 ;; Contributions to this software is made under the terms of *both* these
13085 ;; licenses.
13086 (license (list license:asl2.0 license:bsd-2))))
13087
13088(define-public python2-packaging
13089 (package-with-python2 python-packaging))
13090
13091(define-public python-relatorio
13092 (package
13093 (name "python-relatorio")
13094 (version "0.8.0")
13095 (source
13096 (origin
13097 (method url-fetch)
13098 (uri (pypi-uri "relatorio" version))
13099 (sha256
13100 (base32
13101 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
13102 (build-system python-build-system)
13103 (propagated-inputs
13104 `(("python-lxml" ,python-lxml)
13105 ("python-genshi" ,python-genshi)))
13106 (native-inputs
13107 `(("python-magic" ,python-magic)))
13108 (home-page "https://relatorio.tryton.org/")
13109 (synopsis "Templating library able to output ODT and PDF files")
13110 (description "Relatorio is a templating library which provides a way to
13111easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
13112for more filetypes can be easily added by creating plugins for them.")
13113 (license license:gpl3+)))
13114
13115(define-public python2-relatorio
13116 (package-with-python2 python-relatorio))
13117
13118(define-public python-radon
13119 (package
13120 (name "python-radon")
13121 (version "2.2.0")
13122 (source
13123 (origin
13124 (method url-fetch)
13125 (uri (pypi-uri "radon" version))
13126 (sha256
13127 (base32
13128 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
13129 (build-system python-build-system)
13130 (arguments
13131 `(#:phases (modify-phases %standard-phases
13132 (replace 'check
13133 (lambda _
13134 (invoke "python" "radon/tests/run.py"))))))
13135 (propagated-inputs
13136 `(("python-colorama" ,python-colorama)
13137 ("python-flake8-polyfill" ,python-flake8-polyfill)
13138 ("python-mando" ,python-mando)))
13139 (native-inputs
13140 `(("python-pytest" ,python-pytest)
13141 ("python-pytest-mock" ,python-pytest-mock)))
13142 (home-page "https://radon.readthedocs.org/")
13143 (synopsis "Code Metrics in Python")
13144 (description "Radon is a Python tool which computes various code metrics.
13145Supported metrics are:
13146@itemize @bullet
13147@item raw metrics: SLOC, comment lines, blank lines, &c.
13148@item Cyclomatic Complexity (i.e. McCabe’s Complexity)
13149@item Halstead metrics (all of them)
13150@item the Maintainability Index (a Visual Studio metric)
13151@end itemize")
13152 (license license:expat)))
13153
13154(define-public python2-radon
13155 (package-with-python2 python-radon))
13156
13157(define-public python-sure
13158 (package
13159 (name "python-sure")
13160 (version "1.4.11")
13161 (source
13162 (origin
13163 (method url-fetch)
13164 (uri (pypi-uri "sure" version))
13165 (sha256
13166 (base32
13167 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
13168 (build-system python-build-system)
13169 (propagated-inputs
13170 `(("python-mock" ,python-mock)
13171 ("python-six" ,python-six)))
13172 (native-inputs
13173 `(("python-nose" ,python-nose)))
13174 (home-page "https://github.com/gabrielfalcao/sure")
13175 (synopsis "Automated testing library in python for python")
13176 (description
13177 "Sure is a python library that leverages a DSL for writing assertions.
13178Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
13179 (license license:gpl3+)))
13180
13181(define-public python2-sure
13182 (package-with-python2 python-sure))
13183
13184(define-public python2-couleur
13185 ;; This package does not seem to support python3 at all, hence,
13186 ;; only the python2 variant definition is provided.
13187 (package
13188 (name "python2-couleur")
13189 (version "0.6.2")
13190 (source
13191 (origin
13192 (method url-fetch)
13193 (uri (pypi-uri "couleur" version))
13194 (sha256
13195 (base32
13196 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
13197 (build-system python-build-system)
13198 (arguments
13199 `(#:python ,python-2))
13200 (home-page "https://github.com/gabrielfalcao/couleur")
13201 (synopsis
13202 "ANSI terminal tool for python, colored shell and other handy fancy features")
13203 (description
13204 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
13205terminal such as coloured output in the shell, overwriting output, indentation, etc.")
13206 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
13207 ;; https://github.com/gabrielfalcao/couleur/issues/11
13208 (license license:lgpl3+)))
13209
13210(define-public python-misaka
13211 (package
13212 (name "python-misaka")
0dcb3412 13213 (version "2.1.1")
44d10b1f
RW
13214 (source
13215 (origin
13216 (method url-fetch)
13217 (uri (pypi-uri "misaka" version))
13218 (sha256
13219 (base32
0dcb3412 13220 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
44d10b1f
RW
13221 (build-system python-build-system)
13222 (arguments
13223 `(;; Line 37 of setup.py calls self.run_command('develop')
13224 ;; in the 'check' phase. This command seems to be trying
13225 ;; to write to
13226 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
13227 ;; for which it does not have the permission to write.
13228 #:tests? #f))
13229 (propagated-inputs
13230 `(("python-cffi" ,python-cffi)))
13231 (home-page "https://github.com/FSX/misaka")
13232 (synopsis "Python binding for Hoedown")
13233 (description
13234 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
13235library written in C. It features a fast HTML renderer and functionality to make custom
13236renderers (e.g. man pages or LaTeX).")
13237 (license license:expat)))
13238
13239(define-public python2-misaka
13240 (package-with-python2 python-misaka))
13241
13242(define-public python2-steadymark
13243 ;; This is forced into being a python2 only variant
13244 ;; due to its dependence on couleur that has no support
13245 ;; for python3
13246 (package
13247 (name "python2-steadymark")
13248 (version "0.7.3")
13249 (source
13250 (origin
13251 (method url-fetch)
13252 (uri (pypi-uri "steadymark" version))
13253 (sha256
13254 (base32
13255 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
13256 (build-system python-build-system)
13257 (native-inputs
13258 `(("python-couleur" ,python2-couleur)
13259 ("python-sure" ,python2-sure)
13260 ("python-misaka" ,python2-misaka)))
13261 (arguments
13262 `(#:python ,python-2
13263 #:phases
13264 (modify-phases %standard-phases
13265 (add-before 'build 'patch-setup-py
13266 (lambda _
13267 ;; Update requirements from dependency==version
13268 ;; to dependency>=version
13269 (substitute* "setup.py"
13270 (("==") ">="))
13271 #t)))))
13272 (home-page "https://github.com/gabrielfalcao/steadymark")
13273 (synopsis "Markdown-based test runner for python")
13274 (description
13275 "@code{Steadymark} allows documentation to be written in github-flavoured
13276markdown. The documentation may contain snippets of code surrounded by python
13277code blocks and @code{Steadymark} will find these snippets and run them, making
13278sure that there are no old malfunctional examples in the documentation examples.")
13279 (license license:expat)))
13280
13281(define-public python-jsonpointer
13282 (package
13283 (name "python-jsonpointer")
13284 (version "1.10")
13285 (source
13286 (origin
13287 (method url-fetch)
13288 (uri (pypi-uri "jsonpointer" version))
13289 (sha256
13290 (base32
13291 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
13292 (build-system python-build-system)
13293 (home-page "https://github.com/stefankoegl/python-json-pointer")
13294 (synopsis "Identify specific nodes in a JSON document")
13295 (description "@code{jsonpointer} allows you to access specific nodes
13296by path in a JSON document (see RFC 6901).")
13297 (license license:bsd-3)))
13298
13299(define-public python2-jsonpointer
13300 (package-with-python2 python-jsonpointer))
13301
13302(define-public python-jsonpatch
13303 (package
13304 (name "python-jsonpatch")
13305 (version "1.16")
13306 (source
13307 (origin
854c5c95 13308 (method git-fetch)
44d10b1f 13309 ;; pypi version lacks tests.js
854c5c95
EF
13310 (uri (git-reference
13311 (url "https://github.com/stefankoegl/python-json-patch")
13312 (commit (string-append "v" version))))
13313 (file-name (git-file-name name version))
44d10b1f
RW
13314 (sha256
13315 (base32
854c5c95 13316 "0k9pff06lxama3nhsc7cdxbp83422bdy8ifs52i6xkas8hpyzfzr"))))
44d10b1f
RW
13317 (build-system python-build-system)
13318 (native-inputs
13319 `(("python-jsonpointer" ,python-jsonpointer)))
13320 (home-page "https://github.com/stefankoegl/python-json-patch")
13321 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
13322 (description "@code{jsonpatch} is a library and program that allows
13323applying JSON Patches according to RFC 6902.")
13324 (license license:bsd-3)))
13325
13326(define-public python2-jsonpatch
13327 (package-with-python2 python-jsonpatch))
13328
13329(define-public python-jsonpatch-0.4
13330 (package (inherit python-jsonpatch)
13331 (name "python-jsonpatch")
13332 (version "0.4")
13333 (source
13334 (origin
a9722d0d
EF
13335 (method git-fetch)
13336 (uri (git-reference
13337 (url "https://github.com/stefankoegl/python-json-patch")
13338 (commit (string-append "v" version))))
13339 (file-name (git-file-name name version))
44d10b1f
RW
13340 (sha256
13341 (base32
a9722d0d 13342 "1fq02y57kinyknxjcav0slcb0k9mwdffqw2hnlhdkpj7palh2mwk"))))))
44d10b1f
RW
13343
13344(define-public python2-jsonpatch-0.4
13345 (package-with-python2 python-jsonpatch-0.4))
13346
13347(define-public python-rfc3986
13348 (package
13349 (name "python-rfc3986")
13350 (version "1.1.0")
13351 (source (origin
13352 (method url-fetch)
13353 (uri (pypi-uri "rfc3986" version))
13354 (sha256
13355 (base32
13356 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
13357 (build-system python-build-system)
13358 (arguments
13359 `(#:modules ((guix build utils)
13360 (guix build python-build-system)
13361 (ice-9 ftw)
13362 (srfi srfi-1)
13363 (srfi srfi-26))
13364 #:phases
13365 (modify-phases %standard-phases
13366 (replace 'check
13367 (lambda _
13368 (let ((cwd (getcwd)))
13369 (setenv "PYTHONPATH"
13370 (string-append cwd "/build/"
13371 (find (cut string-prefix? "lib" <>)
13372 (scandir (string-append cwd "/build")))
13373 ":"
13374 (getenv "PYTHONPATH")))
13375 (invoke "pytest" "-v")))))))
13376 (native-inputs
13377 `(("python-pytest" ,python-pytest)))
13378 (home-page "https://rfc3986.readthedocs.io/")
13379 (synopsis "Parse and validate URI references")
13380 (description
13381 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
13382validation and authority parsing. This module also supports RFC@tie{}6874
13383which adds support for zone identifiers to IPv6 addresses.")
13384 (license license:asl2.0)))
13385
13386(define-public python2-rfc3986
13387 (package-with-python2 python-rfc3986))
13388
13389(define-public python-rfc3987
13390 (package
13391 (name "python-rfc3987")
13392 (version "1.3.7")
13393 (source
13394 (origin
13395 (method url-fetch)
13396 (uri (pypi-uri "rfc3987" version))
13397 (sha256
13398 (base32
13399 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
13400 (build-system python-build-system)
13401 (home-page "https://pypi.python.org/pypi/rfc3987")
13402 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
13403 (description "@code{rfc3987} provides routines for parsing and
13404validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
13405 (license license:gpl3+)))
13406
13407(define-public python2-rfc3987
13408 (package-with-python2 python-rfc3987))
13409
13410(define-public python-validate-email
13411 (package
13412 (name "python-validate-email")
13413 (version "1.3")
13414 (source
13415 (origin
13416 (method url-fetch)
13417 (uri (pypi-uri "validate_email" version))
13418 (sha256
13419 (base32
13420 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
13421 (build-system python-build-system)
13422 (home-page "https://github.com/syrusakbary/validate_email")
13423 (synopsis "Verifies if an email address is valid and really exists")
13424 (description "@code{validate_email} can be used to verify if an email
13425address is valid and really exists.")
13426 (license license:lgpl3+)))
13427
13428(define-public python2-validate-email
13429 (package-with-python2 python-validate-email))
13430
13431(define-public python-flex
13432 (package
13433 (name "python-flex")
13434 (version "6.10.0")
13435 (source
13436 (origin
13437 (method url-fetch)
13438 (uri (pypi-uri "flex" version))
13439 (sha256
13440 (base32
13441 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
13442 (build-system python-build-system)
13443 (propagated-inputs
13444 `(("python-click" ,python-click)
13445 ("python-iso8601" ,python-iso8601)
13446 ("python-jsonpointer" ,python-jsonpointer)
13447 ("python-pyyaml" ,python-pyyaml)
13448 ("python-requests" ,python-requests)
13449 ("python-rfc3987" ,python-rfc3987)
13450 ("python-six" ,python-six)
13451 ("python-validate-email" ,python-validate-email)))
13452 (home-page "https://github.com/pipermerriam/flex")
13453 (synopsis "Validates Swagger schemata")
13454 (description "@code{flex} can be used to validate Swagger schemata.")
13455 (license license:bsd-3)))
13456
13457(define-public python2-flex
13458 (package-with-python2 python-flex))
13459
13460(define-public python-marshmallow
13461 (package
13462 (name "python-marshmallow")
13463 (version "3.0.0b14")
13464 (source
13465 (origin
13466 (method url-fetch)
13467 (uri (pypi-uri "marshmallow" version))
13468 (sha256
13469 (base32
13470 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
13471 (build-system python-build-system)
13472 (propagated-inputs
13473 `(("python-dateutil" ,python-dateutil)
13474 ("python-simplejson" ,python-simplejson)))
13475 (native-inputs
13476 `(("python-pytest" ,python-pytest)
13477 ("python-pytz" ,python-pytz)))
13478 (home-page "https://github.com/marshmallow-code/marshmallow")
13479 (synopsis "Convert complex datatypes to and from native
13480Python datatypes.")
13481 (description "@code{marshmallow} provides a library for converting
13482complex datatypes to and from native Python datatypes.")
13483 (license license:expat)))
13484
13485(define-public python2-marshmallow
13486 (package-with-python2 python-marshmallow))
13487
13488(define-public python-apispec
13489 (package
13490 (name "python-apispec")
13491 (version "0.25.3")
13492 (source
13493 (origin
13494 (method url-fetch)
13495 (uri (pypi-uri "apispec" version))
13496 (sha256
13497 (base32
13498 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
13499 (build-system python-build-system)
13500 (propagated-inputs
13501 `(("python-pyyaml" ,python-pyyaml)))
13502 (native-inputs
13503 `(("python-pytest" ,python-pytest)
13504 ("python-flask" ,python-flask)
13505 ("python-marshmallow" ,python-marshmallow)
13506 ("python-tornado" ,python-tornado)
13507 ("python-bottle" ,python-bottle)
13508 ("python-mock" ,python-mock)))
13509 (home-page "https://github.com/marshmallow-code/apispec")
13510 (synopsis "Swagger 2.0 API specification generator")
13511 (description "@code{python-apispec} is a pluggable API specification
13512generator. Currently supports the OpenAPI specification (f.k.a.
13513Swagger 2.0).")
13514 (license license:expat)))
13515
13516(define-public python2-apispec
13517 (package-with-python2 python-apispec))
13518
13519(define-public python-flasgger
13520 (package
13521 (name "python-flasgger")
13522 (version "0.6.3")
13523 (source
13524 (origin
1a04d421
TGR
13525 (method git-fetch)
13526 (uri (git-reference
13527 (url "https://github.com/rochacbruno/flasgger.git")
13528 (commit version)))
13529 (file-name (git-file-name name version))
44d10b1f 13530 (sha256
1a04d421 13531 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
44d10b1f
RW
13532 (build-system python-build-system)
13533 (arguments
13534 `(#:phases
13535 (modify-phases %standard-phases
13536 (replace 'check
13537 (lambda* (#:key inputs outputs #:allow-other-keys)
13538 (substitute* "Makefile"
13539 (("flake8 flasgger --ignore=F403")
13540 "flake8 flasgger --ignore=E731,F403"))
13541 (setenv "PYTHONPATH" (string-append (getcwd)
13542 ":"
13543 (getenv "PYTHONPATH")))
ac599a09 13544 (invoke "py.test"))))))
44d10b1f
RW
13545 (propagated-inputs
13546 `(("python-flask" ,python-flask)
13547 ("python-pyyaml" ,python-pyyaml)
13548 ("python-jsonschema" ,python-jsonschema)
13549 ("python-mistune" ,python-mistune)
13550 ("python-six" ,python-six)))
13551 (native-inputs
13552 `(("python-decorator" ,python-decorator)
13553 ("python-flake8" ,python-flake8)
13554 ("python-flask-restful" ,python-flask-restful)
13555 ("python-flex" ,python-flex)
13556 ("python-pytest" ,python-pytest)
13557 ("python-pytest-cov" ,python-pytest-cov)
13558 ("python-marshmallow" ,python-marshmallow)
13559 ("python-apispec" ,python-apispec)))
13560 (home-page "https://github.com/rochacbruno/flasgger/")
13561 (synopsis "Extract Swagger specs from your Flask project")
13562 (description "@code{python-flasgger} allows extracting Swagger specs
13563from your Flask project. It is a fork of Flask-Swagger.")
13564 (license license:expat)))
13565
13566(define-public python2-flasgger
13567 (package-with-python2 python-flasgger))
13568
13569(define-public python-swagger-spec-validator
13570 (package
13571 (name "python-swagger-spec-validator")
fe9c5b1d 13572 (version "2.4.3")
44d10b1f
RW
13573 (source
13574 (origin
13575 (method url-fetch)
13576 (uri (pypi-uri "swagger-spec-validator" version))
13577 (sha256
13578 (base32
fe9c5b1d 13579 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
44d10b1f
RW
13580 (build-system python-build-system)
13581 (propagated-inputs
13582 `(("python-jsonschema" ,python-jsonschema)
fe9c5b1d 13583 ("python-pyyaml" ,python-pyyaml)
44d10b1f
RW
13584 ("python-six" ,python-six)))
13585 (home-page
13586 "https://github.com/Yelp/swagger_spec_validator")
13587 (synopsis "Validation of Swagger specifications")
13588 (description "@code{swagger_spec_validator} provides a library for
13589validating Swagger API specifications.")
13590 (license license:asl2.0)))
13591
13592(define-public python2-swagger-spec-validator
13593 (package-with-python2 python-swagger-spec-validator))
13594
13595(define-public python-apache-libcloud
13596 (package
13597 (name "python-apache-libcloud")
13598 (version "2.4.0")
13599 (source
13600 (origin
13601 (method url-fetch)
13602 (uri (pypi-uri "apache-libcloud" version))
13603 (sha256
13604 (base32
13605 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
13606 (build-system python-build-system)
13607 (arguments
13608 `(#:phases
13609 (modify-phases %standard-phases
13610 (add-after 'unpack 'patch-ssh
13611 (lambda* (#:key inputs #:allow-other-keys)
13612 (substitute* "libcloud/compute/ssh.py"
13613 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
13614 "/bin/ssh" "'")))
13615 #t))
13616 (add-after 'unpack 'patch-tests
13617 (lambda _
13618 (substitute* "./libcloud/test/test_file_fixtures.py"
13619 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
13620 (("def _ascii") "def _raw_data(self, method, url, body, headers):
13621 return (httplib.OK,
13622 \"1234abcd\",
13623 {\"test\": \"value\"},
13624 httplib.responses[httplib.OK])
13625 def _ascii"))
13626 (substitute* "libcloud/test/compute/test_ssh_client.py"
13627 (("class ShellOutSSHClientTests")
13628 "@unittest.skip(\"Guix container doesn't have ssh service\")
13629class ShellOutSSHClientTests")
13630 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
13631 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
13632 (("'.xF0', '.x90', '.x8D', '.x88'")
13633 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
13634 #t))
13635 (add-before 'check 'copy-secret
13636 (lambda _
13637 (copy-file "libcloud/test/secrets.py-dist"
13638 "libcloud/test/secrets.py")
13639 #t)))))
13640 (inputs
13641 `(("openssh" ,openssh)))
13642 (propagated-inputs
13643 `(("python-paramiko" ,python-paramiko)
13644 ("python-requests" ,python-requests)))
13645 (native-inputs
13646 `(("python-lockfile" ,python-lockfile)
13647 ("python-mock" ,python-mock)
13648 ("python-pytest" ,python-pytest)
13649 ("python-pytest-runner" ,python-pytest-runner)
13650 ("python-requests-mock" ,python-requests-mock)))
13651 (home-page "https://libcloud.apache.org/")
13652 (synopsis "Unified Cloud API")
13653 (description "@code{libcloud} is a Python library for interacting with
13654many of the popular cloud service providers using a unified API.")
13655 (license license:asl2.0)))
13656
13657(define-public python2-apache-libcloud
13658 (package-with-python2 python-apache-libcloud))
13659
13660(define-public python-smmap2
13661 (package
13662 (name "python-smmap2")
cd199a45 13663 (version "2.0.5")
44d10b1f
RW
13664 (source
13665 (origin
13666 (method url-fetch)
13667 (uri (pypi-uri "smmap2" version))
13668 (sha256
cd199a45 13669 (base32 "16k03pcnxd3lgzwgbd7nl4jwzm1wmahirvd09kljnzvy96hgza99"))))
44d10b1f
RW
13670 (build-system python-build-system)
13671 (native-inputs
13672 `(("python-nosexcover" ,python-nosexcover)))
13673 (home-page "https://github.com/Byron/smmap")
13674 (synopsis "Python sliding window memory map manager")
13675 (description "@code{smmap2} is a pure Python implementation of a sliding
13676window memory map manager.")
13677 (license license:bsd-3)))
13678
13679(define-public python2-smmap2
13680 (package-with-python2 python-smmap2))
13681
13682(define-public python-regex
13683 (package
13684 (name "python-regex")
c187c9d7 13685 (version "2019.04.14")
44d10b1f
RW
13686 (source (origin
13687 (method url-fetch)
13688 (uri (pypi-uri "regex" version))
13689 (sha256
13690 (base32
c187c9d7
BT
13691 "1a6hhfs6l6snr1z654ay6wzbmwdkmv282fzfkd5hk2d1n73y8v6m"))))
13692 ;; TODO: Fix and enable regex_test.py tests that complain about the
13693 ;; test.support module not existing.
44d10b1f
RW
13694 (build-system python-build-system)
13695 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
13696 (synopsis "Alternative regular expression module")
13697 (description "This regular expression implementation is backwards-
13698compatible with the standard @code{re} module, but offers additional
13699functionality like full case-folding for case-insensitive matches in Unicode.")
13700 (license license:psfl)))
13701
13702(define-public python2-regex
13703 (package-with-python2 python-regex))
13704
13705(define-public python2-pyopengl
13706 (package
13707 (name "python2-pyopengl")
13708 (version "3.1.0")
13709 (source
13710 (origin
13711 (method url-fetch)
13712 (uri (pypi-uri "PyOpenGL" version))
13713 (sha256
13714 (base32
13715 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
13716 (arguments
13717 `(#:python ,python-2))
13718 (build-system python-build-system)
13719 (home-page "http://pyopengl.sourceforge.net")
13720 (synopsis "Standard OpenGL bindings for Python")
13721 (description
13722 "PyOpenGL is the most common cross platform Python binding to OpenGL and
13723related APIs. The binding is created using the standard @code{ctypes}
13724library.")
13725 (license license:bsd-3)))
13726
13727(define-public python2-pyopengl-accelerate
13728 (package
13729 (inherit python2-pyopengl)
13730 (name "python2-pyopengl-accelerate")
13731 (version "3.1.0")
13732 (source
13733 (origin
13734 (method url-fetch)
13735 (uri (pypi-uri "PyOpenGL-accelerate" version))
13736 (sha256
13737 (base32
13738 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
13739 (synopsis "Acceleration code for PyOpenGL")
13740 (description
13741 "This is the Cython-coded accelerator module for PyOpenGL.")))
13742
13743(define-public python-rencode
13744 (package
13745 (name "python-rencode")
13746 (version "1.0.5")
13747 (source
13748 (origin
13749 (method url-fetch)
13750 (uri (pypi-uri "rencode" version))
13751 (sha256
13752 (base32
13753 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
13754 (build-system python-build-system)
13755 (arguments
13756 `(#:phases
13757 (modify-phases %standard-phases
13758 (add-before 'check 'delete-bogus-test
13759 ;; This test requires /home/aresch/Downloads, which is not provided by
13760 ;; the build environment.
13761 (lambda _
13762 (delete-file "rencode/t.py")
13763 #t)))))
13764 (native-inputs `(("pkg-config" ,pkg-config)
13765 ("python-cython" ,python-cython)))
13766 (home-page "https://github.com/aresch/rencode")
13767 (synopsis "Serialization of heterogeneous data structures")
13768 (description
13769 "The @code{rencode} module is a data structure serialization library,
13770similar to @code{bencode} from the BitTorrent project. For complex,
13771heterogeneous data structures with many small elements, r-encoding stake up
13772significantly less space than b-encodings. This version of rencode is a
13773complete rewrite in Cython to attempt to increase the performance over the
13774pure Python module.")
13775 (license license:bsd-3)))
13776
13777(define-public python2-rencode
13778 (package-with-python2 python-rencode))
13779
13780(define-public python-xenon
13781 (package
13782 (name "python-xenon")
13783 (version "0.5.4")
13784 (source
13785 (origin
13786 (method url-fetch)
13787 (uri (pypi-uri "xenon" version))
13788 (sha256
13789 (base32
13790 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
13791 (build-system python-build-system)
13792 (native-inputs
13793 `(("python-pyyaml" ,python-pyyaml)
13794 ("python-radon" ,python-radon)
13795 ("python-requests" ,python-requests)
13796 ("python-flake8" ,python-flake8)
13797 ("python-tox" ,python-tox)))
13798 (arguments
13799 `(#:phases
13800 (modify-phases %standard-phases
13801 (add-before 'build 'patch-test-requirements
13802 (lambda _
13803 ;; Remove httpretty dependency for tests.
13804 (substitute* "setup.py"
13805 (("httpretty") ""))
13806 #t)))))
13807 (home-page "https://xenon.readthedocs.org/")
13808 (synopsis "Monitor code metrics for Python on your CI server")
13809 (description
13810 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
13811Ideally, @code{xenon} is run every time code is committed. Through command
13812line options, various thresholds can be set for the complexity of code. It
13813will fail (i.e. it will exit with a non-zero exit code) when any of these
13814requirements is not met.")
13815 (license license:expat)))
13816
13817(define-public python2-xenon
13818 (package-with-python2 python-xenon))
13819
13820(define-public python-pysocks
13821 (package
13822 (name "python-pysocks")
b8725cdf 13823 (version "1.7.0")
44d10b1f
RW
13824 (source
13825 (origin
13826 (method url-fetch)
13827 (uri (pypi-uri "PySocks" version))
13828 (sha256
13829 (base32
b8725cdf 13830 "0z4p31bpqm893cf87qqgb30k7nwd8kqfjwwjm5cvxb6zbyj1w0yr"))))
44d10b1f
RW
13831 (build-system python-build-system)
13832 (arguments `(#:tests? #f))
13833 (home-page "https://github.com/Anorov/PySocks")
13834 (synopsis "SOCKS client module")
13835 (description "@code{pysocks} is an updated and semi-actively maintained
13836version of @code{SocksiPy} with bug fixes and extra features.")
13837 (license license:bsd-3)))
13838
13839(define-public python2-pysocks
13840 (package-with-python2 python-pysocks))
13841
13842(define-public python-pydiff
13843 (package
13844 (name "python-pydiff")
13845 (version "0.2")
13846 (source
13847 (origin
13848 (method url-fetch)
13849 (uri (pypi-uri "pydiff" version))
13850 (sha256
13851 (base32
13852 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
13853 (build-system python-build-system)
13854 (home-page "https://github.com/myint/pydiff")
13855 (synopsis "Library to diff two Python files at the bytecode level")
13856 (description
13857 "@code{pydiff} makes it easy to look for actual code changes while
13858ignoring formatting changes.")
13859 (license license:expat)))
13860
13861(define-public python2-pydiff
13862 (package-with-python2 python-pydiff))
13863
13864(define-public python-tqdm
13865 (package
13866 (name "python-tqdm")
13867 (version "4.19.6")
13868 (source
13869 (origin
13870 (method url-fetch)
13871 (uri (pypi-uri "tqdm" version))
13872 (sha256
13873 (base32
13874 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
13875 (build-system python-build-system)
13876 (native-inputs
13877 `(("python-flake8" ,python-flake8)
13878 ("python-nose" ,python-nose)
13879 ("python-coverage" ,python-coverage)))
13880 (home-page "https://github.com/tqdm/tqdm")
13881 (synopsis "Fast, extensible progress meter")
13882 (description
13883 "Make loops show a progress bar on the console by just wrapping any
13884iterable with @code{|tqdm(iterable)|}. Offers many options to define
13885design and layout.")
f875d76f
PL
13886 (license (list license:mpl2.0 license:expat))
13887 (properties `((python2-variant . ,(delay python2-tqdm))))))
44d10b1f
RW
13888
13889(define-public python2-tqdm
f875d76f
PL
13890 (let ((tqdm (package-with-python2
13891 (strip-python2-variant python-tqdm))))
13892 (package (inherit tqdm)
13893 (native-inputs `(("python2-functools32" ,python2-functools32)
13894 ,@(package-native-inputs tqdm))))))
44d10b1f
RW
13895
13896(define-public python-pkginfo
13897 (package
13898 (name "python-pkginfo")
13899 (version "1.4.2")
13900 (source
13901 (origin
13902 (method url-fetch)
13903 (uri (pypi-uri "pkginfo" version))
13904 (sha256
13905 (base32
13906 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
13907 (build-system python-build-system)
13908 (arguments
13909 ;; The tests are broken upstream.
13910 '(#:tests? #f))
13911 (home-page
13912 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
13913 (synopsis
13914 "Query metadatdata from sdists, bdists, and installed packages")
13915 (description
13916 "API to query the distutils metadata written in @file{PKG-INFO} inside a
13917source distriubtion (an sdist) or a binary distribution (e.g., created by
13918running bdist_egg). It can also query the EGG-INFO directory of an installed
13919distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
13920created by running @code{python setup.py develop}).")
13921 (license license:expat)))
13922
13923(define-public python2-pkginfo
13924 (package-with-python2 python-pkginfo))
13925
13926(define-public python-twine
13927 (package
13928 (name "python-twine")
13929 (version "1.9.1")
13930 (source
13931 (origin
13932 (method url-fetch)
13933 (uri (pypi-uri "twine" version))
13934 (sha256
13935 (base32
13936 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
13937 (build-system python-build-system)
13938 (propagated-inputs
13939 `(("python-tqdm" ,python-tqdm)
13940 ("python-pkginfo" ,python-pkginfo)
13941 ("python-requests" ,python-requests)
13942 ("python-requests-toolbelt" ,python-requests-toolbelt)))
13943 (home-page "https://github.com/pypa/twine")
13944 (synopsis "Collection of utilities for interacting with PyPI")
13945 (description
13946 "@code{twine} currently supports registering projects and uploading
13947distributions. It authenticates the user over HTTPS, allows them to pre-sign
13948their files and supports any packaging format (including wheels).")
13949 (license license:asl2.0)))
13950
13951(define-public python2-twine
13952 (package-with-python2 python-twine))
13953
13954(define-public python-linecache2
13955 (package
13956 (name "python-linecache2")
13957 (version "1.0.0")
13958 (source
13959 (origin
13960 (method url-fetch)
13961 (uri (pypi-uri "linecache2" version))
13962 (sha256
13963 (base32
13964 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
13965 (build-system python-build-system)
13966 (arguments
13967 `(;; The tests depend on unittest2, and our version is a bit too old.
13968 #:tests? #f))
13969 (native-inputs
13970 `(("python-pbr" ,python-pbr-minimal)))
13971 (home-page
13972 "https://github.com/testing-cabal/linecache2")
13973 (synopsis "Backports of the linecache module")
13974 (description
13975 "The linecache module allows one to get any line from any file, while
13976attempting to optimize internally, using a cache, the common case where many
13977lines are read from a single file.")
13978 (license license:psfl)))
13979
13980(define-public python2-linecache2
13981 (package-with-python2 python-linecache2))
13982
13983(define-public python-traceback2
13984 (package
13985 (name "python-traceback2")
13986 (version "1.4.0")
13987 (source
13988 (origin
13989 (method url-fetch)
13990 (uri (pypi-uri "traceback2" version))
13991 (sha256
13992 (base32
13993 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
13994 (build-system python-build-system)
13995 (arguments
13996 `(;; python-traceback2 and python-unittest2 depend on one another.
13997 #:tests? #f))
13998 (native-inputs
13999 `(("python-pbr" ,python-pbr-minimal)))
14000 (propagated-inputs
14001 `(("python-linecache2" ,python-linecache2)))
14002 (home-page
14003 "https://github.com/testing-cabal/traceback2")
14004 (synopsis "Backports of the traceback module")
14005 (description
14006 "This module provides a standard interface to extract, format and print
14007stack traces of Python programs. It exactly mimics the behavior of the Python
14008interpreter when it prints a stack trace.")
14009 (license license:psfl)))
14010
14011(define-public python2-traceback2
14012 (package-with-python2 python-traceback2))
14013
14014(define-public python-ratelimiter
14015 (package
14016 (name "python-ratelimiter")
14017 (version "1.2.0")
14018 (source
14019 (origin
14020 (method url-fetch)
14021 (uri (pypi-uri "ratelimiter" version))
14022 (sha256
14023 (base32
14024 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
14025 (build-system python-build-system)
14026 (arguments
14027 '(#:tests? #f)) ; There are no tests in the pypi archive.
14028 (home-page "https://github.com/RazerM/ratelimiter")
14029 (synopsis "Simple rate limiting object")
14030 (description
14031 "The @code{ratelimiter} module ensures that an operation will not be
14032executed more than a given number of times during a given period.")
14033 (license license:asl2.0)))
14034
14035(define-public python2-ratelimiter
14036 (package-with-python2 python-ratelimiter))
14037
14038(define-public python-dukpy
14039 (package
14040 (name "python-dukpy")
14041 (version "0.3")
14042 (source
14043 (origin
5b77ebe1
TGR
14044 (method git-fetch)
14045 (uri (git-reference
14046 (url "https://github.com/kovidgoyal/dukpy.git")
14047 (commit (string-append "v" version))))
14048 (file-name (git-file-name name version))
44d10b1f 14049 (sha256
5b77ebe1 14050 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
44d10b1f
RW
14051 (build-system python-build-system)
14052 (home-page "https://github.com/kovidgoyal/dukpy")
14053 (synopsis "Run JavaScript in python")
14054 (description
14055 "dukpy is a JavaScript runtime environment for Python using the duktape
14056embeddable JavaScript engine.")
14057 ;; Dukpy is licensed under MIT like the embedded duktape library,
14058 ;; with 'errors.c' as GPL3.
14059 (license (list license:expat license:gpl3))))
14060
14061(define-public python2-dukpy
14062 (package-with-python2 python-dukpy))
14063
14064(define-public python-jsonrpclib-pelix
14065 (package
14066 (name "python-jsonrpclib-pelix")
14067 (version "0.3.2")
14068 (source
14069 (origin
14070 (method url-fetch)
14071 (uri (pypi-uri "jsonrpclib-pelix" version))
14072 (sha256
14073 (base32
14074 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
14075 (build-system python-build-system)
14076 (arguments
14077 `(#:tests? #f)) ; no tests in PyPI tarball
14078 (home-page "https://github.com/tcalmant/jsonrpclib/")
14079 (synopsis "JSON-RPC 2.0 client library for Python")
14080 (description
14081 "This library implements the JSON-RPC v2.0
14082specification (backwards-compatible) as a client library for Python. This
14083version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
14084services.")
14085 (license license:asl2.0)))
14086
14087(define-public python2-jsonrpclib-pelix
14088 (package-with-python2 python-jsonrpclib-pelix))
14089
14090(define-public python-setuptools-scm-git-archive
14091 (package
14092 (name "python-setuptools-scm-git-archive")
14093 (version "1.0")
14094 (source
14095 (origin
14096 (method url-fetch)
14097 (uri (pypi-uri "setuptools_scm_git_archive" version))
14098 (sha256
14099 (base32
14100 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
14101 (build-system python-build-system)
14102 (native-inputs
14103 `(("python-pytest" ,python-pytest)))
14104 (propagated-inputs
14105 `(("python-setuptools-scm" ,python-setuptools-scm)))
14106 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
14107 (synopsis "Setuptools_scm plugin for git archives")
14108 (description
14109 "The setuptools_scm_git_archive package is a plugin to
14110setuptools_scm, which supports obtaining versions from git archives that
14111belong to tagged versions.")
14112 (license license:expat)))
14113
14114(define-public python2-setuptools-scm-git-archive
14115 (package-with-python2 python-setuptools-scm-git-archive))
14116
724a350c
RW
14117(define-public python-setuptools-git
14118 (package
14119 (name "python-setuptools-git")
14120 (version "1.2")
14121 (source
14122 (origin
14123 (method url-fetch)
14124 (uri (pypi-uri "setuptools-git" version))
14125 (sha256
14126 (base32
14127 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
14128 (build-system python-build-system)
14129 (arguments
14130 `(#:phases
14131 (modify-phases %standard-phases
14132 ;; This is needed for tests.
14133 (add-after 'unpack 'configure-git
14134 (lambda _
14135 (setenv "HOME" "/tmp")
14136 (invoke "git" "config" "--global" "user.email" "guix")
14137 (invoke "git" "config" "--global" "user.name" "guix")
14138 #t)))))
14139 (native-inputs
14140 `(("git" ,git-minimal)))
14141 (home-page "https://github.com/msabramo/setuptools-git")
14142 (synopsis "Setuptools revision control system plugin for Git")
14143 (description
14144 "This package provides a plugin for Setuptools for revision control with
14145Git.")
14146 (license license:bsd-3)))
14147
44d10b1f
RW
14148(define-public python-pyclipper
14149 (package
14150 (name "python-pyclipper")
ff3d1b99 14151 (version "1.1.0.post3")
44d10b1f
RW
14152 (source
14153 (origin
14154 (method url-fetch)
14155 (uri (pypi-uri "pyclipper" version ".zip"))
14156 (sha256
ff3d1b99 14157 (base32 "164yksvqwqvwzh8f8lq92asg87hd8rvcy2xb5vm4y4ccvd5xgb7i"))
44d10b1f
RW
14158 (modules '((guix build utils)))
14159 (snippet
14160 '(begin
14161 ;; This file is generated by Cython.
14162 (delete-file "pyclipper/pyclipper.cpp") #t))))
14163 (build-system python-build-system)
14164 (arguments
14165 `(#:phases
14166 (modify-phases %standard-phases
14167 (add-before 'build 'cythonize-sources
14168 (lambda _
14169 (with-directory-excursion "pyclipper"
14170 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
14171 (propagated-inputs
14172 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
14173 (native-inputs
14174 `(("python-cython" ,python-cython)
14175 ("python-pytest" ,python-pytest)
14176 ("python-pytest-runner" ,python-pytest-runner)
14177 ("python-unittest2" ,python-unittest2)
14178 ("unzip" ,unzip)))
14179 (home-page "https://github.com/greginvm/pyclipper")
14180 (synopsis "Wrapper for Angus Johnson's Clipper library")
14181 (description
14182 "Pyclipper is a Cython wrapper for the C++ translation of the
14183Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
14184 (license license:expat)))
14185
14186(define-public python2-pyclipper
14187 (package-with-python2 python-pyclipper))
14188
14189(define-public python2-booleanoperations
14190 (package
14191 (name "python2-booleanoperations")
14192 (version "0.7.1")
14193 (source
14194 (origin
14195 (method url-fetch)
14196 (uri (pypi-uri "booleanOperations" version ".zip"))
14197 (sha256
14198 (base32
14199 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
14200 (build-system python-build-system)
14201 (arguments
14202 `(#:python ,python-2))
14203 (native-inputs
14204 `(("unzip" ,unzip)
14205 ("python2-pytest" ,python2-pytest)
14206 ("python2-pytest-runner" ,python2-pytest-runner)))
14207 (propagated-inputs
14208 `(("python-fonttools" ,python2-fonttools)
14209 ("python-pyclipper" ,python2-pyclipper)
14210 ("python-ufolib" ,python2-ufolib)))
14211 (home-page "https://github.com/typemytype/booleanOperations")
14212 (synopsis "Boolean operations on paths")
14213 (description
14214 "BooleanOperations provides a Python library that enables
14215boolean operations on paths.")
14216 (license license:expat)))
14217
14218(define-public python-tempdir
14219 (package
14220 (name "python-tempdir")
14221 (version "0.7.1")
14222 (source
14223 (origin
14224 (method url-fetch)
14225 (uri (pypi-uri "tempdir" version))
14226 (sha256
14227 (base32
14228 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
14229 (build-system python-build-system)
14230 (home-page "https://pypi.org/project/tempdir/")
14231 (arguments
14232 ;; the package has no tests
14233 '(#:tests? #f))
14234 (synopsis "Python library for managing temporary directories")
14235 (description
14236 "This library manages temporary directories that are automatically
14237deleted with all their contents when they are no longer needed. It is
14238particularly convenient for use in tests.")
14239 (license license:expat)))
14240
14241(define-public python2-tempdir
14242 (package-with-python2 python-tempdir))
14243
14244(define-public python-activepapers
14245 (package
14246 (name "python-activepapers")
14247 (version "0.2.2")
14248 (source
14249 (origin
14250 (method url-fetch)
14251 (uri (pypi-uri "ActivePapers.Py" version))
14252 (sha256
14253 (base32
14254 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
14255 (build-system python-build-system)
14256 (arguments
14257 `(#:modules ((ice-9 ftw)
14258 (srfi srfi-1)
14259 (guix build utils)
14260 (guix build python-build-system))
14261
14262 #:phases
14263 (modify-phases %standard-phases
14264 (add-after 'unpack 'delete-python2-code
14265 (lambda _
14266 (for-each delete-file
14267 '("lib/activepapers/builtins2.py"
14268 "lib/activepapers/standardlib2.py"
14269 "lib/activepapers/utility2.py"))))
14270 (replace 'check
14271 (lambda _
14272 ;; Deactivate the test cases that download files
14273 (setenv "NO_NETWORK_ACCESS" "1")
14274 ;; For some strange reason, some tests fail if nosetests runs all
14275 ;; test modules in a single execution. They pass if each test
14276 ;; module is run individually.
14277 (for-each (lambda (filename)
14278 (invoke "nosetests"
14279 (string-append "tests/" filename)))
14280 (scandir "tests"
14281 (lambda (filename)
14282 (string-suffix? ".py" filename)))))))))
14283 (native-inputs
14284 `(("python-tempdir" ,python-tempdir)
14285 ("python-nose" ,python-nose)))
14286 (propagated-inputs
14287 `(("python-h5py" ,python-h5py)))
14288 (home-page "http://www.activepapers.org/")
14289 (synopsis "Executable papers for scientific computing")
14290 (description
14291 "ActivePapers is a tool for working with executable papers, which
14292combine data, code, and documentation in single-file packages,
14293suitable for publication as supplementary material or on repositories
14294such as figshare or Zenodo.")
14295 (properties `((python2-variant . ,(delay python2-activepapers))))
14296 (license license:bsd-3)))
14297
14298(define-public python2-activepapers
14299 (let ((base (package-with-python2
14300 (strip-python2-variant python-activepapers))))
14301 (package
14302 (inherit base)
14303 (arguments
14304 (substitute-keyword-arguments (package-arguments base)
14305 ((#:phases phases)
14306 `(modify-phases ,phases
14307 (delete 'delete-python2-code)
14308 (add-after 'unpack 'delete-python3-code
14309 (lambda _
14310 (for-each delete-file
14311 '("lib/activepapers/builtins3.py"
14312 "lib/activepapers/standardlib3.py"
14313 "lib/activepapers/utility3.py")))))))))))
14314
14315(define-public python-semver
14316 (package
14317 (name "python-semver")
594280b1 14318 (version "2.9.0")
44d10b1f 14319 (source
2ecbba24
BG
14320 (origin
14321 (method url-fetch)
14322 (uri (pypi-uri "semver" version))
14323 (sha256
14324 (base32
14325 "183kg1rhzz3hqizvphkd8hlbf1zxfx8737zhfkmqzxi71jmdw7pd"))))
44d10b1f 14326 (build-system python-build-system)
44d10b1f
RW
14327 (native-inputs
14328 `(("python-tox" ,python-tox)
14329 ("python-virtualenv" ,python-virtualenv)))
14330 (home-page "https://github.com/k-bx/python-semver")
14331 (synopsis "Python helper for Semantic Versioning")
14332 (description "This package provides a Python library for
14333@url{Semantic Versioning, http://semver.org/}.")
14334 (license license:bsd-3)))
14335
14336(define-public python2-semver
14337 (package-with-python2 python-semver))
14338
14339(define-public python-pyro4
14340 (package
14341 (name "python-pyro4")
3ce91d44 14342 (version "4.77")
44d10b1f
RW
14343 (source
14344 (origin
14345 (method url-fetch)
14346 (uri (pypi-uri "Pyro4" version))
14347 (sha256
3ce91d44 14348 (base32 "0gsjg869y4gpy265s1gj1f2qy6jn5iz8r2bwwnq78r1r5yi15zib"))))
44d10b1f 14349 (build-system python-build-system)
3ce91d44
GL
14350 (arguments
14351 '(#:tests? #f)) ;FIXME: Some tests require network access.
14352 (native-inputs
14353 `(("python-cloudpickle" ,python-cloudpickle)
14354 ("python-dill" ,python-dill)
14355 ("python-msgpack" ,python-msgpack)))
44d10b1f
RW
14356 (propagated-inputs
14357 `(("python-serpent" ,python-serpent)))
14358 (home-page "https://pyro4.readthedocs.io")
14359 (synopsis "Distributed object middleware for Python")
14360 (description
14361 "Pyro enables you to build applications in which objects can talk to each
14362other over the network. You can just use normal Python method calls to call
14363objects on other machines, also known as remote procedure calls (RPC).")
14364 (license license:expat)))
14365
14366(define-public python2-pyro
14367 (package
14368 (name "python2-pyro")
14369 (version "3.16")
14370 (source
14371 (origin
14372 (method url-fetch)
14373 (uri (pypi-uri "Pyro" version))
14374 (file-name (string-append "Pyro-" version ".tar.gz"))
14375 (sha256
14376 (base32
14377 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
14378 (build-system python-build-system)
14379 (arguments
14380 ;; Pyro is not compatible with Python 3
14381 `(#:python ,python-2
14382 ;; Pyro has no test cases for automatic execution
14383 #:tests? #f))
14384 (home-page "http://pythonhosted.org/Pyro/")
14385 (synopsis "Distributed object manager for Python")
14386 (description "Pyro is a Distributed Object Technology system
14387written in Python that is designed to be easy to use. It resembles
14388Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
14389which is a system and language independent Distributed Object Technology
14390and has much more to offer than Pyro or RMI. Pyro 3.x is no
14391longer maintained. New projects should use Pyro4 instead, which
14392is the new Pyro version that is actively developed.")
14393 (license license:expat)))
14394
14395(define-public python2-scientific
14396 (package
14397 (name "python2-scientific")
14398 (version "2.9.4")
14399 (source
14400 (origin
c695f011
KH
14401 (method git-fetch)
14402 (uri (git-reference
14403 (url "https://github.com/khinsen/ScientificPython")
14404 (commit (string-append "rel" version))))
14405 (file-name (git-file-name name version))
44d10b1f
RW
14406 (sha256
14407 (base32
c695f011 14408 "16l48aj9fps9r7jyk8gpxppwrv0fqvlc13sayxskz28r5s6sjwbl"))))
44d10b1f
RW
14409 (build-system python-build-system)
14410 (inputs
14411 `(("netcdf" ,netcdf)))
14412 (propagated-inputs
14413 `(("python-numpy" ,python2-numpy-1.8)
14414 ("python-pyro" ,python2-pyro)))
14415 (arguments
14416 ;; ScientificPython is not compatible with Python 3
14417 `(#:python ,python-2
14418 #:tests? #f ; No test suite
14419 #:phases
14420 (modify-phases %standard-phases
14421 (replace 'build
14422 (lambda* (#:key inputs #:allow-other-keys)
77e61e25
RW
14423 (invoke "python" "setup.py" "build"
14424 (string-append "--netcdf_prefix="
14425 (assoc-ref inputs "netcdf"))))))))
c695f011 14426 (home-page "http://dirac.cnrs-orleans.fr/ScientificPython")
44d10b1f
RW
14427 (synopsis "Python modules for scientific computing")
14428 (description "ScientificPython is a collection of Python modules that are
14429useful for scientific computing. Most modules are rather general (Geometry,
14430physical units, automatic derivatives, ...) whereas others are more
14431domain-specific (e.g. netCDF and PDB support). The library is currently
14432not actively maintained and works only with Python 2 and NumPy < 1.9.")
14433 (license license:cecill-c)))
14434
14435(define-public python2-mmtk
14436 (package
14437 (name "python2-mmtk")
fe9b72c5 14438 (version "2.7.12")
44d10b1f
RW
14439 (source
14440 (origin
fe9b72c5
KH
14441 (method git-fetch)
14442 (uri (git-reference
14443 (url "https://github.com/khinsen/MMTK")
14444 (commit (string-append "rel" version))))
14445 (file-name (git-file-name name version))
44d10b1f
RW
14446 (sha256
14447 (base32
fe9b72c5 14448 "1fqwh3ba9jd42nigvn5shndgwb1zy7kh9520ncvqci7n8ffjr6p1"))))
44d10b1f
RW
14449 (build-system python-build-system)
14450 (native-inputs
14451 `(("netcdf" ,netcdf)))
14452 (propagated-inputs
14453 `(("python-scientific" ,python2-scientific)
14454 ("python-tkinter" ,python-2 "tk")))
14455 (arguments
14456 `(#:python ,python-2
14457 #:tests? #f
14458 #:phases
14459 (modify-phases %standard-phases
14460 (add-before 'build 'includes-from-scientific
14461 (lambda* (#:key inputs #:allow-other-keys)
14462 (mkdir-p "Include/Scientific")
14463 (copy-recursively
14464 (string-append
14465 (assoc-ref inputs "python-scientific")
14466 "/include/python2.7/Scientific")
14467 "Include/Scientific"))))))
14468 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
14469 (synopsis "Python library for molecular simulation")
14470 (description "MMTK is a library for molecular simulations with an emphasis
14471on biomolecules. It provides widely used methods such as Molecular Dynamics
14472and normal mode analysis, but also basic routines for implementing new methods
14473for simulation and analysis. The library is currently not actively maintained
14474and works only with Python 2 and NumPy < 1.9.")
14475 (license license:cecill-c)))
14476
14477(define-public python-phonenumbers
14478 (package
14479 (name "python-phonenumbers")
14480 (version "8.9.1")
14481 (source
14482 (origin
14483 (method url-fetch)
14484 (uri (pypi-uri "phonenumbers" version))
14485 (sha256
14486 (base32
14487 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
14488 (build-system python-build-system)
14489 (home-page
14490 "https://github.com/daviddrysdale/python-phonenumbers")
14491 (synopsis
14492 "Python library for dealing with international phone numbers")
14493 (description
14494 "This package provides a Python port of Google's libphonenumber library.")
14495 (license license:asl2.0)))
14496
14497(define-public python2-phonenumbers
14498 (package-with-python2 python-phonenumbers))
14499
14500(define-public python-send2trash
14501 (package
14502 (name "python-send2trash")
d9b0216b 14503 (version "1.5.0")
44d10b1f 14504 (source
d9b0216b 14505 (origin (method git-fetch)
44d10b1f 14506 ;; Source tarball on PyPI doesn't include tests.
d9b0216b
RW
14507 (uri (git-reference
14508 (url "https://github.com/hsoft/send2trash.git")
14509 (commit version)))
14510 (file-name (git-file-name name version))
44d10b1f
RW
14511 (sha256
14512 (base32
d9b0216b 14513 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
44d10b1f
RW
14514 (build-system python-build-system)
14515 (arguments
14516 '(#:phases
14517 (modify-phases %standard-phases
14518 (add-before 'check 'pre-check
14519 (lambda _
14520 (mkdir-p "/tmp/foo")
14521 (setenv "HOME" "/tmp/foo")
14522 #t)))))
14523 (home-page "https://github.com/hsoft/send2trash")
14524 (synopsis "Send files to the user's @file{~/Trash} directory")
14525 (description "This package provides a Python library to send files to the
14526user's @file{~/Trash} directory.")
20b3fde7 14527 (properties `((python2-variant . ,(delay python2-send2trash))))
44d10b1f
RW
14528 (license license:bsd-3)))
14529
14530(define-public python2-send2trash
14531 (package
f32164ab 14532 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
44d10b1f
RW
14533 (arguments
14534 (substitute-keyword-arguments (package-arguments python-send2trash)
14535 ((#:phases phases)
14536 `(modify-phases ,phases
14537 (add-before 'check 'setenv
14538 (lambda _
14539 (setenv "PYTHONPATH"
14540 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
4782a06f 14541 #t))))))))
44d10b1f
RW
14542
14543(define-public python-yapf
14544 (package
14545 (name "python-yapf")
19ba75dc 14546 (version "0.29.0")
44d10b1f
RW
14547 (source
14548 (origin
14549 (method url-fetch)
14550 (uri (pypi-uri "yapf" version))
14551 (sha256
14552 (base32
19ba75dc 14553 "1pj3xzblmbssshi889b6n9hwqbjpabw6j0fimlng2sshd3226bki"))))
44d10b1f
RW
14554 (build-system python-build-system)
14555 (home-page "https://github.com/google/yapf")
14556 (synopsis "Formatter for Python code")
14557 (description "YAPF is a formatter for Python code. It's based off of
14558@dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
14559takes the code and reformats it to the best formatting that conforms to the
14560style guide, even if the original code didn't violate the style guide.")
14561 (license license:asl2.0)))
14562
14563(define-public python2-yapf
14564 (package-with-python2 python-yapf))
14565
14566(define-public python-gyp
14567 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
14568 (revision "0"))
14569 (package
14570 (name "python-gyp")
14571 ;; Google does not release versions,
14572 ;; based on second most recent commit date.
14573 (version (git-version "0.0.0" revision commit))
14574 (source
14575 (origin
14576 ;; Google does not release tarballs,
14577 ;; git checkout is needed.
14578 (method git-fetch)
14579 (uri (git-reference
14580 (url "https://chromium.googlesource.com/external/gyp")
14581 (commit commit)))
14582 (file-name (git-file-name name version))
14583 (sha256
14584 (base32
14585 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
14586 (build-system python-build-system)
14587 (home-page "https://gyp.gsrc.io/")
14588 (synopsis "GYP is a Meta-Build system")
14589 (description
14590 "GYP builds build systems for large, cross platform applications.
14591It can be used to generate XCode projects, Visual Studio projects, Ninja build
14592files, and Makefiles.")
14593 (license license:bsd-3))))
14594
14595(define-public python2-gyp
14596 (package-with-python2 python-gyp))
14597
14598(define-public python-whatever
14599 (package
14600 (name "python-whatever")
97610a66 14601 (version "0.6")
44d10b1f
RW
14602 (source
14603 (origin
ac0ea38c
EF
14604 (method git-fetch)
14605 (uri (git-reference
14606 (url "https://github.com/Suor/whatever")
14607 (commit version)))
14608 (file-name (git-file-name name version))
44d10b1f 14609 (sha256
ac0ea38c 14610 (base32 "1q7ajgqjfivxqsqgnhp4lc4p6jxyh4zprcsdbpd6dw54inaf0av5"))))
44d10b1f
RW
14611 (build-system python-build-system)
14612 (arguments
14613 `(#:phases
14614 (modify-phases %standard-phases
14615 (replace 'check
14616 (lambda _
14617 (invoke "py.test"))))))
14618 (native-inputs
14619 `(("python-pytest" ,python-pytest)))
14620 (home-page "http://github.com/Suor/whatever")
14621 (synopsis "Make anonymous functions by partial application of operators")
14622 (description "@code{whatever} provides an easy way to make anonymous
14623functions by partial application of operators.")
14624 (license license:bsd-3)))
14625
14626(define-public python2-whatever
14627 (package-with-python2 python-whatever))
14628
14629(define-public python-funcy
14630 (package
14631 (name "python-funcy")
9e396ab8 14632 (version "1.11")
44d10b1f
RW
14633 (source
14634 (origin
a85c6027
TGR
14635 (method git-fetch)
14636 (uri (git-reference
14637 (url "https://github.com/Suor/funcy.git")
14638 (commit version)))
44d10b1f 14639 (sha256
a85c6027
TGR
14640 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
14641 (file-name (git-file-name name version))))
44d10b1f
RW
14642 (build-system python-build-system)
14643 (arguments
14644 `(#:phases
14645 (modify-phases %standard-phases
14646 (replace 'check
14647 (lambda _
14648 (invoke "py.test"))))))
14649 (native-inputs
14650 `(("python-pytest" ,python-pytest)
14651 ("python-whatever" ,python-whatever)))
14652 (home-page "http://github.com/Suor/funcy")
14653 (synopsis "Functional tools")
14654 (description "@code{funcy} is a library that provides functional tools.
14655Examples are:
14656@enumerate
14657@item merge - Merges collections of the same type
14658@item walk - Type-preserving map
14659@item select - Selects a part of a collection
14660@item take - Takes the first n items of a collection
14661@item first - Takes the first item of a collection
14662@item remove - Predicated-removes items of a collection
14663@item concat - Concatenates two collections
14664@item flatten - Flattens a collection with subcollections
14665@item distinct - Returns only distinct items
14666@item split - Predicated-splits a collection
14667@item split_at - Splits a collection at a given item
14668@item group_by - Groups items by group
14669@item pairwise - Pairs off adjacent items
14670@item partial - Partially-applies a function
14671@item curry - Curries a function
14672@item compose - Composes functions
14673@item complement - Complements a predicate
14674@item all_fn - \"all\" with predicate
14675@end enumerate")
14676 (license license:bsd-3)))
14677
14678(define-public python2-funcy
14679 (package-with-python2 python-funcy))
14680
14681(define-public python-isoweek
14682 (package
14683 (name "python-isoweek")
14684 (version "1.3.3")
14685 (source
14686 (origin
14687 (method url-fetch)
14688 (uri (pypi-uri "isoweek" version))
14689 (sha256
14690 (base32
14691 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
14692 (build-system python-build-system)
14693 (home-page "https://github.com/gisle/isoweek")
14694 (synopsis "Objects representing a week")
14695 (description "The @code{isoweek} module provide the class Week that
14696implements the week definition of ISO 8601. This standard also defines
14697a notation for identifying weeks; yyyyWww (where the W is a literal).
14698Week instances stringify to this form.")
14699 (license license:bsd-3)))
14700
14701(define-public python2-isoweek
14702 (package-with-python2 python-isoweek))
14703
14704(define-public python-tokenize-rt
14705 (package
14706 (name "python-tokenize-rt")
14707 (version "2.0.1")
14708 (source
14709 (origin
14710 (method url-fetch)
14711 (uri (pypi-uri "tokenize-rt" version))
14712 (sha256
14713 (base32
14714 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
14715 (build-system python-build-system)
14716 (home-page "https://github.com/asottile/tokenize-rt")
14717 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
14718 (description
14719 "This Python library is a wrapper around @code{tokenize} from the Python
14720standard library. It provides two additional tokens @code{ESCAPED_NL} and
14721@code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
14722and @code{tokens_to_src} to roundtrip.")
14723 (license license:expat)))
14724
14725(define-public python-future-fstrings
14726 (package
14727 (name "python-future-fstrings")
14728 (version "0.4.1")
14729 (source
14730 (origin
14731 (method url-fetch)
14732 (uri (pypi-uri "future_fstrings" version))
14733 (sha256
14734 (base32
14735 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
14736 (build-system python-build-system)
14737 (propagated-inputs
14738 `(("python-tokenize-rt" ,python-tokenize-rt)))
14739 (home-page "https://github.com/asottile/future-fstrings")
14740 (synopsis "Backport of fstrings to Python < 3.6")
14741 (description
14742 "This package provides a UTF-8 compatible encoding
14743@code{future_fstrings}, which performs source manipulation. It decodes the
14744source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
14745@code{f} strings.")
14746 (license license:expat)))
14747
dae2eb1c
MC
14748(define-public python-typed-ast
14749 (package
14750 (name "python-typed-ast")
bae89583 14751 (version "1.4.0")
dae2eb1c
MC
14752 (source
14753 (origin
bae89583
MO
14754 (method git-fetch)
14755 (uri (git-reference
14756 (url "https://github.com/python/typed_ast.git")
14757 (commit version)))
dae2eb1c 14758 (sha256
bae89583
MO
14759 (base32 "0l0hz809f7i356kmqkvfsaswiidb98j9hs9rrjnfawzqcbffzgyb"))
14760 (file-name (git-file-name name version))))
dae2eb1c
MC
14761 (build-system python-build-system)
14762 (arguments
14763 `(#:modules ((guix build utils)
14764 (guix build python-build-system)
14765 (ice-9 ftw)
14766 (srfi srfi-1)
14767 (srfi srfi-26))
14768 #:phases
14769 (modify-phases %standard-phases
14770 (replace 'check
14771 (lambda _
14772 (let ((cwd (getcwd)))
14773 (setenv "PYTHONPATH"
14774 (string-append cwd "/build/"
14775 (find (cut string-prefix? "lib" <>)
14776 (scandir (string-append cwd "/build")))
14777 ":"
14778 (getenv "PYTHONPATH"))))
14779 (invoke "pytest")
14780 #t)))))
14781 (native-inputs `(("python-pytest" ,python-pytest)))
14782 (home-page "https://github.com/python/typed_ast")
14783 (synopsis "Fork of Python @code{ast} modules with type comment support")
14784 (description "This package provides a parser similar to the standard
14785@code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
14786include PEP 484 type comments and are independent of the version of Python
14787under which they are run. The @code{typed_ast} parsers produce the standard
14788Python AST (plus type comments), and are both fast and correct, as they are
14789based on the CPython 2.7 and 3.7 parsers.")
14790 ;; See the file "LICENSE" for the details.
14791 (license (list license:psfl
14792 license:asl2.0
14793 license:expat)))) ;ast27/Parser/spark.py
14794
44d10b1f
RW
14795(define-public python-typing
14796 (package
14797 (name "python-typing")
14798 (version "3.6.6")
14799 (source
14800 (origin
14801 (method url-fetch)
14802 (uri (pypi-uri "typing" version))
14803 (sha256
14804 (base32
14805 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
14806 (build-system python-build-system)
14807 (home-page "https://docs.python.org/3/library/typing.html")
14808 (synopsis "Type hints for Python")
14809 (description "This is a backport of the standard library @code{typing}
14810module to Python versions older than 3.5. Typing defines a standard notation
14811for Python function and variable type annotations. The notation can be used
14812for documenting code in a concise, standard format, and it has been designed
14813to also be used by static and runtime type checkers, static analyzers, IDEs
14814and other tools.")
14815 (license license:psfl)))
14816
14817(define-public python2-typing
14818 (package-with-python2 python-typing))
14819
f89d443b
VC
14820(define-public python-typing-extensions
14821 (package
14822 (name "python-typing-extensions")
14823 (version "3.7.2")
14824 (source
14825 (origin
14826 (method url-fetch)
14827 (uri (pypi-uri "typing_extensions" version))
14828 (sha256
14829 (base32
14830 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
14831 (build-system python-build-system)
14832 (home-page
14833 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
14834 (synopsis "Experimental type hints for Python")
14835 (description
14836 "The typing_extensions module contains additional @code{typing} hints not
14837yet present in the of the @code{typing} standard library.
14838Included are implementations of:
14839@enumerate
14840@item ClassVar
14841@item ContextManager
14842@item Counter
14843@item DefaultDict
14844@item Deque
14845@item NewType
14846@item NoReturn
14847@item overload
14848@item Protocol
14849@item runtime
14850@item Text
14851@item Type
14852@item TYPE_CHECKING
14853@item AsyncGenerator
14854@end enumerate\n")
14855 (license license:psfl)))
14856
44d10b1f
RW
14857(define-public bpython
14858 (package
14859 (name "bpython")
4de93b2f 14860 (version "0.18")
44d10b1f
RW
14861 (source
14862 (origin
14863 (method url-fetch)
14864 (uri (pypi-uri "bpython" version))
14865 (sha256
4de93b2f 14866 (base32 "1hl6frgvr2lqaxqczl8amg9xih32b3gzv429vs0qrjb8wpdj1k2n"))))
44d10b1f
RW
14867 (build-system python-build-system)
14868 (arguments
14869 `(#:phases
14870 (modify-phases %standard-phases
14871 (add-after 'unpack 'remove-failing-test
14872 (lambda _
14873 ;; Remove failing test. FIXME: make it pass
14874 (delete-file "bpython/test/test_args.py")
14875 #t))
14876 (add-after 'wrap 'add-aliases
14877 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
14878 (lambda* (#:key outputs #:allow-other-keys)
14879 (let ((out (assoc-ref outputs "out")))
14880 (for-each
14881 (lambda (old new)
14882 (symlink old (string-append out "/bin/" new)))
14883 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
14884 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
14885 #t)))))
14886 (propagated-inputs
14887 `(("python-pygments" ,python-pygments)
14888 ("python-requests" ,python-requests)
4de93b2f 14889 ("python-babel" ,python-babel) ; optional, for internationalization
44d10b1f
RW
14890 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
14891 ("python-greenlet" ,python-greenlet)
4de93b2f 14892 ("python-urwid" ,python-urwid) ; for bpython-urwid only
44d10b1f
RW
14893 ("python-six" ,python-six)))
14894 (native-inputs
14895 `(("python-sphinx" ,python-sphinx)
14896 ("python-mock" ,python-mock)))
14897 (home-page "https://bpython-interpreter.org/")
14898 (synopsis "Fancy interface to the Python interpreter")
14899 (description "Bpython is a fancy interface to the Python
14900interpreter. bpython's main features are
14901
14902@enumerate
14903@item in-line syntax highlighting,
14904@item readline-like autocomplete with suggestions displayed as you type,
14905@item expected parameter list for any Python function,
14906@item \"rewind\" function to pop the last line of code from memory and
14907 re-evaluate,
14908@item send the code you've entered off to a pastebin,
14909@item save the code you've entered to a file, and
14910@item auto-indentation.
14911@end enumerate")
14912 (license license:expat)))
14913
14914(define-public bpython2
14915 (let ((base (package-with-python2
14916 (strip-python2-variant bpython))))
14917 (package (inherit base)
14918 (name "bpython2")
14919 (arguments
14920 `(#:python ,python-2
14921 #:phases
14922 (modify-phases %standard-phases
14923 (add-after 'unpack 'remove-failing-test
14924 (lambda _
14925 ;; Remove failing test. FIXME: make it pass
14926 (delete-file "bpython/test/test_args.py")
14927 ;; Disable failing test-cases (renaming inhibits they are
14928 ;; discovered)
14929 (substitute* "bpython/test/test_curtsies_repl.py"
14930 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
14931 (string-append a "xxx_off_" b))
14932 (("^(\\s*def )(test_complex\\W)" _ a b)
14933 (string-append a "xxx_off_" b)))
14934 #t))
14935 (add-before 'build 'rename-scripts
14936 ;; rename the scripts to bypthon2, bpdb2, etc.
14937 (lambda _
14938 (substitute* "setup.py"
14939 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
14940 (string-append name "2" rest "\n"))
14941 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
14942 (string-append name "2" (or sub "") rest "\n")))
14943 #t))))))))
14944
14945(define-public python-pyinotify
14946 (package
14947 (name "python-pyinotify")
14948 (version "0.9.6")
14949 (source (origin
14950 (method url-fetch)
14951 (uri (pypi-uri "pyinotify" version))
14952 (sha256
14953 (base32
14954 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
14955 (build-system python-build-system)
14956 (arguments `(#:tests? #f)) ;no tests
14957 (home-page "https://github.com/seb-m/pyinotify")
14958 (synopsis "Python library for monitoring inotify events")
14959 (description
14960 "@code{pyinotify} provides a Python interface for monitoring
14961file system events on Linux.")
14962 (license license:expat)))
14963
14964(define-public python2-pyinotify
14965 (package-with-python2 python-pyinotify))
14966
14967;; Ada parser uses this version.
14968(define-public python2-quex-0.67.3
14969 (package
14970 (name "python2-quex")
14971 (version "0.67.3")
14972 (source
14973 (origin
14974 (method url-fetch)
14975 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
14976 (version-major+minor version)
14977 "/quex-" version ".zip"))
14978 (sha256
14979 (base32
14980 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
14981 (build-system python-build-system)
14982 (native-inputs
14983 `(("unzip" ,unzip)))
14984 (arguments
14985 `(#:python ,python-2
14986 #:tests? #f
14987 #:phases
14988 (modify-phases %standard-phases
14989 (delete 'configure)
14990 (delete 'build)
14991 (replace 'install
14992 (lambda* (#:key outputs #:allow-other-keys)
14993 (let* ((out (assoc-ref outputs "out"))
14994 (share/quex (string-append out "/share/quex"))
14995 (bin (string-append out "/bin")))
14996 (copy-recursively "." share/quex)
14997 (mkdir-p bin)
14998 (symlink (string-append share/quex "/quex-exe.py")
14999 (string-append bin "/quex"))
15000 #t))))))
15001 (native-search-paths
15002 (list (search-path-specification
15003 (variable "QUEX_PATH")
15004 (files '("share/quex")))))
15005 (home-page "http://quex.sourceforge.net/")
15006 (synopsis "Lexical analyzer generator in Python")
15007 (description "@code{quex} is a lexical analyzer generator in Python.")
15008 (license license:lgpl2.1+))) ; Non-military
15009
15010(define-public python2-quex
15011 (package (inherit python2-quex-0.67.3)
15012 (name "python2-quex")
15013 (version "0.68.1")
15014 (source
15015 (origin
15016 (method url-fetch)
15017 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
15018 (sha256
15019 (base32
15020 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
15021 (file-name (string-append name "-" version ".tar.gz"))))))
15022
15023(define-public python-more-itertools
15024 (package
15025 (name "python-more-itertools")
1b066827 15026 (version "7.1.0")
44d10b1f
RW
15027 (source
15028 (origin
15029 (method url-fetch)
15030 (uri (pypi-uri "more-itertools" version))
15031 (sha256
15032 (base32
1b066827 15033 "16phg2f2dvm6ci5wr49ncha5lmc0m2in3bsl33c61vzca4gkvd4b"))))
44d10b1f 15034 (build-system python-build-system)
44d10b1f
RW
15035 (home-page "https://github.com/erikrose/more-itertools")
15036 (synopsis "More routines for operating on iterables, beyond itertools")
15037 (description "Python's built-in @code{itertools} module implements a
15038number of iterator building blocks inspired by constructs from APL, Haskell,
15039and SML. @code{more-itertools} includes additional building blocks for
15040working with iterables.")
47f66348 15041 (properties `((python2-variant . ,(delay python2-more-itertools))))
44d10b1f
RW
15042 (license license:expat)))
15043
47f66348 15044;; The 5.x series are the last versions supporting Python 2.7.
44d10b1f 15045(define-public python2-more-itertools
47f66348
MB
15046 (package
15047 (inherit python-more-itertools)
15048 (name "python2-more-itertools")
15049 (version "5.0.0")
15050 (source (origin
15051 (method url-fetch)
15052 (uri (pypi-uri "more-itertools" version))
15053 (sha256
15054 (base32
15055 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
15056 (arguments
15057 `(#:python ,python2-minimal))
15058 (propagated-inputs
15059 `(("python2-six" ,python2-six-bootstrap)))))
44d10b1f
RW
15060
15061(define-public python-latexcodec
15062 (package
15063 (name "python-latexcodec")
f3415ba5 15064 (version "1.0.7")
44d10b1f
RW
15065 (source
15066 (origin
15067 (method url-fetch)
15068 (uri (pypi-uri "latexcodec" version))
15069 (sha256
f3415ba5 15070 (base32 "0wnp3yqcgx0rpy8dz51vh75lbp2qif67da19zi7m3ca98n887hgb"))))
44d10b1f
RW
15071 (build-system python-build-system)
15072 (inputs
15073 `(("python-six" ,python-six)))
15074 (home-page "https://readthedocs.org/projects/latexcodec/")
15075 (synopsis "Work with LaTeX code in Python")
15076 (description "Lexer and codec to work with LaTeX code in Python.")
15077 (license license:expat)))
15078
15079(define-public python-pybtex
15080 (package
15081 (name "python-pybtex")
9441a9c1 15082 (version "0.22.2")
44d10b1f
RW
15083 (source
15084 (origin
15085 (method url-fetch)
15086 (uri (pypi-uri "pybtex" version))
15087 (sha256
9441a9c1 15088 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
44d10b1f
RW
15089 (build-system python-build-system)
15090 (native-inputs
15091 `(("python-nose" ,python-nose)))
15092 (inputs
15093 `(("python-latexcodec" ,python-latexcodec)
15094 ("python-pyyaml" ,python-pyyaml)
15095 ("python-six" ,python-six)))
15096 (arguments
15097 `(#:test-target "nosetests"))
15098 (home-page "https://pybtex.org/")
15099 (synopsis "BibTeX-compatible bibliography processor")
15100 (description "Pybtex is a BibTeX-compatible bibliography processor written
15101in Python. You can simply type pybtex instead of bibtex.")
15102 (license license:expat)))
15103
15104(define-public python-onetimepass
15105 (package
15106 (name "python-onetimepass")
15107 (version "1.0.1")
15108 (source
15109 (origin
15110 (method url-fetch)
15111 (uri (pypi-uri "onetimepass" version))
15112 (sha256
15113 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
15114 (build-system python-build-system)
15115 (propagated-inputs `(("python-six" ,python-six)))
15116 (home-page "https://github.com/tadeck/onetimepass/")
15117 (synopsis "One-time password library")
15118 (description "Python one-time password library for HMAC-based (HOTP) and
15119time-based (TOTP) passwords.")
15120 (license license:expat)))
15121
15122(define-public python-parso
15123 (package
15124 (name "python-parso")
1475094a 15125 (version "0.5.1")
44d10b1f
RW
15126 (source
15127 (origin
15128 (method url-fetch)
15129 (uri (pypi-uri "parso" version))
15130 (sha256
15131 (base32
1475094a 15132 "171a9ivhxwsd52h1cgsz40zgzpgzscn7yqb7sdjhy8m1lzj0wsv6"))))
44d10b1f
RW
15133 (native-inputs
15134 `(("python-pytest" ,python-pytest)))
15135 (build-system python-build-system)
4eb97c25
MC
15136 (arguments
15137 `(#:phases (modify-phases %standard-phases
15138 (replace 'check
15139 (lambda _ (invoke "pytest" "-vv"))))))
44d10b1f
RW
15140 (home-page "https://github.com/davidhalter/parso")
15141 (synopsis "Python Parser")
15142 (description "Parso is a Python parser that supports error recovery and
15143round-trip parsing for different Python versions (in multiple Python versions).
15144Parso is also able to list multiple syntax errors in your Python file.")
15145 (license license:expat)))
15146
15147(define-public python2-parso
15148 (package-with-python2 python-parso))
15149
15150(define-public python-async-generator
15151 (package
15152 (name "python-async-generator")
94fcbf8d 15153 (version "1.10")
44d10b1f
RW
15154 (source
15155 (origin
15156 (method url-fetch)
15157 (uri (pypi-uri "async_generator" version))
15158 (sha256
15159 (base32
94fcbf8d 15160 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
44d10b1f
RW
15161 (build-system python-build-system)
15162 (native-inputs
15163 `(("python-pytest" ,python-pytest)))
15164 (home-page "https://github.com/python-trio/async_generator")
15165 (synopsis "Async generators and context managers for Python 3.5+")
15166 (description "@code{async_generator} back-ports Python 3.6's native async
15167generators and Python 3.7's context managers into Python 3.5.")
15168 ;; Dual licensed.
15169 (license (list license:expat license:asl2.0))))
15170
15171(define-public python-async-timeout
15172 (package
15173 (name "python-async-timeout")
15174 (version "3.0.1")
15175 (source
15176 (origin
15177 (method url-fetch)
15178 (uri (pypi-uri "async-timeout" version))
15179 (sha256
15180 (base32
15181 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
15182 (build-system python-build-system)
15183 (home-page "https://github.com/aio-libs/async_timeout/")
15184 (synopsis "Timeout context manager for asyncio programs")
15185 (description "@code{async-timeout} provides a timeout timeout context
15186manager compatible with @code{asyncio}.")
15187 (license license:asl2.0)))
15188
15189(define-public python-glob2
15190 (package
15191 (name "python-glob2")
4df49d19 15192 (version "0.7")
8fa2bcc7
TGR
15193 (source
15194 (origin
15195 (method git-fetch)
15196 (uri (git-reference
15197 (url "https://github.com/miracle2k/python-glob2.git")
4df49d19 15198 (commit (string-append "v" version))))
8fa2bcc7
TGR
15199 (file-name (git-file-name name version))
15200 (sha256
4df49d19 15201 (base32 "160nh2ay9lw2hi0rixpzb2k87r6ql56k0j2cm87lqz8xc8zbw919"))))
44d10b1f
RW
15202 (build-system python-build-system)
15203 (home-page "https://github.com/miracle2k/python-glob2/")
15204 (synopsis "Extended Version of the python buildin glob module")
15205 (description "This is an extended version of the Python
15206@url{http://docs.python.org/library/glob.html, built-in glob module} which
15207adds:
15208
15209@itemize
15210@item The ability to capture the text matched by glob patterns, and return
15211those matches alongside the file names.
15212@item A recursive @code{**} globbing syntax, akin for example to the
15213@code{globstar} option of Bash.
15214@item The ability to replace the file system functions used, in order to glob
15215on virtual file systems.
15216@item Compatible with Python 2 and Python 3 (tested with 3.3).
15217@end itemize
15218
15219Glob2 currently based on the glob code from Python 3.3.1.")
15220 (license license:bsd-2)))
15221
15222(define-public python2-glob2
15223 (package-with-python2 python-glob2))
15224
15225(define-public python-gipc
15226 (package
15227 (name "python-gipc")
15228 (version "0.6.0")
15229 (source
15230 (origin
15231 (method url-fetch)
15232 (uri (pypi-uri "gipc" version ".zip"))
15233 (sha256
15234 (base32
15235 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
15236 (build-system python-build-system)
15237 (native-inputs
15238 `(("unzip" ,unzip)))
15239 (propagated-inputs
15240 `(("python-gevent" ,python-gevent)))
15241 (home-page "http://gehrcke.de/gipc")
15242 (synopsis "Child process management in the context of gevent")
15243 (description "Usage of Python's multiprocessing package in a
15244gevent-powered application may raise problems. With @code{gipc},
15245process-based child processes can safely be created anywhere within a
15246gevent-powered application.")
15247 (license license:expat)))
15248
15249(define-public python2-gipc
15250 (package-with-python2 python-gipc))
15251
15252(define-public python-fusepy
15253 (package
15254 (name "python-fusepy")
15255 (version "2.0.4")
15256 (source
15257 (origin
15258 (method url-fetch)
15259 (uri (pypi-uri "fusepy" version))
15260 (sha256
15261 (base32
15262 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
15263 (build-system python-build-system)
15264 (arguments
15265 `(#:phases
15266 (modify-phases %standard-phases
15267 (add-before 'build 'set-library-file-name
15268 (lambda* (#:key inputs #:allow-other-keys)
15269 (let ((fuse (assoc-ref inputs "fuse")))
15270 (substitute* "fuse.py"
15271 (("find_library\\('fuse'\\)")
15272 (string-append "'" fuse "/lib/libfuse.so'")))
15273 #t))))))
15274 (propagated-inputs
15275 `(("fuse" ,fuse)))
15276 (home-page "https://github.com/fusepy/fusepy")
15277 (synopsis "Simple ctypes bindings for FUSE")
15278 (description "Python module that provides a simple interface to FUSE and
15279MacFUSE. The binding is created using the standard @code{ctypes} library.")
15280 (license license:isc)))
15281
15282(define-public python2-fusepy
15283 (package-with-python2 python-fusepy))
15284
15285(define-public python2-gdrivefs
15286 (package
15287 (name "python2-gdrivefs")
15288 (version "0.14.9")
15289 (source
15290 (origin
15291 (method url-fetch)
15292 (uri (pypi-uri "gdrivefs" version))
15293 (sha256
15294 (base32
15295 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
15296 (build-system python-build-system)
15297 (arguments
15298 `(#:python ,python-2
15299 #:phases
15300 (modify-phases %standard-phases
15301 (add-before 'build 'patch-setup-py
15302 (lambda _
15303 ;; Update requirements from dependency==version
15304 ;; to dependency>=version
15305 (substitute* "gdrivefs/resources/requirements.txt"
15306 (("==") ">="))
15307 #t)))))
15308 (native-inputs
15309 `(("python2-gipc" ,python2-gipc)
15310 ("python2-gevent" ,python2-gevent)
15311 ("python2-greenlet" ,python2-greenlet)
15312 ("python2-httplib2" ,python2-httplib2)
15313 ("python2-uritemplate" ,python2-uritemplate)
15314 ("python2-oauth2client" ,python2-oauth2client)
15315 ("python2-six" ,python2-six)))
15316 (propagated-inputs
15317 `(("python2-dateutil" ,python2-dateutil)
15318 ("python2-fusepy" ,python2-fusepy)
15319 ("python2-google-api-client" ,python2-google-api-client)))
15320 (home-page "https://github.com/dsoprea/GDriveFS")
15321 (synopsis "Mount Google Drive as a local file system")
15322 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
15323under Python 2.7.")
15324 (license license:gpl2)))
15325
15326(define-public pybind11
15327 (package
15328 (name "pybind11")
d478cc04 15329 (version "2.3.0")
44d10b1f
RW
15330 (source (origin
15331 (method git-fetch)
15332 (uri (git-reference
15333 (url "https://github.com/pybind/pybind11.git")
15334 (commit (string-append "v" version))))
15335 (sha256
15336 (base32
d478cc04 15337 "11b6dniri8m05spfd2a19irz82shf4sdca73566bniggrf3zclnf"))
44d10b1f
RW
15338 (file-name (git-file-name name version))))
15339 (build-system cmake-build-system)
15340 (native-inputs
15341 `(("python" ,python)
15342 ("python-pytest" ,python-pytest)))
15343 (arguments
15344 `(#:test-target "check"))
15345 (home-page "https://github.com/pybind/pybind11/")
15346 (synopsis "Seamless operability between C++11 and Python")
15347 (description "pybind11 is a lightweight header-only library that exposes
15348C++ types in Python and vice versa, mainly to create Python bindings of
15349existing C++ code. Its goals and syntax are similar to the excellent
15350Boost.Python library by David Abrahams: to minimize boilerplate code in
15351traditional extension modules by inferring type information using compile-time
15352introspection.")
15353 (license license:expat)))
15354
15355(define-public python-fasteners
15356 (package
15357 (name "python-fasteners")
15358 (version "0.14.1")
15359 (source
15360 (origin
15361 (method url-fetch)
15362 (uri (pypi-uri "fasteners" version))
15363 (sha256
15364 (base32
15365 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
15366 (build-system python-build-system)
15367 (propagated-inputs
15368 `(("python-monotonic" ,python-monotonic)
15369 ("python-six" ,python-six)
15370 ("python-testtools" ,python-testtools)))
15371 (home-page "https://github.com/harlowja/fasteners")
15372 (synopsis "Python package that provides useful locks")
15373 (description
15374 "This package provides a Python program that provides following locks:
15375
15376@itemize
15377@item Locking decorator
15378@item Reader-writer locks
15379@item Inter-process locks
15380@item Generic helpers
15381@end itemize\n")
15382 (properties `((python2-variant . ,(delay python2-fasteners))))
15383 (license license:asl2.0)))
15384
15385(define-public python2-fasteners
15386 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
15387 (package
15388 (inherit base)
15389 (propagated-inputs
15390 `(("python2-futures" ,python2-futures)
15391 ,@(package-propagated-inputs base))))))
15392
15393(define-public python-requests-file
15394 (package
15395 (name "python-requests-file")
15396 (version "1.4.3")
15397 (source
15398 (origin
15399 (method url-fetch)
15400 (uri (pypi-uri "requests-file" version))
15401 (sha256
15402 (base32
15403 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
15404 (build-system python-build-system)
15405 (propagated-inputs
15406 `(("python-requests" ,python-requests)
15407 ("python-six" ,python-six)))
15408 (home-page
15409 "https://github.com/dashea/requests-file")
15410 (synopsis "File transport adapter for Requests")
15411 (description
15412 "Requests-File is a transport adapter for use with the Requests Python
52beae7b 15413library to allow local file system access via @code{file://} URLs.")
44d10b1f
RW
15414 (license license:asl2.0)))
15415
15416(define-public python2-requests-file
15417 (package-with-python2 python-requests-file))
15418
15419(define-public python-tldextract
15420 (package
15421 (name "python-tldextract")
15422 (version "2.2.0")
15423 (source
15424 (origin
15425 (method url-fetch)
15426 (uri (pypi-uri "tldextract" version))
15427 (sha256
15428 (base32
15429 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
15430 (build-system python-build-system)
15431 (native-inputs
15432 `(("python-pytest" ,python-pytest)
15433 ("python-responses" ,python-responses)))
15434 (propagated-inputs
15435 `(("python-idna" ,python-idna)
15436 ("python-requests" ,python-requests)
15437 ("python-requests-file" ,python-requests-file)))
15438 (home-page
15439 "https://github.com/john-kurkowski/tldextract")
15440 (synopsis
15441 "Separate the TLD from the registered domain and subdomains of a URL")
15442 (description
15443 "TLDExtract accurately separates the TLD from the registered domain and
15444subdomains of a URL, using the Public Suffix List. By default, this includes
15445the public ICANN TLDs and their exceptions. It can optionally support the
15446Public Suffix List's private domains as well.")
15447 (license license:bsd-3)))
15448
15449(define-public python2-tldextract
15450 (package-with-python2 python-tldextract))
15451
15452(define-public python-pynamecheap
15453 (package
15454 (name "python-pynamecheap")
15455 (version "0.0.3")
15456 (source
15457 (origin
15458 (method url-fetch)
15459 (uri (pypi-uri "PyNamecheap" version))
15460 (sha256
15461 (base32
15462 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
15463 (build-system python-build-system)
15464 (propagated-inputs
15465 `(("python-requests" ,python-requests)))
15466 (home-page
15467 "https://github.com/Bemmu/PyNamecheap")
15468 (synopsis
15469 "Namecheap API client in Python")
15470 (description
15471 "PyNamecheap is a Namecheap API client in Python.")
15472 (license license:expat)))
15473
15474(define-public python2-pynamecheap
15475 (package-with-python2 python-pynamecheap))
15476
15477(define-public python-dns-lexicon
15478 (package
15479 (name "python-dns-lexicon")
15480 (version "2.4.0")
15481 (source
15482 (origin
15483 (method url-fetch)
15484 (uri (pypi-uri "dns-lexicon" version))
15485 (sha256
15486 (base32
15487 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
15488 (build-system python-build-system)
15489 (arguments
15490 `(#:tests? #f)) ;requires internet access
15491 (propagated-inputs
15492 `(("python-future" ,python-future)
15493 ("python-pynamecheap" ,python-pynamecheap)
15494 ("python-requests" ,python-requests)
15495 ("python-tldextract" ,python-tldextract)
15496 ("python-urllib3" ,python-urllib3)))
15497 (home-page "https://github.com/AnalogJ/lexicon")
15498 (synopsis
15499 "Manipulate DNS records on various DNS providers")
15500 (description
15501 "Lexicon provides a way to manipulate DNS records on multiple DNS
15502providers in a standardized way. It has a CLI but it can also be used as a
15503Python library. It was designed to be used in automation, specifically with
15504Let's Encrypt.")
15505 (license license:expat)))
15506
15507(define-public python2-dns-lexicon
15508 (package-with-python2 python-dns-lexicon))
15509
15510(define-public python-commandlines
15511 (package
15512 (name "python-commandlines")
15513 (version "0.4.1")
15514 (source
15515 (origin
15516 (method url-fetch)
15517 (uri (pypi-uri "commandlines" version))
15518 (sha256
15519 (base32
15520 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
15521 (build-system python-build-system)
15522 (home-page "https://github.com/chrissimpkins/commandlines")
15523 (synopsis "Command line argument to object parsing library")
15524 (description
15525 "@code{Commandlines} is a Python library for command line application
15526development that supports command line argument parsing, command string
15527validation testing and application logic.")
15528 (license license:expat)))
15529
15530;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
15531;; python-numba. They have a very unflexible relationship.
15532(define-public python-numba
15533 (package
15534 (name "python-numba")
65f84096 15535 (version "0.46.0")
44d10b1f
RW
15536 (source
15537 (origin
15538 (method url-fetch)
15539 (uri (pypi-uri "numba" version))
15540 (sha256
15541 (base32
65f84096 15542 "1vnfzcq6fcnkmdms6114d49awvvj5181fl7z1wlha27qc2paxjy2"))))
44d10b1f
RW
15543 (build-system python-build-system)
15544 (arguments
15545 `(#:modules ((guix build utils)
15546 (guix build python-build-system)
15547 (ice-9 ftw)
15548 (srfi srfi-1)
15549 (srfi srfi-26))
15550 #:phases
15551 (modify-phases %standard-phases
15552 (add-after 'unpack 'disable-proprietary-features
15553 (lambda _
15554 (setenv "NUMBA_DISABLE_HSA" "1")
15555 (setenv "NUMBA_DISABLE_CUDA" "1")
15556 #t))
15557 (add-after 'unpack 'remove-failing-tests
15558 (lambda _
65f84096 15559 ;; FIXME: These tests fail for unknown reasons:
44d10b1f
RW
15560 ;; test_non_writable_pycache, test_non_creatable_pycache, and
15561 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
15562 (substitute* "numba/tests/test_dispatcher.py"
15563 (("def test(_non_writable_pycache)" _ m)
15564 (string-append "def guix_skip" m))
15565 (("def test(_non_creatable_pycache)" _ m)
15566 (string-append "def guix_skip" m))
15567 (("def test(_frozen)" _ m)
15568 (string-append "def guix_skip" m)))
15569
15570 ;; These tests fail because we don't run the tests from the build
15571 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
65f84096 15572 ;; They are in numba.tests.test_pycc.TestDistutilsSupport.
44d10b1f
RW
15573 (substitute* "numba/tests/test_pycc.py"
15574 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
15575 (string-append "def guix_skip" m)))
65f84096
BG
15576
15577 ;; These tests fail because our version of Python does not have
15578 ;; a recognizable front-end for the Numba distribution to use
15579 ;; to check against.
15580 (substitute* "numba/tests/test_entrypoints.py"
15581 (("def test(_init_entrypoint)" _ m)
15582 (string-append "def guix_skip" m)))
15583 (substitute* "numba/tests/test_jitclasses.py"
15584 (("def test(_jitclass_longlabel_not_truncated)" _ m)
15585 (string-append "def guix_skip" m)))
44d10b1f
RW
15586 #t))
15587 (replace 'check
15588 (lambda _
15589 (let ((cwd (getcwd)))
15590 (setenv "PYTHONPATH"
15591 (string-append cwd "/build/"
15592 (find (cut string-prefix? "lib" <>)
15593 (scandir (string-append cwd "/build")))
15594 ":"
15595 (getenv "PYTHONPATH")))
15596 ;; Something is wrong with the PYTHONPATH when running the
15597 ;; tests from the build directory, as it complains about not being
15598 ;; able to import certain modules.
15599 (with-directory-excursion "/tmp"
15600 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
15601 #t)))))
15602 (propagated-inputs
15603 `(("python-llvmlite" ,python-llvmlite)
15604 ("python-numpy" ,python-numpy)
15605 ("python-singledispatch" ,python-singledispatch)))
15606 ;; Needed for tests.
15607 (inputs
15608 `(("python-jinja2" ,python-jinja2)
15609 ("python-pygments" ,python-pygments)))
15610 (home-page "https://numba.pydata.org")
15611 (synopsis "Compile Python code using LLVM")
15612 (description "Numba gives you the power to speed up your applications with
15613high performance functions written directly in Python. With a few
15614annotations, array-oriented and math-heavy Python code can be just-in-time
15615compiled to native machine instructions, similar in performance to C, C++ and
15616Fortran, without having to switch languages or Python interpreters.
15617
15618Numba works by generating optimized machine code using the LLVM compiler
15619infrastructure at import time, runtime, or statically (using the included pycc
15620tool).")
15621 (license license:bsd-3)))
15622
15623(define-public python-anndata
15624 (package
15625 (name "python-anndata")
8c9372c1 15626 (version "0.6.18")
44d10b1f
RW
15627 (source
15628 (origin
15629 (method url-fetch)
15630 (uri (pypi-uri "anndata" version))
15631 (sha256
15632 (base32
8c9372c1 15633 "03x83yjaccbqszj7x4fwwmpil0ai59yx64d1zmf2691za3j03w73"))))
44d10b1f
RW
15634 (build-system python-build-system)
15635 (propagated-inputs
15636 `(("python-h5py" ,python-h5py)
15637 ("python-natsort" ,python-natsort)
15638 ("python-pandas" ,python-pandas)
15639 ("python-scipy" ,python-scipy)))
15640 (home-page "https://github.com/theislab/anndata")
15641 (synopsis "Annotated data for data analysis pipelines")
15642 (description "Anndata is a package for simple (functional) high-level APIs
15643for data analysis pipelines. In this context, it provides an efficient,
15644scalable way of keeping track of data together with learned annotations and
15645reduces the code overhead typically encountered when using a mostly
15646object-oriented library such as @code{scikit-learn}.")
15647 (license license:bsd-3)))
15648
15649(define-public python-dill
15650 (package
15651 (name "python-dill")
32be3577 15652 (version "0.3.1.1")
44d10b1f
RW
15653 (source
15654 (origin
15655 (method url-fetch)
15656 (uri (pypi-uri "dill" version))
15657 (sha256
32be3577 15658 (base32 "1704g8z70d210ksgbccs2v545v9w0wc6lx15m296alb7jf0yzn22"))))
44d10b1f 15659 (build-system python-build-system)
32be3577
MIP
15660 (arguments
15661 `(#:phases
15662 (modify-phases %standard-phases
15663 (replace 'check
15664 (lambda _
15665 (with-directory-excursion "/tmp"
15666 (invoke "nosetests" "-v"))
15667 #t)))))
15668 (native-inputs
15669 `(("python-nose" ,python-nose)))
15670 (home-page "https://pypi.org/project/dill/")
44d10b1f
RW
15671 (synopsis "Serialize all of Python")
15672 (description "Dill extends Python's @code{pickle} module for serializing
15673and de-serializing Python objects to the majority of the built-in Python
15674types. Dill provides the user the same interface as the @code{pickle} module,
15675and also includes some additional features. In addition to pickling Python
15676objects, @code{dill} provides the ability to save the state of an interpreter
61985d65 15677session in a single command. Hence, it would be feasible to save a
44d10b1f
RW
15678interpreter session, close the interpreter, ship the pickled file to another
15679computer, open a new interpreter, unpickle the session and thus continue from
15680the saved state of the original interpreter session.")
15681 (license license:bsd-3)))
15682
15683(define-public python-multiprocess
15684 (package
15685 (name "python-multiprocess")
fcc4e9e7 15686 (version "0.70.9")
44d10b1f
RW
15687 (source
15688 (origin
15689 (method url-fetch)
15690 (uri (pypi-uri "multiprocess" version))
15691 (sha256
15692 (base32
fcc4e9e7 15693 "1r882nvd44xqwbrclwqx5rhs80l6809rcvpc7pkpgnij06cvvmcz"))))
44d10b1f 15694 (build-system python-build-system)
fcc4e9e7
MIP
15695 (arguments
15696 `(#:phases
15697 (modify-phases %standard-phases
15698 (add-after 'unpack 'disable-broken-tests
15699 (lambda _
15700 ;; This test is broken as there is no keyboard interrupt.
15701 (substitute* "py3.7/multiprocess/tests/__init__.py"
15702 (("^(.*)def test_wait_result"
15703 line indent)
15704 (string-append indent
15705 "@unittest.skip(\"Disabled by Guix\")\n"
15706 line)))
15707 #t))
15708 ;; Tests must be run after installation.
15709 (delete 'check)
15710 (add-after 'install 'check
15711 (lambda* (#:key inputs outputs #:allow-other-keys)
15712 (add-installed-pythonpath inputs outputs)
15713 (invoke "python" "-m" "multiprocess.tests")
15714 #t)))))
44d10b1f
RW
15715 (propagated-inputs
15716 `(("python-dill" ,python-dill)))
fcc4e9e7 15717 (home-page "https://pypi.org/project/multiprocess/")
44d10b1f
RW
15718 (synopsis "Multiprocessing and multithreading in Python")
15719 (description
15720 "This package is a fork of the multiprocessing Python package, a package
15721which supports the spawning of processes using the API of the standard
15722library's @code{threading} module.")
15723 (license license:bsd-3)))
15724
15725(define-public python-toolz
15726 (package
15727 (name "python-toolz")
15728 (version "0.9.0")
15729 (source
15730 (origin
15731 (method url-fetch)
15732 (uri (pypi-uri "toolz" version))
15733 (sha256
15734 (base32
15735 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
15736 (build-system python-build-system)
15737 ;; FIXME: tests cannot be computed: "Can't perform this operation for
15738 ;; unregistered loader type"
15739 (arguments '(#:tests? #f))
15740 (home-page "https://github.com/pytoolz/toolz/")
15741 (synopsis "List processing tools and functional utilities")
15742 (description
15743 "This package provides a set of utility functions for iterators,
15744functions, and dictionaries.")
15745 (license license:bsd-3)))
15746
15747(define-public python2-toolz
15748 (package-with-python2 python-toolz))
15749
15750(define-public python-cytoolz
15751 (package
15752 (name "python-cytoolz")
15753 (version "0.9.0.1")
15754 (source
15755 (origin
15756 (method url-fetch)
15757 (uri (pypi-uri "cytoolz" version))
15758 (sha256
15759 (base32
15760 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
15761 (build-system python-build-system)
15762 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
15763 ;; 'exceptions'"
15764 (arguments '(#:tests? #f))
15765 (propagated-inputs
15766 `(("python-toolz" ,python-toolz)))
15767 (native-inputs
15768 `(("python-cython" ,python-cython)))
15769 (home-page "https://github.com/pytoolz/cytoolz")
15770 (synopsis "High performance functional utilities")
15771 (description
15772 "The cytoolz package implements the same API as provided by toolz. The
15773main differences are that @code{cytoolz} is faster and cytoolz offers a C API
15774that is accessible to other projects developed in Cython.")
15775 (license license:bsd-3)))
15776
15777(define-public python-sortedcontainers
15778 (package
15779 (name "python-sortedcontainers")
b244f166 15780 (version "2.1.0")
44d10b1f
RW
15781 (source
15782 (origin
15783 (method url-fetch)
15784 (uri (pypi-uri "sortedcontainers" version))
15785 (sha256
15786 (base32
b244f166 15787 "0fm0w5id2yhqld95hg2m636vjgkz377rvgdfqaxc25vbylr9lklp"))))
44d10b1f
RW
15788 (build-system python-build-system)
15789 (native-inputs
15790 `(("python-tox" ,python-tox)))
15791 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
15792 (synopsis "Sorted List, Sorted Dict, Sorted Set")
15793 (description
15794 "This package provides a sorted collections library, written in
15795pure-Python.")
15796 (license license:asl2.0)))
15797
15798(define-public python-cloudpickle
15799 (package
15800 (name "python-cloudpickle")
15801 (version "0.6.1")
15802 (source
15803 (origin
15804 (method url-fetch)
15805 (uri (pypi-uri "cloudpickle" version))
15806 (sha256
15807 (base32
15808 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
15809 (build-system python-build-system)
15810 ;; FIXME: there are 5 errors in 122 tests:
15811 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
15812 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
15813 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15814 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15815 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
15816 ;; TypeError: cannot serialize '_io.BufferedRandom' object
15817 (arguments '(#:tests? #f))
15818 (native-inputs
15819 `(("python-pytest" ,python-pytest)
15820 ("python-mock" ,python-mock)
15821 ("python-tornado" ,python-tornado)))
15822 (home-page "https://github.com/cloudpipe/cloudpickle")
15823 (synopsis "Extended pickling support for Python objects")
15824 (description
15825 "Cloudpickle makes it possible to serialize Python constructs not
15826supported by the default pickle module from the Python standard library. It
15827is especially useful for cluster computing where Python expressions are
15828shipped over the network to execute on remote hosts, possibly close to the
15829data.")
15830 (license license:bsd-3)))
15831
15832(define-public python2-cloudpickle
15833 (package-with-python2 python-cloudpickle))
15834
15835(define-public python-locket
15836 (package
15837 (name "python-locket")
15838 (version "0.2.0")
15839 (source
15840 (origin
15841 (method url-fetch)
15842 (uri (pypi-uri "locket" version))
15843 (sha256
15844 (base32
15845 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
15846 (build-system python-build-system)
15847 (home-page "https://github.com/mwilliamson/locket.py")
15848 (synopsis "File-based locks for Python")
15849 (description
15850 "Locket implements a lock that can be used by multiple processes provided
15851they use the same path.")
15852 (license license:bsd-2)))
15853
15854(define-public python2-locket
15855 (package-with-python2 python-locket))
15856
15857(define-public python-blosc
15858 (package
15859 (name "python-blosc")
15860 (version "1.5.1")
15861 (source
15862 (origin
15863 (method url-fetch)
15864 (uri (pypi-uri "blosc" version))
15865 (sha256
15866 (base32
15867 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
15868 (build-system python-build-system)
15869 ;; FIXME: all tests pass, but then this error is printed:
15870 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
15871 (arguments '(#:tests? #f))
15872 (propagated-inputs
15873 `(("python-numpy" ,python-numpy)))
15874 (home-page "https://github.com/blosc/python-blosc")
15875 (synopsis "Python wrapper for the Blosc data compressor library")
15876 (description "Blosc is a high performance compressor optimized for binary
15877data. It has been designed to transmit data to the processor cache faster
15878than the traditional, non-compressed, direct memory fetch approach via a
15879@code{memcpy()} system call.
15880
15881Blosc works well for compressing numerical arrays that contains data with
15882relatively low entropy, like sparse data, time series, grids with
15883regular-spaced values, etc.
15884
15885This Python package wraps the Blosc library.")
15886 (license license:bsd-3)))
15887
15888(define-public python2-blosc
15889 (package-with-python2 python-blosc))
15890
15891(define-public python-partd
15892 (package
15893 (name "python-partd")
15894 (version "0.3.9")
15895 (source
15896 (origin
15897 (method url-fetch)
15898 (uri (pypi-uri "partd" version))
15899 (sha256
15900 (base32
15901 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
15902 (build-system python-build-system)
15903 (propagated-inputs
15904 `(("python-blosc" ,python-blosc)
15905 ("python-locket" ,python-locket)
15906 ("python-numpy" ,python-numpy)
15907 ("python-pandas" ,python-pandas)
15908 ("python-pyzmq" ,python-pyzmq)
15909 ("python-toolz" ,python-toolz)))
15910 (home-page "https://github.com/dask/partd/")
15911 (synopsis "Appendable key-value storage")
15912 (description "Partd stores key-value pairs. Values are raw bytes. We
15913append on old values. Partd excels at shuffling operations.")
15914 (license license:bsd-3)))
15915
15916(define-public python2-partd
15917 (package-with-python2 python-partd))
15918
c70a0191
RW
15919(define-public python-fsspec
15920 (package
15921 (name "python-fsspec")
15922 (version "0.6.1")
15923 (source
15924 (origin
15925 (method url-fetch)
15926 (uri (pypi-uri "fsspec" version))
15927 (sha256
15928 (base32
15929 "1g9ba8v04s1nrh7pvzfm2md7ivl2mrz3hcq3y9d1a44gd62h17zj"))))
15930 (build-system python-build-system)
15931 (arguments '(#:tests? #f)) ; there are none
15932 (home-page "https://github.com/intake/filesystem_spec")
15933 (synopsis "File-system specification")
15934 (description "The purpose of this package is to produce a template or
15935specification for a file-system interface, that specific implementations
15936should follow, so that applications making use of them can rely on a common
15937behavior and not have to worry about the specific internal implementation
15938decisions with any given backend.")
15939 (license license:bsd-3)))
15940
44d10b1f
RW
15941(define-public python-dask
15942 (package
15943 (name "python-dask")
86c7ca07 15944 (version "2.9.0")
44d10b1f
RW
15945 (source
15946 (origin
15947 (method url-fetch)
15948 (uri (pypi-uri "dask" version))
15949 (sha256
86c7ca07 15950 (base32 "1w1hqr8vyx6ygwflj2737dcy0mmgvrc0s602gnny8pzlcbs9m76b"))))
44d10b1f 15951 (build-system python-build-system)
44d10b1f
RW
15952 (arguments
15953 `(#:phases
15954 (modify-phases %standard-phases
86c7ca07 15955 (add-after 'unpack 'disable-broken-tests
44d10b1f 15956 (lambda _
86c7ca07 15957 ;; This test is marked as xfail when pytest-xdist is used.
44d10b1f
RW
15958 (substitute* "dask/tests/test_threaded.py"
15959 (("def test_interrupt\\(\\)" m)
15960 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15961 m)))
86c7ca07
RW
15962 ;; This one fails with a type error:
15963 ;; TypeError: Already tz-aware, use tz_convert to convert.
15964 (substitute* "dask/dataframe/tests/test_shuffle.py"
15965 (("def test_set_index_timestamp\\(\\)" m)
15966 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15967 m)))
44d10b1f
RW
15968 #t))
15969 (replace 'check
15970 (lambda _ (invoke "pytest" "-vv"))))))
15971 (propagated-inputs
15972 `(("python-cloudpickle" ,python-cloudpickle)
86c7ca07 15973 ("python-fsspec" ,python-fsspec)
44d10b1f 15974 ("python-numpy" ,python-numpy)
86c7ca07 15975 ("python-packaging" ,python-packaging)
44d10b1f
RW
15976 ("python-pandas" ,python-pandas)
15977 ("python-partd" ,python-partd)
15978 ("python-toolz" ,python-toolz)
15979 ("python-pyyaml" ,python-pyyaml)))
15980 (native-inputs
15981 `(("python-pytest" ,python-pytest)
15982 ("python-pytest-runner" ,python-pytest-runner)))
15983 (home-page "https://github.com/dask/dask/")
15984 (synopsis "Parallel computing with task scheduling")
15985 (description
15986 "Dask is a flexible parallel computing library for analytics. It
15987consists of two components: dynamic task scheduling optimized for computation,
15988and large data collections like parallel arrays, dataframes, and lists that
15989extend common interfaces like NumPy, Pandas, or Python iterators to
15990larger-than-memory or distributed environments. These parallel collections
15991run on top of the dynamic task schedulers. ")
15992 (license license:bsd-3)))
15993
44d10b1f
RW
15994(define-public python-ilinkedlist
15995 (package
15996 (name "python-ilinkedlist")
15997 (version "0.4.0")
15998 (source
15999 (origin
16000 (method url-fetch)
16001 (uri (pypi-uri "ilinkedlist" version))
16002 (sha256
16003 (base32
16004 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
16005 (build-system python-build-system)
16006 (native-inputs `(("python-pytest" ,python-pytest)))
16007 (inputs `(("python" ,python)))
16008 (home-page "https://github.com/luther9/ilinkedlist-py")
16009 (synopsis "Immutable linked list library")
16010 (description
16011 "This is a implementation of immutable linked lists for Python. It
16012contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
16013Since a linked list is treated as immutable, it is hashable, and its length
16014can be retrieved in constant time. Some of the terminology is inspired by
16015LISP. It is possible to create an improper list by creating a @code{Pair}
16016with a non-list @code{cdr}.")
16017 (license license:gpl3+)))
16018
16019(define-public python-readlike
16020 (package
16021 (name "python-readlike")
16022 (version "0.1.3")
16023 (source
16024 (origin
16025 (method url-fetch)
16026 (uri (pypi-uri "readlike" version))
16027 (sha256
16028 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
16029 (build-system python-build-system)
16030 (home-page "https://github.com/jangler/readlike")
16031 (synopsis "GNU Readline-like line editing module")
16032 (description
16033 "This Python module provides line editing functions similar to the default
16034Emacs-style ones of GNU Readline. Unlike the Python standard library's
16035@code{readline} package, this one allows access to those capabilties in settings
16036outside of a standard command-line interface. It is especially well-suited to
16037interfacing with Urwid, due to a shared syntax for describing key inputs.
16038
16039Currently, all stateless Readline commands are implemented. Yanking and history
16040are not supported.")
16041 (license license:expat)))
16042
16043(define-public python2-readlike
16044 (package-with-python2 python-readlike))
16045
16046(define-public python-reparser
16047 (package
16048 (name "python-reparser")
16049 (version "1.4.3")
16050 (source
16051 (origin
16052 (method url-fetch)
16053 (uri (pypi-uri "ReParser" version))
16054 (sha256
16055 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
16056 (build-system python-build-system)
16057 (home-page "https://github.com/xmikos/reparser")
16058 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
16059 (description
16060 "This Python library provides a simple lexer/parser for inline markup based
16061on regular expressions.")
16062 (license license:expat)))
16063
16064(define-public python2-reparser
16065 (let ((reparser (package-with-python2
16066 (strip-python2-variant python-reparser))))
16067 (package (inherit reparser)
16068 (propagated-inputs
16069 `(("python2-enum34" ,python2-enum34)
16070 ,@(package-propagated-inputs reparser))))))
16071
16072(define-public python-precis-i18n
16073 (package
16074 (name "python-precis-i18n")
16075 (version "1.0.0")
16076 (source
16077 (origin
16078 (method url-fetch)
16079 (uri (pypi-uri "precis_i18n" version))
16080 (sha256
16081 (base32
16082 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
16083 (build-system python-build-system)
16084 (home-page "https://github.com/byllyfish/precis_i18n")
16085 (synopsis "Implementation of the PRECIS framework")
16086 (description
16087 "This module implements the PRECIS Framework as described in RFC 8264,
16088RFC 8265 and RFC 8266.")
16089 (license license:expat)))
16090
d0446c4b
RW
16091(define-public python-absl-py
16092 (package
16093 (name "python-absl-py")
16094 (version "0.6.1")
16095 (source
16096 (origin
16097 (method url-fetch)
16098 (uri (pypi-uri "absl-py" version))
16099 (sha256
16100 (base32
16101 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
16102 (build-system python-build-system)
16103 (propagated-inputs
16104 `(("python-six" ,python-six)))
16105 (home-page "https://github.com/abseil/abseil-py")
16106 (synopsis "Abseil Python common libraries")
16107 (description
16108 "This package provides the Abseil Python Common Libraries, a collection
16109of Python libraries for building Python applications.")
16110 (license license:asl2.0)))
16111
81bed4e9
RW
16112(define-public python-astor
16113 (package
16114 (name "python-astor")
16115 (version "0.7.1")
16116 (source
16117 (origin
16118 (method url-fetch)
16119 (uri (pypi-uri "astor" version))
16120 (sha256
16121 (base32
16122 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
16123 (build-system python-build-system)
16124 ;; FIXME: There are two errors and two test failures.
16125 (arguments `(#:tests? #f))
16126 (home-page "https://github.com/berkerpeksag/astor")
39ee82ff 16127 (synopsis "Read and write Python ASTs")
81bed4e9 16128 (description "Astor is designed to allow easy manipulation of Python
39ee82ff 16129source via the Abstract Syntax Tree.")
81bed4e9
RW
16130 (license license:bsd-3)))
16131
39ee82ff
RW
16132(define-public python2-astor
16133 (package-with-python2 python-astor))
16134
22e623ae
RW
16135(define-public python-grpcio
16136 (package
16137 (name "python-grpcio")
16138 (version "1.17.1")
16139 (source
16140 (origin
16141 (method url-fetch)
16142 (uri (pypi-uri "grpcio" version))
16143 (sha256
16144 (base32
16145 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
16146 (build-system python-build-system)
16147 (propagated-inputs
16148 `(("python-six" ,python-six)))
16149 (home-page "https://grpc.io")
16150 (synopsis "HTTP/2-based RPC framework")
16151 (description "This package provides a Python library for communicating
16152with the HTTP/2-based RPC framework gRPC.")
16153 (license license:asl2.0)))
16154
79869f80
RW
16155(define-public python-astunparse
16156 (package
16157 (name "python-astunparse")
47d79541 16158 (version "1.6.2")
79869f80
RW
16159 (source
16160 (origin
16161 (method url-fetch)
16162 (uri (pypi-uri "astunparse" version))
16163 (sha256
47d79541 16164 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
79869f80 16165 (build-system python-build-system)
47d79541 16166 (arguments '(#:tests? #f)) ; there are none
79869f80
RW
16167 (propagated-inputs
16168 `(("python-six" ,python-six)
16169 ("python-wheel" ,python-wheel)))
16170 (home-page "https://github.com/simonpercivall/astunparse")
16171 (synopsis "AST unparser for Python")
16172 (description "This package provides an AST unparser for Python. It is a
16173factored out version of @code{unparse} found in the Python source
16174distribution.")
16175 (license license:bsd-3)))
16176
2884aac0
RW
16177(define-public python-gast
16178 (package
16179 (name "python-gast")
bd300261 16180 (version "0.2.2")
2884aac0
RW
16181 (source
16182 (origin
16183 (method url-fetch)
16184 (uri (pypi-uri "gast" version))
16185 (sha256
bd300261 16186 (base32 "1w5dzdb3gpcfmd2s0b93d8gff40a1s41rv31458z14inb3s9v4zy"))))
2884aac0
RW
16187 (build-system python-build-system)
16188 (propagated-inputs
16189 `(("python-astunparse" ,python-astunparse)))
16190 (home-page "https://pypi.org/project/gast/")
16191 (synopsis "Generic Python AST that abstracts the underlying Python version")
16192 (description
16193 "GAST provides a compatibility layer between the AST of various Python
16194versions, as produced by @code{ast.parse} from the standard @code{ast}
16195module.")
16196 (license license:bsd-3)))
16197
44d10b1f
RW
16198(define-public python-wikidata
16199 (package
16200 (name "python-wikidata")
16201 (version "0.6.1")
16202 (source
16203 (origin
16204 (method url-fetch)
16205 (uri (pypi-uri "Wikidata" version))
16206 (sha256
16207 (base32
16208 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
16209 (build-system python-build-system)
16210 (propagated-inputs
16211 `(("python-babel" ,python-babel)))
16212 (home-page "https://github.com/dahlia/wikidata")
16213 (synopsis "Wikidata client library")
16214 (description
16215 "This package provides a Python interface to
16216@url{https://www.wikidata.org/, Wikidata}.")
16217 (properties '((upstream-name . "Wikidata")))
16218 (license license:gpl3+)))
16219
16220(define-public python-doctest-ignore-unicode
16221 (package
16222 (name "python-doctest-ignore-unicode")
16223 (version "0.1.2")
16224 (source
16225 (origin
16226 (method url-fetch)
16227 (uri (pypi-uri "doctest-ignore-unicode" version))
16228 (sha256
16229 (base32
16230 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
16231 (build-system python-build-system)
16232 (native-inputs
16233 `(("python-nose" ,python-nose)))
16234 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
16235 (synopsis "Ignore Unicode literal prefixes in doctests")
16236 (description
16237 "This package adds support for a flag to ignore Unicode literal prefixes
16238in doctests.")
16239 (license license:asl2.0)))
16240
16241(define-public python-attr
16242 (package
16243 (name "python-attr")
16244 (version "0.3.1")
16245 (source
16246 (origin
16247 (method url-fetch)
16248 (uri (pypi-uri "attr" version))
16249 (sha256
16250 (base32
16251 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
16252 (build-system python-build-system)
16253 (home-page "https://github.com/denis-ryzhkov/attr")
16254 (synopsis "Decorator for attributes of target function or class")
16255 (description "Simple decorator to set attributes of target function or
16256class in a @acronym{DRY, Don't Repeat Yourself} way.")
16257 (license license:expat)))
f98232a3
VC
16258
16259(define-public python-construct
16260 (package
16261 (name "python-construct")
16262 (version "2.9.45")
16263 (source
16264 (origin
16265 (method url-fetch)
16266 (uri (pypi-uri "construct" version))
16267 (sha256
16268 (base32
16269 "130iy05awzigm2xah2yvlmb08mac5bi4gzr5m3g7k1krs3ps0w92"))))
16270 (build-system python-build-system)
16271 (arguments
16272 `(#:tests? #f)) ; No tests exist.
16273 (propagated-inputs
16274 `(("python-extras" ,python-extras)
16275 ("python-arrow" ,python-arrow)
16276 ("python-numpy" ,python-numpy)
16277 ("python-ruamel.yaml" ,python-ruamel.yaml)))
16278 (home-page "http://construct.readthedocs.io")
16279 (synopsis "Declarative and symmetrical parser and builder for binary data")
16280 (description
16281 "This package provides both simple, atomic constructs (such as
16282integers of various sizes), as well as composite ones which allow you
16283form hierarchical and sequential structures of increasing complexity.
16284It features bit and byte granularity, easy debugging and testing, an
16285easy-to-extend subclass system, and lots of primitive constructs to
16286make your work easier.")
16287 (license license:expat)))
b742c006
LF
16288
16289(define-public python-humanize
16290 (package
16291 (name "python-humanize")
16292 (version "0.5.1")
16293 (source
16294 (origin
16295 (method url-fetch)
16296 (uri (pypi-uri "humanize" version))
16297 (sha256
16298 (base32
16299 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
16300 (arguments
16301 '(#:tests? #f)) ; tests not in pypi archive
16302 (build-system python-build-system)
16303 (home-page "https://github.com/jmoiron/humanize")
16304 (synopsis "Print numerical information in a human-readable form")
16305 (description "This package provides a Python module that displays numbers
16306and dates in \"human readable\" forms. For example, it would display
16307\"12345591313\" as \"12.3 billion\".")
16308 (license license:expat)))
d5bbf66d
LF
16309
16310(define-public python-txaio
16311 (package
16312 (name "python-txaio")
16313 (version "18.8.1")
16314 (source
16315 (origin
16316 (method url-fetch)
16317 (uri (pypi-uri "txaio" version))
16318 (sha256
16319 (base32
16320 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
16321 (build-system python-build-system)
16322 (propagated-inputs
16323 `(("python-twisted" ,python-twisted)
16324 ("python-six" ,python-six)))
16325 (home-page "https://github.com/crossbario/txaio")
16326 (synopsis "Compatibility layer between Python asyncio and Twisted")
16327 (description "Txaio provides a compatibility layer between the Python
16328@code{asyncio} module and @code{Twisted}.")
16329 (license license:expat)))
963dfd3a
RW
16330
16331(define-public python-toolshed
16332 (package
16333 (name "python-toolshed")
16334 (version "0.4.6")
16335 (source
16336 (origin
16337 (method url-fetch)
16338 (uri (pypi-uri "toolshed" version))
16339 (sha256
16340 (base32
16341 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
16342 (build-system python-build-system)
16343 (native-inputs
16344 `(("python-nose" ,python-nose)))
16345 (home-page "https://github.com/brentp/toolshed/")
16346 (synopsis "Collection of modules and functions for working with data")
16347 (description "This is a collection of well-tested, simple modules and
16348functions that aim to reduce boilerplate when working with data.")
16349 (license license:bsd-2)))
c91ecf2d
RW
16350
16351(define-public python-annoy
16352 (package
16353 (name "python-annoy")
16354 (version "1.15.1")
16355 (source
16356 (origin
16357 (method url-fetch)
16358 (uri (pypi-uri "annoy" version))
16359 (sha256
16360 (base32
16361 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
16362 (build-system python-build-system)
16363 (native-inputs
16364 `(("python-nose" ,python-nose)))
16365 (home-page "https://github.com/spotify/annoy/")
16366 (synopsis "Approximate nearest neighbors library")
16367 (description
16368 "Annoy is a C++ library with Python bindings to search for points in
16369space that are close to a given query point. It also creates large read-only
16370file-based data structures that are @code{mmap}ped into memory so that many
16371processes may share the same data.")
16372 (license license:asl2.0)))
412342d1 16373
79bfa422 16374(define-public python-pylzma
412342d1 16375 (package
79bfa422
DM
16376 (name "python-pylzma")
16377 (version "0.5.0")
16378 (source
16379 (origin
16380 (method url-fetch)
16381 (uri (pypi-uri "pylzma" version))
16382 (sha256
16383 (base32
16384 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
412342d1 16385 (build-system python-build-system)
79bfa422
DM
16386 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
16387 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
16388 (description "This package provides Python bindings for the LZMA library
16389by Igor Pavlov.")
16390 (license license:lgpl2.1+)))
16391
16392(define-public python2-pylzma
16393 (package-with-python2 python-pylzma))
f825e605 16394
6609ebe7
AG
16395(define-public python2-zeroconf
16396 (package
16397 (name "python2-zeroconf")
16398
16399 ;; This is the last version that supports Python 2.x.
16400 (version "0.19.1")
16401 (source
16402 (origin
16403 (method url-fetch)
16404 (uri (pypi-uri "zeroconf" version))
16405 (sha256
16406 (base32
16407 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
16408 (build-system python-build-system)
16409 (arguments
16410 `(#:python ,python-2
16411 #:phases
16412 (modify-phases %standard-phases
16413 (add-after 'unpack 'patch-requires
16414 (lambda* (#:key inputs #:allow-other-keys)
16415 (substitute* "setup.py"
16416 (("enum-compat")
16417 "enum34"))
16418 #t)))))
16419 (native-inputs
16420 `(("python2-six" ,python2-six)
16421 ("python2-enum32" ,python2-enum34)
16422 ("python2-netifaces" ,python2-netifaces)
16423 ("python2-typing" ,python2-typing)))
16424 (home-page "https://github.com/jstasiak/python-zeroconf")
16425 (synopsis "Pure Python mDNS service discovery")
16426 (description
16427 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
16428compatible).")
16429 (license license:lgpl2.1+)))
16430
f825e605
GLV
16431(define-public python-bsddb3
16432 (package
16433 (name "python-bsddb3")
16434 (version "6.2.6")
16435 (source
16436 (origin
16437 (method url-fetch)
16438 (uri (pypi-uri "bsddb3" version))
16439 (sha256
16440 (base32
16441 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
16442 (build-system python-build-system)
16443 (inputs
16444 `(("bdb" ,bdb)))
16445 (arguments
16446 '(#:phases
16447 (modify-phases %standard-phases
16448 (add-after 'unpack 'configure-locations
16449 (lambda* (#:key inputs #:allow-other-keys)
16450 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
16451 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
16452 #t))
16453 (replace 'check
16454 (lambda _
16455 (invoke "python3" "test3.py" "-v"))))))
16456 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
16457 (synopsis "Python bindings for Oracle Berkeley DB")
16458 (description
16459 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
16460C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
16461Transaction objects, and each of these is exposed as a Python type in the
16462bsddb3.db module. The database objects can use various access methods: btree,
16463hash, recno, and queue. Complete support of Berkeley DB distributed
16464transactions. Complete support for Berkeley DB Replication Manager.
16465Complete support for Berkeley DB Base Replication. Support for RPC.")
16466 (license license:bsd-3)))
edeb04bf
PL
16467
16468(define-public python-dbfread
16469 (package
16470 (name "python-dbfread")
16471 (version "2.0.7")
16472 (source (origin
16473 (method url-fetch)
16474 (uri (pypi-uri "dbfread" version))
16475 (sha256
16476 (base32
16477 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
16478 (build-system python-build-system)
16479 (native-inputs
16480 `(("python-pytest" ,python-pytest)))
16481 (home-page "https://dbfread.readthedocs.io")
16482 (synopsis "Read DBF Files with Python")
16483 (description
16484 "This library reads DBF files and returns the data as native Python data
16485types for further processing. It is primarily intended for batch jobs and
16486one-off scripts.")
16487 (license license:expat)))
e308b4f0
JM
16488
16489(define-public python-cached-property
16490 (package
16491 (name "python-cached-property")
16492 (version "1.5.1")
16493 (source
16494 (origin
16495 (method url-fetch)
16496 (uri (pypi-uri "cached-property" version))
16497 (sha256
16498 (base32
16499 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
16500 (build-system python-build-system)
16501 (arguments
16502 `(#:phases
16503 (modify-phases %standard-phases
16504 ;; https://github.com/pydanny/cached-property/issues/131
16505 ;; recent versions of freezegun break one test
16506 (add-after 'unpack 'disable-broken-test
16507 (lambda _
16508 (substitute* "tests/test_cached_property.py"
16509 (("def test_threads_ttl_expiry\\(self\\)" m)
16510 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
16511 " " m)))
16512 #t)))))
16513 (native-inputs
16514 `(("python-freezegun" ,python-freezegun)))
16515 (home-page
16516 "https://github.com/pydanny/cached-property")
16517 (synopsis
16518 "Decorator for caching properties in classes")
16519 (description
16520 "This package provides a decorator which makes caching
16521time-or-computationally-expensive properties quick and easy and works in Python
165222 or 3.")
16523 (license license:bsd-3)))
dfe8a704
NG
16524
16525(define-public python-folium
16526 (package
16527 (name "python-folium")
d3bc1ea9 16528 (version "0.10.1")
dfe8a704
NG
16529 (source
16530 (origin
16531 (method url-fetch)
16532 (uri (pypi-uri "folium" version))
16533 (sha256
16534 (base32
d3bc1ea9 16535 "0gcc267wxwxr57ry86pqpbiyfvl0g48hfvgy0f2mz9s58g87kgzd"))))
dfe8a704
NG
16536 (build-system python-build-system)
16537 (propagated-inputs
16538 `(("python-branca" ,python-branca)
16539 ("python-jinja2" ,python-jinja2)
16540 ("python-numpy" ,python-numpy)
16541 ("python-requests" ,python-requests)))
16542 (native-inputs
16543 `(("python-pytest" ,python-pytest)))
16544 (home-page "https://github.com/python-visualization/folium")
16545 (synopsis "Make beautiful maps with Leaflet.js & Python")
16546 (description "@code{folium} makes it easy to visualize data that’s been
16547manipulated in Python on an interactive leaflet map. It enables both the
16548binding of data to a map for @code{choropleth} visualizations as well as
16549passing rich vector/raster/HTML visualizations as markers on the map.
16550
16551The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
16552Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
16553supports Image, Video, GeoJSON and TopoJSON overlays.")
16554 (license license:expat)))
9dd5f475
LC
16555
16556(define-public jube
16557 (package
16558 ;; This is a command-line tool, so no "python-" prefix.
16559 (name "jube")
16560 (version "2.2.2")
16561 (source (origin
16562 (method url-fetch)
16563 (uri (string-append
16564 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
16565 version))
16566 (sha256
16567 (base32
16568 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
16569 (file-name (string-append "jube-" version ".tar.gz"))))
16570 (build-system python-build-system)
16571 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
16572 (synopsis "Benchmarking environment")
16573 (description
16574 "JUBE helps perform and analyze benchmarks in a systematic way. For each
16575benchmarked application, benchmark data is stored in a format that allows JUBE
16576to deduct the desired information. This data can be parsed by automatic pre-
16577and post-processing scripts that draw information and store it more densely
16578for manual interpretation.")
a9f33960 16579 (license license:gpl3+)))
66436424
NG
16580
16581(define-public python-pyroutelib3
16582 (package
16583 (name "python-pyroutelib3")
16584 (version "1.3.post1")
16585 (source
16586 (origin
16587 (method url-fetch)
16588 (uri (pypi-uri "pyroutelib3" version))
16589 (sha256
16590 (base32
16591 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
16592 (build-system python-build-system)
16593 (propagated-inputs
16594 `(("python-dateutil" ,python-dateutil)))
16595 (home-page "https://github.com/MKuranowski/pyroutelib3")
16596 (synopsis "Library for simple routing on OSM data")
16597 (description "Library for simple routing on OSM data")
16598 (license license:gpl3+)))
30e7c03a 16599
c1bbef69
16600(define-public python-bibtexparser
16601 (package
16602 (name "python-bibtexparser")
16603 (version "1.1.0")
16604 (source
16605 (origin
16606 (method url-fetch)
16607 (uri (pypi-uri "bibtexparser" version))
16608 (sha256
16609 (base32
16610 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
16611 (build-system python-build-system)
16612 (propagated-inputs
16613 `(("python-pyparsing" ,python-pyparsing)))
16614 (native-inputs
16615 `(("python-future" ,python-future)))
16616 (home-page "https://github.com/sciunto-org/python-bibtexparser")
16617 (synopsis "Python library to parse BibTeX files")
16618 (description "BibtexParser is a Python library to parse BibTeX files.")
16619 (license (list license:bsd-3 license:lgpl3))))
8581b40d
HG
16620
16621(define-public python-distro
16622 (package
16623 (name "python-distro")
16624 (version "1.4.0")
16625 (source
16626 (origin
16627 (method url-fetch)
16628 (uri (pypi-uri "distro" version))
16629 (sha256
16630 (base32
16631 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
16632 (build-system python-build-system)
16633 (native-inputs
16634 `(("python-pytest" ,python-pytest)))
16635 (home-page "https://github.com/nir0s/distro")
16636 (synopsis
16637 "OS platform information API")
16638 (description
16639 "@code{distro} provides information about the OS distribution it runs on,
16640such as a reliable machine-readable ID, or version information.
16641
16642It is the recommended replacement for Python's original
16643`platform.linux_distribution` function (which will be removed in Python 3.8).
16644@code{distro} also provides a command-line interface to output the platform
16645information in various formats.")
16646 (license license:asl2.0)))
f2f41e1a
HG
16647
16648(define-public python-cairosvg
16649 (package
16650 (name "python-cairosvg")
16651 (version "2.4.2")
16652 (source
16653 (origin
16654 (method url-fetch)
16655 (uri (pypi-uri "CairoSVG" version))
16656 (sha256
16657 (base32 "1bb7irxbaxxb9ahm3z5wsx1q96mm5gzskc7b6q07h9ikcnb8yrjf"))))
16658 (build-system python-build-system)
16659 (arguments
16660 `(#:phases
16661 (modify-phases %standard-phases
16662 (replace 'check
16663 (lambda _ (invoke "pytest"))))))
16664 (propagated-inputs
16665 `(("python-cairocffi" ,python-cairocffi)
16666 ("python-cssselect2" ,python-cssselect2)
16667 ("python-defusedxml" ,python-defusedxml)
16668 ("python-pillow" ,python-pillow)
16669 ("python-tinycss2" ,python-tinycss2)))
16670 (native-inputs
16671 `(("python-pytest-flake8" ,python-pytest-flake8)
16672 ("python-pytest-isort" ,python-pytest-isort)
16673 ("python-pytest-runner" ,python-pytest-runner)))
16674 (home-page "https://cairosvg.org/")
16675 (synopsis "SVG to PDF/PS/PNG converter based on Cairo")
16676 (description "CairoSVG is a SVG converter based on Cairo. It can export
16677SVG files to PDF, PostScript and PNG files. The main part of CairoSVG is a
16678SVG parser, trying to follow the SVG 1.1 recommendation from the W3C. Once
16679parsed, the result is drawn to a Cairo surface that can be exported to
16680qvarious formats: PDF, PostScript, PNG and even SVG.")
16681 (license license:lgpl3+)))
ea1801e0
HG
16682
16683(define-public python-pyphen
16684 (package
16685 (name "python-pyphen")
16686 (version "0.9.5")
16687 (source
16688 (origin
16689 (method url-fetch)
16690 (uri (pypi-uri "Pyphen" version))
16691 (sha256
16692 (base32 "08c9y69ry9d6m4zalhnalg86lsp9v2j5n1ziw5vxfmiihx83lqrv"))))
16693 (build-system python-build-system)
16694 ;; TODO: Use the Guix system hyphenation packages hyphen-* rather than the
16695 ;; embedded set provided by upstream - like Debian does.
16696 (home-page "https://github.com/Kozea/Pyphen")
16697 (synopsis "Pure Python module to hyphenate text")
16698 (description "Pyphen is a pure Python module to hyphenate text using
16699existing Hunspell hyphenation dictionaries.")
16700 (license (list license:gpl2 license:lgpl2.1 license:mpl1.1))))
85cfb0e9
CL
16701
16702(define-public python-intelhex
16703 (package
16704 (name "python-intelhex")
16705 (version "2.2.1")
16706 (source
16707 (origin
16708 (method url-fetch)
16709 (uri (pypi-uri "intelhex" version))
16710 (sha256
16711 (base32
16712 "0ckqjbxd8gwcg98gfzpn4vq1qxzfvq3rdbrr1hikj1nmw08qb780"))))
16713 (build-system python-build-system)
16714 (arguments '(#:tests? #f)) ;issue with version
16715 (home-page "https://pypi.org/project/IntelHex/")
16716 (synopsis "Python library for Intel HEX files manipulations")
16717 (description "The Intel HEX file format is widely used in microprocessors
16718and microcontrollers area (embedded systems etc.) as the de facto standard for
16719representation of code to be programmed into microelectronic devices. This
16720package provides an intelhex Python library to read, write, create from
16721scratch and manipulate data from Intel HEX file format. It also includes
16722several convenience Python scripts, including \"classic\" hex2bin and bin2hex
16723converters and more, those based on the library itself.")
16724 (license license:bsd-3)))
34bf6869
CL
16725
16726(define-public python-pykwalify
16727 (package
16728 (name "python-pykwalify")
16729 (version "1.7.0")
16730 (source
16731 (origin
16732 (method url-fetch)
16733 (uri (pypi-uri "pykwalify" version))
16734 (sha256
16735 (base32
16736 "1cnfzkg1b01f825ikpw2fhjclf9c8akxjfrbd1vc22x1lg2kk2vy"))))
16737 (build-system python-build-system)
16738 (arguments '(#:tests? #f)) ;missing dependencies
16739 (propagated-inputs
16740 `(("python-dateutil" ,python-dateutil)
16741 ("python-docopt" ,python-docopt)
16742 ("python-pyyaml" ,python-pyyaml)))
16743 (home-page "https://github.com/grokzen/pykwalify")
16744 (synopsis
16745 "Python lib/cli for JSON/YAML schema validation")
16746 (description
16747 "This package provides a parser, schema validator, and data binding tool
16748for YAML and JSON.")
16749 (license license:expat)))
e2ebbbcc
KK
16750
16751(define-public python-dbusmock
16752 (package
022b0d5f
BG
16753 (name "python-dbusmock")
16754 (version "0.18.3")
16755 (source
16756 (origin
16757 (method url-fetch)
16758 (uri (pypi-uri "python-dbusmock" version))
16759 (sha256
e2ebbbcc 16760 (base32
022b0d5f
BG
16761 "0hp2kyac88nh9iv6l8hlmv7s1sa1s5f1a3wc2pmlmmxnd211fjlr"))))
16762 (build-system python-build-system)
16763 (arguments
16764 '(#:phases
16765 (modify-phases %standard-phases
16766 (add-after 'unpack 'patch-shell-path
16767 (lambda _
16768 (substitute* "tests/test_code.py"
16769 (("/bin/bash") (which "bash")))
16770 #t)))))
16771 (native-inputs
16772 `(;; For tests.
16773 ("dbus" ,dbus) ; for dbus-daemon
16774 ("python-nose" ,python-nose)
16775 ("which" ,which)))
16776 (propagated-inputs
16777 `(("python-dbus" ,python-dbus)
16778 ("python-pygobject" ,python-pygobject)))
16779 (home-page "https://github.com/martinpitt/python-dbusmock")
16780 (synopsis "Python library for mock D-Bus objects")
16781 (description "python-dbusmock allows for the easy creation of mock objects on
e2ebbbcc
KK
16782D-Bus. This is useful for writing tests for software which talks to D-Bus
16783services such as upower, systemd, logind, gnome-session or others, and it is
16784hard (or impossible without root privileges) to set the state of the real
16785services to what you expect in your tests.")
022b0d5f 16786 (license license:lgpl3+)))
b657b23f
BG
16787
16788(define-public python-ujson
16789 (package
16790 (name "python-ujson")
16791 (version "1.35")
16792 (source
16793 (origin
16794 (method url-fetch)
16795 (uri (pypi-uri "ujson" version))
16796 (sha256
16797 (base32
16798 "11jz5wi7mbgqcsz52iqhpyykiaasila4lq8cmc2d54bfa3jp6q7n"))))
16799 (build-system python-build-system)
16800 (home-page "http://www.esn.me")
16801 (synopsis
16802 "Ultra fast JSON encoder and decoder for Python")
16803 (description
16804 "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with
16805 bindings for Python 2.5+ and 3.")
16806 (license license:bsd-3)))
16807
16808(define-public python2-ujson
16809 (package-with-python2 python-ujson))
dbcef44a
MIP
16810
16811(define-public python-iocapture
16812 ;; The latest release is more than a year older than this commit.
16813 (let ((commit "fdc021c431d0840303908dfc3ca8769db383595c")
16814 (revision "1"))
16815 (package
16816 (name "python-iocapture")
16817 (version "0.1.2")
16818 (source
16819 (origin
16820 (method git-fetch)
16821 (uri (git-reference
16822 (url "https://github.com/oinume/iocapture.git")
16823 (commit commit)))
16824 (file-name (git-file-name name version))
16825 (sha256
16826 (base32
16827 "1mkbhqibxvgwg0p7slr8dfraa3g2s6bsayladhax2jccwj4kcndz"))))
16828 (build-system python-build-system)
16829 (arguments
16830 `(#:phases
16831 (modify-phases %standard-phases
16832 (delete 'check)
16833 (add-after 'install 'check
16834 (lambda* (#:key inputs outputs #:allow-other-keys)
16835 (add-installed-pythonpath inputs outputs)
16836 (invoke "py.test" "-v" "tests")
16837 #t)))))
16838 (propagated-inputs
16839 `(("python-flexmock" ,python-flexmock)
16840 ("python-pytest" ,python-pytest)
16841 ("python-pytest-cov" ,python-pytest-cov)
16842 ("python-six" ,python-six)))
16843 (home-page "https://github.com/oinume/iocapture")
16844 (synopsis "Python capturing tool for stdout and stderr")
16845 (description
16846 "This package helps you to capture the standard out (stdout) and the
16847standard error channel (stderr) in your program.")
16848 (license license:expat))))
db6bd842
MIP
16849
16850(define-public python-argh
16851 ;; There are 21 commits since the latest release containing important
16852 ;; improvements.
16853 (let ((commit "dcd3253f2994400a6a58a700c118c53765bc50a4")
16854 (revision "1"))
16855 (package
16856 (name "python-argh")
16857 (version (git-version "0.26.2" revision commit))
16858 (source
16859 (origin
16860 (method git-fetch)
16861 (uri (git-reference
16862 (url "https://github.com/neithere/argh.git")
16863 (commit commit)))
16864 (file-name (git-file-name name version))
16865 (sha256
16866 (base32
16867 "1p5h3dnpbsjmqrvil96s71asc6i3gpinmbrabqmwnrsxprz7r3ns"))))
16868 (build-system python-build-system)
16869 (propagated-inputs
16870 `(("python-iocapture" ,python-iocapture)
16871 ("python-mock" ,python-mock)
16872 ("python-pytest" ,python-pytest)
16873 ("python-pytest-cov" ,python-pytest-cov)
16874 ("python-pytest-xdist" ,python-pytest-xdist)
16875 ("python-tox" ,python-tox)))
16876 (home-page "https://github.com/neithere/argh/")
16877 (synopsis "Argparse wrapper with natural syntax")
16878 (description
16879 "python-argh is a small library that provides several layers of
16880abstraction on top of @code{python-argparse}. The layers can be mixed. It is
16881always possible to declare a command with the highest possible (and least
16882flexible) layer and then tune the behaviour with any of the lower layers
16883including the native API of @code{python-argparse}.")
16884 (license license:lgpl3+))))
073723fa
MIP
16885
16886(define-public python-ppft
16887 (package
16888 (name "python-ppft")
16889 (version "1.6.6.1")
16890 (source
16891 (origin
16892 (method url-fetch)
16893 (uri (pypi-uri "ppft" version))
16894 (sha256
16895 (base32
16896 "1z1invkhszc5d2mvgr221v7cszzifcc77mz0pv3wjp6x5q2768cy"))))
16897 (build-system python-build-system)
16898 (arguments '(#:tests? #f)) ; there are none
16899 (propagated-inputs
16900 `(("python-six" ,python-six)))
16901 (home-page "https://pypi.org/project/ppft/")
16902 (synopsis "Fork of Parallel Python")
16903 (description
16904 "This package is a fork of Parallel Python. The Parallel Python
16905module (@code{pp}) provides an easy and efficient way to create
16906parallel-enabled applications for @dfn{symmetric multiprocessing} (SMP)
16907computers and clusters. It features cross-platform portability and dynamic
16908load balancing.")
16909 (license license:bsd-3)))
8451ea19
MIP
16910
16911(define-public python-pox
16912 (package
16913 (name "python-pox")
16914 (version "0.2.7")
16915 (source
16916 (origin
16917 (method url-fetch)
16918 (uri (pypi-uri "pox" version))
16919 (sha256
16920 (base32
16921 "0y17ckc2p6i6709s279sjdj4q459mpcc38ymg9zv9y6vl6jf3bq6"))))
16922 (build-system python-build-system)
16923 (arguments
16924 `(#:phases
16925 (modify-phases %standard-phases
16926 (replace 'check
16927 (lambda _
16928 (mkdir-p "/tmp/guix")
16929 (setenv "SHELL" "bash")
16930 (setenv "USERNAME" "guix")
16931 (setenv "HOME" "/tmp/guix") ; must end on USERNAME...
16932 (invoke "py.test" "-vv")
16933 #t)))))
16934 (native-inputs
16935 `(("python-pytest" ,python-pytest)
16936 ("which" ,which)))
16937 (home-page "https://pypi.org/project/pox/")
16938 (synopsis "Python utilities for filesystem exploration and automated builds")
16939 (description
16940 "Pox provides a collection of utilities for navigating and manipulating
16941filesystems. This module is designed to facilitate some of the low level
16942operating system interactions that are useful when exploring a filesystem on a
16943remote host. Pox provides Python equivalents of several shell commands such
16944as @command{which} and @command{find}. These commands allow automated
16945discovery of what has been installed on an operating system, and where the
16946essential tools are located.")
16947 (license license:bsd-3)))
7e476ae8
MIP
16948
16949(define-public python-pathos
16950 (package
16951 (name "python-pathos")
16952 (version "0.2.5")
16953 (source
16954 (origin
16955 (method url-fetch)
16956 (uri (pypi-uri "pathos" version))
16957 (sha256
16958 (base32
16959 "0in8hxdz7k081ijn6q94gr39ycy7363sx4zysmbwyvd7snqjrbi1"))))
16960 (build-system python-build-system)
8f82e7e3
EF
16961 (arguments
16962 '(#:phases
16963 (modify-phases %standard-phases
16964 (replace 'check
16965 (lambda _
16966 (setenv "PYTHONPATH"
16967 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
16968 (invoke "python" "./tests/__main__.py"))))))
7e476ae8
MIP
16969 (propagated-inputs
16970 `(("python-dill" ,python-dill)
16971 ("python-multiprocess" ,python-multiprocess)
16972 ("python-pox" ,python-pox)
16973 ("python-ppft" ,python-ppft)))
8f82e7e3
EF
16974 (native-inputs
16975 `(("python-pytest" ,python-pytest)))
7e476ae8
MIP
16976 (home-page "https://pypi.org/project/pathos/")
16977 (synopsis
16978 "Parallel graph management and execution in heterogeneous computing")
16979 (description
16980 "Python-pathos is a framework for heterogenous computing. It provides a
16981consistent high-level interface for configuring and launching parallel
16982computations across heterogenous resources. Python-pathos provides configurable
16983launchers for parallel and distributed computing, where each launcher contains
16984the syntactic logic to configure and launch jobs in an execution environment.")
16985 (license license:bsd-3)))
54e5ee5a
BG
16986
16987(define-public python-flit
16988 (package
16989 (name "python-flit")
16990 (version "2.1.0")
16991 (source
16992 (origin
16993 (method url-fetch)
16994 (uri (pypi-uri "flit" version))
16995 (sha256
16996 (base32
16997 "0h5vvmqinqzn97mr3ix7zx53af9ad4fimjjwqpx88yp8qhz4r5bc"))))
16998 (build-system python-build-system)
16999 (arguments
17000 `(#:tests? #f)) ; XXX: Check requires network access.
17001 (home-page "https://flit.readthedocs.io/")
17002 (synopsis
17003 "Simple packaging tool for simple packages")
17004 (description
17005 "Flit is a simple way to put Python packages and modules on PyPI. Flit
17006packages a single importable module or package at a time, using the import
17007name as the name on PyPI. All subpackages and data files within a package
17008are included automatically.")
17009 (license license:bsd-3)))
02139b42
BG
17010
17011(define-public python-pathtools
17012 (package
17013 (name "python-pathtools")
17014 (version "0.1.2")
17015 (source
17016 (origin
17017 (method url-fetch)
17018 (uri (pypi-uri "pathtools" version))
17019 (sha256
17020 (base32
17021 "1h7iam33vwxk8bvslfj4qlsdprdnwf8bvzhqh3jq5frr391cadbw"))))
17022 (build-system python-build-system)
17023 (home-page
17024 "https://github.com/gorakhargosh/pathtools")
17025 (synopsis "Path utilities for Python")
17026 (description "Pattern matching and various utilities for file systems
17027paths.")
17028 (license license:expat)))
6b520177
JG
17029
17030(define-public python-fastentrypoints
17031 (package
17032 (name "python-fastentrypoints")
17033 (version "0.12")
17034 (source
17035 (origin
17036 (method url-fetch)
17037 (uri (pypi-uri "fastentrypoints" version))
17038 (sha256
17039 (base32
17040 "02s1j8i2dzbpbwgq2a3fiqwm3cnmhii2qzc0k42l0rdxd4a4ya7z"))))
17041 (build-system python-build-system)
17042 (home-page
17043 "https://github.com/ninjaaron/fast-entry_points")
17044 (synopsis
17045 "Makes entry_points specified in setup.py load more quickly")
17046 (description
17047 "Using entry_points in your setup.py makes scripts that start really
17048slowly because it imports pkg_resources. This package allows such setup
17049scripts to load entry points more quickly.")
17050 (license license:bsd-3)))
c5eb8cf8
JG
17051
17052(define-public python-funcparserlib
17053 (package
17054 (name "python-funcparserlib")
17055 (version "0.3.6")
17056 (source
17057 (origin
17058 (method url-fetch)
17059 (uri (pypi-uri "funcparserlib" version))
17060 (sha256
17061 (base32
17062 "07f9cgjr3h4j2m67fhwapn8fja87vazl58zsj4yppf9y3an2x6dp"))))
17063 (native-inputs
17064 `(("python-tox" ,python-tox)))
17065 (arguments
17066 `(#:phases
17067 (modify-phases %standard-phases
17068 (replace 'check
17069 (lambda _
17070 (invoke "tox"))))))
17071 (build-system python-build-system)
17072 (home-page
17073 "https://github.com/vlasovskikh/funcparserlib")
17074 (synopsis
17075 "Recursive descent parsing library based on functional combinators")
17076 (description
11140cf1 17077 "This package is a recursive descent parsing library for Python based on
c5eb8cf8
JG
17078functional combinators. Parser combinators are just higher-order functions
17079that take parsers as their arguments and return them as result values.")
17080 (license license:expat)))
602f3b67
NG
17081
17082(define-public python-speg
17083 (package
17084 (name "python-speg")
17085 (version "0.3")
17086 (source
17087 (origin
17088 (method url-fetch)
17089 (uri (pypi-uri "speg" version ".zip"))
17090 (sha256
17091 (base32 "0w9y4jf4787dzhy6rvhwi0mpl0r8qkqmqmyv2hpwdpv8w53yzjqh"))))
17092 (arguments
17093 `(#:tests? #f)) ;FIXME: tests fail, not sure why
17094 (native-inputs
17095 `(("unzip" ,unzip)))
17096 (build-system python-build-system)
17097 (home-page "https://github.com/avakar/speg")
17098 (synopsis "PEG-based parser interpreter with memoization")
17099 (description "This package is a PEG-based parser and interpreter with
17100memoization.")
17101 (license license:expat)))
07c8177b
NG
17102
17103(define-public python-cson
17104 (package
17105 (name "python-cson")
17106 (version "0.8")
17107 (source
17108 (origin
17109 (method url-fetch)
17110 (uri (pypi-uri "cson" version))
17111 (sha256
17112 (base32 "00cyvigg4npbph39ghkg77xbxisa6plf75vii24igxfizik0337f"))))
17113 (build-system python-build-system)
17114 (propagated-inputs
17115 `(("python-speg" ,python-speg)))
17116 (home-page "https://github.com/avakar/pycson")
17117 (synopsis "Parser for Coffeescript Object Notation (CSON)")
17118 (description "This package is a parser for Coffeescript Object
17119Notation (CSON).")
17120 (license license:expat)))
e24c672e
LDB
17121
17122(define-public python-asynctest
17123 (package
17124 (name "python-asynctest")
17125 (version "0.13.0")
17126 (source
17127 (origin
17128 (method url-fetch)
17129 (uri (pypi-uri "asynctest" version))
17130 (sha256
17131 (base32
17132 "1b3zsy7p84gag6q8ai2ylyrhx213qdk2h2zb6im3xn0m5n264y62"))))
17133 (build-system python-build-system)
17134 (arguments
17135 '(#:phases
17136 (modify-phases %standard-phases
17137 (replace 'check
17138 (lambda _
17139 (invoke "python" "-X" "dev" "-m" "unittest" "-v" "test")))
17140 (add-after 'unpack 'disable-tests
17141 (lambda* _
17142 (substitute* "test/test_selector.py"
17143 ;; XXX: This test fails for unknown reason inside the build
17144 ;; environment.
17145 (("def test_events_watched_outside_test_are_ignored")
17146 "@unittest.skip('disabled by guix')
17147 def test_events_watched_outside_test_are_ignored")))))))
17148 (home-page "https://github.com/Martiusweb/asynctest")
17149 (synopsis "Extension of unittest for testing asyncio libraries")
17150 (description
17151 "The package asynctest is built on top of the standard unittest module
17152and cuts down boilerplate code when testing libraries for asyncio.")
17153 (license license:asl2.0)))
1cc9c38e
LDB
17154
17155(define-public python-aionotify
17156 (package
17157 (name "python-aionotify")
17158 (version "0.2.0")
17159 (source
17160 (origin
17161 ;; Source tarball on PyPi lacks tests
17162 (method git-fetch)
17163 (uri (git-reference
17164 (url "https://github.com/rbarrois/aionotify")
17165 (commit (string-append "v" version))))
17166 (file-name (git-file-name name version))
17167 (sha256
17168 (base32 "1sk9i8czxgsbrswsf1nlb4c82vgnlzi8zrvrxdip92w2z8hqh43y"))))
17169 (build-system python-build-system)
17170 (native-inputs `(("python-asynctest" ,python-asynctest)))
17171 (home-page "https://github.com/rbarrois/aionotify")
17172 (synopsis "Asyncio-powered inotify library")
17173 (description
17174 "@code{aionotify} is a simple, asyncio-based inotify library.")
17175 (license license:bsd-3)))
84efaa3b
LDB
17176
17177(define-public python-forbiddenfruit
17178 (package
17179 (name "python-forbiddenfruit")
17180 (version "0.1.3")
17181 (source
17182 (origin
17183 ;; Source tarball on PyPi lacks Makefile that builds and runs tests
17184 (method git-fetch)
17185 (uri (git-reference
17186 (url "https://github.com/clarete/forbiddenfruit")
17187 (commit version)))
17188 (file-name (git-file-name name version))
17189 (sha256
17190 (base32 "1fp2xvdqpi910j9r3q68x38phpxbm700gjdi2m2j5gs91xdnyyh2"))))
17191 (build-system python-build-system)
17192 (arguments
17193 '(#:phases
17194 (modify-phases %standard-phases
17195 (replace 'check
17196 (lambda _
17197 (invoke "make" "SKIP_DEPS=1"))))))
17198 (native-inputs
17199 `(("python-nose" ,python-nose)
17200 ("python-coverage" ,python-coverage)))
17201 (home-page "https://github.com/clarete/forbiddenfruit")
17202 (synopsis "Patch python built-in objects")
17203 (description "This project allows Python code to extend built-in types.")
17204 (license (list license:gpl3+ license:expat))))
9786258b
LDB
17205
17206(define-public python-shouldbe
17207 (package
17208 (name "python-shouldbe")
17209 (version "0.1.2")
17210 (source
17211 (origin
17212 (method url-fetch)
17213 (uri (pypi-uri "shouldbe" version))
17214 (sha256
17215 (base32
17216 "16zbvjxf71dl4yfbgcr6idyim3mdrfvix1dv8b95p0s9z07372pj"))))
17217 (build-system python-build-system)
17218 (propagated-inputs
17219 `(("python-forbiddenfruit" ,python-forbiddenfruit)))
17220 (native-inputs
17221 `(("python-nose" ,python-nose)))
17222 (home-page "https://github.com/directxman12/should_be")
17223 (synopsis "Python Assertion Helpers inspired by Shouldly")
17224 (description
17225 "Python Assertion Helpers inspired by Shouldly.")
17226 (license license:isc)))
72c2478a
LDB
17227
17228(define-public python-k5test
17229 (package
17230 (name "python-k5test")
17231 (version "0.9.2")
17232 (source
17233 (origin
17234 (method url-fetch)
17235 (uri (pypi-uri "k5test" version))
17236 (sha256
17237 (base32
17238 "1lqp3jgfngyhaxjgj3n230hn90wsylwilh120yjf62h7b1s02mh8"))))
17239 (build-system python-build-system)
17240 (propagated-inputs
17241 `(("python-six" ,python-six)
17242 ;; `which`, `kadmin.local` binaries called inside library
17243 ("which" ,which)
17244 ("mit-krb5" ,mit-krb5)))
17245 (native-inputs `(("mit-krb5" ,mit-krb5)))
17246 (arguments
17247 '(#:phases
17248 (modify-phases %standard-phases
17249 (add-after 'unpack 'patch-paths
17250 (lambda* _
17251 (substitute* "k5test/realm.py"
17252 (("'kadmin_local'") "'kadmin.local'")))))))
17253 (home-page "https://github.com/pythongssapi/k5test")
17254 (synopsis "Library for setting up self-contained Kerberos 5 environments")
17255 (description
17256 "@code{k5test} is a library for setting up self-contained Kerberos 5
17257environments, and running Python unit tests inside those environments. It is
17258based on the file of the same name found alongside the MIT Kerberos 5 unit
17259tests.")
17260 (license license:isc)))