gnu: pidentd: Build against OpenSSL 1.0.
[jackhill/guix/guix.git] / gnu / packages / python-xyz.scm
CommitLineData
44d10b1f
RW
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
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>
22;;; Copyright © 2016, 2018 Hartmut Goebel <h.goebel@crazy-compilers.com>
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>
41;;; Copyright © 2017, 2018 Mathieu Othacehe <m.othacehe@gmail.com>
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
RW
55;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
56;;; Copyright © 2018 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>
44d10b1f
RW
67;;;
68;;; This file is part of GNU Guix.
69;;;
70;;; GNU Guix is free software; you can redistribute it and/or modify it
71;;; under the terms of the GNU General Public License as published by
72;;; the Free Software Foundation; either version 3 of the License, or (at
73;;; your option) any later version.
74;;;
75;;; GNU Guix is distributed in the hope that it will be useful, but
76;;; WITHOUT ANY WARRANTY; without even the implied warranty of
77;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
78;;; GNU General Public License for more details.
79;;;
80;;; You should have received a copy of the GNU General Public License
81;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
82
83(define-module (gnu packages python-xyz)
84 #:use-module ((guix licenses) #:prefix license:)
85 #:use-module (gnu packages)
86 #:use-module (gnu packages algebra)
87 #:use-module (gnu packages adns)
88 #:use-module (gnu packages attr)
89 #:use-module (gnu packages backup)
90 #:use-module (gnu packages bash)
91 #:use-module (gnu packages check)
92 #:use-module (gnu packages compression)
93 #:use-module (gnu packages crypto)
94 #:use-module (gnu packages databases)
f825e605 95 #:use-module (gnu packages dbm)
44d10b1f
RW
96 #:use-module (gnu packages file)
97 #:use-module (gnu packages fontutils)
98 #:use-module (gnu packages gcc)
99 #:use-module (gnu packages geo)
100 #:use-module (gnu packages ghostscript)
101 #:use-module (gnu packages gl)
102 #:use-module (gnu packages glib)
103 #:use-module (gnu packages graphviz)
104 #:use-module (gnu packages graphics)
105 #:use-module (gnu packages gstreamer)
106 #:use-module (gnu packages gtk)
107 #:use-module (gnu packages icu4c)
108 #:use-module (gnu packages image)
109 #:use-module (gnu packages imagemagick)
110 #:use-module (gnu packages libevent)
111 #:use-module (gnu packages libffi)
112 #:use-module (gnu packages linux)
113 #:use-module (gnu packages llvm)
114 #:use-module (gnu packages man)
115 #:use-module (gnu packages maths)
42f0b0c2 116 #:use-module (gnu packages monitoring)
44d10b1f
RW
117 #:use-module (gnu packages multiprecision)
118 #:use-module (gnu packages networking)
119 #:use-module (gnu packages ncurses)
120 #:use-module (gnu packages openstack)
121 #:use-module (gnu packages pcre)
122 #:use-module (gnu packages perl)
123 #:use-module (gnu packages pkg-config)
124 #:use-module (gnu packages python)
d362b11d 125 #:use-module (gnu packages python-check)
15b65617 126 #:use-module (gnu packages python-compression)
44d10b1f
RW
127 #:use-module (gnu packages python-crypto)
128 #:use-module (gnu packages python-web)
129 #:use-module (gnu packages qt)
130 #:use-module (gnu packages readline)
131 #:use-module (gnu packages sdl)
132 #:use-module (gnu packages search)
133 #:use-module (gnu packages shells)
9d0c291e 134 #:use-module (gnu packages sphinx)
44d10b1f
RW
135 #:use-module (gnu packages ssh)
136 #:use-module (gnu packages terminals)
137 #:use-module (gnu packages tex)
138 #:use-module (gnu packages texinfo)
139 #:use-module (gnu packages time)
140 #:use-module (gnu packages tls)
141 #:use-module (gnu packages version-control)
142 #:use-module (gnu packages video)
143 #:use-module (gnu packages web)
144 #:use-module (gnu packages base)
145 #:use-module (gnu packages xml)
146 #:use-module (gnu packages xorg)
147 #:use-module (gnu packages xdisorg)
148 #:use-module (gnu packages tcl)
149 #:use-module (gnu packages bdw-gc)
f98232a3 150 #:use-module (gnu packages serialization)
44d10b1f
RW
151 #:use-module (guix packages)
152 #:use-module (guix download)
153 #:use-module (guix git-download)
a042d348 154 #:use-module (guix hg-download)
44d10b1f
RW
155 #:use-module (guix utils)
156 #:use-module (guix build-system gnu)
157 #:use-module (guix build-system cmake)
158 #:use-module (guix build-system python)
159 #:use-module (guix build-system trivial)
160 #:use-module (srfi srfi-1)
161 #:use-module (srfi srfi-26))
162
163(define-public python-psutil
164 (package
165 (name "python-psutil")
7abf3cbf 166 (version "5.6.2")
44d10b1f
RW
167 (source
168 (origin
169 (method url-fetch)
170 (uri (pypi-uri "psutil" version))
171 (sha256
172 (base32
7abf3cbf 173 "1v95vb5385qscfdvphv8l2w22bmir3d7yhpi02n58v3mlqy1r3l2"))))
44d10b1f
RW
174 (build-system python-build-system)
175 (arguments
176 ;; FIXME: some tests does not return and times out.
177 '(#:tests? #f))
178 (home-page "https://www.github.com/giampaolo/psutil")
179 (synopsis "Library for retrieving information on running processes")
180 (description
181 "psutil (Python system and process utilities) is a library for retrieving
182information on running processes and system utilization (CPU, memory, disks,
183network) in Python. It is useful mainly for system monitoring, profiling and
184limiting process resources and management of running processes. It implements
185many functionalities offered by command line tools such as: ps, top, lsof,
186netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
187pidof, tty, taskset, pmap.")
188 (properties `((python2-variant . ,(delay python2-psutil))))
189 (license license:bsd-3)))
190
191(define-public python2-psutil
192 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
193 (package
194 (inherit base)
195 (propagated-inputs
196 `(("python2-enum34" ,python2-enum34) ;optional
197 ,@(package-propagated-inputs base))))))
198
199(define-public python-shapely
200 (package
201 (name "python-shapely")
6d94465b 202 (version "1.6.4.post2")
44d10b1f
RW
203 (source
204 (origin
205 (method url-fetch)
206 (uri (pypi-uri "Shapely" version))
207 (sha256
208 (base32
6d94465b 209 "03r42fmd9alp6r3q95ad6rldq2f7n1wimrw53zy5kpn33yv7pf64"))))
44d10b1f
RW
210 (build-system python-build-system)
211 (native-inputs
212 `(("python-cython" ,python-cython)
213 ("python-matplotlib" ,python-matplotlib)
214 ("python-pytest" ,python-pytest)
215 ("python-pytest-cov" ,python-pytest-cov)))
216 (inputs
217 `(("geos" ,geos)))
218 (propagated-inputs
219 `(("python-numpy" ,python-numpy)))
220 (arguments
221 `(#:phases
222 (modify-phases %standard-phases
223 (add-after 'unpack 'patch-geos-path
224 (lambda* (#:key inputs #:allow-other-keys)
225 (let ((geos (assoc-ref inputs "geos"))
226 (glibc (assoc-ref inputs ,(if (%current-target-system)
227 "cross-libc" "libc"))))
228 (substitute* "shapely/geos.py"
229 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
230 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
231 geos "/lib/libgeos_c.so'])"))
232 (("free = load_dll\\('c'\\)\\.free")
233 (string-append "free = load_dll('c', fallbacks=['"
234 glibc "/lib/libc.so.6']).free"))))
235 #t)))))
236 (home-page "https://github.com/Toblerity/Shapely")
237 (synopsis "Library for the manipulation and analysis of geometric objects")
238 (description "Shapely is a Python package for manipulation and analysis of
239planar geometric objects. It is based on the @code{GEOS} library.")
240 (license license:bsd-3)))
241
a91f4eba
S
242(define-public python-shortuuid
243 (package
244 (name "python-shortuuid")
245 (version "0.5.0")
246 (source
247 (origin
248 (method url-fetch)
249 (uri (pypi-uri "shortuuid" version))
250 (sha256
251 (base32
252 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
253 (build-system python-build-system)
254 (native-inputs
255 `(("python-pep8" ,python-pep8)))
256 (home-page "https://github.com/skorokithakis/shortuuid")
257 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
258 (description
259 "@code{shortuuid} is a Python library for generating concise, unambiguous
260and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
261module and then similar looking characters are removed.")
262 (license license:bsd-3)))
263
44d10b1f
RW
264(define-public python-logwrap
265 (package
266 (name "python-logwrap")
267 (version "3.2.1")
268 (source
269 (origin
270 (method url-fetch)
271 (uri (pypi-uri "logwrap" version ".zip"))
272 (sha256
273 (base32
274 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
275 (build-system python-build-system)
276 (propagated-inputs
277 `(("python-six" ,python-six)
278 ("python-typing" ,python-typing)))
279 (native-inputs
280 `(("unzip" ,unzip)
281 ("python-cython" ,python-cython)
282 ("python-pytest" ,python-pytest)
283 ("python-pytest-cov" ,python-pytest-cov)
284 ("python-pytest-runner" ,python-pytest-runner)))
285 (home-page "https://github.com/penguinolog/logwrap")
286 (synopsis "Decorator for logging function arguments")
287 (description "This package provides a decorator to log function arguments
288and function call return values in a human-readable way.")
289 (license license:asl2.0)))
290
291(define-public python2-shapely
292 (package-with-python2 python-shapely))
293
294(define-public python-clyent
295 (package
296 (name "python-clyent")
297 (version "1.2.1")
298 (source
299 (origin
300 (method url-fetch)
301 (uri (pypi-uri "clyent" version))
302 (sha256
303 (base32
304 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
305 (build-system python-build-system)
306 (native-inputs
307 `(("python-mock" ,python-mock)))
308 (home-page "https://github.com/binstar/clyent")
309 (synopsis "Command line client library")
310 (description "Clyent is a Python command line utiliy library. It is used
311by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
312 (license license:bsd-3)))
313
314(define-public python2-clyent
315 (package-with-python2 python-clyent))
316
317(define-public python-babel
318 (package
319 (name "python-babel")
93253411 320 (version "2.7.0")
44d10b1f
RW
321 (source
322 (origin
323 (method url-fetch)
324 (uri (pypi-uri "Babel" version))
325 (sha256
326 (base32
93253411 327 "0a7wawx8vsg7igvz6p3x909fskhg4b2y1910xk4f4c8y22p3aqg8"))))
44d10b1f
RW
328 (build-system python-build-system)
329 (native-inputs
330 `(("python-freezegun" ,python-freezegun)
331 ("python-pytest" ,python-pytest)))
332 (propagated-inputs
333 `(("python-pytz" ,python-pytz)))
334 (arguments
335 `(#:phases (modify-phases %standard-phases
336 (replace 'check
8acd1e90
MB
337 (lambda _
338 (invoke "pytest" "-vv" "-k"
339 (string-append
340 ;; XXX: These tests fail when using Pytest 4.x and
341 ;; Babel 2.6.0. Try removing this for later versions.
342 "not test_no_inherit_metazone_marker_never_in_output"
343 " and not test_smoke_dates"
344 " and not test_smoke_numbers")))))))
44d10b1f
RW
345 (home-page "http://babel.pocoo.org/")
346 (synopsis
347 "Tools for internationalizing Python applications")
348 (description
349 "Babel is composed of two major parts:
350- tools to build and work with gettext message catalogs
351- a Python interface to the CLDR (Common Locale Data Repository), providing
352access to various locale display names, localized number and date formatting,
353etc. ")
354 (license license:bsd-3)))
355
356(define-public python2-babel
357 (package-with-python2 python-babel))
358
93253411
MB
359;; Sphinx < 2.0 requires this version. Remove once no longer needed.
360(define-public python2-babel-2.6
361 (package
362 (inherit python2-babel)
363 (version "2.6.0")
364 (source (origin
365 (method url-fetch)
366 (uri (pypi-uri "Babel" version))
367 (sha256
368 (base32
369 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))))
370
44d10b1f
RW
371(define-public python2-backport-ssl-match-hostname
372 (package
373 (name "python2-backport-ssl-match-hostname")
374 (version "3.5.0.1")
375 (source
376 (origin
377 (method url-fetch)
2c1f0d09 378 (uri (pypi-uri "backports.ssl_match_hostname" version))
44d10b1f
RW
379 (sha256
380 (base32
381 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
382 (build-system python-build-system)
383 (arguments
384 `(#:python ,python-2
385 #:tests? #f)) ; no test target
386 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
387 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
388 (description
389 "This backport brings the ssl.match_hostname() function to users of
390earlier versions of Python. The function checks the hostname in the
391certificate returned by the server to which a connection has been established,
392and verifies that it matches the intended target hostname.")
393 (license license:psfl)))
394
395(define-public python-hdf4
396 (package
397 (name "python-hdf4")
398 (version "0.9")
399 (source
400 (origin
401 (method url-fetch)
402 (uri (pypi-uri name version))
403 (sha256
404 (base32
405 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
406 (build-system python-build-system)
407 (native-inputs `(("nose" ,python-nose)))
408 (propagated-inputs `(("numpy" ,python-numpy)))
409 (inputs
410 `(("hdf4" ,hdf4)
411 ("libjpeg" ,libjpeg)
412 ("zlib" ,zlib)))
413 (arguments
414 `(#:phases
415 (modify-phases %standard-phases
416 (replace 'check
417 (lambda _
418 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
419 ;; on to import numpy. Somehow this works on their CI system.
420 ;; Let's just manage PYTHONPATH here instead.
421 (substitute* "runexamples.sh"
422 (("export PYTHONPATH=.*") ""))
423 (setenv "PYTHONPATH"
424 (string-append (getcwd) ":"
425 (getenv "PYTHONPATH")))
426 (invoke "./runexamples.sh")
427 (invoke "nosetests" "-v"))))))
428 (home-page "https://github.com/fhs/python-hdf4")
429 (synopsis "Python interface to the NCSA HDF4 library")
430 (description
431 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
432which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
433NetCDF files can also be read and modified. Python-HDF4 is a fork of
434@url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
435 (license license:expat)))
436
437(define-public python2-hdf4
438 (package-with-python2 python-hdf4))
439
440(define-public python-h5py
441 (package
442 (name "python-h5py")
443 (version "2.8.0")
444 (source
445 (origin
446 (method url-fetch)
447 (uri (pypi-uri "h5py" version))
448 (sha256
449 (base32
450 "0mdr6wrq02ac93m1aqx9kad0ppfzmm4imlxqgyy1x4l7hmdcc9p6"))))
451 (build-system python-build-system)
452 (arguments
453 `(#:tests? #f ; no test target
454 #:phases
455 (modify-phases %standard-phases
456 (add-after 'unpack 'fix-hdf5-paths
457 (lambda* (#:key inputs #:allow-other-keys)
458 (let ((prefix (assoc-ref inputs "hdf5")))
459 (substitute* "setup_build.py"
460 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
461 (string-append "['" prefix "/lib" "']"))
462 (("'/opt/local/include', '/usr/local/include'")
463 (string-append "'" prefix "/include" "'")))
464 (substitute* "setup_configure.py"
465 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
466 (string-append "['" prefix "/lib" "']")))
467 #t))))))
468 (propagated-inputs
469 `(("python-six" ,python-six)
470 ("python-numpy" ,python-numpy)))
471 (inputs
472 `(("hdf5" ,hdf5)))
473 (native-inputs
474 `(("python-cython" ,python-cython)
475 ("python-pkgconfig" ,python-pkgconfig)))
476 (home-page "http://www.h5py.org/")
477 (synopsis "Read and write HDF5 files from Python")
478 (description
479 "The h5py package provides both a high- and low-level interface to the
480HDF5 library from Python. The low-level interface is intended to be a
481complete wrapping of the HDF5 API, while the high-level component supports
482access to HDF5 files, datasets and groups using established Python and NumPy
483concepts.")
484 (license license:bsd-3)))
485
486(define-public python2-h5py
487 (package-with-python2 python-h5py))
488
8b89dedc
RW
489(define-public python-sh
490 (package
491 (name "python-sh")
492 (version "1.12.14")
493 (source
494 (origin
495 (method url-fetch)
496 (uri (pypi-uri "sh" version))
497 (sha256
498 (base32
499 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
500 (build-system python-build-system)
fd3638d8
EF
501 (arguments
502 '(#:phases
503 (modify-phases %standard-phases
504 (replace 'check
505 (lambda _
ca983a2f
NG
506 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
507 (setenv "HOME" "/tmp")
fd3638d8
EF
508 (invoke "python" "sh.py" "test"))))))
509 (native-inputs
510 `(("python-coverage" ,python-coverage)))
8b89dedc
RW
511 (home-page "https://github.com/amoffat/sh")
512 (synopsis "Python subprocess replacement")
513 (description "This package provides a replacement for Python's
514@code{subprocess} feature.")
515 (license license:expat)))
516
3869effd
RW
517(define-public python2-sh
518 (package-with-python2 python-sh))
519
d362b11d
RW
520(define-public python-cftime
521 (package
522 (name "python-cftime")
523 (version "1.0.3.4")
524 (source
525 (origin
526 (method url-fetch)
527 (uri (pypi-uri "cftime" version))
528 (sha256
529 (base32
530 "0362dhxbzk593walyjz30dll6y2y79wialik647cbwdsf3ad0x6x"))))
531 (build-system python-build-system)
532 (propagated-inputs
533 `(("python-numpy" ,python-numpy)))
534 (native-inputs
535 `(("python-coveralls" ,python-coveralls)
536 ("python-cython" ,python-cython)
537 ("python-pytest-cov" ,python-pytest-cov)))
538 (home-page "https://github.com/Unidata/cftime")
539 (synopsis "Library for time handling")
540 (description
541 "This package provides time-handling functionality that used to be part
542of the netcdf4 package before.")
543 ;; This package claims to include code under the GPLv3 but is released
544 ;; under ISC.
545 (license (list license:isc license:gpl3+))))
546
44d10b1f
RW
547(define-public python-netcdf4
548 (package
549 (name "python-netcdf4")
93e7b209 550 (version "1.4.2")
44d10b1f
RW
551 (source
552 (origin
553 (method url-fetch)
554 (uri (pypi-uri "netCDF4" version))
555 (sha256
556 (base32
93e7b209 557 "0c0sklgrmv15ygliin8qq0hp7vanmbi74m6zpi0r1ksr0hssyd5r"))))
44d10b1f 558 (build-system python-build-system)
93e7b209
RW
559 (arguments
560 '(#:phases
561 (modify-phases %standard-phases
562 (add-after 'unpack 'configure-locations
563 (lambda* (#:key inputs #:allow-other-keys)
564 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
565 #t)))))
44d10b1f
RW
566 (native-inputs
567 `(("python-cython" ,python-cython)))
568 (propagated-inputs
93e7b209
RW
569 `(("python-numpy" ,python-numpy)
570 ("python-cftime" ,python-cftime)))
44d10b1f
RW
571 (inputs
572 `(("netcdf" ,netcdf)
573 ("hdf4" ,hdf4)
574 ("hdf5" ,hdf5)))
93e7b209 575 (home-page "https://github.com/Unidata/netcdf4-python")
44d10b1f
RW
576 (synopsis "Python/numpy interface to the netCDF library")
577 (description "Netcdf4-python is a Python interface to the netCDF C
578library. netCDF version 4 has many features not found in earlier
579versions of the library and is implemented on top of HDF5. This module
580can read and write files in both the new netCDF 4 and the old netCDF 3
581format, and can create files that are readable by HDF5 clients. The
582API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
583to users of that module.")
584 ;; The software is mainly ISC, but includes some files covered
585 ;; by the Expat license.
586 (license (list license:isc license:expat))))
587
588(define-public python2-netcdf4
589 (package-with-python2 python-netcdf4))
590
591(define-public python-lockfile
592 (package
593 (name "python-lockfile")
594 (version "0.12.2")
595 (source
596 (origin
597 (method url-fetch)
8318bf07 598 (uri (pypi-uri "lockfile" version))
44d10b1f
RW
599 (sha256
600 (base32
601 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
602 (build-system python-build-system)
603 (arguments '(#:test-target "check"))
604 (native-inputs
605 `(("python-pbr" ,python-pbr)))
606 (home-page "https://launchpad.net/pylockfile")
607 (synopsis "Platform-independent file locking module")
608 (description
609 "The lockfile package exports a LockFile class which provides a simple
610API for locking files.")
611 (license license:expat)))
612
613(define-public python2-lockfile
614 (package-with-python2 python-lockfile))
615
616(define-public python-semantic-version
617 (package
618 (name "python-semantic-version")
619 (version "2.6.0")
620 (source
621 (origin
622 (method url-fetch)
623 (uri (pypi-uri "semantic_version" version))
624 (sha256
625 (base32
626 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
627 (build-system python-build-system)
628 (arguments
629 `(#:tests? #f)) ; PyPI tarball lacks tests
630 (home-page "https://github.com/rbarrois/python-semanticversion")
631 (synopsis "Semantic versioning module for Python")
632 (description
633 "The @code{semantic_version} class is a small library for handling
634@uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
635
636It can compare versions, generate a new version that represents a bump in one of
637the version levels, and check whether any given string is a proper semantic
638version identifier.")
639 (license license:bsd-3)))
640
641(define-public python2-semantic-version
642 (package-with-python2 python-semantic-version))
643
644(define-public python-serpent
645 (package
646 (name "python-serpent")
fa9d14ac 647 (version "1.28")
44d10b1f
RW
648 (source
649 (origin
650 (method url-fetch)
651 (uri (pypi-uri "serpent" version))
652 (sha256
fa9d14ac 653 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
44d10b1f 654 (build-system python-build-system)
fa9d14ac
TGR
655 (native-inputs
656 `(("python-attrs" ,python-attrs)
657 ("python-pytz" ,python-pytz)))
44d10b1f
RW
658 (home-page "https://github.com/irmen/Serpent")
659 (synopsis "Serializer for literal Python expressions")
660 (description
1d3c7803
TGR
661 "Serpent provides @code{ast.literal_eval()}-compatible object tree
662serialization. It serializes an object tree into bytes (an utf-8 encoded
663string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
664to rebuild the original object tree.
665
666Because only safe literals are encoded, it is safe to send serpent data to
667other machines, such as over the network.")
44d10b1f
RW
668 (license license:expat)))
669
670(define-public python-setuptools
671 (package
672 (name "python-setuptools")
e39d4933 673 (version "41.0.1")
44d10b1f
RW
674 (source
675 (origin
676 (method url-fetch)
677 (uri (pypi-uri "setuptools" version ".zip"))
678 (sha256
679 (base32
e39d4933 680 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
44d10b1f
RW
681 (modules '((guix build utils)))
682 (snippet
683 '(begin
684 ;; Remove included binaries which are used to build self-extracting
685 ;; installers for Windows.
686 ;; TODO: Find some way to build them ourself so we can include them.
687 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
688 #t))))
689 (build-system python-build-system)
690 ;; FIXME: Tests require pytest, which itself relies on setuptools.
691 ;; One could bootstrap with an internal untested setuptools.
692 (arguments
693 `(#:tests? #f))
694 (home-page "https://pypi.python.org/pypi/setuptools")
695 (synopsis
696 "Library designed to facilitate packaging Python projects")
697 (description
698 "Setuptools is a fully-featured, stable library designed to facilitate
699packaging Python projects, where packaging includes:
700Python package and module definitions,
701distribution package metadata,
702test hooks,
703project installation,
704platform-specific details,
705Python 3 support.")
706 ;; TODO: setuptools now bundles the following libraries:
707 ;; packaging, pyparsing, six and appdirs. How to unbundle?
708 (license (list license:psfl ; setuptools itself
709 license:expat ; six, appdirs, pyparsing
710 license:asl2.0 ; packaging is dual ASL2/BSD-2
711 license:bsd-2))))
712
713(define-public python2-setuptools
714 (package-with-python2 python-setuptools))
715
716(define-public python-uniseg
717 (package
718 (name "python-uniseg")
719 (version "0.7.1")
720 (source
721 (origin
722 (method url-fetch)
723 (uri (pypi-uri "uniseg" version ".zip"))
724 (sha256
725 (base32
726 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
727 (build-system python-build-system)
728 (arguments
729 '(#:tests? #f)) ; The test suite requires network access.
730 (native-inputs
731 `(("unzip" ,unzip)))
732 (home-page
733 "https://bitbucket.org/emptypage/uniseg-python")
734 (synopsis
735 "Python library to determine Unicode text segmentations")
736 (description
737 "Uniseg is a Python package used to determine Unicode text segmentations.
738Supported segmentations include:
739@enumerate
740@item @dfn{Code point} (any value in the Unicode codespace)
741@item @dfn{Grapheme cluster} (user-perceived character made of a single or
742multiple Unicode code points, e.g. \"G\" + acute-accent)
743@item Word break
744@item Sentence break
745@item Line break
746@end enumerate")
747 (license license:expat)))
748
749(define-public python2-uniseg
750 (package-with-python2 python-uniseg))
751
752(define-public python-humanfriendly
753 (package
754 (name "python-humanfriendly")
755 (version "4.4.1")
756 (source
757 (origin
758 (method url-fetch)
759 (uri (pypi-uri "humanfriendly" version))
760 (sha256
761 (base32
762 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
763 (build-system python-build-system)
764 (arguments
765 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
766 #:tests? #f))
767 (propagated-inputs
768 `(("python-monotonic" ,python-monotonic)))
769 (home-page "https://humanfriendly.readthedocs.io")
770 (synopsis "Human-friendly input and output in Python")
771 (description
772 "The functions and classes in @code{humanfriendly} can be used to make
773text interfaces more user-friendly. It includes tools to parse and format
774numbers, file sizes, and timespans, timers for long-running operations, menus
775to allow the user to choose from a list of options, and terminal interaction
776helpers.")
777 (license license:expat)))
778
779(define-public python2-humanfriendly
780 (package-with-python2 python-humanfriendly))
781
782(define-public python-capturer
783 (package
784 (name "python-capturer")
785 (version "2.4")
786 (source
787 (origin
788 (method url-fetch)
789 (uri (pypi-uri "capturer" version))
790 (sha256
791 (base32
792 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
793 (build-system python-build-system)
794 (arguments
795 `(#:tests? #f))
796 (propagated-inputs
797 `(("python-humanfriendly" ,python-humanfriendly)))
798 (home-page "https://capturer.readthedocs.io")
799 (synopsis "Capture stdout and stderr streams of the current process")
800 (description
801 "The capturer package makes it easy to capture the stdout and stderr
802streams of the current process and subprocesses. Output can be relayed
803to the terminal in real time but is also available to the Python program
804for additional processing.")
805 (license license:expat)))
806
807(define-public python2-capturer
808 (package-with-python2 python-capturer))
809
810(define-public python-case
811 (package
812 (name "python-case")
813 (version "1.5.3")
814 (source
815 (origin
816 (method url-fetch)
817 (uri (pypi-uri "case" version))
818 (sha256
819 (base32
820 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
821 (build-system python-build-system)
822 (propagated-inputs
823 `(("python-mock" ,python-mock)
824 ("python-nose" ,python-nose)
825 ("python-six" ,python-six)
826 ("python-unittest2" ,python-unittest2)))
827 (native-inputs
828 `(("python-coverage" ,python-coverage)))
829 (home-page "https://github.com/celery/case")
830 (synopsis "Unittest utilities and convenience methods")
831 (description
832 "The @code{case} package provides utilities on top of unittest, including
833some helpful Python 2 compatibility convenience methods.")
834 (license license:bsd-3)))
835
836(define-public python-verboselogs
837 (package
838 (name "python-verboselogs")
839 (version "1.7")
840 (source
841 (origin
842 (method url-fetch)
843 (uri (pypi-uri "verboselogs" version))
844 (sha256
845 (base32
846 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
847 (build-system python-build-system)
848 (native-inputs
849 `(("python-mock" ,python-mock)
850 ("python-astroid" ,python-astroid)
851 ("python-pylint" ,python-pylint)))
852 (home-page "https://verboselogs.readthedocs.io")
853 (synopsis "Verbose logging level for Python's logging module")
854 (description
855 "The @code{verboselogs} package extends Python's @code{logging} module to
856add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
857 (license license:expat)))
858
859(define-public python2-verboselogs
860 (package-with-python2 python-verboselogs))
861
862(define-public python-coloredlogs
863 (package
864 (name "python-coloredlogs")
865 (version "7.3")
866 (source
867 (origin
868 (method url-fetch)
869 (uri (pypi-uri "coloredlogs" version))
870 (sha256
871 (base32
872 "1blcann6dyg5dhps9pg12rn0q0rjrlajpmmil0gy0j4cbvnl2il9"))))
873 (build-system python-build-system)
874 (arguments
875 `(;Tests require some updated modules
876 #:tests? #f))
877 (propagated-inputs
878 `(("python-capturer" ,python-capturer)))
879 (home-page "https://coloredlogs.readthedocs.io")
880 (synopsis "Colored stream handler for Python's logging module")
881 (description
882 "The @code{coloredlogs} package enables colored terminal output for
883Python's logging module. The @code{ColoredFormatter} class inherits from
884@code{logging.Formatter} and uses ANSI escape sequences to render your logging
885messages in color.")
886 (license license:expat)))
887
888(define-public python2-coloredlogs
889 (package-with-python2 python-coloredlogs))
890
4caf37b0
MC
891(define-public python-et-xmlfile
892 (package
893 (name "python-et-xmlfile")
894 (version "1.0.1")
895 (source
896 (origin
897 (method url-fetch)
898 (uri (pypi-uri "et_xmlfile" version))
899 (sha256
900 (base32
901 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
902 (build-system python-build-system)
903 (arguments
904 `(#:phases (modify-phases %standard-phases
905 (replace 'check
906 (lambda _
907 (invoke "pytest"))))))
908 (native-inputs
909 `(("python-pytest" ,python-pytest)
910 ("python-lxml" ,python-lxml))) ;used for the tests
911 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
912 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
913 (description "This Python library is based upon the @code{xmlfile} module
914from @code{lxml}. It aims to provide a low memory, compatible implementation
915of @code{xmlfile}.")
916 (license license:expat)))
917
918(define-public python2-et-xmlfile
919 (package-with-python2 python-et-xmlfile))
920
a042d348
MC
921(define-public python-openpyxl
922 (package
923 (name "python-openpyxl")
441e6d93 924 (version "2.6.2")
a042d348
MC
925 (source
926 (origin
927 ;; We use the upstream repository, as the tests are not included in the
928 ;; PyPI releases.
929 (method hg-fetch)
930 (uri (hg-reference
931 (url "https://bitbucket.org/openpyxl/openpyxl")
932 (changeset version)))
933 (file-name (string-append name "-" version "-checkout"))
934 (sha256
441e6d93 935 (base32 "1qhij6kcvdxqjy4g6193nsv4q7fy8n4fwyd3c2z047idlm6s3j4w"))))
a042d348
MC
936 (build-system python-build-system)
937 (arguments
938 `(#:phases (modify-phases %standard-phases
939 (replace 'check
940 (lambda _
941 (invoke "pytest"))))))
942 (native-inputs
943 ;; For the test suite.
944 `(("python-lxml" ,python-lxml)
945 ("python-pillow" ,python-pillow)
946 ("python-pytest" ,python-pytest)))
947 (propagated-inputs
948 `(("python-et-xmlfile" ,python-et-xmlfile)
949 ("python-jdcal" ,python-jdcal)))
950 (home-page "https://openpyxl.readthedocs.io")
951 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
952 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
953XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
954standard.")
955 (license license:expat)))
956
44d10b1f
RW
957(define-public python-eventlet
958 (package
959 (name "python-eventlet")
960 (version "0.20.1")
961 (source
962 (origin
963 (method url-fetch)
964 (uri (pypi-uri "eventlet" version))
965 (sha256
966 (base32
967 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
968 (build-system python-build-system)
969 (propagated-inputs
970 `(("python-greenlet" ,python-greenlet)))
971 (arguments
972 ;; TODO: Requires unpackaged 'enum-compat'.
973 '(#:tests? #f))
974 (home-page "http://eventlet.net")
975 (synopsis "Concurrent networking library for Python")
976 (description
977 "Eventlet is a concurrent networking library for Python that
978allows you to change how you run your code, not how you write it.
979It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
980Coroutines ensure that the developer uses a blocking style of programming
981that is similar to threading, but provide the benefits of non-blocking I/O.
982The event dispatch is implicit, which means you can easily use @code{Eventlet}
983from the Python interpreter, or as a small part of a larger application.")
984 (license license:expat)))
985
986(define-public python2-eventlet
987 (let ((base (package-with-python2
988 (strip-python2-variant python-eventlet))))
989 (package (inherit base)
990 (propagated-inputs
991 `(("python2-enum34" ,python2-enum34)
992 ,@(package-propagated-inputs base))))))
993
994(define-public python-six
995 (package
996 (name "python-six")
6c58a06e 997 (version "1.12.0")
44d10b1f
RW
998 (source
999 (origin
1000 (method url-fetch)
1001 (uri (pypi-uri "six" version))
1002 (sha256
1003 (base32
6c58a06e 1004 "0wxs1q74v07ssjywbbm7x6h5v9qx209ld2yfsif4060sxi0h2sni"))))
44d10b1f
RW
1005 (build-system python-build-system)
1006 (arguments
1007 `(#:phases
1008 (modify-phases %standard-phases
1009 (replace 'check
1010 (lambda _
1011 (invoke "py.test" "-v"))))))
1012 (native-inputs
1013 `(("python-py" ,python-py)
1014 ("python-pytest" ,python-pytest-bootstrap)))
1015 (home-page "https://pypi.python.org/pypi/six/")
1016 (synopsis "Python 2 and 3 compatibility utilities")
1017 (description
1018 "Six is a Python 2 and 3 compatibility library. It provides utility
1019functions for smoothing over the differences between the Python versions with
1020the goal of writing Python code that is compatible on both Python versions.
1021Six supports every Python version since 2.5. It is contained in only one
1022Python file, so it can be easily copied into your project.")
1023 (license license:x11)))
1024
1025(define-public python2-six
1026 (package-with-python2 python-six))
1027
1028(define-public python-six-bootstrap
1029 (package
1030 (inherit python-six)
1031 (name "python-six-bootstrap")
1032 (native-inputs `())
1033 (arguments `(#:tests? #f))))
1034
1035(define-public python2-six-bootstrap
1036 (package-with-python2 python-six-bootstrap))
1037
1038(define-public python-schedule
1039 (package
1040 (name "python-schedule")
1041 (version "0.4.3")
1042 (source
1043 (origin
1044 (method url-fetch)
1045 (uri (pypi-uri "schedule" version))
1046 (sha256
1047 (base32
1048 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1049 (build-system python-build-system)
1050 (native-inputs
1051 `(("python-pytest" ,python-pytest)
1052 ("python-mock" ,python-mock)))
1053 (home-page "https://github.com/dbader/schedule")
1054 (synopsis "Schedule periodic function calls in Python")
1055 (description
1056 "Schedule is an in-process scheduler for periodic jobs that uses the
1057builder pattern for configuration. Schedule lets you run Python functions (or
1058any other callable) periodically at pre-determined intervals using a simple,
1059human-friendly syntax.")
1060 (license license:expat)))
1061
1062(define-public python2-schedule
1063 (package-with-python2 python-schedule))
1064
1065(define-public python-pandas
1066 (package
1067 (name "python-pandas")
c0d43f62 1068 (version "0.24.2")
44d10b1f
RW
1069 (source
1070 (origin
1071 (method url-fetch)
1072 (uri (pypi-uri "pandas" version))
1073 (sha256
c0d43f62 1074 (base32 "18imlm8xbhcbwy4wa957a1fkamrcb0z988z006jpfda3ki09z4ag"))))
44d10b1f
RW
1075 (build-system python-build-system)
1076 (arguments
1077 `(#:modules ((guix build utils)
1078 (guix build python-build-system)
1079 (ice-9 ftw)
1080 (srfi srfi-26))
1081 #:phases (modify-phases %standard-phases
c0d43f62
MC
1082 (add-after 'unpack 'patch-which
1083 (lambda* (#:key inputs #:allow-other-keys)
1084 (let ((which (assoc-ref inputs "which")))
1085 (substitute* "pandas/io/clipboard/__init__.py"
1086 (("^CHECK_CMD = .*")
1087 (string-append "CHECK_CMD = \"" which "\"\n"))))
1088 #t))
44d10b1f
RW
1089 (replace 'check
1090 (lambda _
1091 (let ((build-directory
1092 (string-append
1093 (getcwd) "/build/"
1094 (car (scandir "build"
1095 (cut string-prefix? "lib." <>))))))
1096 ;; Disable the "strict data files" option which causes
c0d43f62
MC
1097 ;; the build to error out if required data files are
1098 ;; not available (as is the case with PyPI archives).
44d10b1f
RW
1099 (substitute* "setup.cfg"
1100 (("addopts = --strict-data-files") "addopts = "))
1101 (with-directory-excursion build-directory
c0d43f62
MC
1102 ;; Delete tests that require "moto" which is not yet
1103 ;; in Guix.
44d10b1f
RW
1104 (for-each delete-file
1105 '("pandas/tests/io/conftest.py"
1106 "pandas/tests/io/json/test_compression.py"
1107 "pandas/tests/io/parser/test_network.py"
44d10b1f
RW
1108 "pandas/tests/io/test_parquet.py"))
1109 (invoke "pytest" "-vv" "pandas" "--skip-slow"
1110 "--skip-network" "-k"
1111 ;; XXX: Due to the deleted tests above.
1112 "not test_read_s3_jsonl"))))))))
1113 (propagated-inputs
1114 `(("python-numpy" ,python-numpy)
667c6ef5 1115 ("python-openpyxl" ,python-openpyxl)
44d10b1f 1116 ("python-pytz" ,python-pytz)
667c6ef5
MC
1117 ("python-dateutil" ,python-dateutil)
1118 ("python-xlrd" ,python-xlrd)))
c0d43f62
MC
1119 (inputs
1120 `(("which" ,which)))
44d10b1f
RW
1121 (native-inputs
1122 `(("python-cython" ,python-cython)
1123 ("python-beautifulsoup4" ,python-beautifulsoup4)
1124 ("python-lxml" ,python-lxml)
1125 ("python-html5lib" ,python-html5lib)
1126 ("python-nose" ,python-nose)
c0d43f62
MC
1127 ("python-pytest" ,python-pytest)
1128 ("python-pytest-mock" ,python-pytest-mock)))
44d10b1f
RW
1129 (home-page "https://pandas.pydata.org")
1130 (synopsis "Data structures for data analysis, time series, and statistics")
1131 (description
1132 "Pandas is a Python package providing fast, flexible, and expressive data
1133structures designed to make working with structured (tabular,
1134multidimensional, potentially heterogeneous) and time series data both easy
1135and intuitive. It aims to be the fundamental high-level building block for
1136doing practical, real world data analysis in Python.")
1137 (license license:bsd-3)))
1138
1139(define-public python2-pandas
1140 (package-with-python2 python-pandas))
1141
1142(define-public python2-mechanize
1143 (package
1144 (name "python2-mechanize")
1145 (version "0.2.5")
1146 (source
1147 (origin
1148 (method url-fetch)
1cc184e6 1149 (uri (pypi-uri "mechanize" version))
44d10b1f
RW
1150 (sha256
1151 (base32
1152 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1153 (build-system python-build-system)
1154 (arguments
1155 `(#:python ,python-2 ; apparently incompatible with Python 3
1156 #:tests? #f))
1157 ;; test fails with message
1158 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1159 ;; (python-3.3.2) or
1160 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1161 ;; (python-2.7.5).
1162 ;; The source code is from March 2011 and probably not up-to-date
1163 ;; with respect to python unit tests.
1164 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1165 (synopsis
1166 "Stateful programmatic web browsing in Python")
1167 (description
1168 "Mechanize implements stateful programmatic web browsing in Python,
1169after Andy Lester’s Perl module WWW::Mechanize.")
1170 (license (license:non-copyleft
1171 "file://COPYING"
1172 "See COPYING in the distribution."))))
1173
1174
1175(define-public python-simplejson
1176 (package
1177 (name "python-simplejson")
1178 (version "3.14.0")
1179 (source
1180 (origin
1181 (method url-fetch)
1182 (uri (pypi-uri "simplejson" version))
1183 (sha256
1184 (base32
1185 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1186 (build-system python-build-system)
1187 (home-page "http://simplejson.readthedocs.org/en/latest/")
1188 (synopsis
1189 "Json library for Python")
1190 (description
1191 "JSON (JavaScript Object Notation) is a subset of JavaScript
1192syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1193format.
1194
1195Simplejson exposes an API familiar to users of the standard library marshal
1196and pickle modules. It is the externally maintained version of the json
1197library contained in Python 2.6, but maintains compatibility with Python 2.5
1198and (currently) has significant performance advantages, even without using
1199the optional C extension for speedups. Simplejson is also supported on
1200Python 3.3+.")
1201 (license license:x11)))
1202
1203(define-public python2-simplejson
1204 (package-with-python2 python-simplejson))
1205
1206
1207(define-public python-pyicu
1208 (package
1209 (name "python-pyicu")
dc23bb45 1210 (version "2.3.1")
44d10b1f
RW
1211 (source
1212 (origin
1213 (method url-fetch)
1214 (uri (pypi-uri "PyICU" version))
1215 (sha256
1216 (base32
dc23bb45 1217 "1x4w8m7ifki9z2a187pgjr33z6z0rp2fii9b73djak1vhm9v9cnx"))))
44d10b1f
RW
1218 (build-system python-build-system)
1219 (inputs
1220 `(("icu4c" ,icu4c)))
1221 (native-inputs
1222 `(("python-pytest" ,python-pytest)
1223 ("python-six" ,python-six)))
1224 (home-page "https://github.com/ovalhub/pyicu")
1225 (synopsis "Python extension wrapping the ICU C++ API")
1226 (description
1227 "PyICU is a python extension wrapping the ICU C++ API.")
1228 (properties `((python2-variant . ,(delay python2-pyicu))))
1229 (license license:x11)))
1230
1231(define-public python2-pyicu
1232 (let ((base (package-with-python2
1233 (strip-python2-variant python-pyicu))))
1234 (package
1235 (inherit base)
1236 (arguments
1237 `(,@(package-arguments base)
1238 #:phases
1239 (modify-phases %standard-phases
1240 (add-before 'check 'delete-failing-test
1241 (λ _
1242 ;; XXX: This fails due to Unicode issues unique to Python 2,
1243 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1244 (delete-file "test/test_Script.py")
1245 #t))))))))
1246
1247(define-public python2-dogtail
1248 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1249 ;; spaces in indentation" with Python 3.
1250 (package
1251 (name "python2-dogtail")
1252 (version "0.9.9")
1253 (source (origin
1254 (method url-fetch)
1255 (uri (pypi-uri "dogtail" version))
1256 (sha256
1257 (base32
1258 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1259 (build-system python-build-system)
1260 (arguments `(#:python ,python-2
1261 #:tests? #f)) ; invalid command "test"
1262 ;; Currently no offical homepage.
1263 (home-page "https://pypi.python.org/pypi/dogtail/")
1264 (synopsis "GUI test tool and automation framework written in Python")
1265 (description
1266 "Dogtail is a GUI test tool and automation framework written in Python.
1267It uses Accessibility (a11y) technologies to communicate with desktop
1268applications. dogtail scripts are written in Python and executed like any
1269other Python program.")
1270 (license license:gpl2+)))
1271
1272(define-public python-empy
1273 (package
1274 (name "python-empy")
0f6d5115 1275 (version "3.3.3")
44d10b1f
RW
1276 (source (origin
1277 (method url-fetch)
1278 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1279 version ".tar.gz"))
1280 (sha256
1281 (base32
0f6d5115 1282 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
44d10b1f
RW
1283 (build-system python-build-system)
1284 (arguments
0f6d5115 1285 `(#:tests? #f)) ; python2 only
44d10b1f
RW
1286 (home-page "http://www.alcyone.com/software/empy/")
1287 (synopsis "Templating system for Python")
1288 (description
1289 "EmPy is a system for embedding Python expressions and statements in
1290template text; it takes an EmPy source file, processes it, and produces
1291output. This is accomplished via expansions, which are special signals to the
1292EmPy system and are set off by a special prefix (by default the at sign, @@).
1293EmPy can expand arbitrary Python expressions and statements in this way, as
1294well as a variety of special forms. Textual data not explicitly delimited in
1295this way is sent unaffected to the output, allowing Python to be used in
1296effect as a markup language. Also supported are callbacks via hooks,
1297recording and playback via diversions, and dynamic, chainable filters. The
1298system is highly configurable via command line options and embedded
1299commands.")
1300 (license license:lgpl2.1+)))
1301
1302(define-public python2-empy
0f064242
TGR
1303 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
1304 (package
1305 (inherit base)
1306 (arguments `(,@(package-arguments base)
1307 #:tests? #t)))))
44d10b1f
RW
1308
1309(define-public python2-element-tree
1310 (package
1311 (name "python2-element-tree")
1312 (version "1.2.6")
1313 (source (origin
1314 (method url-fetch)
1315 (uri (string-append
1316 "http://effbot.org/media/downloads/elementtree-"
1317 version "-20050316.tar.gz"))
1318 (sha256
1319 (base32
1320 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1321 (build-system python-build-system)
1322 (arguments
1323 `(#:python ,python-2 ; seems to be part of Python 3
1324 #:tests? #f)) ; no 'test' sub-command
1325 (synopsis "Toolkit for XML processing in Python")
1326 (description
1327 "ElementTree is a Python library supporting lightweight XML processing.")
1328 (home-page "http://effbot.org/zone/element-index.htm")
1329 (license (license:x11-style
1330 "http://docs.python.org/2/license.html"
1331 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1332
1333(define-public python2-pybugz
1334 (package
1335 (name "python2-pybugz")
1336 (version "0.6.11")
1337 (source (origin
1338 (method url-fetch)
1339 (uri (string-append
1340 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1341 version ".tar.gz"))
1342 (sha256
1343 (base32
1344 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1345 (patches (search-patches "pybugz-stty.patch"
1346 "pybugz-encode-error.patch"))))
1347 (build-system python-build-system)
1348 (arguments
1349 `(#:python ,python-2 ; SyntaxError with Python 3
1350 #:tests? #f)) ; no 'test' sub-command
1351 (propagated-inputs
1352 `(("element-tree" ,python2-element-tree)))
1353 (synopsis "Python and command-line interface to Bugzilla")
1354 (description
1355 "PyBugz is a Python library and command-line tool to query the Bugzilla
1356bug tracking system. It is meant as an aid to speed up interaction with the
1357bug tracker.")
1358 (home-page "http://www.liquidx.net/pybugz/")
1359 (license license:gpl2)))
1360
1361(define-public python2-enum
1362 (package
1363 (name "python2-enum")
1364 (version "0.4.6")
1365 (source (origin
1366 (method url-fetch)
1367 (uri (pypi-uri "enum" version))
1368 (sha256
1369 (base32
1370 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1371 (build-system python-build-system)
1372 (arguments
1373 `(#:python ,python-2))
1374 (home-page "http://pypi.python.org/pypi/enum/")
1375 (synopsis "Robust enumerated type support in Python")
1376 (description
1377 "This provides a module for robust enumerations in Python. It has
1378been superseded by the Python standard library and is provided only for
1379compatibility.")
1380 ;; Choice of either license.
1381 (license (list license:gpl3+ license:psfl))))
1382
1383(define-public python-enum34
1384 (package
1385 (name "python-enum34")
1386 (version "1.1.6")
1387 (source
1388 (origin
1389 (method url-fetch)
1390 (uri (pypi-uri "enum34" version))
1391 (sha256
1392 (base32
1393 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1394 (build-system python-build-system)
1395 (home-page "https://pypi.python.org/pypi/enum34")
1396 (synopsis "Backported Python 3.4 Enum")
1397 (description
1398 "Enum34 is the new Python stdlib enum module available in Python 3.4
1399backported for previous versions of Python from 2.4 to 3.3.")
1400 (license license:bsd-3)))
1401
1402(define-public python2-enum34
1403 (package-with-python2 python-enum34))
1404
1405(define-public python-parse-type
1406 (package
1407 (name "python-parse-type")
1408 (version "0.4.2")
1409 (source
1410 (origin
1411 (method url-fetch)
1412 (uri (pypi-uri "parse_type" version))
1413 (sha256
1414 (base32
1415 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1416 (build-system python-build-system)
1417 (propagated-inputs
1418 `(("python-six" ,python-six)
1419 ("python-parse" ,python-parse)))
1420 (native-inputs
1421 `(("python-pytest" ,python-pytest)
1422 ("python-pytest-runner" ,python-pytest-runner)))
1423 (home-page "https://github.com/jenisys/parse_type")
1424 (synopsis "Extended parse module")
1425 (description
1426 "Parse_type extends the python parse module.")
1427 (properties
1428 `((python2-variant . ,(delay python2-parse-type))))
1429 (license license:bsd-3)))
1430
1431(define-public python2-parse-type
1432 (let ((base (package-with-python2
1433 (strip-python2-variant python-parse-type))))
1434 (package (inherit base)
1435 (propagated-inputs
1436 `(("python2-enum34" ,python2-enum34)
1437 ,@(package-propagated-inputs base))))))
1438
1439(define-public python-parse
1440 (package
1441 (name "python-parse")
1442 (version "1.8.4")
1443 (source
1444 (origin
1445 (method url-fetch)
1446 (uri (pypi-uri "parse" version))
1447 (sha256
1448 (base32
1449 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
1450 (build-system python-build-system)
1451 (arguments
1452 `(#:phases
1453 (modify-phases %standard-phases
1454 (replace 'check
1455 (lambda _ (invoke "python" "test_parse.py"))))))
1456 (home-page "https://github.com/r1chardj0n3s/parse")
1457 (synopsis "Parse strings")
1458 (description
1459 "Parse strings using a specification based on the Python @code{format()}
1460syntax.")
1461 (license license:x11)))
1462
1463(define-public python-polib
1464 (package
1465 (name "python-polib")
1466 (version "1.0.8")
1467 (source (origin
1468 (method url-fetch)
1469 (uri (pypi-uri "polib" version))
1470 (sha256
1471 (base32
1472 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1473 (build-system python-build-system)
1474 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1475 (synopsis "Manipulate, create and modify gettext files")
1476 (description "Polib can manipulate any gettext format (po, pot and mo)
1477files. It can be used to create po files from scratch or to modify
1478existing ones.")
1479 (license license:expat)))
1480
1481(define-public python2-polib
1482 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1483 (package
1484 (inherit base)
1485 (arguments `(,@(package-arguments base)
1486 ;; Tests don't work with python2.
1487 #:tests? #f)))))
1488
1489(define-public scons
1490 (package
1491 (name "scons")
05487ed8 1492 (version "3.0.4")
44d10b1f 1493 (source (origin
ad34338d
RW
1494 (method git-fetch)
1495 (uri (git-reference
1496 (url "https://github.com/SCons/scons.git")
1497 (commit version)))
1498 (file-name (git-file-name name version))
44d10b1f
RW
1499 (sha256
1500 (base32
05487ed8 1501 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
44d10b1f
RW
1502 (build-system python-build-system)
1503 (arguments
1504 `(#:use-setuptools? #f ; still relies on distutils
ad34338d
RW
1505 #:tests? #f ; no 'python setup.py test' command
1506 #:phases
1507 (modify-phases %standard-phases
1508 (add-before 'build 'bootstrap
1509 (lambda _
1510 (substitute* "src/engine/SCons/compat/__init__.py"
1511 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
1512 "sys.modules[new] = __import__(old)"))
05487ed8
RW
1513 (substitute* "src/engine/SCons/Platform/__init__.py"
1514 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
1515 "mod = __import__(full_name)"))
ad34338d
RW
1516 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
1517 (chdir "build/scons")
1518 #t)))))
44d10b1f
RW
1519 (home-page "http://scons.org/")
1520 (synopsis "Software construction tool written in Python")
1521 (description
1522 "SCons is a software construction tool. Think of SCons as an improved,
1523cross-platform substitute for the classic Make utility with integrated
1524functionality similar to autoconf/automake and compiler caches such as ccache.
1525In short, SCons is an easier, more reliable and faster way to build
1526software.")
1527 (license license:x11)))
1528
1529(define-public scons-python2
1530 (package
1531 (inherit (package-with-python2 scons))
1532 (name "scons-python2")))
1533
1534(define-public python-extras
1535 (package
1536 (name "python-extras")
1537 (version "1.0.0")
1538 (source
1539 (origin
1540 (method url-fetch)
1541 (uri (pypi-uri "extras" version))
1542 (sha256
1543 (base32
1544 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1545 (build-system python-build-system)
1546 (arguments
1547 ;; FIXME: Circular dependency on testtools.
1548 '(#:tests? #f))
1549 (home-page "https://github.com/testing-cabal/extras")
1550 (synopsis "Useful extensions to the Python standard library")
1551 (description
1552 "Extras is a set of extensions to the Python standard library.")
1553 (license license:expat)))
1554
1555(define-public python2-extras
1556 (package-with-python2 python-extras))
1557
1558(define-public python-mimeparse
1559 (package
1560 (name "python-mimeparse")
1561 (version "1.6.0")
1562 (source
1563 (origin
1564 (method url-fetch)
89bf667c 1565 (uri (pypi-uri "python-mimeparse" version))
44d10b1f
RW
1566 (sha256
1567 (base32
1568 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
1569 (build-system python-build-system)
1570 (arguments
1571 '(#:phases
1572 (modify-phases %standard-phases
1573 (replace 'check
1574 (lambda _
1575 (invoke "./mimeparse_test.py"))))))
1576 (home-page
1577 "https://github.com/dbtsai/python-mimeparse")
1578 (synopsis "Python library for parsing MIME types")
1579 (description
1580 "Mimeparse provides basic functions for parsing MIME type names and
1581matching them against a list of media-ranges.")
1582 (license license:expat)))
1583
1584(define-public python2-mimeparse
1585 (package-with-python2 python-mimeparse))
1586
1587(define-public python-miniboa
1588 (package
1589 (name "python-miniboa")
1590 (version "1.0.7")
1591 (source
1592 (origin
1593 (method url-fetch)
1594 (uri (pypi-uri "miniboa" version))
1595 (sha256
1596 (base32
1597 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
1598 (build-system python-build-system)
1599 (home-page "https://github.com/shmup/miniboa")
1600 (synopsis "Simple, single-threaded Telnet server")
1601 (description
1602 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
1603server.")
1604 (license license:asl2.0)))
1605
1606(define-public python2-miniboa
1607 (package-with-python2 python-miniboa))
1608
1609(define-public python-pafy
1610 (package
1611 (name "python-pafy")
1612 (version "0.5.3.1")
1613 (source
1614 (origin
1615 (method url-fetch)
1616 (uri (pypi-uri "pafy" version))
1617 (sha256
1618 (base32
1619 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1620 (build-system python-build-system)
1621 (arguments
1622 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1623 (propagated-inputs
1624 ;; Youtube-dl is a python package which is imported in the file
1625 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1626 `(("youtube-dl" ,youtube-dl)))
1627 (home-page "https://np1.github.io/pafy/")
1628 (synopsis "Retrieve YouTube content and metadata")
1629 (description
1630 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1631 (license license:lgpl3+)))
1632
1633(define-public python2-funcsigs
1634 (package
1635 (name "python2-funcsigs")
1636 (version "1.0.2")
1637 (source (origin
1638 (method url-fetch)
1639 (uri (pypi-uri "funcsigs" version))
1640 (sha256
1641 (base32
1642 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1643 (build-system python-build-system)
1644 (arguments
1645 `(#:python ,python-2))
1646 (native-inputs
1647 `(("python2-unittest2" ,python2-unittest2)))
1648 (home-page "http://funcsigs.readthedocs.org")
1649 (synopsis "Python function signatures from PEP362")
1650 (description
1651 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1652 (license license:asl2.0)))
1653
1654(define-public python2-funcsigs-bootstrap
1655 (package
1656 (inherit python2-funcsigs)
1657 (name "python2-funcsigs-bootstrap")
1658 (native-inputs `())
1659 (arguments
1660 `(#:tests? #f
1661 ,@(package-arguments python2-funcsigs)))))
1662
1663(define-public python-py
1664 (package
1665 (name "python-py")
08eba545 1666 (version "1.8.0")
44d10b1f
RW
1667 (source
1668 (origin
1669 (method url-fetch)
1670 (uri (pypi-uri "py" version))
1671 (sha256
1672 (base32
08eba545 1673 "0lsy1gajva083pzc7csj1cvbmminb7b4l6a0prdzyb3fd829nqyw"))))
44d10b1f
RW
1674 (build-system python-build-system)
1675 (arguments
1676 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1677 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1678 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1679 ;; Is this module globally installed?"
1680 '(#:tests? #f))
1681 (native-inputs
1682 `(("python-setuptools-scm" ,python-setuptools-scm)))
1683 (home-page "https://github.com/pytest-dev/py")
1684 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1685 (description
1686 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1687code introspection, and logging.")
1688 (license license:expat)))
1689
1690(define-public python2-py
1691 (package-with-python2 python-py))
1692
1693;; Recent versions of python-fixtures and python-testrepository need
1694;; python-pbr for packaging, which itself needs these two packages for
1695;; testing.
1696;; To fix this circular dependency, we use a build of python-pbr, based on the
1697;; same source, just without any test dependencies and with tests disabled.
1698;; python-pbr-minmal is then used to package python-fixtures and
1699;; python-testrepository.
1700;; Strictly speaking we currently could remove the test-requirements from the
1701;; normal python-pbr package (and save this package) since test are disabled
1702;; there anyway. But this may change in future.
1703(define-public python-pbr-minimal
1704 (package
1705 (name "python-pbr-minimal")
1706 (version "3.0.1")
1707 (source
1708 (origin
1709 (method url-fetch)
1710 (uri (pypi-uri "pbr" version))
1711 (sha256
1712 (base32
1713 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1714 (build-system python-build-system)
1715 (arguments
1716 `(#:tests? #f))
1717 (home-page "http://docs.openstack.org/developer/pbr/")
1718 (synopsis "Minimal build of python-pbr used for bootstrapping")
1719 (description
1720 "Used only for bootstrapping python2-pbr, you should not need this.")
1721 (license license:asl2.0)))
1722
1723(define-public python2-pbr-minimal
1724 (package-with-python2 python-pbr-minimal))
1725
1726(define-public python-pbr
1727 (package
1728 (inherit python-pbr-minimal)
1729 (name "python-pbr")
1730 (arguments
1731 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1732 (propagated-inputs
1733 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1734 (native-inputs
1735 `(("python-fixtures" ,python-fixtures-bootstrap)
1736 ;; discover, coverage, hacking, subunit
1737 ("python-mock" ,python-mock)
1738 ("python-six" ,python-six)
1739 ("python-sphinx" ,python-sphinx)
1740 ("python-testrepository" ,python-testrepository-bootstrap)
1741 ("python-testresources" ,python-testresources-bootstrap)
1742 ("python-testscenarios" ,python-testscenarios-bootstrap)
1743 ("python-testtools" ,python-testtools-bootstrap)
1744 ("python-virtualenv" ,python-virtualenv)))
1745 (synopsis "Enhance the default behavior of Python’s setuptools")
1746 (description
1747 "Python Build Reasonableness (PBR) is a library that injects some useful
1748and sensible default behaviors into your setuptools run. It will set
1749versions, process requirements files and generate AUTHORS and ChangeLog file
1750from git information.
1751")))
1752
1753(define-public python2-pbr
1754 (package-with-python2 python-pbr))
1755
ea43f0d5
MB
1756(define-public python-pyrsistent
1757 (package
1758 (name "python-pyrsistent")
1759 (version "0.14.11")
1760 (home-page "https://github.com/tobgu/pyrsistent")
1761 (source (origin
1762 (method url-fetch)
1763 (uri (pypi-uri "pyrsistent" version))
1764 (sha256
1765 (base32
1766 "1qkh74bm296mp5g3r11lgsksr6bh4w1bf8pji4nmxdlfj542ga1w"))))
1767 (build-system python-build-system)
1768 (native-inputs
1769 `(("python-hypothesis" ,python-hypothesis)
1770 ("python-pytest" ,python-pytest)
1771 ("python-pytest-runner" ,python-pytest-runner)))
1772 (propagated-inputs
1773 `(("python-six" ,python-six)))
1774 (synopsis "Persistent data structures for Python")
1775 (description
1776 "Pyrsistent is a number of persistent collections (by some referred to as
1777functional data structures). Persistent in the sense that they are immutable.
1778
1779All methods on a data structure that would normally mutate it instead return a
1780new copy of the structure containing the requested updates. The original
1781structure is left untouched.")
1782 (license license:expat)))
1783
1784(define-public python2-pyrsistent
1785 (package-with-python2 python-pyrsistent))
1786
44d10b1f
RW
1787(define-public python-exif-read
1788 (package
1789 (name "python-exif-read")
1790 (version "2.1.2")
1791 (source (origin
1792 (method url-fetch)
1793 (uri (pypi-uri "ExifRead" version))
1794 (sha256
1795 (base32
1796 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
1797 (build-system python-build-system)
1798 (arguments `(#:tests? #f)) ; no tests
1799 (home-page "https://github.com/ianare/exif-py")
1800 (synopsis "Python library to extract EXIF data from image files")
1801 (description
1802 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1803files.")
1804 (license license:bsd-3)))
1805
1806(define-public python2-exif-read
1807 (package-with-python2 python-exif-read))
1808
1809(define-public python-pyld
1810 (package
1811 (name "python-pyld")
1812 (version "1.0.3")
1813 (source (origin
1814 (method url-fetch)
1815 (uri (pypi-uri "PyLD" version))
1816 (sha256
1817 (base32
1818 "12i2g6xdj30k7xxcibg3sc5y76snwq8l6n8fy9lyi577kgy0h2pm"))))
1819 (build-system python-build-system)
1820 (home-page "https://github.com/digitalbazaar/pyld")
1821 (synopsis "Python implementation of the JSON-LD specification")
1822 (description
1823 "PyLD is an implementation of the JSON-LD specification.")
1824 (license license:bsd-3)))
1825
1826(define-public python2-pyld
1827 (package-with-python2 python-pyld))
1828
1829(define-public python-click
1830 (package
1831 (name "python-click")
61984855 1832 (version "7.0")
44d10b1f
RW
1833 (source
1834 (origin
1835 (method url-fetch)
1836 (uri (pypi-uri "click" version))
1837 (sha256
1838 (base32
61984855 1839 "1mzjixd4vjbjvzb6vylki9w1556a9qmdh35kzmq6cign46av952v"))))
44d10b1f
RW
1840 (build-system python-build-system)
1841 (arguments
8d7e7ca6 1842 `(#:phases
44d10b1f
RW
1843 (modify-phases %standard-phases
1844 (add-after 'unpack 'fix-paths
1845 (lambda* (#:key inputs #:allow-other-keys)
1846 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
1847 "cross-libc" "libc"))))
1848 (substitute* "click/_unicodefun.py"
1849 (("'locale'")
1850 (string-append "'" glibc "/bin/locale'"))))
8d7e7ca6
EF
1851 #t))
1852 (replace 'check
1853 (lambda _
1854 (invoke "python" "-m" "pytest"))))))
44d10b1f
RW
1855 (native-inputs
1856 `(("python-pytest" ,python-pytest)))
61984855 1857 (home-page "https://palletsprojects.com/p/click/")
44d10b1f
RW
1858 (synopsis "Command line library for Python")
1859 (description
1860 "Click is a Python package for creating command line interfaces in a
1861composable way with as little code as necessary. Its name stands for
1862\"Command Line Interface Creation Kit\". It's highly configurable but comes
1863with sensible defaults out of the box.")
1864 (license license:bsd-3)))
1865
1866(define-public python2-click
1867 (package-with-python2 python-click))
1868
1869(define-public python-wheel
1870 (package
1871 (name "python-wheel")
746c074b 1872 (version "0.32.3")
44d10b1f
RW
1873 (source
1874 (origin
1875 (method url-fetch)
1876 (uri (pypi-uri "wheel" version))
1877 (sha256
1878 (base32
746c074b 1879 "1dhxl1bf18bx9szmqcnxbg6204hp3im8089q3hkwh5jfa6zh75q2"))))
44d10b1f
RW
1880 (build-system python-build-system)
1881 (native-inputs
1882 `(("python-jsonschema" ,python-jsonschema)
1883 ("python-pytest-cov" ,python-pytest-cov)))
1884 (home-page "https://bitbucket.org/pypa/wheel/")
1885 (synopsis "Format for built Python packages")
1886 (description
1887 "A wheel is a ZIP-format archive with a specially formatted filename and
1888the @code{.whl} extension. It is designed to contain all the files for a PEP
1889376 compatible install in a way that is very close to the on-disk format. Many
1890packages will be properly installed with only the @code{Unpack} step and the
1891unpacked archive preserves enough information to @code{Spread} (copy data and
1892scripts to their final locations) at any later time. Wheel files can be
1893installed with a newer @code{pip} or with wheel's own command line utility.")
1894 (license license:expat)
1895 (properties `((python2-variant . ,(delay python2-wheel))))))
1896
1897(define-public python2-wheel
1898 (let ((wheel (package-with-python2
1899 (strip-python2-variant python-wheel))))
1900 (package (inherit wheel)
1901 (native-inputs `(("python2-functools32" ,python2-functools32)
1902 ,@(package-native-inputs wheel))))))
1903
1904(define-public python-vcversioner
1905 (package
1906 (name "python-vcversioner")
1907 (version "2.16.0.0")
1908 (source
1909 (origin
1910 (method url-fetch)
1911 (uri (pypi-uri "vcversioner" version))
1912 (sha256
1913 (base32
1914 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
1915 (build-system python-build-system)
1916 (synopsis "Python library for version number discovery")
1917 (description "Vcversioner is a Python library that inspects tagging
1918information in a variety of version control systems in order to discover
1919version numbers.")
1920 (home-page "https://github.com/habnabit/vcversioner")
1921 (license license:isc)))
1922
1923(define-public python2-vcversioner
1924 (package-with-python2 python-vcversioner))
1925
5591fc4f
MC
1926(define-public python-jdcal
1927 (package
1928 (name "python-jdcal")
1929 (version "1.4")
1930 (source
1931 (origin
1932 (method url-fetch)
1933 (uri (pypi-uri "jdcal" version))
1934 (sha256
1935 (base32
1936 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
1937 (build-system python-build-system)
1938 (arguments
1939 `(#:phases (modify-phases %standard-phases
1940 (replace 'check
1941 (lambda _
1942 (invoke "pytest"))))))
1943 (native-inputs
1944 `(("python-pytest" ,python-pytest)))
1945 (home-page "https://github.com/phn/jdcal")
1946 (synopsis "Functions to convert between Julian dates Gregorian dates")
1947 (description "This Python library provides functions for converting
1948between Julian dates and Gregorian dates.")
1949 (license license:bsd-2)))
1950
1951(define-public python2-jdcal
1952 (package-with-python2 python-jdcal))
1953
44d10b1f
RW
1954(define-public python-jsonschema
1955 (package
1956 (name "python-jsonschema")
1adde06e 1957 (version "3.0.1")
44d10b1f
RW
1958 (source (origin
1959 (method url-fetch)
786ccb87 1960 (uri (pypi-uri "jsonschema" version))
44d10b1f
RW
1961 (sha256
1962 (base32
1adde06e 1963 "03g20i1xfg4qdlk4475pl4pp7y0h37g1fbgs5qhy678q9xb822hc"))))
44d10b1f
RW
1964 (build-system python-build-system)
1965 (arguments
1966 '(#:phases
1967 (modify-phases %standard-phases
1adde06e
MB
1968 (replace 'check
1969 (lambda _
1970 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
1971 (invoke "trial" "jsonschema"))))))
44d10b1f 1972 (native-inputs
1adde06e
MB
1973 `(("python-setuptools_scm" ,python-setuptools-scm)
1974 ("python-twisted" ,python-twisted)))
1975 (propagated-inputs
1976 `(("python-attrs" ,python-attrs)
1977 ("python-pyrsistent" ,python-pyrsistent)
1978 ("python-six" ,python-six)))
44d10b1f
RW
1979 (home-page "https://github.com/Julian/jsonschema")
1980 (synopsis "Implementation of JSON Schema for Python")
1981 (description
1982 "Jsonschema is an implementation of JSON Schema for Python.")
1983 (license license:expat)
1984 (properties `((python2-variant . ,(delay python2-jsonschema))))))
1985
1986(define-public python2-jsonschema
1987 (let ((jsonschema (package-with-python2
1988 (strip-python2-variant python-jsonschema))))
1989 (package (inherit jsonschema)
44d10b1f 1990 (propagated-inputs
1adde06e
MB
1991 `(("python2-functools32" ,python2-functools32)
1992 ,@(package-propagated-inputs jsonschema))))))
44d10b1f 1993
914bba28
TGR
1994;; This old version is still required by docker-compose as of 1.24.0.
1995(define-public python-jsonschema-2.6
1996 (package
1997 (name "python-jsonschema")
1998 (version "2.6.0")
1999 (source (origin
2000 (method url-fetch)
2001 (uri (pypi-uri "jsonschema" version))
2002 (sha256
2003 (base32
2004 "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg"))))
2005 (build-system python-build-system)
2006 (arguments
2007 '(#:phases
2008 (modify-phases %standard-phases
2009 (replace 'check (lambda _ (invoke "nosetests"))))))
2010 (native-inputs
2011 `(("python-nose" ,python-nose)
2012 ("python-vcversioner" ,python-vcversioner)))
2013 (home-page "https://github.com/Julian/jsonschema")
2014 (synopsis "Implementation of JSON Schema for Python")
2015 (description
2016 "Jsonschema is an implementation of JSON Schema for Python.")
2017 (license license:expat)
2018 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2019
44d10b1f
RW
2020(define-public python-schema
2021 (package
2022 (name "python-schema")
2023 (version "0.6.6")
2024 (source
2025 (origin
2026 (method url-fetch)
2027 (uri (pypi-uri "schema" version))
2028 (sha256
2029 (base32
2030 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2031 (build-system python-build-system)
2032 (native-inputs
2033 `(("python-pytest" ,python-pytest)))
2034 (home-page "https://github.com/keleshev/schema")
2035 (synopsis "Simple data validation library")
2036 (description
2037 "@code{python-schema} is a library for validating Python data
2038structures, such as those obtained from config-files, forms, external
2039services or command-line parsing, converted from JSON/YAML (or
2040something else) to Python data-types.")
2041 (license license:psfl)))
2042
2043(define-public python2-schema
2044 (package-with-python2 python-schema))
2045
2046(define-public python-schema-0.5
2047 (package (inherit python-schema)
2048 (version "0.5.0")
2049 (source
2050 (origin
2051 (method url-fetch)
2052 (uri (pypi-uri "schema" version))
2053 (sha256
2054 (base32
2055 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2056
2057(define-public python2-schema-0.5
2058 (package-with-python2 python-schema-0.5))
2059
2060(define-public python-kitchen
2061 (package
2062 (name "python-kitchen")
2063 (version "1.2.5")
2064 (source
2065 (origin
2066 (method url-fetch)
2067 (uri (pypi-uri "kitchen" version))
2068 (sha256
2069 (base32
2070 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2071 (build-system python-build-system)
2072 (propagated-inputs
2073 `(("python-chardet" ,python-chardet)))
2074 (home-page "https://github.com/fedora-infra/kitchen")
2075 (synopsis "Python API for snippets")
2076 (description "@code{kitchen} module provides a python API for all sorts of
2077little useful snippets of code that everybody ends up writing for their projects
2078but never seem big enough to build an independent release. Use kitchen and stop
2079cutting and pasting that code over and over.")
2080 (license (list license:lgpl2.1+
2081 ;; subprocess.py, test_subprocess.py,
2082 ;; kitchen/pycompat25/defaultdict.py:
2083 license:psfl))))
2084
2085(define-public python2-kitchen
2086 (package-with-python2 python-kitchen))
2087
2088(define-public python-unidecode
2089 (package
2090 (name "python-unidecode")
bd9d7206 2091 (version "1.1.0")
44d10b1f
RW
2092 (source (origin
2093 (method url-fetch)
2094 (uri (pypi-uri "Unidecode" version))
2095 (sha256
2096 (base32
bd9d7206 2097 "00pi0czzwvbf7djhkkjyvimj60wqdx0llbddzfnax650g9b8yscc"))))
44d10b1f
RW
2098 (build-system python-build-system)
2099 (home-page "https://pypi.python.org/pypi/Unidecode")
2100 (synopsis "ASCII transliterations of Unicode text")
2101 (description
2102 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2103useful when integrating with legacy code that doesn't support Unicode, or for
2104ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2105machine identifiers from human-readable Unicode strings that should still be
2106somewhat intelligible.")
2107 (license license:gpl2+)))
2108
2109(define-public python2-unidecode
2110 (package-with-python2 python-unidecode))
2111
2112(define-public python-pyjwt
2113 (package
2114 (name "python-pyjwt")
2115 (version "1.5.3")
2116 (source
2117 (origin
2118 (method url-fetch)
2119 (uri (pypi-uri "PyJWT" version))
2120 (sha256
2121 (base32
2122 "1rxsg14i33vm2i6lz0my628108c81k43v10n4h3p0gx62xdyf2sh"))
2123 (modules '((guix build utils)))
2124 (snippet
2125 '(begin
2126 (for-each delete-file-recursively
2127 (find-files "." "\\.pyc$"))
2128 #t))))
2129 (build-system python-build-system)
2130 (native-inputs
2131 `(("python-pytest" ,python-pytest)
2132 ("python-pytest-cov" ,python-pytest-cov)
2133 ("python-pytest-runner" ,python-pytest-runner)))
2134 (home-page "https://github.com/progrium/pyjwt")
2135 (synopsis "JSON Web Token implementation in Python")
2136 (description
2137 "PyJWT is a JSON Web Token implementation written in Python.")
2138 (license license:expat)))
2139
2140(define-public python2-pyjwt
2141 (package-with-python2 python-pyjwt))
2142
2143(define-public python-pykka
2144 (package
2145 (name "python-pykka")
2146 (version "1.2.1")
2147 (source
2148 (origin
2149 (method url-fetch)
2150 (uri (pypi-uri "Pykka" version))
2151 (sha256
2152 (base32
2153 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2154 (build-system python-build-system)
2155 (native-inputs
2156 `(("python-mock" ,python-mock)
2157 ("python-nose" ,python-nose)
2158 ("python-gevent" ,python-gevent)
2159 ("python-eventlet" ,python-eventlet)))
2160 (home-page "https://www.pykka.org/")
2161 (synopsis "Pykka is a Python implementation of the actor model")
2162 (description
2163 "Pykka is a Python implementation of the actor model.
2164The actor model introduces some simple rules to control the sharing
2165of state and cooperation between execution units, which makes it
2166easier to build concurrent applications.")
2167 (license license:asl2.0)))
2168
2169(define-public python2-pykka
2170 (package-with-python2 python-pykka))
2171
8d22f7e3
VC
2172(define-public python-pymsgbox
2173 (package
2174 (name "python-pymsgbox")
2175 (version "1.0.6")
2176 (source
2177 (origin
2178 (method git-fetch)
2179 (uri (git-reference
2180 ;; LICENSE.txt is not present on pypi
2181 (url "https://github.com/asweigart/PyMsgBox")
2182 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
2183 (file-name (git-file-name name version))
2184 (sha256
2185 (base32
2186 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
2187 (arguments
2188 ;; Circular dependency to run tests:
2189 ;; Tests need pyautogui, which depends on pymsgbox.
2190 '(#:tests? #f))
2191 (build-system python-build-system)
2192 (home-page "https://github.com/asweigart/PyMsgBox")
2193 (synopsis "Python module for JavaScript-like message boxes")
2194 (description
2195 "PyMsgBox is a simple, cross-platform, pure Python module for
2196JavaScript-like message boxes. Types of dialog boxes include:
2197@enumerate
2198@item alert
2199@item confirm
2200@item prompt
2201@item password
2202@end enumerate
2203")
2204 (license license:bsd-3)))
2205
44d10b1f
RW
2206(define-public python-pympler
2207 (package
2208 (name "python-pympler")
2209 (home-page "https://pythonhosted.org/Pympler/")
ce1706b1 2210 (version "0.6")
44d10b1f
RW
2211 (source (origin
2212 (method url-fetch)
2213 (uri (pypi-uri "Pympler" version))
2214 (sha256
2215 (base32
ce1706b1 2216 "19qkpaw5icwhb4c0f6ijqfmhwhj34k2k6s4m4fsvhrxc9p5cwqn2"))))
44d10b1f
RW
2217 (build-system python-build-system)
2218 (arguments
2219 `(#:phases (modify-phases %standard-phases
2220 (delete 'check)
2221 (add-after 'install 'check
2222 (lambda* (#:key inputs outputs #:allow-other-keys)
2223 (add-installed-pythonpath inputs outputs)
2224 (invoke "python" "setup.py" "test"))))))
2225 (synopsis "Measure, monitor and analyze memory behavior")
2226 (description
2227 "Pympler is a development tool to measure, monitor and analyze
2228the memory behavior of Python objects in a running Python application.
2229
2230By pympling a Python application, detailed insight in the size and the
2231lifetime of Python objects can be obtained. Undesirable or unexpected
2232runtime behavior like memory bloat and other @samp{pymples} can easily
2233be identified.
2234
2235A web profiling frontend exposes process statistics, garbage
2236visualisation and class tracker statistics.")
2237 (license license:asl2.0)))
2238
2239(define-public python2-pympler
2240 (package-with-python2 python-pympler))
2241
2242(define-public python-itsdangerous
2243 (package
2244 (name "python-itsdangerous")
acfcf2ed 2245 (version "1.1.0")
44d10b1f
RW
2246 (source
2247 (origin
2248 (method url-fetch)
acfcf2ed 2249 (uri (pypi-uri "itsdangerous" version))
44d10b1f
RW
2250 (sha256
2251 (base32
acfcf2ed 2252 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
44d10b1f 2253 (build-system python-build-system)
acfcf2ed 2254 (home-page "https://palletsprojects.com/p/itsdangerous/")
44d10b1f
RW
2255 (synopsis "Python library for passing data to/from untrusted environments")
2256 (description
2257 "Itsdangerous provides various helpers to pass trusted data to untrusted
2258environments and back.")
2259 (license license:bsd-3)))
2260
2261(define-public python2-itsdangerous
2262 (package-with-python2 python-itsdangerous))
2263
2264(define-public python-pyyaml
2265 (package
2266 (name "python-pyyaml")
2267 (version "3.13")
2268 (source
2269 (origin
2270 (method url-fetch)
2271 (uri (pypi-uri "PyYAML" version))
2272 (sha256
2273 (base32
2274 "1gx603g484z46cb74j9rzr6sjlh2vndxayicvlyhxdz98lhhkwry"))))
2275 (build-system python-build-system)
2276 (inputs
2277 `(("libyaml" ,libyaml)))
2278 (home-page "http://pyyaml.org/wiki/PyYAML")
2279 (synopsis "YAML parser and emitter for Python")
2280 (description
2281 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2282complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2283API, and sensible error messages. PyYAML supports standard YAML tags and
2284provides Python-specific tags that allow to represent an arbitrary Python
2285object.")
2286 (license license:expat)))
2287
2288(define-public python2-pyyaml
2289 (package-with-python2 python-pyyaml))
2290
2291(define-public python-vine
2292 (package
2293 (name "python-vine")
2294 (version "1.1.4")
2295 (source
2296 (origin
2297 (method url-fetch)
2298 (uri (pypi-uri "vine" version))
2299 (sha256
2300 (base32
2301 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
2302 (build-system python-build-system)
2303 (native-inputs
2304 `(("python-pytest" ,python-pytest)
2305 ("python-case" ,python-case)))
2306 (home-page "https://github.com/celery/vine")
2307 (synopsis "Promises for Python")
2308 (description
2309 "@code{vine} provides a special implementation of promises in that it can
2310be used both for \"promise of a value\" and lazy evaluation. The biggest
2311upside for this is that everything in a promise can also be a promise,
2312e.g. filters, callbacks and errbacks can all be promises.")
2313 (license license:bsd-3)))
2314
2315(define-public python-virtualenv
2316 (package
2317 (name "python-virtualenv")
2782bd51 2318 (version "16.1.0")
44d10b1f
RW
2319 (source
2320 (origin
2321 (method url-fetch)
2322 (uri (pypi-uri "virtualenv" version))
2323 (sha256
2324 (base32
2782bd51 2325 "0242cg3hdq3qdvx5flyrki8lpwlgwf5k45c21ks5049fv7ygm6gq"))))
44d10b1f
RW
2326 (build-system python-build-system)
2327 (arguments
2328 `(#:phases
2329 (modify-phases %standard-phases
2782bd51 2330 (add-before 'check 'disable-failing-test
44d10b1f
RW
2331 (lambda _
2332 ;; Disable failing test. See upstream bug report
2333 ;; https://github.com/pypa/virtualenv/issues/957
2334 (substitute* "tests/test_virtualenv.py"
2335 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2782bd51 2336 #t)))))
44d10b1f
RW
2337 (native-inputs
2338 `(("python-mock" ,python-mock)
2339 ("python-pytest" ,python-pytest)))
2340 (home-page "https://virtualenv.pypa.io/")
2341 (synopsis "Virtual Python environment builder")
2342 (description
2343 "Virtualenv is a tool to create isolated Python environments.")
2344 (license license:expat)))
2345
2346(define-public python2-virtualenv
2347 (package-with-python2 python-virtualenv))
2348
2349(define-public python-markupsafe
2350 (package
2351 (name "python-markupsafe")
753eb411 2352 (version "1.1.1")
44d10b1f
RW
2353 (source
2354 (origin
2355 (method url-fetch)
5182927c 2356 (uri (pypi-uri "MarkupSafe" version))
44d10b1f
RW
2357 (sha256
2358 (base32
753eb411 2359 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
44d10b1f 2360 (build-system python-build-system)
753eb411
MB
2361 (arguments
2362 `(#:modules ((ice-9 ftw)
2363 (srfi srfi-1)
2364 (srfi srfi-26)
2365 (guix build utils)
2366 (guix build python-build-system))
2367 #:phases (modify-phases %standard-phases
2368 (replace 'check
2369 (lambda _
2370 (let ((cwd (getcwd))
2371 (libdir (find (cut string-prefix? "lib." <>)
2372 (scandir "build"))))
2373 (setenv "PYTHONPATH"
2374 (string-append cwd "/build/" libdir ":"
2375 (getenv "PYTHONPATH")))
2376 (invoke "pytest" "-vv")))))))
2377 (native-inputs
2378 `(("python-pytest" ,python-pytest)))
44d10b1f
RW
2379 (home-page "https://github.com/mitsuhiko/markupsafe")
2380 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2381 (description
2382 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2383for Python.")
2384 (license license:bsd-3)))
2385
2386(define-public python2-markupsafe
2387 (package-with-python2 python-markupsafe))
2388
2389(define-public python-jinja2
2390 (package
2391 (name "python-jinja2")
4a5c7934 2392 (version "2.10.1")
44d10b1f
RW
2393 (source
2394 (origin
2395 (method url-fetch)
2396 (uri (pypi-uri "Jinja2" version))
2397 (sha256
2398 (base32
4a5c7934 2399 "04shqrs56aj04ipyqykj512rw2l0zfammvj9krawzxz7xc14yp06"))))
44d10b1f
RW
2400 (build-system python-build-system)
2401 (propagated-inputs
2402 `(("python-markupsafe" ,python-markupsafe)))
2403 (home-page "http://jinja.pocoo.org/")
2404 (synopsis "Python template engine")
2405 (description
2406 "Jinja2 is a small but fast and easy to use stand-alone template engine
2407written in pure Python.")
2408 (license license:bsd-3)))
2409
2410(define-public python2-jinja2
2411 (package-with-python2 python-jinja2))
2412
2413(define-public python-pystache
2414 (package
2415 (name "python-pystache")
2416 (version "0.5.4")
2417 (source (origin
2418 (method url-fetch)
2419 (uri (pypi-uri "pystache" version))
2420 (sha256
2421 (base32
2422 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2423 (build-system python-build-system)
2424 (arguments
2425 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2426 (home-page "http://defunkt.io/pystache/")
2427 (synopsis "Python logic-less template engine")
2428 (description
2429 "Pystache is a Python implementation of the framework agnostic,
2430logic-free templating system Mustache.")
2431 (license license:expat)
2432 (properties `((python2-variant . ,(delay python2-pystache))))))
2433
2434(define-public python2-pystache
2435 (package (inherit (package-with-python2
2436 (strip-python2-variant python-pystache)))
2437 (arguments
2438 `(#:python ,python-2
2439 #:phases
2440 (modify-phases %standard-phases
2441 (replace 'check
2442 (lambda _
dfafc29b 2443 (invoke "python" "test_pystache.py"))))))))
44d10b1f
RW
2444
2445(define-public python-joblib
2446 (package
2447 (name "python-joblib")
2448 (version "0.13.0")
2449 (source (origin
2450 (method url-fetch)
2451 (uri (pypi-uri "joblib" version))
2452 (sha256
2453 (base32
2454 "0612nazad8dxmn3xghfrmjax6456l4xy6hn9cngs7vydi14ds7v5"))))
2455 (build-system python-build-system)
2456 (arguments
2457 `(#:phases
2458 (modify-phases %standard-phases
2459 (replace 'check
2460 (lambda _ (invoke "pytest" "-v" "joblib"))))))
2461 (native-inputs
2462 `(("python-pytest" ,python-pytest)))
2463 (home-page "https://joblib.readthedocs.io/")
2464 (synopsis "Using Python functions as pipeline jobs")
2465 (description
2466 "Joblib is a set of tools to provide lightweight pipelining in Python.
2467In particular, joblib offers: transparent disk-caching of the output values
2468and lazy re-evaluation (memoize pattern), easy simple parallel computing
2469logging and tracing of the execution.")
2470 (license license:bsd-3)))
2471
2472(define-public python2-joblib
2473 (package-with-python2 python-joblib))
2474
a3363341
VC
2475(define-public python-daemon
2476 (package
2477 (name "python-daemon")
2478 (version "2.2.3")
2479 (source
2480 (origin
2481 (method url-fetch)
2482 (uri (pypi-uri "python-daemon" version))
2483 (sha256
2484 (base32
2485 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
2486 (build-system python-build-system)
2487 (arguments
2488 `(#:phases
2489 (modify-phases %standard-phases
2490 (add-before 'check 'disable-tests
2491 (lambda _
2492 ;; FIXME: Determine why test fails
2493 (substitute* "test/test_daemon.py"
2494 (("test_detaches_process_context")
2495 "skip_test_detaches_process_context"))
2496 #t)))))
2497 (propagated-inputs
2498 `(("python-lockfile" ,python-lockfile)))
2499 (native-inputs
2500 `(("python-unittest2" ,python-unittest2)
2501 ("python-testtools" ,python-testtools)
2502 ("python-testscenarios" ,python-testscenarios)
2503 ("python-mock" ,python-mock)
2504 ("python-docutils" ,python-docutils)))
2505 (home-page "https://pagure.io/python-daemon/")
2506 (synopsis "Python library for making a Unix daemon process")
2507 (description "Python-daemon is a library that assists a Python program to
2508turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
2509
2510This library provides a @code{DaemonContext} class that manages the following
2511important tasks for becoming a daemon process:
2512@enumerate
2513@item Detach the process into its own process group.
2514@item Set process environment appropriate for running inside a chroot.
2515@item Renounce suid and sgid privileges.
2516@item Close all open file descriptors.
2517@item Change the working directory, uid, gid, and umask.
2518@item Set appropriate signal handlers.
2519@item Open new file descriptors for stdin, stdout, and stderr.
2520@item Manage a specified PID lock file.
2521@item Register cleanup functions for at-exit processing.
2522@end enumerate")
2523 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
2524 (license (list license:asl2.0 license:gpl3+))))
2525
44d10b1f
RW
2526(define-public python-docutils
2527 (package
2528 (name "python-docutils")
2529 (version "0.14")
2530 (source
2531 (origin
2532 (method url-fetch)
2533 (uri (pypi-uri "docutils" version))
2534 (sha256
2535 (base32
2536 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2537 (build-system python-build-system)
2538 (arguments
2539 '(#:tests? #f)) ; no setup.py test command
2540 (home-page "http://docutils.sourceforge.net/")
2541 (synopsis "Python Documentation Utilities")
2542 (description
2543 "Docutils is a modular system for processing documentation into useful
2544formats, such as HTML, XML, and LaTeX. For input Docutils supports
2545reStructuredText.")
2546 ;; Most of the source code is public domain, but some source files are
2547 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2548 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2549
2550(define-public python2-docutils
2551 (package-with-python2 python-docutils))
2552
2553(define-public python-pygments
2554 (package
2555 (name "python-pygments")
eed81080 2556 (version "2.4.2")
44d10b1f
RW
2557 (source
2558 (origin
2559 (method url-fetch)
2560 (uri (pypi-uri "Pygments" version))
2561 (sha256
2562 (base32
eed81080 2563 "15v2sqm5g12bqa0c7wikfh9ck2nl97ayizy1hpqhmws5gqalq748"))))
44d10b1f
RW
2564 (build-system python-build-system)
2565 (arguments
2566 ;; FIXME: Tests require sphinx, which depends on this.
2567 '(#:tests? #f))
2568 (home-page "http://pygments.org/")
2569 (synopsis "Syntax highlighting")
2570 (description
2571 "Pygments is a syntax highlighting package written in Python.")
2572 (license license:bsd-2)))
2573
2574(define-public python2-pygments
2575 (package-with-python2 python-pygments))
2576
0f0a5ef9
MC
2577(define-public python-bumpversion
2578 (package
2579 (name "python-bumpversion")
2580 (version "0.5.3")
2581 (source
2582 (origin
2583 (method url-fetch)
2584 (uri (pypi-uri "bumpversion" version))
2585 (sha256
2586 (base32
2587 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
2588 (build-system python-build-system)
2589 (home-page "https://github.com/peritus/bumpversion")
2590 (synopsis "Tool to bump software version")
2591 (description "This tool provides a command-line interface (CLI) to bump a
2592software version simply.")
2593 (license license:expat)))
2594
b24fd2c2
MC
2595(define-public python-deprecated
2596 (package
2597 (name "python-deprecated")
2598 (version "1.2.5")
2599 (source
2600 (origin
2601 (method git-fetch)
2602 (uri (git-reference
2603 (url "https://github.com/tantale/deprecated.git")
2604 (commit (string-append "v" version))))
2605 (file-name (git-file-name name version))
2606 (sha256
2607 (base32
2608 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
2609 (build-system python-build-system)
2610 (arguments
2611 `(#:phases (modify-phases %standard-phases
2612 (replace 'check
2613 (lambda _
2614 (invoke "pytest"))))))
2615 (propagated-inputs
2616 `(("python-wrapt" ,python-wrapt)))
2617 (native-inputs
2618 `(("python-bumpversion" ,python-bumpversion)
2619 ("python-pytest" ,python-pytest)
2620 ("python-pytest-cov" ,python-pytest-cov)
2621 ("python-sphinx" ,python-sphinx)
2622 ("python-tox" ,python-tox)))
2623 (home-page "https://github.com/tantale/deprecated")
2624 (synopsis "Python decorator to deprecate classes, functions or methods")
2625 (description "The @code{deprecated} decorator provides a convenient way to deprecate
2626to deprecate classes, functions or methods.")
2627 (license license:expat)))
2628
d5a998fa
MC
2629(define-public python-pygithub
2630 (package
2631 (name "python-pygithub")
2632 (version "1.43.7")
2633 (source
2634 ;; We fetch from the Git repo because there are no tests in the PyPI
2635 ;; archive.
2636 (origin
2637 (method git-fetch)
2638 (uri (git-reference
2639 (url "https://github.com/PyGithub/PyGithub.git")
2640 (commit (string-append "v" version))))
2641 (file-name (git-file-name name version))
2642 (sha256
2643 (base32
2644 "0ww92zz0ja9w6rw83vphmn8rwmcn6abg16j4q7zxjc0rrg2cfj9i"))))
2645 (build-system python-build-system)
2646 (arguments
2647 `(#:phases (modify-phases %standard-phases
2648 ;; Some tests rely on the network.
2649 (add-after 'unpack 'disable-failing-tests
2650 (lambda _
2651 (substitute* "tests/Issue142.py"
2652 (("testDecodeJson") "disabled_testDecodeJson"))
2653 #t))
2654 (add-before 'check 'prepare-for-tests
2655 (lambda _
2656 (for-each (lambda (f)
2657 (chmod f #o666))
2658 (find-files "./tests"))
2659 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
2660 (setenv "PYTHONPATH"
2661 (string-append "./tests:" (getenv "PYTHONPATH")))
2662 #t)))))
2663 (propagated-inputs
2664 `(("python-deprecated" ,python-deprecated)
2665 ("python-pyjwt" ,python-pyjwt)
2666 ("python-requests" ,python-requests)))
2667 (native-inputs `(("python-httpretty" ,python-httpretty)))
2668 (home-page "https://pygithub.readthedocs.io/en/latest/")
2669 (synopsis "Python library for the GitHub API")
2670 (description "This library allows managing GitHub resources such as
2671repositories, user profiles, and organizations in your Python applications,
2672using version 3 of the GitHub application programming interface (API).")
2673 (license license:lgpl3+)))
2674
c0c0bb38
MC
2675(define-public python-rellu
2676 (package
2677 (name "python-rellu")
2678 (version "0.7")
2679 (source
2680 (origin
2681 (method url-fetch)
2682 (uri (pypi-uri "rellu" version))
2683 (sha256
2684 (base32
2685 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
2686 (build-system python-build-system)
2687 (propagated-inputs
2688 `(("python-invoke" ,python-invoke)
2689 ("python-pygithub" ,python-pygithub)))
2690 (home-page "https://github.com/robotframework/rellu")
2691 (synopsis "Utilities to create PyPI releases")
2692 (description "This collection of utilities contains tooling and templates
2693to assist in creating releases on GitHub and publishing them on PyPI. It is
2694designed to be used by Robot Framework and tools and libraries in its
2695ecosystem, but can naturally be used also by other projects.")
2696 (license license:asl2.0)))
2697
b9790285
MC
2698(define-public python-robotframework
2699 (package
2700 (name "python-robotframework")
1710b8f8 2701 (version "3.1.2")
b9790285
MC
2702 ;; There are no tests in the PyPI archive.
2703 (source
2704 (origin
2705 (method git-fetch)
2706 (uri (git-reference
2707 (url "https://github.com/robotframework/robotframework.git")
2708 (commit (string-append "v" version))))
2709 (file-name (git-file-name name version))
2710 (sha256
1710b8f8 2711 (base32 "16gnxy0qinh8fhs0qvhff5z2xh49c3cqgm0d7bfjw120df6x7fym"))
b9790285
MC
2712 (patches (search-patches
2713 "python-robotframework-honor-source-date-epoch.patch"))))
2714 (build-system python-build-system)
2715 (arguments
2716 `(#:phases (modify-phases %standard-phases
2717 (add-before 'build 'build-and-install-doc
2718 (lambda* (#:key outputs #:allow-other-keys)
2719 (let* ((doc-output (assoc-ref outputs "doc"))
2720 (doc (string-append doc-output "/share/"
2721 ,name "-" ,version "/")))
2722 (invoke "invoke" "library-docs" "all")
2723 (mkdir-p doc)
2724 (copy-recursively "doc/libraries"
2725 (string-append doc "/libraries"))
2726 #t)))
2727 (replace 'check
2728 (lambda _
2729 (invoke "python" "utest/run.py"))))))
2730 (native-inputs
2731 `(("python-invoke" ,python-invoke)
2732 ("python-rellu" ,python-rellu)
2733 ("python:tk" ,python "tk"))) ;used when building the HTML doc
2734 (outputs '("out" "doc"))
2735 (home-page "https://robotframework.org")
2736 (synopsis "Generic automation framework")
2737 (description "Robot Framework is a generic automation framework for
2738acceptance testing, acceptance test driven development (ATDD), and robotic
2739process automation (RPA).")
2740 (license license:asl2.0)))
2741
5b84c120
MC
2742(define-public python-robotframework-lint
2743 ;; There is no properly tagged release; the commit below seems to correspond
2744 ;; to the 0.9 stable release available from PyPI. The tests are not
2745 ;; included in the PyPI archive, so we fetch the sources from the upstream
2746 ;; Git repo.
2747 (let ((commit "e851879bab1f63e4e53b34a4dc8a67ed95102830")
2748 (revision "1"))
2749 (package
2750 (name "python-robotframework-lint")
2751 (version (git-version "0.9.0" revision commit))
2752 (source
2753 (origin
2754 (method git-fetch)
2755 (uri (git-reference
2756 (url "https://github.com/boakley/robotframework-lint.git")
2757 (commit commit)))
2758 (file-name (git-file-name name version))
2759 (sha256
2760 (base32
2761 "1p6fknqg5sb9qz5857ji4a877657vgfjm5v3zn45994parx6ml1m"))))
2762 (build-system python-build-system)
2763 (arguments
2764 `(#:phases
2765 (modify-phases %standard-phases
2766 (replace 'check
2767 (lambda _
2768 (invoke "python" "-m" "robot" "-A"
2769 "tests/conf/default.args" "tests"))))))
2770 (propagated-inputs
2771 `(("python-robotframework" ,python-robotframework)))
2772 (home-page "https://github.com/boakley/robotframework-lint/")
2773 (synopsis "Static analysis tool (linter) for Robot Framework")
2774 (description "This package provides the @code{rflint} command-line
2775utility, a static analysis tool (linter) for Robot Framework source files.")
2776 (license license:asl2.0))))
2777
c0c64f17
MC
2778(define-public python-robotframework-sshlibrary
2779 (package
2780 (name "python-robotframework-sshlibrary")
2781 (version "3.3.0")
2782 ;; There are no tests in the PyPI archive.
2783 (source
2784 (origin
2785 (method git-fetch)
2786 (uri (git-reference
2787 (url "https://github.com/robotframework/SSHLibrary.git")
2788 (commit (string-append "v" version))))
2789 (file-name (git-file-name name version))
2790 (sha256
2791 (base32
2792 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
2793 (build-system python-build-system)
2794 (arguments
2795 `(#:phases
2796 (modify-phases %standard-phases
2797 (add-before 'build 'build-and-install-doc
2798 (lambda* (#:key outputs #:allow-other-keys)
2799 (let* ((doc-output (assoc-ref outputs "doc"))
2800 (doc (string-append doc-output "/share/"
2801 ,name "-" ,version "/")))
2802 (invoke "chmod" "-R" "+w" "docs")
2803 (invoke "invoke" "kw-docs" "project-docs")
2804 (mkdir-p doc)
2805 (for-each delete-file (find-files "docs" "\\.rst"))
2806 (copy-recursively "docs" doc)
2807 #t)))
2808 (replace 'check
2809 (lambda _
2810 ;; Some tests require an SSH server; we remove them.
2811 (delete-file "utest/test_client_api.py")
2812 (delete-file "utest/test_scp.py")
2813 (invoke "python" "utest/run.py"))))))
2814 (propagated-inputs
2815 `(("python-robotframework" ,python-robotframework)
2816 ("python-paramiko" ,python-paramiko)
2817 ("python-scp" ,python-scp)))
2818 (native-inputs
2819 `(("openssh" ,openssh)
2820 ("which" ,which)
2821 ;; To generate the documentation
2822 ("python-docutils" ,python-docutils)
2823 ("python-invoke" ,python-invoke)
2824 ("python-pygments" ,python-pygments)
2825 ("python-rellu" ,python-rellu)))
2826 (outputs '("out" "doc"))
2827 (home-page "https://github.com/robotframework/SSHLibrary")
2828 (synopsis "Robot Framework library for SSH and SFTP")
2829 (description "SSHLibrary is a Robot Framework library providing support
2830for SSH and SFTP. It has the following main usages:
2831@itemize @bullet
2832@item Executing commands on the remote machine, either blocking or non-blocking.
2833@item Writing and reading in an interactive shell.
2834@item Transferring files and directories over SFTP.
2835@item Ensuring that files and directories exist on the remote machine.
2836@end itemize")
2837 (license license:asl2.0)))
2838
13d825fc
MC
2839(define-public python-scp
2840 (package
2841 (name "python-scp")
2842 (version "0.13.2")
2843 (source
2844 (origin
2845 (method url-fetch)
2846 (uri (pypi-uri "scp" version))
2847 (sha256
2848 (base32
2849 "1crlpw9lnn58fs1c1rmh7s7s9y5gkgpgjsqlvg9qa51kq1knx7gg"))))
2850 (build-system python-build-system)
2851 (arguments
2852 '(#:tests? #f)) ;tests require an SSH server
2853 (propagated-inputs
2854 `(("python-paramiko" ,python-paramiko)))
2855 (home-page "https://github.com/jbardin/scp.py")
2856 (synopsis "SCP protocol module for Python and Paramiko")
2857 (description "The scp module extends the Paramiko library to send and
2858receive files via the SCP1 protocol, as implemented by the OpenSSH
2859@command{scp} program.")
2860 (license license:gpl2+)))
2861
44d10b1f
RW
2862(define-public python-rst.linker
2863 (package
2864 (name "python-rst.linker")
2865 (version "1.10")
2866 (source
2867 (origin
2868 (method url-fetch)
2869 (uri (pypi-uri "rst.linker" version))
2870 (sha256
2871 (base32
2872 "0iqaacp7pj1s8avs4kc0qg0r7dscywaq37y6l9j14glqdikk0wdj"))))
2873 (build-system python-build-system)
2874 (propagated-inputs
2875 `(("python-dateutil" ,python-dateutil)
2876 ("python-six" ,python-six)))
2877 (native-inputs
2878 `(("python-setuptools-scm" ,python-setuptools-scm)))
2879 ;; Test would require path.py, which would introduce a cyclic dependence.
2880 (arguments `(#:tests? #f))
2881 ;; Note: As of version 1.7 the documentation is not worth building.
2882 (home-page "https://github.com/jaraco/rst.linker")
2883 (synopsis "Sphinx plugin to add links and timestamps")
2884 (description "rst.linker allows to automatically replace text by a
2885reStructuredText external reference or timestamps. It's primary purpose is to
2886augment the changelog, but it can be used for other documents, too.")
2887 (license license:expat)))
2888
2889(define-public python2-rst.linker
2890 (package-with-python2 python-rst.linker))
2891
2892(define-public python-feedgenerator
2893 (package
2894 (name "python-feedgenerator")
2895 (version "1.9")
2896 (source
2897 (origin
2898 (method url-fetch)
2899 (uri (pypi-uri "feedgenerator" version))
2900 (sha256
2901 (base32
2902 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
2903 (modules '((guix build utils)))
2904 (snippet
2905 '(begin
2906 ;; Remove pre-compiled .pyc files from source.
2907 (for-each delete-file-recursively
2908 (find-files "." "__pycache__" #:directories? #t))
2909 (for-each delete-file (find-files "." "\\.pyc$"))
2910 #t))))
2911 (build-system python-build-system)
2912 (propagated-inputs
2913 `(("python-pytz" ,python-pytz)
2914 ("python-six" ,python-six)))
2915 (home-page "https://github.com/getpelican/feedgenerator")
2916 (synopsis
2917 "Standalone version of Django's Atom/RSS feed generator")
2918 (description
2919 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2920which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
2921 (license license:bsd-3)))
2922
2923(define-public python2-feedgenerator
2924 (package-with-python2 python-feedgenerator))
2925
2926(define-public python-toml
2927 (package
2928 (name "python-toml")
2929 (version "0.9.4")
2930 (source
2931 (origin
2932 (method url-fetch)
2933 (uri (pypi-uri "toml" version))
2934 (sha256
2935 (base32
2936 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
2937 (build-system python-build-system)
2938 (arguments
2939 `(#:tests? #f)) ;no tests suite in release
2940 (home-page "https://github.com/uiri/toml")
2941 (synopsis "Library for TOML")
2942 (description
2943 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
2944Language (TOML) configuration files.")
2945 (license license:expat)))
2946
346c8752
BG
2947(define-public python-jsonrpc-server
2948 (package
2949 (name "python-jsonrpc-server")
2950 (version "0.1.2")
2951 (source
2952 (origin
2953 (method url-fetch)
2954 (uri (pypi-uri "python-jsonrpc-server" version))
2955 (sha256
2956 (base32
2957 "0m4ykpcdy52x37n1ikysp07j7p8ialcdvvvsrjp3545sn7iiid09"))))
2958 (build-system python-build-system)
2959 (propagated-inputs
2960 `(("python-future" ,python-future)
2961 ("python-mock" ,python-mock)
2962 ("python-pytest" ,python-pytest)))
2963 (home-page
2964 "https://github.com/palantir/python-jsonrpc-server")
2965 (synopsis "JSON RPC 2.0 server library")
2966 (description
1df5407c 2967 "This package provides a JSON RPC 2.0 server library for Python.")
346c8752
BG
2968 (license license:expat)))
2969
56f4ad47
BG
2970(define-public python-pydocstyle
2971 (package
2972 (name "python-pydocstyle")
2973 (version "3.0.0")
2974 (source
2975 (origin
2976 (method url-fetch)
2977 (uri (pypi-uri "pydocstyle" version))
2978 (sha256
2979 (base32
2980 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
2981 (build-system python-build-system)
2982 (propagated-inputs
2983 `(("python-six" ,python-six)
2984 ("python-snowballstemmer" ,python-snowballstemmer)))
2985 (home-page
2986 "https://github.com/PyCQA/pydocstyle/")
2987 (synopsis "Python docstring style checker")
2988 (description
2989 "This package provides a style checker for the Python Language
2990Server (PLS).")
2991 (license license:expat)))
2992
be4d840c
BG
2993(define-public python-language-server
2994 (package
2995 (name "python-language-server")
ccbaeba3 2996 (version "0.26.1")
be4d840c
BG
2997 (source
2998 (origin
2999 (method url-fetch)
3000 (uri (pypi-uri "python-language-server" version))
3001 (sha256
3002 (base32
ccbaeba3 3003 "1vs9ckfmm534n1hq3m871916wsjvi5h4gyj6wlzg13ck6506lx0s"))))
be4d840c
BG
3004 (build-system python-build-system)
3005 (propagated-inputs
3006 `(("python-pluggy" ,python-pluggy)
3007 ("python-jsonrpc-server" ,python-jsonrpc-server)
3008 ("python-jedi" ,python-jedi)
3009 ("python-yapf" ,python-yapf)
3010 ("python-pyflakes" ,python-pyflakes)
3011 ("python-pydocstyle" ,python-pydocstyle)
3012 ("python-pycodestyle" ,python-pycodestyle)
3013 ("python-mccabe" ,python-mccabe)
3014 ("python-rope" ,python-rope)
fe4a4bd2
BG
3015 ("python-autopep8" ,python-autopep8)
3016 ("python-pylint" ,python-pylint)))
be4d840c
BG
3017 (home-page "https://github.com/palantir/python-language-server")
3018 (synopsis "Python implementation of the Language Server Protocol")
3019 (description
3020 "The Python Language Server (pyls) is an implementation of the Python 3
3021language specification for the Language Server Protocol (LSP). This tool is
3022used in text editing environments to provide a complete and integrated
3023feature-set for programming Python effectively.")
3024 (license license:expat)))
3025
44d10b1f
RW
3026(define-public python-black
3027 (package
3028 (name "python-black")
3029 (version "18.6b4")
3030 (source
3031 (origin
3032 (method url-fetch)
3033 (uri (pypi-uri "black" version))
3034 (sha256
3035 (base32
3036 "0i4sfqgz6w15vd50kbhi7g7rifgqlf8yfr8y78rypd56q64qn592"))))
3037 (build-system python-build-system)
3038 (arguments
3039 `(#:phases
3040 (modify-phases %standard-phases
3041 (add-after 'patch-source-shebangs 'patch-extra-shebangs
3042 (lambda _
3043 (let ((python3 (which "python3")))
3044 (substitute* '("tests/data/fmtonoff.py"
3045 "tests/data/string_prefixes.py"
3046 "tests/data/function.py")
3047 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
3048 (string-append "#!" python3 (if (string? minor-version)
3049 minor-version
3050 ""))))))))))
3051 (propagated-inputs
3052 `(("python-click" ,python-click)
3053 ("python-attrs" ,python-attrs)
3054 ("python-appdirs" ,python-appdirs)
3055 ("python-toml" ,python-toml)))
3056 (home-page "https://github.com/ambv/black")
3057 (synopsis "The uncompromising code formatter")
3058 (description "Black is the uncompromising Python code formatter.")
3059 (license license:expat)))
3060
3061(define-public python-blinker
3062 (package
3063 (name "python-blinker")
3064 (version "1.4")
3065 (source
3066 (origin
3067 (method url-fetch)
3068 (uri (pypi-uri "blinker" version))
3069 (sha256
3070 (base32
3071 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3072 (build-system python-build-system)
3073 (home-page "http://pythonhosted.org/blinker/")
3074 (synopsis "Fast, simple object-to-object and broadcast signaling")
3075 (description
3076 "Blinker provides a fast dispatching system that allows any number of
3077interested parties to subscribe to events, or \"signals\".")
3078 (license license:expat)))
3079
3080(define-public python2-blinker
3081 (package-with-python2 python-blinker))
3082
3083(define-public pelican
3084 (package
3085 (name "pelican")
aa71b690 3086 (version "4.0.1")
44d10b1f
RW
3087 (source
3088 (origin
3089 (method url-fetch)
3090 (uri (pypi-uri "pelican" version))
3091 (sha256
3092 (base32
aa71b690 3093 "05yda7n6r0ll18fpdjzkzyr0ls8hbb86fnjyb33k9jvv5avah2lr"))))
44d10b1f
RW
3094 (build-system python-build-system)
3095 (propagated-inputs
3096 `(("python-feedgenerator" ,python-feedgenerator)
3097 ("python-jinja2" ,python-jinja2)
3098 ("python-pygments" ,python-pygments)
3099 ("python-docutils" ,python-docutils)
3100 ("python-pytz" ,python-pytz)
3101 ("python-blinker" ,python-blinker)
3102 ("python-unidecode" ,python-unidecode)
3103 ("python-six" ,python-six)
3104 ("python-dateutil" ,python-dateutil)
3105 ("python-markdown" ,python-markdown)))
3106 (home-page "https://getpelican.com/")
3107 (arguments
3108 `(;; XXX Requires a lot more packages to do unit tests :P
3109 #:tests? #f
3110 #:phases (modify-phases %standard-phases
3111 (add-before
3112 'install 'adjust-requires
3113 ;; Since feedgenerator is installed from git, it doesn't
3114 ;; conform to the version requirements.
3115 ;;
3116 ;; We *do have* "feedgenerator >= 1.6", but strip off the
3117 ;; version requirement so setuptools doesn't get confused.
3118 (lambda _
3119 (substitute* "setup.py"
3120 (("['\"]feedgenerator.*?['\"]")
3121 "'feedgenerator'")))))))
3122 (synopsis "Python-based static site publishing system")
3123 (description
3124 "Pelican is a tool to generate a static blog from reStructuredText,
3125Markdown input files, and more. Pelican uses Jinja2 for templating
3126and is very extensible.")
3127 (license license:agpl3+)))
3128
8c141421
JH
3129(define-public mallard-ducktype
3130 (package
3131 (name "mallard-ducktype")
3132 (version "1.0.1")
3133 (source
3134 (origin
3135 (method git-fetch)
3136 ;; git-reference because a proper source tarball is not available
3137 ;; https://lists.gnu.org/archive/html/guix-devel/2019-05/msg00209.html
3138 (uri (git-reference
3139 (url "https://github.com/projectmallard/mallard-ducktype.git")
3140 (commit version)))
3141 (file-name (git-file-name name version))
3142 (sha256
3143 (base32
3144 "0crland0kmpsyjfmnflcw7gaqy5b87b6ah17cmr9d5z1kyazf54n"))))
3145 (build-system python-build-system)
3146 (home-page "http://projectmallard.org")
3147 (synopsis "Convert Ducktype to Mallard documentation markup")
3148 (description
3149 "Ducktype is a lightweight syntax that can represent all the semantics
3150of the Mallard XML documentation system. Ducktype files can be converted to
3151Mallard using the @command{ducktype} tool. The yelp-tools package
3152provides additional functionality on the produced Mallard documents.")
3153 (license license:expat)))
3154
44d10b1f
RW
3155(define-public python-scikit-image
3156 (package
3157 (name "python-scikit-image")
9ff04084 3158 (version "0.14.2")
44d10b1f
RW
3159 (source
3160 (origin
3161 (method url-fetch)
3162 (uri (pypi-uri "scikit-image" version))
3163 (sha256
9ff04084 3164 (base32 "07qchljkyxvg5nrm12fvszi7pmjk4m01qp0w0z8syxzxxs20pz8s"))))
44d10b1f
RW
3165 (build-system python-build-system)
3166 (arguments
3167 ;; TODO: Some tests require running X11 server. Disable them?
3168 '(#:tests? #f))
3169 ;; See DEPENDS.txt for the list of build and run time requiremnts
3170 (propagated-inputs
3171 `(("python-cloudpickle" ,python-cloudpickle)
3172 ("python-dask" ,python-dask)
3173 ("python-matplotlib" ,python-matplotlib)
3174 ("python-networkx" ,python-networkx)
3175 ("python-numpy" ,python-numpy)
3176 ("python-pillow" ,python-pillow)
3177 ("python-pywavelets" ,python-pywavelets)
3178 ("python-scipy" ,python-scipy)
3179 ("python-six" ,python-six)))
3180 (native-inputs
3181 `(("python-cython" ,python-cython)))
3182 (home-page "http://scikit-image.org/")
3183 (synopsis "Image processing in Python")
3184 (description
3185 "Scikit-image is a collection of algorithms for image processing.")
3186 (license license:bsd-3)))
3187
3188(define-public python2-scikit-image
3189 (package-with-python2 python-scikit-image))
3190
3191(define-public python-cython
3192 (package
3193 (name "python-cython")
d1b93e91 3194 (version "0.29.11")
44d10b1f
RW
3195 (source
3196 (origin
3197 (method url-fetch)
3198 (uri (pypi-uri "Cython" version))
3199 (sha256
3200 (base32
d1b93e91 3201 "1866m01ggl2h3rky4hac3m5p048gg4a0jb09ljkknryiqln54fkn"))))
44d10b1f
RW
3202 (build-system python-build-system)
3203 ;; we need the full python package and not just the python-wrapper
3204 ;; because we need libpython3.3m.so
3205 (inputs
3206 `(("python" ,python)))
3207 (arguments
3208 `(#:phases
3209 (modify-phases %standard-phases
3210 (add-before 'check 'set-HOME
3211 ;; some tests require access to "$HOME/.cython"
3212 (lambda _ (setenv "HOME" "/tmp") #t))
3213
3214 ;; FIXME: These tests started failing on armhf after the 0.28 update
3215 ;; (commit c69d11c5930), both with an error such as this:
3216 ;; compiling (cpp) and running dictcomp ...
3217 ;; === C/C++ compiler error output: ===
3218 ;; ‘
3219 ;; dictcomp.cpp:5221: confused by earlier errors, bailing out
3220 ;; See <https://hydra.gnu.org/build/2948724> for logs.
3221 ,@(if (target-arm32?)
3222 `((add-before 'check 'disable-failing-tests
3223 (lambda _
3224 (let ((disabled-tests (open-file "tests/bugs.txt" "a")))
3225 (for-each (lambda (test)
3226 (format disabled-tests "~a\n" test))
3227 '("memslice" "dictcomp"))
3228 (close-port disabled-tests)))))
3229 '())
3230
3231 (replace 'check
3232 (lambda _
e9194eb0
MB
3233 ;; Disable compiler optimizations to greatly reduce the running
3234 ;; time of the test suite.
3235 (setenv "CFLAGS" "-O0")
3236
3237 (invoke "python" "runtests.py" "-vv"
3238 "-j" (number->string (parallel-job-count))))))))
f319409b 3239 (home-page "https://cython.org/")
44d10b1f
RW
3240 (synopsis "C extensions for Python")
3241 (description "Cython is an optimising static compiler for both the Python
3242programming language and the extended Cython programming language. It makes
3243writing C extensions for Python as easy as Python itself.")
3244 (license license:asl2.0)
3245 (properties `((python2-variant . ,(delay python2-cython))))))
3246
3247(define-public python2-cython
da460865
MB
3248 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
3249 (package
3250 (inherit base)
3251 (name "python2-cython")
3252 (inputs
3253 `(("python-2" ,python-2))) ;this is not automatically changed
3254 (arguments
3255 (substitute-keyword-arguments (package-arguments base)
3256 ((#:phases phases)
3257 `(modify-phases ,phases
3258 (add-before 'check 'adjust-test_embed
3259 (lambda _
3260 (substitute* "runtests.py"
3261 ;; test_embed goes great lengths to find the static libpythonX.Y.a
3262 ;; so it can give the right -L flag to GCC when embedding static
3263 ;; builds of Python. It is unaware that the Python "config"
3264 ;; directory (where the static library lives) was renamed in
3265 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
3266 ;; which works fine, because that is where the shared library is.
3267 ;;
3268 ;; It also appears to be unaware that the Makefile in Demos/embed
3269 ;; already unconditionally pass the static library location to GCC,
3270 ;; after checking sysconfig.get_config_var('LIBPL).
3271 ;;
3272 ;; The effect is that the linker is unable to resolve libexpat
3273 ;; symbols when building for Python 2, because neither the Python 2
3274 ;; shared library nor Expat is available. To fix it, we can either
3275 ;; add Expat as an input and make it visible to the linker, or just
3276 ;; prevent it from overriding the Python shared library location.
3277 ;; The end result is identical, so we take the easy route.
3278 ((" or libname not in os\\.listdir\\(libdir\\)")
3279 ""))
3280 #t)))))))))
44d10b1f
RW
3281
3282;; The RPython toolchain currently does not support Python 3.
3283(define-public python2-rpython
3284 (package
3285 (name "python2-rpython")
3286 (version "0.2.1")
3287 (source
3288 (origin
3289 (method url-fetch)
3290 (uri (pypi-uri "rpython" version))
3291 (sha256
3292 (base32
3293 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
3294 (build-system python-build-system)
3295 (arguments `(#:python ,python-2))
3296 (native-inputs
3297 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3298 (home-page "https://rpython.readthedocs.org")
3299 (synopsis "Framework for implementing interpreters and virtual machines")
3300 (description "RPython is a translation and support framework for
3301producing implementations of dynamic languages, emphasizing a clean separation
3302between language specification and implementation aspects.")
3303 (license license:expat)))
3304
3305;; NOTE: when upgrading numpy please make sure that python-pandas and
3306;; python-scipy still build, as these three packages are often used together.
3307(define-public python-numpy
3308 (package
3309 (name "python-numpy")
3310 (version "1.15.4")
3311 (source
3312 (origin
3313 (method url-fetch)
3314 (uri (string-append
3315 "https://github.com/numpy/numpy/releases/download/v"
3316 version "/numpy-" version ".tar.gz"))
3317 (sha256
3318 (base32
3319 "102vcl2qq4pjbm7a3d67vkkvn4466ngia1d8wi5avqwqh8j0jvkn"))))
3320 (build-system python-build-system)
3321 (inputs
3322 `(("openblas" ,openblas)
3323 ("lapack" ,lapack)))
3324 (native-inputs
3325 `(("python-cython" ,python-cython)
3326 ("python-pytest" ,python-pytest)
3327 ("gfortran" ,gfortran)))
3328 (arguments
3329 `(#:phases
3330 (modify-phases %standard-phases
3331 (add-before 'build 'configure-blas-lapack
3332 (lambda* (#:key inputs #:allow-other-keys)
3333 (call-with-output-file "site.cfg"
3334 (lambda (port)
3335 (format port
3336 "[openblas]
3337libraries = openblas
3338library_dirs = ~a/lib
3339include_dirs = ~a/include
3340
3341# backslash-n to make emacs happy
3342\n[lapack]
3343lapack_libs = lapack
3344library_dirs = ~a/lib
3345include_dirs = ~a/include
3346"
3347 (assoc-ref inputs "openblas")
3348 (assoc-ref inputs "openblas")
3349 (assoc-ref inputs "lapack")
3350 (assoc-ref inputs "lapack"))))
3351 #t))
3352 (add-before 'build 'fix-executable-paths
3353 (lambda* (#:key inputs #:allow-other-keys)
3354 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
3355 ;; instead of /bin/sh.
3356 (substitute* "numpy/distutils/exec_command.py"
3357 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
3358 (string-append match-start (assoc-ref inputs "bash") match-end)))
3359 ;; Use "gcc" executable, not "cc".
3360 (substitute* "numpy/distutils/system_info.py"
3361 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3362 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3363 #t))
3364 ;; Tests can only be run after the library has been installed and not
3365 ;; within the source directory.
3366 (delete 'check)
3367 (add-after 'install 'check
3368 (lambda* (#:key outputs inputs #:allow-other-keys)
3369 ;; Make installed package available for running the tests
3370 (add-installed-pythonpath inputs outputs)
3371 ;; Make sure "f2py" etc is found.
3372 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
3373 ":" (getenv "PATH")))
3374 (with-directory-excursion "/tmp"
3375 (invoke "python" "-c"
3376 "import numpy; numpy.test(verbose=2)")))))))
3377 (home-page "http://www.numpy.org/")
3378 (synopsis "Fundamental package for scientific computing with Python")
3379 (description "NumPy is the fundamental package for scientific computing
3380with Python. It contains among other things: a powerful N-dimensional array
3381object, sophisticated (broadcasting) functions, tools for integrating C/C++
3382and Fortran code, useful linear algebra, Fourier transform, and random number
3383capabilities.")
3384 (license license:bsd-3)))
3385
3386(define-public python2-numpy
3387 (package-with-python2 python-numpy))
3388
3389;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
3390;; interest only for legacy code going back to NumPy's predecessor
3391;; Numeric.
3392(define-public python2-numpy-1.8
3393 (package (inherit python2-numpy)
3394 (version "1.8.2")
3395 (source
3396 (origin
3397 (method url-fetch)
3398 (uri (string-append
3399 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
3400 (file-name (string-append "python2-numpy-" version ".tar.gz"))
3401 (sha256
3402 (base32
3403 "0sc20gz1b17xnyrkp5frca3ql5qfalpv916hfg2kqxpwr6jg0f1g"))))
3404 (arguments
3405 (substitute-keyword-arguments (package-arguments python2-numpy)
3406 ((#:phases phases)
3407 `(modify-phases ,phases
3408 (replace 'configure-blas-lapack
3409 (lambda* (#:key inputs #:allow-other-keys)
3410 (call-with-output-file "site.cfg"
3411 (lambda (port)
3412 (format port
3413 "[openblas]
3414libraries = openblas,lapack
3415library_dirs = ~a/lib:~a/lib
3416include_dirs = ~a/include:~a/include
3417"
3418 (assoc-ref inputs "openblas")
3419 (assoc-ref inputs "lapack")
3420 (assoc-ref inputs "openblas")
3421 (assoc-ref inputs "lapack"))))
3422 #t))))))
3423 (native-inputs
3424 `(("python2-nose" ,python2-nose)))
3425 (description "NumPy is the fundamental package for scientific computing
3426with Python. It contains among other things: a powerful N-dimensional array
3427object, sophisticated (broadcasting) functions, tools for integrating C/C++
3428and Fortran code, useful linear algebra, Fourier transform, and random number
3429capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
3430that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
3431Numeric.")
3432 (license license:bsd-3)))
3433
3434(define-public python-munch
3435 (package
3436 (name "python-munch")
3437 (version "2.0.4")
3438 (source
3439 (origin
3440 (method url-fetch)
3441 (uri (pypi-uri "munch" version))
3442 (sha256
3443 (base32
3444 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3445 (build-system python-build-system)
3446 (home-page "https://github.com/Infinidat/munch")
3447 (synopsis "Dot-accessible dictionary")
3448 (description "Munch is a dot-accessible dictionary similar to JavaScript
3449objects.")
3450 (license license:expat)))
3451
3452(define-public python2-munch
3453 (package-with-python2 python-munch))
3454
3455(define-public python-colormath
3456 (package
3457 (name "python-colormath")
3458 (version "3.0.0")
3459 (source
3460 (origin
3461 (method url-fetch)
3462 (uri (pypi-uri "colormath" version))
3463 (sha256
3464 (base32
3465 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3466 (build-system python-build-system)
3467 (propagated-inputs
3468 `(("python-networkx" ,python-networkx)
3469 ("python-numpy" ,python-numpy)))
3470 (home-page "https://github.com/gtaylor/python-colormath")
3471 (synopsis "Color math and conversion library")
3472 (description
3473 "This is a Python library for color math and conversions.")
3474 (license license:bsd-3)))
3475
3476(define-public python2-colormath
3477 (package-with-python2 python-colormath))
3478
3479(define-public python-spectra
3480 (package
3481 (name "python-spectra")
3482 (version "0.0.11")
3483 (source
3484 (origin
3485 (method url-fetch)
3486 (uri (pypi-uri "spectra" version))
3487 (sha256
3488 (base32
3489 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3490 (build-system python-build-system)
3491 (arguments
3492 `(#:phases
3493 (modify-phases %standard-phases
3494 (replace 'check
38ec0f6a 3495 (lambda _ (invoke "nosetests" "-v"))))))
44d10b1f
RW
3496 (propagated-inputs
3497 `(("python-colormath" ,python-colormath)))
3498 (native-inputs
3499 `(("python-nose" ,python-nose)))
3500 (home-page "https://github.com/jsvine/spectra")
3501 (synopsis "Color scales and color conversion")
3502 (description
3503 "This package provides a Python library intended to make color math,
3504color scales, and color space conversion easy. It has support for:
3505
3506@enumerate
3507@item Color scales
3508@item Color ranges
3509@item Color blending
3510@item Brightening/darkening colors
3511@item Saturating/desaturating colors
3512@item Conversion to/from multiple color spaces.
3513@end enumerate\n")
3514 (license license:expat)))
3515
3516(define-public python2-spectra
3517 (package-with-python2 python-spectra))
3518
3519(define-public python-numpy-documentation
3520 (package
3521 (name "python-numpy-documentation")
3522 (version (package-version python-numpy))
3523 (source (package-source python-numpy))
3524 (build-system python-build-system)
3525 (native-inputs
3526 `(("python-matplotlib" ,python-matplotlib)
3527 ("python-numpy" ,python-numpy)
3528 ("pkg-config" ,pkg-config)
3529 ("python-sphinx" ,python-sphinx)
3530 ("python-numpydoc" ,python-numpydoc)
3531 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
3532 texlive-fonts-cm-super
3533 texlive-fonts-ec
3534 texlive-generic-ifxetex
3535 texlive-generic-pdftex
3536 texlive-latex-amsfonts
3537 texlive-latex-capt-of
3538 texlive-latex-cmap
3539 texlive-latex-environ
3540 texlive-latex-eqparbox
3541 texlive-latex-etoolbox
3542 texlive-latex-expdlist
3543 texlive-latex-fancyhdr
3544 texlive-latex-fancyvrb
3545 texlive-latex-fncychap
3546 texlive-latex-float
3547 texlive-latex-framed
3548 texlive-latex-geometry
3549 texlive-latex-graphics
3550 texlive-latex-hyperref
3551 texlive-latex-mdwtools
3552 texlive-latex-multirow
3553 texlive-latex-needspace
3554 texlive-latex-oberdiek
3555 texlive-latex-parskip
3556 texlive-latex-preview
3557 texlive-latex-tabulary
3558 texlive-latex-threeparttable
3559 texlive-latex-titlesec
3560 texlive-latex-trimspaces
3561 texlive-latex-ucs
3562 texlive-latex-upquote
3563 texlive-latex-url
3564 texlive-latex-varwidth
3565 texlive-latex-wrapfig)))
3566 ("texinfo" ,texinfo)
3567 ("perl" ,perl)
3568 ("scipy-sphinx-theme"
3569 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3570 (method git-fetch)
3571 (uri (git-reference
3572 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3573 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3574 (sha256
3575 (base32
3576 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3577 ,@(package-native-inputs python-numpy)))
3578 (arguments
3579 `(#:tests? #f ; we're only generating the documentation
3580 #:phases
3581 (modify-phases %standard-phases
3582 (delete 'build)
3583 (replace 'install
3584 (lambda* (#:key inputs outputs #:allow-other-keys)
3585 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3586 (doc (string-append
3587 data "/doc/" ,name "-"
3588 ,(package-version python-numpy)))
3589 (info-reader (string-append data "/info"))
3590 (html (string-append doc "/html"))
3591 (scipy-sphinx-theme "scipy-sphinx-theme")
3592 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3593 (pyver ,(string-append "PYVER=")))
3594
3595 ;; FIXME: this is needed to for texlive-union to generate
3596 ;; fonts, which are not found.
3597 (setenv "HOME" "/tmp")
3598
3599 (with-directory-excursion "doc"
3600 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3601 (mkdir-p html)
4fc898da
RW
3602 (invoke "make" "html" pyver)
3603 (invoke "make" "latex" "PAPER=a4" pyver)
3604 (invoke "make" "-C" "build/latex"
44d10b1f
RW
3605 "all-pdf" "PAPER=a4" pyver)
3606 ;; FIXME: Generation of the info file fails.
4fc898da 3607 ;; (invoke "make" "info" pyver)
44d10b1f
RW
3608 ;; (mkdir-p info)
3609 ;; (copy-file "build/texinfo/numpy.info"
3610 ;; (string-append info "/numpy.info"))
3611 (for-each (lambda (file)
3612 (copy-file (string-append "build/latex" file)
3613 (string-append doc file)))
3614 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3615 (with-directory-excursion "build/html"
3616 (for-each (lambda (file)
3617 (let* ((dir (dirname file))
3618 (tgt-dir (string-append html "/" dir)))
3619 (unless (equal? "." dir)
3620 (mkdir-p tgt-dir))
3621 (install-file file html)))
3622 (find-files "." ".*")))))
3623 #t)))))
3624 (home-page (package-home-page python-numpy))
3625 (synopsis "Documentation for the python-numpy package")
3626 (description (package-description python-numpy))
3627 (license (package-license python-numpy))))
3628
3629(define-public python2-numpy-documentation
3630 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3631 (package
3632 (inherit numpy-documentation)
3633 (native-inputs `(("python2-functools32" ,python2-functools32)
3634 ,@(package-native-inputs numpy-documentation))))))
3635
3636(define-public python-pygit2
3637 (package
3638 (name "python-pygit2")
dac8b275 3639 (version "0.28.2")
44d10b1f
RW
3640 (source
3641 (origin
3642 (method url-fetch)
3643 (uri (pypi-uri "pygit2" version))
3644 (sha256
dac8b275 3645 (base32 "11kzj5mjkspvplnpdb6bj8dcj6rgmkk986k8hjcklyg5yaxkz32d"))))
44d10b1f
RW
3646 (build-system python-build-system)
3647 (arguments
c3ecab0d 3648 '(#:tests? #f)) ; tests don't run correctly in our environment
44d10b1f
RW
3649 (propagated-inputs
3650 `(("python-six" ,python-six)
3651 ("python-cffi" ,python-cffi)
3652 ("libgit2" ,libgit2)
3653 ("python-tox" ,python-tox)))
3654 (native-inputs
3655 `(("python-pytest" ,python-pytest)))
3656 (home-page "https://github.com/libgit2/pygit2")
3657 (synopsis "Python bindings for libgit2")
3658 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3659library, libgit2 implements Git plumbing.")
3660 ;; GPL2.0 only, with linking exception.
3661 (license license:gpl2)))
3662
3663(define-public python2-pygit2
3664 (package-with-python2 python-pygit2))
3665
3666(define-public python-pyparsing
3667 (package
3668 (name "python-pyparsing")
6d3cff5a 3669 (version "2.3.1")
44d10b1f
RW
3670 (source
3671 (origin
3672 (method url-fetch)
3673 (uri (pypi-uri "pyparsing" version))
3674 (sha256
6d3cff5a 3675 (base32 "0yk6xl885b91dmlhlsap7x78hk2rdr879fln9anbq6k4ca42djb6"))))
44d10b1f
RW
3676 (build-system python-build-system)
3677 (outputs '("out" "doc"))
3678 (arguments
3679 `(#:tests? #f ; no test target
3680 #:phases
3681 (modify-phases %standard-phases
3682 (add-after 'install 'install-doc
3683 (lambda* (#:key outputs #:allow-other-keys)
3684 (let* ((doc (string-append (assoc-ref outputs "doc")
3685 "/share/doc/" ,name "-" ,version))
3686 (html-doc (string-append doc "/html"))
3687 (examples (string-append doc "/examples")))
3688 (mkdir-p html-doc)
3689 (mkdir-p examples)
3690 (for-each
3691 (lambda (dir tgt)
3692 (map (lambda (file)
3693 (install-file file tgt))
3694 (find-files dir ".*")))
3695 (list "docs" "htmldoc" "examples")
3696 (list doc html-doc examples))
3697 #t))))))
3698 (home-page "https://github.com/pyparsing/pyparsing")
3699 (synopsis "Python parsing class library")
3700 (description
3701 "The pyparsing module is an alternative approach to creating and
3702executing simple grammars, vs. the traditional lex/yacc approach, or the use
3703of regular expressions. The pyparsing module provides a library of classes
3704that client code uses to construct the grammar directly in Python code.")
3705 (license license:expat)))
3706
3707(define-public python2-pyparsing
3708 (package-with-python2 python-pyparsing))
3709
3710(define-public python-numpydoc
3711 (package
3712 (name "python-numpydoc")
3713 (version "0.8.0")
3714 (source
3715 (origin
3716 (method url-fetch)
3717 (uri (pypi-uri "numpydoc" version))
3718 (sha256
3719 (base32
3720 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
3721 (build-system python-build-system)
3722 (propagated-inputs
3723 `(("python-sphinx" ,python-sphinx)))
3724 (native-inputs
3725 `(("python-nose" ,python-nose)))
3726 (home-page "https://pypi.python.org/pypi/numpydoc")
3727 (synopsis
3728 "Numpy's Sphinx extensions")
3729 (description
3730 "Sphinx extension to support docstrings in Numpy format.")
3731 (license license:bsd-2)))
3732
3733(define-public python2-numpydoc
3734 (package-with-python2 python-numpydoc))
3735
3736(define-public python-numexpr
3737 (package
3738 (name "python-numexpr")
3739 (version "2.6.5")
3740 (source
3741 (origin
3742 (method url-fetch)
3743 (uri (pypi-uri "numexpr" version))
3744 (sha256
3745 (base32
3746 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3747 (build-system python-build-system)
3748 (arguments `(#:tests? #f)) ; no tests included
3749 (propagated-inputs
3750 `(("python-numpy" ,python-numpy)))
3751 (home-page "https://github.com/pydata/numexpr")
3752 (synopsis "Fast numerical expression evaluator for NumPy")
3753 (description
3754 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3755expressions that operate on arrays are accelerated and use less memory than
3756doing the same calculation in Python. In addition, its multi-threaded
3757capabilities can make use of all your cores, which may accelerate
3758computations, most specially if they are not memory-bounded (e.g. those using
3759transcendental functions).")
3760 (license license:expat)))
3761
3762(define-public python2-numexpr
3763 (package-with-python2 python-numexpr))
3764
3765(define-public python-cycler
3766 (package
3767 (name "python-cycler")
3768 (version "0.10.0")
3769 (source (origin
3770 (method url-fetch)
3771 (uri (pypi-uri "cycler" version))
3772 (sha256
3773 (base32
3774 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3775 (build-system python-build-system)
3776 (arguments
3777 ;; XXX: The current version requires 'coveralls' which we don't have.
3778 ;; Enable this for the next release which uses 'python-pytest'.
3779 '(#:tests? #f))
3780 (propagated-inputs
3781 `(("python-six" ,python-six)))
3782 (home-page "http://matplotlib.org/cycler/")
3783 (synopsis "Composable keyword argument iterator")
3784 (description
3785 "When using @code{matplotlib} and plotting more than one line, it is
3786common to want to be able to want to be able to cycle over one or more artist
3787styles; but the plotting logic can quickly become involved.
3788To address this and enable easy cycling over arbitrary @code{kwargs}, the
3789@code{Cycler} class was developed.")
3790 (license license:bsd-3)))
3791
3792(define-public python2-cycler
3793 (package-with-python2 python-cycler))
3794
3795(define-public python-colorspacious
3796 (package
3797 (name "python-colorspacious")
3798 (version "1.1.0")
3799 (source
dee92e65
TGR
3800 (origin
3801 (method git-fetch)
3802 (uri (git-reference
3803 (url "https://github.com/njsmith/colorspacious.git")
3804 (commit (string-append "v" version))))
3805 (file-name (git-file-name name version))
3806 (sha256
3807 (base32 "0g0lxqiscy5g5rq9421vv7abg0c90jzy0zmas2z3hya6k2dr5aid"))))
44d10b1f
RW
3808 (build-system python-build-system)
3809 (propagated-inputs
3810 `(("python-numpy" ,python-numpy)))
3811 (native-inputs
3812 `(("python-nose" ,python-nose)))
3813 (arguments
3814 `(#:phases
3815 (modify-phases %standard-phases
3816 (replace 'check
3817 (lambda _
c988afda 3818 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
44d10b1f
RW
3819 (home-page "https://github.com/njsmith/colorspacious")
3820 (synopsis "Python library for colorspace conversions")
3821 (description "@code{colorspacious} is a Python library that lets you
3822convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3823 (license license:expat)))
3824
3825(define-public python2-colorspacious
3826 (package-with-python2 python-colorspacious))
3827
3828(define-public python-matplotlib
3829 (package
3830 (name "python-matplotlib")
3831 (version "2.2.3")
3832 (source
3833 (origin
3834 (method url-fetch)
3835 (uri (pypi-uri "matplotlib" version))
3836 (sha256
3837 (base32
3838 "1rcc7x9ig3hpchkc4cwdvym3y451w74275fxr455zkfagrsvymbk"))))
3839 (build-system python-build-system)
3840 (propagated-inputs ; the following packages are all needed at run time
3841 `(("python-cycler" ,python-cycler)
3842 ("python-kiwisolver" ,python-kiwisolver)
3843 ("python-pyparsing" ,python-pyparsing)
3844 ("python-pygobject" ,python-pygobject)
3845 ("gobject-introspection" ,gobject-introspection)
3846 ("python-tkinter" ,python "tk")
3847 ("python-dateutil" ,python-dateutil)
3848 ("python-numpy" ,python-numpy)
3849 ("python-pillow" ,python-pillow)
3850 ("python-pytz" ,python-pytz)
3851 ("python-six" ,python-six)
44d10b1f
RW
3852 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3853 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3854 ;; object. For this reason we need to import both libraries.
3855 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3856 ("python-pycairo" ,python-pycairo)
44d10b1f
RW
3857 ("python-cairocffi" ,python-cairocffi)))
3858 (inputs
3859 `(("libpng" ,libpng)
3860 ("imagemagick" ,imagemagick)
3861 ("freetype" ,freetype)
3862 ("cairo" ,cairo)
3863 ("glib" ,glib)
3864 ;; FIXME: Add backends when available.
3865 ;("python-wxpython" ,python-wxpython)
3866 ("tcl" ,tcl)
3867 ("tk" ,tk)))
3868 (native-inputs
3869 `(("pkg-config" ,pkg-config)
3870 ("python-nose" ,python-nose)
3871 ("python-mock" ,python-mock)))
3872 (arguments
3873 `(#:phases
3874 (modify-phases %standard-phases
3875 (add-before 'build 'configure-environment
3876 (lambda* (#:key outputs inputs #:allow-other-keys)
34c2a16b
RW
3877 (let ((cairo (assoc-ref inputs "cairo")))
3878 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
44d10b1f 3879 ;; has not effect.
34c2a16b 3880 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
44d10b1f
RW
3881 (setenv "HOME" (getcwd))
3882 (call-with-output-file "setup.cfg"
3883 (lambda (port)
3884 (format port "[directories]~%
3885basedirlist = ~a,~a~%
3886 [rc_options]~%
3887backend = TkAgg~%"
3888 (assoc-ref inputs "tcl")
3889 (assoc-ref inputs "tk")))))
3890 #t)))))
3891 (home-page "http://matplotlib.org")
3892 (synopsis "2D plotting library for Python")
3893 (description
3894 "Matplotlib is a Python 2D plotting library which produces publication
3895quality figures in a variety of hardcopy formats and interactive environments
3896across platforms. Matplotlib can be used in Python scripts, the python and
3897ipython shell, web application servers, and six graphical user interface
3898toolkits.")
3899 (license license:psfl)
3900 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3901
3902(define-public python2-matplotlib
3903 (let ((matplotlib (package-with-python2
3904 (strip-python2-variant python-matplotlib))))
3905 (package (inherit matplotlib)
3906 ;; Make sure to use special packages for Python 2 instead
3907 ;; of those automatically rewritten by package-with-python2.
3908 (propagated-inputs
3909 `(("python2-pycairo" ,python2-pycairo)
3910 ("python2-backports-functools-lru-cache"
3911 ,python2-backports-functools-lru-cache)
3912 ("python2-functools32" ,python2-functools32)
3913 ("python2-pygobject-2" ,python2-pygobject-2)
3914 ("python2-subprocess32" ,python2-subprocess32)
3915 ("python2-tkinter" ,python-2 "tk")
3916 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3917 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
3918
3919(define-public python-matplotlib-documentation
3920 (package
3921 (name "python-matplotlib-documentation")
3922 (version (package-version python-matplotlib))
3923 (source (package-source python-matplotlib))
3924 (build-system python-build-system)
3925 (native-inputs
3926 `(("python-matplotlib" ,python-matplotlib)
3927 ("python-colorspacious" ,python-colorspacious)
3928 ("python-sphinx" ,python-sphinx)
3929 ("python-sphinx-gallery" ,python-sphinx-gallery)
3930 ("python-numpydoc" ,python-numpydoc)
3931 ("python-ipython" ,python-ipython)
e7a53914 3932 ("python-ipykernel" ,python-ipykernel)
44d10b1f
RW
3933 ("python-mock" ,python-mock)
3934 ("graphviz" ,graphviz)
e7a53914
RW
3935 ("texlive" ,(texlive-union (list texlive-latex-amsfonts
3936 texlive-latex-amsmath
3937 texlive-latex-enumitem
3938 texlive-latex-expdlist
3939 texlive-latex-geometry
3940 texlive-latex-preview
3941 texlive-latex-type1cm
3942 texlive-latex-ucs
3943
3944 texlive-generic-pdftex
3945
3946 texlive-fonts-amsfonts
3947 texlive-fonts-ec
3948 texlive-fonts-adobe-times
3949 texlive-fonts-txfonts)))
44d10b1f
RW
3950 ("texinfo" ,texinfo)
3951 ,@(package-native-inputs python-matplotlib)))
3952 (arguments
3953 `(#:tests? #f ; we're only generating documentation
3954 #:phases
3955 (modify-phases %standard-phases
3956 (replace 'build
3957 (lambda _
3958 (chdir "doc")
e7a53914
RW
3959 (setenv "PYTHONPATH"
3960 (string-append (getenv "PYTHONPATH")
3961 ":" (getcwd) "/../examples/units"))
44d10b1f 3962 (substitute* "conf.py"
e7a53914
RW
3963 ;; Don't use git.
3964 (("^SHA = check_output.*")
3965 (string-append "SHA = \"" ,version "\"\n"))
3966 ;; Don't fetch intersphinx files from the Internet
3967 (("^explicit_order_folders" m)
3968 (string-append "intersphinx_mapping = {}\n" m))
3969 (("'sphinx.ext.intersphinx',") "")
3970 ;; Disable URL embedding which requires internet access.
3971 (("'https://docs.scipy.org/doc/numpy'") "None")
3972 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
3973 (invoke "make"
3974 "SPHINXBUILD=sphinx-build"
3975 "SPHINXOPTS=" ; don't abort on warnings
3976 "html" "texinfo")))
44d10b1f
RW
3977 (replace 'install
3978 (lambda* (#:key inputs outputs #:allow-other-keys)
3979 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3980 (doc (string-append data "/doc/python-matplotlib-" ,version))
3981 (info (string-append data "/info"))
3982 (html (string-append doc "/html")))
3983 (mkdir-p html)
3984 (mkdir-p info)
3985 (copy-recursively "build/html" html)
3986 (symlink (string-append html "/_images")
3987 (string-append info "/matplotlib-figures"))
3988 (with-directory-excursion "build/texinfo"
3989 (substitute* "matplotlib.texi"
3990 (("@image\\{([^,]*)" all file)
3991 (string-append "@image{matplotlib-figures/" file)))
3992 (symlink (string-append html "/_images")
3993 "./matplotlib-figures")
e7a53914
RW
3994 (invoke "makeinfo" "--no-split"
3995 "-o" "matplotlib.info" "matplotlib.texi"))
3996 (install-file "build/texinfo/matplotlib.info" info))
44d10b1f
RW
3997 #t)))))
3998 (home-page (package-home-page python-matplotlib))
3999 (synopsis "Documentation for the python-matplotlib package")
4000 (description (package-description python-matplotlib))
4001 (license (package-license python-matplotlib))))
4002
4003(define-public python2-matplotlib-documentation
4004 (package-with-python2 python-matplotlib-documentation))
4005
55dae98f
RW
4006(define-public python-matplotlib-venn
4007 (package
4008 (name "python-matplotlib-venn")
4009 (version "0.11.5")
4010 (source
4011 (origin
4012 (method url-fetch)
4013 (uri (pypi-uri "matplotlib-venn" version ".zip"))
4014 (sha256
4015 (base32
4016 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
4017 (build-system python-build-system)
4018 (arguments '(#:tests? #f)) ; tests are not included
4019 (propagated-inputs
4020 `(("python-matplotlib" ,python-matplotlib)
4021 ("python-numpy" ,python-numpy)
4022 ("python-scipy" ,python-scipy)))
4023 (native-inputs
4024 `(("unzip" ,unzip)))
4025 (home-page "https://github.com/konstantint/matplotlib-venn")
4026 (synopsis "Plot area-proportional Venn diagrams")
4027 (description
4028 "This package provides tools for plotting area-proportional two- and
4029three-way Venn diagrams in @code{matplotlib}.")
4030 (license license:expat)))
4031
44d10b1f
RW
4032(define-public python2-pysnptools
4033 (package
4034 (name "python2-pysnptools")
5d1ade85 4035 (version "0.3.13")
44d10b1f
RW
4036 (source
4037 (origin
4038 (method url-fetch)
5d1ade85 4039 (uri (pypi-uri "pysnptools" version))
44d10b1f
RW
4040 (sha256
4041 (base32
5d1ade85 4042 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
44d10b1f
RW
4043 (build-system python-build-system)
4044 (arguments
5d1ade85
RW
4045 `(#:python ,python-2 ; only Python 2.7 is supported
4046 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
44d10b1f
RW
4047 (propagated-inputs
4048 `(("python2-numpy" ,python2-numpy)
4049 ("python2-scipy" ,python2-scipy)
4050 ("python2-pandas" ,python2-pandas)))
44d10b1f 4051 (native-inputs
5d1ade85 4052 `(("python2-cython" ,python2-cython)))
1b66989b 4053 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
44d10b1f
RW
4054 (synopsis "Library for reading and manipulating genetic data")
4055 (description
4056 "PySnpTools is a library for reading and manipulating genetic data. It
4057can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4058those files. It can also efficiently manipulate ranges of integers using set
4059operators such as union, intersection, and difference.")
4060 (license license:asl2.0)))
4061
4062(define-public python-scipy
4063 (package
4064 (name "python-scipy")
5cfc1632 4065 (version "1.2.2")
44d10b1f
RW
4066 (source
4067 (origin
4068 (method url-fetch)
4069 (uri (pypi-uri "scipy" version))
4070 (sha256
4071 (base32
5cfc1632 4072 "1cgvgin8fvckv96hjh3ikmwkra5rif51bdb75ifzf7xbil5iwcx4"))))
44d10b1f
RW
4073 (build-system python-build-system)
4074 (propagated-inputs
4075 `(("python-numpy" ,python-numpy)
4076 ("python-matplotlib" ,python-matplotlib)
4077 ("python-pyparsing" ,python-pyparsing)))
4078 (inputs
4079 `(("lapack" ,lapack)
4080 ("openblas" ,openblas)))
4081 (native-inputs
4082 `(("python-cython" ,python-cython)
4083 ("python-pytest" ,python-pytest)
4084 ("python-sphinx" ,python-sphinx)
4085 ("python-numpydoc" ,python-numpydoc)
4086 ("gfortran" ,gfortran)
4087 ("perl" ,perl)
4088 ("which" ,which)))
4089 (outputs '("out" "doc"))
4090 (arguments
4091 `(#:phases
4092 (modify-phases %standard-phases
4093 (add-after 'unpack 'disable-broken-tests
4094 (lambda _
4095 (substitute* "scipy/sparse/linalg/dsolve/tests/test_linsolve.py"
4096 (("^( +)def test_threads_parallel\\(self\\):" m indent)
4097 (string-append indent
4098 "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
4099 m)))
4100 (substitute* "scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py"
4101 (("^def test_parallel_threads\\(\\):" m)
4102 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
4103 m)))
4104 #t))
4105 (add-before 'build 'configure-openblas
4106 (lambda* (#:key inputs #:allow-other-keys)
4107 (call-with-output-file "site.cfg"
4108 (lambda (port)
4109 (format port
4110 "[blas]
4111libraries = openblas
4112library_dirs = ~a/lib
4113include_dirs = ~a/include
4114
4115# backslash-n to make emacs happy
4116\n[atlas]
4117library_dirs = ~a/lib
4118atlas_libs = openblas
4119"
4120 (assoc-ref inputs "openblas")
4121 (assoc-ref inputs "openblas")
4122 (assoc-ref inputs "openblas"))))
4123 #t))
4124 (add-after 'install 'install-doc
4125 (lambda* (#:key inputs outputs #:allow-other-keys)
4126 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4127 (doc (string-append data "/doc/" ,name "-" ,version))
4128 (html (string-append doc "/html"))
4129 (pyver ,(string-append "PYVER=" (version-major+minor
4130 (package-version python))))
4131 ;; By default it tries to run sphinx-build through the Python
4132 ;; interpreter which won't work with our shell wrapper.
4133 (sphinxbuild "SPHINXBUILD=LANG=C sphinx-build"))
4134 ;; Make installed package available for building the
4135 ;; documentation
4136 (add-installed-pythonpath inputs outputs)
4137 (with-directory-excursion "doc"
4138 ;; Fix generation of images for mathematical expressions.
4139 (substitute* (find-files "source" "conf\\.py")
4140 (("pngmath_use_preview = True")
4141 "pngmath_use_preview = False"))
4142 (mkdir-p html)
4143 (invoke "make" "html" pyver sphinxbuild)
4144 (with-directory-excursion "build/html"
4145 (for-each (lambda (file)
4146 (let* ((dir (dirname file))
4147 (tgt-dir (string-append html "/" dir)))
4148 (install-file file html)))
4149 (find-files "." ".*")))))
4150 #t))
4151 ;; Tests can only be run after the library has been installed and not
4152 ;; within the source directory.
4153 (delete 'check)
4154 (add-after 'install 'check
4155 (lambda* (#:key inputs outputs #:allow-other-keys)
4156 (add-installed-pythonpath inputs outputs)
4157 (with-directory-excursion "/tmp"
4158 (invoke "python" "-c"
4159 "import scipy; scipy.test(verbose=2)")))))))
4160 (home-page "https://www.scipy.org/")
4161 (synopsis "The Scipy library provides efficient numerical routines")
4162 (description "The SciPy library is one of the core packages that make up
4163the SciPy stack. It provides many user-friendly and efficient numerical
4164routines such as routines for numerical integration and optimization.")
4165 (properties `((python2-variant . ,(delay python2-scipy))))
4166 (license license:bsd-3)))
4167
4168(define-public python2-scipy
4169 (package-with-python2
4170 (strip-python2-variant python-scipy)))
4171
4172(define-public python-socksipy-branch
4173 (package
4174 (name "python-socksipy-branch")
4175 (version "1.01")
4176 (source
4177 (origin
4178 (method url-fetch)
4179 (uri (pypi-uri "SocksiPy-branch" version))
4180 (sha256
4181 (base32
4182 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4183 (build-system python-build-system)
4184 (arguments
4185 `(#:tests? #f)) ; There are no tests
4186 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4187 (synopsis "Python SOCKS module")
4188 (description
4189 "SocksiPy - A Python SOCKS client module. It provides a
4190socket-like interface that supports connections to any TCP
4191service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4192The original version was developed by Dan Haim, this is a
4193branch created by Mario Vilas to address some open issues,
4194as the original project seems to have been abandoned circa 2007.")
4195 (license license:bsd-3)))
4196
4197(define-public python2-socksipy-branch
4198 (package-with-python2 python-socksipy-branch))
4199
4200(define-public python-pycodestyle
4201 (package
4202 (name "python-pycodestyle")
d16ef28b 4203 (version "2.5.0")
44d10b1f 4204 (source
ba88eea2
RW
4205 (origin
4206 (method url-fetch)
4207 (uri (pypi-uri "pycodestyle" version))
4208 (sha256
4209 (base32
d16ef28b 4210 "0v4prb05n21bm8650v0a01k1nyqjdmkrsm3zycfxh2j5k9n962p4"))))
44d10b1f
RW
4211 (build-system python-build-system)
4212 (home-page "https://pycodestyle.readthedocs.io/")
4213 (synopsis "Python style guide checker")
4214 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4215Python code against some of the style conventions in
4216@url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4217 (license license:expat)))
4218
4219(define-public python2-pycodestyle
4220 (package-with-python2 python-pycodestyle))
4221
4222(define-public python-multidict
4223 (package
4224 (name "python-multidict")
4225 (version "4.2.0")
4226 (source
4227 (origin
4228 (method url-fetch)
4229 (uri (pypi-uri "multidict" version))
4230 (sha256
4231 (base32
4232 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
4233 (build-system python-build-system)
4234 (native-inputs
4235 `(("python-pytest" ,python-pytest)
4236 ("python-pytest-runner" ,python-pytest-runner)))
4237 (home-page "https://github.com/aio-libs/multidict/")
4238 (synopsis "Multidict implementation")
4239 (description "Multidict is dict-like collection of key-value pairs
4240where key might be occurred more than once in the container.")
4241 (license license:asl2.0)))
4242
4243(define-public python-orderedmultidict
4244 (package
4245 (name "python-orderedmultidict")
4246 (version "0.7.11")
4247 (source
4248 (origin
4249 (method url-fetch)
4250 (uri (pypi-uri "orderedmultidict" version))
4251 (sha256
4252 (base32
4253 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4254 (build-system python-build-system)
4255 (arguments
4256 `(#:phases
4257 (modify-phases %standard-phases
4258 (add-after 'unpack 'fix-tests
4259 (lambda _
4260 ;; The package uses nosetest for running the tests.
4261 ;; Adding this initfile allows to run the test suite
4262 ;; without requiring nosetest.
d1c4f329
RW
4263 (with-output-to-file "tests/__init__.py" newline)
4264 #t)))))
44d10b1f
RW
4265 (propagated-inputs
4266 `(("python-six" ,python-six)))
4267 (native-inputs
4268 `(("python-pycodestyle" ,python-pycodestyle)))
4269 (home-page "https://github.com/gruns/orderedmultidict")
4270 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4271 (description "This package contains a library for ordered multivalue
4272dictionaries. A multivalue dictionary is a dictionary that can store
4273multiple values for the same key. An ordered multivalue dictionary is a
4274multivalue dictionary that retains the order of insertions and deletions.")
4275 (license license:unlicense)))
4276
4277(define-public python2-orderedmultidict
4278 (package-with-python2 python-orderedmultidict))
4279
4280(define-public python-autopep8
4281 (package
4282 (name "python-autopep8")
4283 (version "1.3.5")
4284 (source
4285 (origin
4286 (method url-fetch)
4287 (uri (pypi-uri "autopep8" version))
4288 (sha256
4289 (base32
4290 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
4291 (build-system python-build-system)
4292 (propagated-inputs
4293 `(("python-pycodestyle" ,python-pycodestyle)))
4294 (home-page "https://github.com/hhatto/autopep8")
4295 (synopsis "Format Python code according to the PEP 8 style guide")
4296 (description
4297 "@code{autopep8} automatically formats Python code to conform to
4298the PEP 8 style guide. It uses the pycodestyle utility to determine
4299what parts of the code needs to be formatted. @code{autopep8} is
4300capable of fixing most of the formatting issues that can be reported
4301by pycodestyle.")
4302 (license (license:non-copyleft
4303 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4304
4305(define-public python2-autopep8
4306 (package-with-python2 python-autopep8))
4307
4308(define-public python-distutils-extra
4309 (package
4310 (name "python-distutils-extra")
4311 (version "2.38")
4312 (source
4313 (origin
4314 (method url-fetch)
4315 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4316 version "/+download/python-distutils-extra-"
4317 version ".tar.gz"))
4318 (sha256
4319 (base32
4320 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4321 (build-system python-build-system)
4322 (home-page "https://launchpad.net/python-distutils-extra/")
4323 (synopsis "Enhancements to Python's distutils")
4324 (description
4325 "The python-distutils-extra module enables you to easily integrate
4326gettext support, themed icons, and scrollkeeper-based documentation into
4327Python's distutils.")
4328 (license license:gpl2)))
4329
4330(define-public python2-distutils-extra
4331 (package-with-python2 python-distutils-extra))
4332
4333(define-public python2-elib.intl
4334 (package
4335 (name "python2-elib.intl")
4336 (version "0.0.3")
4337 (source
4338 (origin
4339 ;; This project doesn't tag releases or publish tarballs, so we take
4340 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4341 (method git-fetch)
4342 (uri (git-reference
4343 (url "https://github.com/dieterv/elib.intl.git")
4344 (commit "d09997cfef")))
4345 (file-name (string-append name "-" version "-checkout"))
4346 (sha256
4347 (base32
4348 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4349 (build-system python-build-system)
4350 (arguments
4351 ;; incompatible with Python 3 (exception syntax)
4352 `(#:python ,python-2
4353 #:tests? #f))
4354 (home-page "https://github.com/dieterv/elib.intl")
4355 (synopsis "Enhanced internationalization for Python")
4356 (description
4357 "The elib.intl module provides enhanced internationalization (I18N)
4358services for your Python modules and applications.")
4359 (license license:lgpl3+)))
4360
4361(define-public python-olefile
4362 (package
4363 (name "python-olefile")
5bef0f10 4364 (version "0.46")
44d10b1f
RW
4365 (source
4366 (origin
4367 (method url-fetch)
5bef0f10
MB
4368 (uri (string-append "https://github.com/decalage2/olefile/releases/"
4369 "download/v" version "/olefile-" version ".tar.gz"))
44d10b1f
RW
4370 (file-name (string-append name "-" version ".tar.gz"))
4371 (sha256
4372 (base32
5bef0f10 4373 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
44d10b1f 4374 (build-system python-build-system)
5bef0f10 4375 (home-page "https://www.decalage.info/python/olefileio")
44d10b1f
RW
4376 (synopsis "Read and write Microsoft OLE2 files.")
4377 (description
4378 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
4379Storage or Compound Document, Microsoft Office). It is an improved version of
4380the OleFileIO module from PIL, the Python Image Library.")
4381 (license license:bsd-3)))
4382
4383(define-public python2-olefile
4384 (package-with-python2 python-olefile))
4385
4386(define-public python-pillow
4387 (package
4388 (name "python-pillow")
0c6de725 4389 (version "6.1.0")
44d10b1f
RW
4390 (source
4391 (origin
4392 (method url-fetch)
4393 (uri (pypi-uri "Pillow" version))
4394 (sha256
4395 (base32
0c6de725 4396 "1pnrsz0f0n0c819v1pdr8j6rm8xvhc9f3kh1fv9xpdp9n5ygf108"))))
44d10b1f
RW
4397 (build-system python-build-system)
4398 (native-inputs
4399 `(("python-pytest" ,python-pytest)))
4400 (inputs
4401 `(("freetype" ,freetype)
4402 ("lcms" ,lcms)
4403 ("zlib" ,zlib)
4404 ("libjpeg" ,libjpeg)
4405 ("openjpeg" ,openjpeg)
4406 ("libtiff" ,libtiff)
4407 ("libwebp" ,libwebp)))
4408 (propagated-inputs
4409 `(("python-olefile" ,python-olefile)))
4410 (arguments
4411 `(#:phases
4412 (modify-phases %standard-phases
4413 (add-after 'unpack 'patch-ldconfig
4414 (lambda _
4415 (substitute* "setup.py"
4416 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
4417 (delete 'check) ; We must run checks after python-pillow is installed.
4418 (add-after 'install 'check-installed
4419 (lambda* (#:key outputs inputs #:allow-other-keys)
4420 (begin
4421 (setenv "HOME" (getcwd))
4422 ;; Make installed package available for running the tests.
4423 (add-installed-pythonpath inputs outputs)
4424 (invoke "python" "selftest.py" "--installed")
4425 (invoke "python" "-m" "pytest" "-vv")))))))
4426 (home-page "https://python-pillow.org")
4427 (synopsis "Fork of the Python Imaging Library")
4428 (description
4429 "The Python Imaging Library adds image processing capabilities to your
4430Python interpreter. This library provides extensive file format support, an
4431efficient internal representation, and fairly powerful image processing
4432capabilities. The core image library is designed for fast access to data
4433stored in a few basic pixel formats. It should provide a solid foundation for
4434a general image processing tool.")
4435 (license (license:x11-style
4436 "http://www.pythonware.com/products/pil/license.htm"
4437 "The PIL Software License"))))
4438
4439(define-public python2-pillow
4440 (package-with-python2 python-pillow))
4441
4442(define-public python-pycparser
4443 (package
4444 (name "python-pycparser")
c6c0940e 4445 (version "2.19")
44d10b1f
RW
4446 (source
4447 (origin
4448 (method url-fetch)
4449 (uri (pypi-uri "pycparser" version))
4450 (sha256
4451 (base32
c6c0940e 4452 "1cr5dcj9628lkz1qlwq3fv97c25363qppkmcayqvd05dpy573259"))))
44d10b1f
RW
4453 (outputs '("out" "doc"))
4454 (build-system python-build-system)
4455 (native-inputs
4456 `(("pkg-config" ,pkg-config)))
4457 (arguments
4458 `(#:phases
4459 (modify-phases %standard-phases
4460 (replace 'check
4461 (lambda _
4462 (with-directory-excursion "tests"
acb75c03
RW
4463 (invoke "python" "all_tests.py"))
4464 #t))
44d10b1f
RW
4465 (add-after 'install 'install-doc
4466 (lambda* (#:key outputs #:allow-other-keys)
4467 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4468 (doc (string-append data "/doc/" ,name "-" ,version))
4469 (examples (string-append doc "/examples")))
4470 (mkdir-p examples)
4471 (for-each (lambda (file)
4472 (copy-file (string-append "." file)
4473 (string-append doc file)))
4474 '("/README.rst" "/CHANGES" "/LICENSE"))
c6c0940e
MB
4475 (copy-recursively "examples" examples)
4476 #t))))))
44d10b1f
RW
4477 (home-page "https://github.com/eliben/pycparser")
4478 (synopsis "C parser in Python")
4479 (description
4480 "Pycparser is a complete parser of the C language, written in pure Python
4481using the PLY parsing library. It parses C code into an AST and can serve as
4482a front-end for C compilers or analysis tools.")
4483 (license license:bsd-3)))
4484
4485(define-public python2-pycparser
4486 (package-with-python2 python-pycparser))
4487
4488(define-public python-pywavelets
4489 (package
4490 (name "python-pywavelets")
4491 (version "1.0.1")
4492 (home-page "https://github.com/PyWavelets/pywt")
4493 (source (origin
4494 (method url-fetch)
4495 (uri (pypi-uri "PyWavelets" version))
4496 (sha256
4497 (base32
4498 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
4499 (build-system python-build-system)
4500 (arguments
4501 '(#:modules ((ice-9 ftw)
4502 (srfi srfi-1)
4503 (srfi srfi-26)
4504 (guix build utils)
4505 (guix build python-build-system))
4506 #:phases (modify-phases %standard-phases
4507 (replace 'check
4508 (lambda _
4509 (let ((cwd (getcwd))
4510 (libdir (find (cut string-prefix? "lib." <>)
4511 (scandir "build"))))
4512 (with-directory-excursion (string-append cwd "/build/" libdir)
4513 (invoke "nosetests" "-v" "."))))))))
4514 (native-inputs
4515 `(("python-matplotlib" ,python-matplotlib) ;for tests
4516 ("python-nose" ,python-nose)))
4517 (propagated-inputs
4518 `(("python-numpy" ,python-numpy)))
4519 (synopsis "Wavelet transforms in Python")
4520 (description
4521 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
4522mathematical basis functions that are localized in both time and frequency.
4523Wavelet transforms are time-frequency transforms employing wavelets. They are
4524similar to Fourier transforms, the difference being that Fourier transforms are
4525localized only in frequency instead of in time and frequency.")
4526 (license license:expat)))
4527
4528(define-public python2-pywavelets
4529 (package-with-python2 python-pywavelets))
4530
4531(define-public python-xcffib
4532 (package
4533 (name "python-xcffib")
4534 (version "0.6.0")
4535 (source
4536 (origin
4537 (method url-fetch)
4538 (uri (pypi-uri "xcffib" version))
4539 (sha256
4540 (base32
4541 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
4542 (build-system python-build-system)
4543 (inputs
4544 `(("libxcb" ,libxcb)))
4545 (propagated-inputs
4546 `(("python-cffi" ,python-cffi) ; used at run time
4547 ("python-six" ,python-six)))
4548 (arguments
4549 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4550 #:tests? #f
4551 #:phases
4552 (modify-phases %standard-phases
4553 (add-after 'unpack 'fix-libxcb-path
4554 (lambda* (#:key inputs #:allow-other-keys)
4555 (let ((libxcb (assoc-ref inputs "libxcb")))
4556 (substitute* '("xcffib/__init__.py")
4557 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4558 #t)))
4559 (add-after 'install 'install-doc
4560 (lambda* (#:key outputs #:allow-other-keys)
4561 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4562 "/doc/" ,name "-" ,version)))
4563 (mkdir-p doc)
4564 (copy-file "README.md"
4565 (string-append doc "/README.md"))
4566 #t))))))
4567 (home-page "https://github.com/tych0/xcffib")
4568 (synopsis "XCB Python bindings")
4569 (description
4570 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4571support for Python 3 and PyPy. It is based on cffi.")
4572 (license license:expat)))
4573
4574(define-public python2-xcffib
4575 (package-with-python2 python-xcffib))
4576
4577(define-public python-cairocffi
4578 (package
4579 (name "python-cairocffi")
4580 (version "0.9.0")
4581 (source
4582 (origin
4583 (method url-fetch)
4584 (uri (pypi-uri "cairocffi" version))
4585 (sha256
4586 (base32
4587 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
4588 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
4589 (build-system python-build-system)
4590 (outputs '("out" "doc"))
4591 (inputs
4592 `(("glib" ,glib)
4593 ("gtk+" ,gtk+)
4594 ("gdk-pixbuf" ,gdk-pixbuf)
4595 ("cairo" ,cairo)
4596 ("pango" ,pango)))
4597 (native-inputs
4598 `(("pkg-config" ,pkg-config)
4599 ("python-pytest" ,python-pytest)
4600 ("python-pytest-cov" ,python-pytest-cov)
4601 ("python-pytest-runner" ,python-pytest-runner)
4602 ("python-sphinx" ,python-sphinx)
4603 ("python-docutils" ,python-docutils)))
4604 (propagated-inputs
4605 `(("python-xcffib" ,python-xcffib))) ; used at run time
4606 (arguments
4607 `(#:phases
4608 (modify-phases %standard-phases
4609 (add-after 'unpack 'patch-paths
4610 (lambda* (#:key inputs outputs #:allow-other-keys)
4611 (substitute* (find-files "." "\\.py$")
4612 (("dlopen\\(ffi, 'cairo'")
4613 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
4614 "/lib/libcairo.so.2'"))
4615 (("dlopen\\(ffi, 'gdk-3'")
4616 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
4617 "/lib/libgtk-3.so.0'"))
4618 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
4619 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
4620 "/lib/libgdk_pixbuf-2.0.so.0'"))
4621 (("dlopen\\(ffi, 'glib-2.0'")
4622 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4623 "/lib/libglib-2.0.so.0'"))
4624 (("dlopen\\(ffi, 'gobject-2.0'")
4625 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4626 "/lib/libgobject-2.0.so.0'"))
4627 (("dlopen\\(ffi, 'pangocairo-1.0'")
4628 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4629 "/lib/libpangocairo-1.0.so.0'"))
4630 (("dlopen\\(ffi, 'pango-1.0'")
4631 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4632 "/lib/libpango-1.0.so.0'")))
4633 #t))
4634 (add-after 'install 'install-doc
4635 (lambda* (#:key inputs outputs #:allow-other-keys)
4636 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4637 (doc (string-append data "/doc/" ,name "-" ,version))
4638 (html (string-append doc "/html")))
4639 (setenv "LD_LIBRARY_PATH"
4640 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4641 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4642 (setenv "LANG" "en_US.UTF-8")
4643 (mkdir-p html)
4644 (for-each (lambda (file)
4645 (copy-file (string-append "." file)
4646 (string-append doc file)))
4647 '("/README.rst" "/CHANGES" "/LICENSE"))
4648 (system* "python" "setup.py" "build_sphinx")
4649 (copy-recursively "docs/_build/html" html)
4650 #t))))))
4651 (home-page "https://github.com/Kozea/cairocffi")
4652 (synopsis "Python bindings and object-oriented API for Cairo")
4653 (description
4654 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4655Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4656graphics library with support for multiple backends including image buffers,
4657PNG, PostScript, PDF, and SVG file output.")
4658 (license license:bsd-3)))
4659
4660(define-public python2-cairocffi
4661 (package-with-python2 python-cairocffi))
4662
4663(define-public python-decorator
4664 (package
4665 (name "python-decorator")
4666 (version "4.3.0")
4667 (source
4668 (origin
4669 (method url-fetch)
4670 (uri (pypi-uri "decorator" version))
4671 (sha256
4672 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4673 (build-system python-build-system)
4674 (home-page "https://pypi.python.org/pypi/decorator/")
4675 (synopsis "Python module to simplify usage of decorators")
4676 (description
4677 "The aim of the decorator module is to simplify the usage of decorators
4678for the average programmer, and to popularize decorators usage giving examples
4679of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4680etc. The core of this module is a decorator factory.")
4681 (license license:expat)))
4682
4683(define-public python2-decorator
4684 (package-with-python2 python-decorator))
4685
4686(define-public python-drmaa
4687 (package
4688 (name "python-drmaa")
4689 (version "0.7.7")
4690 (source
4691 (origin
4692 (method url-fetch)
4693 (uri (pypi-uri "drmaa" version))
4694 (sha256
4695 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4696 (build-system python-build-system)
4697 ;; The test suite requires libdrmaa which is provided by the cluster
4698 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4699 ;; should be set to the path of the libdrmaa library.
4700 (arguments '(#:tests? #f))
4701 (native-inputs
4702 `(("python-nose" ,python-nose)))
4703 (home-page "https://pypi.python.org/pypi/drmaa")
4704 (synopsis "Python bindings for the DRMAA library")
4705 (description
4706 "A Python package for Distributed Resource Management (DRM) job
4707submission and control. This package is an implementation of the DRMAA 1.0
4708Python language binding specification.")
4709 (license license:bsd-3)))
4710
4711(define-public python2-drmaa
4712 (package-with-python2 python-drmaa))
4713
4714(define-public python-grako
4715 (package
4716 (name "python-grako")
4717 (version "3.99.9")
4718 (source
4719 (origin
4720 (method url-fetch)
4721 (uri
4722 (pypi-uri "grako" version ".zip"))
4723 (sha256
4724 (base32
4725 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4726 (build-system python-build-system)
4727 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4728 (native-inputs
4729 `(("unzip" ,unzip)
4730 ("python-pytest" ,python-pytest)
4731 ("python-pytest-runner" ,python-pytest-runner)))
4732 (home-page "https://bitbucket.org/neogeny/grako")
4733 (synopsis "EBNF parser generator")
4734 (description
4735 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4736memoizing PEG/Packrat parser in Python.")
4737 (license license:bsd-3)))
4738
4739(define-public python2-grako
4740 (package-with-python2 python-grako))
4741
4742(define-public python-gridmap
4743 (package
4744 (name "python-gridmap")
4745 (version "0.13.0")
4746 (source
4747 (origin
768fea0f
TGR
4748 (method git-fetch)
4749 (uri (git-reference
4750 (url "https://github.com/pygridtools/gridmap.git")
4751 (commit (string-append "v" version))))
4752 (file-name (git-file-name name version))
44d10b1f 4753 (sha256
768fea0f 4754 (base32 "1478lbwsr1w24cii2x01m2910fvh8r43ghnb78nc972a96hqiknm"))))
44d10b1f
RW
4755 (build-system python-build-system)
4756 (arguments
4757 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4758 (propagated-inputs
4759 `(("python-psutil" ,python-psutil)
4760 ("python-drmaa" ,python-drmaa)
4761 ("python-pyzmq" ,python-pyzmq)))
4762 (home-page "https://github.com/pygridtools/gridmap")
4763 (synopsis "Create jobs on a cluster directly from Python")
4764 (description
4765 "Gridmap is a Python package to allow you to easily create jobs on the
4766cluster directly from Python. You can directly map Python functions onto the
4767cluster without needing to write any wrapper code yourself.")
4768 (license license:gpl3+)))
4769
4770(define-public python2-gridmap
4771 (package-with-python2 python-gridmap))
4772
4773(define-public python-honcho
4774 (package
4775 (name "python-honcho")
4776 (version "1.0.1")
4777 (source
4778 (origin
8524d130
TGR
4779 (method git-fetch)
4780 (uri (git-reference
4781 (url "https://github.com/nickstenning/honcho.git")
4782 (commit (string-append "v" version))))
4783 (file-name (git-file-name name version))
44d10b1f 4784 (sha256
8524d130 4785 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
44d10b1f
RW
4786 (build-system python-build-system)
4787 (native-inputs
4788 `(("python-pytest" ,python-pytest)
4789 ("python-mock" ,python-mock)
4790 ("python-tox" ,python-tox)
4791 ("which" ,which))) ;for tests
4792 (propagated-inputs
4793 `(("python-jinja2" ,python-jinja2)))
4794 (arguments
4795 `(#:phases
4796 (modify-phases %standard-phases
4797 (delete 'check)
4798 (add-after 'install 'check
4799 (lambda* (#:key outputs inputs #:allow-other-keys)
4800 ;; fix honcho path in testsuite
4801 (substitute* "tests/conftest.py"
4802 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4803 "/bin/honcho" "'")))
4804 ;; It's easier to run tests after install.
4805 ;; Make installed package available for running the tests
4806 (add-installed-pythonpath inputs outputs)
95b707fb 4807 (invoke "py.test" "-v"))))))
44d10b1f
RW
4808 (home-page "https://github.com/nickstenning/honcho")
4809 (synopsis "Manage Procfile-based applications")
4810 (description
4811 "A Procfile is a file which describes how to run an application
50fceab0 4812consisting of several processes. honcho starts all listed processes.
44d10b1f
RW
4813The output of all running processes is collected by honcho and
4814displayed.")
4815 (license license:expat)))
4816
4817(define-public python2-honcho
4818 (package-with-python2 python-honcho))
4819
4820(define-public python-pexpect
4821 (package
4822 (name "python-pexpect")
4823 (version "4.6.0")
4824 (source
4825 (origin
4826 (method url-fetch)
4827 (uri (pypi-uri "pexpect" version))
4828 (sha256
4829 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
4830 (build-system python-build-system)
4831 (arguments
4832 `(#:phases
4833 (modify-phases %standard-phases
4834 (add-before 'check 'prepare-tests
4835 (lambda _
4836 (substitute* (find-files "tests")
4837 (("/bin/ls") (which "ls"))
4838 (("/bin/echo") (which "echo"))
4839 (("/bin/which") (which "which"))
4840 ;; Many tests try to use the /bin directory which
4841 ;; is not present in the build environment.
4842 ;; Use one that's non-empty and unlikely to change.
4843 (("/bin'") "/dev'"))
4844 ;; XXX: Socket connection test gets "Connection reset by peer".
4845 ;; Why does it not work? Delete for now.
4846 (delete-file "tests/test_socket.py")
4847 #t))
4848 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
4849 (native-inputs
4850 `(("python-nose" ,python-nose)
4851 ("python-pytest" ,python-pytest)
4852 ("man-db" ,man-db)
4853 ("which" ,which)
4854 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
4855 (propagated-inputs
4856 `(("python-ptyprocess" ,python-ptyprocess)))
4857 (home-page "http://pexpect.readthedocs.org/")
4858 (synopsis "Controlling interactive console applications")
4859 (description
4860 "Pexpect is a pure Python module for spawning child applications;
4861controlling them; and responding to expected patterns in their output.
4862Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4863child application and control it as if a human were typing commands.")
4864 (license license:isc)))
4865
4866(define-public python2-pexpect
4867 (package-with-python2 python-pexpect))
4868
4869(define-public python-setuptools-scm
4870 (package
4871 (name "python-setuptools-scm")
85092643 4872 (version "3.2.0")
44d10b1f
RW
4873 (source (origin
4874 (method url-fetch)
4875 (uri (pypi-uri "setuptools_scm" version))
4876 (sha256
4877 (base32
85092643 4878 "0n3knn3p1sqlx31k2lahn7z9bacvlv8nhlfidj77vz50bxqlgasj"))))
44d10b1f
RW
4879 (build-system python-build-system)
4880 (home-page "https://github.com/pypa/setuptools_scm/")
4881 (synopsis "Manage Python package versions in SCM metadata")
4882 (description
4883 "Setuptools_scm handles managing your Python package versions in
4884@dfn{software configuration management} (SCM) metadata instead of declaring
4885them as the version argument or in a SCM managed file.")
4886 (license license:expat)))
4887
4888(define-public python2-setuptools-scm
4889 (package-with-python2 python-setuptools-scm))
4890
bb74ea09
RW
4891(define-public python-pathlib2
4892 (package
4893 (name "python-pathlib2")
4894 (version "2.3.3")
4895 (source
4896 (origin
4897 (method url-fetch)
4898 (uri (pypi-uri "pathlib2" version))
4899 (sha256
4900 (base32
4901 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
4902 (build-system python-build-system)
4903 (propagated-inputs
4904 `(("python-scandir" ,python-scandir)
4905 ("python-six" ,python-six)))
4906 (home-page "https://pypi.python.org/pypi/pathlib2/")
4907 (synopsis "Object-oriented filesystem paths")
4908 (description "The goal of pathlib2 is to provide a backport of the
4909standard @code{pathlib} module which tracks the standard library module, so
4910all the newest features of the standard @code{pathlib} can be used also on
4911older Python versions.")
4912 (license license:expat)))
4913
15b65617
RW
4914(define-public python-importlib-metadata
4915 (package
4916 (name "python-importlib-metadata")
4917 (version "0.18")
4918 (source
4919 (origin
4920 (method url-fetch)
4921 (uri (pypi-uri "importlib_metadata" version))
4922 (sha256
4923 (base32
4924 "1nqj6vj2z4byi8flzf2lbldhqgicsz9mkpv4k69kjd8p8qxy4vnb"))))
4925 (build-system python-build-system)
4926 (propagated-inputs
4927 `(("python-configparser" ,python-configparser)
4928 ("python-contextlib2" ,python-contextlib2)
4929 ("python-docutils" ,python-docutils)
4930 ("python-pathlib2" ,python-pathlib2)
4931 ("python-rst.linker" ,python-rst.linker)
4932 ("python-zipp" ,python-zipp)))
4933 (native-inputs
4934 `(("python-setuptools-scm" ,python-setuptools-scm)
4935 ("python-sphinx" ,python-sphinx)))
4936 (home-page "https://importlib-metadata.readthedocs.io/")
4937 (synopsis "Read metadata from Python packages")
4938 (description
4939 "@code{importlib_metadata} is a library which provides an API for
4940accessing an installed Python package's metadata, such as its entry points or
4941its top-level name. This functionality intends to replace most uses of
4942@code{pkg_resources} entry point API and metadata API. Along with
4943@code{importlib.resources} in Python 3.7 and newer, this can eliminate the
4944need to use the older and less efficient @code{pkg_resources} package.")
4945 (license license:asl2.0)))
4946
37c173d1
RW
4947(define-public python-jaraco-packaging
4948 (package
4949 (name "python-jaraco-packaging")
4950 (version "6.1")
4951 (source
4952 (origin
4953 (method url-fetch)
4954 (uri (pypi-uri "jaraco.packaging" version))
4955 (sha256
4956 (base32
4957 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
4958 (build-system python-build-system)
4959 (propagated-inputs
4960 `(("python-pytest" ,python-pytest)
4961 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
4962 ("python-pytest-flake8" ,python-pytest-flake8)
4963 ("python-rst.linker" ,python-rst.linker)
4964 ("python-setuptools" ,python-setuptools)
4965 ("python-setuptools-scm" ,python-setuptools-scm)
4966 ("python-six" ,python-six)
4967 ("python-sphinx" ,python-sphinx)))
4968 (home-page "https://github.com/jaraco/jaraco.packaging")
4969 (synopsis "Tools to supplement packaging Python releases")
4970 (description
4971 "This package provides various tools to supplement packaging Python
4972releases.")
4973 (license license:expat)))
4974
44d10b1f
RW
4975(define-public python-pathpy
4976 (package
4977 (name "python-pathpy")
49ad11e9 4978 (version "11.5.0")
44d10b1f
RW
4979 (source
4980 (origin
4981 (method url-fetch)
4982 (uri (pypi-uri "path.py" version))
4983 (sha256
49ad11e9
RW
4984 (base32 "1jxkf91syzxlpiwgm83fjfz1m5xh3jrvv4iyl5wjsnkk599pls5n"))))
4985 (outputs '("out" "doc"))
44d10b1f
RW
4986 (build-system python-build-system)
4987 (propagated-inputs
4988 `(("python-appdirs" ,python-appdirs)))
4989 (native-inputs
4990 `(("python-setuptools-scm" ,python-setuptools-scm)
4991 ("python-sphinx" ,python-sphinx)
4992 ("python-rst.linker" ,python-rst.linker)
4993 ("python-pytest" ,python-pytest)
49ad11e9
RW
4994 ("python-pytest-runner" ,python-pytest-runner)
4995 ("python-jaraco-packaging" ,python-jaraco-packaging)))
44d10b1f 4996 (arguments
49ad11e9
RW
4997 `(#:phases
4998 (modify-phases %standard-phases
4999 (add-after 'build 'build-doc
5000 (lambda _
5001 (setenv "LANG" "en_US.UTF-8")
5002 (invoke "python" "setup.py" "build_sphinx")))
5003 (add-after 'install 'install-doc
5004 (lambda* (#:key outputs #:allow-other-keys)
5005 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5006 (doc (string-append data "/doc/" ,name "-" ,version))
5007 (html (string-append doc "/html")))
5008 (mkdir-p html)
5009 (for-each (lambda (file)
5010 (copy-file file (string-append doc "/" file)))
5011 '("README.rst" "CHANGES.rst"))
5012 (copy-recursively "build/sphinx/html" html)
5013 #t)))
5014 (replace 'check
5015 (lambda _
5016 ;; The import time test aborts if an import takes longer than
5017 ;; 100ms. It may very well take a little longer than that.
5018 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
44d10b1f
RW
5019 (home-page "https://github.com/jaraco/path.py")
5020 (synopsis "Python module wrapper for built-in os.path")
5021 (description
5022 "@code{path.py} implements path objects as first-class entities, allowing
5023common operations on files to be invoked on those path objects directly.")
5024 (license license:expat)))
5025
5026(define-public python2-pathpy
5027 (package-with-python2 python-pathpy))
5028
5029(define-public python-simplegeneric
5030 (package
5031 (name "python-simplegeneric")
5032 (version "0.8.1")
5033 (source
5034 (origin
5035 (method url-fetch)
6c8c3980 5036 (uri (pypi-uri "simplegeneric" version ".zip"))
44d10b1f
RW
5037 (sha256
5038 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5039 (build-system python-build-system)
5040 (native-inputs
5041 `(("unzip" ,unzip)))
5042 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5043 (synopsis "Python module for simple generic functions")
5044 (description
5045 "The simplegeneric module lets you define simple single-dispatch generic
5046functions, akin to Python’s built-in generic functions like @code{len()},
5047@code{iter()} and so on. However, instead of using specially-named methods,
5048these generic functions use simple lookup tables, akin to those used by
5049e.g. @code{pickle.dump()} and other generic functions found in the Python
5050standard library.")
5051 (license license:zpl2.1)))
5052
5053(define-public python2-simplegeneric
5054 (package-with-python2 python-simplegeneric))
5055
5056(define-public python-ipython-genutils
5057 ;; TODO: This package is retired, check if can be removed, see description.
5058 (package
5059 (name "python-ipython-genutils")
5060 (version "0.1.0")
5061 (source
5062 (origin
5063 (method url-fetch)
c9671d4b 5064 (uri (pypi-uri "ipython_genutils" version))
44d10b1f
RW
5065 (sha256
5066 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5067 (build-system python-build-system)
5068 (arguments `(#:tests? #f)) ; no tests
5069 (home-page "https://ipython.org")
5070 (synopsis "Vestigial utilities from IPython")
5071 (description
5072 "This package provides retired utilities from IPython. No packages
5073outside IPython/Jupyter should depend on it.
5074
5075This package shouldn't exist. It contains some common utilities shared by
5076Jupyter and IPython projects during The Big Split. As soon as possible, those
5077packages will remove their dependency on this, and this package will go
5078away.")
5079 (license license:bsd-3)))
5080
5081(define-public python2-ipython-genutils
5082 (package-with-python2 python-ipython-genutils))
5083
5084(define-public python-traitlets
5085 (package
5086 (name "python-traitlets")
5087 (version "4.3.2")
5088 (source
5089 (origin
5090 (method url-fetch)
5091 (uri (pypi-uri "traitlets" version))
5092 (sha256
5093 (base32
5094 "0dbq7sx26xqz5ixs711k5nc88p8a0nqyz6162pwks5dpcz9d4jww"))))
5095 (build-system python-build-system)
5096 (arguments
5097 `(#:phases
5098 (modify-phases %standard-phases
5099 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
5100 (propagated-inputs
5101 `(("python-ipython-genutils" ,python-ipython-genutils)
5102 ("python-decorator" ,python-decorator))) ;not needed for >4.3.2
5103 (native-inputs
5104 `(("python-pytest" ,python-pytest)))
5105 (properties `((python2-variant . ,(delay python2-traitlets))))
5106 (home-page "https://ipython.org")
5107 (synopsis "Configuration system for Python applications")
5108 (description
5109 "Traitlets is a framework that lets Python classes have attributes with
5110type checking, dynamically calculated default values, and ‘on change’
5111callbacks. The package also includes a mechanism to use traitlets for
5112configuration, loading values from files or from command line arguments. This
5113is a distinct layer on top of traitlets, so you can use traitlets in your code
5114without using the configuration machinery.")
5115 (license license:bsd-3)))
5116
5117(define-public python2-traitlets
5118 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
5119 (package
5120 (inherit traitlets)
5121 (propagated-inputs
5122 `(("python2-enum34" ,python2-enum34)
5123 ,@(package-propagated-inputs traitlets))))))
5124
5125(define-public python-jupyter-core
5126 (package
5127 (name "python-jupyter-core")
5128 (version "4.4.0")
5129 (source
5130 (origin
5131 (method url-fetch)
5132 (uri (string-append (pypi-uri "jupyter_core" version)))
5133 (sha256
5134 (base32
5135 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
5136 (build-system python-build-system)
5137 ;; FIXME: not sure how to run the tests
5138 (arguments `(#:tests? #f))
5139 (propagated-inputs
5140 `(("python-traitlets" ,python-traitlets)))
5141 (home-page "http://jupyter.org/")
5142 (synopsis "Jupyter base package")
5143 (description
5144 "Jupyter core is the base package on which Jupyter projects rely.")
5145 (license license:bsd-3)))
5146
5147(define-public python2-jupyter-core
5148 (package-with-python2 python-jupyter-core))
5149
5150(define-public python-jupyter-client
5151 (package
5152 (name "python-jupyter-client")
5153 (version "5.2.4")
5154 (source
5155 (origin
5156 (method url-fetch)
5157 (uri (pypi-uri "jupyter_client" version))
5158 (sha256
5159 (base32
5160 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
5161 (build-system python-build-system)
5162 ;; Tests fail because of missing native python kernel which I assume is
5163 ;; provided by the ipython package, which we cannot use because it would
5164 ;; cause a dependency cycle.
5165 (arguments `(#:tests? #f))
5166 (propagated-inputs
5167 `(("python-pyzmq" ,python-pyzmq)
5168 ("python-traitlets" ,python-traitlets)
5169 ("python-jupyter-core" ,python-jupyter-core)))
5170 (home-page "http://jupyter.org/")
5171 (synopsis "Jupyter protocol implementation and client libraries")
5172 (description
5173 "The @code{jupyter_client} package contains the reference implementation
5174of the Jupyter protocol. It also provides client and kernel management APIs
5175for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5176installing @code{kernelspec}s for use with Jupyter frontends.")
5177 (license license:bsd-3)))
5178
5179(define-public python2-jupyter-client
5180 (package-with-python2 python-jupyter-client))
5181
5182(define-public python-ipykernel
5183 (package
5184 (name "python-ipykernel")
82110dea 5185 (version "5.1.1")
44d10b1f
RW
5186 (source
5187 (origin
5188 (method url-fetch)
5189 (uri (pypi-uri "ipykernel" version))
5190 (sha256
82110dea 5191 (base32 "173nm29g85w8cac3fg40b27qaq26g41wgg6qn79ql1hq4w2n5sgh"))))
44d10b1f
RW
5192 (build-system python-build-system)
5193 (arguments
5194 `(#:phases
5195 (modify-phases %standard-phases
5196 (replace 'check
5197 (lambda _
5198 (setenv "HOME" "/tmp")
5199 (invoke "pytest" "-v")
aa856d02
LC
5200 #t))
5201 (add-after 'install 'set-python-file-name
5202 (lambda* (#:key outputs #:allow-other-keys)
5203 ;; Record the absolute file name of the 'python' executable in
5204 ;; 'kernel.json'.
5205 (let ((out (assoc-ref outputs "out")))
5206 (substitute* (string-append out "/share/jupyter"
5207 "/kernels/python3/kernel.json")
5208 (("\"python\"")
5209 (string-append "\"" (which "python") "\"")))
5210 #t))))))
44d10b1f
RW
5211 (propagated-inputs
5212 `(("python-ipython" ,python-ipython)
5213 ;; imported at runtime during connect
5214 ("python-jupyter-client" ,python-jupyter-client)))
5215 (native-inputs
5216 `(("python-pytest" ,python-pytest)
5217 ("python-nose" ,python-nose)))
5218 (home-page "https://ipython.org")
5219 (synopsis "IPython Kernel for Jupyter")
5220 (description
5221 "This package provides the IPython kernel for Jupyter.")
5222 (license license:bsd-3)))
5223
0f378947 5224;; Version 5.1.1 and above no longer support Python 2.
44d10b1f 5225(define-public python2-ipykernel
0f378947
RW
5226 (package
5227 (name "python2-ipykernel")
5228 (version "5.1.0")
5229 (source
5230 (origin
5231 (method url-fetch)
5232 (uri (pypi-uri "ipykernel" version))
5233 (sha256
5234 (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g"))))
5235 (build-system python-build-system)
5236 (arguments
5237 `(#:python ,python-2
5238 #:phases
5239 (modify-phases %standard-phases
5240 (replace 'check
5241 (lambda _
5242 (setenv "HOME" "/tmp")
5243 (invoke "pytest" "-v")
5244 #t)))))
5245 (propagated-inputs
5246 `(("python2-ipython" ,python2-ipython)
5247 ;; imported at runtime during connect
5248 ("python2-jupyter-client" ,python2-jupyter-client)))
5249 (native-inputs
5250 `(("python2-pytest" ,python2-pytest)
5251 ("python2-nose" ,python2-nose)))
5252 (home-page "https://ipython.org")
5253 (synopsis "IPython Kernel for Jupyter")
5254 (description
5255 "This package provides the IPython kernel for Jupyter.")
5256 (license license:bsd-3)))
44d10b1f 5257
966aa714
AE
5258(define-public python-pari-jupyter
5259 (package
5260 (name "python-pari-jupyter")
5261 (version "1.3.2")
5262 (source
5263 (origin
5264 (method url-fetch)
5265 (uri (pypi-uri "pari_jupyter" version))
5266 (sha256
5267 (base32
5268 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
5269 (build-system python-build-system)
5270 (propagated-inputs
5271 `(("python-ipykernel" ,python-ipykernel)))
5272 (inputs
5273 `(("pari-gp" ,pari-gp)
5274 ("readline" ,readline)))
5275 (arguments
5276 `(#:tests? #f)) ; no test suite
5277 (home-page
5278 "https://github.com/jdemeyer/pari_jupyter")
5279 (synopsis "A Jupyter kernel for PARI/GP")
5280 (description "The package provides a PARI/GP kernel for Jupyter.")
5281 (license license:gpl3+)))
5282
dede052a
RW
5283(define-public python-backcall
5284 (package
5285 (name "python-backcall")
5286 (version "0.1.0")
5287 (source
5288 (origin
5289 (method url-fetch)
5290 (uri (pypi-uri "backcall" version))
5291 (sha256
5292 (base32
5293 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
5294 (build-system python-build-system)
5295 (home-page "https://github.com/takluyver/backcall/")
5296 (synopsis "Specifications for callback functions passed in to an API")
5297 (description
5298 "If your code lets other people supply callback functions, it's important
5299to specify the function signature you expect, and check that functions support
5300that. Adding extra parameters later would break other peoples code unless
5301you're careful. The @code{backcall} package provides a way of specifying the
5302callback signature using a prototype function.")
5303 (license license:bsd-3)))
5304
44d10b1f
RW
5305;; This is the latest release of the LTS version of ipython with support for
5306;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
8b5f756c
RW
5307;; dropped support for Python 2.7.
5308(define-public python2-ipython
44d10b1f 5309 (package
8b5f756c 5310 (name "python2-ipython")
44d10b1f
RW
5311 (version "5.8.0")
5312 (source
5313 (origin
5314 (method url-fetch)
5315 (uri (pypi-uri "ipython" version ".tar.gz"))
5316 (sha256
5317 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
5318 (build-system python-build-system)
44d10b1f 5319 (propagated-inputs
8b5f756c
RW
5320 `(("python2-backports-shutil-get-terminal-size"
5321 ,python2-backports-shutil-get-terminal-size)
5322 ("python2-pathlib2" ,python2-pathlib2)
5323 ("python2-pyzmq" ,python2-pyzmq)
5324 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
5325 ("python2-terminado" ,python2-terminado)
5326 ("python2-matplotlib" ,python2-matplotlib)
5327 ("python2-numpy" ,python2-numpy)
5328 ("python2-numpydoc" ,python2-numpydoc)
5329 ("python2-jinja2" ,python2-jinja2)
5330 ("python2-mistune" ,python2-mistune)
5331 ("python2-pexpect" ,python2-pexpect)
5332 ("python2-pickleshare" ,python2-pickleshare)
5333 ("python2-simplegeneric" ,python2-simplegeneric)
5334 ("python2-jsonschema" ,python2-jsonschema)
5335 ("python2-traitlets" ,python2-traitlets)
5336 ("python2-nbformat" ,python2-nbformat)
5337 ("python2-pygments" ,python2-pygments)))
5338 (inputs
5339 `(("readline" ,readline)
5340 ("which" ,which)))
5341 (native-inputs
5342 `(("graphviz" ,graphviz)
5343 ("pkg-config" ,pkg-config)
5344 ("python2-requests" ,python2-requests) ;; for tests
5345 ("python2-testpath" ,python2-testpath)
5346 ("python2-mock" ,python2-mock)
5347 ("python2-nose" ,python2-nose)))
5348 (arguments
5349 `(#:python ,python-2
5350 #:phases
5351 (modify-phases %standard-phases
5352 (add-before 'check 'delete-broken-tests
5353 (lambda* (#:key inputs #:allow-other-keys)
5354 ;; These tests throw errors for unknown reasons.
5355 (delete-file "IPython/core/tests/test_profile.py")
5356 (delete-file "IPython/core/tests/test_interactiveshell.py")
5357 (delete-file "IPython/core/tests/test_magic.py")
5358 #t)))))
5359 (home-page "https://ipython.org")
5360 (synopsis "IPython is a tool for interactive computing in Python")
5361 (description
5362 "IPython provides a rich architecture for interactive computing with:
5363Powerful interactive shells, a browser-based notebook, support for interactive
5364data visualization, embeddable interpreters and tools for parallel
5365computing.")
5366 (license license:bsd-3)))
5367
5368(define-public python-ipython
5369 (package
5370 (name "python-ipython")
5371 (version "7.5.0")
5372 (source
5373 (origin
5374 (method url-fetch)
5375 (uri (pypi-uri "ipython" version ".tar.gz"))
5376 (sha256
5377 (base32 "09mbxq37mfn88xjnib7qfzaq9krr7gf1jxwy1p6mcjr254082h78"))))
5378 (build-system python-build-system)
5379 (propagated-inputs
5380 `(("python-backcall" ,python-backcall)
5381 ("python-pyzmq" ,python-pyzmq)
5382 ("python-prompt-toolkit" ,python-prompt-toolkit)
44d10b1f
RW
5383 ("python-terminado" ,python-terminado)
5384 ("python-matplotlib" ,python-matplotlib)
5385 ("python-numpy" ,python-numpy)
5386 ("python-numpydoc" ,python-numpydoc)
8b5f756c 5387 ("python-jedi" ,python-jedi)
44d10b1f
RW
5388 ("python-jinja2" ,python-jinja2)
5389 ("python-mistune" ,python-mistune)
5390 ("python-pexpect" ,python-pexpect)
5391 ("python-pickleshare" ,python-pickleshare)
5392 ("python-simplegeneric" ,python-simplegeneric)
5393 ("python-jsonschema" ,python-jsonschema)
5394 ("python-traitlets" ,python-traitlets)
5395 ("python-nbformat" ,python-nbformat)
5396 ("python-pygments" ,python-pygments)))
5397 (inputs
5398 `(("readline" ,readline)
5399 ("which" ,which)))
5400 (native-inputs
5401 `(("graphviz" ,graphviz)
5402 ("pkg-config" ,pkg-config)
5403 ("python-requests" ,python-requests) ;; for tests
5404 ("python-testpath" ,python-testpath)
8b5f756c 5405 ("python-nose" ,python-nose)))
44d10b1f
RW
5406 (arguments
5407 `(#:phases
5408 (modify-phases %standard-phases
44d10b1f
RW
5409 ;; Tests can only be run after the library has been installed and not
5410 ;; within the source directory.
5411 (delete 'check)
5412 (add-after 'install 'check
5413 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5414 (if tests?
5415 (begin
5416 ;; Make installed package available for running the tests
5417 (add-installed-pythonpath inputs outputs)
5418 (setenv "HOME" "/tmp/") ;; required by a test
5419 ;; We only test the core because one of the other tests
5420 ;; tries to import ipykernel.
5421 (invoke "python" "IPython/testing/iptest.py"
5422 "-v" "IPython/core/tests"))
5423 #t)))
5424 (add-before 'check 'fix-tests
5425 (lambda* (#:key inputs #:allow-other-keys)
5426 (substitute* "./IPython/utils/_process_posix.py"
5427 (("/usr/bin/env', 'which") (which "which")))
5428 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5429 (("#!/usr/bin/env python")
5430 (string-append "#!" (which "python"))))
44d10b1f
RW
5431 ;; This test introduces a circular dependency on ipykernel
5432 ;; (which depends on ipython).
5433 (delete-file "IPython/core/tests/test_display.py")
8b5f756c 5434 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
44d10b1f 5435 (delete-file "IPython/core/tests/test_interactiveshell.py")
44d10b1f
RW
5436 #t)))))
5437 (home-page "https://ipython.org")
5438 (synopsis "IPython is a tool for interactive computing in Python")
5439 (description
5440 "IPython provides a rich architecture for interactive computing with:
5441Powerful interactive shells, a browser-based notebook, support for interactive
5442data visualization, embeddable interpreters and tools for parallel
5443computing.")
8b5f756c 5444 (license license:bsd-3)))
44d10b1f 5445
8b5f756c
RW
5446(define-public python-ipython-documentation
5447 (package
5448 (inherit python-ipython)
5449 (name "python-ipython-documentation")
5450 (version (package-version python-ipython))
5451 (arguments
5452 `(#:phases
5453 (modify-phases %standard-phases
5454 (delete 'build)
5455 (delete 'check)
5456 (replace 'install
5457 (lambda* (#:key outputs #:allow-other-keys)
5458 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5459 (doc (string-append data "/doc/" ,name "-" ,version))
5460 (html (string-append doc "/html"))
5461 (man1 (string-append data "/man/man1"))
5462 (info (string-append data "/info"))
5463 (examples (string-append doc "/examples"))
5464 (python-arg (string-append "PYTHON=" (which "python"))))
5465 (setenv "LANG" "en_US.utf8")
5466 (with-directory-excursion "docs"
5467 ;; FIXME: pdf fails to build
5468 ;;(system* "make" "pdf" "PAPER=a4")
5469 (system* "make" python-arg "html")
5470 ;; FIXME: the generated texi file contains ^@^@, which trips
5471 ;; up the parser.
5472 ;; (system* "make" python-arg "info")
5473 )
5474 (copy-recursively "docs/man" man1)
5475 (copy-recursively "examples" examples)
5476 (copy-recursively "docs/build/html" html)
5477 ;; (copy-file "docs/build/latex/ipython.pdf"
5478 ;; (string-append doc "/ipython.pdf"))
5479 (mkdir-p info)
5480 ;; (copy-file "docs/build/texinfo/ipython.info"
5481 ;; (string-append info "/ipython.info"))
5482 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
5483 #t)))))
5484 (inputs
5485 `(("python-ipython" ,python-ipython)
5486 ("python-ipykernel" ,python-ipykernel)))
5487 (native-inputs
5488 `(("python-sphinx" ,python-sphinx)
5489 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
5490 ;; FIXME: It's possible that a smaller union would work just as well.
5491 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
5492 texlive-fonts-ec
5493 texlive-generic-ifxetex
5494 texlive-generic-pdftex
5495 texlive-latex-amsfonts
5496 texlive-latex-capt-of
5497 texlive-latex-cmap
5498 texlive-latex-environ
5499 texlive-latex-eqparbox
5500 texlive-latex-etoolbox
5501 texlive-latex-expdlist
5502 texlive-latex-fancyhdr
5503 texlive-latex-fancyvrb
5504 texlive-latex-fncychap
5505 texlive-latex-float
5506 texlive-latex-framed
5507 texlive-latex-geometry
5508 texlive-latex-graphics
5509 texlive-latex-hyperref
5510 texlive-latex-mdwtools
5511 texlive-latex-multirow
5512 texlive-latex-needspace
5513 texlive-latex-oberdiek
5514 texlive-latex-parskip
5515 texlive-latex-preview
5516 texlive-latex-tabulary
5517 texlive-latex-threeparttable
5518 texlive-latex-titlesec
5519 texlive-latex-trimspaces
5520 texlive-latex-ucs
5521 texlive-latex-upquote
5522 texlive-latex-url
5523 texlive-latex-varwidth
5524 texlive-latex-wrapfig)))
5525 ("texinfo" ,texinfo)))))
44d10b1f
RW
5526
5527(define-public python-urwid
5528 (package
5529 (name "python-urwid")
5530 (version "2.0.1")
5531 (source
5532 (origin
5533 (method url-fetch)
5534 (uri (pypi-uri "urwid" version))
5535 (sha256
5536 (base32
5537 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
5538 (build-system python-build-system)
5539 (home-page "http://urwid.org")
5540 (synopsis "Console user interface library for Python")
5541 (description
5542 "Urwid is a curses-based UI/widget library for Python. It includes many
5543features useful for text console applications.")
5544 (license license:lgpl2.1+)))
5545
5546(define-public python2-urwid
5547 (package-with-python2 python-urwid))
5548
5549(define-public python-urwidtrees
5550 (package
5551 (name "python-urwidtrees")
5552 (version "1.0.2")
5553 (source
5554 (origin
5555 (method url-fetch)
5556 ;; package author intends on distributing via github rather than pypi:
5557 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5558 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5559 version ".tar.gz"))
5560 (file-name (string-append name "-" version ".tar.gz"))
5561 (sha256
5562 (base32
5563 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
5564 (build-system python-build-system)
5565 (arguments
5566 '(#:tests? #f)) ; no tests
5567 (propagated-inputs `(("python-urwid" ,python-urwid)))
5568 (home-page "https://github.com/pazz/urwidtrees")
5569 (synopsis "Tree widgets for urwid")
5570 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5571toolkit. Use it to build trees of widgets.")
5572 (license license:gpl3+)))
5573
5574(define-public python2-urwidtrees
5575 (package-with-python2 python-urwidtrees))
5576
5577(define-public python-ua-parser
5578 (package
5579 (name "python-ua-parser")
5580 (version "0.8.0")
5581 (source
5582 (origin
5583 (method url-fetch)
5584 (uri (pypi-uri "ua-parser" version))
5585 (sha256
5586 (base32
5587 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
5588 (build-system python-build-system)
5589 (arguments
5590 `(#:tests? #f)) ;no test suite in release
5591 (native-inputs
5592 `(("python-pyyaml" ,python-pyyaml)))
5593 (home-page "https://github.com/ua-parser/uap-python")
5594 (synopsis "User agent parser")
5595 (description
5596 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
5597 (license license:asl2.0)))
5598
5599(define-public python2-ua-parser
5600 (package-with-python2 python-ua-parser))
5601
5602(define-public python-user-agents
5603 (package
5604 (name "python-user-agents")
5605 (version "1.1.0")
5606 (source
5607 (origin
5608 (method url-fetch)
5609 (uri (pypi-uri "user-agents" version))
5610 (sha256
5611 (base32
5612 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
5613 (build-system python-build-system)
5614 (arguments
5615 `(#:tests? #f)) ;missing devices.json test file in release
5616 (propagated-inputs
5617 `(("python-ua-parser" ,python-ua-parser)))
5618 (home-page "https://github.com/selwin/python-user-agents")
5619 (synopsis "User Agent strings parsing library")
5620 (description
5621 "A library to identify devices (phones, tablets) and their capabilities by
5622parsing (browser/HTTP) user agent strings.")
5623 (license license:expat)))
5624
5625(define-public python2-user-agents
5626 (package-with-python2 python-user-agents))
5627
5628(define-public python-dbus
5629 (package
5630 (name "python-dbus")
5631 (version "1.2.8")
5632 (source
5633 (origin
5634 (method url-fetch)
5635 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
5636 "dbus-python-" version ".tar.gz"))
5637 (sha256
5638 (base32
5639 "0vvvjmiwnc9cjlks3gcdk43ap7llhlpz7cm1wbw0nc2yfsxjpwdb"))))
5640 (build-system gnu-build-system)
5641 (arguments
5642 '(#:phases
5643 (modify-phases %standard-phases
5644 (add-before
5645 'check 'pre-check
5646 (lambda _
5647 ;; XXX: For the missing '/etc/machine-id'.
5648 (substitute* "test/run-test.sh"
5649 (("DBUS_FATAL_WARNINGS=1")
5650 "DBUS_FATAL_WARNINGS=0"))
5651 #t)))))
5652 (native-inputs
5653 `(("pkg-config" ,pkg-config)))
5654 (inputs
5655 `(("python" ,python-wrapper)
5656 ("dbus-glib" ,dbus-glib)))
5657 (synopsis "Python bindings for D-bus")
5658 (description "python-dbus provides bindings for libdbus, the reference
5659implementation of D-Bus.")
5660 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
5661 (license license:expat)))
5662
5663(define-public python2-dbus
5664 (package (inherit python-dbus)
5665 (name "python2-dbus")
5666 (inputs `(("python" ,python-2)
5667 ,@(alist-delete "python"
5668 (package-inputs python-dbus)
5669 equal?)))
5670 ;; FIXME: on Python 2, the test_utf8 fails with:
5671 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5672 (arguments `(#:tests? #f))))
5673
fb236fdd
AG
5674(define-public python-notify2
5675 (package
5676 (name "python-notify2")
5677 (version "0.3.1")
5678 (source
5679 (origin
5680 (method url-fetch)
5681 (uri (pypi-uri "notify2" version))
5682 (sha256
5683 (base32
5684 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
5685 (build-system python-build-system)
5686 (arguments `(#:tests? #f)) ; tests depend on system state
5687 (native-inputs
5688 `(("python-dbus" ,python-dbus)))
5689 (home-page "https://bitbucket.org/takluyver/pynotify2")
5690 (synopsis "Python interface to D-Bus notifications")
5691 (description
5692 "Pynotify2 provides a Python interface for sending D-Bus notifications.
5693It is a reimplementation of pynotify in pure Python, and an alternative to
5694the GObject Introspection bindings to libnotify for non-GTK applications.")
5695 (license (list license:bsd-2
5696 license:lgpl2.1+))))
5697
5698(define-public python2-notify2
5699 (package-with-python2 python-notify2))
5700
44d10b1f
RW
5701(define-public python-lxml
5702 (package
5703 (name "python-lxml")
5704 (version "4.2.5")
5705 (source
5706 (origin
5707 (method url-fetch)
5708 (uri (pypi-uri "lxml" version))
5709 (sha256
5710 (base32
5711 "0zw0y9hs0nflxhl9cs6ipwwh53szi3w2x06wl0k9cylyqac0cwin"))))
5712 (build-system python-build-system)
5713 (inputs
5714 `(("libxml2" ,libxml2)
5715 ("libxslt" ,libxslt)))
5716 (home-page "http://lxml.de/")
5717 (synopsis
5718 "Python XML processing library")
5719 (description
5720 "The lxml XML toolkit is a Pythonic binding for the C libraries
5721libxml2 and libxslt.")
5722 (license license:bsd-3))) ; and a few more, see LICENSES.txt
5723
5724(define-public python2-lxml
5725 (package-with-python2 python-lxml))
5726
5727;; beautifulsoup4 has a totally different namespace than 3.x,
5728;; and pypi seems to put it under its own name, so I guess we should too
5729(define-public python-beautifulsoup4
5730 (package
5731 (name "python-beautifulsoup4")
abb53e6f 5732 (version "4.7.1")
44d10b1f
RW
5733 (source
5734 (origin
5735 (method url-fetch)
5736 (uri (pypi-uri "beautifulsoup4" version))
5737 (sha256
5738 (base32
abb53e6f 5739 "0j2kycz2dxgx68xzjm7rxg5xn6v61gq5ifvxyg99slmqkybnal4l"))))
44d10b1f
RW
5740 (build-system python-build-system)
5741 (arguments
5742 `(#:phases
5743 (modify-phases %standard-phases
5744 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5745 ;; must use this conversion script when building with Python 3. The
5746 ;; conversion script also runs the tests.
5747 ;; For more information, see the file 'convert-py3k' in the source
5748 ;; distribution.
5749 (replace 'check
dff0197e 5750 (lambda _ (invoke "./convert-py3k"))))))
f83e10e4 5751 (propagated-inputs
abb53e6f 5752 `(("python-soupsieve" ,python-soupsieve)))
44d10b1f
RW
5753 (home-page
5754 "https://www.crummy.com/software/BeautifulSoup/bs4/")
5755 (synopsis
5756 "Python screen-scraping library")
5757 (description
5758 "Beautiful Soup is a Python library designed for rapidly setting up
5759screen-scraping projects. It offers Pythonic idioms for navigating,
5760searching, and modifying a parse tree, providing a toolkit for
5761dissecting a document and extracting what you need. It automatically
5762converts incoming documents to Unicode and outgoing documents to UTF-8.")
5763 (license license:expat)
5764 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5765
5766(define-public python2-beautifulsoup4
5767 (package
5768 (inherit (package-with-python2
5769 (strip-python2-variant python-beautifulsoup4)))
5770 (arguments `(#:python ,python-2))))
5771
ad74978a
BT
5772(define-public python-soupsieve
5773 (package
5774 (name "python-soupsieve")
e9cb6edd 5775 (version "1.9.2")
ad74978a
BT
5776 (source
5777 (origin
5778 (method url-fetch)
5779 (uri (pypi-uri "soupsieve" version))
5780 (sha256
5781 (base32
e9cb6edd 5782 "0in9rc9q3h8w5b4qf7kvl3qxcvw6vrz35ckblchgf70hm6pg3dbj"))))
ad74978a
BT
5783 (build-system python-build-system)
5784 (arguments `(#:tests? #f))
5785 ;;XXX: 2 tests fail currently despite claming they were to be
5786 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
5787 ;;don't want to create a circular dependency.
5788 (home-page "https://github.com/facelessuser/soupsieve")
5789 (synopsis "CSS selector library")
5790 (description
5791 "Soup Sieve is a CSS selector library designed to be used with Beautiful
5792Soup 4. It aims to provide selecting, matching, and filtering using modern
5793CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
5794specifications up through the latest CSS level 4 drafts and beyond (though
5795some are not yet implemented).")
d00b83fb 5796 (properties `((python2-variant . ,(delay python2-soupsieve))))
ad74978a
BT
5797 (license license:expat)))
5798
5799(define-public python2-soupsieve
d00b83fb 5800 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
ad74978a
BT
5801 (package
5802 (inherit base)
5803 (propagated-inputs
d00b83fb
MB
5804 `(("python2-backports-functools-lru-cache"
5805 ,python2-backports-functools-lru-cache)
5806 ,@(package-propagated-inputs base))))))
ad74978a 5807
44d10b1f
RW
5808(define-public python-netifaces
5809 (package
5810 (name "python-netifaces")
5811 (version "0.10.7")
5812 (source
5813 (origin
5814 (method url-fetch)
5815 (uri (pypi-uri "netifaces" version))
5816 (sha256
5817 (base32
5818 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
5819 (build-system python-build-system)
5820 (home-page "https://github.com/al45tair/netifaces")
5821 (synopsis
5822 "Python module for portable network interface information")
5823 (description
5824 "Netifaces is a Python module providing information on network
5825interfaces in an easy and portable manner.")
5826 (license license:expat)))
5827
5828(define-public python2-netifaces
5829 (package-with-python2 python-netifaces))
5830
5831(define-public python-networkx
5832 (package
5833 (name "python-networkx")
5834 (version "2.2")
5835 (source
5836 (origin
5837 (method url-fetch)
5838 (uri (pypi-uri "networkx" version ".zip"))
5839 (sha256
5840 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
5841 (build-system python-build-system)
5842 ;; python-decorator is needed at runtime.
5843 (propagated-inputs
5844 `(("python-decorator" ,python-decorator)))
5845 (native-inputs
5846 `(("python-nose" ,python-nose)
5847 ("unzip" ,unzip)))
5848 (home-page "https://networkx.github.io/")
5849 (synopsis "Python module for creating and manipulating graphs and networks")
5850 (description
5851 "NetworkX is a Python package for the creation, manipulation, and study
5852of the structure, dynamics, and functions of complex networks.")
5853 (license license:bsd-3)))
5854
5855(define-public python2-networkx
5856 (package-with-python2 python-networkx))
5857
5858(define-public python-datrie
5859 (package
5860 (name "python-datrie")
0b58cb42 5861 (version "0.8")
44d10b1f
RW
5862 (source
5863 (origin
5864 (method url-fetch)
5865 (uri (pypi-uri "datrie" version))
5866 (sha256
5867 (base32
0b58cb42 5868 "0338r8xgmpy78556jhms0h6qkvyjr10p8bpgdvcpqzm9lrmxmmdx"))))
44d10b1f 5869 (build-system python-build-system)
44d10b1f
RW
5870 (native-inputs
5871 `(("python-cython" ,python-cython)
5872 ("python-hypothesis" ,python-hypothesis)
5873 ("python-pytest" ,python-pytest)
5874 ("python-pytest-runner" ,python-pytest-runner)))
5875 (home-page "https://github.com/kmike/datrie")
5876 (synopsis "Fast, efficiently stored trie for Python")
5877 (description
5878 "This package provides a fast, efficiently stored trie implementation for
5879Python.")
5880 (license license:lgpl2.1+)))
5881
5882(define-public snakemake
5883 (package
5884 (name "snakemake")
5885 (version "5.2.4")
5886 (source
5887 (origin
5888 (method url-fetch)
5889 (uri (pypi-uri "snakemake" version))
5890 (sha256
5891 (base32 "0gj0xxgiq3mp9qyyrbfzldiaq1giliqw0in64nqiz7vx49myqj7z"))))
5892 (build-system python-build-system)
5893 (arguments
5894 ;; TODO: Package missing test dependencies.
5895 '(#:tests? #f
5896 #:phases
5897 (modify-phases %standard-phases
5898 ;; For cluster execution Snakemake will call Python. Since there is
5899 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
5900 ;; this by calling the snakemake wrapper instead.
5901 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
5902 (lambda* (#:key outputs #:allow-other-keys)
5903 (substitute* "snakemake/executors.py"
5904 (("\\{sys.executable\\} -m snakemake")
5905 (string-append (assoc-ref outputs "out")
5906 "/bin/snakemake")))
5907 #t)))))
5908 (propagated-inputs
5909 `(("python-gitpython" ,python-gitpython)
5910 ("python-wrapt" ,python-wrapt)
5911 ("python-requests" ,python-requests)
5912 ("python-appdirs" ,python-appdirs)
5913 ("python-configargparse" ,python-configargparse)
5914 ("python-datrie" ,python-datrie)
5915 ("python-docutils" ,python-docutils)
5916 ("python-jinja2" ,python-jinja2)
5917 ("python-jsonschema" ,python-jsonschema)
5918 ("python-networkx" ,python-networkx)
5919 ("python-pyyaml" ,python-pyyaml)
5920 ("python-ratelimiter" ,python-ratelimiter)))
5921 (home-page "https://snakemake.readthedocs.io")
5922 (synopsis "Python-based execution environment for make-like workflows")
5923 (description
5924 "Snakemake aims to reduce the complexity of creating workflows by
5925providing a clean and modern domain specific specification language (DSL) in
5926Python style, together with a fast and comfortable execution environment.")
5927 (license license:expat)))
5928
5929;; This is currently needed for the pigx-* packages.
5930(define-public snakemake-4
5931 (package (inherit snakemake)
5932 (version "4.4.0")
5933 (source
5934 (origin
5935 (method url-fetch)
5936 (uri (pypi-uri "snakemake" version))
5937 (sha256
5938 (base32 "0g0paia4z7w3srnqdmavq3hrb2x7qnpf81jx50njl0p7y4y0j8jv"))))
5939 (propagated-inputs
5940 `(("python-wrapt" ,python-wrapt)
5941 ("python-requests" ,python-requests)
5942 ("python-appdirs" ,python-appdirs)
5943 ("python-configargparse" ,python-configargparse)
5944 ("python-pyyaml" ,python-pyyaml)
5945 ("python-ratelimiter" ,python-ratelimiter)))))
5946
5947(define-public python-pyqrcode
5948 (package
5949 (name "python-pyqrcode")
5950 (version "1.2.1")
5951 (source
5952 (origin
5953 (method url-fetch)
5954 (uri (pypi-uri "PyQRCode" version))
5955 (sha256
5956 (base32
5957 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
5958 (build-system python-build-system)
5959 (home-page
5960 "https://github.com/mnooner256/pyqrcode")
5961 (synopsis "QR code generator")
5962 (description
5963 "Pyqrcode is a QR code generator written purely in Python with
5964SVG, EPS, PNG and terminal output.")
5965 (license license:bsd-3)))
5966
5967(define-public python-seaborn
5968 (package
5969 (name "python-seaborn")
5970 (version "0.9.0")
5971 (source
5972 (origin
5973 (method url-fetch)
5974 (uri (pypi-uri "seaborn" version))
5975 (sha256
5976 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))))
5977 (build-system python-build-system)
5978 (arguments
5979 `(#:phases
5980 (modify-phases %standard-phases
5981 (add-before 'check 'start-xserver
5982 (lambda* (#:key inputs #:allow-other-keys)
5983 (let ((xorg-server (assoc-ref inputs "xorg-server")))
5984 ;; There must be a running X server and make check doesn't
5985 ;; start one. Therefore we must do it.
5986 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
5987 (setenv "DISPLAY" ":1")
5988 #t)))
5989 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
5990 (propagated-inputs
5991 `(("python-pandas" ,python-pandas)
5992 ("python-matplotlib" ,python-matplotlib)
5993 ("python-numpy" ,python-numpy)
5994 ("python-scipy" ,python-scipy)))
5995 (native-inputs
5996 `(("python-pytest" ,python-pytest)
5997 ("xorg-server" ,xorg-server)))
5998 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5999 (synopsis "Statistical data visualization")
6000 (description
6001 "Seaborn is a library for making attractive and informative statistical
6002graphics in Python. It is built on top of matplotlib and tightly integrated
6003with the PyData stack, including support for numpy and pandas data structures
6004and statistical routines from scipy and statsmodels.")
6005 (license license:bsd-3)))
6006
6007(define-public python2-seaborn
6008 (package-with-python2 python-seaborn))
6009
6010(define-public python-mpmath
6011 (package
6012 (name "python-mpmath")
6013 (version "0.19")
6014 (source (origin
6015 (method url-fetch)
6016 (uri (string-append "http://mpmath.org/files/mpmath-"
6017 version ".tar.gz"))
6018 (sha256
6019 (base32
6020 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
6021 (build-system python-build-system)
6022 (arguments
6023 '(#:phases
6024 (modify-phases %standard-phases
6025 (replace 'check
6026 (lambda _
5d7a6f1c 6027 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
44d10b1f
RW
6028 (home-page "http://mpmath.org")
6029 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6030 (description
6031 "@code{mpmath} can be used as an arbitrary-precision substitute for
6032Python's float/complex types and math/cmath modules, but also does much
6033more advanced mathematics.")
6034 (license license:bsd-3)))
6035
6036(define-public python2-mpmath
6037 (package-with-python2 python-mpmath))
6038
6039(define-public python-bigfloat
6040 (package
6041 (name "python-bigfloat")
6042 (version "0.3.0")
6043 (source
6044 (origin
6045 (method url-fetch)
6046 (uri (pypi-uri "bigfloat" version))
6047 (sha256
6048 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
6049 (build-system python-build-system)
6050 (inputs
6051 `(("mpfr" ,mpfr)))
6052 (home-page "https://github.com/mdickinson/bigfloat")
6053 (synopsis "Arbitrary precision floating-point arithmetic for Python")
6054 (description
e36de31b 6055 "This package provides a Python interface to the MPFR library for
44d10b1f
RW
6056multiprecision arithmetic.")
6057 (license license:lgpl3+)))
6058
6059(define-public python2-bigfloat
6060 (package-with-python2 python-bigfloat))
6061
6062(define-public python-sympy
6063 (package
6064 (name "python-sympy")
6065 (version "1.1.1")
6066 (source
6067 (origin
6068 (method url-fetch)
6069 (uri (string-append
6070 "https://github.com/sympy/sympy/releases/download/sympy-"
6071 version "/sympy-" version ".tar.gz"))
6072 (sha256
6073 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
6074 (build-system python-build-system)
6075 (arguments
6076 `(#:phases
6077 (modify-phases %standard-phases
6078 ;; Run the core tests after installation. By default it would run
6079 ;; *all* tests, which take a very long time to complete and are known
6080 ;; to be flaky.
6081 (delete 'check)
6082 (add-after 'install 'check
6083 (lambda* (#:key outputs #:allow-other-keys)
6084 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
6085 #t)))))
6086 (propagated-inputs
6087 `(("python-mpmath" ,python-mpmath)))
6088 (home-page "http://www.sympy.org/")
6089 (synopsis "Python library for symbolic mathematics")
6090 (description
6091 "SymPy is a Python library for symbolic mathematics. It aims to become a
6092full-featured computer algebra system (CAS) while keeping the code as simple
6093as possible in order to be comprehensible and easily extensible.")
6094 (license license:bsd-3)))
6095
6096(define-public python2-sympy
6097 (package
6098 (inherit (package-with-python2 python-sympy))
6099 (arguments
6100 `(#:phases
6101 (modify-phases %standard-phases
6102 ;; Run the core tests after installation. By default it would run
6103 ;; *all* tests, which take a very long time to complete and are known
6104 ;; to be flaky.
6105 (delete 'check)
6106 (add-after 'install 'check
6107 (lambda* (#:key outputs #:allow-other-keys)
6108 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
6109 #t)))))))
6110
6111(define-public python-q
6112 (package
6113 (name "python-q")
6114 (version "2.6")
6115 (source
6116 (origin
6117 (method url-fetch)
6118 (uri (pypi-uri "q" version))
6119 (sha256
6120 (base32
6121 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6122 (build-system python-build-system)
6123 (home-page "https://github.com/zestyping/q")
6124 (synopsis "Quick-and-dirty debugging output for tired programmers")
6125 (description
6126 "q is a Python module for \"print\" style of debugging Python code. It
6127provides convenient short API for print out of values, tracebacks, and
6128falling into the Python interpreter.")
6129 (license license:asl2.0)))
6130
6131(define-public python2-q
6132 (package-with-python2 python-q))
6133
6134(define-public python2-xlib
6135 (package
6136 (name "python2-xlib")
6137 (version "0.14")
6138 (source (origin
6139 (method url-fetch)
6140 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6141 "/" version "/"
6142 "python-xlib-" version ".tar.gz"))
6143 (sha256
6144 (base32
6145 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6146 (build-system python-build-system)
6147 (arguments
6148 `(#:python ,python-2 ;Python 2 only
6149 #:tests? #f)) ;no tests
6150 (home-page "http://python-xlib.sourceforge.net/")
6151 (synopsis "Python X11 client library")
6152 (description
6153 "The Python X Library is intended to be a fully functional X client
6154library for Python programs. It is useful to implement low-level X clients.
6155It is written entirely in Python.")
6156 (license license:gpl2+)))
6157
6158(define-public python-singledispatch
6159 (package
6160 (name "python-singledispatch")
6161 (version "3.4.0.3")
6162 (source
6163 (origin
6164 (method url-fetch)
6165 (uri (pypi-uri "singledispatch" version))
6166 (sha256
6167 (base32
6168 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6169 (build-system python-build-system)
6170 (native-inputs
6171 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6172 (home-page
6173 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
6174 (synopsis "Backport of singledispatch feature from Python 3.4")
6175 (description
6176 "This library brings functools.singledispatch from Python 3.4 to Python
61772.6-3.3.")
6178 (license license:expat)))
6179
6180(define-public python2-singledispatch
6181 (package-with-python2 python-singledispatch))
6182
6183;; the python- version can be removed with python-3.5
6184(define-public python-backports-abc
6185 (package
6186 (name "python-backports-abc")
6187 (version "0.5")
6188 (source
6189 (origin
6190 (method url-fetch)
6191 (uri (pypi-uri "backports_abc" version))
6192 (sha256
6193 (base32
6194 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6195 (build-system python-build-system)
6196 (home-page "https://github.com/cython/backports_abc")
6197 (synopsis "Backport of additions to the 'collections.abc' module")
6198 (description
6199 "Python-backports-abc provides a backport of additions to the
36a4366d 6200@code{collections.abc} module in Python-3.5.")
44d10b1f
RW
6201 (license license:psfl)))
6202
6203(define-public python2-backports-abc
6204 (package-with-python2 python-backports-abc))
6205
6206(define-public python-backports-csv
6207 (package
6208 (name "python-backports-csv")
6209 (version "1.0.5")
6210 (source
6211 (origin
6212 (method url-fetch)
6213 (uri (pypi-uri "backports.csv" version))
6214 (sha256
6215 (base32
6216 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
6217 (build-system python-build-system)
6218 (home-page "https://github.com/ryanhiebert/backports.csv")
6219 (synopsis "Backport of Python 3's csv module for Python 2")
6220 (description
6221 "Provides a backport of Python 3's @code{csv} module for parsing
6222comma separated values. The API of the @code{csv} module in Python 2
6223is drastically different from the @code{csv} module in Python 3.
6224This is due, for the most part, to the difference between str in
6225Python 2 and Python 3.")
6226 (license license:psfl)))
6227
6228(define-public python2-backports-csv
6229 (package-with-python2 python-backports-csv))
6230
6231(define-public python2-backports-shutil-get-terminal-size
6232 (package
6233 (name "python2-backports-shutil-get-terminal-size")
6234 (version "1.0.0")
6235 (source
6236 (origin
6237 (method url-fetch)
6238 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6239 (sha256
6240 (base32
6241 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6242 (build-system python-build-system)
6243 (arguments
6244 `(#:python ,python-2
6245 #:phases
6246 (modify-phases %standard-phases
6247 (replace 'check
6248 (lambda _
4a4a7d9a 6249 (invoke "py.test" "-v"))))))
44d10b1f
RW
6250 (native-inputs
6251 `(("python2-pytest" ,python2-pytest)))
6252 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6253 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6254 (description
6255 "This package provides a backport of the @code{get_terminal_size
6256function} from Python 3.3's @code{shutil}.
6257Unlike the original version it is written in pure Python rather than C,
6258so it might be a tiny bit slower.")
6259 (license license:expat)))
6260
6261(define-public python-waf
6262 (package
6263 (name "python-waf")
6264 (version "2.0.11")
6265 (source (origin
6266 (method url-fetch)
6267 (uri (string-append "https://waf.io/"
6268 "waf-" version ".tar.bz2"))
6269 (sha256
6270 (base32
6271 "13zrniwkmfqgsgzi9v5m1367fppp9yzrz6z2ny6hy8dmpb8mj4z4"))))
6272 (build-system python-build-system)
6273 (arguments
6274 '(#:phases
6275 (modify-phases %standard-phases
6276 (replace 'build
6277 (lambda _
6278 (invoke "python" "waf-light" "configure" "build")))
6279 (replace 'check
6280 (lambda _
6281 (invoke "python" "waf" "--version")))
6282 (replace 'install
6283 (lambda* (#:key outputs #:allow-other-keys)
6284 (let ((out (assoc-ref outputs "out")))
6285 (install-file "waf" (string-append out "/bin")))
6286 #t))
6287 ;; waf breaks when it is wrapped.
6288 (delete 'wrap))))
6289 (home-page "https://waf.io/")
6290 (synopsis "Python-based build system")
6291 (description
6292 "Waf is a Python-based framework for configuring, compiling and installing
6293applications.")
6294 (license license:bsd-3)))
6295
6296(define-public python2-waf
6297 (package-with-python2 python-waf))
6298
6299(define-public python-pyzmq
6300 (package
6301 (name "python-pyzmq")
6302 (version "17.1.2")
6303 (source
6304 (origin
6305 (method url-fetch)
6306 (uri (pypi-uri "pyzmq" version))
6307 (sha256
6308 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
6309 (build-system python-build-system)
6310 (arguments
6311 `(#:configure-flags
6312 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6313 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6314 ;; --inplace' for 'python setup.py test' to work.
6315 #:tests? #f))
6316 (inputs
6317 `(("zeromq" ,zeromq)))
6318 (native-inputs
6319 `(("pkg-config" ,pkg-config)
6320 ("python-nose" ,python-nose)))
6321 (home-page "https://github.com/zeromq/pyzmq")
6322 (synopsis "Python bindings for 0MQ")
6323 (description
6324 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6325 (license license:bsd-4)))
6326
6327(define-public python2-pyzmq
6328 (package-with-python2 python-pyzmq))
6329
6330(define-public python-pep8
6331 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
6332 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
6333 ;; some dependents' test suites, and nothing more.
6334 (package
6335 (name "python-pep8")
6336 (version "1.7.0")
6337 (source
6338 (origin
6339 (method url-fetch)
6340 (uri (pypi-uri "pep8" version))
6341 (sha256
6342 (base32
2be878d8
CB
6343 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
6344 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
44d10b1f
RW
6345 (build-system python-build-system)
6346 (home-page "https://pep8.readthedocs.org/")
6347 (synopsis "Python style guide checker")
6348 (description
6349 "This tools checks Python code against some of the style conventions in
6350PEP 8.")
6351 (license license:expat)))
6352
6353(define-public python2-pep8
6354 (package-with-python2 python-pep8))
6355
6356(define-public python-pyflakes
6357 (package
6358 (name "python-pyflakes")
d0cba11b 6359 (version "2.1.1")
44d10b1f
RW
6360 (source
6361 (origin
6362 (method url-fetch)
6363 (uri (pypi-uri "pyflakes" version))
6364 (sha256
6365 (base32
d0cba11b 6366 "18pq95a1xj2dgdd0m85gyfsn40jajj4xc3lp8wfv7igqhrc86xnr"))))
44d10b1f
RW
6367 (build-system python-build-system)
6368 (home-page
6369 "https://github.com/pyflakes/pyflakes")
6370 (synopsis "Passive checker of Python programs")
6371 (description
6372 "Pyflakes statically checks Python source code for common errors.")
6373 (license license:expat)))
6374
6375(define-public python2-pyflakes
6376 (package-with-python2 python-pyflakes))
6377
6378(define-public python-mccabe
6379 (package
6380 (name "python-mccabe")
6381 (version "0.6.1")
6382 (source
6383 (origin
6384 (method url-fetch)
6385 (uri (pypi-uri "mccabe" version))
6386 (sha256
6387 (base32
6388 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
6389 (build-system python-build-system)
6390 (native-inputs
6391 `(("python-pytest" ,python-pytest-bootstrap)
6392 ("python-pytest-runner" ,python-pytest-runner)))
6393 (home-page "https://github.com/flintwork/mccabe")
6394 (synopsis "McCabe checker, plugin for flake8")
6395 (description
6396 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6397complexity of Python source code.")
6398 (license license:expat)))
6399
6400(define-public python2-mccabe
6401 (package-with-python2 python-mccabe))
6402
6403(define-public python-mccabe-0.2.1
6404 (package (inherit python-mccabe)
6405 (version "0.2.1")
6406 (source
6407 (origin
6408 (method url-fetch)
6409 (uri (pypi-uri "mccabe" version))
6410 (sha256
6411 (base32
6412 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6413
6414(define-public python2-mccabe-0.2.1
6415 (package-with-python2 python-mccabe-0.2.1))
6416
6417;; Flake8 2.4.1 requires an older version of pep8.
6418;; This should be removed ASAP.
6419(define-public python-pep8-1.5.7
6420 (package (inherit python-pep8)
6421 (version "1.5.7")
6422 (source
f3576970
RW
6423 (origin
6424 (method url-fetch)
6425 (uri (pypi-uri "pep8" version))
6426 (sha256
6427 (base32
6428 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
44d10b1f
RW
6429 (arguments
6430 ;; XXX Tests not compatible with Python 3.5.
6431 '(#:tests? #f))))
6432
6433(define-public python2-pep8-1.5.7
6434 (package-with-python2 python-pep8-1.5.7))
6435
6436;; Flake8 2.4.1 requires an older version of pyflakes.
6437;; This should be removed ASAP.
6438(define-public python-pyflakes-0.8.1
6439 (package (inherit python-pyflakes)
6440 (version "0.8.1")
6441 (source
8c4dffb5
RW
6442 (origin
6443 (method url-fetch)
6444 (uri (pypi-uri "pyflakes" version))
6445 (sha256
6446 (base32
6447 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
44d10b1f
RW
6448 (arguments
6449 ;; XXX Tests not compatible with Python 3.5.
6450 '(#:tests? #f))))
6451
6452(define-public python2-pyflakes-0.8.1
6453 (package-with-python2 python-pyflakes-0.8.1))
6454
ac63cf0a 6455(define-public python-flake8
44d10b1f
RW
6456 (package
6457 (name "python-flake8")
beaff4a8 6458 (version "3.7.7")
ac63cf0a
MB
6459 (source (origin
6460 (method url-fetch)
6461 (uri (pypi-uri "flake8" version))
6462 (sha256
6463 (base32
beaff4a8 6464 "0qg6zggqigrd4k3gv88shd1a27d0cwgfql8vfiq2c7rl7w3rd6c5"))))
44d10b1f
RW
6465 (build-system python-build-system)
6466 (arguments
6467 `(#:phases
6468 (modify-phases %standard-phases
44d10b1f
RW
6469 (delete 'check)
6470 (add-after 'install 'check
6471 (lambda* (#:key inputs outputs #:allow-other-keys)
6472 (add-installed-pythonpath inputs outputs)
6473 (invoke "pytest" "-v")
6474 #t)))))
6475 (propagated-inputs
6476 `(("python-pycodestyle" ,python-pycodestyle)
beaff4a8 6477 ("python-entrypoints" ,python-entrypoints)
44d10b1f
RW
6478 ("python-pyflakes" ,python-pyflakes)
6479 ("python-mccabe" ,python-mccabe)))
6480 (native-inputs
6481 `(("python-mock" ,python-mock)
6482 ("python-pytest" ,python-pytest-bootstrap)
6483 ("python-pytest-runner" ,python-pytest-runner)))
6484 (home-page "https://gitlab.com/pycqa/flake8")
6485 (synopsis
6486 "The modular source code checker: pep8, pyflakes and co")
6487 (description
6488 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
ac63cf0a 6489 (properties `((python2-variant . ,(delay python2-flake8))))
44d10b1f
RW
6490 (license license:expat)))
6491
ac63cf0a
MB
6492(define-public python2-flake8
6493 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
44d10b1f
RW
6494 (package (inherit base)
6495 (propagated-inputs
6496 `(("python2-configparser" ,python2-configparser)
6497 ("python2-enum34" ,python2-enum34)
beaff4a8 6498 ("python2-typing" ,python2-typing)
44d10b1f
RW
6499 ,@(package-propagated-inputs base))))))
6500
44d10b1f
RW
6501;; python-hacking requires flake8 <2.6.0.
6502(define-public python-flake8-2.5
6503 (package
6504 (inherit python-flake8)
6505 (version "2.5.5")
6506 (source (origin
6507 (method url-fetch)
6508 (uri (pypi-uri "flake8" version))
6509 (sha256
6510 (base32
6511 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
6512 (propagated-inputs
6513 `(("python-pep8" ,python-pep8)
6514 ,@(package-propagated-inputs python-flake8)))
6515 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
6516
6517(define-public python2-flake8-2.5
6518 (package
6519 (inherit python2-flake8)
6520 (version (package-version python-flake8-2.5))
6521 (source (origin
6522 (inherit (package-source python-flake8-2.5))))
6523 (propagated-inputs
6524 `(("python2-pep8" ,python2-pep8)
6525 ,@(package-propagated-inputs python2-flake8)))))
6526
6527(define-public python-flake8-polyfill
6528 (package
6529 (name "python-flake8-polyfill")
6530 (version "1.0.2")
6531 (source
6532 (origin
6533 (method url-fetch)
6534 (uri (pypi-uri "flake8-polyfill" version))
6535 (sha256
6536 (base32
6537 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
6538 (build-system python-build-system)
6539 (arguments
6540 '(#:phases
6541 (modify-phases %standard-phases
6542 (replace 'check
6543 (lambda _
40a7153d
MB
6544 ;; Be compatible with Pytest 4:
6545 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
6546 (substitute* "setup.cfg"
6547 (("\\[pytest\\]")
6548 "[tool:pytest]"))
6549
44d10b1f
RW
6550 (setenv "PYTHONPATH"
6551 (string-append (getcwd) "/build/lib:"
6552 (getenv "PYTHONPATH")))
4f0a0894 6553 (invoke "py.test" "-v"))))))
44d10b1f
RW
6554 (native-inputs
6555 `(("python-flake8" ,python-flake8)
6556 ("python-mock" ,python-mock)
6557 ("python-pep8" ,python-pep8)
6558 ("python-pycodestyle" ,python-pycodestyle)
6559 ("python-pytest" ,python-pytest)))
6560 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6561 (synopsis "Polyfill package for Flake8 plugins")
6562 (description
6563 "This package that provides some compatibility helpers for Flake8
6564plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6565 (license license:expat)))
6566
6567(define-public python2-flake8-polyfill
6568 (package-with-python2 python-flake8-polyfill))
6569
6570(define-public python-mistune
6571 (package
6572 (name "python-mistune")
6573 (version "0.8.4")
6574 (source
6575 (origin
6576 (method url-fetch)
6577 (uri (pypi-uri "mistune" version))
6578 (sha256
6579 (base32
6580 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
6581 (build-system python-build-system)
6582 (native-inputs
6583 `(("python-nose" ,python-nose)
6584 ("python-cython" ,python-cython)))
6585 (home-page "https://github.com/lepture/mistune")
6586 (synopsis "Markdown parser in pure Python")
6587 (description "This package provides a fast markdown parser in pure
6588Python.")
6589 (license license:bsd-3)))
6590
6591(define-public python2-mistune
6592 (package-with-python2 python-mistune))
6593
6594(define-public python-markdown
6595 (package
6596 (name "python-markdown")
ceb1936a 6597 (version "3.1.1")
44d10b1f
RW
6598 (source
6599 (origin
6600 (method url-fetch)
6601 (uri (pypi-uri "Markdown" version))
6602 (sha256
6603 (base32
ceb1936a 6604 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f"))))
44d10b1f
RW
6605 (build-system python-build-system)
6606 (native-inputs
6607 `(("python-nose" ,python-nose)
6608 ("python-pyyaml" ,python-pyyaml)))
6609 (home-page "https://python-markdown.github.io/")
6610 (synopsis "Python implementation of Markdown")
6611 (description
6612 "This package provides a Python implementation of John Gruber's
6613Markdown. The library features international input, various Markdown
6614extensions, and several HTML output formats. A command line wrapper
6615markdown_py is also provided to convert Markdown files to HTML.")
6616 (license license:bsd-3)))
6617
6618(define-public python2-markdown
6619 (package-with-python2 python-markdown))
6620
6621(define-public python-ptyprocess
6622 (package
6623 (name "python-ptyprocess")
6624 (version "0.5.2")
6625 (source
6626 (origin
6627 (method url-fetch)
6628 (uri (pypi-uri "ptyprocess" version))
6629 (sha256
6630 (base32
6631 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
6632 (build-system python-build-system)
6633 (native-inputs
6634 `(("python-nose" ,python-nose)))
6635 (arguments
6636 `(#:phases
6637 (modify-phases %standard-phases
6638 (replace 'check
7904d6fa 6639 (lambda _ (invoke "nosetests"))))))
44d10b1f
RW
6640 (home-page "https://github.com/pexpect/ptyprocess")
6641 (synopsis "Run a subprocess in a pseudo terminal")
6642 (description
6643 "This package provides a Python library used to launch a subprocess in a
6644pseudo terminal (pty), and interact with both the process and its pty.")
6645 (license license:isc)))
6646
6647(define-public python2-ptyprocess
6648 (package-with-python2 python-ptyprocess))
6649
6650(define-public python-cram
6651 (package
6652 (name "python-cram")
6653 (version "0.7")
6654 (home-page "https://bitheap.org/cram/")
6655 (source (origin
6656 (method url-fetch)
6657 (uri (list (string-append home-page "cram-"
6658 version ".tar.gz")
6659 (pypi-uri "cram" version)))
6660 (sha256
6661 (base32
6662 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6663 (arguments
6664 '(#:phases
6665 (modify-phases %standard-phases
6666 (add-after 'unpack 'patch-source
6667 (lambda _
6668 (substitute* (find-files "cram" ".*\\.py$")
6669 ;; Replace default shell path.
6670 (("/bin/sh") (which "sh")))
6671 (substitute* (find-files "tests" ".*\\.t$")
6672 (("md5") "md5sum")
6673 (("/bin/bash") (which "bash"))
6674 (("/bin/sh") (which "sh")))
6675 (substitute* "cram/_test.py"
6676 ;; This hack works around a bug triggered by substituting
6677 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6678 ;; "cram -h", which breaks the output at 80 characters. This
6679 ;; causes the line showing the default shell to break into two
6680 ;; lines, but the test expects a single line...
6681 (("env\\['COLUMNS'\\] = '80'")
6682 "env['COLUMNS'] = '160'"))
ff1e80d7
MB
6683
6684 (substitute* "Makefile"
6685 ;; Recent versions of python-coverage have caused the test
6686 ;; coverage to decrease (as of version 0.7). Allow that.
6687 (("--fail-under=100")
6688 "--fail-under=90"))
6689
44d10b1f 6690 #t))
ff1e80d7 6691 (replace 'check
44d10b1f 6692 ;; The test phase uses the built library and executable.
44d10b1f
RW
6693 (lambda* (#:key inputs outputs #:allow-other-keys)
6694 (add-installed-pythonpath inputs outputs)
6695 (setenv "PATH" (string-append (getenv "PATH") ":"
6696 (assoc-ref outputs "out") "/bin"))
2d7db192 6697 (invoke "make" "test"))))))
44d10b1f
RW
6698 (build-system python-build-system)
6699 (native-inputs
6700 `(("python-coverage" ,python-coverage)
6701 ("which" ,which)))
6702 (synopsis "Simple testing framework for command line applications")
6703 (description
6704 "Cram is a functional testing framework for command line applications.
6705Cram tests look like snippets of interactive shell sessions. Cram runs each
6706command and compares the command output in the test with the command’s actual
6707output.")
6708 (license license:gpl2+)))
6709
6710(define-public python2-cram
6711 (package-with-python2 python-cram))
6712
6713(define-public python-straight-plugin
6714 (package
6715 (name "python-straight-plugin")
6716 (version "1.4.1")
6717 (source
6718 (origin
6719 (method url-fetch)
6720 (uri (pypi-uri "straight.plugin" version))
6721 (sha256
6722 (base32
6723 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6724 (build-system python-build-system)
6725 (home-page "https://github.com/ironfroggy/straight.plugin")
6726 (synopsis "Simple namespaced plugin facility")
6727 (description "Straight Plugin provides a type of plugin you can create from
6728almost any existing Python modules, and an easy way for outside developers to
6729add functionality and customization to your projects with their own plugins.")
6730 (license license:expat)))
6731
6732(define-public python2-straight-plugin
6733 (package-with-python2 python-straight-plugin))
6734
6735(define-public python-fonttools
6736 (package
6737 (name "python-fonttools")
1a4bb420 6738 (version "3.38.0")
44d10b1f
RW
6739 (source (origin
6740 (method url-fetch)
6741 (uri (pypi-uri "fonttools" version ".zip"))
6742 (sha256
6743 (base32
1a4bb420 6744 "12ripk3s7skgxr1bs9r8n13r94ym3s8iir7ivfixls9fa4dabmlh"))))
44d10b1f
RW
6745 (build-system python-build-system)
6746 (native-inputs
6747 `(("unzip" ,unzip)
6748 ("python-pytest" ,python-pytest)
6749 ("python-pytest-runner" ,python-pytest-runner)))
6750 (home-page "https://github.com/behdad/fonttools")
6751 (synopsis "Tools to manipulate font files")
6752 (description
6753 "FontTools/TTX is a library to manipulate font files from Python. It
6754supports reading and writing of TrueType/OpenType fonts, reading and writing
6755of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6756also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6757from an XML-based format.")
6758 (license license:expat)))
6759
6760(define-public python2-fonttools
6761 (package-with-python2 python-fonttools))
6762
6763(define-public python-ly
6764 (package
6765 (name "python-ly")
6766 (version "0.9.5")
6767 (source
6768 (origin
6769 (method url-fetch)
6770 (uri (pypi-uri name version))
6771 (sha256
6772 (base32
6773 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
6774 (build-system python-build-system)
6775 (arguments
6776 ;; FIXME: Some tests need network access.
6777 '(#:tests? #f))
6778 (synopsis "Tool and library for manipulating LilyPond files")
6779 (description "This package provides a Python library to parse, manipulate
6780or create documents in LilyPond format. A command line program ly is also
6781provided that can be used to do various manipulations with LilyPond files.")
6782 (home-page "https://pypi.python.org/pypi/python-ly")
6783 (license license:gpl2+)))
6784
6785(define-public python-appdirs
6786 (package
6787 (name "python-appdirs")
6788 (version "1.4.3")
6789 (source
6790 (origin
6791 (method url-fetch)
6792 (uri (pypi-uri "appdirs" version))
6793 (sha256
6794 (base32
6795 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
6796 (build-system python-build-system)
6797 (home-page "https://github.com/ActiveState/appdirs")
6798 (synopsis
6799 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6800 (description
6801 "This module provides a portable way of finding out where user data
6802should be stored on various operating systems.")
6803 (license license:expat)))
6804
6805(define-public python2-appdirs
6806 (package-with-python2 python-appdirs))
6807
6808(define-public python-llfuse
6809 (package
6810 (name "python-llfuse")
6811 (version "1.3.5")
6812 (source (origin
6813 (method url-fetch)
6814 (uri (pypi-uri "llfuse" version ".tar.bz2"))
6815 (sha256
6816 (base32
6817 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
6818 (build-system python-build-system)
6819 (inputs
6820 `(("fuse" ,fuse)
6821 ("attr" ,attr)))
6822 (native-inputs
6823 `(("pkg-config" ,pkg-config)))
6824 (synopsis "Python bindings for FUSE")
6825 (description
6826 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6827 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
6828 (license license:lgpl2.0+)
6829 (properties `((python2-variant . ,(delay python2-llfuse))))))
6830
6831(define-public python2-llfuse
6832 (package (inherit (package-with-python2
6833 (strip-python2-variant python-llfuse)))
6834 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6835
6836;; For attic-0.16
6837(define-public python-llfuse-0.41
6838 (package (inherit python-llfuse)
6839 (version "0.41.1")
6840 (source (origin
6841 (method url-fetch)
6842 (uri (string-append
6843 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6844 "llfuse-" version ".tar.bz2"))
6845 (sha256
6846 (base32
6847 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
6848 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6849 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
6850 (license (list license:expat license:lgpl2.0+))))
6851
6852(define-public python-msgpack
6853 (package
6854 (name "python-msgpack")
6855 (version "0.5.6")
6856 (source (origin
6857 (method url-fetch)
6858 (uri (pypi-uri "msgpack" version))
6859 (sha256
6860 (base32
6861 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
6862 (build-system python-build-system)
6863 (arguments
6864 `(#:modules ((guix build utils)
6865 (guix build python-build-system)
6866 (ice-9 ftw)
6867 (srfi srfi-1)
6868 (srfi srfi-26))
6869 #:phases
6870 (modify-phases %standard-phases
6871 (replace 'check
6872 (lambda _
6873 (let ((cwd (getcwd)))
6874 (setenv "PYTHONPATH"
6875 (string-append cwd "/build/"
6876 (find (cut string-prefix? "lib" <>)
6877 (scandir (string-append cwd "/build")))
6878 ":"
6879 (getenv "PYTHONPATH")))
6880 (invoke "pytest" "-v" "test")))))))
6881 (native-inputs
6882 `(("python-pytest" ,python-pytest)))
6883 (synopsis "MessagePack (de)serializer")
6884 (description "MessagePack is a fast, compact binary serialization format,
6885suitable for similar data to JSON. This package provides CPython bindings for
6886reading and writing MessagePack data.")
6887 (home-page "https://pypi.python.org/pypi/msgpack/")
6888 (license license:asl2.0)))
6889
6890;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
6891;; release 0.5. Some packages like borg still call it by the old name for now.
6892;; <https://bugs.gnu.org/30662>
6893(define-public python-msgpack-transitional
6894 (package
6895 (inherit python-msgpack)
6896 (name "python-msgpack-transitional")
6897 (arguments
6898 (substitute-keyword-arguments (package-arguments python-msgpack)
6899 ((#:phases phases)
6900 `(modify-phases ,phases
6901 (add-after 'unpack 'configure-transitional
6902 (lambda _
6903 ;; Keep using the old name.
6904 (substitute* "setup.py"
6905 (("TRANSITIONAL = False")
6906 "TRANSITIONAL = 1"))
6907 #t))))))))
6908
6909(define-public python2-msgpack
6910 (package-with-python2 python-msgpack))
6911
6912(define-public python-netaddr
6913 (package
6914 (name "python-netaddr")
6915 (version "0.7.19")
6916 (source
6917 (origin
6918 (method url-fetch)
6919 (uri (pypi-uri "netaddr" version))
6920 (sha256
6921 (base32
6922 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
6923 (build-system python-build-system)
6924 (arguments `(#:tests? #f)) ;; No tests.
6925 (home-page "https://github.com/drkjam/netaddr/")
6926 (synopsis "Pythonic manipulation of network addresses")
6927 (description
6928 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6929and MAC network addresses.")
6930 (license license:bsd-3)))
6931
6932(define-public python2-netaddr
6933 (package-with-python2 python-netaddr))
6934
dd85eca0
AG
6935(define-public python2-pyroute2
6936 (package
6937 (name "python2-pyroute2")
6938 (version "0.5.6")
6939 (source
6940 (origin
6941 (method url-fetch)
6942 (uri (pypi-uri "pyroute2" version))
6943 (sha256
6944 (base32
6945 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
6946 (build-system python-build-system)
6947 (arguments
6948 `(#:python ,python-2)) ;Python 3.x is not supported
6949 (home-page "https://github.com/svinota/pyroute2")
6950 (synopsis "Python netlink library")
6951 (description
6952 "Pyroute2 is a pure Python netlink library with minimal dependencies.
6953Supported netlink families and protocols include:
6954@itemize
6955@item rtnl, network settings - addresses, routes, traffic controls
6956@item nfnetlink - netfilter API: ipset, nftables, ...
6957@item ipq - simplest userspace packet filtering, iptables QUEUE target
6958@item devlink - manage and monitor devlink-enabled hardware
6959@item generic - generic netlink families
6960 @itemize
6961 @item nl80211 - wireless functions API (basic support)
6962 @item taskstats - extended process statistics
6963 @item acpi_events - ACPI events monitoring
6964 @item thermal_events - thermal events monitoring
6965 @item VFS_DQUOT - disk quota events monitoring
6966 @end itemize
6967@end itemize")
6968 (license license:gpl2+)))
6969
44d10b1f
RW
6970(define-public python-wrapt
6971 (package
6972 (name "python-wrapt")
dddd7a75 6973 (version "1.11.1")
44d10b1f
RW
6974 (source
6975 (origin
6976 (method url-fetch)
6977 (uri (pypi-uri "wrapt" version))
6978 (sha256
6979 (base32
dddd7a75 6980 "0cqmysny1pz01jw26q48q5zasvns6507rwhgm6wcw743f0r01sja"))))
44d10b1f
RW
6981 (build-system python-build-system)
6982 (arguments
6983 ;; Tests are not included in the tarball, they are only available in the
6984 ;; git repository.
6985 `(#:tests? #f))
6986 (home-page "https://github.com/GrahamDumpleton/wrapt")
6987 (synopsis "Module for decorators, wrappers and monkey patching")
6988 (description
6989 "The aim of the wrapt module is to provide a transparent object proxy for
6990 Python, which can be used as the basis for the construction of function
6991 wrappers and decorator functions.")
6992 (license license:bsd-2)))
6993
6994(define-public python2-wrapt
6995 (package-with-python2 python-wrapt))
6996
6997(define-public python-xlrd
6998 (package
6999 (name "python-xlrd")
7000 (version "1.0.0")
7001 (source (origin
7002 (method url-fetch)
7003 (uri (pypi-uri "xlrd" version))
7004 (sha256
7005 (base32
7006 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
7007 (build-system python-build-system)
7008 (arguments
7009 `(#:phases
7010 (modify-phases %standard-phases
7011 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
7012 ;; run tests instead for now.
45fd0081 7013 (replace 'check (lambda _ (invoke "nosetests"))))))
44d10b1f
RW
7014 (native-inputs `(("python-nose" ,python-nose)))
7015 (home-page "http://www.python-excel.org/")
7016 (synopsis "Library for extracting data from Excel files")
a0909286 7017 (description "This package provides a library to extract data from
44d10b1f
RW
7018spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
7019@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
7020Unicode-aware. It is not intended as an end-user tool.")
7021 (license license:bsd-3)))
7022
7023(define-public python2-xlrd
7024 (package-with-python2 python-xlrd))
7025
7026(define-public python-prettytable
7027 (package
7028 (name "python-prettytable")
7029 (version "0.7.2")
7030 (source
7031 (origin
7032 (method url-fetch)
337c3a1e 7033 (uri (pypi-uri "prettytable" version ".tar.bz2"))
44d10b1f
RW
7034 (sha256
7035 (base32
7036 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7037 (build-system python-build-system)
7038 (home-page "http://code.google.com/p/prettytable/")
7039 (synopsis "Display tabular data in an ASCII table format")
7040 (description
7041 "A library designed to represent tabular data in visually appealing ASCII
7042tables. PrettyTable allows for selection of which columns are to be printed,
7043independent alignment of columns (left or right justified or centred) and
7044printing of sub-tables by specifying a row range.")
7045 (license license:bsd-3)))
7046
7047(define-public python2-prettytable
7048 (package-with-python2 python-prettytable))
7049
7050(define-public python-tables
7051 (package
7052 (name "python-tables")
7053 (version "3.4.4")
7054 (source
7055 (origin
7056 (method url-fetch)
7057 (uri (pypi-uri "tables" version))
7058 (sha256
7059 (base32
7060 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
7061 (modules '((guix build utils)))
7062 (snippet
7063 '(begin
7064 ;; Remove pre-compiled .pyc files from source.
7065 (for-each delete-file-recursively
7066 (find-files "." "__pycache__" #:directories? #t))
7067 (for-each delete-file (find-files "." "\\.pyc$"))
7068 #t))))
7069 (build-system python-build-system)
7070 (arguments
7071 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7072 ;; or "check", so we must override the build and check phases.
7073 #:phases
7074 (modify-phases %standard-phases
7075 (add-after 'unpack 'use-gcc
7076 (lambda _
7077 (substitute* "setup.py"
7078 (("compiler = new_compiler\\(\\)" line)
7079 (string-append line
7080 "\ncompiler.set_executables(compiler='gcc',"
7081 "compiler_so='gcc',"
7082 "linker_exe='gcc',"
7083 "linker_so='gcc -shared')")))
7084 #t))
7085 (replace 'build
7086 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
7087 (invoke "python" "setup.py" "build"
7088 (string-append "--hdf5="
7089 (assoc-ref inputs "hdf5")))))
44d10b1f
RW
7090 (replace 'check
7091 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
7092 (invoke "python" "setup.py" "check"
7093 (string-append "--hdf5="
7094 (assoc-ref inputs "hdf5"))))))))
44d10b1f
RW
7095 (propagated-inputs
7096 `(("python-numexpr" ,python-numexpr)
7097 ("python-numpy" ,python-numpy)))
7098 (native-inputs
7099 `(("python-cython" ,python-cython)
7100 ("pkg-config" ,pkg-config)))
7101 (inputs
7102 `(("hdf5" ,hdf5)
7103 ("bzip2" ,bzip2)
7104 ("zlib" ,zlib)))
7105 (home-page "http://www.pytables.org/")
7106 (synopsis "Hierarchical datasets for Python")
7107 (description "PyTables is a package for managing hierarchical datasets and
7108designed to efficiently cope with extremely large amounts of data.")
7109 (license license:bsd-3)))
7110
7111(define-public python2-tables
7112 (package-with-python2 python-tables))
7113
7114(define-public python-pyasn1
7115 (package
7116 (name "python-pyasn1")
7117 (version "0.4.3")
7118 (source
7119 (origin
7120 (method url-fetch)
7121 (uri (pypi-uri "pyasn1" version))
7122 (sha256
7123 (base32
7124 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
7125 (build-system python-build-system)
7126 (home-page "http://pyasn1.sourceforge.net/")
7127 (synopsis "ASN.1 types and codecs")
7128 (description
7129 "This is an implementation of ASN.1 types and codecs in Python. It is
7130suitable for a wide range of protocols based on the ASN.1 specification.")
7131 (license license:bsd-2)))
7132
7133(define-public python2-pyasn1
7134 (package-with-python2 python-pyasn1))
7135
7136(define-public python-pyasn1-modules
7137 (package
7138 (name "python-pyasn1-modules")
7139 (version "0.2.2")
7140 (source
7141 (origin
7142 (method url-fetch)
7143 (uri (pypi-uri "pyasn1-modules" version))
7144 (sha256
7145 (base32
7146 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
7147 (build-system python-build-system)
7148 (propagated-inputs
7149 `(("python-pyasn1" ,python-pyasn1)))
7150 (home-page "https://sourceforge.net/projects/pyasn1/")
7151 (synopsis "ASN.1 codec implementations")
7152 (description
7153 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7154implementations of ASN.1-based codecs and protocols.")
7155 (license license:bsd-3)))
7156
7157(define-public python2-pyasn1-modules
7158 (package-with-python2 python-pyasn1-modules))
7159
7160(define-public python-ipaddress
7161 (package
7162 (name "python-ipaddress")
7163 (version "1.0.22")
7164 (source (origin
7165 (method url-fetch)
7166 (uri (pypi-uri "ipaddress" version))
7167 (sha256
7168 (base32
7169 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
7170 (build-system python-build-system)
7171 (home-page "https://github.com/phihag/ipaddress")
7172 (synopsis "IP address manipulation library")
7173 (description
7174 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7175 in Python. This library is used to create, poke at, and manipulate IPv4 and
7176 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7177 module to older versions of Python.")
7178 (license license:psfl)))
7179
7180(define-public python2-ipaddress
7181 (package-with-python2 python-ipaddress))
7182
7183(define-public python2-ipaddr
7184 (package
7185 (name "python2-ipaddr")
7186 (version "2.1.11")
7187 (source
7188 (origin
7189 (method url-fetch)
7190 (uri (pypi-uri "ipaddr" version))
7191 (sha256
7192 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7193 (build-system python-build-system)
7194 (arguments
7195 `(#:python ,python-2 ;version 2 only
7196 #:phases
7197 (modify-phases %standard-phases
7198 (replace 'check
40b8c4e3 7199 (lambda _ (invoke "python" "ipaddr_test.py"))))))
44d10b1f
RW
7200 (home-page "https://github.com/google/ipaddr-py")
7201 (synopsis "IP address manipulation library")
7202 (description
7203 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7204IPv6 addresses and networks.
7205
7206For new implementations you may prefer to use the standard module
7207@code{ipaddress}, which was introduced in Python 3.3 and backported to older
7208versions of Python.")
7209 (license license:asl2.0)))
7210
7211(define-public python-idna
7212 (package
7213 (name "python-idna")
e95c9837 7214 (version "2.8")
44d10b1f
RW
7215 (source
7216 (origin
7217 (method url-fetch)
7218 (uri (pypi-uri "idna" version))
7219 (sha256
7220 (base32
e95c9837 7221 "01rlkigdxg17sf9yar1jl8n18ls59367wqh59hnawlyg53vb6my3"))))
44d10b1f
RW
7222 (build-system python-build-system)
7223 (home-page "https://github.com/kjd/idna")
7224 (synopsis "Internationalized domain names in applications")
7225 (description
7226 "This is a library to support the Internationalised Domain Names in
7227Applications (IDNA) protocol as specified in RFC 5891. This version of the
7228protocol is often referred to as “IDNA2008” and can produce different results
7229from the earlier standard from 2003. The library is also intended to act as a
7230suitable drop-in replacement for the “encodings.idna” module that comes with
7231the Python standard library but currently only supports the older 2003
7232specification.")
7233 (license license:bsd-4)))
7234
a76e6a69
JM
7235(define-public python-idna-2.7
7236 (package (inherit python-idna)
7237 (version "2.7")
7238 (source (origin
7239 (method url-fetch)
7240 (uri (pypi-uri "idna" version))
7241 (sha256
7242 (base32
7243 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
7244
7245
44d10b1f
RW
7246(define-public python2-idna
7247 (package-with-python2 python-idna))
7248
7249(define-public python-idna-ssl
7250 (package
7251 (name "python-idna-ssl")
7252 (version "1.0.1")
7253 (source
7254 (origin
7255 (method url-fetch)
7256 (uri (pypi-uri "idna-ssl" version))
7257 (sha256
7258 (base32
7259 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
7260 (build-system python-build-system)
7261 (arguments
7262 `(#:tests? #f)) ;circular dependency with python-aiohttp
7263 (home-page "https://github.com/aio-libs/idna-ssl")
7264 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
7265 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
7266domains support.")
7267 (license license:expat)))
7268
7269(define-public python-pretend
7270 (package
7271 (name "python-pretend")
7272 (version "1.0.9")
7273 (source
7274 (origin
7275 (method url-fetch)
9f1f22ee 7276 (uri (pypi-uri "pretend" version))
44d10b1f
RW
7277 (sha256
7278 (base32
7279 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
7280 (build-system python-build-system)
7281 (home-page "https://github.com/alex/pretend")
7282 (synopsis "Library for stubbing in Python")
7283 (description
7284 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7285technique for writing tests. You may hear the term mixed up with mocks,
7286fakes, or doubles. Basically, a stub is an object that returns pre-canned
7287responses, rather than doing any computation.")
7288 (license license:bsd-3)))
7289
7290(define-public python2-pretend
7291 (package-with-python2 python-pretend))
7292
7293(define-public python-pip
7294 (package
7295 (name "python-pip")
7296 (version "18.1")
7297 (source
7298 (origin
7299 (method url-fetch)
7300 (uri (pypi-uri "pip" version))
7301 (sha256
7302 (base32
7303 "188fclay154s520n43s7cxxlhdaiysvxf19zk8vr1xbyjyyr58n0"))))
7304 (build-system python-build-system)
7305 (arguments
7306 '(#:tests? #f)) ; there are no tests in the pypi archive.
7307 (home-page "https://pip.pypa.io/")
7308 (synopsis "Package manager for Python software")
7309 (description
7310 "Pip is a package manager for Python software, that finds packages on the
7311Python Package Index (PyPI).")
7312 (license license:expat)))
7313
7314(define-public python2-pip
7315 (package-with-python2 python-pip))
7316
7317(define-public python-tlsh
7318 (package
7319 (name "python-tlsh")
7320 (version "3.4.5")
7321 (home-page "https://github.com/trendmicro/tlsh")
3e3ff8ad
TGR
7322 (source
7323 (origin
7324 (method git-fetch)
7325 (uri (git-reference
7326 (url "https://github.com/trendmicro/tlsh.git")
7327 (commit (string-append "v" version))))
7328 (file-name (git-file-name name version))
7329 (sha256
7330 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
44d10b1f
RW
7331 (build-system cmake-build-system)
7332 (arguments
7333 '(#:out-of-source? #f
7334 #:phases (modify-phases %standard-phases
7335 (replace
7336 'install
7337 (lambda* (#:key outputs #:allow-other-keys)
7338 ;; Build and install the Python bindings. The underlying
7339 ;; C++ library is apparently not meant to be installed.
7340 (let ((out (assoc-ref outputs "out")))
7341 (with-directory-excursion "py_ext"
7342 (and (system* "python" "setup.py" "build")
7343 (system* "python" "setup.py" "install"
7344 (string-append "--prefix=" out))))))))))
7345 (inputs `(("python" ,python-wrapper))) ;for the bindings
7346 (synopsis "Fuzzy matching library for Python")
7347 (description
7348 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7349Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7350value which can be used for similarity comparisons. Similar objects have
7351similar hash values, which allows for the detection of similar objects by
7352comparing their hash values. The byte stream should have a sufficient amount
7353of complexity; for example, a byte stream of identical bytes will not generate
7354a hash value.")
7355 (license license:asl2.0)))
7356
7357(define-public python2-tlsh
7358 (package
7359 (inherit python-tlsh)
7360 (name "python2-tlsh")
7361 (inputs `(("python" ,python-2)))))
7362
7363(define-public python-termcolor
7364 (package
7365 (name "python-termcolor")
7366 (version "1.1.0")
7367 (source
7368 (origin
7369 (method url-fetch)
7370 (uri (pypi-uri "termcolor" version))
7371 (sha256
7372 (base32
7373 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7374 (build-system python-build-system)
7375 (arguments
7376 ;; There are no tests.
7377 `(#:tests? #f))
7378 (home-page "https://pypi.python.org/pypi/termcolor")
7379 (synopsis "ANSII Color formatting for terminal output")
7380 (description
7381 "This package provides ANSII Color formatting for output in terminals.")
7382 (license license:expat)))
7383
7384(define-public python2-termcolor
7385 (package-with-python2 python-termcolor))
7386
7387(define-public python-libarchive-c
7388 (package
7389 (name "python-libarchive-c")
7390 (version "2.8")
7391 (source (origin
7392 (method url-fetch)
7393 (uri (pypi-uri "libarchive-c" version))
7394 (sha256
7395 (base32
7396 "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06"))))
7397 (build-system python-build-system)
7398 (arguments
7399 '(#:phases (modify-phases %standard-phases
7400 (add-before
7401 'build 'reference-libarchive
7402 (lambda* (#:key inputs #:allow-other-keys)
7403 ;; Retain the absolute file name of libarchive.so.
7404 (let ((libarchive (assoc-ref inputs "libarchive")))
7405 (substitute* "libarchive/ffi.py"
7406 (("find_library\\('archive'\\)")
7407 (string-append "'" libarchive
7408 "/lib/libarchive.so'"))))))
7409 (replace 'check
7410 (lambda _ (invoke "pytest" "-vv"))))))
7411 (native-inputs
7412 `(("python-mock" ,python-mock)
7413 ("python-pytest" ,python-pytest)))
7414 (inputs
7415 `(("libarchive" ,libarchive)))
7416 (home-page "https://github.com/Changaco/python-libarchive-c")
7417 (synopsis "Python interface to libarchive")
7418 (description
7419 "This package provides Python bindings to libarchive, a C library to
7420access possibly compressed archives in many different formats. It uses
7421Python's @code{ctypes} foreign function interface (FFI).")
7422 (license license:lgpl2.0+)))
7423
7424(define-public python2-libarchive-c
7425 (package-with-python2 python-libarchive-c))
7426
7427(define-public python-file
7428 (package
7429 (inherit file)
7430 (name "python-file")
7431 (build-system python-build-system)
7432 (arguments
7433 '(#:tests? #f ;no tests
7434 #:configure-flags '("--single-version-externally-managed" "--root=/")
7435 #:phases (modify-phases %standard-phases
7436 (add-before 'build 'change-directory
7437 (lambda _
7438 (chdir "python")
7439 #t))
7440 (add-before 'build 'set-library-file-name
7441 (lambda* (#:key inputs #:allow-other-keys)
7442 (let ((file (assoc-ref inputs "file")))
7443 (substitute* "magic.py"
7444 (("find_library\\('magic'\\)")
7445 (string-append "'" file "/lib/libmagic.so'")))
7446 #t))))))
7447 (inputs `(("file" ,file)))
528ea990
LC
7448 (native-inputs (if (%current-target-system)
7449 `(("self" ,this-package))
7450 '()))
44d10b1f
RW
7451 (synopsis "Python bindings to the libmagic file type guesser. Note that
7452this module and the python-magic module both provide a \"magic.py\" file;
7453these two modules, which are different and were developed separately, both
7454serve the same purpose: provide Python bindings for libmagic.")))
7455
7456(define-public python2-file
7457 (package-with-python2 python-file))
7458
7459(define-public python-debian
7460 (package
7461 (name "python-debian")
7462 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
7463 (version "0.1.28")
7464 (source
7465 (origin
7466 (method url-fetch)
7467 (uri (pypi-uri name version))
7468 (sha256
7469 (base32
7470 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
7471 (build-system python-build-system)
7472 (propagated-inputs
7473 `(("python-six" ,python-six)))
7474 (synopsis "Debian package related modules")
7475 (description
7476 ;; XXX: Use @enumerate instead of @itemize to work around
7477 ;; <http://bugs.gnu.org/21772>.
7478 "This package provides Python modules that abstract many formats of
7479Debian-related files, such as:
7480
7481@enumerate
7482@item Debtags information;
7483@item @file{debian/changelog} files;
7484@item packages files, pdiffs;
7485@item control files of single or multiple RFC822-style paragraphs---e.g.
7486 @file{debian/control}, @file{.changes}, @file{.dsc};
7487@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7488 contained files and meta-information.
7489@end enumerate\n")
7490
7491 ;; Modules are either GPLv2+ or GPLv3+.
7492 (license license:gpl3+)))
7493
7494(define-public python2-debian
7495 (package-with-python2 python-debian))
7496
7497(define-public python-nbformat
7498 (package
7499 (name "python-nbformat")
7500 (version "4.4.0")
7501 (source
7502 (origin
7503 (method url-fetch)
7504 (uri (pypi-uri "nbformat" version))
7505 (sha256
7506 (base32
7507 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
7508 (build-system python-build-system)
7509 (arguments `(#:tests? #f)) ; no test target
7510 (propagated-inputs
7511 `(("python-ipython-genutils" ,python-ipython-genutils)
7512 ("python-jsonschema" ,python-jsonschema)
7513 ("python-jupyter-core" ,python-jupyter-core)
7514 ("python-traitlets" ,python-traitlets)))
7515 (home-page "http://jupyter.org")
7516 (synopsis "Jupyter Notebook format")
7517 (description "This package provides the reference implementation of the
7518Jupyter Notebook format and Python APIs for working with notebooks.")
7519 (license license:bsd-3)))
7520
7521(define-public python2-nbformat
7522 (package-with-python2 python-nbformat))
7523
7524(define-public python-bleach
7525 (package
7526 (name "python-bleach")
7527 (version "1.4.3")
7528 (source
7529 (origin
7530 (method url-fetch)
7531 (uri (pypi-uri "bleach" version))
7532 (sha256
7533 (base32
7534 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
7535 (build-system python-build-system)
7536 (propagated-inputs
7537 `(("python-html5lib" ,python-html5lib-0.9)
7538 ("python-six" ,python-six)))
7539 (native-inputs
7540 `(("python-nose" ,python-nose)))
7541 (home-page "https://github.com/jsocol/bleach")
7542 (synopsis "Whitelist-based HTML-sanitizing tool")
7543 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7544 (license license:asl2.0)))
7545
7546(define-public python2-bleach
7547 (package-with-python2 python-bleach))
7548
7549(define-public python-entrypoints
7550 (package
7551 (name "python-entrypoints")
a7f1b718 7552 (version "0.3")
44d10b1f
RW
7553 (source
7554 (origin
7555 (method url-fetch)
a7f1b718 7556 (uri (pypi-uri "entrypoints" version))
44d10b1f
RW
7557 (sha256
7558 (base32
a7f1b718 7559 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
44d10b1f
RW
7560 (build-system python-build-system)
7561 ;; The package does not come with a setup.py file, so we have to generate
7562 ;; one ourselves.
7563 (arguments
7564 `(#:tests? #f
7565 #:phases
7566 (modify-phases %standard-phases
7567 (add-after 'unpack 'create-setup.py
7568 (lambda _
7569 (call-with-output-file "setup.py"
7570 (lambda (port)
7571 (format port "\
7572from setuptools import setup
7573setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7574" ,version))))))))
7575 (home-page "https://github.com/takluyver/entrypoints")
7576 (synopsis "Discover and load entry points from installed Python packages")
7577 (description "Entry points are a way for Python packages to advertise
7578objects with some common interface. The most common examples are
7579@code{console_scripts} entry points, which define shell commands by
7580identifying a Python function to run. The @code{entrypoints} module contains
7581functions to find and load entry points.")
7582 (license license:expat)))
7583
7584(define-public python2-entrypoints
7585 (package-with-python2 python-entrypoints))
7586
7587(define-public python-nbconvert
7588 (package
7589 (name "python-nbconvert")
7590 (version "5.0.0b1")
7591 (source
7592 (origin
7593 (method url-fetch)
7594 (uri (pypi-uri "nbconvert" version))
7595 (sha256
7596 (base32
7597 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7598 (build-system python-build-system)
7599 (arguments
7600 `(;; The "bdist_egg" target is disabled by default, causing the installation
7601 ;; to fail.
7602 #:configure-flags (list "bdist_egg")
7603 ;; FIXME: 5 failures, 40 errors.
7604 #:tests? #f))
7605 ;; #:phases
7606 ;; (modify-phases %standard-phases
7607 ;; (replace 'check
7608 ;; (lambda _
7609 ;; (zero? (system* "py.test" "-v")))))
7610 (native-inputs
7611 `(("python-pytest" ,python-pytest)))
7612 (propagated-inputs
7613 `(("python-bleach" ,python-bleach)
7614 ("python-entrypoints" ,python-entrypoints)
7615 ("python-jinja2" ,python-jinja2)
7616 ("python-jupyter-core" ,python-jupyter-core)
7617 ("python-mistune" ,python-mistune)
7618 ("python-nbformat" ,python-nbformat)
7619 ("python-pygments" ,python-pygments)
7620 ("python-traitlets" ,python-traitlets)))
7621 (home-page "http://jupyter.org")
7622 (synopsis "Converting Jupyter Notebooks")
7623 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7624notebooks to various other formats via Jinja templates. It allows you to
7625convert an @code{.ipynb} notebook file into various static formats including:
7626
7627@enumerate
7628@item HTML
7629@item LaTeX
7630@item PDF
7631@item Reveal JS
7632@item Markdown (md)
7633@item ReStructured Text (rst)
7634@item executable script
7635@end enumerate\n")
7636 (license license:bsd-3)))
7637
7638(define-public python2-nbconvert
7639 (package-with-python2 python-nbconvert))
7640
44d10b1f
RW
7641(define-public python-notebook
7642 (package
7643 (name "python-notebook")
7644 (version "5.7.4")
7645 (source (origin
7646 (method url-fetch)
7647 (uri (pypi-uri "notebook" version))
7648 (sha256
7649 (base32
7650 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
7651 (build-system python-build-system)
7652 (arguments
7653 `(#:phases
7654 (modify-phases %standard-phases
7655 (replace 'check
7656 (lambda _
7657 ;; These tests require a browser
7658 (delete-file-recursively "notebook/tests/selenium")
7659 ;; Some tests need HOME
7660 (setenv "HOME" "/tmp")
7661 ;; This file contains "warningfilters", which are not supported
7662 ;; by this version of nose.
7663 (delete-file "setup.cfg")
7664 (with-directory-excursion "/tmp"
7665 (invoke "nosetests" "-v"))
7666 #t)))))
7667 (propagated-inputs
7668 `(("python-jupyter-core" ,python-jupyter-core)
7669 ("python-nbformat" ,python-nbformat)
7670 ("python-nbconvert" ,python-nbconvert)
7671 ("python-prometheus-client" ,python-prometheus-client)
7672 ("python-send2trash" ,python-send2trash)
7673 ("python-terminado" ,python-terminado)))
7674 (native-inputs
7675 `(("python-nose" ,python-nose)
7676 ("python-sphinx" ,python-sphinx)
7677 ("python-requests" ,python-requests)))
7678 (home-page "http://jupyter.org/")
7679 (synopsis "Web-based notebook environment for interactive computing")
7680 (description
7681 "The Jupyter HTML notebook is a web-based notebook environment for
7682interactive computing.")
7683 (properties `((python2-variant . ,(delay python2-notebook))))
7684 (license license:bsd-3)))
7685
7686(define-public python2-notebook
7687 (let ((base (package-with-python2
7688 (strip-python2-variant python-notebook))))
7689 (package (inherit base)
7690 (native-inputs
7691 `(("python2-mock" ,python2-mock)
7692 ,@(package-native-inputs base)))
7693 (arguments
7694 (substitute-keyword-arguments (package-arguments base)
7695 ((#:phases phases)
7696 `(modify-phases ,phases
7697 (add-before 'check 'disable-test-case
7698 ;; The test requires network access to localhost. Curiously it
7699 ;; fails with Python 2 only. Simply make the test-case return
7700 ;; immediately.
7701 (lambda _
7702 (substitute*
7703 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7704 (("formats = self.nbconvert_api") "return #")))))))))))
7705
7706(define-public python-widgetsnbextension
7707 (package
7708 (name "python-widgetsnbextension")
7709 (version "3.4.2")
7710 (source
7711 (origin
7712 (method url-fetch)
7713 (uri (pypi-uri "widgetsnbextension" version))
7714 (sha256
7715 (base32
7716 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
7717 (build-system python-build-system)
7718 (propagated-inputs
7719 `(("python-ipykernel" ,python-ipykernel)
7720 ("python-notebook" ,python-notebook)))
7721 (native-inputs
7722 `(("python-certifi" ,python-certifi)
7723 ("python-nose" ,python-nose)))
7724 (home-page "https://ipython.org")
7725 (synopsis "IPython HTML widgets for Jupyter")
7726 (description "This package provides interactive HTML widgets for Jupyter
7727notebooks.")
7728 (license license:bsd-3)))
7729
7730(define-public python2-widgetsnbextension
7731 (package-with-python2 python-widgetsnbextension))
7732
7733(define-public python-ipywidgets
7734 (package
7735 (name "python-ipywidgets")
7736 (version "5.2.2")
7737 (source
7738 (origin
7739 (method url-fetch)
7740 (uri (pypi-uri "ipywidgets" version))
7741 (sha256
7742 (base32
7743 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7744 (build-system python-build-system)
7745 (propagated-inputs
7746 `(("python-ipython" ,python-ipython)
7747 ("python-traitlets" ,python-traitlets)
7748 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7749 (native-inputs
7750 `(("python-nose" ,python-nose)
7751 ("python-pytest" ,python-pytest)))
7752 (home-page "https://ipython.org")
7753 (synopsis "IPython HTML widgets for Jupyter")
7754 (description "Ipywidgets are interactive HTML widgets for Jupyter
7755notebooks and the IPython kernel. Notebooks come alive when interactive
7756widgets are used. Users gain control of their data and can visualize changes
7757in the data.")
7758 (license license:bsd-3)))
7759
7760(define-public python2-ipywidgets
7761 (package-with-python2 python-ipywidgets))
7762
7763(define-public python-jupyter-console
7764 (package
7765 (name "python-jupyter-console")
becb9cbf 7766 (version "6.0.0")
44d10b1f
RW
7767 (source
7768 (origin
7769 (method url-fetch)
7770 (uri (pypi-uri "jupyter_console" version))
7771 (sha256
7772 (base32
becb9cbf 7773 "1xdjw11cppf1fxvwkw2bk13ckkwas3bdah8baingn9296mvfi31h"))))
44d10b1f 7774 (build-system python-build-system)
44d10b1f
RW
7775 (propagated-inputs
7776 `(("python-ipykernel" ,python-ipykernel)
7777 ("python-jupyter-client" ,python-jupyter-client)
becb9cbf 7778 ("python-prompt-toolkit" ,python-prompt-toolkit)
44d10b1f
RW
7779 ("python-pygments" ,python-pygments)))
7780 (native-inputs
7781 `(("python-nose" ,python-nose)))
7782 (home-page "https://jupyter.org")
7783 (synopsis "Jupyter terminal console")
7784 (description "This package provides a terminal-based console frontend for
7785Jupyter kernels. It also allows for console-based interaction with non-Python
7786Jupyter kernels such as IJulia and IRKernel.")
7787 (license license:bsd-3)))
7788
7789(define-public python2-jupyter-console
8e590c81
RW
7790 (package
7791 (name "python2-jupyter-console")
7792 (version "5.2.0")
7793 (source
7794 (origin
7795 (method url-fetch)
7796 (uri (pypi-uri "jupyter_console" version))
7797 (sha256
7798 (base32
7799 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
7800 (build-system python-build-system)
7801 ;; Tests only run in an TTY.
7802 (arguments `(#:tests? #f))
7803 (propagated-inputs
7804 `(("python2-ipykernel" ,python2-ipykernel)
7805 ("python2-jupyter-client" ,python2-jupyter-client)
7806 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
7807 ("python2-pygments" ,python2-pygments)))
7808 (native-inputs
7809 `(("python2-nose" ,python2-nose)))
7810 (home-page "https://jupyter.org")
7811 (synopsis "Jupyter terminal console")
7812 (description "This package provides a terminal-based console frontend for
7813Jupyter kernels. It also allows for console-based interaction with non-Python
7814Jupyter kernels such as IJulia and IRKernel.")
7815 (license license:bsd-3)))
44d10b1f
RW
7816
7817;; The python-ipython and python-jupyter-console require each other. To get
7818;; the functionality in both packages working, strip down the
7819;; python-jupyter-console package when using it as an input to python-ipython.
7820(define python-jupyter-console-minimal
7821 (package
7822 (inherit python-jupyter-console)
7823 (name "python-jupyter-console-minimal")
7824 (arguments
7825 (substitute-keyword-arguments
7826 (package-arguments python-jupyter-console)
7827 ((#:phases phases)
7828 `(modify-phases ,phases
7829 (add-after 'install 'delete-bin
7830 (lambda* (#:key outputs #:allow-other-keys)
7831 ;; Delete the bin files, to avoid conflicts in profiles
7832 ;; where python-ipython and python-jupyter-console are
7833 ;; both present.
7834 (delete-file-recursively
7835 (string-append
7836 (assoc-ref outputs "out") "/bin"))))))))
7837 ;; Remove the python-ipython propagated input, to avoid the cycle
7838 (propagated-inputs
7839 (alist-delete
7840 "python-ipython"
7841 (package-propagated-inputs python-jupyter-console)))))
7842
7843(define-public python-qtconsole
7844 (package
7845 (name "python-qtconsole")
7846 (version "4.4.3")
7847 (source
7848 (origin
7849 (method url-fetch)
7850 (uri (pypi-uri "qtconsole" version))
7851 (sha256
7852 (base32
7853 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
7854 (build-system python-build-system)
7855 (arguments
7856 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
7857 ;; but we only have the LTS version 5.x. This means that there might be
7858 ;; runtime errors, but since this is a dependency of the Jupyter package,
7859 ;; and Jupyter can be used without the qtconsole we can overlook this for
7860 ;; now.
7861 `(#:tests? #f
7862 #:phases
7863 (modify-phases %standard-phases
7864 (add-before 'check 'pre-check
7865 (lambda _
7866 (setenv "QT_QPA_PLATFORM" "offscreen")
7867 #t)))))
7868 (propagated-inputs
7869 `(("python-ipykernel" ,python-ipykernel)
7870 ("python-ipython" ,python-ipython)))
7871 (native-inputs
7872 `(("python-pytest" ,python-pytest)))
7873 (home-page "http://jupyter.org")
7874 (synopsis "Jupyter Qt console")
7875 (description "This package provides a Qt-based console for Jupyter with
7876support for rich media output.")
7877 (license license:bsd-3)))
7878
7879(define-public jupyter
7880 (package
7881 (name "jupyter")
7882 (version "1.0.0")
7883 (source
7884 (origin
7885 (method url-fetch)
7886 (uri (pypi-uri "jupyter" version))
7887 (sha256
7888 (base32
7889 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
7890 (build-system python-build-system)
7891 (arguments '(#:tests? #f)) ; there are none.
7892 (propagated-inputs
7893 `(("python-ipykernel" ,python-ipykernel)
7894 ("python-ipywidgets" ,python-ipywidgets)
7895 ("python-jupyter-console" ,python-jupyter-console)
7896 ("python-nbconvert" ,python-nbconvert)
7897 ("python-notebook" ,python-notebook)
7898 ("python-qtconsole" ,python-qtconsole)))
7899 (native-search-paths
7900 (list (search-path-specification
7901 (variable "JUPYTER_PATH")
7902 (files '("share/jupyter")))))
7903 (home-page "https://jupyter.org")
7904 (synopsis "Web application for interactive documents")
7905 (description
7906 "The Jupyter Notebook is a web application that allows you to create and
7907share documents that contain live code, equations, visualizations and
7908explanatory text. Uses include: data cleaning and transformation, numerical
7909simulation, statistical modeling, machine learning and much more.")
7910 (license license:bsd-3)))
7911
7912(define-public python-chardet
7913 (package
7914 (name "python-chardet")
7915 (version "3.0.4")
7916 (source
7917 (origin
7918 (method url-fetch)
7919 (uri (pypi-uri "chardet" version))
7920 (sha256
7921 (base32
7922 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
7923 (native-inputs
7924 `(("python-hypothesis" ,python-hypothesis)
7925 ("python-pytest" ,python-pytest)
7926 ("python-pytest-runner" ,python-pytest-runner)))
7927 (build-system python-build-system)
3d369407
MB
7928 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
7929 (arguments `(#:tests? #f))
44d10b1f
RW
7930 (home-page "https://github.com/chardet/chardet")
7931 (synopsis "Universal encoding detector for Python 2 and 3")
7932 (description
7933 "This package provides @code{chardet}, a Python module that can
7934automatically detect a wide range of file encodings.")
7935 (license license:lgpl2.1+)))
7936
7937(define-public python2-chardet
7938 (package-with-python2 python-chardet))
7939
7940(define-public python-docopt
7941 (package
7942 (name "python-docopt")
7943 (version "0.6.2")
7944 (source
7945 (origin
7946 (method url-fetch)
7947 ;; The release on PyPI does not include tests.
7948 (uri (string-append
7949 "https://github.com/docopt/docopt/archive/"
7950 version ".tar.gz"))
7951 (file-name (string-append name "-" version ".tar.gz"))
7952 (sha256
7953 (base32
7954 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
7955 (build-system python-build-system)
7956 (native-inputs
7957 `(("python-pytest" ,python-pytest)))
7958 (arguments
7959 `(#:phases
7960 (modify-phases %standard-phases
7961 (replace 'check
7962 (lambda _ (invoke "py.test"))))))
7963 (home-page "http://docopt.org")
7964 (synopsis "Command-line interface description language for Python")
7965 (description "This library allows the user to define a command-line
7966interface from a program's help message rather than specifying it
4ca7207b 7967programmatically with command-line parsers like @code{getopt} and
44d10b1f
RW
7968@code{argparse}.")
7969 (license license:expat)))
7970
7971(define-public python2-docopt
7972 (package-with-python2 python-docopt))
7973
7974(define-public python-pythondialog
7975 (package
7976 (name "python-pythondialog")
7977 (version "3.4.0")
7978 (source
7979 (origin
7980 (method url-fetch)
7981 (uri (pypi-uri "pythondialog" version))
7982 (sha256
7983 (base32
7984 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
7985 (build-system python-build-system)
7986 (arguments
7987 `(#:phases
7988 (modify-phases %standard-phases
7989 (add-after 'unpack 'patch-path
7990 (lambda* (#:key inputs #:allow-other-keys)
7991 (let* ((dialog (assoc-ref inputs "dialog")))
7992 ;; Since this library really wants to grovel the search path, we
7993 ;; must hardcode dialog's store path into it.
7994 (substitute* "dialog.py"
7995 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
7996 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
7997 #t))))
7998 #:tests? #f)) ; no test suite
7999 (propagated-inputs
8000 `(("dialog" ,dialog)))
8001 (home-page "http://pythondialog.sourceforge.net/")
8002 (synopsis "Python interface to the UNIX dialog utility")
8003 (description "A Python wrapper for the dialog utility. Its purpose is to
8004provide an easy to use, pythonic and comprehensive Python interface to dialog.
8005This allows one to make simple text-mode user interfaces on Unix-like systems")
8006 (license license:lgpl2.1)
8007 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8008
8009(define-public python2-pythondialog
8010 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8011 (package
8012 (inherit base)
8013 (version (package-version python-pythondialog))
8014 (source (origin
8015 (method url-fetch)
8016 (uri (pypi-uri "python2-pythondialog" version))
8017 (sha256
8018 (base32
8019 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
8020
8021(define-public python-configobj
8022 (package
8023 (name "python-configobj")
8024 (version "5.0.6")
8025 (source (origin
8026 (method url-fetch)
b0758fbb 8027 (uri (pypi-uri "configobj" version))
44d10b1f
RW
8028 (sha256
8029 (base32
8030 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8031 ;; Patch setup.py so it looks for python-setuptools, which is
8032 ;; required to parse the keyword 'install_requires' in setup.py.
8033 (patches (search-patches "python-configobj-setuptools.patch"))))
8034 (build-system python-build-system)
8035 (propagated-inputs
8036 `(("python-six" ,python-six)))
8037 (synopsis "Config file reading, writing and validation")
8038 (description "ConfigObj is a simple but powerful config file reader and
8039writer: an ini file round tripper. Its main feature is that it is very easy to
8040use, with a straightforward programmer’s interface and a simple syntax for
8041config files.")
8042 (home-page "https://github.com/DiffSK/configobj")
8043 (license license:bsd-3)))
8044
8045(define-public python2-configobj
8046 (package-with-python2 python-configobj))
8047
8048(define-public python-configargparse
8049 (package
8050 (name "python-configargparse")
86ae491f 8051 (version "0.14.0")
44d10b1f
RW
8052 (source (origin
8053 (method url-fetch)
8054 (uri (pypi-uri "ConfigArgParse" version))
8055 (sha256
8056 (base32
86ae491f 8057 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
44d10b1f
RW
8058 (build-system python-build-system)
8059 (native-inputs
8060 `(("python-pyyaml" ,python-pyyaml)))
8061 (arguments
8062 `(#:phases
8063 (modify-phases %standard-phases
8064 (replace 'check
8065 (lambda _
8066 ;; Bypass setuptools-shim because one test relies on "setup.py"
8067 ;; being the first argument passed to the python call.
8068 ;;
8069 ;; NOTE: Many tests do not run because they rely on Python's
8070 ;; built-in test.test_argparse, but we remove the unit tests from
8071 ;; our Python installation.
8072 (invoke "python" "setup.py" "test"))))))
8073 (synopsis "Replacement for argparse")
8074 (description "A drop-in replacement for argparse that allows options to also
8075be set via config files and/or environment variables.")
8076 (home-page "https://github.com/bw2/ConfigArgParse")
8077 (license license:expat)))
8078
8079(define-public python2-configargparse
8080 (package-with-python2 python-configargparse))
8081
8082(define-public python-argparse-manpage
8083 (package
8084 (name "python-argparse-manpage")
8085 (version "1.1")
8086 (source
8087 (origin
8088 (method url-fetch)
8089 (uri (pypi-uri "argparse-manpage" version))
8090 (sha256
8091 (base32
8092 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
8093 (build-system python-build-system)
8094 (home-page "https://github.com/praiskup/argparse-manpage")
8095 (synopsis "Build manual page from Python's ArgumentParser object")
8096 (description
8097 "This package provides tools to build manual pages from Python's
8098@code{ArgumentParser} object.")
8099 (license license:asl2.0)))
8100
3e8f76d8
RW
8101(define-public python-contextlib2
8102 (package
8103 (name "python-contextlib2")
8104 (version "0.5.5")
8105 (source
8106 (origin
8107 (method url-fetch)
8108 (uri (pypi-uri "contextlib2" version))
8109 (sha256
8110 (base32
8111 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8112 (build-system python-build-system)
8113 (home-page "http://contextlib2.readthedocs.org/")
8114 (synopsis "Tools for decorators and context managers")
8115 (description "This module is primarily a backport of the Python
81163.2 contextlib to earlier Python versions. Like contextlib, it
8117provides utilities for common tasks involving decorators and context
8118managers. It also contains additional features that are not part of
8119the standard library.")
8120 (license license:psfl)))
8121
44d10b1f
RW
8122(define-public python2-contextlib2
8123 (package
8124 (name "python2-contextlib2")
8125 (version "0.5.5")
8126 (source
8127 (origin
8128 (method url-fetch)
8129 (uri (pypi-uri "contextlib2" version))
8130 (sha256
8131 (base32
8132 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8133 (build-system python-build-system)
8134 (arguments
8135 `(#:python ,python-2
8136 #:phases
8137 (modify-phases %standard-phases
8138 (replace 'check
8139 (lambda _ (invoke "python" "test_contextlib2.py" "-v"))))))
8140 (native-inputs
8141 `(("python2-unittest2" ,python2-unittest2)))
8142 (home-page "http://contextlib2.readthedocs.org/")
8143 (synopsis "Tools for decorators and context managers")
8144 (description "This module is primarily a backport of the Python
81453.2 contextlib to earlier Python versions. Like contextlib, it
8146provides utilities for common tasks involving decorators and context
8147managers. It also contains additional features that are not part of
8148the standard library.")
8149 (license license:psfl)))
8150
8151(define-public python-texttable
8152 (package
8153 (name "python-texttable")
52cc4892 8154 (version "0.9.1")
44d10b1f
RW
8155 (source
8156 (origin
8157 (method url-fetch)
8158 (uri (pypi-uri "texttable" version))
8159 (sha256
8160 (base32
52cc4892 8161 "0yawv64c0zbawwv6zz84whb32fnb2n9jylwjcfsrcdgh7xvl340i"))))
44d10b1f
RW
8162 (build-system python-build-system)
8163 (arguments '(#:tests? #f)) ; no tests
8164 (home-page "https://github.com/foutaise/texttable/")
8165 (synopsis "Python module for creating simple ASCII tables")
8166 (description "Texttable is a Python module for creating simple ASCII
8167tables.")
8168 (license license:lgpl2.1+)))
8169
8170(define-public python2-texttable
8171 (package-with-python2 python-texttable))
8172
8173(define-public python-atomicwrites
8174 (package
8175 (name "python-atomicwrites")
14f10479 8176 (version "1.3.0")
44d10b1f
RW
8177 (source (origin
8178 (method url-fetch)
8179 (uri (pypi-uri "atomicwrites" version))
8180 (sha256
8181 (base32
14f10479 8182 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
44d10b1f
RW
8183 (build-system python-build-system)
8184 (synopsis "Atomic file writes in Python")
8185 (description "Library for atomic file writes using platform dependent tools
8186for atomic file system operations.")
8187 (home-page "https://github.com/untitaker/python-atomicwrites")
8188 (license license:expat)))
8189
8190(define-public python2-atomicwrites
8191 (package-with-python2 python-atomicwrites))
8192
8193(define-public python-click-threading
8194 (package
8195 (name "python-click-threading")
8196 (version "0.4.4")
8197 (source (origin
8198 (method url-fetch)
8199 (uri (pypi-uri "click-threading" version))
8200 (sha256
8201 (base32
8202 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
8203 (build-system python-build-system)
8204 (propagated-inputs
8205 `(("python-click" ,python-click)))
8206 (synopsis "Utilities for multithreading in Click")
8207 (description "This package provides utilities for multithreading in Click
8208applications.")
8209 (home-page "https://github.com/click-contrib/click-threading")
8210 (license license:expat)))
8211
8212(define-public python-click-log
8213 (package
8214 (name "python-click-log")
8215 (version "0.3.2")
8216 (source (origin
8217 (method url-fetch)
8218 (uri (pypi-uri "click-log" version))
8219 (sha256
8220 (base32
8221 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
8222 (build-system python-build-system)
8223 (propagated-inputs
8224 `(("python-click" ,python-click)))
8225 (synopsis "Logging for click applications")
8226 (description "This package provides a Python library for logging Click
8227applications.")
8228 (home-page "https://github.com/click-contrib/click-log")
8229 (license license:expat)))
8230
8231(define-public python-apipkg
8232 (package
8233 (name "python-apipkg")
8234 (version "1.4")
8235 (source (origin
8236 (method url-fetch)
8237 (uri (pypi-uri "apipkg" version))
8238 (sha256
8239 (base32
8240 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8241 (build-system python-build-system)
8242 (native-inputs
8243 `(("python-pytest" ,python-pytest)))
8244 (synopsis "Namespace control and lazy-import mechanism")
8245 (description "With apipkg you can control the exported namespace of a Python
8246package and greatly reduce the number of imports for your users. It is a small
8247pure Python module that works on virtually all Python versions.")
8248 (home-page "https://github.com/pytest-dev/apipkg")
8249 (license license:expat)))
8250
8251(define-public python2-apipkg
8252 (package-with-python2 python-apipkg))
8253
8254(define-public python-execnet
8255 (package
8256 (name "python-execnet")
8257 (version "1.4.1")
8258 (source (origin
8259 (method url-fetch)
8260 (uri (pypi-uri "execnet" version))
8261 (sha256
8262 (base32
8263 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8264 (build-system python-build-system)
8265 (arguments
8266 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8267 ;; The two test failures are caused by the lack of an `ssh` executable.
8268 ;; The test suite can be run with pytest after the 'install' phase.
8269 #:tests? #f))
8270 (native-inputs
8271 `(("python-pytest" ,python-pytest)
8272 ("python-setuptools-scm" ,python-setuptools-scm)))
8273 (propagated-inputs
8274 `(("python-apipkg" ,python-apipkg)))
8275 (synopsis "Rapid multi-Python deployment")
8276 (description "Execnet provides a share-nothing model with
8277channel-send/receive communication for distributing execution across many
8278Python interpreters across version, platform and network barriers. It has a
8279minimal and fast API targeting the following uses:
8280@enumerate
8281@item distribute tasks to (many) local or remote CPUs
8282@item write and deploy hybrid multi-process applications
8283@item write scripts to administer multiple environments
8284@end enumerate")
8285 (home-page "http://codespeak.net/execnet/")
8286 (license license:expat)))
8287
8288(define-public python2-execnet
8289 (package-with-python2 python-execnet))
8290
8291(define-public python-icalendar
8292 (package
8293 (name "python-icalendar")
8294 (version "4.0.3")
8295 (source (origin
8296 (method url-fetch)
8297 (uri (pypi-uri "icalendar" version))
8298 (sha256
8299 (base32
8300 "0mk3dk1dxkcm46jy48v27j2w2349iv4sbimqj1yb5js43mx49hh7"))))
8301 (build-system python-build-system)
8302 (propagated-inputs
8303 `(("python-dateutil" ,python-dateutil)
8304 ("python-pytz" ,python-pytz)))
8305 (synopsis "Python library for parsing iCalendar files")
8306 (description "The icalendar package is a parser/generator of iCalendar
8307files for use with Python.")
8308 (home-page "https://github.com/collective/icalendar")
8309 (license license:bsd-2)))
8310
44d10b1f
RW
8311(define-public python-args
8312 (package
8313 (name "python-args")
8314 (version "0.1.0")
8315 (source (origin
8316 (method url-fetch)
8317 (uri (pypi-uri "args" version))
8318 (sha256
8319 (base32
8320 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8321 (build-system python-build-system)
8322 (home-page "https://github.com/kennethreitz/args")
8323 (synopsis "Command-line argument parser")
8324 (description
8325 "This library provides a Python module to parse command-line arguments.")
8326 (license license:bsd-3)))
8327
8328(define-public python2-args
8329 (package-with-python2 python-args))
8330
8331(define-public python-clint
8332 (package
8333 (name "python-clint")
8334 (version "0.5.1")
8335 (source (origin
8336 (method url-fetch)
8337 (uri (pypi-uri "clint" version))
8338 (sha256
8339 (base32
8340 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8341 (build-system python-build-system)
8342 (arguments
8343 '(#:phases
8344 (modify-phases %standard-phases
8345 (replace 'check
8346 (lambda _ (invoke "py.test" "-v"))))))
8347 (native-inputs
8348 `(("python-pytest" ,python-pytest)))
8349 (propagated-inputs
8350 `(("python-args" ,python-args)))
8351 (home-page "https://github.com/kennethreitz/clint")
8352 (synopsis "Command-line interface tools")
8353 (description
8354 "Clint is a Python module filled with a set of tools for developing
8355command-line applications, including tools for colored and indented
8356output, progress bar display, and pipes.")
8357 (license license:isc)))
8358
8359(define-public python2-clint
8360 (package-with-python2 python-clint))
8361
44d10b1f
RW
8362(define-public python-rply
8363 (package
8364 (name "python-rply")
8365 (version "0.7.5")
8366 (source (origin
8367 (method url-fetch)
8368 (uri (pypi-uri "rply" version))
8369 (sha256
8370 (base32
8371 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
8372 (build-system python-build-system)
8373 (propagated-inputs
8374 `(("python-appdirs" ,python-appdirs)))
8375 (home-page "https://github.com/alex/rply")
8376 (synopsis "Parser generator for Python")
8377 (description
8378 "This package provides a pure Python based parser generator, that also
8379works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8380with a new public API, and RPython support.")
8381 (license license:bsd-3)))
8382
8383(define-public python2-rply
8384 (package-with-python2 python-rply))
8385
8386(define-public python-hy
8387 (package
8388 (name "python-hy")
8389 (version "0.13.0")
8390 (source (origin
8391 (method url-fetch)
8392 (uri (pypi-uri "hy" version))
8393 (sha256
8394 (base32
8395 "19sfymaksx9jhksfnb15ahid46mzrhdfzz6yy2craz2qnzvpmky8"))))
8396 (build-system python-build-system)
8397 (arguments
8398 '(#:phases
8399 (modify-phases %standard-phases
8400 (replace 'check
8401 (lambda _
8402 ;; Tests require write access to HOME.
8403 (setenv "HOME" "/tmp")
8404 (invoke "nosetests"))))))
8405 (native-inputs
8406 `(("python-coverage" ,python-coverage)
8407 ("python-nose" ,python-nose)))
8408 (propagated-inputs
8409 `(("python-astor" ,python-astor)
8410 ("python-clint" ,python-clint)
8411 ("python-rply" ,python-rply)))
8412 (home-page "http://hylang.org/")
8413 (synopsis "Lisp frontend to Python")
8414 (description
8415 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8416its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8417Python at your fingertips, in Lisp form.")
8418 (license license:expat)))
8419
8420(define-public python2-hy
8421 (package-with-python2 python-hy))
8422
8423(define-public python2-functools32
8424 (package
8425 (name "python2-functools32")
8426 (version "3.2.3-2")
8427 (source
8428 (origin
8429 (method url-fetch)
8430 (uri (pypi-uri "functools32" version))
8431 (sha256
8432 (base32
8433 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8434 (build-system python-build-system)
8435 (arguments
8436 `(#:python ,python-2
8437 #:tests? #f)) ; no test target
8438 (home-page "https://github.com/MiCHiLU/python-functools32")
8439 (synopsis
8440 "Backport of the functools module from Python 3.2.3")
8441 (description
8442 "This package is a backport of the @code{functools} module from Python
84433.2.3 for use with older versions of Python and PyPy.")
8444 (license license:expat)))
8445
8446(define-public python2-subprocess32
8447 (package
8448 (name "python2-subprocess32")
8449 (version "3.2.7")
8450 (source (origin
8451 (method url-fetch)
8452 (uri (pypi-uri "subprocess32" version))
8453 (sha256
8454 (base32
8455 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
8456 (patches
8457 (search-patches "python2-subprocess32-disable-input-test.patch"))))
8458 (build-system python-build-system)
8459 (arguments
8460 `(#:python ,python-2
8461 ;; The test suite fails with Python > 2.7.13:
8462 ;; import test.support
8463 ;; ImportError: No module named support
8464 #:tests? #f
8465 #:phases
8466 (modify-phases %standard-phases
8467 (add-after 'unpack 'patch-/bin/sh
8468 (lambda _
8469 (substitute* '("subprocess32.py"
8470 "test_subprocess32.py")
8471 (("/bin/sh") (which "sh")))
8472 #t)))))
8473 (home-page "https://github.com/google/python-subprocess32")
8474 (synopsis "Backport of the subprocess module from Python 3.2")
8475 (description
8476 "This is a backport of the @code{subprocess} standard library module
8477from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
8478new features. On POSIX systems it is guaranteed to be reliable when used
8479in threaded applications. It includes timeout support from Python 3.3 but
8480otherwise matches 3.2’s API.")
8481 (license license:psfl)))
8482
8483(define-public python2-futures
8484 (package
8485 (name "python2-futures")
8486 (version "3.2.0")
8487 (source
8488 (origin
8489 (method url-fetch)
8490 (uri (pypi-uri "futures" version))
8491 (sha256
8492 (base32
8493 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
8494 (build-system python-build-system)
ba88eea2
RW
8495 (arguments
8496 `(#:python ,python-2
8497 #:phases
8498 (modify-phases %standard-phases
8499 (replace 'check
8500 (lambda _
8501 (invoke "python" "test_futures.py")
8502 #t)))))
44d10b1f
RW
8503 (home-page "https://github.com/agronholm/pythonfutures")
8504 (synopsis
8505 "Backport of the concurrent.futures package from Python 3.2")
8506 (description
8507 "The concurrent.futures module provides a high-level interface for
8508asynchronously executing callables. This package backports the
8509concurrent.futures package from Python 3.2")
8510 (license license:bsd-3)))
8511
8512(define-public python-promise
8513 (package
8514 (name "python-promise")
8515 (version "0.4.2")
8516 (source
8517 (origin
8518 (method url-fetch)
8519 (uri (pypi-uri "promise" version))
8520 (sha256
8521 (base32
8522 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8523 (build-system python-build-system)
8524 ;; Tests wants python-futures, which is a python2 only program, and
8525 ;; can't be found by python-promise at test time.
8526 (arguments `(#:tests? #f))
8527 (home-page "https://github.com/syrusakbary/promise")
8528 (synopsis "Promises/A+ implementation for Python")
8529 (description
8530 "Promises/A+ implementation for Python")
8531 (properties `((python2-variant . ,(delay python2-promise))))
8532 (license license:expat)))
8533
8534(define-public python2-promise
8535 (let ((promise (package-with-python2
8536 (strip-python2-variant python-promise))))
8537 (package (inherit promise)
8538 (arguments (substitute-keyword-arguments (package-arguments promise)
8539 ((#:tests? _) #t)))
8540 (native-inputs
8541 `(("python2-futures" ,python2-futures)
8542 ("python2-pytest" ,python2-pytest)
8543 ,@(package-native-inputs promise))))))
8544
d71d85cd
RW
8545(define-public python-progressbar33
8546 (package
8547 (name "python-progressbar33")
8548 (version "2.4")
8549 (source
8550 (origin
8551 (method url-fetch)
8552 (uri (pypi-uri "progressbar33" version))
8553 (sha256
8554 (base32
8555 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
8556 (build-system python-build-system)
8557 (home-page "http://github.com/germangh/python-progressbar")
8558 (synopsis "Text progress bar library for Python")
8559 (description
8560 "This package provides a text progress bar library for Python. This
8561version only differs from the original @code{progressbar} package in that it
8562uses relative package imports instead of absolute imports, which is necessary
8563for the module to work under Python 3.3.")
8564 ;; Either or both of these licenses may be selected.
8565 (license (list license:lgpl2.1+ license:bsd-3))))
8566
44d10b1f
RW
8567(define-public python-colorama
8568 (package
8569 (name "python-colorama")
8570 (version "0.3.9")
8571 (source
8572 (origin
8573 (method url-fetch)
8574 (uri (pypi-uri "colorama" version))
8575 (sha256
8576 (base32
8577 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
8578 (build-system python-build-system)
8579 (synopsis "Colored terminal text rendering for Python")
8580 (description "Colorama is a Python library for rendering colored terminal
8581text.")
8582 (home-page "https://pypi.python.org/pypi/colorama")
8583 (license license:bsd-3)))
8584
8585(define-public python2-colorama
8586 (package-with-python2 python-colorama))
8587
8588(define-public python-rsa
8589 (package
8590 (name "python-rsa")
8591 (version "3.4.2")
8592 (source
8593 (origin
8594 (method url-fetch)
8595 (uri (pypi-uri "rsa" version))
8596 (sha256
8597 (base32
8598 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
8599 (build-system python-build-system)
8600 (propagated-inputs
8601 `(("python-pyasn1" ,python-pyasn1)))
8602 (synopsis "Pure-Python RSA implementation")
8603 (description "Python-RSA is a pure-Python RSA implementation. It supports
8604encryption and decryption, signing and verifying signatures, and key
8605generation according to PKCS#1 version 1.5. It can be used as a Python
8606library as well as on the command line.")
8607 (home-page "https://stuvel.eu/rsa")
8608 (license license:asl2.0)))
8609
8610(define-public python2-rsa
8611 (package-with-python2 python-rsa))
8612
8613(define-public python-pluggy
8614 (package
8615 (name "python-pluggy")
e5731c03 8616 (version "0.11.0")
44d10b1f
RW
8617 (source
8618 (origin
8619 (method url-fetch)
8620 (uri (pypi-uri "pluggy" version))
8621 (sha256
8622 (base32
e5731c03 8623 "10511a54dvafw1jrk75mrhml53c7b7w4yaw7241696lc2hfvr895"))))
44d10b1f
RW
8624 (build-system python-build-system)
8625 (native-inputs
8626 `(("python-setuptools-scm" ,python-setuptools-scm)))
8627 (synopsis "Plugin and hook calling mechanism for Python")
8628 (description "Pluggy is an extraction of the plugin manager as used by
8629Pytest but stripped of Pytest specific details.")
8630 (home-page "https://pypi.python.org/pypi/pluggy")
8631 (license license:expat)))
8632
8633(define-public python2-pluggy
8634 (package-with-python2 python-pluggy))
8635
8636(define-public python-tox
8637 (package
8638 (name "python-tox")
8639 (version "2.8.1")
8640 (source
8641 (origin
8642 (method url-fetch)
8643 (uri (pypi-uri "tox" version))
8644 (sha256
8645 (base32
8646 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
8647 (build-system python-build-system)
8648 (arguments
8649 ;; FIXME: Tests require pytest-timeout, which itself requires
8650 ;; pytest>=2.8.0 for installation.
8651 '(#:tests? #f))
8652 (propagated-inputs
8653 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
8654 ("python-py" ,python-py)
8655 ("python-virtualenv" ,python-virtualenv)))
8656 (native-inputs
8657 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
8658 ("python-pytest" ,python-pytest) ; >= 2.3.5
8659 ("python-setuptools-scm" ,python-setuptools-scm)))
8660 (home-page "http://tox.testrun.org/")
8661 (synopsis "Virtualenv-based automation of test activities")
8662 (description "Tox is a generic virtualenv management and test command line
8663tool. It can be used to check that a package installs correctly with
8664different Python versions and interpreters, or run tests in each type of
8665supported environment, or act as a frontend to continuous integration
8666servers.")
8667 (license license:expat)))
8668
8669(define-public python2-tox
8670 (package-with-python2 python-tox))
8671
8672(define-public python-jmespath
8673 (package
8674 (name "python-jmespath")
8675 (version "0.9.3")
8676 (source
8677 (origin
8678 (method url-fetch)
8679 (uri (pypi-uri "jmespath" version))
8680 (sha256
8681 (base32
8682 "0r7wc7fsxmlwzxx9j1j7rms06c6xs6d4sysirdhz1jk2mb4x90ba"))))
8683 (build-system python-build-system)
8684 (native-inputs
8685 `(("python-nose" ,python-nose)))
8686 (synopsis "JSON Matching Expressions")
8687 (description "JMESPath (pronounced “james path”) is a Python library that
8688allows one to declaratively specify how to extract elements from a JSON
8689document.")
8690 (home-page "https://github.com/jmespath/jmespath.py")
8691 (license license:expat)))
8692
8693(define-public python2-jmespath
8694 (package-with-python2 python-jmespath))
8695
8696(define-public python-botocore
8697 (package
7bcf827c
RW
8698 (name "python-botocore")
8699 (version "1.12.149")
8700 (source
8701 (origin
8702 (method url-fetch)
8703 (uri (pypi-uri "botocore" version))
8704 (sha256
8705 (base32
8706 "12597f74khp3ngwr282cb949w0gcqj20rkfc3x275dijavyy5cmf"))))
8707 (build-system python-build-system)
8708 (arguments
8709 ;; FIXME: Many tests are failing.
8710 '(#:tests? #f))
8711 (propagated-inputs
8712 `(("python-dateutil" ,python-dateutil)
8713 ("python-docutils" ,python-docutils)
8714 ("python-jmespath" ,python-jmespath)))
8715 (native-inputs
8716 `(("python-mock" ,python-mock)
8717 ("python-nose" ,python-nose)
8718 ("behave" ,behave)
8719 ("python-tox" ,python-tox)
8720 ("python-urllib3" ,python-urllib3)
8721 ("python-wheel" ,python-wheel)))
8722 (home-page "https://github.com/boto/botocore")
8723 (synopsis "Low-level interface to AWS")
8724 (description "Botocore is a Python library that provides a low-level
44d10b1f 8725interface to the Amazon Web Services (AWS) API.")
7bcf827c 8726 (license license:asl2.0)))
44d10b1f
RW
8727
8728(define-public python2-botocore
8729 (package-with-python2 python-botocore))
8730
8731(define-public python-xdo
8732 (package
8733 (name "python-xdo")
8734 (version "0.3")
8735 (source (origin
8736 (method url-fetch)
8737 (uri (string-append
8738 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8739 "python-xdo_" version ".orig.tar.gz"))
8740 (sha256
8741 (base32
8742 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
8743 (build-system python-build-system)
8744 (arguments
8745 '(#:phases
8746 (modify-phases %standard-phases
8747 (add-before 'install 'patch-libxdo-path
8748 ;; Hardcode the path of dynamically loaded libxdo library.
8749 (lambda* (#:key inputs #:allow-other-keys)
8750 (let ((libxdo (string-append
8751 (assoc-ref inputs "xdotool")
8752 "/lib/libxdo.so")))
8753 (substitute* "xdo/_xdo.py"
8754 (("find_library\\(\"xdo\"\\)")
8755 (simple-format #f "\"~a\"" libxdo)))
8756 #t))))
8757 #:tests? #f)) ; no tests provided
8758 (propagated-inputs
8759 `(("python-six" ,python-six)))
8760 (inputs
8761 `(("xdotool" ,xdotool)
8762 ("libX11" ,libx11)))
8763 (home-page "https://tracker.debian.org/pkg/python-xdo")
8764 (synopsis "Python library for simulating X11 keyboard/mouse input")
8765 (description "Provides bindings to libxdo for manipulating X11 via simulated
8766input. (Note that this is mostly a legacy library; you may wish to look at
8767python-xdo for newer bindings.)")
8768 (license license:bsd-3)))
8769
8770(define-public python2-xdo
8771 (package-with-python2 python-xdo))
8772
8773(define-public python-mako
8774 (package
8775 (name "python-mako")
6dc7a193 8776 (version "1.0.13")
44d10b1f
RW
8777 (source
8778 (origin
8779 (method url-fetch)
8780 (uri (pypi-uri "Mako" version))
8781 (sha256
8782 (base32
6dc7a193 8783 "0h95n0g0k1jwxiqarr09navpfajarvbmpm8mhmw66c25qc675vlm"))))
44d10b1f
RW
8784 (build-system python-build-system)
8785 (propagated-inputs
8786 `(("python-markupsafe" ,python-markupsafe)))
8787 (native-inputs
8788 `(("python-mock" ,python-mock)
8789 ("python-nose" ,python-nose)
8790 ("python-pytest" ,python-pytest)))
7016e620 8791 (home-page "https://www.makotemplates.org/")
44d10b1f
RW
8792 (synopsis "Templating language for Python")
8793 (description "Mako is a templating language for Python that compiles
8794templates into Python modules.")
8795 (license license:expat)))
8796
8797(define-public python2-mako
8798 (package-with-python2 python-mako))
8799
8800(define-public python-waitress
8801 (package
8802 (name "python-waitress")
8803 (version "1.1.0")
8804 (source
8805 (origin
8806 (method url-fetch)
8807 (uri (pypi-uri "waitress" version))
8808 (patches (search-patches "python-waitress-fix-tests.patch"))
8809 (sha256
8810 (base32
8811 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
8812 (build-system python-build-system)
8813 (home-page "https://github.com/Pylons/waitress")
8814 (synopsis "Waitress WSGI server")
8815 (description "Waitress is meant to be a production-quality pure-Python WSGI
8816server with very acceptable performance.")
8817 (license license:zpl2.1)))
8818
8819(define-public python2-waitress
8820 (package-with-python2 python-waitress))
8821
8822(define-public python-pyquery
8823 (package
8824 (name "python-pyquery")
8825 (version "1.2.17")
8826 (source
8827 (origin
8828 (method url-fetch)
8829 (uri (pypi-uri "pyquery" version))
8830 (sha256
8831 (base32
8832 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
8833 (build-system python-build-system)
8834 (native-inputs
8835 `(("python-webob" ,python-webob)
8836 ("python-webtest" ,python-webtest)))
8837 (propagated-inputs
8838 `(("python-lxml" ,python-lxml)
8839 ("python-cssselect" ,python-cssselect)))
8840 (home-page "https://github.com/gawel/pyquery")
8841 (synopsis "Make jQuery-like queries on xml documents")
8842 (description "pyquery allows you to make jQuery queries on xml documents.
8843The API is as much as possible the similar to jQuery. pyquery uses lxml for
8844fast xml and html manipulation.")
8845 (license license:bsd-3)))
8846
44d10b1f
RW
8847(define-public python-anyjson
8848 (package
8849 (name "python-anyjson")
8850 (version "0.3.3")
8851 (source
8852 (origin
8853 (method url-fetch)
8854 (uri (pypi-uri "anyjson" version))
8855 (sha256
8856 (base32
8857 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
8858 (build-system python-build-system)
8859 (arguments
8860 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
8861 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
8862 ;; whatever) so this transformation needs to be done before the tests
8863 ;; can be run. Maybe we could add a build step to transform beforehand
8864 ;; but it could be annoying/difficult.
8865 ;; We can enable tests for the Python 2 version, though, and do below.
8866 #:tests? #f))
8867 (home-page "https://bitbucket.org/runeh/anyjson/")
8868 (synopsis
8869 "Wraps best available JSON implementation in a common interface")
8870 (description
8871 "Anyjson loads whichever is the fastest JSON module installed
8872and provides a uniform API regardless of which JSON implementation is used.")
8873 (license license:bsd-3)
8874 (properties `((python2-variant . ,(delay python2-anyjson))))))
8875
8876(define-public python2-anyjson
8877 (let ((anyjson (package-with-python2
8878 (strip-python2-variant python-anyjson))))
8879 (package
8880 (inherit anyjson)
8881 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
8882 #:tests? #t
8883 ,@(package-arguments anyjson)))
8884 (native-inputs `(("python2-nose" ,python2-nose))))))
8885
8886(define-public python-amqp
8887 (package
8888 (name "python-amqp")
8889 (version "2.3.2")
8890 (source
8891 (origin
8892 (method url-fetch)
8893 (uri (pypi-uri "amqp" version))
8894 (sha256
8895 (base32
8896 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
8897 (build-system python-build-system)
8898 (native-inputs
8899 `(("python-case" ,python-case)
8900 ("python-pytest-sugar" ,python-pytest-sugar)
8901 ("python-mock" ,python-mock)))
8902 (propagated-inputs
8903 `(("python-vine" ,python-vine)))
8904 (home-page "https://github.com/celery/py-amqp")
8905 (synopsis
8906 "Low-level AMQP client for Python (fork of amqplib)")
8907 (description
8908 "This is a fork of amqplib which was originally written by Barry Pederson.
8909It is maintained by the Celery project, and used by kombu as a pure python
8910alternative when librabbitmq is not available.")
8911 (license license:lgpl2.1+)
8912 (properties `((python2-variant . ,(delay python2-amqp))))))
8913
8914(define-public python2-amqp
8915 (let ((amqp (package-with-python2
8916 (strip-python2-variant python-amqp))))
8917 (package
8918 (inherit amqp)
8919 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
8920 ;; unmaintained. Weirdly, does not do this on the python 3
8921 ;; version?
8922 #:tests? #f
8923 ,@(package-arguments amqp))))))
8924
8925(define-public python-txamqp
8926 (package
8927 (name "python-txamqp")
8928 (version "0.8.2")
8929 (source
8930 (origin
8931 (method url-fetch)
8932 (uri (pypi-uri "txAMQP" version))
8933 (sha256
8934 (base32
8935 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
8936 (build-system python-build-system)
8937 (propagated-inputs
8938 `(("python-six" ,python-six)
8939 ("python-twisted" ,python-twisted)))
8940 (home-page "https://github.com/txamqp/txamqp")
8941 (synopsis "Communicate with AMQP peers and brokers using Twisted")
8942 (description
8943 "This package provides a Python library for communicating with AMQP peers
8944and brokers using the asynchronous networking framework Twisted. It contains
8945all the necessary code to connect, send and receive messages to/from an
8946AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
8947also includes support for using Thrift RPC over AMQP in Twisted
8948applications.")
8949 (license license:asl2.0)))
8950
8951(define-public python2-txamqp
8952 (package-with-python2 python-txamqp))
8953
8954(define-public python-kombu
8955 (package
8956 (name "python-kombu")
8957 (version "4.2.2")
8958 (source
8959 (origin
8960 (method url-fetch)
8961 (uri (pypi-uri "kombu" version))
8962 (sha256
8963 (base32
8964 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
8965 (build-system python-build-system)
8966 (native-inputs
8967 `(("python-mock" ,python-mock)
8968 ("python-case" ,python-case)
8969 ("python-pyro4" ,python-pyro4)
8970 ("python-pytest-sugar" ,python-pytest-sugar)
8971 ("python-pytz" ,python-pytz)))
8972 (propagated-inputs
8973 `(("python-anyjson" ,python-anyjson)
8974 ("python-amqp" ,python-amqp)
8975 ("python-redis" ,python-redis)))
8976 (home-page "https://kombu.readthedocs.io")
8977 (synopsis "Message passing library for Python")
8978 (description "The aim of Kombu is to make messaging in Python as easy as
8979possible by providing an idiomatic high-level interface for the AMQ protocol,
8980and also provide proven and tested solutions to common messaging problems.
8981AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
8982message orientation, queuing, routing, reliability and security, for which the
8983RabbitMQ messaging server is the most popular implementation.")
8984 (license license:bsd-3)
8985 (properties `((python2-variant . ,(delay python2-kombu))))))
8986
8987(define-public python2-kombu
8988 (let ((kombu (package-with-python2
8989 (strip-python2-variant python-kombu))))
8990 (package
8991 (inherit kombu)
8992 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
8993 ;; It works fine on the python3 variant.
8994 #:tests? #f
8995 ,@(package-arguments kombu)))
8996 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8997 ,@(package-native-inputs kombu))))))
8998
8999(define-public python-billiard
9000 (package
9001 (name "python-billiard")
9002 (version "3.5.0.5")
9003 (source
9004 (origin
9005 (method url-fetch)
9006 (uri (pypi-uri "billiard" version))
9007 (sha256
9008 (base32
9009 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
9010 (build-system python-build-system)
9011 (native-inputs
9012 `(("python-case" ,python-case)
9013 ("python-pytest" ,python-pytest)))
9014 (home-page "https://github.com/celery/billiard")
9015 (synopsis
9016 "Python multiprocessing fork with improvements and bugfixes")
9017 (description
9018 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9019multiprocessing package itself is a renamed and updated version of R Oudkerk's
9020pyprocessing package. This standalone variant is intended to be compatible with
9021Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
9022 (license license:bsd-3)
9023 (properties `((python2-variant . ,(delay python2-billiard))))))
9024
9025(define-public python2-billiard
9026 (let ((billiard (package-with-python2
9027 (strip-python2-variant python-billiard))))
9028 (package
9029 (inherit billiard)
9030 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9031 ("python2-mock" ,python2-mock)
9032 ,@(package-native-inputs billiard))))))
9033
9034(define-public python-celery
9035 (package
9036 (name "python-celery")
9037 (version "4.2.1")
9038 (source
9039 (origin
9040 (method url-fetch)
9041 (uri (pypi-uri "celery" version))
9042 (sha256
9043 (base32
9044 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
9045 (build-system python-build-system)
9046 (arguments
9047 '(;; TODO The tests fail with Python 3.7
9048 ;; https://github.com/celery/celery/issues/4849
9049 #:tests? #f
9050 #:phases
9051 (modify-phases %standard-phases
9052 (add-after 'unpack 'patch-requirements
9053 (lambda _
9054 (substitute* "requirements/test.txt"
9055 (("pytest>=3\\.0,<3\\.3")
9056 "pytest>=3.0"))
9057 #t)))))
9058 (native-inputs
9059 `(("python-case" ,python-case)
9060 ("python-pytest" ,python-pytest)))
9061 (propagated-inputs
9062 `(("python-pytz" ,python-pytz)
9063 ("python-billiard" ,python-billiard)
9064 ("python-kombu" ,python-kombu)))
9065 (home-page "https://celeryproject.org")
9066 (synopsis "Distributed Task Queue")
9067 (description "Celery is an asynchronous task queue/job queue based on
9068distributed message passing. It is focused on real-time operation, but
9069supports scheduling as well. The execution units, called tasks, are executed
9070concurrently on a single or more worker servers using multiprocessing,
9071Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9072synchronously (wait until ready).")
9073 (license license:bsd-3)
9074 (properties `((python2-variant . ,(delay python2-celery))))))
9075
9076(define-public python2-celery
9077 (let ((celery (package-with-python2
9078 (strip-python2-variant python-celery))))
9079 (package
9080 (inherit celery)
9081 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9082 ("python2-mock" ,python2-mock)
9083 ,@(package-native-inputs celery))))))
9084
9085(define-public python-translitcodec
9086 (package
9087 (name "python-translitcodec")
9088 (version "0.4.0")
9089 (source
9090 (origin
9091 (method url-fetch)
9092 (uri (pypi-uri "translitcodec" version))
9093 (sha256
9094 (base32
9095 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9096 (build-system python-build-system)
9097 (arguments
9098 `(#:tests? #f)) ; no tests provided
9099 (home-page
9100 "https://github.com/claudep/translitcodec")
9101 (synopsis
9102 "Unicode to 8-bit charset transliteration codec")
9103 (description
9104 "This package contains codecs for transliterating ISO 10646 texts into
9105best-effort representations using smaller coded character sets (ASCII,
9106ISO 8859, etc.).")
9107 (license license:expat)))
9108
9109(define-public python2-translitcodec
9110 (package-with-python2 python-translitcodec))
9111
9112(define-public python-editor
9113 (package
9114 (name "python-editor")
9115 (version "0.5")
9116 (source
9117 (origin
9118 (method url-fetch)
9119 (uri (pypi-uri "python-editor" version))
9120 (sha256
9121 (base32
9122 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9123 (build-system python-build-system)
9124 (home-page
9125 "https://github.com/fmoo/python-editor")
9126 (synopsis
9127 "Programmatically open an editor, capture the result")
9128 (description
9129 "python-editor is a library that provides the editor module for
9130programmatically interfacing with your system's $EDITOR.")
9131 (license license:asl2.0)))
9132
9133(define-public python2-editor
9134 (package-with-python2 python-editor))
9135
44d10b1f
RW
9136(define-public python-vobject
9137 (package
9138 (name "python-vobject")
9139 (version "0.9.5")
9140 (source (origin
9141 (method url-fetch)
9142 (uri (pypi-uri "vobject" version))
9143 (sha256
9144 (base32
9145 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
9146 (build-system python-build-system)
9147 (arguments
9148 '(;; The test suite relies on some non-portable Windows interfaces.
9149 #:tests? #f))
9150 (propagated-inputs
9151 `(("python-dateutil" ,python-dateutil)
9152 ("python-pyicu" ,python-pyicu)))
9153 (synopsis "Parse and generate vCard and vCalendar files")
9154 (description "Vobject is intended to be a full featured Python package for
9155parsing and generating vCard and vCalendar files. Currently, iCalendar files
9156are supported and well tested. vCard 3.0 files are supported, and all data
9157should be imported, but only a few components are understood in a sophisticated
9158way.")
9159 (home-page "http://eventable.github.io/vobject/")
9160 (license license:asl2.0)))
9161
9162(define-public python2-vobject
9163 (package-with-python2 python-vobject))
9164
9165(define-public python-munkres
9166 (package
9167 (name "python-munkres")
9168 (version "1.0.8")
9169 (source (origin
9170 (method url-fetch)
9171 (uri (pypi-uri "munkres" version))
9172 (sha256
9173 (base32
9174 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
9175 (build-system python-build-system)
9176 (arguments
9177 '(#:tests? #f)) ; no test suite
9178 (home-page "http://software.clapper.org/munkres/")
9179 (synopsis "Implementation of the Munkres algorithm")
9180 (description "The Munkres module provides an implementation of the Munkres
9181algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9182useful for solving the Assignment Problem.")
9183 (license license:bsd-3)))
9184
9185(define-public python2-munkres
9186 (package-with-python2 python-munkres))
9187
9188(define-public python-whoosh
9189 (package
9190 (name "python-whoosh")
9191 (version "2.7.4")
9192 (source
9193 (origin
9194 (method url-fetch)
9195 (uri (pypi-uri "Whoosh" version))
9196 (sha256
9197 (base32
9198 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9199 (build-system python-build-system)
9200 (native-inputs
9201 `(("python-pytest" ,python-pytest)))
9202 (home-page "https://bitbucket.org/mchaput/whoosh")
9203 (synopsis "Full text indexing, search, and spell checking library")
9204 (description
9205 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9206checking library.")
9207 (license license:bsd-2)))
9208
9209(define-public python2-whoosh
9210 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9211 (package (inherit whoosh)
9212 (propagated-inputs
9213 `(("python2-backport-ssl-match-hostname"
9214 ,python2-backport-ssl-match-hostname)
9215 ,@(package-propagated-inputs whoosh))))))
9216
9217(define-public python-pathlib
9218 (package
9219 (name "python-pathlib")
9220 (version "1.0.1")
9221 (source (origin
9222 (method url-fetch)
9223 (uri (pypi-uri "pathlib" version))
9224 (sha256
9225 (base32
9226 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9227 (build-system python-build-system)
9228 ;; The tests depend on the internal "test" module, which does not provide
9229 ;; a stable interface.
9230 (arguments `(#:tests? #f))
9231 (home-page "https://pathlib.readthedocs.org/")
9232 (synopsis "Object-oriented file system paths")
9233 (description "Pathlib offers a set of classes to handle file system paths.
9234It offers the following advantages over using string objects:
9235
9236@enumerate
9237@item No more cumbersome use of os and os.path functions. Everything can
9238be done easily through operators, attribute accesses, and method calls.
9239@item Embodies the semantics of different path types. For example,
9240comparing Windows paths ignores casing.
9241@item Well-defined semantics, eliminating any inconsistencies or
9242ambiguities (forward vs. backward slashes, etc.).
9243@end enumerate
9244
9245Note: In Python 3.4, pathlib is now part of the standard library. For other
9246Python versions please consider python-pathlib2 instead, which tracks the
9247standard library module. This module (python-pathlib) isn't maintained
9248anymore.")
9249 (license license:expat)))
9250
9251(define-public python2-pathlib
9252 (package-with-python2 python-pathlib))
9253
9254(define-public python2-pathlib2
9255 (package
9256 (name "python2-pathlib2")
54da6f9f 9257 (version "2.3.3")
44d10b1f
RW
9258 (source (origin
9259 (method url-fetch)
9260 (uri (pypi-uri "pathlib2" version))
9261 (sha256
9262 (base32
54da6f9f 9263 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
44d10b1f
RW
9264 (build-system python-build-system)
9265 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9266 ;; version is 3.4 which already includes this package as part of the
9267 ;; standard library.
9268 (arguments
9269 `(#:python ,python-2))
9270 (propagated-inputs
9271 `(("python2-scandir" ,python2-scandir)
9272 ("python2-six" ,python2-six)))
9273 (home-page "https://pypi.python.org/pypi/pathlib2/")
9274 (synopsis "Object-oriented file system paths - backport of standard
9275pathlib module")
9276 (description "The goal of pathlib2 is to provide a backport of standard
9277pathlib module which tracks the standard library module, so all the newest
9278features of the standard pathlib can be used also on older Python versions.
9279
9280Pathlib offers a set of classes to handle file system paths. It offers the
9281following advantages over using string objects:
9282
9283@enumerate
9284@item No more cumbersome use of os and os.path functions. Everything can
9285be done easily through operators, attribute accesses, and method calls.
9286@item Embodies the semantics of different path types. For example,
9287comparing Windows paths ignores casing.
9288@item Well-defined semantics, eliminating any inconsistencies or
9289ambiguities (forward vs. backward slashes, etc.).
9290@end enumerate")
9291 (license license:expat)))
9292
9293(define-public python2-pathlib2-bootstrap
9294 (hidden-package
9295 (package
9296 (inherit python2-pathlib2)
9297 (name "python2-pathlib2-bootstrap")
9298 (propagated-inputs
9299 `(("python2-scandir" ,python2-scandir)
9300 ("python2-six" ,python2-six-bootstrap))))))
9301
9302(define-public python-jellyfish
9303 (package
9304 (name "python-jellyfish")
9305 (version "0.5.6")
9306 (source (origin
9307 (method url-fetch)
9308 (uri (pypi-uri "jellyfish" version))
9309 (sha256
9310 (base32
9311 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
9312 (build-system python-build-system)
9313 (native-inputs
9314 `(("python-pytest" ,python-pytest)))
9315 (home-page "https://github.com/jamesturk/jellyfish")
9316 (synopsis "Approximate and phonetic matching of strings")
9317 (description "Jellyfish uses a variety of string comparison and phonetic
9318encoding algorithms to do fuzzy string matching.")
9319 (license license:bsd-2)
9320 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9321
9322(define-public python2-jellyfish
9323 (let ((jellyfish (package-with-python2
9324 (strip-python2-variant python-jellyfish))))
9325 (package (inherit jellyfish)
9326 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
9327 ,@(package-native-inputs jellyfish))))))
9328
9329(define-public python2-unicodecsv
9330 (package
9331 (name "python2-unicodecsv")
9332 (version "0.14.1")
9333 (source (origin
9334 (method url-fetch)
9335 ;; The test suite is not included in the PyPi release.
9336 ;; https://github.com/jdunck/python-unicodecsv/issues/19
9337 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
9338 "archive/" version ".tar.gz"))
9339 (file-name (string-append name "-" version ".tar.gz"))
9340 (sha256
9341 (base32
9342 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
9343 (build-system python-build-system)
9344 (arguments
9345 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9346 #:python ,python-2))
9347 (native-inputs
9348 `(("python2-unittest2" ,python2-unittest2)))
9349 (home-page "https://github.com/jdunck/python-unicodecsv")
9350 (synopsis "Unicode CSV module for Python 2")
9351 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9352module, adding support for Unicode strings.")
9353 (license license:bsd-2)))
9354
9355(define-public python-rarfile
9356 (package
9357 (name "python-rarfile")
9358 (version "2.8")
9359 (source (origin
9360 (method url-fetch)
9361 (uri (pypi-uri "rarfile" version))
9362 (sha256
9363 (base32
9364 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
9365 (build-system python-build-system)
9366 (arguments
9367 '(#:phases
9368 (modify-phases %standard-phases
9369 (replace 'check
9370 ;; Many tests fail, but the installation proceeds.
e59dd341 9371 (lambda _ (invoke "make" "-C" "test" "test"))))))
44d10b1f
RW
9372 (native-inputs
9373 `(("which" ,which))) ; required for tests
9374 (propagated-inputs
9375 `(("libarchive" ,libarchive)))
9376 (home-page "https://github.com/markokr/rarfile")
9377 (synopsis "RAR archive reader for Python")
9378 (description "This is Python module for RAR archive reading. The interface
9379is made as zipfile like as possible.")
9380 (license license:isc)))
9381
9382(define-public python2-rarfile
9383 (package-with-python2 python-rarfile))
9384
9385(define-public python-magic
9386 (package
9387 (name "python-magic")
9388 (version "0.4.15")
9389 (source
9390 (origin
9391 (method url-fetch)
9392 (uri (pypi-uri "python-magic" version))
9393 (sha256
9394 (base32
9395 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
9396 (file-name (string-append name "-" version "-checkout"))))
9397 (build-system python-build-system)
9398 (arguments
9399 ;; The tests are unreliable, so don't run them. The tests fail
9400 ;; under Python3 because they were written for Python2 and
9401 ;; contain import statements that do not work in Python3. One of
9402 ;; the tests fails under Python2 because its assertions are
9403 ;; overly stringent; it relies on comparing output strings which
9404 ;; are brittle and can change depending on the version of
9405 ;; libmagic being used and the system on which the test is
9406 ;; running. In my case, under GuixSD 0.10.0, only one test
9407 ;; failed, and it seems to have failed only because the version
9408 ;; of libmagic that is packaged in Guix outputs a slightly
9409 ;; different (but not wrong) string than the one that the test
9410 ;; expected.
9411 '(#:tests? #f
9412 #:phases (modify-phases %standard-phases
9413 ;; Replace a specific method call with a hard-coded
9414 ;; path to the necessary libmagic.so file in the
9415 ;; store. If we don't do this, then the method call
9416 ;; will fail to find the libmagic.so file, which in
9417 ;; turn will cause any application using
9418 ;; python-magic to fail.
9419 (add-before 'build 'hard-code-path-to-libmagic
9420 (lambda* (#:key inputs #:allow-other-keys)
9421 (let ((file (assoc-ref inputs "file")))
9422 (substitute* "magic.py"
9423 (("ctypes.util.find_library\\('magic'\\)")
9424 (string-append "'" file "/lib/libmagic.so'")))
9425 #t)))
9426 (add-before 'install 'disable-egg-compression
9427 (lambda _
9428 (let ((port (open-file "setup.cfg" "a")))
9429 (display "\n[easy_install]\nzip_ok = 0\n"
9430 port)
9431 (close-port port)
9432 #t))))))
9433 (inputs
9434 ;; python-magic needs to be able to find libmagic.so.
9435 `(("file" ,file)))
9436 (home-page
9437 "https://github.com/ahupp/python-magic")
9438 (synopsis
9439 "File type identification using libmagic")
9440 (description
9441 "This module uses ctypes to access the libmagic file type
9442identification library. It makes use of the local magic database and
9443supports both textual and MIME-type output. Note that this module and
9444the python-file module both provide a \"magic.py\" file; these two
9445modules, which are different and were developed separately, both serve
9446the same purpose: to provide Python bindings for libmagic.")
9447 (license license:expat)))
9448
9449(define-public python2-magic
9450 (package-with-python2 python-magic))
9451
9452(define-public python2-s3cmd
9453 (package
9454 (name "python2-s3cmd")
9455 (version "1.6.1")
9456 (source
9457 (origin
9458 (method url-fetch)
9459 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
9460 "s3cmd-" version ".tar.gz"))
9461 (sha256
9462 (base32
9463 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9464 (build-system python-build-system)
9465 (arguments
9466 ;; s3cmd is written for python2 only and contains no tests.
9467 `(#:python ,python-2
9468 #:tests? #f))
9469 (propagated-inputs
9470 `(("python2-dateutil" ,python2-dateutil)
9471 ;; The python-file package also provides a magic.py module.
9472 ;; This is an unfortunate state of affairs; however, s3cmd
9473 ;; fails to install if it cannot find specifically the
9474 ;; python-magic package. Thus we include it, instead of using
9475 ;; python-file. Ironically, s3cmd sometimes works better
9476 ;; without libmagic bindings at all:
9477 ;; https://github.com/s3tools/s3cmd/issues/198
9478 ("python2-magic" ,python2-magic)))
9479 (home-page "http://s3tools.org/s3cmd")
9480 (synopsis "Command line tool for S3-compatible storage services")
9481 (description
9482 "S3cmd is a command line tool for uploading, retrieving and managing data
9483in storage services that are compatible with the Amazon Simple Storage
9484Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9485GnuPG encryption, and more. It also supports management of Amazon's
9486CloudFront content delivery network.")
9487 (license license:gpl2+)))
9488
9489(define-public python-pkgconfig
9490 (package
9491 (name "python-pkgconfig")
9492 (version "1.3.1")
9493 (source
9494 (origin
9495 (method url-fetch)
9496 (uri (pypi-uri "pkgconfig" version))
9497 (sha256
9498 (base32
9499 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
9500 (build-system python-build-system)
9501 (native-inputs
9502 `(("python-nose" ,python-nose)))
9503 (inputs
9504 `(("pkg-config" ,pkg-config)))
9505 (arguments
9506 `(#:phases
9507 (modify-phases %standard-phases
9508 (add-before 'build 'patch
9509 ;; Hard-code the path to pkg-config.
9510 (lambda _
9511 (substitute* "pkgconfig/pkgconfig.py"
9512 (("cmd = 'pkg-config")
9513 (string-append "cmd = '" (which "pkg-config"))))
9514 #t))
9515 (replace 'check
9516 (lambda _
9517 (invoke "nosetests" "test.py"))))))
9518 (home-page "https://github.com/matze/pkgconfig")
9519 (synopsis "Python interface for pkg-config")
9520 (description "This module provides a Python interface to pkg-config. It
9521can be used to find all pkg-config packages, check if a package exists,
9522check if a package meets certain version requirements, query CFLAGS and
9523LDFLAGS and parse the output to build extensions with setup.py.")
9524 (license license:expat)))
9525
9526(define-public python2-pkgconfig
9527 (package-with-python2 python-pkgconfig))
9528
9529(define-public python-bz2file
9530 (package
9531 (name "python-bz2file")
9532 (version "0.98")
9533 (source
9534 (origin
9535 (method url-fetch)
9536 (uri (pypi-uri "bz2file" version))
9537 (sha256
9538 (base32
9539 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9540 (build-system python-build-system)
9541 (arguments
9542 `(#:tests? #f)) ; Tests use deprecated python modules.
9543 (home-page "https://github.com/nvawda/bz2file")
9544 (synopsis "Read and write bzip2-compressed files")
9545 (description
9546 "Bz2file is a Python library for reading and writing bzip2-compressed
9547files. It contains a drop-in replacement for the I/O interface in the
9548standard library's @code{bz2} module, including features from the latest
9549development version of CPython that are not available in older releases.")
9550 (license license:asl2.0)))
9551
9552(define-public python2-bz2file
9553 (package-with-python2 python-bz2file))
9554
9555(define-public python-future
9556 (package
9557 (name "python-future")
d5d54030 9558 (version "0.17.1")
44d10b1f
RW
9559 (source
9560 (origin
9561 (method url-fetch)
9562 (uri (pypi-uri "future" version))
9563 (sha256
9564 (base32
d5d54030 9565 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
44d10b1f
RW
9566 (build-system python-build-system)
9567 ;; Many tests connect to the network or are otherwise flawed.
9568 ;; https://github.com/PythonCharmers/python-future/issues/210
9569 (arguments
9570 `(#:tests? #f))
9571 (home-page "http://python-future.org")
9572 (synopsis "Single-source support for Python 3 and 2")
9573 (description
9574 "@code{python-future} is the missing compatibility layer between Python 2 and
9575Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9576to support both Python 2 and Python 3 with minimal overhead.")
9577 (license license:expat)))
9578
9579(define-public python2-future
9580 (package-with-python2 python-future))
9581
9582(define-public python-cysignals
9583 (package
9584 (name "python-cysignals")
8e3e51df 9585 (version "1.9.0")
44d10b1f
RW
9586 (source
9587 (origin
9588 (method url-fetch)
8e3e51df 9589 (uri (pypi-uri "cysignals" version))
44d10b1f
RW
9590 (sha256
9591 (base32
8e3e51df 9592 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
44d10b1f
RW
9593 (build-system python-build-system)
9594 (native-inputs
9595 `(("python-cython" ,python-cython)
9596 ("python-sphinx" ,python-sphinx)))
9597 (inputs
9598 `(("pari-gp" ,pari-gp)))
9599 (arguments
9600 `(#:modules ((guix build python-build-system)
9601 ((guix build gnu-build-system) #:prefix gnu:)
9602 (guix build utils))
9603 ;; FIXME: Tests are executed after installation and currently fail
9604 ;; when not installing into standard locations; the author is working
9605 ;; on a fix.
9606 #:tests? #f
9607 #:phases
9608 (modify-phases %standard-phases
9609 (add-before
9610 'build 'configure
9611 (assoc-ref gnu:%standard-phases 'configure)))))
9612 (home-page
9613 "https://github.com/sagemath/cysignals")
9614 (synopsis
9615 "Handling of interrupts and signals for Cython")
9616 (description
9617 "The cysignals package provides mechanisms to handle interrupts (and
9618other signals and errors) in Cython code, using two related approaches,
9619for mixed Cython/Python code or external C libraries and pure Cython code,
9620respectively.")
9621 (license license:lgpl3+)))
9622
9623(define-public python2-cysignals
9624 (package-with-python2 python-cysignals))
9625
9626(define-public python2-shedskin
9627 (package
9628 (name "python2-shedskin")
9629 (version "0.9.4")
9630 (source
9631 (origin
9632 (method url-fetch)
9633 (uri (string-append "https://github.com/shedskin/shedskin/"
9634 "releases/download/v" version
9635 "/shedskin-" version ".tgz"))
9636 (sha256
9637 (base32
9638 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9639 (build-system python-build-system)
9640 (arguments
9641 `(#:python ,python-2
9642 #:phases (modify-phases %standard-phases
9643 (add-after 'unpack 'fix-resulting-include-libs
9644 (lambda* (#:key inputs #:allow-other-keys)
9645 (let ((libgc (assoc-ref inputs "libgc"))
9646 (pcre (assoc-ref inputs "pcre")))
9647 (substitute* "shedskin/makefile.py"
9648 (("variable == 'CCFLAGS':[ ]*")
9649 (string-append "variable == 'CCFLAGS':\n"
9650 " line += ' -I " pcre "/include"
9651 " -I " libgc "/include'"))
9652 (("variable == 'LFLAGS':[ ]*")
9653 (string-append "variable == 'LFLAGS':\n"
9654 " line += ' -L" pcre "/lib"
9655 " -L " libgc "/lib'")))
9656 #t))))))
9657 (inputs `(("pcre" ,pcre)
9658 ("libgc" ,libgc)))
9659 (home-page "https://shedskin.github.io/")
9660 (synopsis "Experimental Python-2 to C++ Compiler")
9661 (description (string-append "This is an experimental compiler for a subset of
9662Python. It generates C++ code and a Makefile."))
9663 (license (list license:gpl3 license:bsd-3 license:expat))))
9664
9665(define-public python2-rope
9666 (package
9667 (name "python2-rope")
a9ba0a31 9668 (version "0.11.0")
44d10b1f
RW
9669 (source
9670 (origin
9671 (method url-fetch)
9672 (uri (pypi-uri "rope" version))
9673 (sha256
9674 (base32
a9ba0a31 9675 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
44d10b1f 9676 (arguments
afb29715 9677 ;; Rope has only partial python3 support, see `python-rope'
44d10b1f
RW
9678 `(#:python ,python-2))
9679 (build-system python-build-system)
9680 (native-inputs
9681 `(("python2-unittest2" ,python2-unittest2)))
9682 (home-page "https://github.com/python-rope/rope")
9683 (synopsis "Refactoring library for Python")
9684 (description "Rope is a refactoring library for Python. It facilitates
9685the renaming, moving and extracting of attributes, functions, modules, fields
9686and parameters in Python 2 source code. These refactorings can also be applied
9687to occurrences in strings and comments.")
9688 (license license:gpl2)))
9689
2c880ef4
LC
9690(define-public python-rope
9691 (package
9692 (inherit python2-rope)
9693 (name "python-rope")
9694 (arguments `(#:python ,python-wrapper
9695 ;; XXX: Only partial python3 support, results in some failing
9696 ;; tests: <https://github.com/python-rope/rope/issues/247>.
9697 #:tests? #f))
9698 (properties `((python2-variant . ,(delay python2-rope))))))
9699
44d10b1f
RW
9700(define-public python-py3status
9701 (package
9702 (name "python-py3status")
77f3d303 9703 (version "3.16")
44d10b1f
RW
9704 (source
9705 (origin
9706 (method url-fetch)
9707 (uri (pypi-uri "py3status" version))
9708 (sha256
9709 (base32
77f3d303 9710 "1xrfph277bgjln3jbpzpgkhxad04fjvj7s3xfil42q1sxi4s3q3g"))))
44d10b1f
RW
9711 (build-system python-build-system)
9712 (inputs
9713 `(("file" ,file)))
9714 (arguments
9715 '(#:phases
9716 (modify-phases %standard-phases
9717 ;; 'file' is used for detection of configuration file encoding
9718 ;; let's make link the dependency to particular input
9719 (add-before 'build 'patch-file-path
9720 (lambda* (#:key inputs #:allow-other-keys)
9721 (let ((file-path (assoc-ref inputs "file")))
9722 (substitute* "py3status/parse_config.py"
9723 (("\\['file', '-b'")
9724 (string-append "['" file-path "/bin/file', '-b'")))
9725 #t))))
9726 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
9727 (home-page "https://github.com/ultrabug/py3status")
9728 (synopsis "Extensible i3status wrapper written in Python")
9729 (description "py3status is an i3status wrapper which extends i3status
9730functionality in a modular way, allowing you to extend your panel with your
9731own code, responding to click events and updating clock every second.")
9732 (license license:bsd-3)))
9733
9734(define-public python-tblib
9735 (package
9736 (name "python-tblib")
9737 (version "1.3.2")
9738 (source (origin
9739 (method url-fetch)
9740 (uri (pypi-uri "tblib" version))
9741 (sha256 (base32
9742 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
9743 (build-system python-build-system)
9744 (arguments
9745 `(#:phases
9746 (modify-phases %standard-phases
9747 (add-before 'check 'adjust-tests
9748 (lambda _
9749 (when (which "python3")
9750 ;; Adjust the example output to match that of Python 3.7:
9751 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
9752 (substitute* "README.rst"
9753 (("Exception\\('fail',") "Exception('fail'"))
9754 #t)))
9755 (replace 'check
9756 (lambda _
9757 ;; Upstream runs tests after installation and the package itself
9758 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
9759 ;; found.
9760 (setenv "PYTHONPATH"
9761 (string-append (getcwd) "/build/lib:"
9762 (getenv "PYTHONPATH")))
9763 (invoke "py.test" "-vv" "tests" "README.rst"))))))
9764 (native-inputs
9765 `(("python-pytest" ,python-pytest)
9766 ("python-six" ,python-six)))
9767 (home-page "https://github.com/ionelmc/python-tblib")
9768 (synopsis "Traceback serialization library")
9769 (description
9770 "Traceback serialization allows you to:
9771
9772@enumerate
9773@item Pickle tracebacks and raise exceptions with pickled tracebacks in
9774different processes. This allows better error handling when running code over
9775multiple processes (imagine multiprocessing, billiard, futures, celery etc).
9776
9777@item Parse traceback strings and raise with the parsed tracebacks.
9778@end enumerate\n")
9779 (license license:bsd-3)))
9780
9781(define-public python2-tblib
9782 (package-with-python2 python-tblib))
9783
9784(define-public python-greenlet
9785 (package
9786 (name "python-greenlet")
9787 (version "0.4.15")
9788 (source (origin
9789 (method url-fetch)
9790 (uri (pypi-uri "greenlet" version))
9791 (sha256
9792 (base32
9793 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
9794 (build-system python-build-system)
9795 (home-page "https://greenlet.readthedocs.io/")
9796 (synopsis "Lightweight in-process concurrent programming")
9797 (description
9798 "Greenlet package is a spin-off of Stackless, a version of CPython
9799that supports micro-threads called \"tasklets\". Tasklets run
9800pseudo-concurrently (typically in a single or a few OS-level threads) and
9801are synchronized with data exchanges on \"channels\".")
9802 (license (list license:psfl license:expat))))
9803
9804(define-public python2-greenlet
9805 (package-with-python2 python-greenlet))
9806
9807(define-public python-objgraph
9808 (package
9809 (name "python-objgraph")
9810 (version "3.4.0")
9811 (source
9812 (origin
9813 (method url-fetch)
9814 (uri (pypi-uri "objgraph" version))
9815 (sha256
9816 (base32
9817 "184m09am5gpbqfaiy7l0hwh476mczbrly1dffs0rw2p1d1i2q32a"))))
9818 (build-system python-build-system)
9819 (propagated-inputs
9820 `(("python-graphviz" ,python-graphviz)))
9821 (native-inputs
9822 `(("python-mock" ,python-mock)
9823 ("graphviz" ,graphviz)))
9824 (home-page "https://mg.pov.lt/objgraph/")
9825 (synopsis "Draw Python object reference graphs with graphviz")
9826 (description
9827 "This package provides tools to draw Python object reference graphs with
9828graphviz.")
9829 (license license:expat)))
9830
9831(define-public python-gevent
9832 (package
9833 (name "python-gevent")
9834 (version "1.3.7")
9835 (source (origin
9836 (method url-fetch)
9837 (uri (pypi-uri "gevent" version))
9838 (sha256
9839 (base32
9840 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
9841 (modules '((guix build utils)))
9842 (snippet
9843 '(begin
9844 ;; unbunding libev and c-ares
9845 (delete-file-recursively "deps")
9846 #t))))
9847 (build-system python-build-system)
9848 (arguments
9849 `(#:modules ((ice-9 ftw)
9850 (ice-9 match)
9851 (srfi srfi-26)
9852 (guix build utils)
9853 (guix build python-build-system))
9854 #:phases (modify-phases %standard-phases
44d10b1f
RW
9855 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
9856 (lambda _
9857 (substitute* "src/gevent/subprocess.py"
9858 (("/bin/sh") (which "sh")))
9859 (for-each (lambda (file)
9860 (substitute* file
9861 (("/bin/sh") (which "sh"))
9862 (("/bin/true") (which "true"))))
9863 (find-files "src/greentest" "\\.py$"))
9864 #t))
9865 (add-before 'build 'do-not-use-bundled-sources
9866 (lambda* (#:key inputs #:allow-other-keys)
9867 (setenv "CONFIG_SHELL" (which "bash"))
9868 (setenv "LIBEV_EMBED" "false")
9869 (setenv "CARES_EMBED" "false")
9870 (setenv "EMBED" "false")
9871
b5b56b7f
MB
9872 ;; Prevent building bundled libev.
9873 (substitute* "setup.py"
9874 (("run_make=_BUILDING")
9875 "run_make=False"))
9876
44d10b1f
RW
9877 (let ((greenlet (string-append
9878 (assoc-ref inputs "python-greenlet")
9879 "/include")))
9880 (match (scandir greenlet
9881 (lambda (item)
9882 (string-prefix? "python" item)))
9883 ((python)
b5b56b7f 9884 (setenv "C_INCLUDE_PATH"
44d10b1f
RW
9885 (string-append greenlet "/" python)))))
9886 #t))
9887 (add-before 'check 'skip-timer-test
9888 (lambda _
9889 ;; XXX: Skip 'TestTimerResolution', which appears to be
9890 ;; unreliable.
9891 (substitute* "src/greentest/test__core_timer.py"
9892 (("not greentest.RUNNING_ON_CI") "False"))
9893 #t))
9894 (replace 'check
9895 (lambda _
9896 ;; Make sure the build directory is on PYTHONPATH.
9897 (setenv "PYTHONPATH"
9898 (string-append
9899 (getenv "PYTHONPATH") ":"
9900 (getcwd) "/build/"
9901 (car (scandir "build" (cut string-prefix? "lib." <>)))))
9902 (with-directory-excursion "src/greentest"
9903 ;; XXX: Many tests require network access. Instead we only
9904 ;; run known-good tests. Unfortunately we cannot use
9905 ;; recursion here since this directory also contains
9906 ;; Python-version-specific subfolders.
9907 (apply invoke "python" "testrunner.py" "--config"
9908 "known_failures.py"
9909 (scandir "." (cut regexp-exec
9910 (make-regexp "test_+(subprocess|core)")
9911 <>)))))))))
9912 (propagated-inputs
9913 `(("python-greenlet" ,python-greenlet)
9914 ("python-objgraph" ,python-objgraph)))
9915 (native-inputs
b5b56b7f 9916 `(("python-six" ,python-six)))
44d10b1f
RW
9917 (inputs
9918 `(("c-ares" ,c-ares)
9919 ("libev" ,libev)))
9920 (home-page "http://www.gevent.org/")
9921 (synopsis "Coroutine-based network library")
9922 (description
9923 "gevent is a coroutine-based Python networking library that uses greenlet
9924to provide a high-level synchronous API on top of the libev event loop.")
9925 (license license:expat)
9926 (properties `((python2-variant . ,(delay python2-gevent))))))
9927
9928(define-public python2-gevent
9929 (let ((base (package-with-python2
9930 (strip-python2-variant python-gevent))))
9931 (package
9932 (inherit base)
9933 (native-inputs `(,@(package-native-inputs python-gevent)
9934 ("python-mock" ,python2-mock))))))
9935
9936(define-public python-fastimport
9937 (package
9938 (name "python-fastimport")
9939 (version "0.9.6")
9940 (source
9941 (origin
9942 (method url-fetch)
9943 (uri (pypi-uri "fastimport" version))
9944 (sha256
9945 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
9946 (build-system python-build-system)
9947 (home-page "https://github.com/jelmer/python-fastimport")
9948 (synopsis "VCS fastimport parser and generator in Python")
9949 (description "This package provides a parser for and generator of the Git
9950@url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
9951format.")
9952 (license license:gpl2+)))
9953
9954(define-public python2-fastimport
9955 (package-with-python2 python-fastimport))
9956
9957(define-public python-twisted
9958 (package
9959 (name "python-twisted")
0107c9b8 9960 (version "19.2.1")
44d10b1f
RW
9961 (source (origin
9962 (method url-fetch)
9963 (uri (pypi-uri "Twisted" version ".tar.bz2"))
9964 (sha256
9965 (base32
0107c9b8 9966 "0liymyd4pzphizjlpwkncxjpm9akyr3lkfkm77yfg6wasv108b7s"))))
44d10b1f
RW
9967 (build-system python-build-system)
9968 (arguments
0107c9b8 9969 '(#:tests? #f)) ; FIXME: some tests fail
44d10b1f
RW
9970 (propagated-inputs
9971 `(("python-zope-interface" ,python-zope-interface)
52ca1c4a 9972 ("python-pyhamcrest" ,python-pyhamcrest)
44d10b1f 9973 ("python-incremental" ,python-incremental)
e5ba2fe3 9974 ("python-hyperlink" ,python-hyperlink)
44d10b1f
RW
9975 ("python-constantly" ,python-constantly)
9976 ("python-automat" ,python-automat)))
9977 (home-page "https://twistedmatrix.com/")
9978 (synopsis "Asynchronous networking framework written in Python")
9979 (description
9980 "Twisted is an extensible framework for Python programming, with special
9981focus on event-based network programming and multiprotocol integration.")
9982 (license license:expat)))
9983
9984(define-public python2-twisted
9985 (package-with-python2 python-twisted))
9986
9987(define-public python-pika
9988 (package
9989 (name "python-pika")
9990 (version "0.12.0")
9991 (source
9992 (origin
9993 (method url-fetch)
9994 (uri (pypi-uri "pika" version))
9995 (sha256
9996 (base32
9997 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
9998 (build-system python-build-system)
9999 (native-inputs
10000 `(("python-pyev" ,python-pyev)
10001 ("python-tornado" ,python-tornado)
10002 ("python-twisted" ,python-twisted)))
10003 (home-page "https://pika.readthedocs.org")
10004 (synopsis "Pure Python AMQP Client Library")
10005 (description
10006 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
10007Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
10008network support library.")
10009 (license license:bsd-3)))
10010
10011(define-public python2-pika
10012 (package-with-python2 python-pika))
10013
10014(define-public python-ply
10015 (package
10016 (name "python-ply")
10017 (version "3.10")
10018 (source
10019 (origin
10020 (method url-fetch)
10021 (uri (pypi-uri "ply" version))
10022 (sha256
10023 (base32
10024 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
10025 (build-system python-build-system)
10026 (home-page "http://www.dabeaz.com/ply/")
10027 (synopsis "Python Lex & Yacc")
10028 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
10029It uses LR parsing and does extensive error checking.")
10030 (license license:bsd-3)))
10031
10032(define-public python2-ply
10033 (package-with-python2 python-ply))
10034
10035(define-public python-tabulate
10036 (package
10037 (name "python-tabulate")
10038 (version "0.7.7")
10039 (source (origin
10040 (method url-fetch)
10041 (uri (pypi-uri "tabulate" version))
10042 (sha256
10043 (base32
10044 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
10045 (build-system python-build-system)
10046 (arguments
10047 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
10048 ;; and the latest release is not tagged in the upstream repository.
10049 '(#:tests? #f))
10050 (home-page "https://bitbucket.org/astanin/python-tabulate")
10051 (synopsis "Pretty-print tabular data")
10052 (description
10053 "Tabulate is a library and command-line utility to pretty-print tabular
10054data in Python.")
10055 (license license:expat)))
10056
10057(define-public python2-tabulate
10058 (package-with-python2 python-tabulate))
10059
10060(define-public python-kazoo
10061 (package
10062 (name "python-kazoo")
10063 (version "2.4.0")
10064 (source
10065 (origin
10066 (method url-fetch)
10067 (uri (pypi-uri "kazoo" version))
10068 (sha256
10069 (base32
10070 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
10071 (build-system python-build-system)
10072 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
10073 (propagated-inputs
10074 `(("python-six" ,python-six)))
10075 (home-page "https://kazoo.readthedocs.org")
10076 (synopsis "High-level Zookeeper client library")
10077 (description
10078 "Kazoo is a Python client library for the Apache Zookeeper distributed
10079application service. It is designed to be easy to use and to avoid common
10080programming errors.")
10081 (license license:asl2.0)))
10082
10083(define-public python2-kazoo
10084 (package-with-python2 python-kazoo))
10085
10086(define-public python-pykafka
10087 (package
10088 (name "python-pykafka")
10089 (version "2.4.0")
10090 (source (origin
10091 (method url-fetch)
0ca1d040 10092 (uri (pypi-uri "pykafka" version))
44d10b1f
RW
10093 (sha256
10094 (base32
10095 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10096 (build-system python-build-system)
10097 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
10098 (propagated-inputs
10099 `(("python-gevent" ,python-gevent)
10100 ("python-kazoo" ,python-kazoo)
10101 ("python-tabulate" ,python-tabulate)))
10102 (inputs
10103 `(("librdkafka" ,librdkafka)))
10104 (home-page "https://pykafka.readthedocs.io/")
10105 (synopsis "Apache Kafka client for Python")
10106 (description
10107 "PyKafka is a client for the Apache Kafka distributed messaging system.
10108It includes Python implementations of Kafka producers and consumers, which
10109are optionally backed by a C extension built on librdkafka.")
10110 (license license:asl2.0)))
10111
10112(define-public python2-pykafka
10113 (package-with-python2 python-pykafka))
10114
10115(define-public python-wcwidth
10116 (package
10117 (name "python-wcwidth")
10118 (version "0.1.7")
10119 (source
10120 (origin
10121 (method url-fetch)
10122 (uri (pypi-uri "wcwidth" version))
10123 (sha256
10124 (base32
10125 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
10126 (build-system python-build-system)
10127 (home-page "https://github.com/jquast/wcwidth")
10128 (synopsis "Measure number of terminal column cells of wide-character codes")
10129 (description "Wcwidth measures the number of terminal column cells of
10130wide-character codes. It is useful for those implementing a terminal emulator,
10131or programs that carefully produce output to be interpreted by one. It is a
10132Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10133specified in POSIX.1-2001 and POSIX.1-2008.")
10134 (license license:expat)))
10135
10136(define-public python2-wcwidth
10137 (package-with-python2 python-wcwidth))
10138
10139(define-public python2-jsonrpclib
10140 (package
10141 (name "python2-jsonrpclib")
10142 (version "0.1.7")
10143 (source (origin
10144 (method url-fetch)
6571bba0 10145 (uri (pypi-uri "jsonrpclib" version))
44d10b1f
RW
10146 (sha256
10147 (base32
10148 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10149 (build-system python-build-system)
10150 (arguments
10151 `(#:tests? #f
10152 #:python ,python-2))
10153 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10154 (synopsis "Implementation of JSON-RPC specification for Python")
10155 (description
10156 "This library is an implementation of the JSON-RPC specification.
10157It supports both the original 1.0 specification, as well as the
10158new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10159etc.")
10160 (license license:asl2.0)))
10161
10162(define-public python-chai
10163 (package
10164 (name "python-chai")
10165 (version "1.1.2")
10166 (source (origin
10167 (method url-fetch)
10168 (uri (pypi-uri "chai" version))
10169 (sha256
10170 (base32
10171 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
10172 (build-system python-build-system)
10173 (home-page "https://github.com/agoragames/chai")
10174 (synopsis "Mocking framework for Python")
10175 (description
10176 "Chai provides an api for mocking, stubbing and spying your python
10177objects, patterned after the Mocha library for Ruby.")
10178 (license license:bsd-3)))
10179
10180(define-public python2-chai
10181 (package-with-python2 python-chai))
10182
10183(define-public python-inflection
10184 (package
10185 (name "python-inflection")
10186 (version "0.3.1")
10187 (source
10188 (origin (method url-fetch)
10189 (uri (pypi-uri "inflection" version))
10190 (sha256
10191 (base32
10192 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10193 (build-system python-build-system)
10194 (native-inputs
10195 `(("python-pytest" ,python-pytest)))
10196 (home-page "https://github.com/jpvanhal/inflection")
10197 (synopsis "Python string transformation library")
10198 (description
10199 "Inflection is a string transformation library. It singularizes
10200and pluralizes English words, and transforms strings from CamelCase to
10201underscored string.")
10202 (license license:expat)))
10203
10204(define-public python2-inflection
10205 (package-with-python2 python-inflection))
10206
10207(define-public python-pylev
10208 (package
10209 (name "python-pylev")
10210 (version "1.3.0")
10211 (source (origin
10212 (method url-fetch)
10213 (uri (pypi-uri "pylev" version))
10214 (sha256
10215 (base32
10216 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10217 (build-system python-build-system)
10218 (home-page "https://github.com/toastdriven/pylev")
10219 (synopsis "Levenshtein distance implementation in Python")
10220 (description "Pure Python Levenshtein implementation, based off the
10221Wikipedia code samples at
10222@url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
10223 (license license:bsd-3)))
10224
10225(define-public python2-pylev
10226 (package-with-python2 python-pylev))
10227
10228(define-public python-cleo
10229 (package
10230 (name "python-cleo")
10231 (version "0.6.1")
10232 (source (origin
10233 (method url-fetch)
10234 (uri (pypi-uri "cleo" version))
10235 (sha256
10236 (base32
10237 "0q1cf0szr0d54am4pypzwdnm74zpladdsinad94c2fz5i06fdpf7"))))
10238 (build-system python-build-system)
10239 (native-inputs
10240 `(;; For testing
10241 ("python-mock" ,python-mock)
10242 ("python-pytest-mock" ,python-pytest-mock)
10243 ("python-pytest" ,python-pytest)))
10244 (propagated-inputs
10245 `(("python-backpack" ,python-backpack)
10246 ("python-pastel" ,python-pastel)
10247 ("python-pylev" ,python-pylev)))
10248 (home-page "https://github.com/sdispater/cleo")
10249 (synopsis "Command-line arguments library for Python")
10250 (description
10251 "Cleo allows you to create command-line commands with signature in
10252docstring and colored output.")
10253 (license license:expat)))
10254
10255(define-public python2-cleo
10256 (package-with-python2 python-cleo))
10257
10258(define-public python-lazy-object-proxy
10259 (package
10260 (name "python-lazy-object-proxy")
10261 (version "1.3.1")
10262 (source (origin
10263 (method url-fetch)
10264 (uri (pypi-uri "lazy-object-proxy" version))
10265 (sha256
10266 (base32
10267 "0yha7q9bhw857fwaby785d63mffhngl9npwzlk9i0pwlkwvbx4gb"))))
10268 (build-system python-build-system)
10269 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10270 (synopsis "Lazy object proxy for python")
10271 (description
10272 "Lazy object proxy is an object that wraps a callable but defers the call
10273until the object is actually required, and caches the result of said call.")
10274 (license license:bsd-2)))
10275
10276(define-public python2-lazy-object-proxy
10277 (package-with-python2 python-lazy-object-proxy))
10278
10279(define-public python-dnspython
10280 (package
10281 (name "python-dnspython")
10282 (version "1.15.0")
10283 (source (origin
10284 (method url-fetch)
10285 (uri (string-append "http://www.dnspython.org/kits/"
10286 version "/dnspython-" version ".tar.gz"))
10287 (sha256
10288 (base32
10289 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
10290 (build-system python-build-system)
10291 (arguments '(#:tests? #f)) ; XXX: requires internet access
10292 (home-page "http://www.dnspython.org")
10293 (synopsis "DNS toolkit for Python")
10294 (description
10295 "dnspython is a DNS toolkit for Python. It supports almost all record
10296types. It can be used for queries, zone transfers, and dynamic updates.
10297It supports TSIG authenticated messages and EDNS0.")
10298 (license license:expat)))
10299
10300(define-public python2-dnspython
10301 (package-with-python2 python-dnspython))
10302
10303(define-public python-email-validator
10304 (package
10305 (name "python-email-validator")
10306 (version "1.0.2")
10307 (source
10308 (origin (method url-fetch)
10309 (uri (pypi-uri "email_validator" version))
10310 (sha256
10311 (base32
10312 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
10313 (build-system python-build-system)
10314 (arguments
10315 '(#:phases
10316 (modify-phases %standard-phases
10317 (add-before 'build 'use-dnspython
10318 (lambda _
10319 (substitute* "setup.py"
10320 (("dnspython3") "dnspython"))
10321 #t)))))
10322 (propagated-inputs
10323 `(("python-dnspython" ,python-dnspython)
10324 ("python-idna" ,python-idna)))
10325 (home-page "https://github.com/JoshData/python-email-validator")
10326 (synopsis "Email address validation library for Python")
10327 (description
10328 "This library validates email address syntax and deliverability.")
10329 (license license:cc0)))
10330
10331(define-public python2-email-validator
10332 (package-with-python2 python-email-validator))
10333
10334(define-public python-ukpostcodeparser
10335 (package
10336 (name "python-ukpostcodeparser")
10337 (version "1.0.3")
10338 (source (origin
10339 (method url-fetch)
10340 (uri (pypi-uri "UkPostcodeParser" version))
10341 (sha256
10342 (base32
10343 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10344 (build-system python-build-system)
10345 (home-page "https://github.com/hamstah/ukpostcodeparser")
10346 (synopsis "UK Postcode parser for Python")
10347 (description
10348 "This library provides the @code{parse_uk_postcode} function for
10349parsing UK postcodes.")
10350 (license license:expat)))
10351
10352(define-public python2-ukpostcodeparser
10353 (package-with-python2 python-ukpostcodeparser))
10354
10355(define-public python-faker
10356 (package
10357 (name "python-faker")
10358 (version "0.7.9")
10359 (source (origin
10360 (method url-fetch)
10361 (uri (pypi-uri "Faker" version))
10362 (sha256
10363 (base32
10364 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
10365 (patches
10366 (search-patches "python-faker-fix-build-32bit.patch"))
10367 (modules '((guix build utils)))
10368 (snippet
10369 '(begin
10370 (for-each delete-file (find-files "." "\\.pyc$"))
10371 #t))))
10372 (build-system python-build-system)
10373 (arguments
10374 '(#:phases
10375 (modify-phases %standard-phases
10376 (replace 'check
49ff8827 10377 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
44d10b1f
RW
10378 (native-inputs
10379 `(;; For testing
10380 ("python-email-validator" ,python-email-validator)
10381 ("python-mock" ,python-mock)
10382 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
10383 (propagated-inputs
10384 `(("python-dateutil" ,python-dateutil)
10385 ("python-six" ,python-six)))
10386 (home-page "https://github.com/joke2k/faker")
10387 (synopsis "Python package that generates fake data")
10388 (description
10389 "Faker is a Python package that generates fake data such as names,
10390addresses, and phone numbers.")
10391 (license license:expat)
10392 (properties `((python2-variant . ,(delay python2-faker))))))
10393
10394(define-public python2-faker
10395 (let ((base (package-with-python2 (strip-python2-variant
10396 python-faker))))
10397 (package
10398 (inherit base)
10399 (propagated-inputs
10400 `(("python2-ipaddress" ,python2-ipaddress)
10401 ,@(package-propagated-inputs base))))))
10402
10403(define-public python-pyaml
10404 (package
10405 (name "python-pyaml")
10406 (version "18.11.0")
10407 (source (origin
10408 (method url-fetch)
10409 (uri (pypi-uri "pyaml" version))
10410 (sha256
10411 (base32
10412 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
10413 (build-system python-build-system)
10414 (native-inputs
10415 `(("python-unidecode" ,python-unidecode)))
10416 (propagated-inputs
10417 `(("python-pyyaml" ,python-pyyaml)))
10418 (home-page "https://github.com/mk-fg/pretty-yaml")
10419 (synopsis "YAML pretty-print library for Python")
10420 (description
10421 "pyaml is a PyYAML based python module to produce pretty and readable
10422YAML-serialized data.")
492e3a7a 10423 (license license:wtfpl2)))
44d10b1f
RW
10424
10425(define-public python2-pyaml
10426 (package-with-python2 python-pyaml))
10427
10428(define-public python-backpack
10429 (package
10430 (name "python-backpack")
10431 (version "0.1")
10432 (source
10433 (origin
10434 (method url-fetch)
10435 (uri (pypi-uri "backpack" version))
10436 (sha256
10437 (base32
10438 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
10439 (build-system python-build-system)
10440 (native-inputs
10441 `(("python-pytest" ,python-pytest)
10442 ("python-nose" ,python-nose)))
10443 (propagated-inputs
10444 `(("python-simplejson" ,python-simplejson)))
10445 (home-page "https://github.com/sdispater/backpack")
10446 (synopsis "Utilities for working with Python collections")
10447 (description "Backpack provides some useful utilities for working with
10448collections of data.")
10449 (license license:expat)))
10450
10451(define-public python2-backpack
10452 (package-with-python2 python-backpack))
10453
10454(define-public python-prompt-toolkit
10455 (package
10456 (name "python-prompt-toolkit")
10457 (version "2.0.7")
10458 (source
10459 (origin
10460 (method url-fetch)
10461 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10462 (sha256
10463 (base32
10464 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
10465 (build-system python-build-system)
10466 (arguments
10467 `(#:phases
10468 (modify-phases %standard-phases
10469 (delete 'check)
10470 (add-after 'install 'post-install-check
10471 (lambda* (#:key inputs outputs #:allow-other-keys)
10472 ;; HOME is needed for the test
10473 ;; "test_pathcompleter_can_expanduser".
10474 (setenv "HOME" "/tmp")
10475 (add-installed-pythonpath inputs outputs)
10476 (invoke "py.test"))))))
10477 (propagated-inputs
10478 `(("python-wcwidth" ,python-wcwidth)
10479 ("python-six" ,python-six)
10480 ("python-pygments" ,python-pygments)))
10481 (native-inputs
10482 `(("python-pytest" ,python-pytest)))
10483 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10484 (synopsis "Library for building command line interfaces in Python")
10485 (description
10486 "Prompt-Toolkit is a library for building interactive command line
10487interfaces in Python. It's like GNU Readline but it also features syntax
10488highlighting while typing, out-of-the-box multi-line input editing, advanced
10489code completion, incremental search, support for Chinese double-width
10490characters, mouse support, and auto suggestions.")
10491 (license license:bsd-3)))
10492
10493(define-public python2-prompt-toolkit
10494 (package-with-python2 python-prompt-toolkit))
10495
10496(define-public python-prompt-toolkit-1
10497 (package (inherit python-prompt-toolkit)
10498 (version "1.0.15")
10499 (source
10500 (origin
10501 (method url-fetch)
10502 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10503 (sha256
10504 (base32
10505 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
10506
10507(define-public python2-prompt-toolkit-1
10508 (package-with-python2 python-prompt-toolkit-1))
10509
10510(define-public python-jedi
10511 (package
10512 (name "python-jedi")
b8e5de56 10513 (version "0.13.3")
44d10b1f
RW
10514 (source
10515 (origin
10516 (method url-fetch)
10517 (uri (pypi-uri "jedi" version))
10518 (sha256
10519 (base32
b8e5de56 10520 "0nsrjlb57njqppxmi8wjsb1dkad7qa7svx67jbkhixq66lz61c1b"))))
44d10b1f
RW
10521 (build-system python-build-system)
10522 (arguments
b8e5de56 10523 `( ;; Many tests are failing with Python 3.7.x as of version 0.13.3 (see:
44d10b1f
RW
10524 ;; https://github.com/davidhalter/jedi/issues/1263)
10525 #:tests? #f
10526 #:phases
10527 (modify-phases %standard-phases
10528 (replace 'check
10529 (lambda* (#:key tests? #:allow-other-keys)
10530 (when tests?
10531 (invoke "py.test" "-vv")))))))
10532 (native-inputs
10533 `(("python-pytest" ,python-pytest)
10534 ("python-docopt" ,python-docopt)))
10535 (propagated-inputs
10536 `(("python-parso" ,python-parso)))
10537 (home-page "https://github.com/davidhalter/jedi")
10538 (synopsis "Autocompletion and static analysis library for Python")
10539 (description
10540 "Jedi is a static analysis tool for Python that can be used in Integrated
10541Development Environments (@dfn{IDE}s) and text editors. It understands Python
10542on a deeper level than many other static analysis frameworks for Python.
10543
10544Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
10545well.")
10546 (license license:expat)))
10547
10548(define-public python2-jedi
b8e5de56
MC
10549 (let ((base (package-with-python2 (strip-python2-variant python-jedi))))
10550 (package
10551 (inherit base)
10552 (arguments (substitute-keyword-arguments (package-arguments base)
10553 ((#:tests? _) #t))))))
44d10b1f
RW
10554
10555(define-public ptpython
10556 (package
10557 (name "ptpython")
10558 (version "0.34")
10559 (source (origin
10560 (method url-fetch)
10561 (uri (pypi-uri "ptpython" version))
10562 (sha256
10563 (base32
10564 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10565 (build-system python-build-system)
10566 (arguments
10567 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
10568 (propagated-inputs
10569 `(("python-docopt" ,python-docopt)
10570 ("python-jedi" ,python-jedi)
10571 ("python-prompt-toolkit" ,python-prompt-toolkit)
10572 ("python-pygments" ,python-pygments)))
10573 (home-page "https://github.com/jonathanslenders/ptpython")
10574 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10575 (description
10576 "ptpython is a Python read-eval-print loop with IDE-like features.
10577It supports syntax highlighting, multiline editing, autocompletion, mouse,
10578color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10579etc.")
10580 (license license:bsd-3)
10581 (properties `((python2-variant . ,(delay ptpython-2))))))
10582
10583(define-public ptpython-2
10584 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10585 (package
10586 (inherit base)
10587 (name "ptpython2"))))
10588
10589(define-public python-stem
10590 (package
10591 (name "python-stem")
e746d1c3 10592 (version "1.7.1")
44d10b1f
RW
10593 (source
10594 (origin
10595 (method url-fetch)
10596 (uri (pypi-uri "stem" version))
10597 (sha256
10598 (base32
e746d1c3 10599 "18lc95pmc7i089nlsb06dsxyjl5wbhxfqgdxbjcia35ndh8z7sn9"))))
44d10b1f
RW
10600 (build-system python-build-system)
10601 (arguments
10602 `(#:phases
10603 (modify-phases %standard-phases
10604 (replace 'check
10605 (lambda _
10606 (invoke "./run_tests.py" "--unit")
10607 #t)))))
10608 (native-inputs
10609 `(("python-mock" ,python-mock)
10610 ("python-pycodestyle" ,python-pycodestyle)
10611 ("python-pyflakes" ,python-pyflakes)))
10612 (home-page "https://stem.torproject.org/")
10613 (synopsis
10614 "Python controller library that allows applications to interact with Tor")
10615 (description
10616 "Stem is a Python controller library for Tor. With it you can use Tor's
10617control protocol to script against the Tor process and read descriptor data
10618relays publish about themselves.")
10619 (license license:lgpl3)))
10620
10621(define-public python2-stem
10622 (package-with-python2 python-stem))
10623
10624(define-public python-pyserial
10625 (package
10626 (name "python-pyserial")
10627 (version "3.1.1")
10628 (source
10629 (origin
10630 (method url-fetch)
10631 (uri (pypi-uri "pyserial" version))
10632 (sha256
10633 (base32
10634 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
10635 (build-system python-build-system)
10636 (arguments
10637 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
10638 ;; #:phases
10639 ;; (modify-phases %standard-phases
10640 ;; (replace 'check
10641 ;; (lambda _
10642 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
10643 (home-page
10644 "https://github.com/pyserial/pyserial")
10645 (synopsis "Python Serial Port Bindings")
10646 (description "@code{pyserial} provide serial port bindings for Python. It
10647supports different byte sizes, stop bits, parity and flow control with RTS/CTS
10648and/or Xon/Xoff. The port is accessed in RAW mode.")
10649 (license license:bsd-3)))
10650
10651(define-public python2-pyserial
10652 (package-with-python2 python-pyserial))
10653
10654(define-public python-kivy
10655 (package
10656 (name "python-kivy")
10657 (version "1.10.1")
10658 (source
10659 (origin
10660 (method url-fetch)
10661 (uri (pypi-uri "Kivy" version))
10662 (file-name (string-append name "-" version ".tar.gz"))
10663 (sha256
10664 (base32
10665 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
10666 (build-system python-build-system)
10667 (arguments
10668 `(#:tests? #f ; Tests require many optional packages
10669 #:phases
10670 (modify-phases %standard-phases
10671 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
10672 (lambda* (#:key inputs #:allow-other-keys)
10673 (setenv "KIVY_SDL2_PATH"
10674 (string-append (assoc-ref inputs "sdl-union")
10675 "/include/SDL2"))
10676 #t)))))
10677 (native-inputs
10678 `(("git" ,git)
10679 ("pkg-config" ,pkg-config)
10680 ("python-cython" ,python-cython)))
10681 (inputs
10682 `(("gstreamer" ,gstreamer)
10683 ("mesa" ,mesa)
10684 ("sdl-union"
10685 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
10686 (home-page "http://kivy.org")
10687 (synopsis
10688 "Multitouch application framework")
10689 (description
10690 "A software library for rapid development of
10691hardware-accelerated multitouch applications.")
10692 (license license:expat)))
10693
10694(define-public python2-kivy
10695 (package-with-python2 python-kivy))
10696
10697(define-public python-kivy-next
10698 (deprecated-package "python-kivy-next" python-kivy))
10699
10700(define-public python2-kivy-next
10701 (deprecated-package "python2-kivy-next" python2-kivy))
10702
10703(define-public python-binaryornot
10704 (package
10705 (name "python-binaryornot")
10706 (version "0.4.4")
10707 (source (origin
10708 (method url-fetch)
10709 (uri (pypi-uri "binaryornot" version))
10710 (sha256
10711 (base32
10712 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
10713 (build-system python-build-system)
10714 (propagated-inputs
10715 `(("python-chardet" ,python-chardet)
10716 ("python-hypothesis" ,python-hypothesis)))
10717 (home-page "https://github.com/audreyr/binaryornot")
10718 (synopsis "Package to check if a file is binary or text")
10719 (description "Ultra-lightweight pure Python package to check if a file is
10720binary or text.")
10721 (license license:bsd-3)
10722 (properties `((python2-variant . ,(delay python2-binaryornot))))))
10723
10724(define-public python2-binaryornot
10725 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
10726 (package (inherit base)
10727 (propagated-inputs
10728 `(("python2-enum34" ,python2-enum34)
10729 ,@(package-propagated-inputs base))))))
10730
10731(define-public python-nltk
10732 (package
10733 (name "python-nltk")
10734 (version "3.2.1")
10735 (source (origin
10736 (method url-fetch)
10737 (uri (pypi-uri "nltk" version))
10738 (sha256
10739 (base32
10740 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
10741 (build-system python-build-system)
10742 (arguments
10743 '(;; The tests require some extra resources to be downloaded.
10744 ;; TODO Try packaging these resources.
10745 #:tests? #f))
10746 (home-page "http://nltk.org/")
10747 (synopsis "Natural Language Toolkit")
10748 (description "It provides interfaces to over 50 corpora and lexical
10749resources such as WordNet, along with a suite of text processing libraries
10750for classification, tokenization, stemming, tagging, parsing, and semantic
10751reasoning, wrappers for natural language processing libraries.")
10752 (license license:asl2.0)))
10753
10754(define-public python2-nltk
10755 (package-with-python2 python-nltk))
10756
10757(define-public python-pymongo
10758 (package
10759 (name "python-pymongo")
10760 (version "3.7.2")
10761 (source (origin
10762 (method url-fetch)
10763 (uri (pypi-uri "pymongo" version))
10764 (sha256
10765 (base32
10766 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
10767 (build-system python-build-system)
10768 (propagated-inputs
10769 `(("python-certifi" ,python-certifi)))
10770 (home-page "https://github.com/mongodb/mongo-python-driver")
10771 (synopsis "Python driver for MongoDB")
10772 (description "Python driver for MongoDB.")
10773 (license license:asl2.0)))
10774
10775(define-public python2-pymongo
10776 (package-with-python2 python-pymongo))
10777
44d10b1f
RW
10778(define-public python-consul
10779 (package
10780 (name "python-consul")
10781 (version "0.6.1")
10782 (source
10783 (origin
10784 (method url-fetch)
10785 (uri (pypi-uri "python-consul" version))
10786 (sha256
10787 (base32
10788 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
10789 (build-system python-build-system)
10790 (arguments
10791 '(#:tests? #f)) ; The tests are not distributed
10792 (propagated-inputs
10793 `(("python-requests" ,python-requests)
10794 ("python-six" ,python-six)))
10795 (home-page "https://github.com/cablehead/python-consul")
10796 (synopsis "Python client for Consul")
10797 (description
10798 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
10799discovery, monitoring and configuration.")
10800 (license license:expat)))
10801
10802(define-public python2-consul
10803 (package-with-python2 python-consul))
10804
10805(define-public python-schematics
10806 (package
10807 (name "python-schematics")
10808 (version "1.1.1")
10809 (source
1961d187
TGR
10810 (origin
10811 (method git-fetch)
10812 (uri (git-reference
10813 (url "https://github.com/schematics/schematics.git")
10814 (commit (string-append "v" version))))
10815 (file-name (git-file-name name version))
10816 (sha256
10817 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
44d10b1f
RW
10818 (build-system python-build-system)
10819 (propagated-inputs
10820 `(("python-six" ,python-six)))
10821 (arguments
1961d187
TGR
10822 ;; The tests require a bunch of not very nice packages with fixed
10823 ;; version requirements (e.g. python-coveralls).
10824 `(#:tests? #f))
44d10b1f
RW
10825 (home-page "https://github.com/schematics/schematics")
10826 (synopsis "Python Data Structures for Humans")
10827 (description "Python Data Structures for Humans.")
10828 (license license:bsd-3)))
10829
10830(define-public python2-schematics
10831 (package-with-python2 python-schematics))
10832
10833(define-public python-odfpy
10834 (package
10835 (name "python-odfpy")
10836 (version "1.3.3")
10837 (source (origin
10838 (method url-fetch)
10839 (uri (pypi-uri "odfpy" version))
10840 (sha256
10841 (base32
10842 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
10843 (arguments
10844 `(#:modules ((srfi srfi-1)
10845 (guix build python-build-system)
10846 (guix build utils))
10847 #:phases
10848 (modify-phases %standard-phases
10849 (replace 'check
10850 ;; The test runner invokes python2 and python3 for test*.py.
10851 ;; To avoid having both in inputs, we replicate it here.
10852 (lambda _
21ccc01d
RW
10853 (for-each (lambda (test-file) (invoke "python" test-file))
10854 (find-files "tests" "^test.*\\.py$"))
10855 #t)))))
44d10b1f
RW
10856 (build-system python-build-system)
10857 (home-page "https://github.com/eea/odfpy")
10858 (synopsis "Python API and tools to manipulate OpenDocument files")
10859 (description "Collection of libraries and utility programs written in
10860Python to manipulate OpenDocument 1.2 files.")
10861 (license
10862 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
10863 ;; number of files with other licenses.
10864 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
10865
10866(define-public python2-odfpy
10867 (package-with-python2 python-odfpy))
10868
10869(define-public python-natsort
10870 (package
10871 (name "python-natsort")
10872 (version "5.4.1")
10873 (source (origin
10874 (method url-fetch)
10875 (uri (pypi-uri "natsort" version))
10876 (sha256
10877 (base32
10878 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
10879 (build-system python-build-system)
10880 (arguments
10881 `(#:modules ((guix build utils)
10882 (guix build python-build-system)
10883 (srfi srfi-1)
10884 (srfi srfi-26)
10885 (ice-9 ftw))
10886 #:phases
10887 (modify-phases %standard-phases
10888 (add-before 'check 'set-cachedir
10889 ;; Tests require write access to $HOME by default
10890 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
10891 (replace 'check
10892 (lambda _
10893 (let ((cwd (getcwd)))
10894 (setenv "PYTHONPATH"
10895 (string-append
10896 cwd "/build/"
10897 (find (cut string-prefix? "lib" <>)
10898 (scandir (string-append cwd "/build")))
10899 ":"
10900 (getenv "PYTHONPATH")))
10901 (invoke "pytest" "-v")))))))
10902 (native-inputs
10903 `(("python-hypothesis" ,python-hypothesis)
10904 ("python-pytest-cov" ,python-pytest-cov)
10905 ("python-pytest-mock" ,python-pytest-mock)
10906 ("python-pytest" ,python-pytest)))
10907 (propagated-inputs ; TODO: Add python-fastnumbers.
10908 `(("python-pyicu" ,python-pyicu)))
10909 (home-page "https://github.com/SethMMorton/natsort")
10910 (synopsis "Natural sorting for python and shell")
10911 (description
10912 "Natsort lets you apply natural sorting on lists instead of
10913lexicographical. If you use the built-in @code{sorted} method in python
36a4366d
EF
10914on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
10915@code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
10916@code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
10917identifies numbers and sorts them separately from strings. It can also sort
10918version numbers, real numbers, mixed types and more, and comes with a shell
10919command @command{natsort} that exposes this functionality in the command line.")
44d10b1f
RW
10920 (license license:expat)
10921 (properties `((python2-variant . ,(delay python2-natsort))))))
10922
10923(define-public python2-natsort
10924 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
10925 (package (inherit base)
10926 (native-inputs
10927 `(("python2-pathlib" ,python2-pathlib)
10928 ,@(package-native-inputs base))))))
10929
10930(define-public python-glances
10931 (package
10932 (name "python-glances")
10933 (version "3.0.2")
10934 (source
10935 (origin
10936 (method url-fetch)
10937 (uri (pypi-uri "Glances" version))
10938 (sha256
10939 (base32
10940 "09fxysfp1n16csqvzvawy74qm6a94nvwjf3vcf5gkqp4i6k4vjjy"))))
10941 (build-system python-build-system)
10942 (propagated-inputs
10943 `(("python-psutil" ,python-psutil)))
10944 (home-page
10945 "https://github.com/nicolargo/glances")
10946 (synopsis
10947 "A cross-platform curses-based monitoring tool")
10948 (description
10949 "Glances is a curses-based monitoring tool for a wide variety of platforms.
10950Glances uses the PsUtil library to get information from your system. It monitors
10951CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
10952 (license license:lgpl3+)))
10953
10954(define-public python2-glances
10955 (package-with-python2 python-glances))
10956
10957(define-public python-graphql-core
10958 (package
10959 (name "python-graphql-core")
10960 (version "0.5.3")
10961 (source
10962 (origin
10963 (method url-fetch)
10964 (uri (pypi-uri "graphql-core" version))
10965 (sha256
10966 (base32
10967 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
10968 (build-system python-build-system)
10969 (arguments
10970 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
10971 #:phases
10972 (modify-phases %standard-phases
10973 (add-after 'unpack 'patch-hardcoded-version
10974 (lambda _ (substitute*
10975 "setup.py"
10976 (("'gevent==1.1rc1'") "'gevent'"))
10977 #t)))))
10978 (native-inputs
10979 `(("python-gevent" ,python-gevent)
10980 ("python-mock" ,python-mock)
10981 ("python-pytest-mock" ,python-pytest-mock)))
10982 (propagated-inputs
10983 `(("python-promise" ,python-promise)
10984 ("python-six" ,python-six)))
10985 (home-page "https://github.com/graphql-python/graphql-core")
10986 (synopsis "GraphQL implementation for Python")
10987 (description
10988 "GraphQL implementation for Python. GraphQL is a data query language and
10989runtime designed and used to request and deliver data to mobile and web apps.
10990This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
10991to Python.")
10992 (license license:expat)))
10993
10994(define-public python2-graphql-core
10995 (package-with-python2 python-graphql-core))
10996
10997(define-public python-graphql-relay
10998 (package
10999 (name "python-graphql-relay")
11000 (version "0.4.5")
11001 (source
11002 (origin
11003 (method url-fetch)
11004 (uri (pypi-uri "graphql-relay" version))
11005 (sha256
11006 (base32
11007 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
11008 (build-system python-build-system)
11009 (arguments
11010 '(#:tests? #f)) ; The tests are not distributed
11011 (propagated-inputs
11012 `(("python-graphql-core" ,python-graphql-core)
11013 ("python-promise" ,python-promise)
11014 ("python-six" ,python-six)))
11015 (home-page "https://github.com/graphql-python/graphql-relay-py")
11016 (synopsis "Relay implementation for Python")
11017 (description
11018 "This is a library to allow the easy creation of Relay-compliant servers
11019using the GraphQL Python reference implementation of a GraphQL server. It
11020should be noted that the code is a exact port of the original
11021@url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11022from Facebook.")
11023 (license license:expat)))
11024
11025(define-public python2-graphql-relay
11026 (package-with-python2 python-graphql-relay))
11027
11028(define-public python-graphene
11029 (package
11030 (name "python-graphene")
11031 (version "0.10.2")
11032 (source
11033 (origin
11034 (method url-fetch)
11035 (uri (pypi-uri "graphene" version))
11036 (sha256
11037 (base32
11038 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11039 (build-system python-build-system)
11040 (propagated-inputs
11041 `(("python-graphql-core" ,python-graphql-core)
11042 ("python-graphql-relay" ,python-graphql-relay)
11043 ("python-iso8601" ,python-iso8601)
11044 ("python-promise" ,python-promise)
11045 ("python-six" ,python-six)))
11046 (arguments
11047 `(#:tests? #f)) ; no tests/ in the PyPI tarball
11048 (home-page "http://graphene-python.org/")
11049 (synopsis "GraphQL Framework for Python")
11050 (description
11051 "Graphene is a Python library for building GraphQL schemas/types.
11052A GraphQL schema describes your data model, and provides a GraphQL server
11053with an associated set of resolve methods that know how to fetch data.")
11054 (properties `((python2-variant . ,(delay python2-graphene))))
11055 (license license:expat)))
11056
11057(define-public python2-graphene
11058 (let ((base (package-with-python2
11059 (strip-python2-variant python-graphene))))
11060 (package (inherit base)
11061 (native-inputs
11062 `(("python2-sqlalchemy" ,python2-sqlalchemy)
11063 ,@(package-native-inputs base))))))
11064
11065(define-public python-nautilus
11066 (package
11067 (name "python-nautilus")
11068 (version "0.4.9")
11069 (source
11070 (origin
11071 (method url-fetch)
11072 (uri (pypi-uri "nautilus" version))
11073 (sha256
11074 (base32
11075 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11076 (build-system python-build-system)
11077 (arguments `(#:tests? #f)) ; fails to import test modules
11078 (propagated-inputs
11079 `(("python-bcrypt" ,python-bcrypt)
11080 ("python-click" ,python-click)
11081 ("python-consul" ,python-consul)
11082 ("python-graphene" ,python-graphene)
11083 ("python-jinja2" ,python-jinja2)
11084 ("python-peewee" ,python-peewee)
11085 ("python-pika" ,python-pika)
11086 ("python-tornado" ,python-tornado)
11087 ("python-wtforms" ,python-wtforms)))
11088 (native-inputs
11089 `(("python-nose2" ,python-nose2)))
11090 (home-page "https://github.com/AlecAivazis/nautilus")
11091 (synopsis "Library for creating microservice applications")
11092 (description
11093 "Nautilus is a framework for flux based microservices that looks to
11094provide extendible implementations of common aspects of a cloud so that you can
11095focus on building massively scalable web applications.")
11096 (license license:expat)))
11097
11098(define-public python-snowballstemmer
11099 (package
11100 (name "python-snowballstemmer")
11101 (version "1.2.1")
11102 (source (origin
11103 (method url-fetch)
11104 (uri (pypi-uri "snowballstemmer" version))
11105 (sha256
11106 (base32
11107 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
11108 (build-system python-build-system)
11109 (arguments
11110 `(;; No tests exist
11111 #:tests? #f))
11112 (home-page "https://github.com/shibukawa/snowball_py")
11113 (synopsis "Snowball stemming library collection for Python")
11114 (description "This package provides 16 word stemmer algorithms generated
11115from Snowball algorithms. It includes the 15 original ones plus the Poerter
11116English stemmer.")
11117 (license license:bsd-3)))
11118
11119(define-public python2-snowballstemmer
11120 (package-with-python2 python-snowballstemmer))
11121
44d10b1f
RW
11122(define-public python-setproctitle
11123(package
11124 (name "python-setproctitle")
11125 (version "1.1.10")
11126 (source
11127 (origin
11128 (method url-fetch)
11129 (uri (pypi-uri "setproctitle" version))
11130 (sha256
11131 (base32
11132 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11133 (build-system python-build-system)
11134 (arguments
11135 '(#:phases
11136 (modify-phases %standard-phases
11137 (add-before 'check 'patch-Makefile
11138 ;; Stricly this is only required for the python2 variant.
11139 ;; But adding a phase in an inherited package seems to be
11140 ;; cumbersum. So we patch even for python3.
11141 (lambda _
11142 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11143 (when nose
11144 (substitute* "Makefile"
11145 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11146 (string-append nose "/bin/nosetests "))))
11147 #t)))
11148 (replace 'check
11149 (lambda _
11150 (setenv "PYTHON" (or (which "python3") (which "python")))
11151 (setenv "PYCONFIG" (or (which "python3-config")
11152 (which "python-config")))
11153 (setenv "CC" "gcc")
11154 ;; No need to extend PYTHONPATH to find the built package, since
11155 ;; the Makefile will build anyway
11156 (invoke "make" "check"))))))
11157 (native-inputs
11158 `(("procps" ,procps))) ; required for tests
11159 (home-page
11160 "https://github.com/dvarrazzo/py-setproctitle")
11161 (synopsis
11162 "Setproctitle implementation for Python to customize the process title")
11163 (description "The library allows a process to change its title (as displayed
11164by system tools such as ps and top).
11165
11166Changing the title is mostly useful in multi-process systems, for
11167example when a master process is forked: changing the children's title
11168allows to identify the task each process is busy with. The technique
11169is used by PostgreSQL and the OpenSSH Server for example.")
11170 (license license:bsd-3)
11171 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11172
11173(define-public python2-setproctitle
11174 (let ((base (package-with-python2
11175 (strip-python2-variant python-setproctitle))))
11176 (package
11177 (inherit base)
11178 (native-inputs `(("python2-nose" ,python2-nose)
11179 ,@(package-native-inputs base))))))
11180
11181(define-public python-validictory
11182 (package
11183 (name "python-validictory")
11184 (version "1.0.1")
11185 (source
11186 (origin
11187 (method url-fetch)
11188 (uri (pypi-uri "validictory" version))
11189 (sha256
11190 (base32
11191 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11192 (build-system python-build-system)
11193 (arguments
11194 '(#:phases
11195 (modify-phases %standard-phases
11196 (add-after 'unpack 'bootstrap
11197 ;; Move the tests out of the package directory to avoid
11198 ;; packaging them.
11199 (lambda* _
11200 (rename-file "validictory/tests" "tests")
11201 (delete-file "tests/__init__.py")))
11202 (replace 'check
11203 (lambda _
11204 ;; Extend PYTHONPATH so the built package will be found.
11205 (setenv "PYTHONPATH"
11206 (string-append (getcwd) "/build/lib:"
11207 (getenv "PYTHONPATH")))
6568bd5d 11208 (invoke "py.test" "-vv" ))))))
44d10b1f
RW
11209 (native-inputs
11210 `(("python-pytest" ,python-pytest)))
11211 (home-page
11212 "https://github.com/jamesturk/validictory")
11213 (synopsis "General purpose Python data validator")
11214 (description "It allows validation of arbitrary Python data structures.
11215
11216The schema format is based on the JSON Schema
11217proposal (http://json-schema.org), so combined with json the library is also
11218useful as a validator for JSON data.")
11219 (license license:expat)))
11220
11221(define-public python2-validictory
11222 (package-with-python2 python-validictory))
11223
11224(define-public python-pyelftools
11225 (package
11226 (name "python-pyelftools")
11227 (version "0.25")
11228 (source
11229 (origin
11230 (method url-fetch)
11231 (uri (pypi-uri "pyelftools" version))
11232 (sha256
11233 (base32
11234 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
11235 (build-system python-build-system)
11236 (arguments
11237 `(#:phases
11238 (modify-phases %standard-phases
11239 (add-before 'check 'set-pythonpath
11240 (lambda _
11241 (setenv "PYTHONPATH"
11242 (string-append
11243 (getcwd) "/test/"
11244 ":" (getenv "PYTHONPATH")))
11245 #t)))))
11246 (home-page
11247 "https://github.com/eliben/pyelftools")
11248 (synopsis
11249 "Analyze binary and library file information")
11250 (description "This Python library provides interfaces for parsing and
11251analyzing two binary and library file formats; the Executable and Linking
11252Format (ELF), and debugging information in the Debugging With Attributed
11253Record Format (DWARF).")
11254 (license license:public-domain)))
11255
11256(define-public python-pyev
11257 (package
11258 (name "python-pyev")
11259 (version "0.9.0")
11260 (source
11261 (origin
11262 (method url-fetch)
11263 (uri (pypi-uri "pyev" version))
11264 (sha256
11265 (base32
11266 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11267 (build-system python-build-system)
11268 (arguments
11269 `(#:tests? #f ; no test suite
11270 #:phases
11271 (modify-phases %standard-phases
11272 (add-after 'unpack 'patch
11273 (lambda* (#:key inputs #:allow-other-keys)
11274 (let ((libev (string-append (assoc-ref inputs "libev")
11275 "/lib/libev.so.4")))
11276 (substitute* "setup.py"
11277 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
11278 (string-append "libev_dll_name = \"" libev "\"")))))))))
11279 (inputs
11280 `(("libev" ,libev)))
11281 (home-page "http://pythonhosted.org/pyev/")
11282 (synopsis "Python libev interface")
11283 (description "Pyev provides a Python interface to libev.")
11284 (license license:gpl3)))
11285
11286(define-public python2-pyev
11287 (package-with-python2 python-pyev))
11288
11289(define-public python-imagesize
11290 (package
11291 (name "python-imagesize")
11292 (version "1.1.0")
11293 (source
11294 (origin
11295 (method url-fetch)
11296 (uri (pypi-uri "imagesize" version))
11297 (sha256
11298 (base32
11299 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
11300 (build-system python-build-system)
11301 (home-page "https://github.com/shibukawa/imagesize_py")
11302 (synopsis "Gets image size of files in various formats in Python")
11303 (description
11304 "This package allows determination of image size from
11305PNG, JPEG, JPEG2000 and GIF files in pure Python.")
11306 (license license:expat)))
11307
11308(define-public python2-imagesize
11309 (package-with-python2 python-imagesize))
11310
11311(define-public python-termstyle
11312 (package
11313 (name "python-termstyle")
11314 (version "0.1.11")
11315 (source
11316 (origin
11317 (method url-fetch)
11318 (uri (pypi-uri "termstyle" version))
11319 (sha256
11320 (base32
11321 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
11322 (build-system python-build-system)
11323 (arguments
11324 '(#:phases
11325 (modify-phases %standard-phases
11326 (replace 'check
11327 (lambda _
831080a6 11328 (invoke "python" "test3.py"))))))
44d10b1f
RW
11329 (home-page "https://github.com/gfxmonk/termstyle")
11330 (synopsis "Console text coloring for Python")
11331 (description "This package provides console text coloring for Python.")
11332 (license license:bsd-3)))
11333
11334(define-public python-argcomplete
11335 (package
11336 (name "python-argcomplete")
11337 (version "1.7.0")
11338 (source
11339 (origin
11340 (method url-fetch)
11341 (uri (pypi-uri "argcomplete" version))
11342 (sha256
11343 (base32
11344 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
11345 (build-system python-build-system)
11346 (native-inputs
11347 `(("python-pexpect" ,python-pexpect)
11348 ("tcsh" ,tcsh)
11349 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
11350 (home-page "https://github.com/kislyuk/argcomplete")
11351 (synopsis "Shell tab completion for Python argparse")
11352 (description "argcomplete provides extensible command line tab completion
11353of arguments and options for Python scripts using @code{argparse}. It's
11354particularly useful for programs with many options or sub-parsers that can
11355dynamically suggest completions; for example, when browsing resources over the
11356network.")
11357 (license license:asl2.0)))
11358
11359(define-public python2-argcomplete
11360 (package-with-python2 python-argcomplete))
11361
11362(define-public python-xopen
11363 (package
11364 (name "python-xopen")
24d64989 11365 (version "0.5.0")
44d10b1f
RW
11366 (source
11367 (origin
11368 (method url-fetch)
11369 (uri (pypi-uri "xopen" version))
11370 (sha256
11371 (base32
24d64989 11372 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
44d10b1f 11373 (build-system python-build-system)
24d64989
RW
11374 (propagated-inputs
11375 `(("python-setuptools-scm" ,python-setuptools-scm)))
44d10b1f
RW
11376 (home-page "https://github.com/marcelm/xopen/")
11377 (synopsis "Open compressed files transparently")
11378 (description "This module provides an @code{xopen} function that works like
11379Python's built-in @code{open} function, but can also deal with compressed files.
11380Supported compression formats are gzip, bzip2 and, xz, and are automatically
11381recognized by their file extensions. The focus is on being as efficient as
11382possible on all supported Python versions.")
11383 (license license:expat)))
11384
11385(define-public python2-xopen
11386 (let ((base (package-with-python2
11387 (strip-python2-variant python-xopen))))
11388 (package
11389 (inherit base)
11390 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
11391 ,@(package-propagated-inputs base))))))
11392
11393(define-public python-cheetah
11394 (package
11395 (name "python-cheetah")
11396 (version "3.1.0")
11397 (source
11398 (origin
11399 (method url-fetch)
11400 (uri (pypi-uri "Cheetah3" version))
11401 (sha256
11402 (base32
11403 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
11404 (build-system python-build-system)
11405 (arguments
11406 `(#:modules ((guix build utils)
11407 (guix build python-build-system)
11408 (ice-9 ftw)
11409 (srfi srfi-1)
11410 (srfi srfi-26))
11411 #:phases (modify-phases %standard-phases
11412 (add-after 'unpack 'use-absolute-python
11413 (lambda _
11414 (substitute* "Cheetah/CheetahWrapper.py"
11415 (("#!/usr/bin/env python")
11416 (string-append "#!" (which "python"))))
11417 #t))
11418 (replace 'check
11419 (lambda _
11420 (let ((cwd (getcwd)))
11421 (setenv "PYTHONPATH"
11422 (string-append
11423 cwd "/build/"
11424 (find (cut string-prefix? "lib" <>)
11425 (scandir (string-append cwd "/build")))
11426 ":" (getenv "PYTHONPATH")))
11427 (setenv "PATH"
11428 (string-append (getenv "PATH")
11429 ":" cwd "/bin"))
11430 (setenv "TMPDIR" "/tmp")
11431
11432 (substitute* "Cheetah/Tests/Test.py"
11433 (("unittest.TextTestRunner\\(\\)")
11434 "unittest.TextTestRunner(verbosity=2)"))
11435
11436 (invoke "python" "Cheetah/Tests/Test.py")))))))
11437 (propagated-inputs
11438 `(("python-markdown" ,python-markdown))) ;optional
11439 (home-page "http://cheetahtemplate.org/")
11440 (synopsis "Template engine")
11441 (description "Cheetah is a text-based template engine and Python code
11442generator.
11443
11444Cheetah can be used as a standalone templating utility or referenced as
11445a library from other Python applications. It has many potential uses,
11446but web developers looking for a viable alternative to ASP, JSP, PHP and
11447PSP are expected to be its principle user group.
11448
11449Features:
11450@enumerate
11451@item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
11452 text-based format.
11453@item Cleanly separates content, graphic design, and program code.
11454@item Blends the power and flexibility of Python with a simple template language
11455 that non-programmers can understand.
11456@item Gives template writers full access to any Python data structure, module,
11457 function, object, or method in their templates.
11458@item Makes code reuse easy by providing an object-orientated interface to
11459 templates that is accessible from Python code or other Cheetah templates.
11460 One template can subclass another and selectively reimplement sections of it.
11461@item Provides a simple, yet powerful, caching mechanism that can dramatically
11462 improve the performance of a dynamic website.
11463@item Compiles templates into optimized, yet readable, Python code.
11464@end enumerate")
11465 (license (license:x11-style "file://LICENSE"))))
11466
11467(define-public python2-cheetah
11468 (package-with-python2 python-cheetah))
11469
11470(define-public python-dulwich
11471 (package
11472 (name "python-dulwich")
11473 (version "0.18.6")
11474 (source
11475 (origin
11476 (method url-fetch)
11477 (uri (list (string-append "https://www.dulwich.io/releases/"
11478 "dulwich-" version ".tar.gz")
11479 (pypi-uri "dulwich" version)))
11480 (sha256
11481 (base32
11482 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
11483 (build-system python-build-system)
11484 (arguments
11485 `(#:phases
11486 (modify-phases %standard-phases
11487 (add-before 'check 'fix-tests
11488 (lambda* (#:key inputs #:allow-other-keys)
11489 ;; The tests use Popen with a custom environment which doesn't
11490 ;; include PATH.
11491 (substitute* "dulwich/tests/compat/utils.py"
11492 (("'git'") (string-append "'"
11493 (which "git")
11494 "'")))
11495 (substitute* '("dulwich/tests/test_repository.py"
11496 "dulwich/tests/test_hooks.py")
11497 (("#!/bin/sh") (string-append "#!" (which "sh"))))
11498 (setenv "TEST_RUNNER" "unittest")
11499 (setenv "PYTHONHASHSEED" "random")
11500 #t)))))
11501 (propagated-inputs
11502 `(("python-fastimport" ,python-fastimport)))
11503 (native-inputs
11504 `(("python-mock" ,python-mock)
11505 ("python-geventhttpclient" ,python-geventhttpclient)
11506 ("git" ,git)))
11507 (home-page "https://www.dulwich.io/")
11508 (synopsis "Git implementation in Python")
11509 (description "Dulwich is an implementation of the Git file formats and
11510protocols written in pure Python.")
11511 ;; Can be used with either license.
11512 (license (list license:asl2.0 license:gpl2+))))
11513
11514(define-public python2-dulwich
11515 (package-with-python2 python-dulwich))
11516
11517(define-public python-pbkdf2
11518 (package
11519 (name "python-pbkdf2")
11520 (version "1.3")
11521 (source
11522 (origin
11523 (method url-fetch)
11524 (uri (pypi-uri "pbkdf2" version))
11525 (sha256
11526 (base32
11527 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
11528 (build-system python-build-system)
11529 (arguments
11530 '(#:phases
11531 (modify-phases %standard-phases
11532 (replace 'check
11533 (lambda _
11534 (setenv "PYTHONPATH"
11535 (string-append (getcwd) "/build/lib:"
11536 (getenv "PYTHONPATH")))
ee2bb944 11537 (invoke "python" "test/test_pbkdf2.py"))))))
44d10b1f
RW
11538 (propagated-inputs
11539 `(("python-pycrypto" ,python-pycrypto))) ; optional
11540 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
11541 (synopsis "Password-based key derivation")
11542 (description "This module implements the password-based key derivation
11543function, PBKDF2, specified in RSA PKCS#5 v2.0.
11544
11545PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
11546is part of the RSA Public Key Cryptography Standards series. The provided
11547implementation takes a password or a passphrase and a salt value (and
11548optionally a iteration count, a digest module, and a MAC module) and provides
11549a file-like object from which an arbitrarly-sized key can be read.")
11550 (license license:expat)))
11551
11552(define-public python2-pbkdf2
11553 (package-with-python2 python-pbkdf2))
11554
11555(define-public python-qrcode
11556 (package
11557 (name "python-qrcode")
217ea1a1 11558 (version "6.1")
44d10b1f
RW
11559 (source
11560 (origin
11561 (method url-fetch)
11562 (uri (pypi-uri "qrcode" version))
11563 (sha256
217ea1a1 11564 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
44d10b1f
RW
11565 (build-system python-build-system)
11566 (arguments
11567 ;; FIXME: Tests require packaging 'pymaging'.
11568 '(#:tests? #f))
11569 (propagated-inputs
11570 `(("python-lxml" ,python-lxml) ; for SVG output
11571 ("python-pillow" ,python-pillow) ; for PNG output
11572 ("python-six" ,python-six)))
44d10b1f
RW
11573 (home-page "https://github.com/lincolnloop/python-qrcode")
11574 (synopsis "QR Code image generator")
11575 (description "This package provides a pure Python QR Code generator
11576module. It uses the Python Imaging Library (PIL) to allow for the generation
11577of QR Codes.
11578
11579In addition this package provides a command line tool to generate QR codes and
11580either write these QR codes to a file or do the output as ascii art at the
11581console.")
11582 (license license:bsd-3)))
11583
11584(define-public python2-qrcode
11585 (package-with-python2 python-qrcode))
11586
11587(define-public python-rst2ansi
11588 (package
11589 (name "python-rst2ansi")
11590 (version "0.1.5")
11591 (source
11592 (origin
11593 (method url-fetch)
11594 (uri (pypi-uri "rst2ansi" version))
11595 (sha256
11596 (base32
11597 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
11598 (build-system python-build-system)
11599 (propagated-inputs
11600 `(("python-docutils" ,python-docutils)))
11601 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
11602 (synopsis "Convert RST to ANSI-decorated console output")
11603 (description
11604 "Python module dedicated to rendering RST (reStructuredText) documents
11605to ansi-escaped strings suitable for display in a terminal.")
11606 (license license:expat)))
11607
11608(define-public python-ansi2html
11609 (package
11610 (name "python-ansi2html")
11611 (version "1.2.0")
11612 (source
11613 (origin
11614 (method url-fetch)
11615 (uri (pypi-uri "ansi2html" version))
11616 (sha256
11617 (base32
11618 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
11619 (build-system python-build-system)
11620 (native-inputs
11621 `(("python-mock" ,python-mock)
11622 ("python-nose" ,python-nose)))
11623 (propagated-inputs
11624 `(("python-six" ,python-six)))
11625 (home-page "https://github.com/ralphbean/ansi2html")
11626 (synopsis "Convert ANSI-decorated console output to HTML")
11627 (description
11628 "@command{ansi2html} is a Python library and command line utility for
11629convering text with ANSI color codes to HTML or LaTeX.")
11630 (license license:gpl3+)))
11631
11632(define-public python2-ansi2html
11633 (package-with-python2 python-ansi2html))
11634
11635(define-public python-ddt
11636 (package
11637 (name "python-ddt")
11638 (version "1.1.3")
11639 (source
11640 (origin
11641 (method url-fetch)
11642 (uri (pypi-uri "ddt" version))
11643 (sha256
11644 (base32
11645 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
11646 (build-system python-build-system)
11647 (native-inputs
11648 `(("python-mock" ,python-mock)
11649 ("python-nose" ,python-nose)))
11650 (propagated-inputs
11651 `(("python-six" ,python-six)
11652 ("python-pyyaml" ,python-pyyaml)))
11653 (home-page "https://github.com/txels/ddt")
11654 (synopsis "Data-Driven Tests")
11655 (description
11656 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
11657running it with different test data, and make it appear as multiple test
11658cases.")
11659 (license license:expat)))
11660
11661(define-public python2-ddt
11662 (package-with-python2 python-ddt))
11663
11664(define-public python-pycountry
11665 (package
11666 (name "python-pycountry")
11667 (version "18.5.26")
11668 (source
11669 (origin
11670 (method url-fetch)
11671 (uri (pypi-uri "pycountry" version))
11672 (sha256
11673 (base32
11674 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
11675 (build-system python-build-system)
11676 (home-page "https://bitbucket.org/flyingcircus/pycountry")
11677 (synopsis "ISO databases for languages, countries, currencies, etc.")
11678 (description
11679 "@code{pycountry} provides the ISO databases for the standards:
11680@enumerate
11681@item 639-3 (Languages)
11682@item 3166 (Countries)
11683@item 3166-3 (Deleted Countries)
11684@item 3166-2 (Subdivisions of countries)
11685@item 4217 (Currencies)
11686@item 15924 (Scripts)
11687@end enumerate
11688It includes a copy from Debian’s pkg-isocodes and makes the data accessible
11689through a Python API.")
11690 (license license:lgpl2.1+)))
11691
11692(define-public python2-pycountry
11693 (package-with-python2 python-pycountry))
11694
11695(define-public python-pycosat
11696 (package
11697 (name "python-pycosat")
11698 (version "0.6.1")
11699 (source
11700 (origin
11701 (method url-fetch)
11702 (uri (pypi-uri "pycosat" version))
11703 (sha256
11704 (base32
11705 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
11706 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
11707 (build-system python-build-system)
11708 (home-page "https://github.com/ContinuumIO/pycosat")
11709 (synopsis "Bindings to picosat (a SAT solver)")
11710 (description
11711 "This package provides efficient Python bindings to @code{picosat} on
11712the C level. When importing pycosat, the @code{picosat} solver becomes part
11713of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
11714Problem} (SAT) solver.")
11715 (license license:expat)))
11716
11717(define-public python2-pycosat
11718 (package-with-python2 python-pycosat))
11719
11720(define-public python2-ruamel.ordereddict
11721 (package
11722 (name "python2-ruamel.ordereddict")
11723 (version "0.4.9")
11724 (source
11725 (origin
11726 (method url-fetch)
11727 (uri (pypi-uri "ruamel.ordereddict" version))
11728 (sha256
11729 (base32
11730 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
11731 (build-system python-build-system)
11732 (arguments
11733 `(#:python ,python-2
11734 #:phases
11735 (modify-phases %standard-phases
11736 (delete 'check)
11737 (add-after 'install 'check
11738 (lambda* (#:key inputs outputs #:allow-other-keys)
11739 (add-installed-pythonpath inputs outputs)
f987ac30 11740 (invoke "python" "test/testordereddict.py"))))))
44d10b1f
RW
11741 (home-page "https://bitbucket.org/ruamel/ordereddict")
11742 (synopsis "Version of dict that keeps keys in insertion order")
11743 (description
11744 "This is an implementation of an ordered dictionary with @dfn{Key
11745Insertion Order} (KIO: updates of values do not affect the position of the
11746key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
11747removed and put at the back). The standard library module @code{OrderedDict},
11748implemented later, implements a subset of @code{ordereddict} functionality.
11749Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
11750Order} (KSO, no sorting function can be specified, but a transform can be
11751specified to apply on the key before comparison (e.g. @code{string.lower})).")
11752 (license license:expat)))
11753
11754(define-public python-pypeg2
11755 (package
11756 (name "python-pypeg2")
11757 (version "2.15.2")
11758 (source
11759 (origin
11760 (method url-fetch)
11761 (uri (pypi-uri "pyPEG2" version))
11762 (sha256
11763 (base32
11764 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
11765 (build-system python-build-system)
11766 (propagated-inputs `(("python-lxml" ,python-lxml)))
11767 (arguments
11768 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
11769 '(#:tests? #f))
11770 (home-page "https://fdik.org/pyPEG/")
11771 (synopsis "Parsering Expression Grammars in Python")
11772 (description "PyPEG is an intrinsic parser interpreter framework for
11773Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
11774parse many formal languages.")
11775 (license license:gpl2)))
11776
11777(define-public python-incremental
11778 (package
11779 (name "python-incremental")
11780 (version "17.5.0")
11781 (source
11782 (origin
11783 (method url-fetch)
11784 (uri (pypi-uri "incremental" version))
11785 (sha256
11786 (base32
11787 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
11788 (build-system python-build-system)
11789 (home-page "https://github.com/hawkowl/incremental")
11790 (synopsis "Library for versioning Python projects")
11791 (description "Incremental is a small library that versions your Python
11792projects.")
11793 (license license:expat)))
11794
11795(define-public python2-incremental
11796 (package-with-python2 python-incremental))
11797
11798(define-public python-invoke
11799 (package
11800 (name "python-invoke")
11801 (home-page "http://www.pyinvoke.org/")
11802 (version "1.1.0")
11803 (source (origin
11804 (method url-fetch)
11805 (uri (pypi-uri "invoke" version))
11806 (sha256
11807 (base32
11808 "0aiy1xvk1f91246zxd1zqrm679vdvd10h843a2na41cqr3cflpi6"))))
11809 (build-system python-build-system)
11810 (arguments
11811 ;; XXX: Requires many dependencies that are not yet in Guix.
11812 `(#:tests? #f))
11813 (synopsis "Pythonic task execution")
11814 (description
11815 "Invoke is a Python task execution tool and library, drawing inspiration
11816from various sources to arrive at a powerful and clean feature set. It is
11817evolved from the Fabric project, but focuses on local and abstract concerns
11818instead of servers and network commands.")
11819 (license license:bsd-3)))
11820
11821(define-public python2-invoke
11822 (package-with-python2 python-invoke))
11823
11824(define-public python-automat
11825 (package
11826 (name "python-automat")
919d80a0 11827 (version "0.7.0")
44d10b1f
RW
11828 (source (origin
11829 (method url-fetch)
11830 (uri (pypi-uri "Automat" version))
11831 (sha256
11832 (base32
919d80a0 11833 "03ivg70n3b1cbcd2zvjhk8y4kmqxcvhmili39lmgx09dza1qpmyb"))))
44d10b1f
RW
11834 (build-system python-build-system)
11835 ;; We disable the tests because they require python-twisted, while
11836 ;; python-twisted depends on python-automat. Twisted is optional, but the
11837 ;; tests fail if it is not available. Also see
11838 ;; <https://github.com/glyph/automat/issues/71>.
11839 (arguments '(#:tests? #f))
11840 (native-inputs
11841 `(("python-m2r" ,python-m2r)
11842 ("python-setuptools-scm" ,python-setuptools-scm)
11843 ("python-graphviz" ,python-graphviz)))
11844 (propagated-inputs
11845 `(("python-six" ,python-six)
11846 ("python-attrs" ,python-attrs)))
11847 (home-page "https://github.com/glyph/Automat")
11848 (synopsis "Self-service finite-state machines")
11849 (description "Automat is a library for concise, idiomatic Python
11850expression of finite-state automata (particularly deterministic finite-state
11851transducers).")
11852 (license license:expat)))
11853
11854(define-public python2-automat
11855 (package-with-python2 python-automat))
11856
11857(define-public python-m2r
11858 (package
11859 (name "python-m2r")
bcfb8fac 11860 (version "0.2.1")
44d10b1f
RW
11861 (source (origin
11862 (method url-fetch)
11863 (uri (pypi-uri "m2r" version))
11864 (sha256
11865 (base32
bcfb8fac 11866 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
44d10b1f
RW
11867 (build-system python-build-system)
11868 (propagated-inputs
11869 `(("python-docutils" ,python-docutils)
11870 ("python-mistune" ,python-mistune)))
11871 (native-inputs
11872 `(("python-pygments" ,python-pygments)
11873 ("python-mock" ,python-mock)))
11874 (home-page "https://github.com/miyakogi/m2r")
11875 (synopsis "Markdown to reStructuredText converter")
11876 (description "M2R converts a markdown file including reST markups to valid
11877reST format.")
11878 (license license:expat)))
11879
11880(define-public python2-m2r
11881 (package-with-python2 python-m2r))
11882
11883(define-public python-constantly
11884 (package
11885 (name "python-constantly")
11886 (version "15.1.0")
11887 (source (origin
11888 (method url-fetch)
11889 (uri (pypi-uri "constantly" version))
11890 (sha256
11891 (base32
11892 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
11893 (build-system python-build-system)
11894 (home-page "https://github.com/twisted/constantly")
11895 (synopsis "Symbolic constants in Python")
11896 (description "Constantly is a Python library that provides symbolic
11897constant support. It includes collections and constants with text, numeric,
11898and bit flag values.")
11899 (license license:expat)))
11900
11901(define-public python2-constantly
11902 (package-with-python2 python-constantly))
11903
11904(define-public python-attrs
11905 (package
11906 (name "python-attrs")
c41d5144 11907 (version "19.1.0")
44d10b1f
RW
11908 (source (origin
11909 (method url-fetch)
11910 (uri (pypi-uri "attrs" version))
11911 (sha256
11912 (base32
c41d5144 11913 "16g33zr5f449lqc5wgvzpknxryfzrfsxcr6kpgxwn7l5fkv71f7h"))))
44d10b1f
RW
11914 (build-system python-build-system)
11915 (arguments
11916 `(#:modules ((guix build utils)
11917 (guix build python-build-system)
11918 (ice-9 ftw)
11919 (srfi srfi-1)
11920 (srfi srfi-26))
11921 #:phases (modify-phases %standard-phases
11922 (replace 'check
11923 (lambda _
11924 (let ((cwd (getcwd)))
11925 (setenv "PYTHONPATH"
11926 (string-append
11927 cwd "/build/"
11928 (find (cut string-prefix? "lib" <>)
11929 (scandir (string-append cwd "/build")))
11930 ":"
11931 (getenv "PYTHONPATH")))
11932 (invoke "python" "-m" "pytest")))))))
11933 (native-inputs
11934 `(("python-coverage" ,python-coverage)
11935 ("python-hypothesis" ,python-hypothesis)
11936 ("python-pympler" ,python-pympler)
11937 ("python-pytest" ,python-pytest)
11938 ("python-six" ,python-six)
11939 ("python-sphinx" ,python-sphinx)
11940 ("python-zope-interface" ,python-zope-interface)))
11941 (home-page "https://github.com/python-attrs/attrs/")
11942 (synopsis "Attributes without boilerplate")
11943 (description "@code{attrs} is a Python package with class decorators that
11944ease the chores of implementing the most common attribute-related object
11945protocols.")
11946 (license license:expat)))
11947
11948(define-public python2-attrs
11949 (package-with-python2 python-attrs))
11950
11951(define-public python-attrs-bootstrap
11952 (package
11953 (inherit python-attrs)
11954 (name "python-attrs-bootstrap")
44d10b1f
RW
11955 (native-inputs `())
11956 (arguments `(#:tests? #f))))
11957
11958(define-public python2-attrs-bootstrap
11959 (package-with-python2 python-attrs-bootstrap))
11960
11961(define-public python2-cliapp
11962 (package
11963 (name "python2-cliapp")
9064b84e 11964 (version "1.20180812.1")
44d10b1f
RW
11965 (source
11966 (origin
11967 (method url-fetch)
11968 (uri (string-append
11969 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
11970 version ".tar.gz"))
11971 (sha256
11972 (base32
9064b84e 11973 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
44d10b1f
RW
11974 (build-system python-build-system)
11975 (arguments
11976 `(#:python ,python-2
11977 #:phases
11978 (modify-phases %standard-phases
11979 ;; check phase needs to be run before the build phase. If not,
11980 ;; coverage-test-runner looks for tests for the built source files,
11981 ;; and fails.
11982 (delete 'check)
11983 (add-before 'build 'check
11984 (lambda _
11985 ;; Disable python3 tests
11986 (substitute* "check"
11987 (("python3") "# python3"))
6c826d32 11988 (invoke "./check"))))))
44d10b1f
RW
11989 (native-inputs
11990 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
11991 ("python2-pep8" ,python2-pep8)))
11992 (propagated-inputs
11993 `(("python2-pyaml" ,python2-pyaml)))
11994 (home-page "https://liw.fi/cliapp/")
11995 (synopsis "Python framework for command line programs")
11996 (description "@code{python2-cliapp} is a python framework for
11997command line programs. It contains the typical stuff such programs
11998need to do, such as parsing the command line for options, and
11999iterating over input files.")
12000 (license license:gpl2+)))
12001
12002(define-public python2-ttystatus
12003 (package
12004 (name "python2-ttystatus")
e516a9c2 12005 (version "0.36")
44d10b1f
RW
12006 (source
12007 (origin
12008 (method url-fetch)
12009 (uri (string-append
12010 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
12011 version ".tar.gz"))
12012 (sha256
12013 (base32
e516a9c2 12014 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
44d10b1f
RW
12015 (build-system python-build-system)
12016 (native-inputs
12017 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12018 ("python2-pep8" ,python2-pep8)))
12019 (arguments
12020 `(#:python ,python-2
12021 #:phases
12022 (modify-phases %standard-phases
12023 ;; check phase needs to be run before the build phase. If not,
12024 ;; coverage-test-runner looks for tests for the built source files,
12025 ;; and fails.
12026 (delete 'check)
12027 (add-before 'build 'check
cbeee881 12028 (lambda _ (invoke "make" "check"))))))
44d10b1f
RW
12029 (home-page "https://liw.fi/ttystatus/")
12030 (synopsis "Python library for showing progress reporting and
12031status updates on terminals")
12032 (description "@code{python2-ttystatus} is a python library for
12033showing progress reporting and status updates on terminals, for
12034command line programs. Output is automatically adapted to the width
12035of the terminal: truncated if it does not fit, and resized if the
12036terminal size changes.")
12037 (license license:gpl3+)))
12038
12039(define-public python2-tracing
12040 (package
12041 (name "python2-tracing")
12042 (version "0.10")
12043 (source
12044 (origin
12045 (method url-fetch)
12046 (uri (string-append
12047 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
12048 version ".tar.gz"))
12049 (sha256
12050 (base32
12051 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
12052 (build-system python-build-system)
12053 (arguments
12054 `(#:python ,python-2))
12055 (home-page "https://liw.fi/tracing/")
12056 (synopsis "Python debug logging helper")
12057 (description "@code{python2-tracing} is a python library for
12058logging debug messages. It provides a way to turn debugging messages
12059on and off, based on the filename they occur in. It is much faster
12060than using @code{logging.Filter} to accomplish the same thing, which
12061matters when code is run in production mode. The actual logging still
12062happens using the @code{logging} library.")
12063 (license license:gpl3+)))
12064
12065(define-public python2-larch
12066 (package
12067 (name "python2-larch")
12068 (version "1.20151025")
12069 (source
12070 (origin
12071 (method url-fetch)
12072 (uri (string-append
12073 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
12074 version ".tar.gz"))
12075 (patches (search-patches
12076 "python2-larch-coverage-4.0a6-compatibility.patch"))
12077 (sha256
12078 (base32
12079 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
12080 (build-system python-build-system)
12081 (arguments
12082 `(#:python ,python-2
12083 #:phases
12084 (modify-phases %standard-phases
12085 ;; check phase needs to be run before the build phase. If not,
12086 ;; coverage-test-runner looks for tests for the built source files,
12087 ;; and fails.
12088 (delete 'check)
12089 (add-before 'build 'check
204ad455 12090 (lambda _ (invoke "make" "check"))))))
44d10b1f
RW
12091 (native-inputs
12092 `(("cmdtest" ,cmdtest)
12093 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
12094 (propagated-inputs
12095 `(("python2-tracing" ,python2-tracing)))
12096 (home-page "https://liw.fi/larch/")
12097 (synopsis "Python copy-on-write B-tree library")
12098 (description "@code{python2-larch} is an implementation of
12099particular kind of B-tree, based on research by Ohad Rodeh. See
12100@url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
12101on the data structure.
12102
12103The distinctive feature of this B-tree is that a node is never
12104(conceptually) modified. Instead, all updates are done by
12105copy-on-write. This makes it easy to clone a tree, and modify only the
12106clone, while other processes access the original tree.")
12107 (license license:gpl3+)))
12108
12109(define-public python-astroid
12110 (package
12111 (name "python-astroid")
12112 (version "2.1.0")
12113 (source
12114 (origin
12115 (method url-fetch)
12116 (uri (pypi-uri "astroid" version))
12117 (sha256
12118 (base32
12119 "08hz675knh4294bancdapql392fmbjyimhbyrmfkz1ka7l035c1m"))))
12120 (build-system python-build-system)
12121 (propagated-inputs
12122 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
12123 ("python-six" ,python-six)
12124 ("python-wrapt" ,python-wrapt)))
12125 (native-inputs
12126 `(("python-dateutil" ,python-dateutil)
12127 ("python-nose" ,python-nose)
12128 ("python-pytest" ,python-pytest)
12129 ("python-pytest-runner" ,python-pytest-runner)))
12130 (arguments
12131 `(#:phases
12132 (modify-phases %standard-phases
12133 (add-after 'unpack 'remove-spurious-test
12134 (lambda _
12135 ;; This can be removed after upgrading from python-3.7
12136 ;; https://github.com/PyCQA/astroid/issues/593
12137 ;; https://bugs.python.org/issue34056
12138 (delete-file "astroid/tests/unittest_modutils.py")
12139 #t))
12140 (replace 'check
12141 (lambda _
12142 (invoke "pytest" "astroid"))))))
12143 (home-page "https://github.com/PyCQA/astroid")
12144 (synopsis "Common base representation of python source code for pylint and
12145other projects")
12146 (description "@code{python-astroid} provides a common base representation
12147of python source code for projects such as pychecker, pyreverse, pylint, etc.
12148
12149It provides a compatible representation which comes from the _ast module. It
12150rebuilds the tree generated by the builtin _ast module by recursively walking
12151down the AST and building an extended ast. The new node classes have
12152additional methods and attributes for different usages. They include some
12153support for static inference and local name scopes. Furthermore, astroid
12154builds partial trees by inspecting living objects.")
12155 (license license:lgpl2.1+)
12156 (properties `((python2-variant . ,(delay python2-astroid))))))
12157
12158(define-public python2-astroid
12159 (let ((base (package-with-python2
12160 (strip-python2-variant python-astroid))))
12161 (package (inherit base)
12162 ;; Version 2.x removes python2 support.
12163 (version "1.6.5")
12164 (source
12165 (origin
12166 (method url-fetch)
12167 (uri (pypi-uri "astroid" version))
12168 (sha256
12169 (base32
12170 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
12171 (arguments
12172 (substitute-keyword-arguments (package-arguments base)
12173 ((#:phases phases)
12174 `(modify-phases ,phases
12175 (add-after 'unpack 'remove-spurious-test
12176 (lambda _
12177 ;; https://github.com/PyCQA/astroid/issues/276
12178 (delete-file "astroid/tests/unittest_brain.py")
12179 #t))
12180 (replace 'check
12181 (lambda _
12182 (invoke"python" "-m" "unittest" "discover"
12183 "-p" "unittest*.py")))))))
12184 (native-inputs `())
12185 (propagated-inputs
12186 `(("python2-backports-functools-lru-cache"
12187 ,python2-backports-functools-lru-cache)
12188 ("python2-enum34" ,python2-enum34)
12189 ("python2-singledispatch" ,python2-singledispatch)
12190 ,@(package-propagated-inputs base))))))
12191
12192(define-public python-isort
12193 (package
12194 (name "python-isort")
e2227b6a 12195 (version "4.3.4")
44d10b1f
RW
12196 (source
12197 (origin
e2227b6a
EF
12198 (method git-fetch)
12199 (uri (git-reference
12200 ;; Tests pass only from the Github sources
12201 (url "https://github.com/timothycrosley/isort")
12202 (commit version)))
12203 (file-name (git-file-name name version))
44d10b1f
RW
12204 (sha256
12205 (base32
e2227b6a 12206 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
44d10b1f
RW
12207 (build-system python-build-system)
12208 (native-inputs
12209 `(("python-mock" ,python-mock)
12210 ("python-pytest" ,python-pytest)))
12211 (home-page "https://github.com/timothycrosley/isort")
12212 (synopsis "Python utility/library to sort python imports")
12213 (description "@code{python-isort} is a python utility/library to sort
12214imports alphabetically, and automatically separated into sections. It
12215provides a command line utility, a python library and plugins for various
12216editors.")
e2227b6a
EF
12217 (license license:expat)
12218 (properties `((python2-variant . ,(delay python2-isort))))))
44d10b1f
RW
12219
12220(define-public python2-isort
e2227b6a
EF
12221 (let ((base (package-with-python2
12222 (strip-python2-variant python-isort))))
12223 (package (inherit base)
12224 (native-inputs
12225 `(("python2-futures" ,python2-futures)
12226 ,@(package-native-inputs base))))))
44d10b1f
RW
12227
12228(define-public python2-backports-functools-lru-cache
12229 (package
12230 (name "python2-backports-functools-lru-cache")
12231 (version "1.5")
12232 (source
12233 (origin
12234 (method url-fetch)
12235 ;; only the pypi tarballs contain the necessary metadata
12236 (uri (pypi-uri "backports.functools_lru_cache" version))
12237 (sha256
12238 (base32
12239 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
12240 (build-system python-build-system)
12241 (native-inputs
12242 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
12243 (arguments
12244 `(#:python ,python-2))
12245 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
12246 (synopsis "Backport of functools.lru_cache from Python 3.3")
12247 (description "@code{python2-backports-functools-lru-cache} is a backport
12248of @code{functools.lru_cache} from python 3.3.")
12249 (license license:expat)))
12250
12251(define-public python-configparser
12252 (package
12253 (name "python-configparser")
84127f8c 12254 (version "3.7.1")
44d10b1f
RW
12255 (source
12256 (origin
12257 (method url-fetch)
84127f8c 12258 (uri (pypi-uri "configparser" version))
44d10b1f
RW
12259 (sha256
12260 (base32
84127f8c 12261 "0cnz213il9lhgda6x70fw7mfqr8da43s3wm343lwzhqx94mgmmav"))))
44d10b1f 12262 (build-system python-build-system)
809f003f 12263 (home-page "https://github.com/jaraco/configparser/")
44d10b1f
RW
12264 (synopsis "Backport of configparser from python 3.5")
12265 (description "@code{python-configparser} is a backport of
12266@code{configparser} from Python 3.5 so that it can be used directly
12267in other versions.")
12268 (license license:expat)))
12269
12270(define-public python2-configparser
12271 (package-with-python2 python-configparser))
12272
12273(define-public python-mando
12274 (package
12275 (name "python-mando")
12276 (version "0.6.4")
12277 (source (origin
12278 (method url-fetch)
12279 (uri (pypi-uri "mando" version))
12280 (sha256
12281 (base32
12282 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
12283 (build-system python-build-system)
12284 (propagated-inputs
12285 `(("python-rst2ansi" ,python-rst2ansi)
12286 ("python-six" ,python-six)))
12287 (native-inputs
12288 `(("python-pytest" ,python-pytest)))
12289 (home-page "https://mando.readthedocs.org/")
12290 (synopsis
12291 "Wrapper around argparse, allowing creation of complete CLI applications")
12292 (description
12293 "This package is a wrapper around argparse, allowing you to write complete CLI
12294applications in seconds while maintaining all the flexibility.")
12295 (license license:expat)))
12296
12297(define-public python2-mando
12298 (package-with-python2 python-mando))
12299
70daf82f
RW
12300(define-public python2-argparse
12301 (package
12302 (name "python2-argparse")
12303 (version "1.4.0")
12304 (source
12305 (origin
12306 (method url-fetch)
12307 (uri (pypi-uri "argparse" version))
12308 (sha256
12309 (base32
12310 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
12311 (build-system python-build-system)
12312 (arguments
12313 `(#:python ,python-2))
12314 (home-page "https://github.com/ThomasWaldmann/argparse/")
12315 (synopsis "Python command-line parsing library")
12316 (description
12317 "This package is mostly for people who want to have @code{argparse} on
12318older Pythons because it was not part of the standard library back then.")
12319 (license license:psfl)))
12320
44d10b1f
RW
12321(define-public python-fudge
12322 (package
12323 (name "python-fudge")
12324 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
12325 ;; package, which is currently the only use of this package.
12326 (version "0.9.6")
12327 (source
12328 (origin
12329 (method url-fetch)
12330 (uri (pypi-uri "fudge" version))
12331 (sha256
12332 (base32
12333 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
12334 (build-system python-build-system)
12335 (arguments
12336 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
12337 (home-page "https://github.com/fudge-py/fudge")
12338 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
12339 (description
12340 "Fudge is a Python module for using fake objects (mocks and stubs) to
12341test real ones.
12342
12343In readable Python code, you declare the methods available on your fake object
12344and how they should be called. Then you inject that into your application and
12345start testing. This declarative approach means you don’t have to record and
12346playback actions and you don’t have to inspect your fakes after running code.
12347If the fake object was used incorrectly then you’ll see an informative
12348exception message with a traceback that points to the culprit.")
12349 (license license:expat)))
12350
12351(define-public python2-fudge
12352 (package-with-python2 python-fudge))
12353
12354(define-public python-mwclient
12355 (package
12356 (name "python-mwclient")
12357 (version "0.8.4")
12358 (source
12359 (origin
12360 (method url-fetch)
12361 ;; The PyPI version wouldn't contain tests.
12362 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
12363 "v" version ".tar.gz"))
12364 (file-name (string-append name "-" version ".tar.gz"))
12365 (sha256
12366 (base32
12367 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
12368 (build-system python-build-system)
12369 (propagated-inputs
12370 `(("python-requests" ,python-requests)
12371 ("python-requests-oauthlib"
12372 ,python-requests-oauthlib)
12373 ("python-six" ,python-six)))
12374 (native-inputs
12375 `(("python-mock" ,python-mock)
12376 ("python-pytest" ,python-pytest)
12377 ("python-pytest-pep8" ,python-pytest-pep8)
12378 ("python-pytest-cache" ,python-pytest-cache)
12379 ("python-pytest-cov" ,python-pytest-cov)
12380 ("python-responses" ,python-responses)))
12381 (home-page "https://github.com/btongminh/mwclient")
12382 (synopsis "MediaWiki API client")
12383 (description "This package provides a MediaWiki API client.")
12384 (license license:expat)))
12385
12386(define-public python2-mwclient
12387 (package-with-python2 python-mwclient))
12388
12389(define-public python-utils
12390 (package
12391 (name "python-utils")
12392 (version "2.1.0")
12393 (source (origin
12394 (method url-fetch)
12395 (uri (pypi-uri "python-utils" version))
12396 (sha256
12397 (base32
12398 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
12399 (build-system python-build-system)
12400 (native-inputs
12401 `(("pytest-runner" ,python-pytest-runner)
12402 ("pytest" ,python-pytest)
12403 ("six" ,python-six)))
12404 (home-page "https://github.com/WoLpH/python-utils")
12405 (synopsis "Convenient utilities not included with the standard Python install")
12406 (description
12407 "Python Utils is a collection of small Python functions and classes which
12408make common patterns shorter and easier.")
12409 (license license:bsd-2)))
12410
12411(define-public python2-utils
12412 (package-with-python2 python-utils))
12413
44d10b1f
RW
12414(define-public python-diff-match-patch
12415 (package
12416 (name "python-diff-match-patch")
12417 (version "20121119")
12418 (source
12419 (origin
12420 (method url-fetch)
12421 (uri (pypi-uri "diff-match-patch" version))
12422 (sha256
12423 (base32
12424 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
12425 (build-system python-build-system)
12426 (home-page "https://code.google.com/p/google-diff-match-patch")
12427 (synopsis "Synchronize plain text")
12428 (description "Diff Match and Patch libraries offer robust algorithms to
12429perform the operations required for synchronizing plain text.")
12430 (license license:asl2.0)))
12431
12432(define-public python2-diff-match-patch
12433 (package-with-python2 python-diff-match-patch))
12434
12435(define-public python-dirsync
12436 (package
12437 (name "python-dirsync")
12438 (version "2.2.3")
12439 (source
12440 (origin
12441 (method url-fetch)
12442 (uri (pypi-uri "dirsync" version))
12443 (sha256
12444 (base32
12445 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
12446 (build-system python-build-system)
12447 (propagated-inputs
12448 `(("six" ,python-six)))
12449 (home-page "https://bitbucket.org/tkhyn/dirsync")
12450 (synopsis "Advanced directory tree synchronisation tool")
12451 (description "Advanced directory tree synchronisation tool.")
12452 (license license:expat)))
12453
12454(define-public python2-dirsync
12455 (package-with-python2 python-dirsync))
12456
12457(define-public python-levenshtein
12458 (package
12459 (name "python-levenshtein")
12460 (version "0.12.0")
12461 (source
12462 (origin
12463 (method url-fetch)
12464 (uri (pypi-uri "python-Levenshtein" version))
12465 (sha256
12466 (base32
12467 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
12468 (build-system python-build-system)
12469 (home-page "https://github.com/ztane/python-Levenshtein")
12470 (synopsis "Fast computation of Levenshtein distance and string similarity")
12471 (description
12472 "The Levenshtein Python C extension module contains functions for fast computation of
12473@enumerate
12474@item Levenshtein (edit) distance, and edit operations
12475@item string similarity
12476@item approximate median strings, and generally string averaging
12477@item string sequence and set similarity
12478@end enumerate
12479It supports both normal and Unicode strings.")
12480 (license license:gpl2+)))
12481
12482(define-public python2-levenshtein
12483 (package-with-python2 python-levenshtein))
12484
12485(define-public python-scandir
12486 (package
12487 (name "python-scandir")
12488 (version "1.9.0")
12489 (source
12490 (origin
12491 (method url-fetch)
12492 (uri (pypi-uri "scandir" version))
12493 (sha256
12494 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
12495 (build-system python-build-system)
12496 (arguments
12497 `(#:phases (modify-phases %standard-phases
12498 (replace 'check
12499 (lambda _
12500 (invoke "python" "test/run_tests.py"))))))
12501 (home-page "https://github.com/benhoyt/scandir")
12502 (synopsis "Directory iteration function")
12503 (description
12504 "Directory iteration function like os.listdir(), except that instead of
12505returning a list of bare filenames, it yields DirEntry objects that include
12506file type and stat information along with the name. Using scandir() increases
12507the speed of os.walk() by 2-20 times (depending on the platform and file
12508system) by avoiding unnecessary calls to os.stat() in most cases.
12509
12510This package is part of the Python standard library since version 3.5.")
12511 (license license:bsd-3)))
12512
12513(define-public python2-scandir
12514 (package-with-python2 python-scandir))
12515
12516(define-public python2-stemming
12517 (package
12518 (name "python2-stemming")
12519 (version "1.0.1")
12520 (source
12521 (origin
12522 (method url-fetch)
12523 (uri (pypi-uri "stemming" version))
12524 (sha256
12525 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
12526 (build-system python-build-system)
12527 (arguments
12528 `(#:python ,python-2))
12529 (home-page "https://bitbucket.org/mchaput/stemming/overview")
12530 (synopsis "Python implementations of various stemming algorithms")
12531 (description
12532 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
12533stemming algorithms for English. These implementations are straightforward and
12534efficient, unlike some Python versions of the same algorithms available on the
12535Web. This package is an extraction of the stemming code included in the Whoosh
12536search engine.")
12537 (license license:public-domain)))
12538
12539(define-public python-factory-boy
12540 (package
12541 (name "python-factory-boy")
12542 (version "2.8.1")
12543 (source
12544 (origin
12545 (method url-fetch)
12546 (uri (pypi-uri "factory_boy" version))
12547 (sha256
12548 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
12549 (build-system python-build-system)
12550 (arguments
12551 ;; Tests are not included in the tarball.
12552 `(#:tests? #f))
12553 (propagated-inputs
12554 `(("faker" ,python-faker)))
12555 (home-page "https://github.com/benhoyt/scandir")
12556 (synopsis "Versatile test fixtures replacement")
12557 (description
12558 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
12559
12560As a fixtures replacement tool, it aims to replace static, hard to maintain
12561fixtures with easy-to-use factories for complex object.
12562
12563Instead of building an exhaustive test setup with every possible combination
12564of corner cases, factory_boy allows you to use objects customized for the
12565current test, while only declaring the test-specific fields")
12566 (license license:expat)))
12567
12568(define-public python2-factory-boy
12569 (package-with-python2 python-factory-boy))
12570
12571(define-public python-translate-toolkit
12572 (package
12573 (name "python-translate-toolkit")
12574 (version "2.1.0")
12575 (source
12576 (origin
12577 (method url-fetch)
12578 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
12579 (sha256
12580 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
12581 (build-system python-build-system)
12582 (native-inputs
12583 `(("python-pytest" ,python-pytest)
12584 ("python-sphinx" ,python-sphinx)))
12585 (propagated-inputs
12586 `(("python-babel" ,python-babel)
12587 ("python-beautifulsoup4" ,python-beautifulsoup4)
12588 ("python-chardet" ,python-chardet)
12589 ("python-diff-match-patch" ,python-diff-match-patch)
12590 ("python-levenshtein" ,python-levenshtein)
12591 ("python-lxml" ,python-lxml)
12592 ("python-six" ,python-six)
12593 ("python-vobject" ,python-vobject)
12594 ("python-pyyaml" ,python-pyyaml)))
12595 (arguments
12596 ;; TODO: tests are not run, because they end with
12597 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
12598 ;; 'parse_funcs'
12599 ;; during test setup.
12600 `(#:tests? #f))
18919cf9 12601 (home-page "https://toolkit.translatehouse.org")
44d10b1f
RW
12602 (synopsis "Tools and API for translation and localization engineering")
12603 (description
12604 "Tools and API for translation and localization engineering. It contains
12605several utilities, as well as an API for building localization tools.")
12606 (license license:gpl2+)))
12607
12608(define-public python2-translate-toolkit
12609 (package-with-python2 python-translate-toolkit))
12610
12611(define-public python-packaging
12612 (package
12613 (name "python-packaging")
94295903 12614 (version "19.0")
44d10b1f
RW
12615 (source
12616 (origin
12617 (method url-fetch)
12618 (uri (pypi-uri "packaging" version))
12619 (sha256
12620 (base32
94295903 12621 "1brjhygq9dz6x1kdljivkjfldi3qf5rbkqgck1bpgv9qpv8ab60c"))))
44d10b1f
RW
12622 (build-system python-build-system)
12623 (arguments
12624 `(#:phases (modify-phases %standard-phases
12625 (replace 'check
12626 (lambda _ (invoke "py.test" "-vv"))))))
12627 (native-inputs
12628 `(("python-pretend" ,python-pretend)
12629 ("python-pytest" ,python-pytest)))
12630 (propagated-inputs
12631 `(("python-pyparsing" ,python-pyparsing)
12632 ("python-six" ,python-six)))
12633 (home-page "https://github.com/pypa/packaging")
12634 (synopsis "Core utilities for Python packages")
12635 (description "Packaging is a Python module for dealing with Python packages.
12636It offers an interface for working with package versions, names, and dependency
12637information.")
12638 ;; From 'LICENSE': This software is made available under the terms of
12639 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
12640 ;; Contributions to this software is made under the terms of *both* these
12641 ;; licenses.
12642 (license (list license:asl2.0 license:bsd-2))))
12643
12644(define-public python2-packaging
12645 (package-with-python2 python-packaging))
12646
12647(define-public python-relatorio
12648 (package
12649 (name "python-relatorio")
12650 (version "0.8.0")
12651 (source
12652 (origin
12653 (method url-fetch)
12654 (uri (pypi-uri "relatorio" version))
12655 (sha256
12656 (base32
12657 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
12658 (build-system python-build-system)
12659 (propagated-inputs
12660 `(("python-lxml" ,python-lxml)
12661 ("python-genshi" ,python-genshi)))
12662 (native-inputs
12663 `(("python-magic" ,python-magic)))
12664 (home-page "https://relatorio.tryton.org/")
12665 (synopsis "Templating library able to output ODT and PDF files")
12666 (description "Relatorio is a templating library which provides a way to
12667easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
12668for more filetypes can be easily added by creating plugins for them.")
12669 (license license:gpl3+)))
12670
12671(define-public python2-relatorio
12672 (package-with-python2 python-relatorio))
12673
12674(define-public python-radon
12675 (package
12676 (name "python-radon")
12677 (version "2.2.0")
12678 (source
12679 (origin
12680 (method url-fetch)
12681 (uri (pypi-uri "radon" version))
12682 (sha256
12683 (base32
12684 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
12685 (build-system python-build-system)
12686 (arguments
12687 `(#:phases (modify-phases %standard-phases
12688 (replace 'check
12689 (lambda _
12690 (invoke "python" "radon/tests/run.py"))))))
12691 (propagated-inputs
12692 `(("python-colorama" ,python-colorama)
12693 ("python-flake8-polyfill" ,python-flake8-polyfill)
12694 ("python-mando" ,python-mando)))
12695 (native-inputs
12696 `(("python-pytest" ,python-pytest)
12697 ("python-pytest-mock" ,python-pytest-mock)))
12698 (home-page "https://radon.readthedocs.org/")
12699 (synopsis "Code Metrics in Python")
12700 (description "Radon is a Python tool which computes various code metrics.
12701Supported metrics are:
12702@itemize @bullet
12703@item raw metrics: SLOC, comment lines, blank lines, &c.
12704@item Cyclomatic Complexity (i.e. McCabe’s Complexity)
12705@item Halstead metrics (all of them)
12706@item the Maintainability Index (a Visual Studio metric)
12707@end itemize")
12708 (license license:expat)))
12709
12710(define-public python2-radon
12711 (package-with-python2 python-radon))
12712
12713(define-public python-sure
12714 (package
12715 (name "python-sure")
12716 (version "1.4.11")
12717 (source
12718 (origin
12719 (method url-fetch)
12720 (uri (pypi-uri "sure" version))
12721 (sha256
12722 (base32
12723 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
12724 (build-system python-build-system)
12725 (propagated-inputs
12726 `(("python-mock" ,python-mock)
12727 ("python-six" ,python-six)))
12728 (native-inputs
12729 `(("python-nose" ,python-nose)))
12730 (home-page "https://github.com/gabrielfalcao/sure")
12731 (synopsis "Automated testing library in python for python")
12732 (description
12733 "Sure is a python library that leverages a DSL for writing assertions.
12734Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
12735 (license license:gpl3+)))
12736
12737(define-public python2-sure
12738 (package-with-python2 python-sure))
12739
12740(define-public python2-couleur
12741 ;; This package does not seem to support python3 at all, hence,
12742 ;; only the python2 variant definition is provided.
12743 (package
12744 (name "python2-couleur")
12745 (version "0.6.2")
12746 (source
12747 (origin
12748 (method url-fetch)
12749 (uri (pypi-uri "couleur" version))
12750 (sha256
12751 (base32
12752 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
12753 (build-system python-build-system)
12754 (arguments
12755 `(#:python ,python-2))
12756 (home-page "https://github.com/gabrielfalcao/couleur")
12757 (synopsis
12758 "ANSI terminal tool for python, colored shell and other handy fancy features")
12759 (description
12760 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
12761terminal such as coloured output in the shell, overwriting output, indentation, etc.")
12762 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
12763 ;; https://github.com/gabrielfalcao/couleur/issues/11
12764 (license license:lgpl3+)))
12765
12766(define-public python-misaka
12767 (package
12768 (name "python-misaka")
0dcb3412 12769 (version "2.1.1")
44d10b1f
RW
12770 (source
12771 (origin
12772 (method url-fetch)
12773 (uri (pypi-uri "misaka" version))
12774 (sha256
12775 (base32
0dcb3412 12776 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
44d10b1f
RW
12777 (build-system python-build-system)
12778 (arguments
12779 `(;; Line 37 of setup.py calls self.run_command('develop')
12780 ;; in the 'check' phase. This command seems to be trying
12781 ;; to write to
12782 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
12783 ;; for which it does not have the permission to write.
12784 #:tests? #f))
12785 (propagated-inputs
12786 `(("python-cffi" ,python-cffi)))
12787 (home-page "https://github.com/FSX/misaka")
12788 (synopsis "Python binding for Hoedown")
12789 (description
12790 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
12791library written in C. It features a fast HTML renderer and functionality to make custom
12792renderers (e.g. man pages or LaTeX).")
12793 (license license:expat)))
12794
12795(define-public python2-misaka
12796 (package-with-python2 python-misaka))
12797
12798(define-public python2-steadymark
12799 ;; This is forced into being a python2 only variant
12800 ;; due to its dependence on couleur that has no support
12801 ;; for python3
12802 (package
12803 (name "python2-steadymark")
12804 (version "0.7.3")
12805 (source
12806 (origin
12807 (method url-fetch)
12808 (uri (pypi-uri "steadymark" version))
12809 (sha256
12810 (base32
12811 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
12812 (build-system python-build-system)
12813 (native-inputs
12814 `(("python-couleur" ,python2-couleur)
12815 ("python-sure" ,python2-sure)
12816 ("python-misaka" ,python2-misaka)))
12817 (arguments
12818 `(#:python ,python-2
12819 #:phases
12820 (modify-phases %standard-phases
12821 (add-before 'build 'patch-setup-py
12822 (lambda _
12823 ;; Update requirements from dependency==version
12824 ;; to dependency>=version
12825 (substitute* "setup.py"
12826 (("==") ">="))
12827 #t)))))
12828 (home-page "https://github.com/gabrielfalcao/steadymark")
12829 (synopsis "Markdown-based test runner for python")
12830 (description
12831 "@code{Steadymark} allows documentation to be written in github-flavoured
12832markdown. The documentation may contain snippets of code surrounded by python
12833code blocks and @code{Steadymark} will find these snippets and run them, making
12834sure that there are no old malfunctional examples in the documentation examples.")
12835 (license license:expat)))
12836
12837(define-public python-jsonpointer
12838 (package
12839 (name "python-jsonpointer")
12840 (version "1.10")
12841 (source
12842 (origin
12843 (method url-fetch)
12844 (uri (pypi-uri "jsonpointer" version))
12845 (sha256
12846 (base32
12847 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
12848 (build-system python-build-system)
12849 (home-page "https://github.com/stefankoegl/python-json-pointer")
12850 (synopsis "Identify specific nodes in a JSON document")
12851 (description "@code{jsonpointer} allows you to access specific nodes
12852by path in a JSON document (see RFC 6901).")
12853 (license license:bsd-3)))
12854
12855(define-public python2-jsonpointer
12856 (package-with-python2 python-jsonpointer))
12857
12858(define-public python-jsonpatch
12859 (package
12860 (name "python-jsonpatch")
12861 (version "1.16")
12862 (source
12863 (origin
12864 (method url-fetch)
12865 ;; pypi version lacks tests.js
12866 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12867 "archive/v" version ".tar.gz"))
12868 (file-name (string-append name "-" version ".tar.gz"))
12869 (sha256
12870 (base32
12871 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
12872 (build-system python-build-system)
12873 (native-inputs
12874 `(("python-jsonpointer" ,python-jsonpointer)))
12875 (home-page "https://github.com/stefankoegl/python-json-patch")
12876 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
12877 (description "@code{jsonpatch} is a library and program that allows
12878applying JSON Patches according to RFC 6902.")
12879 (license license:bsd-3)))
12880
12881(define-public python2-jsonpatch
12882 (package-with-python2 python-jsonpatch))
12883
12884(define-public python-jsonpatch-0.4
12885 (package (inherit python-jsonpatch)
12886 (name "python-jsonpatch")
12887 (version "0.4")
12888 (source
12889 (origin
12890 (method url-fetch)
12891 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12892 "archive/v" version ".tar.gz"))
12893 (file-name (string-append name "-" version ".tar.gz"))
12894 (sha256
12895 (base32
12896 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
12897
12898(define-public python2-jsonpatch-0.4
12899 (package-with-python2 python-jsonpatch-0.4))
12900
12901(define-public python-rfc3986
12902 (package
12903 (name "python-rfc3986")
12904 (version "1.1.0")
12905 (source (origin
12906 (method url-fetch)
12907 (uri (pypi-uri "rfc3986" version))
12908 (sha256
12909 (base32
12910 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
12911 (build-system python-build-system)
12912 (arguments
12913 `(#:modules ((guix build utils)
12914 (guix build python-build-system)
12915 (ice-9 ftw)
12916 (srfi srfi-1)
12917 (srfi srfi-26))
12918 #:phases
12919 (modify-phases %standard-phases
12920 (replace 'check
12921 (lambda _
12922 (let ((cwd (getcwd)))
12923 (setenv "PYTHONPATH"
12924 (string-append cwd "/build/"
12925 (find (cut string-prefix? "lib" <>)
12926 (scandir (string-append cwd "/build")))
12927 ":"
12928 (getenv "PYTHONPATH")))
12929 (invoke "pytest" "-v")))))))
12930 (native-inputs
12931 `(("python-pytest" ,python-pytest)))
12932 (home-page "https://rfc3986.readthedocs.io/")
12933 (synopsis "Parse and validate URI references")
12934 (description
12935 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
12936validation and authority parsing. This module also supports RFC@tie{}6874
12937which adds support for zone identifiers to IPv6 addresses.")
12938 (license license:asl2.0)))
12939
12940(define-public python2-rfc3986
12941 (package-with-python2 python-rfc3986))
12942
12943(define-public python-rfc3987
12944 (package
12945 (name "python-rfc3987")
12946 (version "1.3.7")
12947 (source
12948 (origin
12949 (method url-fetch)
12950 (uri (pypi-uri "rfc3987" version))
12951 (sha256
12952 (base32
12953 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
12954 (build-system python-build-system)
12955 (home-page "https://pypi.python.org/pypi/rfc3987")
12956 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
12957 (description "@code{rfc3987} provides routines for parsing and
12958validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
12959 (license license:gpl3+)))
12960
12961(define-public python2-rfc3987
12962 (package-with-python2 python-rfc3987))
12963
12964(define-public python-validate-email
12965 (package
12966 (name "python-validate-email")
12967 (version "1.3")
12968 (source
12969 (origin
12970 (method url-fetch)
12971 (uri (pypi-uri "validate_email" version))
12972 (sha256
12973 (base32
12974 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
12975 (build-system python-build-system)
12976 (home-page "https://github.com/syrusakbary/validate_email")
12977 (synopsis "Verifies if an email address is valid and really exists")
12978 (description "@code{validate_email} can be used to verify if an email
12979address is valid and really exists.")
12980 (license license:lgpl3+)))
12981
12982(define-public python2-validate-email
12983 (package-with-python2 python-validate-email))
12984
12985(define-public python-flex
12986 (package
12987 (name "python-flex")
12988 (version "6.10.0")
12989 (source
12990 (origin
12991 (method url-fetch)
12992 (uri (pypi-uri "flex" version))
12993 (sha256
12994 (base32
12995 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
12996 (build-system python-build-system)
12997 (propagated-inputs
12998 `(("python-click" ,python-click)
12999 ("python-iso8601" ,python-iso8601)
13000 ("python-jsonpointer" ,python-jsonpointer)
13001 ("python-pyyaml" ,python-pyyaml)
13002 ("python-requests" ,python-requests)
13003 ("python-rfc3987" ,python-rfc3987)
13004 ("python-six" ,python-six)
13005 ("python-validate-email" ,python-validate-email)))
13006 (home-page "https://github.com/pipermerriam/flex")
13007 (synopsis "Validates Swagger schemata")
13008 (description "@code{flex} can be used to validate Swagger schemata.")
13009 (license license:bsd-3)))
13010
13011(define-public python2-flex
13012 (package-with-python2 python-flex))
13013
13014(define-public python-marshmallow
13015 (package
13016 (name "python-marshmallow")
13017 (version "3.0.0b14")
13018 (source
13019 (origin
13020 (method url-fetch)
13021 (uri (pypi-uri "marshmallow" version))
13022 (sha256
13023 (base32
13024 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
13025 (build-system python-build-system)
13026 (propagated-inputs
13027 `(("python-dateutil" ,python-dateutil)
13028 ("python-simplejson" ,python-simplejson)))
13029 (native-inputs
13030 `(("python-pytest" ,python-pytest)
13031 ("python-pytz" ,python-pytz)))
13032 (home-page "https://github.com/marshmallow-code/marshmallow")
13033 (synopsis "Convert complex datatypes to and from native
13034Python datatypes.")
13035 (description "@code{marshmallow} provides a library for converting
13036complex datatypes to and from native Python datatypes.")
13037 (license license:expat)))
13038
13039(define-public python2-marshmallow
13040 (package-with-python2 python-marshmallow))
13041
13042(define-public python-apispec
13043 (package
13044 (name "python-apispec")
13045 (version "0.25.3")
13046 (source
13047 (origin
13048 (method url-fetch)
13049 (uri (pypi-uri "apispec" version))
13050 (sha256
13051 (base32
13052 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
13053 (build-system python-build-system)
13054 (propagated-inputs
13055 `(("python-pyyaml" ,python-pyyaml)))
13056 (native-inputs
13057 `(("python-pytest" ,python-pytest)
13058 ("python-flask" ,python-flask)
13059 ("python-marshmallow" ,python-marshmallow)
13060 ("python-tornado" ,python-tornado)
13061 ("python-bottle" ,python-bottle)
13062 ("python-mock" ,python-mock)))
13063 (home-page "https://github.com/marshmallow-code/apispec")
13064 (synopsis "Swagger 2.0 API specification generator")
13065 (description "@code{python-apispec} is a pluggable API specification
13066generator. Currently supports the OpenAPI specification (f.k.a.
13067Swagger 2.0).")
13068 (license license:expat)))
13069
13070(define-public python2-apispec
13071 (package-with-python2 python-apispec))
13072
13073(define-public python-flasgger
13074 (package
13075 (name "python-flasgger")
13076 (version "0.6.3")
13077 (source
13078 (origin
1a04d421
TGR
13079 (method git-fetch)
13080 (uri (git-reference
13081 (url "https://github.com/rochacbruno/flasgger.git")
13082 (commit version)))
13083 (file-name (git-file-name name version))
44d10b1f 13084 (sha256
1a04d421 13085 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
44d10b1f
RW
13086 (build-system python-build-system)
13087 (arguments
13088 `(#:phases
13089 (modify-phases %standard-phases
13090 (replace 'check
13091 (lambda* (#:key inputs outputs #:allow-other-keys)
13092 (substitute* "Makefile"
13093 (("flake8 flasgger --ignore=F403")
13094 "flake8 flasgger --ignore=E731,F403"))
13095 (setenv "PYTHONPATH" (string-append (getcwd)
13096 ":"
13097 (getenv "PYTHONPATH")))
ac599a09 13098 (invoke "py.test"))))))
44d10b1f
RW
13099 (propagated-inputs
13100 `(("python-flask" ,python-flask)
13101 ("python-pyyaml" ,python-pyyaml)
13102 ("python-jsonschema" ,python-jsonschema)
13103 ("python-mistune" ,python-mistune)
13104 ("python-six" ,python-six)))
13105 (native-inputs
13106 `(("python-decorator" ,python-decorator)
13107 ("python-flake8" ,python-flake8)
13108 ("python-flask-restful" ,python-flask-restful)
13109 ("python-flex" ,python-flex)
13110 ("python-pytest" ,python-pytest)
13111 ("python-pytest-cov" ,python-pytest-cov)
13112 ("python-marshmallow" ,python-marshmallow)
13113 ("python-apispec" ,python-apispec)))
13114 (home-page "https://github.com/rochacbruno/flasgger/")
13115 (synopsis "Extract Swagger specs from your Flask project")
13116 (description "@code{python-flasgger} allows extracting Swagger specs
13117from your Flask project. It is a fork of Flask-Swagger.")
13118 (license license:expat)))
13119
13120(define-public python2-flasgger
13121 (package-with-python2 python-flasgger))
13122
13123(define-public python-swagger-spec-validator
13124 (package
13125 (name "python-swagger-spec-validator")
fe9c5b1d 13126 (version "2.4.3")
44d10b1f
RW
13127 (source
13128 (origin
13129 (method url-fetch)
13130 (uri (pypi-uri "swagger-spec-validator" version))
13131 (sha256
13132 (base32
fe9c5b1d 13133 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
44d10b1f
RW
13134 (build-system python-build-system)
13135 (propagated-inputs
13136 `(("python-jsonschema" ,python-jsonschema)
fe9c5b1d 13137 ("python-pyyaml" ,python-pyyaml)
44d10b1f
RW
13138 ("python-six" ,python-six)))
13139 (home-page
13140 "https://github.com/Yelp/swagger_spec_validator")
13141 (synopsis "Validation of Swagger specifications")
13142 (description "@code{swagger_spec_validator} provides a library for
13143validating Swagger API specifications.")
13144 (license license:asl2.0)))
13145
13146(define-public python2-swagger-spec-validator
13147 (package-with-python2 python-swagger-spec-validator))
13148
13149(define-public python-apache-libcloud
13150 (package
13151 (name "python-apache-libcloud")
13152 (version "2.4.0")
13153 (source
13154 (origin
13155 (method url-fetch)
13156 (uri (pypi-uri "apache-libcloud" version))
13157 (sha256
13158 (base32
13159 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
13160 (build-system python-build-system)
13161 (arguments
13162 `(#:phases
13163 (modify-phases %standard-phases
13164 (add-after 'unpack 'patch-ssh
13165 (lambda* (#:key inputs #:allow-other-keys)
13166 (substitute* "libcloud/compute/ssh.py"
13167 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
13168 "/bin/ssh" "'")))
13169 #t))
13170 (add-after 'unpack 'patch-tests
13171 (lambda _
13172 (substitute* "./libcloud/test/test_file_fixtures.py"
13173 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
13174 (("def _ascii") "def _raw_data(self, method, url, body, headers):
13175 return (httplib.OK,
13176 \"1234abcd\",
13177 {\"test\": \"value\"},
13178 httplib.responses[httplib.OK])
13179 def _ascii"))
13180 (substitute* "libcloud/test/compute/test_ssh_client.py"
13181 (("class ShellOutSSHClientTests")
13182 "@unittest.skip(\"Guix container doesn't have ssh service\")
13183class ShellOutSSHClientTests")
13184 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
13185 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
13186 (("'.xF0', '.x90', '.x8D', '.x88'")
13187 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
13188 #t))
13189 (add-before 'check 'copy-secret
13190 (lambda _
13191 (copy-file "libcloud/test/secrets.py-dist"
13192 "libcloud/test/secrets.py")
13193 #t)))))
13194 (inputs
13195 `(("openssh" ,openssh)))
13196 (propagated-inputs
13197 `(("python-paramiko" ,python-paramiko)
13198 ("python-requests" ,python-requests)))
13199 (native-inputs
13200 `(("python-lockfile" ,python-lockfile)
13201 ("python-mock" ,python-mock)
13202 ("python-pytest" ,python-pytest)
13203 ("python-pytest-runner" ,python-pytest-runner)
13204 ("python-requests-mock" ,python-requests-mock)))
13205 (home-page "https://libcloud.apache.org/")
13206 (synopsis "Unified Cloud API")
13207 (description "@code{libcloud} is a Python library for interacting with
13208many of the popular cloud service providers using a unified API.")
13209 (license license:asl2.0)))
13210
13211(define-public python2-apache-libcloud
13212 (package-with-python2 python-apache-libcloud))
13213
13214(define-public python-smmap2
13215 (package
13216 (name "python-smmap2")
13217 (version "2.0.3")
13218 (source
13219 (origin
13220 (method url-fetch)
13221 (uri (pypi-uri "smmap2" version))
13222 (sha256
13223 (base32
13224 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
13225 (build-system python-build-system)
13226 (native-inputs
13227 `(("python-nosexcover" ,python-nosexcover)))
13228 (home-page "https://github.com/Byron/smmap")
13229 (synopsis "Python sliding window memory map manager")
13230 (description "@code{smmap2} is a pure Python implementation of a sliding
13231window memory map manager.")
13232 (license license:bsd-3)))
13233
13234(define-public python2-smmap2
13235 (package-with-python2 python-smmap2))
13236
13237(define-public python-regex
13238 (package
13239 (name "python-regex")
c187c9d7 13240 (version "2019.04.14")
44d10b1f
RW
13241 (source (origin
13242 (method url-fetch)
13243 (uri (pypi-uri "regex" version))
13244 (sha256
13245 (base32
c187c9d7
BT
13246 "1a6hhfs6l6snr1z654ay6wzbmwdkmv282fzfkd5hk2d1n73y8v6m"))))
13247 ;; TODO: Fix and enable regex_test.py tests that complain about the
13248 ;; test.support module not existing.
44d10b1f
RW
13249 (build-system python-build-system)
13250 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
13251 (synopsis "Alternative regular expression module")
13252 (description "This regular expression implementation is backwards-
13253compatible with the standard @code{re} module, but offers additional
13254functionality like full case-folding for case-insensitive matches in Unicode.")
13255 (license license:psfl)))
13256
13257(define-public python2-regex
13258 (package-with-python2 python-regex))
13259
13260(define-public python2-pyopengl
13261 (package
13262 (name "python2-pyopengl")
13263 (version "3.1.0")
13264 (source
13265 (origin
13266 (method url-fetch)
13267 (uri (pypi-uri "PyOpenGL" version))
13268 (sha256
13269 (base32
13270 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
13271 (arguments
13272 `(#:python ,python-2))
13273 (build-system python-build-system)
13274 (home-page "http://pyopengl.sourceforge.net")
13275 (synopsis "Standard OpenGL bindings for Python")
13276 (description
13277 "PyOpenGL is the most common cross platform Python binding to OpenGL and
13278related APIs. The binding is created using the standard @code{ctypes}
13279library.")
13280 (license license:bsd-3)))
13281
13282(define-public python2-pyopengl-accelerate
13283 (package
13284 (inherit python2-pyopengl)
13285 (name "python2-pyopengl-accelerate")
13286 (version "3.1.0")
13287 (source
13288 (origin
13289 (method url-fetch)
13290 (uri (pypi-uri "PyOpenGL-accelerate" version))
13291 (sha256
13292 (base32
13293 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
13294 (synopsis "Acceleration code for PyOpenGL")
13295 (description
13296 "This is the Cython-coded accelerator module for PyOpenGL.")))
13297
13298(define-public python-rencode
13299 (package
13300 (name "python-rencode")
13301 (version "1.0.5")
13302 (source
13303 (origin
13304 (method url-fetch)
13305 (uri (pypi-uri "rencode" version))
13306 (sha256
13307 (base32
13308 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
13309 (build-system python-build-system)
13310 (arguments
13311 `(#:phases
13312 (modify-phases %standard-phases
13313 (add-before 'check 'delete-bogus-test
13314 ;; This test requires /home/aresch/Downloads, which is not provided by
13315 ;; the build environment.
13316 (lambda _
13317 (delete-file "rencode/t.py")
13318 #t)))))
13319 (native-inputs `(("pkg-config" ,pkg-config)
13320 ("python-cython" ,python-cython)))
13321 (home-page "https://github.com/aresch/rencode")
13322 (synopsis "Serialization of heterogeneous data structures")
13323 (description
13324 "The @code{rencode} module is a data structure serialization library,
13325similar to @code{bencode} from the BitTorrent project. For complex,
13326heterogeneous data structures with many small elements, r-encoding stake up
13327significantly less space than b-encodings. This version of rencode is a
13328complete rewrite in Cython to attempt to increase the performance over the
13329pure Python module.")
13330 (license license:bsd-3)))
13331
13332(define-public python2-rencode
13333 (package-with-python2 python-rencode))
13334
13335(define-public python-xenon
13336 (package
13337 (name "python-xenon")
13338 (version "0.5.4")
13339 (source
13340 (origin
13341 (method url-fetch)
13342 (uri (pypi-uri "xenon" version))
13343 (sha256
13344 (base32
13345 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
13346 (build-system python-build-system)
13347 (native-inputs
13348 `(("python-pyyaml" ,python-pyyaml)
13349 ("python-radon" ,python-radon)
13350 ("python-requests" ,python-requests)
13351 ("python-flake8" ,python-flake8)
13352 ("python-tox" ,python-tox)))
13353 (arguments
13354 `(#:phases
13355 (modify-phases %standard-phases
13356 (add-before 'build 'patch-test-requirements
13357 (lambda _
13358 ;; Remove httpretty dependency for tests.
13359 (substitute* "setup.py"
13360 (("httpretty") ""))
13361 #t)))))
13362 (home-page "https://xenon.readthedocs.org/")
13363 (synopsis "Monitor code metrics for Python on your CI server")
13364 (description
13365 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
13366Ideally, @code{xenon} is run every time code is committed. Through command
13367line options, various thresholds can be set for the complexity of code. It
13368will fail (i.e. it will exit with a non-zero exit code) when any of these
13369requirements is not met.")
13370 (license license:expat)))
13371
13372(define-public python2-xenon
13373 (package-with-python2 python-xenon))
13374
13375(define-public python-pysocks
13376 (package
13377 (name "python-pysocks")
b8725cdf 13378 (version "1.7.0")
44d10b1f
RW
13379 (source
13380 (origin
13381 (method url-fetch)
13382 (uri (pypi-uri "PySocks" version))
13383 (sha256
13384 (base32
b8725cdf 13385 "0z4p31bpqm893cf87qqgb30k7nwd8kqfjwwjm5cvxb6zbyj1w0yr"))))
44d10b1f
RW
13386 (build-system python-build-system)
13387 (arguments `(#:tests? #f))
13388 (home-page "https://github.com/Anorov/PySocks")
13389 (synopsis "SOCKS client module")
13390 (description "@code{pysocks} is an updated and semi-actively maintained
13391version of @code{SocksiPy} with bug fixes and extra features.")
13392 (license license:bsd-3)))
13393
13394(define-public python2-pysocks
13395 (package-with-python2 python-pysocks))
13396
13397(define-public python-pydiff
13398 (package
13399 (name "python-pydiff")
13400 (version "0.2")
13401 (source
13402 (origin
13403 (method url-fetch)
13404 (uri (pypi-uri "pydiff" version))
13405 (sha256
13406 (base32
13407 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
13408 (build-system python-build-system)
13409 (home-page "https://github.com/myint/pydiff")
13410 (synopsis "Library to diff two Python files at the bytecode level")
13411 (description
13412 "@code{pydiff} makes it easy to look for actual code changes while
13413ignoring formatting changes.")
13414 (license license:expat)))
13415
13416(define-public python2-pydiff
13417 (package-with-python2 python-pydiff))
13418
13419(define-public python-tqdm
13420 (package
13421 (name "python-tqdm")
13422 (version "4.19.6")
13423 (source
13424 (origin
13425 (method url-fetch)
13426 (uri (pypi-uri "tqdm" version))
13427 (sha256
13428 (base32
13429 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
13430 (build-system python-build-system)
13431 (native-inputs
13432 `(("python-flake8" ,python-flake8)
13433 ("python-nose" ,python-nose)
13434 ("python-coverage" ,python-coverage)))
13435 (home-page "https://github.com/tqdm/tqdm")
13436 (synopsis "Fast, extensible progress meter")
13437 (description
13438 "Make loops show a progress bar on the console by just wrapping any
13439iterable with @code{|tqdm(iterable)|}. Offers many options to define
13440design and layout.")
13441 (license (list license:mpl2.0 license:expat))))
13442
13443(define-public python2-tqdm
13444 (package-with-python2 python-tqdm))
13445
13446(define-public python-pkginfo
13447 (package
13448 (name "python-pkginfo")
13449 (version "1.4.2")
13450 (source
13451 (origin
13452 (method url-fetch)
13453 (uri (pypi-uri "pkginfo" version))
13454 (sha256
13455 (base32
13456 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
13457 (build-system python-build-system)
13458 (arguments
13459 ;; The tests are broken upstream.
13460 '(#:tests? #f))
13461 (home-page
13462 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
13463 (synopsis
13464 "Query metadatdata from sdists, bdists, and installed packages")
13465 (description
13466 "API to query the distutils metadata written in @file{PKG-INFO} inside a
13467source distriubtion (an sdist) or a binary distribution (e.g., created by
13468running bdist_egg). It can also query the EGG-INFO directory of an installed
13469distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
13470created by running @code{python setup.py develop}).")
13471 (license license:expat)))
13472
13473(define-public python2-pkginfo
13474 (package-with-python2 python-pkginfo))
13475
13476(define-public python-twine
13477 (package
13478 (name "python-twine")
13479 (version "1.9.1")
13480 (source
13481 (origin
13482 (method url-fetch)
13483 (uri (pypi-uri "twine" version))
13484 (sha256
13485 (base32
13486 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
13487 (build-system python-build-system)
13488 (propagated-inputs
13489 `(("python-tqdm" ,python-tqdm)
13490 ("python-pkginfo" ,python-pkginfo)
13491 ("python-requests" ,python-requests)
13492 ("python-requests-toolbelt" ,python-requests-toolbelt)))
13493 (home-page "https://github.com/pypa/twine")
13494 (synopsis "Collection of utilities for interacting with PyPI")
13495 (description
13496 "@code{twine} currently supports registering projects and uploading
13497distributions. It authenticates the user over HTTPS, allows them to pre-sign
13498their files and supports any packaging format (including wheels).")
13499 (license license:asl2.0)))
13500
13501(define-public python2-twine
13502 (package-with-python2 python-twine))
13503
13504(define-public python-linecache2
13505 (package
13506 (name "python-linecache2")
13507 (version "1.0.0")
13508 (source
13509 (origin
13510 (method url-fetch)
13511 (uri (pypi-uri "linecache2" version))
13512 (sha256
13513 (base32
13514 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
13515 (build-system python-build-system)
13516 (arguments
13517 `(;; The tests depend on unittest2, and our version is a bit too old.
13518 #:tests? #f))
13519 (native-inputs
13520 `(("python-pbr" ,python-pbr-minimal)))
13521 (home-page
13522 "https://github.com/testing-cabal/linecache2")
13523 (synopsis "Backports of the linecache module")
13524 (description
13525 "The linecache module allows one to get any line from any file, while
13526attempting to optimize internally, using a cache, the common case where many
13527lines are read from a single file.")
13528 (license license:psfl)))
13529
13530(define-public python2-linecache2
13531 (package-with-python2 python-linecache2))
13532
13533(define-public python-traceback2
13534 (package
13535 (name "python-traceback2")
13536 (version "1.4.0")
13537 (source
13538 (origin
13539 (method url-fetch)
13540 (uri (pypi-uri "traceback2" version))
13541 (sha256
13542 (base32
13543 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
13544 (build-system python-build-system)
13545 (arguments
13546 `(;; python-traceback2 and python-unittest2 depend on one another.
13547 #:tests? #f))
13548 (native-inputs
13549 `(("python-pbr" ,python-pbr-minimal)))
13550 (propagated-inputs
13551 `(("python-linecache2" ,python-linecache2)))
13552 (home-page
13553 "https://github.com/testing-cabal/traceback2")
13554 (synopsis "Backports of the traceback module")
13555 (description
13556 "This module provides a standard interface to extract, format and print
13557stack traces of Python programs. It exactly mimics the behavior of the Python
13558interpreter when it prints a stack trace.")
13559 (license license:psfl)))
13560
13561(define-public python2-traceback2
13562 (package-with-python2 python-traceback2))
13563
13564(define-public python-ratelimiter
13565 (package
13566 (name "python-ratelimiter")
13567 (version "1.2.0")
13568 (source
13569 (origin
13570 (method url-fetch)
13571 (uri (pypi-uri "ratelimiter" version))
13572 (sha256
13573 (base32
13574 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
13575 (build-system python-build-system)
13576 (arguments
13577 '(#:tests? #f)) ; There are no tests in the pypi archive.
13578 (home-page "https://github.com/RazerM/ratelimiter")
13579 (synopsis "Simple rate limiting object")
13580 (description
13581 "The @code{ratelimiter} module ensures that an operation will not be
13582executed more than a given number of times during a given period.")
13583 (license license:asl2.0)))
13584
13585(define-public python2-ratelimiter
13586 (package-with-python2 python-ratelimiter))
13587
13588(define-public python-dukpy
13589 (package
13590 (name "python-dukpy")
13591 (version "0.3")
13592 (source
13593 (origin
5b77ebe1
TGR
13594 (method git-fetch)
13595 (uri (git-reference
13596 (url "https://github.com/kovidgoyal/dukpy.git")
13597 (commit (string-append "v" version))))
13598 (file-name (git-file-name name version))
44d10b1f 13599 (sha256
5b77ebe1 13600 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
44d10b1f
RW
13601 (build-system python-build-system)
13602 (home-page "https://github.com/kovidgoyal/dukpy")
13603 (synopsis "Run JavaScript in python")
13604 (description
13605 "dukpy is a JavaScript runtime environment for Python using the duktape
13606embeddable JavaScript engine.")
13607 ;; Dukpy is licensed under MIT like the embedded duktape library,
13608 ;; with 'errors.c' as GPL3.
13609 (license (list license:expat license:gpl3))))
13610
13611(define-public python2-dukpy
13612 (package-with-python2 python-dukpy))
13613
13614(define-public python-jsonrpclib-pelix
13615 (package
13616 (name "python-jsonrpclib-pelix")
13617 (version "0.3.2")
13618 (source
13619 (origin
13620 (method url-fetch)
13621 (uri (pypi-uri "jsonrpclib-pelix" version))
13622 (sha256
13623 (base32
13624 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
13625 (build-system python-build-system)
13626 (arguments
13627 `(#:tests? #f)) ; no tests in PyPI tarball
13628 (home-page "https://github.com/tcalmant/jsonrpclib/")
13629 (synopsis "JSON-RPC 2.0 client library for Python")
13630 (description
13631 "This library implements the JSON-RPC v2.0
13632specification (backwards-compatible) as a client library for Python. This
13633version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
13634services.")
13635 (license license:asl2.0)))
13636
13637(define-public python2-jsonrpclib-pelix
13638 (package-with-python2 python-jsonrpclib-pelix))
13639
13640(define-public python-setuptools-scm-git-archive
13641 (package
13642 (name "python-setuptools-scm-git-archive")
13643 (version "1.0")
13644 (source
13645 (origin
13646 (method url-fetch)
13647 (uri (pypi-uri "setuptools_scm_git_archive" version))
13648 (sha256
13649 (base32
13650 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
13651 (build-system python-build-system)
13652 (native-inputs
13653 `(("python-pytest" ,python-pytest)))
13654 (propagated-inputs
13655 `(("python-setuptools-scm" ,python-setuptools-scm)))
13656 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
13657 (synopsis "Setuptools_scm plugin for git archives")
13658 (description
13659 "The setuptools_scm_git_archive package is a plugin to
13660setuptools_scm, which supports obtaining versions from git archives that
13661belong to tagged versions.")
13662 (license license:expat)))
13663
13664(define-public python2-setuptools-scm-git-archive
13665 (package-with-python2 python-setuptools-scm-git-archive))
13666
724a350c
RW
13667(define-public python-setuptools-git
13668 (package
13669 (name "python-setuptools-git")
13670 (version "1.2")
13671 (source
13672 (origin
13673 (method url-fetch)
13674 (uri (pypi-uri "setuptools-git" version))
13675 (sha256
13676 (base32
13677 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
13678 (build-system python-build-system)
13679 (arguments
13680 `(#:phases
13681 (modify-phases %standard-phases
13682 ;; This is needed for tests.
13683 (add-after 'unpack 'configure-git
13684 (lambda _
13685 (setenv "HOME" "/tmp")
13686 (invoke "git" "config" "--global" "user.email" "guix")
13687 (invoke "git" "config" "--global" "user.name" "guix")
13688 #t)))))
13689 (native-inputs
13690 `(("git" ,git-minimal)))
13691 (home-page "https://github.com/msabramo/setuptools-git")
13692 (synopsis "Setuptools revision control system plugin for Git")
13693 (description
13694 "This package provides a plugin for Setuptools for revision control with
13695Git.")
13696 (license license:bsd-3)))
13697
44d10b1f
RW
13698(define-public python-pyclipper
13699 (package
13700 (name "python-pyclipper")
13701 (version "1.1.0.post1")
13702 (source
13703 (origin
13704 (method url-fetch)
13705 (uri (pypi-uri "pyclipper" version ".zip"))
13706 (sha256
13707 (base32
13708 "0ldbkbnx94an4zzrwb1sxmg6k0jgk4cwmvcdyy8y5k1zslc612wa"))
13709 (modules '((guix build utils)))
13710 (snippet
13711 '(begin
13712 ;; This file is generated by Cython.
13713 (delete-file "pyclipper/pyclipper.cpp") #t))))
13714 (build-system python-build-system)
13715 (arguments
13716 `(#:phases
13717 (modify-phases %standard-phases
13718 (add-before 'build 'cythonize-sources
13719 (lambda _
13720 (with-directory-excursion "pyclipper"
13721 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
13722 (propagated-inputs
13723 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
13724 (native-inputs
13725 `(("python-cython" ,python-cython)
13726 ("python-pytest" ,python-pytest)
13727 ("python-pytest-runner" ,python-pytest-runner)
13728 ("python-unittest2" ,python-unittest2)
13729 ("unzip" ,unzip)))
13730 (home-page "https://github.com/greginvm/pyclipper")
13731 (synopsis "Wrapper for Angus Johnson's Clipper library")
13732 (description
13733 "Pyclipper is a Cython wrapper for the C++ translation of the
13734Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
13735 (license license:expat)))
13736
13737(define-public python2-pyclipper
13738 (package-with-python2 python-pyclipper))
13739
13740(define-public python2-booleanoperations
13741 (package
13742 (name "python2-booleanoperations")
13743 (version "0.7.1")
13744 (source
13745 (origin
13746 (method url-fetch)
13747 (uri (pypi-uri "booleanOperations" version ".zip"))
13748 (sha256
13749 (base32
13750 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
13751 (build-system python-build-system)
13752 (arguments
13753 `(#:python ,python-2))
13754 (native-inputs
13755 `(("unzip" ,unzip)
13756 ("python2-pytest" ,python2-pytest)
13757 ("python2-pytest-runner" ,python2-pytest-runner)))
13758 (propagated-inputs
13759 `(("python-fonttools" ,python2-fonttools)
13760 ("python-pyclipper" ,python2-pyclipper)
13761 ("python-ufolib" ,python2-ufolib)))
13762 (home-page "https://github.com/typemytype/booleanOperations")
13763 (synopsis "Boolean operations on paths")
13764 (description
13765 "BooleanOperations provides a Python library that enables
13766boolean operations on paths.")
13767 (license license:expat)))
13768
13769(define-public python-tempdir
13770 (package
13771 (name "python-tempdir")
13772 (version "0.7.1")
13773 (source
13774 (origin
13775 (method url-fetch)
13776 (uri (pypi-uri "tempdir" version))
13777 (sha256
13778 (base32
13779 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
13780 (build-system python-build-system)
13781 (home-page "https://pypi.org/project/tempdir/")
13782 (arguments
13783 ;; the package has no tests
13784 '(#:tests? #f))
13785 (synopsis "Python library for managing temporary directories")
13786 (description
13787 "This library manages temporary directories that are automatically
13788deleted with all their contents when they are no longer needed. It is
13789particularly convenient for use in tests.")
13790 (license license:expat)))
13791
13792(define-public python2-tempdir
13793 (package-with-python2 python-tempdir))
13794
13795(define-public python-activepapers
13796 (package
13797 (name "python-activepapers")
13798 (version "0.2.2")
13799 (source
13800 (origin
13801 (method url-fetch)
13802 (uri (pypi-uri "ActivePapers.Py" version))
13803 (sha256
13804 (base32
13805 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
13806 (build-system python-build-system)
13807 (arguments
13808 `(#:modules ((ice-9 ftw)
13809 (srfi srfi-1)
13810 (guix build utils)
13811 (guix build python-build-system))
13812
13813 #:phases
13814 (modify-phases %standard-phases
13815 (add-after 'unpack 'delete-python2-code
13816 (lambda _
13817 (for-each delete-file
13818 '("lib/activepapers/builtins2.py"
13819 "lib/activepapers/standardlib2.py"
13820 "lib/activepapers/utility2.py"))))
13821 (replace 'check
13822 (lambda _
13823 ;; Deactivate the test cases that download files
13824 (setenv "NO_NETWORK_ACCESS" "1")
13825 ;; For some strange reason, some tests fail if nosetests runs all
13826 ;; test modules in a single execution. They pass if each test
13827 ;; module is run individually.
13828 (for-each (lambda (filename)
13829 (invoke "nosetests"
13830 (string-append "tests/" filename)))
13831 (scandir "tests"
13832 (lambda (filename)
13833 (string-suffix? ".py" filename)))))))))
13834 (native-inputs
13835 `(("python-tempdir" ,python-tempdir)
13836 ("python-nose" ,python-nose)))
13837 (propagated-inputs
13838 `(("python-h5py" ,python-h5py)))
13839 (home-page "http://www.activepapers.org/")
13840 (synopsis "Executable papers for scientific computing")
13841 (description
13842 "ActivePapers is a tool for working with executable papers, which
13843combine data, code, and documentation in single-file packages,
13844suitable for publication as supplementary material or on repositories
13845such as figshare or Zenodo.")
13846 (properties `((python2-variant . ,(delay python2-activepapers))))
13847 (license license:bsd-3)))
13848
13849(define-public python2-activepapers
13850 (let ((base (package-with-python2
13851 (strip-python2-variant python-activepapers))))
13852 (package
13853 (inherit base)
13854 (arguments
13855 (substitute-keyword-arguments (package-arguments base)
13856 ((#:phases phases)
13857 `(modify-phases ,phases
13858 (delete 'delete-python2-code)
13859 (add-after 'unpack 'delete-python3-code
13860 (lambda _
13861 (for-each delete-file
13862 '("lib/activepapers/builtins3.py"
13863 "lib/activepapers/standardlib3.py"
13864 "lib/activepapers/utility3.py")))))))))))
13865
13866(define-public python-semver
13867 (package
13868 (name "python-semver")
13869 (version "2.7.9")
13870 (source
13871 (origin
13872 (method url-fetch)
13873 (uri (pypi-uri "semver" version))
13874 (sha256
13875 (base32
13876 "0hhgqppchv59rqj0yzi1prdg2nfsywqmjsqy2rycyxm0hvxmbyqz"))))
13877 (build-system python-build-system)
13878 (arguments
13879 `(#:phases
13880 (modify-phases %standard-phases
13881 (add-after 'unpack 'patch-test-requirements
13882 (lambda _
13883 (substitute* "setup.py"
13884 ;; Our Python is new enough.
13885 (("'virtualenv<14\\.0\\.0'") "'virtualenv'"))
13886 #t)))))
13887 (native-inputs
13888 `(("python-tox" ,python-tox)
13889 ("python-virtualenv" ,python-virtualenv)))
13890 (home-page "https://github.com/k-bx/python-semver")
13891 (synopsis "Python helper for Semantic Versioning")
13892 (description "This package provides a Python library for
13893@url{Semantic Versioning, http://semver.org/}.")
13894 (license license:bsd-3)))
13895
13896(define-public python2-semver
13897 (package-with-python2 python-semver))
13898
13899(define-public python-pyro4
13900 (package
13901 (name "python-pyro4")
ad1acb81 13902 (version "4.75")
44d10b1f
RW
13903 (source
13904 (origin
13905 (method url-fetch)
13906 (uri (pypi-uri "Pyro4" version))
13907 (sha256
ad1acb81 13908 (base32 "1dfpp36imddx19yv0kd28gk1l71ckhpqy6jd590wpm2680jw15rq"))))
44d10b1f
RW
13909 (build-system python-build-system)
13910 (propagated-inputs
13911 `(("python-serpent" ,python-serpent)))
13912 (home-page "https://pyro4.readthedocs.io")
13913 (synopsis "Distributed object middleware for Python")
13914 (description
13915 "Pyro enables you to build applications in which objects can talk to each
13916other over the network. You can just use normal Python method calls to call
13917objects on other machines, also known as remote procedure calls (RPC).")
13918 (license license:expat)))
13919
13920(define-public python2-pyro
13921 (package
13922 (name "python2-pyro")
13923 (version "3.16")
13924 (source
13925 (origin
13926 (method url-fetch)
13927 (uri (pypi-uri "Pyro" version))
13928 (file-name (string-append "Pyro-" version ".tar.gz"))
13929 (sha256
13930 (base32
13931 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
13932 (build-system python-build-system)
13933 (arguments
13934 ;; Pyro is not compatible with Python 3
13935 `(#:python ,python-2
13936 ;; Pyro has no test cases for automatic execution
13937 #:tests? #f))
13938 (home-page "http://pythonhosted.org/Pyro/")
13939 (synopsis "Distributed object manager for Python")
13940 (description "Pyro is a Distributed Object Technology system
13941written in Python that is designed to be easy to use. It resembles
13942Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
13943which is a system and language independent Distributed Object Technology
13944and has much more to offer than Pyro or RMI. Pyro 3.x is no
13945longer maintained. New projects should use Pyro4 instead, which
13946is the new Pyro version that is actively developed.")
13947 (license license:expat)))
13948
13949(define-public python2-scientific
13950 (package
13951 (name "python2-scientific")
13952 (version "2.9.4")
13953 (source
13954 (origin
13955 (method url-fetch)
13956 (uri (string-append "https://bitbucket.org/khinsen/"
13957 "scientificpython/downloads/ScientificPython-"
13958 version ".tar.gz"))
13959 (file-name (string-append "ScientificPython-" version ".tar.gz"))
13960 (sha256
13961 (base32
13962 "0fc69zhlsn9d2jvbzyjl9ah53vj598h84nkq230c83ahfvgzx5y3"))))
13963 (build-system python-build-system)
13964 (inputs
13965 `(("netcdf" ,netcdf)))
13966 (propagated-inputs
13967 `(("python-numpy" ,python2-numpy-1.8)
13968 ("python-pyro" ,python2-pyro)))
13969 (arguments
13970 ;; ScientificPython is not compatible with Python 3
13971 `(#:python ,python-2
13972 #:tests? #f ; No test suite
13973 #:phases
13974 (modify-phases %standard-phases
13975 (replace 'build
13976 (lambda* (#:key inputs #:allow-other-keys)
77e61e25
RW
13977 (invoke "python" "setup.py" "build"
13978 (string-append "--netcdf_prefix="
13979 (assoc-ref inputs "netcdf"))))))))
44d10b1f
RW
13980 (home-page "https://bitbucket.org/khinsen/scientificpython")
13981 (synopsis "Python modules for scientific computing")
13982 (description "ScientificPython is a collection of Python modules that are
13983useful for scientific computing. Most modules are rather general (Geometry,
13984physical units, automatic derivatives, ...) whereas others are more
13985domain-specific (e.g. netCDF and PDB support). The library is currently
13986not actively maintained and works only with Python 2 and NumPy < 1.9.")
13987 (license license:cecill-c)))
13988
13989(define-public python2-mmtk
13990 (package
13991 (name "python2-mmtk")
13992 (version "2.7.11")
13993 (source
13994 (origin
13995 (method url-fetch)
13996 (uri (string-append "https://bitbucket.org/khinsen/"
13997 "mmtk/downloads/MMTK-" version ".tar.gz"))
13998 (file-name (string-append "MMTK-" version ".tar.gz"))
13999 (sha256
14000 (base32
14001 "1d0nnjx4lwsvh8f99vv1r6gi50d93yba0adkz8b4zgv4za4c5862"))))
14002 (build-system python-build-system)
14003 (native-inputs
14004 `(("netcdf" ,netcdf)))
14005 (propagated-inputs
14006 `(("python-scientific" ,python2-scientific)
14007 ("python-tkinter" ,python-2 "tk")))
14008 (arguments
14009 `(#:python ,python-2
14010 #:tests? #f
14011 #:phases
14012 (modify-phases %standard-phases
14013 (add-before 'build 'includes-from-scientific
14014 (lambda* (#:key inputs #:allow-other-keys)
14015 (mkdir-p "Include/Scientific")
14016 (copy-recursively
14017 (string-append
14018 (assoc-ref inputs "python-scientific")
14019 "/include/python2.7/Scientific")
14020 "Include/Scientific"))))))
14021 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
14022 (synopsis "Python library for molecular simulation")
14023 (description "MMTK is a library for molecular simulations with an emphasis
14024on biomolecules. It provides widely used methods such as Molecular Dynamics
14025and normal mode analysis, but also basic routines for implementing new methods
14026for simulation and analysis. The library is currently not actively maintained
14027and works only with Python 2 and NumPy < 1.9.")
14028 (license license:cecill-c)))
14029
14030(define-public python-phonenumbers
14031 (package
14032 (name "python-phonenumbers")
14033 (version "8.9.1")
14034 (source
14035 (origin
14036 (method url-fetch)
14037 (uri (pypi-uri "phonenumbers" version))
14038 (sha256
14039 (base32
14040 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
14041 (build-system python-build-system)
14042 (home-page
14043 "https://github.com/daviddrysdale/python-phonenumbers")
14044 (synopsis
14045 "Python library for dealing with international phone numbers")
14046 (description
14047 "This package provides a Python port of Google's libphonenumber library.")
14048 (license license:asl2.0)))
14049
14050(define-public python2-phonenumbers
14051 (package-with-python2 python-phonenumbers))
14052
14053(define-public python-send2trash
14054 (package
14055 (name "python-send2trash")
d9b0216b 14056 (version "1.5.0")
44d10b1f 14057 (source
d9b0216b 14058 (origin (method git-fetch)
44d10b1f 14059 ;; Source tarball on PyPI doesn't include tests.
d9b0216b
RW
14060 (uri (git-reference
14061 (url "https://github.com/hsoft/send2trash.git")
14062 (commit version)))
14063 (file-name (git-file-name name version))
44d10b1f
RW
14064 (sha256
14065 (base32
d9b0216b 14066 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
44d10b1f
RW
14067 (build-system python-build-system)
14068 (arguments
14069 '(#:phases
14070 (modify-phases %standard-phases
14071 (add-before 'check 'pre-check
14072 (lambda _
14073 (mkdir-p "/tmp/foo")
14074 (setenv "HOME" "/tmp/foo")
14075 #t)))))
14076 (home-page "https://github.com/hsoft/send2trash")
14077 (synopsis "Send files to the user's @file{~/Trash} directory")
14078 (description "This package provides a Python library to send files to the
14079user's @file{~/Trash} directory.")
20b3fde7 14080 (properties `((python2-variant . ,(delay python2-send2trash))))
44d10b1f
RW
14081 (license license:bsd-3)))
14082
14083(define-public python2-send2trash
14084 (package
f32164ab 14085 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
44d10b1f
RW
14086 (arguments
14087 (substitute-keyword-arguments (package-arguments python-send2trash)
14088 ((#:phases phases)
14089 `(modify-phases ,phases
14090 (add-before 'check 'setenv
14091 (lambda _
14092 (setenv "PYTHONPATH"
14093 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
4782a06f 14094 #t))))))))
44d10b1f
RW
14095
14096(define-public python-yapf
14097 (package
14098 (name "python-yapf")
14099 (version "0.24.0")
14100 (source
14101 (origin
14102 (method url-fetch)
14103 (uri (pypi-uri "yapf" version))
14104 (sha256
14105 (base32
14106 "0anwby0ydmyzcsgjc5dn1ryddwvii4dq61vck447q0n96npnzfyf"))))
14107 (build-system python-build-system)
14108 (home-page "https://github.com/google/yapf")
14109 (synopsis "Formatter for Python code")
14110 (description "YAPF is a formatter for Python code. It's based off of
14111@dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
14112takes the code and reformats it to the best formatting that conforms to the
14113style guide, even if the original code didn't violate the style guide.")
14114 (license license:asl2.0)))
14115
14116(define-public python2-yapf
14117 (package-with-python2 python-yapf))
14118
14119(define-public python-gyp
14120 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
14121 (revision "0"))
14122 (package
14123 (name "python-gyp")
14124 ;; Google does not release versions,
14125 ;; based on second most recent commit date.
14126 (version (git-version "0.0.0" revision commit))
14127 (source
14128 (origin
14129 ;; Google does not release tarballs,
14130 ;; git checkout is needed.
14131 (method git-fetch)
14132 (uri (git-reference
14133 (url "https://chromium.googlesource.com/external/gyp")
14134 (commit commit)))
14135 (file-name (git-file-name name version))
14136 (sha256
14137 (base32
14138 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
14139 (build-system python-build-system)
14140 (home-page "https://gyp.gsrc.io/")
14141 (synopsis "GYP is a Meta-Build system")
14142 (description
14143 "GYP builds build systems for large, cross platform applications.
14144It can be used to generate XCode projects, Visual Studio projects, Ninja build
14145files, and Makefiles.")
14146 (license license:bsd-3))))
14147
14148(define-public python2-gyp
14149 (package-with-python2 python-gyp))
14150
14151(define-public python-whatever
14152 (package
14153 (name "python-whatever")
14154 (version "0.5")
14155 (source
14156 (origin
14157 (method url-fetch)
14158 (uri (string-append "https://github.com/Suor/whatever/archive/" version
14159 ".tar.gz"))
14160 (sha256
14161 (base32
14162 "1iqvnaf0zpc6b4rvbqq4xy45mszcscyzpzknv8wg6j84pbp22sap"))
14163 (file-name (string-append name "-" version ".tar.gz"))))
14164 (build-system python-build-system)
14165 (arguments
14166 `(#:phases
14167 (modify-phases %standard-phases
14168 (replace 'check
14169 (lambda _
14170 (invoke "py.test"))))))
14171 (native-inputs
14172 `(("python-pytest" ,python-pytest)))
14173 (home-page "http://github.com/Suor/whatever")
14174 (synopsis "Make anonymous functions by partial application of operators")
14175 (description "@code{whatever} provides an easy way to make anonymous
14176functions by partial application of operators.")
14177 (license license:bsd-3)))
14178
14179(define-public python2-whatever
14180 (package-with-python2 python-whatever))
14181
14182(define-public python-funcy
14183 (package
14184 (name "python-funcy")
9e396ab8 14185 (version "1.11")
44d10b1f
RW
14186 (source
14187 (origin
a85c6027
TGR
14188 (method git-fetch)
14189 (uri (git-reference
14190 (url "https://github.com/Suor/funcy.git")
14191 (commit version)))
44d10b1f 14192 (sha256
a85c6027
TGR
14193 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
14194 (file-name (git-file-name name version))))
44d10b1f
RW
14195 (build-system python-build-system)
14196 (arguments
14197 `(#:phases
14198 (modify-phases %standard-phases
14199 (replace 'check
14200 (lambda _
14201 (invoke "py.test"))))))
14202 (native-inputs
14203 `(("python-pytest" ,python-pytest)
14204 ("python-whatever" ,python-whatever)))
14205 (home-page "http://github.com/Suor/funcy")
14206 (synopsis "Functional tools")
14207 (description "@code{funcy} is a library that provides functional tools.
14208Examples are:
14209@enumerate
14210@item merge - Merges collections of the same type
14211@item walk - Type-preserving map
14212@item select - Selects a part of a collection
14213@item take - Takes the first n items of a collection
14214@item first - Takes the first item of a collection
14215@item remove - Predicated-removes items of a collection
14216@item concat - Concatenates two collections
14217@item flatten - Flattens a collection with subcollections
14218@item distinct - Returns only distinct items
14219@item split - Predicated-splits a collection
14220@item split_at - Splits a collection at a given item
14221@item group_by - Groups items by group
14222@item pairwise - Pairs off adjacent items
14223@item partial - Partially-applies a function
14224@item curry - Curries a function
14225@item compose - Composes functions
14226@item complement - Complements a predicate
14227@item all_fn - \"all\" with predicate
14228@end enumerate")
14229 (license license:bsd-3)))
14230
14231(define-public python2-funcy
14232 (package-with-python2 python-funcy))
14233
14234(define-public python-isoweek
14235 (package
14236 (name "python-isoweek")
14237 (version "1.3.3")
14238 (source
14239 (origin
14240 (method url-fetch)
14241 (uri (pypi-uri "isoweek" version))
14242 (sha256
14243 (base32
14244 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
14245 (build-system python-build-system)
14246 (home-page "https://github.com/gisle/isoweek")
14247 (synopsis "Objects representing a week")
14248 (description "The @code{isoweek} module provide the class Week that
14249implements the week definition of ISO 8601. This standard also defines
14250a notation for identifying weeks; yyyyWww (where the W is a literal).
14251Week instances stringify to this form.")
14252 (license license:bsd-3)))
14253
14254(define-public python2-isoweek
14255 (package-with-python2 python-isoweek))
14256
14257(define-public python-tokenize-rt
14258 (package
14259 (name "python-tokenize-rt")
14260 (version "2.0.1")
14261 (source
14262 (origin
14263 (method url-fetch)
14264 (uri (pypi-uri "tokenize-rt" version))
14265 (sha256
14266 (base32
14267 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
14268 (build-system python-build-system)
14269 (home-page "https://github.com/asottile/tokenize-rt")
14270 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
14271 (description
14272 "This Python library is a wrapper around @code{tokenize} from the Python
14273standard library. It provides two additional tokens @code{ESCAPED_NL} and
14274@code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
14275and @code{tokens_to_src} to roundtrip.")
14276 (license license:expat)))
14277
14278(define-public python-future-fstrings
14279 (package
14280 (name "python-future-fstrings")
14281 (version "0.4.1")
14282 (source
14283 (origin
14284 (method url-fetch)
14285 (uri (pypi-uri "future_fstrings" version))
14286 (sha256
14287 (base32
14288 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
14289 (build-system python-build-system)
14290 (propagated-inputs
14291 `(("python-tokenize-rt" ,python-tokenize-rt)))
14292 (home-page "https://github.com/asottile/future-fstrings")
14293 (synopsis "Backport of fstrings to Python < 3.6")
14294 (description
14295 "This package provides a UTF-8 compatible encoding
14296@code{future_fstrings}, which performs source manipulation. It decodes the
14297source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
14298@code{f} strings.")
14299 (license license:expat)))
14300
dae2eb1c
MC
14301(define-public python-typed-ast
14302 (package
14303 (name "python-typed-ast")
14304 (version "1.3.5")
14305 (source
14306 (origin
14307 (method url-fetch)
14308 (uri (pypi-uri "typed-ast" version))
14309 (sha256
14310 (base32
14311 "1m7pr6qpana3cvqwiw7mlvrgvmw27ch5mx1592572xhlki8g85ak"))))
14312 (build-system python-build-system)
14313 (arguments
14314 `(#:modules ((guix build utils)
14315 (guix build python-build-system)
14316 (ice-9 ftw)
14317 (srfi srfi-1)
14318 (srfi srfi-26))
14319 #:phases
14320 (modify-phases %standard-phases
14321 (replace 'check
14322 (lambda _
14323 (let ((cwd (getcwd)))
14324 (setenv "PYTHONPATH"
14325 (string-append cwd "/build/"
14326 (find (cut string-prefix? "lib" <>)
14327 (scandir (string-append cwd "/build")))
14328 ":"
14329 (getenv "PYTHONPATH"))))
14330 (invoke "pytest")
14331 #t)))))
14332 (native-inputs `(("python-pytest" ,python-pytest)))
14333 (home-page "https://github.com/python/typed_ast")
14334 (synopsis "Fork of Python @code{ast} modules with type comment support")
14335 (description "This package provides a parser similar to the standard
14336@code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
14337include PEP 484 type comments and are independent of the version of Python
14338under which they are run. The @code{typed_ast} parsers produce the standard
14339Python AST (plus type comments), and are both fast and correct, as they are
14340based on the CPython 2.7 and 3.7 parsers.")
14341 ;; See the file "LICENSE" for the details.
14342 (license (list license:psfl
14343 license:asl2.0
14344 license:expat)))) ;ast27/Parser/spark.py
14345
44d10b1f
RW
14346(define-public python-typing
14347 (package
14348 (name "python-typing")
14349 (version "3.6.6")
14350 (source
14351 (origin
14352 (method url-fetch)
14353 (uri (pypi-uri "typing" version))
14354 (sha256
14355 (base32
14356 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
14357 (build-system python-build-system)
14358 (home-page "https://docs.python.org/3/library/typing.html")
14359 (synopsis "Type hints for Python")
14360 (description "This is a backport of the standard library @code{typing}
14361module to Python versions older than 3.5. Typing defines a standard notation
14362for Python function and variable type annotations. The notation can be used
14363for documenting code in a concise, standard format, and it has been designed
14364to also be used by static and runtime type checkers, static analyzers, IDEs
14365and other tools.")
14366 (license license:psfl)))
14367
14368(define-public python2-typing
14369 (package-with-python2 python-typing))
14370
f89d443b
VC
14371(define-public python-typing-extensions
14372 (package
14373 (name "python-typing-extensions")
14374 (version "3.7.2")
14375 (source
14376 (origin
14377 (method url-fetch)
14378 (uri (pypi-uri "typing_extensions" version))
14379 (sha256
14380 (base32
14381 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
14382 (build-system python-build-system)
14383 (home-page
14384 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
14385 (synopsis "Experimental type hints for Python")
14386 (description
14387 "The typing_extensions module contains additional @code{typing} hints not
14388yet present in the of the @code{typing} standard library.
14389Included are implementations of:
14390@enumerate
14391@item ClassVar
14392@item ContextManager
14393@item Counter
14394@item DefaultDict
14395@item Deque
14396@item NewType
14397@item NoReturn
14398@item overload
14399@item Protocol
14400@item runtime
14401@item Text
14402@item Type
14403@item TYPE_CHECKING
14404@item AsyncGenerator
14405@end enumerate\n")
14406 (license license:psfl)))
14407
44d10b1f
RW
14408(define-public bpython
14409 (package
14410 (name "bpython")
14411 (version "0.17.1")
14412 (source
14413 (origin
14414 (method url-fetch)
14415 (uri (pypi-uri "bpython" version))
14416 (sha256
14417 (base32
14418 "0bxhxi5zxdkrf8b4gwn0d363kdz3qnypjwhm1aydki53ph8ca1w9"))))
14419 (build-system python-build-system)
14420 (arguments
14421 `(#:phases
14422 (modify-phases %standard-phases
14423 (add-after 'unpack 'remove-failing-test
14424 (lambda _
14425 ;; Remove failing test. FIXME: make it pass
14426 (delete-file "bpython/test/test_args.py")
14427 #t))
14428 (add-after 'wrap 'add-aliases
14429 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
14430 (lambda* (#:key outputs #:allow-other-keys)
14431 (let ((out (assoc-ref outputs "out")))
14432 (for-each
14433 (lambda (old new)
14434 (symlink old (string-append out "/bin/" new)))
14435 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
14436 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
14437 #t)))))
14438 (propagated-inputs
14439 `(("python-pygments" ,python-pygments)
14440 ("python-requests" ,python-requests)
14441 ("python-babel" ,python-babel) ; optional, for internationalization
14442 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
14443 ("python-greenlet" ,python-greenlet)
14444 ("python-urwid" ,python-urwid) ; for bpython-urwid only
14445 ("python-six" ,python-six)))
14446 (native-inputs
14447 `(("python-sphinx" ,python-sphinx)
14448 ("python-mock" ,python-mock)))
14449 (home-page "https://bpython-interpreter.org/")
14450 (synopsis "Fancy interface to the Python interpreter")
14451 (description "Bpython is a fancy interface to the Python
14452interpreter. bpython's main features are
14453
14454@enumerate
14455@item in-line syntax highlighting,
14456@item readline-like autocomplete with suggestions displayed as you type,
14457@item expected parameter list for any Python function,
14458@item \"rewind\" function to pop the last line of code from memory and
14459 re-evaluate,
14460@item send the code you've entered off to a pastebin,
14461@item save the code you've entered to a file, and
14462@item auto-indentation.
14463@end enumerate")
14464 (license license:expat)))
14465
14466(define-public bpython2
14467 (let ((base (package-with-python2
14468 (strip-python2-variant bpython))))
14469 (package (inherit base)
14470 (name "bpython2")
14471 (arguments
14472 `(#:python ,python-2
14473 #:phases
14474 (modify-phases %standard-phases
14475 (add-after 'unpack 'remove-failing-test
14476 (lambda _
14477 ;; Remove failing test. FIXME: make it pass
14478 (delete-file "bpython/test/test_args.py")
14479 ;; Disable failing test-cases (renaming inhibits they are
14480 ;; discovered)
14481 (substitute* "bpython/test/test_curtsies_repl.py"
14482 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
14483 (string-append a "xxx_off_" b))
14484 (("^(\\s*def )(test_complex\\W)" _ a b)
14485 (string-append a "xxx_off_" b)))
14486 #t))
14487 (add-before 'build 'rename-scripts
14488 ;; rename the scripts to bypthon2, bpdb2, etc.
14489 (lambda _
14490 (substitute* "setup.py"
14491 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
14492 (string-append name "2" rest "\n"))
14493 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
14494 (string-append name "2" (or sub "") rest "\n")))
14495 #t))))))))
14496
14497(define-public python-pyinotify
14498 (package
14499 (name "python-pyinotify")
14500 (version "0.9.6")
14501 (source (origin
14502 (method url-fetch)
14503 (uri (pypi-uri "pyinotify" version))
14504 (sha256
14505 (base32
14506 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
14507 (build-system python-build-system)
14508 (arguments `(#:tests? #f)) ;no tests
14509 (home-page "https://github.com/seb-m/pyinotify")
14510 (synopsis "Python library for monitoring inotify events")
14511 (description
14512 "@code{pyinotify} provides a Python interface for monitoring
14513file system events on Linux.")
14514 (license license:expat)))
14515
14516(define-public python2-pyinotify
14517 (package-with-python2 python-pyinotify))
14518
14519;; Ada parser uses this version.
14520(define-public python2-quex-0.67.3
14521 (package
14522 (name "python2-quex")
14523 (version "0.67.3")
14524 (source
14525 (origin
14526 (method url-fetch)
14527 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
14528 (version-major+minor version)
14529 "/quex-" version ".zip"))
14530 (sha256
14531 (base32
14532 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
14533 (build-system python-build-system)
14534 (native-inputs
14535 `(("unzip" ,unzip)))
14536 (arguments
14537 `(#:python ,python-2
14538 #:tests? #f
14539 #:phases
14540 (modify-phases %standard-phases
14541 (delete 'configure)
14542 (delete 'build)
14543 (replace 'install
14544 (lambda* (#:key outputs #:allow-other-keys)
14545 (let* ((out (assoc-ref outputs "out"))
14546 (share/quex (string-append out "/share/quex"))
14547 (bin (string-append out "/bin")))
14548 (copy-recursively "." share/quex)
14549 (mkdir-p bin)
14550 (symlink (string-append share/quex "/quex-exe.py")
14551 (string-append bin "/quex"))
14552 #t))))))
14553 (native-search-paths
14554 (list (search-path-specification
14555 (variable "QUEX_PATH")
14556 (files '("share/quex")))))
14557 (home-page "http://quex.sourceforge.net/")
14558 (synopsis "Lexical analyzer generator in Python")
14559 (description "@code{quex} is a lexical analyzer generator in Python.")
14560 (license license:lgpl2.1+))) ; Non-military
14561
14562(define-public python2-quex
14563 (package (inherit python2-quex-0.67.3)
14564 (name "python2-quex")
14565 (version "0.68.1")
14566 (source
14567 (origin
14568 (method url-fetch)
14569 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
14570 (sha256
14571 (base32
14572 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
14573 (file-name (string-append name "-" version ".tar.gz"))))))
14574
14575(define-public python-more-itertools
14576 (package
14577 (name "python-more-itertools")
1b066827 14578 (version "7.1.0")
44d10b1f
RW
14579 (source
14580 (origin
14581 (method url-fetch)
14582 (uri (pypi-uri "more-itertools" version))
14583 (sha256
14584 (base32
1b066827 14585 "16phg2f2dvm6ci5wr49ncha5lmc0m2in3bsl33c61vzca4gkvd4b"))))
44d10b1f 14586 (build-system python-build-system)
44d10b1f
RW
14587 (home-page "https://github.com/erikrose/more-itertools")
14588 (synopsis "More routines for operating on iterables, beyond itertools")
14589 (description "Python's built-in @code{itertools} module implements a
14590number of iterator building blocks inspired by constructs from APL, Haskell,
14591and SML. @code{more-itertools} includes additional building blocks for
14592working with iterables.")
47f66348 14593 (properties `((python2-variant . ,(delay python2-more-itertools))))
44d10b1f
RW
14594 (license license:expat)))
14595
47f66348 14596;; The 5.x series are the last versions supporting Python 2.7.
44d10b1f 14597(define-public python2-more-itertools
47f66348
MB
14598 (package
14599 (inherit python-more-itertools)
14600 (name "python2-more-itertools")
14601 (version "5.0.0")
14602 (source (origin
14603 (method url-fetch)
14604 (uri (pypi-uri "more-itertools" version))
14605 (sha256
14606 (base32
14607 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
14608 (arguments
14609 `(#:python ,python2-minimal))
14610 (propagated-inputs
14611 `(("python2-six" ,python2-six-bootstrap)))))
44d10b1f
RW
14612
14613(define-public python-latexcodec
14614 (package
14615 (name "python-latexcodec")
91b61f02 14616 (version "1.0.6")
44d10b1f
RW
14617 (source
14618 (origin
14619 (method url-fetch)
14620 (uri (pypi-uri "latexcodec" version))
14621 (sha256
91b61f02 14622 (base32 "0s4wdbg0w2l8pj3i0y4510i0s04p8nhxcsa2z41bjsv0k66npb81"))))
44d10b1f
RW
14623 (build-system python-build-system)
14624 (inputs
14625 `(("python-six" ,python-six)))
14626 (home-page "https://readthedocs.org/projects/latexcodec/")
14627 (synopsis "Work with LaTeX code in Python")
14628 (description "Lexer and codec to work with LaTeX code in Python.")
14629 (license license:expat)))
14630
14631(define-public python-pybtex
14632 (package
14633 (name "python-pybtex")
14634 (version "0.21")
14635 (source
14636 (origin
14637 (method url-fetch)
14638 (uri (pypi-uri "pybtex" version))
14639 (sha256
14640 (base32
14641 "00300j8dn5pxq4ndxmfmbmycg2znawkqs49val2x6jlmfiy6r2mg"))))
14642 (build-system python-build-system)
14643 (native-inputs
14644 `(("python-nose" ,python-nose)))
14645 (inputs
14646 `(("python-latexcodec" ,python-latexcodec)
14647 ("python-pyyaml" ,python-pyyaml)
14648 ("python-six" ,python-six)))
14649 (arguments
14650 `(#:test-target "nosetests"))
14651 (home-page "https://pybtex.org/")
14652 (synopsis "BibTeX-compatible bibliography processor")
14653 (description "Pybtex is a BibTeX-compatible bibliography processor written
14654in Python. You can simply type pybtex instead of bibtex.")
14655 (license license:expat)))
14656
14657(define-public python-onetimepass
14658 (package
14659 (name "python-onetimepass")
14660 (version "1.0.1")
14661 (source
14662 (origin
14663 (method url-fetch)
14664 (uri (pypi-uri "onetimepass" version))
14665 (sha256
14666 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
14667 (build-system python-build-system)
14668 (propagated-inputs `(("python-six" ,python-six)))
14669 (home-page "https://github.com/tadeck/onetimepass/")
14670 (synopsis "One-time password library")
14671 (description "Python one-time password library for HMAC-based (HOTP) and
14672time-based (TOTP) passwords.")
14673 (license license:expat)))
14674
14675(define-public python-parso
14676 (package
14677 (name "python-parso")
14678 (version "0.3.1")
14679 (source
14680 (origin
14681 (method url-fetch)
14682 (uri (pypi-uri "parso" version))
14683 (sha256
14684 (base32
14685 "18p89iwcm8mnf380f92g9w0bhx5km8wxp392vvjcq4y1ld1llw1m"))))
14686 (native-inputs
14687 `(("python-pytest" ,python-pytest)))
14688 (build-system python-build-system)
14689 (home-page "https://github.com/davidhalter/parso")
14690 (synopsis "Python Parser")
14691 (description "Parso is a Python parser that supports error recovery and
14692round-trip parsing for different Python versions (in multiple Python versions).
14693Parso is also able to list multiple syntax errors in your Python file.")
14694 (license license:expat)))
14695
14696(define-public python2-parso
14697 (package-with-python2 python-parso))
14698
14699(define-public python-async-generator
14700 (package
14701 (name "python-async-generator")
94fcbf8d 14702 (version "1.10")
44d10b1f
RW
14703 (source
14704 (origin
14705 (method url-fetch)
14706 (uri (pypi-uri "async_generator" version))
14707 (sha256
14708 (base32
94fcbf8d 14709 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
44d10b1f
RW
14710 (build-system python-build-system)
14711 (native-inputs
14712 `(("python-pytest" ,python-pytest)))
14713 (home-page "https://github.com/python-trio/async_generator")
14714 (synopsis "Async generators and context managers for Python 3.5+")
14715 (description "@code{async_generator} back-ports Python 3.6's native async
14716generators and Python 3.7's context managers into Python 3.5.")
14717 ;; Dual licensed.
14718 (license (list license:expat license:asl2.0))))
14719
14720(define-public python-async-timeout
14721 (package
14722 (name "python-async-timeout")
14723 (version "3.0.1")
14724 (source
14725 (origin
14726 (method url-fetch)
14727 (uri (pypi-uri "async-timeout" version))
14728 (sha256
14729 (base32
14730 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
14731 (build-system python-build-system)
14732 (home-page "https://github.com/aio-libs/async_timeout/")
14733 (synopsis "Timeout context manager for asyncio programs")
14734 (description "@code{async-timeout} provides a timeout timeout context
14735manager compatible with @code{asyncio}.")
14736 (license license:asl2.0)))
14737
14738(define-public python-glob2
14739 (package
14740 (name "python-glob2")
14741 (version "0.6")
8fa2bcc7
TGR
14742 (source
14743 (origin
14744 (method git-fetch)
14745 (uri (git-reference
14746 (url "https://github.com/miracle2k/python-glob2.git")
14747 (commit version)))
14748 (file-name (git-file-name name version))
14749 (sha256
14750 (base32 "1lm1xz3k3l0k1c5bcp9hlzmi3gp5j8dl1k3xhpiq5mnm0xq6n163"))))
44d10b1f
RW
14751 (build-system python-build-system)
14752 (home-page "https://github.com/miracle2k/python-glob2/")
14753 (synopsis "Extended Version of the python buildin glob module")
14754 (description "This is an extended version of the Python
14755@url{http://docs.python.org/library/glob.html, built-in glob module} which
14756adds:
14757
14758@itemize
14759@item The ability to capture the text matched by glob patterns, and return
14760those matches alongside the file names.
14761@item A recursive @code{**} globbing syntax, akin for example to the
14762@code{globstar} option of Bash.
14763@item The ability to replace the file system functions used, in order to glob
14764on virtual file systems.
14765@item Compatible with Python 2 and Python 3 (tested with 3.3).
14766@end itemize
14767
14768Glob2 currently based on the glob code from Python 3.3.1.")
14769 (license license:bsd-2)))
14770
14771(define-public python2-glob2
14772 (package-with-python2 python-glob2))
14773
14774(define-public python-gipc
14775 (package
14776 (name "python-gipc")
14777 (version "0.6.0")
14778 (source
14779 (origin
14780 (method url-fetch)
14781 (uri (pypi-uri "gipc" version ".zip"))
14782 (sha256
14783 (base32
14784 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
14785 (build-system python-build-system)
14786 (native-inputs
14787 `(("unzip" ,unzip)))
14788 (propagated-inputs
14789 `(("python-gevent" ,python-gevent)))
14790 (home-page "http://gehrcke.de/gipc")
14791 (synopsis "Child process management in the context of gevent")
14792 (description "Usage of Python's multiprocessing package in a
14793gevent-powered application may raise problems. With @code{gipc},
14794process-based child processes can safely be created anywhere within a
14795gevent-powered application.")
14796 (license license:expat)))
14797
14798(define-public python2-gipc
14799 (package-with-python2 python-gipc))
14800
14801(define-public python-fusepy
14802 (package
14803 (name "python-fusepy")
14804 (version "2.0.4")
14805 (source
14806 (origin
14807 (method url-fetch)
14808 (uri (pypi-uri "fusepy" version))
14809 (sha256
14810 (base32
14811 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
14812 (build-system python-build-system)
14813 (arguments
14814 `(#:phases
14815 (modify-phases %standard-phases
14816 (add-before 'build 'set-library-file-name
14817 (lambda* (#:key inputs #:allow-other-keys)
14818 (let ((fuse (assoc-ref inputs "fuse")))
14819 (substitute* "fuse.py"
14820 (("find_library\\('fuse'\\)")
14821 (string-append "'" fuse "/lib/libfuse.so'")))
14822 #t))))))
14823 (propagated-inputs
14824 `(("fuse" ,fuse)))
14825 (home-page "https://github.com/fusepy/fusepy")
14826 (synopsis "Simple ctypes bindings for FUSE")
14827 (description "Python module that provides a simple interface to FUSE and
14828MacFUSE. The binding is created using the standard @code{ctypes} library.")
14829 (license license:isc)))
14830
14831(define-public python2-fusepy
14832 (package-with-python2 python-fusepy))
14833
14834(define-public python2-gdrivefs
14835 (package
14836 (name "python2-gdrivefs")
14837 (version "0.14.9")
14838 (source
14839 (origin
14840 (method url-fetch)
14841 (uri (pypi-uri "gdrivefs" version))
14842 (sha256
14843 (base32
14844 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
14845 (build-system python-build-system)
14846 (arguments
14847 `(#:python ,python-2
14848 #:phases
14849 (modify-phases %standard-phases
14850 (add-before 'build 'patch-setup-py
14851 (lambda _
14852 ;; Update requirements from dependency==version
14853 ;; to dependency>=version
14854 (substitute* "gdrivefs/resources/requirements.txt"
14855 (("==") ">="))
14856 #t)))))
14857 (native-inputs
14858 `(("python2-gipc" ,python2-gipc)
14859 ("python2-gevent" ,python2-gevent)
14860 ("python2-greenlet" ,python2-greenlet)
14861 ("python2-httplib2" ,python2-httplib2)
14862 ("python2-uritemplate" ,python2-uritemplate)
14863 ("python2-oauth2client" ,python2-oauth2client)
14864 ("python2-six" ,python2-six)))
14865 (propagated-inputs
14866 `(("python2-dateutil" ,python2-dateutil)
14867 ("python2-fusepy" ,python2-fusepy)
14868 ("python2-google-api-client" ,python2-google-api-client)))
14869 (home-page "https://github.com/dsoprea/GDriveFS")
14870 (synopsis "Mount Google Drive as a local file system")
14871 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
14872under Python 2.7.")
14873 (license license:gpl2)))
14874
14875(define-public pybind11
14876 (package
14877 (name "pybind11")
14878 (version "2.2.4")
14879 (source (origin
14880 (method git-fetch)
14881 (uri (git-reference
14882 (url "https://github.com/pybind/pybind11.git")
14883 (commit (string-append "v" version))))
14884 (sha256
14885 (base32
14886 "0pa79ymcasv8br5ifbx7878id5py2jpjac3i20cqxr6gs9l6ivlv"))
14887 (file-name (git-file-name name version))))
14888 (build-system cmake-build-system)
14889 (native-inputs
14890 `(("python" ,python)
14891 ("python-pytest" ,python-pytest)))
14892 (arguments
14893 `(#:test-target "check"))
14894 (home-page "https://github.com/pybind/pybind11/")
14895 (synopsis "Seamless operability between C++11 and Python")
14896 (description "pybind11 is a lightweight header-only library that exposes
14897C++ types in Python and vice versa, mainly to create Python bindings of
14898existing C++ code. Its goals and syntax are similar to the excellent
14899Boost.Python library by David Abrahams: to minimize boilerplate code in
14900traditional extension modules by inferring type information using compile-time
14901introspection.")
14902 (license license:expat)))
14903
14904(define-public python-fasteners
14905 (package
14906 (name "python-fasteners")
14907 (version "0.14.1")
14908 (source
14909 (origin
14910 (method url-fetch)
14911 (uri (pypi-uri "fasteners" version))
14912 (sha256
14913 (base32
14914 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
14915 (build-system python-build-system)
14916 (propagated-inputs
14917 `(("python-monotonic" ,python-monotonic)
14918 ("python-six" ,python-six)
14919 ("python-testtools" ,python-testtools)))
14920 (home-page "https://github.com/harlowja/fasteners")
14921 (synopsis "Python package that provides useful locks")
14922 (description
14923 "This package provides a Python program that provides following locks:
14924
14925@itemize
14926@item Locking decorator
14927@item Reader-writer locks
14928@item Inter-process locks
14929@item Generic helpers
14930@end itemize\n")
14931 (properties `((python2-variant . ,(delay python2-fasteners))))
14932 (license license:asl2.0)))
14933
14934(define-public python2-fasteners
14935 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
14936 (package
14937 (inherit base)
14938 (propagated-inputs
14939 `(("python2-futures" ,python2-futures)
14940 ,@(package-propagated-inputs base))))))
14941
14942(define-public python-requests-file
14943 (package
14944 (name "python-requests-file")
14945 (version "1.4.3")
14946 (source
14947 (origin
14948 (method url-fetch)
14949 (uri (pypi-uri "requests-file" version))
14950 (sha256
14951 (base32
14952 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
14953 (build-system python-build-system)
14954 (propagated-inputs
14955 `(("python-requests" ,python-requests)
14956 ("python-six" ,python-six)))
14957 (home-page
14958 "https://github.com/dashea/requests-file")
14959 (synopsis "File transport adapter for Requests")
14960 (description
14961 "Requests-File is a transport adapter for use with the Requests Python
52beae7b 14962library to allow local file system access via @code{file://} URLs.")
44d10b1f
RW
14963 (license license:asl2.0)))
14964
14965(define-public python2-requests-file
14966 (package-with-python2 python-requests-file))
14967
14968(define-public python-tldextract
14969 (package
14970 (name "python-tldextract")
14971 (version "2.2.0")
14972 (source
14973 (origin
14974 (method url-fetch)
14975 (uri (pypi-uri "tldextract" version))
14976 (sha256
14977 (base32
14978 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
14979 (build-system python-build-system)
14980 (native-inputs
14981 `(("python-pytest" ,python-pytest)
14982 ("python-responses" ,python-responses)))
14983 (propagated-inputs
14984 `(("python-idna" ,python-idna)
14985 ("python-requests" ,python-requests)
14986 ("python-requests-file" ,python-requests-file)))
14987 (home-page
14988 "https://github.com/john-kurkowski/tldextract")
14989 (synopsis
14990 "Separate the TLD from the registered domain and subdomains of a URL")
14991 (description
14992 "TLDExtract accurately separates the TLD from the registered domain and
14993subdomains of a URL, using the Public Suffix List. By default, this includes
14994the public ICANN TLDs and their exceptions. It can optionally support the
14995Public Suffix List's private domains as well.")
14996 (license license:bsd-3)))
14997
14998(define-public python2-tldextract
14999 (package-with-python2 python-tldextract))
15000
15001(define-public python-pynamecheap
15002 (package
15003 (name "python-pynamecheap")
15004 (version "0.0.3")
15005 (source
15006 (origin
15007 (method url-fetch)
15008 (uri (pypi-uri "PyNamecheap" version))
15009 (sha256
15010 (base32
15011 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
15012 (build-system python-build-system)
15013 (propagated-inputs
15014 `(("python-requests" ,python-requests)))
15015 (home-page
15016 "https://github.com/Bemmu/PyNamecheap")
15017 (synopsis
15018 "Namecheap API client in Python")
15019 (description
15020 "PyNamecheap is a Namecheap API client in Python.")
15021 (license license:expat)))
15022
15023(define-public python2-pynamecheap
15024 (package-with-python2 python-pynamecheap))
15025
15026(define-public python-dns-lexicon
15027 (package
15028 (name "python-dns-lexicon")
15029 (version "2.4.0")
15030 (source
15031 (origin
15032 (method url-fetch)
15033 (uri (pypi-uri "dns-lexicon" version))
15034 (sha256
15035 (base32
15036 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
15037 (build-system python-build-system)
15038 (arguments
15039 `(#:tests? #f)) ;requires internet access
15040 (propagated-inputs
15041 `(("python-future" ,python-future)
15042 ("python-pynamecheap" ,python-pynamecheap)
15043 ("python-requests" ,python-requests)
15044 ("python-tldextract" ,python-tldextract)
15045 ("python-urllib3" ,python-urllib3)))
15046 (home-page "https://github.com/AnalogJ/lexicon")
15047 (synopsis
15048 "Manipulate DNS records on various DNS providers")
15049 (description
15050 "Lexicon provides a way to manipulate DNS records on multiple DNS
15051providers in a standardized way. It has a CLI but it can also be used as a
15052Python library. It was designed to be used in automation, specifically with
15053Let's Encrypt.")
15054 (license license:expat)))
15055
15056(define-public python2-dns-lexicon
15057 (package-with-python2 python-dns-lexicon))
15058
15059(define-public python-commandlines
15060 (package
15061 (name "python-commandlines")
15062 (version "0.4.1")
15063 (source
15064 (origin
15065 (method url-fetch)
15066 (uri (pypi-uri "commandlines" version))
15067 (sha256
15068 (base32
15069 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
15070 (build-system python-build-system)
15071 (home-page "https://github.com/chrissimpkins/commandlines")
15072 (synopsis "Command line argument to object parsing library")
15073 (description
15074 "@code{Commandlines} is a Python library for command line application
15075development that supports command line argument parsing, command string
15076validation testing and application logic.")
15077 (license license:expat)))
15078
15079;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
15080;; python-numba. They have a very unflexible relationship.
15081(define-public python-numba
15082 (package
15083 (name "python-numba")
7757e6d8 15084 (version "0.42.0")
44d10b1f
RW
15085 (source
15086 (origin
15087 (method url-fetch)
15088 (uri (pypi-uri "numba" version))
15089 (sha256
15090 (base32
7757e6d8 15091 "03rqdfx0512lcri2bcpngx5k3jwfbqnanqj3n19c7d6h6hqxvq9x"))))
44d10b1f
RW
15092 (build-system python-build-system)
15093 (arguments
15094 `(#:modules ((guix build utils)
15095 (guix build python-build-system)
15096 (ice-9 ftw)
15097 (srfi srfi-1)
15098 (srfi srfi-26))
15099 #:phases
15100 (modify-phases %standard-phases
15101 (add-after 'unpack 'disable-proprietary-features
15102 (lambda _
15103 (setenv "NUMBA_DISABLE_HSA" "1")
15104 (setenv "NUMBA_DISABLE_CUDA" "1")
15105 #t))
15106 (add-after 'unpack 'remove-failing-tests
15107 (lambda _
15108 ;; FIXME: these tests fail for unknown reasons:
15109 ;; test_non_writable_pycache, test_non_creatable_pycache, and
15110 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
15111 (substitute* "numba/tests/test_dispatcher.py"
15112 (("def test(_non_writable_pycache)" _ m)
15113 (string-append "def guix_skip" m))
15114 (("def test(_non_creatable_pycache)" _ m)
15115 (string-append "def guix_skip" m))
15116 (("def test(_frozen)" _ m)
15117 (string-append "def guix_skip" m)))
15118
15119 ;; These tests fail because we don't run the tests from the build
15120 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
15121 ;; They ar in numba.tests.test_pycc.TestDistutilsSupport.
15122 (substitute* "numba/tests/test_pycc.py"
15123 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
15124 (string-append "def guix_skip" m)))
15125 #t))
15126 (replace 'check
15127 (lambda _
15128 (let ((cwd (getcwd)))
15129 (setenv "PYTHONPATH"
15130 (string-append cwd "/build/"
15131 (find (cut string-prefix? "lib" <>)
15132 (scandir (string-append cwd "/build")))
15133 ":"
15134 (getenv "PYTHONPATH")))
15135 ;; Something is wrong with the PYTHONPATH when running the
15136 ;; tests from the build directory, as it complains about not being
15137 ;; able to import certain modules.
15138 (with-directory-excursion "/tmp"
15139 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
15140 #t)))))
15141 (propagated-inputs
15142 `(("python-llvmlite" ,python-llvmlite)
15143 ("python-numpy" ,python-numpy)
15144 ("python-singledispatch" ,python-singledispatch)))
15145 ;; Needed for tests.
15146 (inputs
15147 `(("python-jinja2" ,python-jinja2)
15148 ("python-pygments" ,python-pygments)))
15149 (home-page "https://numba.pydata.org")
15150 (synopsis "Compile Python code using LLVM")
15151 (description "Numba gives you the power to speed up your applications with
15152high performance functions written directly in Python. With a few
15153annotations, array-oriented and math-heavy Python code can be just-in-time
15154compiled to native machine instructions, similar in performance to C, C++ and
15155Fortran, without having to switch languages or Python interpreters.
15156
15157Numba works by generating optimized machine code using the LLVM compiler
15158infrastructure at import time, runtime, or statically (using the included pycc
15159tool).")
15160 (license license:bsd-3)))
15161
15162(define-public python-anndata
15163 (package
15164 (name "python-anndata")
8c9372c1 15165 (version "0.6.18")
44d10b1f
RW
15166 (source
15167 (origin
15168 (method url-fetch)
15169 (uri (pypi-uri "anndata" version))
15170 (sha256
15171 (base32
8c9372c1 15172 "03x83yjaccbqszj7x4fwwmpil0ai59yx64d1zmf2691za3j03w73"))))
44d10b1f
RW
15173 (build-system python-build-system)
15174 (propagated-inputs
15175 `(("python-h5py" ,python-h5py)
15176 ("python-natsort" ,python-natsort)
15177 ("python-pandas" ,python-pandas)
15178 ("python-scipy" ,python-scipy)))
15179 (home-page "https://github.com/theislab/anndata")
15180 (synopsis "Annotated data for data analysis pipelines")
15181 (description "Anndata is a package for simple (functional) high-level APIs
15182for data analysis pipelines. In this context, it provides an efficient,
15183scalable way of keeping track of data together with learned annotations and
15184reduces the code overhead typically encountered when using a mostly
15185object-oriented library such as @code{scikit-learn}.")
15186 (license license:bsd-3)))
15187
15188(define-public python-dill
15189 (package
15190 (name "python-dill")
c60b15cc 15191 (version "0.2.9")
44d10b1f
RW
15192 (source
15193 (origin
15194 (method url-fetch)
15195 (uri (pypi-uri "dill" version))
15196 (sha256
c60b15cc 15197 (base32 "0vwqyi6hyz2r29zydc78dqymkbc5y7gia16xcdh215cikxph9mpn"))))
44d10b1f 15198 (build-system python-build-system)
c60b15cc 15199 ;; FIXME: The check phase fails with "don't know how to make test from: …".
44d10b1f
RW
15200 (arguments '(#:tests? #f))
15201 (home-page "https://pypi.org/project/dill")
15202 (synopsis "Serialize all of Python")
15203 (description "Dill extends Python's @code{pickle} module for serializing
15204and de-serializing Python objects to the majority of the built-in Python
15205types. Dill provides the user the same interface as the @code{pickle} module,
15206and also includes some additional features. In addition to pickling Python
15207objects, @code{dill} provides the ability to save the state of an interpreter
61985d65 15208session in a single command. Hence, it would be feasible to save a
44d10b1f
RW
15209interpreter session, close the interpreter, ship the pickled file to another
15210computer, open a new interpreter, unpickle the session and thus continue from
15211the saved state of the original interpreter session.")
15212 (license license:bsd-3)))
15213
15214(define-public python-multiprocess
15215 (package
15216 (name "python-multiprocess")
15217 (version "0.70.6.1")
15218 (source
15219 (origin
15220 (method url-fetch)
15221 (uri (pypi-uri "multiprocess" version))
15222 (sha256
15223 (base32
15224 "1ip5caz67b3q0553mr8gm8xwsb8x500jn8ml0gihgyfy52m2ypcq"))))
15225 (build-system python-build-system)
15226 (propagated-inputs
15227 `(("python-dill" ,python-dill)))
15228 (home-page "https://pypi.org/project/multiprocess")
15229 (synopsis "Multiprocessing and multithreading in Python")
15230 (description
15231 "This package is a fork of the multiprocessing Python package, a package
15232which supports the spawning of processes using the API of the standard
15233library's @code{threading} module.")
15234 (license license:bsd-3)))
15235
15236(define-public python-toolz
15237 (package
15238 (name "python-toolz")
15239 (version "0.9.0")
15240 (source
15241 (origin
15242 (method url-fetch)
15243 (uri (pypi-uri "toolz" version))
15244 (sha256
15245 (base32
15246 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
15247 (build-system python-build-system)
15248 ;; FIXME: tests cannot be computed: "Can't perform this operation for
15249 ;; unregistered loader type"
15250 (arguments '(#:tests? #f))
15251 (home-page "https://github.com/pytoolz/toolz/")
15252 (synopsis "List processing tools and functional utilities")
15253 (description
15254 "This package provides a set of utility functions for iterators,
15255functions, and dictionaries.")
15256 (license license:bsd-3)))
15257
15258(define-public python2-toolz
15259 (package-with-python2 python-toolz))
15260
15261(define-public python-cytoolz
15262 (package
15263 (name "python-cytoolz")
15264 (version "0.9.0.1")
15265 (source
15266 (origin
15267 (method url-fetch)
15268 (uri (pypi-uri "cytoolz" version))
15269 (sha256
15270 (base32
15271 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
15272 (build-system python-build-system)
15273 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
15274 ;; 'exceptions'"
15275 (arguments '(#:tests? #f))
15276 (propagated-inputs
15277 `(("python-toolz" ,python-toolz)))
15278 (native-inputs
15279 `(("python-cython" ,python-cython)))
15280 (home-page "https://github.com/pytoolz/cytoolz")
15281 (synopsis "High performance functional utilities")
15282 (description
15283 "The cytoolz package implements the same API as provided by toolz. The
15284main differences are that @code{cytoolz} is faster and cytoolz offers a C API
15285that is accessible to other projects developed in Cython.")
15286 (license license:bsd-3)))
15287
15288(define-public python-sortedcontainers
15289 (package
15290 (name "python-sortedcontainers")
15291 (version "2.0.4")
15292 (source
15293 (origin
15294 (method url-fetch)
15295 (uri (pypi-uri "sortedcontainers" version))
15296 (sha256
15297 (base32
15298 "10hrk2k0hbf9x78vd3f0lj277m1yzfhzzxr0hja718liwb398wk0"))))
15299 (build-system python-build-system)
15300 (native-inputs
15301 `(("python-tox" ,python-tox)))
15302 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
15303 (synopsis "Sorted List, Sorted Dict, Sorted Set")
15304 (description
15305 "This package provides a sorted collections library, written in
15306pure-Python.")
15307 (license license:asl2.0)))
15308
15309(define-public python-cloudpickle
15310 (package
15311 (name "python-cloudpickle")
15312 (version "0.6.1")
15313 (source
15314 (origin
15315 (method url-fetch)
15316 (uri (pypi-uri "cloudpickle" version))
15317 (sha256
15318 (base32
15319 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
15320 (build-system python-build-system)
15321 ;; FIXME: there are 5 errors in 122 tests:
15322 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
15323 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
15324 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15325 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15326 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
15327 ;; TypeError: cannot serialize '_io.BufferedRandom' object
15328 (arguments '(#:tests? #f))
15329 (native-inputs
15330 `(("python-pytest" ,python-pytest)
15331 ("python-mock" ,python-mock)
15332 ("python-tornado" ,python-tornado)))
15333 (home-page "https://github.com/cloudpipe/cloudpickle")
15334 (synopsis "Extended pickling support for Python objects")
15335 (description
15336 "Cloudpickle makes it possible to serialize Python constructs not
15337supported by the default pickle module from the Python standard library. It
15338is especially useful for cluster computing where Python expressions are
15339shipped over the network to execute on remote hosts, possibly close to the
15340data.")
15341 (license license:bsd-3)))
15342
15343(define-public python2-cloudpickle
15344 (package-with-python2 python-cloudpickle))
15345
15346(define-public python-locket
15347 (package
15348 (name "python-locket")
15349 (version "0.2.0")
15350 (source
15351 (origin
15352 (method url-fetch)
15353 (uri (pypi-uri "locket" version))
15354 (sha256
15355 (base32
15356 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
15357 (build-system python-build-system)
15358 (home-page "https://github.com/mwilliamson/locket.py")
15359 (synopsis "File-based locks for Python")
15360 (description
15361 "Locket implements a lock that can be used by multiple processes provided
15362they use the same path.")
15363 (license license:bsd-2)))
15364
15365(define-public python2-locket
15366 (package-with-python2 python-locket))
15367
15368(define-public python-blosc
15369 (package
15370 (name "python-blosc")
15371 (version "1.5.1")
15372 (source
15373 (origin
15374 (method url-fetch)
15375 (uri (pypi-uri "blosc" version))
15376 (sha256
15377 (base32
15378 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
15379 (build-system python-build-system)
15380 ;; FIXME: all tests pass, but then this error is printed:
15381 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
15382 (arguments '(#:tests? #f))
15383 (propagated-inputs
15384 `(("python-numpy" ,python-numpy)))
15385 (home-page "https://github.com/blosc/python-blosc")
15386 (synopsis "Python wrapper for the Blosc data compressor library")
15387 (description "Blosc is a high performance compressor optimized for binary
15388data. It has been designed to transmit data to the processor cache faster
15389than the traditional, non-compressed, direct memory fetch approach via a
15390@code{memcpy()} system call.
15391
15392Blosc works well for compressing numerical arrays that contains data with
15393relatively low entropy, like sparse data, time series, grids with
15394regular-spaced values, etc.
15395
15396This Python package wraps the Blosc library.")
15397 (license license:bsd-3)))
15398
15399(define-public python2-blosc
15400 (package-with-python2 python-blosc))
15401
15402(define-public python-partd
15403 (package
15404 (name "python-partd")
15405 (version "0.3.9")
15406 (source
15407 (origin
15408 (method url-fetch)
15409 (uri (pypi-uri "partd" version))
15410 (sha256
15411 (base32
15412 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
15413 (build-system python-build-system)
15414 (propagated-inputs
15415 `(("python-blosc" ,python-blosc)
15416 ("python-locket" ,python-locket)
15417 ("python-numpy" ,python-numpy)
15418 ("python-pandas" ,python-pandas)
15419 ("python-pyzmq" ,python-pyzmq)
15420 ("python-toolz" ,python-toolz)))
15421 (home-page "https://github.com/dask/partd/")
15422 (synopsis "Appendable key-value storage")
15423 (description "Partd stores key-value pairs. Values are raw bytes. We
15424append on old values. Partd excels at shuffling operations.")
15425 (license license:bsd-3)))
15426
15427(define-public python2-partd
15428 (package-with-python2 python-partd))
15429
15430(define-public python-dask
15431 (package
15432 (name "python-dask")
0998175f 15433 (version "1.2.2")
44d10b1f
RW
15434 (source
15435 (origin
15436 (method url-fetch)
15437 (uri (pypi-uri "dask" version))
15438 (sha256
0998175f 15439 (base32 "0b29gvf96gmp20wicly3v3mhyc93zbm3mdv935fka6x0wax7cy2y"))))
44d10b1f
RW
15440 (build-system python-build-system)
15441 ;; A single test out of 5000+ fails. This test is marked as xfail when
15442 ;; pytest-xdist is used.
15443 (arguments
15444 `(#:phases
15445 (modify-phases %standard-phases
15446 (add-after 'unpack 'disable-broken-test
15447 (lambda _
15448 (substitute* "dask/tests/test_threaded.py"
15449 (("def test_interrupt\\(\\)" m)
15450 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15451 m)))
15452 (when (which "python2")
15453 ;; This test fails with recent Pandas:
15454 ;; <https://github.com/dask/dask/issues/3794>.
15455 (substitute* "dask/dataframe/tests/test_dataframe.py"
15456 (("def test_info\\(\\)" m)
15457 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15458 m))))
15459 #t))
15460 (replace 'check
15461 (lambda _ (invoke "pytest" "-vv"))))))
15462 (propagated-inputs
15463 `(("python-cloudpickle" ,python-cloudpickle)
15464 ("python-numpy" ,python-numpy)
15465 ("python-pandas" ,python-pandas)
15466 ("python-partd" ,python-partd)
15467 ("python-toolz" ,python-toolz)
15468 ("python-pyyaml" ,python-pyyaml)))
15469 (native-inputs
15470 `(("python-pytest" ,python-pytest)
15471 ("python-pytest-runner" ,python-pytest-runner)))
15472 (home-page "https://github.com/dask/dask/")
15473 (synopsis "Parallel computing with task scheduling")
15474 (description
15475 "Dask is a flexible parallel computing library for analytics. It
15476consists of two components: dynamic task scheduling optimized for computation,
15477and large data collections like parallel arrays, dataframes, and lists that
15478extend common interfaces like NumPy, Pandas, or Python iterators to
15479larger-than-memory or distributed environments. These parallel collections
15480run on top of the dynamic task schedulers. ")
15481 (license license:bsd-3)))
15482
15483(define-public python2-dask
15484 (package-with-python2 python-dask))
15485
15486(define-public python-ilinkedlist
15487 (package
15488 (name "python-ilinkedlist")
15489 (version "0.4.0")
15490 (source
15491 (origin
15492 (method url-fetch)
15493 (uri (pypi-uri "ilinkedlist" version))
15494 (sha256
15495 (base32
15496 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
15497 (build-system python-build-system)
15498 (native-inputs `(("python-pytest" ,python-pytest)))
15499 (inputs `(("python" ,python)))
15500 (home-page "https://github.com/luther9/ilinkedlist-py")
15501 (synopsis "Immutable linked list library")
15502 (description
15503 "This is a implementation of immutable linked lists for Python. It
15504contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
15505Since a linked list is treated as immutable, it is hashable, and its length
15506can be retrieved in constant time. Some of the terminology is inspired by
15507LISP. It is possible to create an improper list by creating a @code{Pair}
15508with a non-list @code{cdr}.")
15509 (license license:gpl3+)))
15510
15511(define-public python-readlike
15512 (package
15513 (name "python-readlike")
15514 (version "0.1.3")
15515 (source
15516 (origin
15517 (method url-fetch)
15518 (uri (pypi-uri "readlike" version))
15519 (sha256
15520 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
15521 (build-system python-build-system)
15522 (home-page "https://github.com/jangler/readlike")
15523 (synopsis "GNU Readline-like line editing module")
15524 (description
15525 "This Python module provides line editing functions similar to the default
15526Emacs-style ones of GNU Readline. Unlike the Python standard library's
15527@code{readline} package, this one allows access to those capabilties in settings
15528outside of a standard command-line interface. It is especially well-suited to
15529interfacing with Urwid, due to a shared syntax for describing key inputs.
15530
15531Currently, all stateless Readline commands are implemented. Yanking and history
15532are not supported.")
15533 (license license:expat)))
15534
15535(define-public python2-readlike
15536 (package-with-python2 python-readlike))
15537
15538(define-public python-reparser
15539 (package
15540 (name "python-reparser")
15541 (version "1.4.3")
15542 (source
15543 (origin
15544 (method url-fetch)
15545 (uri (pypi-uri "ReParser" version))
15546 (sha256
15547 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
15548 (build-system python-build-system)
15549 (home-page "https://github.com/xmikos/reparser")
15550 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
15551 (description
15552 "This Python library provides a simple lexer/parser for inline markup based
15553on regular expressions.")
15554 (license license:expat)))
15555
15556(define-public python2-reparser
15557 (let ((reparser (package-with-python2
15558 (strip-python2-variant python-reparser))))
15559 (package (inherit reparser)
15560 (propagated-inputs
15561 `(("python2-enum34" ,python2-enum34)
15562 ,@(package-propagated-inputs reparser))))))
15563
15564(define-public python-precis-i18n
15565 (package
15566 (name "python-precis-i18n")
15567 (version "1.0.0")
15568 (source
15569 (origin
15570 (method url-fetch)
15571 (uri (pypi-uri "precis_i18n" version))
15572 (sha256
15573 (base32
15574 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
15575 (build-system python-build-system)
15576 (home-page "https://github.com/byllyfish/precis_i18n")
15577 (synopsis "Implementation of the PRECIS framework")
15578 (description
15579 "This module implements the PRECIS Framework as described in RFC 8264,
15580RFC 8265 and RFC 8266.")
15581 (license license:expat)))
15582
d0446c4b
RW
15583(define-public python-absl-py
15584 (package
15585 (name "python-absl-py")
15586 (version "0.6.1")
15587 (source
15588 (origin
15589 (method url-fetch)
15590 (uri (pypi-uri "absl-py" version))
15591 (sha256
15592 (base32
15593 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
15594 (build-system python-build-system)
15595 (propagated-inputs
15596 `(("python-six" ,python-six)))
15597 (home-page "https://github.com/abseil/abseil-py")
15598 (synopsis "Abseil Python common libraries")
15599 (description
15600 "This package provides the Abseil Python Common Libraries, a collection
15601of Python libraries for building Python applications.")
15602 (license license:asl2.0)))
15603
81bed4e9
RW
15604(define-public python-astor
15605 (package
15606 (name "python-astor")
15607 (version "0.7.1")
15608 (source
15609 (origin
15610 (method url-fetch)
15611 (uri (pypi-uri "astor" version))
15612 (sha256
15613 (base32
15614 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
15615 (build-system python-build-system)
15616 ;; FIXME: There are two errors and two test failures.
15617 (arguments `(#:tests? #f))
15618 (home-page "https://github.com/berkerpeksag/astor")
39ee82ff 15619 (synopsis "Read and write Python ASTs")
81bed4e9 15620 (description "Astor is designed to allow easy manipulation of Python
39ee82ff 15621source via the Abstract Syntax Tree.")
81bed4e9
RW
15622 (license license:bsd-3)))
15623
39ee82ff
RW
15624(define-public python2-astor
15625 (package-with-python2 python-astor))
15626
22e623ae
RW
15627(define-public python-grpcio
15628 (package
15629 (name "python-grpcio")
15630 (version "1.17.1")
15631 (source
15632 (origin
15633 (method url-fetch)
15634 (uri (pypi-uri "grpcio" version))
15635 (sha256
15636 (base32
15637 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
15638 (build-system python-build-system)
15639 (propagated-inputs
15640 `(("python-six" ,python-six)))
15641 (home-page "https://grpc.io")
15642 (synopsis "HTTP/2-based RPC framework")
15643 (description "This package provides a Python library for communicating
15644with the HTTP/2-based RPC framework gRPC.")
15645 (license license:asl2.0)))
15646
79869f80
RW
15647(define-public python-astunparse
15648 (package
15649 (name "python-astunparse")
47d79541 15650 (version "1.6.2")
79869f80
RW
15651 (source
15652 (origin
15653 (method url-fetch)
15654 (uri (pypi-uri "astunparse" version))
15655 (sha256
47d79541 15656 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
79869f80 15657 (build-system python-build-system)
47d79541 15658 (arguments '(#:tests? #f)) ; there are none
79869f80
RW
15659 (propagated-inputs
15660 `(("python-six" ,python-six)
15661 ("python-wheel" ,python-wheel)))
15662 (home-page "https://github.com/simonpercivall/astunparse")
15663 (synopsis "AST unparser for Python")
15664 (description "This package provides an AST unparser for Python. It is a
15665factored out version of @code{unparse} found in the Python source
15666distribution.")
15667 (license license:bsd-3)))
15668
2884aac0
RW
15669(define-public python-gast
15670 (package
15671 (name "python-gast")
bd300261 15672 (version "0.2.2")
2884aac0
RW
15673 (source
15674 (origin
15675 (method url-fetch)
15676 (uri (pypi-uri "gast" version))
15677 (sha256
bd300261 15678 (base32 "1w5dzdb3gpcfmd2s0b93d8gff40a1s41rv31458z14inb3s9v4zy"))))
2884aac0
RW
15679 (build-system python-build-system)
15680 (propagated-inputs
15681 `(("python-astunparse" ,python-astunparse)))
15682 (home-page "https://pypi.org/project/gast/")
15683 (synopsis "Generic Python AST that abstracts the underlying Python version")
15684 (description
15685 "GAST provides a compatibility layer between the AST of various Python
15686versions, as produced by @code{ast.parse} from the standard @code{ast}
15687module.")
15688 (license license:bsd-3)))
15689
44d10b1f
RW
15690(define-public python-wikidata
15691 (package
15692 (name "python-wikidata")
15693 (version "0.6.1")
15694 (source
15695 (origin
15696 (method url-fetch)
15697 (uri (pypi-uri "Wikidata" version))
15698 (sha256
15699 (base32
15700 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
15701 (build-system python-build-system)
15702 (propagated-inputs
15703 `(("python-babel" ,python-babel)))
15704 (home-page "https://github.com/dahlia/wikidata")
15705 (synopsis "Wikidata client library")
15706 (description
15707 "This package provides a Python interface to
15708@url{https://www.wikidata.org/, Wikidata}.")
15709 (properties '((upstream-name . "Wikidata")))
15710 (license license:gpl3+)))
15711
15712(define-public python-doctest-ignore-unicode
15713 (package
15714 (name "python-doctest-ignore-unicode")
15715 (version "0.1.2")
15716 (source
15717 (origin
15718 (method url-fetch)
15719 (uri (pypi-uri "doctest-ignore-unicode" version))
15720 (sha256
15721 (base32
15722 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
15723 (build-system python-build-system)
15724 (native-inputs
15725 `(("python-nose" ,python-nose)))
15726 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
15727 (synopsis "Ignore Unicode literal prefixes in doctests")
15728 (description
15729 "This package adds support for a flag to ignore Unicode literal prefixes
15730in doctests.")
15731 (license license:asl2.0)))
15732
15733(define-public python-attr
15734 (package
15735 (name "python-attr")
15736 (version "0.3.1")
15737 (source
15738 (origin
15739 (method url-fetch)
15740 (uri (pypi-uri "attr" version))
15741 (sha256
15742 (base32
15743 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
15744 (build-system python-build-system)
15745 (home-page "https://github.com/denis-ryzhkov/attr")
15746 (synopsis "Decorator for attributes of target function or class")
15747 (description "Simple decorator to set attributes of target function or
15748class in a @acronym{DRY, Don't Repeat Yourself} way.")
15749 (license license:expat)))
f98232a3
VC
15750
15751(define-public python-construct
15752 (package
15753 (name "python-construct")
15754 (version "2.9.45")
15755 (source
15756 (origin
15757 (method url-fetch)
15758 (uri (pypi-uri "construct" version))
15759 (sha256
15760 (base32
15761 "130iy05awzigm2xah2yvlmb08mac5bi4gzr5m3g7k1krs3ps0w92"))))
15762 (build-system python-build-system)
15763 (arguments
15764 `(#:tests? #f)) ; No tests exist.
15765 (propagated-inputs
15766 `(("python-extras" ,python-extras)
15767 ("python-arrow" ,python-arrow)
15768 ("python-numpy" ,python-numpy)
15769 ("python-ruamel.yaml" ,python-ruamel.yaml)))
15770 (home-page "http://construct.readthedocs.io")
15771 (synopsis "Declarative and symmetrical parser and builder for binary data")
15772 (description
15773 "This package provides both simple, atomic constructs (such as
15774integers of various sizes), as well as composite ones which allow you
15775form hierarchical and sequential structures of increasing complexity.
15776It features bit and byte granularity, easy debugging and testing, an
15777easy-to-extend subclass system, and lots of primitive constructs to
15778make your work easier.")
15779 (license license:expat)))
b742c006
LF
15780
15781(define-public python-humanize
15782 (package
15783 (name "python-humanize")
15784 (version "0.5.1")
15785 (source
15786 (origin
15787 (method url-fetch)
15788 (uri (pypi-uri "humanize" version))
15789 (sha256
15790 (base32
15791 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
15792 (arguments
15793 '(#:tests? #f)) ; tests not in pypi archive
15794 (build-system python-build-system)
15795 (home-page "https://github.com/jmoiron/humanize")
15796 (synopsis "Print numerical information in a human-readable form")
15797 (description "This package provides a Python module that displays numbers
15798and dates in \"human readable\" forms. For example, it would display
15799\"12345591313\" as \"12.3 billion\".")
15800 (license license:expat)))
d5bbf66d
LF
15801
15802(define-public python-txaio
15803 (package
15804 (name "python-txaio")
15805 (version "18.8.1")
15806 (source
15807 (origin
15808 (method url-fetch)
15809 (uri (pypi-uri "txaio" version))
15810 (sha256
15811 (base32
15812 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
15813 (build-system python-build-system)
15814 (propagated-inputs
15815 `(("python-twisted" ,python-twisted)
15816 ("python-six" ,python-six)))
15817 (home-page "https://github.com/crossbario/txaio")
15818 (synopsis "Compatibility layer between Python asyncio and Twisted")
15819 (description "Txaio provides a compatibility layer between the Python
15820@code{asyncio} module and @code{Twisted}.")
15821 (license license:expat)))
963dfd3a
RW
15822
15823(define-public python-toolshed
15824 (package
15825 (name "python-toolshed")
15826 (version "0.4.6")
15827 (source
15828 (origin
15829 (method url-fetch)
15830 (uri (pypi-uri "toolshed" version))
15831 (sha256
15832 (base32
15833 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
15834 (build-system python-build-system)
15835 (native-inputs
15836 `(("python-nose" ,python-nose)))
15837 (home-page "https://github.com/brentp/toolshed/")
15838 (synopsis "Collection of modules and functions for working with data")
15839 (description "This is a collection of well-tested, simple modules and
15840functions that aim to reduce boilerplate when working with data.")
15841 (license license:bsd-2)))
c91ecf2d
RW
15842
15843(define-public python-annoy
15844 (package
15845 (name "python-annoy")
15846 (version "1.15.1")
15847 (source
15848 (origin
15849 (method url-fetch)
15850 (uri (pypi-uri "annoy" version))
15851 (sha256
15852 (base32
15853 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
15854 (build-system python-build-system)
15855 (native-inputs
15856 `(("python-nose" ,python-nose)))
15857 (home-page "https://github.com/spotify/annoy/")
15858 (synopsis "Approximate nearest neighbors library")
15859 (description
15860 "Annoy is a C++ library with Python bindings to search for points in
15861space that are close to a given query point. It also creates large read-only
15862file-based data structures that are @code{mmap}ped into memory so that many
15863processes may share the same data.")
15864 (license license:asl2.0)))
412342d1 15865
79bfa422 15866(define-public python-pylzma
412342d1 15867 (package
79bfa422
DM
15868 (name "python-pylzma")
15869 (version "0.5.0")
15870 (source
15871 (origin
15872 (method url-fetch)
15873 (uri (pypi-uri "pylzma" version))
15874 (sha256
15875 (base32
15876 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
412342d1 15877 (build-system python-build-system)
79bfa422
DM
15878 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
15879 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
15880 (description "This package provides Python bindings for the LZMA library
15881by Igor Pavlov.")
15882 (license license:lgpl2.1+)))
15883
15884(define-public python2-pylzma
15885 (package-with-python2 python-pylzma))
f825e605 15886
6609ebe7
AG
15887(define-public python2-zeroconf
15888 (package
15889 (name "python2-zeroconf")
15890
15891 ;; This is the last version that supports Python 2.x.
15892 (version "0.19.1")
15893 (source
15894 (origin
15895 (method url-fetch)
15896 (uri (pypi-uri "zeroconf" version))
15897 (sha256
15898 (base32
15899 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
15900 (build-system python-build-system)
15901 (arguments
15902 `(#:python ,python-2
15903 #:phases
15904 (modify-phases %standard-phases
15905 (add-after 'unpack 'patch-requires
15906 (lambda* (#:key inputs #:allow-other-keys)
15907 (substitute* "setup.py"
15908 (("enum-compat")
15909 "enum34"))
15910 #t)))))
15911 (native-inputs
15912 `(("python2-six" ,python2-six)
15913 ("python2-enum32" ,python2-enum34)
15914 ("python2-netifaces" ,python2-netifaces)
15915 ("python2-typing" ,python2-typing)))
15916 (home-page "https://github.com/jstasiak/python-zeroconf")
15917 (synopsis "Pure Python mDNS service discovery")
15918 (description
15919 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
15920compatible).")
15921 (license license:lgpl2.1+)))
15922
f825e605
GLV
15923(define-public python-bsddb3
15924 (package
15925 (name "python-bsddb3")
15926 (version "6.2.6")
15927 (source
15928 (origin
15929 (method url-fetch)
15930 (uri (pypi-uri "bsddb3" version))
15931 (sha256
15932 (base32
15933 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
15934 (build-system python-build-system)
15935 (inputs
15936 `(("bdb" ,bdb)))
15937 (arguments
15938 '(#:phases
15939 (modify-phases %standard-phases
15940 (add-after 'unpack 'configure-locations
15941 (lambda* (#:key inputs #:allow-other-keys)
15942 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
15943 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
15944 #t))
15945 (replace 'check
15946 (lambda _
15947 (invoke "python3" "test3.py" "-v"))))))
15948 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
15949 (synopsis "Python bindings for Oracle Berkeley DB")
15950 (description
15951 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
15952C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
15953Transaction objects, and each of these is exposed as a Python type in the
15954bsddb3.db module. The database objects can use various access methods: btree,
15955hash, recno, and queue. Complete support of Berkeley DB distributed
15956transactions. Complete support for Berkeley DB Replication Manager.
15957Complete support for Berkeley DB Base Replication. Support for RPC.")
15958 (license license:bsd-3)))
edeb04bf
PL
15959
15960(define-public python-dbfread
15961 (package
15962 (name "python-dbfread")
15963 (version "2.0.7")
15964 (source (origin
15965 (method url-fetch)
15966 (uri (pypi-uri "dbfread" version))
15967 (sha256
15968 (base32
15969 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
15970 (build-system python-build-system)
15971 (native-inputs
15972 `(("python-pytest" ,python-pytest)))
15973 (home-page "https://dbfread.readthedocs.io")
15974 (synopsis "Read DBF Files with Python")
15975 (description
15976 "This library reads DBF files and returns the data as native Python data
15977types for further processing. It is primarily intended for batch jobs and
15978one-off scripts.")
15979 (license license:expat)))
e308b4f0
JM
15980
15981(define-public python-cached-property
15982 (package
15983 (name "python-cached-property")
15984 (version "1.5.1")
15985 (source
15986 (origin
15987 (method url-fetch)
15988 (uri (pypi-uri "cached-property" version))
15989 (sha256
15990 (base32
15991 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
15992 (build-system python-build-system)
15993 (arguments
15994 `(#:phases
15995 (modify-phases %standard-phases
15996 ;; https://github.com/pydanny/cached-property/issues/131
15997 ;; recent versions of freezegun break one test
15998 (add-after 'unpack 'disable-broken-test
15999 (lambda _
16000 (substitute* "tests/test_cached_property.py"
16001 (("def test_threads_ttl_expiry\\(self\\)" m)
16002 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
16003 " " m)))
16004 #t)))))
16005 (native-inputs
16006 `(("python-freezegun" ,python-freezegun)))
16007 (home-page
16008 "https://github.com/pydanny/cached-property")
16009 (synopsis
16010 "Decorator for caching properties in classes")
16011 (description
16012 "This package provides a decorator which makes caching
16013time-or-computationally-expensive properties quick and easy and works in Python
160142 or 3.")
16015 (license license:bsd-3)))