gnu: whois: Update to 5.5.3.
[jackhill/guix/guix.git] / gnu / packages / python-xyz.scm
CommitLineData
44d10b1f
RW
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
2d040763 3;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
fa8ffaa0 4;;; Copyright © 2013, 2014, 2015, 2016, 2019 Andreas Enge <andreas@enge.fr>
44d10b1f
RW
5;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
6;;; Copyright © 2014, 2017 Eric Bavier <bavier@member.fsf.org>
7;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch>
8;;; Copyright © 2015 Omar Radwan <toxemicsquire4@gmail.com>
9;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu>
10;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
11;;; Copyright © 2015, 2016 Christopher Allan Webber <cwebber@dustycloud.org>
12;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
13;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
b742c006 14;;; Copyright © 2015, 2016, 2017, 2019 Leo Famulari <leo@famulari.name>
44d10b1f
RW
15;;; Copyright © 2015, 2017 Ben Woodcroft <donttrustben@gmail.com>
16;;; Copyright © 2015, 2016 Erik Edrosa <erik.edrosa@gmail.com>
17;;; Copyright © 2015, 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
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>
47f66348 29;;; Copyright © 2016, 2017, 2018, 2019 Marius Bakke <mbakke@fastmail.com>
44d10b1f
RW
30;;; Copyright © 2016, 2017 Stefan Reichör <stefan@xsteve.at>
31;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
e746d1c3 32;;; Copyright © 2016, 2017, 2019 Alex Vong <alexvong1995@gmail.com>
44d10b1f
RW
33;;; Copyright © 2016, 2017, 2018 Arun Isaac <arunisaac@systemreboot.net>
34;;; Copyright © 2016, 2017, 2018 Julien Lepiller <julien@lepiller.eu>
217ea1a1 35;;; Copyright © 2016, 2017, 2018, 2019 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>
44;;; Copyright © 2017, 2018 Kei Kebreau <kkebreau@posteo.net>
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>
412342d1 54;;; Copyright © 2018, 2019 Nicolas Goaziou <mail@nicolasgoaziou.fr>
44d10b1f 55;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
85cfb0e9 56;;; Copyright © 2018, 2019 Clément Lassieur <clement@lassieur.org>
4caf37b0 57;;; Copyright © 2018, 2019 Maxim Cournoyer <maxim.cournoyer@gmail.com>
44d10b1f
RW
58;;; Copyright © 2018 Luther Thompson <lutheroto@gmail.com>
59;;; Copyright © 2018 Vagrant Cascadian <vagrant@debian.org>
a9ba0a31 60;;; Copyright © 2019 Brett Gilio <brettg@posteo.net>
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>
44d10b1f
RW
70;;;
71;;; This file is part of GNU Guix.
72;;;
73;;; GNU Guix is free software; you can redistribute it and/or modify it
74;;; under the terms of the GNU General Public License as published by
75;;; the Free Software Foundation; either version 3 of the License, or (at
76;;; your option) any later version.
77;;;
78;;; GNU Guix is distributed in the hope that it will be useful, but
79;;; WITHOUT ANY WARRANTY; without even the implied warranty of
80;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
81;;; GNU General Public License for more details.
82;;;
83;;; You should have received a copy of the GNU General Public License
84;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
85
86(define-module (gnu packages python-xyz)
87 #:use-module ((guix licenses) #:prefix license:)
88 #:use-module (gnu packages)
89 #:use-module (gnu packages algebra)
90 #:use-module (gnu packages adns)
91 #:use-module (gnu packages attr)
92 #:use-module (gnu packages backup)
93 #:use-module (gnu packages bash)
94 #:use-module (gnu packages check)
95 #:use-module (gnu packages compression)
96 #:use-module (gnu packages crypto)
97 #:use-module (gnu packages databases)
f825e605 98 #:use-module (gnu packages dbm)
44d10b1f
RW
99 #:use-module (gnu packages file)
100 #:use-module (gnu packages fontutils)
101 #:use-module (gnu packages gcc)
102 #:use-module (gnu packages geo)
103 #:use-module (gnu packages ghostscript)
104 #:use-module (gnu packages gl)
105 #:use-module (gnu packages glib)
106 #:use-module (gnu packages graphviz)
107 #:use-module (gnu packages graphics)
108 #:use-module (gnu packages gstreamer)
109 #:use-module (gnu packages gtk)
110 #:use-module (gnu packages icu4c)
111 #:use-module (gnu packages image)
112 #:use-module (gnu packages imagemagick)
113 #:use-module (gnu packages libevent)
114 #:use-module (gnu packages libffi)
115 #:use-module (gnu packages linux)
116 #:use-module (gnu packages llvm)
117 #:use-module (gnu packages man)
118 #:use-module (gnu packages maths)
42f0b0c2 119 #:use-module (gnu packages monitoring)
44d10b1f
RW
120 #:use-module (gnu packages multiprecision)
121 #:use-module (gnu packages networking)
122 #:use-module (gnu packages ncurses)
123 #:use-module (gnu packages openstack)
124 #:use-module (gnu packages pcre)
125 #:use-module (gnu packages perl)
126 #:use-module (gnu packages pkg-config)
127 #:use-module (gnu packages python)
d362b11d 128 #:use-module (gnu packages python-check)
15b65617 129 #:use-module (gnu packages python-compression)
44d10b1f
RW
130 #:use-module (gnu packages python-crypto)
131 #:use-module (gnu packages python-web)
132 #:use-module (gnu packages qt)
133 #:use-module (gnu packages readline)
134 #:use-module (gnu packages sdl)
135 #:use-module (gnu packages search)
136 #:use-module (gnu packages shells)
9d0c291e 137 #:use-module (gnu packages sphinx)
44d10b1f
RW
138 #:use-module (gnu packages ssh)
139 #:use-module (gnu packages terminals)
140 #:use-module (gnu packages tex)
141 #:use-module (gnu packages texinfo)
142 #:use-module (gnu packages time)
143 #:use-module (gnu packages tls)
144 #:use-module (gnu packages version-control)
145 #:use-module (gnu packages video)
146 #:use-module (gnu packages web)
147 #:use-module (gnu packages base)
148 #:use-module (gnu packages xml)
149 #:use-module (gnu packages xorg)
150 #:use-module (gnu packages xdisorg)
151 #:use-module (gnu packages tcl)
152 #:use-module (gnu packages bdw-gc)
f98232a3 153 #:use-module (gnu packages serialization)
44d10b1f
RW
154 #:use-module (guix packages)
155 #:use-module (guix download)
156 #:use-module (guix git-download)
a042d348 157 #:use-module (guix hg-download)
44d10b1f
RW
158 #:use-module (guix utils)
159 #:use-module (guix build-system gnu)
160 #:use-module (guix build-system cmake)
161 #:use-module (guix build-system python)
162 #:use-module (guix build-system trivial)
163 #:use-module (srfi srfi-1)
164 #:use-module (srfi srfi-26))
165
166(define-public python-psutil
167 (package
168 (name "python-psutil")
e9119ac1 169 (version "5.6.5")
44d10b1f
RW
170 (source
171 (origin
172 (method url-fetch)
173 (uri (pypi-uri "psutil" version))
174 (sha256
e9119ac1 175 (base32 "0isil5jxwwd8awz54qk28rpgjg43i5l6yl70g40vxwa4r4m56lfh"))))
44d10b1f
RW
176 (build-system python-build-system)
177 (arguments
178 ;; FIXME: some tests does not return and times out.
179 '(#:tests? #f))
180 (home-page "https://www.github.com/giampaolo/psutil")
181 (synopsis "Library for retrieving information on running processes")
182 (description
183 "psutil (Python system and process utilities) is a library for retrieving
184information on running processes and system utilization (CPU, memory, disks,
185network) in Python. It is useful mainly for system monitoring, profiling and
186limiting process resources and management of running processes. It implements
187many functionalities offered by command line tools such as: ps, top, lsof,
188netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
189pidof, tty, taskset, pmap.")
190 (properties `((python2-variant . ,(delay python2-psutil))))
191 (license license:bsd-3)))
192
193(define-public python2-psutil
194 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
195 (package
196 (inherit base)
197 (propagated-inputs
198 `(("python2-enum34" ,python2-enum34) ;optional
199 ,@(package-propagated-inputs base))))))
200
201(define-public python-shapely
202 (package
203 (name "python-shapely")
6d94465b 204 (version "1.6.4.post2")
44d10b1f
RW
205 (source
206 (origin
207 (method url-fetch)
208 (uri (pypi-uri "Shapely" version))
209 (sha256
210 (base32
6d94465b 211 "03r42fmd9alp6r3q95ad6rldq2f7n1wimrw53zy5kpn33yv7pf64"))))
44d10b1f
RW
212 (build-system python-build-system)
213 (native-inputs
214 `(("python-cython" ,python-cython)
215 ("python-matplotlib" ,python-matplotlib)
216 ("python-pytest" ,python-pytest)
217 ("python-pytest-cov" ,python-pytest-cov)))
218 (inputs
219 `(("geos" ,geos)))
220 (propagated-inputs
221 `(("python-numpy" ,python-numpy)))
222 (arguments
223 `(#:phases
224 (modify-phases %standard-phases
225 (add-after 'unpack 'patch-geos-path
226 (lambda* (#:key inputs #:allow-other-keys)
227 (let ((geos (assoc-ref inputs "geos"))
228 (glibc (assoc-ref inputs ,(if (%current-target-system)
229 "cross-libc" "libc"))))
230 (substitute* "shapely/geos.py"
231 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
232 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
233 geos "/lib/libgeos_c.so'])"))
234 (("free = load_dll\\('c'\\)\\.free")
235 (string-append "free = load_dll('c', fallbacks=['"
236 glibc "/lib/libc.so.6']).free"))))
237 #t)))))
238 (home-page "https://github.com/Toblerity/Shapely")
239 (synopsis "Library for the manipulation and analysis of geometric objects")
240 (description "Shapely is a Python package for manipulation and analysis of
241planar geometric objects. It is based on the @code{GEOS} library.")
242 (license license:bsd-3)))
243
a91f4eba
S
244(define-public python-shortuuid
245 (package
246 (name "python-shortuuid")
247 (version "0.5.0")
248 (source
249 (origin
250 (method url-fetch)
251 (uri (pypi-uri "shortuuid" version))
252 (sha256
253 (base32
254 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
255 (build-system python-build-system)
256 (native-inputs
257 `(("python-pep8" ,python-pep8)))
258 (home-page "https://github.com/skorokithakis/shortuuid")
259 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
260 (description
261 "@code{shortuuid} is a Python library for generating concise, unambiguous
262and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
263module and then similar looking characters are removed.")
264 (license license:bsd-3)))
265
44d10b1f
RW
266(define-public python-logwrap
267 (package
268 (name "python-logwrap")
269 (version "3.2.1")
270 (source
271 (origin
272 (method url-fetch)
273 (uri (pypi-uri "logwrap" version ".zip"))
274 (sha256
275 (base32
276 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
277 (build-system python-build-system)
278 (propagated-inputs
279 `(("python-six" ,python-six)
280 ("python-typing" ,python-typing)))
281 (native-inputs
282 `(("unzip" ,unzip)
283 ("python-cython" ,python-cython)
284 ("python-pytest" ,python-pytest)
285 ("python-pytest-cov" ,python-pytest-cov)
286 ("python-pytest-runner" ,python-pytest-runner)))
287 (home-page "https://github.com/penguinolog/logwrap")
288 (synopsis "Decorator for logging function arguments")
289 (description "This package provides a decorator to log function arguments
290and function call return values in a human-readable way.")
291 (license license:asl2.0)))
292
293(define-public python2-shapely
294 (package-with-python2 python-shapely))
295
296(define-public python-clyent
297 (package
298 (name "python-clyent")
299 (version "1.2.1")
300 (source
301 (origin
302 (method url-fetch)
303 (uri (pypi-uri "clyent" version))
304 (sha256
305 (base32
306 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
307 (build-system python-build-system)
308 (native-inputs
309 `(("python-mock" ,python-mock)))
310 (home-page "https://github.com/binstar/clyent")
311 (synopsis "Command line client library")
312 (description "Clyent is a Python command line utiliy library. It is used
313by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
314 (license license:bsd-3)))
315
316(define-public python2-clyent
317 (package-with-python2 python-clyent))
318
319(define-public python-babel
320 (package
321 (name "python-babel")
93253411 322 (version "2.7.0")
44d10b1f
RW
323 (source
324 (origin
325 (method url-fetch)
326 (uri (pypi-uri "Babel" version))
327 (sha256
328 (base32
93253411 329 "0a7wawx8vsg7igvz6p3x909fskhg4b2y1910xk4f4c8y22p3aqg8"))))
44d10b1f
RW
330 (build-system python-build-system)
331 (native-inputs
332 `(("python-freezegun" ,python-freezegun)
333 ("python-pytest" ,python-pytest)))
334 (propagated-inputs
335 `(("python-pytz" ,python-pytz)))
336 (arguments
337 `(#:phases (modify-phases %standard-phases
338 (replace 'check
8acd1e90
MB
339 (lambda _
340 (invoke "pytest" "-vv" "-k"
341 (string-append
342 ;; XXX: These tests fail when using Pytest 4.x and
343 ;; Babel 2.6.0. Try removing this for later versions.
344 "not test_no_inherit_metazone_marker_never_in_output"
345 " and not test_smoke_dates"
346 " and not test_smoke_numbers")))))))
44d10b1f
RW
347 (home-page "http://babel.pocoo.org/")
348 (synopsis
349 "Tools for internationalizing Python applications")
350 (description
351 "Babel is composed of two major parts:
352- tools to build and work with gettext message catalogs
353- a Python interface to the CLDR (Common Locale Data Repository), providing
354access to various locale display names, localized number and date formatting,
355etc. ")
356 (license license:bsd-3)))
357
358(define-public python2-babel
359 (package-with-python2 python-babel))
360
93253411
MB
361;; Sphinx < 2.0 requires this version. Remove once no longer needed.
362(define-public python2-babel-2.6
363 (package
364 (inherit python2-babel)
365 (version "2.6.0")
366 (source (origin
367 (method url-fetch)
368 (uri (pypi-uri "Babel" version))
369 (sha256
370 (base32
371 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))))
372
44d10b1f
RW
373(define-public python2-backport-ssl-match-hostname
374 (package
375 (name "python2-backport-ssl-match-hostname")
376 (version "3.5.0.1")
377 (source
378 (origin
379 (method url-fetch)
2c1f0d09 380 (uri (pypi-uri "backports.ssl_match_hostname" version))
44d10b1f
RW
381 (sha256
382 (base32
383 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
384 (build-system python-build-system)
385 (arguments
386 `(#:python ,python-2
387 #:tests? #f)) ; no test target
388 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
389 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
390 (description
391 "This backport brings the ssl.match_hostname() function to users of
392earlier versions of Python. The function checks the hostname in the
393certificate returned by the server to which a connection has been established,
394and verifies that it matches the intended target hostname.")
395 (license license:psfl)))
396
dc827867
TGR
397(define-public python-boolean.py
398 (package
399 (name "python-boolean.py")
400 (version "3.6")
401 (source
402 (origin
403 ;; There's no source tarball on PyPI.
404 (method git-fetch)
405 (uri (git-reference
406 (url "https://github.com/bastikr/boolean.py")
407 (commit (string-append "v" version))))
408 (file-name (git-file-name name version))
409 (sha256
410 (base32 "1wc89y73va58cj7dsx6c199zpxsy9q53dsffsdj6zmc90inqz6qs"))))
411 (build-system python-build-system)
412 (home-page "https://github.com/bastikr/boolean.py")
413 (synopsis "Boolean algebra in one Python module")
414 (description
415 "This is a small Python library that implements boolean algebra.
416It defines two base elements, @code{TRUE} and @code{FALSE}, and a
417@code{Symbol} class that can take on one of these two values. Calculations
418are done only in terms of @code{AND}, @code{OR}, and @code{NOT}---other
419compositions like @code{XOR} and @code{NAND} are emulated on top of them.
420Expressions are constructed from parsed strings or directly in Python.")
421 (license license:bsd-2)))
422
44d10b1f
RW
423(define-public python-hdf4
424 (package
425 (name "python-hdf4")
426 (version "0.9")
427 (source
428 (origin
429 (method url-fetch)
430 (uri (pypi-uri name version))
431 (sha256
432 (base32
433 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
434 (build-system python-build-system)
435 (native-inputs `(("nose" ,python-nose)))
436 (propagated-inputs `(("numpy" ,python-numpy)))
437 (inputs
438 `(("hdf4" ,hdf4)
439 ("libjpeg" ,libjpeg)
440 ("zlib" ,zlib)))
441 (arguments
442 `(#:phases
443 (modify-phases %standard-phases
444 (replace 'check
445 (lambda _
446 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
447 ;; on to import numpy. Somehow this works on their CI system.
448 ;; Let's just manage PYTHONPATH here instead.
449 (substitute* "runexamples.sh"
450 (("export PYTHONPATH=.*") ""))
451 (setenv "PYTHONPATH"
452 (string-append (getcwd) ":"
453 (getenv "PYTHONPATH")))
454 (invoke "./runexamples.sh")
455 (invoke "nosetests" "-v"))))))
456 (home-page "https://github.com/fhs/python-hdf4")
457 (synopsis "Python interface to the NCSA HDF4 library")
458 (description
459 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
460which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
461NetCDF files can also be read and modified. Python-HDF4 is a fork of
462@url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
463 (license license:expat)))
464
465(define-public python2-hdf4
466 (package-with-python2 python-hdf4))
467
468(define-public python-h5py
469 (package
470 (name "python-h5py")
471 (version "2.8.0")
472 (source
473 (origin
474 (method url-fetch)
475 (uri (pypi-uri "h5py" version))
476 (sha256
477 (base32
478 "0mdr6wrq02ac93m1aqx9kad0ppfzmm4imlxqgyy1x4l7hmdcc9p6"))))
479 (build-system python-build-system)
480 (arguments
481 `(#:tests? #f ; no test target
482 #:phases
483 (modify-phases %standard-phases
484 (add-after 'unpack 'fix-hdf5-paths
485 (lambda* (#:key inputs #:allow-other-keys)
486 (let ((prefix (assoc-ref inputs "hdf5")))
487 (substitute* "setup_build.py"
488 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
489 (string-append "['" prefix "/lib" "']"))
490 (("'/opt/local/include', '/usr/local/include'")
491 (string-append "'" prefix "/include" "'")))
492 (substitute* "setup_configure.py"
493 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
494 (string-append "['" prefix "/lib" "']")))
495 #t))))))
496 (propagated-inputs
497 `(("python-six" ,python-six)
498 ("python-numpy" ,python-numpy)))
499 (inputs
500 `(("hdf5" ,hdf5)))
501 (native-inputs
502 `(("python-cython" ,python-cython)
503 ("python-pkgconfig" ,python-pkgconfig)))
504 (home-page "http://www.h5py.org/")
505 (synopsis "Read and write HDF5 files from Python")
506 (description
507 "The h5py package provides both a high- and low-level interface to the
508HDF5 library from Python. The low-level interface is intended to be a
509complete wrapping of the HDF5 API, while the high-level component supports
510access to HDF5 files, datasets and groups using established Python and NumPy
511concepts.")
512 (license license:bsd-3)))
513
514(define-public python2-h5py
515 (package-with-python2 python-h5py))
516
8b89dedc
RW
517(define-public python-sh
518 (package
519 (name "python-sh")
520 (version "1.12.14")
521 (source
522 (origin
523 (method url-fetch)
524 (uri (pypi-uri "sh" version))
525 (sha256
526 (base32
527 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
528 (build-system python-build-system)
fd3638d8
EF
529 (arguments
530 '(#:phases
531 (modify-phases %standard-phases
532 (replace 'check
533 (lambda _
ca983a2f
NG
534 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
535 (setenv "HOME" "/tmp")
fd3638d8
EF
536 (invoke "python" "sh.py" "test"))))))
537 (native-inputs
538 `(("python-coverage" ,python-coverage)))
8b89dedc
RW
539 (home-page "https://github.com/amoffat/sh")
540 (synopsis "Python subprocess replacement")
541 (description "This package provides a replacement for Python's
542@code{subprocess} feature.")
543 (license license:expat)))
544
3869effd
RW
545(define-public python2-sh
546 (package-with-python2 python-sh))
547
d362b11d
RW
548(define-public python-cftime
549 (package
550 (name "python-cftime")
da107cf5 551 (version "1.0.4.2")
d362b11d
RW
552 (source
553 (origin
554 (method url-fetch)
555 (uri (pypi-uri "cftime" version))
556 (sha256
da107cf5 557 (base32 "0w0gi6jnch38hiygl62j4xkcirv4y3dcwrvxl9p7bsk6j27lzihs"))))
d362b11d
RW
558 (build-system python-build-system)
559 (propagated-inputs
560 `(("python-numpy" ,python-numpy)))
561 (native-inputs
562 `(("python-coveralls" ,python-coveralls)
563 ("python-cython" ,python-cython)
564 ("python-pytest-cov" ,python-pytest-cov)))
565 (home-page "https://github.com/Unidata/cftime")
566 (synopsis "Library for time handling")
567 (description
568 "This package provides time-handling functionality that used to be part
569of the netcdf4 package before.")
570 ;; This package claims to include code under the GPLv3 but is released
571 ;; under ISC.
572 (license (list license:isc license:gpl3+))))
573
44d10b1f
RW
574(define-public python-netcdf4
575 (package
576 (name "python-netcdf4")
93e7b209 577 (version "1.4.2")
44d10b1f
RW
578 (source
579 (origin
580 (method url-fetch)
581 (uri (pypi-uri "netCDF4" version))
582 (sha256
583 (base32
93e7b209 584 "0c0sklgrmv15ygliin8qq0hp7vanmbi74m6zpi0r1ksr0hssyd5r"))))
44d10b1f 585 (build-system python-build-system)
93e7b209
RW
586 (arguments
587 '(#:phases
588 (modify-phases %standard-phases
589 (add-after 'unpack 'configure-locations
590 (lambda* (#:key inputs #:allow-other-keys)
591 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
592 #t)))))
44d10b1f
RW
593 (native-inputs
594 `(("python-cython" ,python-cython)))
595 (propagated-inputs
93e7b209
RW
596 `(("python-numpy" ,python-numpy)
597 ("python-cftime" ,python-cftime)))
44d10b1f
RW
598 (inputs
599 `(("netcdf" ,netcdf)
600 ("hdf4" ,hdf4)
601 ("hdf5" ,hdf5)))
93e7b209 602 (home-page "https://github.com/Unidata/netcdf4-python")
44d10b1f
RW
603 (synopsis "Python/numpy interface to the netCDF library")
604 (description "Netcdf4-python is a Python interface to the netCDF C
605library. netCDF version 4 has many features not found in earlier
606versions of the library and is implemented on top of HDF5. This module
607can read and write files in both the new netCDF 4 and the old netCDF 3
608format, and can create files that are readable by HDF5 clients. The
609API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
610to users of that module.")
611 ;; The software is mainly ISC, but includes some files covered
612 ;; by the Expat license.
613 (license (list license:isc license:expat))))
614
615(define-public python2-netcdf4
616 (package-with-python2 python-netcdf4))
617
d6803445
TGR
618(define-public python-license-expression
619 (package
620 (name "python-license-expression")
621 (version "0.999")
622 (source
623 (origin
624 (method url-fetch)
625 (uri (pypi-uri "license-expression" version))
626 (sha256
627 (base32 "08ppb0bxbrsxazy88sgpl9yffvdsabw6dkk1nc332wcz2mphwwyf"))))
628 (build-system python-build-system)
629 (propagated-inputs
630 `(("python-boolean.py" ,python-boolean.py)))
631 (home-page "https://github.com/nexB/license-expression")
632 (synopsis "Apply boolean logic to license expressions")
633 (description
634 "This Python module defines a tiny language to evaluate and compare
635license expressions using boolean logic. Logical combinations of licenses can
636be tested for equality, containment, and equivalence. They can be normalised
637and simplified. It supports SPDX license expressions as well as other naming
638conventions and aliases in the same expression.")
639 (license license:gpl2+)))
640
44d10b1f
RW
641(define-public python-lockfile
642 (package
643 (name "python-lockfile")
644 (version "0.12.2")
645 (source
646 (origin
647 (method url-fetch)
8318bf07 648 (uri (pypi-uri "lockfile" version))
44d10b1f
RW
649 (sha256
650 (base32
651 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
652 (build-system python-build-system)
653 (arguments '(#:test-target "check"))
654 (native-inputs
655 `(("python-pbr" ,python-pbr)))
656 (home-page "https://launchpad.net/pylockfile")
657 (synopsis "Platform-independent file locking module")
658 (description
659 "The lockfile package exports a LockFile class which provides a simple
660API for locking files.")
661 (license license:expat)))
662
663(define-public python2-lockfile
664 (package-with-python2 python-lockfile))
665
666(define-public python-semantic-version
667 (package
668 (name "python-semantic-version")
669 (version "2.6.0")
670 (source
671 (origin
672 (method url-fetch)
673 (uri (pypi-uri "semantic_version" version))
674 (sha256
675 (base32
676 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
677 (build-system python-build-system)
678 (arguments
679 `(#:tests? #f)) ; PyPI tarball lacks tests
680 (home-page "https://github.com/rbarrois/python-semanticversion")
681 (synopsis "Semantic versioning module for Python")
682 (description
683 "The @code{semantic_version} class is a small library for handling
684@uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
685
686It can compare versions, generate a new version that represents a bump in one of
687the version levels, and check whether any given string is a proper semantic
688version identifier.")
689 (license license:bsd-3)))
690
691(define-public python2-semantic-version
692 (package-with-python2 python-semantic-version))
693
694(define-public python-serpent
695 (package
696 (name "python-serpent")
fa9d14ac 697 (version "1.28")
44d10b1f
RW
698 (source
699 (origin
700 (method url-fetch)
701 (uri (pypi-uri "serpent" version))
702 (sha256
fa9d14ac 703 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
44d10b1f 704 (build-system python-build-system)
fa9d14ac
TGR
705 (native-inputs
706 `(("python-attrs" ,python-attrs)
707 ("python-pytz" ,python-pytz)))
44d10b1f
RW
708 (home-page "https://github.com/irmen/Serpent")
709 (synopsis "Serializer for literal Python expressions")
710 (description
1d3c7803
TGR
711 "Serpent provides @code{ast.literal_eval()}-compatible object tree
712serialization. It serializes an object tree into bytes (an utf-8 encoded
713string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
714to rebuild the original object tree.
715
716Because only safe literals are encoded, it is safe to send serpent data to
717other machines, such as over the network.")
44d10b1f
RW
718 (license license:expat)))
719
720(define-public python-setuptools
721 (package
722 (name "python-setuptools")
e39d4933 723 (version "41.0.1")
44d10b1f
RW
724 (source
725 (origin
726 (method url-fetch)
727 (uri (pypi-uri "setuptools" version ".zip"))
728 (sha256
729 (base32
e39d4933 730 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
44d10b1f
RW
731 (modules '((guix build utils)))
732 (snippet
733 '(begin
734 ;; Remove included binaries which are used to build self-extracting
735 ;; installers for Windows.
736 ;; TODO: Find some way to build them ourself so we can include them.
737 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
738 #t))))
739 (build-system python-build-system)
740 ;; FIXME: Tests require pytest, which itself relies on setuptools.
741 ;; One could bootstrap with an internal untested setuptools.
742 (arguments
743 `(#:tests? #f))
744 (home-page "https://pypi.python.org/pypi/setuptools")
745 (synopsis
746 "Library designed to facilitate packaging Python projects")
747 (description
748 "Setuptools is a fully-featured, stable library designed to facilitate
749packaging Python projects, where packaging includes:
750Python package and module definitions,
751distribution package metadata,
752test hooks,
753project installation,
754platform-specific details,
755Python 3 support.")
756 ;; TODO: setuptools now bundles the following libraries:
757 ;; packaging, pyparsing, six and appdirs. How to unbundle?
758 (license (list license:psfl ; setuptools itself
759 license:expat ; six, appdirs, pyparsing
760 license:asl2.0 ; packaging is dual ASL2/BSD-2
761 license:bsd-2))))
762
763(define-public python2-setuptools
764 (package-with-python2 python-setuptools))
765
0fdec2a3
MB
766;; The setuptools provided by Python 3.7.4 is too new for Tensorflow.
767(define-public python-setuptools-for-tensorflow
768 (hidden-package
769 (package
770 (inherit python-setuptools)
771 (version "39.1.0")
772 (source (origin
773 (inherit (package-source python-setuptools))
774 (uri (pypi-uri "setuptools" version ".zip"))
775 (sha256
776 (base32
777 "1mzdhvfhnv4lggxa8rjl0dzqxvfx377gg5sqs57v89wrp09lwj65")))))))
778
44d10b1f
RW
779(define-public python-uniseg
780 (package
781 (name "python-uniseg")
782 (version "0.7.1")
783 (source
784 (origin
785 (method url-fetch)
786 (uri (pypi-uri "uniseg" version ".zip"))
787 (sha256
788 (base32
789 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
790 (build-system python-build-system)
791 (arguments
792 '(#:tests? #f)) ; The test suite requires network access.
793 (native-inputs
794 `(("unzip" ,unzip)))
795 (home-page
796 "https://bitbucket.org/emptypage/uniseg-python")
797 (synopsis
798 "Python library to determine Unicode text segmentations")
799 (description
800 "Uniseg is a Python package used to determine Unicode text segmentations.
801Supported segmentations include:
802@enumerate
803@item @dfn{Code point} (any value in the Unicode codespace)
804@item @dfn{Grapheme cluster} (user-perceived character made of a single or
805multiple Unicode code points, e.g. \"G\" + acute-accent)
806@item Word break
807@item Sentence break
808@item Line break
809@end enumerate")
810 (license license:expat)))
811
812(define-public python2-uniseg
813 (package-with-python2 python-uniseg))
814
815(define-public python-humanfriendly
816 (package
817 (name "python-humanfriendly")
818 (version "4.4.1")
819 (source
820 (origin
821 (method url-fetch)
822 (uri (pypi-uri "humanfriendly" version))
823 (sha256
824 (base32
825 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
826 (build-system python-build-system)
827 (arguments
828 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
829 #:tests? #f))
830 (propagated-inputs
831 `(("python-monotonic" ,python-monotonic)))
832 (home-page "https://humanfriendly.readthedocs.io")
833 (synopsis "Human-friendly input and output in Python")
834 (description
835 "The functions and classes in @code{humanfriendly} can be used to make
836text interfaces more user-friendly. It includes tools to parse and format
837numbers, file sizes, and timespans, timers for long-running operations, menus
838to allow the user to choose from a list of options, and terminal interaction
839helpers.")
840 (license license:expat)))
841
842(define-public python2-humanfriendly
843 (package-with-python2 python-humanfriendly))
844
845(define-public python-capturer
846 (package
847 (name "python-capturer")
848 (version "2.4")
849 (source
850 (origin
851 (method url-fetch)
852 (uri (pypi-uri "capturer" version))
853 (sha256
854 (base32
855 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
856 (build-system python-build-system)
857 (arguments
858 `(#:tests? #f))
859 (propagated-inputs
860 `(("python-humanfriendly" ,python-humanfriendly)))
861 (home-page "https://capturer.readthedocs.io")
862 (synopsis "Capture stdout and stderr streams of the current process")
863 (description
864 "The capturer package makes it easy to capture the stdout and stderr
865streams of the current process and subprocesses. Output can be relayed
866to the terminal in real time but is also available to the Python program
867for additional processing.")
868 (license license:expat)))
869
870(define-public python2-capturer
871 (package-with-python2 python-capturer))
872
873(define-public python-case
874 (package
875 (name "python-case")
876 (version "1.5.3")
877 (source
878 (origin
879 (method url-fetch)
880 (uri (pypi-uri "case" version))
881 (sha256
882 (base32
883 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
884 (build-system python-build-system)
885 (propagated-inputs
886 `(("python-mock" ,python-mock)
887 ("python-nose" ,python-nose)
888 ("python-six" ,python-six)
889 ("python-unittest2" ,python-unittest2)))
890 (native-inputs
891 `(("python-coverage" ,python-coverage)))
892 (home-page "https://github.com/celery/case")
893 (synopsis "Unittest utilities and convenience methods")
894 (description
895 "The @code{case} package provides utilities on top of unittest, including
896some helpful Python 2 compatibility convenience methods.")
897 (license license:bsd-3)))
898
899(define-public python-verboselogs
900 (package
901 (name "python-verboselogs")
902 (version "1.7")
903 (source
904 (origin
905 (method url-fetch)
906 (uri (pypi-uri "verboselogs" version))
907 (sha256
908 (base32
909 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
910 (build-system python-build-system)
1760c970
MO
911 (arguments
912 `(#:phases
913 (modify-phases %standard-phases
914 (replace 'check
915 (lambda _
916 ;; Do not run pylint plugin test, as astroid is an old
917 ;; unsupported version.
918 (invoke "pytest" "-v" "-k" "not test_pylint_plugin"
919 "verboselogs/tests.py"))))))
44d10b1f
RW
920 (native-inputs
921 `(("python-mock" ,python-mock)
1760c970 922 ("python-pytest" ,python-pytest)))
44d10b1f
RW
923 (home-page "https://verboselogs.readthedocs.io")
924 (synopsis "Verbose logging level for Python's logging module")
925 (description
926 "The @code{verboselogs} package extends Python's @code{logging} module to
927add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
928 (license license:expat)))
929
930(define-public python2-verboselogs
931 (package-with-python2 python-verboselogs))
932
933(define-public python-coloredlogs
934 (package
935 (name "python-coloredlogs")
b2b8a39c 936 (version "10.0")
44d10b1f
RW
937 (source
938 (origin
939 (method url-fetch)
940 (uri (pypi-uri "coloredlogs" version))
941 (sha256
942 (base32
b2b8a39c 943 "0dkw6xp0r1dwgz4s2f58npx5nxfq51wf4l6qkm5ib27slgfs4sdq"))))
44d10b1f
RW
944 (build-system python-build-system)
945 (arguments
946 `(;Tests require some updated modules
947 #:tests? #f))
948 (propagated-inputs
949 `(("python-capturer" ,python-capturer)))
950 (home-page "https://coloredlogs.readthedocs.io")
951 (synopsis "Colored stream handler for Python's logging module")
952 (description
953 "The @code{coloredlogs} package enables colored terminal output for
954Python's logging module. The @code{ColoredFormatter} class inherits from
955@code{logging.Formatter} and uses ANSI escape sequences to render your logging
956messages in color.")
957 (license license:expat)))
958
959(define-public python2-coloredlogs
960 (package-with-python2 python-coloredlogs))
961
af760990
VC
962(define-public python-editorconfig
963 (package
964 (name "python-editorconfig")
965 (version "0.12.2")
966 (source
967 (origin
968 (method url-fetch)
969 (uri (pypi-uri "EditorConfig" version))
970 (sha256
971 (base32
972 "0v55z351p9qkyp3bbspwywwn28sbcknhirngjbj779n3z52z63hv"))))
973 (build-system python-build-system)
974 (home-page "https://editorconfig.org/")
975 (synopsis "EditorConfig bindings for python")
976 (description "The EditorConfig project consists of a file format for
977defining coding styles and a collection of text editor plugins that enable
978editors to read the file format and adhere to defined styles. EditorConfig
979files are easily readable and they work nicely with version control systems.")
980 ;; "fnmatch.py" and "ini.py" are licensed under psfl, the rest is bsd-2.
981 (license (list license:bsd-2 license:psfl))))
982
4caf37b0
MC
983(define-public python-et-xmlfile
984 (package
985 (name "python-et-xmlfile")
986 (version "1.0.1")
987 (source
988 (origin
989 (method url-fetch)
990 (uri (pypi-uri "et_xmlfile" version))
991 (sha256
992 (base32
993 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
994 (build-system python-build-system)
995 (arguments
996 `(#:phases (modify-phases %standard-phases
997 (replace 'check
998 (lambda _
999 (invoke "pytest"))))))
1000 (native-inputs
1001 `(("python-pytest" ,python-pytest)
1002 ("python-lxml" ,python-lxml))) ;used for the tests
1003 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
1004 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
1005 (description "This Python library is based upon the @code{xmlfile} module
1006from @code{lxml}. It aims to provide a low memory, compatible implementation
1007of @code{xmlfile}.")
1008 (license license:expat)))
1009
1010(define-public python2-et-xmlfile
1011 (package-with-python2 python-et-xmlfile))
1012
a042d348
MC
1013(define-public python-openpyxl
1014 (package
1015 (name "python-openpyxl")
441e6d93 1016 (version "2.6.2")
a042d348
MC
1017 (source
1018 (origin
1019 ;; We use the upstream repository, as the tests are not included in the
1020 ;; PyPI releases.
1021 (method hg-fetch)
1022 (uri (hg-reference
1023 (url "https://bitbucket.org/openpyxl/openpyxl")
1024 (changeset version)))
1025 (file-name (string-append name "-" version "-checkout"))
1026 (sha256
441e6d93 1027 (base32 "1qhij6kcvdxqjy4g6193nsv4q7fy8n4fwyd3c2z047idlm6s3j4w"))))
a042d348
MC
1028 (build-system python-build-system)
1029 (arguments
1030 `(#:phases (modify-phases %standard-phases
1031 (replace 'check
1032 (lambda _
1033 (invoke "pytest"))))))
1034 (native-inputs
1035 ;; For the test suite.
1036 `(("python-lxml" ,python-lxml)
1037 ("python-pillow" ,python-pillow)
1038 ("python-pytest" ,python-pytest)))
1039 (propagated-inputs
1040 `(("python-et-xmlfile" ,python-et-xmlfile)
1041 ("python-jdcal" ,python-jdcal)))
1042 (home-page "https://openpyxl.readthedocs.io")
1043 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
1044 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
1045XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
1046standard.")
1047 (license license:expat)))
1048
44d10b1f
RW
1049(define-public python-eventlet
1050 (package
1051 (name "python-eventlet")
1052 (version "0.20.1")
1053 (source
1054 (origin
1055 (method url-fetch)
1056 (uri (pypi-uri "eventlet" version))
1057 (sha256
1058 (base32
1059 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
1060 (build-system python-build-system)
1061 (propagated-inputs
1062 `(("python-greenlet" ,python-greenlet)))
1063 (arguments
1064 ;; TODO: Requires unpackaged 'enum-compat'.
1065 '(#:tests? #f))
1066 (home-page "http://eventlet.net")
1067 (synopsis "Concurrent networking library for Python")
1068 (description
1069 "Eventlet is a concurrent networking library for Python that
1070allows you to change how you run your code, not how you write it.
1071It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1072Coroutines ensure that the developer uses a blocking style of programming
1073that is similar to threading, but provide the benefits of non-blocking I/O.
1074The event dispatch is implicit, which means you can easily use @code{Eventlet}
1075from the Python interpreter, or as a small part of a larger application.")
1076 (license license:expat)))
1077
1078(define-public python2-eventlet
1079 (let ((base (package-with-python2
1080 (strip-python2-variant python-eventlet))))
1081 (package (inherit base)
1082 (propagated-inputs
1083 `(("python2-enum34" ,python2-enum34)
1084 ,@(package-propagated-inputs base))))))
1085
1086(define-public python-six
1087 (package
1088 (name "python-six")
6c58a06e 1089 (version "1.12.0")
44d10b1f
RW
1090 (source
1091 (origin
1092 (method url-fetch)
1093 (uri (pypi-uri "six" version))
1094 (sha256
1095 (base32
6c58a06e 1096 "0wxs1q74v07ssjywbbm7x6h5v9qx209ld2yfsif4060sxi0h2sni"))))
44d10b1f
RW
1097 (build-system python-build-system)
1098 (arguments
1099 `(#:phases
1100 (modify-phases %standard-phases
1101 (replace 'check
1102 (lambda _
1103 (invoke "py.test" "-v"))))))
1104 (native-inputs
1105 `(("python-py" ,python-py)
1106 ("python-pytest" ,python-pytest-bootstrap)))
1107 (home-page "https://pypi.python.org/pypi/six/")
1108 (synopsis "Python 2 and 3 compatibility utilities")
1109 (description
1110 "Six is a Python 2 and 3 compatibility library. It provides utility
1111functions for smoothing over the differences between the Python versions with
1112the goal of writing Python code that is compatible on both Python versions.
1113Six supports every Python version since 2.5. It is contained in only one
1114Python file, so it can be easily copied into your project.")
1115 (license license:x11)))
1116
1117(define-public python2-six
1118 (package-with-python2 python-six))
1119
1120(define-public python-six-bootstrap
1121 (package
1122 (inherit python-six)
1123 (name "python-six-bootstrap")
1124 (native-inputs `())
1125 (arguments `(#:tests? #f))))
1126
1127(define-public python2-six-bootstrap
1128 (package-with-python2 python-six-bootstrap))
1129
1130(define-public python-schedule
1131 (package
1132 (name "python-schedule")
1133 (version "0.4.3")
1134 (source
1135 (origin
1136 (method url-fetch)
1137 (uri (pypi-uri "schedule" version))
1138 (sha256
1139 (base32
1140 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1141 (build-system python-build-system)
1142 (native-inputs
1143 `(("python-pytest" ,python-pytest)
1144 ("python-mock" ,python-mock)))
1145 (home-page "https://github.com/dbader/schedule")
1146 (synopsis "Schedule periodic function calls in Python")
1147 (description
1148 "Schedule is an in-process scheduler for periodic jobs that uses the
1149builder pattern for configuration. Schedule lets you run Python functions (or
1150any other callable) periodically at pre-determined intervals using a simple,
1151human-friendly syntax.")
1152 (license license:expat)))
1153
1154(define-public python2-schedule
1155 (package-with-python2 python-schedule))
1156
1157(define-public python-pandas
1158 (package
1159 (name "python-pandas")
7a97a26d 1160 (version "0.25.2")
44d10b1f
RW
1161 (source
1162 (origin
1163 (method url-fetch)
1164 (uri (pypi-uri "pandas" version))
1165 (sha256
7a97a26d 1166 (base32 "1gp2pvzdiakvgjmykdzdlzrsfbg4vjm49jjdl9s0ha0a3yfs34fa"))))
44d10b1f
RW
1167 (build-system python-build-system)
1168 (arguments
1169 `(#:modules ((guix build utils)
1170 (guix build python-build-system)
1171 (ice-9 ftw)
1172 (srfi srfi-26))
1173 #:phases (modify-phases %standard-phases
c0d43f62
MC
1174 (add-after 'unpack 'patch-which
1175 (lambda* (#:key inputs #:allow-other-keys)
1176 (let ((which (assoc-ref inputs "which")))
1177 (substitute* "pandas/io/clipboard/__init__.py"
1178 (("^CHECK_CMD = .*")
1179 (string-append "CHECK_CMD = \"" which "\"\n"))))
1180 #t))
44d10b1f
RW
1181 (replace 'check
1182 (lambda _
1183 (let ((build-directory
1184 (string-append
1185 (getcwd) "/build/"
1186 (car (scandir "build"
1187 (cut string-prefix? "lib." <>))))))
1188 ;; Disable the "strict data files" option which causes
c0d43f62
MC
1189 ;; the build to error out if required data files are
1190 ;; not available (as is the case with PyPI archives).
44d10b1f
RW
1191 (substitute* "setup.cfg"
1192 (("addopts = --strict-data-files") "addopts = "))
1193 (with-directory-excursion build-directory
c0d43f62
MC
1194 ;; Delete tests that require "moto" which is not yet
1195 ;; in Guix.
44d10b1f
RW
1196 (for-each delete-file
1197 '("pandas/tests/io/conftest.py"
1198 "pandas/tests/io/json/test_compression.py"
1199 "pandas/tests/io/parser/test_network.py"
44d10b1f
RW
1200 "pandas/tests/io/test_parquet.py"))
1201 (invoke "pytest" "-vv" "pandas" "--skip-slow"
1202 "--skip-network" "-k"
1203 ;; XXX: Due to the deleted tests above.
1204 "not test_read_s3_jsonl"))))))))
1205 (propagated-inputs
1206 `(("python-numpy" ,python-numpy)
667c6ef5 1207 ("python-openpyxl" ,python-openpyxl)
44d10b1f 1208 ("python-pytz" ,python-pytz)
667c6ef5
MC
1209 ("python-dateutil" ,python-dateutil)
1210 ("python-xlrd" ,python-xlrd)))
c0d43f62
MC
1211 (inputs
1212 `(("which" ,which)))
44d10b1f
RW
1213 (native-inputs
1214 `(("python-cython" ,python-cython)
1215 ("python-beautifulsoup4" ,python-beautifulsoup4)
1216 ("python-lxml" ,python-lxml)
1217 ("python-html5lib" ,python-html5lib)
1218 ("python-nose" ,python-nose)
c0d43f62
MC
1219 ("python-pytest" ,python-pytest)
1220 ("python-pytest-mock" ,python-pytest-mock)))
44d10b1f
RW
1221 (home-page "https://pandas.pydata.org")
1222 (synopsis "Data structures for data analysis, time series, and statistics")
1223 (description
1224 "Pandas is a Python package providing fast, flexible, and expressive data
1225structures designed to make working with structured (tabular,
1226multidimensional, potentially heterogeneous) and time series data both easy
1227and intuitive. It aims to be the fundamental high-level building block for
1228doing practical, real world data analysis in Python.")
d8bb1097 1229 (properties `((python2-variant . ,(delay python2-pandas))))
44d10b1f
RW
1230 (license license:bsd-3)))
1231
d8bb1097 1232;; Pandas 0.24.x are the last versions that support Python 2.
44d10b1f 1233(define-public python2-pandas
d8bb1097
MB
1234 (let ((pandas (package-with-python2
1235 (strip-python2-variant python-pandas))))
1236 (package/inherit
1237 pandas
1238 (version "0.24.2")
1239 (source (origin
1240 (method url-fetch)
1241 (uri (pypi-uri "pandas" version))
1242 (sha256
1243 (base32
1244 "18imlm8xbhcbwy4wa957a1fkamrcb0z988z006jpfda3ki09z4ag")))))))
44d10b1f
RW
1245
1246(define-public python2-mechanize
1247 (package
1248 (name "python2-mechanize")
1249 (version "0.2.5")
1250 (source
1251 (origin
1252 (method url-fetch)
1cc184e6 1253 (uri (pypi-uri "mechanize" version))
44d10b1f
RW
1254 (sha256
1255 (base32
1256 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1257 (build-system python-build-system)
1258 (arguments
1259 `(#:python ,python-2 ; apparently incompatible with Python 3
1260 #:tests? #f))
1261 ;; test fails with message
1262 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1263 ;; (python-3.3.2) or
1264 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1265 ;; (python-2.7.5).
1266 ;; The source code is from March 2011 and probably not up-to-date
1267 ;; with respect to python unit tests.
1268 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1269 (synopsis
1270 "Stateful programmatic web browsing in Python")
1271 (description
1272 "Mechanize implements stateful programmatic web browsing in Python,
1273after Andy Lester’s Perl module WWW::Mechanize.")
1274 (license (license:non-copyleft
1275 "file://COPYING"
1276 "See COPYING in the distribution."))))
1277
1278
1279(define-public python-simplejson
1280 (package
1281 (name "python-simplejson")
1282 (version "3.14.0")
1283 (source
1284 (origin
1285 (method url-fetch)
1286 (uri (pypi-uri "simplejson" version))
1287 (sha256
1288 (base32
1289 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1290 (build-system python-build-system)
1291 (home-page "http://simplejson.readthedocs.org/en/latest/")
1292 (synopsis
1293 "Json library for Python")
1294 (description
1295 "JSON (JavaScript Object Notation) is a subset of JavaScript
1296syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1297format.
1298
1299Simplejson exposes an API familiar to users of the standard library marshal
1300and pickle modules. It is the externally maintained version of the json
1301library contained in Python 2.6, but maintains compatibility with Python 2.5
1302and (currently) has significant performance advantages, even without using
1303the optional C extension for speedups. Simplejson is also supported on
1304Python 3.3+.")
1305 (license license:x11)))
1306
1307(define-public python2-simplejson
1308 (package-with-python2 python-simplejson))
1309
1310
1311(define-public python-pyicu
1312 (package
1313 (name "python-pyicu")
dc23bb45 1314 (version "2.3.1")
44d10b1f
RW
1315 (source
1316 (origin
1317 (method url-fetch)
1318 (uri (pypi-uri "PyICU" version))
1319 (sha256
1320 (base32
dc23bb45 1321 "1x4w8m7ifki9z2a187pgjr33z6z0rp2fii9b73djak1vhm9v9cnx"))))
44d10b1f
RW
1322 (build-system python-build-system)
1323 (inputs
1324 `(("icu4c" ,icu4c)))
1325 (native-inputs
1326 `(("python-pytest" ,python-pytest)
1327 ("python-six" ,python-six)))
1328 (home-page "https://github.com/ovalhub/pyicu")
1329 (synopsis "Python extension wrapping the ICU C++ API")
1330 (description
1331 "PyICU is a python extension wrapping the ICU C++ API.")
1332 (properties `((python2-variant . ,(delay python2-pyicu))))
1333 (license license:x11)))
1334
1335(define-public python2-pyicu
1336 (let ((base (package-with-python2
1337 (strip-python2-variant python-pyicu))))
1338 (package
1339 (inherit base)
1340 (arguments
1341 `(,@(package-arguments base)
1342 #:phases
1343 (modify-phases %standard-phases
1344 (add-before 'check 'delete-failing-test
1345 (λ _
1346 ;; XXX: This fails due to Unicode issues unique to Python 2,
1347 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1348 (delete-file "test/test_Script.py")
1349 #t))))))))
1350
1351(define-public python2-dogtail
1352 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1353 ;; spaces in indentation" with Python 3.
1354 (package
1355 (name "python2-dogtail")
1356 (version "0.9.9")
1357 (source (origin
1358 (method url-fetch)
1359 (uri (pypi-uri "dogtail" version))
1360 (sha256
1361 (base32
1362 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1363 (build-system python-build-system)
1364 (arguments `(#:python ,python-2
1365 #:tests? #f)) ; invalid command "test"
1366 ;; Currently no offical homepage.
1367 (home-page "https://pypi.python.org/pypi/dogtail/")
1368 (synopsis "GUI test tool and automation framework written in Python")
1369 (description
1370 "Dogtail is a GUI test tool and automation framework written in Python.
1371It uses Accessibility (a11y) technologies to communicate with desktop
1372applications. dogtail scripts are written in Python and executed like any
1373other Python program.")
1374 (license license:gpl2+)))
1375
1376(define-public python-empy
1377 (package
1378 (name "python-empy")
0f6d5115 1379 (version "3.3.3")
44d10b1f
RW
1380 (source (origin
1381 (method url-fetch)
1382 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1383 version ".tar.gz"))
1384 (sha256
1385 (base32
0f6d5115 1386 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
44d10b1f
RW
1387 (build-system python-build-system)
1388 (arguments
0f6d5115 1389 `(#:tests? #f)) ; python2 only
44d10b1f
RW
1390 (home-page "http://www.alcyone.com/software/empy/")
1391 (synopsis "Templating system for Python")
1392 (description
1393 "EmPy is a system for embedding Python expressions and statements in
1394template text; it takes an EmPy source file, processes it, and produces
1395output. This is accomplished via expansions, which are special signals to the
1396EmPy system and are set off by a special prefix (by default the at sign, @@).
1397EmPy can expand arbitrary Python expressions and statements in this way, as
1398well as a variety of special forms. Textual data not explicitly delimited in
1399this way is sent unaffected to the output, allowing Python to be used in
1400effect as a markup language. Also supported are callbacks via hooks,
1401recording and playback via diversions, and dynamic, chainable filters. The
1402system is highly configurable via command line options and embedded
1403commands.")
1404 (license license:lgpl2.1+)))
1405
1406(define-public python2-empy
0f064242
TGR
1407 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
1408 (package
1409 (inherit base)
1410 (arguments `(,@(package-arguments base)
1411 #:tests? #t)))))
44d10b1f
RW
1412
1413(define-public python2-element-tree
1414 (package
1415 (name "python2-element-tree")
1416 (version "1.2.6")
1417 (source (origin
1418 (method url-fetch)
1419 (uri (string-append
1420 "http://effbot.org/media/downloads/elementtree-"
1421 version "-20050316.tar.gz"))
1422 (sha256
1423 (base32
1424 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1425 (build-system python-build-system)
1426 (arguments
1427 `(#:python ,python-2 ; seems to be part of Python 3
1428 #:tests? #f)) ; no 'test' sub-command
1429 (synopsis "Toolkit for XML processing in Python")
1430 (description
1431 "ElementTree is a Python library supporting lightweight XML processing.")
1432 (home-page "http://effbot.org/zone/element-index.htm")
1433 (license (license:x11-style
1434 "http://docs.python.org/2/license.html"
1435 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1436
1437(define-public python2-pybugz
1438 (package
1439 (name "python2-pybugz")
1440 (version "0.6.11")
1441 (source (origin
1442 (method url-fetch)
1443 (uri (string-append
1444 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1445 version ".tar.gz"))
1446 (sha256
1447 (base32
1448 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1449 (patches (search-patches "pybugz-stty.patch"
1450 "pybugz-encode-error.patch"))))
1451 (build-system python-build-system)
1452 (arguments
1453 `(#:python ,python-2 ; SyntaxError with Python 3
1454 #:tests? #f)) ; no 'test' sub-command
1455 (propagated-inputs
1456 `(("element-tree" ,python2-element-tree)))
1457 (synopsis "Python and command-line interface to Bugzilla")
1458 (description
1459 "PyBugz is a Python library and command-line tool to query the Bugzilla
1460bug tracking system. It is meant as an aid to speed up interaction with the
1461bug tracker.")
1462 (home-page "http://www.liquidx.net/pybugz/")
1463 (license license:gpl2)))
1464
1465(define-public python2-enum
1466 (package
1467 (name "python2-enum")
1468 (version "0.4.6")
1469 (source (origin
1470 (method url-fetch)
1471 (uri (pypi-uri "enum" version))
1472 (sha256
1473 (base32
1474 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1475 (build-system python-build-system)
1476 (arguments
1477 `(#:python ,python-2))
1478 (home-page "http://pypi.python.org/pypi/enum/")
1479 (synopsis "Robust enumerated type support in Python")
1480 (description
1481 "This provides a module for robust enumerations in Python. It has
1482been superseded by the Python standard library and is provided only for
1483compatibility.")
1484 ;; Choice of either license.
1485 (license (list license:gpl3+ license:psfl))))
1486
1487(define-public python-enum34
1488 (package
1489 (name "python-enum34")
1490 (version "1.1.6")
1491 (source
1492 (origin
1493 (method url-fetch)
1494 (uri (pypi-uri "enum34" version))
1495 (sha256
1496 (base32
1497 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1498 (build-system python-build-system)
1499 (home-page "https://pypi.python.org/pypi/enum34")
1500 (synopsis "Backported Python 3.4 Enum")
1501 (description
1502 "Enum34 is the new Python stdlib enum module available in Python 3.4
1503backported for previous versions of Python from 2.4 to 3.3.")
1504 (license license:bsd-3)))
1505
1506(define-public python2-enum34
1507 (package-with-python2 python-enum34))
1508
1509(define-public python-parse-type
1510 (package
1511 (name "python-parse-type")
1512 (version "0.4.2")
1513 (source
1514 (origin
1515 (method url-fetch)
1516 (uri (pypi-uri "parse_type" version))
1517 (sha256
1518 (base32
1519 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1520 (build-system python-build-system)
1521 (propagated-inputs
1522 `(("python-six" ,python-six)
1523 ("python-parse" ,python-parse)))
1524 (native-inputs
1525 `(("python-pytest" ,python-pytest)
1526 ("python-pytest-runner" ,python-pytest-runner)))
1527 (home-page "https://github.com/jenisys/parse_type")
1528 (synopsis "Extended parse module")
1529 (description
1530 "Parse_type extends the python parse module.")
1531 (properties
1532 `((python2-variant . ,(delay python2-parse-type))))
1533 (license license:bsd-3)))
1534
1535(define-public python2-parse-type
1536 (let ((base (package-with-python2
1537 (strip-python2-variant python-parse-type))))
1538 (package (inherit base)
1539 (propagated-inputs
1540 `(("python2-enum34" ,python2-enum34)
1541 ,@(package-propagated-inputs base))))))
1542
1543(define-public python-parse
1544 (package
1545 (name "python-parse")
1546 (version "1.8.4")
1547 (source
1548 (origin
1549 (method url-fetch)
1550 (uri (pypi-uri "parse" version))
1551 (sha256
1552 (base32
1553 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
1554 (build-system python-build-system)
1555 (arguments
1556 `(#:phases
1557 (modify-phases %standard-phases
1558 (replace 'check
1559 (lambda _ (invoke "python" "test_parse.py"))))))
1560 (home-page "https://github.com/r1chardj0n3s/parse")
1561 (synopsis "Parse strings")
1562 (description
1563 "Parse strings using a specification based on the Python @code{format()}
1564syntax.")
1565 (license license:x11)))
1566
1567(define-public python-polib
1568 (package
1569 (name "python-polib")
1570 (version "1.0.8")
1571 (source (origin
1572 (method url-fetch)
1573 (uri (pypi-uri "polib" version))
1574 (sha256
1575 (base32
1576 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1577 (build-system python-build-system)
1578 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1579 (synopsis "Manipulate, create and modify gettext files")
1580 (description "Polib can manipulate any gettext format (po, pot and mo)
1581files. It can be used to create po files from scratch or to modify
1582existing ones.")
1583 (license license:expat)))
1584
1585(define-public python2-polib
1586 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1587 (package
1588 (inherit base)
1589 (arguments `(,@(package-arguments base)
1590 ;; Tests don't work with python2.
1591 #:tests? #f)))))
1592
6830120e
TLC
1593(define-public python-poyo
1594 (package
1595 (name "python-poyo")
1596 (version "0.5.0")
1597 (source
1598 (origin
1599 (method url-fetch)
1600 (uri (pypi-uri "poyo" version))
1601 (sha256
1602 (base32
1603 "1pflivs6j22frz0v3dqxnvc8yb8fb52g11lqr88z0i8cg2m5csg2"))))
1604 (build-system python-build-system)
1605 (home-page "https://github.com/hackebrot/poyo")
1606 (synopsis "Lightweight YAML Parser for Python")
1607 (description
1608 "This package provides a lightweight YAML Parser for Python. It supports
1609only a chosen subset of the YAML format that is required to parse cookiecutter
1610user configuration files. It does not have support for serializing into YAML
1611and is not compatible with JSON.")
1612 (license license:expat)))
1613
44d10b1f
RW
1614(define-public scons
1615 (package
1616 (name "scons")
05487ed8 1617 (version "3.0.4")
44d10b1f 1618 (source (origin
ad34338d
RW
1619 (method git-fetch)
1620 (uri (git-reference
1621 (url "https://github.com/SCons/scons.git")
1622 (commit version)))
1623 (file-name (git-file-name name version))
44d10b1f
RW
1624 (sha256
1625 (base32
05487ed8 1626 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
44d10b1f
RW
1627 (build-system python-build-system)
1628 (arguments
1629 `(#:use-setuptools? #f ; still relies on distutils
ad34338d
RW
1630 #:tests? #f ; no 'python setup.py test' command
1631 #:phases
1632 (modify-phases %standard-phases
1633 (add-before 'build 'bootstrap
1634 (lambda _
1635 (substitute* "src/engine/SCons/compat/__init__.py"
1636 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
1637 "sys.modules[new] = __import__(old)"))
05487ed8
RW
1638 (substitute* "src/engine/SCons/Platform/__init__.py"
1639 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
1640 "mod = __import__(full_name)"))
ad34338d
RW
1641 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
1642 (chdir "build/scons")
1643 #t)))))
44d10b1f
RW
1644 (home-page "http://scons.org/")
1645 (synopsis "Software construction tool written in Python")
1646 (description
1647 "SCons is a software construction tool. Think of SCons as an improved,
1648cross-platform substitute for the classic Make utility with integrated
1649functionality similar to autoconf/automake and compiler caches such as ccache.
1650In short, SCons is an easier, more reliable and faster way to build
1651software.")
1652 (license license:x11)))
1653
1654(define-public scons-python2
1655 (package
1656 (inherit (package-with-python2 scons))
1657 (name "scons-python2")))
1658
1659(define-public python-extras
1660 (package
1661 (name "python-extras")
1662 (version "1.0.0")
1663 (source
1664 (origin
1665 (method url-fetch)
1666 (uri (pypi-uri "extras" version))
1667 (sha256
1668 (base32
1669 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1670 (build-system python-build-system)
1671 (arguments
1672 ;; FIXME: Circular dependency on testtools.
1673 '(#:tests? #f))
1674 (home-page "https://github.com/testing-cabal/extras")
1675 (synopsis "Useful extensions to the Python standard library")
1676 (description
1677 "Extras is a set of extensions to the Python standard library.")
1678 (license license:expat)))
1679
1680(define-public python2-extras
1681 (package-with-python2 python-extras))
1682
1683(define-public python-mimeparse
1684 (package
1685 (name "python-mimeparse")
1686 (version "1.6.0")
1687 (source
1688 (origin
1689 (method url-fetch)
89bf667c 1690 (uri (pypi-uri "python-mimeparse" version))
44d10b1f
RW
1691 (sha256
1692 (base32
1693 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
1694 (build-system python-build-system)
1695 (arguments
1696 '(#:phases
1697 (modify-phases %standard-phases
1698 (replace 'check
1699 (lambda _
1700 (invoke "./mimeparse_test.py"))))))
1701 (home-page
1702 "https://github.com/dbtsai/python-mimeparse")
1703 (synopsis "Python library for parsing MIME types")
1704 (description
1705 "Mimeparse provides basic functions for parsing MIME type names and
1706matching them against a list of media-ranges.")
1707 (license license:expat)))
1708
1709(define-public python2-mimeparse
1710 (package-with-python2 python-mimeparse))
1711
1712(define-public python-miniboa
1713 (package
1714 (name "python-miniboa")
1715 (version "1.0.7")
1716 (source
1717 (origin
1718 (method url-fetch)
1719 (uri (pypi-uri "miniboa" version))
1720 (sha256
1721 (base32
1722 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
1723 (build-system python-build-system)
1724 (home-page "https://github.com/shmup/miniboa")
1725 (synopsis "Simple, single-threaded Telnet server")
1726 (description
1727 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
1728server.")
1729 (license license:asl2.0)))
1730
1731(define-public python2-miniboa
1732 (package-with-python2 python-miniboa))
1733
1734(define-public python-pafy
1735 (package
1736 (name "python-pafy")
1737 (version "0.5.3.1")
1738 (source
1739 (origin
1740 (method url-fetch)
1741 (uri (pypi-uri "pafy" version))
1742 (sha256
1743 (base32
1744 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1745 (build-system python-build-system)
1746 (arguments
1747 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1748 (propagated-inputs
1749 ;; Youtube-dl is a python package which is imported in the file
1750 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1751 `(("youtube-dl" ,youtube-dl)))
1752 (home-page "https://np1.github.io/pafy/")
1753 (synopsis "Retrieve YouTube content and metadata")
1754 (description
1755 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1756 (license license:lgpl3+)))
1757
1758(define-public python2-funcsigs
1759 (package
1760 (name "python2-funcsigs")
1761 (version "1.0.2")
1762 (source (origin
1763 (method url-fetch)
1764 (uri (pypi-uri "funcsigs" version))
1765 (sha256
1766 (base32
1767 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1768 (build-system python-build-system)
1769 (arguments
1770 `(#:python ,python-2))
1771 (native-inputs
1772 `(("python2-unittest2" ,python2-unittest2)))
1773 (home-page "http://funcsigs.readthedocs.org")
1774 (synopsis "Python function signatures from PEP362")
1775 (description
1776 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1777 (license license:asl2.0)))
1778
1779(define-public python2-funcsigs-bootstrap
1780 (package
1781 (inherit python2-funcsigs)
1782 (name "python2-funcsigs-bootstrap")
1783 (native-inputs `())
1784 (arguments
1785 `(#:tests? #f
1786 ,@(package-arguments python2-funcsigs)))))
1787
1788(define-public python-py
1789 (package
1790 (name "python-py")
08eba545 1791 (version "1.8.0")
44d10b1f
RW
1792 (source
1793 (origin
1794 (method url-fetch)
1795 (uri (pypi-uri "py" version))
1796 (sha256
1797 (base32
08eba545 1798 "0lsy1gajva083pzc7csj1cvbmminb7b4l6a0prdzyb3fd829nqyw"))))
44d10b1f
RW
1799 (build-system python-build-system)
1800 (arguments
1801 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1802 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1803 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1804 ;; Is this module globally installed?"
1805 '(#:tests? #f))
1806 (native-inputs
1807 `(("python-setuptools-scm" ,python-setuptools-scm)))
1808 (home-page "https://github.com/pytest-dev/py")
1809 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1810 (description
1811 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1812code introspection, and logging.")
1813 (license license:expat)))
1814
1815(define-public python2-py
1816 (package-with-python2 python-py))
1817
1818;; Recent versions of python-fixtures and python-testrepository need
1819;; python-pbr for packaging, which itself needs these two packages for
1820;; testing.
1821;; To fix this circular dependency, we use a build of python-pbr, based on the
1822;; same source, just without any test dependencies and with tests disabled.
1823;; python-pbr-minmal is then used to package python-fixtures and
1824;; python-testrepository.
1825;; Strictly speaking we currently could remove the test-requirements from the
1826;; normal python-pbr package (and save this package) since test are disabled
1827;; there anyway. But this may change in future.
1828(define-public python-pbr-minimal
1829 (package
1830 (name "python-pbr-minimal")
1831 (version "3.0.1")
1832 (source
1833 (origin
1834 (method url-fetch)
1835 (uri (pypi-uri "pbr" version))
1836 (sha256
1837 (base32
1838 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1839 (build-system python-build-system)
1840 (arguments
1841 `(#:tests? #f))
1842 (home-page "http://docs.openstack.org/developer/pbr/")
1843 (synopsis "Minimal build of python-pbr used for bootstrapping")
1844 (description
1845 "Used only for bootstrapping python2-pbr, you should not need this.")
1846 (license license:asl2.0)))
1847
1848(define-public python2-pbr-minimal
1849 (package-with-python2 python-pbr-minimal))
1850
1851(define-public python-pbr
1852 (package
1853 (inherit python-pbr-minimal)
1854 (name "python-pbr")
1855 (arguments
1856 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1857 (propagated-inputs
1858 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1859 (native-inputs
1860 `(("python-fixtures" ,python-fixtures-bootstrap)
1861 ;; discover, coverage, hacking, subunit
1862 ("python-mock" ,python-mock)
1863 ("python-six" ,python-six)
1864 ("python-sphinx" ,python-sphinx)
1865 ("python-testrepository" ,python-testrepository-bootstrap)
1866 ("python-testresources" ,python-testresources-bootstrap)
1867 ("python-testscenarios" ,python-testscenarios-bootstrap)
1868 ("python-testtools" ,python-testtools-bootstrap)
1869 ("python-virtualenv" ,python-virtualenv)))
1870 (synopsis "Enhance the default behavior of Python’s setuptools")
1871 (description
1872 "Python Build Reasonableness (PBR) is a library that injects some useful
1873and sensible default behaviors into your setuptools run. It will set
1874versions, process requirements files and generate AUTHORS and ChangeLog file
1875from git information.
1876")))
1877
1878(define-public python2-pbr
1879 (package-with-python2 python-pbr))
1880
ea43f0d5
MB
1881(define-public python-pyrsistent
1882 (package
1883 (name "python-pyrsistent")
1884 (version "0.14.11")
1885 (home-page "https://github.com/tobgu/pyrsistent")
1886 (source (origin
1887 (method url-fetch)
1888 (uri (pypi-uri "pyrsistent" version))
1889 (sha256
1890 (base32
1891 "1qkh74bm296mp5g3r11lgsksr6bh4w1bf8pji4nmxdlfj542ga1w"))))
1892 (build-system python-build-system)
1893 (native-inputs
1894 `(("python-hypothesis" ,python-hypothesis)
1895 ("python-pytest" ,python-pytest)
1896 ("python-pytest-runner" ,python-pytest-runner)))
1897 (propagated-inputs
1898 `(("python-six" ,python-six)))
1899 (synopsis "Persistent data structures for Python")
1900 (description
1901 "Pyrsistent is a number of persistent collections (by some referred to as
1902functional data structures). Persistent in the sense that they are immutable.
1903
1904All methods on a data structure that would normally mutate it instead return a
1905new copy of the structure containing the requested updates. The original
1906structure is left untouched.")
1907 (license license:expat)))
1908
1909(define-public python2-pyrsistent
1910 (package-with-python2 python-pyrsistent))
1911
44d10b1f
RW
1912(define-public python-exif-read
1913 (package
1914 (name "python-exif-read")
1915 (version "2.1.2")
1916 (source (origin
1917 (method url-fetch)
1918 (uri (pypi-uri "ExifRead" version))
1919 (sha256
1920 (base32
1921 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
1922 (build-system python-build-system)
1923 (arguments `(#:tests? #f)) ; no tests
1924 (home-page "https://github.com/ianare/exif-py")
1925 (synopsis "Python library to extract EXIF data from image files")
1926 (description
1927 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1928files.")
1929 (license license:bsd-3)))
1930
1931(define-public python2-exif-read
1932 (package-with-python2 python-exif-read))
1933
1934(define-public python-pyld
1935 (package
1936 (name "python-pyld")
6d4ed78d 1937 (version "1.0.5")
44d10b1f
RW
1938 (source (origin
1939 (method url-fetch)
1940 (uri (pypi-uri "PyLD" version))
1941 (sha256
1942 (base32
6d4ed78d 1943 "1ywbdbsrkg533qh8xn9ifjh2mvam6v5msrjyqq73jfpvcp89qvff"))))
44d10b1f
RW
1944 (build-system python-build-system)
1945 (home-page "https://github.com/digitalbazaar/pyld")
1946 (synopsis "Python implementation of the JSON-LD specification")
1947 (description
1948 "PyLD is an implementation of the JSON-LD specification.")
1949 (license license:bsd-3)))
1950
1951(define-public python2-pyld
1952 (package-with-python2 python-pyld))
1953
1954(define-public python-click
1955 (package
1956 (name "python-click")
61984855 1957 (version "7.0")
44d10b1f
RW
1958 (source
1959 (origin
1960 (method url-fetch)
1961 (uri (pypi-uri "click" version))
1962 (sha256
1963 (base32
61984855 1964 "1mzjixd4vjbjvzb6vylki9w1556a9qmdh35kzmq6cign46av952v"))))
44d10b1f
RW
1965 (build-system python-build-system)
1966 (arguments
8d7e7ca6 1967 `(#:phases
44d10b1f
RW
1968 (modify-phases %standard-phases
1969 (add-after 'unpack 'fix-paths
1970 (lambda* (#:key inputs #:allow-other-keys)
1971 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
1972 "cross-libc" "libc"))))
1973 (substitute* "click/_unicodefun.py"
1974 (("'locale'")
1975 (string-append "'" glibc "/bin/locale'"))))
8d7e7ca6
EF
1976 #t))
1977 (replace 'check
1978 (lambda _
1979 (invoke "python" "-m" "pytest"))))))
44d10b1f
RW
1980 (native-inputs
1981 `(("python-pytest" ,python-pytest)))
61984855 1982 (home-page "https://palletsprojects.com/p/click/")
44d10b1f
RW
1983 (synopsis "Command line library for Python")
1984 (description
1985 "Click is a Python package for creating command line interfaces in a
1986composable way with as little code as necessary. Its name stands for
1987\"Command Line Interface Creation Kit\". It's highly configurable but comes
1988with sensible defaults out of the box.")
1989 (license license:bsd-3)))
1990
1991(define-public python2-click
1992 (package-with-python2 python-click))
1993
1994(define-public python-wheel
1995 (package
1996 (name "python-wheel")
746c074b 1997 (version "0.32.3")
44d10b1f
RW
1998 (source
1999 (origin
2000 (method url-fetch)
2001 (uri (pypi-uri "wheel" version))
2002 (sha256
2003 (base32
746c074b 2004 "1dhxl1bf18bx9szmqcnxbg6204hp3im8089q3hkwh5jfa6zh75q2"))))
44d10b1f
RW
2005 (build-system python-build-system)
2006 (native-inputs
2007 `(("python-jsonschema" ,python-jsonschema)
2008 ("python-pytest-cov" ,python-pytest-cov)))
2009 (home-page "https://bitbucket.org/pypa/wheel/")
2010 (synopsis "Format for built Python packages")
2011 (description
2012 "A wheel is a ZIP-format archive with a specially formatted filename and
2013the @code{.whl} extension. It is designed to contain all the files for a PEP
2014376 compatible install in a way that is very close to the on-disk format. Many
2015packages will be properly installed with only the @code{Unpack} step and the
2016unpacked archive preserves enough information to @code{Spread} (copy data and
2017scripts to their final locations) at any later time. Wheel files can be
2018installed with a newer @code{pip} or with wheel's own command line utility.")
2019 (license license:expat)
2020 (properties `((python2-variant . ,(delay python2-wheel))))))
2021
2022(define-public python2-wheel
2023 (let ((wheel (package-with-python2
2024 (strip-python2-variant python-wheel))))
2025 (package (inherit wheel)
2026 (native-inputs `(("python2-functools32" ,python2-functools32)
2027 ,@(package-native-inputs wheel))))))
2028
2029(define-public python-vcversioner
2030 (package
2031 (name "python-vcversioner")
2032 (version "2.16.0.0")
2033 (source
2034 (origin
2035 (method url-fetch)
2036 (uri (pypi-uri "vcversioner" version))
2037 (sha256
2038 (base32
2039 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
2040 (build-system python-build-system)
2041 (synopsis "Python library for version number discovery")
2042 (description "Vcversioner is a Python library that inspects tagging
2043information in a variety of version control systems in order to discover
2044version numbers.")
2045 (home-page "https://github.com/habnabit/vcversioner")
2046 (license license:isc)))
2047
2048(define-public python2-vcversioner
2049 (package-with-python2 python-vcversioner))
2050
5591fc4f
MC
2051(define-public python-jdcal
2052 (package
2053 (name "python-jdcal")
2054 (version "1.4")
2055 (source
2056 (origin
2057 (method url-fetch)
2058 (uri (pypi-uri "jdcal" version))
2059 (sha256
2060 (base32
2061 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
2062 (build-system python-build-system)
2063 (arguments
2064 `(#:phases (modify-phases %standard-phases
2065 (replace 'check
2066 (lambda _
2067 (invoke "pytest"))))))
2068 (native-inputs
2069 `(("python-pytest" ,python-pytest)))
2070 (home-page "https://github.com/phn/jdcal")
2071 (synopsis "Functions to convert between Julian dates Gregorian dates")
2072 (description "This Python library provides functions for converting
2073between Julian dates and Gregorian dates.")
2074 (license license:bsd-2)))
2075
2076(define-public python2-jdcal
2077 (package-with-python2 python-jdcal))
2078
44d10b1f
RW
2079(define-public python-jsonschema
2080 (package
2081 (name "python-jsonschema")
1adde06e 2082 (version "3.0.1")
44d10b1f
RW
2083 (source (origin
2084 (method url-fetch)
786ccb87 2085 (uri (pypi-uri "jsonschema" version))
44d10b1f
RW
2086 (sha256
2087 (base32
1adde06e 2088 "03g20i1xfg4qdlk4475pl4pp7y0h37g1fbgs5qhy678q9xb822hc"))))
44d10b1f
RW
2089 (build-system python-build-system)
2090 (arguments
2091 '(#:phases
2092 (modify-phases %standard-phases
1adde06e
MB
2093 (replace 'check
2094 (lambda _
2095 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
2096 (invoke "trial" "jsonschema"))))))
44d10b1f 2097 (native-inputs
1adde06e
MB
2098 `(("python-setuptools_scm" ,python-setuptools-scm)
2099 ("python-twisted" ,python-twisted)))
2100 (propagated-inputs
2101 `(("python-attrs" ,python-attrs)
2102 ("python-pyrsistent" ,python-pyrsistent)
2103 ("python-six" ,python-six)))
44d10b1f
RW
2104 (home-page "https://github.com/Julian/jsonschema")
2105 (synopsis "Implementation of JSON Schema for Python")
2106 (description
2107 "Jsonschema is an implementation of JSON Schema for Python.")
2108 (license license:expat)
2109 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2110
2111(define-public python2-jsonschema
2112 (let ((jsonschema (package-with-python2
2113 (strip-python2-variant python-jsonschema))))
2114 (package (inherit jsonschema)
44d10b1f 2115 (propagated-inputs
1adde06e
MB
2116 `(("python2-functools32" ,python2-functools32)
2117 ,@(package-propagated-inputs jsonschema))))))
44d10b1f 2118
914bba28
TGR
2119;; This old version is still required by docker-compose as of 1.24.0.
2120(define-public python-jsonschema-2.6
2121 (package
2122 (name "python-jsonschema")
2123 (version "2.6.0")
2124 (source (origin
2125 (method url-fetch)
2126 (uri (pypi-uri "jsonschema" version))
2127 (sha256
2128 (base32
2129 "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg"))))
2130 (build-system python-build-system)
2131 (arguments
2132 '(#:phases
2133 (modify-phases %standard-phases
2134 (replace 'check (lambda _ (invoke "nosetests"))))))
2135 (native-inputs
2136 `(("python-nose" ,python-nose)
2137 ("python-vcversioner" ,python-vcversioner)))
2138 (home-page "https://github.com/Julian/jsonschema")
2139 (synopsis "Implementation of JSON Schema for Python")
2140 (description
2141 "Jsonschema is an implementation of JSON Schema for Python.")
2142 (license license:expat)
2143 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2144
44d10b1f
RW
2145(define-public python-schema
2146 (package
2147 (name "python-schema")
2148 (version "0.6.6")
2149 (source
2150 (origin
2151 (method url-fetch)
2152 (uri (pypi-uri "schema" version))
2153 (sha256
2154 (base32
2155 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2156 (build-system python-build-system)
2157 (native-inputs
2158 `(("python-pytest" ,python-pytest)))
2159 (home-page "https://github.com/keleshev/schema")
2160 (synopsis "Simple data validation library")
2161 (description
2162 "@code{python-schema} is a library for validating Python data
2163structures, such as those obtained from config-files, forms, external
2164services or command-line parsing, converted from JSON/YAML (or
2165something else) to Python data-types.")
2166 (license license:psfl)))
2167
2168(define-public python2-schema
2169 (package-with-python2 python-schema))
2170
2171(define-public python-schema-0.5
2172 (package (inherit python-schema)
2173 (version "0.5.0")
2174 (source
2175 (origin
2176 (method url-fetch)
2177 (uri (pypi-uri "schema" version))
2178 (sha256
2179 (base32
2180 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2181
2182(define-public python2-schema-0.5
2183 (package-with-python2 python-schema-0.5))
2184
2185(define-public python-kitchen
2186 (package
2187 (name "python-kitchen")
2188 (version "1.2.5")
2189 (source
2190 (origin
2191 (method url-fetch)
2192 (uri (pypi-uri "kitchen" version))
2193 (sha256
2194 (base32
2195 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2196 (build-system python-build-system)
2197 (propagated-inputs
2198 `(("python-chardet" ,python-chardet)))
2199 (home-page "https://github.com/fedora-infra/kitchen")
2200 (synopsis "Python API for snippets")
2201 (description "@code{kitchen} module provides a python API for all sorts of
2202little useful snippets of code that everybody ends up writing for their projects
2203but never seem big enough to build an independent release. Use kitchen and stop
2204cutting and pasting that code over and over.")
2205 (license (list license:lgpl2.1+
2206 ;; subprocess.py, test_subprocess.py,
2207 ;; kitchen/pycompat25/defaultdict.py:
2208 license:psfl))))
2209
2210(define-public python2-kitchen
2211 (package-with-python2 python-kitchen))
2212
2213(define-public python-unidecode
2214 (package
2215 (name "python-unidecode")
eb80a300 2216 (version "1.1.1")
44d10b1f
RW
2217 (source (origin
2218 (method url-fetch)
2219 (uri (pypi-uri "Unidecode" version))
2220 (sha256
2221 (base32
eb80a300 2222 "1s6cp2lv4m0f00hjckjz8p6m7d3n3v16jvg353llf5ia1iqsnsib"))))
44d10b1f
RW
2223 (build-system python-build-system)
2224 (home-page "https://pypi.python.org/pypi/Unidecode")
2225 (synopsis "ASCII transliterations of Unicode text")
2226 (description
2227 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2228useful when integrating with legacy code that doesn't support Unicode, or for
2229ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2230machine identifiers from human-readable Unicode strings that should still be
2231somewhat intelligible.")
2232 (license license:gpl2+)))
2233
2234(define-public python2-unidecode
2235 (package-with-python2 python-unidecode))
2236
2237(define-public python-pyjwt
2238 (package
2239 (name "python-pyjwt")
be6f2f56 2240 (version "1.7.1")
44d10b1f
RW
2241 (source
2242 (origin
2243 (method url-fetch)
2244 (uri (pypi-uri "PyJWT" version))
2245 (sha256
2246 (base32
be6f2f56 2247 "15hflax5qkw1v6nssk1r0wkj83jgghskcmn875m3wgvpzdvajncd"))
44d10b1f
RW
2248 (modules '((guix build utils)))
2249 (snippet
2250 '(begin
2251 (for-each delete-file-recursively
2252 (find-files "." "\\.pyc$"))
2253 #t))))
2254 (build-system python-build-system)
2255 (native-inputs
2256 `(("python-pytest" ,python-pytest)
2257 ("python-pytest-cov" ,python-pytest-cov)
2258 ("python-pytest-runner" ,python-pytest-runner)))
2259 (home-page "https://github.com/progrium/pyjwt")
2260 (synopsis "JSON Web Token implementation in Python")
2261 (description
2262 "PyJWT is a JSON Web Token implementation written in Python.")
2263 (license license:expat)))
2264
2265(define-public python2-pyjwt
2266 (package-with-python2 python-pyjwt))
2267
2268(define-public python-pykka
2269 (package
2270 (name "python-pykka")
2271 (version "1.2.1")
2272 (source
2273 (origin
2274 (method url-fetch)
2275 (uri (pypi-uri "Pykka" version))
2276 (sha256
2277 (base32
2278 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2279 (build-system python-build-system)
2280 (native-inputs
2281 `(("python-mock" ,python-mock)
2282 ("python-nose" ,python-nose)
2283 ("python-gevent" ,python-gevent)
2284 ("python-eventlet" ,python-eventlet)))
2285 (home-page "https://www.pykka.org/")
2286 (synopsis "Pykka is a Python implementation of the actor model")
2287 (description
2288 "Pykka is a Python implementation of the actor model.
2289The actor model introduces some simple rules to control the sharing
2290of state and cooperation between execution units, which makes it
2291easier to build concurrent applications.")
2292 (license license:asl2.0)))
2293
2294(define-public python2-pykka
2295 (package-with-python2 python-pykka))
2296
8d22f7e3
VC
2297(define-public python-pymsgbox
2298 (package
2299 (name "python-pymsgbox")
2300 (version "1.0.6")
2301 (source
2302 (origin
2303 (method git-fetch)
2304 (uri (git-reference
2305 ;; LICENSE.txt is not present on pypi
2306 (url "https://github.com/asweigart/PyMsgBox")
2307 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
2308 (file-name (git-file-name name version))
2309 (sha256
2310 (base32
2311 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
2312 (arguments
2313 ;; Circular dependency to run tests:
2314 ;; Tests need pyautogui, which depends on pymsgbox.
2315 '(#:tests? #f))
2316 (build-system python-build-system)
2317 (home-page "https://github.com/asweigart/PyMsgBox")
2318 (synopsis "Python module for JavaScript-like message boxes")
2319 (description
2320 "PyMsgBox is a simple, cross-platform, pure Python module for
2321JavaScript-like message boxes. Types of dialog boxes include:
2322@enumerate
2323@item alert
2324@item confirm
2325@item prompt
2326@item password
2327@end enumerate
2328")
2329 (license license:bsd-3)))
2330
44d10b1f
RW
2331(define-public python-pympler
2332 (package
2333 (name "python-pympler")
2334 (home-page "https://pythonhosted.org/Pympler/")
c498a07e 2335 (version "0.7")
44d10b1f
RW
2336 (source (origin
2337 (method url-fetch)
2338 (uri (pypi-uri "Pympler" version))
2339 (sha256
2340 (base32
c498a07e 2341 "0ki7bqp1h9l1xc2k1h4vjyzsgs20i8ingvcdhszyi72s28wyf4bs"))))
44d10b1f
RW
2342 (build-system python-build-system)
2343 (arguments
2344 `(#:phases (modify-phases %standard-phases
2345 (delete 'check)
2346 (add-after 'install 'check
2347 (lambda* (#:key inputs outputs #:allow-other-keys)
2348 (add-installed-pythonpath inputs outputs)
2349 (invoke "python" "setup.py" "test"))))))
2350 (synopsis "Measure, monitor and analyze memory behavior")
2351 (description
2352 "Pympler is a development tool to measure, monitor and analyze
2353the memory behavior of Python objects in a running Python application.
2354
2355By pympling a Python application, detailed insight in the size and the
2356lifetime of Python objects can be obtained. Undesirable or unexpected
2357runtime behavior like memory bloat and other @samp{pymples} can easily
2358be identified.
2359
2360A web profiling frontend exposes process statistics, garbage
2361visualisation and class tracker statistics.")
2362 (license license:asl2.0)))
2363
2364(define-public python2-pympler
2365 (package-with-python2 python-pympler))
2366
2367(define-public python-itsdangerous
2368 (package
2369 (name "python-itsdangerous")
acfcf2ed 2370 (version "1.1.0")
44d10b1f
RW
2371 (source
2372 (origin
2373 (method url-fetch)
acfcf2ed 2374 (uri (pypi-uri "itsdangerous" version))
44d10b1f
RW
2375 (sha256
2376 (base32
acfcf2ed 2377 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
44d10b1f 2378 (build-system python-build-system)
acfcf2ed 2379 (home-page "https://palletsprojects.com/p/itsdangerous/")
44d10b1f
RW
2380 (synopsis "Python library for passing data to/from untrusted environments")
2381 (description
2382 "Itsdangerous provides various helpers to pass trusted data to untrusted
2383environments and back.")
2384 (license license:bsd-3)))
2385
2386(define-public python2-itsdangerous
2387 (package-with-python2 python-itsdangerous))
2388
2389(define-public python-pyyaml
2390 (package
2391 (name "python-pyyaml")
2392 (version "3.13")
2393 (source
2394 (origin
2395 (method url-fetch)
2396 (uri (pypi-uri "PyYAML" version))
2397 (sha256
2398 (base32
2399 "1gx603g484z46cb74j9rzr6sjlh2vndxayicvlyhxdz98lhhkwry"))))
2400 (build-system python-build-system)
2401 (inputs
2402 `(("libyaml" ,libyaml)))
2403 (home-page "http://pyyaml.org/wiki/PyYAML")
2404 (synopsis "YAML parser and emitter for Python")
2405 (description
2406 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2407complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2408API, and sensible error messages. PyYAML supports standard YAML tags and
2409provides Python-specific tags that allow to represent an arbitrary Python
2410object.")
2411 (license license:expat)))
2412
2413(define-public python2-pyyaml
2414 (package-with-python2 python-pyyaml))
2415
2416(define-public python-vine
2417 (package
2418 (name "python-vine")
2419 (version "1.1.4")
2420 (source
2421 (origin
2422 (method url-fetch)
2423 (uri (pypi-uri "vine" version))
2424 (sha256
2425 (base32
2426 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
2427 (build-system python-build-system)
2428 (native-inputs
2429 `(("python-pytest" ,python-pytest)
2430 ("python-case" ,python-case)))
2431 (home-page "https://github.com/celery/vine")
2432 (synopsis "Promises for Python")
2433 (description
2434 "@code{vine} provides a special implementation of promises in that it can
2435be used both for \"promise of a value\" and lazy evaluation. The biggest
2436upside for this is that everything in a promise can also be a promise,
2437e.g. filters, callbacks and errbacks can all be promises.")
2438 (license license:bsd-3)))
2439
2440(define-public python-virtualenv
2441 (package
2442 (name "python-virtualenv")
2782bd51 2443 (version "16.1.0")
44d10b1f
RW
2444 (source
2445 (origin
2446 (method url-fetch)
2447 (uri (pypi-uri "virtualenv" version))
2448 (sha256
2449 (base32
2782bd51 2450 "0242cg3hdq3qdvx5flyrki8lpwlgwf5k45c21ks5049fv7ygm6gq"))))
44d10b1f
RW
2451 (build-system python-build-system)
2452 (arguments
2453 `(#:phases
2454 (modify-phases %standard-phases
2782bd51 2455 (add-before 'check 'disable-failing-test
44d10b1f
RW
2456 (lambda _
2457 ;; Disable failing test. See upstream bug report
2458 ;; https://github.com/pypa/virtualenv/issues/957
2459 (substitute* "tests/test_virtualenv.py"
2460 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2782bd51 2461 #t)))))
44d10b1f
RW
2462 (native-inputs
2463 `(("python-mock" ,python-mock)
2464 ("python-pytest" ,python-pytest)))
2465 (home-page "https://virtualenv.pypa.io/")
2466 (synopsis "Virtual Python environment builder")
2467 (description
2468 "Virtualenv is a tool to create isolated Python environments.")
2469 (license license:expat)))
2470
2471(define-public python2-virtualenv
2472 (package-with-python2 python-virtualenv))
2473
2474(define-public python-markupsafe
2475 (package
2476 (name "python-markupsafe")
753eb411 2477 (version "1.1.1")
44d10b1f
RW
2478 (source
2479 (origin
2480 (method url-fetch)
5182927c 2481 (uri (pypi-uri "MarkupSafe" version))
44d10b1f
RW
2482 (sha256
2483 (base32
753eb411 2484 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
44d10b1f 2485 (build-system python-build-system)
753eb411
MB
2486 (arguments
2487 `(#:modules ((ice-9 ftw)
2488 (srfi srfi-1)
2489 (srfi srfi-26)
2490 (guix build utils)
2491 (guix build python-build-system))
2492 #:phases (modify-phases %standard-phases
2493 (replace 'check
2494 (lambda _
2495 (let ((cwd (getcwd))
2496 (libdir (find (cut string-prefix? "lib." <>)
2497 (scandir "build"))))
2498 (setenv "PYTHONPATH"
2499 (string-append cwd "/build/" libdir ":"
2500 (getenv "PYTHONPATH")))
2501 (invoke "pytest" "-vv")))))))
2502 (native-inputs
2503 `(("python-pytest" ,python-pytest)))
44d10b1f
RW
2504 (home-page "https://github.com/mitsuhiko/markupsafe")
2505 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2506 (description
2507 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2508for Python.")
2509 (license license:bsd-3)))
2510
2511(define-public python2-markupsafe
2512 (package-with-python2 python-markupsafe))
2513
2514(define-public python-jinja2
2515 (package
2516 (name "python-jinja2")
4a5c7934 2517 (version "2.10.1")
44d10b1f
RW
2518 (source
2519 (origin
2520 (method url-fetch)
2521 (uri (pypi-uri "Jinja2" version))
2522 (sha256
2523 (base32
4a5c7934 2524 "04shqrs56aj04ipyqykj512rw2l0zfammvj9krawzxz7xc14yp06"))))
44d10b1f
RW
2525 (build-system python-build-system)
2526 (propagated-inputs
2527 `(("python-markupsafe" ,python-markupsafe)))
2528 (home-page "http://jinja.pocoo.org/")
2529 (synopsis "Python template engine")
2530 (description
2531 "Jinja2 is a small but fast and easy to use stand-alone template engine
2532written in pure Python.")
2533 (license license:bsd-3)))
2534
2535(define-public python2-jinja2
2536 (package-with-python2 python-jinja2))
2537
ba42a6bf
TLC
2538(define-public python-jinja2-time
2539 (package
2540 (name "python-jinja2-time")
2541 (version "0.2.0")
2542 (source
2543 (origin
2544 (method url-fetch)
2545 (uri (pypi-uri "jinja2-time" version))
2546 (sha256
2547 (base32
2548 "0h0dr7cfpjnjj8bgl2vk9063a53649pn37wnlkd8hxjy656slkni"))))
2549 (build-system python-build-system)
2550 (propagated-inputs
2551 `(("python-arrow" ,python-arrow)
2552 ("python-jinja2" ,python-jinja2)))
2553 (home-page
2554 "https://github.com/hackebrot/jinja2-time")
2555 (synopsis "Jinja2 Extension for Dates and Times")
2556 (description
2557 "This package provides an extension for the template engine Jinja2. It
2558adds a 'now' tag providing a convenient access to the arrow.now() API from
2559templates. A format string can be provided to control the output.")
2560 (license license:expat)))
2561
44d10b1f
RW
2562(define-public python-pystache
2563 (package
2564 (name "python-pystache")
2565 (version "0.5.4")
2566 (source (origin
2567 (method url-fetch)
2568 (uri (pypi-uri "pystache" version))
2569 (sha256
2570 (base32
2571 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2572 (build-system python-build-system)
2573 (arguments
2574 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2575 (home-page "http://defunkt.io/pystache/")
2576 (synopsis "Python logic-less template engine")
2577 (description
2578 "Pystache is a Python implementation of the framework agnostic,
2579logic-free templating system Mustache.")
2580 (license license:expat)
2581 (properties `((python2-variant . ,(delay python2-pystache))))))
2582
2583(define-public python2-pystache
2584 (package (inherit (package-with-python2
2585 (strip-python2-variant python-pystache)))
2586 (arguments
2587 `(#:python ,python-2
2588 #:phases
2589 (modify-phases %standard-phases
2590 (replace 'check
2591 (lambda _
dfafc29b 2592 (invoke "python" "test_pystache.py"))))))))
44d10b1f
RW
2593
2594(define-public python-joblib
2595 (package
2596 (name "python-joblib")
2597 (version "0.13.0")
2598 (source (origin
2599 (method url-fetch)
2600 (uri (pypi-uri "joblib" version))
2601 (sha256
2602 (base32
2603 "0612nazad8dxmn3xghfrmjax6456l4xy6hn9cngs7vydi14ds7v5"))))
2604 (build-system python-build-system)
2605 (arguments
2606 `(#:phases
2607 (modify-phases %standard-phases
2608 (replace 'check
2609 (lambda _ (invoke "pytest" "-v" "joblib"))))))
2610 (native-inputs
2611 `(("python-pytest" ,python-pytest)))
2612 (home-page "https://joblib.readthedocs.io/")
2613 (synopsis "Using Python functions as pipeline jobs")
2614 (description
2615 "Joblib is a set of tools to provide lightweight pipelining in Python.
2616In particular, joblib offers: transparent disk-caching of the output values
2617and lazy re-evaluation (memoize pattern), easy simple parallel computing
2618logging and tracing of the execution.")
2619 (license license:bsd-3)))
2620
2621(define-public python2-joblib
2622 (package-with-python2 python-joblib))
2623
a3363341
VC
2624(define-public python-daemon
2625 (package
2626 (name "python-daemon")
2627 (version "2.2.3")
2628 (source
2629 (origin
2630 (method url-fetch)
2631 (uri (pypi-uri "python-daemon" version))
2632 (sha256
2633 (base32
2634 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
2635 (build-system python-build-system)
2636 (arguments
2637 `(#:phases
2638 (modify-phases %standard-phases
2639 (add-before 'check 'disable-tests
2640 (lambda _
2641 ;; FIXME: Determine why test fails
2642 (substitute* "test/test_daemon.py"
2643 (("test_detaches_process_context")
2644 "skip_test_detaches_process_context"))
2645 #t)))))
2646 (propagated-inputs
2647 `(("python-lockfile" ,python-lockfile)))
2648 (native-inputs
2649 `(("python-unittest2" ,python-unittest2)
2650 ("python-testtools" ,python-testtools)
2651 ("python-testscenarios" ,python-testscenarios)
2652 ("python-mock" ,python-mock)
2653 ("python-docutils" ,python-docutils)))
2654 (home-page "https://pagure.io/python-daemon/")
2655 (synopsis "Python library for making a Unix daemon process")
2656 (description "Python-daemon is a library that assists a Python program to
2657turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
2658
2659This library provides a @code{DaemonContext} class that manages the following
2660important tasks for becoming a daemon process:
2661@enumerate
2662@item Detach the process into its own process group.
2663@item Set process environment appropriate for running inside a chroot.
2664@item Renounce suid and sgid privileges.
2665@item Close all open file descriptors.
2666@item Change the working directory, uid, gid, and umask.
2667@item Set appropriate signal handlers.
2668@item Open new file descriptors for stdin, stdout, and stderr.
2669@item Manage a specified PID lock file.
2670@item Register cleanup functions for at-exit processing.
2671@end enumerate")
2672 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
2673 (license (list license:asl2.0 license:gpl3+))))
2674
44d10b1f
RW
2675(define-public python-docutils
2676 (package
2677 (name "python-docutils")
2678 (version "0.14")
2679 (source
2680 (origin
2681 (method url-fetch)
2682 (uri (pypi-uri "docutils" version))
2683 (sha256
2684 (base32
2685 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2686 (build-system python-build-system)
2687 (arguments
2688 '(#:tests? #f)) ; no setup.py test command
2689 (home-page "http://docutils.sourceforge.net/")
2690 (synopsis "Python Documentation Utilities")
2691 (description
2692 "Docutils is a modular system for processing documentation into useful
2693formats, such as HTML, XML, and LaTeX. For input Docutils supports
2694reStructuredText.")
2695 ;; Most of the source code is public domain, but some source files are
2696 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2697 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2698
2699(define-public python2-docutils
2700 (package-with-python2 python-docutils))
2701
2702(define-public python-pygments
2703 (package
2704 (name "python-pygments")
eed81080 2705 (version "2.4.2")
44d10b1f
RW
2706 (source
2707 (origin
2708 (method url-fetch)
2709 (uri (pypi-uri "Pygments" version))
2710 (sha256
2711 (base32
eed81080 2712 "15v2sqm5g12bqa0c7wikfh9ck2nl97ayizy1hpqhmws5gqalq748"))))
44d10b1f
RW
2713 (build-system python-build-system)
2714 (arguments
2715 ;; FIXME: Tests require sphinx, which depends on this.
2716 '(#:tests? #f))
2717 (home-page "http://pygments.org/")
2718 (synopsis "Syntax highlighting")
2719 (description
2720 "Pygments is a syntax highlighting package written in Python.")
2721 (license license:bsd-2)))
2722
2723(define-public python2-pygments
2724 (package-with-python2 python-pygments))
2725
0f0a5ef9
MC
2726(define-public python-bumpversion
2727 (package
2728 (name "python-bumpversion")
2729 (version "0.5.3")
2730 (source
2731 (origin
2732 (method url-fetch)
2733 (uri (pypi-uri "bumpversion" version))
2734 (sha256
2735 (base32
2736 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
2737 (build-system python-build-system)
2738 (home-page "https://github.com/peritus/bumpversion")
2739 (synopsis "Tool to bump software version")
2740 (description "This tool provides a command-line interface (CLI) to bump a
2741software version simply.")
2742 (license license:expat)))
2743
b24fd2c2
MC
2744(define-public python-deprecated
2745 (package
2746 (name "python-deprecated")
2747 (version "1.2.5")
2748 (source
2749 (origin
2750 (method git-fetch)
2751 (uri (git-reference
2752 (url "https://github.com/tantale/deprecated.git")
2753 (commit (string-append "v" version))))
2754 (file-name (git-file-name name version))
2755 (sha256
2756 (base32
2757 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
2758 (build-system python-build-system)
2759 (arguments
2760 `(#:phases (modify-phases %standard-phases
2761 (replace 'check
2762 (lambda _
2763 (invoke "pytest"))))))
2764 (propagated-inputs
2765 `(("python-wrapt" ,python-wrapt)))
2766 (native-inputs
2767 `(("python-bumpversion" ,python-bumpversion)
2768 ("python-pytest" ,python-pytest)
2769 ("python-pytest-cov" ,python-pytest-cov)
2770 ("python-sphinx" ,python-sphinx)
2771 ("python-tox" ,python-tox)))
2772 (home-page "https://github.com/tantale/deprecated")
2773 (synopsis "Python decorator to deprecate classes, functions or methods")
2774 (description "The @code{deprecated} decorator provides a convenient way to deprecate
2775to deprecate classes, functions or methods.")
2776 (license license:expat)))
2777
d5a998fa
MC
2778(define-public python-pygithub
2779 (package
2780 (name "python-pygithub")
749e38d7 2781 (version "1.43.8")
d5a998fa
MC
2782 (source
2783 ;; We fetch from the Git repo because there are no tests in the PyPI
2784 ;; archive.
2785 (origin
2786 (method git-fetch)
2787 (uri (git-reference
2788 (url "https://github.com/PyGithub/PyGithub.git")
2789 (commit (string-append "v" version))))
2790 (file-name (git-file-name name version))
2791 (sha256
749e38d7 2792 (base32 "1625v558xga5mwhl9jqmibywy5qafmg1vqrirqz6zfq1la1d22mw"))))
d5a998fa
MC
2793 (build-system python-build-system)
2794 (arguments
2795 `(#:phases (modify-phases %standard-phases
2796 ;; Some tests rely on the network.
2797 (add-after 'unpack 'disable-failing-tests
2798 (lambda _
2799 (substitute* "tests/Issue142.py"
2800 (("testDecodeJson") "disabled_testDecodeJson"))
2801 #t))
2802 (add-before 'check 'prepare-for-tests
2803 (lambda _
2804 (for-each (lambda (f)
2805 (chmod f #o666))
2806 (find-files "./tests"))
2807 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
2808 (setenv "PYTHONPATH"
2809 (string-append "./tests:" (getenv "PYTHONPATH")))
2810 #t)))))
2811 (propagated-inputs
2812 `(("python-deprecated" ,python-deprecated)
2813 ("python-pyjwt" ,python-pyjwt)
2814 ("python-requests" ,python-requests)))
2815 (native-inputs `(("python-httpretty" ,python-httpretty)))
2816 (home-page "https://pygithub.readthedocs.io/en/latest/")
2817 (synopsis "Python library for the GitHub API")
2818 (description "This library allows managing GitHub resources such as
2819repositories, user profiles, and organizations in your Python applications,
2820using version 3 of the GitHub application programming interface (API).")
2821 (license license:lgpl3+)))
2822
c0c0bb38
MC
2823(define-public python-rellu
2824 (package
2825 (name "python-rellu")
2826 (version "0.7")
2827 (source
2828 (origin
2829 (method url-fetch)
2830 (uri (pypi-uri "rellu" version))
2831 (sha256
2832 (base32
2833 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
2834 (build-system python-build-system)
2835 (propagated-inputs
2836 `(("python-invoke" ,python-invoke)
2837 ("python-pygithub" ,python-pygithub)))
2838 (home-page "https://github.com/robotframework/rellu")
2839 (synopsis "Utilities to create PyPI releases")
2840 (description "This collection of utilities contains tooling and templates
2841to assist in creating releases on GitHub and publishing them on PyPI. It is
2842designed to be used by Robot Framework and tools and libraries in its
2843ecosystem, but can naturally be used also by other projects.")
2844 (license license:asl2.0)))
2845
b9790285
MC
2846(define-public python-robotframework
2847 (package
2848 (name "python-robotframework")
1710b8f8 2849 (version "3.1.2")
b9790285
MC
2850 ;; There are no tests in the PyPI archive.
2851 (source
2852 (origin
2853 (method git-fetch)
2854 (uri (git-reference
2855 (url "https://github.com/robotframework/robotframework.git")
2856 (commit (string-append "v" version))))
2857 (file-name (git-file-name name version))
2858 (sha256
1710b8f8 2859 (base32 "16gnxy0qinh8fhs0qvhff5z2xh49c3cqgm0d7bfjw120df6x7fym"))
b9790285
MC
2860 (patches (search-patches
2861 "python-robotframework-honor-source-date-epoch.patch"))))
2862 (build-system python-build-system)
2863 (arguments
2864 `(#:phases (modify-phases %standard-phases
2865 (add-before 'build 'build-and-install-doc
2866 (lambda* (#:key outputs #:allow-other-keys)
2867 (let* ((doc-output (assoc-ref outputs "doc"))
2868 (doc (string-append doc-output "/share/"
2869 ,name "-" ,version "/")))
2870 (invoke "invoke" "library-docs" "all")
2871 (mkdir-p doc)
2872 (copy-recursively "doc/libraries"
2873 (string-append doc "/libraries"))
2874 #t)))
2875 (replace 'check
2876 (lambda _
2877 (invoke "python" "utest/run.py"))))))
2878 (native-inputs
2879 `(("python-invoke" ,python-invoke)
2880 ("python-rellu" ,python-rellu)
2881 ("python:tk" ,python "tk"))) ;used when building the HTML doc
2882 (outputs '("out" "doc"))
2883 (home-page "https://robotframework.org")
2884 (synopsis "Generic automation framework")
2885 (description "Robot Framework is a generic automation framework for
2886acceptance testing, acceptance test driven development (ATDD), and robotic
2887process automation (RPA).")
2888 (license license:asl2.0)))
2889
5b84c120
MC
2890(define-public python-robotframework-lint
2891 ;; There is no properly tagged release; the commit below seems to correspond
2892 ;; to the 0.9 stable release available from PyPI. The tests are not
2893 ;; included in the PyPI archive, so we fetch the sources from the upstream
2894 ;; Git repo.
2895 (let ((commit "e851879bab1f63e4e53b34a4dc8a67ed95102830")
2896 (revision "1"))
2897 (package
2898 (name "python-robotframework-lint")
2899 (version (git-version "0.9.0" revision commit))
2900 (source
2901 (origin
2902 (method git-fetch)
2903 (uri (git-reference
2904 (url "https://github.com/boakley/robotframework-lint.git")
2905 (commit commit)))
2906 (file-name (git-file-name name version))
2907 (sha256
2908 (base32
2909 "1p6fknqg5sb9qz5857ji4a877657vgfjm5v3zn45994parx6ml1m"))))
2910 (build-system python-build-system)
2911 (arguments
2912 `(#:phases
2913 (modify-phases %standard-phases
2914 (replace 'check
2915 (lambda _
2916 (invoke "python" "-m" "robot" "-A"
2917 "tests/conf/default.args" "tests"))))))
2918 (propagated-inputs
2919 `(("python-robotframework" ,python-robotframework)))
2920 (home-page "https://github.com/boakley/robotframework-lint/")
2921 (synopsis "Static analysis tool (linter) for Robot Framework")
2922 (description "This package provides the @code{rflint} command-line
2923utility, a static analysis tool (linter) for Robot Framework source files.")
2924 (license license:asl2.0))))
2925
c0c64f17
MC
2926(define-public python-robotframework-sshlibrary
2927 (package
2928 (name "python-robotframework-sshlibrary")
2929 (version "3.3.0")
2930 ;; There are no tests in the PyPI archive.
2931 (source
2932 (origin
2933 (method git-fetch)
2934 (uri (git-reference
2935 (url "https://github.com/robotframework/SSHLibrary.git")
2936 (commit (string-append "v" version))))
2937 (file-name (git-file-name name version))
2938 (sha256
2939 (base32
2940 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
2941 (build-system python-build-system)
2942 (arguments
2943 `(#:phases
2944 (modify-phases %standard-phases
2945 (add-before 'build 'build-and-install-doc
2946 (lambda* (#:key outputs #:allow-other-keys)
2947 (let* ((doc-output (assoc-ref outputs "doc"))
2948 (doc (string-append doc-output "/share/"
2949 ,name "-" ,version "/")))
2950 (invoke "chmod" "-R" "+w" "docs")
2951 (invoke "invoke" "kw-docs" "project-docs")
2952 (mkdir-p doc)
2953 (for-each delete-file (find-files "docs" "\\.rst"))
2954 (copy-recursively "docs" doc)
2955 #t)))
2956 (replace 'check
2957 (lambda _
2958 ;; Some tests require an SSH server; we remove them.
2959 (delete-file "utest/test_client_api.py")
2960 (delete-file "utest/test_scp.py")
2961 (invoke "python" "utest/run.py"))))))
2962 (propagated-inputs
2963 `(("python-robotframework" ,python-robotframework)
2964 ("python-paramiko" ,python-paramiko)
2965 ("python-scp" ,python-scp)))
2966 (native-inputs
2967 `(("openssh" ,openssh)
2968 ("which" ,which)
2969 ;; To generate the documentation
2970 ("python-docutils" ,python-docutils)
2971 ("python-invoke" ,python-invoke)
2972 ("python-pygments" ,python-pygments)
2973 ("python-rellu" ,python-rellu)))
2974 (outputs '("out" "doc"))
2975 (home-page "https://github.com/robotframework/SSHLibrary")
2976 (synopsis "Robot Framework library for SSH and SFTP")
2977 (description "SSHLibrary is a Robot Framework library providing support
2978for SSH and SFTP. It has the following main usages:
2979@itemize @bullet
2980@item Executing commands on the remote machine, either blocking or non-blocking.
2981@item Writing and reading in an interactive shell.
2982@item Transferring files and directories over SFTP.
2983@item Ensuring that files and directories exist on the remote machine.
2984@end itemize")
2985 (license license:asl2.0)))
2986
13d825fc
MC
2987(define-public python-scp
2988 (package
2989 (name "python-scp")
2990 (version "0.13.2")
2991 (source
2992 (origin
2993 (method url-fetch)
2994 (uri (pypi-uri "scp" version))
2995 (sha256
2996 (base32
2997 "1crlpw9lnn58fs1c1rmh7s7s9y5gkgpgjsqlvg9qa51kq1knx7gg"))))
2998 (build-system python-build-system)
2999 (arguments
3000 '(#:tests? #f)) ;tests require an SSH server
3001 (propagated-inputs
3002 `(("python-paramiko" ,python-paramiko)))
3003 (home-page "https://github.com/jbardin/scp.py")
3004 (synopsis "SCP protocol module for Python and Paramiko")
3005 (description "The scp module extends the Paramiko library to send and
3006receive files via the SCP1 protocol, as implemented by the OpenSSH
3007@command{scp} program.")
3008 (license license:gpl2+)))
3009
44d10b1f
RW
3010(define-public python-rst.linker
3011 (package
3012 (name "python-rst.linker")
d37e8e53 3013 (version "1.11")
44d10b1f
RW
3014 (source
3015 (origin
3016 (method url-fetch)
3017 (uri (pypi-uri "rst.linker" version))
3018 (sha256
d37e8e53 3019 (base32 "0pqsfqqx8h0pq21k8l3k62kznrgaj2ala93c64s4d9rpbr4mgkd2"))))
44d10b1f
RW
3020 (build-system python-build-system)
3021 (propagated-inputs
3022 `(("python-dateutil" ,python-dateutil)
3023 ("python-six" ,python-six)))
3024 (native-inputs
3025 `(("python-setuptools-scm" ,python-setuptools-scm)))
3026 ;; Test would require path.py, which would introduce a cyclic dependence.
3027 (arguments `(#:tests? #f))
3028 ;; Note: As of version 1.7 the documentation is not worth building.
3029 (home-page "https://github.com/jaraco/rst.linker")
3030 (synopsis "Sphinx plugin to add links and timestamps")
3031 (description "rst.linker allows to automatically replace text by a
3032reStructuredText external reference or timestamps. It's primary purpose is to
3033augment the changelog, but it can be used for other documents, too.")
3034 (license license:expat)))
3035
3036(define-public python2-rst.linker
3037 (package-with-python2 python-rst.linker))
3038
3039(define-public python-feedgenerator
3040 (package
3041 (name "python-feedgenerator")
3042 (version "1.9")
3043 (source
3044 (origin
3045 (method url-fetch)
3046 (uri (pypi-uri "feedgenerator" version))
3047 (sha256
3048 (base32
3049 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
3050 (modules '((guix build utils)))
3051 (snippet
3052 '(begin
3053 ;; Remove pre-compiled .pyc files from source.
3054 (for-each delete-file-recursively
3055 (find-files "." "__pycache__" #:directories? #t))
3056 (for-each delete-file (find-files "." "\\.pyc$"))
3057 #t))))
3058 (build-system python-build-system)
3059 (propagated-inputs
3060 `(("python-pytz" ,python-pytz)
3061 ("python-six" ,python-six)))
3062 (home-page "https://github.com/getpelican/feedgenerator")
3063 (synopsis
3064 "Standalone version of Django's Atom/RSS feed generator")
3065 (description
3066 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
3067which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3068 (license license:bsd-3)))
3069
3070(define-public python2-feedgenerator
3071 (package-with-python2 python-feedgenerator))
3072
3073(define-public python-toml
3074 (package
3075 (name "python-toml")
3076 (version "0.9.4")
3077 (source
3078 (origin
3079 (method url-fetch)
3080 (uri (pypi-uri "toml" version))
3081 (sha256
3082 (base32
3083 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
3084 (build-system python-build-system)
3085 (arguments
3086 `(#:tests? #f)) ;no tests suite in release
3087 (home-page "https://github.com/uiri/toml")
3088 (synopsis "Library for TOML")
3089 (description
3090 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
3091Language (TOML) configuration files.")
3092 (license license:expat)))
3093
346c8752
BG
3094(define-public python-jsonrpc-server
3095 (package
3096 (name "python-jsonrpc-server")
3097 (version "0.1.2")
3098 (source
3099 (origin
3100 (method url-fetch)
3101 (uri (pypi-uri "python-jsonrpc-server" version))
3102 (sha256
3103 (base32
3104 "0m4ykpcdy52x37n1ikysp07j7p8ialcdvvvsrjp3545sn7iiid09"))))
3105 (build-system python-build-system)
3106 (propagated-inputs
3107 `(("python-future" ,python-future)
3108 ("python-mock" ,python-mock)
3109 ("python-pytest" ,python-pytest)))
3110 (home-page
3111 "https://github.com/palantir/python-jsonrpc-server")
3112 (synopsis "JSON RPC 2.0 server library")
3113 (description
1df5407c 3114 "This package provides a JSON RPC 2.0 server library for Python.")
346c8752
BG
3115 (license license:expat)))
3116
56f4ad47
BG
3117(define-public python-pydocstyle
3118 (package
3119 (name "python-pydocstyle")
3120 (version "3.0.0")
3121 (source
3122 (origin
3123 (method url-fetch)
3124 (uri (pypi-uri "pydocstyle" version))
3125 (sha256
3126 (base32
3127 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
3128 (build-system python-build-system)
3129 (propagated-inputs
3130 `(("python-six" ,python-six)
3131 ("python-snowballstemmer" ,python-snowballstemmer)))
3132 (home-page
3133 "https://github.com/PyCQA/pydocstyle/")
3134 (synopsis "Python docstring style checker")
3135 (description
3136 "This package provides a style checker for the Python Language
3137Server (PLS).")
3138 (license license:expat)))
3139
be4d840c 3140(define-public python-language-server
808dd2d0
BL
3141 (package
3142 (name "python-language-server")
3143 (version "0.29.1")
3144 (source
3145 (origin
3146 (method url-fetch)
3147 (uri (pypi-uri "python-language-server" version))
3148 (sha256
3149 (base32
3150 "1f8qlflh6j3s7qfmzhirpl8fgidl6f0qbakdmiml96wdxzvka0s3"))))
3151 (build-system python-build-system)
3152 (propagated-inputs
3153 `(("python-pluggy" ,python-pluggy)
3154 ("python-jsonrpc-server" ,python-jsonrpc-server)
3155 ("python-jedi" ,python-jedi)
3156 ("python-yapf" ,python-yapf)
3157 ("python-pyflakes" ,python-pyflakes)
3158 ("python-pydocstyle" ,python-pydocstyle)
3159 ("python-pycodestyle" ,python-pycodestyle)
3160 ("python-mccabe" ,python-mccabe)
3161 ("python-rope" ,python-rope)
3162 ("python-autopep8" ,python-autopep8)
3163 ("python-flake8" ,python-flake8)
3164 ("python-pylint" ,python-pylint)))
3165 (home-page "https://github.com/palantir/python-language-server")
3166 (synopsis "Python implementation of the Language Server Protocol")
3167 (description
3168 "The Python Language Server (pyls) is an implementation of the Python 3
be4d840c
BG
3169language specification for the Language Server Protocol (LSP). This tool is
3170used in text editing environments to provide a complete and integrated
3171feature-set for programming Python effectively.")
808dd2d0 3172 (license license:expat)))
be4d840c 3173
44d10b1f
RW
3174(define-public python-black
3175 (package
3176 (name "python-black")
3177 (version "18.6b4")
3178 (source
3179 (origin
3180 (method url-fetch)
3181 (uri (pypi-uri "black" version))
3182 (sha256
3183 (base32
3184 "0i4sfqgz6w15vd50kbhi7g7rifgqlf8yfr8y78rypd56q64qn592"))))
3185 (build-system python-build-system)
3186 (arguments
3187 `(#:phases
3188 (modify-phases %standard-phases
3189 (add-after 'patch-source-shebangs 'patch-extra-shebangs
3190 (lambda _
3191 (let ((python3 (which "python3")))
3192 (substitute* '("tests/data/fmtonoff.py"
3193 "tests/data/string_prefixes.py"
3194 "tests/data/function.py")
3195 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
3196 (string-append "#!" python3 (if (string? minor-version)
3197 minor-version
3198 ""))))))))))
3199 (propagated-inputs
3200 `(("python-click" ,python-click)
3201 ("python-attrs" ,python-attrs)
3202 ("python-appdirs" ,python-appdirs)
3203 ("python-toml" ,python-toml)))
3204 (home-page "https://github.com/ambv/black")
3205 (synopsis "The uncompromising code formatter")
3206 (description "Black is the uncompromising Python code formatter.")
3207 (license license:expat)))
3208
3209(define-public python-blinker
3210 (package
3211 (name "python-blinker")
3212 (version "1.4")
3213 (source
3214 (origin
3215 (method url-fetch)
3216 (uri (pypi-uri "blinker" version))
3217 (sha256
3218 (base32
3219 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3220 (build-system python-build-system)
3221 (home-page "http://pythonhosted.org/blinker/")
3222 (synopsis "Fast, simple object-to-object and broadcast signaling")
3223 (description
3224 "Blinker provides a fast dispatching system that allows any number of
3225interested parties to subscribe to events, or \"signals\".")
3226 (license license:expat)))
3227
3228(define-public python2-blinker
3229 (package-with-python2 python-blinker))
3230
3231(define-public pelican
3232 (package
3233 (name "pelican")
aa71b690 3234 (version "4.0.1")
44d10b1f
RW
3235 (source
3236 (origin
3237 (method url-fetch)
3238 (uri (pypi-uri "pelican" version))
3239 (sha256
3240 (base32
aa71b690 3241 "05yda7n6r0ll18fpdjzkzyr0ls8hbb86fnjyb33k9jvv5avah2lr"))))
44d10b1f
RW
3242 (build-system python-build-system)
3243 (propagated-inputs
3244 `(("python-feedgenerator" ,python-feedgenerator)
3245 ("python-jinja2" ,python-jinja2)
3246 ("python-pygments" ,python-pygments)
3247 ("python-docutils" ,python-docutils)
3248 ("python-pytz" ,python-pytz)
3249 ("python-blinker" ,python-blinker)
3250 ("python-unidecode" ,python-unidecode)
3251 ("python-six" ,python-six)
3252 ("python-dateutil" ,python-dateutil)
3253 ("python-markdown" ,python-markdown)))
3254 (home-page "https://getpelican.com/")
3255 (arguments
3256 `(;; XXX Requires a lot more packages to do unit tests :P
3257 #:tests? #f
3258 #:phases (modify-phases %standard-phases
3259 (add-before
3260 'install 'adjust-requires
3261 ;; Since feedgenerator is installed from git, it doesn't
3262 ;; conform to the version requirements.
3263 ;;
3264 ;; We *do have* "feedgenerator >= 1.6", but strip off the
3265 ;; version requirement so setuptools doesn't get confused.
3266 (lambda _
3267 (substitute* "setup.py"
3268 (("['\"]feedgenerator.*?['\"]")
3269 "'feedgenerator'")))))))
3270 (synopsis "Python-based static site publishing system")
3271 (description
3272 "Pelican is a tool to generate a static blog from reStructuredText,
3273Markdown input files, and more. Pelican uses Jinja2 for templating
3274and is very extensible.")
3275 (license license:agpl3+)))
3276
8c141421
JH
3277(define-public mallard-ducktype
3278 (package
3279 (name "mallard-ducktype")
12cc3da5 3280 (version "1.0.2")
8c141421
JH
3281 (source
3282 (origin
3283 (method git-fetch)
12cc3da5
JH
3284 ;; git-reference because tests are not included in pypi source tarball
3285 ;; https://issues.guix.gnu.org/issue/36755#2
8c141421
JH
3286 (uri (git-reference
3287 (url "https://github.com/projectmallard/mallard-ducktype.git")
3288 (commit version)))
3289 (file-name (git-file-name name version))
3290 (sha256
3291 (base32
12cc3da5 3292 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
8c141421 3293 (build-system python-build-system)
5246655f
EF
3294 (arguments
3295 '(#:phases
3296 (modify-phases %standard-phases
3297 (replace 'check
3298 (lambda _
3299 (with-directory-excursion "tests"
3300 (invoke "sh" "runtests")))))))
8c141421
JH
3301 (home-page "http://projectmallard.org")
3302 (synopsis "Convert Ducktype to Mallard documentation markup")
3303 (description
3304 "Ducktype is a lightweight syntax that can represent all the semantics
3305of the Mallard XML documentation system. Ducktype files can be converted to
3306Mallard using the @command{ducktype} tool. The yelp-tools package
3307provides additional functionality on the produced Mallard documents.")
3308 (license license:expat)))
3309
44d10b1f
RW
3310(define-public python-scikit-image
3311 (package
3312 (name "python-scikit-image")
9ff04084 3313 (version "0.14.2")
44d10b1f
RW
3314 (source
3315 (origin
3316 (method url-fetch)
3317 (uri (pypi-uri "scikit-image" version))
3318 (sha256
9ff04084 3319 (base32 "07qchljkyxvg5nrm12fvszi7pmjk4m01qp0w0z8syxzxxs20pz8s"))))
44d10b1f
RW
3320 (build-system python-build-system)
3321 (arguments
3322 ;; TODO: Some tests require running X11 server. Disable them?
3323 '(#:tests? #f))
3324 ;; See DEPENDS.txt for the list of build and run time requiremnts
3325 (propagated-inputs
3326 `(("python-cloudpickle" ,python-cloudpickle)
3327 ("python-dask" ,python-dask)
3328 ("python-matplotlib" ,python-matplotlib)
3329 ("python-networkx" ,python-networkx)
3330 ("python-numpy" ,python-numpy)
3331 ("python-pillow" ,python-pillow)
3332 ("python-pywavelets" ,python-pywavelets)
3333 ("python-scipy" ,python-scipy)
3334 ("python-six" ,python-six)))
3335 (native-inputs
3336 `(("python-cython" ,python-cython)))
3337 (home-page "http://scikit-image.org/")
3338 (synopsis "Image processing in Python")
3339 (description
3340 "Scikit-image is a collection of algorithms for image processing.")
3341 (license license:bsd-3)))
3342
3343(define-public python2-scikit-image
3344 (package-with-python2 python-scikit-image))
3345
3346(define-public python-cython
3347 (package
3348 (name "python-cython")
6fd27a71 3349 (version "0.29.13")
44d10b1f
RW
3350 (source
3351 (origin
3352 (method url-fetch)
3353 (uri (pypi-uri "Cython" version))
3354 (sha256
6fd27a71
TGR
3355 (base32
3356 "13k37lrcgagwwnzr5bzririsscb793vndj234d475x1h9ad0d7f2"))))
44d10b1f
RW
3357 (build-system python-build-system)
3358 ;; we need the full python package and not just the python-wrapper
3359 ;; because we need libpython3.3m.so
3360 (inputs
3361 `(("python" ,python)))
3362 (arguments
3363 `(#:phases
3364 (modify-phases %standard-phases
3365 (add-before 'check 'set-HOME
3366 ;; some tests require access to "$HOME/.cython"
3367 (lambda _ (setenv "HOME" "/tmp") #t))
3368
3369 ;; FIXME: These tests started failing on armhf after the 0.28 update
3370 ;; (commit c69d11c5930), both with an error such as this:
3371 ;; compiling (cpp) and running dictcomp ...
3372 ;; === C/C++ compiler error output: ===
3373 ;; ‘
3374 ;; dictcomp.cpp:5221: confused by earlier errors, bailing out
3375 ;; See <https://hydra.gnu.org/build/2948724> for logs.
3376 ,@(if (target-arm32?)
3377 `((add-before 'check 'disable-failing-tests
3378 (lambda _
3379 (let ((disabled-tests (open-file "tests/bugs.txt" "a")))
3380 (for-each (lambda (test)
3381 (format disabled-tests "~a\n" test))
3382 '("memslice" "dictcomp"))
3383 (close-port disabled-tests)))))
3384 '())
3385
3386 (replace 'check
3387 (lambda _
e9194eb0
MB
3388 ;; Disable compiler optimizations to greatly reduce the running
3389 ;; time of the test suite.
3390 (setenv "CFLAGS" "-O0")
3391
3392 (invoke "python" "runtests.py" "-vv"
3393 "-j" (number->string (parallel-job-count))))))))
f319409b 3394 (home-page "https://cython.org/")
44d10b1f
RW
3395 (synopsis "C extensions for Python")
3396 (description "Cython is an optimising static compiler for both the Python
3397programming language and the extended Cython programming language. It makes
3398writing C extensions for Python as easy as Python itself.")
3399 (license license:asl2.0)
3400 (properties `((python2-variant . ,(delay python2-cython))))))
3401
3402(define-public python2-cython
da460865
MB
3403 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
3404 (package
3405 (inherit base)
3406 (name "python2-cython")
3407 (inputs
3408 `(("python-2" ,python-2))) ;this is not automatically changed
3409 (arguments
3410 (substitute-keyword-arguments (package-arguments base)
3411 ((#:phases phases)
3412 `(modify-phases ,phases
3413 (add-before 'check 'adjust-test_embed
3414 (lambda _
3415 (substitute* "runtests.py"
3416 ;; test_embed goes great lengths to find the static libpythonX.Y.a
3417 ;; so it can give the right -L flag to GCC when embedding static
3418 ;; builds of Python. It is unaware that the Python "config"
3419 ;; directory (where the static library lives) was renamed in
3420 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
3421 ;; which works fine, because that is where the shared library is.
3422 ;;
3423 ;; It also appears to be unaware that the Makefile in Demos/embed
3424 ;; already unconditionally pass the static library location to GCC,
3425 ;; after checking sysconfig.get_config_var('LIBPL).
3426 ;;
3427 ;; The effect is that the linker is unable to resolve libexpat
3428 ;; symbols when building for Python 2, because neither the Python 2
3429 ;; shared library nor Expat is available. To fix it, we can either
3430 ;; add Expat as an input and make it visible to the linker, or just
3431 ;; prevent it from overriding the Python shared library location.
3432 ;; The end result is identical, so we take the easy route.
3433 ((" or libname not in os\\.listdir\\(libdir\\)")
3434 ""))
3435 #t)))))))))
44d10b1f
RW
3436
3437;; The RPython toolchain currently does not support Python 3.
3438(define-public python2-rpython
3439 (package
3440 (name "python2-rpython")
3441 (version "0.2.1")
3442 (source
3443 (origin
3444 (method url-fetch)
3445 (uri (pypi-uri "rpython" version))
3446 (sha256
3447 (base32
3448 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
3449 (build-system python-build-system)
3450 (arguments `(#:python ,python-2))
3451 (native-inputs
3452 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3453 (home-page "https://rpython.readthedocs.org")
3454 (synopsis "Framework for implementing interpreters and virtual machines")
3455 (description "RPython is a translation and support framework for
3456producing implementations of dynamic languages, emphasizing a clean separation
3457between language specification and implementation aspects.")
3458 (license license:expat)))
3459
3460;; NOTE: when upgrading numpy please make sure that python-pandas and
3461;; python-scipy still build, as these three packages are often used together.
3462(define-public python-numpy
3463 (package
3464 (name "python-numpy")
8e5fbd5d 3465 (version "1.17.3")
44d10b1f
RW
3466 (source
3467 (origin
3468 (method url-fetch)
3469 (uri (string-append
3470 "https://github.com/numpy/numpy/releases/download/v"
3471 version "/numpy-" version ".tar.gz"))
3472 (sha256
3473 (base32
8e5fbd5d 3474 "1ak9dmjja0q90a7fsxli51ypcwssh8c4pb6f8wkrsnf2xgdk6dy9"))))
44d10b1f
RW
3475 (build-system python-build-system)
3476 (inputs
3477 `(("openblas" ,openblas)
3478 ("lapack" ,lapack)))
3479 (native-inputs
3480 `(("python-cython" ,python-cython)
3481 ("python-pytest" ,python-pytest)
3482 ("gfortran" ,gfortran)))
3483 (arguments
3484 `(#:phases
3485 (modify-phases %standard-phases
3486 (add-before 'build 'configure-blas-lapack
3487 (lambda* (#:key inputs #:allow-other-keys)
3488 (call-with-output-file "site.cfg"
3489 (lambda (port)
3490 (format port
3491 "[openblas]
3492libraries = openblas
3493library_dirs = ~a/lib
3494include_dirs = ~a/include
3495
3496# backslash-n to make emacs happy
3497\n[lapack]
3498lapack_libs = lapack
3499library_dirs = ~a/lib
3500include_dirs = ~a/include
3501"
3502 (assoc-ref inputs "openblas")
3503 (assoc-ref inputs "openblas")
3504 (assoc-ref inputs "lapack")
3505 (assoc-ref inputs "lapack"))))
3506 #t))
3507 (add-before 'build 'fix-executable-paths
3508 (lambda* (#:key inputs #:allow-other-keys)
3509 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
3510 ;; instead of /bin/sh.
3511 (substitute* "numpy/distutils/exec_command.py"
3512 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
3513 (string-append match-start (assoc-ref inputs "bash") match-end)))
3514 ;; Use "gcc" executable, not "cc".
3515 (substitute* "numpy/distutils/system_info.py"
3516 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3517 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3518 #t))
3519 ;; Tests can only be run after the library has been installed and not
3520 ;; within the source directory.
3521 (delete 'check)
3522 (add-after 'install 'check
3523 (lambda* (#:key outputs inputs #:allow-other-keys)
3524 ;; Make installed package available for running the tests
3525 (add-installed-pythonpath inputs outputs)
3526 ;; Make sure "f2py" etc is found.
3527 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
3528 ":" (getenv "PATH")))
3529 (with-directory-excursion "/tmp"
3530 (invoke "python" "-c"
3531 "import numpy; numpy.test(verbose=2)")))))))
3532 (home-page "http://www.numpy.org/")
3533 (synopsis "Fundamental package for scientific computing with Python")
3534 (description "NumPy is the fundamental package for scientific computing
3535with Python. It contains among other things: a powerful N-dimensional array
3536object, sophisticated (broadcasting) functions, tools for integrating C/C++
3537and Fortran code, useful linear algebra, Fourier transform, and random number
3538capabilities.")
adb396ea 3539 (properties `((python2-variant . ,(delay python2-numpy))))
44d10b1f
RW
3540 (license license:bsd-3)))
3541
adb396ea 3542;; Numpy 1.16.x are the last versions that support Python 2.
44d10b1f 3543(define-public python2-numpy
adb396ea
MB
3544 (let ((numpy (package-with-python2
3545 (strip-python2-variant python-numpy))))
3546 (package/inherit
3547 numpy
3548 (version "1.16.5")
3549 (source (origin
3550 (method url-fetch)
3551 (uri (string-append
3552 "https://github.com/numpy/numpy/releases/download/v"
3553 version "/numpy-" version ".tar.gz"))
3554 (sha256
3555 (base32
3556 "0lg1cycxzi4rvvrd5zxinpdz0ni792fpx6xjd75z1923zcac8qrb")))))))
44d10b1f
RW
3557
3558;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
3559;; interest only for legacy code going back to NumPy's predecessor
3560;; Numeric.
3561(define-public python2-numpy-1.8
3562 (package (inherit python2-numpy)
3563 (version "1.8.2")
3564 (source
3565 (origin
3566 (method url-fetch)
3567 (uri (string-append
3568 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
3569 (file-name (string-append "python2-numpy-" version ".tar.gz"))
3570 (sha256
3571 (base32
3572 "0sc20gz1b17xnyrkp5frca3ql5qfalpv916hfg2kqxpwr6jg0f1g"))))
3573 (arguments
3574 (substitute-keyword-arguments (package-arguments python2-numpy)
3575 ((#:phases phases)
3576 `(modify-phases ,phases
3577 (replace 'configure-blas-lapack
3578 (lambda* (#:key inputs #:allow-other-keys)
3579 (call-with-output-file "site.cfg"
3580 (lambda (port)
3581 (format port
3582 "[openblas]
3583libraries = openblas,lapack
3584library_dirs = ~a/lib:~a/lib
3585include_dirs = ~a/include:~a/include
3586"
3587 (assoc-ref inputs "openblas")
3588 (assoc-ref inputs "lapack")
3589 (assoc-ref inputs "openblas")
3590 (assoc-ref inputs "lapack"))))
3591 #t))))))
3592 (native-inputs
3593 `(("python2-nose" ,python2-nose)))
3594 (description "NumPy is the fundamental package for scientific computing
3595with Python. It contains among other things: a powerful N-dimensional array
3596object, sophisticated (broadcasting) functions, tools for integrating C/C++
3597and Fortran code, useful linear algebra, Fourier transform, and random number
3598capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
3599that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
3600Numeric.")
3601 (license license:bsd-3)))
3602
3603(define-public python-munch
3604 (package
3605 (name "python-munch")
3606 (version "2.0.4")
3607 (source
3608 (origin
3609 (method url-fetch)
3610 (uri (pypi-uri "munch" version))
3611 (sha256
3612 (base32
3613 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3614 (build-system python-build-system)
3615 (home-page "https://github.com/Infinidat/munch")
3616 (synopsis "Dot-accessible dictionary")
3617 (description "Munch is a dot-accessible dictionary similar to JavaScript
3618objects.")
3619 (license license:expat)))
3620
3621(define-public python2-munch
3622 (package-with-python2 python-munch))
3623
3624(define-public python-colormath
3625 (package
3626 (name "python-colormath")
3627 (version "3.0.0")
3628 (source
3629 (origin
3630 (method url-fetch)
3631 (uri (pypi-uri "colormath" version))
3632 (sha256
3633 (base32
3634 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3635 (build-system python-build-system)
3636 (propagated-inputs
3637 `(("python-networkx" ,python-networkx)
3638 ("python-numpy" ,python-numpy)))
3639 (home-page "https://github.com/gtaylor/python-colormath")
3640 (synopsis "Color math and conversion library")
3641 (description
3642 "This is a Python library for color math and conversions.")
3643 (license license:bsd-3)))
3644
3645(define-public python2-colormath
3646 (package-with-python2 python-colormath))
3647
3648(define-public python-spectra
3649 (package
3650 (name "python-spectra")
3651 (version "0.0.11")
3652 (source
3653 (origin
3654 (method url-fetch)
3655 (uri (pypi-uri "spectra" version))
3656 (sha256
3657 (base32
3658 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3659 (build-system python-build-system)
3660 (arguments
3661 `(#:phases
3662 (modify-phases %standard-phases
3663 (replace 'check
38ec0f6a 3664 (lambda _ (invoke "nosetests" "-v"))))))
44d10b1f
RW
3665 (propagated-inputs
3666 `(("python-colormath" ,python-colormath)))
3667 (native-inputs
3668 `(("python-nose" ,python-nose)))
3669 (home-page "https://github.com/jsvine/spectra")
3670 (synopsis "Color scales and color conversion")
3671 (description
3672 "This package provides a Python library intended to make color math,
3673color scales, and color space conversion easy. It has support for:
3674
3675@enumerate
3676@item Color scales
3677@item Color ranges
3678@item Color blending
3679@item Brightening/darkening colors
3680@item Saturating/desaturating colors
3681@item Conversion to/from multiple color spaces.
3682@end enumerate\n")
3683 (license license:expat)))
3684
3685(define-public python2-spectra
3686 (package-with-python2 python-spectra))
3687
3688(define-public python-numpy-documentation
3689 (package
3690 (name "python-numpy-documentation")
3691 (version (package-version python-numpy))
3692 (source (package-source python-numpy))
3693 (build-system python-build-system)
3694 (native-inputs
3695 `(("python-matplotlib" ,python-matplotlib)
3696 ("python-numpy" ,python-numpy)
3697 ("pkg-config" ,pkg-config)
3698 ("python-sphinx" ,python-sphinx)
3699 ("python-numpydoc" ,python-numpydoc)
f75aa97f 3700 ("texlive" ,(texlive-union (list texlive-fonts-cm-super
44d10b1f
RW
3701 texlive-fonts-ec
3702 texlive-generic-ifxetex
3703 texlive-generic-pdftex
f75aa97f 3704 texlive-amsfonts
44d10b1f
RW
3705 texlive-latex-capt-of
3706 texlive-latex-cmap
3707 texlive-latex-environ
3708 texlive-latex-eqparbox
3709 texlive-latex-etoolbox
3710 texlive-latex-expdlist
3711 texlive-latex-fancyhdr
3712 texlive-latex-fancyvrb
3713 texlive-latex-fncychap
3714 texlive-latex-float
3715 texlive-latex-framed
3716 texlive-latex-geometry
3717 texlive-latex-graphics
3718 texlive-latex-hyperref
3719 texlive-latex-mdwtools
3720 texlive-latex-multirow
3721 texlive-latex-needspace
3722 texlive-latex-oberdiek
3723 texlive-latex-parskip
3724 texlive-latex-preview
3725 texlive-latex-tabulary
3726 texlive-latex-threeparttable
3727 texlive-latex-titlesec
3728 texlive-latex-trimspaces
3729 texlive-latex-ucs
3730 texlive-latex-upquote
3731 texlive-latex-url
3732 texlive-latex-varwidth
3733 texlive-latex-wrapfig)))
3734 ("texinfo" ,texinfo)
3735 ("perl" ,perl)
3736 ("scipy-sphinx-theme"
3737 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3738 (method git-fetch)
3739 (uri (git-reference
3740 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3741 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3742 (sha256
3743 (base32
3744 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3745 ,@(package-native-inputs python-numpy)))
3746 (arguments
3747 `(#:tests? #f ; we're only generating the documentation
3748 #:phases
3749 (modify-phases %standard-phases
3750 (delete 'build)
3751 (replace 'install
3752 (lambda* (#:key inputs outputs #:allow-other-keys)
3753 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3754 (doc (string-append
3755 data "/doc/" ,name "-"
3756 ,(package-version python-numpy)))
3757 (info-reader (string-append data "/info"))
3758 (html (string-append doc "/html"))
3759 (scipy-sphinx-theme "scipy-sphinx-theme")
3760 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3761 (pyver ,(string-append "PYVER=")))
3762
3763 ;; FIXME: this is needed to for texlive-union to generate
3764 ;; fonts, which are not found.
3765 (setenv "HOME" "/tmp")
3766
3767 (with-directory-excursion "doc"
3768 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3769 (mkdir-p html)
4fc898da
RW
3770 (invoke "make" "html" pyver)
3771 (invoke "make" "latex" "PAPER=a4" pyver)
3772 (invoke "make" "-C" "build/latex"
44d10b1f
RW
3773 "all-pdf" "PAPER=a4" pyver)
3774 ;; FIXME: Generation of the info file fails.
4fc898da 3775 ;; (invoke "make" "info" pyver)
44d10b1f
RW
3776 ;; (mkdir-p info)
3777 ;; (copy-file "build/texinfo/numpy.info"
3778 ;; (string-append info "/numpy.info"))
3779 (for-each (lambda (file)
3780 (copy-file (string-append "build/latex" file)
3781 (string-append doc file)))
3782 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3783 (with-directory-excursion "build/html"
3784 (for-each (lambda (file)
3785 (let* ((dir (dirname file))
3786 (tgt-dir (string-append html "/" dir)))
3787 (unless (equal? "." dir)
3788 (mkdir-p tgt-dir))
3789 (install-file file html)))
3790 (find-files "." ".*")))))
3791 #t)))))
3792 (home-page (package-home-page python-numpy))
3793 (synopsis "Documentation for the python-numpy package")
3794 (description (package-description python-numpy))
3795 (license (package-license python-numpy))))
3796
3797(define-public python2-numpy-documentation
3798 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3799 (package
3800 (inherit numpy-documentation)
3801 (native-inputs `(("python2-functools32" ,python2-functools32)
3802 ,@(package-native-inputs numpy-documentation))))))
3803
3804(define-public python-pygit2
3805 (package
3806 (name "python-pygit2")
dac8b275 3807 (version "0.28.2")
44d10b1f
RW
3808 (source
3809 (origin
3810 (method url-fetch)
3811 (uri (pypi-uri "pygit2" version))
3812 (sha256
dac8b275 3813 (base32 "11kzj5mjkspvplnpdb6bj8dcj6rgmkk986k8hjcklyg5yaxkz32d"))))
44d10b1f
RW
3814 (build-system python-build-system)
3815 (arguments
c3ecab0d 3816 '(#:tests? #f)) ; tests don't run correctly in our environment
44d10b1f
RW
3817 (propagated-inputs
3818 `(("python-six" ,python-six)
3819 ("python-cffi" ,python-cffi)
3820 ("libgit2" ,libgit2)
3821 ("python-tox" ,python-tox)))
3822 (native-inputs
3823 `(("python-pytest" ,python-pytest)))
3824 (home-page "https://github.com/libgit2/pygit2")
3825 (synopsis "Python bindings for libgit2")
3826 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3827library, libgit2 implements Git plumbing.")
3828 ;; GPL2.0 only, with linking exception.
3829 (license license:gpl2)))
3830
3831(define-public python2-pygit2
3832 (package-with-python2 python-pygit2))
3833
3834(define-public python-pyparsing
3835 (package
3836 (name "python-pyparsing")
6d3cff5a 3837 (version "2.3.1")
44d10b1f
RW
3838 (source
3839 (origin
3840 (method url-fetch)
3841 (uri (pypi-uri "pyparsing" version))
3842 (sha256
6d3cff5a 3843 (base32 "0yk6xl885b91dmlhlsap7x78hk2rdr879fln9anbq6k4ca42djb6"))))
44d10b1f
RW
3844 (build-system python-build-system)
3845 (outputs '("out" "doc"))
3846 (arguments
3847 `(#:tests? #f ; no test target
3848 #:phases
3849 (modify-phases %standard-phases
3850 (add-after 'install 'install-doc
3851 (lambda* (#:key outputs #:allow-other-keys)
3852 (let* ((doc (string-append (assoc-ref outputs "doc")
3853 "/share/doc/" ,name "-" ,version))
3854 (html-doc (string-append doc "/html"))
3855 (examples (string-append doc "/examples")))
3856 (mkdir-p html-doc)
3857 (mkdir-p examples)
3858 (for-each
3859 (lambda (dir tgt)
3860 (map (lambda (file)
3861 (install-file file tgt))
3862 (find-files dir ".*")))
3863 (list "docs" "htmldoc" "examples")
3864 (list doc html-doc examples))
3865 #t))))))
3866 (home-page "https://github.com/pyparsing/pyparsing")
3867 (synopsis "Python parsing class library")
3868 (description
3869 "The pyparsing module is an alternative approach to creating and
3870executing simple grammars, vs. the traditional lex/yacc approach, or the use
3871of regular expressions. The pyparsing module provides a library of classes
3872that client code uses to construct the grammar directly in Python code.")
3873 (license license:expat)))
3874
3875(define-public python2-pyparsing
3876 (package-with-python2 python-pyparsing))
3877
3878(define-public python-numpydoc
3879 (package
3880 (name "python-numpydoc")
3881 (version "0.8.0")
3882 (source
3883 (origin
3884 (method url-fetch)
3885 (uri (pypi-uri "numpydoc" version))
3886 (sha256
3887 (base32
3888 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
3889 (build-system python-build-system)
3890 (propagated-inputs
3891 `(("python-sphinx" ,python-sphinx)))
3892 (native-inputs
3893 `(("python-nose" ,python-nose)))
3894 (home-page "https://pypi.python.org/pypi/numpydoc")
3895 (synopsis
3896 "Numpy's Sphinx extensions")
3897 (description
3898 "Sphinx extension to support docstrings in Numpy format.")
3899 (license license:bsd-2)))
3900
3901(define-public python2-numpydoc
3902 (package-with-python2 python-numpydoc))
3903
3904(define-public python-numexpr
3905 (package
3906 (name "python-numexpr")
3907 (version "2.6.5")
3908 (source
3909 (origin
3910 (method url-fetch)
3911 (uri (pypi-uri "numexpr" version))
3912 (sha256
3913 (base32
3914 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3915 (build-system python-build-system)
3916 (arguments `(#:tests? #f)) ; no tests included
3917 (propagated-inputs
3918 `(("python-numpy" ,python-numpy)))
3919 (home-page "https://github.com/pydata/numexpr")
3920 (synopsis "Fast numerical expression evaluator for NumPy")
3921 (description
3922 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3923expressions that operate on arrays are accelerated and use less memory than
3924doing the same calculation in Python. In addition, its multi-threaded
3925capabilities can make use of all your cores, which may accelerate
3926computations, most specially if they are not memory-bounded (e.g. those using
3927transcendental functions).")
3928 (license license:expat)))
3929
3930(define-public python2-numexpr
3931 (package-with-python2 python-numexpr))
3932
3933(define-public python-cycler
3934 (package
3935 (name "python-cycler")
3936 (version "0.10.0")
3937 (source (origin
3938 (method url-fetch)
3939 (uri (pypi-uri "cycler" version))
3940 (sha256
3941 (base32
3942 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3943 (build-system python-build-system)
3944 (arguments
3945 ;; XXX: The current version requires 'coveralls' which we don't have.
3946 ;; Enable this for the next release which uses 'python-pytest'.
3947 '(#:tests? #f))
3948 (propagated-inputs
3949 `(("python-six" ,python-six)))
3950 (home-page "http://matplotlib.org/cycler/")
3951 (synopsis "Composable keyword argument iterator")
3952 (description
3953 "When using @code{matplotlib} and plotting more than one line, it is
3954common to want to be able to want to be able to cycle over one or more artist
3955styles; but the plotting logic can quickly become involved.
3956To address this and enable easy cycling over arbitrary @code{kwargs}, the
3957@code{Cycler} class was developed.")
3958 (license license:bsd-3)))
3959
3960(define-public python2-cycler
3961 (package-with-python2 python-cycler))
3962
3963(define-public python-colorspacious
3964 (package
3965 (name "python-colorspacious")
53a3ebed 3966 (version "1.1.2")
44d10b1f 3967 (source
dee92e65
TGR
3968 (origin
3969 (method git-fetch)
3970 (uri (git-reference
3971 (url "https://github.com/njsmith/colorspacious.git")
3972 (commit (string-append "v" version))))
3973 (file-name (git-file-name name version))
3974 (sha256
53a3ebed 3975 (base32 "0x7nkphr6g5ql5fvgss8l56rgiyjgh6fm8zzs73i94ci9wzlm63w"))))
44d10b1f
RW
3976 (build-system python-build-system)
3977 (propagated-inputs
3978 `(("python-numpy" ,python-numpy)))
3979 (native-inputs
3980 `(("python-nose" ,python-nose)))
3981 (arguments
3982 `(#:phases
3983 (modify-phases %standard-phases
3984 (replace 'check
3985 (lambda _
c988afda 3986 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
44d10b1f
RW
3987 (home-page "https://github.com/njsmith/colorspacious")
3988 (synopsis "Python library for colorspace conversions")
3989 (description "@code{colorspacious} is a Python library that lets you
3990convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3991 (license license:expat)))
3992
3993(define-public python2-colorspacious
3994 (package-with-python2 python-colorspacious))
3995
3996(define-public python-matplotlib
3997 (package
3998 (name "python-matplotlib")
9e7cb2f1 3999 (version "3.1.2")
44d10b1f
RW
4000 (source
4001 (origin
4002 (method url-fetch)
4003 (uri (pypi-uri "matplotlib" version))
4004 (sha256
4005 (base32
9e7cb2f1 4006 "1nmshfqh7wyg15i16hx1yiylcvzkws29ivn66n3i0wyqwcpjr3lf"))))
44d10b1f
RW
4007 (build-system python-build-system)
4008 (propagated-inputs ; the following packages are all needed at run time
4009 `(("python-cycler" ,python-cycler)
4010 ("python-kiwisolver" ,python-kiwisolver)
4011 ("python-pyparsing" ,python-pyparsing)
4012 ("python-pygobject" ,python-pygobject)
4013 ("gobject-introspection" ,gobject-introspection)
4014 ("python-tkinter" ,python "tk")
4015 ("python-dateutil" ,python-dateutil)
4016 ("python-numpy" ,python-numpy)
4017 ("python-pillow" ,python-pillow)
4018 ("python-pytz" ,python-pytz)
4019 ("python-six" ,python-six)
44d10b1f
RW
4020 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
4021 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
4022 ;; object. For this reason we need to import both libraries.
5ea654cf 4023 ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi
44d10b1f 4024 ("python-pycairo" ,python-pycairo)
44d10b1f
RW
4025 ("python-cairocffi" ,python-cairocffi)))
4026 (inputs
4027 `(("libpng" ,libpng)
4028 ("imagemagick" ,imagemagick)
4029 ("freetype" ,freetype)
4030 ("cairo" ,cairo)
4031 ("glib" ,glib)
4032 ;; FIXME: Add backends when available.
4033 ;("python-wxpython" ,python-wxpython)
4034 ("tcl" ,tcl)
4035 ("tk" ,tk)))
4036 (native-inputs
4037 `(("pkg-config" ,pkg-config)
5ea654cf
RW
4038 ("python-pytest" ,python-pytest)
4039 ("python-mock" ,python-mock)
4040 ("unzip" ,unzip)
4041 ("jquery-ui"
4042 ,(origin
4043 (method url-fetch)
4044 (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip")
4045 (sha256
4046 (base32
4047 "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq"))))))
44d10b1f
RW
4048 (arguments
4049 `(#:phases
4050 (modify-phases %standard-phases
5ea654cf
RW
4051 ;; XXX We disable all image comparison tests because we're using a
4052 ;; newer version of FreeType than matplotlib expects. This leads to
4053 ;; minor differences throughout the tests.
4054 (add-after 'unpack 'fix-and-disable-failing-tests
4055 (lambda _
4056 (substitute* (append (find-files "lib/matplotlib/tests/"
4057 "test_.*\\.py$")
4058 (find-files "lib/mpl_toolkits/tests"
4059 "test_.*\\.py$"))
4060 (("^from matplotlib" match)
4061 (string-append "import pytest\n" match))
4062 (("( *)@image_comparison" match indent)
4063 (string-append indent
4064 "@pytest.mark.skip(reason=\"unknown minor image differences\")\n"
4065 match)))
4066 (substitute* "lib/matplotlib/tests/test_animation.py"
4067 (("/bin/sh") (which "sh")))
4068 (for-each delete-file
4069 ;; test_normal_axes, test_get_tightbbox_polar
4070 '("lib/matplotlib/tests/test_axes.py"
9e7cb2f1
RW
4071 ;; We don't use the webagg backend and this test forces it.
4072 "lib/matplotlib/tests/test_backend_webagg.py"
5ea654cf
RW
4073 ;; test_outward_ticks
4074 "lib/matplotlib/tests/test_tightlayout.py"
9e7cb2f1
RW
4075 ;; test_hidden_axes fails with minor extent
4076 ;; differences, possibly due to the use of a
4077 ;; different version of FreeType.
4078 "lib/matplotlib/tests/test_constrainedlayout.py"
5ea654cf
RW
4079 ;; Fontconfig returns no fonts.
4080 "lib/matplotlib/tests/test_font_manager.py"))
4081 #t))
4082 (add-before 'install 'install-jquery-ui
4083 (lambda* (#:key outputs inputs #:allow-other-keys)
4084 (let ((dir (string-append (assoc-ref outputs "out")
4085 "/lib/python3.7/site-packages/matplotlib/backends/web_backend/")))
4086 (mkdir-p dir)
4087 (invoke "unzip"
4088 (assoc-ref inputs "jquery-ui")
4089 "-d" dir))
4090 #t))
4091 (delete 'check)
4092 (add-after 'install 'check
4093 (lambda* (#:key outputs inputs #:allow-other-keys)
4094 (add-installed-pythonpath inputs outputs)
4095 (invoke "python" "tests.py" "-v"
9e7cb2f1 4096 "-m" "not network and not webagg")))
44d10b1f
RW
4097 (add-before 'build 'configure-environment
4098 (lambda* (#:key outputs inputs #:allow-other-keys)
34c2a16b
RW
4099 (let ((cairo (assoc-ref inputs "cairo")))
4100 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
44d10b1f 4101 ;; has not effect.
34c2a16b 4102 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
44d10b1f
RW
4103 (setenv "HOME" (getcwd))
4104 (call-with-output-file "setup.cfg"
4105 (lambda (port)
4106 (format port "[directories]~%
4107basedirlist = ~a,~a~%
5ea654cf
RW
4108[packages]~%
4109tests = True~%"
44d10b1f
RW
4110 (assoc-ref inputs "tcl")
4111 (assoc-ref inputs "tk")))))
4112 #t)))))
339b5828 4113 (home-page "https://matplotlib.org/")
44d10b1f
RW
4114 (synopsis "2D plotting library for Python")
4115 (description
4116 "Matplotlib is a Python 2D plotting library which produces publication
4117quality figures in a variety of hardcopy formats and interactive environments
4118across platforms. Matplotlib can be used in Python scripts, the python and
4119ipython shell, web application servers, and six graphical user interface
4120toolkits.")
4121 (license license:psfl)
4122 (properties `((python2-variant . ,(delay python2-matplotlib))))))
4123
4124(define-public python2-matplotlib
4125 (let ((matplotlib (package-with-python2
4126 (strip-python2-variant python-matplotlib))))
4127 (package (inherit matplotlib)
7380df73 4128 (version "2.2.4")
5ea654cf
RW
4129 (source
4130 (origin
4131 (method url-fetch)
4132 (uri (pypi-uri "matplotlib" version))
4133 (sha256
4134 (base32
7380df73 4135 "09i1gnrra1590brc1f8d5rh2zvnknmfgzp613ab0462qkrwj15h2"))))
5d484f42
EF
4136 (arguments
4137 (substitute-keyword-arguments (package-arguments matplotlib)
4138 ((#:phases phases)
4139 `(modify-phases ,phases
66a3c2db
EF
4140 (replace 'install-jquery-ui
4141 (lambda* (#:key outputs inputs #:allow-other-keys)
4142 (let ((dir (string-append (assoc-ref outputs "out")
4143 "/lib/python2.7/site-packages/"
4144 "matplotlib/backends/web_backend/")))
4145 (mkdir-p dir)
4146 (invoke "unzip"
4147 (assoc-ref inputs "jquery-ui")
4148 "-d" dir))
4149 #t))
5d484f42 4150 (delete 'check))))) ; These tests weren't run the the past.
44d10b1f
RW
4151 ;; Make sure to use special packages for Python 2 instead
4152 ;; of those automatically rewritten by package-with-python2.
4153 (propagated-inputs
4154 `(("python2-pycairo" ,python2-pycairo)
4155 ("python2-backports-functools-lru-cache"
4156 ,python2-backports-functools-lru-cache)
4157 ("python2-functools32" ,python2-functools32)
4158 ("python2-pygobject-2" ,python2-pygobject-2)
4159 ("python2-subprocess32" ,python2-subprocess32)
4160 ("python2-tkinter" ,python-2 "tk")
4161 ,@(fold alist-delete (package-propagated-inputs matplotlib)
4162 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
4163
4164(define-public python-matplotlib-documentation
4165 (package
4166 (name "python-matplotlib-documentation")
4167 (version (package-version python-matplotlib))
4168 (source (package-source python-matplotlib))
4169 (build-system python-build-system)
4170 (native-inputs
4171 `(("python-matplotlib" ,python-matplotlib)
4172 ("python-colorspacious" ,python-colorspacious)
4173 ("python-sphinx" ,python-sphinx)
5ad0a452 4174 ("python-sphinx-copybutton" ,python-sphinx-copybutton)
44d10b1f
RW
4175 ("python-sphinx-gallery" ,python-sphinx-gallery)
4176 ("python-numpydoc" ,python-numpydoc)
4177 ("python-ipython" ,python-ipython)
e7a53914 4178 ("python-ipykernel" ,python-ipykernel)
44d10b1f
RW
4179 ("python-mock" ,python-mock)
4180 ("graphviz" ,graphviz)
f75aa97f 4181 ("texlive" ,(texlive-union (list texlive-amsfonts
e7a53914
RW
4182 texlive-latex-amsmath
4183 texlive-latex-enumitem
4184 texlive-latex-expdlist
4185 texlive-latex-geometry
4186 texlive-latex-preview
4187 texlive-latex-type1cm
4188 texlive-latex-ucs
4189
4190 texlive-generic-pdftex
4191
e7a53914
RW
4192 texlive-fonts-ec
4193 texlive-fonts-adobe-times
4194 texlive-fonts-txfonts)))
44d10b1f
RW
4195 ("texinfo" ,texinfo)
4196 ,@(package-native-inputs python-matplotlib)))
4197 (arguments
4198 `(#:tests? #f ; we're only generating documentation
4199 #:phases
4200 (modify-phases %standard-phases
5ea654cf
RW
4201 ;; The tests in python-matplotlib are run after the install phase, so
4202 ;; we need to delete the extra phase here.
4203 (delete 'check)
44d10b1f
RW
4204 (replace 'build
4205 (lambda _
4206 (chdir "doc")
e7a53914
RW
4207 (setenv "PYTHONPATH"
4208 (string-append (getenv "PYTHONPATH")
4209 ":" (getcwd) "/../examples/units"))
44d10b1f 4210 (substitute* "conf.py"
e7a53914
RW
4211 ;; Don't use git.
4212 (("^SHA = check_output.*")
4213 (string-append "SHA = \"" ,version "\"\n"))
4214 ;; Don't fetch intersphinx files from the Internet
4215 (("^explicit_order_folders" m)
4216 (string-append "intersphinx_mapping = {}\n" m))
4217 (("'sphinx.ext.intersphinx',") "")
4218 ;; Disable URL embedding which requires internet access.
4219 (("'https://docs.scipy.org/doc/numpy'") "None")
4220 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
4221 (invoke "make"
4222 "SPHINXBUILD=sphinx-build"
4223 "SPHINXOPTS=" ; don't abort on warnings
4224 "html" "texinfo")))
44d10b1f
RW
4225 (replace 'install
4226 (lambda* (#:key inputs outputs #:allow-other-keys)
4227 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4228 (doc (string-append data "/doc/python-matplotlib-" ,version))
4229 (info (string-append data "/info"))
4230 (html (string-append doc "/html")))
4231 (mkdir-p html)
4232 (mkdir-p info)
4233 (copy-recursively "build/html" html)
4234 (symlink (string-append html "/_images")
4235 (string-append info "/matplotlib-figures"))
4236 (with-directory-excursion "build/texinfo"
4237 (substitute* "matplotlib.texi"
4238 (("@image\\{([^,]*)" all file)
4239 (string-append "@image{matplotlib-figures/" file)))
4240 (symlink (string-append html "/_images")
4241 "./matplotlib-figures")
e7a53914
RW
4242 (invoke "makeinfo" "--no-split"
4243 "-o" "matplotlib.info" "matplotlib.texi"))
4244 (install-file "build/texinfo/matplotlib.info" info))
44d10b1f
RW
4245 #t)))))
4246 (home-page (package-home-page python-matplotlib))
4247 (synopsis "Documentation for the python-matplotlib package")
4248 (description (package-description python-matplotlib))
4249 (license (package-license python-matplotlib))))
4250
4251(define-public python2-matplotlib-documentation
5ad0a452
RW
4252 (let ((parent (package-with-python2 python-matplotlib-documentation)))
4253 (package
4254 (inherit parent)
4255 (native-inputs
4256 (alist-delete "python-sphinx-copybutton"
4257 (package-native-inputs parent))))))
44d10b1f 4258
55dae98f
RW
4259(define-public python-matplotlib-venn
4260 (package
4261 (name "python-matplotlib-venn")
4262 (version "0.11.5")
4263 (source
4264 (origin
4265 (method url-fetch)
4266 (uri (pypi-uri "matplotlib-venn" version ".zip"))
4267 (sha256
4268 (base32
4269 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
4270 (build-system python-build-system)
4271 (arguments '(#:tests? #f)) ; tests are not included
4272 (propagated-inputs
4273 `(("python-matplotlib" ,python-matplotlib)
4274 ("python-numpy" ,python-numpy)
4275 ("python-scipy" ,python-scipy)))
4276 (native-inputs
4277 `(("unzip" ,unzip)))
4278 (home-page "https://github.com/konstantint/matplotlib-venn")
4279 (synopsis "Plot area-proportional Venn diagrams")
4280 (description
4281 "This package provides tools for plotting area-proportional two- and
4282three-way Venn diagrams in @code{matplotlib}.")
4283 (license license:expat)))
4284
44d10b1f
RW
4285(define-public python2-pysnptools
4286 (package
4287 (name "python2-pysnptools")
5d1ade85 4288 (version "0.3.13")
44d10b1f
RW
4289 (source
4290 (origin
4291 (method url-fetch)
5d1ade85 4292 (uri (pypi-uri "pysnptools" version))
44d10b1f
RW
4293 (sha256
4294 (base32
5d1ade85 4295 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
44d10b1f
RW
4296 (build-system python-build-system)
4297 (arguments
5d1ade85
RW
4298 `(#:python ,python-2 ; only Python 2.7 is supported
4299 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
44d10b1f
RW
4300 (propagated-inputs
4301 `(("python2-numpy" ,python2-numpy)
4302 ("python2-scipy" ,python2-scipy)
4303 ("python2-pandas" ,python2-pandas)))
44d10b1f 4304 (native-inputs
5d1ade85 4305 `(("python2-cython" ,python2-cython)))
1b66989b 4306 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
44d10b1f
RW
4307 (synopsis "Library for reading and manipulating genetic data")
4308 (description
4309 "PySnpTools is a library for reading and manipulating genetic data. It
4310can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4311those files. It can also efficiently manipulate ranges of integers using set
4312operators such as union, intersection, and difference.")
4313 (license license:asl2.0)))
4314
4315(define-public python-scipy
4316 (package
4317 (name "python-scipy")
45256ae0 4318 (version "1.3.2")
44d10b1f
RW
4319 (source
4320 (origin
4321 (method url-fetch)
4322 (uri (pypi-uri "scipy" version))
4323 (sha256
45256ae0 4324 (base32 "192d8dsybvhv19igkrsafbdafx198nz7pibkjgrqjhlr66s3jfd0"))))
44d10b1f
RW
4325 (build-system python-build-system)
4326 (propagated-inputs
4327 `(("python-numpy" ,python-numpy)
4328 ("python-matplotlib" ,python-matplotlib)
4329 ("python-pyparsing" ,python-pyparsing)))
4330 (inputs
4331 `(("lapack" ,lapack)
4332 ("openblas" ,openblas)))
4333 (native-inputs
4334 `(("python-cython" ,python-cython)
4335 ("python-pytest" ,python-pytest)
4336 ("python-sphinx" ,python-sphinx)
4337 ("python-numpydoc" ,python-numpydoc)
4338 ("gfortran" ,gfortran)
4339 ("perl" ,perl)
4340 ("which" ,which)))
4341 (outputs '("out" "doc"))
4342 (arguments
4343 `(#:phases
4344 (modify-phases %standard-phases
4345 (add-after 'unpack 'disable-broken-tests
4346 (lambda _
4347 (substitute* "scipy/sparse/linalg/dsolve/tests/test_linsolve.py"
4348 (("^( +)def test_threads_parallel\\(self\\):" m indent)
4349 (string-append indent
4350 "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
4351 m)))
4352 (substitute* "scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py"
4353 (("^def test_parallel_threads\\(\\):" m)
4354 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
4355 m)))
4356 #t))
4357 (add-before 'build 'configure-openblas
4358 (lambda* (#:key inputs #:allow-other-keys)
4359 (call-with-output-file "site.cfg"
4360 (lambda (port)
4361 (format port
4362 "[blas]
4363libraries = openblas
4364library_dirs = ~a/lib
4365include_dirs = ~a/include
4366
4367# backslash-n to make emacs happy
4368\n[atlas]
4369library_dirs = ~a/lib
4370atlas_libs = openblas
4371"
4372 (assoc-ref inputs "openblas")
4373 (assoc-ref inputs "openblas")
4374 (assoc-ref inputs "openblas"))))
4375 #t))
4376 (add-after 'install 'install-doc
4377 (lambda* (#:key inputs outputs #:allow-other-keys)
4378 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4379 (doc (string-append data "/doc/" ,name "-" ,version))
4380 (html (string-append doc "/html"))
4381 (pyver ,(string-append "PYVER=" (version-major+minor
4382 (package-version python))))
4383 ;; By default it tries to run sphinx-build through the Python
4384 ;; interpreter which won't work with our shell wrapper.
4385 (sphinxbuild "SPHINXBUILD=LANG=C sphinx-build"))
4386 ;; Make installed package available for building the
4387 ;; documentation
4388 (add-installed-pythonpath inputs outputs)
4389 (with-directory-excursion "doc"
4390 ;; Fix generation of images for mathematical expressions.
4391 (substitute* (find-files "source" "conf\\.py")
4392 (("pngmath_use_preview = True")
4393 "pngmath_use_preview = False"))
4394 (mkdir-p html)
4395 (invoke "make" "html" pyver sphinxbuild)
4396 (with-directory-excursion "build/html"
4397 (for-each (lambda (file)
4398 (let* ((dir (dirname file))
4399 (tgt-dir (string-append html "/" dir)))
4400 (install-file file html)))
4401 (find-files "." ".*")))))
4402 #t))
4403 ;; Tests can only be run after the library has been installed and not
4404 ;; within the source directory.
4405 (delete 'check)
4406 (add-after 'install 'check
4407 (lambda* (#:key inputs outputs #:allow-other-keys)
4408 (add-installed-pythonpath inputs outputs)
4409 (with-directory-excursion "/tmp"
4410 (invoke "python" "-c"
4411 "import scipy; scipy.test(verbose=2)")))))))
4412 (home-page "https://www.scipy.org/")
4413 (synopsis "The Scipy library provides efficient numerical routines")
4414 (description "The SciPy library is one of the core packages that make up
4415the SciPy stack. It provides many user-friendly and efficient numerical
4416routines such as routines for numerical integration and optimization.")
4417 (properties `((python2-variant . ,(delay python2-scipy))))
4418 (license license:bsd-3)))
4419
a35f153d 4420;; Version 1.2.2 is the last version to support Python 2
44d10b1f 4421(define-public python2-scipy
a35f153d
RW
4422 (package
4423 (inherit (package-with-python2
4424 (strip-python2-variant python-scipy)))
4425 (version "1.2.2")
4426 (source
4427 (origin
4428 (method url-fetch)
4429 (uri (pypi-uri "scipy" version))
4430 (sha256
4431 (base32
4432 "1cgvgin8fvckv96hjh3ikmwkra5rif51bdb75ifzf7xbil5iwcx4"))))))
44d10b1f
RW
4433
4434(define-public python-socksipy-branch
4435 (package
4436 (name "python-socksipy-branch")
4437 (version "1.01")
4438 (source
4439 (origin
4440 (method url-fetch)
4441 (uri (pypi-uri "SocksiPy-branch" version))
4442 (sha256
4443 (base32
4444 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4445 (build-system python-build-system)
4446 (arguments
4447 `(#:tests? #f)) ; There are no tests
4448 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4449 (synopsis "Python SOCKS module")
4450 (description
4451 "SocksiPy - A Python SOCKS client module. It provides a
4452socket-like interface that supports connections to any TCP
4453service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4454The original version was developed by Dan Haim, this is a
4455branch created by Mario Vilas to address some open issues,
4456as the original project seems to have been abandoned circa 2007.")
4457 (license license:bsd-3)))
4458
4459(define-public python2-socksipy-branch
4460 (package-with-python2 python-socksipy-branch))
4461
6fcceb23
AG
4462(define-public python-socksipychain
4463 (package
4464 (name "python-socksipychain")
4465 (version "2.0.15")
4466 (source
4467 (origin
4468 (method git-fetch)
4469 (uri (git-reference
4470 (url "https://github.com/pagekite/PySocksipyChain.git")
4471 (commit (string-append "v" version))))
4472 (file-name (git-file-name name version))
4473 (sha256
4474 (base32
4475 "1pkljnh9hfwla8sg7mil4f9zrnsqj0dbhr3crxjw3k8dnjz70dvk"))))
4476 (build-system python-build-system)
4477 (arguments
4478 `(#:tests? #f)) ; Tests try to access the network.
4479 (home-page "http://pagekite.net/wiki/Floss/PySocksipyChain/")
4480 (synopsis "Python SOCKS module with chained proxies support")
4481 (description
4482 "SocksiPyChain is a modified version of the SocksiPy SOCKS module, which
4483adds support for arbitrary chaining of proxy servers and various modes of
4484TLS/SSL encryption. It was developed for use in PageKite, and also includes
4485a simple netcat replacement with chaining support.")
4486 (license license:bsd-3)))
4487
4488(define-public python2-socksipychain
4489 (package-with-python2 python-socksipychain))
4490
44d10b1f
RW
4491(define-public python-pycodestyle
4492 (package
4493 (name "python-pycodestyle")
d16ef28b 4494 (version "2.5.0")
44d10b1f 4495 (source
ba88eea2
RW
4496 (origin
4497 (method url-fetch)
4498 (uri (pypi-uri "pycodestyle" version))
4499 (sha256
4500 (base32
d16ef28b 4501 "0v4prb05n21bm8650v0a01k1nyqjdmkrsm3zycfxh2j5k9n962p4"))))
44d10b1f
RW
4502 (build-system python-build-system)
4503 (home-page "https://pycodestyle.readthedocs.io/")
4504 (synopsis "Python style guide checker")
4505 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4506Python code against some of the style conventions in
4507@url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4508 (license license:expat)))
4509
4510(define-public python2-pycodestyle
4511 (package-with-python2 python-pycodestyle))
4512
4513(define-public python-multidict
4514 (package
4515 (name "python-multidict")
4516 (version "4.2.0")
4517 (source
4518 (origin
4519 (method url-fetch)
4520 (uri (pypi-uri "multidict" version))
4521 (sha256
4522 (base32
4523 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
4524 (build-system python-build-system)
4525 (native-inputs
4526 `(("python-pytest" ,python-pytest)
4527 ("python-pytest-runner" ,python-pytest-runner)))
4528 (home-page "https://github.com/aio-libs/multidict/")
4529 (synopsis "Multidict implementation")
4530 (description "Multidict is dict-like collection of key-value pairs
4531where key might be occurred more than once in the container.")
4532 (license license:asl2.0)))
4533
4534(define-public python-orderedmultidict
4535 (package
4536 (name "python-orderedmultidict")
4537 (version "0.7.11")
4538 (source
4539 (origin
4540 (method url-fetch)
4541 (uri (pypi-uri "orderedmultidict" version))
4542 (sha256
4543 (base32
4544 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4545 (build-system python-build-system)
4546 (arguments
4547 `(#:phases
4548 (modify-phases %standard-phases
4549 (add-after 'unpack 'fix-tests
4550 (lambda _
4551 ;; The package uses nosetest for running the tests.
4552 ;; Adding this initfile allows to run the test suite
4553 ;; without requiring nosetest.
d1c4f329
RW
4554 (with-output-to-file "tests/__init__.py" newline)
4555 #t)))))
44d10b1f
RW
4556 (propagated-inputs
4557 `(("python-six" ,python-six)))
4558 (native-inputs
4559 `(("python-pycodestyle" ,python-pycodestyle)))
4560 (home-page "https://github.com/gruns/orderedmultidict")
4561 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4562 (description "This package contains a library for ordered multivalue
4563dictionaries. A multivalue dictionary is a dictionary that can store
4564multiple values for the same key. An ordered multivalue dictionary is a
4565multivalue dictionary that retains the order of insertions and deletions.")
4566 (license license:unlicense)))
4567
4568(define-public python2-orderedmultidict
4569 (package-with-python2 python-orderedmultidict))
4570
4571(define-public python-autopep8
4572 (package
4573 (name "python-autopep8")
4574 (version "1.3.5")
4575 (source
4576 (origin
4577 (method url-fetch)
4578 (uri (pypi-uri "autopep8" version))
4579 (sha256
4580 (base32
4581 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
4582 (build-system python-build-system)
4583 (propagated-inputs
4584 `(("python-pycodestyle" ,python-pycodestyle)))
4585 (home-page "https://github.com/hhatto/autopep8")
4586 (synopsis "Format Python code according to the PEP 8 style guide")
4587 (description
4588 "@code{autopep8} automatically formats Python code to conform to
4589the PEP 8 style guide. It uses the pycodestyle utility to determine
4590what parts of the code needs to be formatted. @code{autopep8} is
4591capable of fixing most of the formatting issues that can be reported
4592by pycodestyle.")
4593 (license (license:non-copyleft
4594 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4595
4596(define-public python2-autopep8
4597 (package-with-python2 python-autopep8))
4598
4599(define-public python-distutils-extra
4600 (package
4601 (name "python-distutils-extra")
4602 (version "2.38")
4603 (source
4604 (origin
4605 (method url-fetch)
4606 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4607 version "/+download/python-distutils-extra-"
4608 version ".tar.gz"))
4609 (sha256
4610 (base32
4611 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4612 (build-system python-build-system)
4613 (home-page "https://launchpad.net/python-distutils-extra/")
4614 (synopsis "Enhancements to Python's distutils")
4615 (description
4616 "The python-distutils-extra module enables you to easily integrate
4617gettext support, themed icons, and scrollkeeper-based documentation into
4618Python's distutils.")
4619 (license license:gpl2)))
4620
4621(define-public python2-distutils-extra
4622 (package-with-python2 python-distutils-extra))
4623
4624(define-public python2-elib.intl
4625 (package
4626 (name "python2-elib.intl")
4627 (version "0.0.3")
4628 (source
4629 (origin
4630 ;; This project doesn't tag releases or publish tarballs, so we take
4631 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4632 (method git-fetch)
4633 (uri (git-reference
4634 (url "https://github.com/dieterv/elib.intl.git")
4635 (commit "d09997cfef")))
4636 (file-name (string-append name "-" version "-checkout"))
4637 (sha256
4638 (base32
4639 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4640 (build-system python-build-system)
4641 (arguments
4642 ;; incompatible with Python 3 (exception syntax)
4643 `(#:python ,python-2
4644 #:tests? #f))
4645 (home-page "https://github.com/dieterv/elib.intl")
4646 (synopsis "Enhanced internationalization for Python")
4647 (description
4648 "The elib.intl module provides enhanced internationalization (I18N)
4649services for your Python modules and applications.")
4650 (license license:lgpl3+)))
4651
4652(define-public python-olefile
4653 (package
4654 (name "python-olefile")
5bef0f10 4655 (version "0.46")
44d10b1f
RW
4656 (source
4657 (origin
4658 (method url-fetch)
5bef0f10
MB
4659 (uri (string-append "https://github.com/decalage2/olefile/releases/"
4660 "download/v" version "/olefile-" version ".tar.gz"))
44d10b1f
RW
4661 (file-name (string-append name "-" version ".tar.gz"))
4662 (sha256
4663 (base32
5bef0f10 4664 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
44d10b1f 4665 (build-system python-build-system)
5bef0f10 4666 (home-page "https://www.decalage.info/python/olefileio")
44d10b1f
RW
4667 (synopsis "Read and write Microsoft OLE2 files.")
4668 (description
4669 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
4670Storage or Compound Document, Microsoft Office). It is an improved version of
4671the OleFileIO module from PIL, the Python Image Library.")
4672 (license license:bsd-3)))
4673
4674(define-public python2-olefile
4675 (package-with-python2 python-olefile))
4676
4677(define-public python-pillow
4678 (package
4679 (name "python-pillow")
0c6de725 4680 (version "6.1.0")
44d10b1f
RW
4681 (source
4682 (origin
4683 (method url-fetch)
4684 (uri (pypi-uri "Pillow" version))
4685 (sha256
4686 (base32
0c6de725 4687 "1pnrsz0f0n0c819v1pdr8j6rm8xvhc9f3kh1fv9xpdp9n5ygf108"))))
44d10b1f
RW
4688 (build-system python-build-system)
4689 (native-inputs
4690 `(("python-pytest" ,python-pytest)))
4691 (inputs
4692 `(("freetype" ,freetype)
4693 ("lcms" ,lcms)
4694 ("zlib" ,zlib)
4695 ("libjpeg" ,libjpeg)
4696 ("openjpeg" ,openjpeg)
4697 ("libtiff" ,libtiff)
4698 ("libwebp" ,libwebp)))
4699 (propagated-inputs
4700 `(("python-olefile" ,python-olefile)))
4701 (arguments
4702 `(#:phases
4703 (modify-phases %standard-phases
4704 (add-after 'unpack 'patch-ldconfig
4705 (lambda _
4706 (substitute* "setup.py"
4707 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
4708 (delete 'check) ; We must run checks after python-pillow is installed.
4709 (add-after 'install 'check-installed
4710 (lambda* (#:key outputs inputs #:allow-other-keys)
4711 (begin
4712 (setenv "HOME" (getcwd))
4713 ;; Make installed package available for running the tests.
4714 (add-installed-pythonpath inputs outputs)
4715 (invoke "python" "selftest.py" "--installed")
4716 (invoke "python" "-m" "pytest" "-vv")))))))
4717 (home-page "https://python-pillow.org")
4718 (synopsis "Fork of the Python Imaging Library")
4719 (description
4720 "The Python Imaging Library adds image processing capabilities to your
4721Python interpreter. This library provides extensive file format support, an
4722efficient internal representation, and fairly powerful image processing
4723capabilities. The core image library is designed for fast access to data
4724stored in a few basic pixel formats. It should provide a solid foundation for
4725a general image processing tool.")
4726 (license (license:x11-style
4727 "http://www.pythonware.com/products/pil/license.htm"
4728 "The PIL Software License"))))
4729
4730(define-public python2-pillow
4731 (package-with-python2 python-pillow))
4732
4733(define-public python-pycparser
4734 (package
4735 (name "python-pycparser")
c6c0940e 4736 (version "2.19")
44d10b1f
RW
4737 (source
4738 (origin
4739 (method url-fetch)
4740 (uri (pypi-uri "pycparser" version))
4741 (sha256
4742 (base32
c6c0940e 4743 "1cr5dcj9628lkz1qlwq3fv97c25363qppkmcayqvd05dpy573259"))))
44d10b1f
RW
4744 (outputs '("out" "doc"))
4745 (build-system python-build-system)
4746 (native-inputs
4747 `(("pkg-config" ,pkg-config)))
4748 (arguments
4749 `(#:phases
4750 (modify-phases %standard-phases
4751 (replace 'check
4752 (lambda _
4753 (with-directory-excursion "tests"
acb75c03
RW
4754 (invoke "python" "all_tests.py"))
4755 #t))
44d10b1f
RW
4756 (add-after 'install 'install-doc
4757 (lambda* (#:key outputs #:allow-other-keys)
4758 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4759 (doc (string-append data "/doc/" ,name "-" ,version))
4760 (examples (string-append doc "/examples")))
4761 (mkdir-p examples)
4762 (for-each (lambda (file)
4763 (copy-file (string-append "." file)
4764 (string-append doc file)))
4765 '("/README.rst" "/CHANGES" "/LICENSE"))
c6c0940e
MB
4766 (copy-recursively "examples" examples)
4767 #t))))))
44d10b1f
RW
4768 (home-page "https://github.com/eliben/pycparser")
4769 (synopsis "C parser in Python")
4770 (description
4771 "Pycparser is a complete parser of the C language, written in pure Python
4772using the PLY parsing library. It parses C code into an AST and can serve as
4773a front-end for C compilers or analysis tools.")
4774 (license license:bsd-3)))
4775
4776(define-public python2-pycparser
4777 (package-with-python2 python-pycparser))
4778
4779(define-public python-pywavelets
4780 (package
4781 (name "python-pywavelets")
4782 (version "1.0.1")
4783 (home-page "https://github.com/PyWavelets/pywt")
4784 (source (origin
4785 (method url-fetch)
4786 (uri (pypi-uri "PyWavelets" version))
4787 (sha256
4788 (base32
4789 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
4790 (build-system python-build-system)
4791 (arguments
4792 '(#:modules ((ice-9 ftw)
4793 (srfi srfi-1)
4794 (srfi srfi-26)
4795 (guix build utils)
4796 (guix build python-build-system))
4797 #:phases (modify-phases %standard-phases
4798 (replace 'check
4799 (lambda _
4800 (let ((cwd (getcwd))
4801 (libdir (find (cut string-prefix? "lib." <>)
4802 (scandir "build"))))
4803 (with-directory-excursion (string-append cwd "/build/" libdir)
4804 (invoke "nosetests" "-v" "."))))))))
4805 (native-inputs
4806 `(("python-matplotlib" ,python-matplotlib) ;for tests
4807 ("python-nose" ,python-nose)))
4808 (propagated-inputs
4809 `(("python-numpy" ,python-numpy)))
4810 (synopsis "Wavelet transforms in Python")
4811 (description
4812 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
4813mathematical basis functions that are localized in both time and frequency.
4814Wavelet transforms are time-frequency transforms employing wavelets. They are
4815similar to Fourier transforms, the difference being that Fourier transforms are
4816localized only in frequency instead of in time and frequency.")
4817 (license license:expat)))
4818
4819(define-public python2-pywavelets
4820 (package-with-python2 python-pywavelets))
4821
4822(define-public python-xcffib
4823 (package
4824 (name "python-xcffib")
4825 (version "0.6.0")
4826 (source
4827 (origin
4828 (method url-fetch)
4829 (uri (pypi-uri "xcffib" version))
4830 (sha256
4831 (base32
4832 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
4833 (build-system python-build-system)
4834 (inputs
4835 `(("libxcb" ,libxcb)))
4836 (propagated-inputs
4837 `(("python-cffi" ,python-cffi) ; used at run time
4838 ("python-six" ,python-six)))
4839 (arguments
4840 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4841 #:tests? #f
4842 #:phases
4843 (modify-phases %standard-phases
4844 (add-after 'unpack 'fix-libxcb-path
4845 (lambda* (#:key inputs #:allow-other-keys)
4846 (let ((libxcb (assoc-ref inputs "libxcb")))
4847 (substitute* '("xcffib/__init__.py")
4848 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4849 #t)))
4850 (add-after 'install 'install-doc
4851 (lambda* (#:key outputs #:allow-other-keys)
4852 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4853 "/doc/" ,name "-" ,version)))
4854 (mkdir-p doc)
4855 (copy-file "README.md"
4856 (string-append doc "/README.md"))
4857 #t))))))
4858 (home-page "https://github.com/tych0/xcffib")
4859 (synopsis "XCB Python bindings")
4860 (description
4861 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4862support for Python 3 and PyPy. It is based on cffi.")
4863 (license license:expat)))
4864
4865(define-public python2-xcffib
4866 (package-with-python2 python-xcffib))
4867
4868(define-public python-cairocffi
4869 (package
4870 (name "python-cairocffi")
4871 (version "0.9.0")
4872 (source
4873 (origin
4874 (method url-fetch)
4875 (uri (pypi-uri "cairocffi" version))
4876 (sha256
4877 (base32
4878 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
4879 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
4880 (build-system python-build-system)
4881 (outputs '("out" "doc"))
4882 (inputs
4883 `(("glib" ,glib)
4884 ("gtk+" ,gtk+)
4885 ("gdk-pixbuf" ,gdk-pixbuf)
4886 ("cairo" ,cairo)
4887 ("pango" ,pango)))
4888 (native-inputs
4889 `(("pkg-config" ,pkg-config)
4890 ("python-pytest" ,python-pytest)
4891 ("python-pytest-cov" ,python-pytest-cov)
4892 ("python-pytest-runner" ,python-pytest-runner)
4893 ("python-sphinx" ,python-sphinx)
4894 ("python-docutils" ,python-docutils)))
4895 (propagated-inputs
4896 `(("python-xcffib" ,python-xcffib))) ; used at run time
4897 (arguments
4898 `(#:phases
4899 (modify-phases %standard-phases
4900 (add-after 'unpack 'patch-paths
4901 (lambda* (#:key inputs outputs #:allow-other-keys)
4902 (substitute* (find-files "." "\\.py$")
4903 (("dlopen\\(ffi, 'cairo'")
4904 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
4905 "/lib/libcairo.so.2'"))
4906 (("dlopen\\(ffi, 'gdk-3'")
4907 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
4908 "/lib/libgtk-3.so.0'"))
4909 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
4910 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
4911 "/lib/libgdk_pixbuf-2.0.so.0'"))
4912 (("dlopen\\(ffi, 'glib-2.0'")
4913 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4914 "/lib/libglib-2.0.so.0'"))
4915 (("dlopen\\(ffi, 'gobject-2.0'")
4916 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4917 "/lib/libgobject-2.0.so.0'"))
4918 (("dlopen\\(ffi, 'pangocairo-1.0'")
4919 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4920 "/lib/libpangocairo-1.0.so.0'"))
4921 (("dlopen\\(ffi, 'pango-1.0'")
4922 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4923 "/lib/libpango-1.0.so.0'")))
4924 #t))
4925 (add-after 'install 'install-doc
4926 (lambda* (#:key inputs outputs #:allow-other-keys)
4927 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4928 (doc (string-append data "/doc/" ,name "-" ,version))
4929 (html (string-append doc "/html")))
4930 (setenv "LD_LIBRARY_PATH"
4931 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4932 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4933 (setenv "LANG" "en_US.UTF-8")
4934 (mkdir-p html)
4935 (for-each (lambda (file)
4936 (copy-file (string-append "." file)
4937 (string-append doc file)))
4938 '("/README.rst" "/CHANGES" "/LICENSE"))
4939 (system* "python" "setup.py" "build_sphinx")
4940 (copy-recursively "docs/_build/html" html)
4941 #t))))))
4942 (home-page "https://github.com/Kozea/cairocffi")
4943 (synopsis "Python bindings and object-oriented API for Cairo")
4944 (description
4945 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4946Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4947graphics library with support for multiple backends including image buffers,
4948PNG, PostScript, PDF, and SVG file output.")
4949 (license license:bsd-3)))
4950
4951(define-public python2-cairocffi
4952 (package-with-python2 python-cairocffi))
4953
4954(define-public python-decorator
4955 (package
4956 (name "python-decorator")
4957 (version "4.3.0")
4958 (source
4959 (origin
4960 (method url-fetch)
4961 (uri (pypi-uri "decorator" version))
4962 (sha256
4963 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4964 (build-system python-build-system)
4965 (home-page "https://pypi.python.org/pypi/decorator/")
4966 (synopsis "Python module to simplify usage of decorators")
4967 (description
4968 "The aim of the decorator module is to simplify the usage of decorators
4969for the average programmer, and to popularize decorators usage giving examples
4970of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4971etc. The core of this module is a decorator factory.")
4972 (license license:expat)))
4973
4974(define-public python2-decorator
4975 (package-with-python2 python-decorator))
4976
4977(define-public python-drmaa
4978 (package
4979 (name "python-drmaa")
4980 (version "0.7.7")
4981 (source
4982 (origin
4983 (method url-fetch)
4984 (uri (pypi-uri "drmaa" version))
4985 (sha256
4986 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4987 (build-system python-build-system)
4988 ;; The test suite requires libdrmaa which is provided by the cluster
4989 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4990 ;; should be set to the path of the libdrmaa library.
4991 (arguments '(#:tests? #f))
4992 (native-inputs
4993 `(("python-nose" ,python-nose)))
4994 (home-page "https://pypi.python.org/pypi/drmaa")
4995 (synopsis "Python bindings for the DRMAA library")
4996 (description
4997 "A Python package for Distributed Resource Management (DRM) job
4998submission and control. This package is an implementation of the DRMAA 1.0
4999Python language binding specification.")
5000 (license license:bsd-3)))
5001
5002(define-public python2-drmaa
5003 (package-with-python2 python-drmaa))
5004
5005(define-public python-grako
5006 (package
5007 (name "python-grako")
5008 (version "3.99.9")
5009 (source
5010 (origin
5011 (method url-fetch)
5012 (uri
5013 (pypi-uri "grako" version ".zip"))
5014 (sha256
5015 (base32
5016 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
5017 (build-system python-build-system)
5018 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
5019 (native-inputs
5020 `(("unzip" ,unzip)
5021 ("python-pytest" ,python-pytest)
5022 ("python-pytest-runner" ,python-pytest-runner)))
5023 (home-page "https://bitbucket.org/neogeny/grako")
5024 (synopsis "EBNF parser generator")
5025 (description
5026 "Grako takes a grammar in a variation of EBNF as input, and outputs a
5027memoizing PEG/Packrat parser in Python.")
5028 (license license:bsd-3)))
5029
5030(define-public python2-grako
5031 (package-with-python2 python-grako))
5032
5033(define-public python-gridmap
5034 (package
5035 (name "python-gridmap")
5036 (version "0.13.0")
5037 (source
5038 (origin
768fea0f
TGR
5039 (method git-fetch)
5040 (uri (git-reference
5041 (url "https://github.com/pygridtools/gridmap.git")
5042 (commit (string-append "v" version))))
5043 (file-name (git-file-name name version))
44d10b1f 5044 (sha256
768fea0f 5045 (base32 "1478lbwsr1w24cii2x01m2910fvh8r43ghnb78nc972a96hqiknm"))))
44d10b1f
RW
5046 (build-system python-build-system)
5047 (arguments
5048 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
5049 (propagated-inputs
5050 `(("python-psutil" ,python-psutil)
5051 ("python-drmaa" ,python-drmaa)
5052 ("python-pyzmq" ,python-pyzmq)))
5053 (home-page "https://github.com/pygridtools/gridmap")
5054 (synopsis "Create jobs on a cluster directly from Python")
5055 (description
5056 "Gridmap is a Python package to allow you to easily create jobs on the
5057cluster directly from Python. You can directly map Python functions onto the
5058cluster without needing to write any wrapper code yourself.")
5059 (license license:gpl3+)))
5060
5061(define-public python2-gridmap
5062 (package-with-python2 python-gridmap))
5063
5064(define-public python-honcho
5065 (package
5066 (name "python-honcho")
5067 (version "1.0.1")
5068 (source
5069 (origin
8524d130
TGR
5070 (method git-fetch)
5071 (uri (git-reference
5072 (url "https://github.com/nickstenning/honcho.git")
5073 (commit (string-append "v" version))))
5074 (file-name (git-file-name name version))
44d10b1f 5075 (sha256
8524d130 5076 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
44d10b1f
RW
5077 (build-system python-build-system)
5078 (native-inputs
5079 `(("python-pytest" ,python-pytest)
5080 ("python-mock" ,python-mock)
5081 ("python-tox" ,python-tox)
5082 ("which" ,which))) ;for tests
5083 (propagated-inputs
5084 `(("python-jinja2" ,python-jinja2)))
5085 (arguments
5086 `(#:phases
5087 (modify-phases %standard-phases
5088 (delete 'check)
5089 (add-after 'install 'check
5090 (lambda* (#:key outputs inputs #:allow-other-keys)
5091 ;; fix honcho path in testsuite
5092 (substitute* "tests/conftest.py"
5093 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
5094 "/bin/honcho" "'")))
5095 ;; It's easier to run tests after install.
5096 ;; Make installed package available for running the tests
5097 (add-installed-pythonpath inputs outputs)
95b707fb 5098 (invoke "py.test" "-v"))))))
44d10b1f
RW
5099 (home-page "https://github.com/nickstenning/honcho")
5100 (synopsis "Manage Procfile-based applications")
5101 (description
5102 "A Procfile is a file which describes how to run an application
50fceab0 5103consisting of several processes. honcho starts all listed processes.
44d10b1f
RW
5104The output of all running processes is collected by honcho and
5105displayed.")
5106 (license license:expat)))
5107
5108(define-public python2-honcho
5109 (package-with-python2 python-honcho))
5110
5111(define-public python-pexpect
5112 (package
5113 (name "python-pexpect")
5114 (version "4.6.0")
5115 (source
5116 (origin
5117 (method url-fetch)
5118 (uri (pypi-uri "pexpect" version))
5119 (sha256
5120 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
5121 (build-system python-build-system)
5122 (arguments
5123 `(#:phases
5124 (modify-phases %standard-phases
5125 (add-before 'check 'prepare-tests
5126 (lambda _
5127 (substitute* (find-files "tests")
5128 (("/bin/ls") (which "ls"))
5129 (("/bin/echo") (which "echo"))
5130 (("/bin/which") (which "which"))
5131 ;; Many tests try to use the /bin directory which
5132 ;; is not present in the build environment.
5133 ;; Use one that's non-empty and unlikely to change.
5134 (("/bin'") "/dev'"))
5135 ;; XXX: Socket connection test gets "Connection reset by peer".
5136 ;; Why does it not work? Delete for now.
5137 (delete-file "tests/test_socket.py")
5138 #t))
5139 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
5140 (native-inputs
5141 `(("python-nose" ,python-nose)
5142 ("python-pytest" ,python-pytest)
5143 ("man-db" ,man-db)
5144 ("which" ,which)
5145 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
5146 (propagated-inputs
5147 `(("python-ptyprocess" ,python-ptyprocess)))
5148 (home-page "http://pexpect.readthedocs.org/")
5149 (synopsis "Controlling interactive console applications")
5150 (description
5151 "Pexpect is a pure Python module for spawning child applications;
5152controlling them; and responding to expected patterns in their output.
5153Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
5154child application and control it as if a human were typing commands.")
5155 (license license:isc)))
5156
5157(define-public python2-pexpect
5158 (package-with-python2 python-pexpect))
5159
5160(define-public python-setuptools-scm
5161 (package
5162 (name "python-setuptools-scm")
85092643 5163 (version "3.2.0")
44d10b1f
RW
5164 (source (origin
5165 (method url-fetch)
5166 (uri (pypi-uri "setuptools_scm" version))
5167 (sha256
5168 (base32
85092643 5169 "0n3knn3p1sqlx31k2lahn7z9bacvlv8nhlfidj77vz50bxqlgasj"))))
44d10b1f
RW
5170 (build-system python-build-system)
5171 (home-page "https://github.com/pypa/setuptools_scm/")
5172 (synopsis "Manage Python package versions in SCM metadata")
5173 (description
5174 "Setuptools_scm handles managing your Python package versions in
5175@dfn{software configuration management} (SCM) metadata instead of declaring
5176them as the version argument or in a SCM managed file.")
5177 (license license:expat)))
5178
a0b2accf
MO
5179;; Needed by python-lazy-object-proxy, remove on next update cycle.
5180(define-public python-setuptools-scm-3.3
5181 (package
5182 (inherit python-setuptools-scm)
5183 (version "3.3.3")
5184 (source (origin
5185 (method url-fetch)
5186 (uri (pypi-uri "setuptools_scm" version))
5187 (sha256
5188 (base32
5189 "19cyndx23xmpbhz4qrwmfwsmnnaczd0dw7qg977ksq2dbvxy29dx"))))))
5190
44d10b1f
RW
5191(define-public python2-setuptools-scm
5192 (package-with-python2 python-setuptools-scm))
5193
bb74ea09
RW
5194(define-public python-pathlib2
5195 (package
5196 (name "python-pathlib2")
5197 (version "2.3.3")
5198 (source
5199 (origin
5200 (method url-fetch)
5201 (uri (pypi-uri "pathlib2" version))
5202 (sha256
5203 (base32
5204 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
5205 (build-system python-build-system)
5206 (propagated-inputs
5207 `(("python-scandir" ,python-scandir)
5208 ("python-six" ,python-six)))
5209 (home-page "https://pypi.python.org/pypi/pathlib2/")
746d3384 5210 (synopsis "Object-oriented file system paths")
bb74ea09
RW
5211 (description "The goal of pathlib2 is to provide a backport of the
5212standard @code{pathlib} module which tracks the standard library module, so
5213all the newest features of the standard @code{pathlib} can be used also on
5214older Python versions.")
5215 (license license:expat)))
5216
15b65617
RW
5217(define-public python-importlib-metadata
5218 (package
5219 (name "python-importlib-metadata")
0af697d9 5220 (version "0.23")
15b65617
RW
5221 (source
5222 (origin
5223 (method url-fetch)
5224 (uri (pypi-uri "importlib_metadata" version))
5225 (sha256
0af697d9 5226 (base32 "09mdqdfv5rdrwz80jh9m379gxmvk2vhjfz0fg53hid00icvxf65a"))))
15b65617
RW
5227 (build-system python-build-system)
5228 (propagated-inputs
5229 `(("python-configparser" ,python-configparser)
5230 ("python-contextlib2" ,python-contextlib2)
5231 ("python-docutils" ,python-docutils)
5232 ("python-pathlib2" ,python-pathlib2)
5233 ("python-rst.linker" ,python-rst.linker)
5234 ("python-zipp" ,python-zipp)))
5235 (native-inputs
5236 `(("python-setuptools-scm" ,python-setuptools-scm)
5237 ("python-sphinx" ,python-sphinx)))
5238 (home-page "https://importlib-metadata.readthedocs.io/")
5239 (synopsis "Read metadata from Python packages")
5240 (description
5241 "@code{importlib_metadata} is a library which provides an API for
5242accessing an installed Python package's metadata, such as its entry points or
5243its top-level name. This functionality intends to replace most uses of
5244@code{pkg_resources} entry point API and metadata API. Along with
5245@code{importlib.resources} in Python 3.7 and newer, this can eliminate the
5246need to use the older and less efficient @code{pkg_resources} package.")
5247 (license license:asl2.0)))
5248
37c173d1
RW
5249(define-public python-jaraco-packaging
5250 (package
5251 (name "python-jaraco-packaging")
5252 (version "6.1")
5253 (source
5254 (origin
5255 (method url-fetch)
5256 (uri (pypi-uri "jaraco.packaging" version))
5257 (sha256
5258 (base32
5259 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
5260 (build-system python-build-system)
5261 (propagated-inputs
5262 `(("python-pytest" ,python-pytest)
5263 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
5264 ("python-pytest-flake8" ,python-pytest-flake8)
5265 ("python-rst.linker" ,python-rst.linker)
5266 ("python-setuptools" ,python-setuptools)
5267 ("python-setuptools-scm" ,python-setuptools-scm)
5268 ("python-six" ,python-six)
5269 ("python-sphinx" ,python-sphinx)))
5270 (home-page "https://github.com/jaraco/jaraco.packaging")
5271 (synopsis "Tools to supplement packaging Python releases")
5272 (description
5273 "This package provides various tools to supplement packaging Python
5274releases.")
5275 (license license:expat)))
5276
44d10b1f
RW
5277(define-public python-pathpy
5278 (package
5279 (name "python-pathpy")
a3dd8871 5280 (version "11.5.1")
44d10b1f
RW
5281 (source
5282 (origin
5283 (method url-fetch)
5284 (uri (pypi-uri "path.py" version))
5285 (sha256
a3dd8871 5286 (base32 "0ir9j1haq2jbi7aip6k2fa9l7q1l03k4hp1awxhjhcwzsnwp3ll8"))))
49ad11e9 5287 (outputs '("out" "doc"))
44d10b1f
RW
5288 (build-system python-build-system)
5289 (propagated-inputs
01a53e0b
MC
5290 `(("python-appdirs" ,python-appdirs)
5291 ("python-importlib-metadata" ,python-importlib-metadata)))
44d10b1f
RW
5292 (native-inputs
5293 `(("python-setuptools-scm" ,python-setuptools-scm)
5294 ("python-sphinx" ,python-sphinx)
5295 ("python-rst.linker" ,python-rst.linker)
5296 ("python-pytest" ,python-pytest)
49ad11e9
RW
5297 ("python-pytest-runner" ,python-pytest-runner)
5298 ("python-jaraco-packaging" ,python-jaraco-packaging)))
44d10b1f 5299 (arguments
49ad11e9
RW
5300 `(#:phases
5301 (modify-phases %standard-phases
5302 (add-after 'build 'build-doc
5303 (lambda _
5304 (setenv "LANG" "en_US.UTF-8")
5305 (invoke "python" "setup.py" "build_sphinx")))
5306 (add-after 'install 'install-doc
5307 (lambda* (#:key outputs #:allow-other-keys)
5308 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5309 (doc (string-append data "/doc/" ,name "-" ,version))
5310 (html (string-append doc "/html")))
5311 (mkdir-p html)
5312 (for-each (lambda (file)
5313 (copy-file file (string-append doc "/" file)))
5314 '("README.rst" "CHANGES.rst"))
5315 (copy-recursively "build/sphinx/html" html)
5316 #t)))
5317 (replace 'check
5318 (lambda _
5319 ;; The import time test aborts if an import takes longer than
5320 ;; 100ms. It may very well take a little longer than that.
5321 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
44d10b1f
RW
5322 (home-page "https://github.com/jaraco/path.py")
5323 (synopsis "Python module wrapper for built-in os.path")
5324 (description
5325 "@code{path.py} implements path objects as first-class entities, allowing
5326common operations on files to be invoked on those path objects directly.")
5327 (license license:expat)))
5328
5329(define-public python2-pathpy
5330 (package-with-python2 python-pathpy))
5331
5332(define-public python-simplegeneric
5333 (package
5334 (name "python-simplegeneric")
5335 (version "0.8.1")
5336 (source
5337 (origin
5338 (method url-fetch)
6c8c3980 5339 (uri (pypi-uri "simplegeneric" version ".zip"))
44d10b1f
RW
5340 (sha256
5341 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5342 (build-system python-build-system)
5343 (native-inputs
5344 `(("unzip" ,unzip)))
5345 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5346 (synopsis "Python module for simple generic functions")
5347 (description
5348 "The simplegeneric module lets you define simple single-dispatch generic
5349functions, akin to Python’s built-in generic functions like @code{len()},
5350@code{iter()} and so on. However, instead of using specially-named methods,
5351these generic functions use simple lookup tables, akin to those used by
5352e.g. @code{pickle.dump()} and other generic functions found in the Python
5353standard library.")
5354 (license license:zpl2.1)))
5355
5356(define-public python2-simplegeneric
5357 (package-with-python2 python-simplegeneric))
5358
5359(define-public python-ipython-genutils
5360 ;; TODO: This package is retired, check if can be removed, see description.
5361 (package
5362 (name "python-ipython-genutils")
5363 (version "0.1.0")
5364 (source
5365 (origin
5366 (method url-fetch)
c9671d4b 5367 (uri (pypi-uri "ipython_genutils" version))
44d10b1f
RW
5368 (sha256
5369 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5370 (build-system python-build-system)
5371 (arguments `(#:tests? #f)) ; no tests
5372 (home-page "https://ipython.org")
5373 (synopsis "Vestigial utilities from IPython")
5374 (description
5375 "This package provides retired utilities from IPython. No packages
5376outside IPython/Jupyter should depend on it.
5377
5378This package shouldn't exist. It contains some common utilities shared by
5379Jupyter and IPython projects during The Big Split. As soon as possible, those
5380packages will remove their dependency on this, and this package will go
5381away.")
5382 (license license:bsd-3)))
5383
5384(define-public python2-ipython-genutils
5385 (package-with-python2 python-ipython-genutils))
5386
5387(define-public python-traitlets
5388 (package
5389 (name "python-traitlets")
ac5e205a 5390 (version "4.3.3")
44d10b1f
RW
5391 (source
5392 (origin
5393 (method url-fetch)
5394 (uri (pypi-uri "traitlets" version))
5395 (sha256
5396 (base32
ac5e205a 5397 "1xsrwgivpkxlbr4dfndfsi098s29yqgswgjc1qqn69yxklvfw8yh"))))
44d10b1f
RW
5398 (build-system python-build-system)
5399 (arguments
5400 `(#:phases
5401 (modify-phases %standard-phases
5402 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
5403 (propagated-inputs
5404 `(("python-ipython-genutils" ,python-ipython-genutils)
ac5e205a 5405 ("python-decorator" ,python-decorator)))
44d10b1f
RW
5406 (native-inputs
5407 `(("python-pytest" ,python-pytest)))
5408 (properties `((python2-variant . ,(delay python2-traitlets))))
5409 (home-page "https://ipython.org")
5410 (synopsis "Configuration system for Python applications")
5411 (description
5412 "Traitlets is a framework that lets Python classes have attributes with
5413type checking, dynamically calculated default values, and ‘on change’
5414callbacks. The package also includes a mechanism to use traitlets for
5415configuration, loading values from files or from command line arguments. This
5416is a distinct layer on top of traitlets, so you can use traitlets in your code
5417without using the configuration machinery.")
5418 (license license:bsd-3)))
5419
5420(define-public python2-traitlets
5421 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
5422 (package
5423 (inherit traitlets)
5424 (propagated-inputs
5425 `(("python2-enum34" ,python2-enum34)
5426 ,@(package-propagated-inputs traitlets))))))
5427
5428(define-public python-jupyter-core
5429 (package
5430 (name "python-jupyter-core")
5431 (version "4.4.0")
5432 (source
5433 (origin
5434 (method url-fetch)
5435 (uri (string-append (pypi-uri "jupyter_core" version)))
5436 (sha256
5437 (base32
5438 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
5439 (build-system python-build-system)
5440 ;; FIXME: not sure how to run the tests
5441 (arguments `(#:tests? #f))
5442 (propagated-inputs
5443 `(("python-traitlets" ,python-traitlets)))
5444 (home-page "http://jupyter.org/")
5445 (synopsis "Jupyter base package")
5446 (description
5447 "Jupyter core is the base package on which Jupyter projects rely.")
5448 (license license:bsd-3)))
5449
5450(define-public python2-jupyter-core
5451 (package-with-python2 python-jupyter-core))
5452
5453(define-public python-jupyter-client
5454 (package
5455 (name "python-jupyter-client")
5456 (version "5.2.4")
5457 (source
5458 (origin
5459 (method url-fetch)
5460 (uri (pypi-uri "jupyter_client" version))
5461 (sha256
5462 (base32
5463 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
5464 (build-system python-build-system)
5465 ;; Tests fail because of missing native python kernel which I assume is
5466 ;; provided by the ipython package, which we cannot use because it would
5467 ;; cause a dependency cycle.
ddc586ea
LC
5468 (arguments
5469 `(#:tests? #f
5470
5471 #:phases (modify-phases %standard-phases
5472 (add-after 'unpack 'set-tool-file-names
5473 (lambda* (#:key inputs #:allow-other-keys)
5474 (let ((iproute (assoc-ref inputs "iproute")))
5475 (substitute* "jupyter_client/localinterfaces.py"
5476 (("'ip'")
5477 (string-append "'" iproute "/sbin/ip'")))
5478 #t))))))
5479 (inputs
5480 `(("iproute" ,iproute)))
44d10b1f
RW
5481 (propagated-inputs
5482 `(("python-pyzmq" ,python-pyzmq)
5483 ("python-traitlets" ,python-traitlets)
5484 ("python-jupyter-core" ,python-jupyter-core)))
5485 (home-page "http://jupyter.org/")
5486 (synopsis "Jupyter protocol implementation and client libraries")
5487 (description
5488 "The @code{jupyter_client} package contains the reference implementation
5489of the Jupyter protocol. It also provides client and kernel management APIs
5490for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5491installing @code{kernelspec}s for use with Jupyter frontends.")
5492 (license license:bsd-3)))
5493
5494(define-public python2-jupyter-client
5495 (package-with-python2 python-jupyter-client))
5496
5497(define-public python-ipykernel
5498 (package
5499 (name "python-ipykernel")
08d0a355 5500 (version "5.1.3")
44d10b1f
RW
5501 (source
5502 (origin
5503 (method url-fetch)
5504 (uri (pypi-uri "ipykernel" version))
5505 (sha256
08d0a355 5506 (base32 "1a08y677lpn80qzvv7z0smgggmr5m5ayf0bs6vds47xpxl9sss5k"))))
44d10b1f
RW
5507 (build-system python-build-system)
5508 (arguments
5509 `(#:phases
5510 (modify-phases %standard-phases
5511 (replace 'check
5512 (lambda _
5513 (setenv "HOME" "/tmp")
5514 (invoke "pytest" "-v")
aa856d02
LC
5515 #t))
5516 (add-after 'install 'set-python-file-name
5517 (lambda* (#:key outputs #:allow-other-keys)
5518 ;; Record the absolute file name of the 'python' executable in
5519 ;; 'kernel.json'.
5520 (let ((out (assoc-ref outputs "out")))
5521 (substitute* (string-append out "/share/jupyter"
5522 "/kernels/python3/kernel.json")
5523 (("\"python\"")
5524 (string-append "\"" (which "python") "\"")))
5525 #t))))))
44d10b1f
RW
5526 (propagated-inputs
5527 `(("python-ipython" ,python-ipython)
5528 ;; imported at runtime during connect
5529 ("python-jupyter-client" ,python-jupyter-client)))
5530 (native-inputs
08d0a355
TGR
5531 `(("python-flaky" ,python-flaky)
5532 ("python-nose" ,python-nose)
5533 ("python-pytest" ,python-pytest)))
44d10b1f
RW
5534 (home-page "https://ipython.org")
5535 (synopsis "IPython Kernel for Jupyter")
5536 (description
5537 "This package provides the IPython kernel for Jupyter.")
5538 (license license:bsd-3)))
5539
0f378947 5540;; Version 5.1.1 and above no longer support Python 2.
44d10b1f 5541(define-public python2-ipykernel
0f378947
RW
5542 (package
5543 (name "python2-ipykernel")
5544 (version "5.1.0")
5545 (source
5546 (origin
5547 (method url-fetch)
5548 (uri (pypi-uri "ipykernel" version))
5549 (sha256
5550 (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g"))))
5551 (build-system python-build-system)
5552 (arguments
5553 `(#:python ,python-2
5554 #:phases
5555 (modify-phases %standard-phases
5556 (replace 'check
5557 (lambda _
5558 (setenv "HOME" "/tmp")
5559 (invoke "pytest" "-v")
5560 #t)))))
5561 (propagated-inputs
5562 `(("python2-ipython" ,python2-ipython)
5563 ;; imported at runtime during connect
5564 ("python2-jupyter-client" ,python2-jupyter-client)))
5565 (native-inputs
5566 `(("python2-pytest" ,python2-pytest)
5567 ("python2-nose" ,python2-nose)))
5568 (home-page "https://ipython.org")
5569 (synopsis "IPython Kernel for Jupyter")
5570 (description
5571 "This package provides the IPython kernel for Jupyter.")
5572 (license license:bsd-3)))
44d10b1f 5573
966aa714
AE
5574(define-public python-pari-jupyter
5575 (package
5576 (name "python-pari-jupyter")
5577 (version "1.3.2")
5578 (source
5579 (origin
5580 (method url-fetch)
5581 (uri (pypi-uri "pari_jupyter" version))
5582 (sha256
5583 (base32
5584 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
5585 (build-system python-build-system)
5586 (propagated-inputs
5587 `(("python-ipykernel" ,python-ipykernel)))
5588 (inputs
5589 `(("pari-gp" ,pari-gp)
5590 ("readline" ,readline)))
5591 (arguments
5592 `(#:tests? #f)) ; no test suite
5593 (home-page
5594 "https://github.com/jdemeyer/pari_jupyter")
5595 (synopsis "A Jupyter kernel for PARI/GP")
5596 (description "The package provides a PARI/GP kernel for Jupyter.")
5597 (license license:gpl3+)))
5598
dede052a
RW
5599(define-public python-backcall
5600 (package
5601 (name "python-backcall")
5602 (version "0.1.0")
5603 (source
5604 (origin
5605 (method url-fetch)
5606 (uri (pypi-uri "backcall" version))
5607 (sha256
5608 (base32
5609 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
5610 (build-system python-build-system)
5611 (home-page "https://github.com/takluyver/backcall/")
5612 (synopsis "Specifications for callback functions passed in to an API")
5613 (description
5614 "If your code lets other people supply callback functions, it's important
5615to specify the function signature you expect, and check that functions support
5616that. Adding extra parameters later would break other peoples code unless
5617you're careful. The @code{backcall} package provides a way of specifying the
5618callback signature using a prototype function.")
5619 (license license:bsd-3)))
5620
44d10b1f
RW
5621;; This is the latest release of the LTS version of ipython with support for
5622;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
8b5f756c
RW
5623;; dropped support for Python 2.7.
5624(define-public python2-ipython
44d10b1f 5625 (package
8b5f756c 5626 (name "python2-ipython")
44d10b1f
RW
5627 (version "5.8.0")
5628 (source
5629 (origin
5630 (method url-fetch)
5631 (uri (pypi-uri "ipython" version ".tar.gz"))
5632 (sha256
5633 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
5634 (build-system python-build-system)
44d10b1f 5635 (propagated-inputs
8b5f756c
RW
5636 `(("python2-backports-shutil-get-terminal-size"
5637 ,python2-backports-shutil-get-terminal-size)
5638 ("python2-pathlib2" ,python2-pathlib2)
5639 ("python2-pyzmq" ,python2-pyzmq)
5640 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
5641 ("python2-terminado" ,python2-terminado)
5642 ("python2-matplotlib" ,python2-matplotlib)
5643 ("python2-numpy" ,python2-numpy)
5644 ("python2-numpydoc" ,python2-numpydoc)
5645 ("python2-jinja2" ,python2-jinja2)
5646 ("python2-mistune" ,python2-mistune)
5647 ("python2-pexpect" ,python2-pexpect)
5648 ("python2-pickleshare" ,python2-pickleshare)
5649 ("python2-simplegeneric" ,python2-simplegeneric)
5650 ("python2-jsonschema" ,python2-jsonschema)
5651 ("python2-traitlets" ,python2-traitlets)
5652 ("python2-nbformat" ,python2-nbformat)
5653 ("python2-pygments" ,python2-pygments)))
5654 (inputs
5655 `(("readline" ,readline)
5656 ("which" ,which)))
5657 (native-inputs
5658 `(("graphviz" ,graphviz)
5659 ("pkg-config" ,pkg-config)
5660 ("python2-requests" ,python2-requests) ;; for tests
5661 ("python2-testpath" ,python2-testpath)
5662 ("python2-mock" ,python2-mock)
5663 ("python2-nose" ,python2-nose)))
5664 (arguments
5665 `(#:python ,python-2
5666 #:phases
5667 (modify-phases %standard-phases
5668 (add-before 'check 'delete-broken-tests
5669 (lambda* (#:key inputs #:allow-other-keys)
5670 ;; These tests throw errors for unknown reasons.
5671 (delete-file "IPython/core/tests/test_profile.py")
5672 (delete-file "IPython/core/tests/test_interactiveshell.py")
5673 (delete-file "IPython/core/tests/test_magic.py")
5674 #t)))))
5675 (home-page "https://ipython.org")
5676 (synopsis "IPython is a tool for interactive computing in Python")
5677 (description
5678 "IPython provides a rich architecture for interactive computing with:
5679Powerful interactive shells, a browser-based notebook, support for interactive
5680data visualization, embeddable interpreters and tools for parallel
5681computing.")
5682 (license license:bsd-3)))
5683
5684(define-public python-ipython
5685 (package
5686 (name "python-ipython")
ee515773 5687 (version "7.9.0")
8b5f756c
RW
5688 (source
5689 (origin
5690 (method url-fetch)
5691 (uri (pypi-uri "ipython" version ".tar.gz"))
5692 (sha256
ee515773 5693 (base32 "103jkw18z7fnwdal1mdbijjxi1fndzn31g887lmj7ddpf2r07lyz"))))
8b5f756c
RW
5694 (build-system python-build-system)
5695 (propagated-inputs
5696 `(("python-backcall" ,python-backcall)
5697 ("python-pyzmq" ,python-pyzmq)
5698 ("python-prompt-toolkit" ,python-prompt-toolkit)
44d10b1f
RW
5699 ("python-terminado" ,python-terminado)
5700 ("python-matplotlib" ,python-matplotlib)
5701 ("python-numpy" ,python-numpy)
5702 ("python-numpydoc" ,python-numpydoc)
8b5f756c 5703 ("python-jedi" ,python-jedi)
44d10b1f
RW
5704 ("python-jinja2" ,python-jinja2)
5705 ("python-mistune" ,python-mistune)
5706 ("python-pexpect" ,python-pexpect)
5707 ("python-pickleshare" ,python-pickleshare)
5708 ("python-simplegeneric" ,python-simplegeneric)
5709 ("python-jsonschema" ,python-jsonschema)
5710 ("python-traitlets" ,python-traitlets)
5711 ("python-nbformat" ,python-nbformat)
5712 ("python-pygments" ,python-pygments)))
5713 (inputs
5714 `(("readline" ,readline)
5715 ("which" ,which)))
5716 (native-inputs
5717 `(("graphviz" ,graphviz)
5718 ("pkg-config" ,pkg-config)
5719 ("python-requests" ,python-requests) ;; for tests
5720 ("python-testpath" ,python-testpath)
8b5f756c 5721 ("python-nose" ,python-nose)))
44d10b1f
RW
5722 (arguments
5723 `(#:phases
5724 (modify-phases %standard-phases
0f272518
RW
5725 (add-after 'unpack 'make-docs-reproducible
5726 (lambda _
5727 (substitute* "IPython/sphinxext/ipython_directive.py"
5728 ((".*import datetime") "")
5729 ((".*datetime.datetime.now\\(\\)") "")
5730 (("%timeit") "# %timeit"))
5731 #t))
44d10b1f
RW
5732 ;; Tests can only be run after the library has been installed and not
5733 ;; within the source directory.
5734 (delete 'check)
5735 (add-after 'install 'check
5736 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5737 (if tests?
5738 (begin
5739 ;; Make installed package available for running the tests
5740 (add-installed-pythonpath inputs outputs)
5741 (setenv "HOME" "/tmp/") ;; required by a test
5742 ;; We only test the core because one of the other tests
5743 ;; tries to import ipykernel.
5744 (invoke "python" "IPython/testing/iptest.py"
5745 "-v" "IPython/core/tests"))
5746 #t)))
5747 (add-before 'check 'fix-tests
5748 (lambda* (#:key inputs #:allow-other-keys)
5749 (substitute* "./IPython/utils/_process_posix.py"
5750 (("/usr/bin/env', 'which") (which "which")))
5751 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5752 (("#!/usr/bin/env python")
5753 (string-append "#!" (which "python"))))
44d10b1f
RW
5754 ;; This test introduces a circular dependency on ipykernel
5755 ;; (which depends on ipython).
5756 (delete-file "IPython/core/tests/test_display.py")
8b5f756c 5757 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
44d10b1f 5758 (delete-file "IPython/core/tests/test_interactiveshell.py")
44d10b1f
RW
5759 #t)))))
5760 (home-page "https://ipython.org")
5761 (synopsis "IPython is a tool for interactive computing in Python")
5762 (description
5763 "IPython provides a rich architecture for interactive computing with:
5764Powerful interactive shells, a browser-based notebook, support for interactive
5765data visualization, embeddable interpreters and tools for parallel
5766computing.")
8b5f756c 5767 (license license:bsd-3)))
44d10b1f 5768
8b5f756c
RW
5769(define-public python-ipython-documentation
5770 (package
5771 (inherit python-ipython)
5772 (name "python-ipython-documentation")
5773 (version (package-version python-ipython))
5774 (arguments
5775 `(#:phases
5776 (modify-phases %standard-phases
5777 (delete 'build)
5778 (delete 'check)
5779 (replace 'install
5780 (lambda* (#:key outputs #:allow-other-keys)
5781 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5782 (doc (string-append data "/doc/" ,name "-" ,version))
5783 (html (string-append doc "/html"))
5784 (man1 (string-append data "/man/man1"))
5785 (info (string-append data "/info"))
5786 (examples (string-append doc "/examples"))
5787 (python-arg (string-append "PYTHON=" (which "python"))))
5788 (setenv "LANG" "en_US.utf8")
5789 (with-directory-excursion "docs"
5790 ;; FIXME: pdf fails to build
5791 ;;(system* "make" "pdf" "PAPER=a4")
5792 (system* "make" python-arg "html")
5793 ;; FIXME: the generated texi file contains ^@^@, which trips
5794 ;; up the parser.
5795 ;; (system* "make" python-arg "info")
5796 )
5797 (copy-recursively "docs/man" man1)
5798 (copy-recursively "examples" examples)
5799 (copy-recursively "docs/build/html" html)
5800 ;; (copy-file "docs/build/latex/ipython.pdf"
5801 ;; (string-append doc "/ipython.pdf"))
5802 (mkdir-p info)
5803 ;; (copy-file "docs/build/texinfo/ipython.info"
5804 ;; (string-append info "/ipython.info"))
5805 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
5806 #t)))))
5807 (inputs
5808 `(("python-ipython" ,python-ipython)
5809 ("python-ipykernel" ,python-ipykernel)))
5810 (native-inputs
5811 `(("python-sphinx" ,python-sphinx)
5812 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
5813 ;; FIXME: It's possible that a smaller union would work just as well.
f75aa97f 5814 ("texlive" ,(texlive-union (list texlive-amsfonts
8b5f756c
RW
5815 texlive-fonts-ec
5816 texlive-generic-ifxetex
5817 texlive-generic-pdftex
8b5f756c
RW
5818 texlive-latex-capt-of
5819 texlive-latex-cmap
5820 texlive-latex-environ
5821 texlive-latex-eqparbox
5822 texlive-latex-etoolbox
5823 texlive-latex-expdlist
5824 texlive-latex-fancyhdr
5825 texlive-latex-fancyvrb
5826 texlive-latex-fncychap
5827 texlive-latex-float
5828 texlive-latex-framed
5829 texlive-latex-geometry
5830 texlive-latex-graphics
5831 texlive-latex-hyperref
5832 texlive-latex-mdwtools
5833 texlive-latex-multirow
5834 texlive-latex-needspace
5835 texlive-latex-oberdiek
5836 texlive-latex-parskip
5837 texlive-latex-preview
5838 texlive-latex-tabulary
5839 texlive-latex-threeparttable
5840 texlive-latex-titlesec
5841 texlive-latex-trimspaces
5842 texlive-latex-ucs
5843 texlive-latex-upquote
5844 texlive-latex-url
5845 texlive-latex-varwidth
5846 texlive-latex-wrapfig)))
5847 ("texinfo" ,texinfo)))))
44d10b1f
RW
5848
5849(define-public python-urwid
5850 (package
5851 (name "python-urwid")
5852 (version "2.0.1")
5853 (source
5854 (origin
5855 (method url-fetch)
5856 (uri (pypi-uri "urwid" version))
5857 (sha256
5858 (base32
5859 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
5860 (build-system python-build-system)
5861 (home-page "http://urwid.org")
5862 (synopsis "Console user interface library for Python")
5863 (description
5864 "Urwid is a curses-based UI/widget library for Python. It includes many
5865features useful for text console applications.")
5866 (license license:lgpl2.1+)))
5867
5868(define-public python2-urwid
5869 (package-with-python2 python-urwid))
5870
5871(define-public python-urwidtrees
5872 (package
5873 (name "python-urwidtrees")
5874 (version "1.0.2")
5875 (source
5876 (origin
5877 (method url-fetch)
5878 ;; package author intends on distributing via github rather than pypi:
5879 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5880 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5881 version ".tar.gz"))
5882 (file-name (string-append name "-" version ".tar.gz"))
5883 (sha256
5884 (base32
5885 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
5886 (build-system python-build-system)
5887 (arguments
5888 '(#:tests? #f)) ; no tests
5889 (propagated-inputs `(("python-urwid" ,python-urwid)))
5890 (home-page "https://github.com/pazz/urwidtrees")
5891 (synopsis "Tree widgets for urwid")
5892 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5893toolkit. Use it to build trees of widgets.")
5894 (license license:gpl3+)))
5895
5896(define-public python2-urwidtrees
5897 (package-with-python2 python-urwidtrees))
5898
5899(define-public python-ua-parser
5900 (package
5901 (name "python-ua-parser")
5902 (version "0.8.0")
5903 (source
5904 (origin
5905 (method url-fetch)
5906 (uri (pypi-uri "ua-parser" version))
5907 (sha256
5908 (base32
5909 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
5910 (build-system python-build-system)
5911 (arguments
5912 `(#:tests? #f)) ;no test suite in release
5913 (native-inputs
5914 `(("python-pyyaml" ,python-pyyaml)))
5915 (home-page "https://github.com/ua-parser/uap-python")
5916 (synopsis "User agent parser")
5917 (description
5918 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
5919 (license license:asl2.0)))
5920
5921(define-public python2-ua-parser
5922 (package-with-python2 python-ua-parser))
5923
5924(define-public python-user-agents
5925 (package
5926 (name "python-user-agents")
5927 (version "1.1.0")
5928 (source
5929 (origin
5930 (method url-fetch)
5931 (uri (pypi-uri "user-agents" version))
5932 (sha256
5933 (base32
5934 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
5935 (build-system python-build-system)
5936 (arguments
5937 `(#:tests? #f)) ;missing devices.json test file in release
5938 (propagated-inputs
5939 `(("python-ua-parser" ,python-ua-parser)))
5940 (home-page "https://github.com/selwin/python-user-agents")
5941 (synopsis "User Agent strings parsing library")
5942 (description
5943 "A library to identify devices (phones, tablets) and their capabilities by
5944parsing (browser/HTTP) user agent strings.")
5945 (license license:expat)))
5946
5947(define-public python2-user-agents
5948 (package-with-python2 python-user-agents))
5949
5950(define-public python-dbus
5951 (package
5952 (name "python-dbus")
119d6ff6 5953 (version "1.2.10")
44d10b1f
RW
5954 (source
5955 (origin
5956 (method url-fetch)
5957 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
5958 "dbus-python-" version ".tar.gz"))
5959 (sha256
119d6ff6 5960 (base32 "11nqk01iq5bx2llgb3ksknyinijdp29w4ndj210glm009ayjncyl"))))
44d10b1f 5961 (build-system gnu-build-system)
44d10b1f
RW
5962 (native-inputs
5963 `(("pkg-config" ,pkg-config)))
5964 (inputs
5965 `(("python" ,python-wrapper)
5966 ("dbus-glib" ,dbus-glib)))
5967 (synopsis "Python bindings for D-bus")
5968 (description "python-dbus provides bindings for libdbus, the reference
5969implementation of D-Bus.")
5970 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
5971 (license license:expat)))
5972
5973(define-public python2-dbus
5974 (package (inherit python-dbus)
5975 (name "python2-dbus")
5976 (inputs `(("python" ,python-2)
5977 ,@(alist-delete "python"
5978 (package-inputs python-dbus)
5979 equal?)))
5980 ;; FIXME: on Python 2, the test_utf8 fails with:
5981 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5982 (arguments `(#:tests? #f))))
5983
fb236fdd
AG
5984(define-public python-notify2
5985 (package
5986 (name "python-notify2")
5987 (version "0.3.1")
5988 (source
5989 (origin
5990 (method url-fetch)
5991 (uri (pypi-uri "notify2" version))
5992 (sha256
5993 (base32
5994 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
5995 (build-system python-build-system)
5996 (arguments `(#:tests? #f)) ; tests depend on system state
5997 (native-inputs
5998 `(("python-dbus" ,python-dbus)))
5999 (home-page "https://bitbucket.org/takluyver/pynotify2")
6000 (synopsis "Python interface to D-Bus notifications")
6001 (description
6002 "Pynotify2 provides a Python interface for sending D-Bus notifications.
6003It is a reimplementation of pynotify in pure Python, and an alternative to
6004the GObject Introspection bindings to libnotify for non-GTK applications.")
6005 (license (list license:bsd-2
6006 license:lgpl2.1+))))
6007
6008(define-public python2-notify2
6009 (package-with-python2 python-notify2))
6010
44d10b1f
RW
6011(define-public python-lxml
6012 (package
6013 (name "python-lxml")
2a74f928 6014 (version "4.4.1")
44d10b1f
RW
6015 (source
6016 (origin
6017 (method url-fetch)
6018 (uri (pypi-uri "lxml" version))
6019 (sha256
6020 (base32
2a74f928 6021 "14jnpfcpgqr9sx8ppd286jzcbk0b36hbqsvd8jkvffipzw5v8768"))))
44d10b1f 6022 (build-system python-build-system)
2f3c2daf
MB
6023 (arguments
6024 `(#:phases (modify-phases %standard-phases
6025 (replace 'check
6026 (lambda _
6027 (invoke "make" "test"))))))
44d10b1f
RW
6028 (inputs
6029 `(("libxml2" ,libxml2)
6030 ("libxslt" ,libxslt)))
6031 (home-page "http://lxml.de/")
6032 (synopsis
6033 "Python XML processing library")
6034 (description
6035 "The lxml XML toolkit is a Pythonic binding for the C libraries
6036libxml2 and libxslt.")
6037 (license license:bsd-3))) ; and a few more, see LICENSES.txt
6038
6039(define-public python2-lxml
6040 (package-with-python2 python-lxml))
6041
6042;; beautifulsoup4 has a totally different namespace than 3.x,
6043;; and pypi seems to put it under its own name, so I guess we should too
6044(define-public python-beautifulsoup4
6045 (package
6046 (name "python-beautifulsoup4")
abb53e6f 6047 (version "4.7.1")
44d10b1f
RW
6048 (source
6049 (origin
6050 (method url-fetch)
6051 (uri (pypi-uri "beautifulsoup4" version))
6052 (sha256
6053 (base32
abb53e6f 6054 "0j2kycz2dxgx68xzjm7rxg5xn6v61gq5ifvxyg99slmqkybnal4l"))))
44d10b1f
RW
6055 (build-system python-build-system)
6056 (arguments
6057 `(#:phases
6058 (modify-phases %standard-phases
6059 ;; The Python 2 source is the definitive source of beautifulsoup4. We
6060 ;; must use this conversion script when building with Python 3. The
6061 ;; conversion script also runs the tests.
6062 ;; For more information, see the file 'convert-py3k' in the source
6063 ;; distribution.
6064 (replace 'check
dff0197e 6065 (lambda _ (invoke "./convert-py3k"))))))
f83e10e4 6066 (propagated-inputs
abb53e6f 6067 `(("python-soupsieve" ,python-soupsieve)))
44d10b1f
RW
6068 (home-page
6069 "https://www.crummy.com/software/BeautifulSoup/bs4/")
6070 (synopsis
6071 "Python screen-scraping library")
6072 (description
6073 "Beautiful Soup is a Python library designed for rapidly setting up
6074screen-scraping projects. It offers Pythonic idioms for navigating,
6075searching, and modifying a parse tree, providing a toolkit for
6076dissecting a document and extracting what you need. It automatically
6077converts incoming documents to Unicode and outgoing documents to UTF-8.")
6078 (license license:expat)
6079 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
6080
6081(define-public python2-beautifulsoup4
6082 (package
6083 (inherit (package-with-python2
6084 (strip-python2-variant python-beautifulsoup4)))
6085 (arguments `(#:python ,python-2))))
6086
ad74978a
BT
6087(define-public python-soupsieve
6088 (package
6089 (name "python-soupsieve")
3367df31 6090 (version "1.9.5")
ad74978a
BT
6091 (source
6092 (origin
6093 (method url-fetch)
6094 (uri (pypi-uri "soupsieve" version))
6095 (sha256
6096 (base32
3367df31 6097 "1nhd0q0ifwva9wn645s6pn74p1rd97asn3qfg75nphx1wkgcbhg2"))))
ad74978a
BT
6098 (build-system python-build-system)
6099 (arguments `(#:tests? #f))
6100 ;;XXX: 2 tests fail currently despite claming they were to be
6101 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
6102 ;;don't want to create a circular dependency.
6103 (home-page "https://github.com/facelessuser/soupsieve")
6104 (synopsis "CSS selector library")
6105 (description
6106 "Soup Sieve is a CSS selector library designed to be used with Beautiful
6107Soup 4. It aims to provide selecting, matching, and filtering using modern
6108CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
6109specifications up through the latest CSS level 4 drafts and beyond (though
6110some are not yet implemented).")
d00b83fb 6111 (properties `((python2-variant . ,(delay python2-soupsieve))))
ad74978a
BT
6112 (license license:expat)))
6113
6114(define-public python2-soupsieve
d00b83fb 6115 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
ad74978a
BT
6116 (package
6117 (inherit base)
6118 (propagated-inputs
d00b83fb
MB
6119 `(("python2-backports-functools-lru-cache"
6120 ,python2-backports-functools-lru-cache)
6121 ,@(package-propagated-inputs base))))))
ad74978a 6122
44d10b1f
RW
6123(define-public python-netifaces
6124 (package
6125 (name "python-netifaces")
6126 (version "0.10.7")
6127 (source
6128 (origin
6129 (method url-fetch)
6130 (uri (pypi-uri "netifaces" version))
6131 (sha256
6132 (base32
6133 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
6134 (build-system python-build-system)
6135 (home-page "https://github.com/al45tair/netifaces")
6136 (synopsis
6137 "Python module for portable network interface information")
6138 (description
6139 "Netifaces is a Python module providing information on network
6140interfaces in an easy and portable manner.")
6141 (license license:expat)))
6142
6143(define-public python2-netifaces
6144 (package-with-python2 python-netifaces))
6145
6146(define-public python-networkx
6147 (package
6148 (name "python-networkx")
6149 (version "2.2")
6150 (source
6151 (origin
6152 (method url-fetch)
6153 (uri (pypi-uri "networkx" version ".zip"))
6154 (sha256
6155 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
6156 (build-system python-build-system)
6157 ;; python-decorator is needed at runtime.
6158 (propagated-inputs
6159 `(("python-decorator" ,python-decorator)))
6160 (native-inputs
6161 `(("python-nose" ,python-nose)
6162 ("unzip" ,unzip)))
6163 (home-page "https://networkx.github.io/")
6164 (synopsis "Python module for creating and manipulating graphs and networks")
6165 (description
6166 "NetworkX is a Python package for the creation, manipulation, and study
6167of the structure, dynamics, and functions of complex networks.")
6168 (license license:bsd-3)))
6169
6170(define-public python2-networkx
6171 (package-with-python2 python-networkx))
6172
6173(define-public python-datrie
6174 (package
6175 (name "python-datrie")
0b58cb42 6176 (version "0.8")
44d10b1f
RW
6177 (source
6178 (origin
6179 (method url-fetch)
6180 (uri (pypi-uri "datrie" version))
6181 (sha256
6182 (base32
0b58cb42 6183 "0338r8xgmpy78556jhms0h6qkvyjr10p8bpgdvcpqzm9lrmxmmdx"))))
44d10b1f 6184 (build-system python-build-system)
44d10b1f
RW
6185 (native-inputs
6186 `(("python-cython" ,python-cython)
6187 ("python-hypothesis" ,python-hypothesis)
6188 ("python-pytest" ,python-pytest)
6189 ("python-pytest-runner" ,python-pytest-runner)))
6190 (home-page "https://github.com/kmike/datrie")
6191 (synopsis "Fast, efficiently stored trie for Python")
6192 (description
6193 "This package provides a fast, efficiently stored trie implementation for
6194Python.")
6195 (license license:lgpl2.1+)))
6196
6197(define-public snakemake
6198 (package
6199 (name "snakemake")
93803c6b 6200 (version "5.7.1")
44d10b1f
RW
6201 (source
6202 (origin
6203 (method url-fetch)
6204 (uri (pypi-uri "snakemake" version))
6205 (sha256
93803c6b 6206 (base32 "1pnpvvn8n2a78cg360wz3ldmpqrsm2wzi0c0dmvki9fnsw6fxdas"))))
44d10b1f
RW
6207 (build-system python-build-system)
6208 (arguments
6209 ;; TODO: Package missing test dependencies.
6210 '(#:tests? #f
6211 #:phases
6212 (modify-phases %standard-phases
6213 ;; For cluster execution Snakemake will call Python. Since there is
6214 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
6215 ;; this by calling the snakemake wrapper instead.
6216 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
6217 (lambda* (#:key outputs #:allow-other-keys)
6218 (substitute* "snakemake/executors.py"
6219 (("\\{sys.executable\\} -m snakemake")
6220 (string-append (assoc-ref outputs "out")
6221 "/bin/snakemake")))
6222 #t)))))
6223 (propagated-inputs
8994ae34 6224 `(("python-appdirs" ,python-appdirs)
44d10b1f
RW
6225 ("python-configargparse" ,python-configargparse)
6226 ("python-datrie" ,python-datrie)
6227 ("python-docutils" ,python-docutils)
8994ae34 6228 ("python-gitpython" ,python-gitpython)
44d10b1f
RW
6229 ("python-jinja2" ,python-jinja2)
6230 ("python-jsonschema" ,python-jsonschema)
6231 ("python-networkx" ,python-networkx)
93803c6b 6232 ("python-psutil" ,python-psutil)
44d10b1f 6233 ("python-pyyaml" ,python-pyyaml)
8994ae34
TGR
6234 ("python-ratelimiter" ,python-ratelimiter)
6235 ("python-requests" ,python-requests)
6236 ("python-wrapt" ,python-wrapt)))
44d10b1f
RW
6237 (home-page "https://snakemake.readthedocs.io")
6238 (synopsis "Python-based execution environment for make-like workflows")
6239 (description
6240 "Snakemake aims to reduce the complexity of creating workflows by
6241providing a clean and modern domain specific specification language (DSL) in
6242Python style, together with a fast and comfortable execution environment.")
6243 (license license:expat)))
6244
44d10b1f
RW
6245(define-public python-pyqrcode
6246 (package
6247 (name "python-pyqrcode")
6248 (version "1.2.1")
6249 (source
6250 (origin
6251 (method url-fetch)
6252 (uri (pypi-uri "PyQRCode" version))
6253 (sha256
6254 (base32
6255 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
6256 (build-system python-build-system)
6257 (home-page
6258 "https://github.com/mnooner256/pyqrcode")
6259 (synopsis "QR code generator")
6260 (description
6261 "Pyqrcode is a QR code generator written purely in Python with
6262SVG, EPS, PNG and terminal output.")
6263 (license license:bsd-3)))
6264
6265(define-public python-seaborn
6266 (package
6267 (name "python-seaborn")
6268 (version "0.9.0")
6269 (source
6270 (origin
6271 (method url-fetch)
6272 (uri (pypi-uri "seaborn" version))
6273 (sha256
f9bd82e7
RW
6274 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))
6275 (patches
6276 (list (origin
6277 (method url-fetch)
6278 ;; This has already been merged, but there is no new
6279 ;; release including this patch. It fixes problems
6280 ;; with axis rotation that would lead to test
6281 ;; failures.
6282 (uri "https://patch-diff.githubusercontent.com/raw/mwaskom/seaborn/pull/1716.diff")
6283 (sha256
6284 (base32
6285 "1lm870z316n9ivsyr86hpk1gxaraw0mrjvq42lqsm0znhjdp9q9w"))
6286 (file-name "seaborn-0.9.0-axis-rotation.patch"))))))
44d10b1f
RW
6287 (build-system python-build-system)
6288 (arguments
6289 `(#:phases
6290 (modify-phases %standard-phases
6291 (add-before 'check 'start-xserver
6292 (lambda* (#:key inputs #:allow-other-keys)
6293 (let ((xorg-server (assoc-ref inputs "xorg-server")))
6294 ;; There must be a running X server and make check doesn't
6295 ;; start one. Therefore we must do it.
6296 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
6297 (setenv "DISPLAY" ":1")
6298 #t)))
a1322765
RW
6299 (add-after 'unpack 'fix-tests
6300 (lambda _
6301 ;; test_cbar_ticks fails probably because of matplotlib's
6302 ;; expectation of using an older version of FreeType.
6303 (delete-file "seaborn/tests/test_matrix.py")
6304 #t))
44d10b1f
RW
6305 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
6306 (propagated-inputs
6307 `(("python-pandas" ,python-pandas)
6308 ("python-matplotlib" ,python-matplotlib)
6309 ("python-numpy" ,python-numpy)
6310 ("python-scipy" ,python-scipy)))
6311 (native-inputs
6312 `(("python-pytest" ,python-pytest)
ff337525 6313 ("xorg-server" ,xorg-server-for-tests)))
44d10b1f
RW
6314 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
6315 (synopsis "Statistical data visualization")
6316 (description
6317 "Seaborn is a library for making attractive and informative statistical
6318graphics in Python. It is built on top of matplotlib and tightly integrated
6319with the PyData stack, including support for numpy and pandas data structures
6320and statistical routines from scipy and statsmodels.")
6321 (license license:bsd-3)))
6322
6323(define-public python2-seaborn
6324 (package-with-python2 python-seaborn))
6325
6326(define-public python-mpmath
6327 (package
6328 (name "python-mpmath")
6329 (version "0.19")
6330 (source (origin
6331 (method url-fetch)
6332 (uri (string-append "http://mpmath.org/files/mpmath-"
6333 version ".tar.gz"))
6334 (sha256
6335 (base32
6336 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
6337 (build-system python-build-system)
6338 (arguments
6339 '(#:phases
6340 (modify-phases %standard-phases
6341 (replace 'check
6342 (lambda _
5d7a6f1c 6343 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
44d10b1f
RW
6344 (home-page "http://mpmath.org")
6345 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6346 (description
6347 "@code{mpmath} can be used as an arbitrary-precision substitute for
6348Python's float/complex types and math/cmath modules, but also does much
6349more advanced mathematics.")
6350 (license license:bsd-3)))
6351
6352(define-public python2-mpmath
6353 (package-with-python2 python-mpmath))
6354
6355(define-public python-bigfloat
6356 (package
6357 (name "python-bigfloat")
6358 (version "0.3.0")
6359 (source
6360 (origin
6361 (method url-fetch)
6362 (uri (pypi-uri "bigfloat" version))
6363 (sha256
6364 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
6365 (build-system python-build-system)
6366 (inputs
6367 `(("mpfr" ,mpfr)))
6368 (home-page "https://github.com/mdickinson/bigfloat")
6369 (synopsis "Arbitrary precision floating-point arithmetic for Python")
6370 (description
e36de31b 6371 "This package provides a Python interface to the MPFR library for
44d10b1f
RW
6372multiprecision arithmetic.")
6373 (license license:lgpl3+)))
6374
6375(define-public python2-bigfloat
6376 (package-with-python2 python-bigfloat))
6377
6378(define-public python-sympy
6379 (package
6380 (name "python-sympy")
6381 (version "1.1.1")
6382 (source
6383 (origin
6384 (method url-fetch)
6385 (uri (string-append
6386 "https://github.com/sympy/sympy/releases/download/sympy-"
6387 version "/sympy-" version ".tar.gz"))
6388 (sha256
6389 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
6390 (build-system python-build-system)
6391 (arguments
6392 `(#:phases
6393 (modify-phases %standard-phases
6394 ;; Run the core tests after installation. By default it would run
6395 ;; *all* tests, which take a very long time to complete and are known
6396 ;; to be flaky.
6397 (delete 'check)
6398 (add-after 'install 'check
6399 (lambda* (#:key outputs #:allow-other-keys)
6400 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
6401 #t)))))
6402 (propagated-inputs
6403 `(("python-mpmath" ,python-mpmath)))
6404 (home-page "http://www.sympy.org/")
6405 (synopsis "Python library for symbolic mathematics")
6406 (description
6407 "SymPy is a Python library for symbolic mathematics. It aims to become a
6408full-featured computer algebra system (CAS) while keeping the code as simple
6409as possible in order to be comprehensible and easily extensible.")
6410 (license license:bsd-3)))
6411
6412(define-public python2-sympy
6413 (package
6414 (inherit (package-with-python2 python-sympy))
6415 (arguments
6416 `(#:phases
6417 (modify-phases %standard-phases
6418 ;; Run the core tests after installation. By default it would run
6419 ;; *all* tests, which take a very long time to complete and are known
6420 ;; to be flaky.
6421 (delete 'check)
6422 (add-after 'install 'check
6423 (lambda* (#:key outputs #:allow-other-keys)
6424 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
6425 #t)))))))
6426
6427(define-public python-q
6428 (package
6429 (name "python-q")
6430 (version "2.6")
6431 (source
6432 (origin
6433 (method url-fetch)
6434 (uri (pypi-uri "q" version))
6435 (sha256
6436 (base32
6437 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6438 (build-system python-build-system)
6439 (home-page "https://github.com/zestyping/q")
6440 (synopsis "Quick-and-dirty debugging output for tired programmers")
6441 (description
6442 "q is a Python module for \"print\" style of debugging Python code. It
6443provides convenient short API for print out of values, tracebacks, and
6444falling into the Python interpreter.")
6445 (license license:asl2.0)))
6446
6447(define-public python2-q
6448 (package-with-python2 python-q))
6449
6450(define-public python2-xlib
6451 (package
6452 (name "python2-xlib")
6453 (version "0.14")
6454 (source (origin
6455 (method url-fetch)
6456 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6457 "/" version "/"
6458 "python-xlib-" version ".tar.gz"))
6459 (sha256
6460 (base32
6461 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6462 (build-system python-build-system)
6463 (arguments
6464 `(#:python ,python-2 ;Python 2 only
6465 #:tests? #f)) ;no tests
6466 (home-page "http://python-xlib.sourceforge.net/")
6467 (synopsis "Python X11 client library")
6468 (description
6469 "The Python X Library is intended to be a fully functional X client
6470library for Python programs. It is useful to implement low-level X clients.
6471It is written entirely in Python.")
6472 (license license:gpl2+)))
6473
6474(define-public python-singledispatch
6475 (package
6476 (name "python-singledispatch")
6477 (version "3.4.0.3")
6478 (source
6479 (origin
6480 (method url-fetch)
6481 (uri (pypi-uri "singledispatch" version))
6482 (sha256
6483 (base32
6484 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6485 (build-system python-build-system)
6486 (native-inputs
6487 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6488 (home-page
6489 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
6490 (synopsis "Backport of singledispatch feature from Python 3.4")
6491 (description
6492 "This library brings functools.singledispatch from Python 3.4 to Python
64932.6-3.3.")
6494 (license license:expat)))
6495
6496(define-public python2-singledispatch
6497 (package-with-python2 python-singledispatch))
6498
6499;; the python- version can be removed with python-3.5
6500(define-public python-backports-abc
6501 (package
6502 (name "python-backports-abc")
6503 (version "0.5")
6504 (source
6505 (origin
6506 (method url-fetch)
6507 (uri (pypi-uri "backports_abc" version))
6508 (sha256
6509 (base32
6510 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6511 (build-system python-build-system)
6512 (home-page "https://github.com/cython/backports_abc")
6513 (synopsis "Backport of additions to the 'collections.abc' module")
6514 (description
6515 "Python-backports-abc provides a backport of additions to the
36a4366d 6516@code{collections.abc} module in Python-3.5.")
44d10b1f
RW
6517 (license license:psfl)))
6518
6519(define-public python2-backports-abc
6520 (package-with-python2 python-backports-abc))
6521
6522(define-public python-backports-csv
6523 (package
6524 (name "python-backports-csv")
6525 (version "1.0.5")
6526 (source
6527 (origin
6528 (method url-fetch)
6529 (uri (pypi-uri "backports.csv" version))
6530 (sha256
6531 (base32
6532 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
6533 (build-system python-build-system)
6534 (home-page "https://github.com/ryanhiebert/backports.csv")
6535 (synopsis "Backport of Python 3's csv module for Python 2")
6536 (description
6537 "Provides a backport of Python 3's @code{csv} module for parsing
6538comma separated values. The API of the @code{csv} module in Python 2
6539is drastically different from the @code{csv} module in Python 3.
6540This is due, for the most part, to the difference between str in
6541Python 2 and Python 3.")
6542 (license license:psfl)))
6543
6544(define-public python2-backports-csv
6545 (package-with-python2 python-backports-csv))
6546
6547(define-public python2-backports-shutil-get-terminal-size
6548 (package
6549 (name "python2-backports-shutil-get-terminal-size")
6550 (version "1.0.0")
6551 (source
6552 (origin
6553 (method url-fetch)
6554 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6555 (sha256
6556 (base32
6557 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6558 (build-system python-build-system)
6559 (arguments
6560 `(#:python ,python-2
6561 #:phases
6562 (modify-phases %standard-phases
6563 (replace 'check
6564 (lambda _
4a4a7d9a 6565 (invoke "py.test" "-v"))))))
44d10b1f
RW
6566 (native-inputs
6567 `(("python2-pytest" ,python2-pytest)))
6568 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6569 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6570 (description
6571 "This package provides a backport of the @code{get_terminal_size
6572function} from Python 3.3's @code{shutil}.
6573Unlike the original version it is written in pure Python rather than C,
6574so it might be a tiny bit slower.")
6575 (license license:expat)))
6576
6577(define-public python-waf
6578 (package
6579 (name "python-waf")
6580 (version "2.0.11")
6581 (source (origin
6582 (method url-fetch)
6583 (uri (string-append "https://waf.io/"
6584 "waf-" version ".tar.bz2"))
6585 (sha256
6586 (base32
6587 "13zrniwkmfqgsgzi9v5m1367fppp9yzrz6z2ny6hy8dmpb8mj4z4"))))
6588 (build-system python-build-system)
6589 (arguments
6590 '(#:phases
6591 (modify-phases %standard-phases
6592 (replace 'build
6593 (lambda _
6594 (invoke "python" "waf-light" "configure" "build")))
6595 (replace 'check
6596 (lambda _
6597 (invoke "python" "waf" "--version")))
6598 (replace 'install
6599 (lambda* (#:key outputs #:allow-other-keys)
6600 (let ((out (assoc-ref outputs "out")))
6601 (install-file "waf" (string-append out "/bin")))
6602 #t))
6603 ;; waf breaks when it is wrapped.
6604 (delete 'wrap))))
6605 (home-page "https://waf.io/")
6606 (synopsis "Python-based build system")
6607 (description
6608 "Waf is a Python-based framework for configuring, compiling and installing
6609applications.")
6610 (license license:bsd-3)))
6611
6612(define-public python2-waf
6613 (package-with-python2 python-waf))
6614
6615(define-public python-pyzmq
6616 (package
6617 (name "python-pyzmq")
6618 (version "17.1.2")
6619 (source
6620 (origin
6621 (method url-fetch)
6622 (uri (pypi-uri "pyzmq" version))
6623 (sha256
6624 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
6625 (build-system python-build-system)
6626 (arguments
6627 `(#:configure-flags
6628 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6629 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6630 ;; --inplace' for 'python setup.py test' to work.
6631 #:tests? #f))
6632 (inputs
6633 `(("zeromq" ,zeromq)))
6634 (native-inputs
6635 `(("pkg-config" ,pkg-config)
6636 ("python-nose" ,python-nose)))
6637 (home-page "https://github.com/zeromq/pyzmq")
6638 (synopsis "Python bindings for 0MQ")
6639 (description
6640 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6641 (license license:bsd-4)))
6642
6643(define-public python2-pyzmq
6644 (package-with-python2 python-pyzmq))
6645
6646(define-public python-pep8
6647 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
6648 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
6649 ;; some dependents' test suites, and nothing more.
6650 (package
6651 (name "python-pep8")
6652 (version "1.7.0")
6653 (source
6654 (origin
6655 (method url-fetch)
6656 (uri (pypi-uri "pep8" version))
6657 (sha256
6658 (base32
2be878d8
CB
6659 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
6660 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
44d10b1f
RW
6661 (build-system python-build-system)
6662 (home-page "https://pep8.readthedocs.org/")
6663 (synopsis "Python style guide checker")
6664 (description
6665 "This tools checks Python code against some of the style conventions in
6666PEP 8.")
6667 (license license:expat)))
6668
6669(define-public python2-pep8
6670 (package-with-python2 python-pep8))
6671
6672(define-public python-pyflakes
6673 (package
6674 (name "python-pyflakes")
d0cba11b 6675 (version "2.1.1")
44d10b1f
RW
6676 (source
6677 (origin
6678 (method url-fetch)
6679 (uri (pypi-uri "pyflakes" version))
6680 (sha256
6681 (base32
d0cba11b 6682 "18pq95a1xj2dgdd0m85gyfsn40jajj4xc3lp8wfv7igqhrc86xnr"))))
44d10b1f
RW
6683 (build-system python-build-system)
6684 (home-page
6685 "https://github.com/pyflakes/pyflakes")
6686 (synopsis "Passive checker of Python programs")
6687 (description
6688 "Pyflakes statically checks Python source code for common errors.")
6689 (license license:expat)))
6690
6691(define-public python2-pyflakes
6692 (package-with-python2 python-pyflakes))
6693
6694(define-public python-mccabe
6695 (package
6696 (name "python-mccabe")
6697 (version "0.6.1")
6698 (source
6699 (origin
6700 (method url-fetch)
6701 (uri (pypi-uri "mccabe" version))
6702 (sha256
6703 (base32
6704 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
6705 (build-system python-build-system)
6706 (native-inputs
6707 `(("python-pytest" ,python-pytest-bootstrap)
6708 ("python-pytest-runner" ,python-pytest-runner)))
6709 (home-page "https://github.com/flintwork/mccabe")
6710 (synopsis "McCabe checker, plugin for flake8")
6711 (description
6712 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6713complexity of Python source code.")
6714 (license license:expat)))
6715
6716(define-public python2-mccabe
6717 (package-with-python2 python-mccabe))
6718
6719(define-public python-mccabe-0.2.1
6720 (package (inherit python-mccabe)
6721 (version "0.2.1")
6722 (source
6723 (origin
6724 (method url-fetch)
6725 (uri (pypi-uri "mccabe" version))
6726 (sha256
6727 (base32
6728 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6729
6730(define-public python2-mccabe-0.2.1
6731 (package-with-python2 python-mccabe-0.2.1))
6732
6733;; Flake8 2.4.1 requires an older version of pep8.
6734;; This should be removed ASAP.
6735(define-public python-pep8-1.5.7
6736 (package (inherit python-pep8)
6737 (version "1.5.7")
6738 (source
f3576970
RW
6739 (origin
6740 (method url-fetch)
6741 (uri (pypi-uri "pep8" version))
6742 (sha256
6743 (base32
6744 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
44d10b1f
RW
6745 (arguments
6746 ;; XXX Tests not compatible with Python 3.5.
6747 '(#:tests? #f))))
6748
6749(define-public python2-pep8-1.5.7
6750 (package-with-python2 python-pep8-1.5.7))
6751
6752;; Flake8 2.4.1 requires an older version of pyflakes.
6753;; This should be removed ASAP.
6754(define-public python-pyflakes-0.8.1
6755 (package (inherit python-pyflakes)
6756 (version "0.8.1")
6757 (source
8c4dffb5
RW
6758 (origin
6759 (method url-fetch)
6760 (uri (pypi-uri "pyflakes" version))
6761 (sha256
6762 (base32
6763 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
44d10b1f
RW
6764 (arguments
6765 ;; XXX Tests not compatible with Python 3.5.
6766 '(#:tests? #f))))
6767
6768(define-public python2-pyflakes-0.8.1
6769 (package-with-python2 python-pyflakes-0.8.1))
6770
ac63cf0a 6771(define-public python-flake8
44d10b1f
RW
6772 (package
6773 (name "python-flake8")
beaff4a8 6774 (version "3.7.7")
ac63cf0a
MB
6775 (source (origin
6776 (method url-fetch)
6777 (uri (pypi-uri "flake8" version))
6778 (sha256
6779 (base32
beaff4a8 6780 "0qg6zggqigrd4k3gv88shd1a27d0cwgfql8vfiq2c7rl7w3rd6c5"))))
44d10b1f
RW
6781 (build-system python-build-system)
6782 (arguments
6783 `(#:phases
6784 (modify-phases %standard-phases
44d10b1f
RW
6785 (delete 'check)
6786 (add-after 'install 'check
6787 (lambda* (#:key inputs outputs #:allow-other-keys)
6788 (add-installed-pythonpath inputs outputs)
6789 (invoke "pytest" "-v")
6790 #t)))))
6791 (propagated-inputs
6792 `(("python-pycodestyle" ,python-pycodestyle)
beaff4a8 6793 ("python-entrypoints" ,python-entrypoints)
44d10b1f
RW
6794 ("python-pyflakes" ,python-pyflakes)
6795 ("python-mccabe" ,python-mccabe)))
6796 (native-inputs
6797 `(("python-mock" ,python-mock)
6798 ("python-pytest" ,python-pytest-bootstrap)
6799 ("python-pytest-runner" ,python-pytest-runner)))
6800 (home-page "https://gitlab.com/pycqa/flake8")
6801 (synopsis
6802 "The modular source code checker: pep8, pyflakes and co")
6803 (description
6804 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
ac63cf0a 6805 (properties `((python2-variant . ,(delay python2-flake8))))
44d10b1f
RW
6806 (license license:expat)))
6807
ac63cf0a
MB
6808(define-public python2-flake8
6809 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
44d10b1f
RW
6810 (package (inherit base)
6811 (propagated-inputs
6812 `(("python2-configparser" ,python2-configparser)
6813 ("python2-enum34" ,python2-enum34)
beaff4a8 6814 ("python2-typing" ,python2-typing)
44d10b1f
RW
6815 ,@(package-propagated-inputs base))))))
6816
44d10b1f
RW
6817;; python-hacking requires flake8 <2.6.0.
6818(define-public python-flake8-2.5
6819 (package
6820 (inherit python-flake8)
6821 (version "2.5.5")
6822 (source (origin
6823 (method url-fetch)
6824 (uri (pypi-uri "flake8" version))
6825 (sha256
6826 (base32
6827 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
6828 (propagated-inputs
6829 `(("python-pep8" ,python-pep8)
6830 ,@(package-propagated-inputs python-flake8)))
6831 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
6832
6833(define-public python2-flake8-2.5
6834 (package
6835 (inherit python2-flake8)
6836 (version (package-version python-flake8-2.5))
6837 (source (origin
6838 (inherit (package-source python-flake8-2.5))))
6839 (propagated-inputs
6840 `(("python2-pep8" ,python2-pep8)
6841 ,@(package-propagated-inputs python2-flake8)))))
6842
6843(define-public python-flake8-polyfill
6844 (package
6845 (name "python-flake8-polyfill")
6846 (version "1.0.2")
6847 (source
6848 (origin
6849 (method url-fetch)
6850 (uri (pypi-uri "flake8-polyfill" version))
6851 (sha256
6852 (base32
6853 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
6854 (build-system python-build-system)
6855 (arguments
6856 '(#:phases
6857 (modify-phases %standard-phases
6858 (replace 'check
6859 (lambda _
40a7153d
MB
6860 ;; Be compatible with Pytest 4:
6861 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
6862 (substitute* "setup.cfg"
6863 (("\\[pytest\\]")
6864 "[tool:pytest]"))
6865
44d10b1f
RW
6866 (setenv "PYTHONPATH"
6867 (string-append (getcwd) "/build/lib:"
6868 (getenv "PYTHONPATH")))
4f0a0894 6869 (invoke "py.test" "-v"))))))
44d10b1f
RW
6870 (native-inputs
6871 `(("python-flake8" ,python-flake8)
6872 ("python-mock" ,python-mock)
6873 ("python-pep8" ,python-pep8)
6874 ("python-pycodestyle" ,python-pycodestyle)
6875 ("python-pytest" ,python-pytest)))
6876 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6877 (synopsis "Polyfill package for Flake8 plugins")
6878 (description
6879 "This package that provides some compatibility helpers for Flake8
6880plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6881 (license license:expat)))
6882
6883(define-public python2-flake8-polyfill
6884 (package-with-python2 python-flake8-polyfill))
6885
6886(define-public python-mistune
6887 (package
6888 (name "python-mistune")
6889 (version "0.8.4")
6890 (source
6891 (origin
6892 (method url-fetch)
6893 (uri (pypi-uri "mistune" version))
6894 (sha256
6895 (base32
6896 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
6897 (build-system python-build-system)
6898 (native-inputs
6899 `(("python-nose" ,python-nose)
6900 ("python-cython" ,python-cython)))
6901 (home-page "https://github.com/lepture/mistune")
6902 (synopsis "Markdown parser in pure Python")
6903 (description "This package provides a fast markdown parser in pure
6904Python.")
6905 (license license:bsd-3)))
6906
6907(define-public python2-mistune
6908 (package-with-python2 python-mistune))
6909
6910(define-public python-markdown
6911 (package
6912 (name "python-markdown")
ceb1936a 6913 (version "3.1.1")
44d10b1f
RW
6914 (source
6915 (origin
6916 (method url-fetch)
6917 (uri (pypi-uri "Markdown" version))
6918 (sha256
6919 (base32
ceb1936a 6920 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f"))))
44d10b1f
RW
6921 (build-system python-build-system)
6922 (native-inputs
6923 `(("python-nose" ,python-nose)
6924 ("python-pyyaml" ,python-pyyaml)))
6925 (home-page "https://python-markdown.github.io/")
6926 (synopsis "Python implementation of Markdown")
6927 (description
6928 "This package provides a Python implementation of John Gruber's
6929Markdown. The library features international input, various Markdown
6930extensions, and several HTML output formats. A command line wrapper
6931markdown_py is also provided to convert Markdown files to HTML.")
6932 (license license:bsd-3)))
6933
6934(define-public python2-markdown
6935 (package-with-python2 python-markdown))
6936
6937(define-public python-ptyprocess
6938 (package
6939 (name "python-ptyprocess")
6940 (version "0.5.2")
6941 (source
6942 (origin
6943 (method url-fetch)
6944 (uri (pypi-uri "ptyprocess" version))
6945 (sha256
6946 (base32
6947 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
6948 (build-system python-build-system)
6949 (native-inputs
6950 `(("python-nose" ,python-nose)))
6951 (arguments
6952 `(#:phases
6953 (modify-phases %standard-phases
6954 (replace 'check
7904d6fa 6955 (lambda _ (invoke "nosetests"))))))
44d10b1f
RW
6956 (home-page "https://github.com/pexpect/ptyprocess")
6957 (synopsis "Run a subprocess in a pseudo terminal")
6958 (description
6959 "This package provides a Python library used to launch a subprocess in a
6960pseudo terminal (pty), and interact with both the process and its pty.")
6961 (license license:isc)))
6962
6963(define-public python2-ptyprocess
6964 (package-with-python2 python-ptyprocess))
6965
6966(define-public python-cram
6967 (package
6968 (name "python-cram")
6969 (version "0.7")
6970 (home-page "https://bitheap.org/cram/")
6971 (source (origin
6972 (method url-fetch)
6973 (uri (list (string-append home-page "cram-"
6974 version ".tar.gz")
6975 (pypi-uri "cram" version)))
6976 (sha256
6977 (base32
6978 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6979 (arguments
6980 '(#:phases
6981 (modify-phases %standard-phases
6982 (add-after 'unpack 'patch-source
6983 (lambda _
6984 (substitute* (find-files "cram" ".*\\.py$")
6985 ;; Replace default shell path.
6986 (("/bin/sh") (which "sh")))
6987 (substitute* (find-files "tests" ".*\\.t$")
6988 (("md5") "md5sum")
6989 (("/bin/bash") (which "bash"))
6990 (("/bin/sh") (which "sh")))
6991 (substitute* "cram/_test.py"
6992 ;; This hack works around a bug triggered by substituting
6993 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6994 ;; "cram -h", which breaks the output at 80 characters. This
6995 ;; causes the line showing the default shell to break into two
6996 ;; lines, but the test expects a single line...
6997 (("env\\['COLUMNS'\\] = '80'")
6998 "env['COLUMNS'] = '160'"))
ff1e80d7
MB
6999
7000 (substitute* "Makefile"
7001 ;; Recent versions of python-coverage have caused the test
7002 ;; coverage to decrease (as of version 0.7). Allow that.
7003 (("--fail-under=100")
7004 "--fail-under=90"))
7005
44d10b1f 7006 #t))
ff1e80d7 7007 (replace 'check
44d10b1f 7008 ;; The test phase uses the built library and executable.
44d10b1f
RW
7009 (lambda* (#:key inputs outputs #:allow-other-keys)
7010 (add-installed-pythonpath inputs outputs)
7011 (setenv "PATH" (string-append (getenv "PATH") ":"
7012 (assoc-ref outputs "out") "/bin"))
2d7db192 7013 (invoke "make" "test"))))))
44d10b1f
RW
7014 (build-system python-build-system)
7015 (native-inputs
7016 `(("python-coverage" ,python-coverage)
7017 ("which" ,which)))
7018 (synopsis "Simple testing framework for command line applications")
7019 (description
7020 "Cram is a functional testing framework for command line applications.
7021Cram tests look like snippets of interactive shell sessions. Cram runs each
7022command and compares the command output in the test with the command’s actual
7023output.")
7024 (license license:gpl2+)))
7025
7026(define-public python2-cram
7027 (package-with-python2 python-cram))
7028
7029(define-public python-straight-plugin
7030 (package
7031 (name "python-straight-plugin")
7032 (version "1.4.1")
7033 (source
7034 (origin
7035 (method url-fetch)
7036 (uri (pypi-uri "straight.plugin" version))
7037 (sha256
7038 (base32
7039 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
7040 (build-system python-build-system)
7041 (home-page "https://github.com/ironfroggy/straight.plugin")
7042 (synopsis "Simple namespaced plugin facility")
7043 (description "Straight Plugin provides a type of plugin you can create from
7044almost any existing Python modules, and an easy way for outside developers to
7045add functionality and customization to your projects with their own plugins.")
7046 (license license:expat)))
7047
7048(define-public python2-straight-plugin
7049 (package-with-python2 python-straight-plugin))
7050
7051(define-public python-fonttools
7052 (package
7053 (name "python-fonttools")
1a4bb420 7054 (version "3.38.0")
44d10b1f
RW
7055 (source (origin
7056 (method url-fetch)
7057 (uri (pypi-uri "fonttools" version ".zip"))
7058 (sha256
7059 (base32
1a4bb420 7060 "12ripk3s7skgxr1bs9r8n13r94ym3s8iir7ivfixls9fa4dabmlh"))))
44d10b1f
RW
7061 (build-system python-build-system)
7062 (native-inputs
7063 `(("unzip" ,unzip)
7064 ("python-pytest" ,python-pytest)
7065 ("python-pytest-runner" ,python-pytest-runner)))
7066 (home-page "https://github.com/behdad/fonttools")
7067 (synopsis "Tools to manipulate font files")
7068 (description
7069 "FontTools/TTX is a library to manipulate font files from Python. It
7070supports reading and writing of TrueType/OpenType fonts, reading and writing
7071of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
7072also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
7073from an XML-based format.")
7074 (license license:expat)))
7075
7076(define-public python2-fonttools
7077 (package-with-python2 python-fonttools))
7078
7079(define-public python-ly
7080 (package
7081 (name "python-ly")
7082 (version "0.9.5")
7083 (source
7084 (origin
7085 (method url-fetch)
7086 (uri (pypi-uri name version))
7087 (sha256
7088 (base32
7089 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
7090 (build-system python-build-system)
7091 (arguments
7092 ;; FIXME: Some tests need network access.
7093 '(#:tests? #f))
7094 (synopsis "Tool and library for manipulating LilyPond files")
7095 (description "This package provides a Python library to parse, manipulate
7096or create documents in LilyPond format. A command line program ly is also
7097provided that can be used to do various manipulations with LilyPond files.")
7098 (home-page "https://pypi.python.org/pypi/python-ly")
7099 (license license:gpl2+)))
7100
7101(define-public python-appdirs
7102 (package
7103 (name "python-appdirs")
7104 (version "1.4.3")
7105 (source
7106 (origin
7107 (method url-fetch)
7108 (uri (pypi-uri "appdirs" version))
7109 (sha256
7110 (base32
7111 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
7112 (build-system python-build-system)
7113 (home-page "https://github.com/ActiveState/appdirs")
7114 (synopsis
7115 "Determine platform-specific dirs, e.g. a \"user data dir\"")
7116 (description
7117 "This module provides a portable way of finding out where user data
7118should be stored on various operating systems.")
7119 (license license:expat)))
7120
7121(define-public python2-appdirs
7122 (package-with-python2 python-appdirs))
7123
7124(define-public python-llfuse
7125 (package
7126 (name "python-llfuse")
7127 (version "1.3.5")
7128 (source (origin
7129 (method url-fetch)
7130 (uri (pypi-uri "llfuse" version ".tar.bz2"))
7131 (sha256
7132 (base32
7133 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
7134 (build-system python-build-system)
7135 (inputs
7136 `(("fuse" ,fuse)
7137 ("attr" ,attr)))
7138 (native-inputs
7139 `(("pkg-config" ,pkg-config)))
7140 (synopsis "Python bindings for FUSE")
7141 (description
7142 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
7143 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
7144 (license license:lgpl2.0+)
7145 (properties `((python2-variant . ,(delay python2-llfuse))))))
7146
7147(define-public python2-llfuse
7148 (package (inherit (package-with-python2
7149 (strip-python2-variant python-llfuse)))
7150 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
7151
7152;; For attic-0.16
7153(define-public python-llfuse-0.41
7154 (package (inherit python-llfuse)
7155 (version "0.41.1")
7156 (source (origin
7157 (method url-fetch)
7158 (uri (string-append
7159 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
7160 "llfuse-" version ".tar.bz2"))
7161 (sha256
7162 (base32
7163 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
7164 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
7165 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
7166 (license (list license:expat license:lgpl2.0+))))
7167
7168(define-public python-msgpack
7169 (package
7170 (name "python-msgpack")
7171 (version "0.5.6")
7172 (source (origin
7173 (method url-fetch)
7174 (uri (pypi-uri "msgpack" version))
7175 (sha256
7176 (base32
7177 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
7178 (build-system python-build-system)
7179 (arguments
7180 `(#:modules ((guix build utils)
7181 (guix build python-build-system)
7182 (ice-9 ftw)
7183 (srfi srfi-1)
7184 (srfi srfi-26))
7185 #:phases
7186 (modify-phases %standard-phases
7187 (replace 'check
7188 (lambda _
7189 (let ((cwd (getcwd)))
7190 (setenv "PYTHONPATH"
7191 (string-append cwd "/build/"
7192 (find (cut string-prefix? "lib" <>)
7193 (scandir (string-append cwd "/build")))
7194 ":"
7195 (getenv "PYTHONPATH")))
7196 (invoke "pytest" "-v" "test")))))))
7197 (native-inputs
7198 `(("python-pytest" ,python-pytest)))
7199 (synopsis "MessagePack (de)serializer")
7200 (description "MessagePack is a fast, compact binary serialization format,
7201suitable for similar data to JSON. This package provides CPython bindings for
7202reading and writing MessagePack data.")
7203 (home-page "https://pypi.python.org/pypi/msgpack/")
7204 (license license:asl2.0)))
7205
7206;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
7207;; release 0.5. Some packages like borg still call it by the old name for now.
7208;; <https://bugs.gnu.org/30662>
7209(define-public python-msgpack-transitional
7210 (package
7211 (inherit python-msgpack)
7212 (name "python-msgpack-transitional")
7213 (arguments
7214 (substitute-keyword-arguments (package-arguments python-msgpack)
7215 ((#:phases phases)
7216 `(modify-phases ,phases
7217 (add-after 'unpack 'configure-transitional
7218 (lambda _
7219 ;; Keep using the old name.
7220 (substitute* "setup.py"
7221 (("TRANSITIONAL = False")
7222 "TRANSITIONAL = 1"))
7223 #t))))))))
7224
7225(define-public python2-msgpack
7226 (package-with-python2 python-msgpack))
7227
7228(define-public python-netaddr
7229 (package
7230 (name "python-netaddr")
7231 (version "0.7.19")
7232 (source
7233 (origin
7234 (method url-fetch)
7235 (uri (pypi-uri "netaddr" version))
7236 (sha256
7237 (base32
7238 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
7239 (build-system python-build-system)
7240 (arguments `(#:tests? #f)) ;; No tests.
7241 (home-page "https://github.com/drkjam/netaddr/")
7242 (synopsis "Pythonic manipulation of network addresses")
7243 (description
7244 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
7245and MAC network addresses.")
7246 (license license:bsd-3)))
7247
7248(define-public python2-netaddr
7249 (package-with-python2 python-netaddr))
7250
dd85eca0
AG
7251(define-public python2-pyroute2
7252 (package
7253 (name "python2-pyroute2")
7254 (version "0.5.6")
7255 (source
7256 (origin
7257 (method url-fetch)
7258 (uri (pypi-uri "pyroute2" version))
7259 (sha256
7260 (base32
7261 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
7262 (build-system python-build-system)
7263 (arguments
7264 `(#:python ,python-2)) ;Python 3.x is not supported
7265 (home-page "https://github.com/svinota/pyroute2")
7266 (synopsis "Python netlink library")
7267 (description
7268 "Pyroute2 is a pure Python netlink library with minimal dependencies.
7269Supported netlink families and protocols include:
7270@itemize
7271@item rtnl, network settings - addresses, routes, traffic controls
7272@item nfnetlink - netfilter API: ipset, nftables, ...
7273@item ipq - simplest userspace packet filtering, iptables QUEUE target
7274@item devlink - manage and monitor devlink-enabled hardware
7275@item generic - generic netlink families
7276 @itemize
7277 @item nl80211 - wireless functions API (basic support)
7278 @item taskstats - extended process statistics
7279 @item acpi_events - ACPI events monitoring
7280 @item thermal_events - thermal events monitoring
7281 @item VFS_DQUOT - disk quota events monitoring
7282 @end itemize
7283@end itemize")
7284 (license license:gpl2+)))
7285
44d10b1f
RW
7286(define-public python-wrapt
7287 (package
7288 (name "python-wrapt")
2271a1dc 7289 (version "1.11.2")
44d10b1f 7290 (source
2271a1dc
MB
7291 (origin
7292 (method url-fetch)
7293 (uri (pypi-uri "wrapt" version))
7294 (sha256
7295 (base32
7296 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
44d10b1f
RW
7297 (build-system python-build-system)
7298 (arguments
7299 ;; Tests are not included in the tarball, they are only available in the
7300 ;; git repository.
7301 `(#:tests? #f))
7302 (home-page "https://github.com/GrahamDumpleton/wrapt")
7303 (synopsis "Module for decorators, wrappers and monkey patching")
7304 (description
2271a1dc 7305 "The aim of the wrapt module is to provide a transparent object proxy for
44d10b1f
RW
7306 Python, which can be used as the basis for the construction of function
7307 wrappers and decorator functions.")
7308 (license license:bsd-2)))
7309
7310(define-public python2-wrapt
7311 (package-with-python2 python-wrapt))
7312
7313(define-public python-xlrd
7314 (package
7315 (name "python-xlrd")
3a2b1a3c 7316 (version "1.2.0")
44d10b1f
RW
7317 (source (origin
7318 (method url-fetch)
7319 (uri (pypi-uri "xlrd" version))
7320 (sha256
7321 (base32
3a2b1a3c 7322 "1ci93fda4n67qhdvfl16zasyxrpygzk53hs6m8z0rd4dxrnb6vjl"))))
44d10b1f
RW
7323 (build-system python-build-system)
7324 (arguments
7325 `(#:phases
7326 (modify-phases %standard-phases
3ccdd3a5
MO
7327 ;; Some tests depend on writing a temporary file to the user's home
7328 ;; directory.
3a2b1a3c
GL
7329 (add-after 'unpack 'fix-tests
7330 (lambda _
7331 (delete-file "tests/test_open_workbook.py")
7332 #t)))))
44d10b1f
RW
7333 (home-page "http://www.python-excel.org/")
7334 (synopsis "Library for extracting data from Excel files")
a0909286 7335 (description "This package provides a library to extract data from
44d10b1f
RW
7336spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
7337@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
7338Unicode-aware. It is not intended as an end-user tool.")
7339 (license license:bsd-3)))
7340
7341(define-public python2-xlrd
7342 (package-with-python2 python-xlrd))
7343
7344(define-public python-prettytable
7345 (package
7346 (name "python-prettytable")
7347 (version "0.7.2")
7348 (source
7349 (origin
7350 (method url-fetch)
337c3a1e 7351 (uri (pypi-uri "prettytable" version ".tar.bz2"))
44d10b1f
RW
7352 (sha256
7353 (base32
7354 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7355 (build-system python-build-system)
7356 (home-page "http://code.google.com/p/prettytable/")
7357 (synopsis "Display tabular data in an ASCII table format")
7358 (description
7359 "A library designed to represent tabular data in visually appealing ASCII
7360tables. PrettyTable allows for selection of which columns are to be printed,
7361independent alignment of columns (left or right justified or centred) and
7362printing of sub-tables by specifying a row range.")
7363 (license license:bsd-3)))
7364
7365(define-public python2-prettytable
7366 (package-with-python2 python-prettytable))
7367
7368(define-public python-tables
7369 (package
7370 (name "python-tables")
7371 (version "3.4.4")
7372 (source
7373 (origin
7374 (method url-fetch)
7375 (uri (pypi-uri "tables" version))
7376 (sha256
7377 (base32
7378 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
7379 (modules '((guix build utils)))
7380 (snippet
7381 '(begin
7382 ;; Remove pre-compiled .pyc files from source.
7383 (for-each delete-file-recursively
7384 (find-files "." "__pycache__" #:directories? #t))
7385 (for-each delete-file (find-files "." "\\.pyc$"))
7386 #t))))
7387 (build-system python-build-system)
7388 (arguments
7389 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7390 ;; or "check", so we must override the build and check phases.
7391 #:phases
7392 (modify-phases %standard-phases
7393 (add-after 'unpack 'use-gcc
7394 (lambda _
7395 (substitute* "setup.py"
7396 (("compiler = new_compiler\\(\\)" line)
7397 (string-append line
7398 "\ncompiler.set_executables(compiler='gcc',"
7399 "compiler_so='gcc',"
7400 "linker_exe='gcc',"
7401 "linker_so='gcc -shared')")))
7402 #t))
7403 (replace 'build
7404 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
7405 (invoke "python" "setup.py" "build"
7406 (string-append "--hdf5="
7407 (assoc-ref inputs "hdf5")))))
44d10b1f
RW
7408 (replace 'check
7409 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
7410 (invoke "python" "setup.py" "check"
7411 (string-append "--hdf5="
7412 (assoc-ref inputs "hdf5"))))))))
44d10b1f
RW
7413 (propagated-inputs
7414 `(("python-numexpr" ,python-numexpr)
7415 ("python-numpy" ,python-numpy)))
7416 (native-inputs
7417 `(("python-cython" ,python-cython)
7418 ("pkg-config" ,pkg-config)))
7419 (inputs
7420 `(("hdf5" ,hdf5)
7421 ("bzip2" ,bzip2)
7422 ("zlib" ,zlib)))
7423 (home-page "http://www.pytables.org/")
7424 (synopsis "Hierarchical datasets for Python")
7425 (description "PyTables is a package for managing hierarchical datasets and
7426designed to efficiently cope with extremely large amounts of data.")
7427 (license license:bsd-3)))
7428
7429(define-public python2-tables
7430 (package-with-python2 python-tables))
7431
7432(define-public python-pyasn1
7433 (package
7434 (name "python-pyasn1")
7435 (version "0.4.3")
7436 (source
7437 (origin
7438 (method url-fetch)
7439 (uri (pypi-uri "pyasn1" version))
7440 (sha256
7441 (base32
7442 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
7443 (build-system python-build-system)
7444 (home-page "http://pyasn1.sourceforge.net/")
7445 (synopsis "ASN.1 types and codecs")
7446 (description
7447 "This is an implementation of ASN.1 types and codecs in Python. It is
7448suitable for a wide range of protocols based on the ASN.1 specification.")
7449 (license license:bsd-2)))
7450
7451(define-public python2-pyasn1
7452 (package-with-python2 python-pyasn1))
7453
7454(define-public python-pyasn1-modules
7455 (package
7456 (name "python-pyasn1-modules")
7457 (version "0.2.2")
7458 (source
7459 (origin
7460 (method url-fetch)
7461 (uri (pypi-uri "pyasn1-modules" version))
7462 (sha256
7463 (base32
7464 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
7465 (build-system python-build-system)
7466 (propagated-inputs
7467 `(("python-pyasn1" ,python-pyasn1)))
7468 (home-page "https://sourceforge.net/projects/pyasn1/")
7469 (synopsis "ASN.1 codec implementations")
7470 (description
7471 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7472implementations of ASN.1-based codecs and protocols.")
7473 (license license:bsd-3)))
7474
7475(define-public python2-pyasn1-modules
7476 (package-with-python2 python-pyasn1-modules))
7477
7478(define-public python-ipaddress
7479 (package
7480 (name "python-ipaddress")
7481 (version "1.0.22")
7482 (source (origin
7483 (method url-fetch)
7484 (uri (pypi-uri "ipaddress" version))
7485 (sha256
7486 (base32
7487 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
7488 (build-system python-build-system)
7489 (home-page "https://github.com/phihag/ipaddress")
7490 (synopsis "IP address manipulation library")
7491 (description
7492 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7493 in Python. This library is used to create, poke at, and manipulate IPv4 and
7494 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7495 module to older versions of Python.")
7496 (license license:psfl)))
7497
7498(define-public python2-ipaddress
7499 (package-with-python2 python-ipaddress))
7500
7501(define-public python2-ipaddr
7502 (package
7503 (name "python2-ipaddr")
7504 (version "2.1.11")
7505 (source
7506 (origin
7507 (method url-fetch)
7508 (uri (pypi-uri "ipaddr" version))
7509 (sha256
7510 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7511 (build-system python-build-system)
7512 (arguments
7513 `(#:python ,python-2 ;version 2 only
7514 #:phases
7515 (modify-phases %standard-phases
7516 (replace 'check
40b8c4e3 7517 (lambda _ (invoke "python" "ipaddr_test.py"))))))
44d10b1f
RW
7518 (home-page "https://github.com/google/ipaddr-py")
7519 (synopsis "IP address manipulation library")
7520 (description
7521 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7522IPv6 addresses and networks.
7523
7524For new implementations you may prefer to use the standard module
7525@code{ipaddress}, which was introduced in Python 3.3 and backported to older
7526versions of Python.")
7527 (license license:asl2.0)))
7528
7529(define-public python-idna
7530 (package
7531 (name "python-idna")
e95c9837 7532 (version "2.8")
44d10b1f
RW
7533 (source
7534 (origin
7535 (method url-fetch)
7536 (uri (pypi-uri "idna" version))
7537 (sha256
7538 (base32
e95c9837 7539 "01rlkigdxg17sf9yar1jl8n18ls59367wqh59hnawlyg53vb6my3"))))
44d10b1f
RW
7540 (build-system python-build-system)
7541 (home-page "https://github.com/kjd/idna")
7542 (synopsis "Internationalized domain names in applications")
7543 (description
7544 "This is a library to support the Internationalised Domain Names in
7545Applications (IDNA) protocol as specified in RFC 5891. This version of the
7546protocol is often referred to as “IDNA2008” and can produce different results
7547from the earlier standard from 2003. The library is also intended to act as a
7548suitable drop-in replacement for the “encodings.idna” module that comes with
7549the Python standard library but currently only supports the older 2003
7550specification.")
7551 (license license:bsd-4)))
7552
a76e6a69
JM
7553(define-public python-idna-2.7
7554 (package (inherit python-idna)
7555 (version "2.7")
7556 (source (origin
7557 (method url-fetch)
7558 (uri (pypi-uri "idna" version))
7559 (sha256
7560 (base32
7561 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
7562
7563
44d10b1f
RW
7564(define-public python2-idna
7565 (package-with-python2 python-idna))
7566
7567(define-public python-idna-ssl
7568 (package
7569 (name "python-idna-ssl")
7570 (version "1.0.1")
7571 (source
7572 (origin
7573 (method url-fetch)
7574 (uri (pypi-uri "idna-ssl" version))
7575 (sha256
7576 (base32
7577 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
7578 (build-system python-build-system)
7579 (arguments
7580 `(#:tests? #f)) ;circular dependency with python-aiohttp
7581 (home-page "https://github.com/aio-libs/idna-ssl")
7582 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
7583 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
7584domains support.")
7585 (license license:expat)))
7586
7587(define-public python-pretend
7588 (package
7589 (name "python-pretend")
7590 (version "1.0.9")
7591 (source
7592 (origin
7593 (method url-fetch)
9f1f22ee 7594 (uri (pypi-uri "pretend" version))
44d10b1f
RW
7595 (sha256
7596 (base32
7597 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
7598 (build-system python-build-system)
7599 (home-page "https://github.com/alex/pretend")
7600 (synopsis "Library for stubbing in Python")
7601 (description
7602 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7603technique for writing tests. You may hear the term mixed up with mocks,
7604fakes, or doubles. Basically, a stub is an object that returns pre-canned
7605responses, rather than doing any computation.")
7606 (license license:bsd-3)))
7607
7608(define-public python2-pretend
7609 (package-with-python2 python-pretend))
7610
7611(define-public python-pip
7612 (package
7613 (name "python-pip")
523ba4b1 7614 (version "19.2.1")
44d10b1f
RW
7615 (source
7616 (origin
7617 (method url-fetch)
7618 (uri (pypi-uri "pip" version))
7619 (sha256
7620 (base32
523ba4b1 7621 "100sd12ss4mbdj5lf3wawad29cm573b27765mq098x6xhcj71395"))))
44d10b1f
RW
7622 (build-system python-build-system)
7623 (arguments
7624 '(#:tests? #f)) ; there are no tests in the pypi archive.
7625 (home-page "https://pip.pypa.io/")
7626 (synopsis "Package manager for Python software")
7627 (description
7628 "Pip is a package manager for Python software, that finds packages on the
7629Python Package Index (PyPI).")
7630 (license license:expat)))
7631
7632(define-public python2-pip
7633 (package-with-python2 python-pip))
7634
7635(define-public python-tlsh
7636 (package
7637 (name "python-tlsh")
7638 (version "3.4.5")
7639 (home-page "https://github.com/trendmicro/tlsh")
3e3ff8ad
TGR
7640 (source
7641 (origin
7642 (method git-fetch)
7643 (uri (git-reference
7644 (url "https://github.com/trendmicro/tlsh.git")
7645 (commit (string-append "v" version))))
7646 (file-name (git-file-name name version))
7647 (sha256
7648 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
44d10b1f
RW
7649 (build-system cmake-build-system)
7650 (arguments
7651 '(#:out-of-source? #f
7652 #:phases (modify-phases %standard-phases
7653 (replace
7654 'install
7655 (lambda* (#:key outputs #:allow-other-keys)
7656 ;; Build and install the Python bindings. The underlying
7657 ;; C++ library is apparently not meant to be installed.
7658 (let ((out (assoc-ref outputs "out")))
7659 (with-directory-excursion "py_ext"
7660 (and (system* "python" "setup.py" "build")
7661 (system* "python" "setup.py" "install"
7662 (string-append "--prefix=" out))))))))))
7663 (inputs `(("python" ,python-wrapper))) ;for the bindings
7664 (synopsis "Fuzzy matching library for Python")
7665 (description
7666 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7667Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7668value which can be used for similarity comparisons. Similar objects have
7669similar hash values, which allows for the detection of similar objects by
7670comparing their hash values. The byte stream should have a sufficient amount
7671of complexity; for example, a byte stream of identical bytes will not generate
7672a hash value.")
7673 (license license:asl2.0)))
7674
7675(define-public python2-tlsh
7676 (package
7677 (inherit python-tlsh)
7678 (name "python2-tlsh")
7679 (inputs `(("python" ,python-2)))))
7680
7681(define-public python-termcolor
7682 (package
7683 (name "python-termcolor")
7684 (version "1.1.0")
7685 (source
7686 (origin
7687 (method url-fetch)
7688 (uri (pypi-uri "termcolor" version))
7689 (sha256
7690 (base32
7691 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7692 (build-system python-build-system)
7693 (arguments
7694 ;; There are no tests.
7695 `(#:tests? #f))
7696 (home-page "https://pypi.python.org/pypi/termcolor")
7697 (synopsis "ANSII Color formatting for terminal output")
7698 (description
7699 "This package provides ANSII Color formatting for output in terminals.")
7700 (license license:expat)))
7701
7702(define-public python2-termcolor
7703 (package-with-python2 python-termcolor))
7704
7705(define-public python-libarchive-c
7706 (package
7707 (name "python-libarchive-c")
7708 (version "2.8")
7709 (source (origin
7710 (method url-fetch)
7711 (uri (pypi-uri "libarchive-c" version))
7712 (sha256
7713 (base32
7714 "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06"))))
7715 (build-system python-build-system)
7716 (arguments
7717 '(#:phases (modify-phases %standard-phases
7718 (add-before
7719 'build 'reference-libarchive
7720 (lambda* (#:key inputs #:allow-other-keys)
7721 ;; Retain the absolute file name of libarchive.so.
7722 (let ((libarchive (assoc-ref inputs "libarchive")))
7723 (substitute* "libarchive/ffi.py"
7724 (("find_library\\('archive'\\)")
7725 (string-append "'" libarchive
7726 "/lib/libarchive.so'"))))))
7727 (replace 'check
7728 (lambda _ (invoke "pytest" "-vv"))))))
7729 (native-inputs
7730 `(("python-mock" ,python-mock)
7731 ("python-pytest" ,python-pytest)))
7732 (inputs
7733 `(("libarchive" ,libarchive)))
7734 (home-page "https://github.com/Changaco/python-libarchive-c")
7735 (synopsis "Python interface to libarchive")
7736 (description
7737 "This package provides Python bindings to libarchive, a C library to
7738access possibly compressed archives in many different formats. It uses
7739Python's @code{ctypes} foreign function interface (FFI).")
7740 (license license:lgpl2.0+)))
7741
7742(define-public python2-libarchive-c
7743 (package-with-python2 python-libarchive-c))
7744
7745(define-public python-file
7746 (package
7747 (inherit file)
7748 (name "python-file")
7749 (build-system python-build-system)
7750 (arguments
7751 '(#:tests? #f ;no tests
7752 #:configure-flags '("--single-version-externally-managed" "--root=/")
7753 #:phases (modify-phases %standard-phases
7754 (add-before 'build 'change-directory
7755 (lambda _
7756 (chdir "python")
7757 #t))
7758 (add-before 'build 'set-library-file-name
7759 (lambda* (#:key inputs #:allow-other-keys)
7760 (let ((file (assoc-ref inputs "file")))
7761 (substitute* "magic.py"
7762 (("find_library\\('magic'\\)")
7763 (string-append "'" file "/lib/libmagic.so'")))
7764 #t))))))
7765 (inputs `(("file" ,file)))
528ea990
LC
7766 (native-inputs (if (%current-target-system)
7767 `(("self" ,this-package))
7768 '()))
44d10b1f
RW
7769 (synopsis "Python bindings to the libmagic file type guesser. Note that
7770this module and the python-magic module both provide a \"magic.py\" file;
7771these two modules, which are different and were developed separately, both
7772serve the same purpose: provide Python bindings for libmagic.")))
7773
7774(define-public python2-file
7775 (package-with-python2 python-file))
7776
7777(define-public python-debian
7778 (package
7779 (name "python-debian")
7780 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
9f74bd31 7781 (version "0.1.36")
44d10b1f
RW
7782 (source
7783 (origin
9f74bd31
VC
7784 ;; Use git-fetch, as pypi doesn't include test suite.
7785 (method git-fetch)
7786 (uri (git-reference
7787 (url home-page)
7788 (commit version)))
7789 (file-name (git-file-name name version))
44d10b1f
RW
7790 (sha256
7791 (base32
9f74bd31 7792 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
44d10b1f 7793 (build-system python-build-system)
9f74bd31
VC
7794 (arguments
7795 `(#:phases (modify-phases %standard-phases
7796 (add-after 'unpack 'remove-debian-specific-tests
7797 ;; python-apt, apt and dpkg are not yet available in guix,
7798 ;; and these tests heavily depend on them.
7799 (lambda _
7800 (delete-file "lib/debian/tests/test_deb822.py")
7801 (delete-file "lib/debian/tests/test_debfile.py")
7802 #t)))))
44d10b1f 7803 (propagated-inputs
9f74bd31
VC
7804 `(("python-six" ,python-six)
7805 ("python-chardet" ,python-chardet)))
44d10b1f
RW
7806 (synopsis "Debian package related modules")
7807 (description
7808 ;; XXX: Use @enumerate instead of @itemize to work around
7809 ;; <http://bugs.gnu.org/21772>.
7810 "This package provides Python modules that abstract many formats of
7811Debian-related files, such as:
7812
7813@enumerate
7814@item Debtags information;
7815@item @file{debian/changelog} files;
7816@item packages files, pdiffs;
7817@item control files of single or multiple RFC822-style paragraphs---e.g.
7818 @file{debian/control}, @file{.changes}, @file{.dsc};
7819@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7820 contained files and meta-information.
7821@end enumerate\n")
7822
7823 ;; Modules are either GPLv2+ or GPLv3+.
7824 (license license:gpl3+)))
7825
7826(define-public python2-debian
7827 (package-with-python2 python-debian))
7828
7829(define-public python-nbformat
7830 (package
7831 (name "python-nbformat")
7832 (version "4.4.0")
7833 (source
7834 (origin
7835 (method url-fetch)
7836 (uri (pypi-uri "nbformat" version))
7837 (sha256
7838 (base32
7839 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
7840 (build-system python-build-system)
7841 (arguments `(#:tests? #f)) ; no test target
7842 (propagated-inputs
7843 `(("python-ipython-genutils" ,python-ipython-genutils)
7844 ("python-jsonschema" ,python-jsonschema)
7845 ("python-jupyter-core" ,python-jupyter-core)
7846 ("python-traitlets" ,python-traitlets)))
7847 (home-page "http://jupyter.org")
7848 (synopsis "Jupyter Notebook format")
7849 (description "This package provides the reference implementation of the
7850Jupyter Notebook format and Python APIs for working with notebooks.")
7851 (license license:bsd-3)))
7852
7853(define-public python2-nbformat
7854 (package-with-python2 python-nbformat))
7855
7856(define-public python-bleach
7857 (package
7858 (name "python-bleach")
ff0efc8f 7859 (version "3.1.0")
44d10b1f
RW
7860 (source
7861 (origin
7862 (method url-fetch)
7863 (uri (pypi-uri "bleach" version))
7864 (sha256
7865 (base32
ff0efc8f 7866 "1yhrgrhkln8bd6gn3imj69g1h4xqah9gaz9q26crqr6gmmvpzprz"))))
44d10b1f
RW
7867 (build-system python-build-system)
7868 (propagated-inputs
ff0efc8f 7869 `(("python-webencodings" ,python-webencodings)
44d10b1f
RW
7870 ("python-six" ,python-six)))
7871 (native-inputs
ff0efc8f
MB
7872 `(("python-pytest" ,python-pytest)
7873 ("python-pytest-runner" ,python-pytest-runner-2)))
44d10b1f
RW
7874 (home-page "https://github.com/jsocol/bleach")
7875 (synopsis "Whitelist-based HTML-sanitizing tool")
7876 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7877 (license license:asl2.0)))
7878
7879(define-public python2-bleach
7880 (package-with-python2 python-bleach))
7881
7882(define-public python-entrypoints
7883 (package
7884 (name "python-entrypoints")
a7f1b718 7885 (version "0.3")
44d10b1f
RW
7886 (source
7887 (origin
7888 (method url-fetch)
a7f1b718 7889 (uri (pypi-uri "entrypoints" version))
44d10b1f
RW
7890 (sha256
7891 (base32
a7f1b718 7892 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
44d10b1f
RW
7893 (build-system python-build-system)
7894 ;; The package does not come with a setup.py file, so we have to generate
7895 ;; one ourselves.
7896 (arguments
7897 `(#:tests? #f
7898 #:phases
7899 (modify-phases %standard-phases
7900 (add-after 'unpack 'create-setup.py
7901 (lambda _
7902 (call-with-output-file "setup.py"
7903 (lambda (port)
7904 (format port "\
7905from setuptools import setup
7906setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7907" ,version))))))))
7908 (home-page "https://github.com/takluyver/entrypoints")
7909 (synopsis "Discover and load entry points from installed Python packages")
7910 (description "Entry points are a way for Python packages to advertise
7911objects with some common interface. The most common examples are
7912@code{console_scripts} entry points, which define shell commands by
7913identifying a Python function to run. The @code{entrypoints} module contains
7914functions to find and load entry points.")
7915 (license license:expat)))
7916
7917(define-public python2-entrypoints
7918 (package-with-python2 python-entrypoints))
7919
7920(define-public python-nbconvert
7921 (package
7922 (name "python-nbconvert")
7923 (version "5.0.0b1")
7924 (source
7925 (origin
7926 (method url-fetch)
7927 (uri (pypi-uri "nbconvert" version))
7928 (sha256
7929 (base32
7930 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7931 (build-system python-build-system)
7932 (arguments
7933 `(;; The "bdist_egg" target is disabled by default, causing the installation
7934 ;; to fail.
7935 #:configure-flags (list "bdist_egg")
7936 ;; FIXME: 5 failures, 40 errors.
7937 #:tests? #f))
7938 ;; #:phases
7939 ;; (modify-phases %standard-phases
7940 ;; (replace 'check
7941 ;; (lambda _
7942 ;; (zero? (system* "py.test" "-v")))))
7943 (native-inputs
7944 `(("python-pytest" ,python-pytest)))
7945 (propagated-inputs
7946 `(("python-bleach" ,python-bleach)
7947 ("python-entrypoints" ,python-entrypoints)
7948 ("python-jinja2" ,python-jinja2)
7949 ("python-jupyter-core" ,python-jupyter-core)
7950 ("python-mistune" ,python-mistune)
7951 ("python-nbformat" ,python-nbformat)
7952 ("python-pygments" ,python-pygments)
7953 ("python-traitlets" ,python-traitlets)))
7954 (home-page "http://jupyter.org")
7955 (synopsis "Converting Jupyter Notebooks")
7956 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7957notebooks to various other formats via Jinja templates. It allows you to
7958convert an @code{.ipynb} notebook file into various static formats including:
7959
7960@enumerate
7961@item HTML
7962@item LaTeX
7963@item PDF
7964@item Reveal JS
7965@item Markdown (md)
7966@item ReStructured Text (rst)
7967@item executable script
7968@end enumerate\n")
7969 (license license:bsd-3)))
7970
7971(define-public python2-nbconvert
7972 (package-with-python2 python-nbconvert))
7973
44d10b1f
RW
7974(define-public python-notebook
7975 (package
7976 (name "python-notebook")
7977 (version "5.7.4")
7978 (source (origin
7979 (method url-fetch)
7980 (uri (pypi-uri "notebook" version))
7981 (sha256
7982 (base32
7983 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
7984 (build-system python-build-system)
7985 (arguments
7986 `(#:phases
7987 (modify-phases %standard-phases
7988 (replace 'check
7989 (lambda _
7990 ;; These tests require a browser
7991 (delete-file-recursively "notebook/tests/selenium")
7992 ;; Some tests need HOME
7993 (setenv "HOME" "/tmp")
7994 ;; This file contains "warningfilters", which are not supported
7995 ;; by this version of nose.
7996 (delete-file "setup.cfg")
7997 (with-directory-excursion "/tmp"
7998 (invoke "nosetests" "-v"))
7999 #t)))))
8000 (propagated-inputs
8001 `(("python-jupyter-core" ,python-jupyter-core)
8002 ("python-nbformat" ,python-nbformat)
8003 ("python-nbconvert" ,python-nbconvert)
8004 ("python-prometheus-client" ,python-prometheus-client)
8005 ("python-send2trash" ,python-send2trash)
8006 ("python-terminado" ,python-terminado)))
8007 (native-inputs
8008 `(("python-nose" ,python-nose)
8009 ("python-sphinx" ,python-sphinx)
8010 ("python-requests" ,python-requests)))
8011 (home-page "http://jupyter.org/")
8012 (synopsis "Web-based notebook environment for interactive computing")
8013 (description
8014 "The Jupyter HTML notebook is a web-based notebook environment for
8015interactive computing.")
8016 (properties `((python2-variant . ,(delay python2-notebook))))
8017 (license license:bsd-3)))
8018
8019(define-public python2-notebook
8020 (let ((base (package-with-python2
8021 (strip-python2-variant python-notebook))))
8022 (package (inherit base)
8023 (native-inputs
8024 `(("python2-mock" ,python2-mock)
8025 ,@(package-native-inputs base)))
8026 (arguments
8027 (substitute-keyword-arguments (package-arguments base)
8028 ((#:phases phases)
8029 `(modify-phases ,phases
8030 (add-before 'check 'disable-test-case
8031 ;; The test requires network access to localhost. Curiously it
8032 ;; fails with Python 2 only. Simply make the test-case return
8033 ;; immediately.
8034 (lambda _
8035 (substitute*
8036 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
8037 (("formats = self.nbconvert_api") "return #")))))))))))
8038
8039(define-public python-widgetsnbextension
8040 (package
8041 (name "python-widgetsnbextension")
8042 (version "3.4.2")
8043 (source
8044 (origin
8045 (method url-fetch)
8046 (uri (pypi-uri "widgetsnbextension" version))
8047 (sha256
8048 (base32
8049 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
8050 (build-system python-build-system)
8051 (propagated-inputs
8052 `(("python-ipykernel" ,python-ipykernel)
8053 ("python-notebook" ,python-notebook)))
8054 (native-inputs
8055 `(("python-certifi" ,python-certifi)
8056 ("python-nose" ,python-nose)))
8057 (home-page "https://ipython.org")
8058 (synopsis "IPython HTML widgets for Jupyter")
8059 (description "This package provides interactive HTML widgets for Jupyter
8060notebooks.")
8061 (license license:bsd-3)))
8062
8063(define-public python2-widgetsnbextension
8064 (package-with-python2 python-widgetsnbextension))
8065
8066(define-public python-ipywidgets
8067 (package
8068 (name "python-ipywidgets")
8069 (version "5.2.2")
8070 (source
8071 (origin
8072 (method url-fetch)
8073 (uri (pypi-uri "ipywidgets" version))
8074 (sha256
8075 (base32
8076 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
8077 (build-system python-build-system)
8078 (propagated-inputs
8079 `(("python-ipython" ,python-ipython)
8080 ("python-traitlets" ,python-traitlets)
8081 ("python-widgetsnbextension" ,python-widgetsnbextension)))
8082 (native-inputs
8083 `(("python-nose" ,python-nose)
8084 ("python-pytest" ,python-pytest)))
8085 (home-page "https://ipython.org")
8086 (synopsis "IPython HTML widgets for Jupyter")
8087 (description "Ipywidgets are interactive HTML widgets for Jupyter
8088notebooks and the IPython kernel. Notebooks come alive when interactive
8089widgets are used. Users gain control of their data and can visualize changes
8090in the data.")
8091 (license license:bsd-3)))
8092
8093(define-public python2-ipywidgets
8094 (package-with-python2 python-ipywidgets))
8095
8096(define-public python-jupyter-console
8097 (package
8098 (name "python-jupyter-console")
becb9cbf 8099 (version "6.0.0")
44d10b1f
RW
8100 (source
8101 (origin
8102 (method url-fetch)
8103 (uri (pypi-uri "jupyter_console" version))
8104 (sha256
8105 (base32
becb9cbf 8106 "1xdjw11cppf1fxvwkw2bk13ckkwas3bdah8baingn9296mvfi31h"))))
44d10b1f 8107 (build-system python-build-system)
44d10b1f
RW
8108 (propagated-inputs
8109 `(("python-ipykernel" ,python-ipykernel)
8110 ("python-jupyter-client" ,python-jupyter-client)
becb9cbf 8111 ("python-prompt-toolkit" ,python-prompt-toolkit)
44d10b1f
RW
8112 ("python-pygments" ,python-pygments)))
8113 (native-inputs
8114 `(("python-nose" ,python-nose)))
8115 (home-page "https://jupyter.org")
8116 (synopsis "Jupyter terminal console")
8117 (description "This package provides a terminal-based console frontend for
8118Jupyter kernels. It also allows for console-based interaction with non-Python
8119Jupyter kernels such as IJulia and IRKernel.")
8120 (license license:bsd-3)))
8121
8122(define-public python2-jupyter-console
8e590c81
RW
8123 (package
8124 (name "python2-jupyter-console")
8125 (version "5.2.0")
8126 (source
8127 (origin
8128 (method url-fetch)
8129 (uri (pypi-uri "jupyter_console" version))
8130 (sha256
8131 (base32
8132 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
8133 (build-system python-build-system)
8134 ;; Tests only run in an TTY.
8135 (arguments `(#:tests? #f))
8136 (propagated-inputs
8137 `(("python2-ipykernel" ,python2-ipykernel)
8138 ("python2-jupyter-client" ,python2-jupyter-client)
8139 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
8140 ("python2-pygments" ,python2-pygments)))
8141 (native-inputs
8142 `(("python2-nose" ,python2-nose)))
8143 (home-page "https://jupyter.org")
8144 (synopsis "Jupyter terminal console")
8145 (description "This package provides a terminal-based console frontend for
8146Jupyter kernels. It also allows for console-based interaction with non-Python
8147Jupyter kernels such as IJulia and IRKernel.")
8148 (license license:bsd-3)))
44d10b1f
RW
8149
8150;; The python-ipython and python-jupyter-console require each other. To get
8151;; the functionality in both packages working, strip down the
8152;; python-jupyter-console package when using it as an input to python-ipython.
8153(define python-jupyter-console-minimal
8154 (package
8155 (inherit python-jupyter-console)
8156 (name "python-jupyter-console-minimal")
8157 (arguments
8158 (substitute-keyword-arguments
8159 (package-arguments python-jupyter-console)
8160 ((#:phases phases)
8161 `(modify-phases ,phases
8162 (add-after 'install 'delete-bin
8163 (lambda* (#:key outputs #:allow-other-keys)
8164 ;; Delete the bin files, to avoid conflicts in profiles
8165 ;; where python-ipython and python-jupyter-console are
8166 ;; both present.
8167 (delete-file-recursively
8168 (string-append
8169 (assoc-ref outputs "out") "/bin"))))))))
8170 ;; Remove the python-ipython propagated input, to avoid the cycle
8171 (propagated-inputs
8172 (alist-delete
8173 "python-ipython"
8174 (package-propagated-inputs python-jupyter-console)))))
8175
8176(define-public python-qtconsole
8177 (package
8178 (name "python-qtconsole")
8179 (version "4.4.3")
8180 (source
8181 (origin
8182 (method url-fetch)
8183 (uri (pypi-uri "qtconsole" version))
8184 (sha256
8185 (base32
8186 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
8187 (build-system python-build-system)
8188 (arguments
8189 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
8190 ;; but we only have the LTS version 5.x. This means that there might be
8191 ;; runtime errors, but since this is a dependency of the Jupyter package,
8192 ;; and Jupyter can be used without the qtconsole we can overlook this for
8193 ;; now.
8194 `(#:tests? #f
8195 #:phases
8196 (modify-phases %standard-phases
8197 (add-before 'check 'pre-check
8198 (lambda _
8199 (setenv "QT_QPA_PLATFORM" "offscreen")
8200 #t)))))
8201 (propagated-inputs
8202 `(("python-ipykernel" ,python-ipykernel)
8203 ("python-ipython" ,python-ipython)))
8204 (native-inputs
8205 `(("python-pytest" ,python-pytest)))
8206 (home-page "http://jupyter.org")
8207 (synopsis "Jupyter Qt console")
8208 (description "This package provides a Qt-based console for Jupyter with
8209support for rich media output.")
8210 (license license:bsd-3)))
8211
6ec87223
VC
8212(define-public python-jsbeautifier
8213 (package
8214 (name "python-jsbeautifier")
8215 (version "1.10.2")
8216 (home-page "https://github.com/beautify-web/js-beautify")
8217 (source (origin
8218 (method git-fetch)
8219 (uri (git-reference
8220 (url home-page)
8221 (commit (string-append "v" version))))
8222 (file-name (git-file-name name version))
8223 (sha256
8224 (base32
8225 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
8226 (build-system python-build-system)
8227 (arguments
8228 `(#:phases (modify-phases %standard-phases
8229 (add-after 'unpack 'chdir
8230 (lambda _
8231 ;; The upstream Git repository contains all the code,
8232 ;; but this package only builds the python code.
8233 (chdir "python")
8234 #t))
8235 (add-after 'unpack 'patch-python-six-requirements
8236 (lambda _
8237 (substitute* "python/setup.py"
8238 (("six>=1.12.0")
8239 "six>=1.11.0"))
8240 #t)))))
8241 (propagated-inputs
8242 `(("python-editorconfig" ,python-editorconfig)
8243 ("python-six" ,python-six)))
8244 (native-inputs
8245 `(("python-pytest" ,python-pytest)))
8246 (synopsis "JavaScript unobfuscator and beautifier")
8247 (description "Beautify, unpack or deobfuscate JavaScript, leveraging
8248popular online obfuscators.")
8249 (license license:expat)))
8250
44d10b1f
RW
8251(define-public jupyter
8252 (package
8253 (name "jupyter")
8254 (version "1.0.0")
8255 (source
8256 (origin
8257 (method url-fetch)
8258 (uri (pypi-uri "jupyter" version))
8259 (sha256
8260 (base32
8261 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
8262 (build-system python-build-system)
8263 (arguments '(#:tests? #f)) ; there are none.
8264 (propagated-inputs
8265 `(("python-ipykernel" ,python-ipykernel)
8266 ("python-ipywidgets" ,python-ipywidgets)
8267 ("python-jupyter-console" ,python-jupyter-console)
8268 ("python-nbconvert" ,python-nbconvert)
8269 ("python-notebook" ,python-notebook)
8270 ("python-qtconsole" ,python-qtconsole)))
8271 (native-search-paths
8272 (list (search-path-specification
8273 (variable "JUPYTER_PATH")
8274 (files '("share/jupyter")))))
8275 (home-page "https://jupyter.org")
8276 (synopsis "Web application for interactive documents")
8277 (description
8278 "The Jupyter Notebook is a web application that allows you to create and
8279share documents that contain live code, equations, visualizations and
8280explanatory text. Uses include: data cleaning and transformation, numerical
8281simulation, statistical modeling, machine learning and much more.")
8282 (license license:bsd-3)))
8283
8284(define-public python-chardet
8285 (package
8286 (name "python-chardet")
8287 (version "3.0.4")
8288 (source
8289 (origin
8290 (method url-fetch)
8291 (uri (pypi-uri "chardet" version))
8292 (sha256
8293 (base32
8294 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
8295 (native-inputs
8296 `(("python-hypothesis" ,python-hypothesis)
8297 ("python-pytest" ,python-pytest)
8298 ("python-pytest-runner" ,python-pytest-runner)))
8299 (build-system python-build-system)
3d369407
MB
8300 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
8301 (arguments `(#:tests? #f))
44d10b1f
RW
8302 (home-page "https://github.com/chardet/chardet")
8303 (synopsis "Universal encoding detector for Python 2 and 3")
8304 (description
8305 "This package provides @code{chardet}, a Python module that can
8306automatically detect a wide range of file encodings.")
8307 (license license:lgpl2.1+)))
8308
8309(define-public python2-chardet
8310 (package-with-python2 python-chardet))
8311
8312(define-public python-docopt
8313 (package
8314 (name "python-docopt")
8315 (version "0.6.2")
8316 (source
8317 (origin
8318 (method url-fetch)
8319 ;; The release on PyPI does not include tests.
8320 (uri (string-append
8321 "https://github.com/docopt/docopt/archive/"
8322 version ".tar.gz"))
8323 (file-name (string-append name "-" version ".tar.gz"))
8324 (sha256
8325 (base32
8326 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
8327 (build-system python-build-system)
8328 (native-inputs
8329 `(("python-pytest" ,python-pytest)))
8330 (arguments
8331 `(#:phases
8332 (modify-phases %standard-phases
8333 (replace 'check
8334 (lambda _ (invoke "py.test"))))))
8335 (home-page "http://docopt.org")
8336 (synopsis "Command-line interface description language for Python")
8337 (description "This library allows the user to define a command-line
8338interface from a program's help message rather than specifying it
4ca7207b 8339programmatically with command-line parsers like @code{getopt} and
44d10b1f
RW
8340@code{argparse}.")
8341 (license license:expat)))
8342
8343(define-public python2-docopt
8344 (package-with-python2 python-docopt))
8345
8346(define-public python-pythondialog
8347 (package
8348 (name "python-pythondialog")
8349 (version "3.4.0")
8350 (source
8351 (origin
8352 (method url-fetch)
8353 (uri (pypi-uri "pythondialog" version))
8354 (sha256
8355 (base32
8356 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
8357 (build-system python-build-system)
8358 (arguments
8359 `(#:phases
8360 (modify-phases %standard-phases
8361 (add-after 'unpack 'patch-path
8362 (lambda* (#:key inputs #:allow-other-keys)
8363 (let* ((dialog (assoc-ref inputs "dialog")))
8364 ;; Since this library really wants to grovel the search path, we
8365 ;; must hardcode dialog's store path into it.
8366 (substitute* "dialog.py"
8367 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8368 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8369 #t))))
8370 #:tests? #f)) ; no test suite
8371 (propagated-inputs
8372 `(("dialog" ,dialog)))
8373 (home-page "http://pythondialog.sourceforge.net/")
8374 (synopsis "Python interface to the UNIX dialog utility")
8375 (description "A Python wrapper for the dialog utility. Its purpose is to
8376provide an easy to use, pythonic and comprehensive Python interface to dialog.
8377This allows one to make simple text-mode user interfaces on Unix-like systems")
8378 (license license:lgpl2.1)
8379 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8380
8381(define-public python2-pythondialog
8382 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8383 (package
8384 (inherit base)
8385 (version (package-version python-pythondialog))
8386 (source (origin
8387 (method url-fetch)
8388 (uri (pypi-uri "python2-pythondialog" version))
8389 (sha256
8390 (base32
8391 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
8392
8393(define-public python-configobj
8394 (package
8395 (name "python-configobj")
8396 (version "5.0.6")
8397 (source (origin
8398 (method url-fetch)
b0758fbb 8399 (uri (pypi-uri "configobj" version))
44d10b1f
RW
8400 (sha256
8401 (base32
8402 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8403 ;; Patch setup.py so it looks for python-setuptools, which is
8404 ;; required to parse the keyword 'install_requires' in setup.py.
8405 (patches (search-patches "python-configobj-setuptools.patch"))))
8406 (build-system python-build-system)
8407 (propagated-inputs
8408 `(("python-six" ,python-six)))
8409 (synopsis "Config file reading, writing and validation")
8410 (description "ConfigObj is a simple but powerful config file reader and
8411writer: an ini file round tripper. Its main feature is that it is very easy to
8412use, with a straightforward programmer’s interface and a simple syntax for
8413config files.")
8414 (home-page "https://github.com/DiffSK/configobj")
8415 (license license:bsd-3)))
8416
8417(define-public python2-configobj
8418 (package-with-python2 python-configobj))
8419
8420(define-public python-configargparse
8421 (package
8422 (name "python-configargparse")
86ae491f 8423 (version "0.14.0")
44d10b1f
RW
8424 (source (origin
8425 (method url-fetch)
8426 (uri (pypi-uri "ConfigArgParse" version))
8427 (sha256
8428 (base32
86ae491f 8429 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
44d10b1f
RW
8430 (build-system python-build-system)
8431 (native-inputs
8432 `(("python-pyyaml" ,python-pyyaml)))
8433 (arguments
8434 `(#:phases
8435 (modify-phases %standard-phases
8436 (replace 'check
8437 (lambda _
8438 ;; Bypass setuptools-shim because one test relies on "setup.py"
8439 ;; being the first argument passed to the python call.
8440 ;;
8441 ;; NOTE: Many tests do not run because they rely on Python's
8442 ;; built-in test.test_argparse, but we remove the unit tests from
8443 ;; our Python installation.
8444 (invoke "python" "setup.py" "test"))))))
8445 (synopsis "Replacement for argparse")
8446 (description "A drop-in replacement for argparse that allows options to also
8447be set via config files and/or environment variables.")
8448 (home-page "https://github.com/bw2/ConfigArgParse")
8449 (license license:expat)))
8450
8451(define-public python2-configargparse
8452 (package-with-python2 python-configargparse))
8453
8454(define-public python-argparse-manpage
8455 (package
8456 (name "python-argparse-manpage")
8457 (version "1.1")
8458 (source
8459 (origin
8460 (method url-fetch)
8461 (uri (pypi-uri "argparse-manpage" version))
8462 (sha256
8463 (base32
8464 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
8465 (build-system python-build-system)
8466 (home-page "https://github.com/praiskup/argparse-manpage")
8467 (synopsis "Build manual page from Python's ArgumentParser object")
8468 (description
8469 "This package provides tools to build manual pages from Python's
8470@code{ArgumentParser} object.")
8471 (license license:asl2.0)))
8472
3e8f76d8
RW
8473(define-public python-contextlib2
8474 (package
8475 (name "python-contextlib2")
8476 (version "0.5.5")
8477 (source
8478 (origin
8479 (method url-fetch)
8480 (uri (pypi-uri "contextlib2" version))
8481 (sha256
8482 (base32
8483 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8484 (build-system python-build-system)
8485 (home-page "http://contextlib2.readthedocs.org/")
8486 (synopsis "Tools for decorators and context managers")
8487 (description "This module is primarily a backport of the Python
84883.2 contextlib to earlier Python versions. Like contextlib, it
8489provides utilities for common tasks involving decorators and context
8490managers. It also contains additional features that are not part of
8491the standard library.")
8492 (license license:psfl)))
8493
44d10b1f
RW
8494(define-public python2-contextlib2
8495 (package
8496 (name "python2-contextlib2")
8497 (version "0.5.5")
8498 (source
8499 (origin
8500 (method url-fetch)
8501 (uri (pypi-uri "contextlib2" version))
8502 (sha256
8503 (base32
8504 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8505 (build-system python-build-system)
8506 (arguments
8507 `(#:python ,python-2
8508 #:phases
8509 (modify-phases %standard-phases
8510 (replace 'check
8511 (lambda _ (invoke "python" "test_contextlib2.py" "-v"))))))
8512 (native-inputs
8513 `(("python2-unittest2" ,python2-unittest2)))
8514 (home-page "http://contextlib2.readthedocs.org/")
8515 (synopsis "Tools for decorators and context managers")
8516 (description "This module is primarily a backport of the Python
85173.2 contextlib to earlier Python versions. Like contextlib, it
8518provides utilities for common tasks involving decorators and context
8519managers. It also contains additional features that are not part of
8520the standard library.")
8521 (license license:psfl)))
8522
8523(define-public python-texttable
8524 (package
8525 (name "python-texttable")
52cc4892 8526 (version "0.9.1")
44d10b1f
RW
8527 (source
8528 (origin
8529 (method url-fetch)
8530 (uri (pypi-uri "texttable" version))
8531 (sha256
8532 (base32
52cc4892 8533 "0yawv64c0zbawwv6zz84whb32fnb2n9jylwjcfsrcdgh7xvl340i"))))
44d10b1f
RW
8534 (build-system python-build-system)
8535 (arguments '(#:tests? #f)) ; no tests
8536 (home-page "https://github.com/foutaise/texttable/")
8537 (synopsis "Python module for creating simple ASCII tables")
8538 (description "Texttable is a Python module for creating simple ASCII
8539tables.")
8540 (license license:lgpl2.1+)))
8541
8542(define-public python2-texttable
8543 (package-with-python2 python-texttable))
8544
8545(define-public python-atomicwrites
8546 (package
8547 (name "python-atomicwrites")
14f10479 8548 (version "1.3.0")
44d10b1f
RW
8549 (source (origin
8550 (method url-fetch)
8551 (uri (pypi-uri "atomicwrites" version))
8552 (sha256
8553 (base32
14f10479 8554 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
44d10b1f
RW
8555 (build-system python-build-system)
8556 (synopsis "Atomic file writes in Python")
8557 (description "Library for atomic file writes using platform dependent tools
8558for atomic file system operations.")
8559 (home-page "https://github.com/untitaker/python-atomicwrites")
8560 (license license:expat)))
8561
8562(define-public python2-atomicwrites
8563 (package-with-python2 python-atomicwrites))
8564
8565(define-public python-click-threading
8566 (package
8567 (name "python-click-threading")
8568 (version "0.4.4")
8569 (source (origin
8570 (method url-fetch)
8571 (uri (pypi-uri "click-threading" version))
8572 (sha256
8573 (base32
8574 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
8575 (build-system python-build-system)
8576 (propagated-inputs
8577 `(("python-click" ,python-click)))
8578 (synopsis "Utilities for multithreading in Click")
8579 (description "This package provides utilities for multithreading in Click
8580applications.")
8581 (home-page "https://github.com/click-contrib/click-threading")
8582 (license license:expat)))
8583
8584(define-public python-click-log
8585 (package
8586 (name "python-click-log")
8587 (version "0.3.2")
8588 (source (origin
8589 (method url-fetch)
8590 (uri (pypi-uri "click-log" version))
8591 (sha256
8592 (base32
8593 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
8594 (build-system python-build-system)
8595 (propagated-inputs
8596 `(("python-click" ,python-click)))
8597 (synopsis "Logging for click applications")
8598 (description "This package provides a Python library for logging Click
8599applications.")
8600 (home-page "https://github.com/click-contrib/click-log")
8601 (license license:expat)))
8602
8603(define-public python-apipkg
8604 (package
8605 (name "python-apipkg")
8606 (version "1.4")
8607 (source (origin
8608 (method url-fetch)
8609 (uri (pypi-uri "apipkg" version))
8610 (sha256
8611 (base32
8612 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8613 (build-system python-build-system)
8614 (native-inputs
8615 `(("python-pytest" ,python-pytest)))
8616 (synopsis "Namespace control and lazy-import mechanism")
8617 (description "With apipkg you can control the exported namespace of a Python
8618package and greatly reduce the number of imports for your users. It is a small
8619pure Python module that works on virtually all Python versions.")
8620 (home-page "https://github.com/pytest-dev/apipkg")
8621 (license license:expat)))
8622
8623(define-public python2-apipkg
8624 (package-with-python2 python-apipkg))
8625
8626(define-public python-execnet
8627 (package
8628 (name "python-execnet")
8629 (version "1.4.1")
8630 (source (origin
8631 (method url-fetch)
8632 (uri (pypi-uri "execnet" version))
8633 (sha256
8634 (base32
8635 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8636 (build-system python-build-system)
8637 (arguments
8638 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8639 ;; The two test failures are caused by the lack of an `ssh` executable.
8640 ;; The test suite can be run with pytest after the 'install' phase.
8641 #:tests? #f))
8642 (native-inputs
8643 `(("python-pytest" ,python-pytest)
8644 ("python-setuptools-scm" ,python-setuptools-scm)))
8645 (propagated-inputs
8646 `(("python-apipkg" ,python-apipkg)))
8647 (synopsis "Rapid multi-Python deployment")
8648 (description "Execnet provides a share-nothing model with
8649channel-send/receive communication for distributing execution across many
8650Python interpreters across version, platform and network barriers. It has a
8651minimal and fast API targeting the following uses:
8652@enumerate
8653@item distribute tasks to (many) local or remote CPUs
8654@item write and deploy hybrid multi-process applications
8655@item write scripts to administer multiple environments
8656@end enumerate")
8657 (home-page "http://codespeak.net/execnet/")
8658 (license license:expat)))
8659
8660(define-public python2-execnet
8661 (package-with-python2 python-execnet))
8662
8663(define-public python-icalendar
8664 (package
8665 (name "python-icalendar")
8666 (version "4.0.3")
8667 (source (origin
8668 (method url-fetch)
8669 (uri (pypi-uri "icalendar" version))
8670 (sha256
8671 (base32
8672 "0mk3dk1dxkcm46jy48v27j2w2349iv4sbimqj1yb5js43mx49hh7"))))
8673 (build-system python-build-system)
8674 (propagated-inputs
8675 `(("python-dateutil" ,python-dateutil)
8676 ("python-pytz" ,python-pytz)))
8677 (synopsis "Python library for parsing iCalendar files")
8678 (description "The icalendar package is a parser/generator of iCalendar
8679files for use with Python.")
8680 (home-page "https://github.com/collective/icalendar")
8681 (license license:bsd-2)))
8682
44d10b1f
RW
8683(define-public python-args
8684 (package
8685 (name "python-args")
8686 (version "0.1.0")
8687 (source (origin
8688 (method url-fetch)
8689 (uri (pypi-uri "args" version))
8690 (sha256
8691 (base32
8692 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8693 (build-system python-build-system)
8694 (home-page "https://github.com/kennethreitz/args")
8695 (synopsis "Command-line argument parser")
8696 (description
8697 "This library provides a Python module to parse command-line arguments.")
8698 (license license:bsd-3)))
8699
8700(define-public python2-args
8701 (package-with-python2 python-args))
8702
8703(define-public python-clint
8704 (package
8705 (name "python-clint")
8706 (version "0.5.1")
8707 (source (origin
8708 (method url-fetch)
8709 (uri (pypi-uri "clint" version))
8710 (sha256
8711 (base32
8712 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8713 (build-system python-build-system)
8714 (arguments
8715 '(#:phases
8716 (modify-phases %standard-phases
8717 (replace 'check
8718 (lambda _ (invoke "py.test" "-v"))))))
8719 (native-inputs
8720 `(("python-pytest" ,python-pytest)))
8721 (propagated-inputs
8722 `(("python-args" ,python-args)))
8723 (home-page "https://github.com/kennethreitz/clint")
8724 (synopsis "Command-line interface tools")
8725 (description
8726 "Clint is a Python module filled with a set of tools for developing
8727command-line applications, including tools for colored and indented
8728output, progress bar display, and pipes.")
8729 (license license:isc)))
8730
8731(define-public python2-clint
8732 (package-with-python2 python-clint))
8733
44d10b1f
RW
8734(define-public python-rply
8735 (package
8736 (name "python-rply")
8737 (version "0.7.5")
8738 (source (origin
8739 (method url-fetch)
8740 (uri (pypi-uri "rply" version))
8741 (sha256
8742 (base32
8743 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
8744 (build-system python-build-system)
8745 (propagated-inputs
8746 `(("python-appdirs" ,python-appdirs)))
8747 (home-page "https://github.com/alex/rply")
8748 (synopsis "Parser generator for Python")
8749 (description
8750 "This package provides a pure Python based parser generator, that also
8751works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8752with a new public API, and RPython support.")
8753 (license license:bsd-3)))
8754
8755(define-public python2-rply
8756 (package-with-python2 python-rply))
8757
8758(define-public python-hy
8759 (package
8760 (name "python-hy")
8761 (version "0.13.0")
8762 (source (origin
8763 (method url-fetch)
8764 (uri (pypi-uri "hy" version))
8765 (sha256
8766 (base32
8767 "19sfymaksx9jhksfnb15ahid46mzrhdfzz6yy2craz2qnzvpmky8"))))
8768 (build-system python-build-system)
8769 (arguments
8770 '(#:phases
8771 (modify-phases %standard-phases
6ba6a1c1
JG
8772 (add-before 'install 'set-HOME
8773 (lambda _
8774 (setenv "HOME" "/tmp")))
44d10b1f
RW
8775 (replace 'check
8776 (lambda _
8777 ;; Tests require write access to HOME.
8778 (setenv "HOME" "/tmp")
8779 (invoke "nosetests"))))))
8780 (native-inputs
8781 `(("python-coverage" ,python-coverage)
8782 ("python-nose" ,python-nose)))
8783 (propagated-inputs
8784 `(("python-astor" ,python-astor)
8785 ("python-clint" ,python-clint)
8786 ("python-rply" ,python-rply)))
8787 (home-page "http://hylang.org/")
8788 (synopsis "Lisp frontend to Python")
8789 (description
8790 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8791its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8792Python at your fingertips, in Lisp form.")
8793 (license license:expat)))
8794
8795(define-public python2-hy
8796 (package-with-python2 python-hy))
8797
8798(define-public python2-functools32
8799 (package
8800 (name "python2-functools32")
8801 (version "3.2.3-2")
8802 (source
8803 (origin
8804 (method url-fetch)
8805 (uri (pypi-uri "functools32" version))
8806 (sha256
8807 (base32
8808 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8809 (build-system python-build-system)
8810 (arguments
8811 `(#:python ,python-2
8812 #:tests? #f)) ; no test target
8813 (home-page "https://github.com/MiCHiLU/python-functools32")
8814 (synopsis
8815 "Backport of the functools module from Python 3.2.3")
8816 (description
8817 "This package is a backport of the @code{functools} module from Python
88183.2.3 for use with older versions of Python and PyPy.")
8819 (license license:expat)))
8820
8821(define-public python2-subprocess32
8822 (package
8823 (name "python2-subprocess32")
8824 (version "3.2.7")
8825 (source (origin
8826 (method url-fetch)
8827 (uri (pypi-uri "subprocess32" version))
8828 (sha256
8829 (base32
8830 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
8831 (patches
8832 (search-patches "python2-subprocess32-disable-input-test.patch"))))
8833 (build-system python-build-system)
8834 (arguments
8835 `(#:python ,python-2
8836 ;; The test suite fails with Python > 2.7.13:
8837 ;; import test.support
8838 ;; ImportError: No module named support
8839 #:tests? #f
8840 #:phases
8841 (modify-phases %standard-phases
8842 (add-after 'unpack 'patch-/bin/sh
8843 (lambda _
8844 (substitute* '("subprocess32.py"
8845 "test_subprocess32.py")
8846 (("/bin/sh") (which "sh")))
8847 #t)))))
8848 (home-page "https://github.com/google/python-subprocess32")
8849 (synopsis "Backport of the subprocess module from Python 3.2")
8850 (description
8851 "This is a backport of the @code{subprocess} standard library module
8852from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
8853new features. On POSIX systems it is guaranteed to be reliable when used
8854in threaded applications. It includes timeout support from Python 3.3 but
8855otherwise matches 3.2’s API.")
8856 (license license:psfl)))
8857
8858(define-public python2-futures
8859 (package
8860 (name "python2-futures")
8861 (version "3.2.0")
8862 (source
8863 (origin
8864 (method url-fetch)
8865 (uri (pypi-uri "futures" version))
8866 (sha256
8867 (base32
8868 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
8869 (build-system python-build-system)
ba88eea2
RW
8870 (arguments
8871 `(#:python ,python-2
8872 #:phases
8873 (modify-phases %standard-phases
8874 (replace 'check
8875 (lambda _
8876 (invoke "python" "test_futures.py")
8877 #t)))))
44d10b1f
RW
8878 (home-page "https://github.com/agronholm/pythonfutures")
8879 (synopsis
8880 "Backport of the concurrent.futures package from Python 3.2")
8881 (description
8882 "The concurrent.futures module provides a high-level interface for
8883asynchronously executing callables. This package backports the
8884concurrent.futures package from Python 3.2")
8885 (license license:bsd-3)))
8886
8887(define-public python-promise
8888 (package
8889 (name "python-promise")
8890 (version "0.4.2")
8891 (source
8892 (origin
8893 (method url-fetch)
8894 (uri (pypi-uri "promise" version))
8895 (sha256
8896 (base32
8897 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8898 (build-system python-build-system)
8899 ;; Tests wants python-futures, which is a python2 only program, and
8900 ;; can't be found by python-promise at test time.
8901 (arguments `(#:tests? #f))
8902 (home-page "https://github.com/syrusakbary/promise")
8903 (synopsis "Promises/A+ implementation for Python")
8904 (description
8905 "Promises/A+ implementation for Python")
8906 (properties `((python2-variant . ,(delay python2-promise))))
8907 (license license:expat)))
8908
8909(define-public python2-promise
8910 (let ((promise (package-with-python2
8911 (strip-python2-variant python-promise))))
8912 (package (inherit promise)
8913 (arguments (substitute-keyword-arguments (package-arguments promise)
8914 ((#:tests? _) #t)))
8915 (native-inputs
8916 `(("python2-futures" ,python2-futures)
8917 ("python2-pytest" ,python2-pytest)
8918 ,@(package-native-inputs promise))))))
8919
d71d85cd
RW
8920(define-public python-progressbar33
8921 (package
8922 (name "python-progressbar33")
8923 (version "2.4")
8924 (source
8925 (origin
8926 (method url-fetch)
8927 (uri (pypi-uri "progressbar33" version))
8928 (sha256
8929 (base32
8930 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
8931 (build-system python-build-system)
8932 (home-page "http://github.com/germangh/python-progressbar")
8933 (synopsis "Text progress bar library for Python")
8934 (description
8935 "This package provides a text progress bar library for Python. This
8936version only differs from the original @code{progressbar} package in that it
8937uses relative package imports instead of absolute imports, which is necessary
8938for the module to work under Python 3.3.")
8939 ;; Either or both of these licenses may be selected.
8940 (license (list license:lgpl2.1+ license:bsd-3))))
8941
44d10b1f
RW
8942(define-public python-colorama
8943 (package
8944 (name "python-colorama")
8945 (version "0.3.9")
8946 (source
8947 (origin
8948 (method url-fetch)
8949 (uri (pypi-uri "colorama" version))
8950 (sha256
8951 (base32
8952 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
8953 (build-system python-build-system)
8954 (synopsis "Colored terminal text rendering for Python")
8955 (description "Colorama is a Python library for rendering colored terminal
8956text.")
8957 (home-page "https://pypi.python.org/pypi/colorama")
8958 (license license:bsd-3)))
8959
8960(define-public python2-colorama
8961 (package-with-python2 python-colorama))
8962
8963(define-public python-rsa
8964 (package
8965 (name "python-rsa")
8966 (version "3.4.2")
8967 (source
8968 (origin
8969 (method url-fetch)
8970 (uri (pypi-uri "rsa" version))
8971 (sha256
8972 (base32
8973 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
8974 (build-system python-build-system)
8975 (propagated-inputs
8976 `(("python-pyasn1" ,python-pyasn1)))
8977 (synopsis "Pure-Python RSA implementation")
8978 (description "Python-RSA is a pure-Python RSA implementation. It supports
8979encryption and decryption, signing and verifying signatures, and key
8980generation according to PKCS#1 version 1.5. It can be used as a Python
8981library as well as on the command line.")
8982 (home-page "https://stuvel.eu/rsa")
8983 (license license:asl2.0)))
8984
8985(define-public python2-rsa
8986 (package-with-python2 python-rsa))
8987
8988(define-public python-pluggy
8989 (package
8990 (name "python-pluggy")
e5731c03 8991 (version "0.11.0")
44d10b1f
RW
8992 (source
8993 (origin
8994 (method url-fetch)
8995 (uri (pypi-uri "pluggy" version))
8996 (sha256
8997 (base32
e5731c03 8998 "10511a54dvafw1jrk75mrhml53c7b7w4yaw7241696lc2hfvr895"))))
44d10b1f
RW
8999 (build-system python-build-system)
9000 (native-inputs
9001 `(("python-setuptools-scm" ,python-setuptools-scm)))
9002 (synopsis "Plugin and hook calling mechanism for Python")
9003 (description "Pluggy is an extraction of the plugin manager as used by
9004Pytest but stripped of Pytest specific details.")
9005 (home-page "https://pypi.python.org/pypi/pluggy")
9006 (license license:expat)))
9007
9008(define-public python2-pluggy
9009 (package-with-python2 python-pluggy))
9010
9011(define-public python-tox
9012 (package
9013 (name "python-tox")
9014 (version "2.8.1")
9015 (source
9016 (origin
9017 (method url-fetch)
9018 (uri (pypi-uri "tox" version))
9019 (sha256
9020 (base32
9021 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
9022 (build-system python-build-system)
9023 (arguments
9024 ;; FIXME: Tests require pytest-timeout, which itself requires
9025 ;; pytest>=2.8.0 for installation.
9026 '(#:tests? #f))
9027 (propagated-inputs
9028 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
9029 ("python-py" ,python-py)
9030 ("python-virtualenv" ,python-virtualenv)))
9031 (native-inputs
9032 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
9033 ("python-pytest" ,python-pytest) ; >= 2.3.5
9034 ("python-setuptools-scm" ,python-setuptools-scm)))
9035 (home-page "http://tox.testrun.org/")
9036 (synopsis "Virtualenv-based automation of test activities")
9037 (description "Tox is a generic virtualenv management and test command line
9038tool. It can be used to check that a package installs correctly with
9039different Python versions and interpreters, or run tests in each type of
9040supported environment, or act as a frontend to continuous integration
9041servers.")
9042 (license license:expat)))
9043
9044(define-public python2-tox
9045 (package-with-python2 python-tox))
9046
9047(define-public python-jmespath
9048 (package
9049 (name "python-jmespath")
27fb781f 9050 (version "0.9.4")
44d10b1f
RW
9051 (source
9052 (origin
9053 (method url-fetch)
9054 (uri (pypi-uri "jmespath" version))
9055 (sha256
9056 (base32
27fb781f 9057 "0k0765x1mybcrzajh3hiqkl8sy9hs0bmn4900frxy0j3ykvaxqmx"))))
44d10b1f
RW
9058 (build-system python-build-system)
9059 (native-inputs
9060 `(("python-nose" ,python-nose)))
9061 (synopsis "JSON Matching Expressions")
9062 (description "JMESPath (pronounced “james path”) is a Python library that
9063allows one to declaratively specify how to extract elements from a JSON
9064document.")
9065 (home-page "https://github.com/jmespath/jmespath.py")
9066 (license license:expat)))
9067
9068(define-public python2-jmespath
9069 (package-with-python2 python-jmespath))
9070
9071(define-public python-botocore
9072 (package
7bcf827c
RW
9073 (name "python-botocore")
9074 (version "1.12.149")
9075 (source
9076 (origin
9077 (method url-fetch)
9078 (uri (pypi-uri "botocore" version))
9079 (sha256
9080 (base32
9081 "12597f74khp3ngwr282cb949w0gcqj20rkfc3x275dijavyy5cmf"))))
9082 (build-system python-build-system)
9083 (arguments
9084 ;; FIXME: Many tests are failing.
9085 '(#:tests? #f))
9086 (propagated-inputs
9087 `(("python-dateutil" ,python-dateutil)
9088 ("python-docutils" ,python-docutils)
9089 ("python-jmespath" ,python-jmespath)))
9090 (native-inputs
9091 `(("python-mock" ,python-mock)
9092 ("python-nose" ,python-nose)
9093 ("behave" ,behave)
9094 ("python-tox" ,python-tox)
9095 ("python-urllib3" ,python-urllib3)
9096 ("python-wheel" ,python-wheel)))
9097 (home-page "https://github.com/boto/botocore")
9098 (synopsis "Low-level interface to AWS")
9099 (description "Botocore is a Python library that provides a low-level
44d10b1f 9100interface to the Amazon Web Services (AWS) API.")
7bcf827c 9101 (license license:asl2.0)))
44d10b1f
RW
9102
9103(define-public python2-botocore
9104 (package-with-python2 python-botocore))
9105
9106(define-public python-xdo
9107 (package
9108 (name "python-xdo")
9109 (version "0.3")
9110 (source (origin
9111 (method url-fetch)
9112 (uri (string-append
9113 "http://http.debian.net/debian/pool/main/p/python-xdo/"
9114 "python-xdo_" version ".orig.tar.gz"))
9115 (sha256
9116 (base32
9117 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
9118 (build-system python-build-system)
9119 (arguments
9120 '(#:phases
9121 (modify-phases %standard-phases
9122 (add-before 'install 'patch-libxdo-path
9123 ;; Hardcode the path of dynamically loaded libxdo library.
9124 (lambda* (#:key inputs #:allow-other-keys)
9125 (let ((libxdo (string-append
9126 (assoc-ref inputs "xdotool")
9127 "/lib/libxdo.so")))
9128 (substitute* "xdo/_xdo.py"
9129 (("find_library\\(\"xdo\"\\)")
9130 (simple-format #f "\"~a\"" libxdo)))
9131 #t))))
9132 #:tests? #f)) ; no tests provided
9133 (propagated-inputs
9134 `(("python-six" ,python-six)))
9135 (inputs
9136 `(("xdotool" ,xdotool)
9137 ("libX11" ,libx11)))
9138 (home-page "https://tracker.debian.org/pkg/python-xdo")
9139 (synopsis "Python library for simulating X11 keyboard/mouse input")
9140 (description "Provides bindings to libxdo for manipulating X11 via simulated
9141input. (Note that this is mostly a legacy library; you may wish to look at
9142python-xdo for newer bindings.)")
9143 (license license:bsd-3)))
9144
9145(define-public python2-xdo
9146 (package-with-python2 python-xdo))
9147
9148(define-public python-mako
9149 (package
9150 (name "python-mako")
6bf53ad5 9151 (version "1.1.0")
44d10b1f
RW
9152 (source
9153 (origin
9154 (method url-fetch)
9155 (uri (pypi-uri "Mako" version))
9156 (sha256
9157 (base32
6bf53ad5 9158 "0jqa3qfpykyn4fmkn0kh6043sfls7br8i2bsdbccazcvk9cijsd3"))))
44d10b1f 9159 (build-system python-build-system)
6bf53ad5
MB
9160 (arguments
9161 `(#:phases (modify-phases %standard-phases
9162 (replace 'check
9163 (lambda _
9164 (invoke "pytest" "-vv"))))))
44d10b1f
RW
9165 (propagated-inputs
9166 `(("python-markupsafe" ,python-markupsafe)))
9167 (native-inputs
9168 `(("python-mock" ,python-mock)
44d10b1f 9169 ("python-pytest" ,python-pytest)))
7016e620 9170 (home-page "https://www.makotemplates.org/")
44d10b1f
RW
9171 (synopsis "Templating language for Python")
9172 (description "Mako is a templating language for Python that compiles
9173templates into Python modules.")
9174 (license license:expat)))
9175
9176(define-public python2-mako
9177 (package-with-python2 python-mako))
9178
9179(define-public python-waitress
9180 (package
9181 (name "python-waitress")
9182 (version "1.1.0")
9183 (source
9184 (origin
9185 (method url-fetch)
9186 (uri (pypi-uri "waitress" version))
9187 (patches (search-patches "python-waitress-fix-tests.patch"))
9188 (sha256
9189 (base32
9190 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
9191 (build-system python-build-system)
9192 (home-page "https://github.com/Pylons/waitress")
9193 (synopsis "Waitress WSGI server")
9194 (description "Waitress is meant to be a production-quality pure-Python WSGI
9195server with very acceptable performance.")
9196 (license license:zpl2.1)))
9197
9198(define-public python2-waitress
9199 (package-with-python2 python-waitress))
9200
b2b23d12
TLC
9201(define-public python-whichcraft
9202 (package
9203 (name "python-whichcraft")
9204 (version "0.6.1")
9205 (source
9206 (origin
9207 (method url-fetch)
9208 (uri (pypi-uri "whichcraft" version))
9209 (sha256
9210 (base32
9211 "11yfkzyplizdgndy34vyd5qlmr1n5mxis3a3svxmx8fnccdvknxc"))))
9212 (build-system python-build-system)
9213 (native-inputs
9214 `(("python-pytest" ,python-pytest)))
9215 (home-page "https://github.com/pydanny/whichcraft")
9216 (synopsis "Cross-platform cross-python shutil.which functionality")
9217 (description
9218 "This package provides a shim of the shutil.which function that's
9219designed to work across multiple versions of Python.")
9220 (license license:bsd-3)))
9221
1133ca44
TLC
9222(define-public python-cookiecutter
9223 (package
9224 (name "python-cookiecutter")
9225 (version "1.6.0")
9226 (source
9227 (origin
9228 (method url-fetch)
9229 (uri (pypi-uri "cookiecutter" version))
9230 (sha256
9231 (base32
9232 "0glsvaz8igi2wy1hsnhm9fkn6560vdvdixzvkq6dn20z3hpaa5hk"))))
9233 (build-system python-build-system)
9234 (native-inputs
9235 `(("python-freezegun" ,python-freezegun)
9236 ("python-pytest" ,python-pytest)
9237 ("python-pytest-catchlog" ,python-pytest-catchlog)
9238 ("python-pytest-cov" ,python-pytest-cov)
9239 ("python-pytest-mock" ,python-pytest-mock)))
9240 (propagated-inputs
9241 `(("python-binaryornot" ,python-binaryornot)
9242 ("python-click" ,python-click)
9243 ("python-future" ,python-future)
9244 ("python-jinja2" ,python-jinja2)
9245 ("python-jinja2-time" ,python-jinja2-time)
9246 ("python-poyo" ,python-poyo)
9247 ("python-requests" ,python-requests)
9248 ("python-whichcraft" ,python-whichcraft)))
9249 (home-page "https://github.com/audreyr/cookiecutter")
9250 (synopsis
9251 "Command-line utility that creates projects from project templates")
9252 (description
9253 "This package provides a command-line utility that creates projects from
9254project templates, e.g. creating a Python package project from a Python package
9255project template.")
9256 (license license:bsd-3)))
9257
44d10b1f
RW
9258(define-public python-pyquery
9259 (package
9260 (name "python-pyquery")
9261 (version "1.2.17")
9262 (source
9263 (origin
9264 (method url-fetch)
9265 (uri (pypi-uri "pyquery" version))
9266 (sha256
9267 (base32
9268 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
9269 (build-system python-build-system)
9270 (native-inputs
9271 `(("python-webob" ,python-webob)
9272 ("python-webtest" ,python-webtest)))
9273 (propagated-inputs
9274 `(("python-lxml" ,python-lxml)
9275 ("python-cssselect" ,python-cssselect)))
9276 (home-page "https://github.com/gawel/pyquery")
9277 (synopsis "Make jQuery-like queries on xml documents")
9278 (description "pyquery allows you to make jQuery queries on xml documents.
9279The API is as much as possible the similar to jQuery. pyquery uses lxml for
9280fast xml and html manipulation.")
9281 (license license:bsd-3)))
9282
44d10b1f
RW
9283(define-public python-anyjson
9284 (package
9285 (name "python-anyjson")
9286 (version "0.3.3")
9287 (source
9288 (origin
9289 (method url-fetch)
9290 (uri (pypi-uri "anyjson" version))
9291 (sha256
9292 (base32
9293 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
9294 (build-system python-build-system)
9295 (arguments
9296 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
9297 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
9298 ;; whatever) so this transformation needs to be done before the tests
9299 ;; can be run. Maybe we could add a build step to transform beforehand
9300 ;; but it could be annoying/difficult.
9301 ;; We can enable tests for the Python 2 version, though, and do below.
9302 #:tests? #f))
9303 (home-page "https://bitbucket.org/runeh/anyjson/")
9304 (synopsis
9305 "Wraps best available JSON implementation in a common interface")
9306 (description
9307 "Anyjson loads whichever is the fastest JSON module installed
9308and provides a uniform API regardless of which JSON implementation is used.")
9309 (license license:bsd-3)
9310 (properties `((python2-variant . ,(delay python2-anyjson))))))
9311
9312(define-public python2-anyjson
9313 (let ((anyjson (package-with-python2
9314 (strip-python2-variant python-anyjson))))
9315 (package
9316 (inherit anyjson)
9317 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
9318 #:tests? #t
9319 ,@(package-arguments anyjson)))
9320 (native-inputs `(("python2-nose" ,python2-nose))))))
9321
9322(define-public python-amqp
9323 (package
9324 (name "python-amqp")
9325 (version "2.3.2")
9326 (source
9327 (origin
9328 (method url-fetch)
9329 (uri (pypi-uri "amqp" version))
9330 (sha256
9331 (base32
9332 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
9333 (build-system python-build-system)
9334 (native-inputs
9335 `(("python-case" ,python-case)
9336 ("python-pytest-sugar" ,python-pytest-sugar)
9337 ("python-mock" ,python-mock)))
9338 (propagated-inputs
9339 `(("python-vine" ,python-vine)))
9340 (home-page "https://github.com/celery/py-amqp")
9341 (synopsis
9342 "Low-level AMQP client for Python (fork of amqplib)")
9343 (description
9344 "This is a fork of amqplib which was originally written by Barry Pederson.
9345It is maintained by the Celery project, and used by kombu as a pure python
9346alternative when librabbitmq is not available.")
9347 (license license:lgpl2.1+)
9348 (properties `((python2-variant . ,(delay python2-amqp))))))
9349
9350(define-public python2-amqp
9351 (let ((amqp (package-with-python2
9352 (strip-python2-variant python-amqp))))
9353 (package
9354 (inherit amqp)
9355 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
9356 ;; unmaintained. Weirdly, does not do this on the python 3
9357 ;; version?
9358 #:tests? #f
9359 ,@(package-arguments amqp))))))
9360
9361(define-public python-txamqp
9362 (package
9363 (name "python-txamqp")
9364 (version "0.8.2")
9365 (source
9366 (origin
9367 (method url-fetch)
9368 (uri (pypi-uri "txAMQP" version))
9369 (sha256
9370 (base32
9371 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
9372 (build-system python-build-system)
9373 (propagated-inputs
9374 `(("python-six" ,python-six)
9375 ("python-twisted" ,python-twisted)))
9376 (home-page "https://github.com/txamqp/txamqp")
9377 (synopsis "Communicate with AMQP peers and brokers using Twisted")
9378 (description
9379 "This package provides a Python library for communicating with AMQP peers
9380and brokers using the asynchronous networking framework Twisted. It contains
9381all the necessary code to connect, send and receive messages to/from an
9382AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
9383also includes support for using Thrift RPC over AMQP in Twisted
9384applications.")
9385 (license license:asl2.0)))
9386
9387(define-public python2-txamqp
9388 (package-with-python2 python-txamqp))
9389
9390(define-public python-kombu
9391 (package
9392 (name "python-kombu")
9393 (version "4.2.2")
9394 (source
9395 (origin
9396 (method url-fetch)
9397 (uri (pypi-uri "kombu" version))
9398 (sha256
9399 (base32
9400 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
9401 (build-system python-build-system)
9402 (native-inputs
9403 `(("python-mock" ,python-mock)
9404 ("python-case" ,python-case)
9405 ("python-pyro4" ,python-pyro4)
9406 ("python-pytest-sugar" ,python-pytest-sugar)
9407 ("python-pytz" ,python-pytz)))
9408 (propagated-inputs
9409 `(("python-anyjson" ,python-anyjson)
9410 ("python-amqp" ,python-amqp)
9411 ("python-redis" ,python-redis)))
9412 (home-page "https://kombu.readthedocs.io")
9413 (synopsis "Message passing library for Python")
9414 (description "The aim of Kombu is to make messaging in Python as easy as
9415possible by providing an idiomatic high-level interface for the AMQ protocol,
9416and also provide proven and tested solutions to common messaging problems.
9417AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9418message orientation, queuing, routing, reliability and security, for which the
9419RabbitMQ messaging server is the most popular implementation.")
9420 (license license:bsd-3)
9421 (properties `((python2-variant . ,(delay python2-kombu))))))
9422
9423(define-public python2-kombu
9424 (let ((kombu (package-with-python2
9425 (strip-python2-variant python-kombu))))
9426 (package
9427 (inherit kombu)
9428 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
9429 ;; It works fine on the python3 variant.
9430 #:tests? #f
9431 ,@(package-arguments kombu)))
9432 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9433 ,@(package-native-inputs kombu))))))
9434
9435(define-public python-billiard
9436 (package
9437 (name "python-billiard")
9438 (version "3.5.0.5")
9439 (source
9440 (origin
9441 (method url-fetch)
9442 (uri (pypi-uri "billiard" version))
9443 (sha256
9444 (base32
9445 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
9446 (build-system python-build-system)
9447 (native-inputs
9448 `(("python-case" ,python-case)
9449 ("python-pytest" ,python-pytest)))
9450 (home-page "https://github.com/celery/billiard")
9451 (synopsis
9452 "Python multiprocessing fork with improvements and bugfixes")
9453 (description
9454 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9455multiprocessing package itself is a renamed and updated version of R Oudkerk's
9456pyprocessing package. This standalone variant is intended to be compatible with
9457Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
9458 (license license:bsd-3)
9459 (properties `((python2-variant . ,(delay python2-billiard))))))
9460
9461(define-public python2-billiard
9462 (let ((billiard (package-with-python2
9463 (strip-python2-variant python-billiard))))
9464 (package
9465 (inherit billiard)
9466 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9467 ("python2-mock" ,python2-mock)
9468 ,@(package-native-inputs billiard))))))
9469
9470(define-public python-celery
9471 (package
9472 (name "python-celery")
9473 (version "4.2.1")
9474 (source
9475 (origin
9476 (method url-fetch)
9477 (uri (pypi-uri "celery" version))
9478 (sha256
9479 (base32
9480 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
9481 (build-system python-build-system)
9482 (arguments
9483 '(;; TODO The tests fail with Python 3.7
9484 ;; https://github.com/celery/celery/issues/4849
9485 #:tests? #f
9486 #:phases
9487 (modify-phases %standard-phases
9488 (add-after 'unpack 'patch-requirements
9489 (lambda _
9490 (substitute* "requirements/test.txt"
9491 (("pytest>=3\\.0,<3\\.3")
9492 "pytest>=3.0"))
9493 #t)))))
9494 (native-inputs
9495 `(("python-case" ,python-case)
9496 ("python-pytest" ,python-pytest)))
9497 (propagated-inputs
9498 `(("python-pytz" ,python-pytz)
9499 ("python-billiard" ,python-billiard)
9500 ("python-kombu" ,python-kombu)))
9501 (home-page "https://celeryproject.org")
9502 (synopsis "Distributed Task Queue")
9503 (description "Celery is an asynchronous task queue/job queue based on
9504distributed message passing. It is focused on real-time operation, but
9505supports scheduling as well. The execution units, called tasks, are executed
9506concurrently on a single or more worker servers using multiprocessing,
9507Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9508synchronously (wait until ready).")
9509 (license license:bsd-3)
9510 (properties `((python2-variant . ,(delay python2-celery))))))
9511
9512(define-public python2-celery
9513 (let ((celery (package-with-python2
9514 (strip-python2-variant python-celery))))
9515 (package
9516 (inherit celery)
9517 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9518 ("python2-mock" ,python2-mock)
9519 ,@(package-native-inputs celery))))))
9520
9521(define-public python-translitcodec
9522 (package
9523 (name "python-translitcodec")
9524 (version "0.4.0")
9525 (source
9526 (origin
9527 (method url-fetch)
9528 (uri (pypi-uri "translitcodec" version))
9529 (sha256
9530 (base32
9531 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9532 (build-system python-build-system)
9533 (arguments
9534 `(#:tests? #f)) ; no tests provided
9535 (home-page
9536 "https://github.com/claudep/translitcodec")
9537 (synopsis
9538 "Unicode to 8-bit charset transliteration codec")
9539 (description
9540 "This package contains codecs for transliterating ISO 10646 texts into
9541best-effort representations using smaller coded character sets (ASCII,
9542ISO 8859, etc.).")
9543 (license license:expat)))
9544
9545(define-public python2-translitcodec
9546 (package-with-python2 python-translitcodec))
9547
9548(define-public python-editor
9549 (package
9550 (name "python-editor")
9551 (version "0.5")
9552 (source
9553 (origin
9554 (method url-fetch)
9555 (uri (pypi-uri "python-editor" version))
9556 (sha256
9557 (base32
9558 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9559 (build-system python-build-system)
9560 (home-page
9561 "https://github.com/fmoo/python-editor")
9562 (synopsis
9563 "Programmatically open an editor, capture the result")
9564 (description
9565 "python-editor is a library that provides the editor module for
9566programmatically interfacing with your system's $EDITOR.")
9567 (license license:asl2.0)))
9568
9569(define-public python2-editor
9570 (package-with-python2 python-editor))
9571
44d10b1f
RW
9572(define-public python-vobject
9573 (package
9574 (name "python-vobject")
9575 (version "0.9.5")
9576 (source (origin
9577 (method url-fetch)
9578 (uri (pypi-uri "vobject" version))
9579 (sha256
9580 (base32
9581 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
9582 (build-system python-build-system)
9583 (arguments
9584 '(;; The test suite relies on some non-portable Windows interfaces.
9585 #:tests? #f))
9586 (propagated-inputs
9587 `(("python-dateutil" ,python-dateutil)
9588 ("python-pyicu" ,python-pyicu)))
9589 (synopsis "Parse and generate vCard and vCalendar files")
9590 (description "Vobject is intended to be a full featured Python package for
9591parsing and generating vCard and vCalendar files. Currently, iCalendar files
9592are supported and well tested. vCard 3.0 files are supported, and all data
9593should be imported, but only a few components are understood in a sophisticated
9594way.")
9595 (home-page "http://eventable.github.io/vobject/")
9596 (license license:asl2.0)))
9597
9598(define-public python2-vobject
9599 (package-with-python2 python-vobject))
9600
9601(define-public python-munkres
9602 (package
9603 (name "python-munkres")
9604 (version "1.0.8")
9605 (source (origin
9606 (method url-fetch)
9607 (uri (pypi-uri "munkres" version))
9608 (sha256
9609 (base32
9610 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
9611 (build-system python-build-system)
9612 (arguments
9613 '(#:tests? #f)) ; no test suite
9614 (home-page "http://software.clapper.org/munkres/")
9615 (synopsis "Implementation of the Munkres algorithm")
9616 (description "The Munkres module provides an implementation of the Munkres
9617algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9618useful for solving the Assignment Problem.")
9619 (license license:bsd-3)))
9620
9621(define-public python2-munkres
9622 (package-with-python2 python-munkres))
9623
9624(define-public python-whoosh
9625 (package
9626 (name "python-whoosh")
9627 (version "2.7.4")
9628 (source
9629 (origin
9630 (method url-fetch)
9631 (uri (pypi-uri "Whoosh" version))
9632 (sha256
9633 (base32
9634 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9635 (build-system python-build-system)
2679d9a4 9636 (arguments '(#:tests? #f)) ; Test invocation is no longer supported by Python.
44d10b1f
RW
9637 (native-inputs
9638 `(("python-pytest" ,python-pytest)))
9639 (home-page "https://bitbucket.org/mchaput/whoosh")
9640 (synopsis "Full text indexing, search, and spell checking library")
9641 (description
9642 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9643checking library.")
9644 (license license:bsd-2)))
9645
9646(define-public python2-whoosh
9647 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9648 (package (inherit whoosh)
9649 (propagated-inputs
9650 `(("python2-backport-ssl-match-hostname"
9651 ,python2-backport-ssl-match-hostname)
9652 ,@(package-propagated-inputs whoosh))))))
9653
9654(define-public python-pathlib
9655 (package
9656 (name "python-pathlib")
9657 (version "1.0.1")
9658 (source (origin
9659 (method url-fetch)
9660 (uri (pypi-uri "pathlib" version))
9661 (sha256
9662 (base32
9663 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9664 (build-system python-build-system)
9665 ;; The tests depend on the internal "test" module, which does not provide
9666 ;; a stable interface.
9667 (arguments `(#:tests? #f))
9668 (home-page "https://pathlib.readthedocs.org/")
9669 (synopsis "Object-oriented file system paths")
9670 (description "Pathlib offers a set of classes to handle file system paths.
9671It offers the following advantages over using string objects:
9672
9673@enumerate
9674@item No more cumbersome use of os and os.path functions. Everything can
9675be done easily through operators, attribute accesses, and method calls.
9676@item Embodies the semantics of different path types. For example,
9677comparing Windows paths ignores casing.
9678@item Well-defined semantics, eliminating any inconsistencies or
9679ambiguities (forward vs. backward slashes, etc.).
9680@end enumerate
9681
9682Note: In Python 3.4, pathlib is now part of the standard library. For other
9683Python versions please consider python-pathlib2 instead, which tracks the
9684standard library module. This module (python-pathlib) isn't maintained
9685anymore.")
9686 (license license:expat)))
9687
9688(define-public python2-pathlib
9689 (package-with-python2 python-pathlib))
9690
9691(define-public python2-pathlib2
9692 (package
9693 (name "python2-pathlib2")
54da6f9f 9694 (version "2.3.3")
44d10b1f
RW
9695 (source (origin
9696 (method url-fetch)
9697 (uri (pypi-uri "pathlib2" version))
9698 (sha256
9699 (base32
54da6f9f 9700 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
44d10b1f
RW
9701 (build-system python-build-system)
9702 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9703 ;; version is 3.4 which already includes this package as part of the
9704 ;; standard library.
9705 (arguments
9706 `(#:python ,python-2))
9707 (propagated-inputs
9708 `(("python2-scandir" ,python2-scandir)
9709 ("python2-six" ,python2-six)))
9710 (home-page "https://pypi.python.org/pypi/pathlib2/")
9711 (synopsis "Object-oriented file system paths - backport of standard
9712pathlib module")
9713 (description "The goal of pathlib2 is to provide a backport of standard
9714pathlib module which tracks the standard library module, so all the newest
9715features of the standard pathlib can be used also on older Python versions.
9716
9717Pathlib offers a set of classes to handle file system paths. It offers the
9718following advantages over using string objects:
9719
9720@enumerate
9721@item No more cumbersome use of os and os.path functions. Everything can
9722be done easily through operators, attribute accesses, and method calls.
9723@item Embodies the semantics of different path types. For example,
9724comparing Windows paths ignores casing.
9725@item Well-defined semantics, eliminating any inconsistencies or
9726ambiguities (forward vs. backward slashes, etc.).
9727@end enumerate")
9728 (license license:expat)))
9729
9730(define-public python2-pathlib2-bootstrap
9731 (hidden-package
9732 (package
9733 (inherit python2-pathlib2)
9734 (name "python2-pathlib2-bootstrap")
9735 (propagated-inputs
9736 `(("python2-scandir" ,python2-scandir)
9737 ("python2-six" ,python2-six-bootstrap))))))
9738
9739(define-public python-jellyfish
9740 (package
9741 (name "python-jellyfish")
9742 (version "0.5.6")
9743 (source (origin
9744 (method url-fetch)
9745 (uri (pypi-uri "jellyfish" version))
9746 (sha256
9747 (base32
9748 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
9749 (build-system python-build-system)
9750 (native-inputs
9751 `(("python-pytest" ,python-pytest)))
9752 (home-page "https://github.com/jamesturk/jellyfish")
9753 (synopsis "Approximate and phonetic matching of strings")
9754 (description "Jellyfish uses a variety of string comparison and phonetic
9755encoding algorithms to do fuzzy string matching.")
9756 (license license:bsd-2)
9757 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9758
9759(define-public python2-jellyfish
9760 (let ((jellyfish (package-with-python2
9761 (strip-python2-variant python-jellyfish))))
9762 (package (inherit jellyfish)
9763 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
9764 ,@(package-native-inputs jellyfish))))))
9765
9766(define-public python2-unicodecsv
9767 (package
9768 (name "python2-unicodecsv")
9769 (version "0.14.1")
9770 (source (origin
9771 (method url-fetch)
9772 ;; The test suite is not included in the PyPi release.
9773 ;; https://github.com/jdunck/python-unicodecsv/issues/19
9774 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
9775 "archive/" version ".tar.gz"))
9776 (file-name (string-append name "-" version ".tar.gz"))
9777 (sha256
9778 (base32
9779 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
9780 (build-system python-build-system)
9781 (arguments
9782 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9783 #:python ,python-2))
9784 (native-inputs
9785 `(("python2-unittest2" ,python2-unittest2)))
9786 (home-page "https://github.com/jdunck/python-unicodecsv")
9787 (synopsis "Unicode CSV module for Python 2")
9788 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9789module, adding support for Unicode strings.")
9790 (license license:bsd-2)))
9791
9792(define-public python-rarfile
9793 (package
9794 (name "python-rarfile")
9795 (version "2.8")
9796 (source (origin
9797 (method url-fetch)
9798 (uri (pypi-uri "rarfile" version))
9799 (sha256
9800 (base32
9801 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
9802 (build-system python-build-system)
9803 (arguments
9804 '(#:phases
9805 (modify-phases %standard-phases
9806 (replace 'check
9807 ;; Many tests fail, but the installation proceeds.
e59dd341 9808 (lambda _ (invoke "make" "-C" "test" "test"))))))
44d10b1f
RW
9809 (native-inputs
9810 `(("which" ,which))) ; required for tests
9811 (propagated-inputs
9812 `(("libarchive" ,libarchive)))
9813 (home-page "https://github.com/markokr/rarfile")
9814 (synopsis "RAR archive reader for Python")
9815 (description "This is Python module for RAR archive reading. The interface
9816is made as zipfile like as possible.")
9817 (license license:isc)))
9818
9819(define-public python2-rarfile
9820 (package-with-python2 python-rarfile))
9821
9822(define-public python-magic
9823 (package
9824 (name "python-magic")
9825 (version "0.4.15")
9826 (source
9827 (origin
9828 (method url-fetch)
9829 (uri (pypi-uri "python-magic" version))
9830 (sha256
9831 (base32
9832 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
9833 (file-name (string-append name "-" version "-checkout"))))
9834 (build-system python-build-system)
9835 (arguments
9836 ;; The tests are unreliable, so don't run them. The tests fail
9837 ;; under Python3 because they were written for Python2 and
9838 ;; contain import statements that do not work in Python3. One of
9839 ;; the tests fails under Python2 because its assertions are
9840 ;; overly stringent; it relies on comparing output strings which
9841 ;; are brittle and can change depending on the version of
9842 ;; libmagic being used and the system on which the test is
9843 ;; running. In my case, under GuixSD 0.10.0, only one test
9844 ;; failed, and it seems to have failed only because the version
9845 ;; of libmagic that is packaged in Guix outputs a slightly
9846 ;; different (but not wrong) string than the one that the test
9847 ;; expected.
9848 '(#:tests? #f
9849 #:phases (modify-phases %standard-phases
9850 ;; Replace a specific method call with a hard-coded
9851 ;; path to the necessary libmagic.so file in the
9852 ;; store. If we don't do this, then the method call
9853 ;; will fail to find the libmagic.so file, which in
9854 ;; turn will cause any application using
9855 ;; python-magic to fail.
9856 (add-before 'build 'hard-code-path-to-libmagic
9857 (lambda* (#:key inputs #:allow-other-keys)
9858 (let ((file (assoc-ref inputs "file")))
9859 (substitute* "magic.py"
9860 (("ctypes.util.find_library\\('magic'\\)")
9861 (string-append "'" file "/lib/libmagic.so'")))
9862 #t)))
9863 (add-before 'install 'disable-egg-compression
9864 (lambda _
9865 (let ((port (open-file "setup.cfg" "a")))
9866 (display "\n[easy_install]\nzip_ok = 0\n"
9867 port)
9868 (close-port port)
9869 #t))))))
9870 (inputs
9871 ;; python-magic needs to be able to find libmagic.so.
9872 `(("file" ,file)))
9873 (home-page
9874 "https://github.com/ahupp/python-magic")
9875 (synopsis
9876 "File type identification using libmagic")
9877 (description
9878 "This module uses ctypes to access the libmagic file type
9879identification library. It makes use of the local magic database and
9880supports both textual and MIME-type output. Note that this module and
9881the python-file module both provide a \"magic.py\" file; these two
9882modules, which are different and were developed separately, both serve
9883the same purpose: to provide Python bindings for libmagic.")
9884 (license license:expat)))
9885
9886(define-public python2-magic
9887 (package-with-python2 python-magic))
9888
9889(define-public python2-s3cmd
9890 (package
9891 (name "python2-s3cmd")
9892 (version "1.6.1")
9893 (source
9894 (origin
9895 (method url-fetch)
9896 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
9897 "s3cmd-" version ".tar.gz"))
9898 (sha256
9899 (base32
9900 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9901 (build-system python-build-system)
9902 (arguments
9903 ;; s3cmd is written for python2 only and contains no tests.
9904 `(#:python ,python-2
9905 #:tests? #f))
9906 (propagated-inputs
9907 `(("python2-dateutil" ,python2-dateutil)
9908 ;; The python-file package also provides a magic.py module.
9909 ;; This is an unfortunate state of affairs; however, s3cmd
9910 ;; fails to install if it cannot find specifically the
9911 ;; python-magic package. Thus we include it, instead of using
9912 ;; python-file. Ironically, s3cmd sometimes works better
9913 ;; without libmagic bindings at all:
9914 ;; https://github.com/s3tools/s3cmd/issues/198
9915 ("python2-magic" ,python2-magic)))
9916 (home-page "http://s3tools.org/s3cmd")
9917 (synopsis "Command line tool for S3-compatible storage services")
9918 (description
9919 "S3cmd is a command line tool for uploading, retrieving and managing data
9920in storage services that are compatible with the Amazon Simple Storage
9921Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9922GnuPG encryption, and more. It also supports management of Amazon's
9923CloudFront content delivery network.")
9924 (license license:gpl2+)))
9925
9926(define-public python-pkgconfig
9927 (package
9928 (name "python-pkgconfig")
9929 (version "1.3.1")
9930 (source
9931 (origin
9932 (method url-fetch)
9933 (uri (pypi-uri "pkgconfig" version))
9934 (sha256
9935 (base32
9936 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
9937 (build-system python-build-system)
9938 (native-inputs
9939 `(("python-nose" ,python-nose)))
9940 (inputs
9941 `(("pkg-config" ,pkg-config)))
9942 (arguments
9943 `(#:phases
9944 (modify-phases %standard-phases
9945 (add-before 'build 'patch
9946 ;; Hard-code the path to pkg-config.
9947 (lambda _
9948 (substitute* "pkgconfig/pkgconfig.py"
9949 (("cmd = 'pkg-config")
9950 (string-append "cmd = '" (which "pkg-config"))))
9951 #t))
9952 (replace 'check
9953 (lambda _
9954 (invoke "nosetests" "test.py"))))))
9955 (home-page "https://github.com/matze/pkgconfig")
9956 (synopsis "Python interface for pkg-config")
9957 (description "This module provides a Python interface to pkg-config. It
9958can be used to find all pkg-config packages, check if a package exists,
9959check if a package meets certain version requirements, query CFLAGS and
9960LDFLAGS and parse the output to build extensions with setup.py.")
9961 (license license:expat)))
9962
9963(define-public python2-pkgconfig
9964 (package-with-python2 python-pkgconfig))
9965
9966(define-public python-bz2file
9967 (package
9968 (name "python-bz2file")
9969 (version "0.98")
9970 (source
9971 (origin
9972 (method url-fetch)
9973 (uri (pypi-uri "bz2file" version))
9974 (sha256
9975 (base32
9976 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9977 (build-system python-build-system)
9978 (arguments
9979 `(#:tests? #f)) ; Tests use deprecated python modules.
9980 (home-page "https://github.com/nvawda/bz2file")
9981 (synopsis "Read and write bzip2-compressed files")
9982 (description
9983 "Bz2file is a Python library for reading and writing bzip2-compressed
9984files. It contains a drop-in replacement for the I/O interface in the
9985standard library's @code{bz2} module, including features from the latest
9986development version of CPython that are not available in older releases.")
9987 (license license:asl2.0)))
9988
9989(define-public python2-bz2file
9990 (package-with-python2 python-bz2file))
9991
9992(define-public python-future
9993 (package
9994 (name "python-future")
d5d54030 9995 (version "0.17.1")
44d10b1f
RW
9996 (source
9997 (origin
9998 (method url-fetch)
9999 (uri (pypi-uri "future" version))
10000 (sha256
10001 (base32
d5d54030 10002 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
44d10b1f
RW
10003 (build-system python-build-system)
10004 ;; Many tests connect to the network or are otherwise flawed.
10005 ;; https://github.com/PythonCharmers/python-future/issues/210
10006 (arguments
10007 `(#:tests? #f))
10008 (home-page "http://python-future.org")
10009 (synopsis "Single-source support for Python 3 and 2")
10010 (description
10011 "@code{python-future} is the missing compatibility layer between Python 2 and
10012Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
10013to support both Python 2 and Python 3 with minimal overhead.")
10014 (license license:expat)))
10015
10016(define-public python2-future
10017 (package-with-python2 python-future))
10018
10019(define-public python-cysignals
10020 (package
10021 (name "python-cysignals")
8e3e51df 10022 (version "1.9.0")
44d10b1f
RW
10023 (source
10024 (origin
10025 (method url-fetch)
8e3e51df 10026 (uri (pypi-uri "cysignals" version))
44d10b1f
RW
10027 (sha256
10028 (base32
8e3e51df 10029 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
44d10b1f
RW
10030 (build-system python-build-system)
10031 (native-inputs
10032 `(("python-cython" ,python-cython)
10033 ("python-sphinx" ,python-sphinx)))
10034 (inputs
10035 `(("pari-gp" ,pari-gp)))
10036 (arguments
10037 `(#:modules ((guix build python-build-system)
10038 ((guix build gnu-build-system) #:prefix gnu:)
10039 (guix build utils))
10040 ;; FIXME: Tests are executed after installation and currently fail
10041 ;; when not installing into standard locations; the author is working
10042 ;; on a fix.
10043 #:tests? #f
10044 #:phases
10045 (modify-phases %standard-phases
10046 (add-before
10047 'build 'configure
10048 (assoc-ref gnu:%standard-phases 'configure)))))
10049 (home-page
10050 "https://github.com/sagemath/cysignals")
10051 (synopsis
10052 "Handling of interrupts and signals for Cython")
10053 (description
10054 "The cysignals package provides mechanisms to handle interrupts (and
10055other signals and errors) in Cython code, using two related approaches,
10056for mixed Cython/Python code or external C libraries and pure Cython code,
10057respectively.")
10058 (license license:lgpl3+)))
10059
10060(define-public python2-cysignals
10061 (package-with-python2 python-cysignals))
10062
10063(define-public python2-shedskin
10064 (package
10065 (name "python2-shedskin")
10066 (version "0.9.4")
10067 (source
10068 (origin
10069 (method url-fetch)
10070 (uri (string-append "https://github.com/shedskin/shedskin/"
10071 "releases/download/v" version
10072 "/shedskin-" version ".tgz"))
10073 (sha256
10074 (base32
10075 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
10076 (build-system python-build-system)
10077 (arguments
10078 `(#:python ,python-2
10079 #:phases (modify-phases %standard-phases
10080 (add-after 'unpack 'fix-resulting-include-libs
10081 (lambda* (#:key inputs #:allow-other-keys)
10082 (let ((libgc (assoc-ref inputs "libgc"))
10083 (pcre (assoc-ref inputs "pcre")))
10084 (substitute* "shedskin/makefile.py"
10085 (("variable == 'CCFLAGS':[ ]*")
10086 (string-append "variable == 'CCFLAGS':\n"
10087 " line += ' -I " pcre "/include"
10088 " -I " libgc "/include'"))
10089 (("variable == 'LFLAGS':[ ]*")
10090 (string-append "variable == 'LFLAGS':\n"
10091 " line += ' -L" pcre "/lib"
10092 " -L " libgc "/lib'")))
10093 #t))))))
10094 (inputs `(("pcre" ,pcre)
10095 ("libgc" ,libgc)))
10096 (home-page "https://shedskin.github.io/")
10097 (synopsis "Experimental Python-2 to C++ Compiler")
10098 (description (string-append "This is an experimental compiler for a subset of
10099Python. It generates C++ code and a Makefile."))
10100 (license (list license:gpl3 license:bsd-3 license:expat))))
10101
10102(define-public python2-rope
10103 (package
10104 (name "python2-rope")
a9ba0a31 10105 (version "0.11.0")
44d10b1f
RW
10106 (source
10107 (origin
10108 (method url-fetch)
10109 (uri (pypi-uri "rope" version))
10110 (sha256
10111 (base32
a9ba0a31 10112 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
44d10b1f 10113 (arguments
afb29715 10114 ;; Rope has only partial python3 support, see `python-rope'
44d10b1f
RW
10115 `(#:python ,python-2))
10116 (build-system python-build-system)
10117 (native-inputs
10118 `(("python2-unittest2" ,python2-unittest2)))
10119 (home-page "https://github.com/python-rope/rope")
10120 (synopsis "Refactoring library for Python")
10121 (description "Rope is a refactoring library for Python. It facilitates
10122the renaming, moving and extracting of attributes, functions, modules, fields
10123and parameters in Python 2 source code. These refactorings can also be applied
10124to occurrences in strings and comments.")
10125 (license license:gpl2)))
10126
2c880ef4
LC
10127(define-public python-rope
10128 (package
10129 (inherit python2-rope)
10130 (name "python-rope")
10131 (arguments `(#:python ,python-wrapper
10132 ;; XXX: Only partial python3 support, results in some failing
10133 ;; tests: <https://github.com/python-rope/rope/issues/247>.
10134 #:tests? #f))
10135 (properties `((python2-variant . ,(delay python2-rope))))))
10136
44d10b1f
RW
10137(define-public python-py3status
10138 (package
10139 (name "python-py3status")
ef68b35d 10140 (version "3.21")
44d10b1f
RW
10141 (source
10142 (origin
10143 (method url-fetch)
10144 (uri (pypi-uri "py3status" version))
10145 (sha256
ef68b35d 10146 (base32 "16z8zq83hxy48g6hh4xczbdz50qvxv9k1aahr4fqq7jis60cc262"))))
44d10b1f
RW
10147 (build-system python-build-system)
10148 (inputs
10149 `(("file" ,file)))
10150 (arguments
10151 '(#:phases
10152 (modify-phases %standard-phases
10153 ;; 'file' is used for detection of configuration file encoding
10154 ;; let's make link the dependency to particular input
10155 (add-before 'build 'patch-file-path
10156 (lambda* (#:key inputs #:allow-other-keys)
10157 (let ((file-path (assoc-ref inputs "file")))
10158 (substitute* "py3status/parse_config.py"
10159 (("\\['file', '-b'")
10160 (string-append "['" file-path "/bin/file', '-b'")))
10161 #t))))
10162 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
10163 (home-page "https://github.com/ultrabug/py3status")
10164 (synopsis "Extensible i3status wrapper written in Python")
10165 (description "py3status is an i3status wrapper which extends i3status
10166functionality in a modular way, allowing you to extend your panel with your
10167own code, responding to click events and updating clock every second.")
10168 (license license:bsd-3)))
10169
10170(define-public python-tblib
10171 (package
10172 (name "python-tblib")
10173 (version "1.3.2")
10174 (source (origin
10175 (method url-fetch)
10176 (uri (pypi-uri "tblib" version))
10177 (sha256 (base32
10178 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
10179 (build-system python-build-system)
10180 (arguments
10181 `(#:phases
10182 (modify-phases %standard-phases
10183 (add-before 'check 'adjust-tests
10184 (lambda _
10185 (when (which "python3")
10186 ;; Adjust the example output to match that of Python 3.7:
10187 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
10188 (substitute* "README.rst"
10189 (("Exception\\('fail',") "Exception('fail'"))
10190 #t)))
10191 (replace 'check
10192 (lambda _
10193 ;; Upstream runs tests after installation and the package itself
10194 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
10195 ;; found.
10196 (setenv "PYTHONPATH"
10197 (string-append (getcwd) "/build/lib:"
10198 (getenv "PYTHONPATH")))
10199 (invoke "py.test" "-vv" "tests" "README.rst"))))))
10200 (native-inputs
10201 `(("python-pytest" ,python-pytest)
10202 ("python-six" ,python-six)))
10203 (home-page "https://github.com/ionelmc/python-tblib")
10204 (synopsis "Traceback serialization library")
10205 (description
10206 "Traceback serialization allows you to:
10207
10208@enumerate
10209@item Pickle tracebacks and raise exceptions with pickled tracebacks in
10210different processes. This allows better error handling when running code over
10211multiple processes (imagine multiprocessing, billiard, futures, celery etc).
10212
10213@item Parse traceback strings and raise with the parsed tracebacks.
10214@end enumerate\n")
10215 (license license:bsd-3)))
10216
10217(define-public python2-tblib
10218 (package-with-python2 python-tblib))
10219
10220(define-public python-greenlet
10221 (package
10222 (name "python-greenlet")
10223 (version "0.4.15")
10224 (source (origin
10225 (method url-fetch)
10226 (uri (pypi-uri "greenlet" version))
10227 (sha256
10228 (base32
10229 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
10230 (build-system python-build-system)
10231 (home-page "https://greenlet.readthedocs.io/")
10232 (synopsis "Lightweight in-process concurrent programming")
10233 (description
10234 "Greenlet package is a spin-off of Stackless, a version of CPython
10235that supports micro-threads called \"tasklets\". Tasklets run
10236pseudo-concurrently (typically in a single or a few OS-level threads) and
10237are synchronized with data exchanges on \"channels\".")
10238 (license (list license:psfl license:expat))))
10239
10240(define-public python2-greenlet
10241 (package-with-python2 python-greenlet))
10242
10243(define-public python-objgraph
10244 (package
10245 (name "python-objgraph")
10246 (version "3.4.0")
10247 (source
10248 (origin
10249 (method url-fetch)
10250 (uri (pypi-uri "objgraph" version))
10251 (sha256
10252 (base32
10253 "184m09am5gpbqfaiy7l0hwh476mczbrly1dffs0rw2p1d1i2q32a"))))
10254 (build-system python-build-system)
10255 (propagated-inputs
10256 `(("python-graphviz" ,python-graphviz)))
10257 (native-inputs
10258 `(("python-mock" ,python-mock)
10259 ("graphviz" ,graphviz)))
10260 (home-page "https://mg.pov.lt/objgraph/")
10261 (synopsis "Draw Python object reference graphs with graphviz")
10262 (description
10263 "This package provides tools to draw Python object reference graphs with
10264graphviz.")
10265 (license license:expat)))
10266
10267(define-public python-gevent
10268 (package
10269 (name "python-gevent")
10270 (version "1.3.7")
10271 (source (origin
10272 (method url-fetch)
10273 (uri (pypi-uri "gevent" version))
10274 (sha256
10275 (base32
10276 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
10277 (modules '((guix build utils)))
10278 (snippet
10279 '(begin
10280 ;; unbunding libev and c-ares
10281 (delete-file-recursively "deps")
10282 #t))))
10283 (build-system python-build-system)
10284 (arguments
10285 `(#:modules ((ice-9 ftw)
10286 (ice-9 match)
10287 (srfi srfi-26)
10288 (guix build utils)
10289 (guix build python-build-system))
10290 #:phases (modify-phases %standard-phases
44d10b1f
RW
10291 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
10292 (lambda _
10293 (substitute* "src/gevent/subprocess.py"
10294 (("/bin/sh") (which "sh")))
10295 (for-each (lambda (file)
10296 (substitute* file
10297 (("/bin/sh") (which "sh"))
10298 (("/bin/true") (which "true"))))
10299 (find-files "src/greentest" "\\.py$"))
10300 #t))
10301 (add-before 'build 'do-not-use-bundled-sources
10302 (lambda* (#:key inputs #:allow-other-keys)
10303 (setenv "CONFIG_SHELL" (which "bash"))
10304 (setenv "LIBEV_EMBED" "false")
10305 (setenv "CARES_EMBED" "false")
10306 (setenv "EMBED" "false")
10307
b5b56b7f
MB
10308 ;; Prevent building bundled libev.
10309 (substitute* "setup.py"
10310 (("run_make=_BUILDING")
10311 "run_make=False"))
10312
44d10b1f
RW
10313 (let ((greenlet (string-append
10314 (assoc-ref inputs "python-greenlet")
10315 "/include")))
10316 (match (scandir greenlet
10317 (lambda (item)
10318 (string-prefix? "python" item)))
10319 ((python)
b5b56b7f 10320 (setenv "C_INCLUDE_PATH"
44d10b1f
RW
10321 (string-append greenlet "/" python)))))
10322 #t))
10323 (add-before 'check 'skip-timer-test
10324 (lambda _
10325 ;; XXX: Skip 'TestTimerResolution', which appears to be
10326 ;; unreliable.
10327 (substitute* "src/greentest/test__core_timer.py"
10328 (("not greentest.RUNNING_ON_CI") "False"))
10329 #t))
10330 (replace 'check
10331 (lambda _
10332 ;; Make sure the build directory is on PYTHONPATH.
10333 (setenv "PYTHONPATH"
10334 (string-append
10335 (getenv "PYTHONPATH") ":"
10336 (getcwd) "/build/"
10337 (car (scandir "build" (cut string-prefix? "lib." <>)))))
10338 (with-directory-excursion "src/greentest"
10339 ;; XXX: Many tests require network access. Instead we only
10340 ;; run known-good tests. Unfortunately we cannot use
10341 ;; recursion here since this directory also contains
10342 ;; Python-version-specific subfolders.
10343 (apply invoke "python" "testrunner.py" "--config"
10344 "known_failures.py"
10345 (scandir "." (cut regexp-exec
10346 (make-regexp "test_+(subprocess|core)")
10347 <>)))))))))
10348 (propagated-inputs
10349 `(("python-greenlet" ,python-greenlet)
10350 ("python-objgraph" ,python-objgraph)))
10351 (native-inputs
b5b56b7f 10352 `(("python-six" ,python-six)))
44d10b1f
RW
10353 (inputs
10354 `(("c-ares" ,c-ares)
10355 ("libev" ,libev)))
10356 (home-page "http://www.gevent.org/")
10357 (synopsis "Coroutine-based network library")
10358 (description
10359 "gevent is a coroutine-based Python networking library that uses greenlet
10360to provide a high-level synchronous API on top of the libev event loop.")
10361 (license license:expat)
10362 (properties `((python2-variant . ,(delay python2-gevent))))))
10363
10364(define-public python2-gevent
10365 (let ((base (package-with-python2
10366 (strip-python2-variant python-gevent))))
10367 (package
10368 (inherit base)
10369 (native-inputs `(,@(package-native-inputs python-gevent)
10370 ("python-mock" ,python2-mock))))))
10371
10372(define-public python-fastimport
10373 (package
10374 (name "python-fastimport")
10375 (version "0.9.6")
10376 (source
10377 (origin
10378 (method url-fetch)
10379 (uri (pypi-uri "fastimport" version))
10380 (sha256
10381 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
10382 (build-system python-build-system)
10383 (home-page "https://github.com/jelmer/python-fastimport")
10384 (synopsis "VCS fastimport parser and generator in Python")
10385 (description "This package provides a parser for and generator of the Git
10386@url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
10387format.")
10388 (license license:gpl2+)))
10389
10390(define-public python2-fastimport
10391 (package-with-python2 python-fastimport))
10392
10393(define-public python-twisted
10394 (package
10395 (name "python-twisted")
fdfad2fc 10396 (version "19.7.0")
44d10b1f
RW
10397 (source (origin
10398 (method url-fetch)
10399 (uri (pypi-uri "Twisted" version ".tar.bz2"))
10400 (sha256
10401 (base32
fdfad2fc 10402 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
44d10b1f
RW
10403 (build-system python-build-system)
10404 (arguments
0107c9b8 10405 '(#:tests? #f)) ; FIXME: some tests fail
44d10b1f
RW
10406 (propagated-inputs
10407 `(("python-zope-interface" ,python-zope-interface)
52ca1c4a 10408 ("python-pyhamcrest" ,python-pyhamcrest)
44d10b1f 10409 ("python-incremental" ,python-incremental)
e5ba2fe3 10410 ("python-hyperlink" ,python-hyperlink)
44d10b1f
RW
10411 ("python-constantly" ,python-constantly)
10412 ("python-automat" ,python-automat)))
10413 (home-page "https://twistedmatrix.com/")
10414 (synopsis "Asynchronous networking framework written in Python")
10415 (description
10416 "Twisted is an extensible framework for Python programming, with special
10417focus on event-based network programming and multiprotocol integration.")
10418 (license license:expat)))
10419
10420(define-public python2-twisted
10421 (package-with-python2 python-twisted))
10422
10423(define-public python-pika
10424 (package
10425 (name "python-pika")
10426 (version "0.12.0")
10427 (source
10428 (origin
10429 (method url-fetch)
10430 (uri (pypi-uri "pika" version))
10431 (sha256
10432 (base32
10433 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
10434 (build-system python-build-system)
10435 (native-inputs
10436 `(("python-pyev" ,python-pyev)
10437 ("python-tornado" ,python-tornado)
10438 ("python-twisted" ,python-twisted)))
10439 (home-page "https://pika.readthedocs.org")
10440 (synopsis "Pure Python AMQP Client Library")
10441 (description
10442 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
10443Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
10444network support library.")
10445 (license license:bsd-3)))
10446
10447(define-public python2-pika
10448 (package-with-python2 python-pika))
10449
10450(define-public python-ply
10451 (package
10452 (name "python-ply")
10453 (version "3.10")
10454 (source
10455 (origin
10456 (method url-fetch)
10457 (uri (pypi-uri "ply" version))
10458 (sha256
10459 (base32
10460 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
10461 (build-system python-build-system)
10462 (home-page "http://www.dabeaz.com/ply/")
10463 (synopsis "Python Lex & Yacc")
10464 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
10465It uses LR parsing and does extensive error checking.")
10466 (license license:bsd-3)))
10467
10468(define-public python2-ply
10469 (package-with-python2 python-ply))
10470
10471(define-public python-tabulate
10472 (package
10473 (name "python-tabulate")
10474 (version "0.7.7")
10475 (source (origin
10476 (method url-fetch)
10477 (uri (pypi-uri "tabulate" version))
10478 (sha256
10479 (base32
10480 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
10481 (build-system python-build-system)
10482 (arguments
10483 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
10484 ;; and the latest release is not tagged in the upstream repository.
10485 '(#:tests? #f))
10486 (home-page "https://bitbucket.org/astanin/python-tabulate")
10487 (synopsis "Pretty-print tabular data")
10488 (description
10489 "Tabulate is a library and command-line utility to pretty-print tabular
10490data in Python.")
10491 (license license:expat)))
10492
10493(define-public python2-tabulate
10494 (package-with-python2 python-tabulate))
10495
10496(define-public python-kazoo
10497 (package
10498 (name "python-kazoo")
10499 (version "2.4.0")
10500 (source
10501 (origin
10502 (method url-fetch)
10503 (uri (pypi-uri "kazoo" version))
10504 (sha256
10505 (base32
10506 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
10507 (build-system python-build-system)
10508 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
10509 (propagated-inputs
10510 `(("python-six" ,python-six)))
10511 (home-page "https://kazoo.readthedocs.org")
10512 (synopsis "High-level Zookeeper client library")
10513 (description
10514 "Kazoo is a Python client library for the Apache Zookeeper distributed
10515application service. It is designed to be easy to use and to avoid common
10516programming errors.")
10517 (license license:asl2.0)))
10518
10519(define-public python2-kazoo
10520 (package-with-python2 python-kazoo))
10521
10522(define-public python-pykafka
10523 (package
10524 (name "python-pykafka")
10525 (version "2.4.0")
10526 (source (origin
10527 (method url-fetch)
0ca1d040 10528 (uri (pypi-uri "pykafka" version))
44d10b1f
RW
10529 (sha256
10530 (base32
10531 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10532 (build-system python-build-system)
10533 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
10534 (propagated-inputs
10535 `(("python-gevent" ,python-gevent)
10536 ("python-kazoo" ,python-kazoo)
10537 ("python-tabulate" ,python-tabulate)))
10538 (inputs
10539 `(("librdkafka" ,librdkafka)))
10540 (home-page "https://pykafka.readthedocs.io/")
10541 (synopsis "Apache Kafka client for Python")
10542 (description
10543 "PyKafka is a client for the Apache Kafka distributed messaging system.
10544It includes Python implementations of Kafka producers and consumers, which
10545are optionally backed by a C extension built on librdkafka.")
10546 (license license:asl2.0)))
10547
10548(define-public python2-pykafka
10549 (package-with-python2 python-pykafka))
10550
10551(define-public python-wcwidth
10552 (package
10553 (name "python-wcwidth")
10554 (version "0.1.7")
10555 (source
10556 (origin
10557 (method url-fetch)
10558 (uri (pypi-uri "wcwidth" version))
10559 (sha256
10560 (base32
10561 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
10562 (build-system python-build-system)
10563 (home-page "https://github.com/jquast/wcwidth")
10564 (synopsis "Measure number of terminal column cells of wide-character codes")
10565 (description "Wcwidth measures the number of terminal column cells of
10566wide-character codes. It is useful for those implementing a terminal emulator,
10567or programs that carefully produce output to be interpreted by one. It is a
10568Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10569specified in POSIX.1-2001 and POSIX.1-2008.")
10570 (license license:expat)))
10571
10572(define-public python2-wcwidth
10573 (package-with-python2 python-wcwidth))
10574
10575(define-public python2-jsonrpclib
10576 (package
10577 (name "python2-jsonrpclib")
10578 (version "0.1.7")
10579 (source (origin
10580 (method url-fetch)
6571bba0 10581 (uri (pypi-uri "jsonrpclib" version))
44d10b1f
RW
10582 (sha256
10583 (base32
10584 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10585 (build-system python-build-system)
10586 (arguments
10587 `(#:tests? #f
10588 #:python ,python-2))
10589 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10590 (synopsis "Implementation of JSON-RPC specification for Python")
10591 (description
10592 "This library is an implementation of the JSON-RPC specification.
10593It supports both the original 1.0 specification, as well as the
10594new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10595etc.")
10596 (license license:asl2.0)))
10597
10598(define-public python-chai
10599 (package
10600 (name "python-chai")
10601 (version "1.1.2")
10602 (source (origin
10603 (method url-fetch)
10604 (uri (pypi-uri "chai" version))
10605 (sha256
10606 (base32
10607 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
10608 (build-system python-build-system)
10609 (home-page "https://github.com/agoragames/chai")
10610 (synopsis "Mocking framework for Python")
10611 (description
10612 "Chai provides an api for mocking, stubbing and spying your python
10613objects, patterned after the Mocha library for Ruby.")
10614 (license license:bsd-3)))
10615
10616(define-public python2-chai
10617 (package-with-python2 python-chai))
10618
10619(define-public python-inflection
10620 (package
10621 (name "python-inflection")
10622 (version "0.3.1")
10623 (source
10624 (origin (method url-fetch)
10625 (uri (pypi-uri "inflection" version))
10626 (sha256
10627 (base32
10628 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10629 (build-system python-build-system)
10630 (native-inputs
10631 `(("python-pytest" ,python-pytest)))
10632 (home-page "https://github.com/jpvanhal/inflection")
10633 (synopsis "Python string transformation library")
10634 (description
10635 "Inflection is a string transformation library. It singularizes
10636and pluralizes English words, and transforms strings from CamelCase to
10637underscored string.")
10638 (license license:expat)))
10639
10640(define-public python2-inflection
10641 (package-with-python2 python-inflection))
10642
10643(define-public python-pylev
10644 (package
10645 (name "python-pylev")
10646 (version "1.3.0")
10647 (source (origin
10648 (method url-fetch)
10649 (uri (pypi-uri "pylev" version))
10650 (sha256
10651 (base32
10652 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10653 (build-system python-build-system)
10654 (home-page "https://github.com/toastdriven/pylev")
10655 (synopsis "Levenshtein distance implementation in Python")
10656 (description "Pure Python Levenshtein implementation, based off the
10657Wikipedia code samples at
10658@url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
10659 (license license:bsd-3)))
10660
10661(define-public python2-pylev
10662 (package-with-python2 python-pylev))
10663
10664(define-public python-cleo
10665 (package
10666 (name "python-cleo")
af2d3713 10667 (version "0.6.8")
44d10b1f
RW
10668 (source (origin
10669 (method url-fetch)
10670 (uri (pypi-uri "cleo" version))
10671 (sha256
10672 (base32
af2d3713 10673 "06zp695hq835rkaq6irr1ds1dp2qfzyf32v60vxpd8rcnxv319l5"))))
44d10b1f
RW
10674 (build-system python-build-system)
10675 (native-inputs
af2d3713 10676 `( ;; For testing
44d10b1f
RW
10677 ("python-mock" ,python-mock)
10678 ("python-pytest-mock" ,python-pytest-mock)
10679 ("python-pytest" ,python-pytest)))
10680 (propagated-inputs
10681 `(("python-backpack" ,python-backpack)
10682 ("python-pastel" ,python-pastel)
10683 ("python-pylev" ,python-pylev)))
10684 (home-page "https://github.com/sdispater/cleo")
10685 (synopsis "Command-line arguments library for Python")
10686 (description
10687 "Cleo allows you to create command-line commands with signature in
10688docstring and colored output.")
10689 (license license:expat)))
10690
10691(define-public python2-cleo
10692 (package-with-python2 python-cleo))
10693
2be85c45
TLC
10694(define-public python-tomlkit
10695 (package
10696 (name "python-tomlkit")
10697 (version "0.5.7")
10698 (source
10699 (origin
10700 (method url-fetch)
10701 (uri (pypi-uri "tomlkit" version))
10702 (sha256
10703 (base32
10704 "18820ga5z3if1w8dvykxrfm000akracq01ic402xrbljgbn5grn4"))))
10705 (build-system python-build-system)
10706 (native-inputs
10707 `(("python-pytest" ,python-pytest)))
10708 (home-page
10709 "https://github.com/sdispater/tomlkit")
10710 (synopsis "Style preserving TOML library")
10711 (description
10712 "TOML Kit is a 0.5.0-compliant TOML library. It includes a parser that
10713preserves all comments, indentations, whitespace and internal element ordering,
10714and makes them accessible and editable via an intuitive API. It can also
10715create new TOML documents from scratch using the provided helpers. Part of the
10716implementation as been adapted, improved and fixed from Molten.")
10717 (license license:expat)))
10718
0bb32201
TLC
10719(define-public python-shellingham
10720 (package
10721 (name "python-shellingham")
10722 (version "1.3.1")
10723 (source
10724 (origin
10725 (method url-fetch)
10726 (uri (pypi-uri "shellingham" version))
10727 (sha256
10728 (base32
10729 "1q7kws7w4x2hji3g7y0ni9ddk4sd676ylrb3db54gbpys6xj6nwq"))))
10730 (build-system python-build-system)
10731 (home-page
10732 "https://github.com/sarugaku/shellingham")
10733 (synopsis "Tool to detect surrounding shell")
10734 (description
10735 "Shellingham detects what shell the current Python executable is
10736running in.")
10737 (license license:isc)))
10738
aee92957
TLC
10739(define-public python-memcached
10740 (package
10741 (name "python-memcached")
10742 (version "1.59")
10743 (source
10744 (origin
10745 (method url-fetch)
10746 (uri (pypi-uri "python-memcached" version))
10747 (sha256
10748 (base32
10749 "0kvyapavbirk2x3n1jx4yb9nyigrj1s3x15nm3qhpvhkpqvqdqm2"))))
10750 (build-system python-build-system)
10751 (propagated-inputs `(("python-six" ,python-six)))
10752 (home-page
10753 "https://github.com/linsomniac/python-memcached")
10754 (synopsis "Pure python memcached client")
10755 (description
10756 "This software is a pure Python interface to the memcached memory cache
10757daemon. It is the client side software which allows storing values in one or
10758more, possibly remote, memcached servers.")
10759 (license license:psfl)))
10760
b2ac2508
TLC
10761(define-public python-clikit
10762 (package
10763 (name "python-clikit")
10764 (version "0.2.4")
10765 (source
10766 (origin
10767 (method url-fetch)
10768 (uri (pypi-uri "clikit" version))
10769 (sha256
10770 (base32
10771 "0dc8czib5f4j9px1ivcpqnmivnx2zjpc0xb00ldrhsqylks7r06n"))))
10772 (build-system python-build-system)
10773 (propagated-inputs
10774 `(("python-pastel" ,python-pastel)
10775 ("python-pylev" ,python-pylev)))
10776 (home-page "https://github.com/sdispater/clikit")
10777 (synopsis "Group of utilities to build command line interfaces")
10778 (description
10779 "CliKit is a group of utilities to build testable command line
10780interfaces.")
10781 (license license:expat)))
10782
c6f008d6
TLC
10783(define-public python-msgpack-python
10784 (package
10785 (name "python-msgpack-python")
10786 (version "0.5.6")
10787 (source
10788 (origin
10789 (method url-fetch)
10790 (uri (pypi-uri "msgpack-python" version))
10791 (sha256
10792 (base32
10793 "16wh8qgybmfh4pjp8vfv78mdlkxfmcasg78lzlnm6nslsfkci31p"))))
10794 (build-system python-build-system)
10795 (home-page "http://msgpack.org/")
10796 (synopsis "Package to deserialize messages in MessagePack binary format")
10797 (description
10798 "MessagePack is an efficient binary serialization format. It lets you
10799exchange data among multiple languages like JSON. But it's faster and
10800smaller. Small integers are encoded into a single byte, and typical short
10801strings require only one extra byte in addition to the strings themselves.")
10802 (license license:asl2.0)))
10803
badc1c63
TLC
10804(define-public python-cachy
10805 (package
10806 (name "python-cachy")
10807 (version "0.2.0")
10808 (source
10809 (origin
10810 (method url-fetch)
10811 (uri (pypi-uri "cachy" version))
10812 (sha256
10813 (base32
10814 "0v6mjyhgx6j7ya20bk69cr3gdzdkdf6psay0h090rscclgji65dp"))))
10815 (build-system python-build-system)
10816 (native-inputs
10817 `(("python-fakeredis" ,python-fakeredis)
10818 ("python-flexmock" ,python-flexmock)
10819 ("python-pytest" ,python-pytest)))
10820 (propagated-inputs
10821 `(("python-memcached" ,python-memcached)
10822 ("python-msgpack-python" ,python-msgpack-python)
10823 ("python-redis" ,python-redis)))
10824 (home-page "https://github.com/sdispater/cachy")
10825 (synopsis "Simple yet effective caching library")
10826 (description
10827 "Cachy provides a simple yet effective caching library. A simple but
10828powerful API: thread-safety; decorator syntax; support for memcached, redis,
10829database, file, dict stores. Cachy supports python versions 2.7+ and 3.2+.")
10830 (license license:expat)))
10831
617bb67b
TLC
10832(define-public poetry
10833 (package
10834 (name "poetry")
10835 (version "0.12.17")
10836 ;; Poetry can only be built from source with poetry.
10837 (source
10838 (origin
10839 (method url-fetch)
10840 (uri (pypi-uri "poetry" version))
10841 (sha256
10842 (base32
10843 "0gxwcd65qjmzqzppf53x51sic1rbcd9py6cdzx3aprppipimslvf"))))
10844 (build-system python-build-system)
10845 (arguments
10846 `(#:tests? #f ;; Pypi does not have tests.
10847 #:phases
10848 (modify-phases %standard-phases
10849 (replace 'build
10850 (lambda _
10851 ;; Bug in poetry https://github.com/sdispater/poetry/issues/866.
10852 (invoke "sed" "-i" "-e" "s/from distutils.core/from setuptools/"
10853 "setup.py")
10854 #t)))))
10855 (propagated-inputs
10856 `(("python-cachecontrol" ,python-cachecontrol)
10857 ("python-cachy" ,python-cachy)
10858 ("python-cleo" ,python-cleo)
10859 ("python-glob2" ,python-glob2)
10860 ("python-html5lib" ,python-html5lib)
10861 ("python-jsonschema" ,python-jsonschema)
10862 ("python-msgpack" ,python-msgpack)
10863 ("python-pathlib2" ,python-pathlib2)
10864 ("python-pkginfo" ,python-pkginfo)
10865 ("python-pyparsing" ,python-pyparsing)
10866 ("python-pyrsistent" ,python-pyrsistent)
10867 ("python-requests" ,python-requests)
10868 ("python-requests-toolbelt" ,python-requests-toolbelt)
10869 ("python-shellingham" ,python-shellingham)
10870 ("python-tomlkit" ,python-tomlkit)
10871 ("python-virtualenv" ,python-virtualenv)))
10872 (home-page "https://poetry.eustace.io/")
10873 (synopsis "Python dependency management and packaging made easy")
10874 (description "Poetry is a tool for dependency management and packaging
10875in Python. It allows you to declare the libraries your project depends on and
10876it will manage (install/update) them for you.")
10877 (license license:expat)))
10878
44d10b1f
RW
10879(define-public python-lazy-object-proxy
10880 (package
10881 (name "python-lazy-object-proxy")
7454078a 10882 (version "1.4.3")
44d10b1f
RW
10883 (source (origin
10884 (method url-fetch)
10885 (uri (pypi-uri "lazy-object-proxy" version))
10886 (sha256
10887 (base32
7454078a 10888 "1w1aaay424ciz8fz3fkzxb0pxzfxn184f2whpyn4fx72bn50x47k"))))
63d4873b
MO
10889 (native-inputs
10890 `(("python-setuptools-scm" ,python-setuptools-scm-3.3)))
44d10b1f
RW
10891 (build-system python-build-system)
10892 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10893 (synopsis "Lazy object proxy for python")
10894 (description
10895 "Lazy object proxy is an object that wraps a callable but defers the call
10896until the object is actually required, and caches the result of said call.")
10897 (license license:bsd-2)))
10898
10899(define-public python2-lazy-object-proxy
10900 (package-with-python2 python-lazy-object-proxy))
10901
10902(define-public python-dnspython
10903 (package
10904 (name "python-dnspython")
10905 (version "1.15.0")
10906 (source (origin
10907 (method url-fetch)
10908 (uri (string-append "http://www.dnspython.org/kits/"
10909 version "/dnspython-" version ".tar.gz"))
10910 (sha256
10911 (base32
10912 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
10913 (build-system python-build-system)
10914 (arguments '(#:tests? #f)) ; XXX: requires internet access
10915 (home-page "http://www.dnspython.org")
10916 (synopsis "DNS toolkit for Python")
10917 (description
10918 "dnspython is a DNS toolkit for Python. It supports almost all record
10919types. It can be used for queries, zone transfers, and dynamic updates.
10920It supports TSIG authenticated messages and EDNS0.")
10921 (license license:expat)))
10922
10923(define-public python2-dnspython
10924 (package-with-python2 python-dnspython))
10925
10926(define-public python-email-validator
10927 (package
10928 (name "python-email-validator")
10929 (version "1.0.2")
10930 (source
10931 (origin (method url-fetch)
10932 (uri (pypi-uri "email_validator" version))
10933 (sha256
10934 (base32
10935 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
10936 (build-system python-build-system)
10937 (arguments
10938 '(#:phases
10939 (modify-phases %standard-phases
10940 (add-before 'build 'use-dnspython
10941 (lambda _
10942 (substitute* "setup.py"
10943 (("dnspython3") "dnspython"))
10944 #t)))))
10945 (propagated-inputs
10946 `(("python-dnspython" ,python-dnspython)
10947 ("python-idna" ,python-idna)))
10948 (home-page "https://github.com/JoshData/python-email-validator")
10949 (synopsis "Email address validation library for Python")
10950 (description
10951 "This library validates email address syntax and deliverability.")
10952 (license license:cc0)))
10953
10954(define-public python2-email-validator
10955 (package-with-python2 python-email-validator))
10956
10957(define-public python-ukpostcodeparser
10958 (package
10959 (name "python-ukpostcodeparser")
10960 (version "1.0.3")
10961 (source (origin
10962 (method url-fetch)
10963 (uri (pypi-uri "UkPostcodeParser" version))
10964 (sha256
10965 (base32
10966 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10967 (build-system python-build-system)
10968 (home-page "https://github.com/hamstah/ukpostcodeparser")
10969 (synopsis "UK Postcode parser for Python")
10970 (description
10971 "This library provides the @code{parse_uk_postcode} function for
10972parsing UK postcodes.")
10973 (license license:expat)))
10974
10975(define-public python2-ukpostcodeparser
10976 (package-with-python2 python-ukpostcodeparser))
10977
10978(define-public python-faker
10979 (package
10980 (name "python-faker")
10981 (version "0.7.9")
10982 (source (origin
10983 (method url-fetch)
10984 (uri (pypi-uri "Faker" version))
10985 (sha256
10986 (base32
10987 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
10988 (patches
10989 (search-patches "python-faker-fix-build-32bit.patch"))
10990 (modules '((guix build utils)))
10991 (snippet
10992 '(begin
10993 (for-each delete-file (find-files "." "\\.pyc$"))
10994 #t))))
10995 (build-system python-build-system)
10996 (arguments
10997 '(#:phases
10998 (modify-phases %standard-phases
10999 (replace 'check
49ff8827 11000 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
44d10b1f
RW
11001 (native-inputs
11002 `(;; For testing
11003 ("python-email-validator" ,python-email-validator)
11004 ("python-mock" ,python-mock)
11005 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
11006 (propagated-inputs
11007 `(("python-dateutil" ,python-dateutil)
11008 ("python-six" ,python-six)))
11009 (home-page "https://github.com/joke2k/faker")
11010 (synopsis "Python package that generates fake data")
11011 (description
11012 "Faker is a Python package that generates fake data such as names,
11013addresses, and phone numbers.")
11014 (license license:expat)
11015 (properties `((python2-variant . ,(delay python2-faker))))))
11016
11017(define-public python2-faker
11018 (let ((base (package-with-python2 (strip-python2-variant
11019 python-faker))))
11020 (package
11021 (inherit base)
11022 (propagated-inputs
11023 `(("python2-ipaddress" ,python2-ipaddress)
11024 ,@(package-propagated-inputs base))))))
11025
11026(define-public python-pyaml
11027 (package
11028 (name "python-pyaml")
11029 (version "18.11.0")
11030 (source (origin
11031 (method url-fetch)
11032 (uri (pypi-uri "pyaml" version))
11033 (sha256
11034 (base32
11035 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
11036 (build-system python-build-system)
11037 (native-inputs
11038 `(("python-unidecode" ,python-unidecode)))
11039 (propagated-inputs
11040 `(("python-pyyaml" ,python-pyyaml)))
11041 (home-page "https://github.com/mk-fg/pretty-yaml")
11042 (synopsis "YAML pretty-print library for Python")
11043 (description
11044 "pyaml is a PyYAML based python module to produce pretty and readable
11045YAML-serialized data.")
492e3a7a 11046 (license license:wtfpl2)))
44d10b1f
RW
11047
11048(define-public python2-pyaml
11049 (package-with-python2 python-pyaml))
11050
11051(define-public python-backpack
11052 (package
11053 (name "python-backpack")
11054 (version "0.1")
11055 (source
11056 (origin
11057 (method url-fetch)
11058 (uri (pypi-uri "backpack" version))
11059 (sha256
11060 (base32
11061 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
11062 (build-system python-build-system)
11063 (native-inputs
11064 `(("python-pytest" ,python-pytest)
11065 ("python-nose" ,python-nose)))
11066 (propagated-inputs
11067 `(("python-simplejson" ,python-simplejson)))
11068 (home-page "https://github.com/sdispater/backpack")
11069 (synopsis "Utilities for working with Python collections")
11070 (description "Backpack provides some useful utilities for working with
11071collections of data.")
11072 (license license:expat)))
11073
11074(define-public python2-backpack
11075 (package-with-python2 python-backpack))
11076
11077(define-public python-prompt-toolkit
11078 (package
11079 (name "python-prompt-toolkit")
11080 (version "2.0.7")
11081 (source
11082 (origin
11083 (method url-fetch)
11084 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
11085 (sha256
11086 (base32
11087 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
11088 (build-system python-build-system)
11089 (arguments
11090 `(#:phases
11091 (modify-phases %standard-phases
11092 (delete 'check)
11093 (add-after 'install 'post-install-check
11094 (lambda* (#:key inputs outputs #:allow-other-keys)
11095 ;; HOME is needed for the test
11096 ;; "test_pathcompleter_can_expanduser".
11097 (setenv "HOME" "/tmp")
11098 (add-installed-pythonpath inputs outputs)
11099 (invoke "py.test"))))))
11100 (propagated-inputs
11101 `(("python-wcwidth" ,python-wcwidth)
11102 ("python-six" ,python-six)
11103 ("python-pygments" ,python-pygments)))
11104 (native-inputs
11105 `(("python-pytest" ,python-pytest)))
11106 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
11107 (synopsis "Library for building command line interfaces in Python")
11108 (description
11109 "Prompt-Toolkit is a library for building interactive command line
11110interfaces in Python. It's like GNU Readline but it also features syntax
11111highlighting while typing, out-of-the-box multi-line input editing, advanced
11112code completion, incremental search, support for Chinese double-width
11113characters, mouse support, and auto suggestions.")
11114 (license license:bsd-3)))
11115
11116(define-public python2-prompt-toolkit
11117 (package-with-python2 python-prompt-toolkit))
11118
11119(define-public python-prompt-toolkit-1
11120 (package (inherit python-prompt-toolkit)
11121 (version "1.0.15")
11122 (source
11123 (origin
11124 (method url-fetch)
11125 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
11126 (sha256
11127 (base32
11128 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
11129
11130(define-public python2-prompt-toolkit-1
11131 (package-with-python2 python-prompt-toolkit-1))
11132
11133(define-public python-jedi
11134 (package
11135 (name "python-jedi")
296e1aea 11136 (version "0.15.1")
44d10b1f
RW
11137 (source
11138 (origin
11139 (method url-fetch)
11140 (uri (pypi-uri "jedi" version))
11141 (sha256
11142 (base32
296e1aea 11143 "0bp4pxhsynaarbvzblsn5x32lzp29svy3sxfy8i6m5iwz9s9r1ds"))))
44d10b1f
RW
11144 (build-system python-build-system)
11145 (arguments
296e1aea 11146 `(#:phases
44d10b1f 11147 (modify-phases %standard-phases
296e1aea
MC
11148 (add-after 'unpack 'disable-file-completion-test
11149 ;; A single parameterized test currently fail (see:
11150 ;; https://github.com/davidhalter/jedi/issues/1395). Remove it.
11151 (lambda _
11152 (substitute* "test/test_api/test_completion.py"
11153 ((".*'example.py', 'rb\"' \\+ join\\('\\.\\.'.*") ""))
11154 #t))
44d10b1f 11155 (replace 'check
296e1aea
MC
11156 (lambda _
11157 (setenv "HOME" "/tmp")
11158 (invoke "python" "-m" "pytest"))))))
44d10b1f
RW
11159 (native-inputs
11160 `(("python-pytest" ,python-pytest)
11161 ("python-docopt" ,python-docopt)))
11162 (propagated-inputs
11163 `(("python-parso" ,python-parso)))
11164 (home-page "https://github.com/davidhalter/jedi")
11165 (synopsis "Autocompletion and static analysis library for Python")
11166 (description
11167 "Jedi is a static analysis tool for Python that can be used in Integrated
11168Development Environments (@dfn{IDE}s) and text editors. It understands Python
11169on a deeper level than many other static analysis frameworks for Python.
11170
11171Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
11172well.")
11173 (license license:expat)))
11174
11175(define-public python2-jedi
296e1aea 11176 (package-with-python2 python-jedi))
44d10b1f
RW
11177
11178(define-public ptpython
11179 (package
11180 (name "ptpython")
11181 (version "0.34")
11182 (source (origin
11183 (method url-fetch)
11184 (uri (pypi-uri "ptpython" version))
11185 (sha256
11186 (base32
11187 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
11188 (build-system python-build-system)
11189 (arguments
11190 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
11191 (propagated-inputs
11192 `(("python-docopt" ,python-docopt)
11193 ("python-jedi" ,python-jedi)
11194 ("python-prompt-toolkit" ,python-prompt-toolkit)
11195 ("python-pygments" ,python-pygments)))
11196 (home-page "https://github.com/jonathanslenders/ptpython")
11197 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
11198 (description
11199 "ptpython is a Python read-eval-print loop with IDE-like features.
11200It supports syntax highlighting, multiline editing, autocompletion, mouse,
11201color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
11202etc.")
11203 (license license:bsd-3)
11204 (properties `((python2-variant . ,(delay ptpython-2))))))
11205
11206(define-public ptpython-2
11207 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
11208 (package
11209 (inherit base)
11210 (name "ptpython2"))))
11211
11212(define-public python-stem
11213 (package
11214 (name "python-stem")
e746d1c3 11215 (version "1.7.1")
44d10b1f
RW
11216 (source
11217 (origin
11218 (method url-fetch)
11219 (uri (pypi-uri "stem" version))
11220 (sha256
11221 (base32
e746d1c3 11222 "18lc95pmc7i089nlsb06dsxyjl5wbhxfqgdxbjcia35ndh8z7sn9"))))
44d10b1f
RW
11223 (build-system python-build-system)
11224 (arguments
11225 `(#:phases
11226 (modify-phases %standard-phases
11227 (replace 'check
11228 (lambda _
11229 (invoke "./run_tests.py" "--unit")
11230 #t)))))
11231 (native-inputs
11232 `(("python-mock" ,python-mock)
11233 ("python-pycodestyle" ,python-pycodestyle)
11234 ("python-pyflakes" ,python-pyflakes)))
11235 (home-page "https://stem.torproject.org/")
11236 (synopsis
11237 "Python controller library that allows applications to interact with Tor")
11238 (description
11239 "Stem is a Python controller library for Tor. With it you can use Tor's
11240control protocol to script against the Tor process and read descriptor data
11241relays publish about themselves.")
11242 (license license:lgpl3)))
11243
11244(define-public python2-stem
11245 (package-with-python2 python-stem))
11246
11247(define-public python-pyserial
11248 (package
11249 (name "python-pyserial")
11250 (version "3.1.1")
11251 (source
11252 (origin
11253 (method url-fetch)
11254 (uri (pypi-uri "pyserial" version))
11255 (sha256
11256 (base32
11257 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
11258 (build-system python-build-system)
11259 (arguments
11260 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
11261 ;; #:phases
11262 ;; (modify-phases %standard-phases
11263 ;; (replace 'check
11264 ;; (lambda _
11265 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
11266 (home-page
11267 "https://github.com/pyserial/pyserial")
11268 (synopsis "Python Serial Port Bindings")
11269 (description "@code{pyserial} provide serial port bindings for Python. It
11270supports different byte sizes, stop bits, parity and flow control with RTS/CTS
11271and/or Xon/Xoff. The port is accessed in RAW mode.")
11272 (license license:bsd-3)))
11273
11274(define-public python2-pyserial
11275 (package-with-python2 python-pyserial))
11276
11277(define-public python-kivy
11278 (package
11279 (name "python-kivy")
11280 (version "1.10.1")
11281 (source
11282 (origin
11283 (method url-fetch)
11284 (uri (pypi-uri "Kivy" version))
11285 (file-name (string-append name "-" version ".tar.gz"))
11286 (sha256
11287 (base32
11288 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
11289 (build-system python-build-system)
11290 (arguments
11291 `(#:tests? #f ; Tests require many optional packages
11292 #:phases
11293 (modify-phases %standard-phases
11294 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
11295 (lambda* (#:key inputs #:allow-other-keys)
11296 (setenv "KIVY_SDL2_PATH"
11297 (string-append (assoc-ref inputs "sdl-union")
11298 "/include/SDL2"))
11299 #t)))))
11300 (native-inputs
11301 `(("git" ,git)
11302 ("pkg-config" ,pkg-config)
11303 ("python-cython" ,python-cython)))
11304 (inputs
11305 `(("gstreamer" ,gstreamer)
11306 ("mesa" ,mesa)
11307 ("sdl-union"
11308 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
11309 (home-page "http://kivy.org")
11310 (synopsis
11311 "Multitouch application framework")
11312 (description
11313 "A software library for rapid development of
11314hardware-accelerated multitouch applications.")
11315 (license license:expat)))
11316
11317(define-public python2-kivy
11318 (package-with-python2 python-kivy))
11319
11320(define-public python-kivy-next
11321 (deprecated-package "python-kivy-next" python-kivy))
11322
11323(define-public python2-kivy-next
11324 (deprecated-package "python2-kivy-next" python2-kivy))
11325
11326(define-public python-binaryornot
11327 (package
11328 (name "python-binaryornot")
11329 (version "0.4.4")
11330 (source (origin
11331 (method url-fetch)
11332 (uri (pypi-uri "binaryornot" version))
11333 (sha256
11334 (base32
11335 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
11336 (build-system python-build-system)
86723f98
DM
11337 (arguments
11338 `(#:phases
11339 (modify-phases %standard-phases
ee623903 11340 (add-after 'unpack 'patch-tests
86723f98
DM
11341 (lambda _
11342 ;; TypeError: binary() got an unexpected keyword argument
11343 ;; 'average_size'.
11344 (substitute* "tests/test_check.py"
11345 (("average_size=512") ""))
11346 #t)))))
44d10b1f
RW
11347 (propagated-inputs
11348 `(("python-chardet" ,python-chardet)
11349 ("python-hypothesis" ,python-hypothesis)))
11350 (home-page "https://github.com/audreyr/binaryornot")
11351 (synopsis "Package to check if a file is binary or text")
11352 (description "Ultra-lightweight pure Python package to check if a file is
11353binary or text.")
11354 (license license:bsd-3)
11355 (properties `((python2-variant . ,(delay python2-binaryornot))))))
11356
11357(define-public python2-binaryornot
11358 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
11359 (package (inherit base)
11360 (propagated-inputs
11361 `(("python2-enum34" ,python2-enum34)
11362 ,@(package-propagated-inputs base))))))
11363
f315673d
VC
11364(define-public python-binwalk
11365 (let ((commit "64201acfb5b0a9cdd9faa58c40a36dcff8612e29")
11366 (revision "0"))
11367 (package
11368 (name "python-binwalk")
11369 (version (git-version "2.1.1" revision commit))
11370 (source
11371 (origin
11372 (method git-fetch)
11373 (uri (git-reference
11374 (url "https://github.com/ReFirmLabs/binwalk")
11375 (commit commit)))
11376 (file-name (git-file-name name version))
11377 (sha256
11378 (base32
11379 "1z7ca6rfp887hw5jc3sb45mm4fa0xid4lsp2z8g4r590dr7k7w15"))))
11380 (build-system python-build-system)
11381 (arguments
11382 `(#:phases
11383 (modify-phases %standard-phases
11384 (add-before 'check 'set-pythonpath
11385 (lambda _
11386 (setenv "PYTHONPATH"
11387 (string-append
11388 (getcwd) "/src/"
11389 ":" (getenv "PYTHONPATH")))
11390 (setenv "HOME" "")
11391 #t)))))
11392 (native-inputs
11393 `(("python-coverage" ,python-coverage)
11394 ("python-nose" ,python-nose)))
11395 (home-page "https://github.com/ReFirmLabs/binwalk")
11396 (synopsis "Firmware analysis tool")
11397 (description "Binwalk is a tool for analyzing, reverse engineering, and extracting firmware images")
11398 (license license:expat))))
11399
44d10b1f
RW
11400(define-public python-nltk
11401 (package
11402 (name "python-nltk")
11403 (version "3.2.1")
11404 (source (origin
11405 (method url-fetch)
11406 (uri (pypi-uri "nltk" version))
11407 (sha256
11408 (base32
11409 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
11410 (build-system python-build-system)
11411 (arguments
11412 '(;; The tests require some extra resources to be downloaded.
11413 ;; TODO Try packaging these resources.
11414 #:tests? #f))
11415 (home-page "http://nltk.org/")
11416 (synopsis "Natural Language Toolkit")
11417 (description "It provides interfaces to over 50 corpora and lexical
11418resources such as WordNet, along with a suite of text processing libraries
11419for classification, tokenization, stemming, tagging, parsing, and semantic
11420reasoning, wrappers for natural language processing libraries.")
11421 (license license:asl2.0)))
11422
11423(define-public python2-nltk
11424 (package-with-python2 python-nltk))
11425
11426(define-public python-pymongo
11427 (package
11428 (name "python-pymongo")
11429 (version "3.7.2")
11430 (source (origin
11431 (method url-fetch)
11432 (uri (pypi-uri "pymongo" version))
11433 (sha256
11434 (base32
11435 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
11436 (build-system python-build-system)
11437 (propagated-inputs
11438 `(("python-certifi" ,python-certifi)))
11439 (home-page "https://github.com/mongodb/mongo-python-driver")
11440 (synopsis "Python driver for MongoDB")
11441 (description "Python driver for MongoDB.")
11442 (license license:asl2.0)))
11443
11444(define-public python2-pymongo
11445 (package-with-python2 python-pymongo))
11446
44d10b1f
RW
11447(define-public python-consul
11448 (package
11449 (name "python-consul")
11450 (version "0.6.1")
11451 (source
11452 (origin
11453 (method url-fetch)
11454 (uri (pypi-uri "python-consul" version))
11455 (sha256
11456 (base32
11457 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
11458 (build-system python-build-system)
11459 (arguments
11460 '(#:tests? #f)) ; The tests are not distributed
11461 (propagated-inputs
11462 `(("python-requests" ,python-requests)
11463 ("python-six" ,python-six)))
11464 (home-page "https://github.com/cablehead/python-consul")
11465 (synopsis "Python client for Consul")
11466 (description
11467 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
11468discovery, monitoring and configuration.")
11469 (license license:expat)))
11470
11471(define-public python2-consul
11472 (package-with-python2 python-consul))
11473
11474(define-public python-schematics
11475 (package
11476 (name "python-schematics")
11477 (version "1.1.1")
11478 (source
1961d187
TGR
11479 (origin
11480 (method git-fetch)
11481 (uri (git-reference
11482 (url "https://github.com/schematics/schematics.git")
11483 (commit (string-append "v" version))))
11484 (file-name (git-file-name name version))
11485 (sha256
11486 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
44d10b1f
RW
11487 (build-system python-build-system)
11488 (propagated-inputs
11489 `(("python-six" ,python-six)))
11490 (arguments
1961d187
TGR
11491 ;; The tests require a bunch of not very nice packages with fixed
11492 ;; version requirements (e.g. python-coveralls).
11493 `(#:tests? #f))
44d10b1f
RW
11494 (home-page "https://github.com/schematics/schematics")
11495 (synopsis "Python Data Structures for Humans")
11496 (description "Python Data Structures for Humans.")
11497 (license license:bsd-3)))
11498
11499(define-public python2-schematics
11500 (package-with-python2 python-schematics))
11501
11502(define-public python-odfpy
11503 (package
11504 (name "python-odfpy")
11505 (version "1.3.3")
11506 (source (origin
11507 (method url-fetch)
11508 (uri (pypi-uri "odfpy" version))
11509 (sha256
11510 (base32
11511 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
11512 (arguments
11513 `(#:modules ((srfi srfi-1)
11514 (guix build python-build-system)
11515 (guix build utils))
11516 #:phases
11517 (modify-phases %standard-phases
11518 (replace 'check
11519 ;; The test runner invokes python2 and python3 for test*.py.
11520 ;; To avoid having both in inputs, we replicate it here.
11521 (lambda _
21ccc01d
RW
11522 (for-each (lambda (test-file) (invoke "python" test-file))
11523 (find-files "tests" "^test.*\\.py$"))
11524 #t)))))
44d10b1f
RW
11525 (build-system python-build-system)
11526 (home-page "https://github.com/eea/odfpy")
11527 (synopsis "Python API and tools to manipulate OpenDocument files")
11528 (description "Collection of libraries and utility programs written in
11529Python to manipulate OpenDocument 1.2 files.")
11530 (license
11531 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
11532 ;; number of files with other licenses.
11533 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
11534
11535(define-public python2-odfpy
11536 (package-with-python2 python-odfpy))
11537
11538(define-public python-natsort
11539 (package
11540 (name "python-natsort")
11541 (version "5.4.1")
11542 (source (origin
11543 (method url-fetch)
11544 (uri (pypi-uri "natsort" version))
11545 (sha256
11546 (base32
11547 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
11548 (build-system python-build-system)
11549 (arguments
11550 `(#:modules ((guix build utils)
11551 (guix build python-build-system)
11552 (srfi srfi-1)
11553 (srfi srfi-26)
11554 (ice-9 ftw))
11555 #:phases
11556 (modify-phases %standard-phases
11557 (add-before 'check 'set-cachedir
11558 ;; Tests require write access to $HOME by default
11559 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
11560 (replace 'check
11561 (lambda _
11562 (let ((cwd (getcwd)))
11563 (setenv "PYTHONPATH"
11564 (string-append
11565 cwd "/build/"
11566 (find (cut string-prefix? "lib" <>)
11567 (scandir (string-append cwd "/build")))
11568 ":"
11569 (getenv "PYTHONPATH")))
11570 (invoke "pytest" "-v")))))))
11571 (native-inputs
11572 `(("python-hypothesis" ,python-hypothesis)
11573 ("python-pytest-cov" ,python-pytest-cov)
11574 ("python-pytest-mock" ,python-pytest-mock)
11575 ("python-pytest" ,python-pytest)))
11576 (propagated-inputs ; TODO: Add python-fastnumbers.
11577 `(("python-pyicu" ,python-pyicu)))
11578 (home-page "https://github.com/SethMMorton/natsort")
11579 (synopsis "Natural sorting for python and shell")
11580 (description
11581 "Natsort lets you apply natural sorting on lists instead of
11582lexicographical. If you use the built-in @code{sorted} method in python
36a4366d
EF
11583on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
11584@code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
11585@code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
11586identifies numbers and sorts them separately from strings. It can also sort
11587version numbers, real numbers, mixed types and more, and comes with a shell
11588command @command{natsort} that exposes this functionality in the command line.")
44d10b1f
RW
11589 (license license:expat)
11590 (properties `((python2-variant . ,(delay python2-natsort))))))
11591
11592(define-public python2-natsort
11593 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
11594 (package (inherit base)
11595 (native-inputs
11596 `(("python2-pathlib" ,python2-pathlib)
11597 ,@(package-native-inputs base))))))
11598
11599(define-public python-glances
11600 (package
11601 (name "python-glances")
9898a2d3 11602 (version "3.1.1")
44d10b1f
RW
11603 (source
11604 (origin
11605 (method url-fetch)
11606 (uri (pypi-uri "Glances" version))
11607 (sha256
11608 (base32
15b4c911
TGR
11609 "07j1ggzsqiskyz1i4mrnyr9i95v0dqi0i0hibnv1l188km8shmi8"))
11610 (modules '((guix build utils)))
11611 (snippet
11612 '(begin
11613 ;; Glances phones PyPI for weekly update checks by default.
11614 ;; Disable these. The user can re-enable them if desired.
11615 (substitute* "glances/outdated.py"
11616 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
11617 (string-append indentation
11618 "self.args.disable_check_update = True\n"
11619 line)))
11620 #t))))
44d10b1f
RW
11621 (build-system python-build-system)
11622 (propagated-inputs
9898a2d3
TGR
11623 `(("python-future" ,python-future)
11624 ("python-psutil" ,python-psutil)))
44d10b1f
RW
11625 (home-page
11626 "https://github.com/nicolargo/glances")
bab94ffa 11627 (synopsis "Cross-platform curses-based monitoring tool")
44d10b1f
RW
11628 (description
11629 "Glances is a curses-based monitoring tool for a wide variety of platforms.
bab94ffa
TGR
11630Glances uses the PsUtil library to get information from your system. It
11631monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
44d10b1f
RW
11632 (license license:lgpl3+)))
11633
11634(define-public python2-glances
11635 (package-with-python2 python-glances))
11636
11637(define-public python-graphql-core
11638 (package
11639 (name "python-graphql-core")
11640 (version "0.5.3")
11641 (source
11642 (origin
11643 (method url-fetch)
11644 (uri (pypi-uri "graphql-core" version))
11645 (sha256
11646 (base32
11647 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
11648 (build-system python-build-system)
11649 (arguments
11650 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
11651 #:phases
11652 (modify-phases %standard-phases
11653 (add-after 'unpack 'patch-hardcoded-version
11654 (lambda _ (substitute*
11655 "setup.py"
11656 (("'gevent==1.1rc1'") "'gevent'"))
11657 #t)))))
11658 (native-inputs
11659 `(("python-gevent" ,python-gevent)
11660 ("python-mock" ,python-mock)
11661 ("python-pytest-mock" ,python-pytest-mock)))
11662 (propagated-inputs
11663 `(("python-promise" ,python-promise)
11664 ("python-six" ,python-six)))
11665 (home-page "https://github.com/graphql-python/graphql-core")
11666 (synopsis "GraphQL implementation for Python")
11667 (description
11668 "GraphQL implementation for Python. GraphQL is a data query language and
11669runtime designed and used to request and deliver data to mobile and web apps.
11670This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
11671to Python.")
11672 (license license:expat)))
11673
11674(define-public python2-graphql-core
11675 (package-with-python2 python-graphql-core))
11676
11677(define-public python-graphql-relay
11678 (package
11679 (name "python-graphql-relay")
11680 (version "0.4.5")
11681 (source
11682 (origin
11683 (method url-fetch)
11684 (uri (pypi-uri "graphql-relay" version))
11685 (sha256
11686 (base32
11687 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
11688 (build-system python-build-system)
11689 (arguments
11690 '(#:tests? #f)) ; The tests are not distributed
11691 (propagated-inputs
11692 `(("python-graphql-core" ,python-graphql-core)
11693 ("python-promise" ,python-promise)
11694 ("python-six" ,python-six)))
11695 (home-page "https://github.com/graphql-python/graphql-relay-py")
11696 (synopsis "Relay implementation for Python")
11697 (description
11698 "This is a library to allow the easy creation of Relay-compliant servers
11699using the GraphQL Python reference implementation of a GraphQL server. It
11700should be noted that the code is a exact port of the original
11701@url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11702from Facebook.")
11703 (license license:expat)))
11704
11705(define-public python2-graphql-relay
11706 (package-with-python2 python-graphql-relay))
11707
11708(define-public python-graphene
11709 (package
11710 (name "python-graphene")
11711 (version "0.10.2")
11712 (source
11713 (origin
11714 (method url-fetch)
11715 (uri (pypi-uri "graphene" version))
11716 (sha256
11717 (base32
11718 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11719 (build-system python-build-system)
11720 (propagated-inputs
11721 `(("python-graphql-core" ,python-graphql-core)
11722 ("python-graphql-relay" ,python-graphql-relay)
11723 ("python-iso8601" ,python-iso8601)
11724 ("python-promise" ,python-promise)
11725 ("python-six" ,python-six)))
11726 (arguments
11727 `(#:tests? #f)) ; no tests/ in the PyPI tarball
11728 (home-page "http://graphene-python.org/")
11729 (synopsis "GraphQL Framework for Python")
11730 (description
11731 "Graphene is a Python library for building GraphQL schemas/types.
11732A GraphQL schema describes your data model, and provides a GraphQL server
11733with an associated set of resolve methods that know how to fetch data.")
11734 (properties `((python2-variant . ,(delay python2-graphene))))
11735 (license license:expat)))
11736
11737(define-public python2-graphene
11738 (let ((base (package-with-python2
11739 (strip-python2-variant python-graphene))))
11740 (package (inherit base)
11741 (native-inputs
11742 `(("python2-sqlalchemy" ,python2-sqlalchemy)
11743 ,@(package-native-inputs base))))))
11744
11745(define-public python-nautilus
11746 (package
11747 (name "python-nautilus")
11748 (version "0.4.9")
11749 (source
11750 (origin
11751 (method url-fetch)
11752 (uri (pypi-uri "nautilus" version))
11753 (sha256
11754 (base32
11755 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11756 (build-system python-build-system)
11757 (arguments `(#:tests? #f)) ; fails to import test modules
11758 (propagated-inputs
11759 `(("python-bcrypt" ,python-bcrypt)
11760 ("python-click" ,python-click)
11761 ("python-consul" ,python-consul)
11762 ("python-graphene" ,python-graphene)
11763 ("python-jinja2" ,python-jinja2)
11764 ("python-peewee" ,python-peewee)
11765 ("python-pika" ,python-pika)
11766 ("python-tornado" ,python-tornado)
11767 ("python-wtforms" ,python-wtforms)))
11768 (native-inputs
11769 `(("python-nose2" ,python-nose2)))
11770 (home-page "https://github.com/AlecAivazis/nautilus")
11771 (synopsis "Library for creating microservice applications")
11772 (description
11773 "Nautilus is a framework for flux based microservices that looks to
11774provide extendible implementations of common aspects of a cloud so that you can
11775focus on building massively scalable web applications.")
11776 (license license:expat)))
11777
11778(define-public python-snowballstemmer
11779 (package
11780 (name "python-snowballstemmer")
11781 (version "1.2.1")
11782 (source (origin
11783 (method url-fetch)
11784 (uri (pypi-uri "snowballstemmer" version))
11785 (sha256
11786 (base32
11787 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
11788 (build-system python-build-system)
11789 (arguments
11790 `(;; No tests exist
11791 #:tests? #f))
11792 (home-page "https://github.com/shibukawa/snowball_py")
11793 (synopsis "Snowball stemming library collection for Python")
11794 (description "This package provides 16 word stemmer algorithms generated
11795from Snowball algorithms. It includes the 15 original ones plus the Poerter
11796English stemmer.")
11797 (license license:bsd-3)))
11798
11799(define-public python2-snowballstemmer
11800 (package-with-python2 python-snowballstemmer))
11801
44d10b1f
RW
11802(define-public python-setproctitle
11803(package
11804 (name "python-setproctitle")
11805 (version "1.1.10")
11806 (source
11807 (origin
11808 (method url-fetch)
11809 (uri (pypi-uri "setproctitle" version))
11810 (sha256
11811 (base32
11812 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11813 (build-system python-build-system)
11814 (arguments
11815 '(#:phases
11816 (modify-phases %standard-phases
11817 (add-before 'check 'patch-Makefile
11818 ;; Stricly this is only required for the python2 variant.
11819 ;; But adding a phase in an inherited package seems to be
11820 ;; cumbersum. So we patch even for python3.
11821 (lambda _
11822 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11823 (when nose
11824 (substitute* "Makefile"
11825 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11826 (string-append nose "/bin/nosetests "))))
11827 #t)))
11828 (replace 'check
11829 (lambda _
11830 (setenv "PYTHON" (or (which "python3") (which "python")))
11831 (setenv "PYCONFIG" (or (which "python3-config")
11832 (which "python-config")))
11833 (setenv "CC" "gcc")
11834 ;; No need to extend PYTHONPATH to find the built package, since
11835 ;; the Makefile will build anyway
11836 (invoke "make" "check"))))))
11837 (native-inputs
11838 `(("procps" ,procps))) ; required for tests
11839 (home-page
11840 "https://github.com/dvarrazzo/py-setproctitle")
11841 (synopsis
11842 "Setproctitle implementation for Python to customize the process title")
11843 (description "The library allows a process to change its title (as displayed
11844by system tools such as ps and top).
11845
11846Changing the title is mostly useful in multi-process systems, for
11847example when a master process is forked: changing the children's title
11848allows to identify the task each process is busy with. The technique
11849is used by PostgreSQL and the OpenSSH Server for example.")
11850 (license license:bsd-3)
11851 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11852
11853(define-public python2-setproctitle
11854 (let ((base (package-with-python2
11855 (strip-python2-variant python-setproctitle))))
11856 (package
11857 (inherit base)
11858 (native-inputs `(("python2-nose" ,python2-nose)
11859 ,@(package-native-inputs base))))))
11860
11861(define-public python-validictory
11862 (package
11863 (name "python-validictory")
11864 (version "1.0.1")
11865 (source
11866 (origin
11867 (method url-fetch)
11868 (uri (pypi-uri "validictory" version))
11869 (sha256
11870 (base32
11871 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11872 (build-system python-build-system)
11873 (arguments
11874 '(#:phases
11875 (modify-phases %standard-phases
11876 (add-after 'unpack 'bootstrap
11877 ;; Move the tests out of the package directory to avoid
11878 ;; packaging them.
11879 (lambda* _
11880 (rename-file "validictory/tests" "tests")
11881 (delete-file "tests/__init__.py")))
11882 (replace 'check
11883 (lambda _
11884 ;; Extend PYTHONPATH so the built package will be found.
11885 (setenv "PYTHONPATH"
11886 (string-append (getcwd) "/build/lib:"
11887 (getenv "PYTHONPATH")))
6568bd5d 11888 (invoke "py.test" "-vv" ))))))
44d10b1f
RW
11889 (native-inputs
11890 `(("python-pytest" ,python-pytest)))
11891 (home-page
11892 "https://github.com/jamesturk/validictory")
11893 (synopsis "General purpose Python data validator")
11894 (description "It allows validation of arbitrary Python data structures.
11895
11896The schema format is based on the JSON Schema
11897proposal (http://json-schema.org), so combined with json the library is also
11898useful as a validator for JSON data.")
11899 (license license:expat)))
11900
11901(define-public python2-validictory
11902 (package-with-python2 python-validictory))
11903
11904(define-public python-pyelftools
11905 (package
11906 (name "python-pyelftools")
11907 (version "0.25")
11908 (source
11909 (origin
11910 (method url-fetch)
11911 (uri (pypi-uri "pyelftools" version))
11912 (sha256
11913 (base32
11914 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
11915 (build-system python-build-system)
11916 (arguments
11917 `(#:phases
11918 (modify-phases %standard-phases
11919 (add-before 'check 'set-pythonpath
11920 (lambda _
11921 (setenv "PYTHONPATH"
11922 (string-append
11923 (getcwd) "/test/"
11924 ":" (getenv "PYTHONPATH")))
11925 #t)))))
11926 (home-page
11927 "https://github.com/eliben/pyelftools")
11928 (synopsis
11929 "Analyze binary and library file information")
11930 (description "This Python library provides interfaces for parsing and
11931analyzing two binary and library file formats; the Executable and Linking
11932Format (ELF), and debugging information in the Debugging With Attributed
11933Record Format (DWARF).")
11934 (license license:public-domain)))
11935
11936(define-public python-pyev
11937 (package
11938 (name "python-pyev")
11939 (version "0.9.0")
11940 (source
11941 (origin
11942 (method url-fetch)
11943 (uri (pypi-uri "pyev" version))
11944 (sha256
11945 (base32
11946 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11947 (build-system python-build-system)
11948 (arguments
11949 `(#:tests? #f ; no test suite
11950 #:phases
11951 (modify-phases %standard-phases
11952 (add-after 'unpack 'patch
11953 (lambda* (#:key inputs #:allow-other-keys)
11954 (let ((libev (string-append (assoc-ref inputs "libev")
11955 "/lib/libev.so.4")))
11956 (substitute* "setup.py"
11957 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
11958 (string-append "libev_dll_name = \"" libev "\"")))))))))
11959 (inputs
11960 `(("libev" ,libev)))
11961 (home-page "http://pythonhosted.org/pyev/")
11962 (synopsis "Python libev interface")
11963 (description "Pyev provides a Python interface to libev.")
11964 (license license:gpl3)))
11965
11966(define-public python2-pyev
11967 (package-with-python2 python-pyev))
11968
11969(define-public python-imagesize
11970 (package
11971 (name "python-imagesize")
11972 (version "1.1.0")
11973 (source
11974 (origin
11975 (method url-fetch)
11976 (uri (pypi-uri "imagesize" version))
11977 (sha256
11978 (base32
11979 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
11980 (build-system python-build-system)
11981 (home-page "https://github.com/shibukawa/imagesize_py")
11982 (synopsis "Gets image size of files in various formats in Python")
11983 (description
11984 "This package allows determination of image size from
11985PNG, JPEG, JPEG2000 and GIF files in pure Python.")
11986 (license license:expat)))
11987
11988(define-public python2-imagesize
11989 (package-with-python2 python-imagesize))
11990
11991(define-public python-termstyle
11992 (package
11993 (name "python-termstyle")
11994 (version "0.1.11")
11995 (source
11996 (origin
11997 (method url-fetch)
11998 (uri (pypi-uri "termstyle" version))
11999 (sha256
12000 (base32
12001 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
12002 (build-system python-build-system)
12003 (arguments
12004 '(#:phases
12005 (modify-phases %standard-phases
12006 (replace 'check
12007 (lambda _
831080a6 12008 (invoke "python" "test3.py"))))))
44d10b1f
RW
12009 (home-page "https://github.com/gfxmonk/termstyle")
12010 (synopsis "Console text coloring for Python")
12011 (description "This package provides console text coloring for Python.")
12012 (license license:bsd-3)))
12013
12014(define-public python-argcomplete
12015 (package
12016 (name "python-argcomplete")
12017 (version "1.7.0")
12018 (source
12019 (origin
12020 (method url-fetch)
12021 (uri (pypi-uri "argcomplete" version))
12022 (sha256
12023 (base32
12024 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
12025 (build-system python-build-system)
12026 (native-inputs
12027 `(("python-pexpect" ,python-pexpect)
12028 ("tcsh" ,tcsh)
12029 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
12030 (home-page "https://github.com/kislyuk/argcomplete")
12031 (synopsis "Shell tab completion for Python argparse")
12032 (description "argcomplete provides extensible command line tab completion
12033of arguments and options for Python scripts using @code{argparse}. It's
12034particularly useful for programs with many options or sub-parsers that can
12035dynamically suggest completions; for example, when browsing resources over the
12036network.")
12037 (license license:asl2.0)))
12038
12039(define-public python2-argcomplete
12040 (package-with-python2 python-argcomplete))
12041
12042(define-public python-xopen
12043 (package
12044 (name "python-xopen")
24d64989 12045 (version "0.5.0")
44d10b1f
RW
12046 (source
12047 (origin
12048 (method url-fetch)
12049 (uri (pypi-uri "xopen" version))
12050 (sha256
12051 (base32
24d64989 12052 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
44d10b1f 12053 (build-system python-build-system)
24d64989
RW
12054 (propagated-inputs
12055 `(("python-setuptools-scm" ,python-setuptools-scm)))
44d10b1f
RW
12056 (home-page "https://github.com/marcelm/xopen/")
12057 (synopsis "Open compressed files transparently")
12058 (description "This module provides an @code{xopen} function that works like
12059Python's built-in @code{open} function, but can also deal with compressed files.
12060Supported compression formats are gzip, bzip2 and, xz, and are automatically
12061recognized by their file extensions. The focus is on being as efficient as
12062possible on all supported Python versions.")
12063 (license license:expat)))
12064
12065(define-public python2-xopen
12066 (let ((base (package-with-python2
12067 (strip-python2-variant python-xopen))))
12068 (package
12069 (inherit base)
12070 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
12071 ,@(package-propagated-inputs base))))))
12072
12073(define-public python-cheetah
12074 (package
12075 (name "python-cheetah")
12076 (version "3.1.0")
12077 (source
12078 (origin
12079 (method url-fetch)
12080 (uri (pypi-uri "Cheetah3" version))
12081 (sha256
12082 (base32
12083 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
12084 (build-system python-build-system)
12085 (arguments
12086 `(#:modules ((guix build utils)
12087 (guix build python-build-system)
12088 (ice-9 ftw)
12089 (srfi srfi-1)
12090 (srfi srfi-26))
12091 #:phases (modify-phases %standard-phases
12092 (add-after 'unpack 'use-absolute-python
12093 (lambda _
12094 (substitute* "Cheetah/CheetahWrapper.py"
12095 (("#!/usr/bin/env python")
12096 (string-append "#!" (which "python"))))
12097 #t))
12098 (replace 'check
12099 (lambda _
12100 (let ((cwd (getcwd)))
12101 (setenv "PYTHONPATH"
12102 (string-append
12103 cwd "/build/"
12104 (find (cut string-prefix? "lib" <>)
12105 (scandir (string-append cwd "/build")))
12106 ":" (getenv "PYTHONPATH")))
12107 (setenv "PATH"
12108 (string-append (getenv "PATH")
12109 ":" cwd "/bin"))
12110 (setenv "TMPDIR" "/tmp")
12111
12112 (substitute* "Cheetah/Tests/Test.py"
12113 (("unittest.TextTestRunner\\(\\)")
12114 "unittest.TextTestRunner(verbosity=2)"))
12115
12116 (invoke "python" "Cheetah/Tests/Test.py")))))))
12117 (propagated-inputs
12118 `(("python-markdown" ,python-markdown))) ;optional
12119 (home-page "http://cheetahtemplate.org/")
12120 (synopsis "Template engine")
12121 (description "Cheetah is a text-based template engine and Python code
12122generator.
12123
12124Cheetah can be used as a standalone templating utility or referenced as
12125a library from other Python applications. It has many potential uses,
12126but web developers looking for a viable alternative to ASP, JSP, PHP and
12127PSP are expected to be its principle user group.
12128
12129Features:
12130@enumerate
12131@item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
12132 text-based format.
12133@item Cleanly separates content, graphic design, and program code.
12134@item Blends the power and flexibility of Python with a simple template language
12135 that non-programmers can understand.
12136@item Gives template writers full access to any Python data structure, module,
12137 function, object, or method in their templates.
12138@item Makes code reuse easy by providing an object-orientated interface to
12139 templates that is accessible from Python code or other Cheetah templates.
12140 One template can subclass another and selectively reimplement sections of it.
12141@item Provides a simple, yet powerful, caching mechanism that can dramatically
12142 improve the performance of a dynamic website.
12143@item Compiles templates into optimized, yet readable, Python code.
12144@end enumerate")
12145 (license (license:x11-style "file://LICENSE"))))
12146
12147(define-public python2-cheetah
12148 (package-with-python2 python-cheetah))
12149
12150(define-public python-dulwich
12151 (package
12152 (name "python-dulwich")
12153 (version "0.18.6")
12154 (source
12155 (origin
12156 (method url-fetch)
12157 (uri (list (string-append "https://www.dulwich.io/releases/"
12158 "dulwich-" version ".tar.gz")
12159 (pypi-uri "dulwich" version)))
12160 (sha256
12161 (base32
12162 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
12163 (build-system python-build-system)
12164 (arguments
12165 `(#:phases
12166 (modify-phases %standard-phases
12167 (add-before 'check 'fix-tests
12168 (lambda* (#:key inputs #:allow-other-keys)
12169 ;; The tests use Popen with a custom environment which doesn't
12170 ;; include PATH.
12171 (substitute* "dulwich/tests/compat/utils.py"
12172 (("'git'") (string-append "'"
12173 (which "git")
12174 "'")))
12175 (substitute* '("dulwich/tests/test_repository.py"
12176 "dulwich/tests/test_hooks.py")
12177 (("#!/bin/sh") (string-append "#!" (which "sh"))))
12178 (setenv "TEST_RUNNER" "unittest")
12179 (setenv "PYTHONHASHSEED" "random")
12180 #t)))))
12181 (propagated-inputs
12182 `(("python-fastimport" ,python-fastimport)))
12183 (native-inputs
12184 `(("python-mock" ,python-mock)
12185 ("python-geventhttpclient" ,python-geventhttpclient)
12186 ("git" ,git)))
12187 (home-page "https://www.dulwich.io/")
12188 (synopsis "Git implementation in Python")
12189 (description "Dulwich is an implementation of the Git file formats and
12190protocols written in pure Python.")
12191 ;; Can be used with either license.
12192 (license (list license:asl2.0 license:gpl2+))))
12193
12194(define-public python2-dulwich
12195 (package-with-python2 python-dulwich))
12196
12197(define-public python-pbkdf2
12198 (package
12199 (name "python-pbkdf2")
12200 (version "1.3")
12201 (source
12202 (origin
12203 (method url-fetch)
12204 (uri (pypi-uri "pbkdf2" version))
12205 (sha256
12206 (base32
12207 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
12208 (build-system python-build-system)
12209 (arguments
12210 '(#:phases
12211 (modify-phases %standard-phases
12212 (replace 'check
12213 (lambda _
12214 (setenv "PYTHONPATH"
12215 (string-append (getcwd) "/build/lib:"
12216 (getenv "PYTHONPATH")))
ee2bb944 12217 (invoke "python" "test/test_pbkdf2.py"))))))
44d10b1f
RW
12218 (propagated-inputs
12219 `(("python-pycrypto" ,python-pycrypto))) ; optional
12220 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
12221 (synopsis "Password-based key derivation")
12222 (description "This module implements the password-based key derivation
12223function, PBKDF2, specified in RSA PKCS#5 v2.0.
12224
12225PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
12226is part of the RSA Public Key Cryptography Standards series. The provided
12227implementation takes a password or a passphrase and a salt value (and
12228optionally a iteration count, a digest module, and a MAC module) and provides
12229a file-like object from which an arbitrarly-sized key can be read.")
12230 (license license:expat)))
12231
12232(define-public python2-pbkdf2
12233 (package-with-python2 python-pbkdf2))
12234
12235(define-public python-qrcode
12236 (package
12237 (name "python-qrcode")
217ea1a1 12238 (version "6.1")
44d10b1f
RW
12239 (source
12240 (origin
12241 (method url-fetch)
12242 (uri (pypi-uri "qrcode" version))
12243 (sha256
217ea1a1 12244 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
44d10b1f
RW
12245 (build-system python-build-system)
12246 (arguments
12247 ;; FIXME: Tests require packaging 'pymaging'.
12248 '(#:tests? #f))
12249 (propagated-inputs
12250 `(("python-lxml" ,python-lxml) ; for SVG output
12251 ("python-pillow" ,python-pillow) ; for PNG output
12252 ("python-six" ,python-six)))
44d10b1f
RW
12253 (home-page "https://github.com/lincolnloop/python-qrcode")
12254 (synopsis "QR Code image generator")
12255 (description "This package provides a pure Python QR Code generator
12256module. It uses the Python Imaging Library (PIL) to allow for the generation
12257of QR Codes.
12258
12259In addition this package provides a command line tool to generate QR codes and
12260either write these QR codes to a file or do the output as ascii art at the
12261console.")
12262 (license license:bsd-3)))
12263
12264(define-public python2-qrcode
12265 (package-with-python2 python-qrcode))
12266
12267(define-public python-rst2ansi
12268 (package
12269 (name "python-rst2ansi")
12270 (version "0.1.5")
12271 (source
12272 (origin
12273 (method url-fetch)
12274 (uri (pypi-uri "rst2ansi" version))
12275 (sha256
12276 (base32
12277 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
12278 (build-system python-build-system)
12279 (propagated-inputs
12280 `(("python-docutils" ,python-docutils)))
12281 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
12282 (synopsis "Convert RST to ANSI-decorated console output")
12283 (description
12284 "Python module dedicated to rendering RST (reStructuredText) documents
12285to ansi-escaped strings suitable for display in a terminal.")
12286 (license license:expat)))
12287
12288(define-public python-ansi2html
12289 (package
12290 (name "python-ansi2html")
12291 (version "1.2.0")
12292 (source
12293 (origin
12294 (method url-fetch)
12295 (uri (pypi-uri "ansi2html" version))
12296 (sha256
12297 (base32
12298 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
12299 (build-system python-build-system)
12300 (native-inputs
12301 `(("python-mock" ,python-mock)
12302 ("python-nose" ,python-nose)))
12303 (propagated-inputs
12304 `(("python-six" ,python-six)))
12305 (home-page "https://github.com/ralphbean/ansi2html")
12306 (synopsis "Convert ANSI-decorated console output to HTML")
12307 (description
12308 "@command{ansi2html} is a Python library and command line utility for
12309convering text with ANSI color codes to HTML or LaTeX.")
12310 (license license:gpl3+)))
12311
12312(define-public python2-ansi2html
12313 (package-with-python2 python-ansi2html))
12314
12315(define-public python-ddt
12316 (package
12317 (name "python-ddt")
12318 (version "1.1.3")
12319 (source
12320 (origin
12321 (method url-fetch)
12322 (uri (pypi-uri "ddt" version))
12323 (sha256
12324 (base32
12325 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
12326 (build-system python-build-system)
12327 (native-inputs
12328 `(("python-mock" ,python-mock)
12329 ("python-nose" ,python-nose)))
12330 (propagated-inputs
12331 `(("python-six" ,python-six)
12332 ("python-pyyaml" ,python-pyyaml)))
12333 (home-page "https://github.com/txels/ddt")
12334 (synopsis "Data-Driven Tests")
12335 (description
12336 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
12337running it with different test data, and make it appear as multiple test
12338cases.")
12339 (license license:expat)))
12340
12341(define-public python2-ddt
12342 (package-with-python2 python-ddt))
12343
12344(define-public python-pycountry
12345 (package
12346 (name "python-pycountry")
12347 (version "18.5.26")
12348 (source
12349 (origin
12350 (method url-fetch)
12351 (uri (pypi-uri "pycountry" version))
12352 (sha256
12353 (base32
12354 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
12355 (build-system python-build-system)
12356 (home-page "https://bitbucket.org/flyingcircus/pycountry")
12357 (synopsis "ISO databases for languages, countries, currencies, etc.")
12358 (description
12359 "@code{pycountry} provides the ISO databases for the standards:
12360@enumerate
12361@item 639-3 (Languages)
12362@item 3166 (Countries)
12363@item 3166-3 (Deleted Countries)
12364@item 3166-2 (Subdivisions of countries)
12365@item 4217 (Currencies)
12366@item 15924 (Scripts)
12367@end enumerate
12368It includes a copy from Debian’s pkg-isocodes and makes the data accessible
12369through a Python API.")
12370 (license license:lgpl2.1+)))
12371
12372(define-public python2-pycountry
12373 (package-with-python2 python-pycountry))
12374
12375(define-public python-pycosat
12376 (package
12377 (name "python-pycosat")
12378 (version "0.6.1")
12379 (source
12380 (origin
12381 (method url-fetch)
12382 (uri (pypi-uri "pycosat" version))
12383 (sha256
12384 (base32
12385 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
12386 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
12387 (build-system python-build-system)
12388 (home-page "https://github.com/ContinuumIO/pycosat")
12389 (synopsis "Bindings to picosat (a SAT solver)")
12390 (description
12391 "This package provides efficient Python bindings to @code{picosat} on
12392the C level. When importing pycosat, the @code{picosat} solver becomes part
12393of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
12394Problem} (SAT) solver.")
12395 (license license:expat)))
12396
12397(define-public python2-pycosat
12398 (package-with-python2 python-pycosat))
12399
12400(define-public python2-ruamel.ordereddict
12401 (package
12402 (name "python2-ruamel.ordereddict")
12403 (version "0.4.9")
12404 (source
12405 (origin
12406 (method url-fetch)
12407 (uri (pypi-uri "ruamel.ordereddict" version))
12408 (sha256
12409 (base32
12410 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
12411 (build-system python-build-system)
12412 (arguments
12413 `(#:python ,python-2
12414 #:phases
12415 (modify-phases %standard-phases
12416 (delete 'check)
12417 (add-after 'install 'check
12418 (lambda* (#:key inputs outputs #:allow-other-keys)
12419 (add-installed-pythonpath inputs outputs)
f987ac30 12420 (invoke "python" "test/testordereddict.py"))))))
44d10b1f
RW
12421 (home-page "https://bitbucket.org/ruamel/ordereddict")
12422 (synopsis "Version of dict that keeps keys in insertion order")
12423 (description
12424 "This is an implementation of an ordered dictionary with @dfn{Key
12425Insertion Order} (KIO: updates of values do not affect the position of the
12426key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
12427removed and put at the back). The standard library module @code{OrderedDict},
12428implemented later, implements a subset of @code{ordereddict} functionality.
12429Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
12430Order} (KSO, no sorting function can be specified, but a transform can be
12431specified to apply on the key before comparison (e.g. @code{string.lower})).")
12432 (license license:expat)))
12433
12434(define-public python-pypeg2
12435 (package
12436 (name "python-pypeg2")
12437 (version "2.15.2")
12438 (source
12439 (origin
12440 (method url-fetch)
12441 (uri (pypi-uri "pyPEG2" version))
12442 (sha256
12443 (base32
12444 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
12445 (build-system python-build-system)
12446 (propagated-inputs `(("python-lxml" ,python-lxml)))
12447 (arguments
12448 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
12449 '(#:tests? #f))
12450 (home-page "https://fdik.org/pyPEG/")
12451 (synopsis "Parsering Expression Grammars in Python")
12452 (description "PyPEG is an intrinsic parser interpreter framework for
12453Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
12454parse many formal languages.")
12455 (license license:gpl2)))
12456
12457(define-public python-incremental
12458 (package
12459 (name "python-incremental")
12460 (version "17.5.0")
12461 (source
12462 (origin
12463 (method url-fetch)
12464 (uri (pypi-uri "incremental" version))
12465 (sha256
12466 (base32
12467 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
12468 (build-system python-build-system)
12469 (home-page "https://github.com/hawkowl/incremental")
12470 (synopsis "Library for versioning Python projects")
12471 (description "Incremental is a small library that versions your Python
12472projects.")
12473 (license license:expat)))
12474
12475(define-public python2-incremental
12476 (package-with-python2 python-incremental))
12477
12478(define-public python-invoke
12479 (package
12480 (name "python-invoke")
12481 (home-page "http://www.pyinvoke.org/")
12482 (version "1.1.0")
12483 (source (origin
12484 (method url-fetch)
12485 (uri (pypi-uri "invoke" version))
12486 (sha256
12487 (base32
12488 "0aiy1xvk1f91246zxd1zqrm679vdvd10h843a2na41cqr3cflpi6"))))
12489 (build-system python-build-system)
12490 (arguments
12491 ;; XXX: Requires many dependencies that are not yet in Guix.
12492 `(#:tests? #f))
12493 (synopsis "Pythonic task execution")
12494 (description
12495 "Invoke is a Python task execution tool and library, drawing inspiration
12496from various sources to arrive at a powerful and clean feature set. It is
12497evolved from the Fabric project, but focuses on local and abstract concerns
12498instead of servers and network commands.")
12499 (license license:bsd-3)))
12500
12501(define-public python2-invoke
12502 (package-with-python2 python-invoke))
12503
12504(define-public python-automat
12505 (package
12506 (name "python-automat")
919d80a0 12507 (version "0.7.0")
44d10b1f
RW
12508 (source (origin
12509 (method url-fetch)
12510 (uri (pypi-uri "Automat" version))
12511 (sha256
12512 (base32
919d80a0 12513 "03ivg70n3b1cbcd2zvjhk8y4kmqxcvhmili39lmgx09dza1qpmyb"))))
44d10b1f
RW
12514 (build-system python-build-system)
12515 ;; We disable the tests because they require python-twisted, while
12516 ;; python-twisted depends on python-automat. Twisted is optional, but the
12517 ;; tests fail if it is not available. Also see
12518 ;; <https://github.com/glyph/automat/issues/71>.
12519 (arguments '(#:tests? #f))
12520 (native-inputs
12521 `(("python-m2r" ,python-m2r)
12522 ("python-setuptools-scm" ,python-setuptools-scm)
12523 ("python-graphviz" ,python-graphviz)))
12524 (propagated-inputs
12525 `(("python-six" ,python-six)
12526 ("python-attrs" ,python-attrs)))
12527 (home-page "https://github.com/glyph/Automat")
12528 (synopsis "Self-service finite-state machines")
12529 (description "Automat is a library for concise, idiomatic Python
12530expression of finite-state automata (particularly deterministic finite-state
12531transducers).")
12532 (license license:expat)))
12533
12534(define-public python2-automat
12535 (package-with-python2 python-automat))
12536
12537(define-public python-m2r
12538 (package
12539 (name "python-m2r")
bcfb8fac 12540 (version "0.2.1")
44d10b1f
RW
12541 (source (origin
12542 (method url-fetch)
12543 (uri (pypi-uri "m2r" version))
12544 (sha256
12545 (base32
bcfb8fac 12546 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
44d10b1f
RW
12547 (build-system python-build-system)
12548 (propagated-inputs
12549 `(("python-docutils" ,python-docutils)
12550 ("python-mistune" ,python-mistune)))
12551 (native-inputs
12552 `(("python-pygments" ,python-pygments)
12553 ("python-mock" ,python-mock)))
12554 (home-page "https://github.com/miyakogi/m2r")
12555 (synopsis "Markdown to reStructuredText converter")
12556 (description "M2R converts a markdown file including reST markups to valid
12557reST format.")
12558 (license license:expat)))
12559
12560(define-public python2-m2r
12561 (package-with-python2 python-m2r))
12562
12563(define-public python-constantly
12564 (package
12565 (name "python-constantly")
12566 (version "15.1.0")
12567 (source (origin
12568 (method url-fetch)
12569 (uri (pypi-uri "constantly" version))
12570 (sha256
12571 (base32
12572 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
12573 (build-system python-build-system)
12574 (home-page "https://github.com/twisted/constantly")
12575 (synopsis "Symbolic constants in Python")
12576 (description "Constantly is a Python library that provides symbolic
12577constant support. It includes collections and constants with text, numeric,
12578and bit flag values.")
12579 (license license:expat)))
12580
12581(define-public python2-constantly
12582 (package-with-python2 python-constantly))
12583
12584(define-public python-attrs
12585 (package
12586 (name "python-attrs")
c41d5144 12587 (version "19.1.0")
44d10b1f
RW
12588 (source (origin
12589 (method url-fetch)
12590 (uri (pypi-uri "attrs" version))
12591 (sha256
12592 (base32
c41d5144 12593 "16g33zr5f449lqc5wgvzpknxryfzrfsxcr6kpgxwn7l5fkv71f7h"))))
44d10b1f
RW
12594 (build-system python-build-system)
12595 (arguments
12596 `(#:modules ((guix build utils)
12597 (guix build python-build-system)
12598 (ice-9 ftw)
12599 (srfi srfi-1)
12600 (srfi srfi-26))
12601 #:phases (modify-phases %standard-phases
12602 (replace 'check
12603 (lambda _
12604 (let ((cwd (getcwd)))
12605 (setenv "PYTHONPATH"
12606 (string-append
12607 cwd "/build/"
12608 (find (cut string-prefix? "lib" <>)
12609 (scandir (string-append cwd "/build")))
12610 ":"
12611 (getenv "PYTHONPATH")))
12612 (invoke "python" "-m" "pytest")))))))
12613 (native-inputs
12614 `(("python-coverage" ,python-coverage)
12615 ("python-hypothesis" ,python-hypothesis)
12616 ("python-pympler" ,python-pympler)
12617 ("python-pytest" ,python-pytest)
12618 ("python-six" ,python-six)
12619 ("python-sphinx" ,python-sphinx)
12620 ("python-zope-interface" ,python-zope-interface)))
12621 (home-page "https://github.com/python-attrs/attrs/")
12622 (synopsis "Attributes without boilerplate")
12623 (description "@code{attrs} is a Python package with class decorators that
12624ease the chores of implementing the most common attribute-related object
12625protocols.")
12626 (license license:expat)))
12627
12628(define-public python2-attrs
12629 (package-with-python2 python-attrs))
12630
12631(define-public python-attrs-bootstrap
12632 (package
12633 (inherit python-attrs)
12634 (name "python-attrs-bootstrap")
44d10b1f
RW
12635 (native-inputs `())
12636 (arguments `(#:tests? #f))))
12637
12638(define-public python2-attrs-bootstrap
12639 (package-with-python2 python-attrs-bootstrap))
12640
12641(define-public python2-cliapp
12642 (package
12643 (name "python2-cliapp")
9064b84e 12644 (version "1.20180812.1")
44d10b1f
RW
12645 (source
12646 (origin
12647 (method url-fetch)
12648 (uri (string-append
12649 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
12650 version ".tar.gz"))
12651 (sha256
12652 (base32
9064b84e 12653 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
44d10b1f
RW
12654 (build-system python-build-system)
12655 (arguments
12656 `(#:python ,python-2
12657 #:phases
12658 (modify-phases %standard-phases
12659 ;; check phase needs to be run before the build phase. If not,
12660 ;; coverage-test-runner looks for tests for the built source files,
12661 ;; and fails.
12662 (delete 'check)
12663 (add-before 'build 'check
12664 (lambda _
12665 ;; Disable python3 tests
12666 (substitute* "check"
12667 (("python3") "# python3"))
6c826d32 12668 (invoke "./check"))))))
44d10b1f
RW
12669 (native-inputs
12670 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12671 ("python2-pep8" ,python2-pep8)))
12672 (propagated-inputs
12673 `(("python2-pyaml" ,python2-pyaml)))
12674 (home-page "https://liw.fi/cliapp/")
12675 (synopsis "Python framework for command line programs")
12676 (description "@code{python2-cliapp} is a python framework for
12677command line programs. It contains the typical stuff such programs
12678need to do, such as parsing the command line for options, and
12679iterating over input files.")
12680 (license license:gpl2+)))
12681
12682(define-public python2-ttystatus
12683 (package
12684 (name "python2-ttystatus")
e516a9c2 12685 (version "0.36")
44d10b1f
RW
12686 (source
12687 (origin
12688 (method url-fetch)
12689 (uri (string-append
12690 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
12691 version ".tar.gz"))
12692 (sha256
12693 (base32
e516a9c2 12694 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
44d10b1f
RW
12695 (build-system python-build-system)
12696 (native-inputs
12697 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12698 ("python2-pep8" ,python2-pep8)))
12699 (arguments
12700 `(#:python ,python-2
12701 #:phases
12702 (modify-phases %standard-phases
12703 ;; check phase needs to be run before the build phase. If not,
12704 ;; coverage-test-runner looks for tests for the built source files,
12705 ;; and fails.
12706 (delete 'check)
12707 (add-before 'build 'check
cbeee881 12708 (lambda _ (invoke "make" "check"))))))
44d10b1f
RW
12709 (home-page "https://liw.fi/ttystatus/")
12710 (synopsis "Python library for showing progress reporting and
12711status updates on terminals")
12712 (description "@code{python2-ttystatus} is a python library for
12713showing progress reporting and status updates on terminals, for
12714command line programs. Output is automatically adapted to the width
12715of the terminal: truncated if it does not fit, and resized if the
12716terminal size changes.")
12717 (license license:gpl3+)))
12718
12719(define-public python2-tracing
12720 (package
12721 (name "python2-tracing")
12722 (version "0.10")
12723 (source
12724 (origin
12725 (method url-fetch)
12726 (uri (string-append
12727 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
12728 version ".tar.gz"))
12729 (sha256
12730 (base32
12731 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
12732 (build-system python-build-system)
12733 (arguments
12734 `(#:python ,python-2))
12735 (home-page "https://liw.fi/tracing/")
12736 (synopsis "Python debug logging helper")
12737 (description "@code{python2-tracing} is a python library for
12738logging debug messages. It provides a way to turn debugging messages
12739on and off, based on the filename they occur in. It is much faster
12740than using @code{logging.Filter} to accomplish the same thing, which
12741matters when code is run in production mode. The actual logging still
12742happens using the @code{logging} library.")
12743 (license license:gpl3+)))
12744
12745(define-public python2-larch
12746 (package
12747 (name "python2-larch")
12748 (version "1.20151025")
12749 (source
12750 (origin
12751 (method url-fetch)
12752 (uri (string-append
12753 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
12754 version ".tar.gz"))
12755 (patches (search-patches
12756 "python2-larch-coverage-4.0a6-compatibility.patch"))
12757 (sha256
12758 (base32
12759 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
12760 (build-system python-build-system)
12761 (arguments
12762 `(#:python ,python-2
12763 #:phases
12764 (modify-phases %standard-phases
12765 ;; check phase needs to be run before the build phase. If not,
12766 ;; coverage-test-runner looks for tests for the built source files,
12767 ;; and fails.
12768 (delete 'check)
12769 (add-before 'build 'check
204ad455 12770 (lambda _ (invoke "make" "check"))))))
44d10b1f
RW
12771 (native-inputs
12772 `(("cmdtest" ,cmdtest)
12773 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
12774 (propagated-inputs
12775 `(("python2-tracing" ,python2-tracing)))
12776 (home-page "https://liw.fi/larch/")
12777 (synopsis "Python copy-on-write B-tree library")
12778 (description "@code{python2-larch} is an implementation of
12779particular kind of B-tree, based on research by Ohad Rodeh. See
12780@url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
12781on the data structure.
12782
12783The distinctive feature of this B-tree is that a node is never
12784(conceptually) modified. Instead, all updates are done by
12785copy-on-write. This makes it easy to clone a tree, and modify only the
12786clone, while other processes access the original tree.")
12787 (license license:gpl3+)))
12788
12789(define-public python-astroid
12790 (package
12791 (name "python-astroid")
1c43c698 12792 (version "2.3.3")
44d10b1f
RW
12793 (source
12794 (origin
12795 (method url-fetch)
12796 (uri (pypi-uri "astroid" version))
12797 (sha256
1c43c698 12798 (base32 "0fnibsl2cb5mvzbfm7sycj85smx48f8w8m7ks1sqlmpr9ps0gski"))))
44d10b1f
RW
12799 (build-system python-build-system)
12800 (propagated-inputs
12801 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
12802 ("python-six" ,python-six)
f0935460 12803 ("python-typed-ast" ,python-typed-ast)
44d10b1f
RW
12804 ("python-wrapt" ,python-wrapt)))
12805 (native-inputs
12806 `(("python-dateutil" ,python-dateutil)
12807 ("python-nose" ,python-nose)
12808 ("python-pytest" ,python-pytest)
12809 ("python-pytest-runner" ,python-pytest-runner)))
12810 (arguments
12811 `(#:phases
12812 (modify-phases %standard-phases
12813 (add-after 'unpack 'remove-spurious-test
12814 (lambda _
12815 ;; This can be removed after upgrading from python-3.7
12816 ;; https://github.com/PyCQA/astroid/issues/593
12817 ;; https://bugs.python.org/issue34056
12818 (delete-file "astroid/tests/unittest_modutils.py")
12819 #t))
12820 (replace 'check
12821 (lambda _
12822 (invoke "pytest" "astroid"))))))
12823 (home-page "https://github.com/PyCQA/astroid")
12824 (synopsis "Common base representation of python source code for pylint and
12825other projects")
12826 (description "@code{python-astroid} provides a common base representation
12827of python source code for projects such as pychecker, pyreverse, pylint, etc.
12828
12829It provides a compatible representation which comes from the _ast module. It
12830rebuilds the tree generated by the builtin _ast module by recursively walking
12831down the AST and building an extended ast. The new node classes have
12832additional methods and attributes for different usages. They include some
12833support for static inference and local name scopes. Furthermore, astroid
12834builds partial trees by inspecting living objects.")
12835 (license license:lgpl2.1+)
12836 (properties `((python2-variant . ,(delay python2-astroid))))))
12837
12838(define-public python2-astroid
12839 (let ((base (package-with-python2
12840 (strip-python2-variant python-astroid))))
12841 (package (inherit base)
12842 ;; Version 2.x removes python2 support.
12843 (version "1.6.5")
12844 (source
12845 (origin
12846 (method url-fetch)
12847 (uri (pypi-uri "astroid" version))
12848 (sha256
12849 (base32
12850 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
12851 (arguments
12852 (substitute-keyword-arguments (package-arguments base)
12853 ((#:phases phases)
12854 `(modify-phases ,phases
12855 (add-after 'unpack 'remove-spurious-test
12856 (lambda _
12857 ;; https://github.com/PyCQA/astroid/issues/276
12858 (delete-file "astroid/tests/unittest_brain.py")
12859 #t))
12860 (replace 'check
12861 (lambda _
12862 (invoke"python" "-m" "unittest" "discover"
12863 "-p" "unittest*.py")))))))
12864 (native-inputs `())
12865 (propagated-inputs
12866 `(("python2-backports-functools-lru-cache"
12867 ,python2-backports-functools-lru-cache)
12868 ("python2-enum34" ,python2-enum34)
12869 ("python2-singledispatch" ,python2-singledispatch)
741f98b3
MO
12870 ,@(alist-delete "python-typed-ast"
12871 (package-propagated-inputs base)))))))
44d10b1f
RW
12872
12873(define-public python-isort
12874 (package
12875 (name "python-isort")
e2227b6a 12876 (version "4.3.4")
44d10b1f
RW
12877 (source
12878 (origin
e2227b6a
EF
12879 (method git-fetch)
12880 (uri (git-reference
12881 ;; Tests pass only from the Github sources
12882 (url "https://github.com/timothycrosley/isort")
12883 (commit version)))
12884 (file-name (git-file-name name version))
44d10b1f
RW
12885 (sha256
12886 (base32
e2227b6a 12887 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
44d10b1f
RW
12888 (build-system python-build-system)
12889 (native-inputs
12890 `(("python-mock" ,python-mock)
12891 ("python-pytest" ,python-pytest)))
12892 (home-page "https://github.com/timothycrosley/isort")
12893 (synopsis "Python utility/library to sort python imports")
12894 (description "@code{python-isort} is a python utility/library to sort
12895imports alphabetically, and automatically separated into sections. It
12896provides a command line utility, a python library and plugins for various
12897editors.")
e2227b6a
EF
12898 (license license:expat)
12899 (properties `((python2-variant . ,(delay python2-isort))))))
44d10b1f
RW
12900
12901(define-public python2-isort
e2227b6a
EF
12902 (let ((base (package-with-python2
12903 (strip-python2-variant python-isort))))
12904 (package (inherit base)
12905 (native-inputs
12906 `(("python2-futures" ,python2-futures)
12907 ,@(package-native-inputs base))))))
44d10b1f
RW
12908
12909(define-public python2-backports-functools-lru-cache
12910 (package
12911 (name "python2-backports-functools-lru-cache")
12912 (version "1.5")
12913 (source
12914 (origin
12915 (method url-fetch)
12916 ;; only the pypi tarballs contain the necessary metadata
12917 (uri (pypi-uri "backports.functools_lru_cache" version))
12918 (sha256
12919 (base32
12920 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
12921 (build-system python-build-system)
12922 (native-inputs
12923 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
12924 (arguments
12925 `(#:python ,python-2))
12926 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
12927 (synopsis "Backport of functools.lru_cache from Python 3.3")
12928 (description "@code{python2-backports-functools-lru-cache} is a backport
12929of @code{functools.lru_cache} from python 3.3.")
12930 (license license:expat)))
12931
12932(define-public python-configparser
12933 (package
12934 (name "python-configparser")
84127f8c 12935 (version "3.7.1")
44d10b1f
RW
12936 (source
12937 (origin
12938 (method url-fetch)
84127f8c 12939 (uri (pypi-uri "configparser" version))
44d10b1f
RW
12940 (sha256
12941 (base32
84127f8c 12942 "0cnz213il9lhgda6x70fw7mfqr8da43s3wm343lwzhqx94mgmmav"))))
44d10b1f 12943 (build-system python-build-system)
809f003f 12944 (home-page "https://github.com/jaraco/configparser/")
44d10b1f
RW
12945 (synopsis "Backport of configparser from python 3.5")
12946 (description "@code{python-configparser} is a backport of
12947@code{configparser} from Python 3.5 so that it can be used directly
12948in other versions.")
12949 (license license:expat)))
12950
12951(define-public python2-configparser
12952 (package-with-python2 python-configparser))
12953
12954(define-public python-mando
12955 (package
12956 (name "python-mando")
12957 (version "0.6.4")
12958 (source (origin
12959 (method url-fetch)
12960 (uri (pypi-uri "mando" version))
12961 (sha256
12962 (base32
12963 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
12964 (build-system python-build-system)
12965 (propagated-inputs
12966 `(("python-rst2ansi" ,python-rst2ansi)
12967 ("python-six" ,python-six)))
12968 (native-inputs
12969 `(("python-pytest" ,python-pytest)))
12970 (home-page "https://mando.readthedocs.org/")
12971 (synopsis
12972 "Wrapper around argparse, allowing creation of complete CLI applications")
12973 (description
12974 "This package is a wrapper around argparse, allowing you to write complete CLI
12975applications in seconds while maintaining all the flexibility.")
12976 (license license:expat)))
12977
12978(define-public python2-mando
12979 (package-with-python2 python-mando))
12980
70daf82f
RW
12981(define-public python2-argparse
12982 (package
12983 (name "python2-argparse")
12984 (version "1.4.0")
12985 (source
12986 (origin
12987 (method url-fetch)
12988 (uri (pypi-uri "argparse" version))
12989 (sha256
12990 (base32
12991 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
12992 (build-system python-build-system)
12993 (arguments
12994 `(#:python ,python-2))
12995 (home-page "https://github.com/ThomasWaldmann/argparse/")
12996 (synopsis "Python command-line parsing library")
12997 (description
12998 "This package is mostly for people who want to have @code{argparse} on
12999older Pythons because it was not part of the standard library back then.")
13000 (license license:psfl)))
13001
44d10b1f
RW
13002(define-public python-fudge
13003 (package
13004 (name "python-fudge")
13005 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
13006 ;; package, which is currently the only use of this package.
13007 (version "0.9.6")
13008 (source
13009 (origin
13010 (method url-fetch)
13011 (uri (pypi-uri "fudge" version))
13012 (sha256
13013 (base32
13014 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
13015 (build-system python-build-system)
13016 (arguments
13017 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
13018 (home-page "https://github.com/fudge-py/fudge")
13019 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
13020 (description
13021 "Fudge is a Python module for using fake objects (mocks and stubs) to
13022test real ones.
13023
13024In readable Python code, you declare the methods available on your fake object
13025and how they should be called. Then you inject that into your application and
13026start testing. This declarative approach means you don’t have to record and
13027playback actions and you don’t have to inspect your fakes after running code.
13028If the fake object was used incorrectly then you’ll see an informative
13029exception message with a traceback that points to the culprit.")
13030 (license license:expat)))
13031
13032(define-public python2-fudge
13033 (package-with-python2 python-fudge))
13034
13035(define-public python-mwclient
13036 (package
13037 (name "python-mwclient")
13038 (version "0.8.4")
13039 (source
13040 (origin
13041 (method url-fetch)
13042 ;; The PyPI version wouldn't contain tests.
13043 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
13044 "v" version ".tar.gz"))
13045 (file-name (string-append name "-" version ".tar.gz"))
13046 (sha256
13047 (base32
13048 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
13049 (build-system python-build-system)
13050 (propagated-inputs
13051 `(("python-requests" ,python-requests)
13052 ("python-requests-oauthlib"
13053 ,python-requests-oauthlib)
13054 ("python-six" ,python-six)))
13055 (native-inputs
13056 `(("python-mock" ,python-mock)
13057 ("python-pytest" ,python-pytest)
13058 ("python-pytest-pep8" ,python-pytest-pep8)
13059 ("python-pytest-cache" ,python-pytest-cache)
13060 ("python-pytest-cov" ,python-pytest-cov)
13061 ("python-responses" ,python-responses)))
13062 (home-page "https://github.com/btongminh/mwclient")
13063 (synopsis "MediaWiki API client")
13064 (description "This package provides a MediaWiki API client.")
13065 (license license:expat)))
13066
13067(define-public python2-mwclient
13068 (package-with-python2 python-mwclient))
13069
13070(define-public python-utils
13071 (package
13072 (name "python-utils")
13073 (version "2.1.0")
13074 (source (origin
13075 (method url-fetch)
13076 (uri (pypi-uri "python-utils" version))
13077 (sha256
13078 (base32
13079 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
13080 (build-system python-build-system)
13081 (native-inputs
13082 `(("pytest-runner" ,python-pytest-runner)
13083 ("pytest" ,python-pytest)
13084 ("six" ,python-six)))
13085 (home-page "https://github.com/WoLpH/python-utils")
13086 (synopsis "Convenient utilities not included with the standard Python install")
13087 (description
13088 "Python Utils is a collection of small Python functions and classes which
13089make common patterns shorter and easier.")
13090 (license license:bsd-2)))
13091
13092(define-public python2-utils
13093 (package-with-python2 python-utils))
13094
44d10b1f
RW
13095(define-public python-diff-match-patch
13096 (package
13097 (name "python-diff-match-patch")
13098 (version "20121119")
13099 (source
13100 (origin
13101 (method url-fetch)
13102 (uri (pypi-uri "diff-match-patch" version))
13103 (sha256
13104 (base32
13105 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
13106 (build-system python-build-system)
13107 (home-page "https://code.google.com/p/google-diff-match-patch")
13108 (synopsis "Synchronize plain text")
13109 (description "Diff Match and Patch libraries offer robust algorithms to
13110perform the operations required for synchronizing plain text.")
13111 (license license:asl2.0)))
13112
13113(define-public python2-diff-match-patch
13114 (package-with-python2 python-diff-match-patch))
13115
13116(define-public python-dirsync
13117 (package
13118 (name "python-dirsync")
13119 (version "2.2.3")
13120 (source
13121 (origin
13122 (method url-fetch)
13123 (uri (pypi-uri "dirsync" version))
13124 (sha256
13125 (base32
13126 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
13127 (build-system python-build-system)
13128 (propagated-inputs
13129 `(("six" ,python-six)))
13130 (home-page "https://bitbucket.org/tkhyn/dirsync")
13131 (synopsis "Advanced directory tree synchronisation tool")
13132 (description "Advanced directory tree synchronisation tool.")
13133 (license license:expat)))
13134
13135(define-public python2-dirsync
13136 (package-with-python2 python-dirsync))
13137
13138(define-public python-levenshtein
13139 (package
13140 (name "python-levenshtein")
13141 (version "0.12.0")
13142 (source
13143 (origin
13144 (method url-fetch)
13145 (uri (pypi-uri "python-Levenshtein" version))
13146 (sha256
13147 (base32
13148 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
13149 (build-system python-build-system)
13150 (home-page "https://github.com/ztane/python-Levenshtein")
13151 (synopsis "Fast computation of Levenshtein distance and string similarity")
13152 (description
13153 "The Levenshtein Python C extension module contains functions for fast computation of
13154@enumerate
13155@item Levenshtein (edit) distance, and edit operations
13156@item string similarity
13157@item approximate median strings, and generally string averaging
13158@item string sequence and set similarity
13159@end enumerate
13160It supports both normal and Unicode strings.")
13161 (license license:gpl2+)))
13162
13163(define-public python2-levenshtein
13164 (package-with-python2 python-levenshtein))
13165
13166(define-public python-scandir
13167 (package
13168 (name "python-scandir")
13169 (version "1.9.0")
13170 (source
13171 (origin
13172 (method url-fetch)
13173 (uri (pypi-uri "scandir" version))
13174 (sha256
13175 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
13176 (build-system python-build-system)
13177 (arguments
13178 `(#:phases (modify-phases %standard-phases
13179 (replace 'check
13180 (lambda _
13181 (invoke "python" "test/run_tests.py"))))))
13182 (home-page "https://github.com/benhoyt/scandir")
13183 (synopsis "Directory iteration function")
13184 (description
13185 "Directory iteration function like os.listdir(), except that instead of
13186returning a list of bare filenames, it yields DirEntry objects that include
13187file type and stat information along with the name. Using scandir() increases
13188the speed of os.walk() by 2-20 times (depending on the platform and file
13189system) by avoiding unnecessary calls to os.stat() in most cases.
13190
13191This package is part of the Python standard library since version 3.5.")
13192 (license license:bsd-3)))
13193
13194(define-public python2-scandir
13195 (package-with-python2 python-scandir))
13196
13197(define-public python2-stemming
13198 (package
13199 (name "python2-stemming")
13200 (version "1.0.1")
13201 (source
13202 (origin
13203 (method url-fetch)
13204 (uri (pypi-uri "stemming" version))
13205 (sha256
13206 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
13207 (build-system python-build-system)
13208 (arguments
13209 `(#:python ,python-2))
13210 (home-page "https://bitbucket.org/mchaput/stemming/overview")
13211 (synopsis "Python implementations of various stemming algorithms")
13212 (description
13213 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
13214stemming algorithms for English. These implementations are straightforward and
13215efficient, unlike some Python versions of the same algorithms available on the
13216Web. This package is an extraction of the stemming code included in the Whoosh
13217search engine.")
13218 (license license:public-domain)))
13219
13220(define-public python-factory-boy
13221 (package
13222 (name "python-factory-boy")
13223 (version "2.8.1")
13224 (source
13225 (origin
13226 (method url-fetch)
13227 (uri (pypi-uri "factory_boy" version))
13228 (sha256
13229 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
13230 (build-system python-build-system)
13231 (arguments
13232 ;; Tests are not included in the tarball.
13233 `(#:tests? #f))
13234 (propagated-inputs
13235 `(("faker" ,python-faker)))
13236 (home-page "https://github.com/benhoyt/scandir")
13237 (synopsis "Versatile test fixtures replacement")
13238 (description
13239 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
13240
13241As a fixtures replacement tool, it aims to replace static, hard to maintain
13242fixtures with easy-to-use factories for complex object.
13243
13244Instead of building an exhaustive test setup with every possible combination
13245of corner cases, factory_boy allows you to use objects customized for the
13246current test, while only declaring the test-specific fields")
13247 (license license:expat)))
13248
13249(define-public python2-factory-boy
13250 (package-with-python2 python-factory-boy))
13251
13252(define-public python-translate-toolkit
13253 (package
13254 (name "python-translate-toolkit")
13255 (version "2.1.0")
13256 (source
13257 (origin
13258 (method url-fetch)
13259 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
13260 (sha256
13261 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
13262 (build-system python-build-system)
13263 (native-inputs
13264 `(("python-pytest" ,python-pytest)
13265 ("python-sphinx" ,python-sphinx)))
13266 (propagated-inputs
13267 `(("python-babel" ,python-babel)
13268 ("python-beautifulsoup4" ,python-beautifulsoup4)
13269 ("python-chardet" ,python-chardet)
13270 ("python-diff-match-patch" ,python-diff-match-patch)
13271 ("python-levenshtein" ,python-levenshtein)
13272 ("python-lxml" ,python-lxml)
13273 ("python-six" ,python-six)
13274 ("python-vobject" ,python-vobject)
13275 ("python-pyyaml" ,python-pyyaml)))
13276 (arguments
13277 ;; TODO: tests are not run, because they end with
13278 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
13279 ;; 'parse_funcs'
13280 ;; during test setup.
13281 `(#:tests? #f))
18919cf9 13282 (home-page "https://toolkit.translatehouse.org")
44d10b1f
RW
13283 (synopsis "Tools and API for translation and localization engineering")
13284 (description
13285 "Tools and API for translation and localization engineering. It contains
13286several utilities, as well as an API for building localization tools.")
13287 (license license:gpl2+)))
13288
13289(define-public python2-translate-toolkit
13290 (package-with-python2 python-translate-toolkit))
13291
13292(define-public python-packaging
13293 (package
13294 (name "python-packaging")
94295903 13295 (version "19.0")
44d10b1f
RW
13296 (source
13297 (origin
13298 (method url-fetch)
13299 (uri (pypi-uri "packaging" version))
13300 (sha256
13301 (base32
94295903 13302 "1brjhygq9dz6x1kdljivkjfldi3qf5rbkqgck1bpgv9qpv8ab60c"))))
44d10b1f
RW
13303 (build-system python-build-system)
13304 (arguments
13305 `(#:phases (modify-phases %standard-phases
13306 (replace 'check
13307 (lambda _ (invoke "py.test" "-vv"))))))
13308 (native-inputs
13309 `(("python-pretend" ,python-pretend)
13310 ("python-pytest" ,python-pytest)))
13311 (propagated-inputs
13312 `(("python-pyparsing" ,python-pyparsing)
13313 ("python-six" ,python-six)))
13314 (home-page "https://github.com/pypa/packaging")
13315 (synopsis "Core utilities for Python packages")
13316 (description "Packaging is a Python module for dealing with Python packages.
13317It offers an interface for working with package versions, names, and dependency
13318information.")
13319 ;; From 'LICENSE': This software is made available under the terms of
13320 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
13321 ;; Contributions to this software is made under the terms of *both* these
13322 ;; licenses.
13323 (license (list license:asl2.0 license:bsd-2))))
13324
13325(define-public python2-packaging
13326 (package-with-python2 python-packaging))
13327
13328(define-public python-relatorio
13329 (package
13330 (name "python-relatorio")
13331 (version "0.8.0")
13332 (source
13333 (origin
13334 (method url-fetch)
13335 (uri (pypi-uri "relatorio" version))
13336 (sha256
13337 (base32
13338 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
13339 (build-system python-build-system)
13340 (propagated-inputs
13341 `(("python-lxml" ,python-lxml)
13342 ("python-genshi" ,python-genshi)))
13343 (native-inputs
13344 `(("python-magic" ,python-magic)))
13345 (home-page "https://relatorio.tryton.org/")
13346 (synopsis "Templating library able to output ODT and PDF files")
13347 (description "Relatorio is a templating library which provides a way to
13348easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
13349for more filetypes can be easily added by creating plugins for them.")
13350 (license license:gpl3+)))
13351
13352(define-public python2-relatorio
13353 (package-with-python2 python-relatorio))
13354
13355(define-public python-radon
13356 (package
13357 (name "python-radon")
13358 (version "2.2.0")
13359 (source
13360 (origin
13361 (method url-fetch)
13362 (uri (pypi-uri "radon" version))
13363 (sha256
13364 (base32
13365 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
13366 (build-system python-build-system)
13367 (arguments
13368 `(#:phases (modify-phases %standard-phases
13369 (replace 'check
13370 (lambda _
13371 (invoke "python" "radon/tests/run.py"))))))
13372 (propagated-inputs
13373 `(("python-colorama" ,python-colorama)
13374 ("python-flake8-polyfill" ,python-flake8-polyfill)
13375 ("python-mando" ,python-mando)))
13376 (native-inputs
13377 `(("python-pytest" ,python-pytest)
13378 ("python-pytest-mock" ,python-pytest-mock)))
13379 (home-page "https://radon.readthedocs.org/")
13380 (synopsis "Code Metrics in Python")
13381 (description "Radon is a Python tool which computes various code metrics.
13382Supported metrics are:
13383@itemize @bullet
13384@item raw metrics: SLOC, comment lines, blank lines, &c.
13385@item Cyclomatic Complexity (i.e. McCabe’s Complexity)
13386@item Halstead metrics (all of them)
13387@item the Maintainability Index (a Visual Studio metric)
13388@end itemize")
13389 (license license:expat)))
13390
13391(define-public python2-radon
13392 (package-with-python2 python-radon))
13393
13394(define-public python-sure
13395 (package
13396 (name "python-sure")
13397 (version "1.4.11")
13398 (source
13399 (origin
13400 (method url-fetch)
13401 (uri (pypi-uri "sure" version))
13402 (sha256
13403 (base32
13404 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
13405 (build-system python-build-system)
13406 (propagated-inputs
13407 `(("python-mock" ,python-mock)
13408 ("python-six" ,python-six)))
13409 (native-inputs
13410 `(("python-nose" ,python-nose)))
13411 (home-page "https://github.com/gabrielfalcao/sure")
13412 (synopsis "Automated testing library in python for python")
13413 (description
13414 "Sure is a python library that leverages a DSL for writing assertions.
13415Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
13416 (license license:gpl3+)))
13417
13418(define-public python2-sure
13419 (package-with-python2 python-sure))
13420
13421(define-public python2-couleur
13422 ;; This package does not seem to support python3 at all, hence,
13423 ;; only the python2 variant definition is provided.
13424 (package
13425 (name "python2-couleur")
13426 (version "0.6.2")
13427 (source
13428 (origin
13429 (method url-fetch)
13430 (uri (pypi-uri "couleur" version))
13431 (sha256
13432 (base32
13433 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
13434 (build-system python-build-system)
13435 (arguments
13436 `(#:python ,python-2))
13437 (home-page "https://github.com/gabrielfalcao/couleur")
13438 (synopsis
13439 "ANSI terminal tool for python, colored shell and other handy fancy features")
13440 (description
13441 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
13442terminal such as coloured output in the shell, overwriting output, indentation, etc.")
13443 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
13444 ;; https://github.com/gabrielfalcao/couleur/issues/11
13445 (license license:lgpl3+)))
13446
13447(define-public python-misaka
13448 (package
13449 (name "python-misaka")
0dcb3412 13450 (version "2.1.1")
44d10b1f
RW
13451 (source
13452 (origin
13453 (method url-fetch)
13454 (uri (pypi-uri "misaka" version))
13455 (sha256
13456 (base32
0dcb3412 13457 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
44d10b1f
RW
13458 (build-system python-build-system)
13459 (arguments
13460 `(;; Line 37 of setup.py calls self.run_command('develop')
13461 ;; in the 'check' phase. This command seems to be trying
13462 ;; to write to
13463 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
13464 ;; for which it does not have the permission to write.
13465 #:tests? #f))
13466 (propagated-inputs
13467 `(("python-cffi" ,python-cffi)))
13468 (home-page "https://github.com/FSX/misaka")
13469 (synopsis "Python binding for Hoedown")
13470 (description
13471 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
13472library written in C. It features a fast HTML renderer and functionality to make custom
13473renderers (e.g. man pages or LaTeX).")
13474 (license license:expat)))
13475
13476(define-public python2-misaka
13477 (package-with-python2 python-misaka))
13478
13479(define-public python2-steadymark
13480 ;; This is forced into being a python2 only variant
13481 ;; due to its dependence on couleur that has no support
13482 ;; for python3
13483 (package
13484 (name "python2-steadymark")
13485 (version "0.7.3")
13486 (source
13487 (origin
13488 (method url-fetch)
13489 (uri (pypi-uri "steadymark" version))
13490 (sha256
13491 (base32
13492 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
13493 (build-system python-build-system)
13494 (native-inputs
13495 `(("python-couleur" ,python2-couleur)
13496 ("python-sure" ,python2-sure)
13497 ("python-misaka" ,python2-misaka)))
13498 (arguments
13499 `(#:python ,python-2
13500 #:phases
13501 (modify-phases %standard-phases
13502 (add-before 'build 'patch-setup-py
13503 (lambda _
13504 ;; Update requirements from dependency==version
13505 ;; to dependency>=version
13506 (substitute* "setup.py"
13507 (("==") ">="))
13508 #t)))))
13509 (home-page "https://github.com/gabrielfalcao/steadymark")
13510 (synopsis "Markdown-based test runner for python")
13511 (description
13512 "@code{Steadymark} allows documentation to be written in github-flavoured
13513markdown. The documentation may contain snippets of code surrounded by python
13514code blocks and @code{Steadymark} will find these snippets and run them, making
13515sure that there are no old malfunctional examples in the documentation examples.")
13516 (license license:expat)))
13517
13518(define-public python-jsonpointer
13519 (package
13520 (name "python-jsonpointer")
13521 (version "1.10")
13522 (source
13523 (origin
13524 (method url-fetch)
13525 (uri (pypi-uri "jsonpointer" version))
13526 (sha256
13527 (base32
13528 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
13529 (build-system python-build-system)
13530 (home-page "https://github.com/stefankoegl/python-json-pointer")
13531 (synopsis "Identify specific nodes in a JSON document")
13532 (description "@code{jsonpointer} allows you to access specific nodes
13533by path in a JSON document (see RFC 6901).")
13534 (license license:bsd-3)))
13535
13536(define-public python2-jsonpointer
13537 (package-with-python2 python-jsonpointer))
13538
13539(define-public python-jsonpatch
13540 (package
13541 (name "python-jsonpatch")
13542 (version "1.16")
13543 (source
13544 (origin
13545 (method url-fetch)
13546 ;; pypi version lacks tests.js
13547 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
13548 "archive/v" version ".tar.gz"))
13549 (file-name (string-append name "-" version ".tar.gz"))
13550 (sha256
13551 (base32
13552 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
13553 (build-system python-build-system)
13554 (native-inputs
13555 `(("python-jsonpointer" ,python-jsonpointer)))
13556 (home-page "https://github.com/stefankoegl/python-json-patch")
13557 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
13558 (description "@code{jsonpatch} is a library and program that allows
13559applying JSON Patches according to RFC 6902.")
13560 (license license:bsd-3)))
13561
13562(define-public python2-jsonpatch
13563 (package-with-python2 python-jsonpatch))
13564
13565(define-public python-jsonpatch-0.4
13566 (package (inherit python-jsonpatch)
13567 (name "python-jsonpatch")
13568 (version "0.4")
13569 (source
13570 (origin
13571 (method url-fetch)
13572 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
13573 "archive/v" version ".tar.gz"))
13574 (file-name (string-append name "-" version ".tar.gz"))
13575 (sha256
13576 (base32
13577 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
13578
13579(define-public python2-jsonpatch-0.4
13580 (package-with-python2 python-jsonpatch-0.4))
13581
13582(define-public python-rfc3986
13583 (package
13584 (name "python-rfc3986")
13585 (version "1.1.0")
13586 (source (origin
13587 (method url-fetch)
13588 (uri (pypi-uri "rfc3986" version))
13589 (sha256
13590 (base32
13591 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
13592 (build-system python-build-system)
13593 (arguments
13594 `(#:modules ((guix build utils)
13595 (guix build python-build-system)
13596 (ice-9 ftw)
13597 (srfi srfi-1)
13598 (srfi srfi-26))
13599 #:phases
13600 (modify-phases %standard-phases
13601 (replace 'check
13602 (lambda _
13603 (let ((cwd (getcwd)))
13604 (setenv "PYTHONPATH"
13605 (string-append cwd "/build/"
13606 (find (cut string-prefix? "lib" <>)
13607 (scandir (string-append cwd "/build")))
13608 ":"
13609 (getenv "PYTHONPATH")))
13610 (invoke "pytest" "-v")))))))
13611 (native-inputs
13612 `(("python-pytest" ,python-pytest)))
13613 (home-page "https://rfc3986.readthedocs.io/")
13614 (synopsis "Parse and validate URI references")
13615 (description
13616 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
13617validation and authority parsing. This module also supports RFC@tie{}6874
13618which adds support for zone identifiers to IPv6 addresses.")
13619 (license license:asl2.0)))
13620
13621(define-public python2-rfc3986
13622 (package-with-python2 python-rfc3986))
13623
13624(define-public python-rfc3987
13625 (package
13626 (name "python-rfc3987")
13627 (version "1.3.7")
13628 (source
13629 (origin
13630 (method url-fetch)
13631 (uri (pypi-uri "rfc3987" version))
13632 (sha256
13633 (base32
13634 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
13635 (build-system python-build-system)
13636 (home-page "https://pypi.python.org/pypi/rfc3987")
13637 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
13638 (description "@code{rfc3987} provides routines for parsing and
13639validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
13640 (license license:gpl3+)))
13641
13642(define-public python2-rfc3987
13643 (package-with-python2 python-rfc3987))
13644
13645(define-public python-validate-email
13646 (package
13647 (name "python-validate-email")
13648 (version "1.3")
13649 (source
13650 (origin
13651 (method url-fetch)
13652 (uri (pypi-uri "validate_email" version))
13653 (sha256
13654 (base32
13655 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
13656 (build-system python-build-system)
13657 (home-page "https://github.com/syrusakbary/validate_email")
13658 (synopsis "Verifies if an email address is valid and really exists")
13659 (description "@code{validate_email} can be used to verify if an email
13660address is valid and really exists.")
13661 (license license:lgpl3+)))
13662
13663(define-public python2-validate-email
13664 (package-with-python2 python-validate-email))
13665
13666(define-public python-flex
13667 (package
13668 (name "python-flex")
13669 (version "6.10.0")
13670 (source
13671 (origin
13672 (method url-fetch)
13673 (uri (pypi-uri "flex" version))
13674 (sha256
13675 (base32
13676 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
13677 (build-system python-build-system)
13678 (propagated-inputs
13679 `(("python-click" ,python-click)
13680 ("python-iso8601" ,python-iso8601)
13681 ("python-jsonpointer" ,python-jsonpointer)
13682 ("python-pyyaml" ,python-pyyaml)
13683 ("python-requests" ,python-requests)
13684 ("python-rfc3987" ,python-rfc3987)
13685 ("python-six" ,python-six)
13686 ("python-validate-email" ,python-validate-email)))
13687 (home-page "https://github.com/pipermerriam/flex")
13688 (synopsis "Validates Swagger schemata")
13689 (description "@code{flex} can be used to validate Swagger schemata.")
13690 (license license:bsd-3)))
13691
13692(define-public python2-flex
13693 (package-with-python2 python-flex))
13694
13695(define-public python-marshmallow
13696 (package
13697 (name "python-marshmallow")
13698 (version "3.0.0b14")
13699 (source
13700 (origin
13701 (method url-fetch)
13702 (uri (pypi-uri "marshmallow" version))
13703 (sha256
13704 (base32
13705 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
13706 (build-system python-build-system)
13707 (propagated-inputs
13708 `(("python-dateutil" ,python-dateutil)
13709 ("python-simplejson" ,python-simplejson)))
13710 (native-inputs
13711 `(("python-pytest" ,python-pytest)
13712 ("python-pytz" ,python-pytz)))
13713 (home-page "https://github.com/marshmallow-code/marshmallow")
13714 (synopsis "Convert complex datatypes to and from native
13715Python datatypes.")
13716 (description "@code{marshmallow} provides a library for converting
13717complex datatypes to and from native Python datatypes.")
13718 (license license:expat)))
13719
13720(define-public python2-marshmallow
13721 (package-with-python2 python-marshmallow))
13722
13723(define-public python-apispec
13724 (package
13725 (name "python-apispec")
13726 (version "0.25.3")
13727 (source
13728 (origin
13729 (method url-fetch)
13730 (uri (pypi-uri "apispec" version))
13731 (sha256
13732 (base32
13733 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
13734 (build-system python-build-system)
13735 (propagated-inputs
13736 `(("python-pyyaml" ,python-pyyaml)))
13737 (native-inputs
13738 `(("python-pytest" ,python-pytest)
13739 ("python-flask" ,python-flask)
13740 ("python-marshmallow" ,python-marshmallow)
13741 ("python-tornado" ,python-tornado)
13742 ("python-bottle" ,python-bottle)
13743 ("python-mock" ,python-mock)))
13744 (home-page "https://github.com/marshmallow-code/apispec")
13745 (synopsis "Swagger 2.0 API specification generator")
13746 (description "@code{python-apispec} is a pluggable API specification
13747generator. Currently supports the OpenAPI specification (f.k.a.
13748Swagger 2.0).")
13749 (license license:expat)))
13750
13751(define-public python2-apispec
13752 (package-with-python2 python-apispec))
13753
13754(define-public python-flasgger
13755 (package
13756 (name "python-flasgger")
13757 (version "0.6.3")
13758 (source
13759 (origin
1a04d421
TGR
13760 (method git-fetch)
13761 (uri (git-reference
13762 (url "https://github.com/rochacbruno/flasgger.git")
13763 (commit version)))
13764 (file-name (git-file-name name version))
44d10b1f 13765 (sha256
1a04d421 13766 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
44d10b1f
RW
13767 (build-system python-build-system)
13768 (arguments
13769 `(#:phases
13770 (modify-phases %standard-phases
13771 (replace 'check
13772 (lambda* (#:key inputs outputs #:allow-other-keys)
13773 (substitute* "Makefile"
13774 (("flake8 flasgger --ignore=F403")
13775 "flake8 flasgger --ignore=E731,F403"))
13776 (setenv "PYTHONPATH" (string-append (getcwd)
13777 ":"
13778 (getenv "PYTHONPATH")))
ac599a09 13779 (invoke "py.test"))))))
44d10b1f
RW
13780 (propagated-inputs
13781 `(("python-flask" ,python-flask)
13782 ("python-pyyaml" ,python-pyyaml)
13783 ("python-jsonschema" ,python-jsonschema)
13784 ("python-mistune" ,python-mistune)
13785 ("python-six" ,python-six)))
13786 (native-inputs
13787 `(("python-decorator" ,python-decorator)
13788 ("python-flake8" ,python-flake8)
13789 ("python-flask-restful" ,python-flask-restful)
13790 ("python-flex" ,python-flex)
13791 ("python-pytest" ,python-pytest)
13792 ("python-pytest-cov" ,python-pytest-cov)
13793 ("python-marshmallow" ,python-marshmallow)
13794 ("python-apispec" ,python-apispec)))
13795 (home-page "https://github.com/rochacbruno/flasgger/")
13796 (synopsis "Extract Swagger specs from your Flask project")
13797 (description "@code{python-flasgger} allows extracting Swagger specs
13798from your Flask project. It is a fork of Flask-Swagger.")
13799 (license license:expat)))
13800
13801(define-public python2-flasgger
13802 (package-with-python2 python-flasgger))
13803
13804(define-public python-swagger-spec-validator
13805 (package
13806 (name "python-swagger-spec-validator")
fe9c5b1d 13807 (version "2.4.3")
44d10b1f
RW
13808 (source
13809 (origin
13810 (method url-fetch)
13811 (uri (pypi-uri "swagger-spec-validator" version))
13812 (sha256
13813 (base32
fe9c5b1d 13814 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
44d10b1f
RW
13815 (build-system python-build-system)
13816 (propagated-inputs
13817 `(("python-jsonschema" ,python-jsonschema)
fe9c5b1d 13818 ("python-pyyaml" ,python-pyyaml)
44d10b1f
RW
13819 ("python-six" ,python-six)))
13820 (home-page
13821 "https://github.com/Yelp/swagger_spec_validator")
13822 (synopsis "Validation of Swagger specifications")
13823 (description "@code{swagger_spec_validator} provides a library for
13824validating Swagger API specifications.")
13825 (license license:asl2.0)))
13826
13827(define-public python2-swagger-spec-validator
13828 (package-with-python2 python-swagger-spec-validator))
13829
13830(define-public python-apache-libcloud
13831 (package
13832 (name "python-apache-libcloud")
13833 (version "2.4.0")
13834 (source
13835 (origin
13836 (method url-fetch)
13837 (uri (pypi-uri "apache-libcloud" version))
13838 (sha256
13839 (base32
13840 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
13841 (build-system python-build-system)
13842 (arguments
13843 `(#:phases
13844 (modify-phases %standard-phases
13845 (add-after 'unpack 'patch-ssh
13846 (lambda* (#:key inputs #:allow-other-keys)
13847 (substitute* "libcloud/compute/ssh.py"
13848 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
13849 "/bin/ssh" "'")))
13850 #t))
13851 (add-after 'unpack 'patch-tests
13852 (lambda _
13853 (substitute* "./libcloud/test/test_file_fixtures.py"
13854 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
13855 (("def _ascii") "def _raw_data(self, method, url, body, headers):
13856 return (httplib.OK,
13857 \"1234abcd\",
13858 {\"test\": \"value\"},
13859 httplib.responses[httplib.OK])
13860 def _ascii"))
13861 (substitute* "libcloud/test/compute/test_ssh_client.py"
13862 (("class ShellOutSSHClientTests")
13863 "@unittest.skip(\"Guix container doesn't have ssh service\")
13864class ShellOutSSHClientTests")
13865 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
13866 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
13867 (("'.xF0', '.x90', '.x8D', '.x88'")
13868 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
13869 #t))
13870 (add-before 'check 'copy-secret
13871 (lambda _
13872 (copy-file "libcloud/test/secrets.py-dist"
13873 "libcloud/test/secrets.py")
13874 #t)))))
13875 (inputs
13876 `(("openssh" ,openssh)))
13877 (propagated-inputs
13878 `(("python-paramiko" ,python-paramiko)
13879 ("python-requests" ,python-requests)))
13880 (native-inputs
13881 `(("python-lockfile" ,python-lockfile)
13882 ("python-mock" ,python-mock)
13883 ("python-pytest" ,python-pytest)
13884 ("python-pytest-runner" ,python-pytest-runner)
13885 ("python-requests-mock" ,python-requests-mock)))
13886 (home-page "https://libcloud.apache.org/")
13887 (synopsis "Unified Cloud API")
13888 (description "@code{libcloud} is a Python library for interacting with
13889many of the popular cloud service providers using a unified API.")
13890 (license license:asl2.0)))
13891
13892(define-public python2-apache-libcloud
13893 (package-with-python2 python-apache-libcloud))
13894
13895(define-public python-smmap2
13896 (package
13897 (name "python-smmap2")
13898 (version "2.0.3")
13899 (source
13900 (origin
13901 (method url-fetch)
13902 (uri (pypi-uri "smmap2" version))
13903 (sha256
13904 (base32
13905 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
13906 (build-system python-build-system)
13907 (native-inputs
13908 `(("python-nosexcover" ,python-nosexcover)))
13909 (home-page "https://github.com/Byron/smmap")
13910 (synopsis "Python sliding window memory map manager")
13911 (description "@code{smmap2} is a pure Python implementation of a sliding
13912window memory map manager.")
13913 (license license:bsd-3)))
13914
13915(define-public python2-smmap2
13916 (package-with-python2 python-smmap2))
13917
13918(define-public python-regex
13919 (package
13920 (name "python-regex")
c187c9d7 13921 (version "2019.04.14")
44d10b1f
RW
13922 (source (origin
13923 (method url-fetch)
13924 (uri (pypi-uri "regex" version))
13925 (sha256
13926 (base32
c187c9d7
BT
13927 "1a6hhfs6l6snr1z654ay6wzbmwdkmv282fzfkd5hk2d1n73y8v6m"))))
13928 ;; TODO: Fix and enable regex_test.py tests that complain about the
13929 ;; test.support module not existing.
44d10b1f
RW
13930 (build-system python-build-system)
13931 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
13932 (synopsis "Alternative regular expression module")
13933 (description "This regular expression implementation is backwards-
13934compatible with the standard @code{re} module, but offers additional
13935functionality like full case-folding for case-insensitive matches in Unicode.")
13936 (license license:psfl)))
13937
13938(define-public python2-regex
13939 (package-with-python2 python-regex))
13940
13941(define-public python2-pyopengl
13942 (package
13943 (name "python2-pyopengl")
13944 (version "3.1.0")
13945 (source
13946 (origin
13947 (method url-fetch)
13948 (uri (pypi-uri "PyOpenGL" version))
13949 (sha256
13950 (base32
13951 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
13952 (arguments
13953 `(#:python ,python-2))
13954 (build-system python-build-system)
13955 (home-page "http://pyopengl.sourceforge.net")
13956 (synopsis "Standard OpenGL bindings for Python")
13957 (description
13958 "PyOpenGL is the most common cross platform Python binding to OpenGL and
13959related APIs. The binding is created using the standard @code{ctypes}
13960library.")
13961 (license license:bsd-3)))
13962
13963(define-public python2-pyopengl-accelerate
13964 (package
13965 (inherit python2-pyopengl)
13966 (name "python2-pyopengl-accelerate")
13967 (version "3.1.0")
13968 (source
13969 (origin
13970 (method url-fetch)
13971 (uri (pypi-uri "PyOpenGL-accelerate" version))
13972 (sha256
13973 (base32
13974 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
13975 (synopsis "Acceleration code for PyOpenGL")
13976 (description
13977 "This is the Cython-coded accelerator module for PyOpenGL.")))
13978
13979(define-public python-rencode
13980 (package
13981 (name "python-rencode")
13982 (version "1.0.5")
13983 (source
13984 (origin
13985 (method url-fetch)
13986 (uri (pypi-uri "rencode" version))
13987 (sha256
13988 (base32
13989 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
13990 (build-system python-build-system)
13991 (arguments
13992 `(#:phases
13993 (modify-phases %standard-phases
13994 (add-before 'check 'delete-bogus-test
13995 ;; This test requires /home/aresch/Downloads, which is not provided by
13996 ;; the build environment.
13997 (lambda _
13998 (delete-file "rencode/t.py")
13999 #t)))))
14000 (native-inputs `(("pkg-config" ,pkg-config)
14001 ("python-cython" ,python-cython)))
14002 (home-page "https://github.com/aresch/rencode")
14003 (synopsis "Serialization of heterogeneous data structures")
14004 (description
14005 "The @code{rencode} module is a data structure serialization library,
14006similar to @code{bencode} from the BitTorrent project. For complex,
14007heterogeneous data structures with many small elements, r-encoding stake up
14008significantly less space than b-encodings. This version of rencode is a
14009complete rewrite in Cython to attempt to increase the performance over the
14010pure Python module.")
14011 (license license:bsd-3)))
14012
14013(define-public python2-rencode
14014 (package-with-python2 python-rencode))
14015
14016(define-public python-xenon
14017 (package
14018 (name "python-xenon")
14019 (version "0.5.4")
14020 (source
14021 (origin
14022 (method url-fetch)
14023 (uri (pypi-uri "xenon" version))
14024 (sha256
14025 (base32
14026 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
14027 (build-system python-build-system)
14028 (native-inputs
14029 `(("python-pyyaml" ,python-pyyaml)
14030 ("python-radon" ,python-radon)
14031 ("python-requests" ,python-requests)
14032 ("python-flake8" ,python-flake8)
14033 ("python-tox" ,python-tox)))
14034 (arguments
14035 `(#:phases
14036 (modify-phases %standard-phases
14037 (add-before 'build 'patch-test-requirements
14038 (lambda _
14039 ;; Remove httpretty dependency for tests.
14040 (substitute* "setup.py"
14041 (("httpretty") ""))
14042 #t)))))
14043 (home-page "https://xenon.readthedocs.org/")
14044 (synopsis "Monitor code metrics for Python on your CI server")
14045 (description
14046 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
14047Ideally, @code{xenon} is run every time code is committed. Through command
14048line options, various thresholds can be set for the complexity of code. It
14049will fail (i.e. it will exit with a non-zero exit code) when any of these
14050requirements is not met.")
14051 (license license:expat)))
14052
14053(define-public python2-xenon
14054 (package-with-python2 python-xenon))
14055
14056(define-public python-pysocks
14057 (package
14058 (name "python-pysocks")
b8725cdf 14059 (version "1.7.0")
44d10b1f
RW
14060 (source
14061 (origin
14062 (method url-fetch)
14063 (uri (pypi-uri "PySocks" version))
14064 (sha256
14065 (base32
b8725cdf 14066 "0z4p31bpqm893cf87qqgb30k7nwd8kqfjwwjm5cvxb6zbyj1w0yr"))))
44d10b1f
RW
14067 (build-system python-build-system)
14068 (arguments `(#:tests? #f))
14069 (home-page "https://github.com/Anorov/PySocks")
14070 (synopsis "SOCKS client module")
14071 (description "@code{pysocks} is an updated and semi-actively maintained
14072version of @code{SocksiPy} with bug fixes and extra features.")
14073 (license license:bsd-3)))
14074
14075(define-public python2-pysocks
14076 (package-with-python2 python-pysocks))
14077
14078(define-public python-pydiff
14079 (package
14080 (name "python-pydiff")
14081 (version "0.2")
14082 (source
14083 (origin
14084 (method url-fetch)
14085 (uri (pypi-uri "pydiff" version))
14086 (sha256
14087 (base32
14088 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
14089 (build-system python-build-system)
14090 (home-page "https://github.com/myint/pydiff")
14091 (synopsis "Library to diff two Python files at the bytecode level")
14092 (description
14093 "@code{pydiff} makes it easy to look for actual code changes while
14094ignoring formatting changes.")
14095 (license license:expat)))
14096
14097(define-public python2-pydiff
14098 (package-with-python2 python-pydiff))
14099
14100(define-public python-tqdm
14101 (package
14102 (name "python-tqdm")
14103 (version "4.19.6")
14104 (source
14105 (origin
14106 (method url-fetch)
14107 (uri (pypi-uri "tqdm" version))
14108 (sha256
14109 (base32
14110 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
14111 (build-system python-build-system)
14112 (native-inputs
14113 `(("python-flake8" ,python-flake8)
14114 ("python-nose" ,python-nose)
14115 ("python-coverage" ,python-coverage)))
14116 (home-page "https://github.com/tqdm/tqdm")
14117 (synopsis "Fast, extensible progress meter")
14118 (description
14119 "Make loops show a progress bar on the console by just wrapping any
14120iterable with @code{|tqdm(iterable)|}. Offers many options to define
14121design and layout.")
f875d76f
PL
14122 (license (list license:mpl2.0 license:expat))
14123 (properties `((python2-variant . ,(delay python2-tqdm))))))
44d10b1f
RW
14124
14125(define-public python2-tqdm
f875d76f
PL
14126 (let ((tqdm (package-with-python2
14127 (strip-python2-variant python-tqdm))))
14128 (package (inherit tqdm)
14129 (native-inputs `(("python2-functools32" ,python2-functools32)
14130 ,@(package-native-inputs tqdm))))))
44d10b1f
RW
14131
14132(define-public python-pkginfo
14133 (package
14134 (name "python-pkginfo")
14135 (version "1.4.2")
14136 (source
14137 (origin
14138 (method url-fetch)
14139 (uri (pypi-uri "pkginfo" version))
14140 (sha256
14141 (base32
14142 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
14143 (build-system python-build-system)
14144 (arguments
14145 ;; The tests are broken upstream.
14146 '(#:tests? #f))
14147 (home-page
14148 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
14149 (synopsis
14150 "Query metadatdata from sdists, bdists, and installed packages")
14151 (description
14152 "API to query the distutils metadata written in @file{PKG-INFO} inside a
14153source distriubtion (an sdist) or a binary distribution (e.g., created by
14154running bdist_egg). It can also query the EGG-INFO directory of an installed
14155distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
14156created by running @code{python setup.py develop}).")
14157 (license license:expat)))
14158
14159(define-public python2-pkginfo
14160 (package-with-python2 python-pkginfo))
14161
14162(define-public python-twine
14163 (package
14164 (name "python-twine")
14165 (version "1.9.1")
14166 (source
14167 (origin
14168 (method url-fetch)
14169 (uri (pypi-uri "twine" version))
14170 (sha256
14171 (base32
14172 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
14173 (build-system python-build-system)
14174 (propagated-inputs
14175 `(("python-tqdm" ,python-tqdm)
14176 ("python-pkginfo" ,python-pkginfo)
14177 ("python-requests" ,python-requests)
14178 ("python-requests-toolbelt" ,python-requests-toolbelt)))
14179 (home-page "https://github.com/pypa/twine")
14180 (synopsis "Collection of utilities for interacting with PyPI")
14181 (description
14182 "@code{twine} currently supports registering projects and uploading
14183distributions. It authenticates the user over HTTPS, allows them to pre-sign
14184their files and supports any packaging format (including wheels).")
14185 (license license:asl2.0)))
14186
14187(define-public python2-twine
14188 (package-with-python2 python-twine))
14189
14190(define-public python-linecache2
14191 (package
14192 (name "python-linecache2")
14193 (version "1.0.0")
14194 (source
14195 (origin
14196 (method url-fetch)
14197 (uri (pypi-uri "linecache2" version))
14198 (sha256
14199 (base32
14200 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
14201 (build-system python-build-system)
14202 (arguments
14203 `(;; The tests depend on unittest2, and our version is a bit too old.
14204 #:tests? #f))
14205 (native-inputs
14206 `(("python-pbr" ,python-pbr-minimal)))
14207 (home-page
14208 "https://github.com/testing-cabal/linecache2")
14209 (synopsis "Backports of the linecache module")
14210 (description
14211 "The linecache module allows one to get any line from any file, while
14212attempting to optimize internally, using a cache, the common case where many
14213lines are read from a single file.")
14214 (license license:psfl)))
14215
14216(define-public python2-linecache2
14217 (package-with-python2 python-linecache2))
14218
14219(define-public python-traceback2
14220 (package
14221 (name "python-traceback2")
14222 (version "1.4.0")
14223 (source
14224 (origin
14225 (method url-fetch)
14226 (uri (pypi-uri "traceback2" version))
14227 (sha256
14228 (base32
14229 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
14230 (build-system python-build-system)
14231 (arguments
14232 `(;; python-traceback2 and python-unittest2 depend on one another.
14233 #:tests? #f))
14234 (native-inputs
14235 `(("python-pbr" ,python-pbr-minimal)))
14236 (propagated-inputs
14237 `(("python-linecache2" ,python-linecache2)))
14238 (home-page
14239 "https://github.com/testing-cabal/traceback2")
14240 (synopsis "Backports of the traceback module")
14241 (description
14242 "This module provides a standard interface to extract, format and print
14243stack traces of Python programs. It exactly mimics the behavior of the Python
14244interpreter when it prints a stack trace.")
14245 (license license:psfl)))
14246
14247(define-public python2-traceback2
14248 (package-with-python2 python-traceback2))
14249
14250(define-public python-ratelimiter
14251 (package
14252 (name "python-ratelimiter")
14253 (version "1.2.0")
14254 (source
14255 (origin
14256 (method url-fetch)
14257 (uri (pypi-uri "ratelimiter" version))
14258 (sha256
14259 (base32
14260 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
14261 (build-system python-build-system)
14262 (arguments
14263 '(#:tests? #f)) ; There are no tests in the pypi archive.
14264 (home-page "https://github.com/RazerM/ratelimiter")
14265 (synopsis "Simple rate limiting object")
14266 (description
14267 "The @code{ratelimiter} module ensures that an operation will not be
14268executed more than a given number of times during a given period.")
14269 (license license:asl2.0)))
14270
14271(define-public python2-ratelimiter
14272 (package-with-python2 python-ratelimiter))
14273
14274(define-public python-dukpy
14275 (package
14276 (name "python-dukpy")
14277 (version "0.3")
14278 (source
14279 (origin
5b77ebe1
TGR
14280 (method git-fetch)
14281 (uri (git-reference
14282 (url "https://github.com/kovidgoyal/dukpy.git")
14283 (commit (string-append "v" version))))
14284 (file-name (git-file-name name version))
44d10b1f 14285 (sha256
5b77ebe1 14286 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
44d10b1f
RW
14287 (build-system python-build-system)
14288 (home-page "https://github.com/kovidgoyal/dukpy")
14289 (synopsis "Run JavaScript in python")
14290 (description
14291 "dukpy is a JavaScript runtime environment for Python using the duktape
14292embeddable JavaScript engine.")
14293 ;; Dukpy is licensed under MIT like the embedded duktape library,
14294 ;; with 'errors.c' as GPL3.
14295 (license (list license:expat license:gpl3))))
14296
14297(define-public python2-dukpy
14298 (package-with-python2 python-dukpy))
14299
14300(define-public python-jsonrpclib-pelix
14301 (package
14302 (name "python-jsonrpclib-pelix")
14303 (version "0.3.2")
14304 (source
14305 (origin
14306 (method url-fetch)
14307 (uri (pypi-uri "jsonrpclib-pelix" version))
14308 (sha256
14309 (base32
14310 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
14311 (build-system python-build-system)
14312 (arguments
14313 `(#:tests? #f)) ; no tests in PyPI tarball
14314 (home-page "https://github.com/tcalmant/jsonrpclib/")
14315 (synopsis "JSON-RPC 2.0 client library for Python")
14316 (description
14317 "This library implements the JSON-RPC v2.0
14318specification (backwards-compatible) as a client library for Python. This
14319version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
14320services.")
14321 (license license:asl2.0)))
14322
14323(define-public python2-jsonrpclib-pelix
14324 (package-with-python2 python-jsonrpclib-pelix))
14325
14326(define-public python-setuptools-scm-git-archive
14327 (package
14328 (name "python-setuptools-scm-git-archive")
14329 (version "1.0")
14330 (source
14331 (origin
14332 (method url-fetch)
14333 (uri (pypi-uri "setuptools_scm_git_archive" version))
14334 (sha256
14335 (base32
14336 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
14337 (build-system python-build-system)
14338 (native-inputs
14339 `(("python-pytest" ,python-pytest)))
14340 (propagated-inputs
14341 `(("python-setuptools-scm" ,python-setuptools-scm)))
14342 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
14343 (synopsis "Setuptools_scm plugin for git archives")
14344 (description
14345 "The setuptools_scm_git_archive package is a plugin to
14346setuptools_scm, which supports obtaining versions from git archives that
14347belong to tagged versions.")
14348 (license license:expat)))
14349
14350(define-public python2-setuptools-scm-git-archive
14351 (package-with-python2 python-setuptools-scm-git-archive))
14352
724a350c
RW
14353(define-public python-setuptools-git
14354 (package
14355 (name "python-setuptools-git")
14356 (version "1.2")
14357 (source
14358 (origin
14359 (method url-fetch)
14360 (uri (pypi-uri "setuptools-git" version))
14361 (sha256
14362 (base32
14363 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
14364 (build-system python-build-system)
14365 (arguments
14366 `(#:phases
14367 (modify-phases %standard-phases
14368 ;; This is needed for tests.
14369 (add-after 'unpack 'configure-git
14370 (lambda _
14371 (setenv "HOME" "/tmp")
14372 (invoke "git" "config" "--global" "user.email" "guix")
14373 (invoke "git" "config" "--global" "user.name" "guix")
14374 #t)))))
14375 (native-inputs
14376 `(("git" ,git-minimal)))
14377 (home-page "https://github.com/msabramo/setuptools-git")
14378 (synopsis "Setuptools revision control system plugin for Git")
14379 (description
14380 "This package provides a plugin for Setuptools for revision control with
14381Git.")
14382 (license license:bsd-3)))
14383
44d10b1f
RW
14384(define-public python-pyclipper
14385 (package
14386 (name "python-pyclipper")
14387 (version "1.1.0.post1")
14388 (source
14389 (origin
14390 (method url-fetch)
14391 (uri (pypi-uri "pyclipper" version ".zip"))
14392 (sha256
14393 (base32
14394 "0ldbkbnx94an4zzrwb1sxmg6k0jgk4cwmvcdyy8y5k1zslc612wa"))
14395 (modules '((guix build utils)))
14396 (snippet
14397 '(begin
14398 ;; This file is generated by Cython.
14399 (delete-file "pyclipper/pyclipper.cpp") #t))))
14400 (build-system python-build-system)
14401 (arguments
14402 `(#:phases
14403 (modify-phases %standard-phases
14404 (add-before 'build 'cythonize-sources
14405 (lambda _
14406 (with-directory-excursion "pyclipper"
14407 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
14408 (propagated-inputs
14409 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
14410 (native-inputs
14411 `(("python-cython" ,python-cython)
14412 ("python-pytest" ,python-pytest)
14413 ("python-pytest-runner" ,python-pytest-runner)
14414 ("python-unittest2" ,python-unittest2)
14415 ("unzip" ,unzip)))
14416 (home-page "https://github.com/greginvm/pyclipper")
14417 (synopsis "Wrapper for Angus Johnson's Clipper library")
14418 (description
14419 "Pyclipper is a Cython wrapper for the C++ translation of the
14420Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
14421 (license license:expat)))
14422
14423(define-public python2-pyclipper
14424 (package-with-python2 python-pyclipper))
14425
14426(define-public python2-booleanoperations
14427 (package
14428 (name "python2-booleanoperations")
14429 (version "0.7.1")
14430 (source
14431 (origin
14432 (method url-fetch)
14433 (uri (pypi-uri "booleanOperations" version ".zip"))
14434 (sha256
14435 (base32
14436 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
14437 (build-system python-build-system)
14438 (arguments
14439 `(#:python ,python-2))
14440 (native-inputs
14441 `(("unzip" ,unzip)
14442 ("python2-pytest" ,python2-pytest)
14443 ("python2-pytest-runner" ,python2-pytest-runner)))
14444 (propagated-inputs
14445 `(("python-fonttools" ,python2-fonttools)
14446 ("python-pyclipper" ,python2-pyclipper)
14447 ("python-ufolib" ,python2-ufolib)))
14448 (home-page "https://github.com/typemytype/booleanOperations")
14449 (synopsis "Boolean operations on paths")
14450 (description
14451 "BooleanOperations provides a Python library that enables
14452boolean operations on paths.")
14453 (license license:expat)))
14454
14455(define-public python-tempdir
14456 (package
14457 (name "python-tempdir")
14458 (version "0.7.1")
14459 (source
14460 (origin
14461 (method url-fetch)
14462 (uri (pypi-uri "tempdir" version))
14463 (sha256
14464 (base32
14465 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
14466 (build-system python-build-system)
14467 (home-page "https://pypi.org/project/tempdir/")
14468 (arguments
14469 ;; the package has no tests
14470 '(#:tests? #f))
14471 (synopsis "Python library for managing temporary directories")
14472 (description
14473 "This library manages temporary directories that are automatically
14474deleted with all their contents when they are no longer needed. It is
14475particularly convenient for use in tests.")
14476 (license license:expat)))
14477
14478(define-public python2-tempdir
14479 (package-with-python2 python-tempdir))
14480
14481(define-public python-activepapers
14482 (package
14483 (name "python-activepapers")
14484 (version "0.2.2")
14485 (source
14486 (origin
14487 (method url-fetch)
14488 (uri (pypi-uri "ActivePapers.Py" version))
14489 (sha256
14490 (base32
14491 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
14492 (build-system python-build-system)
14493 (arguments
14494 `(#:modules ((ice-9 ftw)
14495 (srfi srfi-1)
14496 (guix build utils)
14497 (guix build python-build-system))
14498
14499 #:phases
14500 (modify-phases %standard-phases
14501 (add-after 'unpack 'delete-python2-code
14502 (lambda _
14503 (for-each delete-file
14504 '("lib/activepapers/builtins2.py"
14505 "lib/activepapers/standardlib2.py"
14506 "lib/activepapers/utility2.py"))))
14507 (replace 'check
14508 (lambda _
14509 ;; Deactivate the test cases that download files
14510 (setenv "NO_NETWORK_ACCESS" "1")
14511 ;; For some strange reason, some tests fail if nosetests runs all
14512 ;; test modules in a single execution. They pass if each test
14513 ;; module is run individually.
14514 (for-each (lambda (filename)
14515 (invoke "nosetests"
14516 (string-append "tests/" filename)))
14517 (scandir "tests"
14518 (lambda (filename)
14519 (string-suffix? ".py" filename)))))))))
14520 (native-inputs
14521 `(("python-tempdir" ,python-tempdir)
14522 ("python-nose" ,python-nose)))
14523 (propagated-inputs
14524 `(("python-h5py" ,python-h5py)))
14525 (home-page "http://www.activepapers.org/")
14526 (synopsis "Executable papers for scientific computing")
14527 (description
14528 "ActivePapers is a tool for working with executable papers, which
14529combine data, code, and documentation in single-file packages,
14530suitable for publication as supplementary material or on repositories
14531such as figshare or Zenodo.")
14532 (properties `((python2-variant . ,(delay python2-activepapers))))
14533 (license license:bsd-3)))
14534
14535(define-public python2-activepapers
14536 (let ((base (package-with-python2
14537 (strip-python2-variant python-activepapers))))
14538 (package
14539 (inherit base)
14540 (arguments
14541 (substitute-keyword-arguments (package-arguments base)
14542 ((#:phases phases)
14543 `(modify-phases ,phases
14544 (delete 'delete-python2-code)
14545 (add-after 'unpack 'delete-python3-code
14546 (lambda _
14547 (for-each delete-file
14548 '("lib/activepapers/builtins3.py"
14549 "lib/activepapers/standardlib3.py"
14550 "lib/activepapers/utility3.py")))))))))))
14551
14552(define-public python-semver
14553 (package
14554 (name "python-semver")
14555 (version "2.7.9")
14556 (source
14557 (origin
14558 (method url-fetch)
14559 (uri (pypi-uri "semver" version))
14560 (sha256
14561 (base32
14562 "0hhgqppchv59rqj0yzi1prdg2nfsywqmjsqy2rycyxm0hvxmbyqz"))))
14563 (build-system python-build-system)
14564 (arguments
14565 `(#:phases
14566 (modify-phases %standard-phases
14567 (add-after 'unpack 'patch-test-requirements
14568 (lambda _
14569 (substitute* "setup.py"
14570 ;; Our Python is new enough.
14571 (("'virtualenv<14\\.0\\.0'") "'virtualenv'"))
14572 #t)))))
14573 (native-inputs
14574 `(("python-tox" ,python-tox)
14575 ("python-virtualenv" ,python-virtualenv)))
14576 (home-page "https://github.com/k-bx/python-semver")
14577 (synopsis "Python helper for Semantic Versioning")
14578 (description "This package provides a Python library for
14579@url{Semantic Versioning, http://semver.org/}.")
14580 (license license:bsd-3)))
14581
14582(define-public python2-semver
14583 (package-with-python2 python-semver))
14584
14585(define-public python-pyro4
14586 (package
14587 (name "python-pyro4")
3ce91d44 14588 (version "4.77")
44d10b1f
RW
14589 (source
14590 (origin
14591 (method url-fetch)
14592 (uri (pypi-uri "Pyro4" version))
14593 (sha256
3ce91d44 14594 (base32 "0gsjg869y4gpy265s1gj1f2qy6jn5iz8r2bwwnq78r1r5yi15zib"))))
44d10b1f 14595 (build-system python-build-system)
3ce91d44
GL
14596 (arguments
14597 '(#:tests? #f)) ;FIXME: Some tests require network access.
14598 (native-inputs
14599 `(("python-cloudpickle" ,python-cloudpickle)
14600 ("python-dill" ,python-dill)
14601 ("python-msgpack" ,python-msgpack)))
44d10b1f
RW
14602 (propagated-inputs
14603 `(("python-serpent" ,python-serpent)))
14604 (home-page "https://pyro4.readthedocs.io")
14605 (synopsis "Distributed object middleware for Python")
14606 (description
14607 "Pyro enables you to build applications in which objects can talk to each
14608other over the network. You can just use normal Python method calls to call
14609objects on other machines, also known as remote procedure calls (RPC).")
14610 (license license:expat)))
14611
14612(define-public python2-pyro
14613 (package
14614 (name "python2-pyro")
14615 (version "3.16")
14616 (source
14617 (origin
14618 (method url-fetch)
14619 (uri (pypi-uri "Pyro" version))
14620 (file-name (string-append "Pyro-" version ".tar.gz"))
14621 (sha256
14622 (base32
14623 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
14624 (build-system python-build-system)
14625 (arguments
14626 ;; Pyro is not compatible with Python 3
14627 `(#:python ,python-2
14628 ;; Pyro has no test cases for automatic execution
14629 #:tests? #f))
14630 (home-page "http://pythonhosted.org/Pyro/")
14631 (synopsis "Distributed object manager for Python")
14632 (description "Pyro is a Distributed Object Technology system
14633written in Python that is designed to be easy to use. It resembles
14634Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
14635which is a system and language independent Distributed Object Technology
14636and has much more to offer than Pyro or RMI. Pyro 3.x is no
14637longer maintained. New projects should use Pyro4 instead, which
14638is the new Pyro version that is actively developed.")
14639 (license license:expat)))
14640
14641(define-public python2-scientific
14642 (package
14643 (name "python2-scientific")
14644 (version "2.9.4")
14645 (source
14646 (origin
c695f011
KH
14647 (method git-fetch)
14648 (uri (git-reference
14649 (url "https://github.com/khinsen/ScientificPython")
14650 (commit (string-append "rel" version))))
14651 (file-name (git-file-name name version))
44d10b1f
RW
14652 (sha256
14653 (base32
c695f011 14654 "16l48aj9fps9r7jyk8gpxppwrv0fqvlc13sayxskz28r5s6sjwbl"))))
44d10b1f
RW
14655 (build-system python-build-system)
14656 (inputs
14657 `(("netcdf" ,netcdf)))
14658 (propagated-inputs
14659 `(("python-numpy" ,python2-numpy-1.8)
14660 ("python-pyro" ,python2-pyro)))
14661 (arguments
14662 ;; ScientificPython is not compatible with Python 3
14663 `(#:python ,python-2
14664 #:tests? #f ; No test suite
14665 #:phases
14666 (modify-phases %standard-phases
14667 (replace 'build
14668 (lambda* (#:key inputs #:allow-other-keys)
77e61e25
RW
14669 (invoke "python" "setup.py" "build"
14670 (string-append "--netcdf_prefix="
14671 (assoc-ref inputs "netcdf"))))))))
c695f011 14672 (home-page "http://dirac.cnrs-orleans.fr/ScientificPython")
44d10b1f
RW
14673 (synopsis "Python modules for scientific computing")
14674 (description "ScientificPython is a collection of Python modules that are
14675useful for scientific computing. Most modules are rather general (Geometry,
14676physical units, automatic derivatives, ...) whereas others are more
14677domain-specific (e.g. netCDF and PDB support). The library is currently
14678not actively maintained and works only with Python 2 and NumPy < 1.9.")
14679 (license license:cecill-c)))
14680
14681(define-public python2-mmtk
14682 (package
14683 (name "python2-mmtk")
fe9b72c5 14684 (version "2.7.12")
44d10b1f
RW
14685 (source
14686 (origin
fe9b72c5
KH
14687 (method git-fetch)
14688 (uri (git-reference
14689 (url "https://github.com/khinsen/MMTK")
14690 (commit (string-append "rel" version))))
14691 (file-name (git-file-name name version))
44d10b1f
RW
14692 (sha256
14693 (base32
fe9b72c5 14694 "1fqwh3ba9jd42nigvn5shndgwb1zy7kh9520ncvqci7n8ffjr6p1"))))
44d10b1f
RW
14695 (build-system python-build-system)
14696 (native-inputs
14697 `(("netcdf" ,netcdf)))
14698 (propagated-inputs
14699 `(("python-scientific" ,python2-scientific)
14700 ("python-tkinter" ,python-2 "tk")))
14701 (arguments
14702 `(#:python ,python-2
14703 #:tests? #f
14704 #:phases
14705 (modify-phases %standard-phases
14706 (add-before 'build 'includes-from-scientific
14707 (lambda* (#:key inputs #:allow-other-keys)
14708 (mkdir-p "Include/Scientific")
14709 (copy-recursively
14710 (string-append
14711 (assoc-ref inputs "python-scientific")
14712 "/include/python2.7/Scientific")
14713 "Include/Scientific"))))))
14714 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
14715 (synopsis "Python library for molecular simulation")
14716 (description "MMTK is a library for molecular simulations with an emphasis
14717on biomolecules. It provides widely used methods such as Molecular Dynamics
14718and normal mode analysis, but also basic routines for implementing new methods
14719for simulation and analysis. The library is currently not actively maintained
14720and works only with Python 2 and NumPy < 1.9.")
14721 (license license:cecill-c)))
14722
14723(define-public python-phonenumbers
14724 (package
14725 (name "python-phonenumbers")
14726 (version "8.9.1")
14727 (source
14728 (origin
14729 (method url-fetch)
14730 (uri (pypi-uri "phonenumbers" version))
14731 (sha256
14732 (base32
14733 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
14734 (build-system python-build-system)
14735 (home-page
14736 "https://github.com/daviddrysdale/python-phonenumbers")
14737 (synopsis
14738 "Python library for dealing with international phone numbers")
14739 (description
14740 "This package provides a Python port of Google's libphonenumber library.")
14741 (license license:asl2.0)))
14742
14743(define-public python2-phonenumbers
14744 (package-with-python2 python-phonenumbers))
14745
14746(define-public python-send2trash
14747 (package
14748 (name "python-send2trash")
d9b0216b 14749 (version "1.5.0")
44d10b1f 14750 (source
d9b0216b 14751 (origin (method git-fetch)
44d10b1f 14752 ;; Source tarball on PyPI doesn't include tests.
d9b0216b
RW
14753 (uri (git-reference
14754 (url "https://github.com/hsoft/send2trash.git")
14755 (commit version)))
14756 (file-name (git-file-name name version))
44d10b1f
RW
14757 (sha256
14758 (base32
d9b0216b 14759 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
44d10b1f
RW
14760 (build-system python-build-system)
14761 (arguments
14762 '(#:phases
14763 (modify-phases %standard-phases
14764 (add-before 'check 'pre-check
14765 (lambda _
14766 (mkdir-p "/tmp/foo")
14767 (setenv "HOME" "/tmp/foo")
14768 #t)))))
14769 (home-page "https://github.com/hsoft/send2trash")
14770 (synopsis "Send files to the user's @file{~/Trash} directory")
14771 (description "This package provides a Python library to send files to the
14772user's @file{~/Trash} directory.")
20b3fde7 14773 (properties `((python2-variant . ,(delay python2-send2trash))))
44d10b1f
RW
14774 (license license:bsd-3)))
14775
14776(define-public python2-send2trash
14777 (package
f32164ab 14778 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
44d10b1f
RW
14779 (arguments
14780 (substitute-keyword-arguments (package-arguments python-send2trash)
14781 ((#:phases phases)
14782 `(modify-phases ,phases
14783 (add-before 'check 'setenv
14784 (lambda _
14785 (setenv "PYTHONPATH"
14786 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
4782a06f 14787 #t))))))))
44d10b1f
RW
14788
14789(define-public python-yapf
14790 (package
14791 (name "python-yapf")
14792 (version "0.24.0")
14793 (source
14794 (origin
14795 (method url-fetch)
14796 (uri (pypi-uri "yapf" version))
14797 (sha256
14798 (base32
14799 "0anwby0ydmyzcsgjc5dn1ryddwvii4dq61vck447q0n96npnzfyf"))))
14800 (build-system python-build-system)
14801 (home-page "https://github.com/google/yapf")
14802 (synopsis "Formatter for Python code")
14803 (description "YAPF is a formatter for Python code. It's based off of
14804@dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
14805takes the code and reformats it to the best formatting that conforms to the
14806style guide, even if the original code didn't violate the style guide.")
14807 (license license:asl2.0)))
14808
14809(define-public python2-yapf
14810 (package-with-python2 python-yapf))
14811
14812(define-public python-gyp
14813 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
14814 (revision "0"))
14815 (package
14816 (name "python-gyp")
14817 ;; Google does not release versions,
14818 ;; based on second most recent commit date.
14819 (version (git-version "0.0.0" revision commit))
14820 (source
14821 (origin
14822 ;; Google does not release tarballs,
14823 ;; git checkout is needed.
14824 (method git-fetch)
14825 (uri (git-reference
14826 (url "https://chromium.googlesource.com/external/gyp")
14827 (commit commit)))
14828 (file-name (git-file-name name version))
14829 (sha256
14830 (base32
14831 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
14832 (build-system python-build-system)
14833 (home-page "https://gyp.gsrc.io/")
14834 (synopsis "GYP is a Meta-Build system")
14835 (description
14836 "GYP builds build systems for large, cross platform applications.
14837It can be used to generate XCode projects, Visual Studio projects, Ninja build
14838files, and Makefiles.")
14839 (license license:bsd-3))))
14840
14841(define-public python2-gyp
14842 (package-with-python2 python-gyp))
14843
14844(define-public python-whatever
14845 (package
14846 (name "python-whatever")
97610a66 14847 (version "0.6")
44d10b1f
RW
14848 (source
14849 (origin
14850 (method url-fetch)
14851 (uri (string-append "https://github.com/Suor/whatever/archive/" version
14852 ".tar.gz"))
14853 (sha256
97610a66 14854 (base32 "1rchg9hrlvw4sn20lq1zspczr4x1pv57c02gv73igiqx1hqpy2nc"))
44d10b1f
RW
14855 (file-name (string-append name "-" version ".tar.gz"))))
14856 (build-system python-build-system)
14857 (arguments
14858 `(#:phases
14859 (modify-phases %standard-phases
14860 (replace 'check
14861 (lambda _
14862 (invoke "py.test"))))))
14863 (native-inputs
14864 `(("python-pytest" ,python-pytest)))
14865 (home-page "http://github.com/Suor/whatever")
14866 (synopsis "Make anonymous functions by partial application of operators")
14867 (description "@code{whatever} provides an easy way to make anonymous
14868functions by partial application of operators.")
14869 (license license:bsd-3)))
14870
14871(define-public python2-whatever
14872 (package-with-python2 python-whatever))
14873
14874(define-public python-funcy
14875 (package
14876 (name "python-funcy")
9e396ab8 14877 (version "1.11")
44d10b1f
RW
14878 (source
14879 (origin
a85c6027
TGR
14880 (method git-fetch)
14881 (uri (git-reference
14882 (url "https://github.com/Suor/funcy.git")
14883 (commit version)))
44d10b1f 14884 (sha256
a85c6027
TGR
14885 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
14886 (file-name (git-file-name name version))))
44d10b1f
RW
14887 (build-system python-build-system)
14888 (arguments
14889 `(#:phases
14890 (modify-phases %standard-phases
14891 (replace 'check
14892 (lambda _
14893 (invoke "py.test"))))))
14894 (native-inputs
14895 `(("python-pytest" ,python-pytest)
14896 ("python-whatever" ,python-whatever)))
14897 (home-page "http://github.com/Suor/funcy")
14898 (synopsis "Functional tools")
14899 (description "@code{funcy} is a library that provides functional tools.
14900Examples are:
14901@enumerate
14902@item merge - Merges collections of the same type
14903@item walk - Type-preserving map
14904@item select - Selects a part of a collection
14905@item take - Takes the first n items of a collection
14906@item first - Takes the first item of a collection
14907@item remove - Predicated-removes items of a collection
14908@item concat - Concatenates two collections
14909@item flatten - Flattens a collection with subcollections
14910@item distinct - Returns only distinct items
14911@item split - Predicated-splits a collection
14912@item split_at - Splits a collection at a given item
14913@item group_by - Groups items by group
14914@item pairwise - Pairs off adjacent items
14915@item partial - Partially-applies a function
14916@item curry - Curries a function
14917@item compose - Composes functions
14918@item complement - Complements a predicate
14919@item all_fn - \"all\" with predicate
14920@end enumerate")
14921 (license license:bsd-3)))
14922
14923(define-public python2-funcy
14924 (package-with-python2 python-funcy))
14925
14926(define-public python-isoweek
14927 (package
14928 (name "python-isoweek")
14929 (version "1.3.3")
14930 (source
14931 (origin
14932 (method url-fetch)
14933 (uri (pypi-uri "isoweek" version))
14934 (sha256
14935 (base32
14936 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
14937 (build-system python-build-system)
14938 (home-page "https://github.com/gisle/isoweek")
14939 (synopsis "Objects representing a week")
14940 (description "The @code{isoweek} module provide the class Week that
14941implements the week definition of ISO 8601. This standard also defines
14942a notation for identifying weeks; yyyyWww (where the W is a literal).
14943Week instances stringify to this form.")
14944 (license license:bsd-3)))
14945
14946(define-public python2-isoweek
14947 (package-with-python2 python-isoweek))
14948
14949(define-public python-tokenize-rt
14950 (package
14951 (name "python-tokenize-rt")
14952 (version "2.0.1")
14953 (source
14954 (origin
14955 (method url-fetch)
14956 (uri (pypi-uri "tokenize-rt" version))
14957 (sha256
14958 (base32
14959 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
14960 (build-system python-build-system)
14961 (home-page "https://github.com/asottile/tokenize-rt")
14962 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
14963 (description
14964 "This Python library is a wrapper around @code{tokenize} from the Python
14965standard library. It provides two additional tokens @code{ESCAPED_NL} and
14966@code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
14967and @code{tokens_to_src} to roundtrip.")
14968 (license license:expat)))
14969
14970(define-public python-future-fstrings
14971 (package
14972 (name "python-future-fstrings")
14973 (version "0.4.1")
14974 (source
14975 (origin
14976 (method url-fetch)
14977 (uri (pypi-uri "future_fstrings" version))
14978 (sha256
14979 (base32
14980 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
14981 (build-system python-build-system)
14982 (propagated-inputs
14983 `(("python-tokenize-rt" ,python-tokenize-rt)))
14984 (home-page "https://github.com/asottile/future-fstrings")
14985 (synopsis "Backport of fstrings to Python < 3.6")
14986 (description
14987 "This package provides a UTF-8 compatible encoding
14988@code{future_fstrings}, which performs source manipulation. It decodes the
14989source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
14990@code{f} strings.")
14991 (license license:expat)))
14992
dae2eb1c
MC
14993(define-public python-typed-ast
14994 (package
14995 (name "python-typed-ast")
bae89583 14996 (version "1.4.0")
dae2eb1c
MC
14997 (source
14998 (origin
bae89583
MO
14999 (method git-fetch)
15000 (uri (git-reference
15001 (url "https://github.com/python/typed_ast.git")
15002 (commit version)))
dae2eb1c 15003 (sha256
bae89583
MO
15004 (base32 "0l0hz809f7i356kmqkvfsaswiidb98j9hs9rrjnfawzqcbffzgyb"))
15005 (file-name (git-file-name name version))))
dae2eb1c
MC
15006 (build-system python-build-system)
15007 (arguments
15008 `(#:modules ((guix build utils)
15009 (guix build python-build-system)
15010 (ice-9 ftw)
15011 (srfi srfi-1)
15012 (srfi srfi-26))
15013 #:phases
15014 (modify-phases %standard-phases
15015 (replace 'check
15016 (lambda _
15017 (let ((cwd (getcwd)))
15018 (setenv "PYTHONPATH"
15019 (string-append cwd "/build/"
15020 (find (cut string-prefix? "lib" <>)
15021 (scandir (string-append cwd "/build")))
15022 ":"
15023 (getenv "PYTHONPATH"))))
15024 (invoke "pytest")
15025 #t)))))
15026 (native-inputs `(("python-pytest" ,python-pytest)))
15027 (home-page "https://github.com/python/typed_ast")
15028 (synopsis "Fork of Python @code{ast} modules with type comment support")
15029 (description "This package provides a parser similar to the standard
15030@code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
15031include PEP 484 type comments and are independent of the version of Python
15032under which they are run. The @code{typed_ast} parsers produce the standard
15033Python AST (plus type comments), and are both fast and correct, as they are
15034based on the CPython 2.7 and 3.7 parsers.")
15035 ;; See the file "LICENSE" for the details.
15036 (license (list license:psfl
15037 license:asl2.0
15038 license:expat)))) ;ast27/Parser/spark.py
15039
44d10b1f
RW
15040(define-public python-typing
15041 (package
15042 (name "python-typing")
15043 (version "3.6.6")
15044 (source
15045 (origin
15046 (method url-fetch)
15047 (uri (pypi-uri "typing" version))
15048 (sha256
15049 (base32
15050 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
15051 (build-system python-build-system)
15052 (home-page "https://docs.python.org/3/library/typing.html")
15053 (synopsis "Type hints for Python")
15054 (description "This is a backport of the standard library @code{typing}
15055module to Python versions older than 3.5. Typing defines a standard notation
15056for Python function and variable type annotations. The notation can be used
15057for documenting code in a concise, standard format, and it has been designed
15058to also be used by static and runtime type checkers, static analyzers, IDEs
15059and other tools.")
15060 (license license:psfl)))
15061
15062(define-public python2-typing
15063 (package-with-python2 python-typing))
15064
f89d443b
VC
15065(define-public python-typing-extensions
15066 (package
15067 (name "python-typing-extensions")
15068 (version "3.7.2")
15069 (source
15070 (origin
15071 (method url-fetch)
15072 (uri (pypi-uri "typing_extensions" version))
15073 (sha256
15074 (base32
15075 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
15076 (build-system python-build-system)
15077 (home-page
15078 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
15079 (synopsis "Experimental type hints for Python")
15080 (description
15081 "The typing_extensions module contains additional @code{typing} hints not
15082yet present in the of the @code{typing} standard library.
15083Included are implementations of:
15084@enumerate
15085@item ClassVar
15086@item ContextManager
15087@item Counter
15088@item DefaultDict
15089@item Deque
15090@item NewType
15091@item NoReturn
15092@item overload
15093@item Protocol
15094@item runtime
15095@item Text
15096@item Type
15097@item TYPE_CHECKING
15098@item AsyncGenerator
15099@end enumerate\n")
15100 (license license:psfl)))
15101
44d10b1f
RW
15102(define-public bpython
15103 (package
15104 (name "bpython")
4de93b2f 15105 (version "0.18")
44d10b1f
RW
15106 (source
15107 (origin
15108 (method url-fetch)
15109 (uri (pypi-uri "bpython" version))
15110 (sha256
4de93b2f 15111 (base32 "1hl6frgvr2lqaxqczl8amg9xih32b3gzv429vs0qrjb8wpdj1k2n"))))
44d10b1f
RW
15112 (build-system python-build-system)
15113 (arguments
15114 `(#:phases
15115 (modify-phases %standard-phases
15116 (add-after 'unpack 'remove-failing-test
15117 (lambda _
15118 ;; Remove failing test. FIXME: make it pass
15119 (delete-file "bpython/test/test_args.py")
15120 #t))
15121 (add-after 'wrap 'add-aliases
15122 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
15123 (lambda* (#:key outputs #:allow-other-keys)
15124 (let ((out (assoc-ref outputs "out")))
15125 (for-each
15126 (lambda (old new)
15127 (symlink old (string-append out "/bin/" new)))
15128 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
15129 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
15130 #t)))))
15131 (propagated-inputs
15132 `(("python-pygments" ,python-pygments)
15133 ("python-requests" ,python-requests)
4de93b2f 15134 ("python-babel" ,python-babel) ; optional, for internationalization
44d10b1f
RW
15135 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
15136 ("python-greenlet" ,python-greenlet)
4de93b2f 15137 ("python-urwid" ,python-urwid) ; for bpython-urwid only
44d10b1f
RW
15138 ("python-six" ,python-six)))
15139 (native-inputs
15140 `(("python-sphinx" ,python-sphinx)
15141 ("python-mock" ,python-mock)))
15142 (home-page "https://bpython-interpreter.org/")
15143 (synopsis "Fancy interface to the Python interpreter")
15144 (description "Bpython is a fancy interface to the Python
15145interpreter. bpython's main features are
15146
15147@enumerate
15148@item in-line syntax highlighting,
15149@item readline-like autocomplete with suggestions displayed as you type,
15150@item expected parameter list for any Python function,
15151@item \"rewind\" function to pop the last line of code from memory and
15152 re-evaluate,
15153@item send the code you've entered off to a pastebin,
15154@item save the code you've entered to a file, and
15155@item auto-indentation.
15156@end enumerate")
15157 (license license:expat)))
15158
15159(define-public bpython2
15160 (let ((base (package-with-python2
15161 (strip-python2-variant bpython))))
15162 (package (inherit base)
15163 (name "bpython2")
15164 (arguments
15165 `(#:python ,python-2
15166 #:phases
15167 (modify-phases %standard-phases
15168 (add-after 'unpack 'remove-failing-test
15169 (lambda _
15170 ;; Remove failing test. FIXME: make it pass
15171 (delete-file "bpython/test/test_args.py")
15172 ;; Disable failing test-cases (renaming inhibits they are
15173 ;; discovered)
15174 (substitute* "bpython/test/test_curtsies_repl.py"
15175 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
15176 (string-append a "xxx_off_" b))
15177 (("^(\\s*def )(test_complex\\W)" _ a b)
15178 (string-append a "xxx_off_" b)))
15179 #t))
15180 (add-before 'build 'rename-scripts
15181 ;; rename the scripts to bypthon2, bpdb2, etc.
15182 (lambda _
15183 (substitute* "setup.py"
15184 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
15185 (string-append name "2" rest "\n"))
15186 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
15187 (string-append name "2" (or sub "") rest "\n")))
15188 #t))))))))
15189
15190(define-public python-pyinotify
15191 (package
15192 (name "python-pyinotify")
15193 (version "0.9.6")
15194 (source (origin
15195 (method url-fetch)
15196 (uri (pypi-uri "pyinotify" version))
15197 (sha256
15198 (base32
15199 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
15200 (build-system python-build-system)
15201 (arguments `(#:tests? #f)) ;no tests
15202 (home-page "https://github.com/seb-m/pyinotify")
15203 (synopsis "Python library for monitoring inotify events")
15204 (description
15205 "@code{pyinotify} provides a Python interface for monitoring
15206file system events on Linux.")
15207 (license license:expat)))
15208
15209(define-public python2-pyinotify
15210 (package-with-python2 python-pyinotify))
15211
15212;; Ada parser uses this version.
15213(define-public python2-quex-0.67.3
15214 (package
15215 (name "python2-quex")
15216 (version "0.67.3")
15217 (source
15218 (origin
15219 (method url-fetch)
15220 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
15221 (version-major+minor version)
15222 "/quex-" version ".zip"))
15223 (sha256
15224 (base32
15225 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
15226 (build-system python-build-system)
15227 (native-inputs
15228 `(("unzip" ,unzip)))
15229 (arguments
15230 `(#:python ,python-2
15231 #:tests? #f
15232 #:phases
15233 (modify-phases %standard-phases
15234 (delete 'configure)
15235 (delete 'build)
15236 (replace 'install
15237 (lambda* (#:key outputs #:allow-other-keys)
15238 (let* ((out (assoc-ref outputs "out"))
15239 (share/quex (string-append out "/share/quex"))
15240 (bin (string-append out "/bin")))
15241 (copy-recursively "." share/quex)
15242 (mkdir-p bin)
15243 (symlink (string-append share/quex "/quex-exe.py")
15244 (string-append bin "/quex"))
15245 #t))))))
15246 (native-search-paths
15247 (list (search-path-specification
15248 (variable "QUEX_PATH")
15249 (files '("share/quex")))))
15250 (home-page "http://quex.sourceforge.net/")
15251 (synopsis "Lexical analyzer generator in Python")
15252 (description "@code{quex} is a lexical analyzer generator in Python.")
15253 (license license:lgpl2.1+))) ; Non-military
15254
15255(define-public python2-quex
15256 (package (inherit python2-quex-0.67.3)
15257 (name "python2-quex")
15258 (version "0.68.1")
15259 (source
15260 (origin
15261 (method url-fetch)
15262 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
15263 (sha256
15264 (base32
15265 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
15266 (file-name (string-append name "-" version ".tar.gz"))))))
15267
15268(define-public python-more-itertools
15269 (package
15270 (name "python-more-itertools")
1b066827 15271 (version "7.1.0")
44d10b1f
RW
15272 (source
15273 (origin
15274 (method url-fetch)
15275 (uri (pypi-uri "more-itertools" version))
15276 (sha256
15277 (base32
1b066827 15278 "16phg2f2dvm6ci5wr49ncha5lmc0m2in3bsl33c61vzca4gkvd4b"))))
44d10b1f 15279 (build-system python-build-system)
44d10b1f
RW
15280 (home-page "https://github.com/erikrose/more-itertools")
15281 (synopsis "More routines for operating on iterables, beyond itertools")
15282 (description "Python's built-in @code{itertools} module implements a
15283number of iterator building blocks inspired by constructs from APL, Haskell,
15284and SML. @code{more-itertools} includes additional building blocks for
15285working with iterables.")
47f66348 15286 (properties `((python2-variant . ,(delay python2-more-itertools))))
44d10b1f
RW
15287 (license license:expat)))
15288
47f66348 15289;; The 5.x series are the last versions supporting Python 2.7.
44d10b1f 15290(define-public python2-more-itertools
47f66348
MB
15291 (package
15292 (inherit python-more-itertools)
15293 (name "python2-more-itertools")
15294 (version "5.0.0")
15295 (source (origin
15296 (method url-fetch)
15297 (uri (pypi-uri "more-itertools" version))
15298 (sha256
15299 (base32
15300 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
15301 (arguments
15302 `(#:python ,python2-minimal))
15303 (propagated-inputs
15304 `(("python2-six" ,python2-six-bootstrap)))))
44d10b1f
RW
15305
15306(define-public python-latexcodec
15307 (package
15308 (name "python-latexcodec")
f3415ba5 15309 (version "1.0.7")
44d10b1f
RW
15310 (source
15311 (origin
15312 (method url-fetch)
15313 (uri (pypi-uri "latexcodec" version))
15314 (sha256
f3415ba5 15315 (base32 "0wnp3yqcgx0rpy8dz51vh75lbp2qif67da19zi7m3ca98n887hgb"))))
44d10b1f
RW
15316 (build-system python-build-system)
15317 (inputs
15318 `(("python-six" ,python-six)))
15319 (home-page "https://readthedocs.org/projects/latexcodec/")
15320 (synopsis "Work with LaTeX code in Python")
15321 (description "Lexer and codec to work with LaTeX code in Python.")
15322 (license license:expat)))
15323
15324(define-public python-pybtex
15325 (package
15326 (name "python-pybtex")
9441a9c1 15327 (version "0.22.2")
44d10b1f
RW
15328 (source
15329 (origin
15330 (method url-fetch)
15331 (uri (pypi-uri "pybtex" version))
15332 (sha256
9441a9c1 15333 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
44d10b1f
RW
15334 (build-system python-build-system)
15335 (native-inputs
15336 `(("python-nose" ,python-nose)))
15337 (inputs
15338 `(("python-latexcodec" ,python-latexcodec)
15339 ("python-pyyaml" ,python-pyyaml)
15340 ("python-six" ,python-six)))
15341 (arguments
15342 `(#:test-target "nosetests"))
15343 (home-page "https://pybtex.org/")
15344 (synopsis "BibTeX-compatible bibliography processor")
15345 (description "Pybtex is a BibTeX-compatible bibliography processor written
15346in Python. You can simply type pybtex instead of bibtex.")
15347 (license license:expat)))
15348
15349(define-public python-onetimepass
15350 (package
15351 (name "python-onetimepass")
15352 (version "1.0.1")
15353 (source
15354 (origin
15355 (method url-fetch)
15356 (uri (pypi-uri "onetimepass" version))
15357 (sha256
15358 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
15359 (build-system python-build-system)
15360 (propagated-inputs `(("python-six" ,python-six)))
15361 (home-page "https://github.com/tadeck/onetimepass/")
15362 (synopsis "One-time password library")
15363 (description "Python one-time password library for HMAC-based (HOTP) and
15364time-based (TOTP) passwords.")
15365 (license license:expat)))
15366
15367(define-public python-parso
15368 (package
15369 (name "python-parso")
1475094a 15370 (version "0.5.1")
44d10b1f
RW
15371 (source
15372 (origin
15373 (method url-fetch)
15374 (uri (pypi-uri "parso" version))
15375 (sha256
15376 (base32
1475094a 15377 "171a9ivhxwsd52h1cgsz40zgzpgzscn7yqb7sdjhy8m1lzj0wsv6"))))
44d10b1f
RW
15378 (native-inputs
15379 `(("python-pytest" ,python-pytest)))
15380 (build-system python-build-system)
4eb97c25
MC
15381 (arguments
15382 `(#:phases (modify-phases %standard-phases
15383 (replace 'check
15384 (lambda _ (invoke "pytest" "-vv"))))))
44d10b1f
RW
15385 (home-page "https://github.com/davidhalter/parso")
15386 (synopsis "Python Parser")
15387 (description "Parso is a Python parser that supports error recovery and
15388round-trip parsing for different Python versions (in multiple Python versions).
15389Parso is also able to list multiple syntax errors in your Python file.")
15390 (license license:expat)))
15391
15392(define-public python2-parso
15393 (package-with-python2 python-parso))
15394
15395(define-public python-async-generator
15396 (package
15397 (name "python-async-generator")
94fcbf8d 15398 (version "1.10")
44d10b1f
RW
15399 (source
15400 (origin
15401 (method url-fetch)
15402 (uri (pypi-uri "async_generator" version))
15403 (sha256
15404 (base32
94fcbf8d 15405 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
44d10b1f
RW
15406 (build-system python-build-system)
15407 (native-inputs
15408 `(("python-pytest" ,python-pytest)))
15409 (home-page "https://github.com/python-trio/async_generator")
15410 (synopsis "Async generators and context managers for Python 3.5+")
15411 (description "@code{async_generator} back-ports Python 3.6's native async
15412generators and Python 3.7's context managers into Python 3.5.")
15413 ;; Dual licensed.
15414 (license (list license:expat license:asl2.0))))
15415
15416(define-public python-async-timeout
15417 (package
15418 (name "python-async-timeout")
15419 (version "3.0.1")
15420 (source
15421 (origin
15422 (method url-fetch)
15423 (uri (pypi-uri "async-timeout" version))
15424 (sha256
15425 (base32
15426 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
15427 (build-system python-build-system)
15428 (home-page "https://github.com/aio-libs/async_timeout/")
15429 (synopsis "Timeout context manager for asyncio programs")
15430 (description "@code{async-timeout} provides a timeout timeout context
15431manager compatible with @code{asyncio}.")
15432 (license license:asl2.0)))
15433
15434(define-public python-glob2
15435 (package
15436 (name "python-glob2")
4df49d19 15437 (version "0.7")
8fa2bcc7
TGR
15438 (source
15439 (origin
15440 (method git-fetch)
15441 (uri (git-reference
15442 (url "https://github.com/miracle2k/python-glob2.git")
4df49d19 15443 (commit (string-append "v" version))))
8fa2bcc7
TGR
15444 (file-name (git-file-name name version))
15445 (sha256
4df49d19 15446 (base32 "160nh2ay9lw2hi0rixpzb2k87r6ql56k0j2cm87lqz8xc8zbw919"))))
44d10b1f
RW
15447 (build-system python-build-system)
15448 (home-page "https://github.com/miracle2k/python-glob2/")
15449 (synopsis "Extended Version of the python buildin glob module")
15450 (description "This is an extended version of the Python
15451@url{http://docs.python.org/library/glob.html, built-in glob module} which
15452adds:
15453
15454@itemize
15455@item The ability to capture the text matched by glob patterns, and return
15456those matches alongside the file names.
15457@item A recursive @code{**} globbing syntax, akin for example to the
15458@code{globstar} option of Bash.
15459@item The ability to replace the file system functions used, in order to glob
15460on virtual file systems.
15461@item Compatible with Python 2 and Python 3 (tested with 3.3).
15462@end itemize
15463
15464Glob2 currently based on the glob code from Python 3.3.1.")
15465 (license license:bsd-2)))
15466
15467(define-public python2-glob2
15468 (package-with-python2 python-glob2))
15469
15470(define-public python-gipc
15471 (package
15472 (name "python-gipc")
15473 (version "0.6.0")
15474 (source
15475 (origin
15476 (method url-fetch)
15477 (uri (pypi-uri "gipc" version ".zip"))
15478 (sha256
15479 (base32
15480 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
15481 (build-system python-build-system)
15482 (native-inputs
15483 `(("unzip" ,unzip)))
15484 (propagated-inputs
15485 `(("python-gevent" ,python-gevent)))
15486 (home-page "http://gehrcke.de/gipc")
15487 (synopsis "Child process management in the context of gevent")
15488 (description "Usage of Python's multiprocessing package in a
15489gevent-powered application may raise problems. With @code{gipc},
15490process-based child processes can safely be created anywhere within a
15491gevent-powered application.")
15492 (license license:expat)))
15493
15494(define-public python2-gipc
15495 (package-with-python2 python-gipc))
15496
15497(define-public python-fusepy
15498 (package
15499 (name "python-fusepy")
15500 (version "2.0.4")
15501 (source
15502 (origin
15503 (method url-fetch)
15504 (uri (pypi-uri "fusepy" version))
15505 (sha256
15506 (base32
15507 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
15508 (build-system python-build-system)
15509 (arguments
15510 `(#:phases
15511 (modify-phases %standard-phases
15512 (add-before 'build 'set-library-file-name
15513 (lambda* (#:key inputs #:allow-other-keys)
15514 (let ((fuse (assoc-ref inputs "fuse")))
15515 (substitute* "fuse.py"
15516 (("find_library\\('fuse'\\)")
15517 (string-append "'" fuse "/lib/libfuse.so'")))
15518 #t))))))
15519 (propagated-inputs
15520 `(("fuse" ,fuse)))
15521 (home-page "https://github.com/fusepy/fusepy")
15522 (synopsis "Simple ctypes bindings for FUSE")
15523 (description "Python module that provides a simple interface to FUSE and
15524MacFUSE. The binding is created using the standard @code{ctypes} library.")
15525 (license license:isc)))
15526
15527(define-public python2-fusepy
15528 (package-with-python2 python-fusepy))
15529
15530(define-public python2-gdrivefs
15531 (package
15532 (name "python2-gdrivefs")
15533 (version "0.14.9")
15534 (source
15535 (origin
15536 (method url-fetch)
15537 (uri (pypi-uri "gdrivefs" version))
15538 (sha256
15539 (base32
15540 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
15541 (build-system python-build-system)
15542 (arguments
15543 `(#:python ,python-2
15544 #:phases
15545 (modify-phases %standard-phases
15546 (add-before 'build 'patch-setup-py
15547 (lambda _
15548 ;; Update requirements from dependency==version
15549 ;; to dependency>=version
15550 (substitute* "gdrivefs/resources/requirements.txt"
15551 (("==") ">="))
15552 #t)))))
15553 (native-inputs
15554 `(("python2-gipc" ,python2-gipc)
15555 ("python2-gevent" ,python2-gevent)
15556 ("python2-greenlet" ,python2-greenlet)
15557 ("python2-httplib2" ,python2-httplib2)
15558 ("python2-uritemplate" ,python2-uritemplate)
15559 ("python2-oauth2client" ,python2-oauth2client)
15560 ("python2-six" ,python2-six)))
15561 (propagated-inputs
15562 `(("python2-dateutil" ,python2-dateutil)
15563 ("python2-fusepy" ,python2-fusepy)
15564 ("python2-google-api-client" ,python2-google-api-client)))
15565 (home-page "https://github.com/dsoprea/GDriveFS")
15566 (synopsis "Mount Google Drive as a local file system")
15567 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
15568under Python 2.7.")
15569 (license license:gpl2)))
15570
15571(define-public pybind11
15572 (package
15573 (name "pybind11")
d478cc04 15574 (version "2.3.0")
44d10b1f
RW
15575 (source (origin
15576 (method git-fetch)
15577 (uri (git-reference
15578 (url "https://github.com/pybind/pybind11.git")
15579 (commit (string-append "v" version))))
15580 (sha256
15581 (base32
d478cc04 15582 "11b6dniri8m05spfd2a19irz82shf4sdca73566bniggrf3zclnf"))
44d10b1f
RW
15583 (file-name (git-file-name name version))))
15584 (build-system cmake-build-system)
15585 (native-inputs
15586 `(("python" ,python)
15587 ("python-pytest" ,python-pytest)))
15588 (arguments
15589 `(#:test-target "check"))
15590 (home-page "https://github.com/pybind/pybind11/")
15591 (synopsis "Seamless operability between C++11 and Python")
15592 (description "pybind11 is a lightweight header-only library that exposes
15593C++ types in Python and vice versa, mainly to create Python bindings of
15594existing C++ code. Its goals and syntax are similar to the excellent
15595Boost.Python library by David Abrahams: to minimize boilerplate code in
15596traditional extension modules by inferring type information using compile-time
15597introspection.")
15598 (license license:expat)))
15599
15600(define-public python-fasteners
15601 (package
15602 (name "python-fasteners")
15603 (version "0.14.1")
15604 (source
15605 (origin
15606 (method url-fetch)
15607 (uri (pypi-uri "fasteners" version))
15608 (sha256
15609 (base32
15610 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
15611 (build-system python-build-system)
15612 (propagated-inputs
15613 `(("python-monotonic" ,python-monotonic)
15614 ("python-six" ,python-six)
15615 ("python-testtools" ,python-testtools)))
15616 (home-page "https://github.com/harlowja/fasteners")
15617 (synopsis "Python package that provides useful locks")
15618 (description
15619 "This package provides a Python program that provides following locks:
15620
15621@itemize
15622@item Locking decorator
15623@item Reader-writer locks
15624@item Inter-process locks
15625@item Generic helpers
15626@end itemize\n")
15627 (properties `((python2-variant . ,(delay python2-fasteners))))
15628 (license license:asl2.0)))
15629
15630(define-public python2-fasteners
15631 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
15632 (package
15633 (inherit base)
15634 (propagated-inputs
15635 `(("python2-futures" ,python2-futures)
15636 ,@(package-propagated-inputs base))))))
15637
15638(define-public python-requests-file
15639 (package
15640 (name "python-requests-file")
15641 (version "1.4.3")
15642 (source
15643 (origin
15644 (method url-fetch)
15645 (uri (pypi-uri "requests-file" version))
15646 (sha256
15647 (base32
15648 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
15649 (build-system python-build-system)
15650 (propagated-inputs
15651 `(("python-requests" ,python-requests)
15652 ("python-six" ,python-six)))
15653 (home-page
15654 "https://github.com/dashea/requests-file")
15655 (synopsis "File transport adapter for Requests")
15656 (description
15657 "Requests-File is a transport adapter for use with the Requests Python
52beae7b 15658library to allow local file system access via @code{file://} URLs.")
44d10b1f
RW
15659 (license license:asl2.0)))
15660
15661(define-public python2-requests-file
15662 (package-with-python2 python-requests-file))
15663
15664(define-public python-tldextract
15665 (package
15666 (name "python-tldextract")
15667 (version "2.2.0")
15668 (source
15669 (origin
15670 (method url-fetch)
15671 (uri (pypi-uri "tldextract" version))
15672 (sha256
15673 (base32
15674 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
15675 (build-system python-build-system)
15676 (native-inputs
15677 `(("python-pytest" ,python-pytest)
15678 ("python-responses" ,python-responses)))
15679 (propagated-inputs
15680 `(("python-idna" ,python-idna)
15681 ("python-requests" ,python-requests)
15682 ("python-requests-file" ,python-requests-file)))
15683 (home-page
15684 "https://github.com/john-kurkowski/tldextract")
15685 (synopsis
15686 "Separate the TLD from the registered domain and subdomains of a URL")
15687 (description
15688 "TLDExtract accurately separates the TLD from the registered domain and
15689subdomains of a URL, using the Public Suffix List. By default, this includes
15690the public ICANN TLDs and their exceptions. It can optionally support the
15691Public Suffix List's private domains as well.")
15692 (license license:bsd-3)))
15693
15694(define-public python2-tldextract
15695 (package-with-python2 python-tldextract))
15696
15697(define-public python-pynamecheap
15698 (package
15699 (name "python-pynamecheap")
15700 (version "0.0.3")
15701 (source
15702 (origin
15703 (method url-fetch)
15704 (uri (pypi-uri "PyNamecheap" version))
15705 (sha256
15706 (base32
15707 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
15708 (build-system python-build-system)
15709 (propagated-inputs
15710 `(("python-requests" ,python-requests)))
15711 (home-page
15712 "https://github.com/Bemmu/PyNamecheap")
15713 (synopsis
15714 "Namecheap API client in Python")
15715 (description
15716 "PyNamecheap is a Namecheap API client in Python.")
15717 (license license:expat)))
15718
15719(define-public python2-pynamecheap
15720 (package-with-python2 python-pynamecheap))
15721
15722(define-public python-dns-lexicon
15723 (package
15724 (name "python-dns-lexicon")
15725 (version "2.4.0")
15726 (source
15727 (origin
15728 (method url-fetch)
15729 (uri (pypi-uri "dns-lexicon" version))
15730 (sha256
15731 (base32
15732 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
15733 (build-system python-build-system)
15734 (arguments
15735 `(#:tests? #f)) ;requires internet access
15736 (propagated-inputs
15737 `(("python-future" ,python-future)
15738 ("python-pynamecheap" ,python-pynamecheap)
15739 ("python-requests" ,python-requests)
15740 ("python-tldextract" ,python-tldextract)
15741 ("python-urllib3" ,python-urllib3)))
15742 (home-page "https://github.com/AnalogJ/lexicon")
15743 (synopsis
15744 "Manipulate DNS records on various DNS providers")
15745 (description
15746 "Lexicon provides a way to manipulate DNS records on multiple DNS
15747providers in a standardized way. It has a CLI but it can also be used as a
15748Python library. It was designed to be used in automation, specifically with
15749Let's Encrypt.")
15750 (license license:expat)))
15751
15752(define-public python2-dns-lexicon
15753 (package-with-python2 python-dns-lexicon))
15754
15755(define-public python-commandlines
15756 (package
15757 (name "python-commandlines")
15758 (version "0.4.1")
15759 (source
15760 (origin
15761 (method url-fetch)
15762 (uri (pypi-uri "commandlines" version))
15763 (sha256
15764 (base32
15765 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
15766 (build-system python-build-system)
15767 (home-page "https://github.com/chrissimpkins/commandlines")
15768 (synopsis "Command line argument to object parsing library")
15769 (description
15770 "@code{Commandlines} is a Python library for command line application
15771development that supports command line argument parsing, command string
15772validation testing and application logic.")
15773 (license license:expat)))
15774
15775;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
15776;; python-numba. They have a very unflexible relationship.
15777(define-public python-numba
15778 (package
15779 (name "python-numba")
7757e6d8 15780 (version "0.42.0")
44d10b1f
RW
15781 (source
15782 (origin
15783 (method url-fetch)
15784 (uri (pypi-uri "numba" version))
15785 (sha256
15786 (base32
7757e6d8 15787 "03rqdfx0512lcri2bcpngx5k3jwfbqnanqj3n19c7d6h6hqxvq9x"))))
44d10b1f
RW
15788 (build-system python-build-system)
15789 (arguments
15790 `(#:modules ((guix build utils)
15791 (guix build python-build-system)
15792 (ice-9 ftw)
15793 (srfi srfi-1)
15794 (srfi srfi-26))
15795 #:phases
15796 (modify-phases %standard-phases
15797 (add-after 'unpack 'disable-proprietary-features
15798 (lambda _
15799 (setenv "NUMBA_DISABLE_HSA" "1")
15800 (setenv "NUMBA_DISABLE_CUDA" "1")
15801 #t))
15802 (add-after 'unpack 'remove-failing-tests
15803 (lambda _
15804 ;; FIXME: these tests fail for unknown reasons:
15805 ;; test_non_writable_pycache, test_non_creatable_pycache, and
15806 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
15807 (substitute* "numba/tests/test_dispatcher.py"
15808 (("def test(_non_writable_pycache)" _ m)
15809 (string-append "def guix_skip" m))
15810 (("def test(_non_creatable_pycache)" _ m)
15811 (string-append "def guix_skip" m))
15812 (("def test(_frozen)" _ m)
15813 (string-append "def guix_skip" m)))
15814
15815 ;; These tests fail because we don't run the tests from the build
15816 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
15817 ;; They ar in numba.tests.test_pycc.TestDistutilsSupport.
15818 (substitute* "numba/tests/test_pycc.py"
15819 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
15820 (string-append "def guix_skip" m)))
15821 #t))
15822 (replace 'check
15823 (lambda _
15824 (let ((cwd (getcwd)))
15825 (setenv "PYTHONPATH"
15826 (string-append cwd "/build/"
15827 (find (cut string-prefix? "lib" <>)
15828 (scandir (string-append cwd "/build")))
15829 ":"
15830 (getenv "PYTHONPATH")))
15831 ;; Something is wrong with the PYTHONPATH when running the
15832 ;; tests from the build directory, as it complains about not being
15833 ;; able to import certain modules.
15834 (with-directory-excursion "/tmp"
15835 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
15836 #t)))))
15837 (propagated-inputs
15838 `(("python-llvmlite" ,python-llvmlite)
15839 ("python-numpy" ,python-numpy)
15840 ("python-singledispatch" ,python-singledispatch)))
15841 ;; Needed for tests.
15842 (inputs
15843 `(("python-jinja2" ,python-jinja2)
15844 ("python-pygments" ,python-pygments)))
15845 (home-page "https://numba.pydata.org")
15846 (synopsis "Compile Python code using LLVM")
15847 (description "Numba gives you the power to speed up your applications with
15848high performance functions written directly in Python. With a few
15849annotations, array-oriented and math-heavy Python code can be just-in-time
15850compiled to native machine instructions, similar in performance to C, C++ and
15851Fortran, without having to switch languages or Python interpreters.
15852
15853Numba works by generating optimized machine code using the LLVM compiler
15854infrastructure at import time, runtime, or statically (using the included pycc
15855tool).")
15856 (license license:bsd-3)))
15857
15858(define-public python-anndata
15859 (package
15860 (name "python-anndata")
8c9372c1 15861 (version "0.6.18")
44d10b1f
RW
15862 (source
15863 (origin
15864 (method url-fetch)
15865 (uri (pypi-uri "anndata" version))
15866 (sha256
15867 (base32
8c9372c1 15868 "03x83yjaccbqszj7x4fwwmpil0ai59yx64d1zmf2691za3j03w73"))))
44d10b1f
RW
15869 (build-system python-build-system)
15870 (propagated-inputs
15871 `(("python-h5py" ,python-h5py)
15872 ("python-natsort" ,python-natsort)
15873 ("python-pandas" ,python-pandas)
15874 ("python-scipy" ,python-scipy)))
15875 (home-page "https://github.com/theislab/anndata")
15876 (synopsis "Annotated data for data analysis pipelines")
15877 (description "Anndata is a package for simple (functional) high-level APIs
15878for data analysis pipelines. In this context, it provides an efficient,
15879scalable way of keeping track of data together with learned annotations and
15880reduces the code overhead typically encountered when using a mostly
15881object-oriented library such as @code{scikit-learn}.")
15882 (license license:bsd-3)))
15883
15884(define-public python-dill
15885 (package
15886 (name "python-dill")
c60b15cc 15887 (version "0.2.9")
44d10b1f
RW
15888 (source
15889 (origin
15890 (method url-fetch)
15891 (uri (pypi-uri "dill" version))
15892 (sha256
c60b15cc 15893 (base32 "0vwqyi6hyz2r29zydc78dqymkbc5y7gia16xcdh215cikxph9mpn"))))
44d10b1f 15894 (build-system python-build-system)
c60b15cc 15895 ;; FIXME: The check phase fails with "don't know how to make test from: …".
44d10b1f
RW
15896 (arguments '(#:tests? #f))
15897 (home-page "https://pypi.org/project/dill")
15898 (synopsis "Serialize all of Python")
15899 (description "Dill extends Python's @code{pickle} module for serializing
15900and de-serializing Python objects to the majority of the built-in Python
15901types. Dill provides the user the same interface as the @code{pickle} module,
15902and also includes some additional features. In addition to pickling Python
15903objects, @code{dill} provides the ability to save the state of an interpreter
61985d65 15904session in a single command. Hence, it would be feasible to save a
44d10b1f
RW
15905interpreter session, close the interpreter, ship the pickled file to another
15906computer, open a new interpreter, unpickle the session and thus continue from
15907the saved state of the original interpreter session.")
15908 (license license:bsd-3)))
15909
15910(define-public python-multiprocess
15911 (package
15912 (name "python-multiprocess")
15913 (version "0.70.6.1")
15914 (source
15915 (origin
15916 (method url-fetch)
15917 (uri (pypi-uri "multiprocess" version))
15918 (sha256
15919 (base32
15920 "1ip5caz67b3q0553mr8gm8xwsb8x500jn8ml0gihgyfy52m2ypcq"))))
15921 (build-system python-build-system)
15922 (propagated-inputs
15923 `(("python-dill" ,python-dill)))
15924 (home-page "https://pypi.org/project/multiprocess")
15925 (synopsis "Multiprocessing and multithreading in Python")
15926 (description
15927 "This package is a fork of the multiprocessing Python package, a package
15928which supports the spawning of processes using the API of the standard
15929library's @code{threading} module.")
15930 (license license:bsd-3)))
15931
15932(define-public python-toolz
15933 (package
15934 (name "python-toolz")
15935 (version "0.9.0")
15936 (source
15937 (origin
15938 (method url-fetch)
15939 (uri (pypi-uri "toolz" version))
15940 (sha256
15941 (base32
15942 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
15943 (build-system python-build-system)
15944 ;; FIXME: tests cannot be computed: "Can't perform this operation for
15945 ;; unregistered loader type"
15946 (arguments '(#:tests? #f))
15947 (home-page "https://github.com/pytoolz/toolz/")
15948 (synopsis "List processing tools and functional utilities")
15949 (description
15950 "This package provides a set of utility functions for iterators,
15951functions, and dictionaries.")
15952 (license license:bsd-3)))
15953
15954(define-public python2-toolz
15955 (package-with-python2 python-toolz))
15956
15957(define-public python-cytoolz
15958 (package
15959 (name "python-cytoolz")
15960 (version "0.9.0.1")
15961 (source
15962 (origin
15963 (method url-fetch)
15964 (uri (pypi-uri "cytoolz" version))
15965 (sha256
15966 (base32
15967 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
15968 (build-system python-build-system)
15969 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
15970 ;; 'exceptions'"
15971 (arguments '(#:tests? #f))
15972 (propagated-inputs
15973 `(("python-toolz" ,python-toolz)))
15974 (native-inputs
15975 `(("python-cython" ,python-cython)))
15976 (home-page "https://github.com/pytoolz/cytoolz")
15977 (synopsis "High performance functional utilities")
15978 (description
15979 "The cytoolz package implements the same API as provided by toolz. The
15980main differences are that @code{cytoolz} is faster and cytoolz offers a C API
15981that is accessible to other projects developed in Cython.")
15982 (license license:bsd-3)))
15983
15984(define-public python-sortedcontainers
15985 (package
15986 (name "python-sortedcontainers")
15987 (version "2.0.4")
15988 (source
15989 (origin
15990 (method url-fetch)
15991 (uri (pypi-uri "sortedcontainers" version))
15992 (sha256
15993 (base32
15994 "10hrk2k0hbf9x78vd3f0lj277m1yzfhzzxr0hja718liwb398wk0"))))
15995 (build-system python-build-system)
15996 (native-inputs
15997 `(("python-tox" ,python-tox)))
15998 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
15999 (synopsis "Sorted List, Sorted Dict, Sorted Set")
16000 (description
16001 "This package provides a sorted collections library, written in
16002pure-Python.")
16003 (license license:asl2.0)))
16004
16005(define-public python-cloudpickle
16006 (package
16007 (name "python-cloudpickle")
16008 (version "0.6.1")
16009 (source
16010 (origin
16011 (method url-fetch)
16012 (uri (pypi-uri "cloudpickle" version))
16013 (sha256
16014 (base32
16015 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
16016 (build-system python-build-system)
16017 ;; FIXME: there are 5 errors in 122 tests:
16018 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
16019 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
16020 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
16021 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
16022 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
16023 ;; TypeError: cannot serialize '_io.BufferedRandom' object
16024 (arguments '(#:tests? #f))
16025 (native-inputs
16026 `(("python-pytest" ,python-pytest)
16027 ("python-mock" ,python-mock)
16028 ("python-tornado" ,python-tornado)))
16029 (home-page "https://github.com/cloudpipe/cloudpickle")
16030 (synopsis "Extended pickling support for Python objects")
16031 (description
16032 "Cloudpickle makes it possible to serialize Python constructs not
16033supported by the default pickle module from the Python standard library. It
16034is especially useful for cluster computing where Python expressions are
16035shipped over the network to execute on remote hosts, possibly close to the
16036data.")
16037 (license license:bsd-3)))
16038
16039(define-public python2-cloudpickle
16040 (package-with-python2 python-cloudpickle))
16041
16042(define-public python-locket
16043 (package
16044 (name "python-locket")
16045 (version "0.2.0")
16046 (source
16047 (origin
16048 (method url-fetch)
16049 (uri (pypi-uri "locket" version))
16050 (sha256
16051 (base32
16052 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
16053 (build-system python-build-system)
16054 (home-page "https://github.com/mwilliamson/locket.py")
16055 (synopsis "File-based locks for Python")
16056 (description
16057 "Locket implements a lock that can be used by multiple processes provided
16058they use the same path.")
16059 (license license:bsd-2)))
16060
16061(define-public python2-locket
16062 (package-with-python2 python-locket))
16063
16064(define-public python-blosc
16065 (package
16066 (name "python-blosc")
16067 (version "1.5.1")
16068 (source
16069 (origin
16070 (method url-fetch)
16071 (uri (pypi-uri "blosc" version))
16072 (sha256
16073 (base32
16074 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
16075 (build-system python-build-system)
16076 ;; FIXME: all tests pass, but then this error is printed:
16077 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
16078 (arguments '(#:tests? #f))
16079 (propagated-inputs
16080 `(("python-numpy" ,python-numpy)))
16081 (home-page "https://github.com/blosc/python-blosc")
16082 (synopsis "Python wrapper for the Blosc data compressor library")
16083 (description "Blosc is a high performance compressor optimized for binary
16084data. It has been designed to transmit data to the processor cache faster
16085than the traditional, non-compressed, direct memory fetch approach via a
16086@code{memcpy()} system call.
16087
16088Blosc works well for compressing numerical arrays that contains data with
16089relatively low entropy, like sparse data, time series, grids with
16090regular-spaced values, etc.
16091
16092This Python package wraps the Blosc library.")
16093 (license license:bsd-3)))
16094
16095(define-public python2-blosc
16096 (package-with-python2 python-blosc))
16097
16098(define-public python-partd
16099 (package
16100 (name "python-partd")
16101 (version "0.3.9")
16102 (source
16103 (origin
16104 (method url-fetch)
16105 (uri (pypi-uri "partd" version))
16106 (sha256
16107 (base32
16108 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
16109 (build-system python-build-system)
16110 (propagated-inputs
16111 `(("python-blosc" ,python-blosc)
16112 ("python-locket" ,python-locket)
16113 ("python-numpy" ,python-numpy)
16114 ("python-pandas" ,python-pandas)
16115 ("python-pyzmq" ,python-pyzmq)
16116 ("python-toolz" ,python-toolz)))
16117 (home-page "https://github.com/dask/partd/")
16118 (synopsis "Appendable key-value storage")
16119 (description "Partd stores key-value pairs. Values are raw bytes. We
16120append on old values. Partd excels at shuffling operations.")
16121 (license license:bsd-3)))
16122
16123(define-public python2-partd
16124 (package-with-python2 python-partd))
16125
16126(define-public python-dask
16127 (package
16128 (name "python-dask")
0998175f 16129 (version "1.2.2")
44d10b1f
RW
16130 (source
16131 (origin
16132 (method url-fetch)
16133 (uri (pypi-uri "dask" version))
16134 (sha256
0998175f 16135 (base32 "0b29gvf96gmp20wicly3v3mhyc93zbm3mdv935fka6x0wax7cy2y"))))
44d10b1f
RW
16136 (build-system python-build-system)
16137 ;; A single test out of 5000+ fails. This test is marked as xfail when
16138 ;; pytest-xdist is used.
16139 (arguments
16140 `(#:phases
16141 (modify-phases %standard-phases
16142 (add-after 'unpack 'disable-broken-test
16143 (lambda _
16144 (substitute* "dask/tests/test_threaded.py"
16145 (("def test_interrupt\\(\\)" m)
16146 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
16147 m)))
16148 (when (which "python2")
16149 ;; This test fails with recent Pandas:
16150 ;; <https://github.com/dask/dask/issues/3794>.
16151 (substitute* "dask/dataframe/tests/test_dataframe.py"
16152 (("def test_info\\(\\)" m)
16153 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
16154 m))))
16155 #t))
16156 (replace 'check
16157 (lambda _ (invoke "pytest" "-vv"))))))
16158 (propagated-inputs
16159 `(("python-cloudpickle" ,python-cloudpickle)
16160 ("python-numpy" ,python-numpy)
16161 ("python-pandas" ,python-pandas)
16162 ("python-partd" ,python-partd)
16163 ("python-toolz" ,python-toolz)
16164 ("python-pyyaml" ,python-pyyaml)))
16165 (native-inputs
16166 `(("python-pytest" ,python-pytest)
16167 ("python-pytest-runner" ,python-pytest-runner)))
16168 (home-page "https://github.com/dask/dask/")
16169 (synopsis "Parallel computing with task scheduling")
16170 (description
16171 "Dask is a flexible parallel computing library for analytics. It
16172consists of two components: dynamic task scheduling optimized for computation,
16173and large data collections like parallel arrays, dataframes, and lists that
16174extend common interfaces like NumPy, Pandas, or Python iterators to
16175larger-than-memory or distributed environments. These parallel collections
16176run on top of the dynamic task schedulers. ")
16177 (license license:bsd-3)))
16178
16179(define-public python2-dask
16180 (package-with-python2 python-dask))
16181
16182(define-public python-ilinkedlist
16183 (package
16184 (name "python-ilinkedlist")
16185 (version "0.4.0")
16186 (source
16187 (origin
16188 (method url-fetch)
16189 (uri (pypi-uri "ilinkedlist" version))
16190 (sha256
16191 (base32
16192 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
16193 (build-system python-build-system)
16194 (native-inputs `(("python-pytest" ,python-pytest)))
16195 (inputs `(("python" ,python)))
16196 (home-page "https://github.com/luther9/ilinkedlist-py")
16197 (synopsis "Immutable linked list library")
16198 (description
16199 "This is a implementation of immutable linked lists for Python. It
16200contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
16201Since a linked list is treated as immutable, it is hashable, and its length
16202can be retrieved in constant time. Some of the terminology is inspired by
16203LISP. It is possible to create an improper list by creating a @code{Pair}
16204with a non-list @code{cdr}.")
16205 (license license:gpl3+)))
16206
16207(define-public python-readlike
16208 (package
16209 (name "python-readlike")
16210 (version "0.1.3")
16211 (source
16212 (origin
16213 (method url-fetch)
16214 (uri (pypi-uri "readlike" version))
16215 (sha256
16216 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
16217 (build-system python-build-system)
16218 (home-page "https://github.com/jangler/readlike")
16219 (synopsis "GNU Readline-like line editing module")
16220 (description
16221 "This Python module provides line editing functions similar to the default
16222Emacs-style ones of GNU Readline. Unlike the Python standard library's
16223@code{readline} package, this one allows access to those capabilties in settings
16224outside of a standard command-line interface. It is especially well-suited to
16225interfacing with Urwid, due to a shared syntax for describing key inputs.
16226
16227Currently, all stateless Readline commands are implemented. Yanking and history
16228are not supported.")
16229 (license license:expat)))
16230
16231(define-public python2-readlike
16232 (package-with-python2 python-readlike))
16233
16234(define-public python-reparser
16235 (package
16236 (name "python-reparser")
16237 (version "1.4.3")
16238 (source
16239 (origin
16240 (method url-fetch)
16241 (uri (pypi-uri "ReParser" version))
16242 (sha256
16243 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
16244 (build-system python-build-system)
16245 (home-page "https://github.com/xmikos/reparser")
16246 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
16247 (description
16248 "This Python library provides a simple lexer/parser for inline markup based
16249on regular expressions.")
16250 (license license:expat)))
16251
16252(define-public python2-reparser
16253 (let ((reparser (package-with-python2
16254 (strip-python2-variant python-reparser))))
16255 (package (inherit reparser)
16256 (propagated-inputs
16257 `(("python2-enum34" ,python2-enum34)
16258 ,@(package-propagated-inputs reparser))))))
16259
16260(define-public python-precis-i18n
16261 (package
16262 (name "python-precis-i18n")
16263 (version "1.0.0")
16264 (source
16265 (origin
16266 (method url-fetch)
16267 (uri (pypi-uri "precis_i18n" version))
16268 (sha256
16269 (base32
16270 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
16271 (build-system python-build-system)
16272 (home-page "https://github.com/byllyfish/precis_i18n")
16273 (synopsis "Implementation of the PRECIS framework")
16274 (description
16275 "This module implements the PRECIS Framework as described in RFC 8264,
16276RFC 8265 and RFC 8266.")
16277 (license license:expat)))
16278
d0446c4b
RW
16279(define-public python-absl-py
16280 (package
16281 (name "python-absl-py")
16282 (version "0.6.1")
16283 (source
16284 (origin
16285 (method url-fetch)
16286 (uri (pypi-uri "absl-py" version))
16287 (sha256
16288 (base32
16289 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
16290 (build-system python-build-system)
16291 (propagated-inputs
16292 `(("python-six" ,python-six)))
16293 (home-page "https://github.com/abseil/abseil-py")
16294 (synopsis "Abseil Python common libraries")
16295 (description
16296 "This package provides the Abseil Python Common Libraries, a collection
16297of Python libraries for building Python applications.")
16298 (license license:asl2.0)))
16299
81bed4e9
RW
16300(define-public python-astor
16301 (package
16302 (name "python-astor")
16303 (version "0.7.1")
16304 (source
16305 (origin
16306 (method url-fetch)
16307 (uri (pypi-uri "astor" version))
16308 (sha256
16309 (base32
16310 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
16311 (build-system python-build-system)
16312 ;; FIXME: There are two errors and two test failures.
16313 (arguments `(#:tests? #f))
16314 (home-page "https://github.com/berkerpeksag/astor")
39ee82ff 16315 (synopsis "Read and write Python ASTs")
81bed4e9 16316 (description "Astor is designed to allow easy manipulation of Python
39ee82ff 16317source via the Abstract Syntax Tree.")
81bed4e9
RW
16318 (license license:bsd-3)))
16319
39ee82ff
RW
16320(define-public python2-astor
16321 (package-with-python2 python-astor))
16322
22e623ae
RW
16323(define-public python-grpcio
16324 (package
16325 (name "python-grpcio")
16326 (version "1.17.1")
16327 (source
16328 (origin
16329 (method url-fetch)
16330 (uri (pypi-uri "grpcio" version))
16331 (sha256
16332 (base32
16333 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
16334 (build-system python-build-system)
16335 (propagated-inputs
16336 `(("python-six" ,python-six)))
16337 (home-page "https://grpc.io")
16338 (synopsis "HTTP/2-based RPC framework")
16339 (description "This package provides a Python library for communicating
16340with the HTTP/2-based RPC framework gRPC.")
16341 (license license:asl2.0)))
16342
79869f80
RW
16343(define-public python-astunparse
16344 (package
16345 (name "python-astunparse")
47d79541 16346 (version "1.6.2")
79869f80
RW
16347 (source
16348 (origin
16349 (method url-fetch)
16350 (uri (pypi-uri "astunparse" version))
16351 (sha256
47d79541 16352 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
79869f80 16353 (build-system python-build-system)
47d79541 16354 (arguments '(#:tests? #f)) ; there are none
79869f80
RW
16355 (propagated-inputs
16356 `(("python-six" ,python-six)
16357 ("python-wheel" ,python-wheel)))
16358 (home-page "https://github.com/simonpercivall/astunparse")
16359 (synopsis "AST unparser for Python")
16360 (description "This package provides an AST unparser for Python. It is a
16361factored out version of @code{unparse} found in the Python source
16362distribution.")
16363 (license license:bsd-3)))
16364
2884aac0
RW
16365(define-public python-gast
16366 (package
16367 (name "python-gast")
bd300261 16368 (version "0.2.2")
2884aac0
RW
16369 (source
16370 (origin
16371 (method url-fetch)
16372 (uri (pypi-uri "gast" version))
16373 (sha256
bd300261 16374 (base32 "1w5dzdb3gpcfmd2s0b93d8gff40a1s41rv31458z14inb3s9v4zy"))))
2884aac0
RW
16375 (build-system python-build-system)
16376 (propagated-inputs
16377 `(("python-astunparse" ,python-astunparse)))
16378 (home-page "https://pypi.org/project/gast/")
16379 (synopsis "Generic Python AST that abstracts the underlying Python version")
16380 (description
16381 "GAST provides a compatibility layer between the AST of various Python
16382versions, as produced by @code{ast.parse} from the standard @code{ast}
16383module.")
16384 (license license:bsd-3)))
16385
44d10b1f
RW
16386(define-public python-wikidata
16387 (package
16388 (name "python-wikidata")
16389 (version "0.6.1")
16390 (source
16391 (origin
16392 (method url-fetch)
16393 (uri (pypi-uri "Wikidata" version))
16394 (sha256
16395 (base32
16396 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
16397 (build-system python-build-system)
16398 (propagated-inputs
16399 `(("python-babel" ,python-babel)))
16400 (home-page "https://github.com/dahlia/wikidata")
16401 (synopsis "Wikidata client library")
16402 (description
16403 "This package provides a Python interface to
16404@url{https://www.wikidata.org/, Wikidata}.")
16405 (properties '((upstream-name . "Wikidata")))
16406 (license license:gpl3+)))
16407
16408(define-public python-doctest-ignore-unicode
16409 (package
16410 (name "python-doctest-ignore-unicode")
16411 (version "0.1.2")
16412 (source
16413 (origin
16414 (method url-fetch)
16415 (uri (pypi-uri "doctest-ignore-unicode" version))
16416 (sha256
16417 (base32
16418 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
16419 (build-system python-build-system)
16420 (native-inputs
16421 `(("python-nose" ,python-nose)))
16422 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
16423 (synopsis "Ignore Unicode literal prefixes in doctests")
16424 (description
16425 "This package adds support for a flag to ignore Unicode literal prefixes
16426in doctests.")
16427 (license license:asl2.0)))
16428
16429(define-public python-attr
16430 (package
16431 (name "python-attr")
16432 (version "0.3.1")
16433 (source
16434 (origin
16435 (method url-fetch)
16436 (uri (pypi-uri "attr" version))
16437 (sha256
16438 (base32
16439 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
16440 (build-system python-build-system)
16441 (home-page "https://github.com/denis-ryzhkov/attr")
16442 (synopsis "Decorator for attributes of target function or class")
16443 (description "Simple decorator to set attributes of target function or
16444class in a @acronym{DRY, Don't Repeat Yourself} way.")
16445 (license license:expat)))
f98232a3
VC
16446
16447(define-public python-construct
16448 (package
16449 (name "python-construct")
16450 (version "2.9.45")
16451 (source
16452 (origin
16453 (method url-fetch)
16454 (uri (pypi-uri "construct" version))
16455 (sha256
16456 (base32
16457 "130iy05awzigm2xah2yvlmb08mac5bi4gzr5m3g7k1krs3ps0w92"))))
16458 (build-system python-build-system)
16459 (arguments
16460 `(#:tests? #f)) ; No tests exist.
16461 (propagated-inputs
16462 `(("python-extras" ,python-extras)
16463 ("python-arrow" ,python-arrow)
16464 ("python-numpy" ,python-numpy)
16465 ("python-ruamel.yaml" ,python-ruamel.yaml)))
16466 (home-page "http://construct.readthedocs.io")
16467 (synopsis "Declarative and symmetrical parser and builder for binary data")
16468 (description
16469 "This package provides both simple, atomic constructs (such as
16470integers of various sizes), as well as composite ones which allow you
16471form hierarchical and sequential structures of increasing complexity.
16472It features bit and byte granularity, easy debugging and testing, an
16473easy-to-extend subclass system, and lots of primitive constructs to
16474make your work easier.")
16475 (license license:expat)))
b742c006
LF
16476
16477(define-public python-humanize
16478 (package
16479 (name "python-humanize")
16480 (version "0.5.1")
16481 (source
16482 (origin
16483 (method url-fetch)
16484 (uri (pypi-uri "humanize" version))
16485 (sha256
16486 (base32
16487 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
16488 (arguments
16489 '(#:tests? #f)) ; tests not in pypi archive
16490 (build-system python-build-system)
16491 (home-page "https://github.com/jmoiron/humanize")
16492 (synopsis "Print numerical information in a human-readable form")
16493 (description "This package provides a Python module that displays numbers
16494and dates in \"human readable\" forms. For example, it would display
16495\"12345591313\" as \"12.3 billion\".")
16496 (license license:expat)))
d5bbf66d
LF
16497
16498(define-public python-txaio
16499 (package
16500 (name "python-txaio")
16501 (version "18.8.1")
16502 (source
16503 (origin
16504 (method url-fetch)
16505 (uri (pypi-uri "txaio" version))
16506 (sha256
16507 (base32
16508 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
16509 (build-system python-build-system)
16510 (propagated-inputs
16511 `(("python-twisted" ,python-twisted)
16512 ("python-six" ,python-six)))
16513 (home-page "https://github.com/crossbario/txaio")
16514 (synopsis "Compatibility layer between Python asyncio and Twisted")
16515 (description "Txaio provides a compatibility layer between the Python
16516@code{asyncio} module and @code{Twisted}.")
16517 (license license:expat)))
963dfd3a
RW
16518
16519(define-public python-toolshed
16520 (package
16521 (name "python-toolshed")
16522 (version "0.4.6")
16523 (source
16524 (origin
16525 (method url-fetch)
16526 (uri (pypi-uri "toolshed" version))
16527 (sha256
16528 (base32
16529 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
16530 (build-system python-build-system)
16531 (native-inputs
16532 `(("python-nose" ,python-nose)))
16533 (home-page "https://github.com/brentp/toolshed/")
16534 (synopsis "Collection of modules and functions for working with data")
16535 (description "This is a collection of well-tested, simple modules and
16536functions that aim to reduce boilerplate when working with data.")
16537 (license license:bsd-2)))
c91ecf2d
RW
16538
16539(define-public python-annoy
16540 (package
16541 (name "python-annoy")
16542 (version "1.15.1")
16543 (source
16544 (origin
16545 (method url-fetch)
16546 (uri (pypi-uri "annoy" version))
16547 (sha256
16548 (base32
16549 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
16550 (build-system python-build-system)
16551 (native-inputs
16552 `(("python-nose" ,python-nose)))
16553 (home-page "https://github.com/spotify/annoy/")
16554 (synopsis "Approximate nearest neighbors library")
16555 (description
16556 "Annoy is a C++ library with Python bindings to search for points in
16557space that are close to a given query point. It also creates large read-only
16558file-based data structures that are @code{mmap}ped into memory so that many
16559processes may share the same data.")
16560 (license license:asl2.0)))
412342d1 16561
79bfa422 16562(define-public python-pylzma
412342d1 16563 (package
79bfa422
DM
16564 (name "python-pylzma")
16565 (version "0.5.0")
16566 (source
16567 (origin
16568 (method url-fetch)
16569 (uri (pypi-uri "pylzma" version))
16570 (sha256
16571 (base32
16572 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
412342d1 16573 (build-system python-build-system)
79bfa422
DM
16574 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
16575 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
16576 (description "This package provides Python bindings for the LZMA library
16577by Igor Pavlov.")
16578 (license license:lgpl2.1+)))
16579
16580(define-public python2-pylzma
16581 (package-with-python2 python-pylzma))
f825e605 16582
6609ebe7
AG
16583(define-public python2-zeroconf
16584 (package
16585 (name "python2-zeroconf")
16586
16587 ;; This is the last version that supports Python 2.x.
16588 (version "0.19.1")
16589 (source
16590 (origin
16591 (method url-fetch)
16592 (uri (pypi-uri "zeroconf" version))
16593 (sha256
16594 (base32
16595 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
16596 (build-system python-build-system)
16597 (arguments
16598 `(#:python ,python-2
16599 #:phases
16600 (modify-phases %standard-phases
16601 (add-after 'unpack 'patch-requires
16602 (lambda* (#:key inputs #:allow-other-keys)
16603 (substitute* "setup.py"
16604 (("enum-compat")
16605 "enum34"))
16606 #t)))))
16607 (native-inputs
16608 `(("python2-six" ,python2-six)
16609 ("python2-enum32" ,python2-enum34)
16610 ("python2-netifaces" ,python2-netifaces)
16611 ("python2-typing" ,python2-typing)))
16612 (home-page "https://github.com/jstasiak/python-zeroconf")
16613 (synopsis "Pure Python mDNS service discovery")
16614 (description
16615 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
16616compatible).")
16617 (license license:lgpl2.1+)))
16618
f825e605
GLV
16619(define-public python-bsddb3
16620 (package
16621 (name "python-bsddb3")
16622 (version "6.2.6")
16623 (source
16624 (origin
16625 (method url-fetch)
16626 (uri (pypi-uri "bsddb3" version))
16627 (sha256
16628 (base32
16629 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
16630 (build-system python-build-system)
16631 (inputs
16632 `(("bdb" ,bdb)))
16633 (arguments
16634 '(#:phases
16635 (modify-phases %standard-phases
16636 (add-after 'unpack 'configure-locations
16637 (lambda* (#:key inputs #:allow-other-keys)
16638 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
16639 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
16640 #t))
16641 (replace 'check
16642 (lambda _
16643 (invoke "python3" "test3.py" "-v"))))))
16644 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
16645 (synopsis "Python bindings for Oracle Berkeley DB")
16646 (description
16647 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
16648C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
16649Transaction objects, and each of these is exposed as a Python type in the
16650bsddb3.db module. The database objects can use various access methods: btree,
16651hash, recno, and queue. Complete support of Berkeley DB distributed
16652transactions. Complete support for Berkeley DB Replication Manager.
16653Complete support for Berkeley DB Base Replication. Support for RPC.")
16654 (license license:bsd-3)))
edeb04bf
PL
16655
16656(define-public python-dbfread
16657 (package
16658 (name "python-dbfread")
16659 (version "2.0.7")
16660 (source (origin
16661 (method url-fetch)
16662 (uri (pypi-uri "dbfread" version))
16663 (sha256
16664 (base32
16665 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
16666 (build-system python-build-system)
16667 (native-inputs
16668 `(("python-pytest" ,python-pytest)))
16669 (home-page "https://dbfread.readthedocs.io")
16670 (synopsis "Read DBF Files with Python")
16671 (description
16672 "This library reads DBF files and returns the data as native Python data
16673types for further processing. It is primarily intended for batch jobs and
16674one-off scripts.")
16675 (license license:expat)))
e308b4f0
JM
16676
16677(define-public python-cached-property
16678 (package
16679 (name "python-cached-property")
16680 (version "1.5.1")
16681 (source
16682 (origin
16683 (method url-fetch)
16684 (uri (pypi-uri "cached-property" version))
16685 (sha256
16686 (base32
16687 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
16688 (build-system python-build-system)
16689 (arguments
16690 `(#:phases
16691 (modify-phases %standard-phases
16692 ;; https://github.com/pydanny/cached-property/issues/131
16693 ;; recent versions of freezegun break one test
16694 (add-after 'unpack 'disable-broken-test
16695 (lambda _
16696 (substitute* "tests/test_cached_property.py"
16697 (("def test_threads_ttl_expiry\\(self\\)" m)
16698 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
16699 " " m)))
16700 #t)))))
16701 (native-inputs
16702 `(("python-freezegun" ,python-freezegun)))
16703 (home-page
16704 "https://github.com/pydanny/cached-property")
16705 (synopsis
16706 "Decorator for caching properties in classes")
16707 (description
16708 "This package provides a decorator which makes caching
16709time-or-computationally-expensive properties quick and easy and works in Python
167102 or 3.")
16711 (license license:bsd-3)))
dfe8a704
NG
16712
16713(define-public python-folium
16714 (package
16715 (name "python-folium")
16716 (version "0.10.0")
16717 (source
16718 (origin
16719 (method url-fetch)
16720 (uri (pypi-uri "folium" version))
16721 (sha256
16722 (base32
16723 "18fzxijsgrb95r0a8anc9ba5ijyw3nlnv3rpavfbkqa5v878x84f"))))
16724 (build-system python-build-system)
16725 (propagated-inputs
16726 `(("python-branca" ,python-branca)
16727 ("python-jinja2" ,python-jinja2)
16728 ("python-numpy" ,python-numpy)
16729 ("python-requests" ,python-requests)))
16730 (native-inputs
16731 `(("python-pytest" ,python-pytest)))
16732 (home-page "https://github.com/python-visualization/folium")
16733 (synopsis "Make beautiful maps with Leaflet.js & Python")
16734 (description "@code{folium} makes it easy to visualize data that’s been
16735manipulated in Python on an interactive leaflet map. It enables both the
16736binding of data to a map for @code{choropleth} visualizations as well as
16737passing rich vector/raster/HTML visualizations as markers on the map.
16738
16739The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
16740Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
16741supports Image, Video, GeoJSON and TopoJSON overlays.")
16742 (license license:expat)))
9dd5f475
LC
16743
16744(define-public jube
16745 (package
16746 ;; This is a command-line tool, so no "python-" prefix.
16747 (name "jube")
16748 (version "2.2.2")
16749 (source (origin
16750 (method url-fetch)
16751 (uri (string-append
16752 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
16753 version))
16754 (sha256
16755 (base32
16756 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
16757 (file-name (string-append "jube-" version ".tar.gz"))))
16758 (build-system python-build-system)
16759 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
16760 (synopsis "Benchmarking environment")
16761 (description
16762 "JUBE helps perform and analyze benchmarks in a systematic way. For each
16763benchmarked application, benchmark data is stored in a format that allows JUBE
16764to deduct the desired information. This data can be parsed by automatic pre-
16765and post-processing scripts that draw information and store it more densely
16766for manual interpretation.")
a9f33960 16767 (license license:gpl3+)))
66436424
NG
16768
16769(define-public python-pyroutelib3
16770 (package
16771 (name "python-pyroutelib3")
16772 (version "1.3.post1")
16773 (source
16774 (origin
16775 (method url-fetch)
16776 (uri (pypi-uri "pyroutelib3" version))
16777 (sha256
16778 (base32
16779 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
16780 (build-system python-build-system)
16781 (propagated-inputs
16782 `(("python-dateutil" ,python-dateutil)))
16783 (home-page "https://github.com/MKuranowski/pyroutelib3")
16784 (synopsis "Library for simple routing on OSM data")
16785 (description "Library for simple routing on OSM data")
16786 (license license:gpl3+)))
30e7c03a
GL
16787
16788(define-public python-elementpath
16789 (package
16790 (name "python-elementpath")
16791 (version "1.2.0")
16792 (source
16793 (origin
16794 (method url-fetch)
16795 (uri (pypi-uri "elementpath" version))
16796 (sha256
16797 (base32
16798 "1syn2z543brab23dskh3fjd9pqvz6npqbcicrs2d88dbg26xl08p"))))
16799 (build-system python-build-system)
16800 (home-page
16801 "https://github.com/sissaschool/elementpath")
16802 (synopsis
16803 "XPath 1.0/2.0 parsers and selectors for ElementTree and lxml")
16804 (description
16805 "The proposal of this package is to provide XPath 1.0 and 2.0 selectors
16806for Python's ElementTree XML data structures, both for the standard
16807ElementTree library and for the @uref{http://lxml.de, lxml.etree} library.
16808
16809For lxml.etree this package can be useful for providing XPath 2.0 selectors,
16810because lxml.etree already has it's own implementation of XPath 1.0.")
16811 (license license:expat)))
c1bbef69
16812
16813(define-public python-bibtexparser
16814 (package
16815 (name "python-bibtexparser")
16816 (version "1.1.0")
16817 (source
16818 (origin
16819 (method url-fetch)
16820 (uri (pypi-uri "bibtexparser" version))
16821 (sha256
16822 (base32
16823 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
16824 (build-system python-build-system)
16825 (propagated-inputs
16826 `(("python-pyparsing" ,python-pyparsing)))
16827 (native-inputs
16828 `(("python-future" ,python-future)))
16829 (home-page "https://github.com/sciunto-org/python-bibtexparser")
16830 (synopsis "Python library to parse BibTeX files")
16831 (description "BibtexParser is a Python library to parse BibTeX files.")
16832 (license (list license:bsd-3 license:lgpl3))))
8581b40d
HG
16833
16834(define-public python-distro
16835 (package
16836 (name "python-distro")
16837 (version "1.4.0")
16838 (source
16839 (origin
16840 (method url-fetch)
16841 (uri (pypi-uri "distro" version))
16842 (sha256
16843 (base32
16844 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
16845 (build-system python-build-system)
16846 (native-inputs
16847 `(("python-pytest" ,python-pytest)))
16848 (home-page "https://github.com/nir0s/distro")
16849 (synopsis
16850 "OS platform information API")
16851 (description
16852 "@code{distro} provides information about the OS distribution it runs on,
16853such as a reliable machine-readable ID, or version information.
16854
16855It is the recommended replacement for Python's original
16856`platform.linux_distribution` function (which will be removed in Python 3.8).
16857@code{distro} also provides a command-line interface to output the platform
16858information in various formats.")
16859 (license license:asl2.0)))
f2f41e1a
HG
16860
16861(define-public python-cairosvg
16862 (package
16863 (name "python-cairosvg")
16864 (version "2.4.2")
16865 (source
16866 (origin
16867 (method url-fetch)
16868 (uri (pypi-uri "CairoSVG" version))
16869 (sha256
16870 (base32 "1bb7irxbaxxb9ahm3z5wsx1q96mm5gzskc7b6q07h9ikcnb8yrjf"))))
16871 (build-system python-build-system)
16872 (arguments
16873 `(#:phases
16874 (modify-phases %standard-phases
16875 (replace 'check
16876 (lambda _ (invoke "pytest"))))))
16877 (propagated-inputs
16878 `(("python-cairocffi" ,python-cairocffi)
16879 ("python-cssselect2" ,python-cssselect2)
16880 ("python-defusedxml" ,python-defusedxml)
16881 ("python-pillow" ,python-pillow)
16882 ("python-tinycss2" ,python-tinycss2)))
16883 (native-inputs
16884 `(("python-pytest-flake8" ,python-pytest-flake8)
16885 ("python-pytest-isort" ,python-pytest-isort)
16886 ("python-pytest-runner" ,python-pytest-runner)))
16887 (home-page "https://cairosvg.org/")
16888 (synopsis "SVG to PDF/PS/PNG converter based on Cairo")
16889 (description "CairoSVG is a SVG converter based on Cairo. It can export
16890SVG files to PDF, PostScript and PNG files. The main part of CairoSVG is a
16891SVG parser, trying to follow the SVG 1.1 recommendation from the W3C. Once
16892parsed, the result is drawn to a Cairo surface that can be exported to
16893qvarious formats: PDF, PostScript, PNG and even SVG.")
16894 (license license:lgpl3+)))
ea1801e0
HG
16895
16896(define-public python-pyphen
16897 (package
16898 (name "python-pyphen")
16899 (version "0.9.5")
16900 (source
16901 (origin
16902 (method url-fetch)
16903 (uri (pypi-uri "Pyphen" version))
16904 (sha256
16905 (base32 "08c9y69ry9d6m4zalhnalg86lsp9v2j5n1ziw5vxfmiihx83lqrv"))))
16906 (build-system python-build-system)
16907 ;; TODO: Use the Guix system hyphenation packages hyphen-* rather than the
16908 ;; embedded set provided by upstream - like Debian does.
16909 (home-page "https://github.com/Kozea/Pyphen")
16910 (synopsis "Pure Python module to hyphenate text")
16911 (description "Pyphen is a pure Python module to hyphenate text using
16912existing Hunspell hyphenation dictionaries.")
16913 (license (list license:gpl2 license:lgpl2.1 license:mpl1.1))))
85cfb0e9
CL
16914
16915(define-public python-intelhex
16916 (package
16917 (name "python-intelhex")
16918 (version "2.2.1")
16919 (source
16920 (origin
16921 (method url-fetch)
16922 (uri (pypi-uri "intelhex" version))
16923 (sha256
16924 (base32
16925 "0ckqjbxd8gwcg98gfzpn4vq1qxzfvq3rdbrr1hikj1nmw08qb780"))))
16926 (build-system python-build-system)
16927 (arguments '(#:tests? #f)) ;issue with version
16928 (home-page "https://pypi.org/project/IntelHex/")
16929 (synopsis "Python library for Intel HEX files manipulations")
16930 (description "The Intel HEX file format is widely used in microprocessors
16931and microcontrollers area (embedded systems etc.) as the de facto standard for
16932representation of code to be programmed into microelectronic devices. This
16933package provides an intelhex Python library to read, write, create from
16934scratch and manipulate data from Intel HEX file format. It also includes
16935several convenience Python scripts, including \"classic\" hex2bin and bin2hex
16936converters and more, those based on the library itself.")
16937 (license license:bsd-3)))