gnu: ngless: Update to 1.1.0.
[jackhill/guix/guix.git] / gnu / packages / python-xyz.scm
CommitLineData
44d10b1f
RW
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
ae8db9ce 3;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
fa8ffaa0 4;;; Copyright © 2013, 2014, 2015, 2016, 2019 Andreas Enge <andreas@enge.fr>
44d10b1f
RW
5;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
6;;; Copyright © 2014, 2017 Eric Bavier <bavier@member.fsf.org>
7;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch>
8;;; Copyright © 2015 Omar Radwan <toxemicsquire4@gmail.com>
9;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu>
02422b3b 10;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Ricardo Wurmus <rekado@elephly.net>
44d10b1f
RW
11;;; Copyright © 2015, 2016 Christopher Allan Webber <cwebber@dustycloud.org>
12;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
13;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
b742c006 14;;; Copyright © 2015, 2016, 2017, 2019 Leo Famulari <leo@famulari.name>
44d10b1f
RW
15;;; Copyright © 2015, 2017 Ben Woodcroft <donttrustben@gmail.com>
16;;; Copyright © 2015, 2016 Erik Edrosa <erik.edrosa@gmail.com>
11e46326 17;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
44d10b1f
RW
18;;; Copyright © 2015, 2017 Kyle Meyer <kyle@kyleam.com>
19;;; Copyright © 2015, 2016 Chris Marusich <cmmarusich@gmail.com>
20;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
21;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
8581b40d 22;;; Copyright © 2016, 2018-2019 Hartmut Goebel <h.goebel@crazy-compilers.com>
44d10b1f
RW
23;;; Copyright © 2016 Daniel Pimentel <d4n1@d4n1.org>
24;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
25;;; Copyright © 2016, 2017 Troy Sankey <sankeytms@gmail.com>
47956fa0 26;;; Copyright © 2016, 2017 ng0 <ng0@n0.is>
44d10b1f
RW
27;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
28;;; Copyright © 2016 David Craven <david@craven.ch>
fd5c264a 29;;; Copyright © 2016, 2017, 2018, 2019, 2020 Marius Bakke <mbakke@fastmail.com>
44d10b1f
RW
30;;; Copyright © 2016, 2017 Stefan Reichör <stefan@xsteve.at>
31;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
e746d1c3 32;;; Copyright © 2016, 2017, 2019 Alex Vong <alexvong1995@gmail.com>
44d10b1f 33;;; Copyright © 2016, 2017, 2018 Arun Isaac <arunisaac@systemreboot.net>
7261bdca 34;;; Copyright © 2016, 2017, 2018, 2020 Julien Lepiller <julien@lepiller.eu>
783d1d40 35;;; Copyright © 2016, 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
44d10b1f
RW
36;;; Copyright © 2016, 2017 Thomas Danckaert <post@thomasdanckaert.be>
37;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
38;;; Copyright © 2017 Frederick M. Muriithi <fredmanglis@gmail.com>
39;;; Copyright © 2017, 2018 Adriano Peluso <catonano@gmail.com>
40;;; Copyright © 2017 Ben Sturmfels <ben@sturm.com.au>
a0b2accf 41;;; Copyright © 2017, 2018, 2019 Mathieu Othacehe <m.othacehe@gmail.com>
44d10b1f
RW
42;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.org>
43;;; Copyright © 2017 Roel Janssen <roel@gnu.org>
e2ebbbcc 44;;; Copyright © 2017, 2018, 2019 Kei Kebreau <kkebreau@posteo.net>
44d10b1f
RW
45;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
46;;; Copyright © 2017 Muriithi Frederick Muriuki <fredmanglis@gmail.com>
dcfa0acd 47;;; Copyright © 2017, 2019 Brendan Tildesley <mail@brendan.scot>
44d10b1f
RW
48;;; Copyright © 2018 Ethan R. Jones <ethanrjones97@gmail.com
49;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
50;;; Copyright © 2018 Vijayalakshmi Vedantham <vijimay12@gmail.com>
51;;; Copyright © 2018 Mathieu Lirzin <mthl@gnu.org>
52;;; Copyright © 2018 Adam Massmann <massmannak@gmail.com>
53;;; Copyright © 2016, 2018 Tomáš Čech <sleep_walker@gnu.org>
a2548a3b 54;;; Copyright © 2018, 2019, 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
44d10b1f 55;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
85cfb0e9 56;;; Copyright © 2018, 2019 Clément Lassieur <clement@lassieur.org>
bd137055 57;;; Copyright © 2018, 2019, 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
44d10b1f
RW
58;;; Copyright © 2018 Luther Thompson <lutheroto@gmail.com>
59;;; Copyright © 2018 Vagrant Cascadian <vagrant@debian.org>
046dd621 60;;; Copyright © 2019, 2020 Brett Gilio <brettg@gnu.org>
a91f4eba 61;;; Copyright © 2019 Sam <smbaines8@gmail.com>
8c141421 62;;; Copyright © 2019 Jack Hill <jackhill@jackhill.us>
f825e605 63;;; Copyright © 2019 Guillaume Le Vaillant <glv@posteo.net>
fb236fdd 64;;; Copyright © 2019 Alex Griffin <a@ajgrf.com>
edeb04bf 65;;; Copyright © 2019 Pierre Langlois <pierre.langlois@gmx.com>
e308b4f0 66;;; Copyright © 2019 Jacob MacDonald <jaccarmac@gmail.com>
30e7c03a 67;;; Copyright © 2019 Giacomo Leidi <goodoldpaul@autistici.org>
c1bbef69 68;;; Copyright © 2019 Wiktor Żelazny <wzelazny@vurv.cz>
ba42a6bf 69;;; Copyright © 2019 Tanguy Le Carrour <tanguy@bioneland.org>
dbcef44a 70;;; Copyright © 2019 Mădălin Ionel Patrașcu <madalinionel.patrascu@mdc-berlin.de>
479f4013 71;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
da8ca4c3 72;;; Copyright © 2020 sirgazil <sirgazil@zoho.com>
44d10b1f
RW
73;;;
74;;; This file is part of GNU Guix.
75;;;
76;;; GNU Guix is free software; you can redistribute it and/or modify it
77;;; under the terms of the GNU General Public License as published by
78;;; the Free Software Foundation; either version 3 of the License, or (at
79;;; your option) any later version.
80;;;
81;;; GNU Guix is distributed in the hope that it will be useful, but
82;;; WITHOUT ANY WARRANTY; without even the implied warranty of
83;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
84;;; GNU General Public License for more details.
85;;;
86;;; You should have received a copy of the GNU General Public License
87;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
88
89(define-module (gnu packages python-xyz)
90 #:use-module ((guix licenses) #:prefix license:)
91 #:use-module (gnu packages)
92 #:use-module (gnu packages algebra)
93 #:use-module (gnu packages adns)
94 #:use-module (gnu packages attr)
95 #:use-module (gnu packages backup)
96 #:use-module (gnu packages bash)
97 #:use-module (gnu packages check)
98 #:use-module (gnu packages compression)
99 #:use-module (gnu packages crypto)
100 #:use-module (gnu packages databases)
f825e605 101 #:use-module (gnu packages dbm)
2cbede59 102 #:use-module (gnu packages enchant)
44d10b1f
RW
103 #:use-module (gnu packages file)
104 #:use-module (gnu packages fontutils)
105 #:use-module (gnu packages gcc)
106 #:use-module (gnu packages geo)
107 #:use-module (gnu packages ghostscript)
108 #:use-module (gnu packages gl)
109 #:use-module (gnu packages glib)
e2ebbbcc 110 #:use-module (gnu packages gnome)
44d10b1f
RW
111 #:use-module (gnu packages graphviz)
112 #:use-module (gnu packages graphics)
113 #:use-module (gnu packages gstreamer)
114 #:use-module (gnu packages gtk)
115 #:use-module (gnu packages icu4c)
116 #:use-module (gnu packages image)
117 #:use-module (gnu packages imagemagick)
72c2478a 118 #:use-module (gnu packages kerberos)
44d10b1f
RW
119 #:use-module (gnu packages libevent)
120 #:use-module (gnu packages libffi)
121 #:use-module (gnu packages linux)
122 #:use-module (gnu packages llvm)
123 #:use-module (gnu packages man)
124 #:use-module (gnu packages maths)
42f0b0c2 125 #:use-module (gnu packages monitoring)
44d10b1f
RW
126 #:use-module (gnu packages multiprecision)
127 #:use-module (gnu packages networking)
128 #:use-module (gnu packages ncurses)
129 #:use-module (gnu packages openstack)
130 #:use-module (gnu packages pcre)
131 #:use-module (gnu packages perl)
132 #:use-module (gnu packages pkg-config)
133 #:use-module (gnu packages python)
d362b11d 134 #:use-module (gnu packages python-check)
15b65617 135 #:use-module (gnu packages python-compression)
44d10b1f 136 #:use-module (gnu packages python-crypto)
ca7c3653 137 #:use-module (gnu packages python-science)
44d10b1f
RW
138 #:use-module (gnu packages python-web)
139 #:use-module (gnu packages qt)
140 #:use-module (gnu packages readline)
141 #:use-module (gnu packages sdl)
142 #:use-module (gnu packages search)
143 #:use-module (gnu packages shells)
9d0c291e 144 #:use-module (gnu packages sphinx)
44d10b1f
RW
145 #:use-module (gnu packages ssh)
146 #:use-module (gnu packages terminals)
147 #:use-module (gnu packages tex)
148 #:use-module (gnu packages texinfo)
149 #:use-module (gnu packages time)
150 #:use-module (gnu packages tls)
151 #:use-module (gnu packages version-control)
152 #:use-module (gnu packages video)
153 #:use-module (gnu packages web)
154 #:use-module (gnu packages base)
155 #:use-module (gnu packages xml)
156 #:use-module (gnu packages xorg)
157 #:use-module (gnu packages xdisorg)
158 #:use-module (gnu packages tcl)
159 #:use-module (gnu packages bdw-gc)
f98232a3 160 #:use-module (gnu packages serialization)
44d10b1f
RW
161 #:use-module (guix packages)
162 #:use-module (guix download)
163 #:use-module (guix git-download)
a042d348 164 #:use-module (guix hg-download)
44d10b1f
RW
165 #:use-module (guix utils)
166 #:use-module (guix build-system gnu)
167 #:use-module (guix build-system cmake)
168 #:use-module (guix build-system python)
169 #:use-module (guix build-system trivial)
170 #:use-module (srfi srfi-1)
171 #:use-module (srfi srfi-26))
172
173(define-public python-psutil
174 (package
175 (name "python-psutil")
e9119ac1 176 (version "5.6.5")
44d10b1f
RW
177 (source
178 (origin
179 (method url-fetch)
180 (uri (pypi-uri "psutil" version))
181 (sha256
e9119ac1 182 (base32 "0isil5jxwwd8awz54qk28rpgjg43i5l6yl70g40vxwa4r4m56lfh"))))
44d10b1f
RW
183 (build-system python-build-system)
184 (arguments
185 ;; FIXME: some tests does not return and times out.
186 '(#:tests? #f))
187 (home-page "https://www.github.com/giampaolo/psutil")
188 (synopsis "Library for retrieving information on running processes")
189 (description
190 "psutil (Python system and process utilities) is a library for retrieving
191information on running processes and system utilization (CPU, memory, disks,
192network) in Python. It is useful mainly for system monitoring, profiling and
193limiting process resources and management of running processes. It implements
194many functionalities offered by command line tools such as: ps, top, lsof,
195netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
196pidof, tty, taskset, pmap.")
197 (properties `((python2-variant . ,(delay python2-psutil))))
198 (license license:bsd-3)))
199
200(define-public python2-psutil
201 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
202 (package
203 (inherit base)
204 (propagated-inputs
205 `(("python2-enum34" ,python2-enum34) ;optional
206 ,@(package-propagated-inputs base))))))
207
208(define-public python-shapely
209 (package
210 (name "python-shapely")
6d94465b 211 (version "1.6.4.post2")
44d10b1f
RW
212 (source
213 (origin
214 (method url-fetch)
215 (uri (pypi-uri "Shapely" version))
216 (sha256
217 (base32
6d94465b 218 "03r42fmd9alp6r3q95ad6rldq2f7n1wimrw53zy5kpn33yv7pf64"))))
44d10b1f
RW
219 (build-system python-build-system)
220 (native-inputs
221 `(("python-cython" ,python-cython)
222 ("python-matplotlib" ,python-matplotlib)
223 ("python-pytest" ,python-pytest)
224 ("python-pytest-cov" ,python-pytest-cov)))
225 (inputs
226 `(("geos" ,geos)))
227 (propagated-inputs
228 `(("python-numpy" ,python-numpy)))
229 (arguments
230 `(#:phases
231 (modify-phases %standard-phases
232 (add-after 'unpack 'patch-geos-path
233 (lambda* (#:key inputs #:allow-other-keys)
234 (let ((geos (assoc-ref inputs "geos"))
235 (glibc (assoc-ref inputs ,(if (%current-target-system)
236 "cross-libc" "libc"))))
237 (substitute* "shapely/geos.py"
238 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
239 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
240 geos "/lib/libgeos_c.so'])"))
241 (("free = load_dll\\('c'\\)\\.free")
242 (string-append "free = load_dll('c', fallbacks=['"
243 glibc "/lib/libc.so.6']).free"))))
244 #t)))))
245 (home-page "https://github.com/Toblerity/Shapely")
246 (synopsis "Library for the manipulation and analysis of geometric objects")
247 (description "Shapely is a Python package for manipulation and analysis of
248planar geometric objects. It is based on the @code{GEOS} library.")
249 (license license:bsd-3)))
250
a91f4eba
S
251(define-public python-shortuuid
252 (package
253 (name "python-shortuuid")
254 (version "0.5.0")
255 (source
256 (origin
257 (method url-fetch)
258 (uri (pypi-uri "shortuuid" version))
259 (sha256
260 (base32
261 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
262 (build-system python-build-system)
263 (native-inputs
264 `(("python-pep8" ,python-pep8)))
265 (home-page "https://github.com/skorokithakis/shortuuid")
266 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
267 (description
268 "@code{shortuuid} is a Python library for generating concise, unambiguous
269and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
270module and then similar looking characters are removed.")
271 (license license:bsd-3)))
272
44d10b1f
RW
273(define-public python-logwrap
274 (package
275 (name "python-logwrap")
276 (version "3.2.1")
277 (source
278 (origin
279 (method url-fetch)
280 (uri (pypi-uri "logwrap" version ".zip"))
281 (sha256
282 (base32
283 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
284 (build-system python-build-system)
285 (propagated-inputs
286 `(("python-six" ,python-six)
287 ("python-typing" ,python-typing)))
288 (native-inputs
289 `(("unzip" ,unzip)
290 ("python-cython" ,python-cython)
291 ("python-pytest" ,python-pytest)
292 ("python-pytest-cov" ,python-pytest-cov)
293 ("python-pytest-runner" ,python-pytest-runner)))
294 (home-page "https://github.com/penguinolog/logwrap")
295 (synopsis "Decorator for logging function arguments")
296 (description "This package provides a decorator to log function arguments
297and function call return values in a human-readable way.")
298 (license license:asl2.0)))
299
300(define-public python2-shapely
301 (package-with-python2 python-shapely))
302
303(define-public python-clyent
304 (package
305 (name "python-clyent")
306 (version "1.2.1")
307 (source
308 (origin
309 (method url-fetch)
310 (uri (pypi-uri "clyent" version))
311 (sha256
312 (base32
313 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
314 (build-system python-build-system)
315 (native-inputs
316 `(("python-mock" ,python-mock)))
317 (home-page "https://github.com/binstar/clyent")
318 (synopsis "Command line client library")
319 (description "Clyent is a Python command line utiliy library. It is used
320by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
321 (license license:bsd-3)))
322
323(define-public python2-clyent
324 (package-with-python2 python-clyent))
325
326(define-public python-babel
327 (package
328 (name "python-babel")
93253411 329 (version "2.7.0")
44d10b1f
RW
330 (source
331 (origin
332 (method url-fetch)
333 (uri (pypi-uri "Babel" version))
334 (sha256
335 (base32
93253411 336 "0a7wawx8vsg7igvz6p3x909fskhg4b2y1910xk4f4c8y22p3aqg8"))))
44d10b1f
RW
337 (build-system python-build-system)
338 (native-inputs
339 `(("python-freezegun" ,python-freezegun)
340 ("python-pytest" ,python-pytest)))
341 (propagated-inputs
342 `(("python-pytz" ,python-pytz)))
343 (arguments
344 `(#:phases (modify-phases %standard-phases
345 (replace 'check
8acd1e90
MB
346 (lambda _
347 (invoke "pytest" "-vv" "-k"
348 (string-append
349 ;; XXX: These tests fail when using Pytest 4.x and
350 ;; Babel 2.6.0. Try removing this for later versions.
351 "not test_no_inherit_metazone_marker_never_in_output"
352 " and not test_smoke_dates"
353 " and not test_smoke_numbers")))))))
44d10b1f
RW
354 (home-page "http://babel.pocoo.org/")
355 (synopsis
356 "Tools for internationalizing Python applications")
357 (description
358 "Babel is composed of two major parts:
359- tools to build and work with gettext message catalogs
360- a Python interface to the CLDR (Common Locale Data Repository), providing
361access to various locale display names, localized number and date formatting,
362etc. ")
363 (license license:bsd-3)))
364
365(define-public python2-babel
366 (package-with-python2 python-babel))
367
93253411
MB
368;; Sphinx < 2.0 requires this version. Remove once no longer needed.
369(define-public python2-babel-2.6
370 (package
371 (inherit python2-babel)
372 (version "2.6.0")
373 (source (origin
374 (method url-fetch)
375 (uri (pypi-uri "Babel" version))
376 (sha256
377 (base32
378 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))))
379
44d10b1f
RW
380(define-public python2-backport-ssl-match-hostname
381 (package
382 (name "python2-backport-ssl-match-hostname")
383 (version "3.5.0.1")
384 (source
385 (origin
386 (method url-fetch)
2c1f0d09 387 (uri (pypi-uri "backports.ssl_match_hostname" version))
44d10b1f
RW
388 (sha256
389 (base32
390 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
391 (build-system python-build-system)
392 (arguments
393 `(#:python ,python-2
394 #:tests? #f)) ; no test target
395 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
396 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
397 (description
398 "This backport brings the ssl.match_hostname() function to users of
399earlier versions of Python. The function checks the hostname in the
400certificate returned by the server to which a connection has been established,
401and verifies that it matches the intended target hostname.")
402 (license license:psfl)))
403
dc827867
TGR
404(define-public python-boolean.py
405 (package
406 (name "python-boolean.py")
407 (version "3.6")
408 (source
409 (origin
410 ;; There's no source tarball on PyPI.
411 (method git-fetch)
412 (uri (git-reference
413 (url "https://github.com/bastikr/boolean.py")
414 (commit (string-append "v" version))))
415 (file-name (git-file-name name version))
416 (sha256
417 (base32 "1wc89y73va58cj7dsx6c199zpxsy9q53dsffsdj6zmc90inqz6qs"))))
418 (build-system python-build-system)
419 (home-page "https://github.com/bastikr/boolean.py")
420 (synopsis "Boolean algebra in one Python module")
421 (description
422 "This is a small Python library that implements boolean algebra.
423It defines two base elements, @code{TRUE} and @code{FALSE}, and a
424@code{Symbol} class that can take on one of these two values. Calculations
425are done only in terms of @code{AND}, @code{OR}, and @code{NOT}---other
426compositions like @code{XOR} and @code{NAND} are emulated on top of them.
427Expressions are constructed from parsed strings or directly in Python.")
428 (license license:bsd-2)))
429
44d10b1f
RW
430(define-public python-hdf4
431 (package
432 (name "python-hdf4")
433 (version "0.9")
434 (source
435 (origin
436 (method url-fetch)
437 (uri (pypi-uri name version))
438 (sha256
439 (base32
440 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
441 (build-system python-build-system)
442 (native-inputs `(("nose" ,python-nose)))
443 (propagated-inputs `(("numpy" ,python-numpy)))
444 (inputs
445 `(("hdf4" ,hdf4)
446 ("libjpeg" ,libjpeg)
447 ("zlib" ,zlib)))
448 (arguments
449 `(#:phases
450 (modify-phases %standard-phases
451 (replace 'check
452 (lambda _
453 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
454 ;; on to import numpy. Somehow this works on their CI system.
455 ;; Let's just manage PYTHONPATH here instead.
456 (substitute* "runexamples.sh"
457 (("export PYTHONPATH=.*") ""))
458 (setenv "PYTHONPATH"
459 (string-append (getcwd) ":"
460 (getenv "PYTHONPATH")))
461 (invoke "./runexamples.sh")
462 (invoke "nosetests" "-v"))))))
463 (home-page "https://github.com/fhs/python-hdf4")
464 (synopsis "Python interface to the NCSA HDF4 library")
465 (description
466 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
467which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
468NetCDF files can also be read and modified. Python-HDF4 is a fork of
469@url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
470 (license license:expat)))
471
472(define-public python2-hdf4
473 (package-with-python2 python-hdf4))
474
475(define-public python-h5py
476 (package
477 (name "python-h5py")
24ce6421 478 (version "2.10.0")
44d10b1f
RW
479 (source
480 (origin
481 (method url-fetch)
482 (uri (pypi-uri "h5py" version))
483 (sha256
484 (base32
24ce6421 485 "0baipzv8n93m0dq0riyi8rfhzrjrfrfh8zqhszzp1j2xjac2fhc4"))))
44d10b1f
RW
486 (build-system python-build-system)
487 (arguments
488 `(#:tests? #f ; no test target
489 #:phases
490 (modify-phases %standard-phases
491 (add-after 'unpack 'fix-hdf5-paths
492 (lambda* (#:key inputs #:allow-other-keys)
493 (let ((prefix (assoc-ref inputs "hdf5")))
494 (substitute* "setup_build.py"
495 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
496 (string-append "['" prefix "/lib" "']"))
497 (("'/opt/local/include', '/usr/local/include'")
498 (string-append "'" prefix "/include" "'")))
499 (substitute* "setup_configure.py"
500 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
501 (string-append "['" prefix "/lib" "']")))
502 #t))))))
503 (propagated-inputs
504 `(("python-six" ,python-six)
505 ("python-numpy" ,python-numpy)))
506 (inputs
24ce6421 507 `(("hdf5" ,hdf5-1.10)))
44d10b1f
RW
508 (native-inputs
509 `(("python-cython" ,python-cython)
24ce6421
RW
510 ("python-pkgconfig" ,python-pkgconfig)
511 ("pkg-config" ,pkg-config)))
efc0a587 512 (home-page "https://www.h5py.org/")
44d10b1f
RW
513 (synopsis "Read and write HDF5 files from Python")
514 (description
515 "The h5py package provides both a high- and low-level interface to the
516HDF5 library from Python. The low-level interface is intended to be a
517complete wrapping of the HDF5 API, while the high-level component supports
518access to HDF5 files, datasets and groups using established Python and NumPy
519concepts.")
520 (license license:bsd-3)))
521
522(define-public python2-h5py
523 (package-with-python2 python-h5py))
524
8b89dedc
RW
525(define-public python-sh
526 (package
527 (name "python-sh")
528 (version "1.12.14")
529 (source
530 (origin
531 (method url-fetch)
532 (uri (pypi-uri "sh" version))
533 (sha256
534 (base32
535 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
536 (build-system python-build-system)
fd3638d8
EF
537 (arguments
538 '(#:phases
539 (modify-phases %standard-phases
540 (replace 'check
541 (lambda _
ca983a2f
NG
542 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
543 (setenv "HOME" "/tmp")
fd3638d8
EF
544 (invoke "python" "sh.py" "test"))))))
545 (native-inputs
546 `(("python-coverage" ,python-coverage)))
8b89dedc
RW
547 (home-page "https://github.com/amoffat/sh")
548 (synopsis "Python subprocess replacement")
549 (description "This package provides a replacement for Python's
550@code{subprocess} feature.")
551 (license license:expat)))
552
3869effd
RW
553(define-public python2-sh
554 (package-with-python2 python-sh))
555
d362b11d
RW
556(define-public python-cftime
557 (package
558 (name "python-cftime")
da107cf5 559 (version "1.0.4.2")
d362b11d
RW
560 (source
561 (origin
562 (method url-fetch)
563 (uri (pypi-uri "cftime" version))
564 (sha256
da107cf5 565 (base32 "0w0gi6jnch38hiygl62j4xkcirv4y3dcwrvxl9p7bsk6j27lzihs"))))
d362b11d
RW
566 (build-system python-build-system)
567 (propagated-inputs
568 `(("python-numpy" ,python-numpy)))
569 (native-inputs
570 `(("python-coveralls" ,python-coveralls)
571 ("python-cython" ,python-cython)
572 ("python-pytest-cov" ,python-pytest-cov)))
573 (home-page "https://github.com/Unidata/cftime")
574 (synopsis "Library for time handling")
575 (description
576 "This package provides time-handling functionality that used to be part
577of the netcdf4 package before.")
578 ;; This package claims to include code under the GPLv3 but is released
579 ;; under ISC.
580 (license (list license:isc license:gpl3+))))
581
44d10b1f
RW
582(define-public python-netcdf4
583 (package
584 (name "python-netcdf4")
93e7b209 585 (version "1.4.2")
44d10b1f
RW
586 (source
587 (origin
588 (method url-fetch)
589 (uri (pypi-uri "netCDF4" version))
590 (sha256
591 (base32
93e7b209 592 "0c0sklgrmv15ygliin8qq0hp7vanmbi74m6zpi0r1ksr0hssyd5r"))))
44d10b1f 593 (build-system python-build-system)
93e7b209
RW
594 (arguments
595 '(#:phases
596 (modify-phases %standard-phases
597 (add-after 'unpack 'configure-locations
598 (lambda* (#:key inputs #:allow-other-keys)
599 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
600 #t)))))
44d10b1f
RW
601 (native-inputs
602 `(("python-cython" ,python-cython)))
603 (propagated-inputs
93e7b209
RW
604 `(("python-numpy" ,python-numpy)
605 ("python-cftime" ,python-cftime)))
44d10b1f
RW
606 (inputs
607 `(("netcdf" ,netcdf)
608 ("hdf4" ,hdf4)
609 ("hdf5" ,hdf5)))
93e7b209 610 (home-page "https://github.com/Unidata/netcdf4-python")
44d10b1f
RW
611 (synopsis "Python/numpy interface to the netCDF library")
612 (description "Netcdf4-python is a Python interface to the netCDF C
613library. netCDF version 4 has many features not found in earlier
614versions of the library and is implemented on top of HDF5. This module
615can read and write files in both the new netCDF 4 and the old netCDF 3
616format, and can create files that are readable by HDF5 clients. The
617API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
618to users of that module.")
619 ;; The software is mainly ISC, but includes some files covered
620 ;; by the Expat license.
621 (license (list license:isc license:expat))))
622
623(define-public python2-netcdf4
624 (package-with-python2 python-netcdf4))
625
d6803445
TGR
626(define-public python-license-expression
627 (package
628 (name "python-license-expression")
629 (version "0.999")
630 (source
631 (origin
632 (method url-fetch)
633 (uri (pypi-uri "license-expression" version))
634 (sha256
635 (base32 "08ppb0bxbrsxazy88sgpl9yffvdsabw6dkk1nc332wcz2mphwwyf"))))
636 (build-system python-build-system)
637 (propagated-inputs
638 `(("python-boolean.py" ,python-boolean.py)))
639 (home-page "https://github.com/nexB/license-expression")
640 (synopsis "Apply boolean logic to license expressions")
641 (description
642 "This Python module defines a tiny language to evaluate and compare
643license expressions using boolean logic. Logical combinations of licenses can
644be tested for equality, containment, and equivalence. They can be normalised
645and simplified. It supports SPDX license expressions as well as other naming
646conventions and aliases in the same expression.")
647 (license license:gpl2+)))
648
44d10b1f
RW
649(define-public python-lockfile
650 (package
651 (name "python-lockfile")
652 (version "0.12.2")
653 (source
654 (origin
655 (method url-fetch)
8318bf07 656 (uri (pypi-uri "lockfile" version))
44d10b1f
RW
657 (sha256
658 (base32
659 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
660 (build-system python-build-system)
661 (arguments '(#:test-target "check"))
662 (native-inputs
663 `(("python-pbr" ,python-pbr)))
664 (home-page "https://launchpad.net/pylockfile")
665 (synopsis "Platform-independent file locking module")
666 (description
667 "The lockfile package exports a LockFile class which provides a simple
668API for locking files.")
669 (license license:expat)))
670
671(define-public python2-lockfile
672 (package-with-python2 python-lockfile))
673
674(define-public python-semantic-version
675 (package
676 (name "python-semantic-version")
677 (version "2.6.0")
678 (source
679 (origin
680 (method url-fetch)
681 (uri (pypi-uri "semantic_version" version))
682 (sha256
683 (base32
684 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
685 (build-system python-build-system)
686 (arguments
687 `(#:tests? #f)) ; PyPI tarball lacks tests
688 (home-page "https://github.com/rbarrois/python-semanticversion")
689 (synopsis "Semantic versioning module for Python")
690 (description
691 "The @code{semantic_version} class is a small library for handling
692@uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
693
694It can compare versions, generate a new version that represents a bump in one of
695the version levels, and check whether any given string is a proper semantic
696version identifier.")
697 (license license:bsd-3)))
698
699(define-public python2-semantic-version
700 (package-with-python2 python-semantic-version))
701
702(define-public python-serpent
703 (package
704 (name "python-serpent")
fa9d14ac 705 (version "1.28")
44d10b1f
RW
706 (source
707 (origin
708 (method url-fetch)
709 (uri (pypi-uri "serpent" version))
710 (sha256
fa9d14ac 711 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
44d10b1f 712 (build-system python-build-system)
fa9d14ac
TGR
713 (native-inputs
714 `(("python-attrs" ,python-attrs)
715 ("python-pytz" ,python-pytz)))
44d10b1f
RW
716 (home-page "https://github.com/irmen/Serpent")
717 (synopsis "Serializer for literal Python expressions")
718 (description
1d3c7803
TGR
719 "Serpent provides @code{ast.literal_eval()}-compatible object tree
720serialization. It serializes an object tree into bytes (an utf-8 encoded
721string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
722to rebuild the original object tree.
723
724Because only safe literals are encoded, it is safe to send serpent data to
725other machines, such as over the network.")
44d10b1f
RW
726 (license license:expat)))
727
728(define-public python-setuptools
729 (package
730 (name "python-setuptools")
e39d4933 731 (version "41.0.1")
44d10b1f
RW
732 (source
733 (origin
734 (method url-fetch)
735 (uri (pypi-uri "setuptools" version ".zip"))
736 (sha256
737 (base32
e39d4933 738 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
44d10b1f
RW
739 (modules '((guix build utils)))
740 (snippet
741 '(begin
742 ;; Remove included binaries which are used to build self-extracting
743 ;; installers for Windows.
744 ;; TODO: Find some way to build them ourself so we can include them.
745 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
746 #t))))
747 (build-system python-build-system)
748 ;; FIXME: Tests require pytest, which itself relies on setuptools.
749 ;; One could bootstrap with an internal untested setuptools.
750 (arguments
751 `(#:tests? #f))
e85af137 752 (home-page "https://pypi.org/project/setuptools/")
44d10b1f
RW
753 (synopsis
754 "Library designed to facilitate packaging Python projects")
755 (description
756 "Setuptools is a fully-featured, stable library designed to facilitate
757packaging Python projects, where packaging includes:
758Python package and module definitions,
759distribution package metadata,
760test hooks,
761project installation,
762platform-specific details,
763Python 3 support.")
764 ;; TODO: setuptools now bundles the following libraries:
765 ;; packaging, pyparsing, six and appdirs. How to unbundle?
766 (license (list license:psfl ; setuptools itself
767 license:expat ; six, appdirs, pyparsing
768 license:asl2.0 ; packaging is dual ASL2/BSD-2
769 license:bsd-2))))
770
771(define-public python2-setuptools
772 (package-with-python2 python-setuptools))
773
0fdec2a3
MB
774;; The setuptools provided by Python 3.7.4 is too new for Tensorflow.
775(define-public python-setuptools-for-tensorflow
776 (hidden-package
777 (package
778 (inherit python-setuptools)
779 (version "39.1.0")
780 (source (origin
781 (inherit (package-source python-setuptools))
782 (uri (pypi-uri "setuptools" version ".zip"))
783 (sha256
784 (base32
785 "1mzdhvfhnv4lggxa8rjl0dzqxvfx377gg5sqs57v89wrp09lwj65")))))))
786
44d10b1f
RW
787(define-public python-uniseg
788 (package
789 (name "python-uniseg")
790 (version "0.7.1")
791 (source
792 (origin
793 (method url-fetch)
794 (uri (pypi-uri "uniseg" version ".zip"))
795 (sha256
796 (base32
797 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
798 (build-system python-build-system)
799 (arguments
800 '(#:tests? #f)) ; The test suite requires network access.
801 (native-inputs
802 `(("unzip" ,unzip)))
803 (home-page
804 "https://bitbucket.org/emptypage/uniseg-python")
805 (synopsis
806 "Python library to determine Unicode text segmentations")
807 (description
808 "Uniseg is a Python package used to determine Unicode text segmentations.
809Supported segmentations include:
810@enumerate
811@item @dfn{Code point} (any value in the Unicode codespace)
812@item @dfn{Grapheme cluster} (user-perceived character made of a single or
813multiple Unicode code points, e.g. \"G\" + acute-accent)
814@item Word break
815@item Sentence break
816@item Line break
817@end enumerate")
818 (license license:expat)))
819
820(define-public python2-uniseg
821 (package-with-python2 python-uniseg))
822
823(define-public python-humanfriendly
824 (package
825 (name "python-humanfriendly")
826 (version "4.4.1")
827 (source
828 (origin
829 (method url-fetch)
830 (uri (pypi-uri "humanfriendly" version))
831 (sha256
832 (base32
833 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
834 (build-system python-build-system)
835 (arguments
836 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
837 #:tests? #f))
838 (propagated-inputs
839 `(("python-monotonic" ,python-monotonic)))
840 (home-page "https://humanfriendly.readthedocs.io")
841 (synopsis "Human-friendly input and output in Python")
842 (description
843 "The functions and classes in @code{humanfriendly} can be used to make
844text interfaces more user-friendly. It includes tools to parse and format
845numbers, file sizes, and timespans, timers for long-running operations, menus
846to allow the user to choose from a list of options, and terminal interaction
847helpers.")
848 (license license:expat)))
849
850(define-public python2-humanfriendly
851 (package-with-python2 python-humanfriendly))
852
853(define-public python-capturer
854 (package
855 (name "python-capturer")
856 (version "2.4")
857 (source
858 (origin
859 (method url-fetch)
860 (uri (pypi-uri "capturer" version))
861 (sha256
862 (base32
863 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
864 (build-system python-build-system)
865 (arguments
866 `(#:tests? #f))
867 (propagated-inputs
868 `(("python-humanfriendly" ,python-humanfriendly)))
869 (home-page "https://capturer.readthedocs.io")
870 (synopsis "Capture stdout and stderr streams of the current process")
871 (description
872 "The capturer package makes it easy to capture the stdout and stderr
873streams of the current process and subprocesses. Output can be relayed
874to the terminal in real time but is also available to the Python program
875for additional processing.")
876 (license license:expat)))
877
878(define-public python2-capturer
879 (package-with-python2 python-capturer))
880
881(define-public python-case
882 (package
883 (name "python-case")
884 (version "1.5.3")
885 (source
886 (origin
887 (method url-fetch)
888 (uri (pypi-uri "case" version))
889 (sha256
890 (base32
891 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
892 (build-system python-build-system)
893 (propagated-inputs
894 `(("python-mock" ,python-mock)
895 ("python-nose" ,python-nose)
896 ("python-six" ,python-six)
897 ("python-unittest2" ,python-unittest2)))
898 (native-inputs
899 `(("python-coverage" ,python-coverage)))
900 (home-page "https://github.com/celery/case")
901 (synopsis "Unittest utilities and convenience methods")
902 (description
903 "The @code{case} package provides utilities on top of unittest, including
904some helpful Python 2 compatibility convenience methods.")
905 (license license:bsd-3)))
906
907(define-public python-verboselogs
908 (package
909 (name "python-verboselogs")
910 (version "1.7")
911 (source
912 (origin
913 (method url-fetch)
914 (uri (pypi-uri "verboselogs" version))
915 (sha256
916 (base32
917 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
918 (build-system python-build-system)
1760c970
MO
919 (arguments
920 `(#:phases
921 (modify-phases %standard-phases
922 (replace 'check
923 (lambda _
924 ;; Do not run pylint plugin test, as astroid is an old
925 ;; unsupported version.
926 (invoke "pytest" "-v" "-k" "not test_pylint_plugin"
927 "verboselogs/tests.py"))))))
44d10b1f
RW
928 (native-inputs
929 `(("python-mock" ,python-mock)
1760c970 930 ("python-pytest" ,python-pytest)))
44d10b1f
RW
931 (home-page "https://verboselogs.readthedocs.io")
932 (synopsis "Verbose logging level for Python's logging module")
933 (description
934 "The @code{verboselogs} package extends Python's @code{logging} module to
935add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
936 (license license:expat)))
937
938(define-public python2-verboselogs
939 (package-with-python2 python-verboselogs))
940
941(define-public python-coloredlogs
942 (package
943 (name "python-coloredlogs")
b2b8a39c 944 (version "10.0")
44d10b1f
RW
945 (source
946 (origin
947 (method url-fetch)
948 (uri (pypi-uri "coloredlogs" version))
949 (sha256
950 (base32
b2b8a39c 951 "0dkw6xp0r1dwgz4s2f58npx5nxfq51wf4l6qkm5ib27slgfs4sdq"))))
44d10b1f
RW
952 (build-system python-build-system)
953 (arguments
954 `(;Tests require some updated modules
955 #:tests? #f))
956 (propagated-inputs
957 `(("python-capturer" ,python-capturer)))
958 (home-page "https://coloredlogs.readthedocs.io")
959 (synopsis "Colored stream handler for Python's logging module")
960 (description
961 "The @code{coloredlogs} package enables colored terminal output for
962Python's logging module. The @code{ColoredFormatter} class inherits from
963@code{logging.Formatter} and uses ANSI escape sequences to render your logging
964messages in color.")
965 (license license:expat)))
966
967(define-public python2-coloredlogs
968 (package-with-python2 python-coloredlogs))
969
af760990
VC
970(define-public python-editorconfig
971 (package
972 (name "python-editorconfig")
973 (version "0.12.2")
974 (source
975 (origin
976 (method url-fetch)
977 (uri (pypi-uri "EditorConfig" version))
978 (sha256
979 (base32
980 "0v55z351p9qkyp3bbspwywwn28sbcknhirngjbj779n3z52z63hv"))))
981 (build-system python-build-system)
982 (home-page "https://editorconfig.org/")
983 (synopsis "EditorConfig bindings for python")
984 (description "The EditorConfig project consists of a file format for
985defining coding styles and a collection of text editor plugins that enable
986editors to read the file format and adhere to defined styles. EditorConfig
987files are easily readable and they work nicely with version control systems.")
988 ;; "fnmatch.py" and "ini.py" are licensed under psfl, the rest is bsd-2.
989 (license (list license:bsd-2 license:psfl))))
990
4caf37b0
MC
991(define-public python-et-xmlfile
992 (package
993 (name "python-et-xmlfile")
994 (version "1.0.1")
995 (source
996 (origin
997 (method url-fetch)
998 (uri (pypi-uri "et_xmlfile" version))
999 (sha256
1000 (base32
1001 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
1002 (build-system python-build-system)
1003 (arguments
1004 `(#:phases (modify-phases %standard-phases
1005 (replace 'check
1006 (lambda _
1007 (invoke "pytest"))))))
1008 (native-inputs
1009 `(("python-pytest" ,python-pytest)
1010 ("python-lxml" ,python-lxml))) ;used for the tests
1011 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
1012 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
1013 (description "This Python library is based upon the @code{xmlfile} module
1014from @code{lxml}. It aims to provide a low memory, compatible implementation
1015of @code{xmlfile}.")
1016 (license license:expat)))
1017
1018(define-public python2-et-xmlfile
1019 (package-with-python2 python-et-xmlfile))
1020
a042d348
MC
1021(define-public python-openpyxl
1022 (package
1023 (name "python-openpyxl")
441e6d93 1024 (version "2.6.2")
a042d348
MC
1025 (source
1026 (origin
1027 ;; We use the upstream repository, as the tests are not included in the
1028 ;; PyPI releases.
1029 (method hg-fetch)
1030 (uri (hg-reference
1031 (url "https://bitbucket.org/openpyxl/openpyxl")
1032 (changeset version)))
1033 (file-name (string-append name "-" version "-checkout"))
1034 (sha256
441e6d93 1035 (base32 "1qhij6kcvdxqjy4g6193nsv4q7fy8n4fwyd3c2z047idlm6s3j4w"))))
a042d348
MC
1036 (build-system python-build-system)
1037 (arguments
1038 `(#:phases (modify-phases %standard-phases
1039 (replace 'check
1040 (lambda _
1041 (invoke "pytest"))))))
1042 (native-inputs
1043 ;; For the test suite.
1044 `(("python-lxml" ,python-lxml)
1045 ("python-pillow" ,python-pillow)
1046 ("python-pytest" ,python-pytest)))
1047 (propagated-inputs
1048 `(("python-et-xmlfile" ,python-et-xmlfile)
1049 ("python-jdcal" ,python-jdcal)))
1050 (home-page "https://openpyxl.readthedocs.io")
1051 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
1052 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
1053XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
1054standard.")
1055 (license license:expat)))
1056
44d10b1f
RW
1057(define-public python-eventlet
1058 (package
1059 (name "python-eventlet")
c9876c9b 1060 (version "0.25.1")
44d10b1f
RW
1061 (source
1062 (origin
1063 (method url-fetch)
1064 (uri (pypi-uri "eventlet" version))
1065 (sha256
1066 (base32
c9876c9b 1067 "1hgz8jq19wlz8vwqj900ry8cjv578nz4scc91mlc8944yid6573c"))))
44d10b1f
RW
1068 (build-system python-build-system)
1069 (propagated-inputs
1070 `(("python-greenlet" ,python-greenlet)))
1071 (arguments
1072 ;; TODO: Requires unpackaged 'enum-compat'.
1073 '(#:tests? #f))
bff36617 1074 (home-page "https://eventlet.net")
44d10b1f
RW
1075 (synopsis "Concurrent networking library for Python")
1076 (description
1077 "Eventlet is a concurrent networking library for Python that
1078allows you to change how you run your code, not how you write it.
1079It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1080Coroutines ensure that the developer uses a blocking style of programming
1081that is similar to threading, but provide the benefits of non-blocking I/O.
1082The event dispatch is implicit, which means you can easily use @code{Eventlet}
1083from the Python interpreter, or as a small part of a larger application.")
1084 (license license:expat)))
1085
1086(define-public python2-eventlet
1087 (let ((base (package-with-python2
1088 (strip-python2-variant python-eventlet))))
1089 (package (inherit base)
1090 (propagated-inputs
1091 `(("python2-enum34" ,python2-enum34)
1092 ,@(package-propagated-inputs base))))))
1093
1094(define-public python-six
1095 (package
1096 (name "python-six")
6c58a06e 1097 (version "1.12.0")
44d10b1f
RW
1098 (source
1099 (origin
1100 (method url-fetch)
1101 (uri (pypi-uri "six" version))
1102 (sha256
1103 (base32
6c58a06e 1104 "0wxs1q74v07ssjywbbm7x6h5v9qx209ld2yfsif4060sxi0h2sni"))))
44d10b1f
RW
1105 (build-system python-build-system)
1106 (arguments
1107 `(#:phases
1108 (modify-phases %standard-phases
1109 (replace 'check
1110 (lambda _
1111 (invoke "py.test" "-v"))))))
1112 (native-inputs
1113 `(("python-py" ,python-py)
1114 ("python-pytest" ,python-pytest-bootstrap)))
e85af137 1115 (home-page "https://pypi.org/project/six/")
44d10b1f
RW
1116 (synopsis "Python 2 and 3 compatibility utilities")
1117 (description
1118 "Six is a Python 2 and 3 compatibility library. It provides utility
1119functions for smoothing over the differences between the Python versions with
1120the goal of writing Python code that is compatible on both Python versions.
1121Six supports every Python version since 2.5. It is contained in only one
1122Python file, so it can be easily copied into your project.")
1123 (license license:x11)))
1124
1125(define-public python2-six
1126 (package-with-python2 python-six))
1127
1128(define-public python-six-bootstrap
1129 (package
1130 (inherit python-six)
1131 (name "python-six-bootstrap")
1132 (native-inputs `())
1133 (arguments `(#:tests? #f))))
1134
1135(define-public python2-six-bootstrap
1136 (package-with-python2 python-six-bootstrap))
1137
1138(define-public python-schedule
1139 (package
1140 (name "python-schedule")
1141 (version "0.4.3")
1142 (source
1143 (origin
1144 (method url-fetch)
1145 (uri (pypi-uri "schedule" version))
1146 (sha256
1147 (base32
1148 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1149 (build-system python-build-system)
1150 (native-inputs
1151 `(("python-pytest" ,python-pytest)
1152 ("python-mock" ,python-mock)))
1153 (home-page "https://github.com/dbader/schedule")
1154 (synopsis "Schedule periodic function calls in Python")
1155 (description
1156 "Schedule is an in-process scheduler for periodic jobs that uses the
1157builder pattern for configuration. Schedule lets you run Python functions (or
1158any other callable) periodically at pre-determined intervals using a simple,
1159human-friendly syntax.")
1160 (license license:expat)))
1161
1162(define-public python2-schedule
1163 (package-with-python2 python-schedule))
1164
44d10b1f
RW
1165(define-public python2-mechanize
1166 (package
1167 (name "python2-mechanize")
1168 (version "0.2.5")
1169 (source
1170 (origin
1171 (method url-fetch)
1cc184e6 1172 (uri (pypi-uri "mechanize" version))
44d10b1f
RW
1173 (sha256
1174 (base32
1175 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1176 (build-system python-build-system)
1177 (arguments
1178 `(#:python ,python-2 ; apparently incompatible with Python 3
1179 #:tests? #f))
1180 ;; test fails with message
1181 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1182 ;; (python-3.3.2) or
1183 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1184 ;; (python-2.7.5).
1185 ;; The source code is from March 2011 and probably not up-to-date
1186 ;; with respect to python unit tests.
1187 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1188 (synopsis
1189 "Stateful programmatic web browsing in Python")
1190 (description
1191 "Mechanize implements stateful programmatic web browsing in Python,
1192after Andy Lester’s Perl module WWW::Mechanize.")
1193 (license (license:non-copyleft
1194 "file://COPYING"
1195 "See COPYING in the distribution."))))
1196
1197
1198(define-public python-simplejson
1199 (package
1200 (name "python-simplejson")
1201 (version "3.14.0")
1202 (source
1203 (origin
1204 (method url-fetch)
1205 (uri (pypi-uri "simplejson" version))
1206 (sha256
1207 (base32
1208 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1209 (build-system python-build-system)
1210 (home-page "http://simplejson.readthedocs.org/en/latest/")
1211 (synopsis
1212 "Json library for Python")
1213 (description
1214 "JSON (JavaScript Object Notation) is a subset of JavaScript
1215syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1216format.
1217
1218Simplejson exposes an API familiar to users of the standard library marshal
1219and pickle modules. It is the externally maintained version of the json
1220library contained in Python 2.6, but maintains compatibility with Python 2.5
1221and (currently) has significant performance advantages, even without using
1222the optional C extension for speedups. Simplejson is also supported on
1223Python 3.3+.")
1224 (license license:x11)))
1225
1226(define-public python2-simplejson
1227 (package-with-python2 python-simplejson))
1228
1229
1230(define-public python-pyicu
1231 (package
1232 (name "python-pyicu")
dc23bb45 1233 (version "2.3.1")
44d10b1f
RW
1234 (source
1235 (origin
1236 (method url-fetch)
1237 (uri (pypi-uri "PyICU" version))
1238 (sha256
1239 (base32
dc23bb45 1240 "1x4w8m7ifki9z2a187pgjr33z6z0rp2fii9b73djak1vhm9v9cnx"))))
44d10b1f
RW
1241 (build-system python-build-system)
1242 (inputs
1243 `(("icu4c" ,icu4c)))
1244 (native-inputs
1245 `(("python-pytest" ,python-pytest)
1246 ("python-six" ,python-six)))
1247 (home-page "https://github.com/ovalhub/pyicu")
1248 (synopsis "Python extension wrapping the ICU C++ API")
1249 (description
1250 "PyICU is a python extension wrapping the ICU C++ API.")
1251 (properties `((python2-variant . ,(delay python2-pyicu))))
1252 (license license:x11)))
1253
1254(define-public python2-pyicu
1255 (let ((base (package-with-python2
1256 (strip-python2-variant python-pyicu))))
1257 (package
1258 (inherit base)
1259 (arguments
1260 `(,@(package-arguments base)
1261 #:phases
1262 (modify-phases %standard-phases
1263 (add-before 'check 'delete-failing-test
1264 (λ _
1265 ;; XXX: This fails due to Unicode issues unique to Python 2,
1266 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1267 (delete-file "test/test_Script.py")
1268 #t))))))))
1269
1270(define-public python2-dogtail
1271 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1272 ;; spaces in indentation" with Python 3.
1273 (package
1274 (name "python2-dogtail")
1275 (version "0.9.9")
1276 (source (origin
1277 (method url-fetch)
1278 (uri (pypi-uri "dogtail" version))
1279 (sha256
1280 (base32
1281 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1282 (build-system python-build-system)
1283 (arguments `(#:python ,python-2
1284 #:tests? #f)) ; invalid command "test"
1285 ;; Currently no offical homepage.
e85af137 1286 (home-page "https://pypi.org/project/dogtail/")
44d10b1f
RW
1287 (synopsis "GUI test tool and automation framework written in Python")
1288 (description
1289 "Dogtail is a GUI test tool and automation framework written in Python.
1290It uses Accessibility (a11y) technologies to communicate with desktop
1291applications. dogtail scripts are written in Python and executed like any
1292other Python program.")
1293 (license license:gpl2+)))
1294
1295(define-public python-empy
1296 (package
1297 (name "python-empy")
0f6d5115 1298 (version "3.3.3")
44d10b1f
RW
1299 (source (origin
1300 (method url-fetch)
1301 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1302 version ".tar.gz"))
1303 (sha256
1304 (base32
0f6d5115 1305 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
44d10b1f
RW
1306 (build-system python-build-system)
1307 (arguments
0f6d5115 1308 `(#:tests? #f)) ; python2 only
44d10b1f
RW
1309 (home-page "http://www.alcyone.com/software/empy/")
1310 (synopsis "Templating system for Python")
1311 (description
1312 "EmPy is a system for embedding Python expressions and statements in
1313template text; it takes an EmPy source file, processes it, and produces
1314output. This is accomplished via expansions, which are special signals to the
1315EmPy system and are set off by a special prefix (by default the at sign, @@).
1316EmPy can expand arbitrary Python expressions and statements in this way, as
1317well as a variety of special forms. Textual data not explicitly delimited in
1318this way is sent unaffected to the output, allowing Python to be used in
1319effect as a markup language. Also supported are callbacks via hooks,
1320recording and playback via diversions, and dynamic, chainable filters. The
1321system is highly configurable via command line options and embedded
1322commands.")
1323 (license license:lgpl2.1+)))
1324
1325(define-public python2-empy
0f064242
TGR
1326 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
1327 (package
1328 (inherit base)
1329 (arguments `(,@(package-arguments base)
1330 #:tests? #t)))))
44d10b1f
RW
1331
1332(define-public python2-element-tree
1333 (package
1334 (name "python2-element-tree")
1335 (version "1.2.6")
1336 (source (origin
1337 (method url-fetch)
1338 (uri (string-append
1339 "http://effbot.org/media/downloads/elementtree-"
1340 version "-20050316.tar.gz"))
1341 (sha256
1342 (base32
1343 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1344 (build-system python-build-system)
1345 (arguments
1346 `(#:python ,python-2 ; seems to be part of Python 3
1347 #:tests? #f)) ; no 'test' sub-command
1348 (synopsis "Toolkit for XML processing in Python")
1349 (description
1350 "ElementTree is a Python library supporting lightweight XML processing.")
1351 (home-page "http://effbot.org/zone/element-index.htm")
1352 (license (license:x11-style
1353 "http://docs.python.org/2/license.html"
1354 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1355
1356(define-public python2-pybugz
1357 (package
1358 (name "python2-pybugz")
1359 (version "0.6.11")
1360 (source (origin
1361 (method url-fetch)
1362 (uri (string-append
1363 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1364 version ".tar.gz"))
1365 (sha256
1366 (base32
1367 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1368 (patches (search-patches "pybugz-stty.patch"
1369 "pybugz-encode-error.patch"))))
1370 (build-system python-build-system)
1371 (arguments
1372 `(#:python ,python-2 ; SyntaxError with Python 3
1373 #:tests? #f)) ; no 'test' sub-command
1374 (propagated-inputs
1375 `(("element-tree" ,python2-element-tree)))
1376 (synopsis "Python and command-line interface to Bugzilla")
1377 (description
1378 "PyBugz is a Python library and command-line tool to query the Bugzilla
1379bug tracking system. It is meant as an aid to speed up interaction with the
1380bug tracker.")
1381 (home-page "http://www.liquidx.net/pybugz/")
1382 (license license:gpl2)))
1383
1384(define-public python2-enum
1385 (package
1386 (name "python2-enum")
1387 (version "0.4.6")
1388 (source (origin
1389 (method url-fetch)
1390 (uri (pypi-uri "enum" version))
1391 (sha256
1392 (base32
1393 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1394 (build-system python-build-system)
1395 (arguments
1396 `(#:python ,python-2))
e85af137 1397 (home-page "https://pypi.org/project/enum/")
44d10b1f
RW
1398 (synopsis "Robust enumerated type support in Python")
1399 (description
1400 "This provides a module for robust enumerations in Python. It has
1401been superseded by the Python standard library and is provided only for
1402compatibility.")
1403 ;; Choice of either license.
1404 (license (list license:gpl3+ license:psfl))))
1405
1406(define-public python-enum34
1407 (package
1408 (name "python-enum34")
1409 (version "1.1.6")
1410 (source
1411 (origin
1412 (method url-fetch)
1413 (uri (pypi-uri "enum34" version))
1414 (sha256
1415 (base32
1416 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1417 (build-system python-build-system)
e85af137 1418 (home-page "https://pypi.org/project/enum34/")
44d10b1f
RW
1419 (synopsis "Backported Python 3.4 Enum")
1420 (description
1421 "Enum34 is the new Python stdlib enum module available in Python 3.4
1422backported for previous versions of Python from 2.4 to 3.3.")
1423 (license license:bsd-3)))
1424
1425(define-public python2-enum34
1426 (package-with-python2 python-enum34))
1427
1428(define-public python-parse-type
1429 (package
1430 (name "python-parse-type")
1431 (version "0.4.2")
1432 (source
1433 (origin
1434 (method url-fetch)
1435 (uri (pypi-uri "parse_type" version))
1436 (sha256
1437 (base32
1438 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1439 (build-system python-build-system)
1440 (propagated-inputs
1441 `(("python-six" ,python-six)
1442 ("python-parse" ,python-parse)))
1443 (native-inputs
1444 `(("python-pytest" ,python-pytest)
1445 ("python-pytest-runner" ,python-pytest-runner)))
1446 (home-page "https://github.com/jenisys/parse_type")
1447 (synopsis "Extended parse module")
1448 (description
1449 "Parse_type extends the python parse module.")
1450 (properties
1451 `((python2-variant . ,(delay python2-parse-type))))
1452 (license license:bsd-3)))
1453
1454(define-public python2-parse-type
1455 (let ((base (package-with-python2
1456 (strip-python2-variant python-parse-type))))
1457 (package (inherit base)
1458 (propagated-inputs
1459 `(("python2-enum34" ,python2-enum34)
1460 ,@(package-propagated-inputs base))))))
1461
1462(define-public python-parse
1463 (package
1464 (name "python-parse")
1465 (version "1.8.4")
1466 (source
1467 (origin
1468 (method url-fetch)
1469 (uri (pypi-uri "parse" version))
1470 (sha256
1471 (base32
1472 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
1473 (build-system python-build-system)
1474 (arguments
1475 `(#:phases
1476 (modify-phases %standard-phases
1477 (replace 'check
1478 (lambda _ (invoke "python" "test_parse.py"))))))
1479 (home-page "https://github.com/r1chardj0n3s/parse")
1480 (synopsis "Parse strings")
1481 (description
1482 "Parse strings using a specification based on the Python @code{format()}
1483syntax.")
1484 (license license:x11)))
1485
1486(define-public python-polib
1487 (package
1488 (name "python-polib")
1489 (version "1.0.8")
1490 (source (origin
1491 (method url-fetch)
1492 (uri (pypi-uri "polib" version))
1493 (sha256
1494 (base32
1495 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1496 (build-system python-build-system)
1497 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1498 (synopsis "Manipulate, create and modify gettext files")
1499 (description "Polib can manipulate any gettext format (po, pot and mo)
1500files. It can be used to create po files from scratch or to modify
1501existing ones.")
1502 (license license:expat)))
1503
1504(define-public python2-polib
1505 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1506 (package
1507 (inherit base)
1508 (arguments `(,@(package-arguments base)
1509 ;; Tests don't work with python2.
1510 #:tests? #f)))))
1511
6830120e
TLC
1512(define-public python-poyo
1513 (package
1514 (name "python-poyo")
1515 (version "0.5.0")
1516 (source
1517 (origin
1518 (method url-fetch)
1519 (uri (pypi-uri "poyo" version))
1520 (sha256
1521 (base32
1522 "1pflivs6j22frz0v3dqxnvc8yb8fb52g11lqr88z0i8cg2m5csg2"))))
1523 (build-system python-build-system)
1524 (home-page "https://github.com/hackebrot/poyo")
1525 (synopsis "Lightweight YAML Parser for Python")
1526 (description
1527 "This package provides a lightweight YAML Parser for Python. It supports
1528only a chosen subset of the YAML format that is required to parse cookiecutter
1529user configuration files. It does not have support for serializing into YAML
1530and is not compatible with JSON.")
1531 (license license:expat)))
1532
44d10b1f
RW
1533(define-public scons
1534 (package
1535 (name "scons")
05487ed8 1536 (version "3.0.4")
44d10b1f 1537 (source (origin
ad34338d
RW
1538 (method git-fetch)
1539 (uri (git-reference
1540 (url "https://github.com/SCons/scons.git")
1541 (commit version)))
1542 (file-name (git-file-name name version))
44d10b1f
RW
1543 (sha256
1544 (base32
05487ed8 1545 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
44d10b1f
RW
1546 (build-system python-build-system)
1547 (arguments
1548 `(#:use-setuptools? #f ; still relies on distutils
ad34338d
RW
1549 #:tests? #f ; no 'python setup.py test' command
1550 #:phases
1551 (modify-phases %standard-phases
1552 (add-before 'build 'bootstrap
1553 (lambda _
1554 (substitute* "src/engine/SCons/compat/__init__.py"
1555 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
1556 "sys.modules[new] = __import__(old)"))
05487ed8
RW
1557 (substitute* "src/engine/SCons/Platform/__init__.py"
1558 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
1559 "mod = __import__(full_name)"))
ad34338d
RW
1560 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
1561 (chdir "build/scons")
1562 #t)))))
3602de33 1563 (home-page "https://scons.org/")
44d10b1f
RW
1564 (synopsis "Software construction tool written in Python")
1565 (description
1566 "SCons is a software construction tool. Think of SCons as an improved,
1567cross-platform substitute for the classic Make utility with integrated
1568functionality similar to autoconf/automake and compiler caches such as ccache.
1569In short, SCons is an easier, more reliable and faster way to build
1570software.")
1571 (license license:x11)))
1572
1573(define-public scons-python2
1574 (package
1575 (inherit (package-with-python2 scons))
1576 (name "scons-python2")))
1577
1578(define-public python-extras
1579 (package
1580 (name "python-extras")
1581 (version "1.0.0")
1582 (source
1583 (origin
1584 (method url-fetch)
1585 (uri (pypi-uri "extras" version))
1586 (sha256
1587 (base32
1588 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1589 (build-system python-build-system)
1590 (arguments
1591 ;; FIXME: Circular dependency on testtools.
1592 '(#:tests? #f))
1593 (home-page "https://github.com/testing-cabal/extras")
1594 (synopsis "Useful extensions to the Python standard library")
1595 (description
1596 "Extras is a set of extensions to the Python standard library.")
1597 (license license:expat)))
1598
1599(define-public python2-extras
1600 (package-with-python2 python-extras))
1601
1602(define-public python-mimeparse
1603 (package
1604 (name "python-mimeparse")
1605 (version "1.6.0")
1606 (source
1607 (origin
1608 (method url-fetch)
89bf667c 1609 (uri (pypi-uri "python-mimeparse" version))
44d10b1f
RW
1610 (sha256
1611 (base32
1612 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
1613 (build-system python-build-system)
1614 (arguments
1615 '(#:phases
1616 (modify-phases %standard-phases
1617 (replace 'check
1618 (lambda _
1619 (invoke "./mimeparse_test.py"))))))
1620 (home-page
1621 "https://github.com/dbtsai/python-mimeparse")
1622 (synopsis "Python library for parsing MIME types")
1623 (description
1624 "Mimeparse provides basic functions for parsing MIME type names and
1625matching them against a list of media-ranges.")
1626 (license license:expat)))
1627
1628(define-public python2-mimeparse
1629 (package-with-python2 python-mimeparse))
1630
1631(define-public python-miniboa
1632 (package
1633 (name "python-miniboa")
1634 (version "1.0.7")
1635 (source
1636 (origin
1637 (method url-fetch)
1638 (uri (pypi-uri "miniboa" version))
1639 (sha256
1640 (base32
1641 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
1642 (build-system python-build-system)
1643 (home-page "https://github.com/shmup/miniboa")
1644 (synopsis "Simple, single-threaded Telnet server")
1645 (description
1646 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
1647server.")
1648 (license license:asl2.0)))
1649
1650(define-public python2-miniboa
1651 (package-with-python2 python-miniboa))
1652
1653(define-public python-pafy
1654 (package
1655 (name "python-pafy")
1656 (version "0.5.3.1")
1657 (source
1658 (origin
1659 (method url-fetch)
1660 (uri (pypi-uri "pafy" version))
1661 (sha256
1662 (base32
1663 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1664 (build-system python-build-system)
1665 (arguments
1666 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1667 (propagated-inputs
1668 ;; Youtube-dl is a python package which is imported in the file
1669 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1670 `(("youtube-dl" ,youtube-dl)))
1671 (home-page "https://np1.github.io/pafy/")
1672 (synopsis "Retrieve YouTube content and metadata")
1673 (description
1674 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1675 (license license:lgpl3+)))
1676
1677(define-public python2-funcsigs
1678 (package
1679 (name "python2-funcsigs")
1680 (version "1.0.2")
1681 (source (origin
1682 (method url-fetch)
1683 (uri (pypi-uri "funcsigs" version))
1684 (sha256
1685 (base32
1686 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1687 (build-system python-build-system)
1688 (arguments
1689 `(#:python ,python-2))
1690 (native-inputs
1691 `(("python2-unittest2" ,python2-unittest2)))
1692 (home-page "http://funcsigs.readthedocs.org")
1693 (synopsis "Python function signatures from PEP362")
1694 (description
1695 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1696 (license license:asl2.0)))
1697
1698(define-public python2-funcsigs-bootstrap
1699 (package
1700 (inherit python2-funcsigs)
1701 (name "python2-funcsigs-bootstrap")
1702 (native-inputs `())
1703 (arguments
1704 `(#:tests? #f
1705 ,@(package-arguments python2-funcsigs)))))
1706
1707(define-public python-py
1708 (package
1709 (name "python-py")
08eba545 1710 (version "1.8.0")
44d10b1f
RW
1711 (source
1712 (origin
1713 (method url-fetch)
1714 (uri (pypi-uri "py" version))
1715 (sha256
1716 (base32
08eba545 1717 "0lsy1gajva083pzc7csj1cvbmminb7b4l6a0prdzyb3fd829nqyw"))))
44d10b1f
RW
1718 (build-system python-build-system)
1719 (arguments
1720 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1721 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1722 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1723 ;; Is this module globally installed?"
1724 '(#:tests? #f))
1725 (native-inputs
1726 `(("python-setuptools-scm" ,python-setuptools-scm)))
1727 (home-page "https://github.com/pytest-dev/py")
1728 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1729 (description
1730 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1731code introspection, and logging.")
1732 (license license:expat)))
1733
1734(define-public python2-py
1735 (package-with-python2 python-py))
1736
1737;; Recent versions of python-fixtures and python-testrepository need
1738;; python-pbr for packaging, which itself needs these two packages for
1739;; testing.
1740;; To fix this circular dependency, we use a build of python-pbr, based on the
1741;; same source, just without any test dependencies and with tests disabled.
1742;; python-pbr-minmal is then used to package python-fixtures and
1743;; python-testrepository.
1744;; Strictly speaking we currently could remove the test-requirements from the
1745;; normal python-pbr package (and save this package) since test are disabled
1746;; there anyway. But this may change in future.
1747(define-public python-pbr-minimal
1748 (package
1749 (name "python-pbr-minimal")
1750 (version "3.0.1")
1751 (source
1752 (origin
1753 (method url-fetch)
1754 (uri (pypi-uri "pbr" version))
1755 (sha256
1756 (base32
1757 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1758 (build-system python-build-system)
1759 (arguments
1760 `(#:tests? #f))
58d4e949 1761 (home-page "https://docs.openstack.org/pbr/latest/")
44d10b1f
RW
1762 (synopsis "Minimal build of python-pbr used for bootstrapping")
1763 (description
1764 "Used only for bootstrapping python2-pbr, you should not need this.")
1765 (license license:asl2.0)))
1766
1767(define-public python2-pbr-minimal
1768 (package-with-python2 python-pbr-minimal))
1769
1770(define-public python-pbr
1771 (package
1772 (inherit python-pbr-minimal)
1773 (name "python-pbr")
1774 (arguments
1775 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1776 (propagated-inputs
1777 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1778 (native-inputs
1779 `(("python-fixtures" ,python-fixtures-bootstrap)
1780 ;; discover, coverage, hacking, subunit
1781 ("python-mock" ,python-mock)
1782 ("python-six" ,python-six)
1783 ("python-sphinx" ,python-sphinx)
1784 ("python-testrepository" ,python-testrepository-bootstrap)
1785 ("python-testresources" ,python-testresources-bootstrap)
1786 ("python-testscenarios" ,python-testscenarios-bootstrap)
1787 ("python-testtools" ,python-testtools-bootstrap)
1788 ("python-virtualenv" ,python-virtualenv)))
1789 (synopsis "Enhance the default behavior of Python’s setuptools")
1790 (description
1791 "Python Build Reasonableness (PBR) is a library that injects some useful
1792and sensible default behaviors into your setuptools run. It will set
1793versions, process requirements files and generate AUTHORS and ChangeLog file
1794from git information.
1795")))
1796
1797(define-public python2-pbr
1798 (package-with-python2 python-pbr))
1799
ea43f0d5
MB
1800(define-public python-pyrsistent
1801 (package
1802 (name "python-pyrsistent")
1803 (version "0.14.11")
1804 (home-page "https://github.com/tobgu/pyrsistent")
1805 (source (origin
1806 (method url-fetch)
1807 (uri (pypi-uri "pyrsistent" version))
1808 (sha256
1809 (base32
1810 "1qkh74bm296mp5g3r11lgsksr6bh4w1bf8pji4nmxdlfj542ga1w"))))
1811 (build-system python-build-system)
1812 (native-inputs
1813 `(("python-hypothesis" ,python-hypothesis)
1814 ("python-pytest" ,python-pytest)
1815 ("python-pytest-runner" ,python-pytest-runner)))
1816 (propagated-inputs
1817 `(("python-six" ,python-six)))
1818 (synopsis "Persistent data structures for Python")
1819 (description
1820 "Pyrsistent is a number of persistent collections (by some referred to as
1821functional data structures). Persistent in the sense that they are immutable.
1822
1823All methods on a data structure that would normally mutate it instead return a
1824new copy of the structure containing the requested updates. The original
1825structure is left untouched.")
1826 (license license:expat)))
1827
1828(define-public python2-pyrsistent
1829 (package-with-python2 python-pyrsistent))
1830
44d10b1f
RW
1831(define-public python-exif-read
1832 (package
1833 (name "python-exif-read")
1834 (version "2.1.2")
1835 (source (origin
1836 (method url-fetch)
1837 (uri (pypi-uri "ExifRead" version))
1838 (sha256
1839 (base32
1840 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
1841 (build-system python-build-system)
1842 (arguments `(#:tests? #f)) ; no tests
1843 (home-page "https://github.com/ianare/exif-py")
1844 (synopsis "Python library to extract EXIF data from image files")
1845 (description
1846 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1847files.")
1848 (license license:bsd-3)))
1849
1850(define-public python2-exif-read
1851 (package-with-python2 python-exif-read))
1852
1853(define-public python-pyld
1854 (package
1855 (name "python-pyld")
6d4ed78d 1856 (version "1.0.5")
44d10b1f
RW
1857 (source (origin
1858 (method url-fetch)
1859 (uri (pypi-uri "PyLD" version))
1860 (sha256
1861 (base32
6d4ed78d 1862 "1ywbdbsrkg533qh8xn9ifjh2mvam6v5msrjyqq73jfpvcp89qvff"))))
44d10b1f
RW
1863 (build-system python-build-system)
1864 (home-page "https://github.com/digitalbazaar/pyld")
1865 (synopsis "Python implementation of the JSON-LD specification")
1866 (description
1867 "PyLD is an implementation of the JSON-LD specification.")
1868 (license license:bsd-3)))
1869
1870(define-public python2-pyld
1871 (package-with-python2 python-pyld))
1872
1873(define-public python-click
1874 (package
1875 (name "python-click")
61984855 1876 (version "7.0")
44d10b1f
RW
1877 (source
1878 (origin
1879 (method url-fetch)
1880 (uri (pypi-uri "click" version))
1881 (sha256
1882 (base32
61984855 1883 "1mzjixd4vjbjvzb6vylki9w1556a9qmdh35kzmq6cign46av952v"))))
44d10b1f
RW
1884 (build-system python-build-system)
1885 (arguments
8d7e7ca6 1886 `(#:phases
44d10b1f
RW
1887 (modify-phases %standard-phases
1888 (add-after 'unpack 'fix-paths
1889 (lambda* (#:key inputs #:allow-other-keys)
1890 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
1891 "cross-libc" "libc"))))
1892 (substitute* "click/_unicodefun.py"
1893 (("'locale'")
1894 (string-append "'" glibc "/bin/locale'"))))
8d7e7ca6
EF
1895 #t))
1896 (replace 'check
1897 (lambda _
1898 (invoke "python" "-m" "pytest"))))))
44d10b1f
RW
1899 (native-inputs
1900 `(("python-pytest" ,python-pytest)))
61984855 1901 (home-page "https://palletsprojects.com/p/click/")
44d10b1f
RW
1902 (synopsis "Command line library for Python")
1903 (description
1904 "Click is a Python package for creating command line interfaces in a
1905composable way with as little code as necessary. Its name stands for
1906\"Command Line Interface Creation Kit\". It's highly configurable but comes
1907with sensible defaults out of the box.")
1908 (license license:bsd-3)))
1909
1910(define-public python2-click
1911 (package-with-python2 python-click))
1912
1913(define-public python-wheel
1914 (package
1915 (name "python-wheel")
8f137daf 1916 (version "0.33.6")
44d10b1f
RW
1917 (source
1918 (origin
1919 (method url-fetch)
1920 (uri (pypi-uri "wheel" version))
1921 (sha256
1922 (base32
8f137daf 1923 "0ii6f34rvpjg3nmw4bc2h7fhdsy38y1h93hghncfs5akfrldmj8h"))))
44d10b1f 1924 (build-system python-build-system)
8f137daf
MB
1925 (arguments
1926 ;; FIXME: The test suite runs "python setup.py bdist_wheel", which in turn
1927 ;; fails to find the newly-built bdist_wheel library, even though it is
1928 ;; available on PYTHONPATH. What search path is consulted by setup.py?
1929 '(#:tests? #f))
44d10b1f
RW
1930 (home-page "https://bitbucket.org/pypa/wheel/")
1931 (synopsis "Format for built Python packages")
1932 (description
1933 "A wheel is a ZIP-format archive with a specially formatted filename and
1934the @code{.whl} extension. It is designed to contain all the files for a PEP
1935376 compatible install in a way that is very close to the on-disk format. Many
1936packages will be properly installed with only the @code{Unpack} step and the
1937unpacked archive preserves enough information to @code{Spread} (copy data and
1938scripts to their final locations) at any later time. Wheel files can be
1939installed with a newer @code{pip} or with wheel's own command line utility.")
8f137daf 1940 (license license:expat)))
44d10b1f
RW
1941
1942(define-public python2-wheel
8f137daf 1943 (package-with-python2 python-wheel))
44d10b1f
RW
1944
1945(define-public python-vcversioner
1946 (package
1947 (name "python-vcversioner")
1948 (version "2.16.0.0")
1949 (source
1950 (origin
1951 (method url-fetch)
1952 (uri (pypi-uri "vcversioner" version))
1953 (sha256
1954 (base32
1955 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
1956 (build-system python-build-system)
1957 (synopsis "Python library for version number discovery")
1958 (description "Vcversioner is a Python library that inspects tagging
1959information in a variety of version control systems in order to discover
1960version numbers.")
1961 (home-page "https://github.com/habnabit/vcversioner")
1962 (license license:isc)))
1963
1964(define-public python2-vcversioner
1965 (package-with-python2 python-vcversioner))
1966
5591fc4f
MC
1967(define-public python-jdcal
1968 (package
1969 (name "python-jdcal")
1970 (version "1.4")
1971 (source
1972 (origin
1973 (method url-fetch)
1974 (uri (pypi-uri "jdcal" version))
1975 (sha256
1976 (base32
1977 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
1978 (build-system python-build-system)
1979 (arguments
1980 `(#:phases (modify-phases %standard-phases
1981 (replace 'check
1982 (lambda _
1983 (invoke "pytest"))))))
1984 (native-inputs
1985 `(("python-pytest" ,python-pytest)))
1986 (home-page "https://github.com/phn/jdcal")
1987 (synopsis "Functions to convert between Julian dates Gregorian dates")
1988 (description "This Python library provides functions for converting
1989between Julian dates and Gregorian dates.")
1990 (license license:bsd-2)))
1991
1992(define-public python2-jdcal
1993 (package-with-python2 python-jdcal))
1994
06d41d8d
VC
1995(define-public python-jsondiff
1996 (package
1997 (name "python-jsondiff")
1998 (version "1.2.0")
1999 (source
2000 (origin
2001 (method url-fetch)
2002 (uri (pypi-uri "jsondiff" version))
2003 (sha256
2004 (base32
2005 "00v3689175aqzdscrxpffm712ylp8jvcpqdg51ca22ni6721p51l"))))
2006 (build-system python-build-system)
2007 (native-inputs
2008 `(("python-nose" ,python-nose)
2009 ("python-nose-random" ,python-nose-random)))
2010 (home-page
2011 "https://github.com/fzumstein/jsondiff")
2012 (synopsis "Compare JSON and JSON-like structures in Python")
2013 (description "@code{jsondiff} is a Python library which lets you
2014compare, diff, and patch JSON and JSON-like structures in Python.")
2015 (license license:expat)))
2016
44d10b1f
RW
2017(define-public python-jsonschema
2018 (package
2019 (name "python-jsonschema")
1adde06e 2020 (version "3.0.1")
44d10b1f
RW
2021 (source (origin
2022 (method url-fetch)
786ccb87 2023 (uri (pypi-uri "jsonschema" version))
44d10b1f
RW
2024 (sha256
2025 (base32
1adde06e 2026 "03g20i1xfg4qdlk4475pl4pp7y0h37g1fbgs5qhy678q9xb822hc"))))
44d10b1f
RW
2027 (build-system python-build-system)
2028 (arguments
2029 '(#:phases
2030 (modify-phases %standard-phases
1adde06e
MB
2031 (replace 'check
2032 (lambda _
2033 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
2034 (invoke "trial" "jsonschema"))))))
44d10b1f 2035 (native-inputs
1adde06e
MB
2036 `(("python-setuptools_scm" ,python-setuptools-scm)
2037 ("python-twisted" ,python-twisted)))
2038 (propagated-inputs
2039 `(("python-attrs" ,python-attrs)
2040 ("python-pyrsistent" ,python-pyrsistent)
2041 ("python-six" ,python-six)))
44d10b1f
RW
2042 (home-page "https://github.com/Julian/jsonschema")
2043 (synopsis "Implementation of JSON Schema for Python")
2044 (description
2045 "Jsonschema is an implementation of JSON Schema for Python.")
2046 (license license:expat)
2047 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2048
2049(define-public python2-jsonschema
2050 (let ((jsonschema (package-with-python2
2051 (strip-python2-variant python-jsonschema))))
2052 (package (inherit jsonschema)
44d10b1f 2053 (propagated-inputs
1adde06e
MB
2054 `(("python2-functools32" ,python2-functools32)
2055 ,@(package-propagated-inputs jsonschema))))))
44d10b1f 2056
914bba28
TGR
2057;; This old version is still required by docker-compose as of 1.24.0.
2058(define-public python-jsonschema-2.6
2059 (package
2060 (name "python-jsonschema")
2061 (version "2.6.0")
2062 (source (origin
2063 (method url-fetch)
2064 (uri (pypi-uri "jsonschema" version))
2065 (sha256
2066 (base32
2067 "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg"))))
2068 (build-system python-build-system)
2069 (arguments
2070 '(#:phases
2071 (modify-phases %standard-phases
2072 (replace 'check (lambda _ (invoke "nosetests"))))))
2073 (native-inputs
2074 `(("python-nose" ,python-nose)
2075 ("python-vcversioner" ,python-vcversioner)))
2076 (home-page "https://github.com/Julian/jsonschema")
2077 (synopsis "Implementation of JSON Schema for Python")
2078 (description
2079 "Jsonschema is an implementation of JSON Schema for Python.")
2080 (license license:expat)
2081 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2082
44d10b1f
RW
2083(define-public python-schema
2084 (package
2085 (name "python-schema")
2086 (version "0.6.6")
2087 (source
2088 (origin
2089 (method url-fetch)
2090 (uri (pypi-uri "schema" version))
2091 (sha256
2092 (base32
2093 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2094 (build-system python-build-system)
2095 (native-inputs
2096 `(("python-pytest" ,python-pytest)))
2097 (home-page "https://github.com/keleshev/schema")
2098 (synopsis "Simple data validation library")
2099 (description
2100 "@code{python-schema} is a library for validating Python data
2101structures, such as those obtained from config-files, forms, external
2102services or command-line parsing, converted from JSON/YAML (or
2103something else) to Python data-types.")
2104 (license license:psfl)))
2105
2106(define-public python2-schema
2107 (package-with-python2 python-schema))
2108
2109(define-public python-schema-0.5
2110 (package (inherit python-schema)
2111 (version "0.5.0")
2112 (source
2113 (origin
2114 (method url-fetch)
2115 (uri (pypi-uri "schema" version))
2116 (sha256
2117 (base32
2118 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2119
2120(define-public python2-schema-0.5
2121 (package-with-python2 python-schema-0.5))
2122
2123(define-public python-kitchen
2124 (package
2125 (name "python-kitchen")
2126 (version "1.2.5")
2127 (source
2128 (origin
2129 (method url-fetch)
2130 (uri (pypi-uri "kitchen" version))
2131 (sha256
2132 (base32
2133 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2134 (build-system python-build-system)
2135 (propagated-inputs
2136 `(("python-chardet" ,python-chardet)))
2137 (home-page "https://github.com/fedora-infra/kitchen")
2138 (synopsis "Python API for snippets")
2139 (description "@code{kitchen} module provides a python API for all sorts of
2140little useful snippets of code that everybody ends up writing for their projects
2141but never seem big enough to build an independent release. Use kitchen and stop
2142cutting and pasting that code over and over.")
2143 (license (list license:lgpl2.1+
2144 ;; subprocess.py, test_subprocess.py,
2145 ;; kitchen/pycompat25/defaultdict.py:
2146 license:psfl))))
2147
2148(define-public python2-kitchen
2149 (package-with-python2 python-kitchen))
2150
2151(define-public python-unidecode
2152 (package
2153 (name "python-unidecode")
eb80a300 2154 (version "1.1.1")
44d10b1f
RW
2155 (source (origin
2156 (method url-fetch)
2157 (uri (pypi-uri "Unidecode" version))
2158 (sha256
2159 (base32
eb80a300 2160 "1s6cp2lv4m0f00hjckjz8p6m7d3n3v16jvg353llf5ia1iqsnsib"))))
44d10b1f 2161 (build-system python-build-system)
e85af137 2162 (home-page "https://pypi.org/project/Unidecode/")
44d10b1f
RW
2163 (synopsis "ASCII transliterations of Unicode text")
2164 (description
2165 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2166useful when integrating with legacy code that doesn't support Unicode, or for
2167ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2168machine identifiers from human-readable Unicode strings that should still be
2169somewhat intelligible.")
2170 (license license:gpl2+)))
2171
2172(define-public python2-unidecode
2173 (package-with-python2 python-unidecode))
2174
2175(define-public python-pyjwt
2176 (package
2177 (name "python-pyjwt")
be6f2f56 2178 (version "1.7.1")
44d10b1f
RW
2179 (source
2180 (origin
2181 (method url-fetch)
2182 (uri (pypi-uri "PyJWT" version))
2183 (sha256
2184 (base32
be6f2f56 2185 "15hflax5qkw1v6nssk1r0wkj83jgghskcmn875m3wgvpzdvajncd"))
44d10b1f
RW
2186 (modules '((guix build utils)))
2187 (snippet
2188 '(begin
2189 (for-each delete-file-recursively
2190 (find-files "." "\\.pyc$"))
2191 #t))))
2192 (build-system python-build-system)
2193 (native-inputs
2194 `(("python-pytest" ,python-pytest)
2195 ("python-pytest-cov" ,python-pytest-cov)
2196 ("python-pytest-runner" ,python-pytest-runner)))
2197 (home-page "https://github.com/progrium/pyjwt")
2198 (synopsis "JSON Web Token implementation in Python")
2199 (description
2200 "PyJWT is a JSON Web Token implementation written in Python.")
2201 (license license:expat)))
2202
2203(define-public python2-pyjwt
2204 (package-with-python2 python-pyjwt))
2205
2206(define-public python-pykka
2207 (package
2208 (name "python-pykka")
2209 (version "1.2.1")
2210 (source
2211 (origin
2212 (method url-fetch)
2213 (uri (pypi-uri "Pykka" version))
2214 (sha256
2215 (base32
2216 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2217 (build-system python-build-system)
2218 (native-inputs
2219 `(("python-mock" ,python-mock)
2220 ("python-nose" ,python-nose)
2221 ("python-gevent" ,python-gevent)
2222 ("python-eventlet" ,python-eventlet)))
2223 (home-page "https://www.pykka.org/")
2224 (synopsis "Pykka is a Python implementation of the actor model")
2225 (description
2226 "Pykka is a Python implementation of the actor model.
2227The actor model introduces some simple rules to control the sharing
2228of state and cooperation between execution units, which makes it
2229easier to build concurrent applications.")
2230 (license license:asl2.0)))
2231
2232(define-public python2-pykka
2233 (package-with-python2 python-pykka))
2234
8d22f7e3
VC
2235(define-public python-pymsgbox
2236 (package
2237 (name "python-pymsgbox")
2238 (version "1.0.6")
2239 (source
2240 (origin
2241 (method git-fetch)
2242 (uri (git-reference
2243 ;; LICENSE.txt is not present on pypi
2244 (url "https://github.com/asweigart/PyMsgBox")
2245 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
2246 (file-name (git-file-name name version))
2247 (sha256
2248 (base32
2249 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
2250 (arguments
2251 ;; Circular dependency to run tests:
2252 ;; Tests need pyautogui, which depends on pymsgbox.
2253 '(#:tests? #f))
2254 (build-system python-build-system)
2255 (home-page "https://github.com/asweigart/PyMsgBox")
2256 (synopsis "Python module for JavaScript-like message boxes")
2257 (description
2258 "PyMsgBox is a simple, cross-platform, pure Python module for
2259JavaScript-like message boxes. Types of dialog boxes include:
2260@enumerate
2261@item alert
2262@item confirm
2263@item prompt
2264@item password
2265@end enumerate
2266")
2267 (license license:bsd-3)))
2268
44d10b1f
RW
2269(define-public python-pympler
2270 (package
2271 (name "python-pympler")
2272 (home-page "https://pythonhosted.org/Pympler/")
6469af6f 2273 (version "0.8")
44d10b1f
RW
2274 (source (origin
2275 (method url-fetch)
2276 (uri (pypi-uri "Pympler" version))
2277 (sha256
2278 (base32
6469af6f 2279 "08mrpnb6cv2nvfncvr8a9a8bpwhnasa924anapnjvnaw5jcd4k7p"))))
44d10b1f
RW
2280 (build-system python-build-system)
2281 (arguments
2282 `(#:phases (modify-phases %standard-phases
2283 (delete 'check)
2284 (add-after 'install 'check
2285 (lambda* (#:key inputs outputs #:allow-other-keys)
2286 (add-installed-pythonpath inputs outputs)
2287 (invoke "python" "setup.py" "test"))))))
2288 (synopsis "Measure, monitor and analyze memory behavior")
2289 (description
2290 "Pympler is a development tool to measure, monitor and analyze
2291the memory behavior of Python objects in a running Python application.
2292
2293By pympling a Python application, detailed insight in the size and the
2294lifetime of Python objects can be obtained. Undesirable or unexpected
2295runtime behavior like memory bloat and other @samp{pymples} can easily
2296be identified.
2297
2298A web profiling frontend exposes process statistics, garbage
2299visualisation and class tracker statistics.")
2300 (license license:asl2.0)))
2301
2302(define-public python2-pympler
2303 (package-with-python2 python-pympler))
2304
2305(define-public python-itsdangerous
2306 (package
2307 (name "python-itsdangerous")
acfcf2ed 2308 (version "1.1.0")
44d10b1f
RW
2309 (source
2310 (origin
2311 (method url-fetch)
acfcf2ed 2312 (uri (pypi-uri "itsdangerous" version))
44d10b1f
RW
2313 (sha256
2314 (base32
acfcf2ed 2315 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
44d10b1f 2316 (build-system python-build-system)
acfcf2ed 2317 (home-page "https://palletsprojects.com/p/itsdangerous/")
44d10b1f
RW
2318 (synopsis "Python library for passing data to/from untrusted environments")
2319 (description
2320 "Itsdangerous provides various helpers to pass trusted data to untrusted
2321environments and back.")
2322 (license license:bsd-3)))
2323
2324(define-public python2-itsdangerous
2325 (package-with-python2 python-itsdangerous))
2326
2327(define-public python-pyyaml
2328 (package
2329 (name "python-pyyaml")
357af7f2 2330 (version "5.3")
44d10b1f
RW
2331 (source
2332 (origin
2333 (method url-fetch)
2334 (uri (pypi-uri "PyYAML" version))
2335 (sha256
2336 (base32
357af7f2 2337 "058nd4p8f25wwzy2aiwh18wcrdm6663cqbfdkgjp8y9cp7ampx79"))))
44d10b1f
RW
2338 (build-system python-build-system)
2339 (inputs
2340 `(("libyaml" ,libyaml)))
7509f34f 2341 (home-page "https://pyyaml.org")
44d10b1f
RW
2342 (synopsis "YAML parser and emitter for Python")
2343 (description
2344 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2345complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2346API, and sensible error messages. PyYAML supports standard YAML tags and
2347provides Python-specific tags that allow to represent an arbitrary Python
2348object.")
2349 (license license:expat)))
2350
2351(define-public python2-pyyaml
2352 (package-with-python2 python-pyyaml))
2353
2354(define-public python-vine
2355 (package
2356 (name "python-vine")
2357 (version "1.1.4")
2358 (source
2359 (origin
2360 (method url-fetch)
2361 (uri (pypi-uri "vine" version))
2362 (sha256
2363 (base32
2364 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
2365 (build-system python-build-system)
2366 (native-inputs
2367 `(("python-pytest" ,python-pytest)
2368 ("python-case" ,python-case)))
2369 (home-page "https://github.com/celery/vine")
2370 (synopsis "Promises for Python")
2371 (description
2372 "@code{vine} provides a special implementation of promises in that it can
2373be used both for \"promise of a value\" and lazy evaluation. The biggest
2374upside for this is that everything in a promise can also be a promise,
2375e.g. filters, callbacks and errbacks can all be promises.")
2376 (license license:bsd-3)))
2377
2378(define-public python-virtualenv
2379 (package
2380 (name "python-virtualenv")
2782bd51 2381 (version "16.1.0")
44d10b1f
RW
2382 (source
2383 (origin
2384 (method url-fetch)
2385 (uri (pypi-uri "virtualenv" version))
2386 (sha256
2387 (base32
2782bd51 2388 "0242cg3hdq3qdvx5flyrki8lpwlgwf5k45c21ks5049fv7ygm6gq"))))
44d10b1f
RW
2389 (build-system python-build-system)
2390 (arguments
2391 `(#:phases
2392 (modify-phases %standard-phases
2782bd51 2393 (add-before 'check 'disable-failing-test
44d10b1f
RW
2394 (lambda _
2395 ;; Disable failing test. See upstream bug report
2396 ;; https://github.com/pypa/virtualenv/issues/957
2397 (substitute* "tests/test_virtualenv.py"
2398 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2782bd51 2399 #t)))))
44d10b1f
RW
2400 (native-inputs
2401 `(("python-mock" ,python-mock)
2402 ("python-pytest" ,python-pytest)))
2403 (home-page "https://virtualenv.pypa.io/")
2404 (synopsis "Virtual Python environment builder")
2405 (description
2406 "Virtualenv is a tool to create isolated Python environments.")
2407 (license license:expat)))
2408
2409(define-public python2-virtualenv
2410 (package-with-python2 python-virtualenv))
2411
2412(define-public python-markupsafe
2413 (package
2414 (name "python-markupsafe")
753eb411 2415 (version "1.1.1")
44d10b1f
RW
2416 (source
2417 (origin
2418 (method url-fetch)
5182927c 2419 (uri (pypi-uri "MarkupSafe" version))
44d10b1f
RW
2420 (sha256
2421 (base32
753eb411 2422 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
44d10b1f 2423 (build-system python-build-system)
753eb411
MB
2424 (arguments
2425 `(#:modules ((ice-9 ftw)
2426 (srfi srfi-1)
2427 (srfi srfi-26)
2428 (guix build utils)
2429 (guix build python-build-system))
2430 #:phases (modify-phases %standard-phases
2431 (replace 'check
2432 (lambda _
2433 (let ((cwd (getcwd))
2434 (libdir (find (cut string-prefix? "lib." <>)
2435 (scandir "build"))))
2436 (setenv "PYTHONPATH"
2437 (string-append cwd "/build/" libdir ":"
2438 (getenv "PYTHONPATH")))
2439 (invoke "pytest" "-vv")))))))
2440 (native-inputs
2441 `(("python-pytest" ,python-pytest)))
44d10b1f
RW
2442 (home-page "https://github.com/mitsuhiko/markupsafe")
2443 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2444 (description
2445 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2446for Python.")
2447 (license license:bsd-3)))
2448
2449(define-public python2-markupsafe
2450 (package-with-python2 python-markupsafe))
2451
2452(define-public python-jinja2
2453 (package
2454 (name "python-jinja2")
4a5c7934 2455 (version "2.10.1")
44d10b1f
RW
2456 (source
2457 (origin
2458 (method url-fetch)
2459 (uri (pypi-uri "Jinja2" version))
2460 (sha256
2461 (base32
4a5c7934 2462 "04shqrs56aj04ipyqykj512rw2l0zfammvj9krawzxz7xc14yp06"))))
44d10b1f
RW
2463 (build-system python-build-system)
2464 (propagated-inputs
2465 `(("python-markupsafe" ,python-markupsafe)))
2466 (home-page "http://jinja.pocoo.org/")
2467 (synopsis "Python template engine")
2468 (description
2469 "Jinja2 is a small but fast and easy to use stand-alone template engine
2470written in pure Python.")
2471 (license license:bsd-3)))
2472
2473(define-public python2-jinja2
2474 (package-with-python2 python-jinja2))
2475
ba42a6bf
TLC
2476(define-public python-jinja2-time
2477 (package
2478 (name "python-jinja2-time")
2479 (version "0.2.0")
2480 (source
2481 (origin
2482 (method url-fetch)
2483 (uri (pypi-uri "jinja2-time" version))
2484 (sha256
2485 (base32
2486 "0h0dr7cfpjnjj8bgl2vk9063a53649pn37wnlkd8hxjy656slkni"))))
2487 (build-system python-build-system)
2488 (propagated-inputs
2489 `(("python-arrow" ,python-arrow)
2490 ("python-jinja2" ,python-jinja2)))
2491 (home-page
2492 "https://github.com/hackebrot/jinja2-time")
2493 (synopsis "Jinja2 Extension for Dates and Times")
2494 (description
2495 "This package provides an extension for the template engine Jinja2. It
2496adds a 'now' tag providing a convenient access to the arrow.now() API from
2497templates. A format string can be provided to control the output.")
2498 (license license:expat)))
2499
44d10b1f
RW
2500(define-public python-pystache
2501 (package
2502 (name "python-pystache")
2503 (version "0.5.4")
2504 (source (origin
2505 (method url-fetch)
2506 (uri (pypi-uri "pystache" version))
2507 (sha256
2508 (base32
2509 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2510 (build-system python-build-system)
2511 (arguments
2512 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2513 (home-page "http://defunkt.io/pystache/")
2514 (synopsis "Python logic-less template engine")
2515 (description
2516 "Pystache is a Python implementation of the framework agnostic,
2517logic-free templating system Mustache.")
2518 (license license:expat)
2519 (properties `((python2-variant . ,(delay python2-pystache))))))
2520
2521(define-public python2-pystache
2522 (package (inherit (package-with-python2
2523 (strip-python2-variant python-pystache)))
2524 (arguments
2525 `(#:python ,python-2
2526 #:phases
2527 (modify-phases %standard-phases
2528 (replace 'check
2529 (lambda _
dfafc29b 2530 (invoke "python" "test_pystache.py"))))))))
44d10b1f
RW
2531
2532(define-public python-joblib
2533 (package
2534 (name "python-joblib")
2535 (version "0.13.0")
2536 (source (origin
2537 (method url-fetch)
2538 (uri (pypi-uri "joblib" version))
2539 (sha256
2540 (base32
2541 "0612nazad8dxmn3xghfrmjax6456l4xy6hn9cngs7vydi14ds7v5"))))
2542 (build-system python-build-system)
2543 (arguments
2544 `(#:phases
2545 (modify-phases %standard-phases
2546 (replace 'check
2547 (lambda _ (invoke "pytest" "-v" "joblib"))))))
2548 (native-inputs
2549 `(("python-pytest" ,python-pytest)))
2550 (home-page "https://joblib.readthedocs.io/")
2551 (synopsis "Using Python functions as pipeline jobs")
2552 (description
2553 "Joblib is a set of tools to provide lightweight pipelining in Python.
2554In particular, joblib offers: transparent disk-caching of the output values
2555and lazy re-evaluation (memoize pattern), easy simple parallel computing
2556logging and tracing of the execution.")
2557 (license license:bsd-3)))
2558
2559(define-public python2-joblib
2560 (package-with-python2 python-joblib))
2561
a3363341
VC
2562(define-public python-daemon
2563 (package
2564 (name "python-daemon")
2565 (version "2.2.3")
2566 (source
2567 (origin
2568 (method url-fetch)
2569 (uri (pypi-uri "python-daemon" version))
2570 (sha256
2571 (base32
2572 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
2573 (build-system python-build-system)
2574 (arguments
2575 `(#:phases
2576 (modify-phases %standard-phases
2577 (add-before 'check 'disable-tests
2578 (lambda _
2579 ;; FIXME: Determine why test fails
2580 (substitute* "test/test_daemon.py"
2581 (("test_detaches_process_context")
2582 "skip_test_detaches_process_context"))
2583 #t)))))
2584 (propagated-inputs
2585 `(("python-lockfile" ,python-lockfile)))
2586 (native-inputs
2587 `(("python-unittest2" ,python-unittest2)
2588 ("python-testtools" ,python-testtools)
2589 ("python-testscenarios" ,python-testscenarios)
2590 ("python-mock" ,python-mock)
2591 ("python-docutils" ,python-docutils)))
2592 (home-page "https://pagure.io/python-daemon/")
2593 (synopsis "Python library for making a Unix daemon process")
2594 (description "Python-daemon is a library that assists a Python program to
2595turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
2596
2597This library provides a @code{DaemonContext} class that manages the following
2598important tasks for becoming a daemon process:
2599@enumerate
2600@item Detach the process into its own process group.
2601@item Set process environment appropriate for running inside a chroot.
2602@item Renounce suid and sgid privileges.
2603@item Close all open file descriptors.
2604@item Change the working directory, uid, gid, and umask.
2605@item Set appropriate signal handlers.
2606@item Open new file descriptors for stdin, stdout, and stderr.
2607@item Manage a specified PID lock file.
2608@item Register cleanup functions for at-exit processing.
2609@end enumerate")
2610 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
2611 (license (list license:asl2.0 license:gpl3+))))
2612
544ea9c2
MB
2613(define-public python-anytree
2614 (package
2615 (name "python-anytree")
2616 (version "2.8.0")
2617 (source (origin
2618 (method url-fetch)
2619 (uri (pypi-uri "anytree" version))
2620 (sha256
2621 (base32
2622 "1aycpc387wqz7h9w2p53qxn43qsh3m6by6ak4kkc66x9aprr63rz"))))
2623 (build-system python-build-system)
2624 (propagated-inputs
2625 `(("python-six" ,python-six)))
2626 (native-inputs
2627 `(;; For tests.
2628 ("graphviz" ,graphviz) ;for 'dot'
2629 ("python-nose" ,python-nose)))
2630 (home-page "https://github.com/c0fec0de/anytree")
2631 (synopsis "Lightweight tree data library")
2632 (description
2633 "@code{anytree} is a simple, lightweight, and extensible tree data
2634structure for Python.")
2635 (license license:asl2.0)))
2636
44d10b1f
RW
2637(define-public python-docutils
2638 (package
2639 (name "python-docutils")
2640 (version "0.14")
2641 (source
2642 (origin
2643 (method url-fetch)
2644 (uri (pypi-uri "docutils" version))
2645 (sha256
2646 (base32
2647 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2648 (build-system python-build-system)
2649 (arguments
2650 '(#:tests? #f)) ; no setup.py test command
2651 (home-page "http://docutils.sourceforge.net/")
2652 (synopsis "Python Documentation Utilities")
2653 (description
2654 "Docutils is a modular system for processing documentation into useful
2655formats, such as HTML, XML, and LaTeX. For input Docutils supports
2656reStructuredText.")
2657 ;; Most of the source code is public domain, but some source files are
2658 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2659 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2660
2661(define-public python2-docutils
2662 (package-with-python2 python-docutils))
2663
2664(define-public python-pygments
2665 (package
2666 (name "python-pygments")
69002b21 2667 (version "2.5.2")
44d10b1f
RW
2668 (source
2669 (origin
2670 (method url-fetch)
2671 (uri (pypi-uri "Pygments" version))
2672 (sha256
2673 (base32
69002b21 2674 "1zmhnswy0wxfn0xprs9aqsvx2c3kmzfn2wx14q8cv3vpkxdamj4q"))))
44d10b1f
RW
2675 (build-system python-build-system)
2676 (arguments
2677 ;; FIXME: Tests require sphinx, which depends on this.
2678 '(#:tests? #f))
69002b21 2679 (home-page "https://pygments.org/")
44d10b1f
RW
2680 (synopsis "Syntax highlighting")
2681 (description
2682 "Pygments is a syntax highlighting package written in Python.")
2683 (license license:bsd-2)))
2684
2685(define-public python2-pygments
2686 (package-with-python2 python-pygments))
2687
0f0a5ef9
MC
2688(define-public python-bumpversion
2689 (package
2690 (name "python-bumpversion")
2691 (version "0.5.3")
2692 (source
2693 (origin
2694 (method url-fetch)
2695 (uri (pypi-uri "bumpversion" version))
2696 (sha256
2697 (base32
2698 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
2699 (build-system python-build-system)
2700 (home-page "https://github.com/peritus/bumpversion")
2701 (synopsis "Tool to bump software version")
2702 (description "This tool provides a command-line interface (CLI) to bump a
2703software version simply.")
2704 (license license:expat)))
2705
b24fd2c2
MC
2706(define-public python-deprecated
2707 (package
2708 (name "python-deprecated")
2709 (version "1.2.5")
2710 (source
2711 (origin
2712 (method git-fetch)
2713 (uri (git-reference
2714 (url "https://github.com/tantale/deprecated.git")
2715 (commit (string-append "v" version))))
2716 (file-name (git-file-name name version))
2717 (sha256
2718 (base32
2719 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
2720 (build-system python-build-system)
2721 (arguments
2722 `(#:phases (modify-phases %standard-phases
2723 (replace 'check
2724 (lambda _
2725 (invoke "pytest"))))))
2726 (propagated-inputs
2727 `(("python-wrapt" ,python-wrapt)))
2728 (native-inputs
2729 `(("python-bumpversion" ,python-bumpversion)
2730 ("python-pytest" ,python-pytest)
2731 ("python-pytest-cov" ,python-pytest-cov)
2732 ("python-sphinx" ,python-sphinx)
2733 ("python-tox" ,python-tox)))
2734 (home-page "https://github.com/tantale/deprecated")
2735 (synopsis "Python decorator to deprecate classes, functions or methods")
2736 (description "The @code{deprecated} decorator provides a convenient way to deprecate
2737to deprecate classes, functions or methods.")
2738 (license license:expat)))
2739
d5a998fa
MC
2740(define-public python-pygithub
2741 (package
2742 (name "python-pygithub")
749e38d7 2743 (version "1.43.8")
d5a998fa
MC
2744 (source
2745 ;; We fetch from the Git repo because there are no tests in the PyPI
2746 ;; archive.
2747 (origin
2748 (method git-fetch)
2749 (uri (git-reference
2750 (url "https://github.com/PyGithub/PyGithub.git")
2751 (commit (string-append "v" version))))
2752 (file-name (git-file-name name version))
2753 (sha256
749e38d7 2754 (base32 "1625v558xga5mwhl9jqmibywy5qafmg1vqrirqz6zfq1la1d22mw"))))
d5a998fa
MC
2755 (build-system python-build-system)
2756 (arguments
2757 `(#:phases (modify-phases %standard-phases
2758 ;; Some tests rely on the network.
2759 (add-after 'unpack 'disable-failing-tests
2760 (lambda _
2761 (substitute* "tests/Issue142.py"
2762 (("testDecodeJson") "disabled_testDecodeJson"))
2763 #t))
2764 (add-before 'check 'prepare-for-tests
2765 (lambda _
2766 (for-each (lambda (f)
2767 (chmod f #o666))
2768 (find-files "./tests"))
2769 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
2770 (setenv "PYTHONPATH"
2771 (string-append "./tests:" (getenv "PYTHONPATH")))
2772 #t)))))
2773 (propagated-inputs
2774 `(("python-deprecated" ,python-deprecated)
2775 ("python-pyjwt" ,python-pyjwt)
2776 ("python-requests" ,python-requests)))
2777 (native-inputs `(("python-httpretty" ,python-httpretty)))
2778 (home-page "https://pygithub.readthedocs.io/en/latest/")
2779 (synopsis "Python library for the GitHub API")
2780 (description "This library allows managing GitHub resources such as
2781repositories, user profiles, and organizations in your Python applications,
2782using version 3 of the GitHub application programming interface (API).")
2783 (license license:lgpl3+)))
2784
c0c0bb38
MC
2785(define-public python-rellu
2786 (package
2787 (name "python-rellu")
2788 (version "0.7")
2789 (source
2790 (origin
2791 (method url-fetch)
2792 (uri (pypi-uri "rellu" version))
2793 (sha256
2794 (base32
2795 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
2796 (build-system python-build-system)
2797 (propagated-inputs
2798 `(("python-invoke" ,python-invoke)
2799 ("python-pygithub" ,python-pygithub)))
2800 (home-page "https://github.com/robotframework/rellu")
2801 (synopsis "Utilities to create PyPI releases")
2802 (description "This collection of utilities contains tooling and templates
2803to assist in creating releases on GitHub and publishing them on PyPI. It is
2804designed to be used by Robot Framework and tools and libraries in its
2805ecosystem, but can naturally be used also by other projects.")
2806 (license license:asl2.0)))
2807
b9790285
MC
2808(define-public python-robotframework
2809 (package
2810 (name "python-robotframework")
1710b8f8 2811 (version "3.1.2")
b9790285
MC
2812 ;; There are no tests in the PyPI archive.
2813 (source
2814 (origin
2815 (method git-fetch)
2816 (uri (git-reference
2817 (url "https://github.com/robotframework/robotframework.git")
2818 (commit (string-append "v" version))))
2819 (file-name (git-file-name name version))
2820 (sha256
1710b8f8 2821 (base32 "16gnxy0qinh8fhs0qvhff5z2xh49c3cqgm0d7bfjw120df6x7fym"))
b9790285
MC
2822 (patches (search-patches
2823 "python-robotframework-honor-source-date-epoch.patch"))))
2824 (build-system python-build-system)
2825 (arguments
2826 `(#:phases (modify-phases %standard-phases
2827 (add-before 'build 'build-and-install-doc
2828 (lambda* (#:key outputs #:allow-other-keys)
2829 (let* ((doc-output (assoc-ref outputs "doc"))
2830 (doc (string-append doc-output "/share/"
2831 ,name "-" ,version "/")))
2832 (invoke "invoke" "library-docs" "all")
2833 (mkdir-p doc)
2834 (copy-recursively "doc/libraries"
2835 (string-append doc "/libraries"))
2836 #t)))
2837 (replace 'check
2838 (lambda _
2839 (invoke "python" "utest/run.py"))))))
2840 (native-inputs
2841 `(("python-invoke" ,python-invoke)
2842 ("python-rellu" ,python-rellu)
2843 ("python:tk" ,python "tk"))) ;used when building the HTML doc
2844 (outputs '("out" "doc"))
2845 (home-page "https://robotframework.org")
2846 (synopsis "Generic automation framework")
2847 (description "Robot Framework is a generic automation framework for
2848acceptance testing, acceptance test driven development (ATDD), and robotic
2849process automation (RPA).")
2850 (license license:asl2.0)))
2851
5b84c120
MC
2852(define-public python-robotframework-lint
2853 ;; There is no properly tagged release; the commit below seems to correspond
2854 ;; to the 0.9 stable release available from PyPI. The tests are not
2855 ;; included in the PyPI archive, so we fetch the sources from the upstream
2856 ;; Git repo.
2857 (let ((commit "e851879bab1f63e4e53b34a4dc8a67ed95102830")
2858 (revision "1"))
2859 (package
2860 (name "python-robotframework-lint")
2861 (version (git-version "0.9.0" revision commit))
2862 (source
2863 (origin
2864 (method git-fetch)
2865 (uri (git-reference
2866 (url "https://github.com/boakley/robotframework-lint.git")
2867 (commit commit)))
2868 (file-name (git-file-name name version))
2869 (sha256
2870 (base32
2871 "1p6fknqg5sb9qz5857ji4a877657vgfjm5v3zn45994parx6ml1m"))))
2872 (build-system python-build-system)
2873 (arguments
2874 `(#:phases
2875 (modify-phases %standard-phases
2876 (replace 'check
2877 (lambda _
2878 (invoke "python" "-m" "robot" "-A"
2879 "tests/conf/default.args" "tests"))))))
2880 (propagated-inputs
2881 `(("python-robotframework" ,python-robotframework)))
2882 (home-page "https://github.com/boakley/robotframework-lint/")
2883 (synopsis "Static analysis tool (linter) for Robot Framework")
2884 (description "This package provides the @code{rflint} command-line
2885utility, a static analysis tool (linter) for Robot Framework source files.")
2886 (license license:asl2.0))))
2887
c0c64f17
MC
2888(define-public python-robotframework-sshlibrary
2889 (package
2890 (name "python-robotframework-sshlibrary")
2891 (version "3.3.0")
2892 ;; There are no tests in the PyPI archive.
2893 (source
2894 (origin
2895 (method git-fetch)
2896 (uri (git-reference
2897 (url "https://github.com/robotframework/SSHLibrary.git")
2898 (commit (string-append "v" version))))
2899 (file-name (git-file-name name version))
2900 (sha256
2901 (base32
2902 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
2903 (build-system python-build-system)
2904 (arguments
2905 `(#:phases
2906 (modify-phases %standard-phases
2907 (add-before 'build 'build-and-install-doc
2908 (lambda* (#:key outputs #:allow-other-keys)
2909 (let* ((doc-output (assoc-ref outputs "doc"))
2910 (doc (string-append doc-output "/share/"
2911 ,name "-" ,version "/")))
2912 (invoke "chmod" "-R" "+w" "docs")
2913 (invoke "invoke" "kw-docs" "project-docs")
2914 (mkdir-p doc)
2915 (for-each delete-file (find-files "docs" "\\.rst"))
2916 (copy-recursively "docs" doc)
2917 #t)))
2918 (replace 'check
2919 (lambda _
2920 ;; Some tests require an SSH server; we remove them.
2921 (delete-file "utest/test_client_api.py")
2922 (delete-file "utest/test_scp.py")
2923 (invoke "python" "utest/run.py"))))))
2924 (propagated-inputs
2925 `(("python-robotframework" ,python-robotframework)
2926 ("python-paramiko" ,python-paramiko)
2927 ("python-scp" ,python-scp)))
2928 (native-inputs
2929 `(("openssh" ,openssh)
2930 ("which" ,which)
2931 ;; To generate the documentation
2932 ("python-docutils" ,python-docutils)
2933 ("python-invoke" ,python-invoke)
2934 ("python-pygments" ,python-pygments)
2935 ("python-rellu" ,python-rellu)))
2936 (outputs '("out" "doc"))
2937 (home-page "https://github.com/robotframework/SSHLibrary")
2938 (synopsis "Robot Framework library for SSH and SFTP")
2939 (description "SSHLibrary is a Robot Framework library providing support
2940for SSH and SFTP. It has the following main usages:
2941@itemize @bullet
2942@item Executing commands on the remote machine, either blocking or non-blocking.
2943@item Writing and reading in an interactive shell.
2944@item Transferring files and directories over SFTP.
2945@item Ensuring that files and directories exist on the remote machine.
2946@end itemize")
2947 (license license:asl2.0)))
2948
b1daba94
VC
2949(define-public python-rstr
2950 (package
2951 (name "python-rstr")
2952 (version "2.2.6")
2953 (source
2954 (origin
2955 (method url-fetch)
2956 (uri (pypi-uri "rstr" version))
2957 (sha256
2958 (base32
2959 "197dw8mbq0pjjz1l6h1ksi62vgn7x55d373ch74y06744qiq5sjx"))))
2960 (build-system python-build-system)
2961 (home-page
2962 "http://bitbucket.org/leapfrogdevelopment/rstr/overview")
2963 (synopsis "Generate random strings in Python")
2964 (description "This package provides a python module for generating
2965random strings of various types. It could be useful for fuzz testing,
2966generating dummy data, or other applications. It has no dependencies
2967outside the standard library.")
2968 (license license:bsd-3)))
2969
13d825fc
MC
2970(define-public python-scp
2971 (package
2972 (name "python-scp")
2973 (version "0.13.2")
2974 (source
2975 (origin
2976 (method url-fetch)
2977 (uri (pypi-uri "scp" version))
2978 (sha256
2979 (base32
2980 "1crlpw9lnn58fs1c1rmh7s7s9y5gkgpgjsqlvg9qa51kq1knx7gg"))))
2981 (build-system python-build-system)
2982 (arguments
2983 '(#:tests? #f)) ;tests require an SSH server
2984 (propagated-inputs
2985 `(("python-paramiko" ,python-paramiko)))
2986 (home-page "https://github.com/jbardin/scp.py")
2987 (synopsis "SCP protocol module for Python and Paramiko")
2988 (description "The scp module extends the Paramiko library to send and
2989receive files via the SCP1 protocol, as implemented by the OpenSSH
2990@command{scp} program.")
2991 (license license:gpl2+)))
2992
44d10b1f
RW
2993(define-public python-rst.linker
2994 (package
2995 (name "python-rst.linker")
d37e8e53 2996 (version "1.11")
44d10b1f
RW
2997 (source
2998 (origin
2999 (method url-fetch)
3000 (uri (pypi-uri "rst.linker" version))
3001 (sha256
d37e8e53 3002 (base32 "0pqsfqqx8h0pq21k8l3k62kznrgaj2ala93c64s4d9rpbr4mgkd2"))))
44d10b1f
RW
3003 (build-system python-build-system)
3004 (propagated-inputs
3005 `(("python-dateutil" ,python-dateutil)
3006 ("python-six" ,python-six)))
3007 (native-inputs
3008 `(("python-setuptools-scm" ,python-setuptools-scm)))
3009 ;; Test would require path.py, which would introduce a cyclic dependence.
3010 (arguments `(#:tests? #f))
3011 ;; Note: As of version 1.7 the documentation is not worth building.
3012 (home-page "https://github.com/jaraco/rst.linker")
3013 (synopsis "Sphinx plugin to add links and timestamps")
3014 (description "rst.linker allows to automatically replace text by a
3015reStructuredText external reference or timestamps. It's primary purpose is to
3016augment the changelog, but it can be used for other documents, too.")
3017 (license license:expat)))
3018
3019(define-public python2-rst.linker
3020 (package-with-python2 python-rst.linker))
3021
3022(define-public python-feedgenerator
3023 (package
3024 (name "python-feedgenerator")
3025 (version "1.9")
3026 (source
3027 (origin
3028 (method url-fetch)
3029 (uri (pypi-uri "feedgenerator" version))
3030 (sha256
3031 (base32
3032 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
3033 (modules '((guix build utils)))
3034 (snippet
3035 '(begin
3036 ;; Remove pre-compiled .pyc files from source.
3037 (for-each delete-file-recursively
3038 (find-files "." "__pycache__" #:directories? #t))
3039 (for-each delete-file (find-files "." "\\.pyc$"))
3040 #t))))
3041 (build-system python-build-system)
3042 (propagated-inputs
3043 `(("python-pytz" ,python-pytz)
3044 ("python-six" ,python-six)))
3045 (home-page "https://github.com/getpelican/feedgenerator")
3046 (synopsis
3047 "Standalone version of Django's Atom/RSS feed generator")
3048 (description
3049 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
3050which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3051 (license license:bsd-3)))
3052
3053(define-public python2-feedgenerator
3054 (package-with-python2 python-feedgenerator))
3055
3056(define-public python-toml
3057 (package
3058 (name "python-toml")
3059 (version "0.9.4")
3060 (source
3061 (origin
3062 (method url-fetch)
3063 (uri (pypi-uri "toml" version))
3064 (sha256
3065 (base32
3066 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
3067 (build-system python-build-system)
3068 (arguments
3069 `(#:tests? #f)) ;no tests suite in release
3070 (home-page "https://github.com/uiri/toml")
3071 (synopsis "Library for TOML")
3072 (description
3073 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
3074Language (TOML) configuration files.")
3075 (license license:expat)))
3076
346c8752
BG
3077(define-public python-jsonrpc-server
3078 (package
3079 (name "python-jsonrpc-server")
d6cf4c6e 3080 (version "0.3.2")
346c8752
BG
3081 (source
3082 (origin
3083 (method url-fetch)
3084 (uri (pypi-uri "python-jsonrpc-server" version))
3085 (sha256
3086 (base32
d6cf4c6e 3087 "0ddgdp26dfxaz6isjbb12974b3rxavgsqrn2zrmck62cmipg5g05"))))
346c8752
BG
3088 (build-system python-build-system)
3089 (propagated-inputs
3090 `(("python-future" ,python-future)
3091 ("python-mock" ,python-mock)
d6cf4c6e
BG
3092 ("python-pytest" ,python-pytest)
3093 ("python-ujson" ,python-ujson)))
346c8752
BG
3094 (home-page
3095 "https://github.com/palantir/python-jsonrpc-server")
3096 (synopsis "JSON RPC 2.0 server library")
3097 (description
1df5407c 3098 "This package provides a JSON RPC 2.0 server library for Python.")
346c8752
BG
3099 (license license:expat)))
3100
56f4ad47
BG
3101(define-public python-pydocstyle
3102 (package
3103 (name "python-pydocstyle")
3104 (version "3.0.0")
3105 (source
3106 (origin
3107 (method url-fetch)
3108 (uri (pypi-uri "pydocstyle" version))
3109 (sha256
3110 (base32
3111 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
3112 (build-system python-build-system)
3113 (propagated-inputs
3114 `(("python-six" ,python-six)
3115 ("python-snowballstemmer" ,python-snowballstemmer)))
3116 (home-page
3117 "https://github.com/PyCQA/pydocstyle/")
3118 (synopsis "Python docstring style checker")
3119 (description
3120 "This package provides a style checker for the Python Language
3121Server (PLS).")
3122 (license license:expat)))
3123
be4d840c 3124(define-public python-language-server
808dd2d0
BL
3125 (package
3126 (name "python-language-server")
a42f1420 3127 (version "0.31.7")
808dd2d0
BL
3128 (source
3129 (origin
3130 (method url-fetch)
3131 (uri (pypi-uri "python-language-server" version))
3132 (sha256
3133 (base32
a42f1420 3134 "0f8rljff4h2ay9m2n9ang7axai37nzd39zd7m6c90rci5wh8cmxh"))))
808dd2d0
BL
3135 (build-system python-build-system)
3136 (propagated-inputs
3137 `(("python-pluggy" ,python-pluggy)
3138 ("python-jsonrpc-server" ,python-jsonrpc-server)
3139 ("python-jedi" ,python-jedi)
3140 ("python-yapf" ,python-yapf)
3141 ("python-pyflakes" ,python-pyflakes)
3142 ("python-pydocstyle" ,python-pydocstyle)
3143 ("python-pycodestyle" ,python-pycodestyle)
3144 ("python-mccabe" ,python-mccabe)
3145 ("python-rope" ,python-rope)
3146 ("python-autopep8" ,python-autopep8)
3147 ("python-flake8" ,python-flake8)
3148 ("python-pylint" ,python-pylint)))
3149 (home-page "https://github.com/palantir/python-language-server")
3150 (synopsis "Python implementation of the Language Server Protocol")
3151 (description
3152 "The Python Language Server (pyls) is an implementation of the Python 3
be4d840c
BG
3153language specification for the Language Server Protocol (LSP). This tool is
3154used in text editing environments to provide a complete and integrated
3155feature-set for programming Python effectively.")
808dd2d0 3156 (license license:expat)))
be4d840c 3157
c777ecb3
RW
3158(define-public python-pathspec
3159 (package
3160 (name "python-pathspec")
3161 (version "0.7.0")
3162 (source
3163 (origin
3164 (method url-fetch)
3165 (uri (pypi-uri "pathspec" version))
3166 (sha256
3167 (base32
3168 "15lvs4awlg8xzl0l4gk9y53xx4yqmqvsv44pglv39m70y85afajn"))))
3169 (build-system python-build-system)
3170 (home-page "https://github.com/cpburnz/python-path-specification")
3171 (synopsis "Utility library for gitignore style pattern matching of file paths")
3172 (description
3173 "This package provides a utility library for gitignore style pattern
3174matching of file paths.")
3175 (license license:mpl2.0)))
3176
44d10b1f
RW
3177(define-public python-black
3178 (package
3179 (name "python-black")
5f603fab 3180 (version "19.10b0")
44d10b1f
RW
3181 (source
3182 (origin
3183 (method url-fetch)
3184 (uri (pypi-uri "black" version))
3185 (sha256
3186 (base32
5f603fab 3187 "0f8mr0yzj78q1dx7v6ggbgfir2wv0n5z2shfbbvfdq7910xbgvf2"))))
44d10b1f
RW
3188 (build-system python-build-system)
3189 (arguments
3190 `(#:phases
3191 (modify-phases %standard-phases
3192 (add-after 'patch-source-shebangs 'patch-extra-shebangs
3193 (lambda _
3194 (let ((python3 (which "python3")))
3195 (substitute* '("tests/data/fmtonoff.py"
3196 "tests/data/string_prefixes.py"
5f603fab
RW
3197 "tests/data/function.py"
3198 "tests/data/python37.py")
44d10b1f
RW
3199 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
3200 (string-append "#!" python3 (if (string? minor-version)
3201 minor-version
5f603fab
RW
3202 "")))))
3203 #t))
3204 (add-after 'unpack 'disable-broken-tests
3205 (lambda _
3206 ;; These tests are supposed to be skipped when the blackd
3207 ;; dependencies are missing, but this doesn't quite work.
3208 (substitute* "tests/test_black.py"
3209 (("( *)class BlackDTestCase.*" match indent)
3210 (string-append indent "@unittest.skip(\"no blackd deps\")\n"
3211 indent "class BlackDTestCase(unittest.TestCase):\n"))
3212 (("web.Application") "False")
3213 (("@unittest_run_loop") ""))
3214
3215 ;; Patching the above file breaks the self test
3216 (substitute* "tests/test_black.py"
3217 (("( *)def test_self" match indent)
3218 (string-append indent "@unittest.skip(\"guix\")\n" match)))
3219 #t)))))
44d10b1f
RW
3220 (propagated-inputs
3221 `(("python-click" ,python-click)
3222 ("python-attrs" ,python-attrs)
3223 ("python-appdirs" ,python-appdirs)
5f603fab
RW
3224 ("python-pathspec" ,python-pathspec)
3225 ("python-regex" ,python-regex)
3226 ("python-toml" ,python-toml)
3227 ("python-typed-ast" ,python-typed-ast)))
3228 (native-inputs
3229 `(("python-setuptools-scm" ,python-setuptools-scm)))
44d10b1f
RW
3230 (home-page "https://github.com/ambv/black")
3231 (synopsis "The uncompromising code formatter")
3232 (description "Black is the uncompromising Python code formatter.")
3233 (license license:expat)))
3234
3235(define-public python-blinker
3236 (package
3237 (name "python-blinker")
3238 (version "1.4")
3239 (source
3240 (origin
3241 (method url-fetch)
3242 (uri (pypi-uri "blinker" version))
3243 (sha256
3244 (base32
3245 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3246 (build-system python-build-system)
d46646d9 3247 (home-page "https://pythonhosted.org/blinker/")
44d10b1f
RW
3248 (synopsis "Fast, simple object-to-object and broadcast signaling")
3249 (description
3250 "Blinker provides a fast dispatching system that allows any number of
3251interested parties to subscribe to events, or \"signals\".")
3252 (license license:expat)))
3253
3254(define-public python2-blinker
3255 (package-with-python2 python-blinker))
3256
3257(define-public pelican
3258 (package
3259 (name "pelican")
fa9e3b5e 3260 (version "4.2.0")
44d10b1f
RW
3261 (source
3262 (origin
3263 (method url-fetch)
3264 (uri (pypi-uri "pelican" version))
3265 (sha256
3266 (base32
fa9e3b5e 3267 "0mp7hjyhs38ag1hyfcy882g400z0babqi72pnli46dqijfhajzmy"))))
44d10b1f
RW
3268 (build-system python-build-system)
3269 (propagated-inputs
fa9e3b5e
VC
3270 `(("python-blinker" ,python-blinker)
3271 ("python-dateutil" ,python-dateutil)
3272 ("python-docutils" ,python-docutils)
3273 ("python-feedgenerator" ,python-feedgenerator)
44d10b1f 3274 ("python-jinja2" ,python-jinja2)
fa9e3b5e 3275 ("python-markdown" ,python-markdown)
44d10b1f 3276 ("python-pygments" ,python-pygments)
44d10b1f 3277 ("python-pytz" ,python-pytz)
44d10b1f 3278 ("python-six" ,python-six)
fa9e3b5e 3279 ("python-unidecode" ,python-unidecode)))
44d10b1f
RW
3280 (home-page "https://getpelican.com/")
3281 (arguments
3282 `(;; XXX Requires a lot more packages to do unit tests :P
fa9e3b5e 3283 #:tests? #f))
44d10b1f
RW
3284 (synopsis "Python-based static site publishing system")
3285 (description
3286 "Pelican is a tool to generate a static blog from reStructuredText,
3287Markdown input files, and more. Pelican uses Jinja2 for templating
3288and is very extensible.")
3289 (license license:agpl3+)))
3290
8c141421
JH
3291(define-public mallard-ducktype
3292 (package
3293 (name "mallard-ducktype")
12cc3da5 3294 (version "1.0.2")
8c141421
JH
3295 (source
3296 (origin
3297 (method git-fetch)
12cc3da5
JH
3298 ;; git-reference because tests are not included in pypi source tarball
3299 ;; https://issues.guix.gnu.org/issue/36755#2
8c141421
JH
3300 (uri (git-reference
3301 (url "https://github.com/projectmallard/mallard-ducktype.git")
3302 (commit version)))
3303 (file-name (git-file-name name version))
3304 (sha256
3305 (base32
12cc3da5 3306 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
8c141421 3307 (build-system python-build-system)
5246655f
EF
3308 (arguments
3309 '(#:phases
3310 (modify-phases %standard-phases
3311 (replace 'check
3312 (lambda _
3313 (with-directory-excursion "tests"
3314 (invoke "sh" "runtests")))))))
8c141421
JH
3315 (home-page "http://projectmallard.org")
3316 (synopsis "Convert Ducktype to Mallard documentation markup")
3317 (description
3318 "Ducktype is a lightweight syntax that can represent all the semantics
3319of the Mallard XML documentation system. Ducktype files can be converted to
3320Mallard using the @command{ducktype} tool. The yelp-tools package
3321provides additional functionality on the produced Mallard documents.")
3322 (license license:expat)))
3323
44d10b1f
RW
3324(define-public python-cython
3325 (package
3326 (name "python-cython")
6fd27a71 3327 (version "0.29.13")
44d10b1f
RW
3328 (source
3329 (origin
3330 (method url-fetch)
3331 (uri (pypi-uri "Cython" version))
3332 (sha256
6fd27a71
TGR
3333 (base32
3334 "13k37lrcgagwwnzr5bzririsscb793vndj234d475x1h9ad0d7f2"))))
44d10b1f
RW
3335 (build-system python-build-system)
3336 ;; we need the full python package and not just the python-wrapper
3337 ;; because we need libpython3.3m.so
3338 (inputs
3339 `(("python" ,python)))
3340 (arguments
3341 `(#:phases
3342 (modify-phases %standard-phases
3343 (add-before 'check 'set-HOME
3344 ;; some tests require access to "$HOME/.cython"
3345 (lambda _ (setenv "HOME" "/tmp") #t))
3346
3347 ;; FIXME: These tests started failing on armhf after the 0.28 update
3348 ;; (commit c69d11c5930), both with an error such as this:
3349 ;; compiling (cpp) and running dictcomp ...
3350 ;; === C/C++ compiler error output: ===
3351 ;; ‘
3352 ;; dictcomp.cpp:5221: confused by earlier errors, bailing out
3353 ;; See <https://hydra.gnu.org/build/2948724> for logs.
3354 ,@(if (target-arm32?)
3355 `((add-before 'check 'disable-failing-tests
3356 (lambda _
3357 (let ((disabled-tests (open-file "tests/bugs.txt" "a")))
3358 (for-each (lambda (test)
3359 (format disabled-tests "~a\n" test))
3360 '("memslice" "dictcomp"))
3361 (close-port disabled-tests)))))
3362 '())
3363
3364 (replace 'check
3365 (lambda _
e9194eb0
MB
3366 ;; Disable compiler optimizations to greatly reduce the running
3367 ;; time of the test suite.
3368 (setenv "CFLAGS" "-O0")
3369
3370 (invoke "python" "runtests.py" "-vv"
3371 "-j" (number->string (parallel-job-count))))))))
f319409b 3372 (home-page "https://cython.org/")
44d10b1f
RW
3373 (synopsis "C extensions for Python")
3374 (description "Cython is an optimising static compiler for both the Python
3375programming language and the extended Cython programming language. It makes
3376writing C extensions for Python as easy as Python itself.")
3377 (license license:asl2.0)
3378 (properties `((python2-variant . ,(delay python2-cython))))))
3379
3380(define-public python2-cython
da460865
MB
3381 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
3382 (package
3383 (inherit base)
3384 (name "python2-cython")
3385 (inputs
3386 `(("python-2" ,python-2))) ;this is not automatically changed
3387 (arguments
3388 (substitute-keyword-arguments (package-arguments base)
3389 ((#:phases phases)
3390 `(modify-phases ,phases
3391 (add-before 'check 'adjust-test_embed
3392 (lambda _
3393 (substitute* "runtests.py"
3394 ;; test_embed goes great lengths to find the static libpythonX.Y.a
3395 ;; so it can give the right -L flag to GCC when embedding static
3396 ;; builds of Python. It is unaware that the Python "config"
3397 ;; directory (where the static library lives) was renamed in
3398 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
3399 ;; which works fine, because that is where the shared library is.
3400 ;;
3401 ;; It also appears to be unaware that the Makefile in Demos/embed
3402 ;; already unconditionally pass the static library location to GCC,
3403 ;; after checking sysconfig.get_config_var('LIBPL).
3404 ;;
3405 ;; The effect is that the linker is unable to resolve libexpat
3406 ;; symbols when building for Python 2, because neither the Python 2
3407 ;; shared library nor Expat is available. To fix it, we can either
3408 ;; add Expat as an input and make it visible to the linker, or just
3409 ;; prevent it from overriding the Python shared library location.
3410 ;; The end result is identical, so we take the easy route.
3411 ((" or libname not in os\\.listdir\\(libdir\\)")
3412 ""))
3413 #t)))))))))
44d10b1f
RW
3414
3415;; The RPython toolchain currently does not support Python 3.
3416(define-public python2-rpython
3417 (package
3418 (name "python2-rpython")
3419 (version "0.2.1")
3420 (source
3421 (origin
3422 (method url-fetch)
3423 (uri (pypi-uri "rpython" version))
3424 (sha256
3425 (base32
3426 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
3427 (build-system python-build-system)
3428 (arguments `(#:python ,python-2))
3429 (native-inputs
3430 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3431 (home-page "https://rpython.readthedocs.org")
3432 (synopsis "Framework for implementing interpreters and virtual machines")
3433 (description "RPython is a translation and support framework for
3434producing implementations of dynamic languages, emphasizing a clean separation
3435between language specification and implementation aspects.")
3436 (license license:expat)))
3437
3438;; NOTE: when upgrading numpy please make sure that python-pandas and
3439;; python-scipy still build, as these three packages are often used together.
3440(define-public python-numpy
3441 (package
3442 (name "python-numpy")
8e5fbd5d 3443 (version "1.17.3")
44d10b1f
RW
3444 (source
3445 (origin
3446 (method url-fetch)
3447 (uri (string-append
3448 "https://github.com/numpy/numpy/releases/download/v"
3449 version "/numpy-" version ".tar.gz"))
3450 (sha256
3451 (base32
8e5fbd5d 3452 "1ak9dmjja0q90a7fsxli51ypcwssh8c4pb6f8wkrsnf2xgdk6dy9"))))
44d10b1f
RW
3453 (build-system python-build-system)
3454 (inputs
3455 `(("openblas" ,openblas)
3456 ("lapack" ,lapack)))
3457 (native-inputs
3458 `(("python-cython" ,python-cython)
3459 ("python-pytest" ,python-pytest)
3460 ("gfortran" ,gfortran)))
3461 (arguments
3462 `(#:phases
3463 (modify-phases %standard-phases
3464 (add-before 'build 'configure-blas-lapack
3465 (lambda* (#:key inputs #:allow-other-keys)
3466 (call-with-output-file "site.cfg"
3467 (lambda (port)
3468 (format port
3469 "[openblas]
3470libraries = openblas
3471library_dirs = ~a/lib
3472include_dirs = ~a/include
3473
3474# backslash-n to make emacs happy
3475\n[lapack]
3476lapack_libs = lapack
3477library_dirs = ~a/lib
3478include_dirs = ~a/include
3479"
3480 (assoc-ref inputs "openblas")
3481 (assoc-ref inputs "openblas")
3482 (assoc-ref inputs "lapack")
3483 (assoc-ref inputs "lapack"))))
3484 #t))
3485 (add-before 'build 'fix-executable-paths
3486 (lambda* (#:key inputs #:allow-other-keys)
3487 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
3488 ;; instead of /bin/sh.
3489 (substitute* "numpy/distutils/exec_command.py"
3490 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
3491 (string-append match-start (assoc-ref inputs "bash") match-end)))
3492 ;; Use "gcc" executable, not "cc".
3493 (substitute* "numpy/distutils/system_info.py"
3494 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3495 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3496 #t))
3497 ;; Tests can only be run after the library has been installed and not
3498 ;; within the source directory.
3499 (delete 'check)
3500 (add-after 'install 'check
3501 (lambda* (#:key outputs inputs #:allow-other-keys)
3502 ;; Make installed package available for running the tests
3503 (add-installed-pythonpath inputs outputs)
3504 ;; Make sure "f2py" etc is found.
3505 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
3506 ":" (getenv "PATH")))
3507 (with-directory-excursion "/tmp"
3508 (invoke "python" "-c"
3509 "import numpy; numpy.test(verbose=2)")))))))
28191bdc 3510 (home-page "https://numpy.org")
44d10b1f
RW
3511 (synopsis "Fundamental package for scientific computing with Python")
3512 (description "NumPy is the fundamental package for scientific computing
3513with Python. It contains among other things: a powerful N-dimensional array
3514object, sophisticated (broadcasting) functions, tools for integrating C/C++
3515and Fortran code, useful linear algebra, Fourier transform, and random number
3516capabilities.")
adb396ea 3517 (properties `((python2-variant . ,(delay python2-numpy))))
44d10b1f
RW
3518 (license license:bsd-3)))
3519
adb396ea 3520;; Numpy 1.16.x are the last versions that support Python 2.
44d10b1f 3521(define-public python2-numpy
adb396ea
MB
3522 (let ((numpy (package-with-python2
3523 (strip-python2-variant python-numpy))))
3524 (package/inherit
3525 numpy
3526 (version "1.16.5")
3527 (source (origin
3528 (method url-fetch)
3529 (uri (string-append
3530 "https://github.com/numpy/numpy/releases/download/v"
3531 version "/numpy-" version ".tar.gz"))
3532 (sha256
3533 (base32
3534 "0lg1cycxzi4rvvrd5zxinpdz0ni792fpx6xjd75z1923zcac8qrb")))))))
44d10b1f
RW
3535
3536;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
3537;; interest only for legacy code going back to NumPy's predecessor
3538;; Numeric.
3539(define-public python2-numpy-1.8
3540 (package (inherit python2-numpy)
3541 (version "1.8.2")
3542 (source
3543 (origin
6b61fc47
EF
3544 (method git-fetch)
3545 (uri (git-reference
3546 (url "https://github.com/numpy/numpy")
3547 (commit (string-append "v" version))))
3548 (file-name (git-file-name "numpy" version))
44d10b1f
RW
3549 (sha256
3550 (base32
6b61fc47 3551 "0ikgi15rsqwbkfsjjxrwh40lqyal2wvyp3923y6w6ch3dcr82sfk"))))
44d10b1f
RW
3552 (arguments
3553 (substitute-keyword-arguments (package-arguments python2-numpy)
3554 ((#:phases phases)
3555 `(modify-phases ,phases
3556 (replace 'configure-blas-lapack
3557 (lambda* (#:key inputs #:allow-other-keys)
3558 (call-with-output-file "site.cfg"
3559 (lambda (port)
3560 (format port
3561 "[openblas]
3562libraries = openblas,lapack
3563library_dirs = ~a/lib:~a/lib
3564include_dirs = ~a/include:~a/include
3565"
3566 (assoc-ref inputs "openblas")
3567 (assoc-ref inputs "lapack")
3568 (assoc-ref inputs "openblas")
3569 (assoc-ref inputs "lapack"))))
3570 #t))))))
3571 (native-inputs
3572 `(("python2-nose" ,python2-nose)))
3573 (description "NumPy is the fundamental package for scientific computing
3574with Python. It contains among other things: a powerful N-dimensional array
3575object, sophisticated (broadcasting) functions, tools for integrating C/C++
3576and Fortran code, useful linear algebra, Fourier transform, and random number
3577capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
3578that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
3579Numeric.")
3580 (license license:bsd-3)))
3581
3582(define-public python-munch
3583 (package
3584 (name "python-munch")
3585 (version "2.0.4")
3586 (source
3587 (origin
3588 (method url-fetch)
3589 (uri (pypi-uri "munch" version))
3590 (sha256
3591 (base32
3592 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3593 (build-system python-build-system)
3594 (home-page "https://github.com/Infinidat/munch")
3595 (synopsis "Dot-accessible dictionary")
3596 (description "Munch is a dot-accessible dictionary similar to JavaScript
3597objects.")
3598 (license license:expat)))
3599
3600(define-public python2-munch
3601 (package-with-python2 python-munch))
3602
3603(define-public python-colormath
3604 (package
3605 (name "python-colormath")
3606 (version "3.0.0")
3607 (source
3608 (origin
3609 (method url-fetch)
3610 (uri (pypi-uri "colormath" version))
3611 (sha256
3612 (base32
3613 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3614 (build-system python-build-system)
3615 (propagated-inputs
3616 `(("python-networkx" ,python-networkx)
3617 ("python-numpy" ,python-numpy)))
3618 (home-page "https://github.com/gtaylor/python-colormath")
3619 (synopsis "Color math and conversion library")
3620 (description
3621 "This is a Python library for color math and conversions.")
3622 (license license:bsd-3)))
3623
3624(define-public python2-colormath
3625 (package-with-python2 python-colormath))
3626
3627(define-public python-spectra
3628 (package
3629 (name "python-spectra")
3630 (version "0.0.11")
3631 (source
3632 (origin
3633 (method url-fetch)
3634 (uri (pypi-uri "spectra" version))
3635 (sha256
3636 (base32
3637 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3638 (build-system python-build-system)
3639 (arguments
3640 `(#:phases
3641 (modify-phases %standard-phases
3642 (replace 'check
38ec0f6a 3643 (lambda _ (invoke "nosetests" "-v"))))))
44d10b1f
RW
3644 (propagated-inputs
3645 `(("python-colormath" ,python-colormath)))
3646 (native-inputs
3647 `(("python-nose" ,python-nose)))
3648 (home-page "https://github.com/jsvine/spectra")
3649 (synopsis "Color scales and color conversion")
3650 (description
3651 "This package provides a Python library intended to make color math,
3652color scales, and color space conversion easy. It has support for:
3653
3654@enumerate
3655@item Color scales
3656@item Color ranges
3657@item Color blending
3658@item Brightening/darkening colors
3659@item Saturating/desaturating colors
3660@item Conversion to/from multiple color spaces.
3661@end enumerate\n")
3662 (license license:expat)))
3663
3664(define-public python2-spectra
3665 (package-with-python2 python-spectra))
3666
3667(define-public python-numpy-documentation
3668 (package
3669 (name "python-numpy-documentation")
3670 (version (package-version python-numpy))
3671 (source (package-source python-numpy))
3672 (build-system python-build-system)
3673 (native-inputs
3674 `(("python-matplotlib" ,python-matplotlib)
3675 ("python-numpy" ,python-numpy)
3676 ("pkg-config" ,pkg-config)
3677 ("python-sphinx" ,python-sphinx)
3678 ("python-numpydoc" ,python-numpydoc)
f75aa97f 3679 ("texlive" ,(texlive-union (list texlive-fonts-cm-super
44d10b1f
RW
3680 texlive-fonts-ec
3681 texlive-generic-ifxetex
3682 texlive-generic-pdftex
f75aa97f 3683 texlive-amsfonts
44d10b1f
RW
3684 texlive-latex-capt-of
3685 texlive-latex-cmap
3686 texlive-latex-environ
3687 texlive-latex-eqparbox
3688 texlive-latex-etoolbox
3689 texlive-latex-expdlist
3690 texlive-latex-fancyhdr
3691 texlive-latex-fancyvrb
3692 texlive-latex-fncychap
3693 texlive-latex-float
3694 texlive-latex-framed
3695 texlive-latex-geometry
3696 texlive-latex-graphics
3697 texlive-latex-hyperref
3698 texlive-latex-mdwtools
3699 texlive-latex-multirow
3700 texlive-latex-needspace
3701 texlive-latex-oberdiek
3702 texlive-latex-parskip
3703 texlive-latex-preview
3704 texlive-latex-tabulary
3705 texlive-latex-threeparttable
3706 texlive-latex-titlesec
3707 texlive-latex-trimspaces
3708 texlive-latex-ucs
3709 texlive-latex-upquote
3710 texlive-latex-url
3711 texlive-latex-varwidth
3712 texlive-latex-wrapfig)))
3713 ("texinfo" ,texinfo)
3714 ("perl" ,perl)
3715 ("scipy-sphinx-theme"
3716 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3717 (method git-fetch)
3718 (uri (git-reference
3719 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3720 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3721 (sha256
3722 (base32
3723 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3724 ,@(package-native-inputs python-numpy)))
3725 (arguments
3726 `(#:tests? #f ; we're only generating the documentation
3727 #:phases
3728 (modify-phases %standard-phases
3729 (delete 'build)
3730 (replace 'install
3731 (lambda* (#:key inputs outputs #:allow-other-keys)
3732 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3733 (doc (string-append
3734 data "/doc/" ,name "-"
3735 ,(package-version python-numpy)))
3736 (info-reader (string-append data "/info"))
3737 (html (string-append doc "/html"))
3738 (scipy-sphinx-theme "scipy-sphinx-theme")
3739 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3740 (pyver ,(string-append "PYVER=")))
3741
3742 ;; FIXME: this is needed to for texlive-union to generate
3743 ;; fonts, which are not found.
3744 (setenv "HOME" "/tmp")
3745
3746 (with-directory-excursion "doc"
3747 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3748 (mkdir-p html)
4fc898da
RW
3749 (invoke "make" "html" pyver)
3750 (invoke "make" "latex" "PAPER=a4" pyver)
3751 (invoke "make" "-C" "build/latex"
44d10b1f
RW
3752 "all-pdf" "PAPER=a4" pyver)
3753 ;; FIXME: Generation of the info file fails.
4fc898da 3754 ;; (invoke "make" "info" pyver)
44d10b1f
RW
3755 ;; (mkdir-p info)
3756 ;; (copy-file "build/texinfo/numpy.info"
3757 ;; (string-append info "/numpy.info"))
3758 (for-each (lambda (file)
3759 (copy-file (string-append "build/latex" file)
3760 (string-append doc file)))
3761 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3762 (with-directory-excursion "build/html"
3763 (for-each (lambda (file)
3764 (let* ((dir (dirname file))
3765 (tgt-dir (string-append html "/" dir)))
3766 (unless (equal? "." dir)
3767 (mkdir-p tgt-dir))
3768 (install-file file html)))
3769 (find-files "." ".*")))))
3770 #t)))))
3771 (home-page (package-home-page python-numpy))
3772 (synopsis "Documentation for the python-numpy package")
3773 (description (package-description python-numpy))
3774 (license (package-license python-numpy))))
3775
3776(define-public python2-numpy-documentation
3777 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3778 (package
3779 (inherit numpy-documentation)
3780 (native-inputs `(("python2-functools32" ,python2-functools32)
3781 ,@(package-native-inputs numpy-documentation))))))
3782
3783(define-public python-pygit2
3784 (package
3785 (name "python-pygit2")
7154f5ef 3786 (version "1.1.0")
44d10b1f
RW
3787 (source
3788 (origin
3789 (method url-fetch)
3790 (uri (pypi-uri "pygit2" version))
3791 (sha256
7154f5ef 3792 (base32 "1hs0pqqzn1yjxqk86nq7p0lvsklwnlyi5xwyzr7d5nrs19dmsjbg"))))
44d10b1f
RW
3793 (build-system python-build-system)
3794 (arguments
c3ecab0d 3795 '(#:tests? #f)) ; tests don't run correctly in our environment
44d10b1f 3796 (propagated-inputs
7154f5ef 3797 `(("python-cached-property" ,python-cached-property)
44d10b1f 3798 ("python-cffi" ,python-cffi)
7154f5ef 3799 ("libgit2" ,libgit2)))
44d10b1f
RW
3800 (native-inputs
3801 `(("python-pytest" ,python-pytest)))
3802 (home-page "https://github.com/libgit2/pygit2")
3803 (synopsis "Python bindings for libgit2")
3804 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3805library, libgit2 implements Git plumbing.")
3806 ;; GPL2.0 only, with linking exception.
3807 (license license:gpl2)))
3808
44d10b1f
RW
3809(define-public python-pyparsing
3810 (package
3811 (name "python-pyparsing")
6d3cff5a 3812 (version "2.3.1")
44d10b1f
RW
3813 (source
3814 (origin
3815 (method url-fetch)
3816 (uri (pypi-uri "pyparsing" version))
3817 (sha256
6d3cff5a 3818 (base32 "0yk6xl885b91dmlhlsap7x78hk2rdr879fln9anbq6k4ca42djb6"))))
44d10b1f
RW
3819 (build-system python-build-system)
3820 (outputs '("out" "doc"))
3821 (arguments
3822 `(#:tests? #f ; no test target
3823 #:phases
3824 (modify-phases %standard-phases
3825 (add-after 'install 'install-doc
3826 (lambda* (#:key outputs #:allow-other-keys)
3827 (let* ((doc (string-append (assoc-ref outputs "doc")
3828 "/share/doc/" ,name "-" ,version))
3829 (html-doc (string-append doc "/html"))
3830 (examples (string-append doc "/examples")))
3831 (mkdir-p html-doc)
3832 (mkdir-p examples)
3833 (for-each
3834 (lambda (dir tgt)
3835 (map (lambda (file)
3836 (install-file file tgt))
3837 (find-files dir ".*")))
3838 (list "docs" "htmldoc" "examples")
3839 (list doc html-doc examples))
3840 #t))))))
3841 (home-page "https://github.com/pyparsing/pyparsing")
3842 (synopsis "Python parsing class library")
3843 (description
3844 "The pyparsing module is an alternative approach to creating and
3845executing simple grammars, vs. the traditional lex/yacc approach, or the use
3846of regular expressions. The pyparsing module provides a library of classes
3847that client code uses to construct the grammar directly in Python code.")
3848 (license license:expat)))
3849
3850(define-public python2-pyparsing
3851 (package-with-python2 python-pyparsing))
3852
3853(define-public python-numpydoc
3854 (package
3855 (name "python-numpydoc")
3856 (version "0.8.0")
3857 (source
3858 (origin
3859 (method url-fetch)
3860 (uri (pypi-uri "numpydoc" version))
3861 (sha256
3862 (base32
3863 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
3864 (build-system python-build-system)
3865 (propagated-inputs
3866 `(("python-sphinx" ,python-sphinx)))
3867 (native-inputs
3868 `(("python-nose" ,python-nose)))
e85af137 3869 (home-page "https://pypi.org/project/numpydoc/")
44d10b1f
RW
3870 (synopsis
3871 "Numpy's Sphinx extensions")
3872 (description
3873 "Sphinx extension to support docstrings in Numpy format.")
3874 (license license:bsd-2)))
3875
3876(define-public python2-numpydoc
3877 (package-with-python2 python-numpydoc))
3878
3879(define-public python-numexpr
3880 (package
3881 (name "python-numexpr")
3882 (version "2.6.5")
3883 (source
3884 (origin
3885 (method url-fetch)
3886 (uri (pypi-uri "numexpr" version))
3887 (sha256
3888 (base32
3889 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3890 (build-system python-build-system)
3891 (arguments `(#:tests? #f)) ; no tests included
3892 (propagated-inputs
3893 `(("python-numpy" ,python-numpy)))
3894 (home-page "https://github.com/pydata/numexpr")
3895 (synopsis "Fast numerical expression evaluator for NumPy")
3896 (description
3897 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3898expressions that operate on arrays are accelerated and use less memory than
3899doing the same calculation in Python. In addition, its multi-threaded
3900capabilities can make use of all your cores, which may accelerate
3901computations, most specially if they are not memory-bounded (e.g. those using
3902transcendental functions).")
3903 (license license:expat)))
3904
3905(define-public python2-numexpr
3906 (package-with-python2 python-numexpr))
3907
3908(define-public python-cycler
3909 (package
3910 (name "python-cycler")
3911 (version "0.10.0")
3912 (source (origin
3913 (method url-fetch)
3914 (uri (pypi-uri "cycler" version))
3915 (sha256
3916 (base32
3917 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3918 (build-system python-build-system)
3919 (arguments
3920 ;; XXX: The current version requires 'coveralls' which we don't have.
3921 ;; Enable this for the next release which uses 'python-pytest'.
3922 '(#:tests? #f))
3923 (propagated-inputs
3924 `(("python-six" ,python-six)))
3925 (home-page "http://matplotlib.org/cycler/")
3926 (synopsis "Composable keyword argument iterator")
3927 (description
3928 "When using @code{matplotlib} and plotting more than one line, it is
3929common to want to be able to want to be able to cycle over one or more artist
3930styles; but the plotting logic can quickly become involved.
3931To address this and enable easy cycling over arbitrary @code{kwargs}, the
3932@code{Cycler} class was developed.")
3933 (license license:bsd-3)))
3934
3935(define-public python2-cycler
3936 (package-with-python2 python-cycler))
3937
3938(define-public python-colorspacious
3939 (package
3940 (name "python-colorspacious")
53a3ebed 3941 (version "1.1.2")
44d10b1f 3942 (source
dee92e65
TGR
3943 (origin
3944 (method git-fetch)
3945 (uri (git-reference
3946 (url "https://github.com/njsmith/colorspacious.git")
3947 (commit (string-append "v" version))))
3948 (file-name (git-file-name name version))
3949 (sha256
53a3ebed 3950 (base32 "0x7nkphr6g5ql5fvgss8l56rgiyjgh6fm8zzs73i94ci9wzlm63w"))))
44d10b1f
RW
3951 (build-system python-build-system)
3952 (propagated-inputs
3953 `(("python-numpy" ,python-numpy)))
3954 (native-inputs
3955 `(("python-nose" ,python-nose)))
3956 (arguments
3957 `(#:phases
3958 (modify-phases %standard-phases
3959 (replace 'check
3960 (lambda _
c988afda 3961 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
44d10b1f
RW
3962 (home-page "https://github.com/njsmith/colorspacious")
3963 (synopsis "Python library for colorspace conversions")
3964 (description "@code{colorspacious} is a Python library that lets you
3965convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3966 (license license:expat)))
3967
3968(define-public python2-colorspacious
3969 (package-with-python2 python-colorspacious))
3970
3971(define-public python-matplotlib
3972 (package
3973 (name "python-matplotlib")
9e7cb2f1 3974 (version "3.1.2")
44d10b1f
RW
3975 (source
3976 (origin
3977 (method url-fetch)
3978 (uri (pypi-uri "matplotlib" version))
3979 (sha256
3980 (base32
9e7cb2f1 3981 "1nmshfqh7wyg15i16hx1yiylcvzkws29ivn66n3i0wyqwcpjr3lf"))))
44d10b1f
RW
3982 (build-system python-build-system)
3983 (propagated-inputs ; the following packages are all needed at run time
3984 `(("python-cycler" ,python-cycler)
3985 ("python-kiwisolver" ,python-kiwisolver)
3986 ("python-pyparsing" ,python-pyparsing)
3987 ("python-pygobject" ,python-pygobject)
3988 ("gobject-introspection" ,gobject-introspection)
3989 ("python-tkinter" ,python "tk")
3990 ("python-dateutil" ,python-dateutil)
3991 ("python-numpy" ,python-numpy)
3992 ("python-pillow" ,python-pillow)
3993 ("python-pytz" ,python-pytz)
3994 ("python-six" ,python-six)
44d10b1f
RW
3995 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3996 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3997 ;; object. For this reason we need to import both libraries.
5ea654cf 3998 ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi
44d10b1f 3999 ("python-pycairo" ,python-pycairo)
44d10b1f
RW
4000 ("python-cairocffi" ,python-cairocffi)))
4001 (inputs
4002 `(("libpng" ,libpng)
4003 ("imagemagick" ,imagemagick)
4004 ("freetype" ,freetype)
4005 ("cairo" ,cairo)
4006 ("glib" ,glib)
4007 ;; FIXME: Add backends when available.
4008 ;("python-wxpython" ,python-wxpython)
4009 ("tcl" ,tcl)
4010 ("tk" ,tk)))
4011 (native-inputs
4012 `(("pkg-config" ,pkg-config)
5ea654cf
RW
4013 ("python-pytest" ,python-pytest)
4014 ("python-mock" ,python-mock)
4015 ("unzip" ,unzip)
4016 ("jquery-ui"
4017 ,(origin
4018 (method url-fetch)
4019 (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip")
4020 (sha256
4021 (base32
4022 "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq"))))))
44d10b1f
RW
4023 (arguments
4024 `(#:phases
4025 (modify-phases %standard-phases
5ea654cf
RW
4026 ;; XXX We disable all image comparison tests because we're using a
4027 ;; newer version of FreeType than matplotlib expects. This leads to
4028 ;; minor differences throughout the tests.
4029 (add-after 'unpack 'fix-and-disable-failing-tests
4030 (lambda _
4031 (substitute* (append (find-files "lib/matplotlib/tests/"
4032 "test_.*\\.py$")
4033 (find-files "lib/mpl_toolkits/tests"
4034 "test_.*\\.py$"))
4035 (("^from matplotlib" match)
4036 (string-append "import pytest\n" match))
4037 (("( *)@image_comparison" match indent)
4038 (string-append indent
4039 "@pytest.mark.skip(reason=\"unknown minor image differences\")\n"
4040 match)))
4041 (substitute* "lib/matplotlib/tests/test_animation.py"
4042 (("/bin/sh") (which "sh")))
4043 (for-each delete-file
4044 ;; test_normal_axes, test_get_tightbbox_polar
4045 '("lib/matplotlib/tests/test_axes.py"
9e7cb2f1
RW
4046 ;; We don't use the webagg backend and this test forces it.
4047 "lib/matplotlib/tests/test_backend_webagg.py"
5ea654cf
RW
4048 ;; test_outward_ticks
4049 "lib/matplotlib/tests/test_tightlayout.py"
9e7cb2f1
RW
4050 ;; test_hidden_axes fails with minor extent
4051 ;; differences, possibly due to the use of a
4052 ;; different version of FreeType.
4053 "lib/matplotlib/tests/test_constrainedlayout.py"
5ea654cf
RW
4054 ;; Fontconfig returns no fonts.
4055 "lib/matplotlib/tests/test_font_manager.py"))
4056 #t))
4057 (add-before 'install 'install-jquery-ui
4058 (lambda* (#:key outputs inputs #:allow-other-keys)
4059 (let ((dir (string-append (assoc-ref outputs "out")
4060 "/lib/python3.7/site-packages/matplotlib/backends/web_backend/")))
4061 (mkdir-p dir)
4062 (invoke "unzip"
4063 (assoc-ref inputs "jquery-ui")
4064 "-d" dir))
4065 #t))
c09f598d 4066 (replace 'check
5ea654cf
RW
4067 (lambda* (#:key outputs inputs #:allow-other-keys)
4068 (add-installed-pythonpath inputs outputs)
4069 (invoke "python" "tests.py" "-v"
9e7cb2f1 4070 "-m" "not network and not webagg")))
44d10b1f
RW
4071 (add-before 'build 'configure-environment
4072 (lambda* (#:key outputs inputs #:allow-other-keys)
34c2a16b
RW
4073 (let ((cairo (assoc-ref inputs "cairo")))
4074 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
44d10b1f 4075 ;; has not effect.
34c2a16b 4076 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
44d10b1f
RW
4077 (setenv "HOME" (getcwd))
4078 (call-with-output-file "setup.cfg"
4079 (lambda (port)
4080 (format port "[directories]~%
4081basedirlist = ~a,~a~%
5ea654cf
RW
4082[packages]~%
4083tests = True~%"
44d10b1f
RW
4084 (assoc-ref inputs "tcl")
4085 (assoc-ref inputs "tk")))))
4086 #t)))))
339b5828 4087 (home-page "https://matplotlib.org/")
44d10b1f
RW
4088 (synopsis "2D plotting library for Python")
4089 (description
4090 "Matplotlib is a Python 2D plotting library which produces publication
4091quality figures in a variety of hardcopy formats and interactive environments
4092across platforms. Matplotlib can be used in Python scripts, the python and
4093ipython shell, web application servers, and six graphical user interface
4094toolkits.")
4095 (license license:psfl)
4096 (properties `((python2-variant . ,(delay python2-matplotlib))))))
4097
4098(define-public python2-matplotlib
4099 (let ((matplotlib (package-with-python2
4100 (strip-python2-variant python-matplotlib))))
4101 (package (inherit matplotlib)
7380df73 4102 (version "2.2.4")
5ea654cf
RW
4103 (source
4104 (origin
4105 (method url-fetch)
4106 (uri (pypi-uri "matplotlib" version))
4107 (sha256
4108 (base32
7380df73 4109 "09i1gnrra1590brc1f8d5rh2zvnknmfgzp613ab0462qkrwj15h2"))))
5d484f42
EF
4110 (arguments
4111 (substitute-keyword-arguments (package-arguments matplotlib)
4112 ((#:phases phases)
4113 `(modify-phases ,phases
66a3c2db
EF
4114 (replace 'install-jquery-ui
4115 (lambda* (#:key outputs inputs #:allow-other-keys)
4116 (let ((dir (string-append (assoc-ref outputs "out")
4117 "/lib/python2.7/site-packages/"
4118 "matplotlib/backends/web_backend/")))
4119 (mkdir-p dir)
4120 (invoke "unzip"
4121 (assoc-ref inputs "jquery-ui")
4122 "-d" dir))
4123 #t))
38a404d5 4124 (delete 'fix-and-disable-failing-tests)
5d484f42 4125 (delete 'check))))) ; These tests weren't run the the past.
44d10b1f
RW
4126 ;; Make sure to use special packages for Python 2 instead
4127 ;; of those automatically rewritten by package-with-python2.
4128 (propagated-inputs
4129 `(("python2-pycairo" ,python2-pycairo)
4130 ("python2-backports-functools-lru-cache"
4131 ,python2-backports-functools-lru-cache)
4132 ("python2-functools32" ,python2-functools32)
4133 ("python2-pygobject-2" ,python2-pygobject-2)
4134 ("python2-subprocess32" ,python2-subprocess32)
4135 ("python2-tkinter" ,python-2 "tk")
4136 ,@(fold alist-delete (package-propagated-inputs matplotlib)
4137 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
4138
4139(define-public python-matplotlib-documentation
4140 (package
4141 (name "python-matplotlib-documentation")
4142 (version (package-version python-matplotlib))
4143 (source (package-source python-matplotlib))
4144 (build-system python-build-system)
4145 (native-inputs
4146 `(("python-matplotlib" ,python-matplotlib)
4147 ("python-colorspacious" ,python-colorspacious)
4148 ("python-sphinx" ,python-sphinx)
5ad0a452 4149 ("python-sphinx-copybutton" ,python-sphinx-copybutton)
44d10b1f
RW
4150 ("python-sphinx-gallery" ,python-sphinx-gallery)
4151 ("python-numpydoc" ,python-numpydoc)
4152 ("python-ipython" ,python-ipython)
e7a53914 4153 ("python-ipykernel" ,python-ipykernel)
44d10b1f
RW
4154 ("python-mock" ,python-mock)
4155 ("graphviz" ,graphviz)
f75aa97f 4156 ("texlive" ,(texlive-union (list texlive-amsfonts
e7a53914
RW
4157 texlive-latex-amsmath
4158 texlive-latex-enumitem
4159 texlive-latex-expdlist
4160 texlive-latex-geometry
4161 texlive-latex-preview
4162 texlive-latex-type1cm
4163 texlive-latex-ucs
4164
4165 texlive-generic-pdftex
4166
e7a53914
RW
4167 texlive-fonts-ec
4168 texlive-fonts-adobe-times
4169 texlive-fonts-txfonts)))
44d10b1f
RW
4170 ("texinfo" ,texinfo)
4171 ,@(package-native-inputs python-matplotlib)))
4172 (arguments
4173 `(#:tests? #f ; we're only generating documentation
4174 #:phases
4175 (modify-phases %standard-phases
5ea654cf
RW
4176 ;; The tests in python-matplotlib are run after the install phase, so
4177 ;; we need to delete the extra phase here.
4178 (delete 'check)
44d10b1f
RW
4179 (replace 'build
4180 (lambda _
4181 (chdir "doc")
e7a53914
RW
4182 (setenv "PYTHONPATH"
4183 (string-append (getenv "PYTHONPATH")
4184 ":" (getcwd) "/../examples/units"))
44d10b1f 4185 (substitute* "conf.py"
e7a53914
RW
4186 ;; Don't use git.
4187 (("^SHA = check_output.*")
4188 (string-append "SHA = \"" ,version "\"\n"))
4189 ;; Don't fetch intersphinx files from the Internet
4190 (("^explicit_order_folders" m)
4191 (string-append "intersphinx_mapping = {}\n" m))
4192 (("'sphinx.ext.intersphinx',") "")
4193 ;; Disable URL embedding which requires internet access.
4194 (("'https://docs.scipy.org/doc/numpy'") "None")
4195 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
4196 (invoke "make"
4197 "SPHINXBUILD=sphinx-build"
4198 "SPHINXOPTS=" ; don't abort on warnings
4199 "html" "texinfo")))
44d10b1f
RW
4200 (replace 'install
4201 (lambda* (#:key inputs outputs #:allow-other-keys)
4202 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4203 (doc (string-append data "/doc/python-matplotlib-" ,version))
4204 (info (string-append data "/info"))
4205 (html (string-append doc "/html")))
4206 (mkdir-p html)
4207 (mkdir-p info)
4208 (copy-recursively "build/html" html)
4209 (symlink (string-append html "/_images")
4210 (string-append info "/matplotlib-figures"))
4211 (with-directory-excursion "build/texinfo"
4212 (substitute* "matplotlib.texi"
4213 (("@image\\{([^,]*)" all file)
4214 (string-append "@image{matplotlib-figures/" file)))
4215 (symlink (string-append html "/_images")
4216 "./matplotlib-figures")
e7a53914
RW
4217 (invoke "makeinfo" "--no-split"
4218 "-o" "matplotlib.info" "matplotlib.texi"))
4219 (install-file "build/texinfo/matplotlib.info" info))
44d10b1f
RW
4220 #t)))))
4221 (home-page (package-home-page python-matplotlib))
4222 (synopsis "Documentation for the python-matplotlib package")
4223 (description (package-description python-matplotlib))
4224 (license (package-license python-matplotlib))))
4225
4226(define-public python2-matplotlib-documentation
5ad0a452
RW
4227 (let ((parent (package-with-python2 python-matplotlib-documentation)))
4228 (package
4229 (inherit parent)
4230 (native-inputs
4231 (alist-delete "python-sphinx-copybutton"
4232 (package-native-inputs parent))))))
44d10b1f 4233
55dae98f
RW
4234(define-public python-matplotlib-venn
4235 (package
4236 (name "python-matplotlib-venn")
4237 (version "0.11.5")
4238 (source
4239 (origin
4240 (method url-fetch)
4241 (uri (pypi-uri "matplotlib-venn" version ".zip"))
4242 (sha256
4243 (base32
4244 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
4245 (build-system python-build-system)
4246 (arguments '(#:tests? #f)) ; tests are not included
4247 (propagated-inputs
4248 `(("python-matplotlib" ,python-matplotlib)
4249 ("python-numpy" ,python-numpy)
4250 ("python-scipy" ,python-scipy)))
4251 (native-inputs
4252 `(("unzip" ,unzip)))
4253 (home-page "https://github.com/konstantint/matplotlib-venn")
4254 (synopsis "Plot area-proportional Venn diagrams")
4255 (description
4256 "This package provides tools for plotting area-proportional two- and
4257three-way Venn diagrams in @code{matplotlib}.")
4258 (license license:expat)))
4259
44d10b1f
RW
4260(define-public python2-pysnptools
4261 (package
4262 (name "python2-pysnptools")
5d1ade85 4263 (version "0.3.13")
44d10b1f
RW
4264 (source
4265 (origin
4266 (method url-fetch)
5d1ade85 4267 (uri (pypi-uri "pysnptools" version))
44d10b1f
RW
4268 (sha256
4269 (base32
5d1ade85 4270 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
44d10b1f
RW
4271 (build-system python-build-system)
4272 (arguments
5d1ade85
RW
4273 `(#:python ,python-2 ; only Python 2.7 is supported
4274 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
44d10b1f
RW
4275 (propagated-inputs
4276 `(("python2-numpy" ,python2-numpy)
4277 ("python2-scipy" ,python2-scipy)
4278 ("python2-pandas" ,python2-pandas)))
44d10b1f 4279 (native-inputs
5d1ade85 4280 `(("python2-cython" ,python2-cython)))
1b66989b 4281 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
44d10b1f
RW
4282 (synopsis "Library for reading and manipulating genetic data")
4283 (description
4284 "PySnpTools is a library for reading and manipulating genetic data. It
4285can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4286those files. It can also efficiently manipulate ranges of integers using set
4287operators such as union, intersection, and difference.")
4288 (license license:asl2.0)))
4289
44d10b1f
RW
4290(define-public python-socksipy-branch
4291 (package
4292 (name "python-socksipy-branch")
4293 (version "1.01")
4294 (source
4295 (origin
4296 (method url-fetch)
4297 (uri (pypi-uri "SocksiPy-branch" version))
4298 (sha256
4299 (base32
4300 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4301 (build-system python-build-system)
4302 (arguments
4303 `(#:tests? #f)) ; There are no tests
4304 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4305 (synopsis "Python SOCKS module")
4306 (description
4307 "SocksiPy - A Python SOCKS client module. It provides a
4308socket-like interface that supports connections to any TCP
4309service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4310The original version was developed by Dan Haim, this is a
4311branch created by Mario Vilas to address some open issues,
4312as the original project seems to have been abandoned circa 2007.")
4313 (license license:bsd-3)))
4314
4315(define-public python2-socksipy-branch
4316 (package-with-python2 python-socksipy-branch))
4317
6fcceb23
AG
4318(define-public python-socksipychain
4319 (package
4320 (name "python-socksipychain")
d97cdff1 4321 (version "2.1.0")
6fcceb23
AG
4322 (source
4323 (origin
4324 (method git-fetch)
4325 (uri (git-reference
4326 (url "https://github.com/pagekite/PySocksipyChain.git")
4327 (commit (string-append "v" version))))
4328 (file-name (git-file-name name version))
4329 (sha256
4330 (base32
d97cdff1 4331 "0idm9a050rd2kbgbz2sk9ib9589kj4xh1xdnggs6xbq2v2y8f6zn"))))
6fcceb23
AG
4332 (build-system python-build-system)
4333 (arguments
4334 `(#:tests? #f)) ; Tests try to access the network.
4335 (home-page "http://pagekite.net/wiki/Floss/PySocksipyChain/")
4336 (synopsis "Python SOCKS module with chained proxies support")
4337 (description
4338 "SocksiPyChain is a modified version of the SocksiPy SOCKS module, which
4339adds support for arbitrary chaining of proxy servers and various modes of
4340TLS/SSL encryption. It was developed for use in PageKite, and also includes
4341a simple netcat replacement with chaining support.")
4342 (license license:bsd-3)))
4343
44d10b1f
RW
4344(define-public python-pycodestyle
4345 (package
4346 (name "python-pycodestyle")
d16ef28b 4347 (version "2.5.0")
44d10b1f 4348 (source
ba88eea2
RW
4349 (origin
4350 (method url-fetch)
4351 (uri (pypi-uri "pycodestyle" version))
4352 (sha256
4353 (base32
d16ef28b 4354 "0v4prb05n21bm8650v0a01k1nyqjdmkrsm3zycfxh2j5k9n962p4"))))
44d10b1f
RW
4355 (build-system python-build-system)
4356 (home-page "https://pycodestyle.readthedocs.io/")
4357 (synopsis "Python style guide checker")
4358 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4359Python code against some of the style conventions in
4360@url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4361 (license license:expat)))
4362
4363(define-public python2-pycodestyle
4364 (package-with-python2 python-pycodestyle))
4365
4366(define-public python-multidict
4367 (package
4368 (name "python-multidict")
4369 (version "4.2.0")
4370 (source
4371 (origin
4372 (method url-fetch)
4373 (uri (pypi-uri "multidict" version))
4374 (sha256
4375 (base32
4376 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
4377 (build-system python-build-system)
4378 (native-inputs
4379 `(("python-pytest" ,python-pytest)
4380 ("python-pytest-runner" ,python-pytest-runner)))
4381 (home-page "https://github.com/aio-libs/multidict/")
4382 (synopsis "Multidict implementation")
4383 (description "Multidict is dict-like collection of key-value pairs
4384where key might be occurred more than once in the container.")
4385 (license license:asl2.0)))
4386
4387(define-public python-orderedmultidict
4388 (package
4389 (name "python-orderedmultidict")
4390 (version "0.7.11")
4391 (source
4392 (origin
4393 (method url-fetch)
4394 (uri (pypi-uri "orderedmultidict" version))
4395 (sha256
4396 (base32
4397 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4398 (build-system python-build-system)
4399 (arguments
4400 `(#:phases
4401 (modify-phases %standard-phases
4402 (add-after 'unpack 'fix-tests
4403 (lambda _
4404 ;; The package uses nosetest for running the tests.
4405 ;; Adding this initfile allows to run the test suite
4406 ;; without requiring nosetest.
d1c4f329
RW
4407 (with-output-to-file "tests/__init__.py" newline)
4408 #t)))))
44d10b1f
RW
4409 (propagated-inputs
4410 `(("python-six" ,python-six)))
4411 (native-inputs
4412 `(("python-pycodestyle" ,python-pycodestyle)))
4413 (home-page "https://github.com/gruns/orderedmultidict")
4414 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4415 (description "This package contains a library for ordered multivalue
4416dictionaries. A multivalue dictionary is a dictionary that can store
4417multiple values for the same key. An ordered multivalue dictionary is a
4418multivalue dictionary that retains the order of insertions and deletions.")
4419 (license license:unlicense)))
4420
4421(define-public python2-orderedmultidict
4422 (package-with-python2 python-orderedmultidict))
4423
4424(define-public python-autopep8
4425 (package
4426 (name "python-autopep8")
4427 (version "1.3.5")
4428 (source
4429 (origin
4430 (method url-fetch)
4431 (uri (pypi-uri "autopep8" version))
4432 (sha256
4433 (base32
4434 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
4435 (build-system python-build-system)
4436 (propagated-inputs
4437 `(("python-pycodestyle" ,python-pycodestyle)))
4438 (home-page "https://github.com/hhatto/autopep8")
4439 (synopsis "Format Python code according to the PEP 8 style guide")
4440 (description
4441 "@code{autopep8} automatically formats Python code to conform to
4442the PEP 8 style guide. It uses the pycodestyle utility to determine
4443what parts of the code needs to be formatted. @code{autopep8} is
4444capable of fixing most of the formatting issues that can be reported
4445by pycodestyle.")
4446 (license (license:non-copyleft
4447 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4448
4449(define-public python2-autopep8
4450 (package-with-python2 python-autopep8))
4451
4452(define-public python-distutils-extra
4453 (package
4454 (name "python-distutils-extra")
4455 (version "2.38")
4456 (source
4457 (origin
4458 (method url-fetch)
4459 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4460 version "/+download/python-distutils-extra-"
4461 version ".tar.gz"))
4462 (sha256
4463 (base32
4464 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4465 (build-system python-build-system)
4466 (home-page "https://launchpad.net/python-distutils-extra/")
4467 (synopsis "Enhancements to Python's distutils")
4468 (description
4469 "The python-distutils-extra module enables you to easily integrate
4470gettext support, themed icons, and scrollkeeper-based documentation into
4471Python's distutils.")
4472 (license license:gpl2)))
4473
4474(define-public python2-distutils-extra
4475 (package-with-python2 python-distutils-extra))
4476
4477(define-public python2-elib.intl
4478 (package
4479 (name "python2-elib.intl")
4480 (version "0.0.3")
4481 (source
4482 (origin
4483 ;; This project doesn't tag releases or publish tarballs, so we take
4484 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4485 (method git-fetch)
4486 (uri (git-reference
4487 (url "https://github.com/dieterv/elib.intl.git")
4488 (commit "d09997cfef")))
4489 (file-name (string-append name "-" version "-checkout"))
4490 (sha256
4491 (base32
4492 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4493 (build-system python-build-system)
4494 (arguments
4495 ;; incompatible with Python 3 (exception syntax)
4496 `(#:python ,python-2
4497 #:tests? #f))
4498 (home-page "https://github.com/dieterv/elib.intl")
4499 (synopsis "Enhanced internationalization for Python")
4500 (description
4501 "The elib.intl module provides enhanced internationalization (I18N)
4502services for your Python modules and applications.")
4503 (license license:lgpl3+)))
4504
4505(define-public python-olefile
4506 (package
4507 (name "python-olefile")
5bef0f10 4508 (version "0.46")
44d10b1f
RW
4509 (source
4510 (origin
4511 (method url-fetch)
5bef0f10
MB
4512 (uri (string-append "https://github.com/decalage2/olefile/releases/"
4513 "download/v" version "/olefile-" version ".tar.gz"))
44d10b1f
RW
4514 (file-name (string-append name "-" version ".tar.gz"))
4515 (sha256
4516 (base32
5bef0f10 4517 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
44d10b1f 4518 (build-system python-build-system)
5bef0f10 4519 (home-page "https://www.decalage.info/python/olefileio")
44d10b1f
RW
4520 (synopsis "Read and write Microsoft OLE2 files.")
4521 (description
4522 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
4523Storage or Compound Document, Microsoft Office). It is an improved version of
4524the OleFileIO module from PIL, the Python Image Library.")
4525 (license license:bsd-3)))
4526
4527(define-public python2-olefile
4528 (package-with-python2 python-olefile))
4529
4530(define-public python-pillow
4531 (package
4532 (name "python-pillow")
5fbdd917 4533 (version "6.2.1")
44d10b1f
RW
4534 (source
4535 (origin
4536 (method url-fetch)
4537 (uri (pypi-uri "Pillow" version))
4538 (sha256
4539 (base32
5fbdd917 4540 "1c8wkzc58f5wdh006jvmwdk3wxld1xgagcbdvj7iv17qi0m9fkmz"))))
44d10b1f
RW
4541 (build-system python-build-system)
4542 (native-inputs
4543 `(("python-pytest" ,python-pytest)))
4544 (inputs
4545 `(("freetype" ,freetype)
4546 ("lcms" ,lcms)
44d10b1f 4547 ("libjpeg" ,libjpeg)
44d10b1f 4548 ("libtiff" ,libtiff)
0c4e1c5f
EF
4549 ("libwebp" ,libwebp)
4550 ("openjpeg" ,openjpeg)
4551 ("zlib" ,zlib)))
44d10b1f
RW
4552 (propagated-inputs
4553 `(("python-olefile" ,python-olefile)))
4554 (arguments
4555 `(#:phases
4556 (modify-phases %standard-phases
4557 (add-after 'unpack 'patch-ldconfig
4558 (lambda _
4559 (substitute* "setup.py"
4560 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
61b77ff3 4561 (replace 'check
979d8464
EF
4562 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
4563 (if tests?
4564 (begin
4565 (setenv "HOME" (getcwd))
4566 ;; Make installed package available for running the tests.
4567 (add-installed-pythonpath inputs outputs)
4568 (invoke "python" "selftest.py" "--installed")
4569 (invoke "python" "-m" "pytest" "-vv"))
4570 #t))))))
44d10b1f
RW
4571 (home-page "https://python-pillow.org")
4572 (synopsis "Fork of the Python Imaging Library")
4573 (description
4574 "The Python Imaging Library adds image processing capabilities to your
4575Python interpreter. This library provides extensive file format support, an
4576efficient internal representation, and fairly powerful image processing
4577capabilities. The core image library is designed for fast access to data
4578stored in a few basic pixel formats. It should provide a solid foundation for
4579a general image processing tool.")
4580 (license (license:x11-style
4581 "http://www.pythonware.com/products/pil/license.htm"
4582 "The PIL Software License"))))
4583
4584(define-public python2-pillow
4585 (package-with-python2 python-pillow))
4586
4587(define-public python-pycparser
4588 (package
4589 (name "python-pycparser")
c6c0940e 4590 (version "2.19")
44d10b1f
RW
4591 (source
4592 (origin
4593 (method url-fetch)
4594 (uri (pypi-uri "pycparser" version))
4595 (sha256
4596 (base32
c6c0940e 4597 "1cr5dcj9628lkz1qlwq3fv97c25363qppkmcayqvd05dpy573259"))))
44d10b1f
RW
4598 (outputs '("out" "doc"))
4599 (build-system python-build-system)
4600 (native-inputs
4601 `(("pkg-config" ,pkg-config)))
4602 (arguments
4603 `(#:phases
4604 (modify-phases %standard-phases
4605 (replace 'check
4606 (lambda _
4607 (with-directory-excursion "tests"
acb75c03
RW
4608 (invoke "python" "all_tests.py"))
4609 #t))
44d10b1f
RW
4610 (add-after 'install 'install-doc
4611 (lambda* (#:key outputs #:allow-other-keys)
4612 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4613 (doc (string-append data "/doc/" ,name "-" ,version))
4614 (examples (string-append doc "/examples")))
4615 (mkdir-p examples)
4616 (for-each (lambda (file)
4617 (copy-file (string-append "." file)
4618 (string-append doc file)))
4619 '("/README.rst" "/CHANGES" "/LICENSE"))
c6c0940e
MB
4620 (copy-recursively "examples" examples)
4621 #t))))))
44d10b1f
RW
4622 (home-page "https://github.com/eliben/pycparser")
4623 (synopsis "C parser in Python")
4624 (description
4625 "Pycparser is a complete parser of the C language, written in pure Python
4626using the PLY parsing library. It parses C code into an AST and can serve as
4627a front-end for C compilers or analysis tools.")
4628 (license license:bsd-3)))
4629
4630(define-public python2-pycparser
4631 (package-with-python2 python-pycparser))
4632
4633(define-public python-pywavelets
4634 (package
4635 (name "python-pywavelets")
4636 (version "1.0.1")
4637 (home-page "https://github.com/PyWavelets/pywt")
4638 (source (origin
4639 (method url-fetch)
4640 (uri (pypi-uri "PyWavelets" version))
4641 (sha256
4642 (base32
4643 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
4644 (build-system python-build-system)
4645 (arguments
4646 '(#:modules ((ice-9 ftw)
4647 (srfi srfi-1)
4648 (srfi srfi-26)
4649 (guix build utils)
4650 (guix build python-build-system))
4651 #:phases (modify-phases %standard-phases
4652 (replace 'check
4653 (lambda _
4654 (let ((cwd (getcwd))
4655 (libdir (find (cut string-prefix? "lib." <>)
4656 (scandir "build"))))
4657 (with-directory-excursion (string-append cwd "/build/" libdir)
4658 (invoke "nosetests" "-v" "."))))))))
4659 (native-inputs
4660 `(("python-matplotlib" ,python-matplotlib) ;for tests
4661 ("python-nose" ,python-nose)))
4662 (propagated-inputs
4663 `(("python-numpy" ,python-numpy)))
4664 (synopsis "Wavelet transforms in Python")
4665 (description
4666 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
4667mathematical basis functions that are localized in both time and frequency.
4668Wavelet transforms are time-frequency transforms employing wavelets. They are
4669similar to Fourier transforms, the difference being that Fourier transforms are
4670localized only in frequency instead of in time and frequency.")
4671 (license license:expat)))
4672
4673(define-public python2-pywavelets
4674 (package-with-python2 python-pywavelets))
4675
4676(define-public python-xcffib
4677 (package
4678 (name "python-xcffib")
4679 (version "0.6.0")
4680 (source
4681 (origin
4682 (method url-fetch)
4683 (uri (pypi-uri "xcffib" version))
4684 (sha256
4685 (base32
4686 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
4687 (build-system python-build-system)
4688 (inputs
4689 `(("libxcb" ,libxcb)))
4690 (propagated-inputs
4691 `(("python-cffi" ,python-cffi) ; used at run time
4692 ("python-six" ,python-six)))
4693 (arguments
4694 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4695 #:tests? #f
4696 #:phases
4697 (modify-phases %standard-phases
4698 (add-after 'unpack 'fix-libxcb-path
4699 (lambda* (#:key inputs #:allow-other-keys)
4700 (let ((libxcb (assoc-ref inputs "libxcb")))
4701 (substitute* '("xcffib/__init__.py")
4702 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4703 #t)))
4704 (add-after 'install 'install-doc
4705 (lambda* (#:key outputs #:allow-other-keys)
4706 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4707 "/doc/" ,name "-" ,version)))
4708 (mkdir-p doc)
4709 (copy-file "README.md"
4710 (string-append doc "/README.md"))
4711 #t))))))
4712 (home-page "https://github.com/tych0/xcffib")
4713 (synopsis "XCB Python bindings")
4714 (description
4715 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4716support for Python 3 and PyPy. It is based on cffi.")
4717 (license license:expat)))
4718
4719(define-public python2-xcffib
4720 (package-with-python2 python-xcffib))
4721
4722(define-public python-cairocffi
4723 (package
4724 (name "python-cairocffi")
4725 (version "0.9.0")
4726 (source
4727 (origin
4728 (method url-fetch)
4729 (uri (pypi-uri "cairocffi" version))
4730 (sha256
4731 (base32
4732 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
4733 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
4734 (build-system python-build-system)
4735 (outputs '("out" "doc"))
4736 (inputs
4737 `(("glib" ,glib)
4738 ("gtk+" ,gtk+)
4739 ("gdk-pixbuf" ,gdk-pixbuf)
4740 ("cairo" ,cairo)
4741 ("pango" ,pango)))
4742 (native-inputs
4743 `(("pkg-config" ,pkg-config)
4744 ("python-pytest" ,python-pytest)
4745 ("python-pytest-cov" ,python-pytest-cov)
4746 ("python-pytest-runner" ,python-pytest-runner)
4747 ("python-sphinx" ,python-sphinx)
4748 ("python-docutils" ,python-docutils)))
4749 (propagated-inputs
4750 `(("python-xcffib" ,python-xcffib))) ; used at run time
4751 (arguments
4752 `(#:phases
4753 (modify-phases %standard-phases
4754 (add-after 'unpack 'patch-paths
4755 (lambda* (#:key inputs outputs #:allow-other-keys)
4756 (substitute* (find-files "." "\\.py$")
4757 (("dlopen\\(ffi, 'cairo'")
4758 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
4759 "/lib/libcairo.so.2'"))
4760 (("dlopen\\(ffi, 'gdk-3'")
4761 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
4762 "/lib/libgtk-3.so.0'"))
4763 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
4764 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
4765 "/lib/libgdk_pixbuf-2.0.so.0'"))
4766 (("dlopen\\(ffi, 'glib-2.0'")
4767 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4768 "/lib/libglib-2.0.so.0'"))
4769 (("dlopen\\(ffi, 'gobject-2.0'")
4770 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4771 "/lib/libgobject-2.0.so.0'"))
4772 (("dlopen\\(ffi, 'pangocairo-1.0'")
4773 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4774 "/lib/libpangocairo-1.0.so.0'"))
4775 (("dlopen\\(ffi, 'pango-1.0'")
4776 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4777 "/lib/libpango-1.0.so.0'")))
4778 #t))
4779 (add-after 'install 'install-doc
4780 (lambda* (#:key inputs outputs #:allow-other-keys)
4781 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4782 (doc (string-append data "/doc/" ,name "-" ,version))
4783 (html (string-append doc "/html")))
4784 (setenv "LD_LIBRARY_PATH"
4785 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4786 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4787 (setenv "LANG" "en_US.UTF-8")
4788 (mkdir-p html)
4789 (for-each (lambda (file)
4790 (copy-file (string-append "." file)
4791 (string-append doc file)))
4792 '("/README.rst" "/CHANGES" "/LICENSE"))
4793 (system* "python" "setup.py" "build_sphinx")
4794 (copy-recursively "docs/_build/html" html)
4795 #t))))))
4796 (home-page "https://github.com/Kozea/cairocffi")
4797 (synopsis "Python bindings and object-oriented API for Cairo")
4798 (description
4799 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4800Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4801graphics library with support for multiple backends including image buffers,
4802PNG, PostScript, PDF, and SVG file output.")
4803 (license license:bsd-3)))
4804
4805(define-public python2-cairocffi
4806 (package-with-python2 python-cairocffi))
4807
4808(define-public python-decorator
4809 (package
4810 (name "python-decorator")
4811 (version "4.3.0")
4812 (source
4813 (origin
4814 (method url-fetch)
4815 (uri (pypi-uri "decorator" version))
4816 (sha256
4817 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4818 (build-system python-build-system)
e85af137 4819 (home-page "https://pypi.org/project/decorator/")
44d10b1f
RW
4820 (synopsis "Python module to simplify usage of decorators")
4821 (description
4822 "The aim of the decorator module is to simplify the usage of decorators
4823for the average programmer, and to popularize decorators usage giving examples
4824of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4825etc. The core of this module is a decorator factory.")
4826 (license license:expat)))
4827
4828(define-public python2-decorator
4829 (package-with-python2 python-decorator))
4830
4831(define-public python-drmaa
4832 (package
4833 (name "python-drmaa")
4834 (version "0.7.7")
4835 (source
4836 (origin
4837 (method url-fetch)
4838 (uri (pypi-uri "drmaa" version))
4839 (sha256
4840 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4841 (build-system python-build-system)
4842 ;; The test suite requires libdrmaa which is provided by the cluster
4843 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4844 ;; should be set to the path of the libdrmaa library.
4845 (arguments '(#:tests? #f))
4846 (native-inputs
4847 `(("python-nose" ,python-nose)))
e85af137 4848 (home-page "https://pypi.org/project/drmaa/")
44d10b1f
RW
4849 (synopsis "Python bindings for the DRMAA library")
4850 (description
4851 "A Python package for Distributed Resource Management (DRM) job
4852submission and control. This package is an implementation of the DRMAA 1.0
4853Python language binding specification.")
4854 (license license:bsd-3)))
4855
4856(define-public python2-drmaa
4857 (package-with-python2 python-drmaa))
4858
4859(define-public python-grako
4860 (package
4861 (name "python-grako")
4862 (version "3.99.9")
4863 (source
4864 (origin
4865 (method url-fetch)
4866 (uri
4867 (pypi-uri "grako" version ".zip"))
4868 (sha256
4869 (base32
4870 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4871 (build-system python-build-system)
4872 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4873 (native-inputs
4874 `(("unzip" ,unzip)
4875 ("python-pytest" ,python-pytest)
4876 ("python-pytest-runner" ,python-pytest-runner)))
4877 (home-page "https://bitbucket.org/neogeny/grako")
4878 (synopsis "EBNF parser generator")
4879 (description
4880 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4881memoizing PEG/Packrat parser in Python.")
4882 (license license:bsd-3)))
4883
4884(define-public python2-grako
4885 (package-with-python2 python-grako))
4886
4887(define-public python-gridmap
4888 (package
4889 (name "python-gridmap")
4890 (version "0.13.0")
4891 (source
4892 (origin
768fea0f
TGR
4893 (method git-fetch)
4894 (uri (git-reference
4895 (url "https://github.com/pygridtools/gridmap.git")
4896 (commit (string-append "v" version))))
4897 (file-name (git-file-name name version))
44d10b1f 4898 (sha256
768fea0f 4899 (base32 "1478lbwsr1w24cii2x01m2910fvh8r43ghnb78nc972a96hqiknm"))))
44d10b1f
RW
4900 (build-system python-build-system)
4901 (arguments
4902 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4903 (propagated-inputs
4904 `(("python-psutil" ,python-psutil)
4905 ("python-drmaa" ,python-drmaa)
4906 ("python-pyzmq" ,python-pyzmq)))
4907 (home-page "https://github.com/pygridtools/gridmap")
4908 (synopsis "Create jobs on a cluster directly from Python")
4909 (description
4910 "Gridmap is a Python package to allow you to easily create jobs on the
4911cluster directly from Python. You can directly map Python functions onto the
4912cluster without needing to write any wrapper code yourself.")
4913 (license license:gpl3+)))
4914
4915(define-public python2-gridmap
4916 (package-with-python2 python-gridmap))
4917
4918(define-public python-honcho
4919 (package
4920 (name "python-honcho")
4921 (version "1.0.1")
4922 (source
4923 (origin
8524d130
TGR
4924 (method git-fetch)
4925 (uri (git-reference
4926 (url "https://github.com/nickstenning/honcho.git")
4927 (commit (string-append "v" version))))
4928 (file-name (git-file-name name version))
44d10b1f 4929 (sha256
8524d130 4930 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
44d10b1f
RW
4931 (build-system python-build-system)
4932 (native-inputs
4933 `(("python-pytest" ,python-pytest)
4934 ("python-mock" ,python-mock)
4935 ("python-tox" ,python-tox)
4936 ("which" ,which))) ;for tests
4937 (propagated-inputs
4938 `(("python-jinja2" ,python-jinja2)))
4939 (arguments
4940 `(#:phases
4941 (modify-phases %standard-phases
4942 (delete 'check)
4943 (add-after 'install 'check
4944 (lambda* (#:key outputs inputs #:allow-other-keys)
4945 ;; fix honcho path in testsuite
4946 (substitute* "tests/conftest.py"
4947 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4948 "/bin/honcho" "'")))
4949 ;; It's easier to run tests after install.
4950 ;; Make installed package available for running the tests
4951 (add-installed-pythonpath inputs outputs)
95b707fb 4952 (invoke "py.test" "-v"))))))
44d10b1f
RW
4953 (home-page "https://github.com/nickstenning/honcho")
4954 (synopsis "Manage Procfile-based applications")
4955 (description
4956 "A Procfile is a file which describes how to run an application
50fceab0 4957consisting of several processes. honcho starts all listed processes.
44d10b1f
RW
4958The output of all running processes is collected by honcho and
4959displayed.")
4960 (license license:expat)))
4961
4962(define-public python2-honcho
4963 (package-with-python2 python-honcho))
4964
4965(define-public python-pexpect
4966 (package
4967 (name "python-pexpect")
4968 (version "4.6.0")
4969 (source
4970 (origin
4971 (method url-fetch)
4972 (uri (pypi-uri "pexpect" version))
4973 (sha256
4974 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
4975 (build-system python-build-system)
4976 (arguments
4977 `(#:phases
4978 (modify-phases %standard-phases
4979 (add-before 'check 'prepare-tests
4980 (lambda _
4981 (substitute* (find-files "tests")
4982 (("/bin/ls") (which "ls"))
4983 (("/bin/echo") (which "echo"))
4984 (("/bin/which") (which "which"))
4985 ;; Many tests try to use the /bin directory which
4986 ;; is not present in the build environment.
4987 ;; Use one that's non-empty and unlikely to change.
4988 (("/bin'") "/dev'"))
4989 ;; XXX: Socket connection test gets "Connection reset by peer".
4990 ;; Why does it not work? Delete for now.
4991 (delete-file "tests/test_socket.py")
4992 #t))
4993 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
4994 (native-inputs
4995 `(("python-nose" ,python-nose)
4996 ("python-pytest" ,python-pytest)
4997 ("man-db" ,man-db)
4998 ("which" ,which)
4999 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
5000 (propagated-inputs
5001 `(("python-ptyprocess" ,python-ptyprocess)))
5002 (home-page "http://pexpect.readthedocs.org/")
5003 (synopsis "Controlling interactive console applications")
5004 (description
5005 "Pexpect is a pure Python module for spawning child applications;
5006controlling them; and responding to expected patterns in their output.
5007Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
5008child application and control it as if a human were typing commands.")
5009 (license license:isc)))
5010
5011(define-public python2-pexpect
5012 (package-with-python2 python-pexpect))
5013
5014(define-public python-setuptools-scm
5015 (package
5016 (name "python-setuptools-scm")
85092643 5017 (version "3.2.0")
44d10b1f
RW
5018 (source (origin
5019 (method url-fetch)
5020 (uri (pypi-uri "setuptools_scm" version))
5021 (sha256
5022 (base32
85092643 5023 "0n3knn3p1sqlx31k2lahn7z9bacvlv8nhlfidj77vz50bxqlgasj"))))
44d10b1f
RW
5024 (build-system python-build-system)
5025 (home-page "https://github.com/pypa/setuptools_scm/")
5026 (synopsis "Manage Python package versions in SCM metadata")
5027 (description
5028 "Setuptools_scm handles managing your Python package versions in
5029@dfn{software configuration management} (SCM) metadata instead of declaring
5030them as the version argument or in a SCM managed file.")
5031 (license license:expat)))
5032
a0b2accf
MO
5033;; Needed by python-lazy-object-proxy, remove on next update cycle.
5034(define-public python-setuptools-scm-3.3
5035 (package
5036 (inherit python-setuptools-scm)
5037 (version "3.3.3")
5038 (source (origin
5039 (method url-fetch)
5040 (uri (pypi-uri "setuptools_scm" version))
5041 (sha256
5042 (base32
5043 "19cyndx23xmpbhz4qrwmfwsmnnaczd0dw7qg977ksq2dbvxy29dx"))))))
5044
44d10b1f
RW
5045(define-public python2-setuptools-scm
5046 (package-with-python2 python-setuptools-scm))
5047
bb74ea09
RW
5048(define-public python-pathlib2
5049 (package
5050 (name "python-pathlib2")
5051 (version "2.3.3")
5052 (source
5053 (origin
5054 (method url-fetch)
5055 (uri (pypi-uri "pathlib2" version))
5056 (sha256
5057 (base32
5058 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
5059 (build-system python-build-system)
5060 (propagated-inputs
5061 `(("python-scandir" ,python-scandir)
5062 ("python-six" ,python-six)))
e85af137 5063 (home-page "https://pypi.org/project/pathlib2/")
746d3384 5064 (synopsis "Object-oriented file system paths")
bb74ea09
RW
5065 (description "The goal of pathlib2 is to provide a backport of the
5066standard @code{pathlib} module which tracks the standard library module, so
5067all the newest features of the standard @code{pathlib} can be used also on
5068older Python versions.")
5069 (license license:expat)))
5070
fd5c264a
MB
5071(define-public python2-importlib-resources
5072 (package
5073 (name "python2-importlib-resources")
5074 (version "1.0.2")
5075 (source (origin
5076 (method url-fetch)
5077 (uri (pypi-uri "importlib_resources" version))
5078 (sha256
5079 (base32
5080 "0y3hg12iby1qyaspnbisz4s4vxax7syikk3skznwqizqyv89y9yk"))))
5081 (build-system python-build-system)
5082 (arguments
5083 `(#:python ,python-2))
5084 (native-inputs
5085 `(("python-wheel" ,python2-wheel)))
5086 (propagated-inputs
5087 `(("python-pathlib2" ,python2-pathlib2)
5088 ("python-typing" ,python2-typing)))
5089 (home-page "https://gitlab.com/python-devs/importlib_resources")
5090 (synopsis "Backport of @code{importlib.resources} from Python 3.7")
5091 (description
5092 "This package provides an implementation of @code{importlib.resources}
5093for older versions of Python.")
5094 (license license:asl2.0)))
5095
15b65617
RW
5096(define-public python-importlib-metadata
5097 (package
5098 (name "python-importlib-metadata")
4dc04d11 5099 (version "1.4.0")
15b65617
RW
5100 (source
5101 (origin
5102 (method url-fetch)
5103 (uri (pypi-uri "importlib_metadata" version))
5104 (sha256
4dc04d11 5105 (base32 "1n76444v7zn910xrhh8954jdn4byxbn9f1jck6b85a716mbh2z7i"))))
15b65617
RW
5106 (build-system python-build-system)
5107 (propagated-inputs
4dc04d11 5108 `(("python-zipp" ,python-zipp)))
15b65617
RW
5109 (native-inputs
5110 `(("python-setuptools-scm" ,python-setuptools-scm)
4dc04d11 5111 ("python-packaging" ,python-packaging)))
15b65617
RW
5112 (home-page "https://importlib-metadata.readthedocs.io/")
5113 (synopsis "Read metadata from Python packages")
5114 (description
5115 "@code{importlib_metadata} is a library which provides an API for
5116accessing an installed Python package's metadata, such as its entry points or
5117its top-level name. This functionality intends to replace most uses of
5118@code{pkg_resources} entry point API and metadata API. Along with
5119@code{importlib.resources} in Python 3.7 and newer, this can eliminate the
5120need to use the older and less efficient @code{pkg_resources} package.")
3dfb3d44 5121 (properties `((python2-variant . ,(delay python2-importlib-metadata))))
15b65617
RW
5122 (license license:asl2.0)))
5123
5efa04dd
MB
5124(define-public python2-importlib-metadata
5125 (let ((base (package-with-python2 (strip-python2-variant
5126 python-importlib-metadata))))
5127 (package/inherit
5128 base
5129 (name "python2-importlib-metadata")
5130 (propagated-inputs
5131 `(("python-configparser" ,python2-configparser)
5132 ("python-contextlib2" ,python2-contextlib2)
5133 ("python-importlib-resources" ,python2-importlib-resources)
5134 ("python-pathlib2" ,python2-pathlib2)
5135 ,@(package-propagated-inputs base))))))
5136
37c173d1
RW
5137(define-public python-jaraco-packaging
5138 (package
5139 (name "python-jaraco-packaging")
5140 (version "6.1")
5141 (source
5142 (origin
5143 (method url-fetch)
5144 (uri (pypi-uri "jaraco.packaging" version))
5145 (sha256
5146 (base32
5147 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
5148 (build-system python-build-system)
5149 (propagated-inputs
5150 `(("python-pytest" ,python-pytest)
5151 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
5152 ("python-pytest-flake8" ,python-pytest-flake8)
5153 ("python-rst.linker" ,python-rst.linker)
5154 ("python-setuptools" ,python-setuptools)
5155 ("python-setuptools-scm" ,python-setuptools-scm)
5156 ("python-six" ,python-six)
5157 ("python-sphinx" ,python-sphinx)))
5158 (home-page "https://github.com/jaraco/jaraco.packaging")
5159 (synopsis "Tools to supplement packaging Python releases")
5160 (description
5161 "This package provides various tools to supplement packaging Python
5162releases.")
5163 (license license:expat)))
5164
44d10b1f
RW
5165(define-public python-pathpy
5166 (package
5167 (name "python-pathpy")
a3dd8871 5168 (version "11.5.1")
44d10b1f
RW
5169 (source
5170 (origin
5171 (method url-fetch)
5172 (uri (pypi-uri "path.py" version))
5173 (sha256
a3dd8871 5174 (base32 "0ir9j1haq2jbi7aip6k2fa9l7q1l03k4hp1awxhjhcwzsnwp3ll8"))))
49ad11e9 5175 (outputs '("out" "doc"))
44d10b1f
RW
5176 (build-system python-build-system)
5177 (propagated-inputs
01a53e0b
MC
5178 `(("python-appdirs" ,python-appdirs)
5179 ("python-importlib-metadata" ,python-importlib-metadata)))
44d10b1f
RW
5180 (native-inputs
5181 `(("python-setuptools-scm" ,python-setuptools-scm)
5182 ("python-sphinx" ,python-sphinx)
5183 ("python-rst.linker" ,python-rst.linker)
5184 ("python-pytest" ,python-pytest)
49ad11e9
RW
5185 ("python-pytest-runner" ,python-pytest-runner)
5186 ("python-jaraco-packaging" ,python-jaraco-packaging)))
44d10b1f 5187 (arguments
49ad11e9
RW
5188 `(#:phases
5189 (modify-phases %standard-phases
5190 (add-after 'build 'build-doc
5191 (lambda _
5192 (setenv "LANG" "en_US.UTF-8")
5193 (invoke "python" "setup.py" "build_sphinx")))
5194 (add-after 'install 'install-doc
5195 (lambda* (#:key outputs #:allow-other-keys)
5196 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5197 (doc (string-append data "/doc/" ,name "-" ,version))
5198 (html (string-append doc "/html")))
5199 (mkdir-p html)
5200 (for-each (lambda (file)
5201 (copy-file file (string-append doc "/" file)))
5202 '("README.rst" "CHANGES.rst"))
5203 (copy-recursively "build/sphinx/html" html)
5204 #t)))
5205 (replace 'check
5206 (lambda _
5207 ;; The import time test aborts if an import takes longer than
5208 ;; 100ms. It may very well take a little longer than that.
5209 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
44d10b1f
RW
5210 (home-page "https://github.com/jaraco/path.py")
5211 (synopsis "Python module wrapper for built-in os.path")
5212 (description
5213 "@code{path.py} implements path objects as first-class entities, allowing
5214common operations on files to be invoked on those path objects directly.")
5215 (license license:expat)))
5216
5217(define-public python2-pathpy
5218 (package-with-python2 python-pathpy))
5219
5220(define-public python-simplegeneric
5221 (package
5222 (name "python-simplegeneric")
5223 (version "0.8.1")
5224 (source
5225 (origin
5226 (method url-fetch)
6c8c3980 5227 (uri (pypi-uri "simplegeneric" version ".zip"))
44d10b1f
RW
5228 (sha256
5229 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5230 (build-system python-build-system)
5231 (native-inputs
5232 `(("unzip" ,unzip)))
5233 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5234 (synopsis "Python module for simple generic functions")
5235 (description
5236 "The simplegeneric module lets you define simple single-dispatch generic
5237functions, akin to Python’s built-in generic functions like @code{len()},
5238@code{iter()} and so on. However, instead of using specially-named methods,
5239these generic functions use simple lookup tables, akin to those used by
5240e.g. @code{pickle.dump()} and other generic functions found in the Python
5241standard library.")
5242 (license license:zpl2.1)))
5243
5244(define-public python2-simplegeneric
5245 (package-with-python2 python-simplegeneric))
5246
5247(define-public python-ipython-genutils
5248 ;; TODO: This package is retired, check if can be removed, see description.
5249 (package
5250 (name "python-ipython-genutils")
5251 (version "0.1.0")
5252 (source
5253 (origin
5254 (method url-fetch)
c9671d4b 5255 (uri (pypi-uri "ipython_genutils" version))
44d10b1f
RW
5256 (sha256
5257 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5258 (build-system python-build-system)
5259 (arguments `(#:tests? #f)) ; no tests
5260 (home-page "https://ipython.org")
5261 (synopsis "Vestigial utilities from IPython")
5262 (description
5263 "This package provides retired utilities from IPython. No packages
5264outside IPython/Jupyter should depend on it.
5265
5266This package shouldn't exist. It contains some common utilities shared by
5267Jupyter and IPython projects during The Big Split. As soon as possible, those
5268packages will remove their dependency on this, and this package will go
5269away.")
5270 (license license:bsd-3)))
5271
5272(define-public python2-ipython-genutils
5273 (package-with-python2 python-ipython-genutils))
5274
5275(define-public python-traitlets
5276 (package
5277 (name "python-traitlets")
ac5e205a 5278 (version "4.3.3")
44d10b1f
RW
5279 (source
5280 (origin
5281 (method url-fetch)
5282 (uri (pypi-uri "traitlets" version))
5283 (sha256
5284 (base32
ac5e205a 5285 "1xsrwgivpkxlbr4dfndfsi098s29yqgswgjc1qqn69yxklvfw8yh"))))
44d10b1f
RW
5286 (build-system python-build-system)
5287 (arguments
5288 `(#:phases
5289 (modify-phases %standard-phases
5290 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
5291 (propagated-inputs
5292 `(("python-ipython-genutils" ,python-ipython-genutils)
ac5e205a 5293 ("python-decorator" ,python-decorator)))
44d10b1f
RW
5294 (native-inputs
5295 `(("python-pytest" ,python-pytest)))
5296 (properties `((python2-variant . ,(delay python2-traitlets))))
5297 (home-page "https://ipython.org")
5298 (synopsis "Configuration system for Python applications")
5299 (description
5300 "Traitlets is a framework that lets Python classes have attributes with
5301type checking, dynamically calculated default values, and ‘on change’
5302callbacks. The package also includes a mechanism to use traitlets for
5303configuration, loading values from files or from command line arguments. This
5304is a distinct layer on top of traitlets, so you can use traitlets in your code
5305without using the configuration machinery.")
5306 (license license:bsd-3)))
5307
5308(define-public python2-traitlets
5309 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
5310 (package
5311 (inherit traitlets)
5312 (propagated-inputs
5313 `(("python2-enum34" ,python2-enum34)
5314 ,@(package-propagated-inputs traitlets))))))
5315
5316(define-public python-jupyter-core
5317 (package
5318 (name "python-jupyter-core")
5319 (version "4.4.0")
5320 (source
5321 (origin
5322 (method url-fetch)
5323 (uri (string-append (pypi-uri "jupyter_core" version)))
5324 (sha256
5325 (base32
5326 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
5327 (build-system python-build-system)
5328 ;; FIXME: not sure how to run the tests
5329 (arguments `(#:tests? #f))
5330 (propagated-inputs
5331 `(("python-traitlets" ,python-traitlets)))
5332 (home-page "http://jupyter.org/")
5333 (synopsis "Jupyter base package")
5334 (description
5335 "Jupyter core is the base package on which Jupyter projects rely.")
5336 (license license:bsd-3)))
5337
5338(define-public python2-jupyter-core
5339 (package-with-python2 python-jupyter-core))
5340
5341(define-public python-jupyter-client
5342 (package
5343 (name "python-jupyter-client")
5344 (version "5.2.4")
5345 (source
5346 (origin
5347 (method url-fetch)
5348 (uri (pypi-uri "jupyter_client" version))
5349 (sha256
5350 (base32
5351 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
5352 (build-system python-build-system)
5353 ;; Tests fail because of missing native python kernel which I assume is
5354 ;; provided by the ipython package, which we cannot use because it would
5355 ;; cause a dependency cycle.
ddc586ea
LC
5356 (arguments
5357 `(#:tests? #f
5358
5359 #:phases (modify-phases %standard-phases
5360 (add-after 'unpack 'set-tool-file-names
5361 (lambda* (#:key inputs #:allow-other-keys)
5362 (let ((iproute (assoc-ref inputs "iproute")))
5363 (substitute* "jupyter_client/localinterfaces.py"
5364 (("'ip'")
5365 (string-append "'" iproute "/sbin/ip'")))
5366 #t))))))
5367 (inputs
5368 `(("iproute" ,iproute)))
44d10b1f
RW
5369 (propagated-inputs
5370 `(("python-pyzmq" ,python-pyzmq)
5371 ("python-traitlets" ,python-traitlets)
5372 ("python-jupyter-core" ,python-jupyter-core)))
5373 (home-page "http://jupyter.org/")
5374 (synopsis "Jupyter protocol implementation and client libraries")
5375 (description
5376 "The @code{jupyter_client} package contains the reference implementation
5377of the Jupyter protocol. It also provides client and kernel management APIs
5378for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5379installing @code{kernelspec}s for use with Jupyter frontends.")
5380 (license license:bsd-3)))
5381
5382(define-public python2-jupyter-client
5383 (package-with-python2 python-jupyter-client))
5384
5385(define-public python-ipykernel
5386 (package
5387 (name "python-ipykernel")
08d0a355 5388 (version "5.1.3")
44d10b1f
RW
5389 (source
5390 (origin
5391 (method url-fetch)
5392 (uri (pypi-uri "ipykernel" version))
5393 (sha256
08d0a355 5394 (base32 "1a08y677lpn80qzvv7z0smgggmr5m5ayf0bs6vds47xpxl9sss5k"))))
44d10b1f
RW
5395 (build-system python-build-system)
5396 (arguments
5397 `(#:phases
5398 (modify-phases %standard-phases
5399 (replace 'check
5400 (lambda _
5401 (setenv "HOME" "/tmp")
5402 (invoke "pytest" "-v")
aa856d02
LC
5403 #t))
5404 (add-after 'install 'set-python-file-name
5405 (lambda* (#:key outputs #:allow-other-keys)
5406 ;; Record the absolute file name of the 'python' executable in
5407 ;; 'kernel.json'.
5408 (let ((out (assoc-ref outputs "out")))
5409 (substitute* (string-append out "/share/jupyter"
5410 "/kernels/python3/kernel.json")
5411 (("\"python\"")
5412 (string-append "\"" (which "python") "\"")))
5413 #t))))))
44d10b1f
RW
5414 (propagated-inputs
5415 `(("python-ipython" ,python-ipython)
5416 ;; imported at runtime during connect
5417 ("python-jupyter-client" ,python-jupyter-client)))
5418 (native-inputs
08d0a355
TGR
5419 `(("python-flaky" ,python-flaky)
5420 ("python-nose" ,python-nose)
5421 ("python-pytest" ,python-pytest)))
44d10b1f
RW
5422 (home-page "https://ipython.org")
5423 (synopsis "IPython Kernel for Jupyter")
5424 (description
5425 "This package provides the IPython kernel for Jupyter.")
5426 (license license:bsd-3)))
5427
0f378947 5428;; Version 5.1.1 and above no longer support Python 2.
44d10b1f 5429(define-public python2-ipykernel
0f378947
RW
5430 (package
5431 (name "python2-ipykernel")
5432 (version "5.1.0")
5433 (source
5434 (origin
5435 (method url-fetch)
5436 (uri (pypi-uri "ipykernel" version))
5437 (sha256
5438 (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g"))))
5439 (build-system python-build-system)
5440 (arguments
5441 `(#:python ,python-2
5442 #:phases
5443 (modify-phases %standard-phases
5444 (replace 'check
5445 (lambda _
5446 (setenv "HOME" "/tmp")
5447 (invoke "pytest" "-v")
5448 #t)))))
5449 (propagated-inputs
5450 `(("python2-ipython" ,python2-ipython)
5451 ;; imported at runtime during connect
5452 ("python2-jupyter-client" ,python2-jupyter-client)))
5453 (native-inputs
5454 `(("python2-pytest" ,python2-pytest)
5455 ("python2-nose" ,python2-nose)))
5456 (home-page "https://ipython.org")
5457 (synopsis "IPython Kernel for Jupyter")
5458 (description
5459 "This package provides the IPython kernel for Jupyter.")
5460 (license license:bsd-3)))
44d10b1f 5461
966aa714
AE
5462(define-public python-pari-jupyter
5463 (package
5464 (name "python-pari-jupyter")
5465 (version "1.3.2")
5466 (source
5467 (origin
5468 (method url-fetch)
5469 (uri (pypi-uri "pari_jupyter" version))
5470 (sha256
5471 (base32
5472 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
5473 (build-system python-build-system)
5474 (propagated-inputs
5475 `(("python-ipykernel" ,python-ipykernel)))
5476 (inputs
5477 `(("pari-gp" ,pari-gp)
5478 ("readline" ,readline)))
5479 (arguments
5480 `(#:tests? #f)) ; no test suite
5481 (home-page
5482 "https://github.com/jdemeyer/pari_jupyter")
5483 (synopsis "A Jupyter kernel for PARI/GP")
5484 (description "The package provides a PARI/GP kernel for Jupyter.")
5485 (license license:gpl3+)))
5486
dede052a
RW
5487(define-public python-backcall
5488 (package
5489 (name "python-backcall")
5490 (version "0.1.0")
5491 (source
5492 (origin
5493 (method url-fetch)
5494 (uri (pypi-uri "backcall" version))
5495 (sha256
5496 (base32
5497 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
5498 (build-system python-build-system)
5499 (home-page "https://github.com/takluyver/backcall/")
5500 (synopsis "Specifications for callback functions passed in to an API")
5501 (description
5502 "If your code lets other people supply callback functions, it's important
5503to specify the function signature you expect, and check that functions support
5504that. Adding extra parameters later would break other peoples code unless
5505you're careful. The @code{backcall} package provides a way of specifying the
5506callback signature using a prototype function.")
5507 (license license:bsd-3)))
5508
44d10b1f
RW
5509;; This is the latest release of the LTS version of ipython with support for
5510;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
8b5f756c
RW
5511;; dropped support for Python 2.7.
5512(define-public python2-ipython
44d10b1f 5513 (package
8b5f756c 5514 (name "python2-ipython")
44d10b1f
RW
5515 (version "5.8.0")
5516 (source
5517 (origin
5518 (method url-fetch)
5519 (uri (pypi-uri "ipython" version ".tar.gz"))
5520 (sha256
5521 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
5522 (build-system python-build-system)
44d10b1f 5523 (propagated-inputs
8b5f756c
RW
5524 `(("python2-backports-shutil-get-terminal-size"
5525 ,python2-backports-shutil-get-terminal-size)
5526 ("python2-pathlib2" ,python2-pathlib2)
5527 ("python2-pyzmq" ,python2-pyzmq)
5528 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
5529 ("python2-terminado" ,python2-terminado)
5530 ("python2-matplotlib" ,python2-matplotlib)
5531 ("python2-numpy" ,python2-numpy)
5532 ("python2-numpydoc" ,python2-numpydoc)
5533 ("python2-jinja2" ,python2-jinja2)
5534 ("python2-mistune" ,python2-mistune)
5535 ("python2-pexpect" ,python2-pexpect)
5536 ("python2-pickleshare" ,python2-pickleshare)
5537 ("python2-simplegeneric" ,python2-simplegeneric)
5538 ("python2-jsonschema" ,python2-jsonschema)
5539 ("python2-traitlets" ,python2-traitlets)
5540 ("python2-nbformat" ,python2-nbformat)
5541 ("python2-pygments" ,python2-pygments)))
5542 (inputs
5543 `(("readline" ,readline)
5544 ("which" ,which)))
5545 (native-inputs
5546 `(("graphviz" ,graphviz)
5547 ("pkg-config" ,pkg-config)
5548 ("python2-requests" ,python2-requests) ;; for tests
5549 ("python2-testpath" ,python2-testpath)
5550 ("python2-mock" ,python2-mock)
5551 ("python2-nose" ,python2-nose)))
5552 (arguments
5553 `(#:python ,python-2
5554 #:phases
5555 (modify-phases %standard-phases
5556 (add-before 'check 'delete-broken-tests
5557 (lambda* (#:key inputs #:allow-other-keys)
5558 ;; These tests throw errors for unknown reasons.
5559 (delete-file "IPython/core/tests/test_profile.py")
5560 (delete-file "IPython/core/tests/test_interactiveshell.py")
5561 (delete-file "IPython/core/tests/test_magic.py")
5562 #t)))))
5563 (home-page "https://ipython.org")
5564 (synopsis "IPython is a tool for interactive computing in Python")
5565 (description
5566 "IPython provides a rich architecture for interactive computing with:
5567Powerful interactive shells, a browser-based notebook, support for interactive
5568data visualization, embeddable interpreters and tools for parallel
5569computing.")
5570 (license license:bsd-3)))
5571
5572(define-public python-ipython
5573 (package
5574 (name "python-ipython")
ee515773 5575 (version "7.9.0")
8b5f756c
RW
5576 (source
5577 (origin
5578 (method url-fetch)
5579 (uri (pypi-uri "ipython" version ".tar.gz"))
5580 (sha256
ee515773 5581 (base32 "103jkw18z7fnwdal1mdbijjxi1fndzn31g887lmj7ddpf2r07lyz"))))
8b5f756c
RW
5582 (build-system python-build-system)
5583 (propagated-inputs
5584 `(("python-backcall" ,python-backcall)
5585 ("python-pyzmq" ,python-pyzmq)
5586 ("python-prompt-toolkit" ,python-prompt-toolkit)
44d10b1f
RW
5587 ("python-terminado" ,python-terminado)
5588 ("python-matplotlib" ,python-matplotlib)
5589 ("python-numpy" ,python-numpy)
5590 ("python-numpydoc" ,python-numpydoc)
8b5f756c 5591 ("python-jedi" ,python-jedi)
44d10b1f
RW
5592 ("python-jinja2" ,python-jinja2)
5593 ("python-mistune" ,python-mistune)
5594 ("python-pexpect" ,python-pexpect)
5595 ("python-pickleshare" ,python-pickleshare)
5596 ("python-simplegeneric" ,python-simplegeneric)
5597 ("python-jsonschema" ,python-jsonschema)
5598 ("python-traitlets" ,python-traitlets)
5599 ("python-nbformat" ,python-nbformat)
5600 ("python-pygments" ,python-pygments)))
5601 (inputs
5602 `(("readline" ,readline)
5603 ("which" ,which)))
5604 (native-inputs
5605 `(("graphviz" ,graphviz)
5606 ("pkg-config" ,pkg-config)
5607 ("python-requests" ,python-requests) ;; for tests
5608 ("python-testpath" ,python-testpath)
8b5f756c 5609 ("python-nose" ,python-nose)))
44d10b1f
RW
5610 (arguments
5611 `(#:phases
5612 (modify-phases %standard-phases
0f272518
RW
5613 (add-after 'unpack 'make-docs-reproducible
5614 (lambda _
5615 (substitute* "IPython/sphinxext/ipython_directive.py"
5616 ((".*import datetime") "")
5617 ((".*datetime.datetime.now\\(\\)") "")
5618 (("%timeit") "# %timeit"))
5619 #t))
44d10b1f
RW
5620 ;; Tests can only be run after the library has been installed and not
5621 ;; within the source directory.
5622 (delete 'check)
5623 (add-after 'install 'check
5624 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5625 (if tests?
5626 (begin
5627 ;; Make installed package available for running the tests
5628 (add-installed-pythonpath inputs outputs)
5629 (setenv "HOME" "/tmp/") ;; required by a test
5630 ;; We only test the core because one of the other tests
5631 ;; tries to import ipykernel.
5632 (invoke "python" "IPython/testing/iptest.py"
5633 "-v" "IPython/core/tests"))
5634 #t)))
5635 (add-before 'check 'fix-tests
5636 (lambda* (#:key inputs #:allow-other-keys)
5637 (substitute* "./IPython/utils/_process_posix.py"
5638 (("/usr/bin/env', 'which") (which "which")))
5639 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5640 (("#!/usr/bin/env python")
5641 (string-append "#!" (which "python"))))
44d10b1f
RW
5642 ;; This test introduces a circular dependency on ipykernel
5643 ;; (which depends on ipython).
5644 (delete-file "IPython/core/tests/test_display.py")
8b5f756c 5645 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
44d10b1f 5646 (delete-file "IPython/core/tests/test_interactiveshell.py")
44d10b1f
RW
5647 #t)))))
5648 (home-page "https://ipython.org")
5649 (synopsis "IPython is a tool for interactive computing in Python")
5650 (description
5651 "IPython provides a rich architecture for interactive computing with:
5652Powerful interactive shells, a browser-based notebook, support for interactive
5653data visualization, embeddable interpreters and tools for parallel
5654computing.")
8b5f756c 5655 (license license:bsd-3)))
44d10b1f 5656
8b5f756c
RW
5657(define-public python-ipython-documentation
5658 (package
5659 (inherit python-ipython)
5660 (name "python-ipython-documentation")
5661 (version (package-version python-ipython))
5662 (arguments
5663 `(#:phases
5664 (modify-phases %standard-phases
5665 (delete 'build)
5666 (delete 'check)
5667 (replace 'install
5668 (lambda* (#:key outputs #:allow-other-keys)
5669 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5670 (doc (string-append data "/doc/" ,name "-" ,version))
5671 (html (string-append doc "/html"))
5672 (man1 (string-append data "/man/man1"))
5673 (info (string-append data "/info"))
5674 (examples (string-append doc "/examples"))
5675 (python-arg (string-append "PYTHON=" (which "python"))))
5676 (setenv "LANG" "en_US.utf8")
5677 (with-directory-excursion "docs"
5678 ;; FIXME: pdf fails to build
5679 ;;(system* "make" "pdf" "PAPER=a4")
5680 (system* "make" python-arg "html")
5681 ;; FIXME: the generated texi file contains ^@^@, which trips
5682 ;; up the parser.
5683 ;; (system* "make" python-arg "info")
5684 )
5685 (copy-recursively "docs/man" man1)
5686 (copy-recursively "examples" examples)
5687 (copy-recursively "docs/build/html" html)
5688 ;; (copy-file "docs/build/latex/ipython.pdf"
5689 ;; (string-append doc "/ipython.pdf"))
5690 (mkdir-p info)
5691 ;; (copy-file "docs/build/texinfo/ipython.info"
5692 ;; (string-append info "/ipython.info"))
5693 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
5694 #t)))))
5695 (inputs
5696 `(("python-ipython" ,python-ipython)
5697 ("python-ipykernel" ,python-ipykernel)))
5698 (native-inputs
5699 `(("python-sphinx" ,python-sphinx)
5700 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
5701 ;; FIXME: It's possible that a smaller union would work just as well.
f75aa97f 5702 ("texlive" ,(texlive-union (list texlive-amsfonts
8b5f756c
RW
5703 texlive-fonts-ec
5704 texlive-generic-ifxetex
5705 texlive-generic-pdftex
8b5f756c
RW
5706 texlive-latex-capt-of
5707 texlive-latex-cmap
5708 texlive-latex-environ
5709 texlive-latex-eqparbox
5710 texlive-latex-etoolbox
5711 texlive-latex-expdlist
5712 texlive-latex-fancyhdr
5713 texlive-latex-fancyvrb
5714 texlive-latex-fncychap
5715 texlive-latex-float
5716 texlive-latex-framed
5717 texlive-latex-geometry
5718 texlive-latex-graphics
5719 texlive-latex-hyperref
5720 texlive-latex-mdwtools
5721 texlive-latex-multirow
5722 texlive-latex-needspace
5723 texlive-latex-oberdiek
5724 texlive-latex-parskip
5725 texlive-latex-preview
5726 texlive-latex-tabulary
5727 texlive-latex-threeparttable
5728 texlive-latex-titlesec
5729 texlive-latex-trimspaces
5730 texlive-latex-ucs
5731 texlive-latex-upquote
5732 texlive-latex-url
5733 texlive-latex-varwidth
5734 texlive-latex-wrapfig)))
5735 ("texinfo" ,texinfo)))))
44d10b1f
RW
5736
5737(define-public python-urwid
5738 (package
5739 (name "python-urwid")
5740 (version "2.0.1")
5741 (source
5742 (origin
5743 (method url-fetch)
5744 (uri (pypi-uri "urwid" version))
5745 (sha256
5746 (base32
5747 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
5748 (build-system python-build-system)
5749 (home-page "http://urwid.org")
5750 (synopsis "Console user interface library for Python")
5751 (description
5752 "Urwid is a curses-based UI/widget library for Python. It includes many
5753features useful for text console applications.")
5754 (license license:lgpl2.1+)))
5755
5756(define-public python2-urwid
5757 (package-with-python2 python-urwid))
5758
5759(define-public python-urwidtrees
5760 (package
5761 (name "python-urwidtrees")
5762 (version "1.0.2")
5763 (source
5764 (origin
c8364072 5765 (method git-fetch)
44d10b1f
RW
5766 ;; package author intends on distributing via github rather than pypi:
5767 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
c8364072
EF
5768 (uri (git-reference
5769 (url "https://github.com/pazz/urwidtrees")
5770 (commit version)))
5771 (file-name (git-file-name name version))
44d10b1f
RW
5772 (sha256
5773 (base32
c8364072 5774 "1n1kpidvkdnsqyb82vlvk78gmly96kh8351lqxn2pzgwwns6fml2"))))
44d10b1f
RW
5775 (build-system python-build-system)
5776 (arguments
26bb7fc6
EF
5777 '(#:use-setuptools? #f
5778 #:tests? #f)) ; no tests
44d10b1f
RW
5779 (propagated-inputs `(("python-urwid" ,python-urwid)))
5780 (home-page "https://github.com/pazz/urwidtrees")
5781 (synopsis "Tree widgets for urwid")
5782 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5783toolkit. Use it to build trees of widgets.")
5784 (license license:gpl3+)))
5785
5786(define-public python2-urwidtrees
5787 (package-with-python2 python-urwidtrees))
5788
5789(define-public python-ua-parser
5790 (package
5791 (name "python-ua-parser")
5792 (version "0.8.0")
5793 (source
5794 (origin
5795 (method url-fetch)
5796 (uri (pypi-uri "ua-parser" version))
5797 (sha256
5798 (base32
5799 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
5800 (build-system python-build-system)
5801 (arguments
5802 `(#:tests? #f)) ;no test suite in release
5803 (native-inputs
5804 `(("python-pyyaml" ,python-pyyaml)))
5805 (home-page "https://github.com/ua-parser/uap-python")
5806 (synopsis "User agent parser")
5807 (description
5808 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
5809 (license license:asl2.0)))
5810
5811(define-public python2-ua-parser
5812 (package-with-python2 python-ua-parser))
5813
5814(define-public python-user-agents
5815 (package
5816 (name "python-user-agents")
5817 (version "1.1.0")
5818 (source
5819 (origin
5820 (method url-fetch)
5821 (uri (pypi-uri "user-agents" version))
5822 (sha256
5823 (base32
5824 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
5825 (build-system python-build-system)
5826 (arguments
5827 `(#:tests? #f)) ;missing devices.json test file in release
5828 (propagated-inputs
5829 `(("python-ua-parser" ,python-ua-parser)))
5830 (home-page "https://github.com/selwin/python-user-agents")
5831 (synopsis "User Agent strings parsing library")
5832 (description
5833 "A library to identify devices (phones, tablets) and their capabilities by
5834parsing (browser/HTTP) user agent strings.")
5835 (license license:expat)))
5836
5837(define-public python2-user-agents
5838 (package-with-python2 python-user-agents))
5839
5840(define-public python-dbus
5841 (package
5842 (name "python-dbus")
ba5ef999 5843 (version "1.2.14")
44d10b1f
RW
5844 (source
5845 (origin
5846 (method url-fetch)
5847 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
5848 "dbus-python-" version ".tar.gz"))
5849 (sha256
ba5ef999 5850 (base32 "0cdchkgnivlka4lf8q4qfk0yxq483i3r3aqickjf8hfn7nx0c0mi"))))
44d10b1f 5851 (build-system gnu-build-system)
44d10b1f
RW
5852 (native-inputs
5853 `(("pkg-config" ,pkg-config)))
5854 (inputs
5855 `(("python" ,python-wrapper)
5856 ("dbus-glib" ,dbus-glib)))
5857 (synopsis "Python bindings for D-bus")
5858 (description "python-dbus provides bindings for libdbus, the reference
5859implementation of D-Bus.")
5860 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
5861 (license license:expat)))
5862
5863(define-public python2-dbus
5864 (package (inherit python-dbus)
5865 (name "python2-dbus")
5866 (inputs `(("python" ,python-2)
5867 ,@(alist-delete "python"
5868 (package-inputs python-dbus)
ba5ef999 5869 equal?)))))
44d10b1f 5870
fb236fdd
AG
5871(define-public python-notify2
5872 (package
5873 (name "python-notify2")
5874 (version "0.3.1")
5875 (source
5876 (origin
5877 (method url-fetch)
5878 (uri (pypi-uri "notify2" version))
5879 (sha256
5880 (base32
5881 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
5882 (build-system python-build-system)
5883 (arguments `(#:tests? #f)) ; tests depend on system state
5884 (native-inputs
5885 `(("python-dbus" ,python-dbus)))
5886 (home-page "https://bitbucket.org/takluyver/pynotify2")
5887 (synopsis "Python interface to D-Bus notifications")
5888 (description
5889 "Pynotify2 provides a Python interface for sending D-Bus notifications.
5890It is a reimplementation of pynotify in pure Python, and an alternative to
5891the GObject Introspection bindings to libnotify for non-GTK applications.")
5892 (license (list license:bsd-2
5893 license:lgpl2.1+))))
5894
5895(define-public python2-notify2
5896 (package-with-python2 python-notify2))
5897
44d10b1f
RW
5898;; beautifulsoup4 has a totally different namespace than 3.x,
5899;; and pypi seems to put it under its own name, so I guess we should too
5900(define-public python-beautifulsoup4
5901 (package
5902 (name "python-beautifulsoup4")
abb53e6f 5903 (version "4.7.1")
44d10b1f
RW
5904 (source
5905 (origin
5906 (method url-fetch)
5907 (uri (pypi-uri "beautifulsoup4" version))
5908 (sha256
5909 (base32
abb53e6f 5910 "0j2kycz2dxgx68xzjm7rxg5xn6v61gq5ifvxyg99slmqkybnal4l"))))
44d10b1f
RW
5911 (build-system python-build-system)
5912 (arguments
5913 `(#:phases
5914 (modify-phases %standard-phases
5915 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5916 ;; must use this conversion script when building with Python 3. The
5917 ;; conversion script also runs the tests.
5918 ;; For more information, see the file 'convert-py3k' in the source
5919 ;; distribution.
5920 (replace 'check
dff0197e 5921 (lambda _ (invoke "./convert-py3k"))))))
f83e10e4 5922 (propagated-inputs
abb53e6f 5923 `(("python-soupsieve" ,python-soupsieve)))
44d10b1f
RW
5924 (home-page
5925 "https://www.crummy.com/software/BeautifulSoup/bs4/")
5926 (synopsis
5927 "Python screen-scraping library")
5928 (description
5929 "Beautiful Soup is a Python library designed for rapidly setting up
5930screen-scraping projects. It offers Pythonic idioms for navigating,
5931searching, and modifying a parse tree, providing a toolkit for
5932dissecting a document and extracting what you need. It automatically
5933converts incoming documents to Unicode and outgoing documents to UTF-8.")
5934 (license license:expat)
5935 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5936
5937(define-public python2-beautifulsoup4
5938 (package
5939 (inherit (package-with-python2
5940 (strip-python2-variant python-beautifulsoup4)))
5941 (arguments `(#:python ,python-2))))
5942
ad74978a
BT
5943(define-public python-soupsieve
5944 (package
5945 (name "python-soupsieve")
3367df31 5946 (version "1.9.5")
ad74978a
BT
5947 (source
5948 (origin
5949 (method url-fetch)
5950 (uri (pypi-uri "soupsieve" version))
5951 (sha256
5952 (base32
3367df31 5953 "1nhd0q0ifwva9wn645s6pn74p1rd97asn3qfg75nphx1wkgcbhg2"))))
ad74978a
BT
5954 (build-system python-build-system)
5955 (arguments `(#:tests? #f))
5956 ;;XXX: 2 tests fail currently despite claming they were to be
5957 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
5958 ;;don't want to create a circular dependency.
5959 (home-page "https://github.com/facelessuser/soupsieve")
5960 (synopsis "CSS selector library")
5961 (description
5962 "Soup Sieve is a CSS selector library designed to be used with Beautiful
5963Soup 4. It aims to provide selecting, matching, and filtering using modern
5964CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
5965specifications up through the latest CSS level 4 drafts and beyond (though
5966some are not yet implemented).")
d00b83fb 5967 (properties `((python2-variant . ,(delay python2-soupsieve))))
ad74978a
BT
5968 (license license:expat)))
5969
5970(define-public python2-soupsieve
d00b83fb 5971 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
ad74978a
BT
5972 (package
5973 (inherit base)
5974 (propagated-inputs
d00b83fb
MB
5975 `(("python2-backports-functools-lru-cache"
5976 ,python2-backports-functools-lru-cache)
5977 ,@(package-propagated-inputs base))))))
ad74978a 5978
44d10b1f
RW
5979(define-public python-netifaces
5980 (package
5981 (name "python-netifaces")
5982 (version "0.10.7")
5983 (source
5984 (origin
5985 (method url-fetch)
5986 (uri (pypi-uri "netifaces" version))
5987 (sha256
5988 (base32
5989 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
5990 (build-system python-build-system)
5991 (home-page "https://github.com/al45tair/netifaces")
5992 (synopsis
5993 "Python module for portable network interface information")
5994 (description
5995 "Netifaces is a Python module providing information on network
5996interfaces in an easy and portable manner.")
5997 (license license:expat)))
5998
5999(define-public python2-netifaces
6000 (package-with-python2 python-netifaces))
6001
6002(define-public python-networkx
6003 (package
6004 (name "python-networkx")
6005 (version "2.2")
6006 (source
6007 (origin
6008 (method url-fetch)
6009 (uri (pypi-uri "networkx" version ".zip"))
6010 (sha256
6011 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
6012 (build-system python-build-system)
6013 ;; python-decorator is needed at runtime.
6014 (propagated-inputs
6015 `(("python-decorator" ,python-decorator)))
6016 (native-inputs
6017 `(("python-nose" ,python-nose)
6018 ("unzip" ,unzip)))
6019 (home-page "https://networkx.github.io/")
6020 (synopsis "Python module for creating and manipulating graphs and networks")
6021 (description
6022 "NetworkX is a Python package for the creation, manipulation, and study
6023of the structure, dynamics, and functions of complex networks.")
6024 (license license:bsd-3)))
6025
6026(define-public python2-networkx
6027 (package-with-python2 python-networkx))
6028
6029(define-public python-datrie
6030 (package
6031 (name "python-datrie")
0b58cb42 6032 (version "0.8")
44d10b1f
RW
6033 (source
6034 (origin
6035 (method url-fetch)
6036 (uri (pypi-uri "datrie" version))
6037 (sha256
6038 (base32
0b58cb42 6039 "0338r8xgmpy78556jhms0h6qkvyjr10p8bpgdvcpqzm9lrmxmmdx"))))
44d10b1f 6040 (build-system python-build-system)
44d10b1f
RW
6041 (native-inputs
6042 `(("python-cython" ,python-cython)
6043 ("python-hypothesis" ,python-hypothesis)
6044 ("python-pytest" ,python-pytest)
6045 ("python-pytest-runner" ,python-pytest-runner)))
6046 (home-page "https://github.com/kmike/datrie")
6047 (synopsis "Fast, efficiently stored trie for Python")
6048 (description
6049 "This package provides a fast, efficiently stored trie implementation for
6050Python.")
6051 (license license:lgpl2.1+)))
6052
6053(define-public snakemake
6054 (package
6055 (name "snakemake")
93803c6b 6056 (version "5.7.1")
44d10b1f
RW
6057 (source
6058 (origin
6059 (method url-fetch)
6060 (uri (pypi-uri "snakemake" version))
6061 (sha256
93803c6b 6062 (base32 "1pnpvvn8n2a78cg360wz3ldmpqrsm2wzi0c0dmvki9fnsw6fxdas"))))
44d10b1f
RW
6063 (build-system python-build-system)
6064 (arguments
6065 ;; TODO: Package missing test dependencies.
6066 '(#:tests? #f
6067 #:phases
6068 (modify-phases %standard-phases
6069 ;; For cluster execution Snakemake will call Python. Since there is
6070 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
6071 ;; this by calling the snakemake wrapper instead.
6072 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
6073 (lambda* (#:key outputs #:allow-other-keys)
6074 (substitute* "snakemake/executors.py"
6075 (("\\{sys.executable\\} -m snakemake")
6076 (string-append (assoc-ref outputs "out")
6077 "/bin/snakemake")))
6078 #t)))))
6079 (propagated-inputs
8994ae34 6080 `(("python-appdirs" ,python-appdirs)
44d10b1f
RW
6081 ("python-configargparse" ,python-configargparse)
6082 ("python-datrie" ,python-datrie)
6083 ("python-docutils" ,python-docutils)
8994ae34 6084 ("python-gitpython" ,python-gitpython)
44d10b1f
RW
6085 ("python-jinja2" ,python-jinja2)
6086 ("python-jsonschema" ,python-jsonschema)
6087 ("python-networkx" ,python-networkx)
93803c6b 6088 ("python-psutil" ,python-psutil)
44d10b1f 6089 ("python-pyyaml" ,python-pyyaml)
8994ae34
TGR
6090 ("python-ratelimiter" ,python-ratelimiter)
6091 ("python-requests" ,python-requests)
6092 ("python-wrapt" ,python-wrapt)))
44d10b1f
RW
6093 (home-page "https://snakemake.readthedocs.io")
6094 (synopsis "Python-based execution environment for make-like workflows")
6095 (description
6096 "Snakemake aims to reduce the complexity of creating workflows by
6097providing a clean and modern domain specific specification language (DSL) in
6098Python style, together with a fast and comfortable execution environment.")
6099 (license license:expat)))
6100
44d10b1f
RW
6101(define-public python-pyqrcode
6102 (package
6103 (name "python-pyqrcode")
6104 (version "1.2.1")
6105 (source
6106 (origin
6107 (method url-fetch)
6108 (uri (pypi-uri "PyQRCode" version))
6109 (sha256
6110 (base32
6111 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
6112 (build-system python-build-system)
6113 (home-page
6114 "https://github.com/mnooner256/pyqrcode")
6115 (synopsis "QR code generator")
6116 (description
6117 "Pyqrcode is a QR code generator written purely in Python with
6118SVG, EPS, PNG and terminal output.")
6119 (license license:bsd-3)))
6120
6121(define-public python-seaborn
6122 (package
6123 (name "python-seaborn")
6124 (version "0.9.0")
6125 (source
6126 (origin
6127 (method url-fetch)
6128 (uri (pypi-uri "seaborn" version))
6129 (sha256
f9bd82e7
RW
6130 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))
6131 (patches
6132 (list (origin
6133 (method url-fetch)
6134 ;; This has already been merged, but there is no new
6135 ;; release including this patch. It fixes problems
6136 ;; with axis rotation that would lead to test
6137 ;; failures.
6138 (uri "https://patch-diff.githubusercontent.com/raw/mwaskom/seaborn/pull/1716.diff")
6139 (sha256
6140 (base32
6141 "1lm870z316n9ivsyr86hpk1gxaraw0mrjvq42lqsm0znhjdp9q9w"))
6142 (file-name "seaborn-0.9.0-axis-rotation.patch"))))))
44d10b1f
RW
6143 (build-system python-build-system)
6144 (arguments
6145 `(#:phases
6146 (modify-phases %standard-phases
6147 (add-before 'check 'start-xserver
6148 (lambda* (#:key inputs #:allow-other-keys)
6149 (let ((xorg-server (assoc-ref inputs "xorg-server")))
6150 ;; There must be a running X server and make check doesn't
6151 ;; start one. Therefore we must do it.
6152 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
6153 (setenv "DISPLAY" ":1")
6154 #t)))
a1322765
RW
6155 (add-after 'unpack 'fix-tests
6156 (lambda _
6157 ;; test_cbar_ticks fails probably because of matplotlib's
6158 ;; expectation of using an older version of FreeType.
6159 (delete-file "seaborn/tests/test_matrix.py")
6160 #t))
44d10b1f
RW
6161 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
6162 (propagated-inputs
6163 `(("python-pandas" ,python-pandas)
6164 ("python-matplotlib" ,python-matplotlib)
6165 ("python-numpy" ,python-numpy)
6166 ("python-scipy" ,python-scipy)))
6167 (native-inputs
6168 `(("python-pytest" ,python-pytest)
ff337525 6169 ("xorg-server" ,xorg-server-for-tests)))
d3d73bd6 6170 (home-page "https://seaborn.pydata.org/")
44d10b1f
RW
6171 (synopsis "Statistical data visualization")
6172 (description
6173 "Seaborn is a library for making attractive and informative statistical
6174graphics in Python. It is built on top of matplotlib and tightly integrated
6175with the PyData stack, including support for numpy and pandas data structures
6176and statistical routines from scipy and statsmodels.")
6177 (license license:bsd-3)))
6178
6179(define-public python2-seaborn
6180 (package-with-python2 python-seaborn))
6181
6182(define-public python-mpmath
6183 (package
6184 (name "python-mpmath")
6185 (version "0.19")
6186 (source (origin
6187 (method url-fetch)
6188 (uri (string-append "http://mpmath.org/files/mpmath-"
6189 version ".tar.gz"))
6190 (sha256
6191 (base32
6192 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
6193 (build-system python-build-system)
6194 (arguments
6195 '(#:phases
6196 (modify-phases %standard-phases
6197 (replace 'check
6198 (lambda _
5d7a6f1c 6199 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
44d10b1f
RW
6200 (home-page "http://mpmath.org")
6201 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6202 (description
6203 "@code{mpmath} can be used as an arbitrary-precision substitute for
6204Python's float/complex types and math/cmath modules, but also does much
6205more advanced mathematics.")
6206 (license license:bsd-3)))
6207
6208(define-public python2-mpmath
6209 (package-with-python2 python-mpmath))
6210
6211(define-public python-bigfloat
6212 (package
6213 (name "python-bigfloat")
6214 (version "0.3.0")
6215 (source
6216 (origin
6217 (method url-fetch)
6218 (uri (pypi-uri "bigfloat" version))
6219 (sha256
6220 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
6221 (build-system python-build-system)
6222 (inputs
6223 `(("mpfr" ,mpfr)))
6224 (home-page "https://github.com/mdickinson/bigfloat")
6225 (synopsis "Arbitrary precision floating-point arithmetic for Python")
6226 (description
e36de31b 6227 "This package provides a Python interface to the MPFR library for
44d10b1f
RW
6228multiprecision arithmetic.")
6229 (license license:lgpl3+)))
6230
6231(define-public python2-bigfloat
6232 (package-with-python2 python-bigfloat))
6233
6234(define-public python-sympy
6235 (package
6236 (name "python-sympy")
6237 (version "1.1.1")
6238 (source
6239 (origin
6240 (method url-fetch)
6241 (uri (string-append
6242 "https://github.com/sympy/sympy/releases/download/sympy-"
6243 version "/sympy-" version ".tar.gz"))
6244 (sha256
6245 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
6246 (build-system python-build-system)
6247 (arguments
6248 `(#:phases
6249 (modify-phases %standard-phases
6250 ;; Run the core tests after installation. By default it would run
6251 ;; *all* tests, which take a very long time to complete and are known
6252 ;; to be flaky.
6253 (delete 'check)
6254 (add-after 'install 'check
6255 (lambda* (#:key outputs #:allow-other-keys)
6256 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
6257 #t)))))
6258 (propagated-inputs
6259 `(("python-mpmath" ,python-mpmath)))
2f35985c 6260 (home-page "https://www.sympy.org/")
44d10b1f
RW
6261 (synopsis "Python library for symbolic mathematics")
6262 (description
6263 "SymPy is a Python library for symbolic mathematics. It aims to become a
6264full-featured computer algebra system (CAS) while keeping the code as simple
6265as possible in order to be comprehensible and easily extensible.")
6266 (license license:bsd-3)))
6267
6268(define-public python2-sympy
6269 (package
6270 (inherit (package-with-python2 python-sympy))
6271 (arguments
6272 `(#:phases
6273 (modify-phases %standard-phases
6274 ;; Run the core tests after installation. By default it would run
6275 ;; *all* tests, which take a very long time to complete and are known
6276 ;; to be flaky.
6277 (delete 'check)
6278 (add-after 'install 'check
6279 (lambda* (#:key outputs #:allow-other-keys)
6280 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
6281 #t)))))))
6282
6283(define-public python-q
6284 (package
6285 (name "python-q")
6286 (version "2.6")
6287 (source
6288 (origin
6289 (method url-fetch)
6290 (uri (pypi-uri "q" version))
6291 (sha256
6292 (base32
6293 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6294 (build-system python-build-system)
6295 (home-page "https://github.com/zestyping/q")
6296 (synopsis "Quick-and-dirty debugging output for tired programmers")
6297 (description
6298 "q is a Python module for \"print\" style of debugging Python code. It
6299provides convenient short API for print out of values, tracebacks, and
6300falling into the Python interpreter.")
6301 (license license:asl2.0)))
6302
6303(define-public python2-q
6304 (package-with-python2 python-q))
6305
6306(define-public python2-xlib
6307 (package
6308 (name "python2-xlib")
6309 (version "0.14")
6310 (source (origin
6311 (method url-fetch)
6312 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6313 "/" version "/"
6314 "python-xlib-" version ".tar.gz"))
6315 (sha256
6316 (base32
6317 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6318 (build-system python-build-system)
6319 (arguments
6320 `(#:python ,python-2 ;Python 2 only
6321 #:tests? #f)) ;no tests
6322 (home-page "http://python-xlib.sourceforge.net/")
6323 (synopsis "Python X11 client library")
6324 (description
6325 "The Python X Library is intended to be a fully functional X client
6326library for Python programs. It is useful to implement low-level X clients.
6327It is written entirely in Python.")
6328 (license license:gpl2+)))
6329
6330(define-public python-singledispatch
6331 (package
6332 (name "python-singledispatch")
6333 (version "3.4.0.3")
6334 (source
6335 (origin
6336 (method url-fetch)
6337 (uri (pypi-uri "singledispatch" version))
6338 (sha256
6339 (base32
6340 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6341 (build-system python-build-system)
6342 (native-inputs
6343 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6344 (home-page
8680eff3 6345 "https://docs.python.org/3/library/functools.html#functools.singledispatch")
44d10b1f
RW
6346 (synopsis "Backport of singledispatch feature from Python 3.4")
6347 (description
6348 "This library brings functools.singledispatch from Python 3.4 to Python
63492.6-3.3.")
6350 (license license:expat)))
6351
6352(define-public python2-singledispatch
6353 (package-with-python2 python-singledispatch))
6354
6355;; the python- version can be removed with python-3.5
6356(define-public python-backports-abc
6357 (package
6358 (name "python-backports-abc")
6359 (version "0.5")
6360 (source
6361 (origin
6362 (method url-fetch)
6363 (uri (pypi-uri "backports_abc" version))
6364 (sha256
6365 (base32
6366 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6367 (build-system python-build-system)
6368 (home-page "https://github.com/cython/backports_abc")
6369 (synopsis "Backport of additions to the 'collections.abc' module")
6370 (description
6371 "Python-backports-abc provides a backport of additions to the
36a4366d 6372@code{collections.abc} module in Python-3.5.")
44d10b1f
RW
6373 (license license:psfl)))
6374
6375(define-public python2-backports-abc
6376 (package-with-python2 python-backports-abc))
6377
6378(define-public python-backports-csv
6379 (package
6380 (name "python-backports-csv")
6381 (version "1.0.5")
6382 (source
6383 (origin
6384 (method url-fetch)
6385 (uri (pypi-uri "backports.csv" version))
6386 (sha256
6387 (base32
6388 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
6389 (build-system python-build-system)
6390 (home-page "https://github.com/ryanhiebert/backports.csv")
6391 (synopsis "Backport of Python 3's csv module for Python 2")
6392 (description
6393 "Provides a backport of Python 3's @code{csv} module for parsing
6394comma separated values. The API of the @code{csv} module in Python 2
6395is drastically different from the @code{csv} module in Python 3.
6396This is due, for the most part, to the difference between str in
6397Python 2 and Python 3.")
6398 (license license:psfl)))
6399
6400(define-public python2-backports-csv
6401 (package-with-python2 python-backports-csv))
6402
6403(define-public python2-backports-shutil-get-terminal-size
6404 (package
6405 (name "python2-backports-shutil-get-terminal-size")
6406 (version "1.0.0")
6407 (source
6408 (origin
6409 (method url-fetch)
6410 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6411 (sha256
6412 (base32
6413 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6414 (build-system python-build-system)
6415 (arguments
6416 `(#:python ,python-2
6417 #:phases
6418 (modify-phases %standard-phases
6419 (replace 'check
6420 (lambda _
4a4a7d9a 6421 (invoke "py.test" "-v"))))))
44d10b1f
RW
6422 (native-inputs
6423 `(("python2-pytest" ,python2-pytest)))
6424 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6425 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6426 (description
6427 "This package provides a backport of the @code{get_terminal_size
6428function} from Python 3.3's @code{shutil}.
6429Unlike the original version it is written in pure Python rather than C,
6430so it might be a tiny bit slower.")
6431 (license license:expat)))
6432
6433(define-public python-waf
6434 (package
6435 (name "python-waf")
6c2c11fa 6436 (version "2.0.19")
44d10b1f
RW
6437 (source (origin
6438 (method url-fetch)
6439 (uri (string-append "https://waf.io/"
6440 "waf-" version ".tar.bz2"))
6441 (sha256
6442 (base32
6c2c11fa 6443 "19dvqbsvxz7ch03dh1v0znklrwxlz6yzddc3k9smzrrgny4jch6q"))))
44d10b1f
RW
6444 (build-system python-build-system)
6445 (arguments
6446 '(#:phases
6447 (modify-phases %standard-phases
6448 (replace 'build
6449 (lambda _
633c8b71
MO
6450 ;; XXX: Find a way to add all extra tools.
6451 (let ((tools '("gccdeps"
6452 "clang_compilation_database")))
6453 (invoke "python" "waf-light" "configure" "build"
6454 (string-append "--tools="
6455 (string-join tools ","))))))
44d10b1f
RW
6456 (replace 'check
6457 (lambda _
6458 (invoke "python" "waf" "--version")))
6459 (replace 'install
6460 (lambda* (#:key outputs #:allow-other-keys)
6461 (let ((out (assoc-ref outputs "out")))
6462 (install-file "waf" (string-append out "/bin")))
6463 #t))
6464 ;; waf breaks when it is wrapped.
6465 (delete 'wrap))))
6466 (home-page "https://waf.io/")
6467 (synopsis "Python-based build system")
6468 (description
6469 "Waf is a Python-based framework for configuring, compiling and installing
6470applications.")
6471 (license license:bsd-3)))
6472
6473(define-public python2-waf
6474 (package-with-python2 python-waf))
6475
6476(define-public python-pyzmq
6477 (package
6478 (name "python-pyzmq")
6479 (version "17.1.2")
6480 (source
6481 (origin
6482 (method url-fetch)
6483 (uri (pypi-uri "pyzmq" version))
6484 (sha256
6485 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
6486 (build-system python-build-system)
6487 (arguments
6488 `(#:configure-flags
6489 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6490 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6491 ;; --inplace' for 'python setup.py test' to work.
6492 #:tests? #f))
6493 (inputs
6494 `(("zeromq" ,zeromq)))
6495 (native-inputs
6496 `(("pkg-config" ,pkg-config)
6497 ("python-nose" ,python-nose)))
6498 (home-page "https://github.com/zeromq/pyzmq")
6499 (synopsis "Python bindings for 0MQ")
6500 (description
6501 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6502 (license license:bsd-4)))
6503
6504(define-public python2-pyzmq
6505 (package-with-python2 python-pyzmq))
6506
6507(define-public python-pep8
6508 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
6509 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
6510 ;; some dependents' test suites, and nothing more.
6511 (package
6512 (name "python-pep8")
6513 (version "1.7.0")
6514 (source
6515 (origin
6516 (method url-fetch)
6517 (uri (pypi-uri "pep8" version))
6518 (sha256
6519 (base32
2be878d8
CB
6520 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
6521 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
44d10b1f
RW
6522 (build-system python-build-system)
6523 (home-page "https://pep8.readthedocs.org/")
6524 (synopsis "Python style guide checker")
6525 (description
6526 "This tools checks Python code against some of the style conventions in
6527PEP 8.")
6528 (license license:expat)))
6529
6530(define-public python2-pep8
6531 (package-with-python2 python-pep8))
6532
6533(define-public python-pyflakes
6534 (package
6535 (name "python-pyflakes")
d0cba11b 6536 (version "2.1.1")
44d10b1f
RW
6537 (source
6538 (origin
6539 (method url-fetch)
6540 (uri (pypi-uri "pyflakes" version))
6541 (sha256
6542 (base32
d0cba11b 6543 "18pq95a1xj2dgdd0m85gyfsn40jajj4xc3lp8wfv7igqhrc86xnr"))))
44d10b1f
RW
6544 (build-system python-build-system)
6545 (home-page
6546 "https://github.com/pyflakes/pyflakes")
6547 (synopsis "Passive checker of Python programs")
6548 (description
6549 "Pyflakes statically checks Python source code for common errors.")
6550 (license license:expat)))
6551
6552(define-public python2-pyflakes
6553 (package-with-python2 python-pyflakes))
6554
6555(define-public python-mccabe
6556 (package
6557 (name "python-mccabe")
6558 (version "0.6.1")
6559 (source
6560 (origin
6561 (method url-fetch)
6562 (uri (pypi-uri "mccabe" version))
6563 (sha256
6564 (base32
6565 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
6566 (build-system python-build-system)
6567 (native-inputs
6568 `(("python-pytest" ,python-pytest-bootstrap)
6569 ("python-pytest-runner" ,python-pytest-runner)))
6570 (home-page "https://github.com/flintwork/mccabe")
6571 (synopsis "McCabe checker, plugin for flake8")
6572 (description
6573 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6574complexity of Python source code.")
6575 (license license:expat)))
6576
6577(define-public python2-mccabe
6578 (package-with-python2 python-mccabe))
6579
6580(define-public python-mccabe-0.2.1
6581 (package (inherit python-mccabe)
6582 (version "0.2.1")
6583 (source
6584 (origin
6585 (method url-fetch)
6586 (uri (pypi-uri "mccabe" version))
6587 (sha256
6588 (base32
6589 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6590
6591(define-public python2-mccabe-0.2.1
6592 (package-with-python2 python-mccabe-0.2.1))
6593
6594;; Flake8 2.4.1 requires an older version of pep8.
6595;; This should be removed ASAP.
6596(define-public python-pep8-1.5.7
6597 (package (inherit python-pep8)
6598 (version "1.5.7")
6599 (source
f3576970
RW
6600 (origin
6601 (method url-fetch)
6602 (uri (pypi-uri "pep8" version))
6603 (sha256
6604 (base32
6605 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
44d10b1f
RW
6606 (arguments
6607 ;; XXX Tests not compatible with Python 3.5.
6608 '(#:tests? #f))))
6609
6610(define-public python2-pep8-1.5.7
6611 (package-with-python2 python-pep8-1.5.7))
6612
6613;; Flake8 2.4.1 requires an older version of pyflakes.
6614;; This should be removed ASAP.
6615(define-public python-pyflakes-0.8.1
6616 (package (inherit python-pyflakes)
6617 (version "0.8.1")
6618 (source
8c4dffb5
RW
6619 (origin
6620 (method url-fetch)
6621 (uri (pypi-uri "pyflakes" version))
6622 (sha256
6623 (base32
6624 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
44d10b1f
RW
6625 (arguments
6626 ;; XXX Tests not compatible with Python 3.5.
6627 '(#:tests? #f))))
6628
6629(define-public python2-pyflakes-0.8.1
6630 (package-with-python2 python-pyflakes-0.8.1))
6631
ac63cf0a 6632(define-public python-flake8
44d10b1f
RW
6633 (package
6634 (name "python-flake8")
beaff4a8 6635 (version "3.7.7")
ac63cf0a
MB
6636 (source (origin
6637 (method url-fetch)
6638 (uri (pypi-uri "flake8" version))
6639 (sha256
6640 (base32
beaff4a8 6641 "0qg6zggqigrd4k3gv88shd1a27d0cwgfql8vfiq2c7rl7w3rd6c5"))))
44d10b1f
RW
6642 (build-system python-build-system)
6643 (arguments
6644 `(#:phases
6645 (modify-phases %standard-phases
44d10b1f
RW
6646 (delete 'check)
6647 (add-after 'install 'check
6648 (lambda* (#:key inputs outputs #:allow-other-keys)
6649 (add-installed-pythonpath inputs outputs)
6650 (invoke "pytest" "-v")
6651 #t)))))
6652 (propagated-inputs
6653 `(("python-pycodestyle" ,python-pycodestyle)
beaff4a8 6654 ("python-entrypoints" ,python-entrypoints)
44d10b1f
RW
6655 ("python-pyflakes" ,python-pyflakes)
6656 ("python-mccabe" ,python-mccabe)))
6657 (native-inputs
6658 `(("python-mock" ,python-mock)
6659 ("python-pytest" ,python-pytest-bootstrap)
6660 ("python-pytest-runner" ,python-pytest-runner)))
6661 (home-page "https://gitlab.com/pycqa/flake8")
6662 (synopsis
6663 "The modular source code checker: pep8, pyflakes and co")
6664 (description
6665 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
ac63cf0a 6666 (properties `((python2-variant . ,(delay python2-flake8))))
44d10b1f
RW
6667 (license license:expat)))
6668
ac63cf0a
MB
6669(define-public python2-flake8
6670 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
44d10b1f
RW
6671 (package (inherit base)
6672 (propagated-inputs
6673 `(("python2-configparser" ,python2-configparser)
6674 ("python2-enum34" ,python2-enum34)
beaff4a8 6675 ("python2-typing" ,python2-typing)
44d10b1f
RW
6676 ,@(package-propagated-inputs base))))))
6677
44d10b1f
RW
6678;; python-hacking requires flake8 <2.6.0.
6679(define-public python-flake8-2.5
6680 (package
6681 (inherit python-flake8)
6682 (version "2.5.5")
6683 (source (origin
6684 (method url-fetch)
6685 (uri (pypi-uri "flake8" version))
6686 (sha256
6687 (base32
6688 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
6689 (propagated-inputs
6690 `(("python-pep8" ,python-pep8)
6691 ,@(package-propagated-inputs python-flake8)))
6692 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
6693
6694(define-public python2-flake8-2.5
6695 (package
6696 (inherit python2-flake8)
6697 (version (package-version python-flake8-2.5))
6698 (source (origin
6699 (inherit (package-source python-flake8-2.5))))
6700 (propagated-inputs
6701 `(("python2-pep8" ,python2-pep8)
6702 ,@(package-propagated-inputs python2-flake8)))))
6703
6704(define-public python-flake8-polyfill
6705 (package
6706 (name "python-flake8-polyfill")
6707 (version "1.0.2")
6708 (source
6709 (origin
6710 (method url-fetch)
6711 (uri (pypi-uri "flake8-polyfill" version))
6712 (sha256
6713 (base32
6714 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
6715 (build-system python-build-system)
6716 (arguments
6717 '(#:phases
6718 (modify-phases %standard-phases
6719 (replace 'check
6720 (lambda _
40a7153d
MB
6721 ;; Be compatible with Pytest 4:
6722 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
6723 (substitute* "setup.cfg"
6724 (("\\[pytest\\]")
6725 "[tool:pytest]"))
6726
44d10b1f
RW
6727 (setenv "PYTHONPATH"
6728 (string-append (getcwd) "/build/lib:"
6729 (getenv "PYTHONPATH")))
4f0a0894 6730 (invoke "py.test" "-v"))))))
44d10b1f
RW
6731 (native-inputs
6732 `(("python-flake8" ,python-flake8)
6733 ("python-mock" ,python-mock)
6734 ("python-pep8" ,python-pep8)
6735 ("python-pycodestyle" ,python-pycodestyle)
6736 ("python-pytest" ,python-pytest)))
6737 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6738 (synopsis "Polyfill package for Flake8 plugins")
6739 (description
6740 "This package that provides some compatibility helpers for Flake8
6741plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6742 (license license:expat)))
6743
6744(define-public python2-flake8-polyfill
6745 (package-with-python2 python-flake8-polyfill))
6746
6747(define-public python-mistune
6748 (package
6749 (name "python-mistune")
6750 (version "0.8.4")
6751 (source
6752 (origin
6753 (method url-fetch)
6754 (uri (pypi-uri "mistune" version))
6755 (sha256
6756 (base32
6757 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
6758 (build-system python-build-system)
6759 (native-inputs
6760 `(("python-nose" ,python-nose)
6761 ("python-cython" ,python-cython)))
6762 (home-page "https://github.com/lepture/mistune")
6763 (synopsis "Markdown parser in pure Python")
6764 (description "This package provides a fast markdown parser in pure
6765Python.")
6766 (license license:bsd-3)))
6767
6768(define-public python2-mistune
6769 (package-with-python2 python-mistune))
6770
6771(define-public python-markdown
6772 (package
6773 (name "python-markdown")
0d1d0a6e 6774 (version "3.2.1")
44d10b1f
RW
6775 (source
6776 (origin
6777 (method url-fetch)
6778 (uri (pypi-uri "Markdown" version))
6779 (sha256
6780 (base32
0d1d0a6e 6781 "00k91gwhxnm8jdnm2v5xjz9irj6dbi7afywz2hpakqdbxs1ydzlh"))))
44d10b1f
RW
6782 (build-system python-build-system)
6783 (native-inputs
6784 `(("python-nose" ,python-nose)
6785 ("python-pyyaml" ,python-pyyaml)))
6786 (home-page "https://python-markdown.github.io/")
6787 (synopsis "Python implementation of Markdown")
6788 (description
6789 "This package provides a Python implementation of John Gruber's
6790Markdown. The library features international input, various Markdown
6791extensions, and several HTML output formats. A command line wrapper
6792markdown_py is also provided to convert Markdown files to HTML.")
2537ce68 6793 (properties `((python2-variant . ,(delay python2-markdown))))
44d10b1f
RW
6794 (license license:bsd-3)))
6795
2537ce68 6796;; Markdown 3.2 dropped support for Python 2.
44d10b1f 6797(define-public python2-markdown
2537ce68
MB
6798 (let ((base (package-with-python2 (strip-python2-variant python-markdown))))
6799 (package/inherit
6800 base
6801 (version "3.1.1")
6802 (source (origin
6803 (method url-fetch)
6804 (uri (pypi-uri "Markdown" version))
6805 (sha256
6806 (base32
6807 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f")))))))
44d10b1f
RW
6808
6809(define-public python-ptyprocess
6810 (package
6811 (name "python-ptyprocess")
6812 (version "0.5.2")
6813 (source
6814 (origin
6815 (method url-fetch)
6816 (uri (pypi-uri "ptyprocess" version))
6817 (sha256
6818 (base32
6819 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
6820 (build-system python-build-system)
6821 (native-inputs
6822 `(("python-nose" ,python-nose)))
6823 (arguments
6824 `(#:phases
6825 (modify-phases %standard-phases
6826 (replace 'check
7904d6fa 6827 (lambda _ (invoke "nosetests"))))))
44d10b1f
RW
6828 (home-page "https://github.com/pexpect/ptyprocess")
6829 (synopsis "Run a subprocess in a pseudo terminal")
6830 (description
6831 "This package provides a Python library used to launch a subprocess in a
6832pseudo terminal (pty), and interact with both the process and its pty.")
6833 (license license:isc)))
6834
6835(define-public python2-ptyprocess
6836 (package-with-python2 python-ptyprocess))
6837
6838(define-public python-cram
6839 (package
6840 (name "python-cram")
6841 (version "0.7")
6842 (home-page "https://bitheap.org/cram/")
6843 (source (origin
6844 (method url-fetch)
6845 (uri (list (string-append home-page "cram-"
6846 version ".tar.gz")
6847 (pypi-uri "cram" version)))
6848 (sha256
6849 (base32
6850 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6851 (arguments
6852 '(#:phases
6853 (modify-phases %standard-phases
6854 (add-after 'unpack 'patch-source
6855 (lambda _
6856 (substitute* (find-files "cram" ".*\\.py$")
6857 ;; Replace default shell path.
6858 (("/bin/sh") (which "sh")))
6859 (substitute* (find-files "tests" ".*\\.t$")
6860 (("md5") "md5sum")
6861 (("/bin/bash") (which "bash"))
6862 (("/bin/sh") (which "sh")))
6863 (substitute* "cram/_test.py"
6864 ;; This hack works around a bug triggered by substituting
6865 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6866 ;; "cram -h", which breaks the output at 80 characters. This
6867 ;; causes the line showing the default shell to break into two
6868 ;; lines, but the test expects a single line...
6869 (("env\\['COLUMNS'\\] = '80'")
6870 "env['COLUMNS'] = '160'"))
ff1e80d7
MB
6871
6872 (substitute* "Makefile"
6873 ;; Recent versions of python-coverage have caused the test
6874 ;; coverage to decrease (as of version 0.7). Allow that.
6875 (("--fail-under=100")
6876 "--fail-under=90"))
6877
44d10b1f 6878 #t))
ff1e80d7 6879 (replace 'check
44d10b1f 6880 ;; The test phase uses the built library and executable.
44d10b1f
RW
6881 (lambda* (#:key inputs outputs #:allow-other-keys)
6882 (add-installed-pythonpath inputs outputs)
6883 (setenv "PATH" (string-append (getenv "PATH") ":"
6884 (assoc-ref outputs "out") "/bin"))
2d7db192 6885 (invoke "make" "test"))))))
44d10b1f
RW
6886 (build-system python-build-system)
6887 (native-inputs
6888 `(("python-coverage" ,python-coverage)
6889 ("which" ,which)))
6890 (synopsis "Simple testing framework for command line applications")
6891 (description
6892 "Cram is a functional testing framework for command line applications.
6893Cram tests look like snippets of interactive shell sessions. Cram runs each
6894command and compares the command output in the test with the command’s actual
6895output.")
6896 (license license:gpl2+)))
6897
6898(define-public python2-cram
6899 (package-with-python2 python-cram))
6900
6901(define-public python-straight-plugin
6902 (package
6903 (name "python-straight-plugin")
6904 (version "1.4.1")
6905 (source
6906 (origin
6907 (method url-fetch)
6908 (uri (pypi-uri "straight.plugin" version))
6909 (sha256
6910 (base32
6911 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6912 (build-system python-build-system)
6913 (home-page "https://github.com/ironfroggy/straight.plugin")
6914 (synopsis "Simple namespaced plugin facility")
6915 (description "Straight Plugin provides a type of plugin you can create from
6916almost any existing Python modules, and an easy way for outside developers to
6917add functionality and customization to your projects with their own plugins.")
6918 (license license:expat)))
6919
6920(define-public python2-straight-plugin
6921 (package-with-python2 python-straight-plugin))
6922
6923(define-public python-fonttools
6924 (package
6925 (name "python-fonttools")
1a4bb420 6926 (version "3.38.0")
44d10b1f
RW
6927 (source (origin
6928 (method url-fetch)
6929 (uri (pypi-uri "fonttools" version ".zip"))
6930 (sha256
6931 (base32
1a4bb420 6932 "12ripk3s7skgxr1bs9r8n13r94ym3s8iir7ivfixls9fa4dabmlh"))))
44d10b1f
RW
6933 (build-system python-build-system)
6934 (native-inputs
6935 `(("unzip" ,unzip)
6936 ("python-pytest" ,python-pytest)
6937 ("python-pytest-runner" ,python-pytest-runner)))
9d25a454 6938 (home-page "https://github.com/fonttools/fonttools")
44d10b1f
RW
6939 (synopsis "Tools to manipulate font files")
6940 (description
6941 "FontTools/TTX is a library to manipulate font files from Python. It
6942supports reading and writing of TrueType/OpenType fonts, reading and writing
6943of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6944also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6945from an XML-based format.")
6946 (license license:expat)))
6947
6948(define-public python2-fonttools
6949 (package-with-python2 python-fonttools))
6950
6951(define-public python-ly
6952 (package
6953 (name "python-ly")
6954 (version "0.9.5")
6955 (source
6956 (origin
6957 (method url-fetch)
6958 (uri (pypi-uri name version))
6959 (sha256
6960 (base32
6961 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
6962 (build-system python-build-system)
6963 (arguments
6964 ;; FIXME: Some tests need network access.
6965 '(#:tests? #f))
6966 (synopsis "Tool and library for manipulating LilyPond files")
6967 (description "This package provides a Python library to parse, manipulate
6968or create documents in LilyPond format. A command line program ly is also
6969provided that can be used to do various manipulations with LilyPond files.")
e85af137 6970 (home-page "https://pypi.org/project/python-ly/")
44d10b1f
RW
6971 (license license:gpl2+)))
6972
6973(define-public python-appdirs
6974 (package
6975 (name "python-appdirs")
6976 (version "1.4.3")
6977 (source
6978 (origin
6979 (method url-fetch)
6980 (uri (pypi-uri "appdirs" version))
6981 (sha256
6982 (base32
6983 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
6984 (build-system python-build-system)
6985 (home-page "https://github.com/ActiveState/appdirs")
6986 (synopsis
6987 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6988 (description
6989 "This module provides a portable way of finding out where user data
6990should be stored on various operating systems.")
6991 (license license:expat)))
6992
6993(define-public python2-appdirs
6994 (package-with-python2 python-appdirs))
6995
6996(define-public python-llfuse
6997 (package
6998 (name "python-llfuse")
6999 (version "1.3.5")
7000 (source (origin
7001 (method url-fetch)
7002 (uri (pypi-uri "llfuse" version ".tar.bz2"))
7003 (sha256
7004 (base32
7005 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
7006 (build-system python-build-system)
7007 (inputs
7008 `(("fuse" ,fuse)
7009 ("attr" ,attr)))
7010 (native-inputs
7011 `(("pkg-config" ,pkg-config)))
7012 (synopsis "Python bindings for FUSE")
7013 (description
7014 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
7015 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
7016 (license license:lgpl2.0+)
7017 (properties `((python2-variant . ,(delay python2-llfuse))))))
7018
7019(define-public python2-llfuse
7020 (package (inherit (package-with-python2
7021 (strip-python2-variant python-llfuse)))
7022 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
7023
7024;; For attic-0.16
7025(define-public python-llfuse-0.41
7026 (package (inherit python-llfuse)
7027 (version "0.41.1")
7028 (source (origin
7029 (method url-fetch)
7030 (uri (string-append
7031 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
7032 "llfuse-" version ".tar.bz2"))
7033 (sha256
7034 (base32
7035 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
7036 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
7037 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
7038 (license (list license:expat license:lgpl2.0+))))
7039
7040(define-public python-msgpack
7041 (package
7042 (name "python-msgpack")
7043 (version "0.5.6")
7044 (source (origin
7045 (method url-fetch)
7046 (uri (pypi-uri "msgpack" version))
7047 (sha256
7048 (base32
7049 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
7050 (build-system python-build-system)
7051 (arguments
7052 `(#:modules ((guix build utils)
7053 (guix build python-build-system)
7054 (ice-9 ftw)
7055 (srfi srfi-1)
7056 (srfi srfi-26))
7057 #:phases
7058 (modify-phases %standard-phases
7059 (replace 'check
7060 (lambda _
7061 (let ((cwd (getcwd)))
7062 (setenv "PYTHONPATH"
7063 (string-append cwd "/build/"
7064 (find (cut string-prefix? "lib" <>)
7065 (scandir (string-append cwd "/build")))
7066 ":"
7067 (getenv "PYTHONPATH")))
7068 (invoke "pytest" "-v" "test")))))))
7069 (native-inputs
7070 `(("python-pytest" ,python-pytest)))
7071 (synopsis "MessagePack (de)serializer")
7072 (description "MessagePack is a fast, compact binary serialization format,
7073suitable for similar data to JSON. This package provides CPython bindings for
7074reading and writing MessagePack data.")
e85af137 7075 (home-page "https://pypi.org/project/msgpack/")
44d10b1f
RW
7076 (license license:asl2.0)))
7077
7078;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
7079;; release 0.5. Some packages like borg still call it by the old name for now.
7080;; <https://bugs.gnu.org/30662>
7081(define-public python-msgpack-transitional
7082 (package
7083 (inherit python-msgpack)
7084 (name "python-msgpack-transitional")
7085 (arguments
7086 (substitute-keyword-arguments (package-arguments python-msgpack)
7087 ((#:phases phases)
7088 `(modify-phases ,phases
7089 (add-after 'unpack 'configure-transitional
7090 (lambda _
7091 ;; Keep using the old name.
7092 (substitute* "setup.py"
7093 (("TRANSITIONAL = False")
7094 "TRANSITIONAL = 1"))
7095 #t))))))))
7096
7097(define-public python2-msgpack
7098 (package-with-python2 python-msgpack))
7099
7100(define-public python-netaddr
7101 (package
7102 (name "python-netaddr")
7103 (version "0.7.19")
7104 (source
7105 (origin
7106 (method url-fetch)
7107 (uri (pypi-uri "netaddr" version))
7108 (sha256
7109 (base32
7110 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
7111 (build-system python-build-system)
7112 (arguments `(#:tests? #f)) ;; No tests.
7113 (home-page "https://github.com/drkjam/netaddr/")
7114 (synopsis "Pythonic manipulation of network addresses")
7115 (description
7116 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
7117and MAC network addresses.")
7118 (license license:bsd-3)))
7119
7120(define-public python2-netaddr
7121 (package-with-python2 python-netaddr))
7122
dd85eca0
AG
7123(define-public python2-pyroute2
7124 (package
7125 (name "python2-pyroute2")
7126 (version "0.5.6")
7127 (source
7128 (origin
7129 (method url-fetch)
7130 (uri (pypi-uri "pyroute2" version))
7131 (sha256
7132 (base32
7133 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
7134 (build-system python-build-system)
7135 (arguments
7136 `(#:python ,python-2)) ;Python 3.x is not supported
7137 (home-page "https://github.com/svinota/pyroute2")
7138 (synopsis "Python netlink library")
7139 (description
7140 "Pyroute2 is a pure Python netlink library with minimal dependencies.
7141Supported netlink families and protocols include:
7142@itemize
7143@item rtnl, network settings - addresses, routes, traffic controls
7144@item nfnetlink - netfilter API: ipset, nftables, ...
7145@item ipq - simplest userspace packet filtering, iptables QUEUE target
7146@item devlink - manage and monitor devlink-enabled hardware
7147@item generic - generic netlink families
7148 @itemize
7149 @item nl80211 - wireless functions API (basic support)
7150 @item taskstats - extended process statistics
7151 @item acpi_events - ACPI events monitoring
7152 @item thermal_events - thermal events monitoring
7153 @item VFS_DQUOT - disk quota events monitoring
7154 @end itemize
7155@end itemize")
7156 (license license:gpl2+)))
7157
44d10b1f
RW
7158(define-public python-wrapt
7159 (package
7160 (name "python-wrapt")
2271a1dc 7161 (version "1.11.2")
44d10b1f 7162 (source
2271a1dc
MB
7163 (origin
7164 (method url-fetch)
7165 (uri (pypi-uri "wrapt" version))
7166 (sha256
7167 (base32
7168 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
44d10b1f
RW
7169 (build-system python-build-system)
7170 (arguments
7171 ;; Tests are not included in the tarball, they are only available in the
7172 ;; git repository.
7173 `(#:tests? #f))
7174 (home-page "https://github.com/GrahamDumpleton/wrapt")
7175 (synopsis "Module for decorators, wrappers and monkey patching")
7176 (description
2271a1dc 7177 "The aim of the wrapt module is to provide a transparent object proxy for
44d10b1f
RW
7178 Python, which can be used as the basis for the construction of function
7179 wrappers and decorator functions.")
7180 (license license:bsd-2)))
7181
7182(define-public python2-wrapt
7183 (package-with-python2 python-wrapt))
7184
7185(define-public python-xlrd
7186 (package
7187 (name "python-xlrd")
3a2b1a3c 7188 (version "1.2.0")
44d10b1f
RW
7189 (source (origin
7190 (method url-fetch)
7191 (uri (pypi-uri "xlrd" version))
7192 (sha256
7193 (base32
3a2b1a3c 7194 "1ci93fda4n67qhdvfl16zasyxrpygzk53hs6m8z0rd4dxrnb6vjl"))))
44d10b1f
RW
7195 (build-system python-build-system)
7196 (arguments
7197 `(#:phases
7198 (modify-phases %standard-phases
3ccdd3a5
MO
7199 ;; Some tests depend on writing a temporary file to the user's home
7200 ;; directory.
3a2b1a3c
GL
7201 (add-after 'unpack 'fix-tests
7202 (lambda _
7203 (delete-file "tests/test_open_workbook.py")
7204 #t)))))
44d10b1f
RW
7205 (home-page "http://www.python-excel.org/")
7206 (synopsis "Library for extracting data from Excel files")
a0909286 7207 (description "This package provides a library to extract data from
44d10b1f
RW
7208spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
7209@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
7210Unicode-aware. It is not intended as an end-user tool.")
7211 (license license:bsd-3)))
7212
7213(define-public python2-xlrd
7214 (package-with-python2 python-xlrd))
7215
7216(define-public python-prettytable
7217 (package
7218 (name "python-prettytable")
7219 (version "0.7.2")
7220 (source
7221 (origin
7222 (method url-fetch)
337c3a1e 7223 (uri (pypi-uri "prettytable" version ".tar.bz2"))
44d10b1f
RW
7224 (sha256
7225 (base32
7226 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7227 (build-system python-build-system)
8be58b48 7228 (home-page "https://code.google.com/archive/p/prettytable/")
44d10b1f
RW
7229 (synopsis "Display tabular data in an ASCII table format")
7230 (description
7231 "A library designed to represent tabular data in visually appealing ASCII
7232tables. PrettyTable allows for selection of which columns are to be printed,
7233independent alignment of columns (left or right justified or centred) and
7234printing of sub-tables by specifying a row range.")
7235 (license license:bsd-3)))
7236
7237(define-public python2-prettytable
7238 (package-with-python2 python-prettytable))
7239
7240(define-public python-tables
7241 (package
7242 (name "python-tables")
7243 (version "3.4.4")
7244 (source
7245 (origin
7246 (method url-fetch)
7247 (uri (pypi-uri "tables" version))
7248 (sha256
7249 (base32
7250 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
7251 (modules '((guix build utils)))
7252 (snippet
7253 '(begin
7254 ;; Remove pre-compiled .pyc files from source.
7255 (for-each delete-file-recursively
7256 (find-files "." "__pycache__" #:directories? #t))
7257 (for-each delete-file (find-files "." "\\.pyc$"))
7258 #t))))
7259 (build-system python-build-system)
7260 (arguments
7261 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7262 ;; or "check", so we must override the build and check phases.
7263 #:phases
7264 (modify-phases %standard-phases
7265 (add-after 'unpack 'use-gcc
7266 (lambda _
7267 (substitute* "setup.py"
7268 (("compiler = new_compiler\\(\\)" line)
7269 (string-append line
7270 "\ncompiler.set_executables(compiler='gcc',"
7271 "compiler_so='gcc',"
7272 "linker_exe='gcc',"
7273 "linker_so='gcc -shared')")))
7274 #t))
70b74663
RW
7275 (add-after 'unpack 'disable-tuning
7276 (lambda _
7277 (substitute* "setup.py"
7278 (("cpu_flags = .*")
7279 "cpu_flags = ['sse2']\n"))
7280 #t))
44d10b1f
RW
7281 (replace 'build
7282 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
7283 (invoke "python" "setup.py" "build"
7284 (string-append "--hdf5="
7285 (assoc-ref inputs "hdf5")))))
44d10b1f
RW
7286 (replace 'check
7287 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
7288 (invoke "python" "setup.py" "check"
7289 (string-append "--hdf5="
7290 (assoc-ref inputs "hdf5"))))))))
44d10b1f
RW
7291 (propagated-inputs
7292 `(("python-numexpr" ,python-numexpr)
7293 ("python-numpy" ,python-numpy)))
7294 (native-inputs
7295 `(("python-cython" ,python-cython)
7296 ("pkg-config" ,pkg-config)))
7297 (inputs
538c1a02 7298 `(("hdf5" ,hdf5-1.10)
44d10b1f
RW
7299 ("bzip2" ,bzip2)
7300 ("zlib" ,zlib)))
7301 (home-page "http://www.pytables.org/")
7302 (synopsis "Hierarchical datasets for Python")
7303 (description "PyTables is a package for managing hierarchical datasets and
7304designed to efficiently cope with extremely large amounts of data.")
7305 (license license:bsd-3)))
7306
7307(define-public python2-tables
7308 (package-with-python2 python-tables))
7309
cc2c2850
RW
7310(define-public python-pytest-black
7311 (package
7312 (name "python-pytest-black")
7313 (version "0.3.8")
7314 (source
7315 (origin
7316 (method url-fetch)
7317 (uri (pypi-uri "pytest-black" version))
7318 (sha256
7319 (base32
7320 "04lppqydxm0f3f3x0l8hj7v0j6d8syj34jc37yzqwqcyqsnaga81"))))
7321 (build-system python-build-system)
7322 (propagated-inputs
7323 `(("python-pytest" ,python-pytest)
7324 ("python-black" ,python-black)
7325 ("python-toml" ,python-toml)))
7326 (native-inputs
7327 `(("python-setuptools-scm" ,python-setuptools-scm)))
7328 (home-page "https://github.com/shopkeep/pytest-black")
7329 (synopsis "Pytest plugin to enable format checking with black")
7330 (description
7331 "This package provides a pytest plugin to enable format checking with the
7332Python code formatter \"black\".")
7333 (license license:expat)))
7334
2ceff35f
RW
7335(define-public python-get-version
7336 (package
7337 (name "python-get-version")
7338 (version "2.1")
7339 (source
7340 (origin
7341 (method url-fetch)
7342 (uri (pypi-uri "get_version" version))
7343 (sha256
7344 (base32
7345 "1g15jyx33vkxavv9hwv275cs4g9bp2i1y942raw3fxamq8kbaml1"))))
7346 (build-system python-build-system)
7347 (propagated-inputs
7348 `(("python-pygments" ,python-pygments)
7349 ("python-pytest" ,python-pytest)
7350 ("python-pytest-black" ,python-pytest-black)
7351 ("python-pytest-cov" ,python-pytest-cov)
7352 ("python-setuptools" ,python-setuptools)
7353 ("python-testpath" ,python-testpath)))
7354 (home-page "https://github.com/flying-sheep/get_version")
7355 (synopsis "Version helper in the spirit of versioneer")
7356 (description
7357 "This package provides a version helper that lets you automatically use
7358the latest @code{vX.X.X} Git tag as the version in your Python package. It
7359also supports getting the version from Python source distributions or, once
7360your package is installed, via @code{pkg_resources} (part of
7361@code{setuptools}).")
7362 (license license:gpl3+)))
7363
053ab825
RW
7364(define-public python-legacy-api-wrap
7365 (package
7366 (name "python-legacy-api-wrap")
7367 (version "1.2")
7368 (source
7369 (origin
7370 (method url-fetch)
7371 (uri (pypi-uri "legacy-api-wrap" version))
7372 (sha256
7373 (base32
7374 "06qhp0g543dy98vpa41hwdalvdbsjfc3ldk474yr9sd75mhl8jh3"))))
7375 (build-system python-build-system)
7376 (propagated-inputs
7377 `(("python-get-version" ,python-get-version)
7378 ("python-pytest" ,python-pytest)
7379 ("python-pytest-black" ,python-pytest-black)
7380 ("python-pytest-cov" ,python-pytest-cov)
7381 ("python-setuptools" ,python-setuptools)))
7382 (home-page "https://github.com/flying-sheep/legacy-api-wrap")
7383 (synopsis "Legacy API wrapper")
7384 (description "This module defines a decorator to wrap legacy APIs. The
7385primary use case is APIs defined before keyword-only parameters existed.")
7386 (license license:gpl3+)))
7387
44d10b1f
RW
7388(define-public python-pyasn1
7389 (package
7390 (name "python-pyasn1")
7391 (version "0.4.3")
7392 (source
7393 (origin
7394 (method url-fetch)
7395 (uri (pypi-uri "pyasn1" version))
7396 (sha256
7397 (base32
7398 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
7399 (build-system python-build-system)
7400 (home-page "http://pyasn1.sourceforge.net/")
7401 (synopsis "ASN.1 types and codecs")
7402 (description
7403 "This is an implementation of ASN.1 types and codecs in Python. It is
7404suitable for a wide range of protocols based on the ASN.1 specification.")
7405 (license license:bsd-2)))
7406
7407(define-public python2-pyasn1
7408 (package-with-python2 python-pyasn1))
7409
7410(define-public python-pyasn1-modules
7411 (package
7412 (name "python-pyasn1-modules")
7413 (version "0.2.2")
7414 (source
7415 (origin
7416 (method url-fetch)
7417 (uri (pypi-uri "pyasn1-modules" version))
7418 (sha256
7419 (base32
7420 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
7421 (build-system python-build-system)
7422 (propagated-inputs
7423 `(("python-pyasn1" ,python-pyasn1)))
7424 (home-page "https://sourceforge.net/projects/pyasn1/")
7425 (synopsis "ASN.1 codec implementations")
7426 (description
7427 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7428implementations of ASN.1-based codecs and protocols.")
7429 (license license:bsd-3)))
7430
7431(define-public python2-pyasn1-modules
7432 (package-with-python2 python-pyasn1-modules))
7433
7434(define-public python-ipaddress
7435 (package
7436 (name "python-ipaddress")
7437 (version "1.0.22")
7438 (source (origin
7439 (method url-fetch)
7440 (uri (pypi-uri "ipaddress" version))
7441 (sha256
7442 (base32
7443 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
7444 (build-system python-build-system)
7445 (home-page "https://github.com/phihag/ipaddress")
7446 (synopsis "IP address manipulation library")
7447 (description
7448 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7449 in Python. This library is used to create, poke at, and manipulate IPv4 and
7450 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7451 module to older versions of Python.")
7452 (license license:psfl)))
7453
7454(define-public python2-ipaddress
7455 (package-with-python2 python-ipaddress))
7456
7457(define-public python2-ipaddr
7458 (package
7459 (name "python2-ipaddr")
7460 (version "2.1.11")
7461 (source
7462 (origin
7463 (method url-fetch)
7464 (uri (pypi-uri "ipaddr" version))
7465 (sha256
7466 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7467 (build-system python-build-system)
7468 (arguments
7469 `(#:python ,python-2 ;version 2 only
7470 #:phases
7471 (modify-phases %standard-phases
7472 (replace 'check
40b8c4e3 7473 (lambda _ (invoke "python" "ipaddr_test.py"))))))
44d10b1f
RW
7474 (home-page "https://github.com/google/ipaddr-py")
7475 (synopsis "IP address manipulation library")
7476 (description
7477 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7478IPv6 addresses and networks.
7479
7480For new implementations you may prefer to use the standard module
7481@code{ipaddress}, which was introduced in Python 3.3 and backported to older
7482versions of Python.")
7483 (license license:asl2.0)))
7484
7485(define-public python-idna
7486 (package
7487 (name "python-idna")
e95c9837 7488 (version "2.8")
44d10b1f
RW
7489 (source
7490 (origin
7491 (method url-fetch)
7492 (uri (pypi-uri "idna" version))
7493 (sha256
7494 (base32
e95c9837 7495 "01rlkigdxg17sf9yar1jl8n18ls59367wqh59hnawlyg53vb6my3"))))
44d10b1f
RW
7496 (build-system python-build-system)
7497 (home-page "https://github.com/kjd/idna")
7498 (synopsis "Internationalized domain names in applications")
7499 (description
7500 "This is a library to support the Internationalised Domain Names in
7501Applications (IDNA) protocol as specified in RFC 5891. This version of the
7502protocol is often referred to as “IDNA2008” and can produce different results
7503from the earlier standard from 2003. The library is also intended to act as a
7504suitable drop-in replacement for the “encodings.idna” module that comes with
7505the Python standard library but currently only supports the older 2003
7506specification.")
7507 (license license:bsd-4)))
7508
a76e6a69
JM
7509(define-public python-idna-2.7
7510 (package (inherit python-idna)
7511 (version "2.7")
7512 (source (origin
7513 (method url-fetch)
7514 (uri (pypi-uri "idna" version))
7515 (sha256
7516 (base32
7517 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
7518
7519
44d10b1f
RW
7520(define-public python2-idna
7521 (package-with-python2 python-idna))
7522
7523(define-public python-idna-ssl
7524 (package
7525 (name "python-idna-ssl")
7526 (version "1.0.1")
7527 (source
7528 (origin
7529 (method url-fetch)
7530 (uri (pypi-uri "idna-ssl" version))
7531 (sha256
7532 (base32
7533 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
7534 (build-system python-build-system)
7535 (arguments
7536 `(#:tests? #f)) ;circular dependency with python-aiohttp
7537 (home-page "https://github.com/aio-libs/idna-ssl")
7538 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
7539 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
7540domains support.")
7541 (license license:expat)))
7542
7543(define-public python-pretend
7544 (package
7545 (name "python-pretend")
7546 (version "1.0.9")
7547 (source
7548 (origin
7549 (method url-fetch)
9f1f22ee 7550 (uri (pypi-uri "pretend" version))
44d10b1f
RW
7551 (sha256
7552 (base32
7553 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
7554 (build-system python-build-system)
7555 (home-page "https://github.com/alex/pretend")
7556 (synopsis "Library for stubbing in Python")
7557 (description
7558 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7559technique for writing tests. You may hear the term mixed up with mocks,
7560fakes, or doubles. Basically, a stub is an object that returns pre-canned
7561responses, rather than doing any computation.")
7562 (license license:bsd-3)))
7563
7564(define-public python2-pretend
7565 (package-with-python2 python-pretend))
7566
7567(define-public python-pip
7568 (package
7569 (name "python-pip")
0a193d32 7570 (version "20.0.2")
44d10b1f
RW
7571 (source
7572 (origin
7573 (method url-fetch)
7574 (uri (pypi-uri "pip" version))
7575 (sha256
7576 (base32
0a193d32 7577 "0zwnlsjn6mb742cr995zfbk9v56ygxp8w3k49601r9by9kmcic3x"))))
44d10b1f
RW
7578 (build-system python-build-system)
7579 (arguments
7580 '(#:tests? #f)) ; there are no tests in the pypi archive.
7581 (home-page "https://pip.pypa.io/")
7582 (synopsis "Package manager for Python software")
7583 (description
7584 "Pip is a package manager for Python software, that finds packages on the
7585Python Package Index (PyPI).")
7586 (license license:expat)))
7587
7588(define-public python2-pip
7589 (package-with-python2 python-pip))
7590
7591(define-public python-tlsh
7592 (package
7593 (name "python-tlsh")
7594 (version "3.4.5")
7595 (home-page "https://github.com/trendmicro/tlsh")
3e3ff8ad
TGR
7596 (source
7597 (origin
7598 (method git-fetch)
7599 (uri (git-reference
7600 (url "https://github.com/trendmicro/tlsh.git")
7601 (commit (string-append "v" version))))
7602 (file-name (git-file-name name version))
7603 (sha256
7604 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
44d10b1f
RW
7605 (build-system cmake-build-system)
7606 (arguments
7607 '(#:out-of-source? #f
7608 #:phases (modify-phases %standard-phases
7609 (replace
7610 'install
7611 (lambda* (#:key outputs #:allow-other-keys)
7612 ;; Build and install the Python bindings. The underlying
7613 ;; C++ library is apparently not meant to be installed.
7614 (let ((out (assoc-ref outputs "out")))
7615 (with-directory-excursion "py_ext"
7616 (and (system* "python" "setup.py" "build")
7617 (system* "python" "setup.py" "install"
7618 (string-append "--prefix=" out))))))))))
7619 (inputs `(("python" ,python-wrapper))) ;for the bindings
7620 (synopsis "Fuzzy matching library for Python")
7621 (description
7622 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7623Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7624value which can be used for similarity comparisons. Similar objects have
7625similar hash values, which allows for the detection of similar objects by
7626comparing their hash values. The byte stream should have a sufficient amount
7627of complexity; for example, a byte stream of identical bytes will not generate
7628a hash value.")
7629 (license license:asl2.0)))
7630
7631(define-public python2-tlsh
7632 (package
7633 (inherit python-tlsh)
7634 (name "python2-tlsh")
7635 (inputs `(("python" ,python-2)))))
7636
7637(define-public python-termcolor
7638 (package
7639 (name "python-termcolor")
7640 (version "1.1.0")
7641 (source
7642 (origin
7643 (method url-fetch)
7644 (uri (pypi-uri "termcolor" version))
7645 (sha256
7646 (base32
7647 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7648 (build-system python-build-system)
7649 (arguments
7650 ;; There are no tests.
7651 `(#:tests? #f))
e85af137 7652 (home-page "https://pypi.org/project/termcolor/")
44d10b1f
RW
7653 (synopsis "ANSII Color formatting for terminal output")
7654 (description
7655 "This package provides ANSII Color formatting for output in terminals.")
7656 (license license:expat)))
7657
7658(define-public python2-termcolor
7659 (package-with-python2 python-termcolor))
7660
7661(define-public python-libarchive-c
7662 (package
7663 (name "python-libarchive-c")
f2774824 7664 (version "2.9")
44d10b1f
RW
7665 (source (origin
7666 (method url-fetch)
7667 (uri (pypi-uri "libarchive-c" version))
7668 (sha256
7669 (base32
f2774824 7670 "0q7g6a97110bk0j5x81555kajyxh4sybaabab6v5sgr0xi6386cr"))))
44d10b1f
RW
7671 (build-system python-build-system)
7672 (arguments
7673 '(#:phases (modify-phases %standard-phases
7674 (add-before
7675 'build 'reference-libarchive
7676 (lambda* (#:key inputs #:allow-other-keys)
7677 ;; Retain the absolute file name of libarchive.so.
7678 (let ((libarchive (assoc-ref inputs "libarchive")))
7679 (substitute* "libarchive/ffi.py"
7680 (("find_library\\('archive'\\)")
7681 (string-append "'" libarchive
7682 "/lib/libarchive.so'"))))))
7683 (replace 'check
7684 (lambda _ (invoke "pytest" "-vv"))))))
7685 (native-inputs
7686 `(("python-mock" ,python-mock)
7687 ("python-pytest" ,python-pytest)))
7688 (inputs
7689 `(("libarchive" ,libarchive)))
7690 (home-page "https://github.com/Changaco/python-libarchive-c")
7691 (synopsis "Python interface to libarchive")
7692 (description
7693 "This package provides Python bindings to libarchive, a C library to
7694access possibly compressed archives in many different formats. It uses
7695Python's @code{ctypes} foreign function interface (FFI).")
7696 (license license:lgpl2.0+)))
7697
7698(define-public python2-libarchive-c
7699 (package-with-python2 python-libarchive-c))
7700
7701(define-public python-file
7702 (package
7703 (inherit file)
7704 (name "python-file")
7705 (build-system python-build-system)
7706 (arguments
7707 '(#:tests? #f ;no tests
7708 #:configure-flags '("--single-version-externally-managed" "--root=/")
7709 #:phases (modify-phases %standard-phases
7710 (add-before 'build 'change-directory
7711 (lambda _
7712 (chdir "python")
7713 #t))
7714 (add-before 'build 'set-library-file-name
7715 (lambda* (#:key inputs #:allow-other-keys)
7716 (let ((file (assoc-ref inputs "file")))
7717 (substitute* "magic.py"
7718 (("find_library\\('magic'\\)")
7719 (string-append "'" file "/lib/libmagic.so'")))
7720 #t))))))
7721 (inputs `(("file" ,file)))
528ea990
LC
7722 (native-inputs (if (%current-target-system)
7723 `(("self" ,this-package))
7724 '()))
44d10b1f
RW
7725 (synopsis "Python bindings to the libmagic file type guesser. Note that
7726this module and the python-magic module both provide a \"magic.py\" file;
7727these two modules, which are different and were developed separately, both
7728serve the same purpose: provide Python bindings for libmagic.")))
7729
7730(define-public python2-file
7731 (package-with-python2 python-file))
7732
7733(define-public python-debian
7734 (package
7735 (name "python-debian")
7736 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
9f74bd31 7737 (version "0.1.36")
44d10b1f
RW
7738 (source
7739 (origin
9f74bd31
VC
7740 ;; Use git-fetch, as pypi doesn't include test suite.
7741 (method git-fetch)
7742 (uri (git-reference
7743 (url home-page)
7744 (commit version)))
7745 (file-name (git-file-name name version))
44d10b1f
RW
7746 (sha256
7747 (base32
9f74bd31 7748 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
44d10b1f 7749 (build-system python-build-system)
9f74bd31
VC
7750 (arguments
7751 `(#:phases (modify-phases %standard-phases
7752 (add-after 'unpack 'remove-debian-specific-tests
7753 ;; python-apt, apt and dpkg are not yet available in guix,
7754 ;; and these tests heavily depend on them.
7755 (lambda _
7756 (delete-file "lib/debian/tests/test_deb822.py")
7757 (delete-file "lib/debian/tests/test_debfile.py")
7758 #t)))))
44d10b1f 7759 (propagated-inputs
9f74bd31
VC
7760 `(("python-six" ,python-six)
7761 ("python-chardet" ,python-chardet)))
44d10b1f
RW
7762 (synopsis "Debian package related modules")
7763 (description
7764 ;; XXX: Use @enumerate instead of @itemize to work around
7765 ;; <http://bugs.gnu.org/21772>.
7766 "This package provides Python modules that abstract many formats of
7767Debian-related files, such as:
7768
7769@enumerate
7770@item Debtags information;
7771@item @file{debian/changelog} files;
7772@item packages files, pdiffs;
7773@item control files of single or multiple RFC822-style paragraphs---e.g.
7774 @file{debian/control}, @file{.changes}, @file{.dsc};
7775@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7776 contained files and meta-information.
7777@end enumerate\n")
7778
7779 ;; Modules are either GPLv2+ or GPLv3+.
7780 (license license:gpl3+)))
7781
44d10b1f
RW
7782(define-public python-nbformat
7783 (package
7784 (name "python-nbformat")
7785 (version "4.4.0")
7786 (source
7787 (origin
7788 (method url-fetch)
7789 (uri (pypi-uri "nbformat" version))
7790 (sha256
7791 (base32
7792 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
7793 (build-system python-build-system)
7794 (arguments `(#:tests? #f)) ; no test target
7795 (propagated-inputs
7796 `(("python-ipython-genutils" ,python-ipython-genutils)
7797 ("python-jsonschema" ,python-jsonschema)
7798 ("python-jupyter-core" ,python-jupyter-core)
7799 ("python-traitlets" ,python-traitlets)))
7800 (home-page "http://jupyter.org")
7801 (synopsis "Jupyter Notebook format")
7802 (description "This package provides the reference implementation of the
7803Jupyter Notebook format and Python APIs for working with notebooks.")
7804 (license license:bsd-3)))
7805
7806(define-public python2-nbformat
7807 (package-with-python2 python-nbformat))
7808
7809(define-public python-bleach
7810 (package
7811 (name "python-bleach")
e6daf515 7812 (version "3.1.1")
44d10b1f
RW
7813 (source
7814 (origin
7815 (method url-fetch)
7816 (uri (pypi-uri "bleach" version))
7817 (sha256
7818 (base32
e6daf515 7819 "0j4xlnw99m1xy0s7wxz9fk5f3c1n8r296fh75jn5p5j61w6qg2xa"))))
44d10b1f
RW
7820 (build-system python-build-system)
7821 (propagated-inputs
ff0efc8f 7822 `(("python-webencodings" ,python-webencodings)
44d10b1f
RW
7823 ("python-six" ,python-six)))
7824 (native-inputs
ff0efc8f
MB
7825 `(("python-pytest" ,python-pytest)
7826 ("python-pytest-runner" ,python-pytest-runner-2)))
44d10b1f
RW
7827 (home-page "https://github.com/jsocol/bleach")
7828 (synopsis "Whitelist-based HTML-sanitizing tool")
7829 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7830 (license license:asl2.0)))
7831
7832(define-public python2-bleach
7833 (package-with-python2 python-bleach))
7834
7835(define-public python-entrypoints
7836 (package
7837 (name "python-entrypoints")
a7f1b718 7838 (version "0.3")
44d10b1f
RW
7839 (source
7840 (origin
7841 (method url-fetch)
a7f1b718 7842 (uri (pypi-uri "entrypoints" version))
44d10b1f
RW
7843 (sha256
7844 (base32
a7f1b718 7845 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
44d10b1f
RW
7846 (build-system python-build-system)
7847 ;; The package does not come with a setup.py file, so we have to generate
7848 ;; one ourselves.
7849 (arguments
7850 `(#:tests? #f
7851 #:phases
7852 (modify-phases %standard-phases
7853 (add-after 'unpack 'create-setup.py
7854 (lambda _
7855 (call-with-output-file "setup.py"
7856 (lambda (port)
7857 (format port "\
7858from setuptools import setup
7859setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7860" ,version))))))))
7861 (home-page "https://github.com/takluyver/entrypoints")
7862 (synopsis "Discover and load entry points from installed Python packages")
7863 (description "Entry points are a way for Python packages to advertise
7864objects with some common interface. The most common examples are
7865@code{console_scripts} entry points, which define shell commands by
7866identifying a Python function to run. The @code{entrypoints} module contains
7867functions to find and load entry points.")
7868 (license license:expat)))
7869
7870(define-public python2-entrypoints
7871 (package-with-python2 python-entrypoints))
7872
7873(define-public python-nbconvert
7874 (package
7875 (name "python-nbconvert")
7876 (version "5.0.0b1")
7877 (source
7878 (origin
7879 (method url-fetch)
7880 (uri (pypi-uri "nbconvert" version))
7881 (sha256
7882 (base32
7883 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7884 (build-system python-build-system)
7885 (arguments
7886 `(;; The "bdist_egg" target is disabled by default, causing the installation
7887 ;; to fail.
7888 #:configure-flags (list "bdist_egg")
7889 ;; FIXME: 5 failures, 40 errors.
7890 #:tests? #f))
7891 ;; #:phases
7892 ;; (modify-phases %standard-phases
7893 ;; (replace 'check
7894 ;; (lambda _
7895 ;; (zero? (system* "py.test" "-v")))))
7896 (native-inputs
7897 `(("python-pytest" ,python-pytest)))
7898 (propagated-inputs
7899 `(("python-bleach" ,python-bleach)
7900 ("python-entrypoints" ,python-entrypoints)
7901 ("python-jinja2" ,python-jinja2)
7902 ("python-jupyter-core" ,python-jupyter-core)
7903 ("python-mistune" ,python-mistune)
7904 ("python-nbformat" ,python-nbformat)
7905 ("python-pygments" ,python-pygments)
7906 ("python-traitlets" ,python-traitlets)))
7907 (home-page "http://jupyter.org")
7908 (synopsis "Converting Jupyter Notebooks")
7909 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7910notebooks to various other formats via Jinja templates. It allows you to
7911convert an @code{.ipynb} notebook file into various static formats including:
7912
7913@enumerate
7914@item HTML
7915@item LaTeX
7916@item PDF
7917@item Reveal JS
7918@item Markdown (md)
7919@item ReStructured Text (rst)
7920@item executable script
7921@end enumerate\n")
7922 (license license:bsd-3)))
7923
7924(define-public python2-nbconvert
7925 (package-with-python2 python-nbconvert))
7926
44d10b1f
RW
7927(define-public python-notebook
7928 (package
7929 (name "python-notebook")
7930 (version "5.7.4")
7931 (source (origin
7932 (method url-fetch)
7933 (uri (pypi-uri "notebook" version))
7934 (sha256
7935 (base32
7936 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
7937 (build-system python-build-system)
7938 (arguments
7939 `(#:phases
7940 (modify-phases %standard-phases
7941 (replace 'check
7942 (lambda _
7943 ;; These tests require a browser
7944 (delete-file-recursively "notebook/tests/selenium")
7945 ;; Some tests need HOME
7946 (setenv "HOME" "/tmp")
7947 ;; This file contains "warningfilters", which are not supported
7948 ;; by this version of nose.
7949 (delete-file "setup.cfg")
7950 (with-directory-excursion "/tmp"
7951 (invoke "nosetests" "-v"))
7952 #t)))))
7953 (propagated-inputs
7954 `(("python-jupyter-core" ,python-jupyter-core)
7955 ("python-nbformat" ,python-nbformat)
7956 ("python-nbconvert" ,python-nbconvert)
7957 ("python-prometheus-client" ,python-prometheus-client)
7958 ("python-send2trash" ,python-send2trash)
7959 ("python-terminado" ,python-terminado)))
7960 (native-inputs
7961 `(("python-nose" ,python-nose)
7962 ("python-sphinx" ,python-sphinx)
7963 ("python-requests" ,python-requests)))
7964 (home-page "http://jupyter.org/")
7965 (synopsis "Web-based notebook environment for interactive computing")
7966 (description
7967 "The Jupyter HTML notebook is a web-based notebook environment for
7968interactive computing.")
7969 (properties `((python2-variant . ,(delay python2-notebook))))
7970 (license license:bsd-3)))
7971
7972(define-public python2-notebook
7973 (let ((base (package-with-python2
7974 (strip-python2-variant python-notebook))))
7975 (package (inherit base)
7976 (native-inputs
7977 `(("python2-mock" ,python2-mock)
7978 ,@(package-native-inputs base)))
7979 (arguments
7980 (substitute-keyword-arguments (package-arguments base)
7981 ((#:phases phases)
7982 `(modify-phases ,phases
7983 (add-before 'check 'disable-test-case
7984 ;; The test requires network access to localhost. Curiously it
7985 ;; fails with Python 2 only. Simply make the test-case return
7986 ;; immediately.
7987 (lambda _
7988 (substitute*
7989 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7990 (("formats = self.nbconvert_api") "return #")))))))))))
7991
7992(define-public python-widgetsnbextension
7993 (package
7994 (name "python-widgetsnbextension")
7995 (version "3.4.2")
7996 (source
7997 (origin
7998 (method url-fetch)
7999 (uri (pypi-uri "widgetsnbextension" version))
8000 (sha256
8001 (base32
8002 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
8003 (build-system python-build-system)
8004 (propagated-inputs
8005 `(("python-ipykernel" ,python-ipykernel)
8006 ("python-notebook" ,python-notebook)))
8007 (native-inputs
8008 `(("python-certifi" ,python-certifi)
8009 ("python-nose" ,python-nose)))
8010 (home-page "https://ipython.org")
8011 (synopsis "IPython HTML widgets for Jupyter")
8012 (description "This package provides interactive HTML widgets for Jupyter
8013notebooks.")
8014 (license license:bsd-3)))
8015
8016(define-public python2-widgetsnbextension
8017 (package-with-python2 python-widgetsnbextension))
8018
8019(define-public python-ipywidgets
8020 (package
8021 (name "python-ipywidgets")
8022 (version "5.2.2")
8023 (source
8024 (origin
8025 (method url-fetch)
8026 (uri (pypi-uri "ipywidgets" version))
8027 (sha256
8028 (base32
8029 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
8030 (build-system python-build-system)
8031 (propagated-inputs
8032 `(("python-ipython" ,python-ipython)
8033 ("python-traitlets" ,python-traitlets)
8034 ("python-widgetsnbextension" ,python-widgetsnbextension)))
8035 (native-inputs
8036 `(("python-nose" ,python-nose)
8037 ("python-pytest" ,python-pytest)))
8038 (home-page "https://ipython.org")
8039 (synopsis "IPython HTML widgets for Jupyter")
8040 (description "Ipywidgets are interactive HTML widgets for Jupyter
8041notebooks and the IPython kernel. Notebooks come alive when interactive
8042widgets are used. Users gain control of their data and can visualize changes
8043in the data.")
8044 (license license:bsd-3)))
8045
8046(define-public python2-ipywidgets
8047 (package-with-python2 python-ipywidgets))
8048
8049(define-public python-jupyter-console
8050 (package
8051 (name "python-jupyter-console")
becb9cbf 8052 (version "6.0.0")
44d10b1f
RW
8053 (source
8054 (origin
8055 (method url-fetch)
8056 (uri (pypi-uri "jupyter_console" version))
8057 (sha256
8058 (base32
becb9cbf 8059 "1xdjw11cppf1fxvwkw2bk13ckkwas3bdah8baingn9296mvfi31h"))))
44d10b1f 8060 (build-system python-build-system)
44d10b1f
RW
8061 (propagated-inputs
8062 `(("python-ipykernel" ,python-ipykernel)
8063 ("python-jupyter-client" ,python-jupyter-client)
becb9cbf 8064 ("python-prompt-toolkit" ,python-prompt-toolkit)
44d10b1f
RW
8065 ("python-pygments" ,python-pygments)))
8066 (native-inputs
8067 `(("python-nose" ,python-nose)))
8068 (home-page "https://jupyter.org")
8069 (synopsis "Jupyter terminal console")
8070 (description "This package provides a terminal-based console frontend for
8071Jupyter kernels. It also allows for console-based interaction with non-Python
8072Jupyter kernels such as IJulia and IRKernel.")
8073 (license license:bsd-3)))
8074
8075(define-public python2-jupyter-console
8e590c81
RW
8076 (package
8077 (name "python2-jupyter-console")
8078 (version "5.2.0")
8079 (source
8080 (origin
8081 (method url-fetch)
8082 (uri (pypi-uri "jupyter_console" version))
8083 (sha256
8084 (base32
8085 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
8086 (build-system python-build-system)
8087 ;; Tests only run in an TTY.
8088 (arguments `(#:tests? #f))
8089 (propagated-inputs
8090 `(("python2-ipykernel" ,python2-ipykernel)
8091 ("python2-jupyter-client" ,python2-jupyter-client)
8092 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
8093 ("python2-pygments" ,python2-pygments)))
8094 (native-inputs
8095 `(("python2-nose" ,python2-nose)))
8096 (home-page "https://jupyter.org")
8097 (synopsis "Jupyter terminal console")
8098 (description "This package provides a terminal-based console frontend for
8099Jupyter kernels. It also allows for console-based interaction with non-Python
8100Jupyter kernels such as IJulia and IRKernel.")
8101 (license license:bsd-3)))
44d10b1f
RW
8102
8103;; The python-ipython and python-jupyter-console require each other. To get
8104;; the functionality in both packages working, strip down the
8105;; python-jupyter-console package when using it as an input to python-ipython.
8106(define python-jupyter-console-minimal
8107 (package
8108 (inherit python-jupyter-console)
8109 (name "python-jupyter-console-minimal")
8110 (arguments
8111 (substitute-keyword-arguments
8112 (package-arguments python-jupyter-console)
8113 ((#:phases phases)
8114 `(modify-phases ,phases
8115 (add-after 'install 'delete-bin
8116 (lambda* (#:key outputs #:allow-other-keys)
8117 ;; Delete the bin files, to avoid conflicts in profiles
8118 ;; where python-ipython and python-jupyter-console are
8119 ;; both present.
8120 (delete-file-recursively
8121 (string-append
8122 (assoc-ref outputs "out") "/bin"))))))))
8123 ;; Remove the python-ipython propagated input, to avoid the cycle
8124 (propagated-inputs
8125 (alist-delete
8126 "python-ipython"
8127 (package-propagated-inputs python-jupyter-console)))))
8128
8129(define-public python-qtconsole
8130 (package
8131 (name "python-qtconsole")
8132 (version "4.4.3")
8133 (source
8134 (origin
8135 (method url-fetch)
8136 (uri (pypi-uri "qtconsole" version))
8137 (sha256
8138 (base32
8139 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
8140 (build-system python-build-system)
8141 (arguments
8142 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
8143 ;; but we only have the LTS version 5.x. This means that there might be
8144 ;; runtime errors, but since this is a dependency of the Jupyter package,
8145 ;; and Jupyter can be used without the qtconsole we can overlook this for
8146 ;; now.
8147 `(#:tests? #f
8148 #:phases
8149 (modify-phases %standard-phases
8150 (add-before 'check 'pre-check
8151 (lambda _
8152 (setenv "QT_QPA_PLATFORM" "offscreen")
8153 #t)))))
8154 (propagated-inputs
8155 `(("python-ipykernel" ,python-ipykernel)
8156 ("python-ipython" ,python-ipython)))
8157 (native-inputs
8158 `(("python-pytest" ,python-pytest)))
8159 (home-page "http://jupyter.org")
8160 (synopsis "Jupyter Qt console")
8161 (description "This package provides a Qt-based console for Jupyter with
8162support for rich media output.")
8163 (license license:bsd-3)))
8164
6ec87223
VC
8165(define-public python-jsbeautifier
8166 (package
8167 (name "python-jsbeautifier")
8168 (version "1.10.2")
8169 (home-page "https://github.com/beautify-web/js-beautify")
8170 (source (origin
8171 (method git-fetch)
8172 (uri (git-reference
8173 (url home-page)
8174 (commit (string-append "v" version))))
8175 (file-name (git-file-name name version))
8176 (sha256
8177 (base32
8178 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
8179 (build-system python-build-system)
8180 (arguments
8181 `(#:phases (modify-phases %standard-phases
8182 (add-after 'unpack 'chdir
8183 (lambda _
8184 ;; The upstream Git repository contains all the code,
8185 ;; but this package only builds the python code.
8186 (chdir "python")
8187 #t))
8188 (add-after 'unpack 'patch-python-six-requirements
8189 (lambda _
8190 (substitute* "python/setup.py"
8191 (("six>=1.12.0")
8192 "six>=1.11.0"))
8193 #t)))))
8194 (propagated-inputs
8195 `(("python-editorconfig" ,python-editorconfig)
8196 ("python-six" ,python-six)))
8197 (native-inputs
8198 `(("python-pytest" ,python-pytest)))
8199 (synopsis "JavaScript unobfuscator and beautifier")
8200 (description "Beautify, unpack or deobfuscate JavaScript, leveraging
8201popular online obfuscators.")
8202 (license license:expat)))
8203
44d10b1f
RW
8204(define-public jupyter
8205 (package
8206 (name "jupyter")
8207 (version "1.0.0")
8208 (source
8209 (origin
8210 (method url-fetch)
8211 (uri (pypi-uri "jupyter" version))
8212 (sha256
8213 (base32
8214 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
8215 (build-system python-build-system)
8216 (arguments '(#:tests? #f)) ; there are none.
8217 (propagated-inputs
8218 `(("python-ipykernel" ,python-ipykernel)
8219 ("python-ipywidgets" ,python-ipywidgets)
8220 ("python-jupyter-console" ,python-jupyter-console)
8221 ("python-nbconvert" ,python-nbconvert)
8222 ("python-notebook" ,python-notebook)
8223 ("python-qtconsole" ,python-qtconsole)))
8224 (native-search-paths
8225 (list (search-path-specification
8226 (variable "JUPYTER_PATH")
8227 (files '("share/jupyter")))))
8228 (home-page "https://jupyter.org")
8229 (synopsis "Web application for interactive documents")
8230 (description
8231 "The Jupyter Notebook is a web application that allows you to create and
8232share documents that contain live code, equations, visualizations and
8233explanatory text. Uses include: data cleaning and transformation, numerical
8234simulation, statistical modeling, machine learning and much more.")
8235 (license license:bsd-3)))
8236
8237(define-public python-chardet
8238 (package
8239 (name "python-chardet")
8240 (version "3.0.4")
8241 (source
8242 (origin
8243 (method url-fetch)
8244 (uri (pypi-uri "chardet" version))
8245 (sha256
8246 (base32
8247 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
8248 (native-inputs
8249 `(("python-hypothesis" ,python-hypothesis)
8250 ("python-pytest" ,python-pytest)
8251 ("python-pytest-runner" ,python-pytest-runner)))
8252 (build-system python-build-system)
3d369407
MB
8253 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
8254 (arguments `(#:tests? #f))
44d10b1f
RW
8255 (home-page "https://github.com/chardet/chardet")
8256 (synopsis "Universal encoding detector for Python 2 and 3")
8257 (description
8258 "This package provides @code{chardet}, a Python module that can
8259automatically detect a wide range of file encodings.")
8260 (license license:lgpl2.1+)))
8261
8262(define-public python2-chardet
8263 (package-with-python2 python-chardet))
8264
8265(define-public python-docopt
8266 (package
8267 (name "python-docopt")
8268 (version "0.6.2")
8269 (source
8270 (origin
11e46326 8271 (method git-fetch)
44d10b1f 8272 ;; The release on PyPI does not include tests.
11e46326
EF
8273 (uri (git-reference
8274 (url "https://github.com/docopt/docopt")
8275 (commit version)))
8276 (file-name (git-file-name name version))
44d10b1f
RW
8277 (sha256
8278 (base32
11e46326 8279 "0aad9gbswnnhssin2q0m5lmpm0ahyf80ahs2zjigbn5y7fvljnd0"))))
44d10b1f
RW
8280 (build-system python-build-system)
8281 (native-inputs
8282 `(("python-pytest" ,python-pytest)))
8283 (arguments
8284 `(#:phases
8285 (modify-phases %standard-phases
8286 (replace 'check
8287 (lambda _ (invoke "py.test"))))))
8288 (home-page "http://docopt.org")
8289 (synopsis "Command-line interface description language for Python")
8290 (description "This library allows the user to define a command-line
8291interface from a program's help message rather than specifying it
4ca7207b 8292programmatically with command-line parsers like @code{getopt} and
44d10b1f
RW
8293@code{argparse}.")
8294 (license license:expat)))
8295
8296(define-public python2-docopt
8297 (package-with-python2 python-docopt))
8298
8299(define-public python-pythondialog
8300 (package
8301 (name "python-pythondialog")
8302 (version "3.4.0")
8303 (source
8304 (origin
8305 (method url-fetch)
8306 (uri (pypi-uri "pythondialog" version))
8307 (sha256
8308 (base32
8309 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
8310 (build-system python-build-system)
8311 (arguments
8312 `(#:phases
8313 (modify-phases %standard-phases
8314 (add-after 'unpack 'patch-path
8315 (lambda* (#:key inputs #:allow-other-keys)
8316 (let* ((dialog (assoc-ref inputs "dialog")))
8317 ;; Since this library really wants to grovel the search path, we
8318 ;; must hardcode dialog's store path into it.
8319 (substitute* "dialog.py"
8320 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8321 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8322 #t))))
8323 #:tests? #f)) ; no test suite
8324 (propagated-inputs
8325 `(("dialog" ,dialog)))
8326 (home-page "http://pythondialog.sourceforge.net/")
8327 (synopsis "Python interface to the UNIX dialog utility")
8328 (description "A Python wrapper for the dialog utility. Its purpose is to
8329provide an easy to use, pythonic and comprehensive Python interface to dialog.
8330This allows one to make simple text-mode user interfaces on Unix-like systems")
8331 (license license:lgpl2.1)
8332 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8333
8334(define-public python2-pythondialog
8335 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8336 (package
8337 (inherit base)
8338 (version (package-version python-pythondialog))
8339 (source (origin
8340 (method url-fetch)
8341 (uri (pypi-uri "python2-pythondialog" version))
8342 (sha256
8343 (base32
8344 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
8345
8346(define-public python-configobj
8347 (package
8348 (name "python-configobj")
8349 (version "5.0.6")
8350 (source (origin
8351 (method url-fetch)
b0758fbb 8352 (uri (pypi-uri "configobj" version))
44d10b1f
RW
8353 (sha256
8354 (base32
8355 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8356 ;; Patch setup.py so it looks for python-setuptools, which is
8357 ;; required to parse the keyword 'install_requires' in setup.py.
8358 (patches (search-patches "python-configobj-setuptools.patch"))))
8359 (build-system python-build-system)
8360 (propagated-inputs
8361 `(("python-six" ,python-six)))
8362 (synopsis "Config file reading, writing and validation")
8363 (description "ConfigObj is a simple but powerful config file reader and
8364writer: an ini file round tripper. Its main feature is that it is very easy to
8365use, with a straightforward programmer’s interface and a simple syntax for
8366config files.")
8367 (home-page "https://github.com/DiffSK/configobj")
8368 (license license:bsd-3)))
8369
8370(define-public python2-configobj
8371 (package-with-python2 python-configobj))
8372
8373(define-public python-configargparse
8374 (package
8375 (name "python-configargparse")
86ae491f 8376 (version "0.14.0")
44d10b1f
RW
8377 (source (origin
8378 (method url-fetch)
8379 (uri (pypi-uri "ConfigArgParse" version))
8380 (sha256
8381 (base32
86ae491f 8382 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
44d10b1f
RW
8383 (build-system python-build-system)
8384 (native-inputs
8385 `(("python-pyyaml" ,python-pyyaml)))
8386 (arguments
8387 `(#:phases
8388 (modify-phases %standard-phases
8389 (replace 'check
8390 (lambda _
8391 ;; Bypass setuptools-shim because one test relies on "setup.py"
8392 ;; being the first argument passed to the python call.
8393 ;;
8394 ;; NOTE: Many tests do not run because they rely on Python's
8395 ;; built-in test.test_argparse, but we remove the unit tests from
8396 ;; our Python installation.
8397 (invoke "python" "setup.py" "test"))))))
8398 (synopsis "Replacement for argparse")
8399 (description "A drop-in replacement for argparse that allows options to also
8400be set via config files and/or environment variables.")
8401 (home-page "https://github.com/bw2/ConfigArgParse")
8402 (license license:expat)))
8403
8404(define-public python2-configargparse
8405 (package-with-python2 python-configargparse))
8406
8407(define-public python-argparse-manpage
8408 (package
8409 (name "python-argparse-manpage")
8410 (version "1.1")
8411 (source
8412 (origin
8413 (method url-fetch)
8414 (uri (pypi-uri "argparse-manpage" version))
8415 (sha256
8416 (base32
8417 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
8418 (build-system python-build-system)
8419 (home-page "https://github.com/praiskup/argparse-manpage")
8420 (synopsis "Build manual page from Python's ArgumentParser object")
8421 (description
8422 "This package provides tools to build manual pages from Python's
8423@code{ArgumentParser} object.")
8424 (license license:asl2.0)))
8425
3e8f76d8
RW
8426(define-public python-contextlib2
8427 (package
8428 (name "python-contextlib2")
8429 (version "0.5.5")
8430 (source
8431 (origin
8432 (method url-fetch)
8433 (uri (pypi-uri "contextlib2" version))
8434 (sha256
8435 (base32
8436 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8437 (build-system python-build-system)
a0fdade2 8438 (home-page "https://contextlib2.readthedocs.org/")
3e8f76d8
RW
8439 (synopsis "Tools for decorators and context managers")
8440 (description "This module is primarily a backport of the Python
84413.2 contextlib to earlier Python versions. Like contextlib, it
8442provides utilities for common tasks involving decorators and context
8443managers. It also contains additional features that are not part of
8444the standard library.")
1e158ba1 8445 (properties `((python2-variant . ,(delay python2-contextlib2))))
3e8f76d8
RW
8446 (license license:psfl)))
8447
44d10b1f 8448(define-public python2-contextlib2
1e158ba1
EF
8449 (let ((base (package-with-python2
8450 (strip-python2-variant python-contextlib2))))
8451 (package
8452 (inherit base)
8453 (arguments
8454 (substitute-keyword-arguments (package-arguments base)
8455 ((#:phases phases)
8456 `(modify-phases ,phases
8457 (replace 'check
8458 (lambda _ (invoke "python" "test_contextlib2.py" "-v")))))))
8459 (native-inputs
8460 `(("python2-unittest2" ,python2-unittest2))))))
44d10b1f
RW
8461
8462(define-public python-texttable
8463 (package
8464 (name "python-texttable")
02422b3b 8465 (version "1.6.2")
44d10b1f
RW
8466 (source
8467 (origin
8468 (method url-fetch)
8469 (uri (pypi-uri "texttable" version))
8470 (sha256
8471 (base32
02422b3b 8472 "1x5l77akfc20x52jma9573qp8l8r07q103pm4l0pbizvh4vp1wzg"))))
44d10b1f 8473 (build-system python-build-system)
02422b3b
RW
8474 (arguments
8475 `(#:phases
8476 (modify-phases %standard-phases
8477 (replace 'check
8478 (lambda _ (invoke "pytest" "tests.py"))))))
8479 (native-inputs
8480 `(("python-pytest" ,python-pytest)))
44d10b1f
RW
8481 (home-page "https://github.com/foutaise/texttable/")
8482 (synopsis "Python module for creating simple ASCII tables")
8483 (description "Texttable is a Python module for creating simple ASCII
8484tables.")
02422b3b 8485 (license license:expat)))
44d10b1f
RW
8486
8487(define-public python2-texttable
8488 (package-with-python2 python-texttable))
8489
8490(define-public python-atomicwrites
8491 (package
8492 (name "python-atomicwrites")
14f10479 8493 (version "1.3.0")
44d10b1f
RW
8494 (source (origin
8495 (method url-fetch)
8496 (uri (pypi-uri "atomicwrites" version))
8497 (sha256
8498 (base32
14f10479 8499 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
44d10b1f
RW
8500 (build-system python-build-system)
8501 (synopsis "Atomic file writes in Python")
8502 (description "Library for atomic file writes using platform dependent tools
8503for atomic file system operations.")
8504 (home-page "https://github.com/untitaker/python-atomicwrites")
8505 (license license:expat)))
8506
8507(define-public python2-atomicwrites
8508 (package-with-python2 python-atomicwrites))
8509
8510(define-public python-click-threading
8511 (package
8512 (name "python-click-threading")
8513 (version "0.4.4")
8514 (source (origin
8515 (method url-fetch)
8516 (uri (pypi-uri "click-threading" version))
8517 (sha256
8518 (base32
8519 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
8520 (build-system python-build-system)
8521 (propagated-inputs
8522 `(("python-click" ,python-click)))
8523 (synopsis "Utilities for multithreading in Click")
8524 (description "This package provides utilities for multithreading in Click
8525applications.")
8526 (home-page "https://github.com/click-contrib/click-threading")
8527 (license license:expat)))
8528
8529(define-public python-click-log
8530 (package
8531 (name "python-click-log")
8532 (version "0.3.2")
8533 (source (origin
8534 (method url-fetch)
8535 (uri (pypi-uri "click-log" version))
8536 (sha256
8537 (base32
8538 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
8539 (build-system python-build-system)
8540 (propagated-inputs
8541 `(("python-click" ,python-click)))
8542 (synopsis "Logging for click applications")
8543 (description "This package provides a Python library for logging Click
8544applications.")
8545 (home-page "https://github.com/click-contrib/click-log")
8546 (license license:expat)))
8547
8548(define-public python-apipkg
8549 (package
8550 (name "python-apipkg")
8551 (version "1.4")
8552 (source (origin
8553 (method url-fetch)
8554 (uri (pypi-uri "apipkg" version))
8555 (sha256
8556 (base32
8557 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8558 (build-system python-build-system)
8559 (native-inputs
8560 `(("python-pytest" ,python-pytest)))
8561 (synopsis "Namespace control and lazy-import mechanism")
8562 (description "With apipkg you can control the exported namespace of a Python
8563package and greatly reduce the number of imports for your users. It is a small
8564pure Python module that works on virtually all Python versions.")
8565 (home-page "https://github.com/pytest-dev/apipkg")
8566 (license license:expat)))
8567
8568(define-public python2-apipkg
8569 (package-with-python2 python-apipkg))
8570
8571(define-public python-execnet
8572 (package
8573 (name "python-execnet")
8574 (version "1.4.1")
8575 (source (origin
8576 (method url-fetch)
8577 (uri (pypi-uri "execnet" version))
8578 (sha256
8579 (base32
8580 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8581 (build-system python-build-system)
8582 (arguments
8583 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8584 ;; The two test failures are caused by the lack of an `ssh` executable.
8585 ;; The test suite can be run with pytest after the 'install' phase.
8586 #:tests? #f))
8587 (native-inputs
8588 `(("python-pytest" ,python-pytest)
8589 ("python-setuptools-scm" ,python-setuptools-scm)))
8590 (propagated-inputs
8591 `(("python-apipkg" ,python-apipkg)))
8592 (synopsis "Rapid multi-Python deployment")
8593 (description "Execnet provides a share-nothing model with
8594channel-send/receive communication for distributing execution across many
8595Python interpreters across version, platform and network barriers. It has a
8596minimal and fast API targeting the following uses:
8597@enumerate
8598@item distribute tasks to (many) local or remote CPUs
8599@item write and deploy hybrid multi-process applications
8600@item write scripts to administer multiple environments
8601@end enumerate")
14a5146f 8602 (home-page "https://codespeak.net/execnet/")
44d10b1f
RW
8603 (license license:expat)))
8604
8605(define-public python2-execnet
8606 (package-with-python2 python-execnet))
8607
8608(define-public python-icalendar
8609 (package
8610 (name "python-icalendar")
43ae8f79 8611 (version "4.0.4")
44d10b1f
RW
8612 (source (origin
8613 (method url-fetch)
8614 (uri (pypi-uri "icalendar" version))
8615 (sha256
8616 (base32
43ae8f79 8617 "16gjvqv0n05jrb9g228pdjgzd3amz2pdhvcgsn1jypszjg5m2w9l"))))
44d10b1f
RW
8618 (build-system python-build-system)
8619 (propagated-inputs
8620 `(("python-dateutil" ,python-dateutil)
8621 ("python-pytz" ,python-pytz)))
8622 (synopsis "Python library for parsing iCalendar files")
8623 (description "The icalendar package is a parser/generator of iCalendar
8624files for use with Python.")
8625 (home-page "https://github.com/collective/icalendar")
8626 (license license:bsd-2)))
8627
44d10b1f
RW
8628(define-public python-args
8629 (package
8630 (name "python-args")
8631 (version "0.1.0")
8632 (source (origin
8633 (method url-fetch)
8634 (uri (pypi-uri "args" version))
8635 (sha256
8636 (base32
8637 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8638 (build-system python-build-system)
8639 (home-page "https://github.com/kennethreitz/args")
8640 (synopsis "Command-line argument parser")
8641 (description
8642 "This library provides a Python module to parse command-line arguments.")
8643 (license license:bsd-3)))
8644
8645(define-public python2-args
8646 (package-with-python2 python-args))
8647
8648(define-public python-clint
8649 (package
8650 (name "python-clint")
8651 (version "0.5.1")
8652 (source (origin
8653 (method url-fetch)
8654 (uri (pypi-uri "clint" version))
8655 (sha256
8656 (base32
8657 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8658 (build-system python-build-system)
8659 (arguments
8660 '(#:phases
8661 (modify-phases %standard-phases
8662 (replace 'check
8663 (lambda _ (invoke "py.test" "-v"))))))
8664 (native-inputs
8665 `(("python-pytest" ,python-pytest)))
8666 (propagated-inputs
8667 `(("python-args" ,python-args)))
8668 (home-page "https://github.com/kennethreitz/clint")
8669 (synopsis "Command-line interface tools")
8670 (description
8671 "Clint is a Python module filled with a set of tools for developing
8672command-line applications, including tools for colored and indented
8673output, progress bar display, and pipes.")
8674 (license license:isc)))
8675
8676(define-public python2-clint
8677 (package-with-python2 python-clint))
8678
44d10b1f
RW
8679(define-public python-rply
8680 (package
8681 (name "python-rply")
8682 (version "0.7.5")
8683 (source (origin
8684 (method url-fetch)
8685 (uri (pypi-uri "rply" version))
8686 (sha256
8687 (base32
8688 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
8689 (build-system python-build-system)
8690 (propagated-inputs
8691 `(("python-appdirs" ,python-appdirs)))
8692 (home-page "https://github.com/alex/rply")
8693 (synopsis "Parser generator for Python")
8694 (description
8695 "This package provides a pure Python based parser generator, that also
8696works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8697with a new public API, and RPython support.")
8698 (license license:bsd-3)))
8699
8700(define-public python2-rply
8701 (package-with-python2 python-rply))
8702
8703(define-public python-hy
8704 (package
8705 (name "python-hy")
c215051d 8706 (version "0.17.0")
44d10b1f
RW
8707 (source (origin
8708 (method url-fetch)
8709 (uri (pypi-uri "hy" version))
8710 (sha256
8711 (base32
c215051d 8712 "1gdbqsirsdxj320wnp7my5awzs1kfs6m4fqmkzbd1zd47qzj0zfi"))))
44d10b1f
RW
8713 (build-system python-build-system)
8714 (arguments
8715 '(#:phases
8716 (modify-phases %standard-phases
6ba6a1c1
JG
8717 (add-before 'install 'set-HOME
8718 (lambda _
8719 (setenv "HOME" "/tmp")))
44d10b1f
RW
8720 (replace 'check
8721 (lambda _
8722 ;; Tests require write access to HOME.
8723 (setenv "HOME" "/tmp")
8724 (invoke "nosetests"))))))
8725 (native-inputs
8726 `(("python-coverage" ,python-coverage)
8727 ("python-nose" ,python-nose)))
8728 (propagated-inputs
8729 `(("python-astor" ,python-astor)
8730 ("python-clint" ,python-clint)
c215051d
JG
8731 ("python-rply" ,python-rply)
8732 ("python-fastentrypoints"
8733 ,python-fastentrypoints)
8734 ("python-funcparserlib"
8735 ,python-funcparserlib)))
44d10b1f
RW
8736 (home-page "http://hylang.org/")
8737 (synopsis "Lisp frontend to Python")
8738 (description
8739 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8740its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8741Python at your fingertips, in Lisp form.")
8742 (license license:expat)))
8743
8744(define-public python2-hy
8745 (package-with-python2 python-hy))
8746
8747(define-public python2-functools32
8748 (package
8749 (name "python2-functools32")
8750 (version "3.2.3-2")
8751 (source
8752 (origin
8753 (method url-fetch)
8754 (uri (pypi-uri "functools32" version))
8755 (sha256
8756 (base32
8757 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8758 (build-system python-build-system)
8759 (arguments
8760 `(#:python ,python-2
8761 #:tests? #f)) ; no test target
8762 (home-page "https://github.com/MiCHiLU/python-functools32")
8763 (synopsis
8764 "Backport of the functools module from Python 3.2.3")
8765 (description
8766 "This package is a backport of the @code{functools} module from Python
87673.2.3 for use with older versions of Python and PyPy.")
8768 (license license:expat)))
8769
8770(define-public python2-subprocess32
8771 (package
8772 (name "python2-subprocess32")
8773 (version "3.2.7")
8774 (source (origin
8775 (method url-fetch)
8776 (uri (pypi-uri "subprocess32" version))
8777 (sha256
8778 (base32
8779 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
8780 (patches
8781 (search-patches "python2-subprocess32-disable-input-test.patch"))))
8782 (build-system python-build-system)
8783 (arguments
8784 `(#:python ,python-2
8785 ;; The test suite fails with Python > 2.7.13:
8786 ;; import test.support
8787 ;; ImportError: No module named support
8788 #:tests? #f
8789 #:phases
8790 (modify-phases %standard-phases
8791 (add-after 'unpack 'patch-/bin/sh
8792 (lambda _
8793 (substitute* '("subprocess32.py"
8794 "test_subprocess32.py")
8795 (("/bin/sh") (which "sh")))
8796 #t)))))
8797 (home-page "https://github.com/google/python-subprocess32")
8798 (synopsis "Backport of the subprocess module from Python 3.2")
8799 (description
8800 "This is a backport of the @code{subprocess} standard library module
8801from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
8802new features. On POSIX systems it is guaranteed to be reliable when used
8803in threaded applications. It includes timeout support from Python 3.3 but
8804otherwise matches 3.2’s API.")
8805 (license license:psfl)))
8806
8807(define-public python2-futures
8808 (package
8809 (name "python2-futures")
8810 (version "3.2.0")
8811 (source
8812 (origin
8813 (method url-fetch)
8814 (uri (pypi-uri "futures" version))
8815 (sha256
8816 (base32
8817 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
8818 (build-system python-build-system)
ba88eea2
RW
8819 (arguments
8820 `(#:python ,python-2
8821 #:phases
8822 (modify-phases %standard-phases
8823 (replace 'check
8824 (lambda _
8825 (invoke "python" "test_futures.py")
8826 #t)))))
44d10b1f
RW
8827 (home-page "https://github.com/agronholm/pythonfutures")
8828 (synopsis
8829 "Backport of the concurrent.futures package from Python 3.2")
8830 (description
8831 "The concurrent.futures module provides a high-level interface for
8832asynchronously executing callables. This package backports the
8833concurrent.futures package from Python 3.2")
8834 (license license:bsd-3)))
8835
8836(define-public python-promise
8837 (package
8838 (name "python-promise")
8839 (version "0.4.2")
8840 (source
8841 (origin
8842 (method url-fetch)
8843 (uri (pypi-uri "promise" version))
8844 (sha256
8845 (base32
8846 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8847 (build-system python-build-system)
8848 ;; Tests wants python-futures, which is a python2 only program, and
8849 ;; can't be found by python-promise at test time.
8850 (arguments `(#:tests? #f))
8851 (home-page "https://github.com/syrusakbary/promise")
8852 (synopsis "Promises/A+ implementation for Python")
8853 (description
8854 "Promises/A+ implementation for Python")
8855 (properties `((python2-variant . ,(delay python2-promise))))
8856 (license license:expat)))
8857
8858(define-public python2-promise
8859 (let ((promise (package-with-python2
8860 (strip-python2-variant python-promise))))
8861 (package (inherit promise)
8862 (arguments (substitute-keyword-arguments (package-arguments promise)
8863 ((#:tests? _) #t)))
8864 (native-inputs
8865 `(("python2-futures" ,python2-futures)
8866 ("python2-pytest" ,python2-pytest)
8867 ,@(package-native-inputs promise))))))
8868
d71d85cd
RW
8869(define-public python-progressbar33
8870 (package
8871 (name "python-progressbar33")
8872 (version "2.4")
8873 (source
8874 (origin
8875 (method url-fetch)
8876 (uri (pypi-uri "progressbar33" version))
8877 (sha256
8878 (base32
8879 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
8880 (build-system python-build-system)
8881 (home-page "http://github.com/germangh/python-progressbar")
8882 (synopsis "Text progress bar library for Python")
8883 (description
8884 "This package provides a text progress bar library for Python. This
8885version only differs from the original @code{progressbar} package in that it
8886uses relative package imports instead of absolute imports, which is necessary
8887for the module to work under Python 3.3.")
8888 ;; Either or both of these licenses may be selected.
8889 (license (list license:lgpl2.1+ license:bsd-3))))
8890
44d10b1f
RW
8891(define-public python-colorama
8892 (package
8893 (name "python-colorama")
bd137055 8894 (version "0.4.3")
44d10b1f
RW
8895 (source
8896 (origin
8897 (method url-fetch)
8898 (uri (pypi-uri "colorama" version))
8899 (sha256
8900 (base32
bd137055 8901 "189n8hpijy14jfan4ha9f5n06mnl33cxz7ay92wjqgkr639s0vg9"))))
44d10b1f
RW
8902 (build-system python-build-system)
8903 (synopsis "Colored terminal text rendering for Python")
8904 (description "Colorama is a Python library for rendering colored terminal
8905text.")
e85af137 8906 (home-page "https://pypi.org/project/colorama/")
44d10b1f
RW
8907 (license license:bsd-3)))
8908
8909(define-public python2-colorama
8910 (package-with-python2 python-colorama))
8911
8912(define-public python-rsa
8913 (package
8914 (name "python-rsa")
8915 (version "3.4.2")
8916 (source
8917 (origin
8918 (method url-fetch)
8919 (uri (pypi-uri "rsa" version))
8920 (sha256
8921 (base32
8922 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
8923 (build-system python-build-system)
8924 (propagated-inputs
8925 `(("python-pyasn1" ,python-pyasn1)))
8926 (synopsis "Pure-Python RSA implementation")
8927 (description "Python-RSA is a pure-Python RSA implementation. It supports
8928encryption and decryption, signing and verifying signatures, and key
8929generation according to PKCS#1 version 1.5. It can be used as a Python
8930library as well as on the command line.")
8931 (home-page "https://stuvel.eu/rsa")
8932 (license license:asl2.0)))
8933
8934(define-public python2-rsa
8935 (package-with-python2 python-rsa))
8936
8937(define-public python-pluggy
8938 (package
8939 (name "python-pluggy")
e5731c03 8940 (version "0.11.0")
44d10b1f
RW
8941 (source
8942 (origin
8943 (method url-fetch)
8944 (uri (pypi-uri "pluggy" version))
8945 (sha256
8946 (base32
e5731c03 8947 "10511a54dvafw1jrk75mrhml53c7b7w4yaw7241696lc2hfvr895"))))
44d10b1f
RW
8948 (build-system python-build-system)
8949 (native-inputs
8950 `(("python-setuptools-scm" ,python-setuptools-scm)))
8951 (synopsis "Plugin and hook calling mechanism for Python")
8952 (description "Pluggy is an extraction of the plugin manager as used by
8953Pytest but stripped of Pytest specific details.")
e85af137 8954 (home-page "https://pypi.org/project/pluggy/")
44d10b1f
RW
8955 (license license:expat)))
8956
8957(define-public python2-pluggy
8958 (package-with-python2 python-pluggy))
8959
8960(define-public python-tox
8961 (package
8962 (name "python-tox")
8963 (version "2.8.1")
8964 (source
8965 (origin
8966 (method url-fetch)
8967 (uri (pypi-uri "tox" version))
8968 (sha256
8969 (base32
8970 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
8971 (build-system python-build-system)
8972 (arguments
8973 ;; FIXME: Tests require pytest-timeout, which itself requires
8974 ;; pytest>=2.8.0 for installation.
8975 '(#:tests? #f))
8976 (propagated-inputs
8977 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
8978 ("python-py" ,python-py)
8979 ("python-virtualenv" ,python-virtualenv)))
8980 (native-inputs
8981 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
8982 ("python-pytest" ,python-pytest) ; >= 2.3.5
8983 ("python-setuptools-scm" ,python-setuptools-scm)))
d81fb2ae 8984 (home-page "https://tox.readthedocs.io")
44d10b1f
RW
8985 (synopsis "Virtualenv-based automation of test activities")
8986 (description "Tox is a generic virtualenv management and test command line
8987tool. It can be used to check that a package installs correctly with
8988different Python versions and interpreters, or run tests in each type of
8989supported environment, or act as a frontend to continuous integration
8990servers.")
8991 (license license:expat)))
8992
8993(define-public python2-tox
8994 (package-with-python2 python-tox))
8995
8996(define-public python-jmespath
8997 (package
8998 (name "python-jmespath")
27fb781f 8999 (version "0.9.4")
44d10b1f
RW
9000 (source
9001 (origin
9002 (method url-fetch)
9003 (uri (pypi-uri "jmespath" version))
9004 (sha256
9005 (base32
27fb781f 9006 "0k0765x1mybcrzajh3hiqkl8sy9hs0bmn4900frxy0j3ykvaxqmx"))))
44d10b1f
RW
9007 (build-system python-build-system)
9008 (native-inputs
9009 `(("python-nose" ,python-nose)))
9010 (synopsis "JSON Matching Expressions")
9011 (description "JMESPath (pronounced “james path”) is a Python library that
9012allows one to declaratively specify how to extract elements from a JSON
9013document.")
9014 (home-page "https://github.com/jmespath/jmespath.py")
9015 (license license:expat)))
9016
9017(define-public python2-jmespath
9018 (package-with-python2 python-jmespath))
9019
9020(define-public python-botocore
9021 (package
7bcf827c
RW
9022 (name "python-botocore")
9023 (version "1.12.149")
9024 (source
9025 (origin
9026 (method url-fetch)
9027 (uri (pypi-uri "botocore" version))
9028 (sha256
9029 (base32
9030 "12597f74khp3ngwr282cb949w0gcqj20rkfc3x275dijavyy5cmf"))))
9031 (build-system python-build-system)
9032 (arguments
9033 ;; FIXME: Many tests are failing.
9034 '(#:tests? #f))
9035 (propagated-inputs
9036 `(("python-dateutil" ,python-dateutil)
9037 ("python-docutils" ,python-docutils)
9038 ("python-jmespath" ,python-jmespath)))
9039 (native-inputs
9040 `(("python-mock" ,python-mock)
9041 ("python-nose" ,python-nose)
9042 ("behave" ,behave)
9043 ("python-tox" ,python-tox)
9044 ("python-urllib3" ,python-urllib3)
9045 ("python-wheel" ,python-wheel)))
9046 (home-page "https://github.com/boto/botocore")
9047 (synopsis "Low-level interface to AWS")
9048 (description "Botocore is a Python library that provides a low-level
44d10b1f 9049interface to the Amazon Web Services (AWS) API.")
7bcf827c 9050 (license license:asl2.0)))
44d10b1f
RW
9051
9052(define-public python2-botocore
9053 (package-with-python2 python-botocore))
9054
9055(define-public python-xdo
9056 (package
9057 (name "python-xdo")
9058 (version "0.3")
9059 (source (origin
9060 (method url-fetch)
9061 (uri (string-append
9062 "http://http.debian.net/debian/pool/main/p/python-xdo/"
9063 "python-xdo_" version ".orig.tar.gz"))
9064 (sha256
9065 (base32
9066 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
9067 (build-system python-build-system)
9068 (arguments
9069 '(#:phases
9070 (modify-phases %standard-phases
9071 (add-before 'install 'patch-libxdo-path
9072 ;; Hardcode the path of dynamically loaded libxdo library.
9073 (lambda* (#:key inputs #:allow-other-keys)
9074 (let ((libxdo (string-append
9075 (assoc-ref inputs "xdotool")
9076 "/lib/libxdo.so")))
9077 (substitute* "xdo/_xdo.py"
9078 (("find_library\\(\"xdo\"\\)")
9079 (simple-format #f "\"~a\"" libxdo)))
9080 #t))))
9081 #:tests? #f)) ; no tests provided
9082 (propagated-inputs
9083 `(("python-six" ,python-six)))
9084 (inputs
9085 `(("xdotool" ,xdotool)
9086 ("libX11" ,libx11)))
9087 (home-page "https://tracker.debian.org/pkg/python-xdo")
9088 (synopsis "Python library for simulating X11 keyboard/mouse input")
9089 (description "Provides bindings to libxdo for manipulating X11 via simulated
9090input. (Note that this is mostly a legacy library; you may wish to look at
9091python-xdo for newer bindings.)")
9092 (license license:bsd-3)))
9093
9094(define-public python2-xdo
9095 (package-with-python2 python-xdo))
9096
9097(define-public python-mako
9098 (package
9099 (name "python-mako")
6bf53ad5 9100 (version "1.1.0")
44d10b1f
RW
9101 (source
9102 (origin
9103 (method url-fetch)
9104 (uri (pypi-uri "Mako" version))
9105 (sha256
9106 (base32
6bf53ad5 9107 "0jqa3qfpykyn4fmkn0kh6043sfls7br8i2bsdbccazcvk9cijsd3"))))
44d10b1f 9108 (build-system python-build-system)
6bf53ad5
MB
9109 (arguments
9110 `(#:phases (modify-phases %standard-phases
9111 (replace 'check
9112 (lambda _
9113 (invoke "pytest" "-vv"))))))
44d10b1f
RW
9114 (propagated-inputs
9115 `(("python-markupsafe" ,python-markupsafe)))
9116 (native-inputs
9117 `(("python-mock" ,python-mock)
44d10b1f 9118 ("python-pytest" ,python-pytest)))
7016e620 9119 (home-page "https://www.makotemplates.org/")
44d10b1f
RW
9120 (synopsis "Templating language for Python")
9121 (description "Mako is a templating language for Python that compiles
9122templates into Python modules.")
9123 (license license:expat)))
9124
9125(define-public python2-mako
9126 (package-with-python2 python-mako))
9127
9128(define-public python-waitress
9129 (package
9130 (name "python-waitress")
9131 (version "1.1.0")
9132 (source
9133 (origin
9134 (method url-fetch)
9135 (uri (pypi-uri "waitress" version))
9136 (patches (search-patches "python-waitress-fix-tests.patch"))
9137 (sha256
9138 (base32
9139 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
9140 (build-system python-build-system)
9141 (home-page "https://github.com/Pylons/waitress")
9142 (synopsis "Waitress WSGI server")
9143 (description "Waitress is meant to be a production-quality pure-Python WSGI
9144server with very acceptable performance.")
9145 (license license:zpl2.1)))
9146
9147(define-public python2-waitress
9148 (package-with-python2 python-waitress))
9149
b2b23d12
TLC
9150(define-public python-whichcraft
9151 (package
9152 (name "python-whichcraft")
9153 (version "0.6.1")
9154 (source
9155 (origin
9156 (method url-fetch)
9157 (uri (pypi-uri "whichcraft" version))
9158 (sha256
9159 (base32
9160 "11yfkzyplizdgndy34vyd5qlmr1n5mxis3a3svxmx8fnccdvknxc"))))
9161 (build-system python-build-system)
9162 (native-inputs
9163 `(("python-pytest" ,python-pytest)))
9164 (home-page "https://github.com/pydanny/whichcraft")
9165 (synopsis "Cross-platform cross-python shutil.which functionality")
9166 (description
9167 "This package provides a shim of the shutil.which function that's
9168designed to work across multiple versions of Python.")
9169 (license license:bsd-3)))
9170
1133ca44
TLC
9171(define-public python-cookiecutter
9172 (package
9173 (name "python-cookiecutter")
9174 (version "1.6.0")
9175 (source
9176 (origin
9177 (method url-fetch)
9178 (uri (pypi-uri "cookiecutter" version))
9179 (sha256
9180 (base32
9181 "0glsvaz8igi2wy1hsnhm9fkn6560vdvdixzvkq6dn20z3hpaa5hk"))))
9182 (build-system python-build-system)
9183 (native-inputs
9184 `(("python-freezegun" ,python-freezegun)
9185 ("python-pytest" ,python-pytest)
9186 ("python-pytest-catchlog" ,python-pytest-catchlog)
9187 ("python-pytest-cov" ,python-pytest-cov)
9188 ("python-pytest-mock" ,python-pytest-mock)))
9189 (propagated-inputs
9190 `(("python-binaryornot" ,python-binaryornot)
9191 ("python-click" ,python-click)
9192 ("python-future" ,python-future)
9193 ("python-jinja2" ,python-jinja2)
9194 ("python-jinja2-time" ,python-jinja2-time)
9195 ("python-poyo" ,python-poyo)
9196 ("python-requests" ,python-requests)
9197 ("python-whichcraft" ,python-whichcraft)))
9198 (home-page "https://github.com/audreyr/cookiecutter")
9199 (synopsis
9200 "Command-line utility that creates projects from project templates")
9201 (description
9202 "This package provides a command-line utility that creates projects from
9203project templates, e.g. creating a Python package project from a Python package
9204project template.")
9205 (license license:bsd-3)))
9206
44d10b1f
RW
9207(define-public python-pyquery
9208 (package
9209 (name "python-pyquery")
9210 (version "1.2.17")
9211 (source
9212 (origin
9213 (method url-fetch)
9214 (uri (pypi-uri "pyquery" version))
9215 (sha256
9216 (base32
9217 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
9218 (build-system python-build-system)
9219 (native-inputs
9220 `(("python-webob" ,python-webob)
9221 ("python-webtest" ,python-webtest)))
9222 (propagated-inputs
9223 `(("python-lxml" ,python-lxml)
9224 ("python-cssselect" ,python-cssselect)))
9225 (home-page "https://github.com/gawel/pyquery")
9226 (synopsis "Make jQuery-like queries on xml documents")
9227 (description "pyquery allows you to make jQuery queries on xml documents.
9228The API is as much as possible the similar to jQuery. pyquery uses lxml for
9229fast xml and html manipulation.")
9230 (license license:bsd-3)))
9231
44d10b1f
RW
9232(define-public python-anyjson
9233 (package
9234 (name "python-anyjson")
9235 (version "0.3.3")
9236 (source
9237 (origin
9238 (method url-fetch)
9239 (uri (pypi-uri "anyjson" version))
9240 (sha256
9241 (base32
9242 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
9243 (build-system python-build-system)
9244 (arguments
9245 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
9246 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
9247 ;; whatever) so this transformation needs to be done before the tests
9248 ;; can be run. Maybe we could add a build step to transform beforehand
9249 ;; but it could be annoying/difficult.
9250 ;; We can enable tests for the Python 2 version, though, and do below.
9251 #:tests? #f))
9252 (home-page "https://bitbucket.org/runeh/anyjson/")
9253 (synopsis
9254 "Wraps best available JSON implementation in a common interface")
9255 (description
9256 "Anyjson loads whichever is the fastest JSON module installed
9257and provides a uniform API regardless of which JSON implementation is used.")
9258 (license license:bsd-3)
9259 (properties `((python2-variant . ,(delay python2-anyjson))))))
9260
9261(define-public python2-anyjson
9262 (let ((anyjson (package-with-python2
9263 (strip-python2-variant python-anyjson))))
9264 (package
9265 (inherit anyjson)
9266 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
9267 #:tests? #t
9268 ,@(package-arguments anyjson)))
9269 (native-inputs `(("python2-nose" ,python2-nose))))))
9270
9271(define-public python-amqp
9272 (package
9273 (name "python-amqp")
9274 (version "2.3.2")
9275 (source
9276 (origin
9277 (method url-fetch)
9278 (uri (pypi-uri "amqp" version))
9279 (sha256
9280 (base32
9281 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
9282 (build-system python-build-system)
9283 (native-inputs
9284 `(("python-case" ,python-case)
9285 ("python-pytest-sugar" ,python-pytest-sugar)
9286 ("python-mock" ,python-mock)))
9287 (propagated-inputs
9288 `(("python-vine" ,python-vine)))
9289 (home-page "https://github.com/celery/py-amqp")
9290 (synopsis
9291 "Low-level AMQP client for Python (fork of amqplib)")
9292 (description
9293 "This is a fork of amqplib which was originally written by Barry Pederson.
9294It is maintained by the Celery project, and used by kombu as a pure python
9295alternative when librabbitmq is not available.")
9296 (license license:lgpl2.1+)
9297 (properties `((python2-variant . ,(delay python2-amqp))))))
9298
9299(define-public python2-amqp
9300 (let ((amqp (package-with-python2
9301 (strip-python2-variant python-amqp))))
9302 (package
9303 (inherit amqp)
9304 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
9305 ;; unmaintained. Weirdly, does not do this on the python 3
9306 ;; version?
9307 #:tests? #f
9308 ,@(package-arguments amqp))))))
9309
9310(define-public python-txamqp
9311 (package
9312 (name "python-txamqp")
9313 (version "0.8.2")
9314 (source
9315 (origin
9316 (method url-fetch)
9317 (uri (pypi-uri "txAMQP" version))
9318 (sha256
9319 (base32
9320 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
9321 (build-system python-build-system)
9322 (propagated-inputs
9323 `(("python-six" ,python-six)
9324 ("python-twisted" ,python-twisted)))
9325 (home-page "https://github.com/txamqp/txamqp")
9326 (synopsis "Communicate with AMQP peers and brokers using Twisted")
9327 (description
9328 "This package provides a Python library for communicating with AMQP peers
9329and brokers using the asynchronous networking framework Twisted. It contains
9330all the necessary code to connect, send and receive messages to/from an
9331AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
9332also includes support for using Thrift RPC over AMQP in Twisted
9333applications.")
9334 (license license:asl2.0)))
9335
9336(define-public python2-txamqp
9337 (package-with-python2 python-txamqp))
9338
9339(define-public python-kombu
9340 (package
9341 (name "python-kombu")
9342 (version "4.2.2")
9343 (source
9344 (origin
9345 (method url-fetch)
9346 (uri (pypi-uri "kombu" version))
9347 (sha256
9348 (base32
9349 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
9350 (build-system python-build-system)
9351 (native-inputs
9352 `(("python-mock" ,python-mock)
9353 ("python-case" ,python-case)
9354 ("python-pyro4" ,python-pyro4)
9355 ("python-pytest-sugar" ,python-pytest-sugar)
9356 ("python-pytz" ,python-pytz)))
9357 (propagated-inputs
9358 `(("python-anyjson" ,python-anyjson)
9359 ("python-amqp" ,python-amqp)
9360 ("python-redis" ,python-redis)))
9361 (home-page "https://kombu.readthedocs.io")
9362 (synopsis "Message passing library for Python")
9363 (description "The aim of Kombu is to make messaging in Python as easy as
9364possible by providing an idiomatic high-level interface for the AMQ protocol,
9365and also provide proven and tested solutions to common messaging problems.
9366AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9367message orientation, queuing, routing, reliability and security, for which the
9368RabbitMQ messaging server is the most popular implementation.")
9369 (license license:bsd-3)
9370 (properties `((python2-variant . ,(delay python2-kombu))))))
9371
9372(define-public python2-kombu
9373 (let ((kombu (package-with-python2
9374 (strip-python2-variant python-kombu))))
9375 (package
9376 (inherit kombu)
9377 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
9378 ;; It works fine on the python3 variant.
9379 #:tests? #f
9380 ,@(package-arguments kombu)))
9381 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9382 ,@(package-native-inputs kombu))))))
9383
9384(define-public python-billiard
9385 (package
9386 (name "python-billiard")
9387 (version "3.5.0.5")
9388 (source
9389 (origin
9390 (method url-fetch)
9391 (uri (pypi-uri "billiard" version))
9392 (sha256
9393 (base32
9394 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
9395 (build-system python-build-system)
9396 (native-inputs
9397 `(("python-case" ,python-case)
9398 ("python-pytest" ,python-pytest)))
9399 (home-page "https://github.com/celery/billiard")
9400 (synopsis
9401 "Python multiprocessing fork with improvements and bugfixes")
9402 (description
9403 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9404multiprocessing package itself is a renamed and updated version of R Oudkerk's
9405pyprocessing package. This standalone variant is intended to be compatible with
9406Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
9407 (license license:bsd-3)
9408 (properties `((python2-variant . ,(delay python2-billiard))))))
9409
9410(define-public python2-billiard
9411 (let ((billiard (package-with-python2
9412 (strip-python2-variant python-billiard))))
9413 (package
9414 (inherit billiard)
9415 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9416 ("python2-mock" ,python2-mock)
9417 ,@(package-native-inputs billiard))))))
9418
9419(define-public python-celery
9420 (package
9421 (name "python-celery")
9422 (version "4.2.1")
9423 (source
9424 (origin
9425 (method url-fetch)
9426 (uri (pypi-uri "celery" version))
9427 (sha256
9428 (base32
9429 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
9430 (build-system python-build-system)
9431 (arguments
9432 '(;; TODO The tests fail with Python 3.7
9433 ;; https://github.com/celery/celery/issues/4849
9434 #:tests? #f
9435 #:phases
9436 (modify-phases %standard-phases
9437 (add-after 'unpack 'patch-requirements
9438 (lambda _
9439 (substitute* "requirements/test.txt"
9440 (("pytest>=3\\.0,<3\\.3")
9441 "pytest>=3.0"))
9442 #t)))))
9443 (native-inputs
9444 `(("python-case" ,python-case)
9445 ("python-pytest" ,python-pytest)))
9446 (propagated-inputs
9447 `(("python-pytz" ,python-pytz)
9448 ("python-billiard" ,python-billiard)
9449 ("python-kombu" ,python-kombu)))
9450 (home-page "https://celeryproject.org")
9451 (synopsis "Distributed Task Queue")
9452 (description "Celery is an asynchronous task queue/job queue based on
9453distributed message passing. It is focused on real-time operation, but
9454supports scheduling as well. The execution units, called tasks, are executed
9455concurrently on a single or more worker servers using multiprocessing,
9456Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9457synchronously (wait until ready).")
9458 (license license:bsd-3)
9459 (properties `((python2-variant . ,(delay python2-celery))))))
9460
9461(define-public python2-celery
9462 (let ((celery (package-with-python2
9463 (strip-python2-variant python-celery))))
9464 (package
9465 (inherit celery)
9466 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9467 ("python2-mock" ,python2-mock)
9468 ,@(package-native-inputs celery))))))
9469
9470(define-public python-translitcodec
9471 (package
9472 (name "python-translitcodec")
9473 (version "0.4.0")
9474 (source
9475 (origin
9476 (method url-fetch)
9477 (uri (pypi-uri "translitcodec" version))
9478 (sha256
9479 (base32
9480 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9481 (build-system python-build-system)
9482 (arguments
9483 `(#:tests? #f)) ; no tests provided
9484 (home-page
9485 "https://github.com/claudep/translitcodec")
9486 (synopsis
9487 "Unicode to 8-bit charset transliteration codec")
9488 (description
9489 "This package contains codecs for transliterating ISO 10646 texts into
9490best-effort representations using smaller coded character sets (ASCII,
9491ISO 8859, etc.).")
9492 (license license:expat)))
9493
9494(define-public python2-translitcodec
9495 (package-with-python2 python-translitcodec))
9496
9497(define-public python-editor
9498 (package
9499 (name "python-editor")
9500 (version "0.5")
9501 (source
9502 (origin
9503 (method url-fetch)
9504 (uri (pypi-uri "python-editor" version))
9505 (sha256
9506 (base32
9507 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9508 (build-system python-build-system)
9509 (home-page
9510 "https://github.com/fmoo/python-editor")
9511 (synopsis
9512 "Programmatically open an editor, capture the result")
9513 (description
9514 "python-editor is a library that provides the editor module for
9515programmatically interfacing with your system's $EDITOR.")
9516 (license license:asl2.0)))
9517
9518(define-public python2-editor
9519 (package-with-python2 python-editor))
9520
44d10b1f
RW
9521(define-public python-vobject
9522 (package
9523 (name "python-vobject")
9524 (version "0.9.5")
9525 (source (origin
9526 (method url-fetch)
9527 (uri (pypi-uri "vobject" version))
9528 (sha256
9529 (base32
9530 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
9531 (build-system python-build-system)
9532 (arguments
9533 '(;; The test suite relies on some non-portable Windows interfaces.
9534 #:tests? #f))
9535 (propagated-inputs
9536 `(("python-dateutil" ,python-dateutil)
9537 ("python-pyicu" ,python-pyicu)))
9538 (synopsis "Parse and generate vCard and vCalendar files")
9539 (description "Vobject is intended to be a full featured Python package for
9540parsing and generating vCard and vCalendar files. Currently, iCalendar files
9541are supported and well tested. vCard 3.0 files are supported, and all data
9542should be imported, but only a few components are understood in a sophisticated
9543way.")
5d6e7106 9544 (home-page "https://eventable.github.io/vobject/")
44d10b1f
RW
9545 (license license:asl2.0)))
9546
9547(define-public python2-vobject
9548 (package-with-python2 python-vobject))
9549
9550(define-public python-munkres
9551 (package
9552 (name "python-munkres")
9553 (version "1.0.8")
9554 (source (origin
9555 (method url-fetch)
9556 (uri (pypi-uri "munkres" version))
9557 (sha256
9558 (base32
9559 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
9560 (build-system python-build-system)
9561 (arguments
9562 '(#:tests? #f)) ; no test suite
78f8780e 9563 (home-page "https://software.clapper.org/munkres/")
44d10b1f
RW
9564 (synopsis "Implementation of the Munkres algorithm")
9565 (description "The Munkres module provides an implementation of the Munkres
9566algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9567useful for solving the Assignment Problem.")
9568 (license license:bsd-3)))
9569
9570(define-public python2-munkres
9571 (package-with-python2 python-munkres))
9572
9573(define-public python-whoosh
9574 (package
9575 (name "python-whoosh")
9576 (version "2.7.4")
9577 (source
9578 (origin
9579 (method url-fetch)
9580 (uri (pypi-uri "Whoosh" version))
9581 (sha256
9582 (base32
9583 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9584 (build-system python-build-system)
2679d9a4 9585 (arguments '(#:tests? #f)) ; Test invocation is no longer supported by Python.
44d10b1f
RW
9586 (native-inputs
9587 `(("python-pytest" ,python-pytest)))
9588 (home-page "https://bitbucket.org/mchaput/whoosh")
9589 (synopsis "Full text indexing, search, and spell checking library")
9590 (description
9591 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9592checking library.")
9593 (license license:bsd-2)))
9594
9595(define-public python2-whoosh
9596 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9597 (package (inherit whoosh)
9598 (propagated-inputs
9599 `(("python2-backport-ssl-match-hostname"
9600 ,python2-backport-ssl-match-hostname)
9601 ,@(package-propagated-inputs whoosh))))))
9602
9603(define-public python-pathlib
9604 (package
9605 (name "python-pathlib")
9606 (version "1.0.1")
9607 (source (origin
9608 (method url-fetch)
9609 (uri (pypi-uri "pathlib" version))
9610 (sha256
9611 (base32
9612 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9613 (build-system python-build-system)
9614 ;; The tests depend on the internal "test" module, which does not provide
9615 ;; a stable interface.
9616 (arguments `(#:tests? #f))
9617 (home-page "https://pathlib.readthedocs.org/")
9618 (synopsis "Object-oriented file system paths")
9619 (description "Pathlib offers a set of classes to handle file system paths.
9620It offers the following advantages over using string objects:
9621
9622@enumerate
9623@item No more cumbersome use of os and os.path functions. Everything can
9624be done easily through operators, attribute accesses, and method calls.
9625@item Embodies the semantics of different path types. For example,
9626comparing Windows paths ignores casing.
9627@item Well-defined semantics, eliminating any inconsistencies or
9628ambiguities (forward vs. backward slashes, etc.).
9629@end enumerate
9630
9631Note: In Python 3.4, pathlib is now part of the standard library. For other
9632Python versions please consider python-pathlib2 instead, which tracks the
9633standard library module. This module (python-pathlib) isn't maintained
9634anymore.")
9635 (license license:expat)))
9636
9637(define-public python2-pathlib
9638 (package-with-python2 python-pathlib))
9639
9640(define-public python2-pathlib2
9641 (package
9642 (name "python2-pathlib2")
54da6f9f 9643 (version "2.3.3")
44d10b1f
RW
9644 (source (origin
9645 (method url-fetch)
9646 (uri (pypi-uri "pathlib2" version))
9647 (sha256
9648 (base32
54da6f9f 9649 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
44d10b1f
RW
9650 (build-system python-build-system)
9651 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9652 ;; version is 3.4 which already includes this package as part of the
9653 ;; standard library.
9654 (arguments
9655 `(#:python ,python-2))
9656 (propagated-inputs
9657 `(("python2-scandir" ,python2-scandir)
9658 ("python2-six" ,python2-six)))
e85af137 9659 (home-page "https://pypi.org/project/pathlib2/")
44d10b1f
RW
9660 (synopsis "Object-oriented file system paths - backport of standard
9661pathlib module")
9662 (description "The goal of pathlib2 is to provide a backport of standard
9663pathlib module which tracks the standard library module, so all the newest
9664features of the standard pathlib can be used also on older Python versions.
9665
9666Pathlib offers a set of classes to handle file system paths. It offers the
9667following advantages over using string objects:
9668
9669@enumerate
9670@item No more cumbersome use of os and os.path functions. Everything can
9671be done easily through operators, attribute accesses, and method calls.
9672@item Embodies the semantics of different path types. For example,
9673comparing Windows paths ignores casing.
9674@item Well-defined semantics, eliminating any inconsistencies or
9675ambiguities (forward vs. backward slashes, etc.).
9676@end enumerate")
9677 (license license:expat)))
9678
9679(define-public python2-pathlib2-bootstrap
9680 (hidden-package
9681 (package
9682 (inherit python2-pathlib2)
9683 (name "python2-pathlib2-bootstrap")
9684 (propagated-inputs
9685 `(("python2-scandir" ,python2-scandir)
9686 ("python2-six" ,python2-six-bootstrap))))))
9687
9688(define-public python-jellyfish
9689 (package
9690 (name "python-jellyfish")
9691 (version "0.5.6")
9692 (source (origin
9693 (method url-fetch)
9694 (uri (pypi-uri "jellyfish" version))
9695 (sha256
9696 (base32
9697 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
9698 (build-system python-build-system)
9699 (native-inputs
9700 `(("python-pytest" ,python-pytest)))
9701 (home-page "https://github.com/jamesturk/jellyfish")
9702 (synopsis "Approximate and phonetic matching of strings")
9703 (description "Jellyfish uses a variety of string comparison and phonetic
9704encoding algorithms to do fuzzy string matching.")
9705 (license license:bsd-2)
9706 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9707
9708(define-public python2-jellyfish
9709 (let ((jellyfish (package-with-python2
9710 (strip-python2-variant python-jellyfish))))
9711 (package (inherit jellyfish)
9712 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
9713 ,@(package-native-inputs jellyfish))))))
9714
9715(define-public python2-unicodecsv
9716 (package
9717 (name "python2-unicodecsv")
9718 (version "0.14.1")
9719 (source (origin
f711b71b 9720 (method git-fetch)
44d10b1f
RW
9721 ;; The test suite is not included in the PyPi release.
9722 ;; https://github.com/jdunck/python-unicodecsv/issues/19
f711b71b
EF
9723 (uri (git-reference
9724 (url "https://github.com/jdunck/python-unicodecsv")
9725 (commit version)))
9726 (file-name (git-file-name name version))
44d10b1f
RW
9727 (sha256
9728 (base32
f711b71b 9729 "15hx2k41a2lpv4hcml9zp4cvlx1171mnb5s4s13xc1pxkq3vgdjy"))))
44d10b1f
RW
9730 (build-system python-build-system)
9731 (arguments
9732 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9733 #:python ,python-2))
9734 (native-inputs
9735 `(("python2-unittest2" ,python2-unittest2)))
9736 (home-page "https://github.com/jdunck/python-unicodecsv")
9737 (synopsis "Unicode CSV module for Python 2")
9738 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9739module, adding support for Unicode strings.")
9740 (license license:bsd-2)))
9741
9742(define-public python-rarfile
9743 (package
9744 (name "python-rarfile")
9745 (version "2.8")
9746 (source (origin
9747 (method url-fetch)
9748 (uri (pypi-uri "rarfile" version))
9749 (sha256
9750 (base32
9751 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
9752 (build-system python-build-system)
9753 (arguments
9754 '(#:phases
9755 (modify-phases %standard-phases
9756 (replace 'check
9757 ;; Many tests fail, but the installation proceeds.
e59dd341 9758 (lambda _ (invoke "make" "-C" "test" "test"))))))
44d10b1f
RW
9759 (native-inputs
9760 `(("which" ,which))) ; required for tests
9761 (propagated-inputs
9762 `(("libarchive" ,libarchive)))
9763 (home-page "https://github.com/markokr/rarfile")
9764 (synopsis "RAR archive reader for Python")
9765 (description "This is Python module for RAR archive reading. The interface
9766is made as zipfile like as possible.")
9767 (license license:isc)))
9768
9769(define-public python2-rarfile
9770 (package-with-python2 python-rarfile))
9771
9772(define-public python-magic
9773 (package
9774 (name "python-magic")
9775 (version "0.4.15")
9776 (source
9777 (origin
9778 (method url-fetch)
9779 (uri (pypi-uri "python-magic" version))
9780 (sha256
9781 (base32
9782 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
9783 (file-name (string-append name "-" version "-checkout"))))
9784 (build-system python-build-system)
9785 (arguments
9786 ;; The tests are unreliable, so don't run them. The tests fail
9787 ;; under Python3 because they were written for Python2 and
9788 ;; contain import statements that do not work in Python3. One of
9789 ;; the tests fails under Python2 because its assertions are
9790 ;; overly stringent; it relies on comparing output strings which
9791 ;; are brittle and can change depending on the version of
9792 ;; libmagic being used and the system on which the test is
9793 ;; running. In my case, under GuixSD 0.10.0, only one test
9794 ;; failed, and it seems to have failed only because the version
9795 ;; of libmagic that is packaged in Guix outputs a slightly
9796 ;; different (but not wrong) string than the one that the test
9797 ;; expected.
9798 '(#:tests? #f
9799 #:phases (modify-phases %standard-phases
9800 ;; Replace a specific method call with a hard-coded
9801 ;; path to the necessary libmagic.so file in the
9802 ;; store. If we don't do this, then the method call
9803 ;; will fail to find the libmagic.so file, which in
9804 ;; turn will cause any application using
9805 ;; python-magic to fail.
9806 (add-before 'build 'hard-code-path-to-libmagic
9807 (lambda* (#:key inputs #:allow-other-keys)
9808 (let ((file (assoc-ref inputs "file")))
9809 (substitute* "magic.py"
9810 (("ctypes.util.find_library\\('magic'\\)")
9811 (string-append "'" file "/lib/libmagic.so'")))
9812 #t)))
9813 (add-before 'install 'disable-egg-compression
9814 (lambda _
9815 (let ((port (open-file "setup.cfg" "a")))
9816 (display "\n[easy_install]\nzip_ok = 0\n"
9817 port)
9818 (close-port port)
9819 #t))))))
9820 (inputs
9821 ;; python-magic needs to be able to find libmagic.so.
9822 `(("file" ,file)))
9823 (home-page
9824 "https://github.com/ahupp/python-magic")
9825 (synopsis
9826 "File type identification using libmagic")
9827 (description
9828 "This module uses ctypes to access the libmagic file type
9829identification library. It makes use of the local magic database and
9830supports both textual and MIME-type output. Note that this module and
9831the python-file module both provide a \"magic.py\" file; these two
9832modules, which are different and were developed separately, both serve
9833the same purpose: to provide Python bindings for libmagic.")
9834 (license license:expat)))
9835
9836(define-public python2-magic
9837 (package-with-python2 python-magic))
9838
9839(define-public python2-s3cmd
9840 (package
9841 (name "python2-s3cmd")
9842 (version "1.6.1")
9843 (source
9844 (origin
9845 (method url-fetch)
9846 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
9847 "s3cmd-" version ".tar.gz"))
9848 (sha256
9849 (base32
9850 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9851 (build-system python-build-system)
9852 (arguments
9853 ;; s3cmd is written for python2 only and contains no tests.
9854 `(#:python ,python-2
9855 #:tests? #f))
9856 (propagated-inputs
9857 `(("python2-dateutil" ,python2-dateutil)
9858 ;; The python-file package also provides a magic.py module.
9859 ;; This is an unfortunate state of affairs; however, s3cmd
9860 ;; fails to install if it cannot find specifically the
9861 ;; python-magic package. Thus we include it, instead of using
9862 ;; python-file. Ironically, s3cmd sometimes works better
9863 ;; without libmagic bindings at all:
9864 ;; https://github.com/s3tools/s3cmd/issues/198
9865 ("python2-magic" ,python2-magic)))
9866 (home-page "http://s3tools.org/s3cmd")
9867 (synopsis "Command line tool for S3-compatible storage services")
9868 (description
9869 "S3cmd is a command line tool for uploading, retrieving and managing data
9870in storage services that are compatible with the Amazon Simple Storage
9871Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9872GnuPG encryption, and more. It also supports management of Amazon's
9873CloudFront content delivery network.")
9874 (license license:gpl2+)))
9875
9876(define-public python-pkgconfig
9877 (package
9878 (name "python-pkgconfig")
9879 (version "1.3.1")
9880 (source
9881 (origin
9882 (method url-fetch)
9883 (uri (pypi-uri "pkgconfig" version))
9884 (sha256
9885 (base32
9886 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
9887 (build-system python-build-system)
9888 (native-inputs
9889 `(("python-nose" ,python-nose)))
9890 (inputs
9891 `(("pkg-config" ,pkg-config)))
9892 (arguments
9893 `(#:phases
9894 (modify-phases %standard-phases
9895 (add-before 'build 'patch
9896 ;; Hard-code the path to pkg-config.
9897 (lambda _
9898 (substitute* "pkgconfig/pkgconfig.py"
9899 (("cmd = 'pkg-config")
9900 (string-append "cmd = '" (which "pkg-config"))))
9901 #t))
9902 (replace 'check
9903 (lambda _
9904 (invoke "nosetests" "test.py"))))))
9905 (home-page "https://github.com/matze/pkgconfig")
9906 (synopsis "Python interface for pkg-config")
9907 (description "This module provides a Python interface to pkg-config. It
9908can be used to find all pkg-config packages, check if a package exists,
9909check if a package meets certain version requirements, query CFLAGS and
9910LDFLAGS and parse the output to build extensions with setup.py.")
9911 (license license:expat)))
9912
9913(define-public python2-pkgconfig
9914 (package-with-python2 python-pkgconfig))
9915
9916(define-public python-bz2file
9917 (package
9918 (name "python-bz2file")
9919 (version "0.98")
9920 (source
9921 (origin
9922 (method url-fetch)
9923 (uri (pypi-uri "bz2file" version))
9924 (sha256
9925 (base32
9926 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9927 (build-system python-build-system)
9928 (arguments
9929 `(#:tests? #f)) ; Tests use deprecated python modules.
9930 (home-page "https://github.com/nvawda/bz2file")
9931 (synopsis "Read and write bzip2-compressed files")
9932 (description
9933 "Bz2file is a Python library for reading and writing bzip2-compressed
9934files. It contains a drop-in replacement for the I/O interface in the
9935standard library's @code{bz2} module, including features from the latest
9936development version of CPython that are not available in older releases.")
9937 (license license:asl2.0)))
9938
9939(define-public python2-bz2file
9940 (package-with-python2 python-bz2file))
9941
9942(define-public python-future
9943 (package
9944 (name "python-future")
d5d54030 9945 (version "0.17.1")
44d10b1f
RW
9946 (source
9947 (origin
9948 (method url-fetch)
9949 (uri (pypi-uri "future" version))
9950 (sha256
9951 (base32
d5d54030 9952 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
44d10b1f
RW
9953 (build-system python-build-system)
9954 ;; Many tests connect to the network or are otherwise flawed.
9955 ;; https://github.com/PythonCharmers/python-future/issues/210
9956 (arguments
9957 `(#:tests? #f))
9958 (home-page "http://python-future.org")
9959 (synopsis "Single-source support for Python 3 and 2")
9960 (description
9961 "@code{python-future} is the missing compatibility layer between Python 2 and
9962Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9963to support both Python 2 and Python 3 with minimal overhead.")
9964 (license license:expat)))
9965
9966(define-public python2-future
9967 (package-with-python2 python-future))
9968
9969(define-public python-cysignals
9970 (package
9971 (name "python-cysignals")
8e3e51df 9972 (version "1.9.0")
44d10b1f
RW
9973 (source
9974 (origin
9975 (method url-fetch)
8e3e51df 9976 (uri (pypi-uri "cysignals" version))
44d10b1f
RW
9977 (sha256
9978 (base32
8e3e51df 9979 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
44d10b1f
RW
9980 (build-system python-build-system)
9981 (native-inputs
9982 `(("python-cython" ,python-cython)
9983 ("python-sphinx" ,python-sphinx)))
9984 (inputs
9985 `(("pari-gp" ,pari-gp)))
9986 (arguments
9987 `(#:modules ((guix build python-build-system)
9988 ((guix build gnu-build-system) #:prefix gnu:)
9989 (guix build utils))
9990 ;; FIXME: Tests are executed after installation and currently fail
9991 ;; when not installing into standard locations; the author is working
9992 ;; on a fix.
9993 #:tests? #f
9994 #:phases
9995 (modify-phases %standard-phases
9996 (add-before
9997 'build 'configure
9998 (assoc-ref gnu:%standard-phases 'configure)))))
9999 (home-page
10000 "https://github.com/sagemath/cysignals")
10001 (synopsis
10002 "Handling of interrupts and signals for Cython")
10003 (description
10004 "The cysignals package provides mechanisms to handle interrupts (and
10005other signals and errors) in Cython code, using two related approaches,
10006for mixed Cython/Python code or external C libraries and pure Cython code,
10007respectively.")
10008 (license license:lgpl3+)))
10009
10010(define-public python2-cysignals
10011 (package-with-python2 python-cysignals))
10012
10013(define-public python2-shedskin
10014 (package
10015 (name "python2-shedskin")
10016 (version "0.9.4")
10017 (source
10018 (origin
10019 (method url-fetch)
10020 (uri (string-append "https://github.com/shedskin/shedskin/"
10021 "releases/download/v" version
10022 "/shedskin-" version ".tgz"))
10023 (sha256
10024 (base32
10025 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
10026 (build-system python-build-system)
10027 (arguments
10028 `(#:python ,python-2
10029 #:phases (modify-phases %standard-phases
10030 (add-after 'unpack 'fix-resulting-include-libs
10031 (lambda* (#:key inputs #:allow-other-keys)
10032 (let ((libgc (assoc-ref inputs "libgc"))
10033 (pcre (assoc-ref inputs "pcre")))
10034 (substitute* "shedskin/makefile.py"
10035 (("variable == 'CCFLAGS':[ ]*")
10036 (string-append "variable == 'CCFLAGS':\n"
10037 " line += ' -I " pcre "/include"
10038 " -I " libgc "/include'"))
10039 (("variable == 'LFLAGS':[ ]*")
10040 (string-append "variable == 'LFLAGS':\n"
10041 " line += ' -L" pcre "/lib"
10042 " -L " libgc "/lib'")))
10043 #t))))))
10044 (inputs `(("pcre" ,pcre)
10045 ("libgc" ,libgc)))
10046 (home-page "https://shedskin.github.io/")
10047 (synopsis "Experimental Python-2 to C++ Compiler")
10048 (description (string-append "This is an experimental compiler for a subset of
10049Python. It generates C++ code and a Makefile."))
10050 (license (list license:gpl3 license:bsd-3 license:expat))))
10051
10052(define-public python2-rope
10053 (package
10054 (name "python2-rope")
a9ba0a31 10055 (version "0.11.0")
44d10b1f
RW
10056 (source
10057 (origin
10058 (method url-fetch)
10059 (uri (pypi-uri "rope" version))
10060 (sha256
10061 (base32
a9ba0a31 10062 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
44d10b1f 10063 (arguments
afb29715 10064 ;; Rope has only partial python3 support, see `python-rope'
44d10b1f
RW
10065 `(#:python ,python-2))
10066 (build-system python-build-system)
10067 (native-inputs
10068 `(("python2-unittest2" ,python2-unittest2)))
10069 (home-page "https://github.com/python-rope/rope")
10070 (synopsis "Refactoring library for Python")
10071 (description "Rope is a refactoring library for Python. It facilitates
10072the renaming, moving and extracting of attributes, functions, modules, fields
10073and parameters in Python 2 source code. These refactorings can also be applied
10074to occurrences in strings and comments.")
10075 (license license:gpl2)))
10076
2c880ef4
LC
10077(define-public python-rope
10078 (package
10079 (inherit python2-rope)
10080 (name "python-rope")
10081 (arguments `(#:python ,python-wrapper
10082 ;; XXX: Only partial python3 support, results in some failing
10083 ;; tests: <https://github.com/python-rope/rope/issues/247>.
10084 #:tests? #f))
10085 (properties `((python2-variant . ,(delay python2-rope))))))
10086
44d10b1f
RW
10087(define-public python-py3status
10088 (package
10089 (name "python-py3status")
ef68b35d 10090 (version "3.21")
44d10b1f
RW
10091 (source
10092 (origin
10093 (method url-fetch)
10094 (uri (pypi-uri "py3status" version))
10095 (sha256
ef68b35d 10096 (base32 "16z8zq83hxy48g6hh4xczbdz50qvxv9k1aahr4fqq7jis60cc262"))))
44d10b1f
RW
10097 (build-system python-build-system)
10098 (inputs
10099 `(("file" ,file)))
10100 (arguments
10101 '(#:phases
10102 (modify-phases %standard-phases
10103 ;; 'file' is used for detection of configuration file encoding
10104 ;; let's make link the dependency to particular input
10105 (add-before 'build 'patch-file-path
10106 (lambda* (#:key inputs #:allow-other-keys)
10107 (let ((file-path (assoc-ref inputs "file")))
10108 (substitute* "py3status/parse_config.py"
6a6b8a3f 10109 (("\\[\"file\", \"-b\"")
44d10b1f
RW
10110 (string-append "['" file-path "/bin/file', '-b'")))
10111 #t))))
10112 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
10113 (home-page "https://github.com/ultrabug/py3status")
10114 (synopsis "Extensible i3status wrapper written in Python")
10115 (description "py3status is an i3status wrapper which extends i3status
10116functionality in a modular way, allowing you to extend your panel with your
10117own code, responding to click events and updating clock every second.")
10118 (license license:bsd-3)))
10119
10120(define-public python-tblib
10121 (package
10122 (name "python-tblib")
10123 (version "1.3.2")
10124 (source (origin
10125 (method url-fetch)
10126 (uri (pypi-uri "tblib" version))
10127 (sha256 (base32
10128 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
10129 (build-system python-build-system)
10130 (arguments
10131 `(#:phases
10132 (modify-phases %standard-phases
10133 (add-before 'check 'adjust-tests
10134 (lambda _
10135 (when (which "python3")
10136 ;; Adjust the example output to match that of Python 3.7:
10137 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
10138 (substitute* "README.rst"
10139 (("Exception\\('fail',") "Exception('fail'"))
10140 #t)))
10141 (replace 'check
10142 (lambda _
10143 ;; Upstream runs tests after installation and the package itself
10144 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
10145 ;; found.
10146 (setenv "PYTHONPATH"
10147 (string-append (getcwd) "/build/lib:"
10148 (getenv "PYTHONPATH")))
10149 (invoke "py.test" "-vv" "tests" "README.rst"))))))
10150 (native-inputs
10151 `(("python-pytest" ,python-pytest)
10152 ("python-six" ,python-six)))
10153 (home-page "https://github.com/ionelmc/python-tblib")
10154 (synopsis "Traceback serialization library")
10155 (description
10156 "Traceback serialization allows you to:
10157
10158@enumerate
10159@item Pickle tracebacks and raise exceptions with pickled tracebacks in
10160different processes. This allows better error handling when running code over
10161multiple processes (imagine multiprocessing, billiard, futures, celery etc).
10162
10163@item Parse traceback strings and raise with the parsed tracebacks.
10164@end enumerate\n")
10165 (license license:bsd-3)))
10166
10167(define-public python2-tblib
10168 (package-with-python2 python-tblib))
10169
10170(define-public python-greenlet
10171 (package
10172 (name "python-greenlet")
10173 (version "0.4.15")
10174 (source (origin
10175 (method url-fetch)
10176 (uri (pypi-uri "greenlet" version))
10177 (sha256
10178 (base32
10179 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
10180 (build-system python-build-system)
10181 (home-page "https://greenlet.readthedocs.io/")
10182 (synopsis "Lightweight in-process concurrent programming")
10183 (description
10184 "Greenlet package is a spin-off of Stackless, a version of CPython
10185that supports micro-threads called \"tasklets\". Tasklets run
10186pseudo-concurrently (typically in a single or a few OS-level threads) and
10187are synchronized with data exchanges on \"channels\".")
10188 (license (list license:psfl license:expat))))
10189
10190(define-public python2-greenlet
10191 (package-with-python2 python-greenlet))
10192
10193(define-public python-objgraph
10194 (package
10195 (name "python-objgraph")
eebc03bb 10196 (version "3.4.1")
44d10b1f
RW
10197 (source
10198 (origin
10199 (method url-fetch)
10200 (uri (pypi-uri "objgraph" version))
10201 (sha256
10202 (base32
eebc03bb 10203 "19qmqsh984zq1rzzjy4vqnmviaqnymcyl8h7z99pnicbgwnm2adz"))))
44d10b1f
RW
10204 (build-system python-build-system)
10205 (propagated-inputs
10206 `(("python-graphviz" ,python-graphviz)))
10207 (native-inputs
10208 `(("python-mock" ,python-mock)
10209 ("graphviz" ,graphviz)))
10210 (home-page "https://mg.pov.lt/objgraph/")
10211 (synopsis "Draw Python object reference graphs with graphviz")
10212 (description
10213 "This package provides tools to draw Python object reference graphs with
10214graphviz.")
10215 (license license:expat)))
10216
ffe58d1d
MB
10217(define-public python2-objgraph
10218 (package-with-python2 python-objgraph))
10219
44d10b1f
RW
10220(define-public python-gevent
10221 (package
10222 (name "python-gevent")
10223 (version "1.3.7")
10224 (source (origin
10225 (method url-fetch)
10226 (uri (pypi-uri "gevent" version))
10227 (sha256
10228 (base32
10229 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
10230 (modules '((guix build utils)))
10231 (snippet
10232 '(begin
10233 ;; unbunding libev and c-ares
10234 (delete-file-recursively "deps")
10235 #t))))
10236 (build-system python-build-system)
10237 (arguments
10238 `(#:modules ((ice-9 ftw)
10239 (ice-9 match)
10240 (srfi srfi-26)
10241 (guix build utils)
10242 (guix build python-build-system))
10243 #:phases (modify-phases %standard-phases
44d10b1f
RW
10244 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
10245 (lambda _
10246 (substitute* "src/gevent/subprocess.py"
10247 (("/bin/sh") (which "sh")))
10248 (for-each (lambda (file)
10249 (substitute* file
10250 (("/bin/sh") (which "sh"))
10251 (("/bin/true") (which "true"))))
10252 (find-files "src/greentest" "\\.py$"))
10253 #t))
10254 (add-before 'build 'do-not-use-bundled-sources
10255 (lambda* (#:key inputs #:allow-other-keys)
10256 (setenv "CONFIG_SHELL" (which "bash"))
10257 (setenv "LIBEV_EMBED" "false")
10258 (setenv "CARES_EMBED" "false")
10259 (setenv "EMBED" "false")
10260
b5b56b7f
MB
10261 ;; Prevent building bundled libev.
10262 (substitute* "setup.py"
10263 (("run_make=_BUILDING")
10264 "run_make=False"))
10265
44d10b1f
RW
10266 (let ((greenlet (string-append
10267 (assoc-ref inputs "python-greenlet")
10268 "/include")))
10269 (match (scandir greenlet
10270 (lambda (item)
10271 (string-prefix? "python" item)))
10272 ((python)
b5b56b7f 10273 (setenv "C_INCLUDE_PATH"
44d10b1f
RW
10274 (string-append greenlet "/" python)))))
10275 #t))
10276 (add-before 'check 'skip-timer-test
10277 (lambda _
10278 ;; XXX: Skip 'TestTimerResolution', which appears to be
10279 ;; unreliable.
10280 (substitute* "src/greentest/test__core_timer.py"
10281 (("not greentest.RUNNING_ON_CI") "False"))
10282 #t))
10283 (replace 'check
10284 (lambda _
10285 ;; Make sure the build directory is on PYTHONPATH.
10286 (setenv "PYTHONPATH"
10287 (string-append
10288 (getenv "PYTHONPATH") ":"
10289 (getcwd) "/build/"
10290 (car (scandir "build" (cut string-prefix? "lib." <>)))))
10291 (with-directory-excursion "src/greentest"
10292 ;; XXX: Many tests require network access. Instead we only
10293 ;; run known-good tests. Unfortunately we cannot use
10294 ;; recursion here since this directory also contains
10295 ;; Python-version-specific subfolders.
10296 (apply invoke "python" "testrunner.py" "--config"
10297 "known_failures.py"
10298 (scandir "." (cut regexp-exec
10299 (make-regexp "test_+(subprocess|core)")
10300 <>)))))))))
10301 (propagated-inputs
10302 `(("python-greenlet" ,python-greenlet)
10303 ("python-objgraph" ,python-objgraph)))
10304 (native-inputs
b5b56b7f 10305 `(("python-six" ,python-six)))
44d10b1f
RW
10306 (inputs
10307 `(("c-ares" ,c-ares)
10308 ("libev" ,libev)))
10309 (home-page "http://www.gevent.org/")
10310 (synopsis "Coroutine-based network library")
10311 (description
10312 "gevent is a coroutine-based Python networking library that uses greenlet
10313to provide a high-level synchronous API on top of the libev event loop.")
10314 (license license:expat)
10315 (properties `((python2-variant . ,(delay python2-gevent))))))
10316
10317(define-public python2-gevent
10318 (let ((base (package-with-python2
10319 (strip-python2-variant python-gevent))))
10320 (package
10321 (inherit base)
10322 (native-inputs `(,@(package-native-inputs python-gevent)
10323 ("python-mock" ,python2-mock))))))
10324
10325(define-public python-fastimport
10326 (package
10327 (name "python-fastimport")
10328 (version "0.9.6")
10329 (source
10330 (origin
10331 (method url-fetch)
10332 (uri (pypi-uri "fastimport" version))
10333 (sha256
10334 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
10335 (build-system python-build-system)
10336 (home-page "https://github.com/jelmer/python-fastimport")
10337 (synopsis "VCS fastimport parser and generator in Python")
10338 (description "This package provides a parser for and generator of the Git
10339@url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
10340format.")
10341 (license license:gpl2+)))
10342
10343(define-public python2-fastimport
10344 (package-with-python2 python-fastimport))
10345
10346(define-public python-twisted
10347 (package
10348 (name "python-twisted")
fdfad2fc 10349 (version "19.7.0")
44d10b1f
RW
10350 (source (origin
10351 (method url-fetch)
10352 (uri (pypi-uri "Twisted" version ".tar.bz2"))
10353 (sha256
10354 (base32
fdfad2fc 10355 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
44d10b1f
RW
10356 (build-system python-build-system)
10357 (arguments
0107c9b8 10358 '(#:tests? #f)) ; FIXME: some tests fail
44d10b1f
RW
10359 (propagated-inputs
10360 `(("python-zope-interface" ,python-zope-interface)
52ca1c4a 10361 ("python-pyhamcrest" ,python-pyhamcrest)
44d10b1f 10362 ("python-incremental" ,python-incremental)
e5ba2fe3 10363 ("python-hyperlink" ,python-hyperlink)
44d10b1f
RW
10364 ("python-constantly" ,python-constantly)
10365 ("python-automat" ,python-automat)))
10366 (home-page "https://twistedmatrix.com/")
10367 (synopsis "Asynchronous networking framework written in Python")
10368 (description
10369 "Twisted is an extensible framework for Python programming, with special
10370focus on event-based network programming and multiprotocol integration.")
10371 (license license:expat)))
10372
10373(define-public python2-twisted
10374 (package-with-python2 python-twisted))
10375
10376(define-public python-pika
10377 (package
10378 (name "python-pika")
10379 (version "0.12.0")
10380 (source
10381 (origin
10382 (method url-fetch)
10383 (uri (pypi-uri "pika" version))
10384 (sha256
10385 (base32
10386 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
10387 (build-system python-build-system)
10388 (native-inputs
10389 `(("python-pyev" ,python-pyev)
10390 ("python-tornado" ,python-tornado)
10391 ("python-twisted" ,python-twisted)))
10392 (home-page "https://pika.readthedocs.org")
10393 (synopsis "Pure Python AMQP Client Library")
10394 (description
10395 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
10396Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
10397network support library.")
10398 (license license:bsd-3)))
10399
10400(define-public python2-pika
10401 (package-with-python2 python-pika))
10402
10403(define-public python-ply
10404 (package
10405 (name "python-ply")
10406 (version "3.10")
10407 (source
10408 (origin
10409 (method url-fetch)
10410 (uri (pypi-uri "ply" version))
10411 (sha256
10412 (base32
10413 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
10414 (build-system python-build-system)
10415 (home-page "http://www.dabeaz.com/ply/")
10416 (synopsis "Python Lex & Yacc")
10417 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
10418It uses LR parsing and does extensive error checking.")
10419 (license license:bsd-3)))
10420
10421(define-public python2-ply
10422 (package-with-python2 python-ply))
10423
10424(define-public python-tabulate
10425 (package
10426 (name "python-tabulate")
10427 (version "0.7.7")
10428 (source (origin
10429 (method url-fetch)
10430 (uri (pypi-uri "tabulate" version))
10431 (sha256
10432 (base32
10433 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
10434 (build-system python-build-system)
10435 (arguments
10436 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
10437 ;; and the latest release is not tagged in the upstream repository.
10438 '(#:tests? #f))
10439 (home-page "https://bitbucket.org/astanin/python-tabulate")
10440 (synopsis "Pretty-print tabular data")
10441 (description
10442 "Tabulate is a library and command-line utility to pretty-print tabular
10443data in Python.")
10444 (license license:expat)))
10445
10446(define-public python2-tabulate
10447 (package-with-python2 python-tabulate))
10448
10449(define-public python-kazoo
10450 (package
10451 (name "python-kazoo")
10452 (version "2.4.0")
10453 (source
10454 (origin
10455 (method url-fetch)
10456 (uri (pypi-uri "kazoo" version))
10457 (sha256
10458 (base32
10459 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
10460 (build-system python-build-system)
10461 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
10462 (propagated-inputs
10463 `(("python-six" ,python-six)))
10464 (home-page "https://kazoo.readthedocs.org")
10465 (synopsis "High-level Zookeeper client library")
10466 (description
10467 "Kazoo is a Python client library for the Apache Zookeeper distributed
10468application service. It is designed to be easy to use and to avoid common
10469programming errors.")
10470 (license license:asl2.0)))
10471
10472(define-public python2-kazoo
10473 (package-with-python2 python-kazoo))
10474
10475(define-public python-pykafka
10476 (package
10477 (name "python-pykafka")
10478 (version "2.4.0")
10479 (source (origin
10480 (method url-fetch)
0ca1d040 10481 (uri (pypi-uri "pykafka" version))
44d10b1f
RW
10482 (sha256
10483 (base32
10484 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10485 (build-system python-build-system)
10486 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
10487 (propagated-inputs
10488 `(("python-gevent" ,python-gevent)
10489 ("python-kazoo" ,python-kazoo)
10490 ("python-tabulate" ,python-tabulate)))
10491 (inputs
10492 `(("librdkafka" ,librdkafka)))
10493 (home-page "https://pykafka.readthedocs.io/")
10494 (synopsis "Apache Kafka client for Python")
10495 (description
10496 "PyKafka is a client for the Apache Kafka distributed messaging system.
10497It includes Python implementations of Kafka producers and consumers, which
10498are optionally backed by a C extension built on librdkafka.")
10499 (license license:asl2.0)))
10500
10501(define-public python2-pykafka
10502 (package-with-python2 python-pykafka))
10503
10504(define-public python-wcwidth
28ac442b
MB
10505 (package
10506 (name "python-wcwidth")
574a71a7 10507 (version "0.1.8")
28ac442b
MB
10508 (source (origin
10509 (method url-fetch)
10510 (uri (pypi-uri "wcwidth" version))
10511 (sha256
10512 (base32
574a71a7 10513 "1a1pzds3xzfylm5mnc5f6c1p8kiig0daqjc9gygd9rc3cj53x2zj"))))
28ac442b
MB
10514 (build-system python-build-system)
10515 (home-page "https://github.com/jquast/wcwidth")
10516 (synopsis "Measure number of terminal column cells of wide-character codes")
10517 (description "Wcwidth measures the number of terminal column cells of
44d10b1f
RW
10518wide-character codes. It is useful for those implementing a terminal emulator,
10519or programs that carefully produce output to be interpreted by one. It is a
10520Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10521specified in POSIX.1-2001 and POSIX.1-2008.")
28ac442b 10522 (license license:expat)))
44d10b1f
RW
10523
10524(define-public python2-wcwidth
10525 (package-with-python2 python-wcwidth))
10526
10527(define-public python2-jsonrpclib
10528 (package
10529 (name "python2-jsonrpclib")
10530 (version "0.1.7")
10531 (source (origin
10532 (method url-fetch)
6571bba0 10533 (uri (pypi-uri "jsonrpclib" version))
44d10b1f
RW
10534 (sha256
10535 (base32
10536 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10537 (build-system python-build-system)
10538 (arguments
10539 `(#:tests? #f
10540 #:python ,python-2))
10541 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10542 (synopsis "Implementation of JSON-RPC specification for Python")
10543 (description
10544 "This library is an implementation of the JSON-RPC specification.
10545It supports both the original 1.0 specification, as well as the
10546new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10547etc.")
10548 (license license:asl2.0)))
10549
10550(define-public python-chai
10551 (package
10552 (name "python-chai")
10553 (version "1.1.2")
10554 (source (origin
10555 (method url-fetch)
10556 (uri (pypi-uri "chai" version))
10557 (sha256
10558 (base32
10559 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
10560 (build-system python-build-system)
10561 (home-page "https://github.com/agoragames/chai")
10562 (synopsis "Mocking framework for Python")
10563 (description
10564 "Chai provides an api for mocking, stubbing and spying your python
10565objects, patterned after the Mocha library for Ruby.")
10566 (license license:bsd-3)))
10567
10568(define-public python2-chai
10569 (package-with-python2 python-chai))
10570
10571(define-public python-inflection
10572 (package
10573 (name "python-inflection")
10574 (version "0.3.1")
10575 (source
10576 (origin (method url-fetch)
10577 (uri (pypi-uri "inflection" version))
10578 (sha256
10579 (base32
10580 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10581 (build-system python-build-system)
10582 (native-inputs
10583 `(("python-pytest" ,python-pytest)))
10584 (home-page "https://github.com/jpvanhal/inflection")
10585 (synopsis "Python string transformation library")
10586 (description
10587 "Inflection is a string transformation library. It singularizes
10588and pluralizes English words, and transforms strings from CamelCase to
10589underscored string.")
10590 (license license:expat)))
10591
10592(define-public python2-inflection
10593 (package-with-python2 python-inflection))
10594
10595(define-public python-pylev
10596 (package
10597 (name "python-pylev")
10598 (version "1.3.0")
10599 (source (origin
10600 (method url-fetch)
10601 (uri (pypi-uri "pylev" version))
10602 (sha256
10603 (base32
10604 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10605 (build-system python-build-system)
10606 (home-page "https://github.com/toastdriven/pylev")
10607 (synopsis "Levenshtein distance implementation in Python")
10608 (description "Pure Python Levenshtein implementation, based off the
10609Wikipedia code samples at
10610@url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
10611 (license license:bsd-3)))
10612
10613(define-public python2-pylev
10614 (package-with-python2 python-pylev))
10615
10616(define-public python-cleo
10617 (package
10618 (name "python-cleo")
0c101a04 10619 (version "0.7.6")
44d10b1f
RW
10620 (source (origin
10621 (method url-fetch)
10622 (uri (pypi-uri "cleo" version))
10623 (sha256
10624 (base32
0c101a04 10625 "02dlc0rn43zgvw0s5v4j80bca9n1jfpwy3r78gn9qjgk0qj39kwr"))))
44d10b1f
RW
10626 (build-system python-build-system)
10627 (native-inputs
af2d3713 10628 `( ;; For testing
44d10b1f
RW
10629 ("python-mock" ,python-mock)
10630 ("python-pytest-mock" ,python-pytest-mock)
10631 ("python-pytest" ,python-pytest)))
10632 (propagated-inputs
10633 `(("python-backpack" ,python-backpack)
0c101a04 10634 ("python-clikit" ,python-clikit)
44d10b1f
RW
10635 ("python-pastel" ,python-pastel)
10636 ("python-pylev" ,python-pylev)))
10637 (home-page "https://github.com/sdispater/cleo")
10638 (synopsis "Command-line arguments library for Python")
10639 (description
10640 "Cleo allows you to create command-line commands with signature in
10641docstring and colored output.")
10642 (license license:expat)))
10643
10644(define-public python2-cleo
10645 (package-with-python2 python-cleo))
10646
2be85c45
TLC
10647(define-public python-tomlkit
10648 (package
10649 (name "python-tomlkit")
20c9914e 10650 (version "0.5.8")
2be85c45
TLC
10651 (source
10652 (origin
10653 (method url-fetch)
10654 (uri (pypi-uri "tomlkit" version))
10655 (sha256
10656 (base32
20c9914e 10657 "0sf2a4q61kf344hjbw8kb6za1hlccl89j9lzqw0l2zpddp0hrh9j"))))
2be85c45
TLC
10658 (build-system python-build-system)
10659 (native-inputs
10660 `(("python-pytest" ,python-pytest)))
10661 (home-page
10662 "https://github.com/sdispater/tomlkit")
10663 (synopsis "Style preserving TOML library")
10664 (description
10665 "TOML Kit is a 0.5.0-compliant TOML library. It includes a parser that
10666preserves all comments, indentations, whitespace and internal element ordering,
10667and makes them accessible and editable via an intuitive API. It can also
10668create new TOML documents from scratch using the provided helpers. Part of the
10669implementation as been adapted, improved and fixed from Molten.")
10670 (license license:expat)))
10671
0bb32201
TLC
10672(define-public python-shellingham
10673 (package
10674 (name "python-shellingham")
10675 (version "1.3.1")
10676 (source
10677 (origin
10678 (method url-fetch)
10679 (uri (pypi-uri "shellingham" version))
10680 (sha256
10681 (base32
10682 "1q7kws7w4x2hji3g7y0ni9ddk4sd676ylrb3db54gbpys6xj6nwq"))))
10683 (build-system python-build-system)
10684 (home-page
10685 "https://github.com/sarugaku/shellingham")
10686 (synopsis "Tool to detect surrounding shell")
10687 (description
10688 "Shellingham detects what shell the current Python executable is
10689running in.")
10690 (license license:isc)))
10691
aee92957
TLC
10692(define-public python-memcached
10693 (package
10694 (name "python-memcached")
10695 (version "1.59")
10696 (source
10697 (origin
10698 (method url-fetch)
10699 (uri (pypi-uri "python-memcached" version))
10700 (sha256
10701 (base32
10702 "0kvyapavbirk2x3n1jx4yb9nyigrj1s3x15nm3qhpvhkpqvqdqm2"))))
10703 (build-system python-build-system)
10704 (propagated-inputs `(("python-six" ,python-six)))
10705 (home-page
10706 "https://github.com/linsomniac/python-memcached")
10707 (synopsis "Pure python memcached client")
10708 (description
10709 "This software is a pure Python interface to the memcached memory cache
10710daemon. It is the client side software which allows storing values in one or
10711more, possibly remote, memcached servers.")
10712 (license license:psfl)))
10713
b2ac2508
TLC
10714(define-public python-clikit
10715 (package
10716 (name "python-clikit")
4573b94d 10717 (version "0.4.1")
b2ac2508
TLC
10718 (source
10719 (origin
10720 (method url-fetch)
10721 (uri (pypi-uri "clikit" version))
10722 (sha256
10723 (base32
4573b94d 10724 "10gab65pq0jdf589n33sj2513pxal2lisl4xwf1ijysdjxmpdr4a"))))
b2ac2508
TLC
10725 (build-system python-build-system)
10726 (propagated-inputs
10727 `(("python-pastel" ,python-pastel)
10728 ("python-pylev" ,python-pylev)))
10729 (home-page "https://github.com/sdispater/clikit")
10730 (synopsis "Group of utilities to build command line interfaces")
10731 (description
10732 "CliKit is a group of utilities to build testable command line
10733interfaces.")
10734 (license license:expat)))
10735
c6f008d6
TLC
10736(define-public python-msgpack-python
10737 (package
10738 (name "python-msgpack-python")
10739 (version "0.5.6")
10740 (source
10741 (origin
10742 (method url-fetch)
10743 (uri (pypi-uri "msgpack-python" version))
10744 (sha256
10745 (base32
10746 "16wh8qgybmfh4pjp8vfv78mdlkxfmcasg78lzlnm6nslsfkci31p"))))
10747 (build-system python-build-system)
10748 (home-page "http://msgpack.org/")
10749 (synopsis "Package to deserialize messages in MessagePack binary format")
10750 (description
10751 "MessagePack is an efficient binary serialization format. It lets you
10752exchange data among multiple languages like JSON. But it's faster and
10753smaller. Small integers are encoded into a single byte, and typical short
10754strings require only one extra byte in addition to the strings themselves.")
10755 (license license:asl2.0)))
10756
badc1c63
TLC
10757(define-public python-cachy
10758 (package
10759 (name "python-cachy")
10760 (version "0.2.0")
10761 (source
10762 (origin
10763 (method url-fetch)
10764 (uri (pypi-uri "cachy" version))
10765 (sha256
10766 (base32
10767 "0v6mjyhgx6j7ya20bk69cr3gdzdkdf6psay0h090rscclgji65dp"))))
10768 (build-system python-build-system)
10769 (native-inputs
10770 `(("python-fakeredis" ,python-fakeredis)
10771 ("python-flexmock" ,python-flexmock)
10772 ("python-pytest" ,python-pytest)))
10773 (propagated-inputs
10774 `(("python-memcached" ,python-memcached)
10775 ("python-msgpack-python" ,python-msgpack-python)
10776 ("python-redis" ,python-redis)))
10777 (home-page "https://github.com/sdispater/cachy")
10778 (synopsis "Simple yet effective caching library")
10779 (description
10780 "Cachy provides a simple yet effective caching library. A simple but
10781powerful API: thread-safety; decorator syntax; support for memcached, redis,
10782database, file, dict stores. Cachy supports python versions 2.7+ and 3.2+.")
10783 (license license:expat)))
10784
617bb67b
TLC
10785(define-public poetry
10786 (package
10787 (name "poetry")
10788 (version "0.12.17")
10789 ;; Poetry can only be built from source with poetry.
10790 (source
10791 (origin
10792 (method url-fetch)
10793 (uri (pypi-uri "poetry" version))
10794 (sha256
10795 (base32
10796 "0gxwcd65qjmzqzppf53x51sic1rbcd9py6cdzx3aprppipimslvf"))))
10797 (build-system python-build-system)
10798 (arguments
10799 `(#:tests? #f ;; Pypi does not have tests.
10800 #:phases
10801 (modify-phases %standard-phases
10802 (replace 'build
10803 (lambda _
10804 ;; Bug in poetry https://github.com/sdispater/poetry/issues/866.
10805 (invoke "sed" "-i" "-e" "s/from distutils.core/from setuptools/"
10806 "setup.py")
10807 #t)))))
10808 (propagated-inputs
10809 `(("python-cachecontrol" ,python-cachecontrol)
10810 ("python-cachy" ,python-cachy)
10811 ("python-cleo" ,python-cleo)
10812 ("python-glob2" ,python-glob2)
10813 ("python-html5lib" ,python-html5lib)
10814 ("python-jsonschema" ,python-jsonschema)
10815 ("python-msgpack" ,python-msgpack)
617bb67b
TLC
10816 ("python-pkginfo" ,python-pkginfo)
10817 ("python-pyparsing" ,python-pyparsing)
10818 ("python-pyrsistent" ,python-pyrsistent)
10819 ("python-requests" ,python-requests)
10820 ("python-requests-toolbelt" ,python-requests-toolbelt)
10821 ("python-shellingham" ,python-shellingham)
10822 ("python-tomlkit" ,python-tomlkit)
10823 ("python-virtualenv" ,python-virtualenv)))
10824 (home-page "https://poetry.eustace.io/")
10825 (synopsis "Python dependency management and packaging made easy")
10826 (description "Poetry is a tool for dependency management and packaging
10827in Python. It allows you to declare the libraries your project depends on and
10828it will manage (install/update) them for you.")
10829 (license license:expat)))
10830
44d10b1f
RW
10831(define-public python-lazy-object-proxy
10832 (package
10833 (name "python-lazy-object-proxy")
7454078a 10834 (version "1.4.3")
44d10b1f
RW
10835 (source (origin
10836 (method url-fetch)
10837 (uri (pypi-uri "lazy-object-proxy" version))
10838 (sha256
10839 (base32
7454078a 10840 "1w1aaay424ciz8fz3fkzxb0pxzfxn184f2whpyn4fx72bn50x47k"))))
63d4873b
MO
10841 (native-inputs
10842 `(("python-setuptools-scm" ,python-setuptools-scm-3.3)))
44d10b1f
RW
10843 (build-system python-build-system)
10844 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10845 (synopsis "Lazy object proxy for python")
10846 (description
10847 "Lazy object proxy is an object that wraps a callable but defers the call
10848until the object is actually required, and caches the result of said call.")
10849 (license license:bsd-2)))
10850
10851(define-public python2-lazy-object-proxy
10852 (package-with-python2 python-lazy-object-proxy))
10853
10854(define-public python-dnspython
10855 (package
10856 (name "python-dnspython")
10857 (version "1.15.0")
10858 (source (origin
10859 (method url-fetch)
10860 (uri (string-append "http://www.dnspython.org/kits/"
10861 version "/dnspython-" version ".tar.gz"))
10862 (sha256
10863 (base32
10864 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
10865 (build-system python-build-system)
10866 (arguments '(#:tests? #f)) ; XXX: requires internet access
10867 (home-page "http://www.dnspython.org")
10868 (synopsis "DNS toolkit for Python")
10869 (description
10870 "dnspython is a DNS toolkit for Python. It supports almost all record
10871types. It can be used for queries, zone transfers, and dynamic updates.
10872It supports TSIG authenticated messages and EDNS0.")
10873 (license license:expat)))
10874
10875(define-public python2-dnspython
10876 (package-with-python2 python-dnspython))
10877
10878(define-public python-email-validator
10879 (package
10880 (name "python-email-validator")
10881 (version "1.0.2")
10882 (source
10883 (origin (method url-fetch)
10884 (uri (pypi-uri "email_validator" version))
10885 (sha256
10886 (base32
10887 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
10888 (build-system python-build-system)
10889 (arguments
10890 '(#:phases
10891 (modify-phases %standard-phases
10892 (add-before 'build 'use-dnspython
10893 (lambda _
10894 (substitute* "setup.py"
10895 (("dnspython3") "dnspython"))
10896 #t)))))
10897 (propagated-inputs
10898 `(("python-dnspython" ,python-dnspython)
10899 ("python-idna" ,python-idna)))
10900 (home-page "https://github.com/JoshData/python-email-validator")
10901 (synopsis "Email address validation library for Python")
10902 (description
10903 "This library validates email address syntax and deliverability.")
10904 (license license:cc0)))
10905
10906(define-public python2-email-validator
10907 (package-with-python2 python-email-validator))
10908
10909(define-public python-ukpostcodeparser
10910 (package
10911 (name "python-ukpostcodeparser")
10912 (version "1.0.3")
10913 (source (origin
10914 (method url-fetch)
10915 (uri (pypi-uri "UkPostcodeParser" version))
10916 (sha256
10917 (base32
10918 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10919 (build-system python-build-system)
10920 (home-page "https://github.com/hamstah/ukpostcodeparser")
10921 (synopsis "UK Postcode parser for Python")
10922 (description
10923 "This library provides the @code{parse_uk_postcode} function for
10924parsing UK postcodes.")
10925 (license license:expat)))
10926
10927(define-public python2-ukpostcodeparser
10928 (package-with-python2 python-ukpostcodeparser))
10929
10930(define-public python-faker
10931 (package
10932 (name "python-faker")
10933 (version "0.7.9")
10934 (source (origin
10935 (method url-fetch)
10936 (uri (pypi-uri "Faker" version))
10937 (sha256
10938 (base32
10939 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
10940 (patches
10941 (search-patches "python-faker-fix-build-32bit.patch"))
10942 (modules '((guix build utils)))
10943 (snippet
10944 '(begin
10945 (for-each delete-file (find-files "." "\\.pyc$"))
10946 #t))))
10947 (build-system python-build-system)
10948 (arguments
10949 '(#:phases
10950 (modify-phases %standard-phases
10951 (replace 'check
49ff8827 10952 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
44d10b1f
RW
10953 (native-inputs
10954 `(;; For testing
10955 ("python-email-validator" ,python-email-validator)
10956 ("python-mock" ,python-mock)
10957 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
10958 (propagated-inputs
10959 `(("python-dateutil" ,python-dateutil)
10960 ("python-six" ,python-six)))
10961 (home-page "https://github.com/joke2k/faker")
10962 (synopsis "Python package that generates fake data")
10963 (description
10964 "Faker is a Python package that generates fake data such as names,
10965addresses, and phone numbers.")
10966 (license license:expat)
10967 (properties `((python2-variant . ,(delay python2-faker))))))
10968
10969(define-public python2-faker
10970 (let ((base (package-with-python2 (strip-python2-variant
10971 python-faker))))
10972 (package
10973 (inherit base)
10974 (propagated-inputs
10975 `(("python2-ipaddress" ,python2-ipaddress)
10976 ,@(package-propagated-inputs base))))))
10977
10978(define-public python-pyaml
10979 (package
10980 (name "python-pyaml")
10981 (version "18.11.0")
10982 (source (origin
10983 (method url-fetch)
10984 (uri (pypi-uri "pyaml" version))
10985 (sha256
10986 (base32
10987 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
10988 (build-system python-build-system)
10989 (native-inputs
10990 `(("python-unidecode" ,python-unidecode)))
10991 (propagated-inputs
10992 `(("python-pyyaml" ,python-pyyaml)))
10993 (home-page "https://github.com/mk-fg/pretty-yaml")
10994 (synopsis "YAML pretty-print library for Python")
10995 (description
10996 "pyaml is a PyYAML based python module to produce pretty and readable
10997YAML-serialized data.")
492e3a7a 10998 (license license:wtfpl2)))
44d10b1f
RW
10999
11000(define-public python2-pyaml
11001 (package-with-python2 python-pyaml))
11002
11003(define-public python-backpack
11004 (package
11005 (name "python-backpack")
11006 (version "0.1")
11007 (source
11008 (origin
11009 (method url-fetch)
11010 (uri (pypi-uri "backpack" version))
11011 (sha256
11012 (base32
11013 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
11014 (build-system python-build-system)
11015 (native-inputs
11016 `(("python-pytest" ,python-pytest)
11017 ("python-nose" ,python-nose)))
11018 (propagated-inputs
11019 `(("python-simplejson" ,python-simplejson)))
11020 (home-page "https://github.com/sdispater/backpack")
11021 (synopsis "Utilities for working with Python collections")
11022 (description "Backpack provides some useful utilities for working with
11023collections of data.")
11024 (license license:expat)))
11025
11026(define-public python2-backpack
11027 (package-with-python2 python-backpack))
11028
11029(define-public python-prompt-toolkit
11030 (package
11031 (name "python-prompt-toolkit")
11032 (version "2.0.7")
11033 (source
11034 (origin
11035 (method url-fetch)
11036 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
11037 (sha256
11038 (base32
11039 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
11040 (build-system python-build-system)
11041 (arguments
11042 `(#:phases
11043 (modify-phases %standard-phases
11044 (delete 'check)
11045 (add-after 'install 'post-install-check
11046 (lambda* (#:key inputs outputs #:allow-other-keys)
11047 ;; HOME is needed for the test
11048 ;; "test_pathcompleter_can_expanduser".
11049 (setenv "HOME" "/tmp")
11050 (add-installed-pythonpath inputs outputs)
11051 (invoke "py.test"))))))
11052 (propagated-inputs
11053 `(("python-wcwidth" ,python-wcwidth)
11054 ("python-six" ,python-six)
11055 ("python-pygments" ,python-pygments)))
11056 (native-inputs
11057 `(("python-pytest" ,python-pytest)))
11058 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
11059 (synopsis "Library for building command line interfaces in Python")
11060 (description
11061 "Prompt-Toolkit is a library for building interactive command line
11062interfaces in Python. It's like GNU Readline but it also features syntax
11063highlighting while typing, out-of-the-box multi-line input editing, advanced
11064code completion, incremental search, support for Chinese double-width
11065characters, mouse support, and auto suggestions.")
11066 (license license:bsd-3)))
11067
11068(define-public python2-prompt-toolkit
11069 (package-with-python2 python-prompt-toolkit))
11070
11071(define-public python-prompt-toolkit-1
11072 (package (inherit python-prompt-toolkit)
11073 (version "1.0.15")
11074 (source
11075 (origin
11076 (method url-fetch)
11077 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
11078 (sha256
11079 (base32
11080 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
11081
11082(define-public python2-prompt-toolkit-1
11083 (package-with-python2 python-prompt-toolkit-1))
11084
11085(define-public python-jedi
11086 (package
11087 (name "python-jedi")
296e1aea 11088 (version "0.15.1")
44d10b1f
RW
11089 (source
11090 (origin
11091 (method url-fetch)
11092 (uri (pypi-uri "jedi" version))
11093 (sha256
11094 (base32
296e1aea 11095 "0bp4pxhsynaarbvzblsn5x32lzp29svy3sxfy8i6m5iwz9s9r1ds"))))
44d10b1f
RW
11096 (build-system python-build-system)
11097 (arguments
296e1aea 11098 `(#:phases
44d10b1f 11099 (modify-phases %standard-phases
296e1aea
MC
11100 (add-after 'unpack 'disable-file-completion-test
11101 ;; A single parameterized test currently fail (see:
11102 ;; https://github.com/davidhalter/jedi/issues/1395). Remove it.
11103 (lambda _
11104 (substitute* "test/test_api/test_completion.py"
11105 ((".*'example.py', 'rb\"' \\+ join\\('\\.\\.'.*") ""))
11106 #t))
44d10b1f 11107 (replace 'check
296e1aea
MC
11108 (lambda _
11109 (setenv "HOME" "/tmp")
11110 (invoke "python" "-m" "pytest"))))))
44d10b1f
RW
11111 (native-inputs
11112 `(("python-pytest" ,python-pytest)
11113 ("python-docopt" ,python-docopt)))
11114 (propagated-inputs
11115 `(("python-parso" ,python-parso)))
11116 (home-page "https://github.com/davidhalter/jedi")
11117 (synopsis "Autocompletion and static analysis library for Python")
11118 (description
11119 "Jedi is a static analysis tool for Python that can be used in Integrated
11120Development Environments (@dfn{IDE}s) and text editors. It understands Python
11121on a deeper level than many other static analysis frameworks for Python.
11122
11123Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
11124well.")
11125 (license license:expat)))
11126
11127(define-public python2-jedi
296e1aea 11128 (package-with-python2 python-jedi))
44d10b1f
RW
11129
11130(define-public ptpython
11131 (package
11132 (name "ptpython")
11133 (version "0.34")
11134 (source (origin
11135 (method url-fetch)
11136 (uri (pypi-uri "ptpython" version))
11137 (sha256
11138 (base32
11139 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
11140 (build-system python-build-system)
11141 (arguments
11142 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
11143 (propagated-inputs
11144 `(("python-docopt" ,python-docopt)
11145 ("python-jedi" ,python-jedi)
11146 ("python-prompt-toolkit" ,python-prompt-toolkit)
11147 ("python-pygments" ,python-pygments)))
11148 (home-page "https://github.com/jonathanslenders/ptpython")
11149 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
11150 (description
11151 "ptpython is a Python read-eval-print loop with IDE-like features.
11152It supports syntax highlighting, multiline editing, autocompletion, mouse,
11153color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
11154etc.")
11155 (license license:bsd-3)
11156 (properties `((python2-variant . ,(delay ptpython-2))))))
11157
11158(define-public ptpython-2
11159 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
11160 (package
11161 (inherit base)
11162 (name "ptpython2"))))
11163
11164(define-public python-stem
11165 (package
11166 (name "python-stem")
e746d1c3 11167 (version "1.7.1")
44d10b1f
RW
11168 (source
11169 (origin
11170 (method url-fetch)
11171 (uri (pypi-uri "stem" version))
11172 (sha256
11173 (base32
e746d1c3 11174 "18lc95pmc7i089nlsb06dsxyjl5wbhxfqgdxbjcia35ndh8z7sn9"))))
44d10b1f
RW
11175 (build-system python-build-system)
11176 (arguments
11177 `(#:phases
11178 (modify-phases %standard-phases
11179 (replace 'check
11180 (lambda _
11181 (invoke "./run_tests.py" "--unit")
11182 #t)))))
11183 (native-inputs
11184 `(("python-mock" ,python-mock)
11185 ("python-pycodestyle" ,python-pycodestyle)
11186 ("python-pyflakes" ,python-pyflakes)))
11187 (home-page "https://stem.torproject.org/")
11188 (synopsis
11189 "Python controller library that allows applications to interact with Tor")
11190 (description
11191 "Stem is a Python controller library for Tor. With it you can use Tor's
11192control protocol to script against the Tor process and read descriptor data
11193relays publish about themselves.")
11194 (license license:lgpl3)))
11195
11196(define-public python2-stem
11197 (package-with-python2 python-stem))
11198
11199(define-public python-pyserial
11200 (package
11201 (name "python-pyserial")
00d81f98 11202 (version "3.4")
44d10b1f
RW
11203 (source
11204 (origin
11205 (method url-fetch)
11206 (uri (pypi-uri "pyserial" version))
11207 (sha256
11208 (base32
00d81f98 11209 "09y68bczw324a4jb9a1cfwrbjhq179vnfkkkrybbksp0vqgl0bbf"))))
44d10b1f
RW
11210 (build-system python-build-system)
11211 (arguments
11212 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
11213 ;; #:phases
11214 ;; (modify-phases %standard-phases
11215 ;; (replace 'check
11216 ;; (lambda _
11217 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
11218 (home-page
11219 "https://github.com/pyserial/pyserial")
11220 (synopsis "Python Serial Port Bindings")
11221 (description "@code{pyserial} provide serial port bindings for Python. It
11222supports different byte sizes, stop bits, parity and flow control with RTS/CTS
11223and/or Xon/Xoff. The port is accessed in RAW mode.")
11224 (license license:bsd-3)))
11225
11226(define-public python2-pyserial
11227 (package-with-python2 python-pyserial))
11228
11229(define-public python-kivy
11230 (package
11231 (name "python-kivy")
11232 (version "1.10.1")
11233 (source
11234 (origin
11235 (method url-fetch)
11236 (uri (pypi-uri "Kivy" version))
11237 (file-name (string-append name "-" version ".tar.gz"))
11238 (sha256
11239 (base32
11240 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
11241 (build-system python-build-system)
11242 (arguments
11243 `(#:tests? #f ; Tests require many optional packages
11244 #:phases
11245 (modify-phases %standard-phases
11246 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
11247 (lambda* (#:key inputs #:allow-other-keys)
11248 (setenv "KIVY_SDL2_PATH"
11249 (string-append (assoc-ref inputs "sdl-union")
11250 "/include/SDL2"))
11251 #t)))))
11252 (native-inputs
11253 `(("git" ,git)
11254 ("pkg-config" ,pkg-config)
11255 ("python-cython" ,python-cython)))
11256 (inputs
11257 `(("gstreamer" ,gstreamer)
11258 ("mesa" ,mesa)
11259 ("sdl-union"
11260 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
11261 (home-page "http://kivy.org")
11262 (synopsis
11263 "Multitouch application framework")
11264 (description
11265 "A software library for rapid development of
11266hardware-accelerated multitouch applications.")
11267 (license license:expat)))
11268
11269(define-public python2-kivy
11270 (package-with-python2 python-kivy))
11271
11272(define-public python-kivy-next
11273 (deprecated-package "python-kivy-next" python-kivy))
11274
11275(define-public python2-kivy-next
11276 (deprecated-package "python2-kivy-next" python2-kivy))
11277
11278(define-public python-binaryornot
11279 (package
11280 (name "python-binaryornot")
11281 (version "0.4.4")
11282 (source (origin
11283 (method url-fetch)
11284 (uri (pypi-uri "binaryornot" version))
11285 (sha256
11286 (base32
11287 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
11288 (build-system python-build-system)
86723f98
DM
11289 (arguments
11290 `(#:phases
11291 (modify-phases %standard-phases
ee623903 11292 (add-after 'unpack 'patch-tests
86723f98
DM
11293 (lambda _
11294 ;; TypeError: binary() got an unexpected keyword argument
11295 ;; 'average_size'.
11296 (substitute* "tests/test_check.py"
11297 (("average_size=512") ""))
11298 #t)))))
44d10b1f
RW
11299 (propagated-inputs
11300 `(("python-chardet" ,python-chardet)
11301 ("python-hypothesis" ,python-hypothesis)))
11302 (home-page "https://github.com/audreyr/binaryornot")
11303 (synopsis "Package to check if a file is binary or text")
11304 (description "Ultra-lightweight pure Python package to check if a file is
11305binary or text.")
11306 (license license:bsd-3)
11307 (properties `((python2-variant . ,(delay python2-binaryornot))))))
11308
11309(define-public python2-binaryornot
11310 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
11311 (package (inherit base)
11312 (propagated-inputs
11313 `(("python2-enum34" ,python2-enum34)
11314 ,@(package-propagated-inputs base))))))
11315
f315673d 11316(define-public python-binwalk
9b9ab657
JK
11317 (package
11318 (name "python-binwalk")
11319 (version "2.2.0")
11320 (source
11321 (origin
11322 (method git-fetch)
11323 (uri (git-reference
11324 (url "https://github.com/ReFirmLabs/binwalk")
11325 (commit (string-append "v" version))))
11326 (file-name (git-file-name name version))
11327 (sha256
11328 (base32
11329 "1bxgj569fzwv6jhcbl864nmlsi9x1k1r20aywjxc8b9b1zgqrlvc"))))
11330 (build-system python-build-system)
11331 (arguments
11332 `(#:phases
11333 (modify-phases %standard-phases
11334 (add-before 'check 'set-pythonpath
11335 (lambda _
11336 (setenv "PYTHONPATH"
11337 (string-append
11338 (getcwd) "/src/"
11339 ":" (getenv "PYTHONPATH")))
11340 (setenv "HOME" "")
11341 #t)))))
11342 (native-inputs
11343 `(("python-coverage" ,python-coverage)
11344 ("python-nose" ,python-nose)))
11345 (home-page "https://github.com/ReFirmLabs/binwalk")
11346 (synopsis "Firmware analysis tool")
11347 (description "Binwalk is a tool for analyzing, reverse engineering, and
11348extracting firmware images")
11349 (license license:expat)))
f315673d 11350
44d10b1f
RW
11351(define-public python-nltk
11352 (package
11353 (name "python-nltk")
11354 (version "3.2.1")
11355 (source (origin
11356 (method url-fetch)
11357 (uri (pypi-uri "nltk" version))
11358 (sha256
11359 (base32
11360 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
11361 (build-system python-build-system)
11362 (arguments
11363 '(;; The tests require some extra resources to be downloaded.
11364 ;; TODO Try packaging these resources.
11365 #:tests? #f))
11366 (home-page "http://nltk.org/")
11367 (synopsis "Natural Language Toolkit")
11368 (description "It provides interfaces to over 50 corpora and lexical
11369resources such as WordNet, along with a suite of text processing libraries
11370for classification, tokenization, stemming, tagging, parsing, and semantic
11371reasoning, wrappers for natural language processing libraries.")
11372 (license license:asl2.0)))
11373
11374(define-public python2-nltk
11375 (package-with-python2 python-nltk))
11376
11377(define-public python-pymongo
11378 (package
11379 (name "python-pymongo")
11380 (version "3.7.2")
11381 (source (origin
11382 (method url-fetch)
11383 (uri (pypi-uri "pymongo" version))
11384 (sha256
11385 (base32
11386 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
11387 (build-system python-build-system)
11388 (propagated-inputs
11389 `(("python-certifi" ,python-certifi)))
11390 (home-page "https://github.com/mongodb/mongo-python-driver")
11391 (synopsis "Python driver for MongoDB")
11392 (description "Python driver for MongoDB.")
11393 (license license:asl2.0)))
11394
11395(define-public python2-pymongo
11396 (package-with-python2 python-pymongo))
11397
44d10b1f
RW
11398(define-public python-consul
11399 (package
11400 (name "python-consul")
11401 (version "0.6.1")
11402 (source
11403 (origin
11404 (method url-fetch)
11405 (uri (pypi-uri "python-consul" version))
11406 (sha256
11407 (base32
11408 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
11409 (build-system python-build-system)
11410 (arguments
11411 '(#:tests? #f)) ; The tests are not distributed
11412 (propagated-inputs
11413 `(("python-requests" ,python-requests)
11414 ("python-six" ,python-six)))
11415 (home-page "https://github.com/cablehead/python-consul")
11416 (synopsis "Python client for Consul")
11417 (description
11418 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
11419discovery, monitoring and configuration.")
11420 (license license:expat)))
11421
11422(define-public python2-consul
11423 (package-with-python2 python-consul))
11424
11425(define-public python-schematics
11426 (package
11427 (name "python-schematics")
11428 (version "1.1.1")
11429 (source
1961d187
TGR
11430 (origin
11431 (method git-fetch)
11432 (uri (git-reference
11433 (url "https://github.com/schematics/schematics.git")
11434 (commit (string-append "v" version))))
11435 (file-name (git-file-name name version))
11436 (sha256
11437 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
44d10b1f
RW
11438 (build-system python-build-system)
11439 (propagated-inputs
11440 `(("python-six" ,python-six)))
11441 (arguments
1961d187
TGR
11442 ;; The tests require a bunch of not very nice packages with fixed
11443 ;; version requirements (e.g. python-coveralls).
11444 `(#:tests? #f))
44d10b1f
RW
11445 (home-page "https://github.com/schematics/schematics")
11446 (synopsis "Python Data Structures for Humans")
11447 (description "Python Data Structures for Humans.")
11448 (license license:bsd-3)))
11449
11450(define-public python2-schematics
11451 (package-with-python2 python-schematics))
11452
11453(define-public python-odfpy
11454 (package
11455 (name "python-odfpy")
11456 (version "1.3.3")
11457 (source (origin
11458 (method url-fetch)
11459 (uri (pypi-uri "odfpy" version))
11460 (sha256
11461 (base32
11462 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
11463 (arguments
11464 `(#:modules ((srfi srfi-1)
11465 (guix build python-build-system)
11466 (guix build utils))
11467 #:phases
11468 (modify-phases %standard-phases
11469 (replace 'check
11470 ;; The test runner invokes python2 and python3 for test*.py.
11471 ;; To avoid having both in inputs, we replicate it here.
11472 (lambda _
21ccc01d
RW
11473 (for-each (lambda (test-file) (invoke "python" test-file))
11474 (find-files "tests" "^test.*\\.py$"))
11475 #t)))))
44d10b1f
RW
11476 (build-system python-build-system)
11477 (home-page "https://github.com/eea/odfpy")
11478 (synopsis "Python API and tools to manipulate OpenDocument files")
11479 (description "Collection of libraries and utility programs written in
11480Python to manipulate OpenDocument 1.2 files.")
11481 (license
11482 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
11483 ;; number of files with other licenses.
11484 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
11485
11486(define-public python2-odfpy
11487 (package-with-python2 python-odfpy))
11488
11489(define-public python-natsort
11490 (package
11491 (name "python-natsort")
11492 (version "5.4.1")
11493 (source (origin
11494 (method url-fetch)
11495 (uri (pypi-uri "natsort" version))
11496 (sha256
11497 (base32
11498 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
11499 (build-system python-build-system)
11500 (arguments
11501 `(#:modules ((guix build utils)
11502 (guix build python-build-system)
11503 (srfi srfi-1)
11504 (srfi srfi-26)
11505 (ice-9 ftw))
11506 #:phases
11507 (modify-phases %standard-phases
11508 (add-before 'check 'set-cachedir
11509 ;; Tests require write access to $HOME by default
11510 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
11511 (replace 'check
11512 (lambda _
11513 (let ((cwd (getcwd)))
11514 (setenv "PYTHONPATH"
11515 (string-append
11516 cwd "/build/"
11517 (find (cut string-prefix? "lib" <>)
11518 (scandir (string-append cwd "/build")))
11519 ":"
11520 (getenv "PYTHONPATH")))
11521 (invoke "pytest" "-v")))))))
11522 (native-inputs
11523 `(("python-hypothesis" ,python-hypothesis)
11524 ("python-pytest-cov" ,python-pytest-cov)
11525 ("python-pytest-mock" ,python-pytest-mock)
11526 ("python-pytest" ,python-pytest)))
11527 (propagated-inputs ; TODO: Add python-fastnumbers.
11528 `(("python-pyicu" ,python-pyicu)))
11529 (home-page "https://github.com/SethMMorton/natsort")
11530 (synopsis "Natural sorting for python and shell")
11531 (description
11532 "Natsort lets you apply natural sorting on lists instead of
11533lexicographical. If you use the built-in @code{sorted} method in python
36a4366d
EF
11534on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
11535@code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
11536@code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
11537identifies numbers and sorts them separately from strings. It can also sort
11538version numbers, real numbers, mixed types and more, and comes with a shell
11539command @command{natsort} that exposes this functionality in the command line.")
44d10b1f
RW
11540 (license license:expat)
11541 (properties `((python2-variant . ,(delay python2-natsort))))))
11542
11543(define-public python2-natsort
11544 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
11545 (package (inherit base)
11546 (native-inputs
11547 `(("python2-pathlib" ,python2-pathlib)
11548 ,@(package-native-inputs base))))))
11549
11550(define-public python-glances
11551 (package
11552 (name "python-glances")
a4ac25df 11553 (version "3.1.2")
44d10b1f
RW
11554 (source
11555 (origin
11556 (method url-fetch)
11557 (uri (pypi-uri "Glances" version))
11558 (sha256
a4ac25df 11559 (base32 "15384pbvw9wj4sb8zgvd9v1812vrypbyjg0acicjf1hdb3p30fkk"))
15b4c911
TGR
11560 (modules '((guix build utils)))
11561 (snippet
11562 '(begin
11563 ;; Glances phones PyPI for weekly update checks by default.
11564 ;; Disable these. The user can re-enable them if desired.
11565 (substitute* "glances/outdated.py"
11566 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
11567 (string-append indentation
11568 "self.args.disable_check_update = True\n"
11569 line)))
11570 #t))))
44d10b1f
RW
11571 (build-system python-build-system)
11572 (propagated-inputs
9898a2d3
TGR
11573 `(("python-future" ,python-future)
11574 ("python-psutil" ,python-psutil)))
a4ac25df 11575 (home-page "https://github.com/nicolargo/glances")
bab94ffa 11576 (synopsis "Cross-platform curses-based monitoring tool")
44d10b1f
RW
11577 (description
11578 "Glances is a curses-based monitoring tool for a wide variety of platforms.
bab94ffa
TGR
11579Glances uses the PsUtil library to get information from your system. It
11580monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
44d10b1f
RW
11581 (license license:lgpl3+)))
11582
11583(define-public python2-glances
11584 (package-with-python2 python-glances))
11585
11586(define-public python-graphql-core
11587 (package
11588 (name "python-graphql-core")
11589 (version "0.5.3")
11590 (source
11591 (origin
11592 (method url-fetch)
11593 (uri (pypi-uri "graphql-core" version))
11594 (sha256
11595 (base32
11596 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
11597 (build-system python-build-system)
11598 (arguments
11599 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
11600 #:phases
11601 (modify-phases %standard-phases
11602 (add-after 'unpack 'patch-hardcoded-version
11603 (lambda _ (substitute*
11604 "setup.py"
11605 (("'gevent==1.1rc1'") "'gevent'"))
11606 #t)))))
11607 (native-inputs
11608 `(("python-gevent" ,python-gevent)
11609 ("python-mock" ,python-mock)
11610 ("python-pytest-mock" ,python-pytest-mock)))
11611 (propagated-inputs
11612 `(("python-promise" ,python-promise)
11613 ("python-six" ,python-six)))
11614 (home-page "https://github.com/graphql-python/graphql-core")
11615 (synopsis "GraphQL implementation for Python")
11616 (description
11617 "GraphQL implementation for Python. GraphQL is a data query language and
11618runtime designed and used to request and deliver data to mobile and web apps.
11619This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
11620to Python.")
11621 (license license:expat)))
11622
11623(define-public python2-graphql-core
11624 (package-with-python2 python-graphql-core))
11625
11626(define-public python-graphql-relay
11627 (package
11628 (name "python-graphql-relay")
11629 (version "0.4.5")
11630 (source
11631 (origin
11632 (method url-fetch)
11633 (uri (pypi-uri "graphql-relay" version))
11634 (sha256
11635 (base32
11636 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
11637 (build-system python-build-system)
11638 (arguments
11639 '(#:tests? #f)) ; The tests are not distributed
11640 (propagated-inputs
11641 `(("python-graphql-core" ,python-graphql-core)
11642 ("python-promise" ,python-promise)
11643 ("python-six" ,python-six)))
11644 (home-page "https://github.com/graphql-python/graphql-relay-py")
11645 (synopsis "Relay implementation for Python")
11646 (description
11647 "This is a library to allow the easy creation of Relay-compliant servers
11648using the GraphQL Python reference implementation of a GraphQL server. It
11649should be noted that the code is a exact port of the original
11650@url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11651from Facebook.")
11652 (license license:expat)))
11653
11654(define-public python2-graphql-relay
11655 (package-with-python2 python-graphql-relay))
11656
11657(define-public python-graphene
11658 (package
11659 (name "python-graphene")
11660 (version "0.10.2")
11661 (source
11662 (origin
11663 (method url-fetch)
11664 (uri (pypi-uri "graphene" version))
11665 (sha256
11666 (base32
11667 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11668 (build-system python-build-system)
11669 (propagated-inputs
11670 `(("python-graphql-core" ,python-graphql-core)
11671 ("python-graphql-relay" ,python-graphql-relay)
11672 ("python-iso8601" ,python-iso8601)
11673 ("python-promise" ,python-promise)
11674 ("python-six" ,python-six)))
11675 (arguments
11676 `(#:tests? #f)) ; no tests/ in the PyPI tarball
3dd74c8d 11677 (home-page "https://graphene-python.org/")
44d10b1f
RW
11678 (synopsis "GraphQL Framework for Python")
11679 (description
11680 "Graphene is a Python library for building GraphQL schemas/types.
11681A GraphQL schema describes your data model, and provides a GraphQL server
11682with an associated set of resolve methods that know how to fetch data.")
11683 (properties `((python2-variant . ,(delay python2-graphene))))
11684 (license license:expat)))
11685
11686(define-public python2-graphene
11687 (let ((base (package-with-python2
11688 (strip-python2-variant python-graphene))))
11689 (package (inherit base)
11690 (native-inputs
11691 `(("python2-sqlalchemy" ,python2-sqlalchemy)
11692 ,@(package-native-inputs base))))))
11693
11694(define-public python-nautilus
11695 (package
11696 (name "python-nautilus")
11697 (version "0.4.9")
11698 (source
11699 (origin
11700 (method url-fetch)
11701 (uri (pypi-uri "nautilus" version))
11702 (sha256
11703 (base32
11704 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11705 (build-system python-build-system)
11706 (arguments `(#:tests? #f)) ; fails to import test modules
11707 (propagated-inputs
11708 `(("python-bcrypt" ,python-bcrypt)
11709 ("python-click" ,python-click)
11710 ("python-consul" ,python-consul)
11711 ("python-graphene" ,python-graphene)
11712 ("python-jinja2" ,python-jinja2)
11713 ("python-peewee" ,python-peewee)
11714 ("python-pika" ,python-pika)
11715 ("python-tornado" ,python-tornado)
11716 ("python-wtforms" ,python-wtforms)))
11717 (native-inputs
11718 `(("python-nose2" ,python-nose2)))
11719 (home-page "https://github.com/AlecAivazis/nautilus")
11720 (synopsis "Library for creating microservice applications")
11721 (description
11722 "Nautilus is a framework for flux based microservices that looks to
11723provide extendible implementations of common aspects of a cloud so that you can
11724focus on building massively scalable web applications.")
11725 (license license:expat)))
11726
11727(define-public python-snowballstemmer
11728 (package
11729 (name "python-snowballstemmer")
11730 (version "1.2.1")
11731 (source (origin
11732 (method url-fetch)
11733 (uri (pypi-uri "snowballstemmer" version))
11734 (sha256
11735 (base32
11736 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
11737 (build-system python-build-system)
11738 (arguments
11739 `(;; No tests exist
11740 #:tests? #f))
11741 (home-page "https://github.com/shibukawa/snowball_py")
11742 (synopsis "Snowball stemming library collection for Python")
11743 (description "This package provides 16 word stemmer algorithms generated
11744from Snowball algorithms. It includes the 15 original ones plus the Poerter
11745English stemmer.")
11746 (license license:bsd-3)))
11747
11748(define-public python2-snowballstemmer
11749 (package-with-python2 python-snowballstemmer))
11750
44d10b1f
RW
11751(define-public python-setproctitle
11752(package
11753 (name "python-setproctitle")
11754 (version "1.1.10")
11755 (source
11756 (origin
11757 (method url-fetch)
11758 (uri (pypi-uri "setproctitle" version))
11759 (sha256
11760 (base32
11761 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11762 (build-system python-build-system)
11763 (arguments
11764 '(#:phases
11765 (modify-phases %standard-phases
11766 (add-before 'check 'patch-Makefile
11767 ;; Stricly this is only required for the python2 variant.
11768 ;; But adding a phase in an inherited package seems to be
11769 ;; cumbersum. So we patch even for python3.
11770 (lambda _
11771 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11772 (when nose
11773 (substitute* "Makefile"
11774 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11775 (string-append nose "/bin/nosetests "))))
11776 #t)))
11777 (replace 'check
11778 (lambda _
11779 (setenv "PYTHON" (or (which "python3") (which "python")))
11780 (setenv "PYCONFIG" (or (which "python3-config")
11781 (which "python-config")))
11782 (setenv "CC" "gcc")
11783 ;; No need to extend PYTHONPATH to find the built package, since
11784 ;; the Makefile will build anyway
11785 (invoke "make" "check"))))))
11786 (native-inputs
11787 `(("procps" ,procps))) ; required for tests
11788 (home-page
11789 "https://github.com/dvarrazzo/py-setproctitle")
11790 (synopsis
11791 "Setproctitle implementation for Python to customize the process title")
11792 (description "The library allows a process to change its title (as displayed
11793by system tools such as ps and top).
11794
11795Changing the title is mostly useful in multi-process systems, for
11796example when a master process is forked: changing the children's title
11797allows to identify the task each process is busy with. The technique
11798is used by PostgreSQL and the OpenSSH Server for example.")
11799 (license license:bsd-3)
11800 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11801
11802(define-public python2-setproctitle
11803 (let ((base (package-with-python2
11804 (strip-python2-variant python-setproctitle))))
11805 (package
11806 (inherit base)
11807 (native-inputs `(("python2-nose" ,python2-nose)
11808 ,@(package-native-inputs base))))))
11809
11810(define-public python-validictory
11811 (package
11812 (name "python-validictory")
11813 (version "1.0.1")
11814 (source
11815 (origin
11816 (method url-fetch)
11817 (uri (pypi-uri "validictory" version))
11818 (sha256
11819 (base32
11820 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11821 (build-system python-build-system)
11822 (arguments
11823 '(#:phases
11824 (modify-phases %standard-phases
11825 (add-after 'unpack 'bootstrap
11826 ;; Move the tests out of the package directory to avoid
11827 ;; packaging them.
11828 (lambda* _
11829 (rename-file "validictory/tests" "tests")
11830 (delete-file "tests/__init__.py")))
11831 (replace 'check
11832 (lambda _
11833 ;; Extend PYTHONPATH so the built package will be found.
11834 (setenv "PYTHONPATH"
11835 (string-append (getcwd) "/build/lib:"
11836 (getenv "PYTHONPATH")))
6568bd5d 11837 (invoke "py.test" "-vv" ))))))
44d10b1f
RW
11838 (native-inputs
11839 `(("python-pytest" ,python-pytest)))
11840 (home-page
11841 "https://github.com/jamesturk/validictory")
11842 (synopsis "General purpose Python data validator")
11843 (description "It allows validation of arbitrary Python data structures.
11844
11845The schema format is based on the JSON Schema
11846proposal (http://json-schema.org), so combined with json the library is also
11847useful as a validator for JSON data.")
11848 (license license:expat)))
11849
11850(define-public python2-validictory
11851 (package-with-python2 python-validictory))
11852
11853(define-public python-pyelftools
11854 (package
11855 (name "python-pyelftools")
11856 (version "0.25")
11857 (source
11858 (origin
11859 (method url-fetch)
11860 (uri (pypi-uri "pyelftools" version))
11861 (sha256
11862 (base32
11863 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
11864 (build-system python-build-system)
11865 (arguments
11866 `(#:phases
11867 (modify-phases %standard-phases
11868 (add-before 'check 'set-pythonpath
11869 (lambda _
11870 (setenv "PYTHONPATH"
11871 (string-append
11872 (getcwd) "/test/"
11873 ":" (getenv "PYTHONPATH")))
11874 #t)))))
11875 (home-page
11876 "https://github.com/eliben/pyelftools")
11877 (synopsis
11878 "Analyze binary and library file information")
11879 (description "This Python library provides interfaces for parsing and
11880analyzing two binary and library file formats; the Executable and Linking
11881Format (ELF), and debugging information in the Debugging With Attributed
11882Record Format (DWARF).")
11883 (license license:public-domain)))
11884
11885(define-public python-pyev
11886 (package
11887 (name "python-pyev")
11888 (version "0.9.0")
11889 (source
11890 (origin
11891 (method url-fetch)
11892 (uri (pypi-uri "pyev" version))
11893 (sha256
11894 (base32
11895 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11896 (build-system python-build-system)
11897 (arguments
11898 `(#:tests? #f ; no test suite
11899 #:phases
11900 (modify-phases %standard-phases
11901 (add-after 'unpack 'patch
11902 (lambda* (#:key inputs #:allow-other-keys)
11903 (let ((libev (string-append (assoc-ref inputs "libev")
11904 "/lib/libev.so.4")))
11905 (substitute* "setup.py"
11906 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
11907 (string-append "libev_dll_name = \"" libev "\"")))))))))
11908 (inputs
11909 `(("libev" ,libev)))
11910 (home-page "http://pythonhosted.org/pyev/")
11911 (synopsis "Python libev interface")
11912 (description "Pyev provides a Python interface to libev.")
11913 (license license:gpl3)))
11914
11915(define-public python2-pyev
11916 (package-with-python2 python-pyev))
11917
11918(define-public python-imagesize
11919 (package
11920 (name "python-imagesize")
11921 (version "1.1.0")
11922 (source
11923 (origin
11924 (method url-fetch)
11925 (uri (pypi-uri "imagesize" version))
11926 (sha256
11927 (base32
11928 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
11929 (build-system python-build-system)
11930 (home-page "https://github.com/shibukawa/imagesize_py")
11931 (synopsis "Gets image size of files in various formats in Python")
11932 (description
11933 "This package allows determination of image size from
11934PNG, JPEG, JPEG2000 and GIF files in pure Python.")
11935 (license license:expat)))
11936
11937(define-public python2-imagesize
11938 (package-with-python2 python-imagesize))
11939
11940(define-public python-termstyle
11941 (package
11942 (name "python-termstyle")
11943 (version "0.1.11")
11944 (source
11945 (origin
11946 (method url-fetch)
11947 (uri (pypi-uri "termstyle" version))
11948 (sha256
11949 (base32
11950 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
11951 (build-system python-build-system)
11952 (arguments
11953 '(#:phases
11954 (modify-phases %standard-phases
11955 (replace 'check
11956 (lambda _
831080a6 11957 (invoke "python" "test3.py"))))))
44d10b1f
RW
11958 (home-page "https://github.com/gfxmonk/termstyle")
11959 (synopsis "Console text coloring for Python")
11960 (description "This package provides console text coloring for Python.")
11961 (license license:bsd-3)))
11962
11963(define-public python-argcomplete
11964 (package
11965 (name "python-argcomplete")
98aecd3a 11966 (version "1.10.3")
44d10b1f 11967 (source
98aecd3a
RW
11968 (origin
11969 (method url-fetch)
11970 (uri (pypi-uri "argcomplete" version))
11971 (sha256
11972 (base32
11973 "02jkc44drb0yjz6x28lvg6rj607n8r2irdpdvyylm8xnycn54zx3"))))
44d10b1f 11974 (build-system python-build-system)
98aecd3a
RW
11975 (arguments
11976 `(#:phases
11977 (modify-phases %standard-phases
11978 (add-after 'unpack 'embed-tool-references
11979 (lambda _
11980 (substitute* "argcomplete/bash_completion.d/python-argcomplete.sh"
11981 ((" grep")
11982 (string-append " " (which "grep")))
11983 ((" egrep")
11984 (string-append " " (which "egrep")))
11985 (("elif which")
11986 (string-append "elif " (which "which")))
11987 (("\\$\\(which")
11988 (string-append "$(" (which "which"))))
11989 #t)))))
11990 (inputs
11991 `(("grep" ,grep)
11992 ("which" ,which)))
44d10b1f 11993 (native-inputs
98aecd3a
RW
11994 `(("python-coverage" ,python-coverage)
11995 ("python-flake8" ,python-flake8)
11996 ("python-pexpect" ,python-pexpect)
11997 ("python-wheel" ,python-wheel)
44d10b1f 11998 ("tcsh" ,tcsh)
98aecd3a
RW
11999 ("fish" ,fish)
12000 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
44d10b1f
RW
12001 (home-page "https://github.com/kislyuk/argcomplete")
12002 (synopsis "Shell tab completion for Python argparse")
12003 (description "argcomplete provides extensible command line tab completion
12004of arguments and options for Python scripts using @code{argparse}. It's
12005particularly useful for programs with many options or sub-parsers that can
12006dynamically suggest completions; for example, when browsing resources over the
12007network.")
12008 (license license:asl2.0)))
12009
12010(define-public python2-argcomplete
12011 (package-with-python2 python-argcomplete))
12012
12013(define-public python-xopen
12014 (package
12015 (name "python-xopen")
24d64989 12016 (version "0.5.0")
44d10b1f
RW
12017 (source
12018 (origin
12019 (method url-fetch)
12020 (uri (pypi-uri "xopen" version))
12021 (sha256
12022 (base32
24d64989 12023 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
44d10b1f 12024 (build-system python-build-system)
24d64989
RW
12025 (propagated-inputs
12026 `(("python-setuptools-scm" ,python-setuptools-scm)))
44d10b1f
RW
12027 (home-page "https://github.com/marcelm/xopen/")
12028 (synopsis "Open compressed files transparently")
12029 (description "This module provides an @code{xopen} function that works like
12030Python's built-in @code{open} function, but can also deal with compressed files.
12031Supported compression formats are gzip, bzip2 and, xz, and are automatically
12032recognized by their file extensions. The focus is on being as efficient as
12033possible on all supported Python versions.")
12034 (license license:expat)))
12035
12036(define-public python2-xopen
12037 (let ((base (package-with-python2
12038 (strip-python2-variant python-xopen))))
12039 (package
12040 (inherit base)
12041 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
12042 ,@(package-propagated-inputs base))))))
12043
12044(define-public python-cheetah
12045 (package
12046 (name "python-cheetah")
12047 (version "3.1.0")
12048 (source
12049 (origin
12050 (method url-fetch)
12051 (uri (pypi-uri "Cheetah3" version))
12052 (sha256
12053 (base32
12054 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
12055 (build-system python-build-system)
12056 (arguments
12057 `(#:modules ((guix build utils)
12058 (guix build python-build-system)
12059 (ice-9 ftw)
12060 (srfi srfi-1)
12061 (srfi srfi-26))
12062 #:phases (modify-phases %standard-phases
12063 (add-after 'unpack 'use-absolute-python
12064 (lambda _
12065 (substitute* "Cheetah/CheetahWrapper.py"
12066 (("#!/usr/bin/env python")
12067 (string-append "#!" (which "python"))))
12068 #t))
12069 (replace 'check
12070 (lambda _
12071 (let ((cwd (getcwd)))
12072 (setenv "PYTHONPATH"
12073 (string-append
12074 cwd "/build/"
12075 (find (cut string-prefix? "lib" <>)
12076 (scandir (string-append cwd "/build")))
12077 ":" (getenv "PYTHONPATH")))
12078 (setenv "PATH"
12079 (string-append (getenv "PATH")
12080 ":" cwd "/bin"))
12081 (setenv "TMPDIR" "/tmp")
12082
12083 (substitute* "Cheetah/Tests/Test.py"
12084 (("unittest.TextTestRunner\\(\\)")
12085 "unittest.TextTestRunner(verbosity=2)"))
12086
12087 (invoke "python" "Cheetah/Tests/Test.py")))))))
12088 (propagated-inputs
12089 `(("python-markdown" ,python-markdown))) ;optional
12090 (home-page "http://cheetahtemplate.org/")
12091 (synopsis "Template engine")
12092 (description "Cheetah is a text-based template engine and Python code
12093generator.
12094
12095Cheetah can be used as a standalone templating utility or referenced as
12096a library from other Python applications. It has many potential uses,
12097but web developers looking for a viable alternative to ASP, JSP, PHP and
12098PSP are expected to be its principle user group.
12099
12100Features:
12101@enumerate
12102@item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
12103 text-based format.
12104@item Cleanly separates content, graphic design, and program code.
12105@item Blends the power and flexibility of Python with a simple template language
12106 that non-programmers can understand.
12107@item Gives template writers full access to any Python data structure, module,
12108 function, object, or method in their templates.
12109@item Makes code reuse easy by providing an object-orientated interface to
12110 templates that is accessible from Python code or other Cheetah templates.
12111 One template can subclass another and selectively reimplement sections of it.
12112@item Provides a simple, yet powerful, caching mechanism that can dramatically
12113 improve the performance of a dynamic website.
12114@item Compiles templates into optimized, yet readable, Python code.
12115@end enumerate")
12116 (license (license:x11-style "file://LICENSE"))))
12117
12118(define-public python2-cheetah
12119 (package-with-python2 python-cheetah))
12120
12121(define-public python-dulwich
12122 (package
12123 (name "python-dulwich")
12124 (version "0.18.6")
12125 (source
12126 (origin
12127 (method url-fetch)
12128 (uri (list (string-append "https://www.dulwich.io/releases/"
12129 "dulwich-" version ".tar.gz")
12130 (pypi-uri "dulwich" version)))
12131 (sha256
12132 (base32
12133 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
12134 (build-system python-build-system)
12135 (arguments
12136 `(#:phases
12137 (modify-phases %standard-phases
12138 (add-before 'check 'fix-tests
12139 (lambda* (#:key inputs #:allow-other-keys)
12140 ;; The tests use Popen with a custom environment which doesn't
12141 ;; include PATH.
12142 (substitute* "dulwich/tests/compat/utils.py"
12143 (("'git'") (string-append "'"
12144 (which "git")
12145 "'")))
12146 (substitute* '("dulwich/tests/test_repository.py"
12147 "dulwich/tests/test_hooks.py")
12148 (("#!/bin/sh") (string-append "#!" (which "sh"))))
12149 (setenv "TEST_RUNNER" "unittest")
12150 (setenv "PYTHONHASHSEED" "random")
12151 #t)))))
12152 (propagated-inputs
12153 `(("python-fastimport" ,python-fastimport)))
12154 (native-inputs
12155 `(("python-mock" ,python-mock)
12156 ("python-geventhttpclient" ,python-geventhttpclient)
12157 ("git" ,git)))
12158 (home-page "https://www.dulwich.io/")
12159 (synopsis "Git implementation in Python")
12160 (description "Dulwich is an implementation of the Git file formats and
12161protocols written in pure Python.")
12162 ;; Can be used with either license.
12163 (license (list license:asl2.0 license:gpl2+))))
12164
12165(define-public python2-dulwich
12166 (package-with-python2 python-dulwich))
12167
12168(define-public python-pbkdf2
12169 (package
12170 (name "python-pbkdf2")
12171 (version "1.3")
12172 (source
12173 (origin
12174 (method url-fetch)
12175 (uri (pypi-uri "pbkdf2" version))
12176 (sha256
12177 (base32
12178 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
12179 (build-system python-build-system)
12180 (arguments
12181 '(#:phases
12182 (modify-phases %standard-phases
12183 (replace 'check
12184 (lambda _
12185 (setenv "PYTHONPATH"
12186 (string-append (getcwd) "/build/lib:"
12187 (getenv "PYTHONPATH")))
ee2bb944 12188 (invoke "python" "test/test_pbkdf2.py"))))))
44d10b1f
RW
12189 (propagated-inputs
12190 `(("python-pycrypto" ,python-pycrypto))) ; optional
12191 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
12192 (synopsis "Password-based key derivation")
12193 (description "This module implements the password-based key derivation
12194function, PBKDF2, specified in RSA PKCS#5 v2.0.
12195
12196PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
12197is part of the RSA Public Key Cryptography Standards series. The provided
12198implementation takes a password or a passphrase and a salt value (and
12199optionally a iteration count, a digest module, and a MAC module) and provides
12200a file-like object from which an arbitrarly-sized key can be read.")
12201 (license license:expat)))
12202
12203(define-public python2-pbkdf2
12204 (package-with-python2 python-pbkdf2))
12205
12206(define-public python-qrcode
12207 (package
12208 (name "python-qrcode")
217ea1a1 12209 (version "6.1")
44d10b1f
RW
12210 (source
12211 (origin
12212 (method url-fetch)
12213 (uri (pypi-uri "qrcode" version))
12214 (sha256
217ea1a1 12215 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
44d10b1f
RW
12216 (build-system python-build-system)
12217 (arguments
12218 ;; FIXME: Tests require packaging 'pymaging'.
12219 '(#:tests? #f))
12220 (propagated-inputs
12221 `(("python-lxml" ,python-lxml) ; for SVG output
12222 ("python-pillow" ,python-pillow) ; for PNG output
12223 ("python-six" ,python-six)))
44d10b1f
RW
12224 (home-page "https://github.com/lincolnloop/python-qrcode")
12225 (synopsis "QR Code image generator")
12226 (description "This package provides a pure Python QR Code generator
12227module. It uses the Python Imaging Library (PIL) to allow for the generation
12228of QR Codes.
12229
12230In addition this package provides a command line tool to generate QR codes and
12231either write these QR codes to a file or do the output as ascii art at the
12232console.")
12233 (license license:bsd-3)))
12234
12235(define-public python2-qrcode
12236 (package-with-python2 python-qrcode))
12237
12238(define-public python-rst2ansi
12239 (package
12240 (name "python-rst2ansi")
12241 (version "0.1.5")
12242 (source
12243 (origin
12244 (method url-fetch)
12245 (uri (pypi-uri "rst2ansi" version))
12246 (sha256
12247 (base32
12248 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
12249 (build-system python-build-system)
12250 (propagated-inputs
12251 `(("python-docutils" ,python-docutils)))
12252 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
12253 (synopsis "Convert RST to ANSI-decorated console output")
12254 (description
12255 "Python module dedicated to rendering RST (reStructuredText) documents
12256to ansi-escaped strings suitable for display in a terminal.")
12257 (license license:expat)))
12258
12259(define-public python-ansi2html
12260 (package
12261 (name "python-ansi2html")
12262 (version "1.2.0")
12263 (source
12264 (origin
12265 (method url-fetch)
12266 (uri (pypi-uri "ansi2html" version))
12267 (sha256
12268 (base32
12269 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
12270 (build-system python-build-system)
12271 (native-inputs
12272 `(("python-mock" ,python-mock)
12273 ("python-nose" ,python-nose)))
12274 (propagated-inputs
12275 `(("python-six" ,python-six)))
12276 (home-page "https://github.com/ralphbean/ansi2html")
12277 (synopsis "Convert ANSI-decorated console output to HTML")
12278 (description
12279 "@command{ansi2html} is a Python library and command line utility for
12280convering text with ANSI color codes to HTML or LaTeX.")
12281 (license license:gpl3+)))
12282
12283(define-public python2-ansi2html
12284 (package-with-python2 python-ansi2html))
12285
12286(define-public python-ddt
12287 (package
12288 (name "python-ddt")
12289 (version "1.1.3")
12290 (source
12291 (origin
12292 (method url-fetch)
12293 (uri (pypi-uri "ddt" version))
12294 (sha256
12295 (base32
12296 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
12297 (build-system python-build-system)
12298 (native-inputs
12299 `(("python-mock" ,python-mock)
12300 ("python-nose" ,python-nose)))
12301 (propagated-inputs
12302 `(("python-six" ,python-six)
12303 ("python-pyyaml" ,python-pyyaml)))
12304 (home-page "https://github.com/txels/ddt")
12305 (synopsis "Data-Driven Tests")
12306 (description
12307 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
12308running it with different test data, and make it appear as multiple test
12309cases.")
12310 (license license:expat)))
12311
12312(define-public python2-ddt
12313 (package-with-python2 python-ddt))
12314
12315(define-public python-pycountry
12316 (package
12317 (name "python-pycountry")
12318 (version "18.5.26")
12319 (source
12320 (origin
12321 (method url-fetch)
12322 (uri (pypi-uri "pycountry" version))
12323 (sha256
12324 (base32
12325 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
12326 (build-system python-build-system)
12327 (home-page "https://bitbucket.org/flyingcircus/pycountry")
12328 (synopsis "ISO databases for languages, countries, currencies, etc.")
12329 (description
12330 "@code{pycountry} provides the ISO databases for the standards:
12331@enumerate
12332@item 639-3 (Languages)
12333@item 3166 (Countries)
12334@item 3166-3 (Deleted Countries)
12335@item 3166-2 (Subdivisions of countries)
12336@item 4217 (Currencies)
12337@item 15924 (Scripts)
12338@end enumerate
12339It includes a copy from Debian’s pkg-isocodes and makes the data accessible
12340through a Python API.")
12341 (license license:lgpl2.1+)))
12342
12343(define-public python2-pycountry
12344 (package-with-python2 python-pycountry))
12345
12346(define-public python-pycosat
12347 (package
12348 (name "python-pycosat")
12349 (version "0.6.1")
12350 (source
12351 (origin
12352 (method url-fetch)
12353 (uri (pypi-uri "pycosat" version))
12354 (sha256
12355 (base32
12356 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
12357 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
12358 (build-system python-build-system)
12359 (home-page "https://github.com/ContinuumIO/pycosat")
12360 (synopsis "Bindings to picosat (a SAT solver)")
12361 (description
12362 "This package provides efficient Python bindings to @code{picosat} on
12363the C level. When importing pycosat, the @code{picosat} solver becomes part
12364of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
12365Problem} (SAT) solver.")
12366 (license license:expat)))
12367
12368(define-public python2-pycosat
12369 (package-with-python2 python-pycosat))
12370
12371(define-public python2-ruamel.ordereddict
12372 (package
12373 (name "python2-ruamel.ordereddict")
12374 (version "0.4.9")
12375 (source
12376 (origin
12377 (method url-fetch)
12378 (uri (pypi-uri "ruamel.ordereddict" version))
12379 (sha256
12380 (base32
12381 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
12382 (build-system python-build-system)
12383 (arguments
12384 `(#:python ,python-2
12385 #:phases
12386 (modify-phases %standard-phases
12387 (delete 'check)
12388 (add-after 'install 'check
12389 (lambda* (#:key inputs outputs #:allow-other-keys)
12390 (add-installed-pythonpath inputs outputs)
f987ac30 12391 (invoke "python" "test/testordereddict.py"))))))
44d10b1f
RW
12392 (home-page "https://bitbucket.org/ruamel/ordereddict")
12393 (synopsis "Version of dict that keeps keys in insertion order")
12394 (description
12395 "This is an implementation of an ordered dictionary with @dfn{Key
12396Insertion Order} (KIO: updates of values do not affect the position of the
12397key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
12398removed and put at the back). The standard library module @code{OrderedDict},
12399implemented later, implements a subset of @code{ordereddict} functionality.
12400Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
12401Order} (KSO, no sorting function can be specified, but a transform can be
12402specified to apply on the key before comparison (e.g. @code{string.lower})).")
12403 (license license:expat)))
12404
12405(define-public python-pypeg2
12406 (package
12407 (name "python-pypeg2")
12408 (version "2.15.2")
12409 (source
12410 (origin
12411 (method url-fetch)
12412 (uri (pypi-uri "pyPEG2" version))
12413 (sha256
12414 (base32
12415 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
12416 (build-system python-build-system)
12417 (propagated-inputs `(("python-lxml" ,python-lxml)))
12418 (arguments
12419 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
12420 '(#:tests? #f))
12421 (home-page "https://fdik.org/pyPEG/")
12422 (synopsis "Parsering Expression Grammars in Python")
12423 (description "PyPEG is an intrinsic parser interpreter framework for
12424Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
12425parse many formal languages.")
12426 (license license:gpl2)))
12427
12428(define-public python-incremental
12429 (package
12430 (name "python-incremental")
12431 (version "17.5.0")
12432 (source
12433 (origin
12434 (method url-fetch)
12435 (uri (pypi-uri "incremental" version))
12436 (sha256
12437 (base32
12438 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
12439 (build-system python-build-system)
12440 (home-page "https://github.com/hawkowl/incremental")
12441 (synopsis "Library for versioning Python projects")
12442 (description "Incremental is a small library that versions your Python
12443projects.")
12444 (license license:expat)))
12445
12446(define-public python2-incremental
12447 (package-with-python2 python-incremental))
12448
12449(define-public python-invoke
12450 (package
12451 (name "python-invoke")
b5544cb4 12452 (home-page "https://www.pyinvoke.org/")
a5662319 12453 (version "1.3.0")
44d10b1f
RW
12454 (source (origin
12455 (method url-fetch)
12456 (uri (pypi-uri "invoke" version))
12457 (sha256
12458 (base32
a5662319 12459 "1nn7gad0rvy492acpyhkrp01zsk86acf34qhsvq4xmm6x39788n5"))))
44d10b1f
RW
12460 (build-system python-build-system)
12461 (arguments
12462 ;; XXX: Requires many dependencies that are not yet in Guix.
12463 `(#:tests? #f))
12464 (synopsis "Pythonic task execution")
12465 (description
12466 "Invoke is a Python task execution tool and library, drawing inspiration
12467from various sources to arrive at a powerful and clean feature set. It is
12468evolved from the Fabric project, but focuses on local and abstract concerns
12469instead of servers and network commands.")
12470 (license license:bsd-3)))
12471
12472(define-public python2-invoke
12473 (package-with-python2 python-invoke))
12474
12475(define-public python-automat
12476 (package
12477 (name "python-automat")
919d80a0 12478 (version "0.7.0")
44d10b1f
RW
12479 (source (origin
12480 (method url-fetch)
12481 (uri (pypi-uri "Automat" version))
12482 (sha256
12483 (base32
919d80a0 12484 "03ivg70n3b1cbcd2zvjhk8y4kmqxcvhmili39lmgx09dza1qpmyb"))))
44d10b1f
RW
12485 (build-system python-build-system)
12486 ;; We disable the tests because they require python-twisted, while
12487 ;; python-twisted depends on python-automat. Twisted is optional, but the
12488 ;; tests fail if it is not available. Also see
12489 ;; <https://github.com/glyph/automat/issues/71>.
12490 (arguments '(#:tests? #f))
12491 (native-inputs
12492 `(("python-m2r" ,python-m2r)
12493 ("python-setuptools-scm" ,python-setuptools-scm)
12494 ("python-graphviz" ,python-graphviz)))
12495 (propagated-inputs
12496 `(("python-six" ,python-six)
12497 ("python-attrs" ,python-attrs)))
12498 (home-page "https://github.com/glyph/Automat")
12499 (synopsis "Self-service finite-state machines")
12500 (description "Automat is a library for concise, idiomatic Python
12501expression of finite-state automata (particularly deterministic finite-state
12502transducers).")
12503 (license license:expat)))
12504
12505(define-public python2-automat
12506 (package-with-python2 python-automat))
12507
12508(define-public python-m2r
12509 (package
12510 (name "python-m2r")
bcfb8fac 12511 (version "0.2.1")
44d10b1f
RW
12512 (source (origin
12513 (method url-fetch)
12514 (uri (pypi-uri "m2r" version))
12515 (sha256
12516 (base32
bcfb8fac 12517 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
44d10b1f
RW
12518 (build-system python-build-system)
12519 (propagated-inputs
12520 `(("python-docutils" ,python-docutils)
12521 ("python-mistune" ,python-mistune)))
12522 (native-inputs
12523 `(("python-pygments" ,python-pygments)
12524 ("python-mock" ,python-mock)))
12525 (home-page "https://github.com/miyakogi/m2r")
12526 (synopsis "Markdown to reStructuredText converter")
12527 (description "M2R converts a markdown file including reST markups to valid
12528reST format.")
12529 (license license:expat)))
12530
12531(define-public python2-m2r
12532 (package-with-python2 python-m2r))
12533
12534(define-public python-constantly
12535 (package
12536 (name "python-constantly")
12537 (version "15.1.0")
12538 (source (origin
12539 (method url-fetch)
12540 (uri (pypi-uri "constantly" version))
12541 (sha256
12542 (base32
12543 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
12544 (build-system python-build-system)
12545 (home-page "https://github.com/twisted/constantly")
12546 (synopsis "Symbolic constants in Python")
12547 (description "Constantly is a Python library that provides symbolic
12548constant support. It includes collections and constants with text, numeric,
12549and bit flag values.")
12550 (license license:expat)))
12551
12552(define-public python2-constantly
12553 (package-with-python2 python-constantly))
12554
12555(define-public python-attrs
12556 (package
12557 (name "python-attrs")
c41d5144 12558 (version "19.1.0")
44d10b1f
RW
12559 (source (origin
12560 (method url-fetch)
12561 (uri (pypi-uri "attrs" version))
12562 (sha256
12563 (base32
c41d5144 12564 "16g33zr5f449lqc5wgvzpknxryfzrfsxcr6kpgxwn7l5fkv71f7h"))))
44d10b1f
RW
12565 (build-system python-build-system)
12566 (arguments
12567 `(#:modules ((guix build utils)
12568 (guix build python-build-system)
12569 (ice-9 ftw)
12570 (srfi srfi-1)
12571 (srfi srfi-26))
12572 #:phases (modify-phases %standard-phases
12573 (replace 'check
12574 (lambda _
12575 (let ((cwd (getcwd)))
12576 (setenv "PYTHONPATH"
12577 (string-append
12578 cwd "/build/"
12579 (find (cut string-prefix? "lib" <>)
12580 (scandir (string-append cwd "/build")))
12581 ":"
12582 (getenv "PYTHONPATH")))
12583 (invoke "python" "-m" "pytest")))))))
12584 (native-inputs
12585 `(("python-coverage" ,python-coverage)
12586 ("python-hypothesis" ,python-hypothesis)
12587 ("python-pympler" ,python-pympler)
12588 ("python-pytest" ,python-pytest)
12589 ("python-six" ,python-six)
12590 ("python-sphinx" ,python-sphinx)
12591 ("python-zope-interface" ,python-zope-interface)))
12592 (home-page "https://github.com/python-attrs/attrs/")
12593 (synopsis "Attributes without boilerplate")
12594 (description "@code{attrs} is a Python package with class decorators that
12595ease the chores of implementing the most common attribute-related object
12596protocols.")
12597 (license license:expat)))
12598
12599(define-public python2-attrs
12600 (package-with-python2 python-attrs))
12601
12602(define-public python-attrs-bootstrap
12603 (package
12604 (inherit python-attrs)
12605 (name "python-attrs-bootstrap")
44d10b1f
RW
12606 (native-inputs `())
12607 (arguments `(#:tests? #f))))
12608
12609(define-public python2-attrs-bootstrap
12610 (package-with-python2 python-attrs-bootstrap))
12611
12612(define-public python2-cliapp
12613 (package
12614 (name "python2-cliapp")
9064b84e 12615 (version "1.20180812.1")
44d10b1f
RW
12616 (source
12617 (origin
12618 (method url-fetch)
12619 (uri (string-append
12620 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
12621 version ".tar.gz"))
12622 (sha256
12623 (base32
9064b84e 12624 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
44d10b1f
RW
12625 (build-system python-build-system)
12626 (arguments
12627 `(#:python ,python-2
12628 #:phases
12629 (modify-phases %standard-phases
12630 ;; check phase needs to be run before the build phase. If not,
12631 ;; coverage-test-runner looks for tests for the built source files,
12632 ;; and fails.
12633 (delete 'check)
12634 (add-before 'build 'check
12635 (lambda _
12636 ;; Disable python3 tests
12637 (substitute* "check"
12638 (("python3") "# python3"))
6c826d32 12639 (invoke "./check"))))))
44d10b1f
RW
12640 (native-inputs
12641 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12642 ("python2-pep8" ,python2-pep8)))
12643 (propagated-inputs
12644 `(("python2-pyaml" ,python2-pyaml)))
12645 (home-page "https://liw.fi/cliapp/")
12646 (synopsis "Python framework for command line programs")
12647 (description "@code{python2-cliapp} is a python framework for
12648command line programs. It contains the typical stuff such programs
12649need to do, such as parsing the command line for options, and
12650iterating over input files.")
12651 (license license:gpl2+)))
12652
12653(define-public python2-ttystatus
12654 (package
12655 (name "python2-ttystatus")
e516a9c2 12656 (version "0.36")
44d10b1f
RW
12657 (source
12658 (origin
12659 (method url-fetch)
12660 (uri (string-append
12661 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
12662 version ".tar.gz"))
12663 (sha256
12664 (base32
e516a9c2 12665 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
44d10b1f
RW
12666 (build-system python-build-system)
12667 (native-inputs
12668 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12669 ("python2-pep8" ,python2-pep8)))
12670 (arguments
12671 `(#:python ,python-2
12672 #:phases
12673 (modify-phases %standard-phases
12674 ;; check phase needs to be run before the build phase. If not,
12675 ;; coverage-test-runner looks for tests for the built source files,
12676 ;; and fails.
12677 (delete 'check)
12678 (add-before 'build 'check
cbeee881 12679 (lambda _ (invoke "make" "check"))))))
44d10b1f
RW
12680 (home-page "https://liw.fi/ttystatus/")
12681 (synopsis "Python library for showing progress reporting and
12682status updates on terminals")
12683 (description "@code{python2-ttystatus} is a python library for
12684showing progress reporting and status updates on terminals, for
12685command line programs. Output is automatically adapted to the width
12686of the terminal: truncated if it does not fit, and resized if the
12687terminal size changes.")
12688 (license license:gpl3+)))
12689
12690(define-public python2-tracing
12691 (package
12692 (name "python2-tracing")
12693 (version "0.10")
12694 (source
12695 (origin
12696 (method url-fetch)
12697 (uri (string-append
12698 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
12699 version ".tar.gz"))
12700 (sha256
12701 (base32
12702 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
12703 (build-system python-build-system)
12704 (arguments
12705 `(#:python ,python-2))
12706 (home-page "https://liw.fi/tracing/")
12707 (synopsis "Python debug logging helper")
12708 (description "@code{python2-tracing} is a python library for
12709logging debug messages. It provides a way to turn debugging messages
12710on and off, based on the filename they occur in. It is much faster
12711than using @code{logging.Filter} to accomplish the same thing, which
12712matters when code is run in production mode. The actual logging still
12713happens using the @code{logging} library.")
12714 (license license:gpl3+)))
12715
12716(define-public python2-larch
12717 (package
12718 (name "python2-larch")
12719 (version "1.20151025")
12720 (source
12721 (origin
12722 (method url-fetch)
12723 (uri (string-append
12724 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
12725 version ".tar.gz"))
12726 (patches (search-patches
12727 "python2-larch-coverage-4.0a6-compatibility.patch"))
12728 (sha256
12729 (base32
12730 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
12731 (build-system python-build-system)
12732 (arguments
12733 `(#:python ,python-2
12734 #:phases
12735 (modify-phases %standard-phases
12736 ;; check phase needs to be run before the build phase. If not,
12737 ;; coverage-test-runner looks for tests for the built source files,
12738 ;; and fails.
12739 (delete 'check)
12740 (add-before 'build 'check
204ad455 12741 (lambda _ (invoke "make" "check"))))))
44d10b1f
RW
12742 (native-inputs
12743 `(("cmdtest" ,cmdtest)
12744 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
12745 (propagated-inputs
12746 `(("python2-tracing" ,python2-tracing)))
12747 (home-page "https://liw.fi/larch/")
12748 (synopsis "Python copy-on-write B-tree library")
12749 (description "@code{python2-larch} is an implementation of
12750particular kind of B-tree, based on research by Ohad Rodeh. See
12751@url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
12752on the data structure.
12753
12754The distinctive feature of this B-tree is that a node is never
12755(conceptually) modified. Instead, all updates are done by
12756copy-on-write. This makes it easy to clone a tree, and modify only the
12757clone, while other processes access the original tree.")
12758 (license license:gpl3+)))
12759
12760(define-public python-astroid
12761 (package
12762 (name "python-astroid")
1c43c698 12763 (version "2.3.3")
44d10b1f
RW
12764 (source
12765 (origin
12766 (method url-fetch)
12767 (uri (pypi-uri "astroid" version))
12768 (sha256
1c43c698 12769 (base32 "0fnibsl2cb5mvzbfm7sycj85smx48f8w8m7ks1sqlmpr9ps0gski"))))
44d10b1f
RW
12770 (build-system python-build-system)
12771 (propagated-inputs
12772 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
12773 ("python-six" ,python-six)
f0935460 12774 ("python-typed-ast" ,python-typed-ast)
44d10b1f
RW
12775 ("python-wrapt" ,python-wrapt)))
12776 (native-inputs
12777 `(("python-dateutil" ,python-dateutil)
12778 ("python-nose" ,python-nose)
12779 ("python-pytest" ,python-pytest)
12780 ("python-pytest-runner" ,python-pytest-runner)))
12781 (arguments
12782 `(#:phases
12783 (modify-phases %standard-phases
12784 (add-after 'unpack 'remove-spurious-test
12785 (lambda _
12786 ;; This can be removed after upgrading from python-3.7
12787 ;; https://github.com/PyCQA/astroid/issues/593
12788 ;; https://bugs.python.org/issue34056
12789 (delete-file "astroid/tests/unittest_modutils.py")
12790 #t))
12791 (replace 'check
12792 (lambda _
12793 (invoke "pytest" "astroid"))))))
12794 (home-page "https://github.com/PyCQA/astroid")
12795 (synopsis "Common base representation of python source code for pylint and
12796other projects")
12797 (description "@code{python-astroid} provides a common base representation
12798of python source code for projects such as pychecker, pyreverse, pylint, etc.
12799
12800It provides a compatible representation which comes from the _ast module. It
12801rebuilds the tree generated by the builtin _ast module by recursively walking
12802down the AST and building an extended ast. The new node classes have
12803additional methods and attributes for different usages. They include some
12804support for static inference and local name scopes. Furthermore, astroid
12805builds partial trees by inspecting living objects.")
12806 (license license:lgpl2.1+)
12807 (properties `((python2-variant . ,(delay python2-astroid))))))
12808
12809(define-public python2-astroid
12810 (let ((base (package-with-python2
12811 (strip-python2-variant python-astroid))))
12812 (package (inherit base)
12813 ;; Version 2.x removes python2 support.
12814 (version "1.6.5")
12815 (source
12816 (origin
12817 (method url-fetch)
12818 (uri (pypi-uri "astroid" version))
12819 (sha256
12820 (base32
12821 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
12822 (arguments
12823 (substitute-keyword-arguments (package-arguments base)
12824 ((#:phases phases)
12825 `(modify-phases ,phases
12826 (add-after 'unpack 'remove-spurious-test
12827 (lambda _
12828 ;; https://github.com/PyCQA/astroid/issues/276
12829 (delete-file "astroid/tests/unittest_brain.py")
12830 #t))
12831 (replace 'check
12832 (lambda _
12833 (invoke"python" "-m" "unittest" "discover"
12834 "-p" "unittest*.py")))))))
12835 (native-inputs `())
12836 (propagated-inputs
12837 `(("python2-backports-functools-lru-cache"
12838 ,python2-backports-functools-lru-cache)
12839 ("python2-enum34" ,python2-enum34)
12840 ("python2-singledispatch" ,python2-singledispatch)
741f98b3
MO
12841 ,@(alist-delete "python-typed-ast"
12842 (package-propagated-inputs base)))))))
44d10b1f
RW
12843
12844(define-public python-isort
12845 (package
12846 (name "python-isort")
e2227b6a 12847 (version "4.3.4")
44d10b1f
RW
12848 (source
12849 (origin
e2227b6a
EF
12850 (method git-fetch)
12851 (uri (git-reference
12852 ;; Tests pass only from the Github sources
12853 (url "https://github.com/timothycrosley/isort")
12854 (commit version)))
12855 (file-name (git-file-name name version))
44d10b1f
RW
12856 (sha256
12857 (base32
e2227b6a 12858 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
44d10b1f
RW
12859 (build-system python-build-system)
12860 (native-inputs
12861 `(("python-mock" ,python-mock)
12862 ("python-pytest" ,python-pytest)))
12863 (home-page "https://github.com/timothycrosley/isort")
12864 (synopsis "Python utility/library to sort python imports")
12865 (description "@code{python-isort} is a python utility/library to sort
12866imports alphabetically, and automatically separated into sections. It
12867provides a command line utility, a python library and plugins for various
12868editors.")
e2227b6a
EF
12869 (license license:expat)
12870 (properties `((python2-variant . ,(delay python2-isort))))))
44d10b1f
RW
12871
12872(define-public python2-isort
e2227b6a
EF
12873 (let ((base (package-with-python2
12874 (strip-python2-variant python-isort))))
12875 (package (inherit base)
12876 (native-inputs
12877 `(("python2-futures" ,python2-futures)
12878 ,@(package-native-inputs base))))))
44d10b1f
RW
12879
12880(define-public python2-backports-functools-lru-cache
12881 (package
12882 (name "python2-backports-functools-lru-cache")
12883 (version "1.5")
12884 (source
12885 (origin
12886 (method url-fetch)
12887 ;; only the pypi tarballs contain the necessary metadata
12888 (uri (pypi-uri "backports.functools_lru_cache" version))
12889 (sha256
12890 (base32
12891 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
12892 (build-system python-build-system)
12893 (native-inputs
12894 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
12895 (arguments
12896 `(#:python ,python-2))
12897 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
12898 (synopsis "Backport of functools.lru_cache from Python 3.3")
12899 (description "@code{python2-backports-functools-lru-cache} is a backport
12900of @code{functools.lru_cache} from python 3.3.")
12901 (license license:expat)))
12902
12903(define-public python-configparser
12904 (package
12905 (name "python-configparser")
84127f8c 12906 (version "3.7.1")
44d10b1f
RW
12907 (source
12908 (origin
12909 (method url-fetch)
84127f8c 12910 (uri (pypi-uri "configparser" version))
44d10b1f
RW
12911 (sha256
12912 (base32
84127f8c 12913 "0cnz213il9lhgda6x70fw7mfqr8da43s3wm343lwzhqx94mgmmav"))))
44d10b1f 12914 (build-system python-build-system)
809f003f 12915 (home-page "https://github.com/jaraco/configparser/")
44d10b1f
RW
12916 (synopsis "Backport of configparser from python 3.5")
12917 (description "@code{python-configparser} is a backport of
12918@code{configparser} from Python 3.5 so that it can be used directly
12919in other versions.")
12920 (license license:expat)))
12921
12922(define-public python2-configparser
12923 (package-with-python2 python-configparser))
12924
12925(define-public python-mando
12926 (package
12927 (name "python-mando")
12928 (version "0.6.4")
12929 (source (origin
12930 (method url-fetch)
12931 (uri (pypi-uri "mando" version))
12932 (sha256
12933 (base32
12934 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
12935 (build-system python-build-system)
12936 (propagated-inputs
12937 `(("python-rst2ansi" ,python-rst2ansi)
12938 ("python-six" ,python-six)))
12939 (native-inputs
12940 `(("python-pytest" ,python-pytest)))
12941 (home-page "https://mando.readthedocs.org/")
12942 (synopsis
12943 "Wrapper around argparse, allowing creation of complete CLI applications")
12944 (description
12945 "This package is a wrapper around argparse, allowing you to write complete CLI
12946applications in seconds while maintaining all the flexibility.")
12947 (license license:expat)))
12948
12949(define-public python2-mando
12950 (package-with-python2 python-mando))
12951
70daf82f
RW
12952(define-public python2-argparse
12953 (package
12954 (name "python2-argparse")
12955 (version "1.4.0")
12956 (source
12957 (origin
12958 (method url-fetch)
12959 (uri (pypi-uri "argparse" version))
12960 (sha256
12961 (base32
12962 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
12963 (build-system python-build-system)
12964 (arguments
12965 `(#:python ,python-2))
12966 (home-page "https://github.com/ThomasWaldmann/argparse/")
12967 (synopsis "Python command-line parsing library")
12968 (description
12969 "This package is mostly for people who want to have @code{argparse} on
12970older Pythons because it was not part of the standard library back then.")
12971 (license license:psfl)))
12972
44d10b1f
RW
12973(define-public python-fudge
12974 (package
12975 (name "python-fudge")
12976 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
12977 ;; package, which is currently the only use of this package.
12978 (version "0.9.6")
12979 (source
12980 (origin
12981 (method url-fetch)
12982 (uri (pypi-uri "fudge" version))
12983 (sha256
12984 (base32
12985 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
12986 (build-system python-build-system)
12987 (arguments
12988 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
12989 (home-page "https://github.com/fudge-py/fudge")
12990 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
12991 (description
12992 "Fudge is a Python module for using fake objects (mocks and stubs) to
12993test real ones.
12994
12995In readable Python code, you declare the methods available on your fake object
12996and how they should be called. Then you inject that into your application and
12997start testing. This declarative approach means you don’t have to record and
12998playback actions and you don’t have to inspect your fakes after running code.
12999If the fake object was used incorrectly then you’ll see an informative
13000exception message with a traceback that points to the culprit.")
13001 (license license:expat)))
13002
13003(define-public python2-fudge
13004 (package-with-python2 python-fudge))
13005
13006(define-public python-mwclient
13007 (package
13008 (name "python-mwclient")
957c6833 13009 (version "0.10.0")
44d10b1f
RW
13010 (source
13011 (origin
957c6833 13012 (method git-fetch)
44d10b1f 13013 ;; The PyPI version wouldn't contain tests.
957c6833
EF
13014 (uri (git-reference
13015 (url "https://github.com/mwclient/mwclient")
13016 (commit (string-append "v" version))))
13017 (file-name (git-file-name name version))
44d10b1f
RW
13018 (sha256
13019 (base32
957c6833 13020 "1c3q6lwmb05yqywc4ya98ca7hsl15niili8rccl4n1yqp77c103v"))))
44d10b1f
RW
13021 (build-system python-build-system)
13022 (propagated-inputs
957c6833 13023 `(("python-requests-oauthlib" ,python-requests-oauthlib)
44d10b1f
RW
13024 ("python-six" ,python-six)))
13025 (native-inputs
13026 `(("python-mock" ,python-mock)
13027 ("python-pytest" ,python-pytest)
44d10b1f 13028 ("python-pytest-cov" ,python-pytest-cov)
957c6833 13029 ("python-pytest-runner" ,python-pytest-runner)
44d10b1f
RW
13030 ("python-responses" ,python-responses)))
13031 (home-page "https://github.com/btongminh/mwclient")
13032 (synopsis "MediaWiki API client")
13033 (description "This package provides a MediaWiki API client.")
13034 (license license:expat)))
13035
13036(define-public python2-mwclient
13037 (package-with-python2 python-mwclient))
13038
13039(define-public python-utils
13040 (package
13041 (name "python-utils")
13042 (version "2.1.0")
13043 (source (origin
13044 (method url-fetch)
13045 (uri (pypi-uri "python-utils" version))
13046 (sha256
13047 (base32
13048 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
13049 (build-system python-build-system)
13050 (native-inputs
13051 `(("pytest-runner" ,python-pytest-runner)
13052 ("pytest" ,python-pytest)
13053 ("six" ,python-six)))
13054 (home-page "https://github.com/WoLpH/python-utils")
13055 (synopsis "Convenient utilities not included with the standard Python install")
13056 (description
13057 "Python Utils is a collection of small Python functions and classes which
13058make common patterns shorter and easier.")
13059 (license license:bsd-2)))
13060
13061(define-public python2-utils
13062 (package-with-python2 python-utils))
13063
44d10b1f
RW
13064(define-public python-diff-match-patch
13065 (package
13066 (name "python-diff-match-patch")
13067 (version "20121119")
13068 (source
13069 (origin
13070 (method url-fetch)
13071 (uri (pypi-uri "diff-match-patch" version))
13072 (sha256
13073 (base32
13074 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
13075 (build-system python-build-system)
13076 (home-page "https://code.google.com/p/google-diff-match-patch")
13077 (synopsis "Synchronize plain text")
13078 (description "Diff Match and Patch libraries offer robust algorithms to
13079perform the operations required for synchronizing plain text.")
13080 (license license:asl2.0)))
13081
13082(define-public python2-diff-match-patch
13083 (package-with-python2 python-diff-match-patch))
13084
13085(define-public python-dirsync
13086 (package
13087 (name "python-dirsync")
13088 (version "2.2.3")
13089 (source
13090 (origin
13091 (method url-fetch)
13092 (uri (pypi-uri "dirsync" version))
13093 (sha256
13094 (base32
13095 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
13096 (build-system python-build-system)
13097 (propagated-inputs
13098 `(("six" ,python-six)))
13099 (home-page "https://bitbucket.org/tkhyn/dirsync")
13100 (synopsis "Advanced directory tree synchronisation tool")
13101 (description "Advanced directory tree synchronisation tool.")
13102 (license license:expat)))
13103
13104(define-public python2-dirsync
13105 (package-with-python2 python-dirsync))
13106
13107(define-public python-levenshtein
13108 (package
13109 (name "python-levenshtein")
13110 (version "0.12.0")
13111 (source
13112 (origin
13113 (method url-fetch)
13114 (uri (pypi-uri "python-Levenshtein" version))
13115 (sha256
13116 (base32
13117 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
13118 (build-system python-build-system)
13119 (home-page "https://github.com/ztane/python-Levenshtein")
13120 (synopsis "Fast computation of Levenshtein distance and string similarity")
13121 (description
13122 "The Levenshtein Python C extension module contains functions for fast computation of
13123@enumerate
13124@item Levenshtein (edit) distance, and edit operations
13125@item string similarity
13126@item approximate median strings, and generally string averaging
13127@item string sequence and set similarity
13128@end enumerate
13129It supports both normal and Unicode strings.")
13130 (license license:gpl2+)))
13131
13132(define-public python2-levenshtein
13133 (package-with-python2 python-levenshtein))
13134
13135(define-public python-scandir
13136 (package
13137 (name "python-scandir")
13138 (version "1.9.0")
13139 (source
13140 (origin
13141 (method url-fetch)
13142 (uri (pypi-uri "scandir" version))
13143 (sha256
13144 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
13145 (build-system python-build-system)
13146 (arguments
13147 `(#:phases (modify-phases %standard-phases
13148 (replace 'check
13149 (lambda _
13150 (invoke "python" "test/run_tests.py"))))))
13151 (home-page "https://github.com/benhoyt/scandir")
13152 (synopsis "Directory iteration function")
13153 (description
13154 "Directory iteration function like os.listdir(), except that instead of
13155returning a list of bare filenames, it yields DirEntry objects that include
13156file type and stat information along with the name. Using scandir() increases
13157the speed of os.walk() by 2-20 times (depending on the platform and file
13158system) by avoiding unnecessary calls to os.stat() in most cases.
13159
13160This package is part of the Python standard library since version 3.5.")
13161 (license license:bsd-3)))
13162
13163(define-public python2-scandir
13164 (package-with-python2 python-scandir))
13165
13166(define-public python2-stemming
13167 (package
13168 (name "python2-stemming")
13169 (version "1.0.1")
13170 (source
13171 (origin
13172 (method url-fetch)
13173 (uri (pypi-uri "stemming" version))
13174 (sha256
13175 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
13176 (build-system python-build-system)
13177 (arguments
13178 `(#:python ,python-2))
13179 (home-page "https://bitbucket.org/mchaput/stemming/overview")
13180 (synopsis "Python implementations of various stemming algorithms")
13181 (description
13182 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
13183stemming algorithms for English. These implementations are straightforward and
13184efficient, unlike some Python versions of the same algorithms available on the
13185Web. This package is an extraction of the stemming code included in the Whoosh
13186search engine.")
13187 (license license:public-domain)))
13188
13189(define-public python-factory-boy
13190 (package
13191 (name "python-factory-boy")
13192 (version "2.8.1")
13193 (source
13194 (origin
13195 (method url-fetch)
13196 (uri (pypi-uri "factory_boy" version))
13197 (sha256
13198 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
13199 (build-system python-build-system)
13200 (arguments
13201 ;; Tests are not included in the tarball.
13202 `(#:tests? #f))
13203 (propagated-inputs
13204 `(("faker" ,python-faker)))
13205 (home-page "https://github.com/benhoyt/scandir")
13206 (synopsis "Versatile test fixtures replacement")
13207 (description
13208 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
13209
13210As a fixtures replacement tool, it aims to replace static, hard to maintain
13211fixtures with easy-to-use factories for complex object.
13212
13213Instead of building an exhaustive test setup with every possible combination
13214of corner cases, factory_boy allows you to use objects customized for the
13215current test, while only declaring the test-specific fields")
13216 (license license:expat)))
13217
13218(define-public python2-factory-boy
13219 (package-with-python2 python-factory-boy))
13220
13221(define-public python-translate-toolkit
13222 (package
13223 (name "python-translate-toolkit")
13224 (version "2.1.0")
13225 (source
13226 (origin
13227 (method url-fetch)
13228 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
13229 (sha256
13230 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
13231 (build-system python-build-system)
13232 (native-inputs
13233 `(("python-pytest" ,python-pytest)
13234 ("python-sphinx" ,python-sphinx)))
13235 (propagated-inputs
13236 `(("python-babel" ,python-babel)
13237 ("python-beautifulsoup4" ,python-beautifulsoup4)
13238 ("python-chardet" ,python-chardet)
13239 ("python-diff-match-patch" ,python-diff-match-patch)
13240 ("python-levenshtein" ,python-levenshtein)
13241 ("python-lxml" ,python-lxml)
13242 ("python-six" ,python-six)
13243 ("python-vobject" ,python-vobject)
13244 ("python-pyyaml" ,python-pyyaml)))
13245 (arguments
13246 ;; TODO: tests are not run, because they end with
13247 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
13248 ;; 'parse_funcs'
13249 ;; during test setup.
13250 `(#:tests? #f))
18919cf9 13251 (home-page "https://toolkit.translatehouse.org")
44d10b1f
RW
13252 (synopsis "Tools and API for translation and localization engineering")
13253 (description
13254 "Tools and API for translation and localization engineering. It contains
13255several utilities, as well as an API for building localization tools.")
13256 (license license:gpl2+)))
13257
13258(define-public python2-translate-toolkit
13259 (package-with-python2 python-translate-toolkit))
13260
13261(define-public python-packaging
13262 (package
13263 (name "python-packaging")
a72a1892 13264 (version "20.0")
44d10b1f
RW
13265 (source
13266 (origin
13267 (method url-fetch)
13268 (uri (pypi-uri "packaging" version))
20bf58bf
MB
13269 ;; XXX: The URL in the patch file is wrong, it should be
13270 ;; <https://github.com/pypa/packaging/pull/256>.
fdd0c369 13271 (patches (search-patches "python-packaging-test-arch.patch"))
44d10b1f
RW
13272 (sha256
13273 (base32
a72a1892 13274 "1y2ip3a4ykkpgnwgn85j6hkspcl0cg3mzms97f40mk57vwqq67gy"))))
44d10b1f
RW
13275 (build-system python-build-system)
13276 (arguments
13277 `(#:phases (modify-phases %standard-phases
13278 (replace 'check
13279 (lambda _ (invoke "py.test" "-vv"))))))
13280 (native-inputs
13281 `(("python-pretend" ,python-pretend)
13282 ("python-pytest" ,python-pytest)))
13283 (propagated-inputs
13284 `(("python-pyparsing" ,python-pyparsing)
13285 ("python-six" ,python-six)))
13286 (home-page "https://github.com/pypa/packaging")
13287 (synopsis "Core utilities for Python packages")
13288 (description "Packaging is a Python module for dealing with Python packages.
13289It offers an interface for working with package versions, names, and dependency
13290information.")
13291 ;; From 'LICENSE': This software is made available under the terms of
13292 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
13293 ;; Contributions to this software is made under the terms of *both* these
13294 ;; licenses.
13295 (license (list license:asl2.0 license:bsd-2))))
13296
13297(define-public python2-packaging
13298 (package-with-python2 python-packaging))
13299
13300(define-public python-relatorio
13301 (package
13302 (name "python-relatorio")
13303 (version "0.8.0")
13304 (source
13305 (origin
13306 (method url-fetch)
13307 (uri (pypi-uri "relatorio" version))
13308 (sha256
13309 (base32
13310 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
13311 (build-system python-build-system)
13312 (propagated-inputs
13313 `(("python-lxml" ,python-lxml)
13314 ("python-genshi" ,python-genshi)))
13315 (native-inputs
13316 `(("python-magic" ,python-magic)))
13317 (home-page "https://relatorio.tryton.org/")
13318 (synopsis "Templating library able to output ODT and PDF files")
13319 (description "Relatorio is a templating library which provides a way to
13320easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
13321for more filetypes can be easily added by creating plugins for them.")
13322 (license license:gpl3+)))
13323
13324(define-public python2-relatorio
13325 (package-with-python2 python-relatorio))
13326
13327(define-public python-radon
13328 (package
13329 (name "python-radon")
f675ab4f 13330 (version "4.1.0")
44d10b1f
RW
13331 (source
13332 (origin
13333 (method url-fetch)
13334 (uri (pypi-uri "radon" version))
13335 (sha256
13336 (base32
f675ab4f 13337 "0vfxxzbnz5lxfvp0yxp35g6c8qqnnbhi4dm7shkm1d3d4192q22n"))))
44d10b1f
RW
13338 (build-system python-build-system)
13339 (arguments
13340 `(#:phases (modify-phases %standard-phases
13341 (replace 'check
13342 (lambda _
13343 (invoke "python" "radon/tests/run.py"))))))
13344 (propagated-inputs
13345 `(("python-colorama" ,python-colorama)
13346 ("python-flake8-polyfill" ,python-flake8-polyfill)
13347 ("python-mando" ,python-mando)))
13348 (native-inputs
13349 `(("python-pytest" ,python-pytest)
13350 ("python-pytest-mock" ,python-pytest-mock)))
13351 (home-page "https://radon.readthedocs.org/")
13352 (synopsis "Code Metrics in Python")
13353 (description "Radon is a Python tool which computes various code metrics.
13354Supported metrics are:
13355@itemize @bullet
13356@item raw metrics: SLOC, comment lines, blank lines, &c.
13357@item Cyclomatic Complexity (i.e. McCabe’s Complexity)
13358@item Halstead metrics (all of them)
13359@item the Maintainability Index (a Visual Studio metric)
13360@end itemize")
13361 (license license:expat)))
13362
13363(define-public python2-radon
13364 (package-with-python2 python-radon))
13365
13366(define-public python-sure
13367 (package
13368 (name "python-sure")
13369 (version "1.4.11")
13370 (source
13371 (origin
13372 (method url-fetch)
13373 (uri (pypi-uri "sure" version))
13374 (sha256
13375 (base32
13376 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
13377 (build-system python-build-system)
13378 (propagated-inputs
13379 `(("python-mock" ,python-mock)
13380 ("python-six" ,python-six)))
13381 (native-inputs
13382 `(("python-nose" ,python-nose)))
13383 (home-page "https://github.com/gabrielfalcao/sure")
13384 (synopsis "Automated testing library in python for python")
13385 (description
13386 "Sure is a python library that leverages a DSL for writing assertions.
13387Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
13388 (license license:gpl3+)))
13389
13390(define-public python2-sure
13391 (package-with-python2 python-sure))
13392
13393(define-public python2-couleur
13394 ;; This package does not seem to support python3 at all, hence,
13395 ;; only the python2 variant definition is provided.
13396 (package
13397 (name "python2-couleur")
13398 (version "0.6.2")
13399 (source
13400 (origin
13401 (method url-fetch)
13402 (uri (pypi-uri "couleur" version))
13403 (sha256
13404 (base32
13405 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
13406 (build-system python-build-system)
13407 (arguments
13408 `(#:python ,python-2))
13409 (home-page "https://github.com/gabrielfalcao/couleur")
13410 (synopsis
13411 "ANSI terminal tool for python, colored shell and other handy fancy features")
13412 (description
13413 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
13414terminal such as coloured output in the shell, overwriting output, indentation, etc.")
13415 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
13416 ;; https://github.com/gabrielfalcao/couleur/issues/11
13417 (license license:lgpl3+)))
13418
13419(define-public python-misaka
13420 (package
13421 (name "python-misaka")
0dcb3412 13422 (version "2.1.1")
44d10b1f
RW
13423 (source
13424 (origin
13425 (method url-fetch)
13426 (uri (pypi-uri "misaka" version))
13427 (sha256
13428 (base32
0dcb3412 13429 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
44d10b1f
RW
13430 (build-system python-build-system)
13431 (arguments
13432 `(;; Line 37 of setup.py calls self.run_command('develop')
13433 ;; in the 'check' phase. This command seems to be trying
13434 ;; to write to
13435 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
13436 ;; for which it does not have the permission to write.
13437 #:tests? #f))
13438 (propagated-inputs
13439 `(("python-cffi" ,python-cffi)))
13440 (home-page "https://github.com/FSX/misaka")
13441 (synopsis "Python binding for Hoedown")
13442 (description
13443 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
13444library written in C. It features a fast HTML renderer and functionality to make custom
13445renderers (e.g. man pages or LaTeX).")
13446 (license license:expat)))
13447
13448(define-public python2-misaka
13449 (package-with-python2 python-misaka))
13450
13451(define-public python2-steadymark
13452 ;; This is forced into being a python2 only variant
13453 ;; due to its dependence on couleur that has no support
13454 ;; for python3
13455 (package
13456 (name "python2-steadymark")
13457 (version "0.7.3")
13458 (source
13459 (origin
13460 (method url-fetch)
13461 (uri (pypi-uri "steadymark" version))
13462 (sha256
13463 (base32
13464 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
13465 (build-system python-build-system)
13466 (native-inputs
13467 `(("python-couleur" ,python2-couleur)
13468 ("python-sure" ,python2-sure)
13469 ("python-misaka" ,python2-misaka)))
13470 (arguments
13471 `(#:python ,python-2
13472 #:phases
13473 (modify-phases %standard-phases
13474 (add-before 'build 'patch-setup-py
13475 (lambda _
13476 ;; Update requirements from dependency==version
13477 ;; to dependency>=version
13478 (substitute* "setup.py"
13479 (("==") ">="))
13480 #t)))))
13481 (home-page "https://github.com/gabrielfalcao/steadymark")
13482 (synopsis "Markdown-based test runner for python")
13483 (description
13484 "@code{Steadymark} allows documentation to be written in github-flavoured
13485markdown. The documentation may contain snippets of code surrounded by python
13486code blocks and @code{Steadymark} will find these snippets and run them, making
13487sure that there are no old malfunctional examples in the documentation examples.")
13488 (license license:expat)))
13489
13490(define-public python-jsonpointer
13491 (package
13492 (name "python-jsonpointer")
13493 (version "1.10")
13494 (source
13495 (origin
13496 (method url-fetch)
13497 (uri (pypi-uri "jsonpointer" version))
13498 (sha256
13499 (base32
13500 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
13501 (build-system python-build-system)
13502 (home-page "https://github.com/stefankoegl/python-json-pointer")
13503 (synopsis "Identify specific nodes in a JSON document")
13504 (description "@code{jsonpointer} allows you to access specific nodes
13505by path in a JSON document (see RFC 6901).")
13506 (license license:bsd-3)))
13507
13508(define-public python2-jsonpointer
13509 (package-with-python2 python-jsonpointer))
13510
13511(define-public python-jsonpatch
13512 (package
13513 (name "python-jsonpatch")
13514 (version "1.16")
13515 (source
13516 (origin
854c5c95 13517 (method git-fetch)
44d10b1f 13518 ;; pypi version lacks tests.js
854c5c95
EF
13519 (uri (git-reference
13520 (url "https://github.com/stefankoegl/python-json-patch")
13521 (commit (string-append "v" version))))
13522 (file-name (git-file-name name version))
44d10b1f
RW
13523 (sha256
13524 (base32
854c5c95 13525 "0k9pff06lxama3nhsc7cdxbp83422bdy8ifs52i6xkas8hpyzfzr"))))
44d10b1f
RW
13526 (build-system python-build-system)
13527 (native-inputs
13528 `(("python-jsonpointer" ,python-jsonpointer)))
13529 (home-page "https://github.com/stefankoegl/python-json-patch")
13530 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
13531 (description "@code{jsonpatch} is a library and program that allows
13532applying JSON Patches according to RFC 6902.")
13533 (license license:bsd-3)))
13534
13535(define-public python2-jsonpatch
13536 (package-with-python2 python-jsonpatch))
13537
13538(define-public python-jsonpatch-0.4
13539 (package (inherit python-jsonpatch)
13540 (name "python-jsonpatch")
13541 (version "0.4")
13542 (source
13543 (origin
a9722d0d
EF
13544 (method git-fetch)
13545 (uri (git-reference
13546 (url "https://github.com/stefankoegl/python-json-patch")
13547 (commit (string-append "v" version))))
13548 (file-name (git-file-name name version))
44d10b1f
RW
13549 (sha256
13550 (base32
a9722d0d 13551 "1fq02y57kinyknxjcav0slcb0k9mwdffqw2hnlhdkpj7palh2mwk"))))))
44d10b1f
RW
13552
13553(define-public python2-jsonpatch-0.4
13554 (package-with-python2 python-jsonpatch-0.4))
13555
13556(define-public python-rfc3986
13557 (package
13558 (name "python-rfc3986")
13559 (version "1.1.0")
13560 (source (origin
13561 (method url-fetch)
13562 (uri (pypi-uri "rfc3986" version))
13563 (sha256
13564 (base32
13565 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
13566 (build-system python-build-system)
13567 (arguments
13568 `(#:modules ((guix build utils)
13569 (guix build python-build-system)
13570 (ice-9 ftw)
13571 (srfi srfi-1)
13572 (srfi srfi-26))
13573 #:phases
13574 (modify-phases %standard-phases
13575 (replace 'check
13576 (lambda _
13577 (let ((cwd (getcwd)))
13578 (setenv "PYTHONPATH"
13579 (string-append cwd "/build/"
13580 (find (cut string-prefix? "lib" <>)
13581 (scandir (string-append cwd "/build")))
13582 ":"
13583 (getenv "PYTHONPATH")))
13584 (invoke "pytest" "-v")))))))
13585 (native-inputs
13586 `(("python-pytest" ,python-pytest)))
13587 (home-page "https://rfc3986.readthedocs.io/")
13588 (synopsis "Parse and validate URI references")
13589 (description
13590 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
13591validation and authority parsing. This module also supports RFC@tie{}6874
13592which adds support for zone identifiers to IPv6 addresses.")
13593 (license license:asl2.0)))
13594
13595(define-public python2-rfc3986
13596 (package-with-python2 python-rfc3986))
13597
13598(define-public python-rfc3987
13599 (package
13600 (name "python-rfc3987")
13601 (version "1.3.7")
13602 (source
13603 (origin
13604 (method url-fetch)
13605 (uri (pypi-uri "rfc3987" version))
13606 (sha256
13607 (base32
13608 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
13609 (build-system python-build-system)
e85af137 13610 (home-page "https://pypi.org/project/rfc3987/")
44d10b1f
RW
13611 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
13612 (description "@code{rfc3987} provides routines for parsing and
13613validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
13614 (license license:gpl3+)))
13615
13616(define-public python2-rfc3987
13617 (package-with-python2 python-rfc3987))
13618
13619(define-public python-validate-email
13620 (package
13621 (name "python-validate-email")
13622 (version "1.3")
13623 (source
13624 (origin
13625 (method url-fetch)
13626 (uri (pypi-uri "validate_email" version))
13627 (sha256
13628 (base32
13629 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
13630 (build-system python-build-system)
13631 (home-page "https://github.com/syrusakbary/validate_email")
13632 (synopsis "Verifies if an email address is valid and really exists")
13633 (description "@code{validate_email} can be used to verify if an email
13634address is valid and really exists.")
13635 (license license:lgpl3+)))
13636
13637(define-public python2-validate-email
13638 (package-with-python2 python-validate-email))
13639
13640(define-public python-flex
13641 (package
13642 (name "python-flex")
13643 (version "6.10.0")
13644 (source
13645 (origin
13646 (method url-fetch)
13647 (uri (pypi-uri "flex" version))
13648 (sha256
13649 (base32
13650 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
13651 (build-system python-build-system)
13652 (propagated-inputs
13653 `(("python-click" ,python-click)
13654 ("python-iso8601" ,python-iso8601)
13655 ("python-jsonpointer" ,python-jsonpointer)
13656 ("python-pyyaml" ,python-pyyaml)
13657 ("python-requests" ,python-requests)
13658 ("python-rfc3987" ,python-rfc3987)
13659 ("python-six" ,python-six)
13660 ("python-validate-email" ,python-validate-email)))
13661 (home-page "https://github.com/pipermerriam/flex")
13662 (synopsis "Validates Swagger schemata")
13663 (description "@code{flex} can be used to validate Swagger schemata.")
13664 (license license:bsd-3)))
13665
13666(define-public python2-flex
13667 (package-with-python2 python-flex))
13668
13669(define-public python-marshmallow
13670 (package
13671 (name "python-marshmallow")
13672 (version "3.0.0b14")
13673 (source
13674 (origin
13675 (method url-fetch)
13676 (uri (pypi-uri "marshmallow" version))
13677 (sha256
13678 (base32
13679 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
13680 (build-system python-build-system)
13681 (propagated-inputs
13682 `(("python-dateutil" ,python-dateutil)
13683 ("python-simplejson" ,python-simplejson)))
13684 (native-inputs
13685 `(("python-pytest" ,python-pytest)
13686 ("python-pytz" ,python-pytz)))
13687 (home-page "https://github.com/marshmallow-code/marshmallow")
13688 (synopsis "Convert complex datatypes to and from native
13689Python datatypes.")
13690 (description "@code{marshmallow} provides a library for converting
13691complex datatypes to and from native Python datatypes.")
13692 (license license:expat)))
13693
13694(define-public python2-marshmallow
13695 (package-with-python2 python-marshmallow))
13696
13697(define-public python-apispec
13698 (package
13699 (name "python-apispec")
13700 (version "0.25.3")
13701 (source
13702 (origin
13703 (method url-fetch)
13704 (uri (pypi-uri "apispec" version))
13705 (sha256
13706 (base32
13707 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
13708 (build-system python-build-system)
13709 (propagated-inputs
13710 `(("python-pyyaml" ,python-pyyaml)))
13711 (native-inputs
13712 `(("python-pytest" ,python-pytest)
13713 ("python-flask" ,python-flask)
13714 ("python-marshmallow" ,python-marshmallow)
13715 ("python-tornado" ,python-tornado)
13716 ("python-bottle" ,python-bottle)
13717 ("python-mock" ,python-mock)))
13718 (home-page "https://github.com/marshmallow-code/apispec")
13719 (synopsis "Swagger 2.0 API specification generator")
13720 (description "@code{python-apispec} is a pluggable API specification
13721generator. Currently supports the OpenAPI specification (f.k.a.
13722Swagger 2.0).")
13723 (license license:expat)))
13724
13725(define-public python2-apispec
13726 (package-with-python2 python-apispec))
13727
13728(define-public python-flasgger
13729 (package
13730 (name "python-flasgger")
13731 (version "0.6.3")
13732 (source
13733 (origin
1a04d421
TGR
13734 (method git-fetch)
13735 (uri (git-reference
13736 (url "https://github.com/rochacbruno/flasgger.git")
13737 (commit version)))
13738 (file-name (git-file-name name version))
44d10b1f 13739 (sha256
1a04d421 13740 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
44d10b1f
RW
13741 (build-system python-build-system)
13742 (arguments
13743 `(#:phases
13744 (modify-phases %standard-phases
13745 (replace 'check
13746 (lambda* (#:key inputs outputs #:allow-other-keys)
13747 (substitute* "Makefile"
13748 (("flake8 flasgger --ignore=F403")
13749 "flake8 flasgger --ignore=E731,F403"))
13750 (setenv "PYTHONPATH" (string-append (getcwd)
13751 ":"
13752 (getenv "PYTHONPATH")))
ac599a09 13753 (invoke "py.test"))))))
44d10b1f
RW
13754 (propagated-inputs
13755 `(("python-flask" ,python-flask)
13756 ("python-pyyaml" ,python-pyyaml)
13757 ("python-jsonschema" ,python-jsonschema)
13758 ("python-mistune" ,python-mistune)
13759 ("python-six" ,python-six)))
13760 (native-inputs
13761 `(("python-decorator" ,python-decorator)
13762 ("python-flake8" ,python-flake8)
13763 ("python-flask-restful" ,python-flask-restful)
13764 ("python-flex" ,python-flex)
13765 ("python-pytest" ,python-pytest)
13766 ("python-pytest-cov" ,python-pytest-cov)
13767 ("python-marshmallow" ,python-marshmallow)
13768 ("python-apispec" ,python-apispec)))
13769 (home-page "https://github.com/rochacbruno/flasgger/")
13770 (synopsis "Extract Swagger specs from your Flask project")
13771 (description "@code{python-flasgger} allows extracting Swagger specs
13772from your Flask project. It is a fork of Flask-Swagger.")
13773 (license license:expat)))
13774
13775(define-public python2-flasgger
13776 (package-with-python2 python-flasgger))
13777
13778(define-public python-swagger-spec-validator
13779 (package
13780 (name "python-swagger-spec-validator")
fe9c5b1d 13781 (version "2.4.3")
44d10b1f
RW
13782 (source
13783 (origin
13784 (method url-fetch)
13785 (uri (pypi-uri "swagger-spec-validator" version))
13786 (sha256
13787 (base32
fe9c5b1d 13788 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
44d10b1f
RW
13789 (build-system python-build-system)
13790 (propagated-inputs
13791 `(("python-jsonschema" ,python-jsonschema)
fe9c5b1d 13792 ("python-pyyaml" ,python-pyyaml)
44d10b1f
RW
13793 ("python-six" ,python-six)))
13794 (home-page
13795 "https://github.com/Yelp/swagger_spec_validator")
13796 (synopsis "Validation of Swagger specifications")
13797 (description "@code{swagger_spec_validator} provides a library for
13798validating Swagger API specifications.")
13799 (license license:asl2.0)))
13800
13801(define-public python2-swagger-spec-validator
13802 (package-with-python2 python-swagger-spec-validator))
13803
13804(define-public python-apache-libcloud
13805 (package
13806 (name "python-apache-libcloud")
13807 (version "2.4.0")
13808 (source
13809 (origin
13810 (method url-fetch)
13811 (uri (pypi-uri "apache-libcloud" version))
13812 (sha256
13813 (base32
13814 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
13815 (build-system python-build-system)
13816 (arguments
13817 `(#:phases
13818 (modify-phases %standard-phases
13819 (add-after 'unpack 'patch-ssh
13820 (lambda* (#:key inputs #:allow-other-keys)
13821 (substitute* "libcloud/compute/ssh.py"
13822 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
13823 "/bin/ssh" "'")))
13824 #t))
13825 (add-after 'unpack 'patch-tests
13826 (lambda _
13827 (substitute* "./libcloud/test/test_file_fixtures.py"
13828 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
13829 (("def _ascii") "def _raw_data(self, method, url, body, headers):
13830 return (httplib.OK,
13831 \"1234abcd\",
13832 {\"test\": \"value\"},
13833 httplib.responses[httplib.OK])
13834 def _ascii"))
13835 (substitute* "libcloud/test/compute/test_ssh_client.py"
13836 (("class ShellOutSSHClientTests")
13837 "@unittest.skip(\"Guix container doesn't have ssh service\")
13838class ShellOutSSHClientTests")
13839 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
13840 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
13841 (("'.xF0', '.x90', '.x8D', '.x88'")
13842 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
13843 #t))
13844 (add-before 'check 'copy-secret
13845 (lambda _
13846 (copy-file "libcloud/test/secrets.py-dist"
13847 "libcloud/test/secrets.py")
13848 #t)))))
13849 (inputs
13850 `(("openssh" ,openssh)))
13851 (propagated-inputs
13852 `(("python-paramiko" ,python-paramiko)
13853 ("python-requests" ,python-requests)))
13854 (native-inputs
13855 `(("python-lockfile" ,python-lockfile)
13856 ("python-mock" ,python-mock)
13857 ("python-pytest" ,python-pytest)
13858 ("python-pytest-runner" ,python-pytest-runner)
13859 ("python-requests-mock" ,python-requests-mock)))
13860 (home-page "https://libcloud.apache.org/")
13861 (synopsis "Unified Cloud API")
13862 (description "@code{libcloud} is a Python library for interacting with
13863many of the popular cloud service providers using a unified API.")
13864 (license license:asl2.0)))
13865
13866(define-public python2-apache-libcloud
13867 (package-with-python2 python-apache-libcloud))
13868
1639e0b7 13869(define-public python-smmap
44d10b1f 13870 (package
1639e0b7
MC
13871 (name "python-smmap")
13872 (version "3.0.1")
44d10b1f
RW
13873 (source
13874 (origin
13875 (method url-fetch)
1639e0b7 13876 (uri (pypi-uri "smmap" version))
44d10b1f 13877 (sha256
1639e0b7 13878 (base32 "0ijlnv60y8f41py1wnn5n1a1i81cxd9dfpdhr0k3cgkrcbz8850p"))))
44d10b1f
RW
13879 (build-system python-build-system)
13880 (native-inputs
13881 `(("python-nosexcover" ,python-nosexcover)))
13882 (home-page "https://github.com/Byron/smmap")
13883 (synopsis "Python sliding window memory map manager")
1639e0b7 13884 (description "@code{smmap} is a pure Python implementation of a sliding
44d10b1f
RW
13885window memory map manager.")
13886 (license license:bsd-3)))
13887
1639e0b7
MC
13888(define-public python-smmap2
13889 (deprecated-package "python-smmap2" python-smmap))
13890
13891(define-public python2-smmap
13892 (package-with-python2 python-smmap))
13893
44d10b1f 13894(define-public python2-smmap2
1639e0b7 13895 (deprecated-package "python2-smmap2" python2-smmap))
44d10b1f
RW
13896
13897(define-public python-regex
13898 (package
13899 (name "python-regex")
c187c9d7 13900 (version "2019.04.14")
44d10b1f
RW
13901 (source (origin
13902 (method url-fetch)
13903 (uri (pypi-uri "regex" version))
13904 (sha256
13905 (base32
c187c9d7
BT
13906 "1a6hhfs6l6snr1z654ay6wzbmwdkmv282fzfkd5hk2d1n73y8v6m"))))
13907 ;; TODO: Fix and enable regex_test.py tests that complain about the
13908 ;; test.support module not existing.
44d10b1f
RW
13909 (build-system python-build-system)
13910 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
13911 (synopsis "Alternative regular expression module")
13912 (description "This regular expression implementation is backwards-
13913compatible with the standard @code{re} module, but offers additional
13914functionality like full case-folding for case-insensitive matches in Unicode.")
13915 (license license:psfl)))
13916
13917(define-public python2-regex
13918 (package-with-python2 python-regex))
13919
13920(define-public python2-pyopengl
13921 (package
13922 (name "python2-pyopengl")
13923 (version "3.1.0")
13924 (source
13925 (origin
13926 (method url-fetch)
13927 (uri (pypi-uri "PyOpenGL" version))
13928 (sha256
13929 (base32
13930 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
13931 (arguments
13932 `(#:python ,python-2))
13933 (build-system python-build-system)
13934 (home-page "http://pyopengl.sourceforge.net")
13935 (synopsis "Standard OpenGL bindings for Python")
13936 (description
13937 "PyOpenGL is the most common cross platform Python binding to OpenGL and
13938related APIs. The binding is created using the standard @code{ctypes}
13939library.")
13940 (license license:bsd-3)))
13941
13942(define-public python2-pyopengl-accelerate
13943 (package
13944 (inherit python2-pyopengl)
13945 (name "python2-pyopengl-accelerate")
13946 (version "3.1.0")
13947 (source
13948 (origin
13949 (method url-fetch)
13950 (uri (pypi-uri "PyOpenGL-accelerate" version))
13951 (sha256
13952 (base32
13953 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
13954 (synopsis "Acceleration code for PyOpenGL")
13955 (description
13956 "This is the Cython-coded accelerator module for PyOpenGL.")))
13957
13958(define-public python-rencode
13959 (package
13960 (name "python-rencode")
13961 (version "1.0.5")
13962 (source
13963 (origin
13964 (method url-fetch)
13965 (uri (pypi-uri "rencode" version))
13966 (sha256
13967 (base32
13968 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
13969 (build-system python-build-system)
13970 (arguments
13971 `(#:phases
13972 (modify-phases %standard-phases
13973 (add-before 'check 'delete-bogus-test
13974 ;; This test requires /home/aresch/Downloads, which is not provided by
13975 ;; the build environment.
13976 (lambda _
13977 (delete-file "rencode/t.py")
13978 #t)))))
13979 (native-inputs `(("pkg-config" ,pkg-config)
13980 ("python-cython" ,python-cython)))
13981 (home-page "https://github.com/aresch/rencode")
13982 (synopsis "Serialization of heterogeneous data structures")
13983 (description
13984 "The @code{rencode} module is a data structure serialization library,
13985similar to @code{bencode} from the BitTorrent project. For complex,
13986heterogeneous data structures with many small elements, r-encoding stake up
13987significantly less space than b-encodings. This version of rencode is a
13988complete rewrite in Cython to attempt to increase the performance over the
13989pure Python module.")
13990 (license license:bsd-3)))
13991
13992(define-public python2-rencode
13993 (package-with-python2 python-rencode))
13994
13995(define-public python-xenon
13996 (package
13997 (name "python-xenon")
8c06d6d8 13998 (version "0.7.0")
44d10b1f
RW
13999 (source
14000 (origin
14001 (method url-fetch)
14002 (uri (pypi-uri "xenon" version))
14003 (sha256
14004 (base32
8c06d6d8 14005 "0nv207ql2wmh9q62503np056c4vf1c1hlsi5cvv5p5kx574k6r2y"))))
44d10b1f
RW
14006 (build-system python-build-system)
14007 (native-inputs
14008 `(("python-pyyaml" ,python-pyyaml)
14009 ("python-radon" ,python-radon)
14010 ("python-requests" ,python-requests)
14011 ("python-flake8" ,python-flake8)
14012 ("python-tox" ,python-tox)))
14013 (arguments
8c06d6d8
MC
14014 `(#:tests? #f ;test suite not shipped with the PyPI archive
14015 #:phases
44d10b1f
RW
14016 (modify-phases %standard-phases
14017 (add-before 'build 'patch-test-requirements
14018 (lambda _
14019 ;; Remove httpretty dependency for tests.
14020 (substitute* "setup.py"
14021 (("httpretty") ""))
14022 #t)))))
14023 (home-page "https://xenon.readthedocs.org/")
14024 (synopsis "Monitor code metrics for Python on your CI server")
14025 (description
14026 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
14027Ideally, @code{xenon} is run every time code is committed. Through command
14028line options, various thresholds can be set for the complexity of code. It
14029will fail (i.e. it will exit with a non-zero exit code) when any of these
14030requirements is not met.")
14031 (license license:expat)))
14032
14033(define-public python2-xenon
14034 (package-with-python2 python-xenon))
14035
14036(define-public python-pysocks
14037 (package
14038 (name "python-pysocks")
b8725cdf 14039 (version "1.7.0")
44d10b1f
RW
14040 (source
14041 (origin
14042 (method url-fetch)
14043 (uri (pypi-uri "PySocks" version))
14044 (sha256
14045 (base32
b8725cdf 14046 "0z4p31bpqm893cf87qqgb30k7nwd8kqfjwwjm5cvxb6zbyj1w0yr"))))
44d10b1f
RW
14047 (build-system python-build-system)
14048 (arguments `(#:tests? #f))
14049 (home-page "https://github.com/Anorov/PySocks")
14050 (synopsis "SOCKS client module")
14051 (description "@code{pysocks} is an updated and semi-actively maintained
14052version of @code{SocksiPy} with bug fixes and extra features.")
14053 (license license:bsd-3)))
14054
14055(define-public python2-pysocks
14056 (package-with-python2 python-pysocks))
14057
14058(define-public python-pydiff
14059 (package
14060 (name "python-pydiff")
14061 (version "0.2")
14062 (source
14063 (origin
14064 (method url-fetch)
14065 (uri (pypi-uri "pydiff" version))
14066 (sha256
14067 (base32
14068 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
14069 (build-system python-build-system)
14070 (home-page "https://github.com/myint/pydiff")
14071 (synopsis "Library to diff two Python files at the bytecode level")
14072 (description
14073 "@code{pydiff} makes it easy to look for actual code changes while
14074ignoring formatting changes.")
14075 (license license:expat)))
14076
14077(define-public python2-pydiff
14078 (package-with-python2 python-pydiff))
14079
14080(define-public python-tqdm
14081 (package
14082 (name "python-tqdm")
14083 (version "4.19.6")
14084 (source
14085 (origin
14086 (method url-fetch)
14087 (uri (pypi-uri "tqdm" version))
14088 (sha256
14089 (base32
14090 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
14091 (build-system python-build-system)
14092 (native-inputs
14093 `(("python-flake8" ,python-flake8)
14094 ("python-nose" ,python-nose)
14095 ("python-coverage" ,python-coverage)))
14096 (home-page "https://github.com/tqdm/tqdm")
14097 (synopsis "Fast, extensible progress meter")
14098 (description
14099 "Make loops show a progress bar on the console by just wrapping any
14100iterable with @code{|tqdm(iterable)|}. Offers many options to define
14101design and layout.")
f875d76f
PL
14102 (license (list license:mpl2.0 license:expat))
14103 (properties `((python2-variant . ,(delay python2-tqdm))))))
44d10b1f
RW
14104
14105(define-public python2-tqdm
f875d76f
PL
14106 (let ((tqdm (package-with-python2
14107 (strip-python2-variant python-tqdm))))
14108 (package (inherit tqdm)
14109 (native-inputs `(("python2-functools32" ,python2-functools32)
14110 ,@(package-native-inputs tqdm))))))
44d10b1f
RW
14111
14112(define-public python-pkginfo
14113 (package
14114 (name "python-pkginfo")
14115 (version "1.4.2")
14116 (source
14117 (origin
14118 (method url-fetch)
14119 (uri (pypi-uri "pkginfo" version))
14120 (sha256
14121 (base32
14122 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
14123 (build-system python-build-system)
14124 (arguments
14125 ;; The tests are broken upstream.
14126 '(#:tests? #f))
14127 (home-page
14128 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
14129 (synopsis
14130 "Query metadatdata from sdists, bdists, and installed packages")
14131 (description
14132 "API to query the distutils metadata written in @file{PKG-INFO} inside a
14133source distriubtion (an sdist) or a binary distribution (e.g., created by
14134running bdist_egg). It can also query the EGG-INFO directory of an installed
14135distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
14136created by running @code{python setup.py develop}).")
14137 (license license:expat)))
14138
14139(define-public python2-pkginfo
14140 (package-with-python2 python-pkginfo))
14141
14142(define-public python-twine
14143 (package
14144 (name "python-twine")
14145 (version "1.9.1")
14146 (source
14147 (origin
14148 (method url-fetch)
14149 (uri (pypi-uri "twine" version))
14150 (sha256
14151 (base32
14152 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
14153 (build-system python-build-system)
14154 (propagated-inputs
14155 `(("python-tqdm" ,python-tqdm)
14156 ("python-pkginfo" ,python-pkginfo)
14157 ("python-requests" ,python-requests)
14158 ("python-requests-toolbelt" ,python-requests-toolbelt)))
14159 (home-page "https://github.com/pypa/twine")
14160 (synopsis "Collection of utilities for interacting with PyPI")
14161 (description
14162 "@code{twine} currently supports registering projects and uploading
14163distributions. It authenticates the user over HTTPS, allows them to pre-sign
14164their files and supports any packaging format (including wheels).")
14165 (license license:asl2.0)))
14166
14167(define-public python2-twine
14168 (package-with-python2 python-twine))
14169
14170(define-public python-linecache2
14171 (package
14172 (name "python-linecache2")
14173 (version "1.0.0")
14174 (source
14175 (origin
14176 (method url-fetch)
14177 (uri (pypi-uri "linecache2" version))
14178 (sha256
14179 (base32
14180 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
14181 (build-system python-build-system)
14182 (arguments
14183 `(;; The tests depend on unittest2, and our version is a bit too old.
14184 #:tests? #f))
14185 (native-inputs
14186 `(("python-pbr" ,python-pbr-minimal)))
14187 (home-page
14188 "https://github.com/testing-cabal/linecache2")
14189 (synopsis "Backports of the linecache module")
14190 (description
14191 "The linecache module allows one to get any line from any file, while
14192attempting to optimize internally, using a cache, the common case where many
14193lines are read from a single file.")
14194 (license license:psfl)))
14195
14196(define-public python2-linecache2
14197 (package-with-python2 python-linecache2))
14198
14199(define-public python-traceback2
14200 (package
14201 (name "python-traceback2")
14202 (version "1.4.0")
14203 (source
14204 (origin
14205 (method url-fetch)
14206 (uri (pypi-uri "traceback2" version))
14207 (sha256
14208 (base32
14209 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
14210 (build-system python-build-system)
14211 (arguments
14212 `(;; python-traceback2 and python-unittest2 depend on one another.
14213 #:tests? #f))
14214 (native-inputs
14215 `(("python-pbr" ,python-pbr-minimal)))
14216 (propagated-inputs
14217 `(("python-linecache2" ,python-linecache2)))
14218 (home-page
14219 "https://github.com/testing-cabal/traceback2")
14220 (synopsis "Backports of the traceback module")
14221 (description
14222 "This module provides a standard interface to extract, format and print
14223stack traces of Python programs. It exactly mimics the behavior of the Python
14224interpreter when it prints a stack trace.")
14225 (license license:psfl)))
14226
14227(define-public python2-traceback2
14228 (package-with-python2 python-traceback2))
14229
14230(define-public python-ratelimiter
14231 (package
14232 (name "python-ratelimiter")
14233 (version "1.2.0")
14234 (source
14235 (origin
14236 (method url-fetch)
14237 (uri (pypi-uri "ratelimiter" version))
14238 (sha256
14239 (base32
14240 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
14241 (build-system python-build-system)
14242 (arguments
14243 '(#:tests? #f)) ; There are no tests in the pypi archive.
14244 (home-page "https://github.com/RazerM/ratelimiter")
14245 (synopsis "Simple rate limiting object")
14246 (description
14247 "The @code{ratelimiter} module ensures that an operation will not be
14248executed more than a given number of times during a given period.")
14249 (license license:asl2.0)))
14250
14251(define-public python2-ratelimiter
14252 (package-with-python2 python-ratelimiter))
14253
14254(define-public python-dukpy
14255 (package
14256 (name "python-dukpy")
14257 (version "0.3")
14258 (source
14259 (origin
5b77ebe1
TGR
14260 (method git-fetch)
14261 (uri (git-reference
14262 (url "https://github.com/kovidgoyal/dukpy.git")
14263 (commit (string-append "v" version))))
14264 (file-name (git-file-name name version))
44d10b1f 14265 (sha256
5b77ebe1 14266 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
44d10b1f
RW
14267 (build-system python-build-system)
14268 (home-page "https://github.com/kovidgoyal/dukpy")
14269 (synopsis "Run JavaScript in python")
14270 (description
14271 "dukpy is a JavaScript runtime environment for Python using the duktape
14272embeddable JavaScript engine.")
14273 ;; Dukpy is licensed under MIT like the embedded duktape library,
14274 ;; with 'errors.c' as GPL3.
14275 (license (list license:expat license:gpl3))))
14276
14277(define-public python2-dukpy
14278 (package-with-python2 python-dukpy))
14279
14280(define-public python-jsonrpclib-pelix
14281 (package
14282 (name "python-jsonrpclib-pelix")
14283 (version "0.3.2")
14284 (source
14285 (origin
14286 (method url-fetch)
14287 (uri (pypi-uri "jsonrpclib-pelix" version))
14288 (sha256
14289 (base32
14290 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
14291 (build-system python-build-system)
14292 (arguments
14293 `(#:tests? #f)) ; no tests in PyPI tarball
14294 (home-page "https://github.com/tcalmant/jsonrpclib/")
14295 (synopsis "JSON-RPC 2.0 client library for Python")
14296 (description
14297 "This library implements the JSON-RPC v2.0
14298specification (backwards-compatible) as a client library for Python. This
14299version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
14300services.")
14301 (license license:asl2.0)))
14302
14303(define-public python2-jsonrpclib-pelix
14304 (package-with-python2 python-jsonrpclib-pelix))
14305
14306(define-public python-setuptools-scm-git-archive
14307 (package
14308 (name "python-setuptools-scm-git-archive")
14309 (version "1.0")
14310 (source
14311 (origin
14312 (method url-fetch)
14313 (uri (pypi-uri "setuptools_scm_git_archive" version))
14314 (sha256
14315 (base32
14316 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
14317 (build-system python-build-system)
14318 (native-inputs
14319 `(("python-pytest" ,python-pytest)))
14320 (propagated-inputs
14321 `(("python-setuptools-scm" ,python-setuptools-scm)))
14322 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
14323 (synopsis "Setuptools_scm plugin for git archives")
14324 (description
14325 "The setuptools_scm_git_archive package is a plugin to
14326setuptools_scm, which supports obtaining versions from git archives that
14327belong to tagged versions.")
14328 (license license:expat)))
14329
14330(define-public python2-setuptools-scm-git-archive
14331 (package-with-python2 python-setuptools-scm-git-archive))
14332
724a350c
RW
14333(define-public python-setuptools-git
14334 (package
14335 (name "python-setuptools-git")
14336 (version "1.2")
14337 (source
14338 (origin
14339 (method url-fetch)
14340 (uri (pypi-uri "setuptools-git" version))
14341 (sha256
14342 (base32
14343 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
14344 (build-system python-build-system)
14345 (arguments
14346 `(#:phases
14347 (modify-phases %standard-phases
14348 ;; This is needed for tests.
14349 (add-after 'unpack 'configure-git
14350 (lambda _
14351 (setenv "HOME" "/tmp")
14352 (invoke "git" "config" "--global" "user.email" "guix")
14353 (invoke "git" "config" "--global" "user.name" "guix")
14354 #t)))))
14355 (native-inputs
14356 `(("git" ,git-minimal)))
14357 (home-page "https://github.com/msabramo/setuptools-git")
14358 (synopsis "Setuptools revision control system plugin for Git")
14359 (description
14360 "This package provides a plugin for Setuptools for revision control with
14361Git.")
14362 (license license:bsd-3)))
14363
44d10b1f
RW
14364(define-public python-pyclipper
14365 (package
14366 (name "python-pyclipper")
ff3d1b99 14367 (version "1.1.0.post3")
44d10b1f
RW
14368 (source
14369 (origin
14370 (method url-fetch)
14371 (uri (pypi-uri "pyclipper" version ".zip"))
14372 (sha256
ff3d1b99 14373 (base32 "164yksvqwqvwzh8f8lq92asg87hd8rvcy2xb5vm4y4ccvd5xgb7i"))
44d10b1f
RW
14374 (modules '((guix build utils)))
14375 (snippet
14376 '(begin
14377 ;; This file is generated by Cython.
14378 (delete-file "pyclipper/pyclipper.cpp") #t))))
14379 (build-system python-build-system)
14380 (arguments
14381 `(#:phases
14382 (modify-phases %standard-phases
14383 (add-before 'build 'cythonize-sources
14384 (lambda _
14385 (with-directory-excursion "pyclipper"
14386 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
14387 (propagated-inputs
14388 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
14389 (native-inputs
14390 `(("python-cython" ,python-cython)
14391 ("python-pytest" ,python-pytest)
14392 ("python-pytest-runner" ,python-pytest-runner)
14393 ("python-unittest2" ,python-unittest2)
14394 ("unzip" ,unzip)))
14395 (home-page "https://github.com/greginvm/pyclipper")
14396 (synopsis "Wrapper for Angus Johnson's Clipper library")
14397 (description
14398 "Pyclipper is a Cython wrapper for the C++ translation of the
14399Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
14400 (license license:expat)))
14401
14402(define-public python2-pyclipper
14403 (package-with-python2 python-pyclipper))
14404
14405(define-public python2-booleanoperations
14406 (package
14407 (name "python2-booleanoperations")
14408 (version "0.7.1")
14409 (source
14410 (origin
14411 (method url-fetch)
14412 (uri (pypi-uri "booleanOperations" version ".zip"))
14413 (sha256
14414 (base32
14415 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
14416 (build-system python-build-system)
14417 (arguments
14418 `(#:python ,python-2))
14419 (native-inputs
14420 `(("unzip" ,unzip)
14421 ("python2-pytest" ,python2-pytest)
14422 ("python2-pytest-runner" ,python2-pytest-runner)))
14423 (propagated-inputs
14424 `(("python-fonttools" ,python2-fonttools)
14425 ("python-pyclipper" ,python2-pyclipper)
14426 ("python-ufolib" ,python2-ufolib)))
14427 (home-page "https://github.com/typemytype/booleanOperations")
14428 (synopsis "Boolean operations on paths")
14429 (description
14430 "BooleanOperations provides a Python library that enables
14431boolean operations on paths.")
14432 (license license:expat)))
14433
14434(define-public python-tempdir
14435 (package
14436 (name "python-tempdir")
14437 (version "0.7.1")
14438 (source
14439 (origin
14440 (method url-fetch)
14441 (uri (pypi-uri "tempdir" version))
14442 (sha256
14443 (base32
14444 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
14445 (build-system python-build-system)
14446 (home-page "https://pypi.org/project/tempdir/")
14447 (arguments
14448 ;; the package has no tests
14449 '(#:tests? #f))
14450 (synopsis "Python library for managing temporary directories")
14451 (description
14452 "This library manages temporary directories that are automatically
14453deleted with all their contents when they are no longer needed. It is
14454particularly convenient for use in tests.")
14455 (license license:expat)))
14456
14457(define-public python2-tempdir
14458 (package-with-python2 python-tempdir))
14459
14460(define-public python-activepapers
14461 (package
14462 (name "python-activepapers")
14463 (version "0.2.2")
14464 (source
14465 (origin
14466 (method url-fetch)
14467 (uri (pypi-uri "ActivePapers.Py" version))
14468 (sha256
14469 (base32
14470 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
14471 (build-system python-build-system)
14472 (arguments
14473 `(#:modules ((ice-9 ftw)
14474 (srfi srfi-1)
14475 (guix build utils)
14476 (guix build python-build-system))
14477
14478 #:phases
14479 (modify-phases %standard-phases
14480 (add-after 'unpack 'delete-python2-code
14481 (lambda _
14482 (for-each delete-file
14483 '("lib/activepapers/builtins2.py"
14484 "lib/activepapers/standardlib2.py"
14485 "lib/activepapers/utility2.py"))))
14486 (replace 'check
14487 (lambda _
14488 ;; Deactivate the test cases that download files
14489 (setenv "NO_NETWORK_ACCESS" "1")
14490 ;; For some strange reason, some tests fail if nosetests runs all
14491 ;; test modules in a single execution. They pass if each test
14492 ;; module is run individually.
14493 (for-each (lambda (filename)
14494 (invoke "nosetests"
14495 (string-append "tests/" filename)))
14496 (scandir "tests"
14497 (lambda (filename)
14498 (string-suffix? ".py" filename)))))))))
14499 (native-inputs
14500 `(("python-tempdir" ,python-tempdir)
14501 ("python-nose" ,python-nose)))
14502 (propagated-inputs
14503 `(("python-h5py" ,python-h5py)))
26827dfe 14504 (home-page "https://www.activepapers.org/")
44d10b1f
RW
14505 (synopsis "Executable papers for scientific computing")
14506 (description
14507 "ActivePapers is a tool for working with executable papers, which
14508combine data, code, and documentation in single-file packages,
14509suitable for publication as supplementary material or on repositories
14510such as figshare or Zenodo.")
14511 (properties `((python2-variant . ,(delay python2-activepapers))))
14512 (license license:bsd-3)))
14513
14514(define-public python2-activepapers
14515 (let ((base (package-with-python2
14516 (strip-python2-variant python-activepapers))))
14517 (package
14518 (inherit base)
14519 (arguments
14520 (substitute-keyword-arguments (package-arguments base)
14521 ((#:phases phases)
14522 `(modify-phases ,phases
14523 (delete 'delete-python2-code)
14524 (add-after 'unpack 'delete-python3-code
14525 (lambda _
14526 (for-each delete-file
14527 '("lib/activepapers/builtins3.py"
14528 "lib/activepapers/standardlib3.py"
14529 "lib/activepapers/utility3.py")))))))))))
14530
14531(define-public python-semver
14532 (package
14533 (name "python-semver")
594280b1 14534 (version "2.9.0")
44d10b1f 14535 (source
2ecbba24
BG
14536 (origin
14537 (method url-fetch)
14538 (uri (pypi-uri "semver" version))
14539 (sha256
14540 (base32
14541 "183kg1rhzz3hqizvphkd8hlbf1zxfx8737zhfkmqzxi71jmdw7pd"))))
44d10b1f 14542 (build-system python-build-system)
44d10b1f
RW
14543 (native-inputs
14544 `(("python-tox" ,python-tox)
14545 ("python-virtualenv" ,python-virtualenv)))
14546 (home-page "https://github.com/k-bx/python-semver")
14547 (synopsis "Python helper for Semantic Versioning")
14548 (description "This package provides a Python library for
14549@url{Semantic Versioning, http://semver.org/}.")
14550 (license license:bsd-3)))
14551
14552(define-public python2-semver
14553 (package-with-python2 python-semver))
14554
14555(define-public python-pyro4
14556 (package
14557 (name "python-pyro4")
3ce91d44 14558 (version "4.77")
44d10b1f
RW
14559 (source
14560 (origin
14561 (method url-fetch)
14562 (uri (pypi-uri "Pyro4" version))
14563 (sha256
3ce91d44 14564 (base32 "0gsjg869y4gpy265s1gj1f2qy6jn5iz8r2bwwnq78r1r5yi15zib"))))
44d10b1f 14565 (build-system python-build-system)
3ce91d44
GL
14566 (arguments
14567 '(#:tests? #f)) ;FIXME: Some tests require network access.
14568 (native-inputs
14569 `(("python-cloudpickle" ,python-cloudpickle)
14570 ("python-dill" ,python-dill)
14571 ("python-msgpack" ,python-msgpack)))
44d10b1f
RW
14572 (propagated-inputs
14573 `(("python-serpent" ,python-serpent)))
14574 (home-page "https://pyro4.readthedocs.io")
14575 (synopsis "Distributed object middleware for Python")
14576 (description
14577 "Pyro enables you to build applications in which objects can talk to each
14578other over the network. You can just use normal Python method calls to call
14579objects on other machines, also known as remote procedure calls (RPC).")
14580 (license license:expat)))
14581
14582(define-public python2-pyro
14583 (package
14584 (name "python2-pyro")
14585 (version "3.16")
14586 (source
14587 (origin
14588 (method url-fetch)
14589 (uri (pypi-uri "Pyro" version))
14590 (file-name (string-append "Pyro-" version ".tar.gz"))
14591 (sha256
14592 (base32
14593 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
14594 (build-system python-build-system)
14595 (arguments
14596 ;; Pyro is not compatible with Python 3
14597 `(#:python ,python-2
14598 ;; Pyro has no test cases for automatic execution
14599 #:tests? #f))
14600 (home-page "http://pythonhosted.org/Pyro/")
14601 (synopsis "Distributed object manager for Python")
14602 (description "Pyro is a Distributed Object Technology system
14603written in Python that is designed to be easy to use. It resembles
14604Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
14605which is a system and language independent Distributed Object Technology
14606and has much more to offer than Pyro or RMI. Pyro 3.x is no
14607longer maintained. New projects should use Pyro4 instead, which
14608is the new Pyro version that is actively developed.")
14609 (license license:expat)))
14610
14611(define-public python2-scientific
14612 (package
14613 (name "python2-scientific")
14614 (version "2.9.4")
14615 (source
14616 (origin
c695f011
KH
14617 (method git-fetch)
14618 (uri (git-reference
14619 (url "https://github.com/khinsen/ScientificPython")
14620 (commit (string-append "rel" version))))
14621 (file-name (git-file-name name version))
44d10b1f
RW
14622 (sha256
14623 (base32
c695f011 14624 "16l48aj9fps9r7jyk8gpxppwrv0fqvlc13sayxskz28r5s6sjwbl"))))
44d10b1f
RW
14625 (build-system python-build-system)
14626 (inputs
14627 `(("netcdf" ,netcdf)))
14628 (propagated-inputs
14629 `(("python-numpy" ,python2-numpy-1.8)
14630 ("python-pyro" ,python2-pyro)))
14631 (arguments
14632 ;; ScientificPython is not compatible with Python 3
14633 `(#:python ,python-2
14634 #:tests? #f ; No test suite
14635 #:phases
14636 (modify-phases %standard-phases
14637 (replace 'build
14638 (lambda* (#:key inputs #:allow-other-keys)
77e61e25
RW
14639 (invoke "python" "setup.py" "build"
14640 (string-append "--netcdf_prefix="
14641 (assoc-ref inputs "netcdf"))))))))
c695f011 14642 (home-page "http://dirac.cnrs-orleans.fr/ScientificPython")
44d10b1f
RW
14643 (synopsis "Python modules for scientific computing")
14644 (description "ScientificPython is a collection of Python modules that are
14645useful for scientific computing. Most modules are rather general (Geometry,
14646physical units, automatic derivatives, ...) whereas others are more
14647domain-specific (e.g. netCDF and PDB support). The library is currently
14648not actively maintained and works only with Python 2 and NumPy < 1.9.")
14649 (license license:cecill-c)))
14650
14651(define-public python2-mmtk
14652 (package
14653 (name "python2-mmtk")
fe9b72c5 14654 (version "2.7.12")
44d10b1f
RW
14655 (source
14656 (origin
fe9b72c5
KH
14657 (method git-fetch)
14658 (uri (git-reference
14659 (url "https://github.com/khinsen/MMTK")
14660 (commit (string-append "rel" version))))
14661 (file-name (git-file-name name version))
44d10b1f
RW
14662 (sha256
14663 (base32
fe9b72c5 14664 "1fqwh3ba9jd42nigvn5shndgwb1zy7kh9520ncvqci7n8ffjr6p1"))))
44d10b1f
RW
14665 (build-system python-build-system)
14666 (native-inputs
14667 `(("netcdf" ,netcdf)))
14668 (propagated-inputs
14669 `(("python-scientific" ,python2-scientific)
14670 ("python-tkinter" ,python-2 "tk")))
14671 (arguments
14672 `(#:python ,python-2
14673 #:tests? #f
14674 #:phases
14675 (modify-phases %standard-phases
14676 (add-before 'build 'includes-from-scientific
14677 (lambda* (#:key inputs #:allow-other-keys)
14678 (mkdir-p "Include/Scientific")
14679 (copy-recursively
14680 (string-append
14681 (assoc-ref inputs "python-scientific")
14682 "/include/python2.7/Scientific")
14683 "Include/Scientific"))))))
14684 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
14685 (synopsis "Python library for molecular simulation")
14686 (description "MMTK is a library for molecular simulations with an emphasis
14687on biomolecules. It provides widely used methods such as Molecular Dynamics
14688and normal mode analysis, but also basic routines for implementing new methods
14689for simulation and analysis. The library is currently not actively maintained
14690and works only with Python 2 and NumPy < 1.9.")
14691 (license license:cecill-c)))
14692
14693(define-public python-phonenumbers
14694 (package
14695 (name "python-phonenumbers")
14696 (version "8.9.1")
14697 (source
14698 (origin
14699 (method url-fetch)
14700 (uri (pypi-uri "phonenumbers" version))
14701 (sha256
14702 (base32
14703 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
14704 (build-system python-build-system)
14705 (home-page
14706 "https://github.com/daviddrysdale/python-phonenumbers")
14707 (synopsis
14708 "Python library for dealing with international phone numbers")
14709 (description
14710 "This package provides a Python port of Google's libphonenumber library.")
14711 (license license:asl2.0)))
14712
14713(define-public python2-phonenumbers
14714 (package-with-python2 python-phonenumbers))
14715
14716(define-public python-send2trash
14717 (package
14718 (name "python-send2trash")
d9b0216b 14719 (version "1.5.0")
44d10b1f 14720 (source
d9b0216b 14721 (origin (method git-fetch)
44d10b1f 14722 ;; Source tarball on PyPI doesn't include tests.
d9b0216b
RW
14723 (uri (git-reference
14724 (url "https://github.com/hsoft/send2trash.git")
14725 (commit version)))
14726 (file-name (git-file-name name version))
44d10b1f
RW
14727 (sha256
14728 (base32
d9b0216b 14729 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
44d10b1f
RW
14730 (build-system python-build-system)
14731 (arguments
14732 '(#:phases
14733 (modify-phases %standard-phases
14734 (add-before 'check 'pre-check
14735 (lambda _
14736 (mkdir-p "/tmp/foo")
14737 (setenv "HOME" "/tmp/foo")
14738 #t)))))
14739 (home-page "https://github.com/hsoft/send2trash")
14740 (synopsis "Send files to the user's @file{~/Trash} directory")
14741 (description "This package provides a Python library to send files to the
14742user's @file{~/Trash} directory.")
20b3fde7 14743 (properties `((python2-variant . ,(delay python2-send2trash))))
44d10b1f
RW
14744 (license license:bsd-3)))
14745
14746(define-public python2-send2trash
14747 (package
f32164ab 14748 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
44d10b1f
RW
14749 (arguments
14750 (substitute-keyword-arguments (package-arguments python-send2trash)
14751 ((#:phases phases)
14752 `(modify-phases ,phases
14753 (add-before 'check 'setenv
14754 (lambda _
14755 (setenv "PYTHONPATH"
14756 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
4782a06f 14757 #t))))))))
44d10b1f
RW
14758
14759(define-public python-yapf
14760 (package
14761 (name "python-yapf")
19ba75dc 14762 (version "0.29.0")
44d10b1f
RW
14763 (source
14764 (origin
14765 (method url-fetch)
14766 (uri (pypi-uri "yapf" version))
14767 (sha256
14768 (base32
19ba75dc 14769 "1pj3xzblmbssshi889b6n9hwqbjpabw6j0fimlng2sshd3226bki"))))
44d10b1f
RW
14770 (build-system python-build-system)
14771 (home-page "https://github.com/google/yapf")
14772 (synopsis "Formatter for Python code")
14773 (description "YAPF is a formatter for Python code. It's based off of
14774@dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
14775takes the code and reformats it to the best formatting that conforms to the
14776style guide, even if the original code didn't violate the style guide.")
14777 (license license:asl2.0)))
14778
14779(define-public python2-yapf
14780 (package-with-python2 python-yapf))
14781
14782(define-public python-gyp
14783 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
14784 (revision "0"))
14785 (package
14786 (name "python-gyp")
14787 ;; Google does not release versions,
14788 ;; based on second most recent commit date.
14789 (version (git-version "0.0.0" revision commit))
14790 (source
14791 (origin
14792 ;; Google does not release tarballs,
14793 ;; git checkout is needed.
14794 (method git-fetch)
14795 (uri (git-reference
14796 (url "https://chromium.googlesource.com/external/gyp")
14797 (commit commit)))
14798 (file-name (git-file-name name version))
14799 (sha256
14800 (base32
14801 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
14802 (build-system python-build-system)
14803 (home-page "https://gyp.gsrc.io/")
14804 (synopsis "GYP is a Meta-Build system")
14805 (description
14806 "GYP builds build systems for large, cross platform applications.
14807It can be used to generate XCode projects, Visual Studio projects, Ninja build
14808files, and Makefiles.")
14809 (license license:bsd-3))))
14810
14811(define-public python2-gyp
14812 (package-with-python2 python-gyp))
14813
14814(define-public python-whatever
14815 (package
14816 (name "python-whatever")
97610a66 14817 (version "0.6")
44d10b1f
RW
14818 (source
14819 (origin
ac0ea38c
EF
14820 (method git-fetch)
14821 (uri (git-reference
14822 (url "https://github.com/Suor/whatever")
14823 (commit version)))
14824 (file-name (git-file-name name version))
44d10b1f 14825 (sha256
ac0ea38c 14826 (base32 "1q7ajgqjfivxqsqgnhp4lc4p6jxyh4zprcsdbpd6dw54inaf0av5"))))
44d10b1f
RW
14827 (build-system python-build-system)
14828 (arguments
14829 `(#:phases
14830 (modify-phases %standard-phases
14831 (replace 'check
14832 (lambda _
14833 (invoke "py.test"))))))
14834 (native-inputs
14835 `(("python-pytest" ,python-pytest)))
14836 (home-page "http://github.com/Suor/whatever")
14837 (synopsis "Make anonymous functions by partial application of operators")
14838 (description "@code{whatever} provides an easy way to make anonymous
14839functions by partial application of operators.")
14840 (license license:bsd-3)))
14841
14842(define-public python2-whatever
14843 (package-with-python2 python-whatever))
14844
14845(define-public python-funcy
14846 (package
14847 (name "python-funcy")
9e396ab8 14848 (version "1.11")
44d10b1f
RW
14849 (source
14850 (origin
a85c6027
TGR
14851 (method git-fetch)
14852 (uri (git-reference
14853 (url "https://github.com/Suor/funcy.git")
14854 (commit version)))
44d10b1f 14855 (sha256
a85c6027
TGR
14856 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
14857 (file-name (git-file-name name version))))
44d10b1f
RW
14858 (build-system python-build-system)
14859 (arguments
14860 `(#:phases
14861 (modify-phases %standard-phases
14862 (replace 'check
14863 (lambda _
14864 (invoke "py.test"))))))
14865 (native-inputs
14866 `(("python-pytest" ,python-pytest)
14867 ("python-whatever" ,python-whatever)))
14868 (home-page "http://github.com/Suor/funcy")
14869 (synopsis "Functional tools")
14870 (description "@code{funcy} is a library that provides functional tools.
14871Examples are:
14872@enumerate
14873@item merge - Merges collections of the same type
14874@item walk - Type-preserving map
14875@item select - Selects a part of a collection
14876@item take - Takes the first n items of a collection
14877@item first - Takes the first item of a collection
14878@item remove - Predicated-removes items of a collection
14879@item concat - Concatenates two collections
14880@item flatten - Flattens a collection with subcollections
14881@item distinct - Returns only distinct items
14882@item split - Predicated-splits a collection
14883@item split_at - Splits a collection at a given item
14884@item group_by - Groups items by group
14885@item pairwise - Pairs off adjacent items
14886@item partial - Partially-applies a function
14887@item curry - Curries a function
14888@item compose - Composes functions
14889@item complement - Complements a predicate
14890@item all_fn - \"all\" with predicate
14891@end enumerate")
14892 (license license:bsd-3)))
14893
14894(define-public python2-funcy
14895 (package-with-python2 python-funcy))
14896
14897(define-public python-isoweek
14898 (package
14899 (name "python-isoweek")
14900 (version "1.3.3")
14901 (source
14902 (origin
14903 (method url-fetch)
14904 (uri (pypi-uri "isoweek" version))
14905 (sha256
14906 (base32
14907 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
14908 (build-system python-build-system)
14909 (home-page "https://github.com/gisle/isoweek")
14910 (synopsis "Objects representing a week")
14911 (description "The @code{isoweek} module provide the class Week that
14912implements the week definition of ISO 8601. This standard also defines
14913a notation for identifying weeks; yyyyWww (where the W is a literal).
14914Week instances stringify to this form.")
14915 (license license:bsd-3)))
14916
14917(define-public python2-isoweek
14918 (package-with-python2 python-isoweek))
14919
14920(define-public python-tokenize-rt
14921 (package
14922 (name "python-tokenize-rt")
14923 (version "2.0.1")
14924 (source
14925 (origin
14926 (method url-fetch)
14927 (uri (pypi-uri "tokenize-rt" version))
14928 (sha256
14929 (base32
14930 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
14931 (build-system python-build-system)
14932 (home-page "https://github.com/asottile/tokenize-rt")
14933 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
14934 (description
14935 "This Python library is a wrapper around @code{tokenize} from the Python
14936standard library. It provides two additional tokens @code{ESCAPED_NL} and
14937@code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
14938and @code{tokens_to_src} to roundtrip.")
14939 (license license:expat)))
14940
14941(define-public python-future-fstrings
14942 (package
14943 (name "python-future-fstrings")
14944 (version "0.4.1")
14945 (source
14946 (origin
14947 (method url-fetch)
14948 (uri (pypi-uri "future_fstrings" version))
14949 (sha256
14950 (base32
14951 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
14952 (build-system python-build-system)
14953 (propagated-inputs
14954 `(("python-tokenize-rt" ,python-tokenize-rt)))
14955 (home-page "https://github.com/asottile/future-fstrings")
14956 (synopsis "Backport of fstrings to Python < 3.6")
14957 (description
14958 "This package provides a UTF-8 compatible encoding
14959@code{future_fstrings}, which performs source manipulation. It decodes the
14960source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
14961@code{f} strings.")
14962 (license license:expat)))
14963
dae2eb1c
MC
14964(define-public python-typed-ast
14965 (package
14966 (name "python-typed-ast")
bae89583 14967 (version "1.4.0")
dae2eb1c
MC
14968 (source
14969 (origin
bae89583
MO
14970 (method git-fetch)
14971 (uri (git-reference
14972 (url "https://github.com/python/typed_ast.git")
14973 (commit version)))
dae2eb1c 14974 (sha256
bae89583
MO
14975 (base32 "0l0hz809f7i356kmqkvfsaswiidb98j9hs9rrjnfawzqcbffzgyb"))
14976 (file-name (git-file-name name version))))
dae2eb1c
MC
14977 (build-system python-build-system)
14978 (arguments
14979 `(#:modules ((guix build utils)
14980 (guix build python-build-system)
14981 (ice-9 ftw)
14982 (srfi srfi-1)
14983 (srfi srfi-26))
14984 #:phases
14985 (modify-phases %standard-phases
14986 (replace 'check
14987 (lambda _
14988 (let ((cwd (getcwd)))
14989 (setenv "PYTHONPATH"
14990 (string-append cwd "/build/"
14991 (find (cut string-prefix? "lib" <>)
14992 (scandir (string-append cwd "/build")))
14993 ":"
14994 (getenv "PYTHONPATH"))))
14995 (invoke "pytest")
14996 #t)))))
14997 (native-inputs `(("python-pytest" ,python-pytest)))
14998 (home-page "https://github.com/python/typed_ast")
14999 (synopsis "Fork of Python @code{ast} modules with type comment support")
15000 (description "This package provides a parser similar to the standard
15001@code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
15002include PEP 484 type comments and are independent of the version of Python
15003under which they are run. The @code{typed_ast} parsers produce the standard
15004Python AST (plus type comments), and are both fast and correct, as they are
15005based on the CPython 2.7 and 3.7 parsers.")
15006 ;; See the file "LICENSE" for the details.
15007 (license (list license:psfl
15008 license:asl2.0
15009 license:expat)))) ;ast27/Parser/spark.py
15010
44d10b1f
RW
15011(define-public python-typing
15012 (package
15013 (name "python-typing")
15014 (version "3.6.6")
15015 (source
15016 (origin
15017 (method url-fetch)
15018 (uri (pypi-uri "typing" version))
15019 (sha256
15020 (base32
15021 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
15022 (build-system python-build-system)
15023 (home-page "https://docs.python.org/3/library/typing.html")
15024 (synopsis "Type hints for Python")
15025 (description "This is a backport of the standard library @code{typing}
15026module to Python versions older than 3.5. Typing defines a standard notation
15027for Python function and variable type annotations. The notation can be used
15028for documenting code in a concise, standard format, and it has been designed
15029to also be used by static and runtime type checkers, static analyzers, IDEs
15030and other tools.")
15031 (license license:psfl)))
15032
15033(define-public python2-typing
15034 (package-with-python2 python-typing))
15035
f89d443b
VC
15036(define-public python-typing-extensions
15037 (package
15038 (name "python-typing-extensions")
15039 (version "3.7.2")
15040 (source
15041 (origin
15042 (method url-fetch)
15043 (uri (pypi-uri "typing_extensions" version))
15044 (sha256
15045 (base32
15046 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
15047 (build-system python-build-system)
15048 (home-page
15049 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
15050 (synopsis "Experimental type hints for Python")
15051 (description
15052 "The typing_extensions module contains additional @code{typing} hints not
15053yet present in the of the @code{typing} standard library.
15054Included are implementations of:
15055@enumerate
15056@item ClassVar
15057@item ContextManager
15058@item Counter
15059@item DefaultDict
15060@item Deque
15061@item NewType
15062@item NoReturn
15063@item overload
15064@item Protocol
15065@item runtime
15066@item Text
15067@item Type
15068@item TYPE_CHECKING
15069@item AsyncGenerator
15070@end enumerate\n")
15071 (license license:psfl)))
15072
44d10b1f
RW
15073(define-public bpython
15074 (package
15075 (name "bpython")
4de93b2f 15076 (version "0.18")
44d10b1f
RW
15077 (source
15078 (origin
15079 (method url-fetch)
15080 (uri (pypi-uri "bpython" version))
15081 (sha256
4de93b2f 15082 (base32 "1hl6frgvr2lqaxqczl8amg9xih32b3gzv429vs0qrjb8wpdj1k2n"))))
44d10b1f
RW
15083 (build-system python-build-system)
15084 (arguments
15085 `(#:phases
15086 (modify-phases %standard-phases
15087 (add-after 'unpack 'remove-failing-test
15088 (lambda _
15089 ;; Remove failing test. FIXME: make it pass
15090 (delete-file "bpython/test/test_args.py")
15091 #t))
15092 (add-after 'wrap 'add-aliases
15093 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
15094 (lambda* (#:key outputs #:allow-other-keys)
15095 (let ((out (assoc-ref outputs "out")))
15096 (for-each
15097 (lambda (old new)
15098 (symlink old (string-append out "/bin/" new)))
15099 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
15100 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
15101 #t)))))
15102 (propagated-inputs
15103 `(("python-pygments" ,python-pygments)
15104 ("python-requests" ,python-requests)
4de93b2f 15105 ("python-babel" ,python-babel) ; optional, for internationalization
44d10b1f
RW
15106 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
15107 ("python-greenlet" ,python-greenlet)
4de93b2f 15108 ("python-urwid" ,python-urwid) ; for bpython-urwid only
44d10b1f
RW
15109 ("python-six" ,python-six)))
15110 (native-inputs
15111 `(("python-sphinx" ,python-sphinx)
15112 ("python-mock" ,python-mock)))
15113 (home-page "https://bpython-interpreter.org/")
15114 (synopsis "Fancy interface to the Python interpreter")
15115 (description "Bpython is a fancy interface to the Python
15116interpreter. bpython's main features are
15117
15118@enumerate
15119@item in-line syntax highlighting,
15120@item readline-like autocomplete with suggestions displayed as you type,
15121@item expected parameter list for any Python function,
15122@item \"rewind\" function to pop the last line of code from memory and
15123 re-evaluate,
15124@item send the code you've entered off to a pastebin,
15125@item save the code you've entered to a file, and
15126@item auto-indentation.
15127@end enumerate")
15128 (license license:expat)))
15129
15130(define-public bpython2
15131 (let ((base (package-with-python2
15132 (strip-python2-variant bpython))))
15133 (package (inherit base)
15134 (name "bpython2")
15135 (arguments
15136 `(#:python ,python-2
15137 #:phases
15138 (modify-phases %standard-phases
15139 (add-after 'unpack 'remove-failing-test
15140 (lambda _
15141 ;; Remove failing test. FIXME: make it pass
15142 (delete-file "bpython/test/test_args.py")
15143 ;; Disable failing test-cases (renaming inhibits they are
15144 ;; discovered)
15145 (substitute* "bpython/test/test_curtsies_repl.py"
15146 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
15147 (string-append a "xxx_off_" b))
15148 (("^(\\s*def )(test_complex\\W)" _ a b)
15149 (string-append a "xxx_off_" b)))
15150 #t))
15151 (add-before 'build 'rename-scripts
15152 ;; rename the scripts to bypthon2, bpdb2, etc.
15153 (lambda _
15154 (substitute* "setup.py"
15155 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
15156 (string-append name "2" rest "\n"))
15157 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
15158 (string-append name "2" (or sub "") rest "\n")))
15159 #t))))))))
15160
15161(define-public python-pyinotify
15162 (package
15163 (name "python-pyinotify")
15164 (version "0.9.6")
15165 (source (origin
15166 (method url-fetch)
15167 (uri (pypi-uri "pyinotify" version))
15168 (sha256
15169 (base32
15170 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
15171 (build-system python-build-system)
15172 (arguments `(#:tests? #f)) ;no tests
15173 (home-page "https://github.com/seb-m/pyinotify")
15174 (synopsis "Python library for monitoring inotify events")
15175 (description
15176 "@code{pyinotify} provides a Python interface for monitoring
15177file system events on Linux.")
15178 (license license:expat)))
15179
15180(define-public python2-pyinotify
15181 (package-with-python2 python-pyinotify))
15182
15183;; Ada parser uses this version.
15184(define-public python2-quex-0.67.3
15185 (package
15186 (name "python2-quex")
15187 (version "0.67.3")
15188 (source
15189 (origin
15190 (method url-fetch)
15191 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
15192 (version-major+minor version)
15193 "/quex-" version ".zip"))
15194 (sha256
15195 (base32
15196 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
15197 (build-system python-build-system)
15198 (native-inputs
15199 `(("unzip" ,unzip)))
15200 (arguments
15201 `(#:python ,python-2
15202 #:tests? #f
15203 #:phases
15204 (modify-phases %standard-phases
15205 (delete 'configure)
15206 (delete 'build)
15207 (replace 'install
15208 (lambda* (#:key outputs #:allow-other-keys)
15209 (let* ((out (assoc-ref outputs "out"))
15210 (share/quex (string-append out "/share/quex"))
15211 (bin (string-append out "/bin")))
15212 (copy-recursively "." share/quex)
15213 (mkdir-p bin)
15214 (symlink (string-append share/quex "/quex-exe.py")
15215 (string-append bin "/quex"))
15216 #t))))))
15217 (native-search-paths
15218 (list (search-path-specification
15219 (variable "QUEX_PATH")
15220 (files '("share/quex")))))
15221 (home-page "http://quex.sourceforge.net/")
15222 (synopsis "Lexical analyzer generator in Python")
15223 (description "@code{quex} is a lexical analyzer generator in Python.")
15224 (license license:lgpl2.1+))) ; Non-military
15225
15226(define-public python2-quex
15227 (package (inherit python2-quex-0.67.3)
15228 (name "python2-quex")
15229 (version "0.68.1")
15230 (source
15231 (origin
15232 (method url-fetch)
15233 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
15234 (sha256
15235 (base32
15236 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
15237 (file-name (string-append name "-" version ".tar.gz"))))))
15238
15239(define-public python-more-itertools
15240 (package
15241 (name "python-more-itertools")
1b066827 15242 (version "7.1.0")
44d10b1f
RW
15243 (source
15244 (origin
15245 (method url-fetch)
15246 (uri (pypi-uri "more-itertools" version))
15247 (sha256
15248 (base32
1b066827 15249 "16phg2f2dvm6ci5wr49ncha5lmc0m2in3bsl33c61vzca4gkvd4b"))))
44d10b1f 15250 (build-system python-build-system)
44d10b1f
RW
15251 (home-page "https://github.com/erikrose/more-itertools")
15252 (synopsis "More routines for operating on iterables, beyond itertools")
15253 (description "Python's built-in @code{itertools} module implements a
15254number of iterator building blocks inspired by constructs from APL, Haskell,
15255and SML. @code{more-itertools} includes additional building blocks for
15256working with iterables.")
47f66348 15257 (properties `((python2-variant . ,(delay python2-more-itertools))))
44d10b1f
RW
15258 (license license:expat)))
15259
47f66348 15260;; The 5.x series are the last versions supporting Python 2.7.
44d10b1f 15261(define-public python2-more-itertools
47f66348
MB
15262 (package
15263 (inherit python-more-itertools)
15264 (name "python2-more-itertools")
15265 (version "5.0.0")
15266 (source (origin
15267 (method url-fetch)
15268 (uri (pypi-uri "more-itertools" version))
15269 (sha256
15270 (base32
15271 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
15272 (arguments
15273 `(#:python ,python2-minimal))
15274 (propagated-inputs
15275 `(("python2-six" ,python2-six-bootstrap)))))
44d10b1f
RW
15276
15277(define-public python-latexcodec
15278 (package
15279 (name "python-latexcodec")
f3415ba5 15280 (version "1.0.7")
44d10b1f
RW
15281 (source
15282 (origin
15283 (method url-fetch)
15284 (uri (pypi-uri "latexcodec" version))
15285 (sha256
f3415ba5 15286 (base32 "0wnp3yqcgx0rpy8dz51vh75lbp2qif67da19zi7m3ca98n887hgb"))))
44d10b1f
RW
15287 (build-system python-build-system)
15288 (inputs
15289 `(("python-six" ,python-six)))
15290 (home-page "https://readthedocs.org/projects/latexcodec/")
15291 (synopsis "Work with LaTeX code in Python")
15292 (description "Lexer and codec to work with LaTeX code in Python.")
15293 (license license:expat)))
15294
15295(define-public python-pybtex
15296 (package
15297 (name "python-pybtex")
9441a9c1 15298 (version "0.22.2")
44d10b1f
RW
15299 (source
15300 (origin
15301 (method url-fetch)
15302 (uri (pypi-uri "pybtex" version))
15303 (sha256
9441a9c1 15304 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
44d10b1f
RW
15305 (build-system python-build-system)
15306 (native-inputs
15307 `(("python-nose" ,python-nose)))
15308 (inputs
15309 `(("python-latexcodec" ,python-latexcodec)
15310 ("python-pyyaml" ,python-pyyaml)
15311 ("python-six" ,python-six)))
15312 (arguments
15313 `(#:test-target "nosetests"))
15314 (home-page "https://pybtex.org/")
15315 (synopsis "BibTeX-compatible bibliography processor")
15316 (description "Pybtex is a BibTeX-compatible bibliography processor written
15317in Python. You can simply type pybtex instead of bibtex.")
15318 (license license:expat)))
15319
15320(define-public python-onetimepass
15321 (package
15322 (name "python-onetimepass")
15323 (version "1.0.1")
15324 (source
15325 (origin
15326 (method url-fetch)
15327 (uri (pypi-uri "onetimepass" version))
15328 (sha256
15329 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
15330 (build-system python-build-system)
15331 (propagated-inputs `(("python-six" ,python-six)))
15332 (home-page "https://github.com/tadeck/onetimepass/")
15333 (synopsis "One-time password library")
15334 (description "Python one-time password library for HMAC-based (HOTP) and
15335time-based (TOTP) passwords.")
15336 (license license:expat)))
15337
15338(define-public python-parso
15339 (package
15340 (name "python-parso")
170d5844 15341 (version "0.5.2")
44d10b1f
RW
15342 (source
15343 (origin
15344 (method url-fetch)
15345 (uri (pypi-uri "parso" version))
15346 (sha256
15347 (base32
170d5844 15348 "1qgvrkpma7vylrk047mxxvqd66nwqk978n3ig2w8iz9m3bgjbksm"))))
44d10b1f
RW
15349 (native-inputs
15350 `(("python-pytest" ,python-pytest)))
15351 (build-system python-build-system)
4eb97c25
MC
15352 (arguments
15353 `(#:phases (modify-phases %standard-phases
15354 (replace 'check
15355 (lambda _ (invoke "pytest" "-vv"))))))
44d10b1f
RW
15356 (home-page "https://github.com/davidhalter/parso")
15357 (synopsis "Python Parser")
15358 (description "Parso is a Python parser that supports error recovery and
15359round-trip parsing for different Python versions (in multiple Python versions).
15360Parso is also able to list multiple syntax errors in your Python file.")
15361 (license license:expat)))
15362
15363(define-public python2-parso
15364 (package-with-python2 python-parso))
15365
15366(define-public python-async-generator
15367 (package
15368 (name "python-async-generator")
94fcbf8d 15369 (version "1.10")
44d10b1f
RW
15370 (source
15371 (origin
15372 (method url-fetch)
15373 (uri (pypi-uri "async_generator" version))
15374 (sha256
15375 (base32
94fcbf8d 15376 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
44d10b1f
RW
15377 (build-system python-build-system)
15378 (native-inputs
15379 `(("python-pytest" ,python-pytest)))
15380 (home-page "https://github.com/python-trio/async_generator")
15381 (synopsis "Async generators and context managers for Python 3.5+")
15382 (description "@code{async_generator} back-ports Python 3.6's native async
15383generators and Python 3.7's context managers into Python 3.5.")
15384 ;; Dual licensed.
15385 (license (list license:expat license:asl2.0))))
15386
15387(define-public python-async-timeout
15388 (package
15389 (name "python-async-timeout")
15390 (version "3.0.1")
15391 (source
15392 (origin
15393 (method url-fetch)
15394 (uri (pypi-uri "async-timeout" version))
15395 (sha256
15396 (base32
15397 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
15398 (build-system python-build-system)
15399 (home-page "https://github.com/aio-libs/async_timeout/")
15400 (synopsis "Timeout context manager for asyncio programs")
15401 (description "@code{async-timeout} provides a timeout timeout context
15402manager compatible with @code{asyncio}.")
15403 (license license:asl2.0)))
15404
15405(define-public python-glob2
15406 (package
15407 (name "python-glob2")
4df49d19 15408 (version "0.7")
8fa2bcc7
TGR
15409 (source
15410 (origin
15411 (method git-fetch)
15412 (uri (git-reference
15413 (url "https://github.com/miracle2k/python-glob2.git")
4df49d19 15414 (commit (string-append "v" version))))
8fa2bcc7
TGR
15415 (file-name (git-file-name name version))
15416 (sha256
4df49d19 15417 (base32 "160nh2ay9lw2hi0rixpzb2k87r6ql56k0j2cm87lqz8xc8zbw919"))))
44d10b1f
RW
15418 (build-system python-build-system)
15419 (home-page "https://github.com/miracle2k/python-glob2/")
15420 (synopsis "Extended Version of the python buildin glob module")
15421 (description "This is an extended version of the Python
15422@url{http://docs.python.org/library/glob.html, built-in glob module} which
15423adds:
15424
15425@itemize
15426@item The ability to capture the text matched by glob patterns, and return
15427those matches alongside the file names.
15428@item A recursive @code{**} globbing syntax, akin for example to the
15429@code{globstar} option of Bash.
15430@item The ability to replace the file system functions used, in order to glob
15431on virtual file systems.
15432@item Compatible with Python 2 and Python 3 (tested with 3.3).
15433@end itemize
15434
15435Glob2 currently based on the glob code from Python 3.3.1.")
15436 (license license:bsd-2)))
15437
15438(define-public python2-glob2
15439 (package-with-python2 python-glob2))
15440
15441(define-public python-gipc
15442 (package
15443 (name "python-gipc")
15444 (version "0.6.0")
15445 (source
15446 (origin
15447 (method url-fetch)
15448 (uri (pypi-uri "gipc" version ".zip"))
15449 (sha256
15450 (base32
15451 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
15452 (build-system python-build-system)
15453 (native-inputs
15454 `(("unzip" ,unzip)))
15455 (propagated-inputs
15456 `(("python-gevent" ,python-gevent)))
fd3ae040 15457 (home-page "https://gehrcke.de/gipc/")
44d10b1f
RW
15458 (synopsis "Child process management in the context of gevent")
15459 (description "Usage of Python's multiprocessing package in a
15460gevent-powered application may raise problems. With @code{gipc},
15461process-based child processes can safely be created anywhere within a
15462gevent-powered application.")
15463 (license license:expat)))
15464
15465(define-public python2-gipc
15466 (package-with-python2 python-gipc))
15467
15468(define-public python-fusepy
15469 (package
15470 (name "python-fusepy")
15471 (version "2.0.4")
15472 (source
15473 (origin
15474 (method url-fetch)
15475 (uri (pypi-uri "fusepy" version))
15476 (sha256
15477 (base32
15478 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
15479 (build-system python-build-system)
15480 (arguments
15481 `(#:phases
15482 (modify-phases %standard-phases
15483 (add-before 'build 'set-library-file-name
15484 (lambda* (#:key inputs #:allow-other-keys)
15485 (let ((fuse (assoc-ref inputs "fuse")))
15486 (substitute* "fuse.py"
15487 (("find_library\\('fuse'\\)")
15488 (string-append "'" fuse "/lib/libfuse.so'")))
15489 #t))))))
15490 (propagated-inputs
15491 `(("fuse" ,fuse)))
15492 (home-page "https://github.com/fusepy/fusepy")
15493 (synopsis "Simple ctypes bindings for FUSE")
15494 (description "Python module that provides a simple interface to FUSE and
15495MacFUSE. The binding is created using the standard @code{ctypes} library.")
15496 (license license:isc)))
15497
15498(define-public python2-fusepy
15499 (package-with-python2 python-fusepy))
15500
15501(define-public python2-gdrivefs
15502 (package
15503 (name "python2-gdrivefs")
15504 (version "0.14.9")
15505 (source
15506 (origin
15507 (method url-fetch)
15508 (uri (pypi-uri "gdrivefs" version))
15509 (sha256
15510 (base32
15511 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
15512 (build-system python-build-system)
15513 (arguments
15514 `(#:python ,python-2
15515 #:phases
15516 (modify-phases %standard-phases
15517 (add-before 'build 'patch-setup-py
15518 (lambda _
15519 ;; Update requirements from dependency==version
15520 ;; to dependency>=version
15521 (substitute* "gdrivefs/resources/requirements.txt"
15522 (("==") ">="))
15523 #t)))))
15524 (native-inputs
15525 `(("python2-gipc" ,python2-gipc)
15526 ("python2-gevent" ,python2-gevent)
15527 ("python2-greenlet" ,python2-greenlet)
15528 ("python2-httplib2" ,python2-httplib2)
15529 ("python2-uritemplate" ,python2-uritemplate)
15530 ("python2-oauth2client" ,python2-oauth2client)
15531 ("python2-six" ,python2-six)))
15532 (propagated-inputs
15533 `(("python2-dateutil" ,python2-dateutil)
15534 ("python2-fusepy" ,python2-fusepy)
15535 ("python2-google-api-client" ,python2-google-api-client)))
15536 (home-page "https://github.com/dsoprea/GDriveFS")
15537 (synopsis "Mount Google Drive as a local file system")
15538 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
15539under Python 2.7.")
15540 (license license:gpl2)))
15541
15542(define-public pybind11
15543 (package
15544 (name "pybind11")
0690f324 15545 (version "2.4.3")
44d10b1f
RW
15546 (source (origin
15547 (method git-fetch)
15548 (uri (git-reference
15549 (url "https://github.com/pybind/pybind11.git")
15550 (commit (string-append "v" version))))
15551 (sha256
15552 (base32
0690f324 15553 "0k89w4bsfbpzw963ykg1cyszi3h3nk393qd31m6y46pcfxkqh4rd"))
44d10b1f
RW
15554 (file-name (git-file-name name version))))
15555 (build-system cmake-build-system)
15556 (native-inputs
3cf579e9 15557 `(("python" ,python-wrapper)
ae8db9ce
LC
15558
15559 ;; The following dependencies are used for tests.
15560 ("python-pytest" ,python-pytest)
15561 ("catch" ,catch-framework2-1)
15562 ("eigen" ,eigen)))
44d10b1f 15563 (arguments
ae8db9ce
LC
15564 `(#:configure-flags
15565 (list (string-append "-DCATCH_INCLUDE_DIR="
15566 (assoc-ref %build-inputs "catch")
15567 "/include/catch"))
15568
3cf579e9
LC
15569 #:phases (modify-phases %standard-phases
15570 (add-after 'install 'install-python
15571 (lambda* (#:key outputs #:allow-other-keys)
15572 (let ((out (assoc-ref outputs "out")))
15573 (with-directory-excursion "../source"
15574 (setenv "PYBIND11_USE_CMAKE" "yes")
15575 (invoke "python" "setup.py" "install"
15576 "--single-version-externally-managed"
15577 "--root=/"
15578 (string-append "--prefix=" out)))))))
15579
ae8db9ce 15580 #:test-target "check"))
44d10b1f
RW
15581 (home-page "https://github.com/pybind/pybind11/")
15582 (synopsis "Seamless operability between C++11 and Python")
ab17297a
LC
15583 (description
15584 "@code{pybind11} is a lightweight header-only library that exposes C++
15585types in Python and vice versa, mainly to create Python bindings of existing
15586C++ code. Its goals and syntax are similar to the @code{Boost.Python}
15587library: to minimize boilerplate code in traditional extension modules by
15588inferring type information using compile-time introspection.")
65eada58 15589 (license license:bsd-3)))
44d10b1f
RW
15590
15591(define-public python-fasteners
15592 (package
15593 (name "python-fasteners")
15594 (version "0.14.1")
15595 (source
15596 (origin
15597 (method url-fetch)
15598 (uri (pypi-uri "fasteners" version))
15599 (sha256
15600 (base32
15601 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
15602 (build-system python-build-system)
15603 (propagated-inputs
15604 `(("python-monotonic" ,python-monotonic)
15605 ("python-six" ,python-six)
15606 ("python-testtools" ,python-testtools)))
15607 (home-page "https://github.com/harlowja/fasteners")
15608 (synopsis "Python package that provides useful locks")
15609 (description
15610 "This package provides a Python program that provides following locks:
15611
15612@itemize
15613@item Locking decorator
15614@item Reader-writer locks
15615@item Inter-process locks
15616@item Generic helpers
15617@end itemize\n")
15618 (properties `((python2-variant . ,(delay python2-fasteners))))
15619 (license license:asl2.0)))
15620
15621(define-public python2-fasteners
15622 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
15623 (package
15624 (inherit base)
15625 (propagated-inputs
15626 `(("python2-futures" ,python2-futures)
15627 ,@(package-propagated-inputs base))))))
15628
15629(define-public python-requests-file
15630 (package
15631 (name "python-requests-file")
15632 (version "1.4.3")
15633 (source
15634 (origin
15635 (method url-fetch)
15636 (uri (pypi-uri "requests-file" version))
15637 (sha256
15638 (base32
15639 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
15640 (build-system python-build-system)
15641 (propagated-inputs
15642 `(("python-requests" ,python-requests)
15643 ("python-six" ,python-six)))
15644 (home-page
15645 "https://github.com/dashea/requests-file")
15646 (synopsis "File transport adapter for Requests")
15647 (description
15648 "Requests-File is a transport adapter for use with the Requests Python
52beae7b 15649library to allow local file system access via @code{file://} URLs.")
44d10b1f
RW
15650 (license license:asl2.0)))
15651
15652(define-public python2-requests-file
15653 (package-with-python2 python-requests-file))
15654
15655(define-public python-tldextract
15656 (package
15657 (name "python-tldextract")
15658 (version "2.2.0")
15659 (source
15660 (origin
15661 (method url-fetch)
15662 (uri (pypi-uri "tldextract" version))
15663 (sha256
15664 (base32
15665 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
15666 (build-system python-build-system)
15667 (native-inputs
15668 `(("python-pytest" ,python-pytest)
15669 ("python-responses" ,python-responses)))
15670 (propagated-inputs
15671 `(("python-idna" ,python-idna)
15672 ("python-requests" ,python-requests)
15673 ("python-requests-file" ,python-requests-file)))
15674 (home-page
15675 "https://github.com/john-kurkowski/tldextract")
15676 (synopsis
15677 "Separate the TLD from the registered domain and subdomains of a URL")
15678 (description
15679 "TLDExtract accurately separates the TLD from the registered domain and
15680subdomains of a URL, using the Public Suffix List. By default, this includes
15681the public ICANN TLDs and their exceptions. It can optionally support the
15682Public Suffix List's private domains as well.")
15683 (license license:bsd-3)))
15684
15685(define-public python2-tldextract
15686 (package-with-python2 python-tldextract))
15687
15688(define-public python-pynamecheap
15689 (package
15690 (name "python-pynamecheap")
15691 (version "0.0.3")
15692 (source
15693 (origin
15694 (method url-fetch)
15695 (uri (pypi-uri "PyNamecheap" version))
15696 (sha256
15697 (base32
15698 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
15699 (build-system python-build-system)
15700 (propagated-inputs
15701 `(("python-requests" ,python-requests)))
15702 (home-page
15703 "https://github.com/Bemmu/PyNamecheap")
15704 (synopsis
15705 "Namecheap API client in Python")
15706 (description
15707 "PyNamecheap is a Namecheap API client in Python.")
15708 (license license:expat)))
15709
15710(define-public python2-pynamecheap
15711 (package-with-python2 python-pynamecheap))
15712
15713(define-public python-dns-lexicon
15714 (package
15715 (name "python-dns-lexicon")
15716 (version "2.4.0")
15717 (source
15718 (origin
15719 (method url-fetch)
15720 (uri (pypi-uri "dns-lexicon" version))
15721 (sha256
15722 (base32
15723 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
15724 (build-system python-build-system)
15725 (arguments
15726 `(#:tests? #f)) ;requires internet access
15727 (propagated-inputs
15728 `(("python-future" ,python-future)
15729 ("python-pynamecheap" ,python-pynamecheap)
15730 ("python-requests" ,python-requests)
15731 ("python-tldextract" ,python-tldextract)
15732 ("python-urllib3" ,python-urllib3)))
15733 (home-page "https://github.com/AnalogJ/lexicon")
15734 (synopsis
15735 "Manipulate DNS records on various DNS providers")
15736 (description
15737 "Lexicon provides a way to manipulate DNS records on multiple DNS
15738providers in a standardized way. It has a CLI but it can also be used as a
15739Python library. It was designed to be used in automation, specifically with
15740Let's Encrypt.")
15741 (license license:expat)))
15742
15743(define-public python2-dns-lexicon
15744 (package-with-python2 python-dns-lexicon))
15745
15746(define-public python-commandlines
15747 (package
15748 (name "python-commandlines")
15749 (version "0.4.1")
15750 (source
15751 (origin
15752 (method url-fetch)
15753 (uri (pypi-uri "commandlines" version))
15754 (sha256
15755 (base32
15756 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
15757 (build-system python-build-system)
15758 (home-page "https://github.com/chrissimpkins/commandlines")
15759 (synopsis "Command line argument to object parsing library")
15760 (description
15761 "@code{Commandlines} is a Python library for command line application
15762development that supports command line argument parsing, command string
15763validation testing and application logic.")
15764 (license license:expat)))
15765
15766;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
15767;; python-numba. They have a very unflexible relationship.
15768(define-public python-numba
15769 (package
15770 (name "python-numba")
65f84096 15771 (version "0.46.0")
44d10b1f
RW
15772 (source
15773 (origin
15774 (method url-fetch)
15775 (uri (pypi-uri "numba" version))
15776 (sha256
15777 (base32
65f84096 15778 "1vnfzcq6fcnkmdms6114d49awvvj5181fl7z1wlha27qc2paxjy2"))))
44d10b1f
RW
15779 (build-system python-build-system)
15780 (arguments
15781 `(#:modules ((guix build utils)
15782 (guix build python-build-system)
15783 (ice-9 ftw)
15784 (srfi srfi-1)
15785 (srfi srfi-26))
15786 #:phases
15787 (modify-phases %standard-phases
15788 (add-after 'unpack 'disable-proprietary-features
15789 (lambda _
15790 (setenv "NUMBA_DISABLE_HSA" "1")
15791 (setenv "NUMBA_DISABLE_CUDA" "1")
15792 #t))
15793 (add-after 'unpack 'remove-failing-tests
15794 (lambda _
65f84096 15795 ;; FIXME: These tests fail for unknown reasons:
44d10b1f
RW
15796 ;; test_non_writable_pycache, test_non_creatable_pycache, and
15797 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
15798 (substitute* "numba/tests/test_dispatcher.py"
15799 (("def test(_non_writable_pycache)" _ m)
15800 (string-append "def guix_skip" m))
15801 (("def test(_non_creatable_pycache)" _ m)
15802 (string-append "def guix_skip" m))
15803 (("def test(_frozen)" _ m)
15804 (string-append "def guix_skip" m)))
15805
15806 ;; These tests fail because we don't run the tests from the build
15807 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
65f84096 15808 ;; They are in numba.tests.test_pycc.TestDistutilsSupport.
44d10b1f
RW
15809 (substitute* "numba/tests/test_pycc.py"
15810 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
15811 (string-append "def guix_skip" m)))
65f84096
BG
15812
15813 ;; These tests fail because our version of Python does not have
15814 ;; a recognizable front-end for the Numba distribution to use
15815 ;; to check against.
15816 (substitute* "numba/tests/test_entrypoints.py"
15817 (("def test(_init_entrypoint)" _ m)
15818 (string-append "def guix_skip" m)))
15819 (substitute* "numba/tests/test_jitclasses.py"
15820 (("def test(_jitclass_longlabel_not_truncated)" _ m)
15821 (string-append "def guix_skip" m)))
44d10b1f
RW
15822 #t))
15823 (replace 'check
15824 (lambda _
15825 (let ((cwd (getcwd)))
15826 (setenv "PYTHONPATH"
15827 (string-append cwd "/build/"
15828 (find (cut string-prefix? "lib" <>)
15829 (scandir (string-append cwd "/build")))
15830 ":"
15831 (getenv "PYTHONPATH")))
15832 ;; Something is wrong with the PYTHONPATH when running the
15833 ;; tests from the build directory, as it complains about not being
15834 ;; able to import certain modules.
15835 (with-directory-excursion "/tmp"
15836 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
15837 #t)))))
15838 (propagated-inputs
15839 `(("python-llvmlite" ,python-llvmlite)
15840 ("python-numpy" ,python-numpy)
15841 ("python-singledispatch" ,python-singledispatch)))
15842 ;; Needed for tests.
15843 (inputs
15844 `(("python-jinja2" ,python-jinja2)
15845 ("python-pygments" ,python-pygments)))
15846 (home-page "https://numba.pydata.org")
15847 (synopsis "Compile Python code using LLVM")
15848 (description "Numba gives you the power to speed up your applications with
15849high performance functions written directly in Python. With a few
15850annotations, array-oriented and math-heavy Python code can be just-in-time
15851compiled to native machine instructions, similar in performance to C, C++ and
15852Fortran, without having to switch languages or Python interpreters.
15853
15854Numba works by generating optimized machine code using the LLVM compiler
15855infrastructure at import time, runtime, or statically (using the included pycc
15856tool).")
15857 (license license:bsd-3)))
15858
241409cd
RW
15859(define-public python-numcodecs
15860 (package
15861 (name "python-numcodecs")
15862 (version "0.6.4")
15863 (source
15864 (origin
15865 (method url-fetch)
15866 (uri (pypi-uri "numcodecs" version))
15867 (sha256
15868 (base32
15869 "0kbfr8pl3x9glsypbq8hzim003f16ml1b1cvgrh4w1sdvgal6j7g"))))
15870 (build-system python-build-system)
15871 (propagated-inputs
15872 `(("python-numpy" ,python-numpy)
15873 ("python-msgpack" ,python-msgpack)))
15874 (native-inputs
15875 `(("python-pytest" ,python-pytest)
15876 ("python-setuptools-scm" ,python-setuptools-scm)))
15877 (home-page "https://github.com/zarr-developers/numcodecs")
15878 (synopsis "Buffer compression and transformation codecs")
15879 (description
15880 "This Python package provides buffer compression and transformation
15881codecs for use in data storage and communication applications.")
15882 (license license:expat)))
15883
8e04b233
RW
15884(define-public python-asciitree
15885 (package
15886 (name "python-asciitree")
15887 (version "0.3.3")
15888 (source
15889 (origin
15890 (method url-fetch)
15891 (uri (pypi-uri "asciitree" version))
15892 (sha256
15893 (base32
15894 "0vhgri2m2xlnibhz4xwn4hpbc7xacisxjqrk6k5kyppq96vbk92a"))))
15895 (build-system python-build-system)
15896 (home-page "https://github.com/mbr/asciitree")
15897 (synopsis "Draws ASCII trees")
15898 (description "This package draws tree structures using characters.")
15899 (license license:expat)))
15900
7032c1cc
RW
15901(define-public python-zarr
15902 (package
15903 (name "python-zarr")
15904 (version "2.4.0")
15905 (source
15906 (origin
15907 (method url-fetch)
15908 (uri (pypi-uri "zarr" version))
15909 (sha256
15910 (base32
15911 "026n3sjzjv2gmwx6y72b8ij0hk42bc8zdbvfj5gdqzd4i6wj3ajk"))))
15912 (build-system python-build-system)
15913 (arguments
15914 `(#:phases
15915 (modify-phases %standard-phases
15916 (add-after 'unpack 'disable-service-tests
15917 (lambda _
15918 (setenv "ZARR_TEST_ABS" "0")
15919 (setenv "ZARR_TEST_MONGO" "0")
15920 (setenv "ZARR_TEST_REDIS" "0")
15921 #t))
15922 (replace 'check
15923 (lambda _
15924 (invoke "pytest" "-vv" "-k" "not lmdb")
15925 #t)))))
15926 (propagated-inputs
15927 `(("python-asciitree" ,python-asciitree)
15928 ("python-fasteners" ,python-fasteners)
15929 ("python-numcodecs" ,python-numcodecs)
15930 ("python-numpy" ,python-numpy)))
15931 (native-inputs
15932 `(("python-pytest" ,python-pytest)
15933 ("python-setuptools-scm" ,python-setuptools-scm)))
15934 (home-page "https://github.com/zarr-developers/zarr-python")
15935 (synopsis "Chunked, compressed, N-dimensional arrays for Python")
15936 (description
15937 "This package provides an implementation of chunked, compressed,
15938N-dimensional arrays for Python.")
15939 (license license:expat)))
15940
44d10b1f
RW
15941(define-public python-anndata
15942 (package
15943 (name "python-anndata")
a098b349 15944 (version "0.7.1")
44d10b1f
RW
15945 (source
15946 (origin
15947 (method url-fetch)
15948 (uri (pypi-uri "anndata" version))
15949 (sha256
15950 (base32
a098b349 15951 "0rnfbpr55j1a1bi2kd4mz444741hrn74kz90h5rnjr59jmpfnh09"))))
44d10b1f 15952 (build-system python-build-system)
a098b349
RW
15953 (arguments
15954 `(#:phases
15955 (modify-phases %standard-phases
15956 (add-after 'unpack 'delete-inconvenient-tests
15957 (lambda _
15958 ;; This test depends on python-scikit-learn.
15959 (delete-file "anndata/tests/test_inplace_subset.py")
15960 #t))
15961 (delete 'check)
15962 (add-after 'install 'check
15963 (lambda* (#:key inputs outputs #:allow-other-keys)
15964 (add-installed-pythonpath inputs outputs)
15965 (invoke "pytest" "-vv"))))))
44d10b1f
RW
15966 (propagated-inputs
15967 `(("python-h5py" ,python-h5py)
a098b349 15968 ("python-importlib-metadata" ,python-importlib-metadata)
44d10b1f 15969 ("python-natsort" ,python-natsort)
a098b349
RW
15970 ("python-numcodecs" ,python-numcodecs)
15971 ("python-packaging" ,python-packaging)
44d10b1f 15972 ("python-pandas" ,python-pandas)
a098b349
RW
15973 ("python-scipy" ,python-scipy)
15974 ("python-zarr" ,python-zarr)))
15975 (native-inputs
15976 `(("python-joblib" ,python-joblib)
15977 ("python-pytest" ,python-pytest)
15978 ("python-setuptools-scm" ,python-setuptools-scm)))
44d10b1f
RW
15979 (home-page "https://github.com/theislab/anndata")
15980 (synopsis "Annotated data for data analysis pipelines")
15981 (description "Anndata is a package for simple (functional) high-level APIs
15982for data analysis pipelines. In this context, it provides an efficient,
15983scalable way of keeping track of data together with learned annotations and
15984reduces the code overhead typically encountered when using a mostly
15985object-oriented library such as @code{scikit-learn}.")
15986 (license license:bsd-3)))
15987
15988(define-public python-dill
15989 (package
15990 (name "python-dill")
32be3577 15991 (version "0.3.1.1")
44d10b1f
RW
15992 (source
15993 (origin
15994 (method url-fetch)
15995 (uri (pypi-uri "dill" version))
15996 (sha256
32be3577 15997 (base32 "1704g8z70d210ksgbccs2v545v9w0wc6lx15m296alb7jf0yzn22"))))
44d10b1f 15998 (build-system python-build-system)
32be3577
MIP
15999 (arguments
16000 `(#:phases
16001 (modify-phases %standard-phases
16002 (replace 'check
16003 (lambda _
16004 (with-directory-excursion "/tmp"
16005 (invoke "nosetests" "-v"))
16006 #t)))))
16007 (native-inputs
16008 `(("python-nose" ,python-nose)))
16009 (home-page "https://pypi.org/project/dill/")
44d10b1f
RW
16010 (synopsis "Serialize all of Python")
16011 (description "Dill extends Python's @code{pickle} module for serializing
16012and de-serializing Python objects to the majority of the built-in Python
16013types. Dill provides the user the same interface as the @code{pickle} module,
16014and also includes some additional features. In addition to pickling Python
16015objects, @code{dill} provides the ability to save the state of an interpreter
61985d65 16016session in a single command. Hence, it would be feasible to save a
44d10b1f
RW
16017interpreter session, close the interpreter, ship the pickled file to another
16018computer, open a new interpreter, unpickle the session and thus continue from
16019the saved state of the original interpreter session.")
16020 (license license:bsd-3)))
16021
16022(define-public python-multiprocess
16023 (package
16024 (name "python-multiprocess")
fcc4e9e7 16025 (version "0.70.9")
44d10b1f
RW
16026 (source
16027 (origin
16028 (method url-fetch)
16029 (uri (pypi-uri "multiprocess" version))
16030 (sha256
16031 (base32
fcc4e9e7 16032 "1r882nvd44xqwbrclwqx5rhs80l6809rcvpc7pkpgnij06cvvmcz"))))
44d10b1f 16033 (build-system python-build-system)
fcc4e9e7
MIP
16034 (arguments
16035 `(#:phases
16036 (modify-phases %standard-phases
16037 (add-after 'unpack 'disable-broken-tests
16038 (lambda _
16039 ;; This test is broken as there is no keyboard interrupt.
16040 (substitute* "py3.7/multiprocess/tests/__init__.py"
16041 (("^(.*)def test_wait_result"
16042 line indent)
16043 (string-append indent
16044 "@unittest.skip(\"Disabled by Guix\")\n"
16045 line)))
16046 #t))
16047 ;; Tests must be run after installation.
16048 (delete 'check)
16049 (add-after 'install 'check
16050 (lambda* (#:key inputs outputs #:allow-other-keys)
16051 (add-installed-pythonpath inputs outputs)
16052 (invoke "python" "-m" "multiprocess.tests")
16053 #t)))))
44d10b1f
RW
16054 (propagated-inputs
16055 `(("python-dill" ,python-dill)))
fcc4e9e7 16056 (home-page "https://pypi.org/project/multiprocess/")
44d10b1f
RW
16057 (synopsis "Multiprocessing and multithreading in Python")
16058 (description
16059 "This package is a fork of the multiprocessing Python package, a package
16060which supports the spawning of processes using the API of the standard
16061library's @code{threading} module.")
16062 (license license:bsd-3)))
16063
16064(define-public python-toolz
16065 (package
16066 (name "python-toolz")
16067 (version "0.9.0")
16068 (source
16069 (origin
16070 (method url-fetch)
16071 (uri (pypi-uri "toolz" version))
16072 (sha256
16073 (base32
16074 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
16075 (build-system python-build-system)
16076 ;; FIXME: tests cannot be computed: "Can't perform this operation for
16077 ;; unregistered loader type"
16078 (arguments '(#:tests? #f))
16079 (home-page "https://github.com/pytoolz/toolz/")
16080 (synopsis "List processing tools and functional utilities")
16081 (description
16082 "This package provides a set of utility functions for iterators,
16083functions, and dictionaries.")
16084 (license license:bsd-3)))
16085
16086(define-public python2-toolz
16087 (package-with-python2 python-toolz))
16088
16089(define-public python-cytoolz
16090 (package
16091 (name "python-cytoolz")
16092 (version "0.9.0.1")
16093 (source
16094 (origin
16095 (method url-fetch)
16096 (uri (pypi-uri "cytoolz" version))
16097 (sha256
16098 (base32
16099 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
16100 (build-system python-build-system)
16101 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
16102 ;; 'exceptions'"
16103 (arguments '(#:tests? #f))
16104 (propagated-inputs
16105 `(("python-toolz" ,python-toolz)))
16106 (native-inputs
16107 `(("python-cython" ,python-cython)))
16108 (home-page "https://github.com/pytoolz/cytoolz")
16109 (synopsis "High performance functional utilities")
16110 (description
16111 "The cytoolz package implements the same API as provided by toolz. The
16112main differences are that @code{cytoolz} is faster and cytoolz offers a C API
16113that is accessible to other projects developed in Cython.")
16114 (license license:bsd-3)))
16115
16116(define-public python-sortedcontainers
16117 (package
16118 (name "python-sortedcontainers")
b244f166 16119 (version "2.1.0")
44d10b1f
RW
16120 (source
16121 (origin
16122 (method url-fetch)
16123 (uri (pypi-uri "sortedcontainers" version))
16124 (sha256
16125 (base32
b244f166 16126 "0fm0w5id2yhqld95hg2m636vjgkz377rvgdfqaxc25vbylr9lklp"))))
44d10b1f
RW
16127 (build-system python-build-system)
16128 (native-inputs
16129 `(("python-tox" ,python-tox)))
16130 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
16131 (synopsis "Sorted List, Sorted Dict, Sorted Set")
16132 (description
16133 "This package provides a sorted collections library, written in
16134pure-Python.")
16135 (license license:asl2.0)))
16136
16137(define-public python-cloudpickle
16138 (package
16139 (name "python-cloudpickle")
16140 (version "0.6.1")
16141 (source
16142 (origin
16143 (method url-fetch)
16144 (uri (pypi-uri "cloudpickle" version))
16145 (sha256
16146 (base32
16147 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
16148 (build-system python-build-system)
16149 ;; FIXME: there are 5 errors in 122 tests:
16150 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
16151 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
16152 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
16153 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
16154 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
16155 ;; TypeError: cannot serialize '_io.BufferedRandom' object
16156 (arguments '(#:tests? #f))
16157 (native-inputs
16158 `(("python-pytest" ,python-pytest)
16159 ("python-mock" ,python-mock)
16160 ("python-tornado" ,python-tornado)))
16161 (home-page "https://github.com/cloudpipe/cloudpickle")
16162 (synopsis "Extended pickling support for Python objects")
16163 (description
16164 "Cloudpickle makes it possible to serialize Python constructs not
16165supported by the default pickle module from the Python standard library. It
16166is especially useful for cluster computing where Python expressions are
16167shipped over the network to execute on remote hosts, possibly close to the
16168data.")
16169 (license license:bsd-3)))
16170
16171(define-public python2-cloudpickle
16172 (package-with-python2 python-cloudpickle))
16173
16174(define-public python-locket
16175 (package
16176 (name "python-locket")
16177 (version "0.2.0")
16178 (source
16179 (origin
16180 (method url-fetch)
16181 (uri (pypi-uri "locket" version))
16182 (sha256
16183 (base32
16184 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
16185 (build-system python-build-system)
16186 (home-page "https://github.com/mwilliamson/locket.py")
16187 (synopsis "File-based locks for Python")
16188 (description
16189 "Locket implements a lock that can be used by multiple processes provided
16190they use the same path.")
16191 (license license:bsd-2)))
16192
16193(define-public python2-locket
16194 (package-with-python2 python-locket))
16195
16196(define-public python-blosc
16197 (package
16198 (name "python-blosc")
16199 (version "1.5.1")
16200 (source
16201 (origin
16202 (method url-fetch)
16203 (uri (pypi-uri "blosc" version))
16204 (sha256
16205 (base32
16206 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
16207 (build-system python-build-system)
16208 ;; FIXME: all tests pass, but then this error is printed:
16209 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
16210 (arguments '(#:tests? #f))
16211 (propagated-inputs
16212 `(("python-numpy" ,python-numpy)))
16213 (home-page "https://github.com/blosc/python-blosc")
16214 (synopsis "Python wrapper for the Blosc data compressor library")
16215 (description "Blosc is a high performance compressor optimized for binary
16216data. It has been designed to transmit data to the processor cache faster
16217than the traditional, non-compressed, direct memory fetch approach via a
16218@code{memcpy()} system call.
16219
16220Blosc works well for compressing numerical arrays that contains data with
16221relatively low entropy, like sparse data, time series, grids with
16222regular-spaced values, etc.
16223
16224This Python package wraps the Blosc library.")
16225 (license license:bsd-3)))
16226
16227(define-public python2-blosc
16228 (package-with-python2 python-blosc))
16229
16230(define-public python-partd
16231 (package
16232 (name "python-partd")
16233 (version "0.3.9")
16234 (source
16235 (origin
16236 (method url-fetch)
16237 (uri (pypi-uri "partd" version))
16238 (sha256
16239 (base32
16240 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
16241 (build-system python-build-system)
16242 (propagated-inputs
16243 `(("python-blosc" ,python-blosc)
16244 ("python-locket" ,python-locket)
16245 ("python-numpy" ,python-numpy)
16246 ("python-pandas" ,python-pandas)
16247 ("python-pyzmq" ,python-pyzmq)
16248 ("python-toolz" ,python-toolz)))
16249 (home-page "https://github.com/dask/partd/")
16250 (synopsis "Appendable key-value storage")
16251 (description "Partd stores key-value pairs. Values are raw bytes. We
16252append on old values. Partd excels at shuffling operations.")
16253 (license license:bsd-3)))
16254
16255(define-public python2-partd
16256 (package-with-python2 python-partd))
16257
c70a0191
RW
16258(define-public python-fsspec
16259 (package
16260 (name "python-fsspec")
16261 (version "0.6.1")
16262 (source
16263 (origin
16264 (method url-fetch)
16265 (uri (pypi-uri "fsspec" version))
16266 (sha256
16267 (base32
16268 "1g9ba8v04s1nrh7pvzfm2md7ivl2mrz3hcq3y9d1a44gd62h17zj"))))
16269 (build-system python-build-system)
16270 (arguments '(#:tests? #f)) ; there are none
16271 (home-page "https://github.com/intake/filesystem_spec")
16272 (synopsis "File-system specification")
16273 (description "The purpose of this package is to produce a template or
16274specification for a file-system interface, that specific implementations
16275should follow, so that applications making use of them can rely on a common
16276behavior and not have to worry about the specific internal implementation
16277decisions with any given backend.")
16278 (license license:bsd-3)))
16279
44d10b1f
RW
16280(define-public python-dask
16281 (package
16282 (name "python-dask")
86c7ca07 16283 (version "2.9.0")
44d10b1f
RW
16284 (source
16285 (origin
16286 (method url-fetch)
16287 (uri (pypi-uri "dask" version))
16288 (sha256
86c7ca07 16289 (base32 "1w1hqr8vyx6ygwflj2737dcy0mmgvrc0s602gnny8pzlcbs9m76b"))))
44d10b1f 16290 (build-system python-build-system)
44d10b1f
RW
16291 (arguments
16292 `(#:phases
16293 (modify-phases %standard-phases
86c7ca07 16294 (add-after 'unpack 'disable-broken-tests
44d10b1f 16295 (lambda _
86c7ca07 16296 ;; This test is marked as xfail when pytest-xdist is used.
44d10b1f
RW
16297 (substitute* "dask/tests/test_threaded.py"
16298 (("def test_interrupt\\(\\)" m)
16299 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
16300 m)))
86c7ca07
RW
16301 ;; This one fails with a type error:
16302 ;; TypeError: Already tz-aware, use tz_convert to convert.
16303 (substitute* "dask/dataframe/tests/test_shuffle.py"
16304 (("def test_set_index_timestamp\\(\\)" m)
16305 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
16306 m)))
44d10b1f
RW
16307 #t))
16308 (replace 'check
16309 (lambda _ (invoke "pytest" "-vv"))))))
16310 (propagated-inputs
16311 `(("python-cloudpickle" ,python-cloudpickle)
86c7ca07 16312 ("python-fsspec" ,python-fsspec)
44d10b1f 16313 ("python-numpy" ,python-numpy)
86c7ca07 16314 ("python-packaging" ,python-packaging)
44d10b1f
RW
16315 ("python-pandas" ,python-pandas)
16316 ("python-partd" ,python-partd)
16317 ("python-toolz" ,python-toolz)
16318 ("python-pyyaml" ,python-pyyaml)))
16319 (native-inputs
16320 `(("python-pytest" ,python-pytest)
16321 ("python-pytest-runner" ,python-pytest-runner)))
16322 (home-page "https://github.com/dask/dask/")
16323 (synopsis "Parallel computing with task scheduling")
16324 (description
16325 "Dask is a flexible parallel computing library for analytics. It
16326consists of two components: dynamic task scheduling optimized for computation,
16327and large data collections like parallel arrays, dataframes, and lists that
16328extend common interfaces like NumPy, Pandas, or Python iterators to
16329larger-than-memory or distributed environments. These parallel collections
16330run on top of the dynamic task schedulers. ")
16331 (license license:bsd-3)))
16332
44d10b1f
RW
16333(define-public python-ilinkedlist
16334 (package
16335 (name "python-ilinkedlist")
16336 (version "0.4.0")
16337 (source
16338 (origin
16339 (method url-fetch)
16340 (uri (pypi-uri "ilinkedlist" version))
16341 (sha256
16342 (base32
16343 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
16344 (build-system python-build-system)
16345 (native-inputs `(("python-pytest" ,python-pytest)))
16346 (inputs `(("python" ,python)))
16347 (home-page "https://github.com/luther9/ilinkedlist-py")
16348 (synopsis "Immutable linked list library")
16349 (description
16350 "This is a implementation of immutable linked lists for Python. It
16351contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
16352Since a linked list is treated as immutable, it is hashable, and its length
16353can be retrieved in constant time. Some of the terminology is inspired by
16354LISP. It is possible to create an improper list by creating a @code{Pair}
16355with a non-list @code{cdr}.")
16356 (license license:gpl3+)))
16357
16358(define-public python-readlike
16359 (package
16360 (name "python-readlike")
16361 (version "0.1.3")
16362 (source
16363 (origin
16364 (method url-fetch)
16365 (uri (pypi-uri "readlike" version))
16366 (sha256
16367 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
16368 (build-system python-build-system)
16369 (home-page "https://github.com/jangler/readlike")
16370 (synopsis "GNU Readline-like line editing module")
16371 (description
16372 "This Python module provides line editing functions similar to the default
16373Emacs-style ones of GNU Readline. Unlike the Python standard library's
16374@code{readline} package, this one allows access to those capabilties in settings
16375outside of a standard command-line interface. It is especially well-suited to
16376interfacing with Urwid, due to a shared syntax for describing key inputs.
16377
16378Currently, all stateless Readline commands are implemented. Yanking and history
16379are not supported.")
16380 (license license:expat)))
16381
16382(define-public python2-readlike
16383 (package-with-python2 python-readlike))
16384
16385(define-public python-reparser
16386 (package
16387 (name "python-reparser")
16388 (version "1.4.3")
16389 (source
16390 (origin
16391 (method url-fetch)
16392 (uri (pypi-uri "ReParser" version))
16393 (sha256
16394 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
16395 (build-system python-build-system)
16396 (home-page "https://github.com/xmikos/reparser")
16397 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
16398 (description
16399 "This Python library provides a simple lexer/parser for inline markup based
16400on regular expressions.")
16401 (license license:expat)))
16402
16403(define-public python2-reparser
16404 (let ((reparser (package-with-python2
16405 (strip-python2-variant python-reparser))))
16406 (package (inherit reparser)
16407 (propagated-inputs
16408 `(("python2-enum34" ,python2-enum34)
16409 ,@(package-propagated-inputs reparser))))))
16410
16411(define-public python-precis-i18n
16412 (package
16413 (name "python-precis-i18n")
16414 (version "1.0.0")
16415 (source
16416 (origin
16417 (method url-fetch)
16418 (uri (pypi-uri "precis_i18n" version))
16419 (sha256
16420 (base32
16421 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
16422 (build-system python-build-system)
16423 (home-page "https://github.com/byllyfish/precis_i18n")
16424 (synopsis "Implementation of the PRECIS framework")
16425 (description
16426 "This module implements the PRECIS Framework as described in RFC 8264,
16427RFC 8265 and RFC 8266.")
16428 (license license:expat)))
16429
d0446c4b
RW
16430(define-public python-absl-py
16431 (package
16432 (name "python-absl-py")
16433 (version "0.6.1")
16434 (source
16435 (origin
16436 (method url-fetch)
16437 (uri (pypi-uri "absl-py" version))
16438 (sha256
16439 (base32
16440 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
16441 (build-system python-build-system)
16442 (propagated-inputs
16443 `(("python-six" ,python-six)))
16444 (home-page "https://github.com/abseil/abseil-py")
16445 (synopsis "Abseil Python common libraries")
16446 (description
16447 "This package provides the Abseil Python Common Libraries, a collection
16448of Python libraries for building Python applications.")
16449 (license license:asl2.0)))
16450
81bed4e9
RW
16451(define-public python-astor
16452 (package
16453 (name "python-astor")
16454 (version "0.7.1")
16455 (source
16456 (origin
16457 (method url-fetch)
16458 (uri (pypi-uri "astor" version))
16459 (sha256
16460 (base32
16461 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
16462 (build-system python-build-system)
16463 ;; FIXME: There are two errors and two test failures.
16464 (arguments `(#:tests? #f))
16465 (home-page "https://github.com/berkerpeksag/astor")
39ee82ff 16466 (synopsis "Read and write Python ASTs")
81bed4e9 16467 (description "Astor is designed to allow easy manipulation of Python
39ee82ff 16468source via the Abstract Syntax Tree.")
81bed4e9
RW
16469 (license license:bsd-3)))
16470
39ee82ff
RW
16471(define-public python2-astor
16472 (package-with-python2 python-astor))
16473
22e623ae
RW
16474(define-public python-grpcio
16475 (package
16476 (name "python-grpcio")
16477 (version "1.17.1")
16478 (source
16479 (origin
16480 (method url-fetch)
16481 (uri (pypi-uri "grpcio" version))
16482 (sha256
16483 (base32
16484 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
16485 (build-system python-build-system)
16486 (propagated-inputs
16487 `(("python-six" ,python-six)))
16488 (home-page "https://grpc.io")
16489 (synopsis "HTTP/2-based RPC framework")
16490 (description "This package provides a Python library for communicating
16491with the HTTP/2-based RPC framework gRPC.")
16492 (license license:asl2.0)))
16493
79869f80
RW
16494(define-public python-astunparse
16495 (package
16496 (name "python-astunparse")
47d79541 16497 (version "1.6.2")
79869f80
RW
16498 (source
16499 (origin
16500 (method url-fetch)
16501 (uri (pypi-uri "astunparse" version))
16502 (sha256
47d79541 16503 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
79869f80 16504 (build-system python-build-system)
47d79541 16505 (arguments '(#:tests? #f)) ; there are none
79869f80
RW
16506 (propagated-inputs
16507 `(("python-six" ,python-six)
16508 ("python-wheel" ,python-wheel)))
16509 (home-page "https://github.com/simonpercivall/astunparse")
16510 (synopsis "AST unparser for Python")
16511 (description "This package provides an AST unparser for Python. It is a
16512factored out version of @code{unparse} found in the Python source
16513distribution.")
16514 (license license:bsd-3)))
16515
2884aac0
RW
16516(define-public python-gast
16517 (package
16518 (name "python-gast")
bd300261 16519 (version "0.2.2")
2884aac0
RW
16520 (source
16521 (origin
16522 (method url-fetch)
16523 (uri (pypi-uri "gast" version))
16524 (sha256
bd300261 16525 (base32 "1w5dzdb3gpcfmd2s0b93d8gff40a1s41rv31458z14inb3s9v4zy"))))
2884aac0
RW
16526 (build-system python-build-system)
16527 (propagated-inputs
16528 `(("python-astunparse" ,python-astunparse)))
16529 (home-page "https://pypi.org/project/gast/")
16530 (synopsis "Generic Python AST that abstracts the underlying Python version")
16531 (description
16532 "GAST provides a compatibility layer between the AST of various Python
16533versions, as produced by @code{ast.parse} from the standard @code{ast}
16534module.")
16535 (license license:bsd-3)))
16536
44d10b1f
RW
16537(define-public python-wikidata
16538 (package
16539 (name "python-wikidata")
16540 (version "0.6.1")
16541 (source
16542 (origin
16543 (method url-fetch)
16544 (uri (pypi-uri "Wikidata" version))
16545 (sha256
16546 (base32
16547 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
16548 (build-system python-build-system)
16549 (propagated-inputs
16550 `(("python-babel" ,python-babel)))
16551 (home-page "https://github.com/dahlia/wikidata")
16552 (synopsis "Wikidata client library")
16553 (description
16554 "This package provides a Python interface to
16555@url{https://www.wikidata.org/, Wikidata}.")
16556 (properties '((upstream-name . "Wikidata")))
16557 (license license:gpl3+)))
16558
16559(define-public python-doctest-ignore-unicode
16560 (package
16561 (name "python-doctest-ignore-unicode")
16562 (version "0.1.2")
16563 (source
16564 (origin
16565 (method url-fetch)
16566 (uri (pypi-uri "doctest-ignore-unicode" version))
16567 (sha256
16568 (base32
16569 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
16570 (build-system python-build-system)
16571 (native-inputs
16572 `(("python-nose" ,python-nose)))
16573 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
16574 (synopsis "Ignore Unicode literal prefixes in doctests")
16575 (description
16576 "This package adds support for a flag to ignore Unicode literal prefixes
16577in doctests.")
16578 (license license:asl2.0)))
16579
16580(define-public python-attr
16581 (package
16582 (name "python-attr")
16583 (version "0.3.1")
16584 (source
16585 (origin
16586 (method url-fetch)
16587 (uri (pypi-uri "attr" version))
16588 (sha256
16589 (base32
16590 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
16591 (build-system python-build-system)
16592 (home-page "https://github.com/denis-ryzhkov/attr")
16593 (synopsis "Decorator for attributes of target function or class")
16594 (description "Simple decorator to set attributes of target function or
16595class in a @acronym{DRY, Don't Repeat Yourself} way.")
16596 (license license:expat)))
f98232a3
VC
16597
16598(define-public python-construct
16599 (package
16600 (name "python-construct")
d854ab15 16601 (version "2.10.56")
f98232a3
VC
16602 (source
16603 (origin
16604 (method url-fetch)
16605 (uri (pypi-uri "construct" version))
16606 (sha256
16607 (base32
d854ab15 16608 "0q86jjzsvy835h3c8pjj4619vbp7ihfg8njmyw86ym4qrpni7flp"))))
f98232a3
VC
16609 (build-system python-build-system)
16610 (arguments
16611 `(#:tests? #f)) ; No tests exist.
16612 (propagated-inputs
16613 `(("python-extras" ,python-extras)
16614 ("python-arrow" ,python-arrow)
16615 ("python-numpy" ,python-numpy)
16616 ("python-ruamel.yaml" ,python-ruamel.yaml)))
aabc8954 16617 (home-page "https://construct.readthedocs.io")
f98232a3
VC
16618 (synopsis "Declarative and symmetrical parser and builder for binary data")
16619 (description
16620 "This package provides both simple, atomic constructs (such as
16621integers of various sizes), as well as composite ones which allow you
16622form hierarchical and sequential structures of increasing complexity.
16623It features bit and byte granularity, easy debugging and testing, an
16624easy-to-extend subclass system, and lots of primitive constructs to
16625make your work easier.")
16626 (license license:expat)))
b742c006
LF
16627
16628(define-public python-humanize
16629 (package
16630 (name "python-humanize")
16631 (version "0.5.1")
16632 (source
16633 (origin
16634 (method url-fetch)
16635 (uri (pypi-uri "humanize" version))
16636 (sha256
16637 (base32
16638 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
16639 (arguments
16640 '(#:tests? #f)) ; tests not in pypi archive
16641 (build-system python-build-system)
16642 (home-page "https://github.com/jmoiron/humanize")
16643 (synopsis "Print numerical information in a human-readable form")
16644 (description "This package provides a Python module that displays numbers
16645and dates in \"human readable\" forms. For example, it would display
16646\"12345591313\" as \"12.3 billion\".")
16647 (license license:expat)))
d5bbf66d
LF
16648
16649(define-public python-txaio
16650 (package
16651 (name "python-txaio")
16652 (version "18.8.1")
16653 (source
16654 (origin
16655 (method url-fetch)
16656 (uri (pypi-uri "txaio" version))
16657 (sha256
16658 (base32
16659 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
16660 (build-system python-build-system)
16661 (propagated-inputs
16662 `(("python-twisted" ,python-twisted)
16663 ("python-six" ,python-six)))
16664 (home-page "https://github.com/crossbario/txaio")
16665 (synopsis "Compatibility layer between Python asyncio and Twisted")
16666 (description "Txaio provides a compatibility layer between the Python
16667@code{asyncio} module and @code{Twisted}.")
16668 (license license:expat)))
963dfd3a
RW
16669
16670(define-public python-toolshed
16671 (package
16672 (name "python-toolshed")
16673 (version "0.4.6")
16674 (source
16675 (origin
16676 (method url-fetch)
16677 (uri (pypi-uri "toolshed" version))
16678 (sha256
16679 (base32
16680 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
16681 (build-system python-build-system)
16682 (native-inputs
16683 `(("python-nose" ,python-nose)))
16684 (home-page "https://github.com/brentp/toolshed/")
16685 (synopsis "Collection of modules and functions for working with data")
16686 (description "This is a collection of well-tested, simple modules and
16687functions that aim to reduce boilerplate when working with data.")
16688 (license license:bsd-2)))
c91ecf2d
RW
16689
16690(define-public python-annoy
16691 (package
16692 (name "python-annoy")
16693 (version "1.15.1")
16694 (source
16695 (origin
16696 (method url-fetch)
16697 (uri (pypi-uri "annoy" version))
16698 (sha256
16699 (base32
16700 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
16701 (build-system python-build-system)
16702 (native-inputs
16703 `(("python-nose" ,python-nose)))
16704 (home-page "https://github.com/spotify/annoy/")
16705 (synopsis "Approximate nearest neighbors library")
16706 (description
16707 "Annoy is a C++ library with Python bindings to search for points in
16708space that are close to a given query point. It also creates large read-only
16709file-based data structures that are @code{mmap}ped into memory so that many
16710processes may share the same data.")
16711 (license license:asl2.0)))
412342d1 16712
79bfa422 16713(define-public python-pylzma
412342d1 16714 (package
79bfa422
DM
16715 (name "python-pylzma")
16716 (version "0.5.0")
16717 (source
16718 (origin
16719 (method url-fetch)
16720 (uri (pypi-uri "pylzma" version))
16721 (sha256
16722 (base32
16723 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
412342d1 16724 (build-system python-build-system)
79bfa422
DM
16725 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
16726 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
16727 (description "This package provides Python bindings for the LZMA library
16728by Igor Pavlov.")
16729 (license license:lgpl2.1+)))
16730
16731(define-public python2-pylzma
16732 (package-with-python2 python-pylzma))
f825e605 16733
6609ebe7
AG
16734(define-public python2-zeroconf
16735 (package
16736 (name "python2-zeroconf")
16737
16738 ;; This is the last version that supports Python 2.x.
16739 (version "0.19.1")
16740 (source
16741 (origin
16742 (method url-fetch)
16743 (uri (pypi-uri "zeroconf" version))
16744 (sha256
16745 (base32
16746 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
16747 (build-system python-build-system)
16748 (arguments
16749 `(#:python ,python-2
16750 #:phases
16751 (modify-phases %standard-phases
16752 (add-after 'unpack 'patch-requires
16753 (lambda* (#:key inputs #:allow-other-keys)
16754 (substitute* "setup.py"
16755 (("enum-compat")
16756 "enum34"))
16757 #t)))))
16758 (native-inputs
16759 `(("python2-six" ,python2-six)
16760 ("python2-enum32" ,python2-enum34)
16761 ("python2-netifaces" ,python2-netifaces)
16762 ("python2-typing" ,python2-typing)))
16763 (home-page "https://github.com/jstasiak/python-zeroconf")
16764 (synopsis "Pure Python mDNS service discovery")
16765 (description
16766 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
16767compatible).")
16768 (license license:lgpl2.1+)))
16769
f825e605
GLV
16770(define-public python-bsddb3
16771 (package
16772 (name "python-bsddb3")
16773 (version "6.2.6")
16774 (source
16775 (origin
16776 (method url-fetch)
16777 (uri (pypi-uri "bsddb3" version))
16778 (sha256
16779 (base32
16780 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
16781 (build-system python-build-system)
16782 (inputs
16783 `(("bdb" ,bdb)))
16784 (arguments
16785 '(#:phases
16786 (modify-phases %standard-phases
16787 (add-after 'unpack 'configure-locations
16788 (lambda* (#:key inputs #:allow-other-keys)
16789 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
16790 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
16791 #t))
16792 (replace 'check
16793 (lambda _
16794 (invoke "python3" "test3.py" "-v"))))))
16795 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
16796 (synopsis "Python bindings for Oracle Berkeley DB")
16797 (description
16798 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
16799C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
16800Transaction objects, and each of these is exposed as a Python type in the
16801bsddb3.db module. The database objects can use various access methods: btree,
16802hash, recno, and queue. Complete support of Berkeley DB distributed
16803transactions. Complete support for Berkeley DB Replication Manager.
16804Complete support for Berkeley DB Base Replication. Support for RPC.")
16805 (license license:bsd-3)))
edeb04bf
PL
16806
16807(define-public python-dbfread
16808 (package
16809 (name "python-dbfread")
16810 (version "2.0.7")
16811 (source (origin
16812 (method url-fetch)
16813 (uri (pypi-uri "dbfread" version))
16814 (sha256
16815 (base32
16816 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
16817 (build-system python-build-system)
16818 (native-inputs
16819 `(("python-pytest" ,python-pytest)))
16820 (home-page "https://dbfread.readthedocs.io")
16821 (synopsis "Read DBF Files with Python")
16822 (description
16823 "This library reads DBF files and returns the data as native Python data
16824types for further processing. It is primarily intended for batch jobs and
16825one-off scripts.")
16826 (license license:expat)))
e308b4f0
JM
16827
16828(define-public python-cached-property
16829 (package
16830 (name "python-cached-property")
16831 (version "1.5.1")
16832 (source
16833 (origin
16834 (method url-fetch)
16835 (uri (pypi-uri "cached-property" version))
16836 (sha256
16837 (base32
16838 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
16839 (build-system python-build-system)
16840 (arguments
16841 `(#:phases
16842 (modify-phases %standard-phases
16843 ;; https://github.com/pydanny/cached-property/issues/131
16844 ;; recent versions of freezegun break one test
16845 (add-after 'unpack 'disable-broken-test
16846 (lambda _
16847 (substitute* "tests/test_cached_property.py"
16848 (("def test_threads_ttl_expiry\\(self\\)" m)
16849 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
16850 " " m)))
16851 #t)))))
16852 (native-inputs
16853 `(("python-freezegun" ,python-freezegun)))
16854 (home-page
16855 "https://github.com/pydanny/cached-property")
16856 (synopsis
16857 "Decorator for caching properties in classes")
16858 (description
16859 "This package provides a decorator which makes caching
16860time-or-computationally-expensive properties quick and easy and works in Python
168612 or 3.")
16862 (license license:bsd-3)))
dfe8a704
NG
16863
16864(define-public python-folium
16865 (package
16866 (name "python-folium")
d3bc1ea9 16867 (version "0.10.1")
dfe8a704
NG
16868 (source
16869 (origin
16870 (method url-fetch)
16871 (uri (pypi-uri "folium" version))
16872 (sha256
16873 (base32
d3bc1ea9 16874 "0gcc267wxwxr57ry86pqpbiyfvl0g48hfvgy0f2mz9s58g87kgzd"))))
dfe8a704
NG
16875 (build-system python-build-system)
16876 (propagated-inputs
16877 `(("python-branca" ,python-branca)
16878 ("python-jinja2" ,python-jinja2)
16879 ("python-numpy" ,python-numpy)
16880 ("python-requests" ,python-requests)))
16881 (native-inputs
16882 `(("python-pytest" ,python-pytest)))
16883 (home-page "https://github.com/python-visualization/folium")
16884 (synopsis "Make beautiful maps with Leaflet.js & Python")
16885 (description "@code{folium} makes it easy to visualize data that’s been
16886manipulated in Python on an interactive leaflet map. It enables both the
16887binding of data to a map for @code{choropleth} visualizations as well as
16888passing rich vector/raster/HTML visualizations as markers on the map.
16889
16890The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
16891Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
16892supports Image, Video, GeoJSON and TopoJSON overlays.")
16893 (license license:expat)))
9dd5f475
LC
16894
16895(define-public jube
16896 (package
16897 ;; This is a command-line tool, so no "python-" prefix.
16898 (name "jube")
16899 (version "2.2.2")
16900 (source (origin
16901 (method url-fetch)
16902 (uri (string-append
16903 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
16904 version))
16905 (sha256
16906 (base32
16907 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
16908 (file-name (string-append "jube-" version ".tar.gz"))))
16909 (build-system python-build-system)
16910 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
16911 (synopsis "Benchmarking environment")
16912 (description
16913 "JUBE helps perform and analyze benchmarks in a systematic way. For each
16914benchmarked application, benchmark data is stored in a format that allows JUBE
16915to deduct the desired information. This data can be parsed by automatic pre-
16916and post-processing scripts that draw information and store it more densely
16917for manual interpretation.")
a9f33960 16918 (license license:gpl3+)))
66436424
NG
16919
16920(define-public python-pyroutelib3
16921 (package
16922 (name "python-pyroutelib3")
16923 (version "1.3.post1")
16924 (source
16925 (origin
16926 (method url-fetch)
16927 (uri (pypi-uri "pyroutelib3" version))
16928 (sha256
16929 (base32
16930 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
16931 (build-system python-build-system)
16932 (propagated-inputs
16933 `(("python-dateutil" ,python-dateutil)))
16934 (home-page "https://github.com/MKuranowski/pyroutelib3")
16935 (synopsis "Library for simple routing on OSM data")
16936 (description "Library for simple routing on OSM data")
16937 (license license:gpl3+)))
30e7c03a 16938
c1bbef69
16939(define-public python-bibtexparser
16940 (package
16941 (name "python-bibtexparser")
16942 (version "1.1.0")
16943 (source
16944 (origin
16945 (method url-fetch)
16946 (uri (pypi-uri "bibtexparser" version))
16947 (sha256
16948 (base32
16949 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
16950 (build-system python-build-system)
16951 (propagated-inputs
16952 `(("python-pyparsing" ,python-pyparsing)))
16953 (native-inputs
16954 `(("python-future" ,python-future)))
16955 (home-page "https://github.com/sciunto-org/python-bibtexparser")
16956 (synopsis "Python library to parse BibTeX files")
16957 (description "BibtexParser is a Python library to parse BibTeX files.")
16958 (license (list license:bsd-3 license:lgpl3))))
8581b40d
HG
16959
16960(define-public python-distro
16961 (package
16962 (name "python-distro")
16963 (version "1.4.0")
16964 (source
16965 (origin
16966 (method url-fetch)
16967 (uri (pypi-uri "distro" version))
16968 (sha256
16969 (base32
16970 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
16971 (build-system python-build-system)
16972 (native-inputs
16973 `(("python-pytest" ,python-pytest)))
16974 (home-page "https://github.com/nir0s/distro")
16975 (synopsis
16976 "OS platform information API")
16977 (description
16978 "@code{distro} provides information about the OS distribution it runs on,
16979such as a reliable machine-readable ID, or version information.
16980
16981It is the recommended replacement for Python's original
16982`platform.linux_distribution` function (which will be removed in Python 3.8).
16983@code{distro} also provides a command-line interface to output the platform
16984information in various formats.")
16985 (license license:asl2.0)))
f2f41e1a
HG
16986
16987(define-public python-cairosvg
16988 (package
16989 (name "python-cairosvg")
16990 (version "2.4.2")
16991 (source
16992 (origin
16993 (method url-fetch)
16994 (uri (pypi-uri "CairoSVG" version))
16995 (sha256
16996 (base32 "1bb7irxbaxxb9ahm3z5wsx1q96mm5gzskc7b6q07h9ikcnb8yrjf"))))
16997 (build-system python-build-system)
16998 (arguments
16999 `(#:phases
17000 (modify-phases %standard-phases
17001 (replace 'check
17002 (lambda _ (invoke "pytest"))))))
17003 (propagated-inputs
17004 `(("python-cairocffi" ,python-cairocffi)
17005 ("python-cssselect2" ,python-cssselect2)
17006 ("python-defusedxml" ,python-defusedxml)
17007 ("python-pillow" ,python-pillow)
17008 ("python-tinycss2" ,python-tinycss2)))
17009 (native-inputs
17010 `(("python-pytest-flake8" ,python-pytest-flake8)
17011 ("python-pytest-isort" ,python-pytest-isort)
17012 ("python-pytest-runner" ,python-pytest-runner)))
17013 (home-page "https://cairosvg.org/")
17014 (synopsis "SVG to PDF/PS/PNG converter based on Cairo")
17015 (description "CairoSVG is a SVG converter based on Cairo. It can export
17016SVG files to PDF, PostScript and PNG files. The main part of CairoSVG is a
17017SVG parser, trying to follow the SVG 1.1 recommendation from the W3C. Once
17018parsed, the result is drawn to a Cairo surface that can be exported to
17019qvarious formats: PDF, PostScript, PNG and even SVG.")
17020 (license license:lgpl3+)))
ea1801e0
HG
17021
17022(define-public python-pyphen
17023 (package
17024 (name "python-pyphen")
17025 (version "0.9.5")
17026 (source
17027 (origin
17028 (method url-fetch)
17029 (uri (pypi-uri "Pyphen" version))
17030 (sha256
17031 (base32 "08c9y69ry9d6m4zalhnalg86lsp9v2j5n1ziw5vxfmiihx83lqrv"))))
17032 (build-system python-build-system)
17033 ;; TODO: Use the Guix system hyphenation packages hyphen-* rather than the
17034 ;; embedded set provided by upstream - like Debian does.
17035 (home-page "https://github.com/Kozea/Pyphen")
17036 (synopsis "Pure Python module to hyphenate text")
17037 (description "Pyphen is a pure Python module to hyphenate text using
17038existing Hunspell hyphenation dictionaries.")
17039 (license (list license:gpl2 license:lgpl2.1 license:mpl1.1))))
85cfb0e9
CL
17040
17041(define-public python-intelhex
17042 (package
17043 (name "python-intelhex")
17044 (version "2.2.1")
17045 (source
17046 (origin
17047 (method url-fetch)
17048 (uri (pypi-uri "intelhex" version))
17049 (sha256
17050 (base32
17051 "0ckqjbxd8gwcg98gfzpn4vq1qxzfvq3rdbrr1hikj1nmw08qb780"))))
17052 (build-system python-build-system)
17053 (arguments '(#:tests? #f)) ;issue with version
17054 (home-page "https://pypi.org/project/IntelHex/")
17055 (synopsis "Python library for Intel HEX files manipulations")
17056 (description "The Intel HEX file format is widely used in microprocessors
17057and microcontrollers area (embedded systems etc.) as the de facto standard for
17058representation of code to be programmed into microelectronic devices. This
17059package provides an intelhex Python library to read, write, create from
17060scratch and manipulate data from Intel HEX file format. It also includes
17061several convenience Python scripts, including \"classic\" hex2bin and bin2hex
17062converters and more, those based on the library itself.")
17063 (license license:bsd-3)))
34bf6869
CL
17064
17065(define-public python-pykwalify
17066 (package
17067 (name "python-pykwalify")
17068 (version "1.7.0")
17069 (source
17070 (origin
17071 (method url-fetch)
17072 (uri (pypi-uri "pykwalify" version))
17073 (sha256
17074 (base32
17075 "1cnfzkg1b01f825ikpw2fhjclf9c8akxjfrbd1vc22x1lg2kk2vy"))))
17076 (build-system python-build-system)
17077 (arguments '(#:tests? #f)) ;missing dependencies
17078 (propagated-inputs
17079 `(("python-dateutil" ,python-dateutil)
17080 ("python-docopt" ,python-docopt)
17081 ("python-pyyaml" ,python-pyyaml)))
17082 (home-page "https://github.com/grokzen/pykwalify")
17083 (synopsis
17084 "Python lib/cli for JSON/YAML schema validation")
17085 (description
17086 "This package provides a parser, schema validator, and data binding tool
17087for YAML and JSON.")
17088 (license license:expat)))
e2ebbbcc
KK
17089
17090(define-public python-dbusmock
17091 (package
022b0d5f
BG
17092 (name "python-dbusmock")
17093 (version "0.18.3")
17094 (source
17095 (origin
17096 (method url-fetch)
17097 (uri (pypi-uri "python-dbusmock" version))
17098 (sha256
e2ebbbcc 17099 (base32
022b0d5f
BG
17100 "0hp2kyac88nh9iv6l8hlmv7s1sa1s5f1a3wc2pmlmmxnd211fjlr"))))
17101 (build-system python-build-system)
17102 (arguments
17103 '(#:phases
17104 (modify-phases %standard-phases
17105 (add-after 'unpack 'patch-shell-path
17106 (lambda _
17107 (substitute* "tests/test_code.py"
17108 (("/bin/bash") (which "bash")))
17109 #t)))))
17110 (native-inputs
17111 `(;; For tests.
17112 ("dbus" ,dbus) ; for dbus-daemon
17113 ("python-nose" ,python-nose)
17114 ("which" ,which)))
17115 (propagated-inputs
17116 `(("python-dbus" ,python-dbus)
17117 ("python-pygobject" ,python-pygobject)))
17118 (home-page "https://github.com/martinpitt/python-dbusmock")
17119 (synopsis "Python library for mock D-Bus objects")
17120 (description "python-dbusmock allows for the easy creation of mock objects on
e2ebbbcc
KK
17121D-Bus. This is useful for writing tests for software which talks to D-Bus
17122services such as upower, systemd, logind, gnome-session or others, and it is
17123hard (or impossible without root privileges) to set the state of the real
17124services to what you expect in your tests.")
022b0d5f 17125 (license license:lgpl3+)))
b657b23f
BG
17126
17127(define-public python-ujson
17128 (package
17129 (name "python-ujson")
17130 (version "1.35")
17131 (source
17132 (origin
17133 (method url-fetch)
17134 (uri (pypi-uri "ujson" version))
17135 (sha256
17136 (base32
17137 "11jz5wi7mbgqcsz52iqhpyykiaasila4lq8cmc2d54bfa3jp6q7n"))))
17138 (build-system python-build-system)
17139 (home-page "http://www.esn.me")
17140 (synopsis
17141 "Ultra fast JSON encoder and decoder for Python")
17142 (description
17143 "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with
17144 bindings for Python 2.5+ and 3.")
17145 (license license:bsd-3)))
17146
17147(define-public python2-ujson
17148 (package-with-python2 python-ujson))
dbcef44a
MIP
17149
17150(define-public python-iocapture
17151 ;; The latest release is more than a year older than this commit.
17152 (let ((commit "fdc021c431d0840303908dfc3ca8769db383595c")
17153 (revision "1"))
17154 (package
17155 (name "python-iocapture")
17156 (version "0.1.2")
17157 (source
17158 (origin
17159 (method git-fetch)
17160 (uri (git-reference
17161 (url "https://github.com/oinume/iocapture.git")
17162 (commit commit)))
17163 (file-name (git-file-name name version))
17164 (sha256
17165 (base32
17166 "1mkbhqibxvgwg0p7slr8dfraa3g2s6bsayladhax2jccwj4kcndz"))))
17167 (build-system python-build-system)
17168 (arguments
17169 `(#:phases
17170 (modify-phases %standard-phases
17171 (delete 'check)
17172 (add-after 'install 'check
17173 (lambda* (#:key inputs outputs #:allow-other-keys)
17174 (add-installed-pythonpath inputs outputs)
17175 (invoke "py.test" "-v" "tests")
17176 #t)))))
17177 (propagated-inputs
17178 `(("python-flexmock" ,python-flexmock)
17179 ("python-pytest" ,python-pytest)
17180 ("python-pytest-cov" ,python-pytest-cov)
17181 ("python-six" ,python-six)))
17182 (home-page "https://github.com/oinume/iocapture")
17183 (synopsis "Python capturing tool for stdout and stderr")
17184 (description
17185 "This package helps you to capture the standard out (stdout) and the
17186standard error channel (stderr) in your program.")
17187 (license license:expat))))
db6bd842
MIP
17188
17189(define-public python-argh
17190 ;; There are 21 commits since the latest release containing important
17191 ;; improvements.
17192 (let ((commit "dcd3253f2994400a6a58a700c118c53765bc50a4")
17193 (revision "1"))
17194 (package
17195 (name "python-argh")
17196 (version (git-version "0.26.2" revision commit))
17197 (source
17198 (origin
17199 (method git-fetch)
17200 (uri (git-reference
17201 (url "https://github.com/neithere/argh.git")
17202 (commit commit)))
17203 (file-name (git-file-name name version))
17204 (sha256
17205 (base32
17206 "1p5h3dnpbsjmqrvil96s71asc6i3gpinmbrabqmwnrsxprz7r3ns"))))
17207 (build-system python-build-system)
17208 (propagated-inputs
17209 `(("python-iocapture" ,python-iocapture)
17210 ("python-mock" ,python-mock)
17211 ("python-pytest" ,python-pytest)
17212 ("python-pytest-cov" ,python-pytest-cov)
17213 ("python-pytest-xdist" ,python-pytest-xdist)
17214 ("python-tox" ,python-tox)))
17215 (home-page "https://github.com/neithere/argh/")
17216 (synopsis "Argparse wrapper with natural syntax")
17217 (description
17218 "python-argh is a small library that provides several layers of
17219abstraction on top of @code{python-argparse}. The layers can be mixed. It is
17220always possible to declare a command with the highest possible (and least
17221flexible) layer and then tune the behaviour with any of the lower layers
17222including the native API of @code{python-argparse}.")
17223 (license license:lgpl3+))))
073723fa
MIP
17224
17225(define-public python-ppft
17226 (package
17227 (name "python-ppft")
17228 (version "1.6.6.1")
17229 (source
17230 (origin
17231 (method url-fetch)
17232 (uri (pypi-uri "ppft" version))
17233 (sha256
17234 (base32
17235 "1z1invkhszc5d2mvgr221v7cszzifcc77mz0pv3wjp6x5q2768cy"))))
17236 (build-system python-build-system)
17237 (arguments '(#:tests? #f)) ; there are none
17238 (propagated-inputs
17239 `(("python-six" ,python-six)))
17240 (home-page "https://pypi.org/project/ppft/")
17241 (synopsis "Fork of Parallel Python")
17242 (description
17243 "This package is a fork of Parallel Python. The Parallel Python
17244module (@code{pp}) provides an easy and efficient way to create
17245parallel-enabled applications for @dfn{symmetric multiprocessing} (SMP)
17246computers and clusters. It features cross-platform portability and dynamic
17247load balancing.")
17248 (license license:bsd-3)))
8451ea19
MIP
17249
17250(define-public python-pox
17251 (package
17252 (name "python-pox")
17253 (version "0.2.7")
17254 (source
17255 (origin
17256 (method url-fetch)
17257 (uri (pypi-uri "pox" version))
17258 (sha256
17259 (base32
17260 "0y17ckc2p6i6709s279sjdj4q459mpcc38ymg9zv9y6vl6jf3bq6"))))
17261 (build-system python-build-system)
17262 (arguments
17263 `(#:phases
17264 (modify-phases %standard-phases
17265 (replace 'check
17266 (lambda _
17267 (mkdir-p "/tmp/guix")
17268 (setenv "SHELL" "bash")
17269 (setenv "USERNAME" "guix")
17270 (setenv "HOME" "/tmp/guix") ; must end on USERNAME...
17271 (invoke "py.test" "-vv")
17272 #t)))))
17273 (native-inputs
17274 `(("python-pytest" ,python-pytest)
17275 ("which" ,which)))
17276 (home-page "https://pypi.org/project/pox/")
17277 (synopsis "Python utilities for filesystem exploration and automated builds")
17278 (description
17279 "Pox provides a collection of utilities for navigating and manipulating
17280filesystems. This module is designed to facilitate some of the low level
17281operating system interactions that are useful when exploring a filesystem on a
17282remote host. Pox provides Python equivalents of several shell commands such
17283as @command{which} and @command{find}. These commands allow automated
17284discovery of what has been installed on an operating system, and where the
17285essential tools are located.")
17286 (license license:bsd-3)))
7e476ae8
MIP
17287
17288(define-public python-pathos
17289 (package
17290 (name "python-pathos")
17291 (version "0.2.5")
17292 (source
17293 (origin
17294 (method url-fetch)
17295 (uri (pypi-uri "pathos" version))
17296 (sha256
17297 (base32
17298 "0in8hxdz7k081ijn6q94gr39ycy7363sx4zysmbwyvd7snqjrbi1"))))
17299 (build-system python-build-system)
8f82e7e3
EF
17300 (arguments
17301 '(#:phases
17302 (modify-phases %standard-phases
17303 (replace 'check
17304 (lambda _
17305 (setenv "PYTHONPATH"
17306 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
17307 (invoke "python" "./tests/__main__.py"))))))
7e476ae8
MIP
17308 (propagated-inputs
17309 `(("python-dill" ,python-dill)
17310 ("python-multiprocess" ,python-multiprocess)
17311 ("python-pox" ,python-pox)
17312 ("python-ppft" ,python-ppft)))
8f82e7e3
EF
17313 (native-inputs
17314 `(("python-pytest" ,python-pytest)))
7e476ae8
MIP
17315 (home-page "https://pypi.org/project/pathos/")
17316 (synopsis
17317 "Parallel graph management and execution in heterogeneous computing")
17318 (description
17319 "Python-pathos is a framework for heterogenous computing. It provides a
17320consistent high-level interface for configuring and launching parallel
17321computations across heterogenous resources. Python-pathos provides configurable
17322launchers for parallel and distributed computing, where each launcher contains
17323the syntactic logic to configure and launch jobs in an execution environment.")
17324 (license license:bsd-3)))
54e5ee5a
BG
17325
17326(define-public python-flit
17327 (package
17328 (name "python-flit")
17329 (version "2.1.0")
17330 (source
17331 (origin
17332 (method url-fetch)
17333 (uri (pypi-uri "flit" version))
17334 (sha256
17335 (base32
17336 "0h5vvmqinqzn97mr3ix7zx53af9ad4fimjjwqpx88yp8qhz4r5bc"))))
17337 (build-system python-build-system)
17338 (arguments
17339 `(#:tests? #f)) ; XXX: Check requires network access.
17340 (home-page "https://flit.readthedocs.io/")
17341 (synopsis
17342 "Simple packaging tool for simple packages")
17343 (description
17344 "Flit is a simple way to put Python packages and modules on PyPI. Flit
17345packages a single importable module or package at a time, using the import
17346name as the name on PyPI. All subpackages and data files within a package
17347are included automatically.")
17348 (license license:bsd-3)))
02139b42
BG
17349
17350(define-public python-pathtools
17351 (package
17352 (name "python-pathtools")
17353 (version "0.1.2")
17354 (source
17355 (origin
17356 (method url-fetch)
17357 (uri (pypi-uri "pathtools" version))
17358 (sha256
17359 (base32
17360 "1h7iam33vwxk8bvslfj4qlsdprdnwf8bvzhqh3jq5frr391cadbw"))))
17361 (build-system python-build-system)
17362 (home-page
17363 "https://github.com/gorakhargosh/pathtools")
17364 (synopsis "Path utilities for Python")
17365 (description "Pattern matching and various utilities for file systems
17366paths.")
17367 (license license:expat)))
6b520177
JG
17368
17369(define-public python-fastentrypoints
17370 (package
17371 (name "python-fastentrypoints")
17372 (version "0.12")
17373 (source
17374 (origin
17375 (method url-fetch)
17376 (uri (pypi-uri "fastentrypoints" version))
17377 (sha256
17378 (base32
17379 "02s1j8i2dzbpbwgq2a3fiqwm3cnmhii2qzc0k42l0rdxd4a4ya7z"))))
17380 (build-system python-build-system)
17381 (home-page
17382 "https://github.com/ninjaaron/fast-entry_points")
17383 (synopsis
17384 "Makes entry_points specified in setup.py load more quickly")
17385 (description
17386 "Using entry_points in your setup.py makes scripts that start really
17387slowly because it imports pkg_resources. This package allows such setup
17388scripts to load entry points more quickly.")
17389 (license license:bsd-3)))
c5eb8cf8
JG
17390
17391(define-public python-funcparserlib
17392 (package
17393 (name "python-funcparserlib")
17394 (version "0.3.6")
17395 (source
17396 (origin
17397 (method url-fetch)
17398 (uri (pypi-uri "funcparserlib" version))
17399 (sha256
17400 (base32
17401 "07f9cgjr3h4j2m67fhwapn8fja87vazl58zsj4yppf9y3an2x6dp"))))
17402 (native-inputs
17403 `(("python-tox" ,python-tox)))
17404 (arguments
17405 `(#:phases
17406 (modify-phases %standard-phases
17407 (replace 'check
17408 (lambda _
17409 (invoke "tox"))))))
17410 (build-system python-build-system)
17411 (home-page
17412 "https://github.com/vlasovskikh/funcparserlib")
17413 (synopsis
17414 "Recursive descent parsing library based on functional combinators")
17415 (description
11140cf1 17416 "This package is a recursive descent parsing library for Python based on
c5eb8cf8
JG
17417functional combinators. Parser combinators are just higher-order functions
17418that take parsers as their arguments and return them as result values.")
17419 (license license:expat)))
602f3b67
NG
17420
17421(define-public python-speg
17422 (package
17423 (name "python-speg")
17424 (version "0.3")
17425 (source
17426 (origin
17427 (method url-fetch)
17428 (uri (pypi-uri "speg" version ".zip"))
17429 (sha256
17430 (base32 "0w9y4jf4787dzhy6rvhwi0mpl0r8qkqmqmyv2hpwdpv8w53yzjqh"))))
17431 (arguments
17432 `(#:tests? #f)) ;FIXME: tests fail, not sure why
17433 (native-inputs
17434 `(("unzip" ,unzip)))
17435 (build-system python-build-system)
17436 (home-page "https://github.com/avakar/speg")
17437 (synopsis "PEG-based parser interpreter with memoization")
17438 (description "This package is a PEG-based parser and interpreter with
17439memoization.")
17440 (license license:expat)))
07c8177b
NG
17441
17442(define-public python-cson
17443 (package
17444 (name "python-cson")
17445 (version "0.8")
17446 (source
17447 (origin
17448 (method url-fetch)
17449 (uri (pypi-uri "cson" version))
17450 (sha256
17451 (base32 "00cyvigg4npbph39ghkg77xbxisa6plf75vii24igxfizik0337f"))))
17452 (build-system python-build-system)
17453 (propagated-inputs
17454 `(("python-speg" ,python-speg)))
17455 (home-page "https://github.com/avakar/pycson")
17456 (synopsis "Parser for Coffeescript Object Notation (CSON)")
17457 (description "This package is a parser for Coffeescript Object
17458Notation (CSON).")
17459 (license license:expat)))
e24c672e
LDB
17460
17461(define-public python-asynctest
17462 (package
17463 (name "python-asynctest")
17464 (version "0.13.0")
17465 (source
17466 (origin
17467 (method url-fetch)
17468 (uri (pypi-uri "asynctest" version))
17469 (sha256
17470 (base32
17471 "1b3zsy7p84gag6q8ai2ylyrhx213qdk2h2zb6im3xn0m5n264y62"))))
17472 (build-system python-build-system)
17473 (arguments
17474 '(#:phases
17475 (modify-phases %standard-phases
17476 (replace 'check
17477 (lambda _
17478 (invoke "python" "-X" "dev" "-m" "unittest" "-v" "test")))
17479 (add-after 'unpack 'disable-tests
17480 (lambda* _
17481 (substitute* "test/test_selector.py"
17482 ;; XXX: This test fails for unknown reason inside the build
17483 ;; environment.
17484 (("def test_events_watched_outside_test_are_ignored")
17485 "@unittest.skip('disabled by guix')
17486 def test_events_watched_outside_test_are_ignored")))))))
17487 (home-page "https://github.com/Martiusweb/asynctest")
17488 (synopsis "Extension of unittest for testing asyncio libraries")
17489 (description
17490 "The package asynctest is built on top of the standard unittest module
17491and cuts down boilerplate code when testing libraries for asyncio.")
17492 (license license:asl2.0)))
1cc9c38e
LDB
17493
17494(define-public python-aionotify
17495 (package
17496 (name "python-aionotify")
17497 (version "0.2.0")
17498 (source
17499 (origin
17500 ;; Source tarball on PyPi lacks tests
17501 (method git-fetch)
17502 (uri (git-reference
17503 (url "https://github.com/rbarrois/aionotify")
17504 (commit (string-append "v" version))))
17505 (file-name (git-file-name name version))
17506 (sha256
17507 (base32 "1sk9i8czxgsbrswsf1nlb4c82vgnlzi8zrvrxdip92w2z8hqh43y"))))
17508 (build-system python-build-system)
17509 (native-inputs `(("python-asynctest" ,python-asynctest)))
17510 (home-page "https://github.com/rbarrois/aionotify")
17511 (synopsis "Asyncio-powered inotify library")
17512 (description
17513 "@code{aionotify} is a simple, asyncio-based inotify library.")
17514 (license license:bsd-3)))
84efaa3b
LDB
17515
17516(define-public python-forbiddenfruit
17517 (package
17518 (name "python-forbiddenfruit")
17519 (version "0.1.3")
17520 (source
17521 (origin
17522 ;; Source tarball on PyPi lacks Makefile that builds and runs tests
17523 (method git-fetch)
17524 (uri (git-reference
17525 (url "https://github.com/clarete/forbiddenfruit")
17526 (commit version)))
17527 (file-name (git-file-name name version))
17528 (sha256
17529 (base32 "1fp2xvdqpi910j9r3q68x38phpxbm700gjdi2m2j5gs91xdnyyh2"))))
17530 (build-system python-build-system)
17531 (arguments
17532 '(#:phases
17533 (modify-phases %standard-phases
17534 (replace 'check
17535 (lambda _
17536 (invoke "make" "SKIP_DEPS=1"))))))
17537 (native-inputs
17538 `(("python-nose" ,python-nose)
17539 ("python-coverage" ,python-coverage)))
17540 (home-page "https://github.com/clarete/forbiddenfruit")
17541 (synopsis "Patch python built-in objects")
17542 (description "This project allows Python code to extend built-in types.")
17543 (license (list license:gpl3+ license:expat))))
9786258b
LDB
17544
17545(define-public python-shouldbe
17546 (package
17547 (name "python-shouldbe")
17548 (version "0.1.2")
17549 (source
17550 (origin
17551 (method url-fetch)
17552 (uri (pypi-uri "shouldbe" version))
17553 (sha256
17554 (base32
17555 "16zbvjxf71dl4yfbgcr6idyim3mdrfvix1dv8b95p0s9z07372pj"))))
17556 (build-system python-build-system)
17557 (propagated-inputs
17558 `(("python-forbiddenfruit" ,python-forbiddenfruit)))
17559 (native-inputs
17560 `(("python-nose" ,python-nose)))
17561 (home-page "https://github.com/directxman12/should_be")
17562 (synopsis "Python Assertion Helpers inspired by Shouldly")
17563 (description
17564 "Python Assertion Helpers inspired by Shouldly.")
17565 (license license:isc)))
72c2478a
LDB
17566
17567(define-public python-k5test
17568 (package
17569 (name "python-k5test")
17570 (version "0.9.2")
17571 (source
17572 (origin
17573 (method url-fetch)
17574 (uri (pypi-uri "k5test" version))
17575 (sha256
17576 (base32
17577 "1lqp3jgfngyhaxjgj3n230hn90wsylwilh120yjf62h7b1s02mh8"))))
17578 (build-system python-build-system)
17579 (propagated-inputs
17580 `(("python-six" ,python-six)
17581 ;; `which`, `kadmin.local` binaries called inside library
17582 ("which" ,which)
17583 ("mit-krb5" ,mit-krb5)))
17584 (native-inputs `(("mit-krb5" ,mit-krb5)))
17585 (arguments
17586 '(#:phases
17587 (modify-phases %standard-phases
17588 (add-after 'unpack 'patch-paths
17589 (lambda* _
17590 (substitute* "k5test/realm.py"
17591 (("'kadmin_local'") "'kadmin.local'")))))))
17592 (home-page "https://github.com/pythongssapi/k5test")
17593 (synopsis "Library for setting up self-contained Kerberos 5 environments")
17594 (description
17595 "@code{k5test} is a library for setting up self-contained Kerberos 5
17596environments, and running Python unit tests inside those environments. It is
17597based on the file of the same name found alongside the MIT Kerberos 5 unit
17598tests.")
17599 (license license:isc)))
a8ef4978
LDB
17600
17601(define-public python-gssapi
17602 (package
17603 (name "python-gssapi")
17604 (version "1.6.1")
17605 (source
17606 (origin
17607 (method url-fetch)
17608 (uri (pypi-uri "gssapi" version))
17609 (sha256
17610 (base32
17611 "1gymg4asvwrz7y13qpwp2s5g8qwq179d72gkj09q6bfcgs82l5wr"))))
17612 (build-system python-build-system)
17613 (propagated-inputs
17614 `(("python-decorator" ,python-decorator)
17615 ("python-six" ,python-six)))
17616 (inputs
17617 `(("mit-krb5" ,mit-krb5)))
17618 ;; for tests
17619 (native-inputs
17620 `(("python-shouldbe" ,python-shouldbe)
17621 ("python-parameterized" ,python-parameterized)
17622 ("python-k5test" ,python-k5test)
17623 ("python-nose" ,python-nose)))
17624 (home-page "https://github.com/pythongssapi/python-gssapi")
17625 (synopsis "Python GSSAPI Wrapper")
17626 (description
17627 "Python-GSSAPI provides both low-level and high level wrappers around the
17628GSSAPI C libraries. While it focuses on the Kerberos mechanism, it should
17629also be useable with other GSSAPI mechanisms.")
17630 (license license:isc)))
7261bdca
JL
17631
17632(define-public python-check-manifest
17633 (package
17634 (name "python-check-manifest")
17635 (version "0.37")
17636 (source
17637 (origin
17638 (method url-fetch)
17639 (uri (pypi-uri "check-manifest" version))
17640 (sha256
17641 (base32
17642 "0lk45ifdv2cpkl6ayfyix7jwmnxa1rha7xvb0ih5999k115wzqs4"))))
17643 (build-system python-build-system)
17644 (native-inputs
17645 `(("python-mock" ,python-mock)
17646 ("git" ,git)))
17647 (home-page "https://github.com/mgedmin/check-manifest")
17648 (synopsis "Check MANIFEST.in in a Python source package for completeness")
17649 (description "Python package can include a MANIFEST.in file to help with
17650sending package files to the Python Package Index. This package checks that
17651file to ensure it completely and accurately describes your project.")
17652 (license license:expat)))
b487b7b5
JL
17653
17654(define-public python-android-stringslib
17655 (package
17656 (name "python-android-stringslib")
17657 (version "0.1.2")
17658 (source
17659 (origin
17660 (method git-fetch)
17661 (uri (git-reference
17662 (url "https://framagit.org/tyreunom/python-android-strings-lib")
17663 (commit (string-append "v" version))))
17664 (file-name (git-file-name name version))
17665 (sha256
17666 (base32
17667 "0gij55qzzq1h83kfpvhai1vf78kkhyvxa6l17m2nl24454lhfin4"))))
17668 (build-system python-build-system)
17669 (arguments
17670 `(#:tests? #f))
17671 (home-page "https://framagit.org/tyreunom/python-android-strings-lib")
17672 (synopsis "Android strings.xml support")
17673 (description "Android Strings Lib provides support for android's strings.xml
17674files. These files are used to translate strings in android apps.")
17675 (license license:expat)))
87435943 17676
7dec888f
JL
17677(define-public python-watchdog
17678 (package
17679 (name "python-watchdog")
17680 (version "0.9.0")
17681 (source
17682 (origin
17683 (method url-fetch)
17684 (uri (pypi-uri "watchdog" version))
17685 (sha256
17686 (base32
17687 "07cnvvlpif7a6cg4rav39zq8fxa5pfqawchr46433pij0y6napwn"))))
17688 (build-system python-build-system)
17689 (arguments
17690 `(#:phases
17691 (modify-phases %standard-phases
17692 (add-before 'check 'remove-failing
17693 (lambda _
17694 (delete-file "tests/test_inotify_buffer.py")
17695 (delete-file "tests/test_snapshot_diff.py")
17696 #t)))))
17697 (propagated-inputs
17698 `(("python-argh" ,python-argh)
17699 ("python-pathtools" ,python-pathtools)
17700 ("python-pyyaml" ,python-pyyaml)))
17701 (native-inputs
17702 `(("python-pytest-cov" ,python-pytest-cov)
17703 ("python-pytest-timeout" ,python-pytest-timeout)))
17704 (home-page "https://github.com/gorakhargosh/watchdog")
17705 (synopsis "Filesystem events monitoring")
17706 (description "This package provides a way to monitor filesystem events
17707such as a file modification and trigger an action. This is similar to inotify,
17708but portable.")
17709 (license license:asl2.0)))
2cbede59 17710
9c9704a9
MC
17711(define-public python-wget
17712 (package
17713 (name "python-wget")
17714 (version "3.2")
17715 (source
17716 (origin
17717 (method url-fetch)
17718 (uri (pypi-uri "wget" version ".zip"))
17719 (sha256
17720 (base32
17721 "0qb0y7ipby42m4m7h0ipazpdyc3bn9xi46lvifcwwl5albn31rim"))))
17722 (build-system python-build-system)
17723 (native-inputs `(("unzip" ,unzip)))
17724 (home-page "https://bitbucket.org/techtonik/python-wget/")
17725 (synopsis "Pure Python download utility")
17726 (description "The python-wget library provides an API to download files
17727with features similar to the @command{wget} utility.")
17728 (license license:unlicense)))
17729
2cbede59
JL
17730(define-public offlate
17731 (package
17732 (name "offlate")
17733 (version "0.5")
17734 (source
17735 (origin
17736 (method git-fetch)
17737 (uri (git-reference
17738 (url "https://framagit.org/tyreunom/offlate")
17739 (commit version)))
17740 (file-name (git-file-name name version))
17741 (sha256
17742 (base32
17743 "13pqnbl05wcyldfvl75fp89vjgwsvxyc69vhnb17kkha2rc2k1h7"))))
17744 (build-system python-build-system)
17745 (arguments
17746 ;; No tests
17747 `(#:tests? #f))
17748 (propagated-inputs
17749 `(("python-android-stringslib" ,python-android-stringslib)
17750 ("python-dateutil" ,python-dateutil)
17751 ("python-gitlab" ,python-gitlab)
17752 ("python-lxml" ,python-lxml)
17753 ("python-polib" ,python-polib)
17754 ("python-pyenchant" ,python-pyenchant)
17755 ("python-pygit2" ,python-pygit2)
17756 ("python-pygithub" ,python-pygithub)
17757 ("python-pyqt" ,python-pyqt)
17758 ("python-requests" ,python-requests)
17759 ("python-ruamel.yaml" ,python-ruamel.yaml)
17760 ("python-translation-finder" ,python-translation-finder)
17761 ("python-watchdog" ,python-watchdog)))
17762 (native-inputs
17763 `(("qttools" ,qttools)))
17764 (home-page "https://framagit.org/tyreunom/offlate")
17765 (synopsis "Offline translation interface for online translation tools")
17766 (description "Offlate offers a unified interface for different translation
17767file formats, as well as many different online translation platforms. You can
17768use it to get work from online platforms, specialized such as the Translation
17769Project, or not such a gitlab instance when your upstream doesn't use any
17770dedicated platform. The tool proposes a unified interface for any format and
17771an upload option to send your work back to the platform.")
17772 (license license:gpl3+)))
479f4013
JK
17773
17774(define-public python-pypng
17775 (package
17776 (name "python-pypng")
17777 (version "0.0.20")
17778 (source
17779 (origin
17780 (method url-fetch)
17781 (uri (pypi-uri "pypng" version))
17782 (sha256
17783 (base32 "02qpa22ls41vwsrzw9r9qhj1nhq05p03hb5473pay6y980s86chh"))))
17784 (build-system python-build-system)
17785 (home-page "https://github.com/drj11/pypng")
17786 (synopsis "Pure Python PNG image encoder/decoder")
17787 (description
17788 "The PyPNG module implements support for PNG images. It reads and writes
17789PNG files with all allowable bit depths (1/2/4/8/16/24/32/48/64 bits per
17790pixel) and colour combinations: greyscale (1/2/4/8/16 bit); RGB, RGBA,
17791LA (greyscale with alpha) with 8/16 bits per channel; colour mapped
17792images (1/2/4/8 bit). Adam7 interlacing is supported for reading and writing.
17793A number of optional chunks can be specified (when writing) and
17794understood (when reading): tRNS, bKGD, gAMA.
17795
17796PyPNG is not a high level toolkit for image processing (like PIL) and does not
17797aim at being a replacement or competitor. Its strength lies in fine-grained
17798extensive support of PNG features. It can also read and write Netpbm PAM
17799files, with a focus on its use as an intermediate format for implementing
17800custom PNG processing.")
17801 (license license:expat)))
da8ca4c3 17802
17803(define-public python-fuzzywuzzy
17804 (package
17805 (name "python-fuzzywuzzy")
17806 (version "0.18.0")
17807 (source
17808 (origin
17809 (method url-fetch)
17810 (uri (pypi-uri "fuzzywuzzy" version))
17811 (sha256
17812 (base32
17813 "1s00zn75y2dkxgnbw8kl8dw4p1mc77cv78fwfa4yb0274s96w0a5"))))
17814 (build-system python-build-system)
17815 (native-inputs
17816 `(("python-hypothesis" ,python-hypothesis)
17817 ("python-pycodestyle" ,python-pycodestyle)
17818 ("python-pytest" ,python-pytest)))
17819 (propagated-inputs
17820 `(("python-levenshtein" ,python-levenshtein)))
17821 (home-page "https://github.com/seatgeek/fuzzywuzzy")
7d9f8db2 17822 (synopsis "Fuzzy string matching in Python")
da8ca4c3 17823 (description "Approximate string matching using
17824@emph{Levenshtein Distance} to calculate the differences between
17825sequences.")
17826 (license license:gpl2)))
17827
17828(define-public python2-fuzzywuzzy
17829 (package-with-python2 python-fuzzywuzzy))