gnu: Add python-crate.
[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>
ea43f0d5 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>
44d10b1f
RW
65;;;
66;;; This file is part of GNU Guix.
67;;;
68;;; GNU Guix is free software; you can redistribute it and/or modify it
69;;; under the terms of the GNU General Public License as published by
70;;; the Free Software Foundation; either version 3 of the License, or (at
71;;; your option) any later version.
72;;;
73;;; GNU Guix is distributed in the hope that it will be useful, but
74;;; WITHOUT ANY WARRANTY; without even the implied warranty of
75;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
76;;; GNU General Public License for more details.
77;;;
78;;; You should have received a copy of the GNU General Public License
79;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
80
81(define-module (gnu packages python-xyz)
82 #:use-module ((guix licenses) #:prefix license:)
83 #:use-module (gnu packages)
84 #:use-module (gnu packages algebra)
85 #:use-module (gnu packages adns)
86 #:use-module (gnu packages attr)
87 #:use-module (gnu packages backup)
88 #:use-module (gnu packages bash)
89 #:use-module (gnu packages check)
90 #:use-module (gnu packages compression)
91 #:use-module (gnu packages crypto)
92 #:use-module (gnu packages databases)
f825e605 93 #:use-module (gnu packages dbm)
44d10b1f
RW
94 #:use-module (gnu packages file)
95 #:use-module (gnu packages fontutils)
96 #:use-module (gnu packages gcc)
97 #:use-module (gnu packages geo)
98 #:use-module (gnu packages ghostscript)
99 #:use-module (gnu packages gl)
100 #:use-module (gnu packages glib)
101 #:use-module (gnu packages graphviz)
102 #:use-module (gnu packages graphics)
103 #:use-module (gnu packages gstreamer)
104 #:use-module (gnu packages gtk)
105 #:use-module (gnu packages icu4c)
106 #:use-module (gnu packages image)
107 #:use-module (gnu packages imagemagick)
108 #:use-module (gnu packages libevent)
109 #:use-module (gnu packages libffi)
110 #:use-module (gnu packages linux)
111 #:use-module (gnu packages llvm)
112 #:use-module (gnu packages man)
113 #:use-module (gnu packages maths)
42f0b0c2 114 #:use-module (gnu packages monitoring)
44d10b1f
RW
115 #:use-module (gnu packages multiprecision)
116 #:use-module (gnu packages networking)
117 #:use-module (gnu packages ncurses)
118 #:use-module (gnu packages openstack)
119 #:use-module (gnu packages pcre)
120 #:use-module (gnu packages perl)
121 #:use-module (gnu packages pkg-config)
122 #:use-module (gnu packages python)
d362b11d 123 #:use-module (gnu packages python-check)
15b65617 124 #:use-module (gnu packages python-compression)
44d10b1f
RW
125 #:use-module (gnu packages python-crypto)
126 #:use-module (gnu packages python-web)
127 #:use-module (gnu packages qt)
128 #:use-module (gnu packages readline)
129 #:use-module (gnu packages sdl)
130 #:use-module (gnu packages search)
131 #:use-module (gnu packages shells)
9d0c291e 132 #:use-module (gnu packages sphinx)
44d10b1f
RW
133 #:use-module (gnu packages ssh)
134 #:use-module (gnu packages terminals)
135 #:use-module (gnu packages tex)
136 #:use-module (gnu packages texinfo)
137 #:use-module (gnu packages time)
138 #:use-module (gnu packages tls)
139 #:use-module (gnu packages version-control)
140 #:use-module (gnu packages video)
141 #:use-module (gnu packages web)
142 #:use-module (gnu packages base)
143 #:use-module (gnu packages xml)
144 #:use-module (gnu packages xorg)
145 #:use-module (gnu packages xdisorg)
146 #:use-module (gnu packages tcl)
147 #:use-module (gnu packages bdw-gc)
f98232a3 148 #:use-module (gnu packages serialization)
44d10b1f
RW
149 #:use-module (guix packages)
150 #:use-module (guix download)
151 #:use-module (guix git-download)
a042d348 152 #:use-module (guix hg-download)
44d10b1f
RW
153 #:use-module (guix utils)
154 #:use-module (guix build-system gnu)
155 #:use-module (guix build-system cmake)
156 #:use-module (guix build-system python)
157 #:use-module (guix build-system trivial)
158 #:use-module (srfi srfi-1)
159 #:use-module (srfi srfi-26))
160
161(define-public python-psutil
162 (package
163 (name "python-psutil")
7abf3cbf 164 (version "5.6.2")
44d10b1f
RW
165 (source
166 (origin
167 (method url-fetch)
168 (uri (pypi-uri "psutil" version))
169 (sha256
170 (base32
7abf3cbf 171 "1v95vb5385qscfdvphv8l2w22bmir3d7yhpi02n58v3mlqy1r3l2"))))
44d10b1f
RW
172 (build-system python-build-system)
173 (arguments
174 ;; FIXME: some tests does not return and times out.
175 '(#:tests? #f))
176 (home-page "https://www.github.com/giampaolo/psutil")
177 (synopsis "Library for retrieving information on running processes")
178 (description
179 "psutil (Python system and process utilities) is a library for retrieving
180information on running processes and system utilization (CPU, memory, disks,
181network) in Python. It is useful mainly for system monitoring, profiling and
182limiting process resources and management of running processes. It implements
183many functionalities offered by command line tools such as: ps, top, lsof,
184netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
185pidof, tty, taskset, pmap.")
186 (properties `((python2-variant . ,(delay python2-psutil))))
187 (license license:bsd-3)))
188
189(define-public python2-psutil
190 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
191 (package
192 (inherit base)
193 (propagated-inputs
194 `(("python2-enum34" ,python2-enum34) ;optional
195 ,@(package-propagated-inputs base))))))
196
197(define-public python-shapely
198 (package
199 (name "python-shapely")
6d94465b 200 (version "1.6.4.post2")
44d10b1f
RW
201 (source
202 (origin
203 (method url-fetch)
204 (uri (pypi-uri "Shapely" version))
205 (sha256
206 (base32
6d94465b 207 "03r42fmd9alp6r3q95ad6rldq2f7n1wimrw53zy5kpn33yv7pf64"))))
44d10b1f
RW
208 (build-system python-build-system)
209 (native-inputs
210 `(("python-cython" ,python-cython)
211 ("python-matplotlib" ,python-matplotlib)
212 ("python-pytest" ,python-pytest)
213 ("python-pytest-cov" ,python-pytest-cov)))
214 (inputs
215 `(("geos" ,geos)))
216 (propagated-inputs
217 `(("python-numpy" ,python-numpy)))
218 (arguments
219 `(#:phases
220 (modify-phases %standard-phases
221 (add-after 'unpack 'patch-geos-path
222 (lambda* (#:key inputs #:allow-other-keys)
223 (let ((geos (assoc-ref inputs "geos"))
224 (glibc (assoc-ref inputs ,(if (%current-target-system)
225 "cross-libc" "libc"))))
226 (substitute* "shapely/geos.py"
227 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
228 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
229 geos "/lib/libgeos_c.so'])"))
230 (("free = load_dll\\('c'\\)\\.free")
231 (string-append "free = load_dll('c', fallbacks=['"
232 glibc "/lib/libc.so.6']).free"))))
233 #t)))))
234 (home-page "https://github.com/Toblerity/Shapely")
235 (synopsis "Library for the manipulation and analysis of geometric objects")
236 (description "Shapely is a Python package for manipulation and analysis of
237planar geometric objects. It is based on the @code{GEOS} library.")
238 (license license:bsd-3)))
239
a91f4eba
S
240(define-public python-shortuuid
241 (package
242 (name "python-shortuuid")
243 (version "0.5.0")
244 (source
245 (origin
246 (method url-fetch)
247 (uri (pypi-uri "shortuuid" version))
248 (sha256
249 (base32
250 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
251 (build-system python-build-system)
252 (native-inputs
253 `(("python-pep8" ,python-pep8)))
254 (home-page "https://github.com/skorokithakis/shortuuid")
255 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
256 (description
257 "@code{shortuuid} is a Python library for generating concise, unambiguous
258and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
259module and then similar looking characters are removed.")
260 (license license:bsd-3)))
261
44d10b1f
RW
262(define-public python-logwrap
263 (package
264 (name "python-logwrap")
265 (version "3.2.1")
266 (source
267 (origin
268 (method url-fetch)
269 (uri (pypi-uri "logwrap" version ".zip"))
270 (sha256
271 (base32
272 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
273 (build-system python-build-system)
274 (propagated-inputs
275 `(("python-six" ,python-six)
276 ("python-typing" ,python-typing)))
277 (native-inputs
278 `(("unzip" ,unzip)
279 ("python-cython" ,python-cython)
280 ("python-pytest" ,python-pytest)
281 ("python-pytest-cov" ,python-pytest-cov)
282 ("python-pytest-runner" ,python-pytest-runner)))
283 (home-page "https://github.com/penguinolog/logwrap")
284 (synopsis "Decorator for logging function arguments")
285 (description "This package provides a decorator to log function arguments
286and function call return values in a human-readable way.")
287 (license license:asl2.0)))
288
289(define-public python2-shapely
290 (package-with-python2 python-shapely))
291
292(define-public python-clyent
293 (package
294 (name "python-clyent")
295 (version "1.2.1")
296 (source
297 (origin
298 (method url-fetch)
299 (uri (pypi-uri "clyent" version))
300 (sha256
301 (base32
302 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
303 (build-system python-build-system)
304 (native-inputs
305 `(("python-mock" ,python-mock)))
306 (home-page "https://github.com/binstar/clyent")
307 (synopsis "Command line client library")
308 (description "Clyent is a Python command line utiliy library. It is used
309by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
310 (license license:bsd-3)))
311
312(define-public python2-clyent
313 (package-with-python2 python-clyent))
314
315(define-public python-babel
316 (package
317 (name "python-babel")
318 (version "2.6.0")
319 (source
320 (origin
321 (method url-fetch)
322 (uri (pypi-uri "Babel" version))
323 (sha256
324 (base32
325 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))
326 (build-system python-build-system)
327 (native-inputs
328 `(("python-freezegun" ,python-freezegun)
329 ("python-pytest" ,python-pytest)))
330 (propagated-inputs
331 `(("python-pytz" ,python-pytz)))
332 (arguments
333 `(#:phases (modify-phases %standard-phases
334 (replace 'check
335 (lambda _ (invoke "pytest" "-vv"))))))
336 (home-page "http://babel.pocoo.org/")
337 (synopsis
338 "Tools for internationalizing Python applications")
339 (description
340 "Babel is composed of two major parts:
341- tools to build and work with gettext message catalogs
342- a Python interface to the CLDR (Common Locale Data Repository), providing
343access to various locale display names, localized number and date formatting,
344etc. ")
345 (license license:bsd-3)))
346
347(define-public python2-babel
348 (package-with-python2 python-babel))
349
350(define-public python2-backport-ssl-match-hostname
351 (package
352 (name "python2-backport-ssl-match-hostname")
353 (version "3.5.0.1")
354 (source
355 (origin
356 (method url-fetch)
2c1f0d09 357 (uri (pypi-uri "backports.ssl_match_hostname" version))
44d10b1f
RW
358 (sha256
359 (base32
360 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
361 (build-system python-build-system)
362 (arguments
363 `(#:python ,python-2
364 #:tests? #f)) ; no test target
365 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
366 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
367 (description
368 "This backport brings the ssl.match_hostname() function to users of
369earlier versions of Python. The function checks the hostname in the
370certificate returned by the server to which a connection has been established,
371and verifies that it matches the intended target hostname.")
372 (license license:psfl)))
373
374(define-public python-hdf4
375 (package
376 (name "python-hdf4")
377 (version "0.9")
378 (source
379 (origin
380 (method url-fetch)
381 (uri (pypi-uri name version))
382 (sha256
383 (base32
384 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
385 (build-system python-build-system)
386 (native-inputs `(("nose" ,python-nose)))
387 (propagated-inputs `(("numpy" ,python-numpy)))
388 (inputs
389 `(("hdf4" ,hdf4)
390 ("libjpeg" ,libjpeg)
391 ("zlib" ,zlib)))
392 (arguments
393 `(#:phases
394 (modify-phases %standard-phases
395 (replace 'check
396 (lambda _
397 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
398 ;; on to import numpy. Somehow this works on their CI system.
399 ;; Let's just manage PYTHONPATH here instead.
400 (substitute* "runexamples.sh"
401 (("export PYTHONPATH=.*") ""))
402 (setenv "PYTHONPATH"
403 (string-append (getcwd) ":"
404 (getenv "PYTHONPATH")))
405 (invoke "./runexamples.sh")
406 (invoke "nosetests" "-v"))))))
407 (home-page "https://github.com/fhs/python-hdf4")
408 (synopsis "Python interface to the NCSA HDF4 library")
409 (description
410 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
411which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
412NetCDF files can also be read and modified. Python-HDF4 is a fork of
413@url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
414 (license license:expat)))
415
416(define-public python2-hdf4
417 (package-with-python2 python-hdf4))
418
419(define-public python-h5py
420 (package
421 (name "python-h5py")
422 (version "2.8.0")
423 (source
424 (origin
425 (method url-fetch)
426 (uri (pypi-uri "h5py" version))
427 (sha256
428 (base32
429 "0mdr6wrq02ac93m1aqx9kad0ppfzmm4imlxqgyy1x4l7hmdcc9p6"))))
430 (build-system python-build-system)
431 (arguments
432 `(#:tests? #f ; no test target
433 #:phases
434 (modify-phases %standard-phases
435 (add-after 'unpack 'fix-hdf5-paths
436 (lambda* (#:key inputs #:allow-other-keys)
437 (let ((prefix (assoc-ref inputs "hdf5")))
438 (substitute* "setup_build.py"
439 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
440 (string-append "['" prefix "/lib" "']"))
441 (("'/opt/local/include', '/usr/local/include'")
442 (string-append "'" prefix "/include" "'")))
443 (substitute* "setup_configure.py"
444 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
445 (string-append "['" prefix "/lib" "']")))
446 #t))))))
447 (propagated-inputs
448 `(("python-six" ,python-six)
449 ("python-numpy" ,python-numpy)))
450 (inputs
451 `(("hdf5" ,hdf5)))
452 (native-inputs
453 `(("python-cython" ,python-cython)
454 ("python-pkgconfig" ,python-pkgconfig)))
455 (home-page "http://www.h5py.org/")
456 (synopsis "Read and write HDF5 files from Python")
457 (description
458 "The h5py package provides both a high- and low-level interface to the
459HDF5 library from Python. The low-level interface is intended to be a
460complete wrapping of the HDF5 API, while the high-level component supports
461access to HDF5 files, datasets and groups using established Python and NumPy
462concepts.")
463 (license license:bsd-3)))
464
465(define-public python2-h5py
466 (package-with-python2 python-h5py))
467
8b89dedc
RW
468(define-public python-sh
469 (package
470 (name "python-sh")
471 (version "1.12.14")
472 (source
473 (origin
474 (method url-fetch)
475 (uri (pypi-uri "sh" version))
476 (sha256
477 (base32
478 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
479 (build-system python-build-system)
fd3638d8
EF
480 (arguments
481 '(#:phases
482 (modify-phases %standard-phases
483 (replace 'check
484 (lambda _
ca983a2f
NG
485 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
486 (setenv "HOME" "/tmp")
fd3638d8
EF
487 (invoke "python" "sh.py" "test"))))))
488 (native-inputs
489 `(("python-coverage" ,python-coverage)))
8b89dedc
RW
490 (home-page "https://github.com/amoffat/sh")
491 (synopsis "Python subprocess replacement")
492 (description "This package provides a replacement for Python's
493@code{subprocess} feature.")
494 (license license:expat)))
495
3869effd
RW
496(define-public python2-sh
497 (package-with-python2 python-sh))
498
d362b11d
RW
499(define-public python-cftime
500 (package
501 (name "python-cftime")
502 (version "1.0.3.4")
503 (source
504 (origin
505 (method url-fetch)
506 (uri (pypi-uri "cftime" version))
507 (sha256
508 (base32
509 "0362dhxbzk593walyjz30dll6y2y79wialik647cbwdsf3ad0x6x"))))
510 (build-system python-build-system)
511 (propagated-inputs
512 `(("python-numpy" ,python-numpy)))
513 (native-inputs
514 `(("python-coveralls" ,python-coveralls)
515 ("python-cython" ,python-cython)
516 ("python-pytest-cov" ,python-pytest-cov)))
517 (home-page "https://github.com/Unidata/cftime")
518 (synopsis "Library for time handling")
519 (description
520 "This package provides time-handling functionality that used to be part
521of the netcdf4 package before.")
522 ;; This package claims to include code under the GPLv3 but is released
523 ;; under ISC.
524 (license (list license:isc license:gpl3+))))
525
44d10b1f
RW
526(define-public python-netcdf4
527 (package
528 (name "python-netcdf4")
93e7b209 529 (version "1.4.2")
44d10b1f
RW
530 (source
531 (origin
532 (method url-fetch)
533 (uri (pypi-uri "netCDF4" version))
534 (sha256
535 (base32
93e7b209 536 "0c0sklgrmv15ygliin8qq0hp7vanmbi74m6zpi0r1ksr0hssyd5r"))))
44d10b1f 537 (build-system python-build-system)
93e7b209
RW
538 (arguments
539 '(#:phases
540 (modify-phases %standard-phases
541 (add-after 'unpack 'configure-locations
542 (lambda* (#:key inputs #:allow-other-keys)
543 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
544 #t)))))
44d10b1f
RW
545 (native-inputs
546 `(("python-cython" ,python-cython)))
547 (propagated-inputs
93e7b209
RW
548 `(("python-numpy" ,python-numpy)
549 ("python-cftime" ,python-cftime)))
44d10b1f
RW
550 (inputs
551 `(("netcdf" ,netcdf)
552 ("hdf4" ,hdf4)
553 ("hdf5" ,hdf5)))
93e7b209 554 (home-page "https://github.com/Unidata/netcdf4-python")
44d10b1f
RW
555 (synopsis "Python/numpy interface to the netCDF library")
556 (description "Netcdf4-python is a Python interface to the netCDF C
557library. netCDF version 4 has many features not found in earlier
558versions of the library and is implemented on top of HDF5. This module
559can read and write files in both the new netCDF 4 and the old netCDF 3
560format, and can create files that are readable by HDF5 clients. The
561API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
562to users of that module.")
563 ;; The software is mainly ISC, but includes some files covered
564 ;; by the Expat license.
565 (license (list license:isc license:expat))))
566
567(define-public python2-netcdf4
568 (package-with-python2 python-netcdf4))
569
570(define-public python-lockfile
571 (package
572 (name "python-lockfile")
573 (version "0.12.2")
574 (source
575 (origin
576 (method url-fetch)
8318bf07 577 (uri (pypi-uri "lockfile" version))
44d10b1f
RW
578 (sha256
579 (base32
580 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
581 (build-system python-build-system)
582 (arguments '(#:test-target "check"))
583 (native-inputs
584 `(("python-pbr" ,python-pbr)))
585 (home-page "https://launchpad.net/pylockfile")
586 (synopsis "Platform-independent file locking module")
587 (description
588 "The lockfile package exports a LockFile class which provides a simple
589API for locking files.")
590 (license license:expat)))
591
592(define-public python2-lockfile
593 (package-with-python2 python-lockfile))
594
595(define-public python-semantic-version
596 (package
597 (name "python-semantic-version")
598 (version "2.6.0")
599 (source
600 (origin
601 (method url-fetch)
602 (uri (pypi-uri "semantic_version" version))
603 (sha256
604 (base32
605 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
606 (build-system python-build-system)
607 (arguments
608 `(#:tests? #f)) ; PyPI tarball lacks tests
609 (home-page "https://github.com/rbarrois/python-semanticversion")
610 (synopsis "Semantic versioning module for Python")
611 (description
612 "The @code{semantic_version} class is a small library for handling
613@uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
614
615It can compare versions, generate a new version that represents a bump in one of
616the version levels, and check whether any given string is a proper semantic
617version identifier.")
618 (license license:bsd-3)))
619
620(define-public python2-semantic-version
621 (package-with-python2 python-semantic-version))
622
623(define-public python-serpent
624 (package
625 (name "python-serpent")
fa9d14ac 626 (version "1.28")
44d10b1f
RW
627 (source
628 (origin
629 (method url-fetch)
630 (uri (pypi-uri "serpent" version))
631 (sha256
fa9d14ac 632 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
44d10b1f 633 (build-system python-build-system)
fa9d14ac
TGR
634 (native-inputs
635 `(("python-attrs" ,python-attrs)
636 ("python-pytz" ,python-pytz)))
44d10b1f
RW
637 (home-page "https://github.com/irmen/Serpent")
638 (synopsis "Serializer for literal Python expressions")
639 (description
1d3c7803
TGR
640 "Serpent provides @code{ast.literal_eval()}-compatible object tree
641serialization. It serializes an object tree into bytes (an utf-8 encoded
642string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
643to rebuild the original object tree.
644
645Because only safe literals are encoded, it is safe to send serpent data to
646other machines, such as over the network.")
44d10b1f
RW
647 (license license:expat)))
648
649(define-public python-setuptools
650 (package
651 (name "python-setuptools")
e39d4933 652 (version "41.0.1")
44d10b1f
RW
653 (source
654 (origin
655 (method url-fetch)
656 (uri (pypi-uri "setuptools" version ".zip"))
657 (sha256
658 (base32
e39d4933 659 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
44d10b1f
RW
660 (modules '((guix build utils)))
661 (snippet
662 '(begin
663 ;; Remove included binaries which are used to build self-extracting
664 ;; installers for Windows.
665 ;; TODO: Find some way to build them ourself so we can include them.
666 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
667 #t))))
668 (build-system python-build-system)
669 ;; FIXME: Tests require pytest, which itself relies on setuptools.
670 ;; One could bootstrap with an internal untested setuptools.
671 (arguments
672 `(#:tests? #f))
673 (home-page "https://pypi.python.org/pypi/setuptools")
674 (synopsis
675 "Library designed to facilitate packaging Python projects")
676 (description
677 "Setuptools is a fully-featured, stable library designed to facilitate
678packaging Python projects, where packaging includes:
679Python package and module definitions,
680distribution package metadata,
681test hooks,
682project installation,
683platform-specific details,
684Python 3 support.")
685 ;; TODO: setuptools now bundles the following libraries:
686 ;; packaging, pyparsing, six and appdirs. How to unbundle?
687 (license (list license:psfl ; setuptools itself
688 license:expat ; six, appdirs, pyparsing
689 license:asl2.0 ; packaging is dual ASL2/BSD-2
690 license:bsd-2))))
691
692(define-public python2-setuptools
693 (package-with-python2 python-setuptools))
694
695(define-public python-uniseg
696 (package
697 (name "python-uniseg")
698 (version "0.7.1")
699 (source
700 (origin
701 (method url-fetch)
702 (uri (pypi-uri "uniseg" version ".zip"))
703 (sha256
704 (base32
705 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
706 (build-system python-build-system)
707 (arguments
708 '(#:tests? #f)) ; The test suite requires network access.
709 (native-inputs
710 `(("unzip" ,unzip)))
711 (home-page
712 "https://bitbucket.org/emptypage/uniseg-python")
713 (synopsis
714 "Python library to determine Unicode text segmentations")
715 (description
716 "Uniseg is a Python package used to determine Unicode text segmentations.
717Supported segmentations include:
718@enumerate
719@item @dfn{Code point} (any value in the Unicode codespace)
720@item @dfn{Grapheme cluster} (user-perceived character made of a single or
721multiple Unicode code points, e.g. \"G\" + acute-accent)
722@item Word break
723@item Sentence break
724@item Line break
725@end enumerate")
726 (license license:expat)))
727
728(define-public python2-uniseg
729 (package-with-python2 python-uniseg))
730
731(define-public python-humanfriendly
732 (package
733 (name "python-humanfriendly")
734 (version "4.4.1")
735 (source
736 (origin
737 (method url-fetch)
738 (uri (pypi-uri "humanfriendly" version))
739 (sha256
740 (base32
741 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
742 (build-system python-build-system)
743 (arguments
744 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
745 #:tests? #f))
746 (propagated-inputs
747 `(("python-monotonic" ,python-monotonic)))
748 (home-page "https://humanfriendly.readthedocs.io")
749 (synopsis "Human-friendly input and output in Python")
750 (description
751 "The functions and classes in @code{humanfriendly} can be used to make
752text interfaces more user-friendly. It includes tools to parse and format
753numbers, file sizes, and timespans, timers for long-running operations, menus
754to allow the user to choose from a list of options, and terminal interaction
755helpers.")
756 (license license:expat)))
757
758(define-public python2-humanfriendly
759 (package-with-python2 python-humanfriendly))
760
761(define-public python-capturer
762 (package
763 (name "python-capturer")
764 (version "2.4")
765 (source
766 (origin
767 (method url-fetch)
768 (uri (pypi-uri "capturer" version))
769 (sha256
770 (base32
771 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
772 (build-system python-build-system)
773 (arguments
774 `(#:tests? #f))
775 (propagated-inputs
776 `(("python-humanfriendly" ,python-humanfriendly)))
777 (home-page "https://capturer.readthedocs.io")
778 (synopsis "Capture stdout and stderr streams of the current process")
779 (description
780 "The capturer package makes it easy to capture the stdout and stderr
781streams of the current process and subprocesses. Output can be relayed
782to the terminal in real time but is also available to the Python program
783for additional processing.")
784 (license license:expat)))
785
786(define-public python2-capturer
787 (package-with-python2 python-capturer))
788
789(define-public python-case
790 (package
791 (name "python-case")
792 (version "1.5.3")
793 (source
794 (origin
795 (method url-fetch)
796 (uri (pypi-uri "case" version))
797 (sha256
798 (base32
799 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
800 (build-system python-build-system)
801 (propagated-inputs
802 `(("python-mock" ,python-mock)
803 ("python-nose" ,python-nose)
804 ("python-six" ,python-six)
805 ("python-unittest2" ,python-unittest2)))
806 (native-inputs
807 `(("python-coverage" ,python-coverage)))
808 (home-page "https://github.com/celery/case")
809 (synopsis "Unittest utilities and convenience methods")
810 (description
811 "The @code{case} package provides utilities on top of unittest, including
812some helpful Python 2 compatibility convenience methods.")
813 (license license:bsd-3)))
814
815(define-public python-verboselogs
816 (package
817 (name "python-verboselogs")
818 (version "1.7")
819 (source
820 (origin
821 (method url-fetch)
822 (uri (pypi-uri "verboselogs" version))
823 (sha256
824 (base32
825 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
826 (build-system python-build-system)
827 (native-inputs
828 `(("python-mock" ,python-mock)
829 ("python-astroid" ,python-astroid)
830 ("python-pylint" ,python-pylint)))
831 (home-page "https://verboselogs.readthedocs.io")
832 (synopsis "Verbose logging level for Python's logging module")
833 (description
834 "The @code{verboselogs} package extends Python's @code{logging} module to
835add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
836 (license license:expat)))
837
838(define-public python2-verboselogs
839 (package-with-python2 python-verboselogs))
840
841(define-public python-coloredlogs
842 (package
843 (name "python-coloredlogs")
844 (version "7.3")
845 (source
846 (origin
847 (method url-fetch)
848 (uri (pypi-uri "coloredlogs" version))
849 (sha256
850 (base32
851 "1blcann6dyg5dhps9pg12rn0q0rjrlajpmmil0gy0j4cbvnl2il9"))))
852 (build-system python-build-system)
853 (arguments
854 `(;Tests require some updated modules
855 #:tests? #f))
856 (propagated-inputs
857 `(("python-capturer" ,python-capturer)))
858 (home-page "https://coloredlogs.readthedocs.io")
859 (synopsis "Colored stream handler for Python's logging module")
860 (description
861 "The @code{coloredlogs} package enables colored terminal output for
862Python's logging module. The @code{ColoredFormatter} class inherits from
863@code{logging.Formatter} and uses ANSI escape sequences to render your logging
864messages in color.")
865 (license license:expat)))
866
867(define-public python2-coloredlogs
868 (package-with-python2 python-coloredlogs))
869
4caf37b0
MC
870(define-public python-et-xmlfile
871 (package
872 (name "python-et-xmlfile")
873 (version "1.0.1")
874 (source
875 (origin
876 (method url-fetch)
877 (uri (pypi-uri "et_xmlfile" version))
878 (sha256
879 (base32
880 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
881 (build-system python-build-system)
882 (arguments
883 `(#:phases (modify-phases %standard-phases
884 (replace 'check
885 (lambda _
886 (invoke "pytest"))))))
887 (native-inputs
888 `(("python-pytest" ,python-pytest)
889 ("python-lxml" ,python-lxml))) ;used for the tests
890 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
891 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
892 (description "This Python library is based upon the @code{xmlfile} module
893from @code{lxml}. It aims to provide a low memory, compatible implementation
894of @code{xmlfile}.")
895 (license license:expat)))
896
897(define-public python2-et-xmlfile
898 (package-with-python2 python-et-xmlfile))
899
a042d348
MC
900(define-public python-openpyxl
901 (package
902 (name "python-openpyxl")
441e6d93 903 (version "2.6.2")
a042d348
MC
904 (source
905 (origin
906 ;; We use the upstream repository, as the tests are not included in the
907 ;; PyPI releases.
908 (method hg-fetch)
909 (uri (hg-reference
910 (url "https://bitbucket.org/openpyxl/openpyxl")
911 (changeset version)))
912 (file-name (string-append name "-" version "-checkout"))
913 (sha256
441e6d93 914 (base32 "1qhij6kcvdxqjy4g6193nsv4q7fy8n4fwyd3c2z047idlm6s3j4w"))))
a042d348
MC
915 (build-system python-build-system)
916 (arguments
917 `(#:phases (modify-phases %standard-phases
918 (replace 'check
919 (lambda _
920 (invoke "pytest"))))))
921 (native-inputs
922 ;; For the test suite.
923 `(("python-lxml" ,python-lxml)
924 ("python-pillow" ,python-pillow)
925 ("python-pytest" ,python-pytest)))
926 (propagated-inputs
927 `(("python-et-xmlfile" ,python-et-xmlfile)
928 ("python-jdcal" ,python-jdcal)))
929 (home-page "https://openpyxl.readthedocs.io")
930 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
931 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
932XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
933standard.")
934 (license license:expat)))
935
44d10b1f
RW
936(define-public python-eventlet
937 (package
938 (name "python-eventlet")
939 (version "0.20.1")
940 (source
941 (origin
942 (method url-fetch)
943 (uri (pypi-uri "eventlet" version))
944 (sha256
945 (base32
946 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
947 (build-system python-build-system)
948 (propagated-inputs
949 `(("python-greenlet" ,python-greenlet)))
950 (arguments
951 ;; TODO: Requires unpackaged 'enum-compat'.
952 '(#:tests? #f))
953 (home-page "http://eventlet.net")
954 (synopsis "Concurrent networking library for Python")
955 (description
956 "Eventlet is a concurrent networking library for Python that
957allows you to change how you run your code, not how you write it.
958It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
959Coroutines ensure that the developer uses a blocking style of programming
960that is similar to threading, but provide the benefits of non-blocking I/O.
961The event dispatch is implicit, which means you can easily use @code{Eventlet}
962from the Python interpreter, or as a small part of a larger application.")
963 (license license:expat)))
964
965(define-public python2-eventlet
966 (let ((base (package-with-python2
967 (strip-python2-variant python-eventlet))))
968 (package (inherit base)
969 (propagated-inputs
970 `(("python2-enum34" ,python2-enum34)
971 ,@(package-propagated-inputs base))))))
972
973(define-public python-six
974 (package
975 (name "python-six")
976 (version "1.11.0")
977 (source
978 (origin
979 (method url-fetch)
980 (uri (pypi-uri "six" version))
981 (sha256
982 (base32
983 "1scqzwc51c875z23phj48gircqjgnn3af8zy2izjwmnlxrxsgs3h"))))
984 (build-system python-build-system)
985 (arguments
986 `(#:phases
987 (modify-phases %standard-phases
988 (replace 'check
989 (lambda _
990 (invoke "py.test" "-v"))))))
991 (native-inputs
992 `(("python-py" ,python-py)
993 ("python-pytest" ,python-pytest-bootstrap)))
994 (home-page "https://pypi.python.org/pypi/six/")
995 (synopsis "Python 2 and 3 compatibility utilities")
996 (description
997 "Six is a Python 2 and 3 compatibility library. It provides utility
998functions for smoothing over the differences between the Python versions with
999the goal of writing Python code that is compatible on both Python versions.
1000Six supports every Python version since 2.5. It is contained in only one
1001Python file, so it can be easily copied into your project.")
1002 (license license:x11)))
1003
1004(define-public python2-six
1005 (package-with-python2 python-six))
1006
1007(define-public python-six-bootstrap
1008 (package
1009 (inherit python-six)
1010 (name "python-six-bootstrap")
1011 (native-inputs `())
1012 (arguments `(#:tests? #f))))
1013
1014(define-public python2-six-bootstrap
1015 (package-with-python2 python-six-bootstrap))
1016
1017(define-public python-schedule
1018 (package
1019 (name "python-schedule")
1020 (version "0.4.3")
1021 (source
1022 (origin
1023 (method url-fetch)
1024 (uri (pypi-uri "schedule" version))
1025 (sha256
1026 (base32
1027 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1028 (build-system python-build-system)
1029 (native-inputs
1030 `(("python-pytest" ,python-pytest)
1031 ("python-mock" ,python-mock)))
1032 (home-page "https://github.com/dbader/schedule")
1033 (synopsis "Schedule periodic function calls in Python")
1034 (description
1035 "Schedule is an in-process scheduler for periodic jobs that uses the
1036builder pattern for configuration. Schedule lets you run Python functions (or
1037any other callable) periodically at pre-determined intervals using a simple,
1038human-friendly syntax.")
1039 (license license:expat)))
1040
1041(define-public python2-schedule
1042 (package-with-python2 python-schedule))
1043
1044(define-public python-pandas
1045 (package
1046 (name "python-pandas")
c0d43f62 1047 (version "0.24.2")
44d10b1f
RW
1048 (source
1049 (origin
1050 (method url-fetch)
1051 (uri (pypi-uri "pandas" version))
1052 (sha256
c0d43f62 1053 (base32 "18imlm8xbhcbwy4wa957a1fkamrcb0z988z006jpfda3ki09z4ag"))))
44d10b1f
RW
1054 (build-system python-build-system)
1055 (arguments
1056 `(#:modules ((guix build utils)
1057 (guix build python-build-system)
1058 (ice-9 ftw)
1059 (srfi srfi-26))
1060 #:phases (modify-phases %standard-phases
c0d43f62
MC
1061 (add-after 'unpack 'patch-which
1062 (lambda* (#:key inputs #:allow-other-keys)
1063 (let ((which (assoc-ref inputs "which")))
1064 (substitute* "pandas/io/clipboard/__init__.py"
1065 (("^CHECK_CMD = .*")
1066 (string-append "CHECK_CMD = \"" which "\"\n"))))
1067 #t))
44d10b1f
RW
1068 (replace 'check
1069 (lambda _
1070 (let ((build-directory
1071 (string-append
1072 (getcwd) "/build/"
1073 (car (scandir "build"
1074 (cut string-prefix? "lib." <>))))))
1075 ;; Disable the "strict data files" option which causes
c0d43f62
MC
1076 ;; the build to error out if required data files are
1077 ;; not available (as is the case with PyPI archives).
44d10b1f
RW
1078 (substitute* "setup.cfg"
1079 (("addopts = --strict-data-files") "addopts = "))
1080 (with-directory-excursion build-directory
c0d43f62
MC
1081 ;; Delete tests that require "moto" which is not yet
1082 ;; in Guix.
44d10b1f
RW
1083 (for-each delete-file
1084 '("pandas/tests/io/conftest.py"
1085 "pandas/tests/io/json/test_compression.py"
1086 "pandas/tests/io/parser/test_network.py"
44d10b1f
RW
1087 "pandas/tests/io/test_parquet.py"))
1088 (invoke "pytest" "-vv" "pandas" "--skip-slow"
1089 "--skip-network" "-k"
1090 ;; XXX: Due to the deleted tests above.
1091 "not test_read_s3_jsonl"))))))))
1092 (propagated-inputs
1093 `(("python-numpy" ,python-numpy)
667c6ef5 1094 ("python-openpyxl" ,python-openpyxl)
44d10b1f 1095 ("python-pytz" ,python-pytz)
667c6ef5
MC
1096 ("python-dateutil" ,python-dateutil)
1097 ("python-xlrd" ,python-xlrd)))
c0d43f62
MC
1098 (inputs
1099 `(("which" ,which)))
44d10b1f
RW
1100 (native-inputs
1101 `(("python-cython" ,python-cython)
1102 ("python-beautifulsoup4" ,python-beautifulsoup4)
1103 ("python-lxml" ,python-lxml)
1104 ("python-html5lib" ,python-html5lib)
1105 ("python-nose" ,python-nose)
c0d43f62
MC
1106 ("python-pytest" ,python-pytest)
1107 ("python-pytest-mock" ,python-pytest-mock)))
44d10b1f
RW
1108 (home-page "https://pandas.pydata.org")
1109 (synopsis "Data structures for data analysis, time series, and statistics")
1110 (description
1111 "Pandas is a Python package providing fast, flexible, and expressive data
1112structures designed to make working with structured (tabular,
1113multidimensional, potentially heterogeneous) and time series data both easy
1114and intuitive. It aims to be the fundamental high-level building block for
1115doing practical, real world data analysis in Python.")
1116 (license license:bsd-3)))
1117
1118(define-public python2-pandas
1119 (package-with-python2 python-pandas))
1120
1121(define-public python2-mechanize
1122 (package
1123 (name "python2-mechanize")
1124 (version "0.2.5")
1125 (source
1126 (origin
1127 (method url-fetch)
1cc184e6 1128 (uri (pypi-uri "mechanize" version))
44d10b1f
RW
1129 (sha256
1130 (base32
1131 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1132 (build-system python-build-system)
1133 (arguments
1134 `(#:python ,python-2 ; apparently incompatible with Python 3
1135 #:tests? #f))
1136 ;; test fails with message
1137 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1138 ;; (python-3.3.2) or
1139 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1140 ;; (python-2.7.5).
1141 ;; The source code is from March 2011 and probably not up-to-date
1142 ;; with respect to python unit tests.
1143 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1144 (synopsis
1145 "Stateful programmatic web browsing in Python")
1146 (description
1147 "Mechanize implements stateful programmatic web browsing in Python,
1148after Andy Lester’s Perl module WWW::Mechanize.")
1149 (license (license:non-copyleft
1150 "file://COPYING"
1151 "See COPYING in the distribution."))))
1152
1153
1154(define-public python-simplejson
1155 (package
1156 (name "python-simplejson")
1157 (version "3.14.0")
1158 (source
1159 (origin
1160 (method url-fetch)
1161 (uri (pypi-uri "simplejson" version))
1162 (sha256
1163 (base32
1164 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1165 (build-system python-build-system)
1166 (home-page "http://simplejson.readthedocs.org/en/latest/")
1167 (synopsis
1168 "Json library for Python")
1169 (description
1170 "JSON (JavaScript Object Notation) is a subset of JavaScript
1171syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1172format.
1173
1174Simplejson exposes an API familiar to users of the standard library marshal
1175and pickle modules. It is the externally maintained version of the json
1176library contained in Python 2.6, but maintains compatibility with Python 2.5
1177and (currently) has significant performance advantages, even without using
1178the optional C extension for speedups. Simplejson is also supported on
1179Python 3.3+.")
1180 (license license:x11)))
1181
1182(define-public python2-simplejson
1183 (package-with-python2 python-simplejson))
1184
1185
1186(define-public python-pyicu
1187 (package
1188 (name "python-pyicu")
1189 (version "2.2")
1190 (source
1191 (origin
1192 (method url-fetch)
1193 (uri (pypi-uri "PyICU" version))
1194 (sha256
1195 (base32
1196 "0wq9y5fi1ighgf5aws9nr87vi1w44p7q1k83rx2y3qj5d2xyhspa"))))
1197 (build-system python-build-system)
1198 (inputs
1199 `(("icu4c" ,icu4c)))
1200 (native-inputs
1201 `(("python-pytest" ,python-pytest)
1202 ("python-six" ,python-six)))
1203 (home-page "https://github.com/ovalhub/pyicu")
1204 (synopsis "Python extension wrapping the ICU C++ API")
1205 (description
1206 "PyICU is a python extension wrapping the ICU C++ API.")
1207 (properties `((python2-variant . ,(delay python2-pyicu))))
1208 (license license:x11)))
1209
1210(define-public python2-pyicu
1211 (let ((base (package-with-python2
1212 (strip-python2-variant python-pyicu))))
1213 (package
1214 (inherit base)
1215 (arguments
1216 `(,@(package-arguments base)
1217 #:phases
1218 (modify-phases %standard-phases
1219 (add-before 'check 'delete-failing-test
1220 (λ _
1221 ;; XXX: This fails due to Unicode issues unique to Python 2,
1222 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1223 (delete-file "test/test_Script.py")
1224 #t))))))))
1225
1226(define-public python2-dogtail
1227 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1228 ;; spaces in indentation" with Python 3.
1229 (package
1230 (name "python2-dogtail")
1231 (version "0.9.9")
1232 (source (origin
1233 (method url-fetch)
1234 (uri (pypi-uri "dogtail" version))
1235 (sha256
1236 (base32
1237 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1238 (build-system python-build-system)
1239 (arguments `(#:python ,python-2
1240 #:tests? #f)) ; invalid command "test"
1241 ;; Currently no offical homepage.
1242 (home-page "https://pypi.python.org/pypi/dogtail/")
1243 (synopsis "GUI test tool and automation framework written in Python")
1244 (description
1245 "Dogtail is a GUI test tool and automation framework written in Python.
1246It uses Accessibility (a11y) technologies to communicate with desktop
1247applications. dogtail scripts are written in Python and executed like any
1248other Python program.")
1249 (license license:gpl2+)))
1250
1251(define-public python-empy
1252 (package
1253 (name "python-empy")
0f6d5115 1254 (version "3.3.3")
44d10b1f
RW
1255 (source (origin
1256 (method url-fetch)
1257 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1258 version ".tar.gz"))
1259 (sha256
1260 (base32
0f6d5115 1261 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
44d10b1f
RW
1262 (build-system python-build-system)
1263 (arguments
0f6d5115 1264 `(#:tests? #f)) ; python2 only
44d10b1f
RW
1265 (home-page "http://www.alcyone.com/software/empy/")
1266 (synopsis "Templating system for Python")
1267 (description
1268 "EmPy is a system for embedding Python expressions and statements in
1269template text; it takes an EmPy source file, processes it, and produces
1270output. This is accomplished via expansions, which are special signals to the
1271EmPy system and are set off by a special prefix (by default the at sign, @@).
1272EmPy can expand arbitrary Python expressions and statements in this way, as
1273well as a variety of special forms. Textual data not explicitly delimited in
1274this way is sent unaffected to the output, allowing Python to be used in
1275effect as a markup language. Also supported are callbacks via hooks,
1276recording and playback via diversions, and dynamic, chainable filters. The
1277system is highly configurable via command line options and embedded
1278commands.")
1279 (license license:lgpl2.1+)))
1280
1281(define-public python2-empy
0f064242
TGR
1282 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
1283 (package
1284 (inherit base)
1285 (arguments `(,@(package-arguments base)
1286 #:tests? #t)))))
44d10b1f
RW
1287
1288(define-public python2-element-tree
1289 (package
1290 (name "python2-element-tree")
1291 (version "1.2.6")
1292 (source (origin
1293 (method url-fetch)
1294 (uri (string-append
1295 "http://effbot.org/media/downloads/elementtree-"
1296 version "-20050316.tar.gz"))
1297 (sha256
1298 (base32
1299 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1300 (build-system python-build-system)
1301 (arguments
1302 `(#:python ,python-2 ; seems to be part of Python 3
1303 #:tests? #f)) ; no 'test' sub-command
1304 (synopsis "Toolkit for XML processing in Python")
1305 (description
1306 "ElementTree is a Python library supporting lightweight XML processing.")
1307 (home-page "http://effbot.org/zone/element-index.htm")
1308 (license (license:x11-style
1309 "http://docs.python.org/2/license.html"
1310 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1311
1312(define-public python2-pybugz
1313 (package
1314 (name "python2-pybugz")
1315 (version "0.6.11")
1316 (source (origin
1317 (method url-fetch)
1318 (uri (string-append
1319 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1320 version ".tar.gz"))
1321 (sha256
1322 (base32
1323 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1324 (patches (search-patches "pybugz-stty.patch"
1325 "pybugz-encode-error.patch"))))
1326 (build-system python-build-system)
1327 (arguments
1328 `(#:python ,python-2 ; SyntaxError with Python 3
1329 #:tests? #f)) ; no 'test' sub-command
1330 (propagated-inputs
1331 `(("element-tree" ,python2-element-tree)))
1332 (synopsis "Python and command-line interface to Bugzilla")
1333 (description
1334 "PyBugz is a Python library and command-line tool to query the Bugzilla
1335bug tracking system. It is meant as an aid to speed up interaction with the
1336bug tracker.")
1337 (home-page "http://www.liquidx.net/pybugz/")
1338 (license license:gpl2)))
1339
1340(define-public python2-enum
1341 (package
1342 (name "python2-enum")
1343 (version "0.4.6")
1344 (source (origin
1345 (method url-fetch)
1346 (uri (pypi-uri "enum" version))
1347 (sha256
1348 (base32
1349 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1350 (build-system python-build-system)
1351 (arguments
1352 `(#:python ,python-2))
1353 (home-page "http://pypi.python.org/pypi/enum/")
1354 (synopsis "Robust enumerated type support in Python")
1355 (description
1356 "This provides a module for robust enumerations in Python. It has
1357been superseded by the Python standard library and is provided only for
1358compatibility.")
1359 ;; Choice of either license.
1360 (license (list license:gpl3+ license:psfl))))
1361
1362(define-public python-enum34
1363 (package
1364 (name "python-enum34")
1365 (version "1.1.6")
1366 (source
1367 (origin
1368 (method url-fetch)
1369 (uri (pypi-uri "enum34" version))
1370 (sha256
1371 (base32
1372 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1373 (build-system python-build-system)
1374 (home-page "https://pypi.python.org/pypi/enum34")
1375 (synopsis "Backported Python 3.4 Enum")
1376 (description
1377 "Enum34 is the new Python stdlib enum module available in Python 3.4
1378backported for previous versions of Python from 2.4 to 3.3.")
1379 (license license:bsd-3)))
1380
1381(define-public python2-enum34
1382 (package-with-python2 python-enum34))
1383
1384(define-public python-parse-type
1385 (package
1386 (name "python-parse-type")
1387 (version "0.4.2")
1388 (source
1389 (origin
1390 (method url-fetch)
1391 (uri (pypi-uri "parse_type" version))
1392 (sha256
1393 (base32
1394 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1395 (build-system python-build-system)
1396 (propagated-inputs
1397 `(("python-six" ,python-six)
1398 ("python-parse" ,python-parse)))
1399 (native-inputs
1400 `(("python-pytest" ,python-pytest)
1401 ("python-pytest-runner" ,python-pytest-runner)))
1402 (home-page "https://github.com/jenisys/parse_type")
1403 (synopsis "Extended parse module")
1404 (description
1405 "Parse_type extends the python parse module.")
1406 (properties
1407 `((python2-variant . ,(delay python2-parse-type))))
1408 (license license:bsd-3)))
1409
1410(define-public python2-parse-type
1411 (let ((base (package-with-python2
1412 (strip-python2-variant python-parse-type))))
1413 (package (inherit base)
1414 (propagated-inputs
1415 `(("python2-enum34" ,python2-enum34)
1416 ,@(package-propagated-inputs base))))))
1417
1418(define-public python-parse
1419 (package
1420 (name "python-parse")
1421 (version "1.8.4")
1422 (source
1423 (origin
1424 (method url-fetch)
1425 (uri (pypi-uri "parse" version))
1426 (sha256
1427 (base32
1428 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
1429 (build-system python-build-system)
1430 (arguments
1431 `(#:phases
1432 (modify-phases %standard-phases
1433 (replace 'check
1434 (lambda _ (invoke "python" "test_parse.py"))))))
1435 (home-page "https://github.com/r1chardj0n3s/parse")
1436 (synopsis "Parse strings")
1437 (description
1438 "Parse strings using a specification based on the Python @code{format()}
1439syntax.")
1440 (license license:x11)))
1441
1442(define-public python-polib
1443 (package
1444 (name "python-polib")
1445 (version "1.0.8")
1446 (source (origin
1447 (method url-fetch)
1448 (uri (pypi-uri "polib" version))
1449 (sha256
1450 (base32
1451 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1452 (build-system python-build-system)
1453 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1454 (synopsis "Manipulate, create and modify gettext files")
1455 (description "Polib can manipulate any gettext format (po, pot and mo)
1456files. It can be used to create po files from scratch or to modify
1457existing ones.")
1458 (license license:expat)))
1459
1460(define-public python2-polib
1461 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1462 (package
1463 (inherit base)
1464 (arguments `(,@(package-arguments base)
1465 ;; Tests don't work with python2.
1466 #:tests? #f)))))
1467
1468(define-public scons
1469 (package
1470 (name "scons")
05487ed8 1471 (version "3.0.4")
44d10b1f 1472 (source (origin
ad34338d
RW
1473 (method git-fetch)
1474 (uri (git-reference
1475 (url "https://github.com/SCons/scons.git")
1476 (commit version)))
1477 (file-name (git-file-name name version))
44d10b1f
RW
1478 (sha256
1479 (base32
05487ed8 1480 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
44d10b1f
RW
1481 (build-system python-build-system)
1482 (arguments
1483 `(#:use-setuptools? #f ; still relies on distutils
ad34338d
RW
1484 #:tests? #f ; no 'python setup.py test' command
1485 #:phases
1486 (modify-phases %standard-phases
1487 (add-before 'build 'bootstrap
1488 (lambda _
1489 (substitute* "src/engine/SCons/compat/__init__.py"
1490 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
1491 "sys.modules[new] = __import__(old)"))
05487ed8
RW
1492 (substitute* "src/engine/SCons/Platform/__init__.py"
1493 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
1494 "mod = __import__(full_name)"))
ad34338d
RW
1495 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
1496 (chdir "build/scons")
1497 #t)))))
44d10b1f
RW
1498 (home-page "http://scons.org/")
1499 (synopsis "Software construction tool written in Python")
1500 (description
1501 "SCons is a software construction tool. Think of SCons as an improved,
1502cross-platform substitute for the classic Make utility with integrated
1503functionality similar to autoconf/automake and compiler caches such as ccache.
1504In short, SCons is an easier, more reliable and faster way to build
1505software.")
1506 (license license:x11)))
1507
1508(define-public scons-python2
1509 (package
1510 (inherit (package-with-python2 scons))
1511 (name "scons-python2")))
1512
1513(define-public python-extras
1514 (package
1515 (name "python-extras")
1516 (version "1.0.0")
1517 (source
1518 (origin
1519 (method url-fetch)
1520 (uri (pypi-uri "extras" version))
1521 (sha256
1522 (base32
1523 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1524 (build-system python-build-system)
1525 (arguments
1526 ;; FIXME: Circular dependency on testtools.
1527 '(#:tests? #f))
1528 (home-page "https://github.com/testing-cabal/extras")
1529 (synopsis "Useful extensions to the Python standard library")
1530 (description
1531 "Extras is a set of extensions to the Python standard library.")
1532 (license license:expat)))
1533
1534(define-public python2-extras
1535 (package-with-python2 python-extras))
1536
1537(define-public python-mimeparse
1538 (package
1539 (name "python-mimeparse")
1540 (version "1.6.0")
1541 (source
1542 (origin
1543 (method url-fetch)
89bf667c 1544 (uri (pypi-uri "python-mimeparse" version))
44d10b1f
RW
1545 (sha256
1546 (base32
1547 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
1548 (build-system python-build-system)
1549 (arguments
1550 '(#:phases
1551 (modify-phases %standard-phases
1552 (replace 'check
1553 (lambda _
1554 (invoke "./mimeparse_test.py"))))))
1555 (home-page
1556 "https://github.com/dbtsai/python-mimeparse")
1557 (synopsis "Python library for parsing MIME types")
1558 (description
1559 "Mimeparse provides basic functions for parsing MIME type names and
1560matching them against a list of media-ranges.")
1561 (license license:expat)))
1562
1563(define-public python2-mimeparse
1564 (package-with-python2 python-mimeparse))
1565
1566(define-public python-miniboa
1567 (package
1568 (name "python-miniboa")
1569 (version "1.0.7")
1570 (source
1571 (origin
1572 (method url-fetch)
1573 (uri (pypi-uri "miniboa" version))
1574 (sha256
1575 (base32
1576 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
1577 (build-system python-build-system)
1578 (home-page "https://github.com/shmup/miniboa")
1579 (synopsis "Simple, single-threaded Telnet server")
1580 (description
1581 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
1582server.")
1583 (license license:asl2.0)))
1584
1585(define-public python2-miniboa
1586 (package-with-python2 python-miniboa))
1587
1588(define-public python-pafy
1589 (package
1590 (name "python-pafy")
1591 (version "0.5.3.1")
1592 (source
1593 (origin
1594 (method url-fetch)
1595 (uri (pypi-uri "pafy" version))
1596 (sha256
1597 (base32
1598 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1599 (build-system python-build-system)
1600 (arguments
1601 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1602 (propagated-inputs
1603 ;; Youtube-dl is a python package which is imported in the file
1604 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1605 `(("youtube-dl" ,youtube-dl)))
1606 (home-page "https://np1.github.io/pafy/")
1607 (synopsis "Retrieve YouTube content and metadata")
1608 (description
1609 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1610 (license license:lgpl3+)))
1611
1612(define-public python2-funcsigs
1613 (package
1614 (name "python2-funcsigs")
1615 (version "1.0.2")
1616 (source (origin
1617 (method url-fetch)
1618 (uri (pypi-uri "funcsigs" version))
1619 (sha256
1620 (base32
1621 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1622 (build-system python-build-system)
1623 (arguments
1624 `(#:python ,python-2))
1625 (native-inputs
1626 `(("python2-unittest2" ,python2-unittest2)))
1627 (home-page "http://funcsigs.readthedocs.org")
1628 (synopsis "Python function signatures from PEP362")
1629 (description
1630 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1631 (license license:asl2.0)))
1632
1633(define-public python2-funcsigs-bootstrap
1634 (package
1635 (inherit python2-funcsigs)
1636 (name "python2-funcsigs-bootstrap")
1637 (native-inputs `())
1638 (arguments
1639 `(#:tests? #f
1640 ,@(package-arguments python2-funcsigs)))))
1641
1642(define-public python-py
1643 (package
1644 (name "python-py")
1645 (version "1.5.4")
1646 (source
1647 (origin
1648 (method url-fetch)
1649 (uri (pypi-uri "py" version))
1650 (sha256
1651 (base32
1652 "1xxvwfn82457djf55f5n2c94699rfqnk43br8fif2r2q8gvrmm9z"))))
1653 (build-system python-build-system)
1654 (arguments
1655 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1656 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1657 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1658 ;; Is this module globally installed?"
1659 '(#:tests? #f))
1660 (native-inputs
1661 `(("python-setuptools-scm" ,python-setuptools-scm)))
1662 (home-page "https://github.com/pytest-dev/py")
1663 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1664 (description
1665 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1666code introspection, and logging.")
1667 (license license:expat)))
1668
1669(define-public python2-py
1670 (package-with-python2 python-py))
1671
1672;; Recent versions of python-fixtures and python-testrepository need
1673;; python-pbr for packaging, which itself needs these two packages for
1674;; testing.
1675;; To fix this circular dependency, we use a build of python-pbr, based on the
1676;; same source, just without any test dependencies and with tests disabled.
1677;; python-pbr-minmal is then used to package python-fixtures and
1678;; python-testrepository.
1679;; Strictly speaking we currently could remove the test-requirements from the
1680;; normal python-pbr package (and save this package) since test are disabled
1681;; there anyway. But this may change in future.
1682(define-public python-pbr-minimal
1683 (package
1684 (name "python-pbr-minimal")
1685 (version "3.0.1")
1686 (source
1687 (origin
1688 (method url-fetch)
1689 (uri (pypi-uri "pbr" version))
1690 (sha256
1691 (base32
1692 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1693 (build-system python-build-system)
1694 (arguments
1695 `(#:tests? #f))
1696 (home-page "http://docs.openstack.org/developer/pbr/")
1697 (synopsis "Minimal build of python-pbr used for bootstrapping")
1698 (description
1699 "Used only for bootstrapping python2-pbr, you should not need this.")
1700 (license license:asl2.0)))
1701
1702(define-public python2-pbr-minimal
1703 (package-with-python2 python-pbr-minimal))
1704
1705(define-public python-pbr
1706 (package
1707 (inherit python-pbr-minimal)
1708 (name "python-pbr")
1709 (arguments
1710 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1711 (propagated-inputs
1712 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1713 (native-inputs
1714 `(("python-fixtures" ,python-fixtures-bootstrap)
1715 ;; discover, coverage, hacking, subunit
1716 ("python-mock" ,python-mock)
1717 ("python-six" ,python-six)
1718 ("python-sphinx" ,python-sphinx)
1719 ("python-testrepository" ,python-testrepository-bootstrap)
1720 ("python-testresources" ,python-testresources-bootstrap)
1721 ("python-testscenarios" ,python-testscenarios-bootstrap)
1722 ("python-testtools" ,python-testtools-bootstrap)
1723 ("python-virtualenv" ,python-virtualenv)))
1724 (synopsis "Enhance the default behavior of Python’s setuptools")
1725 (description
1726 "Python Build Reasonableness (PBR) is a library that injects some useful
1727and sensible default behaviors into your setuptools run. It will set
1728versions, process requirements files and generate AUTHORS and ChangeLog file
1729from git information.
1730")))
1731
1732(define-public python2-pbr
1733 (package-with-python2 python-pbr))
1734
ea43f0d5
MB
1735(define-public python-pyrsistent
1736 (package
1737 (name "python-pyrsistent")
1738 (version "0.14.11")
1739 (home-page "https://github.com/tobgu/pyrsistent")
1740 (source (origin
1741 (method url-fetch)
1742 (uri (pypi-uri "pyrsistent" version))
1743 (sha256
1744 (base32
1745 "1qkh74bm296mp5g3r11lgsksr6bh4w1bf8pji4nmxdlfj542ga1w"))))
1746 (build-system python-build-system)
1747 (native-inputs
1748 `(("python-hypothesis" ,python-hypothesis)
1749 ("python-pytest" ,python-pytest)
1750 ("python-pytest-runner" ,python-pytest-runner)))
1751 (propagated-inputs
1752 `(("python-six" ,python-six)))
1753 (synopsis "Persistent data structures for Python")
1754 (description
1755 "Pyrsistent is a number of persistent collections (by some referred to as
1756functional data structures). Persistent in the sense that they are immutable.
1757
1758All methods on a data structure that would normally mutate it instead return a
1759new copy of the structure containing the requested updates. The original
1760structure is left untouched.")
1761 (license license:expat)))
1762
1763(define-public python2-pyrsistent
1764 (package-with-python2 python-pyrsistent))
1765
44d10b1f
RW
1766(define-public python-exif-read
1767 (package
1768 (name "python-exif-read")
1769 (version "2.1.2")
1770 (source (origin
1771 (method url-fetch)
1772 (uri (pypi-uri "ExifRead" version))
1773 (sha256
1774 (base32
1775 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
1776 (build-system python-build-system)
1777 (arguments `(#:tests? #f)) ; no tests
1778 (home-page "https://github.com/ianare/exif-py")
1779 (synopsis "Python library to extract EXIF data from image files")
1780 (description
1781 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1782files.")
1783 (license license:bsd-3)))
1784
1785(define-public python2-exif-read
1786 (package-with-python2 python-exif-read))
1787
1788(define-public python-pyld
1789 (package
1790 (name "python-pyld")
1791 (version "1.0.3")
1792 (source (origin
1793 (method url-fetch)
1794 (uri (pypi-uri "PyLD" version))
1795 (sha256
1796 (base32
1797 "12i2g6xdj30k7xxcibg3sc5y76snwq8l6n8fy9lyi577kgy0h2pm"))))
1798 (build-system python-build-system)
1799 (home-page "https://github.com/digitalbazaar/pyld")
1800 (synopsis "Python implementation of the JSON-LD specification")
1801 (description
1802 "PyLD is an implementation of the JSON-LD specification.")
1803 (license license:bsd-3)))
1804
1805(define-public python2-pyld
1806 (package-with-python2 python-pyld))
1807
1808(define-public python-click
1809 (package
1810 (name "python-click")
61984855 1811 (version "7.0")
44d10b1f
RW
1812 (source
1813 (origin
1814 (method url-fetch)
1815 (uri (pypi-uri "click" version))
1816 (sha256
1817 (base32
61984855 1818 "1mzjixd4vjbjvzb6vylki9w1556a9qmdh35kzmq6cign46av952v"))))
44d10b1f
RW
1819 (build-system python-build-system)
1820 (arguments
8d7e7ca6 1821 `(#:phases
44d10b1f
RW
1822 (modify-phases %standard-phases
1823 (add-after 'unpack 'fix-paths
1824 (lambda* (#:key inputs #:allow-other-keys)
1825 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
1826 "cross-libc" "libc"))))
1827 (substitute* "click/_unicodefun.py"
1828 (("'locale'")
1829 (string-append "'" glibc "/bin/locale'"))))
8d7e7ca6
EF
1830 #t))
1831 (replace 'check
1832 (lambda _
1833 (invoke "python" "-m" "pytest"))))))
44d10b1f
RW
1834 (native-inputs
1835 `(("python-pytest" ,python-pytest)))
61984855 1836 (home-page "https://palletsprojects.com/p/click/")
44d10b1f
RW
1837 (synopsis "Command line library for Python")
1838 (description
1839 "Click is a Python package for creating command line interfaces in a
1840composable way with as little code as necessary. Its name stands for
1841\"Command Line Interface Creation Kit\". It's highly configurable but comes
1842with sensible defaults out of the box.")
1843 (license license:bsd-3)))
1844
1845(define-public python2-click
1846 (package-with-python2 python-click))
1847
1848(define-public python-wheel
1849 (package
1850 (name "python-wheel")
746c074b 1851 (version "0.32.3")
44d10b1f
RW
1852 (source
1853 (origin
1854 (method url-fetch)
1855 (uri (pypi-uri "wheel" version))
1856 (sha256
1857 (base32
746c074b 1858 "1dhxl1bf18bx9szmqcnxbg6204hp3im8089q3hkwh5jfa6zh75q2"))))
44d10b1f
RW
1859 (build-system python-build-system)
1860 (native-inputs
1861 `(("python-jsonschema" ,python-jsonschema)
1862 ("python-pytest-cov" ,python-pytest-cov)))
1863 (home-page "https://bitbucket.org/pypa/wheel/")
1864 (synopsis "Format for built Python packages")
1865 (description
1866 "A wheel is a ZIP-format archive with a specially formatted filename and
1867the @code{.whl} extension. It is designed to contain all the files for a PEP
1868376 compatible install in a way that is very close to the on-disk format. Many
1869packages will be properly installed with only the @code{Unpack} step and the
1870unpacked archive preserves enough information to @code{Spread} (copy data and
1871scripts to their final locations) at any later time. Wheel files can be
1872installed with a newer @code{pip} or with wheel's own command line utility.")
1873 (license license:expat)
1874 (properties `((python2-variant . ,(delay python2-wheel))))))
1875
1876(define-public python2-wheel
1877 (let ((wheel (package-with-python2
1878 (strip-python2-variant python-wheel))))
1879 (package (inherit wheel)
1880 (native-inputs `(("python2-functools32" ,python2-functools32)
1881 ,@(package-native-inputs wheel))))))
1882
1883(define-public python-vcversioner
1884 (package
1885 (name "python-vcversioner")
1886 (version "2.16.0.0")
1887 (source
1888 (origin
1889 (method url-fetch)
1890 (uri (pypi-uri "vcversioner" version))
1891 (sha256
1892 (base32
1893 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
1894 (build-system python-build-system)
1895 (synopsis "Python library for version number discovery")
1896 (description "Vcversioner is a Python library that inspects tagging
1897information in a variety of version control systems in order to discover
1898version numbers.")
1899 (home-page "https://github.com/habnabit/vcversioner")
1900 (license license:isc)))
1901
1902(define-public python2-vcversioner
1903 (package-with-python2 python-vcversioner))
1904
5591fc4f
MC
1905(define-public python-jdcal
1906 (package
1907 (name "python-jdcal")
1908 (version "1.4")
1909 (source
1910 (origin
1911 (method url-fetch)
1912 (uri (pypi-uri "jdcal" version))
1913 (sha256
1914 (base32
1915 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
1916 (build-system python-build-system)
1917 (arguments
1918 `(#:phases (modify-phases %standard-phases
1919 (replace 'check
1920 (lambda _
1921 (invoke "pytest"))))))
1922 (native-inputs
1923 `(("python-pytest" ,python-pytest)))
1924 (home-page "https://github.com/phn/jdcal")
1925 (synopsis "Functions to convert between Julian dates Gregorian dates")
1926 (description "This Python library provides functions for converting
1927between Julian dates and Gregorian dates.")
1928 (license license:bsd-2)))
1929
1930(define-public python2-jdcal
1931 (package-with-python2 python-jdcal))
1932
44d10b1f
RW
1933(define-public python-jsonschema
1934 (package
1935 (name "python-jsonschema")
1adde06e 1936 (version "3.0.1")
44d10b1f
RW
1937 (source (origin
1938 (method url-fetch)
786ccb87 1939 (uri (pypi-uri "jsonschema" version))
44d10b1f
RW
1940 (sha256
1941 (base32
1adde06e 1942 "03g20i1xfg4qdlk4475pl4pp7y0h37g1fbgs5qhy678q9xb822hc"))))
44d10b1f
RW
1943 (build-system python-build-system)
1944 (arguments
1945 '(#:phases
1946 (modify-phases %standard-phases
1adde06e
MB
1947 (replace 'check
1948 (lambda _
1949 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
1950 (invoke "trial" "jsonschema"))))))
44d10b1f 1951 (native-inputs
1adde06e
MB
1952 `(("python-setuptools_scm" ,python-setuptools-scm)
1953 ("python-twisted" ,python-twisted)))
1954 (propagated-inputs
1955 `(("python-attrs" ,python-attrs)
1956 ("python-pyrsistent" ,python-pyrsistent)
1957 ("python-six" ,python-six)))
44d10b1f
RW
1958 (home-page "https://github.com/Julian/jsonschema")
1959 (synopsis "Implementation of JSON Schema for Python")
1960 (description
1961 "Jsonschema is an implementation of JSON Schema for Python.")
1962 (license license:expat)
1963 (properties `((python2-variant . ,(delay python2-jsonschema))))))
1964
1965(define-public python2-jsonschema
1966 (let ((jsonschema (package-with-python2
1967 (strip-python2-variant python-jsonschema))))
1968 (package (inherit jsonschema)
44d10b1f 1969 (propagated-inputs
1adde06e
MB
1970 `(("python2-functools32" ,python2-functools32)
1971 ,@(package-propagated-inputs jsonschema))))))
44d10b1f 1972
914bba28
TGR
1973;; This old version is still required by docker-compose as of 1.24.0.
1974(define-public python-jsonschema-2.6
1975 (package
1976 (name "python-jsonschema")
1977 (version "2.6.0")
1978 (source (origin
1979 (method url-fetch)
1980 (uri (pypi-uri "jsonschema" version))
1981 (sha256
1982 (base32
1983 "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg"))))
1984 (build-system python-build-system)
1985 (arguments
1986 '(#:phases
1987 (modify-phases %standard-phases
1988 (replace 'check (lambda _ (invoke "nosetests"))))))
1989 (native-inputs
1990 `(("python-nose" ,python-nose)
1991 ("python-vcversioner" ,python-vcversioner)))
1992 (home-page "https://github.com/Julian/jsonschema")
1993 (synopsis "Implementation of JSON Schema for Python")
1994 (description
1995 "Jsonschema is an implementation of JSON Schema for Python.")
1996 (license license:expat)
1997 (properties `((python2-variant . ,(delay python2-jsonschema))))))
1998
44d10b1f
RW
1999(define-public python-schema
2000 (package
2001 (name "python-schema")
2002 (version "0.6.6")
2003 (source
2004 (origin
2005 (method url-fetch)
2006 (uri (pypi-uri "schema" version))
2007 (sha256
2008 (base32
2009 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2010 (build-system python-build-system)
2011 (native-inputs
2012 `(("python-pytest" ,python-pytest)))
2013 (home-page "https://github.com/keleshev/schema")
2014 (synopsis "Simple data validation library")
2015 (description
2016 "@code{python-schema} is a library for validating Python data
2017structures, such as those obtained from config-files, forms, external
2018services or command-line parsing, converted from JSON/YAML (or
2019something else) to Python data-types.")
2020 (license license:psfl)))
2021
2022(define-public python2-schema
2023 (package-with-python2 python-schema))
2024
2025(define-public python-schema-0.5
2026 (package (inherit python-schema)
2027 (version "0.5.0")
2028 (source
2029 (origin
2030 (method url-fetch)
2031 (uri (pypi-uri "schema" version))
2032 (sha256
2033 (base32
2034 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2035
2036(define-public python2-schema-0.5
2037 (package-with-python2 python-schema-0.5))
2038
2039(define-public python-kitchen
2040 (package
2041 (name "python-kitchen")
2042 (version "1.2.5")
2043 (source
2044 (origin
2045 (method url-fetch)
2046 (uri (pypi-uri "kitchen" version))
2047 (sha256
2048 (base32
2049 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2050 (build-system python-build-system)
2051 (propagated-inputs
2052 `(("python-chardet" ,python-chardet)))
2053 (home-page "https://github.com/fedora-infra/kitchen")
2054 (synopsis "Python API for snippets")
2055 (description "@code{kitchen} module provides a python API for all sorts of
2056little useful snippets of code that everybody ends up writing for their projects
2057but never seem big enough to build an independent release. Use kitchen and stop
2058cutting and pasting that code over and over.")
2059 (license (list license:lgpl2.1+
2060 ;; subprocess.py, test_subprocess.py,
2061 ;; kitchen/pycompat25/defaultdict.py:
2062 license:psfl))))
2063
2064(define-public python2-kitchen
2065 (package-with-python2 python-kitchen))
2066
2067(define-public python-unidecode
2068 (package
2069 (name "python-unidecode")
bd9d7206 2070 (version "1.1.0")
44d10b1f
RW
2071 (source (origin
2072 (method url-fetch)
2073 (uri (pypi-uri "Unidecode" version))
2074 (sha256
2075 (base32
bd9d7206 2076 "00pi0czzwvbf7djhkkjyvimj60wqdx0llbddzfnax650g9b8yscc"))))
44d10b1f
RW
2077 (build-system python-build-system)
2078 (home-page "https://pypi.python.org/pypi/Unidecode")
2079 (synopsis "ASCII transliterations of Unicode text")
2080 (description
2081 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2082useful when integrating with legacy code that doesn't support Unicode, or for
2083ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2084machine identifiers from human-readable Unicode strings that should still be
2085somewhat intelligible.")
2086 (license license:gpl2+)))
2087
2088(define-public python2-unidecode
2089 (package-with-python2 python-unidecode))
2090
2091(define-public python-pyjwt
2092 (package
2093 (name "python-pyjwt")
2094 (version "1.5.3")
2095 (source
2096 (origin
2097 (method url-fetch)
2098 (uri (pypi-uri "PyJWT" version))
2099 (sha256
2100 (base32
2101 "1rxsg14i33vm2i6lz0my628108c81k43v10n4h3p0gx62xdyf2sh"))
2102 (modules '((guix build utils)))
2103 (snippet
2104 '(begin
2105 (for-each delete-file-recursively
2106 (find-files "." "\\.pyc$"))
2107 #t))))
2108 (build-system python-build-system)
2109 (native-inputs
2110 `(("python-pytest" ,python-pytest)
2111 ("python-pytest-cov" ,python-pytest-cov)
2112 ("python-pytest-runner" ,python-pytest-runner)))
2113 (home-page "https://github.com/progrium/pyjwt")
2114 (synopsis "JSON Web Token implementation in Python")
2115 (description
2116 "PyJWT is a JSON Web Token implementation written in Python.")
2117 (license license:expat)))
2118
2119(define-public python2-pyjwt
2120 (package-with-python2 python-pyjwt))
2121
2122(define-public python-pykka
2123 (package
2124 (name "python-pykka")
2125 (version "1.2.1")
2126 (source
2127 (origin
2128 (method url-fetch)
2129 (uri (pypi-uri "Pykka" version))
2130 (sha256
2131 (base32
2132 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2133 (build-system python-build-system)
2134 (native-inputs
2135 `(("python-mock" ,python-mock)
2136 ("python-nose" ,python-nose)
2137 ("python-gevent" ,python-gevent)
2138 ("python-eventlet" ,python-eventlet)))
2139 (home-page "https://www.pykka.org/")
2140 (synopsis "Pykka is a Python implementation of the actor model")
2141 (description
2142 "Pykka is a Python implementation of the actor model.
2143The actor model introduces some simple rules to control the sharing
2144of state and cooperation between execution units, which makes it
2145easier to build concurrent applications.")
2146 (license license:asl2.0)))
2147
2148(define-public python2-pykka
2149 (package-with-python2 python-pykka))
2150
8d22f7e3
VC
2151(define-public python-pymsgbox
2152 (package
2153 (name "python-pymsgbox")
2154 (version "1.0.6")
2155 (source
2156 (origin
2157 (method git-fetch)
2158 (uri (git-reference
2159 ;; LICENSE.txt is not present on pypi
2160 (url "https://github.com/asweigart/PyMsgBox")
2161 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
2162 (file-name (git-file-name name version))
2163 (sha256
2164 (base32
2165 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
2166 (arguments
2167 ;; Circular dependency to run tests:
2168 ;; Tests need pyautogui, which depends on pymsgbox.
2169 '(#:tests? #f))
2170 (build-system python-build-system)
2171 (home-page "https://github.com/asweigart/PyMsgBox")
2172 (synopsis "Python module for JavaScript-like message boxes")
2173 (description
2174 "PyMsgBox is a simple, cross-platform, pure Python module for
2175JavaScript-like message boxes. Types of dialog boxes include:
2176@enumerate
2177@item alert
2178@item confirm
2179@item prompt
2180@item password
2181@end enumerate
2182")
2183 (license license:bsd-3)))
2184
44d10b1f
RW
2185(define-public python-pympler
2186 (package
2187 (name "python-pympler")
2188 (home-page "https://pythonhosted.org/Pympler/")
2189 (version "0.5")
2190 (source (origin
2191 (method url-fetch)
2192 (uri (pypi-uri "Pympler" version))
2193 (sha256
2194 (base32
2195 "03qwsbilqgvnbl3a1jmpgixbr2kq6m3fvdlzyr3wdp01bwlc85kx"))))
2196 (build-system python-build-system)
2197 (arguments
2198 `(#:phases (modify-phases %standard-phases
2199 (delete 'check)
2200 (add-after 'install 'check
2201 (lambda* (#:key inputs outputs #:allow-other-keys)
2202 (add-installed-pythonpath inputs outputs)
2203 (invoke "python" "setup.py" "test"))))))
2204 (synopsis "Measure, monitor and analyze memory behavior")
2205 (description
2206 "Pympler is a development tool to measure, monitor and analyze
2207the memory behavior of Python objects in a running Python application.
2208
2209By pympling a Python application, detailed insight in the size and the
2210lifetime of Python objects can be obtained. Undesirable or unexpected
2211runtime behavior like memory bloat and other @samp{pymples} can easily
2212be identified.
2213
2214A web profiling frontend exposes process statistics, garbage
2215visualisation and class tracker statistics.")
2216 (license license:asl2.0)))
2217
2218(define-public python2-pympler
2219 (package-with-python2 python-pympler))
2220
2221(define-public python-itsdangerous
2222 (package
2223 (name "python-itsdangerous")
acfcf2ed 2224 (version "1.1.0")
44d10b1f
RW
2225 (source
2226 (origin
2227 (method url-fetch)
acfcf2ed 2228 (uri (pypi-uri "itsdangerous" version))
44d10b1f
RW
2229 (sha256
2230 (base32
acfcf2ed 2231 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
44d10b1f 2232 (build-system python-build-system)
acfcf2ed 2233 (home-page "https://palletsprojects.com/p/itsdangerous/")
44d10b1f
RW
2234 (synopsis "Python library for passing data to/from untrusted environments")
2235 (description
2236 "Itsdangerous provides various helpers to pass trusted data to untrusted
2237environments and back.")
2238 (license license:bsd-3)))
2239
2240(define-public python2-itsdangerous
2241 (package-with-python2 python-itsdangerous))
2242
2243(define-public python-pyyaml
2244 (package
2245 (name "python-pyyaml")
2246 (version "3.13")
2247 (source
2248 (origin
2249 (method url-fetch)
2250 (uri (pypi-uri "PyYAML" version))
2251 (sha256
2252 (base32
2253 "1gx603g484z46cb74j9rzr6sjlh2vndxayicvlyhxdz98lhhkwry"))))
2254 (build-system python-build-system)
2255 (inputs
2256 `(("libyaml" ,libyaml)))
2257 (home-page "http://pyyaml.org/wiki/PyYAML")
2258 (synopsis "YAML parser and emitter for Python")
2259 (description
2260 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2261complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2262API, and sensible error messages. PyYAML supports standard YAML tags and
2263provides Python-specific tags that allow to represent an arbitrary Python
2264object.")
2265 (license license:expat)))
2266
2267(define-public python2-pyyaml
2268 (package-with-python2 python-pyyaml))
2269
2270(define-public python-vine
2271 (package
2272 (name "python-vine")
2273 (version "1.1.4")
2274 (source
2275 (origin
2276 (method url-fetch)
2277 (uri (pypi-uri "vine" version))
2278 (sha256
2279 (base32
2280 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
2281 (build-system python-build-system)
2282 (native-inputs
2283 `(("python-pytest" ,python-pytest)
2284 ("python-case" ,python-case)))
2285 (home-page "https://github.com/celery/vine")
2286 (synopsis "Promises for Python")
2287 (description
2288 "@code{vine} provides a special implementation of promises in that it can
2289be used both for \"promise of a value\" and lazy evaluation. The biggest
2290upside for this is that everything in a promise can also be a promise,
2291e.g. filters, callbacks and errbacks can all be promises.")
2292 (license license:bsd-3)))
2293
2294(define-public python-virtualenv
2295 (package
2296 (name "python-virtualenv")
2782bd51 2297 (version "16.1.0")
44d10b1f
RW
2298 (source
2299 (origin
2300 (method url-fetch)
2301 (uri (pypi-uri "virtualenv" version))
2302 (sha256
2303 (base32
2782bd51 2304 "0242cg3hdq3qdvx5flyrki8lpwlgwf5k45c21ks5049fv7ygm6gq"))))
44d10b1f
RW
2305 (build-system python-build-system)
2306 (arguments
2307 `(#:phases
2308 (modify-phases %standard-phases
2782bd51 2309 (add-before 'check 'disable-failing-test
44d10b1f
RW
2310 (lambda _
2311 ;; Disable failing test. See upstream bug report
2312 ;; https://github.com/pypa/virtualenv/issues/957
2313 (substitute* "tests/test_virtualenv.py"
2314 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2782bd51 2315 #t)))))
44d10b1f
RW
2316 (native-inputs
2317 `(("python-mock" ,python-mock)
2318 ("python-pytest" ,python-pytest)))
2319 (home-page "https://virtualenv.pypa.io/")
2320 (synopsis "Virtual Python environment builder")
2321 (description
2322 "Virtualenv is a tool to create isolated Python environments.")
2323 (license license:expat)))
2324
2325(define-public python2-virtualenv
2326 (package-with-python2 python-virtualenv))
2327
2328(define-public python-markupsafe
2329 (package
2330 (name "python-markupsafe")
2331 (version "1.0")
2332 (source
2333 (origin
2334 (method url-fetch)
5182927c 2335 (uri (pypi-uri "MarkupSafe" version))
44d10b1f
RW
2336 (sha256
2337 (base32
2338 "0rdn1s8x9ni7ss8rfiacj7x1085lx8mh2zdwqslnw8xc3l4nkgm6"))))
2339 (build-system python-build-system)
2340 (home-page "https://github.com/mitsuhiko/markupsafe")
2341 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2342 (description
2343 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2344for Python.")
2345 (license license:bsd-3)))
2346
2347(define-public python2-markupsafe
2348 (package-with-python2 python-markupsafe))
2349
2350(define-public python-jinja2
2351 (package
2352 (name "python-jinja2")
4a5c7934 2353 (version "2.10.1")
44d10b1f
RW
2354 (source
2355 (origin
2356 (method url-fetch)
2357 (uri (pypi-uri "Jinja2" version))
2358 (sha256
2359 (base32
4a5c7934 2360 "04shqrs56aj04ipyqykj512rw2l0zfammvj9krawzxz7xc14yp06"))))
44d10b1f
RW
2361 (build-system python-build-system)
2362 (propagated-inputs
2363 `(("python-markupsafe" ,python-markupsafe)))
2364 (home-page "http://jinja.pocoo.org/")
2365 (synopsis "Python template engine")
2366 (description
2367 "Jinja2 is a small but fast and easy to use stand-alone template engine
2368written in pure Python.")
2369 (license license:bsd-3)))
2370
2371(define-public python2-jinja2
2372 (package-with-python2 python-jinja2))
2373
2374(define-public python-pystache
2375 (package
2376 (name "python-pystache")
2377 (version "0.5.4")
2378 (source (origin
2379 (method url-fetch)
2380 (uri (pypi-uri "pystache" version))
2381 (sha256
2382 (base32
2383 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2384 (build-system python-build-system)
2385 (arguments
2386 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2387 (home-page "http://defunkt.io/pystache/")
2388 (synopsis "Python logic-less template engine")
2389 (description
2390 "Pystache is a Python implementation of the framework agnostic,
2391logic-free templating system Mustache.")
2392 (license license:expat)
2393 (properties `((python2-variant . ,(delay python2-pystache))))))
2394
2395(define-public python2-pystache
2396 (package (inherit (package-with-python2
2397 (strip-python2-variant python-pystache)))
2398 (arguments
2399 `(#:python ,python-2
2400 #:phases
2401 (modify-phases %standard-phases
2402 (replace 'check
2403 (lambda _
dfafc29b 2404 (invoke "python" "test_pystache.py"))))))))
44d10b1f
RW
2405
2406(define-public python-joblib
2407 (package
2408 (name "python-joblib")
2409 (version "0.13.0")
2410 (source (origin
2411 (method url-fetch)
2412 (uri (pypi-uri "joblib" version))
2413 (sha256
2414 (base32
2415 "0612nazad8dxmn3xghfrmjax6456l4xy6hn9cngs7vydi14ds7v5"))))
2416 (build-system python-build-system)
2417 (arguments
2418 `(#:phases
2419 (modify-phases %standard-phases
2420 (replace 'check
2421 (lambda _ (invoke "pytest" "-v" "joblib"))))))
2422 (native-inputs
2423 `(("python-pytest" ,python-pytest)))
2424 (home-page "https://joblib.readthedocs.io/")
2425 (synopsis "Using Python functions as pipeline jobs")
2426 (description
2427 "Joblib is a set of tools to provide lightweight pipelining in Python.
2428In particular, joblib offers: transparent disk-caching of the output values
2429and lazy re-evaluation (memoize pattern), easy simple parallel computing
2430logging and tracing of the execution.")
2431 (license license:bsd-3)))
2432
2433(define-public python2-joblib
2434 (package-with-python2 python-joblib))
2435
a3363341
VC
2436(define-public python-daemon
2437 (package
2438 (name "python-daemon")
2439 (version "2.2.3")
2440 (source
2441 (origin
2442 (method url-fetch)
2443 (uri (pypi-uri "python-daemon" version))
2444 (sha256
2445 (base32
2446 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
2447 (build-system python-build-system)
2448 (arguments
2449 `(#:phases
2450 (modify-phases %standard-phases
2451 (add-before 'check 'disable-tests
2452 (lambda _
2453 ;; FIXME: Determine why test fails
2454 (substitute* "test/test_daemon.py"
2455 (("test_detaches_process_context")
2456 "skip_test_detaches_process_context"))
2457 #t)))))
2458 (propagated-inputs
2459 `(("python-lockfile" ,python-lockfile)))
2460 (native-inputs
2461 `(("python-unittest2" ,python-unittest2)
2462 ("python-testtools" ,python-testtools)
2463 ("python-testscenarios" ,python-testscenarios)
2464 ("python-mock" ,python-mock)
2465 ("python-docutils" ,python-docutils)))
2466 (home-page "https://pagure.io/python-daemon/")
2467 (synopsis "Python library for making a Unix daemon process")
2468 (description "Python-daemon is a library that assists a Python program to
2469turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
2470
2471This library provides a @code{DaemonContext} class that manages the following
2472important tasks for becoming a daemon process:
2473@enumerate
2474@item Detach the process into its own process group.
2475@item Set process environment appropriate for running inside a chroot.
2476@item Renounce suid and sgid privileges.
2477@item Close all open file descriptors.
2478@item Change the working directory, uid, gid, and umask.
2479@item Set appropriate signal handlers.
2480@item Open new file descriptors for stdin, stdout, and stderr.
2481@item Manage a specified PID lock file.
2482@item Register cleanup functions for at-exit processing.
2483@end enumerate")
2484 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
2485 (license (list license:asl2.0 license:gpl3+))))
2486
44d10b1f
RW
2487(define-public python-docutils
2488 (package
2489 (name "python-docutils")
2490 (version "0.14")
2491 (source
2492 (origin
2493 (method url-fetch)
2494 (uri (pypi-uri "docutils" version))
2495 (sha256
2496 (base32
2497 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2498 (build-system python-build-system)
2499 (arguments
2500 '(#:tests? #f)) ; no setup.py test command
2501 (home-page "http://docutils.sourceforge.net/")
2502 (synopsis "Python Documentation Utilities")
2503 (description
2504 "Docutils is a modular system for processing documentation into useful
2505formats, such as HTML, XML, and LaTeX. For input Docutils supports
2506reStructuredText.")
2507 ;; Most of the source code is public domain, but some source files are
2508 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2509 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2510
2511(define-public python2-docutils
2512 (package-with-python2 python-docutils))
2513
2514(define-public python-pygments
2515 (package
2516 (name "python-pygments")
4cd4173d 2517 (version "2.4.0")
44d10b1f
RW
2518 (source
2519 (origin
2520 (method url-fetch)
2521 (uri (pypi-uri "Pygments" version))
2522 (sha256
2523 (base32
4cd4173d 2524 "1xb5n3hvhk63kxypc03k7kfry20pny6gygi4bsl9kw1rnzzsdjri"))))
44d10b1f
RW
2525 (build-system python-build-system)
2526 (arguments
2527 ;; FIXME: Tests require sphinx, which depends on this.
2528 '(#:tests? #f))
2529 (home-page "http://pygments.org/")
2530 (synopsis "Syntax highlighting")
2531 (description
2532 "Pygments is a syntax highlighting package written in Python.")
2533 (license license:bsd-2)))
2534
2535(define-public python2-pygments
2536 (package-with-python2 python-pygments))
2537
0f0a5ef9
MC
2538(define-public python-bumpversion
2539 (package
2540 (name "python-bumpversion")
2541 (version "0.5.3")
2542 (source
2543 (origin
2544 (method url-fetch)
2545 (uri (pypi-uri "bumpversion" version))
2546 (sha256
2547 (base32
2548 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
2549 (build-system python-build-system)
2550 (home-page "https://github.com/peritus/bumpversion")
2551 (synopsis "Tool to bump software version")
2552 (description "This tool provides a command-line interface (CLI) to bump a
2553software version simply.")
2554 (license license:expat)))
2555
b24fd2c2
MC
2556(define-public python-deprecated
2557 (package
2558 (name "python-deprecated")
2559 (version "1.2.5")
2560 (source
2561 (origin
2562 (method git-fetch)
2563 (uri (git-reference
2564 (url "https://github.com/tantale/deprecated.git")
2565 (commit (string-append "v" version))))
2566 (file-name (git-file-name name version))
2567 (sha256
2568 (base32
2569 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
2570 (build-system python-build-system)
2571 (arguments
2572 `(#:phases (modify-phases %standard-phases
2573 (replace 'check
2574 (lambda _
2575 (invoke "pytest"))))))
2576 (propagated-inputs
2577 `(("python-wrapt" ,python-wrapt)))
2578 (native-inputs
2579 `(("python-bumpversion" ,python-bumpversion)
2580 ("python-pytest" ,python-pytest)
2581 ("python-pytest-cov" ,python-pytest-cov)
2582 ("python-sphinx" ,python-sphinx)
2583 ("python-tox" ,python-tox)))
2584 (home-page "https://github.com/tantale/deprecated")
2585 (synopsis "Python decorator to deprecate classes, functions or methods")
2586 (description "The @code{deprecated} decorator provides a convenient way to deprecate
2587to deprecate classes, functions or methods.")
2588 (license license:expat)))
2589
d5a998fa
MC
2590(define-public python-pygithub
2591 (package
2592 (name "python-pygithub")
2593 (version "1.43.7")
2594 (source
2595 ;; We fetch from the Git repo because there are no tests in the PyPI
2596 ;; archive.
2597 (origin
2598 (method git-fetch)
2599 (uri (git-reference
2600 (url "https://github.com/PyGithub/PyGithub.git")
2601 (commit (string-append "v" version))))
2602 (file-name (git-file-name name version))
2603 (sha256
2604 (base32
2605 "0ww92zz0ja9w6rw83vphmn8rwmcn6abg16j4q7zxjc0rrg2cfj9i"))))
2606 (build-system python-build-system)
2607 (arguments
2608 `(#:phases (modify-phases %standard-phases
2609 ;; Some tests rely on the network.
2610 (add-after 'unpack 'disable-failing-tests
2611 (lambda _
2612 (substitute* "tests/Issue142.py"
2613 (("testDecodeJson") "disabled_testDecodeJson"))
2614 #t))
2615 (add-before 'check 'prepare-for-tests
2616 (lambda _
2617 (for-each (lambda (f)
2618 (chmod f #o666))
2619 (find-files "./tests"))
2620 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
2621 (setenv "PYTHONPATH"
2622 (string-append "./tests:" (getenv "PYTHONPATH")))
2623 #t)))))
2624 (propagated-inputs
2625 `(("python-deprecated" ,python-deprecated)
2626 ("python-pyjwt" ,python-pyjwt)
2627 ("python-requests" ,python-requests)))
2628 (native-inputs `(("python-httpretty" ,python-httpretty)))
2629 (home-page "https://pygithub.readthedocs.io/en/latest/")
2630 (synopsis "Python library for the GitHub API")
2631 (description "This library allows managing GitHub resources such as
2632repositories, user profiles, and organizations in your Python applications,
2633using version 3 of the GitHub application programming interface (API).")
2634 (license license:lgpl3+)))
2635
c0c0bb38
MC
2636(define-public python-rellu
2637 (package
2638 (name "python-rellu")
2639 (version "0.7")
2640 (source
2641 (origin
2642 (method url-fetch)
2643 (uri (pypi-uri "rellu" version))
2644 (sha256
2645 (base32
2646 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
2647 (build-system python-build-system)
2648 (propagated-inputs
2649 `(("python-invoke" ,python-invoke)
2650 ("python-pygithub" ,python-pygithub)))
2651 (home-page "https://github.com/robotframework/rellu")
2652 (synopsis "Utilities to create PyPI releases")
2653 (description "This collection of utilities contains tooling and templates
2654to assist in creating releases on GitHub and publishing them on PyPI. It is
2655designed to be used by Robot Framework and tools and libraries in its
2656ecosystem, but can naturally be used also by other projects.")
2657 (license license:asl2.0)))
2658
b9790285
MC
2659(define-public python-robotframework
2660 (package
2661 (name "python-robotframework")
1710b8f8 2662 (version "3.1.2")
b9790285
MC
2663 ;; There are no tests in the PyPI archive.
2664 (source
2665 (origin
2666 (method git-fetch)
2667 (uri (git-reference
2668 (url "https://github.com/robotframework/robotframework.git")
2669 (commit (string-append "v" version))))
2670 (file-name (git-file-name name version))
2671 (sha256
1710b8f8 2672 (base32 "16gnxy0qinh8fhs0qvhff5z2xh49c3cqgm0d7bfjw120df6x7fym"))
b9790285
MC
2673 (patches (search-patches
2674 "python-robotframework-honor-source-date-epoch.patch"))))
2675 (build-system python-build-system)
2676 (arguments
2677 `(#:phases (modify-phases %standard-phases
2678 (add-before 'build 'build-and-install-doc
2679 (lambda* (#:key outputs #:allow-other-keys)
2680 (let* ((doc-output (assoc-ref outputs "doc"))
2681 (doc (string-append doc-output "/share/"
2682 ,name "-" ,version "/")))
2683 (invoke "invoke" "library-docs" "all")
2684 (mkdir-p doc)
2685 (copy-recursively "doc/libraries"
2686 (string-append doc "/libraries"))
2687 #t)))
2688 (replace 'check
2689 (lambda _
2690 (invoke "python" "utest/run.py"))))))
2691 (native-inputs
2692 `(("python-invoke" ,python-invoke)
2693 ("python-rellu" ,python-rellu)
2694 ("python:tk" ,python "tk"))) ;used when building the HTML doc
2695 (outputs '("out" "doc"))
2696 (home-page "https://robotframework.org")
2697 (synopsis "Generic automation framework")
2698 (description "Robot Framework is a generic automation framework for
2699acceptance testing, acceptance test driven development (ATDD), and robotic
2700process automation (RPA).")
2701 (license license:asl2.0)))
2702
5b84c120
MC
2703(define-public python-robotframework-lint
2704 ;; There is no properly tagged release; the commit below seems to correspond
2705 ;; to the 0.9 stable release available from PyPI. The tests are not
2706 ;; included in the PyPI archive, so we fetch the sources from the upstream
2707 ;; Git repo.
2708 (let ((commit "e851879bab1f63e4e53b34a4dc8a67ed95102830")
2709 (revision "1"))
2710 (package
2711 (name "python-robotframework-lint")
2712 (version (git-version "0.9.0" revision commit))
2713 (source
2714 (origin
2715 (method git-fetch)
2716 (uri (git-reference
2717 (url "https://github.com/boakley/robotframework-lint.git")
2718 (commit commit)))
2719 (file-name (git-file-name name version))
2720 (sha256
2721 (base32
2722 "1p6fknqg5sb9qz5857ji4a877657vgfjm5v3zn45994parx6ml1m"))))
2723 (build-system python-build-system)
2724 (arguments
2725 `(#:phases
2726 (modify-phases %standard-phases
2727 (replace 'check
2728 (lambda _
2729 (invoke "python" "-m" "robot" "-A"
2730 "tests/conf/default.args" "tests"))))))
2731 (propagated-inputs
2732 `(("python-robotframework" ,python-robotframework)))
2733 (home-page "https://github.com/boakley/robotframework-lint/")
2734 (synopsis "Static analysis tool (linter) for Robot Framework")
2735 (description "This package provides the @code{rflint} command-line
2736utility, a static analysis tool (linter) for Robot Framework source files.")
2737 (license license:asl2.0))))
2738
c0c64f17
MC
2739(define-public python-robotframework-sshlibrary
2740 (package
2741 (name "python-robotframework-sshlibrary")
2742 (version "3.3.0")
2743 ;; There are no tests in the PyPI archive.
2744 (source
2745 (origin
2746 (method git-fetch)
2747 (uri (git-reference
2748 (url "https://github.com/robotframework/SSHLibrary.git")
2749 (commit (string-append "v" version))))
2750 (file-name (git-file-name name version))
2751 (sha256
2752 (base32
2753 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
2754 (build-system python-build-system)
2755 (arguments
2756 `(#:phases
2757 (modify-phases %standard-phases
2758 (add-before 'build 'build-and-install-doc
2759 (lambda* (#:key outputs #:allow-other-keys)
2760 (let* ((doc-output (assoc-ref outputs "doc"))
2761 (doc (string-append doc-output "/share/"
2762 ,name "-" ,version "/")))
2763 (invoke "chmod" "-R" "+w" "docs")
2764 (invoke "invoke" "kw-docs" "project-docs")
2765 (mkdir-p doc)
2766 (for-each delete-file (find-files "docs" "\\.rst"))
2767 (copy-recursively "docs" doc)
2768 #t)))
2769 (replace 'check
2770 (lambda _
2771 ;; Some tests require an SSH server; we remove them.
2772 (delete-file "utest/test_client_api.py")
2773 (delete-file "utest/test_scp.py")
2774 (invoke "python" "utest/run.py"))))))
2775 (propagated-inputs
2776 `(("python-robotframework" ,python-robotframework)
2777 ("python-paramiko" ,python-paramiko)
2778 ("python-scp" ,python-scp)))
2779 (native-inputs
2780 `(("openssh" ,openssh)
2781 ("which" ,which)
2782 ;; To generate the documentation
2783 ("python-docutils" ,python-docutils)
2784 ("python-invoke" ,python-invoke)
2785 ("python-pygments" ,python-pygments)
2786 ("python-rellu" ,python-rellu)))
2787 (outputs '("out" "doc"))
2788 (home-page "https://github.com/robotframework/SSHLibrary")
2789 (synopsis "Robot Framework library for SSH and SFTP")
2790 (description "SSHLibrary is a Robot Framework library providing support
2791for SSH and SFTP. It has the following main usages:
2792@itemize @bullet
2793@item Executing commands on the remote machine, either blocking or non-blocking.
2794@item Writing and reading in an interactive shell.
2795@item Transferring files and directories over SFTP.
2796@item Ensuring that files and directories exist on the remote machine.
2797@end itemize")
2798 (license license:asl2.0)))
2799
13d825fc
MC
2800(define-public python-scp
2801 (package
2802 (name "python-scp")
2803 (version "0.13.2")
2804 (source
2805 (origin
2806 (method url-fetch)
2807 (uri (pypi-uri "scp" version))
2808 (sha256
2809 (base32
2810 "1crlpw9lnn58fs1c1rmh7s7s9y5gkgpgjsqlvg9qa51kq1knx7gg"))))
2811 (build-system python-build-system)
2812 (arguments
2813 '(#:tests? #f)) ;tests require an SSH server
2814 (propagated-inputs
2815 `(("python-paramiko" ,python-paramiko)))
2816 (home-page "https://github.com/jbardin/scp.py")
2817 (synopsis "SCP protocol module for Python and Paramiko")
2818 (description "The scp module extends the Paramiko library to send and
2819receive files via the SCP1 protocol, as implemented by the OpenSSH
2820@command{scp} program.")
2821 (license license:gpl2+)))
2822
44d10b1f
RW
2823(define-public python-rst.linker
2824 (package
2825 (name "python-rst.linker")
2826 (version "1.10")
2827 (source
2828 (origin
2829 (method url-fetch)
2830 (uri (pypi-uri "rst.linker" version))
2831 (sha256
2832 (base32
2833 "0iqaacp7pj1s8avs4kc0qg0r7dscywaq37y6l9j14glqdikk0wdj"))))
2834 (build-system python-build-system)
2835 (propagated-inputs
2836 `(("python-dateutil" ,python-dateutil)
2837 ("python-six" ,python-six)))
2838 (native-inputs
2839 `(("python-setuptools-scm" ,python-setuptools-scm)))
2840 ;; Test would require path.py, which would introduce a cyclic dependence.
2841 (arguments `(#:tests? #f))
2842 ;; Note: As of version 1.7 the documentation is not worth building.
2843 (home-page "https://github.com/jaraco/rst.linker")
2844 (synopsis "Sphinx plugin to add links and timestamps")
2845 (description "rst.linker allows to automatically replace text by a
2846reStructuredText external reference or timestamps. It's primary purpose is to
2847augment the changelog, but it can be used for other documents, too.")
2848 (license license:expat)))
2849
2850(define-public python2-rst.linker
2851 (package-with-python2 python-rst.linker))
2852
2853(define-public python-feedgenerator
2854 (package
2855 (name "python-feedgenerator")
2856 (version "1.9")
2857 (source
2858 (origin
2859 (method url-fetch)
2860 (uri (pypi-uri "feedgenerator" version))
2861 (sha256
2862 (base32
2863 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
2864 (modules '((guix build utils)))
2865 (snippet
2866 '(begin
2867 ;; Remove pre-compiled .pyc files from source.
2868 (for-each delete-file-recursively
2869 (find-files "." "__pycache__" #:directories? #t))
2870 (for-each delete-file (find-files "." "\\.pyc$"))
2871 #t))))
2872 (build-system python-build-system)
2873 (propagated-inputs
2874 `(("python-pytz" ,python-pytz)
2875 ("python-six" ,python-six)))
2876 (home-page "https://github.com/getpelican/feedgenerator")
2877 (synopsis
2878 "Standalone version of Django's Atom/RSS feed generator")
2879 (description
2880 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2881which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
2882 (license license:bsd-3)))
2883
2884(define-public python2-feedgenerator
2885 (package-with-python2 python-feedgenerator))
2886
2887(define-public python-toml
2888 (package
2889 (name "python-toml")
2890 (version "0.9.4")
2891 (source
2892 (origin
2893 (method url-fetch)
2894 (uri (pypi-uri "toml" version))
2895 (sha256
2896 (base32
2897 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
2898 (build-system python-build-system)
2899 (arguments
2900 `(#:tests? #f)) ;no tests suite in release
2901 (home-page "https://github.com/uiri/toml")
2902 (synopsis "Library for TOML")
2903 (description
2904 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
2905Language (TOML) configuration files.")
2906 (license license:expat)))
2907
346c8752
BG
2908(define-public python-jsonrpc-server
2909 (package
2910 (name "python-jsonrpc-server")
2911 (version "0.1.2")
2912 (source
2913 (origin
2914 (method url-fetch)
2915 (uri (pypi-uri "python-jsonrpc-server" version))
2916 (sha256
2917 (base32
2918 "0m4ykpcdy52x37n1ikysp07j7p8ialcdvvvsrjp3545sn7iiid09"))))
2919 (build-system python-build-system)
2920 (propagated-inputs
2921 `(("python-future" ,python-future)
2922 ("python-mock" ,python-mock)
2923 ("python-pytest" ,python-pytest)))
2924 (home-page
2925 "https://github.com/palantir/python-jsonrpc-server")
2926 (synopsis "JSON RPC 2.0 server library")
2927 (description
1df5407c 2928 "This package provides a JSON RPC 2.0 server library for Python.")
346c8752
BG
2929 (license license:expat)))
2930
56f4ad47
BG
2931(define-public python-pydocstyle
2932 (package
2933 (name "python-pydocstyle")
2934 (version "3.0.0")
2935 (source
2936 (origin
2937 (method url-fetch)
2938 (uri (pypi-uri "pydocstyle" version))
2939 (sha256
2940 (base32
2941 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
2942 (build-system python-build-system)
2943 (propagated-inputs
2944 `(("python-six" ,python-six)
2945 ("python-snowballstemmer" ,python-snowballstemmer)))
2946 (home-page
2947 "https://github.com/PyCQA/pydocstyle/")
2948 (synopsis "Python docstring style checker")
2949 (description
2950 "This package provides a style checker for the Python Language
2951Server (PLS).")
2952 (license license:expat)))
2953
be4d840c
BG
2954(define-public python-language-server
2955 (package
2956 (name "python-language-server")
ccbaeba3 2957 (version "0.26.1")
be4d840c
BG
2958 (source
2959 (origin
2960 (method url-fetch)
2961 (uri (pypi-uri "python-language-server" version))
2962 (sha256
2963 (base32
ccbaeba3 2964 "1vs9ckfmm534n1hq3m871916wsjvi5h4gyj6wlzg13ck6506lx0s"))))
be4d840c
BG
2965 (build-system python-build-system)
2966 (propagated-inputs
2967 `(("python-pluggy" ,python-pluggy)
2968 ("python-jsonrpc-server" ,python-jsonrpc-server)
2969 ("python-jedi" ,python-jedi)
2970 ("python-yapf" ,python-yapf)
2971 ("python-pyflakes" ,python-pyflakes)
2972 ("python-pydocstyle" ,python-pydocstyle)
2973 ("python-pycodestyle" ,python-pycodestyle)
2974 ("python-mccabe" ,python-mccabe)
2975 ("python-rope" ,python-rope)
fe4a4bd2
BG
2976 ("python-autopep8" ,python-autopep8)
2977 ("python-pylint" ,python-pylint)))
be4d840c
BG
2978 (home-page "https://github.com/palantir/python-language-server")
2979 (synopsis "Python implementation of the Language Server Protocol")
2980 (description
2981 "The Python Language Server (pyls) is an implementation of the Python 3
2982language specification for the Language Server Protocol (LSP). This tool is
2983used in text editing environments to provide a complete and integrated
2984feature-set for programming Python effectively.")
2985 (license license:expat)))
2986
44d10b1f
RW
2987(define-public python-black
2988 (package
2989 (name "python-black")
2990 (version "18.6b4")
2991 (source
2992 (origin
2993 (method url-fetch)
2994 (uri (pypi-uri "black" version))
2995 (sha256
2996 (base32
2997 "0i4sfqgz6w15vd50kbhi7g7rifgqlf8yfr8y78rypd56q64qn592"))))
2998 (build-system python-build-system)
2999 (arguments
3000 `(#:phases
3001 (modify-phases %standard-phases
3002 (add-after 'patch-source-shebangs 'patch-extra-shebangs
3003 (lambda _
3004 (let ((python3 (which "python3")))
3005 (substitute* '("tests/data/fmtonoff.py"
3006 "tests/data/string_prefixes.py"
3007 "tests/data/function.py")
3008 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
3009 (string-append "#!" python3 (if (string? minor-version)
3010 minor-version
3011 ""))))))))))
3012 (propagated-inputs
3013 `(("python-click" ,python-click)
3014 ("python-attrs" ,python-attrs)
3015 ("python-appdirs" ,python-appdirs)
3016 ("python-toml" ,python-toml)))
3017 (home-page "https://github.com/ambv/black")
3018 (synopsis "The uncompromising code formatter")
3019 (description "Black is the uncompromising Python code formatter.")
3020 (license license:expat)))
3021
3022(define-public python-blinker
3023 (package
3024 (name "python-blinker")
3025 (version "1.4")
3026 (source
3027 (origin
3028 (method url-fetch)
3029 (uri (pypi-uri "blinker" version))
3030 (sha256
3031 (base32
3032 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3033 (build-system python-build-system)
3034 (home-page "http://pythonhosted.org/blinker/")
3035 (synopsis "Fast, simple object-to-object and broadcast signaling")
3036 (description
3037 "Blinker provides a fast dispatching system that allows any number of
3038interested parties to subscribe to events, or \"signals\".")
3039 (license license:expat)))
3040
3041(define-public python2-blinker
3042 (package-with-python2 python-blinker))
3043
3044(define-public pelican
3045 (package
3046 (name "pelican")
aa71b690 3047 (version "4.0.1")
44d10b1f
RW
3048 (source
3049 (origin
3050 (method url-fetch)
3051 (uri (pypi-uri "pelican" version))
3052 (sha256
3053 (base32
aa71b690 3054 "05yda7n6r0ll18fpdjzkzyr0ls8hbb86fnjyb33k9jvv5avah2lr"))))
44d10b1f
RW
3055 (build-system python-build-system)
3056 (propagated-inputs
3057 `(("python-feedgenerator" ,python-feedgenerator)
3058 ("python-jinja2" ,python-jinja2)
3059 ("python-pygments" ,python-pygments)
3060 ("python-docutils" ,python-docutils)
3061 ("python-pytz" ,python-pytz)
3062 ("python-blinker" ,python-blinker)
3063 ("python-unidecode" ,python-unidecode)
3064 ("python-six" ,python-six)
3065 ("python-dateutil" ,python-dateutil)
3066 ("python-markdown" ,python-markdown)))
3067 (home-page "https://getpelican.com/")
3068 (arguments
3069 `(;; XXX Requires a lot more packages to do unit tests :P
3070 #:tests? #f
3071 #:phases (modify-phases %standard-phases
3072 (add-before
3073 'install 'adjust-requires
3074 ;; Since feedgenerator is installed from git, it doesn't
3075 ;; conform to the version requirements.
3076 ;;
3077 ;; We *do have* "feedgenerator >= 1.6", but strip off the
3078 ;; version requirement so setuptools doesn't get confused.
3079 (lambda _
3080 (substitute* "setup.py"
3081 (("['\"]feedgenerator.*?['\"]")
3082 "'feedgenerator'")))))))
3083 (synopsis "Python-based static site publishing system")
3084 (description
3085 "Pelican is a tool to generate a static blog from reStructuredText,
3086Markdown input files, and more. Pelican uses Jinja2 for templating
3087and is very extensible.")
3088 (license license:agpl3+)))
3089
8c141421
JH
3090(define-public mallard-ducktype
3091 (package
3092 (name "mallard-ducktype")
3093 (version "1.0.1")
3094 (source
3095 (origin
3096 (method git-fetch)
3097 ;; git-reference because a proper source tarball is not available
3098 ;; https://lists.gnu.org/archive/html/guix-devel/2019-05/msg00209.html
3099 (uri (git-reference
3100 (url "https://github.com/projectmallard/mallard-ducktype.git")
3101 (commit version)))
3102 (file-name (git-file-name name version))
3103 (sha256
3104 (base32
3105 "0crland0kmpsyjfmnflcw7gaqy5b87b6ah17cmr9d5z1kyazf54n"))))
3106 (build-system python-build-system)
3107 (home-page "http://projectmallard.org")
3108 (synopsis "Convert Ducktype to Mallard documentation markup")
3109 (description
3110 "Ducktype is a lightweight syntax that can represent all the semantics
3111of the Mallard XML documentation system. Ducktype files can be converted to
3112Mallard using the @command{ducktype} tool. The yelp-tools package
3113provides additional functionality on the produced Mallard documents.")
3114 (license license:expat)))
3115
44d10b1f
RW
3116(define-public python-scikit-image
3117 (package
3118 (name "python-scikit-image")
9ff04084 3119 (version "0.14.2")
44d10b1f
RW
3120 (source
3121 (origin
3122 (method url-fetch)
3123 (uri (pypi-uri "scikit-image" version))
3124 (sha256
9ff04084 3125 (base32 "07qchljkyxvg5nrm12fvszi7pmjk4m01qp0w0z8syxzxxs20pz8s"))))
44d10b1f
RW
3126 (build-system python-build-system)
3127 (arguments
3128 ;; TODO: Some tests require running X11 server. Disable them?
3129 '(#:tests? #f))
3130 ;; See DEPENDS.txt for the list of build and run time requiremnts
3131 (propagated-inputs
3132 `(("python-cloudpickle" ,python-cloudpickle)
3133 ("python-dask" ,python-dask)
3134 ("python-matplotlib" ,python-matplotlib)
3135 ("python-networkx" ,python-networkx)
3136 ("python-numpy" ,python-numpy)
3137 ("python-pillow" ,python-pillow)
3138 ("python-pywavelets" ,python-pywavelets)
3139 ("python-scipy" ,python-scipy)
3140 ("python-six" ,python-six)))
3141 (native-inputs
3142 `(("python-cython" ,python-cython)))
3143 (home-page "http://scikit-image.org/")
3144 (synopsis "Image processing in Python")
3145 (description
3146 "Scikit-image is a collection of algorithms for image processing.")
3147 (license license:bsd-3)))
3148
3149(define-public python2-scikit-image
3150 (package-with-python2 python-scikit-image))
3151
3152(define-public python-cython
3153 (package
3154 (name "python-cython")
11bab809 3155 (version "0.29.7")
44d10b1f
RW
3156 (source
3157 (origin
3158 (method url-fetch)
3159 (uri (pypi-uri "Cython" version))
3160 (sha256
3161 (base32
11bab809 3162 "1s61hq2ikawxp6qvmkbfvvaxy9rqj67cddzwgcfc3dwi44b83l2m"))))
44d10b1f
RW
3163 (build-system python-build-system)
3164 ;; we need the full python package and not just the python-wrapper
3165 ;; because we need libpython3.3m.so
3166 (inputs
3167 `(("python" ,python)))
3168 (arguments
3169 `(#:phases
3170 (modify-phases %standard-phases
3171 (add-before 'check 'set-HOME
3172 ;; some tests require access to "$HOME/.cython"
3173 (lambda _ (setenv "HOME" "/tmp") #t))
3174
3175 ;; FIXME: These tests started failing on armhf after the 0.28 update
3176 ;; (commit c69d11c5930), both with an error such as this:
3177 ;; compiling (cpp) and running dictcomp ...
3178 ;; === C/C++ compiler error output: ===
3179 ;; ‘
3180 ;; dictcomp.cpp:5221: confused by earlier errors, bailing out
3181 ;; See <https://hydra.gnu.org/build/2948724> for logs.
3182 ,@(if (target-arm32?)
3183 `((add-before 'check 'disable-failing-tests
3184 (lambda _
3185 (let ((disabled-tests (open-file "tests/bugs.txt" "a")))
3186 (for-each (lambda (test)
3187 (format disabled-tests "~a\n" test))
3188 '("memslice" "dictcomp"))
3189 (close-port disabled-tests)))))
3190 '())
3191
3192 (replace 'check
3193 (lambda _
44d10b1f 3194 (invoke "python" "runtests.py" "-vv"))))))
f319409b 3195 (home-page "https://cython.org/")
44d10b1f
RW
3196 (synopsis "C extensions for Python")
3197 (description "Cython is an optimising static compiler for both the Python
3198programming language and the extended Cython programming language. It makes
3199writing C extensions for Python as easy as Python itself.")
3200 (license license:asl2.0)
3201 (properties `((python2-variant . ,(delay python2-cython))))))
3202
3203(define-public python2-cython
3204 (package (inherit (package-with-python2
3205 (strip-python2-variant python-cython)))
3206 (name "python2-cython")
3207 (inputs
3208 `(("python-2" ,python-2))))) ; this is not automatically changed
3209
3210;; The RPython toolchain currently does not support Python 3.
3211(define-public python2-rpython
3212 (package
3213 (name "python2-rpython")
3214 (version "0.2.1")
3215 (source
3216 (origin
3217 (method url-fetch)
3218 (uri (pypi-uri "rpython" version))
3219 (sha256
3220 (base32
3221 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
3222 (build-system python-build-system)
3223 (arguments `(#:python ,python-2))
3224 (native-inputs
3225 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3226 (home-page "https://rpython.readthedocs.org")
3227 (synopsis "Framework for implementing interpreters and virtual machines")
3228 (description "RPython is a translation and support framework for
3229producing implementations of dynamic languages, emphasizing a clean separation
3230between language specification and implementation aspects.")
3231 (license license:expat)))
3232
3233;; NOTE: when upgrading numpy please make sure that python-pandas and
3234;; python-scipy still build, as these three packages are often used together.
3235(define-public python-numpy
3236 (package
3237 (name "python-numpy")
3238 (version "1.15.4")
3239 (source
3240 (origin
3241 (method url-fetch)
3242 (uri (string-append
3243 "https://github.com/numpy/numpy/releases/download/v"
3244 version "/numpy-" version ".tar.gz"))
3245 (sha256
3246 (base32
3247 "102vcl2qq4pjbm7a3d67vkkvn4466ngia1d8wi5avqwqh8j0jvkn"))))
3248 (build-system python-build-system)
3249 (inputs
3250 `(("openblas" ,openblas)
3251 ("lapack" ,lapack)))
3252 (native-inputs
3253 `(("python-cython" ,python-cython)
3254 ("python-pytest" ,python-pytest)
3255 ("gfortran" ,gfortran)))
3256 (arguments
3257 `(#:phases
3258 (modify-phases %standard-phases
3259 (add-before 'build 'configure-blas-lapack
3260 (lambda* (#:key inputs #:allow-other-keys)
3261 (call-with-output-file "site.cfg"
3262 (lambda (port)
3263 (format port
3264 "[openblas]
3265libraries = openblas
3266library_dirs = ~a/lib
3267include_dirs = ~a/include
3268
3269# backslash-n to make emacs happy
3270\n[lapack]
3271lapack_libs = lapack
3272library_dirs = ~a/lib
3273include_dirs = ~a/include
3274"
3275 (assoc-ref inputs "openblas")
3276 (assoc-ref inputs "openblas")
3277 (assoc-ref inputs "lapack")
3278 (assoc-ref inputs "lapack"))))
3279 #t))
3280 (add-before 'build 'fix-executable-paths
3281 (lambda* (#:key inputs #:allow-other-keys)
3282 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
3283 ;; instead of /bin/sh.
3284 (substitute* "numpy/distutils/exec_command.py"
3285 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
3286 (string-append match-start (assoc-ref inputs "bash") match-end)))
3287 ;; Use "gcc" executable, not "cc".
3288 (substitute* "numpy/distutils/system_info.py"
3289 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3290 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3291 #t))
3292 ;; Tests can only be run after the library has been installed and not
3293 ;; within the source directory.
3294 (delete 'check)
3295 (add-after 'install 'check
3296 (lambda* (#:key outputs inputs #:allow-other-keys)
3297 ;; Make installed package available for running the tests
3298 (add-installed-pythonpath inputs outputs)
3299 ;; Make sure "f2py" etc is found.
3300 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
3301 ":" (getenv "PATH")))
3302 (with-directory-excursion "/tmp"
3303 (invoke "python" "-c"
3304 "import numpy; numpy.test(verbose=2)")))))))
3305 (home-page "http://www.numpy.org/")
3306 (synopsis "Fundamental package for scientific computing with Python")
3307 (description "NumPy is the fundamental package for scientific computing
3308with Python. It contains among other things: a powerful N-dimensional array
3309object, sophisticated (broadcasting) functions, tools for integrating C/C++
3310and Fortran code, useful linear algebra, Fourier transform, and random number
3311capabilities.")
3312 (license license:bsd-3)))
3313
3314(define-public python2-numpy
3315 (package-with-python2 python-numpy))
3316
3317;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
3318;; interest only for legacy code going back to NumPy's predecessor
3319;; Numeric.
3320(define-public python2-numpy-1.8
3321 (package (inherit python2-numpy)
3322 (version "1.8.2")
3323 (source
3324 (origin
3325 (method url-fetch)
3326 (uri (string-append
3327 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
3328 (file-name (string-append "python2-numpy-" version ".tar.gz"))
3329 (sha256
3330 (base32
3331 "0sc20gz1b17xnyrkp5frca3ql5qfalpv916hfg2kqxpwr6jg0f1g"))))
3332 (arguments
3333 (substitute-keyword-arguments (package-arguments python2-numpy)
3334 ((#:phases phases)
3335 `(modify-phases ,phases
3336 (replace 'configure-blas-lapack
3337 (lambda* (#:key inputs #:allow-other-keys)
3338 (call-with-output-file "site.cfg"
3339 (lambda (port)
3340 (format port
3341 "[openblas]
3342libraries = openblas,lapack
3343library_dirs = ~a/lib:~a/lib
3344include_dirs = ~a/include:~a/include
3345"
3346 (assoc-ref inputs "openblas")
3347 (assoc-ref inputs "lapack")
3348 (assoc-ref inputs "openblas")
3349 (assoc-ref inputs "lapack"))))
3350 #t))))))
3351 (native-inputs
3352 `(("python2-nose" ,python2-nose)))
3353 (description "NumPy is the fundamental package for scientific computing
3354with Python. It contains among other things: a powerful N-dimensional array
3355object, sophisticated (broadcasting) functions, tools for integrating C/C++
3356and Fortran code, useful linear algebra, Fourier transform, and random number
3357capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
3358that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
3359Numeric.")
3360 (license license:bsd-3)))
3361
3362(define-public python-munch
3363 (package
3364 (name "python-munch")
3365 (version "2.0.4")
3366 (source
3367 (origin
3368 (method url-fetch)
3369 (uri (pypi-uri "munch" version))
3370 (sha256
3371 (base32
3372 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3373 (build-system python-build-system)
3374 (home-page "https://github.com/Infinidat/munch")
3375 (synopsis "Dot-accessible dictionary")
3376 (description "Munch is a dot-accessible dictionary similar to JavaScript
3377objects.")
3378 (license license:expat)))
3379
3380(define-public python2-munch
3381 (package-with-python2 python-munch))
3382
3383(define-public python-colormath
3384 (package
3385 (name "python-colormath")
3386 (version "3.0.0")
3387 (source
3388 (origin
3389 (method url-fetch)
3390 (uri (pypi-uri "colormath" version))
3391 (sha256
3392 (base32
3393 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3394 (build-system python-build-system)
3395 (propagated-inputs
3396 `(("python-networkx" ,python-networkx)
3397 ("python-numpy" ,python-numpy)))
3398 (home-page "https://github.com/gtaylor/python-colormath")
3399 (synopsis "Color math and conversion library")
3400 (description
3401 "This is a Python library for color math and conversions.")
3402 (license license:bsd-3)))
3403
3404(define-public python2-colormath
3405 (package-with-python2 python-colormath))
3406
3407(define-public python-spectra
3408 (package
3409 (name "python-spectra")
3410 (version "0.0.11")
3411 (source
3412 (origin
3413 (method url-fetch)
3414 (uri (pypi-uri "spectra" version))
3415 (sha256
3416 (base32
3417 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3418 (build-system python-build-system)
3419 (arguments
3420 `(#:phases
3421 (modify-phases %standard-phases
3422 (replace 'check
38ec0f6a 3423 (lambda _ (invoke "nosetests" "-v"))))))
44d10b1f
RW
3424 (propagated-inputs
3425 `(("python-colormath" ,python-colormath)))
3426 (native-inputs
3427 `(("python-nose" ,python-nose)))
3428 (home-page "https://github.com/jsvine/spectra")
3429 (synopsis "Color scales and color conversion")
3430 (description
3431 "This package provides a Python library intended to make color math,
3432color scales, and color space conversion easy. It has support for:
3433
3434@enumerate
3435@item Color scales
3436@item Color ranges
3437@item Color blending
3438@item Brightening/darkening colors
3439@item Saturating/desaturating colors
3440@item Conversion to/from multiple color spaces.
3441@end enumerate\n")
3442 (license license:expat)))
3443
3444(define-public python2-spectra
3445 (package-with-python2 python-spectra))
3446
3447(define-public python-numpy-documentation
3448 (package
3449 (name "python-numpy-documentation")
3450 (version (package-version python-numpy))
3451 (source (package-source python-numpy))
3452 (build-system python-build-system)
3453 (native-inputs
3454 `(("python-matplotlib" ,python-matplotlib)
3455 ("python-numpy" ,python-numpy)
3456 ("pkg-config" ,pkg-config)
3457 ("python-sphinx" ,python-sphinx)
3458 ("python-numpydoc" ,python-numpydoc)
3459 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
3460 texlive-fonts-cm-super
3461 texlive-fonts-ec
3462 texlive-generic-ifxetex
3463 texlive-generic-pdftex
3464 texlive-latex-amsfonts
3465 texlive-latex-capt-of
3466 texlive-latex-cmap
3467 texlive-latex-environ
3468 texlive-latex-eqparbox
3469 texlive-latex-etoolbox
3470 texlive-latex-expdlist
3471 texlive-latex-fancyhdr
3472 texlive-latex-fancyvrb
3473 texlive-latex-fncychap
3474 texlive-latex-float
3475 texlive-latex-framed
3476 texlive-latex-geometry
3477 texlive-latex-graphics
3478 texlive-latex-hyperref
3479 texlive-latex-mdwtools
3480 texlive-latex-multirow
3481 texlive-latex-needspace
3482 texlive-latex-oberdiek
3483 texlive-latex-parskip
3484 texlive-latex-preview
3485 texlive-latex-tabulary
3486 texlive-latex-threeparttable
3487 texlive-latex-titlesec
3488 texlive-latex-trimspaces
3489 texlive-latex-ucs
3490 texlive-latex-upquote
3491 texlive-latex-url
3492 texlive-latex-varwidth
3493 texlive-latex-wrapfig)))
3494 ("texinfo" ,texinfo)
3495 ("perl" ,perl)
3496 ("scipy-sphinx-theme"
3497 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3498 (method git-fetch)
3499 (uri (git-reference
3500 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3501 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3502 (sha256
3503 (base32
3504 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3505 ,@(package-native-inputs python-numpy)))
3506 (arguments
3507 `(#:tests? #f ; we're only generating the documentation
3508 #:phases
3509 (modify-phases %standard-phases
3510 (delete 'build)
3511 (replace 'install
3512 (lambda* (#:key inputs outputs #:allow-other-keys)
3513 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3514 (doc (string-append
3515 data "/doc/" ,name "-"
3516 ,(package-version python-numpy)))
3517 (info-reader (string-append data "/info"))
3518 (html (string-append doc "/html"))
3519 (scipy-sphinx-theme "scipy-sphinx-theme")
3520 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3521 (pyver ,(string-append "PYVER=")))
3522
3523 ;; FIXME: this is needed to for texlive-union to generate
3524 ;; fonts, which are not found.
3525 (setenv "HOME" "/tmp")
3526
3527 (with-directory-excursion "doc"
3528 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3529 (mkdir-p html)
4fc898da
RW
3530 (invoke "make" "html" pyver)
3531 (invoke "make" "latex" "PAPER=a4" pyver)
3532 (invoke "make" "-C" "build/latex"
44d10b1f
RW
3533 "all-pdf" "PAPER=a4" pyver)
3534 ;; FIXME: Generation of the info file fails.
4fc898da 3535 ;; (invoke "make" "info" pyver)
44d10b1f
RW
3536 ;; (mkdir-p info)
3537 ;; (copy-file "build/texinfo/numpy.info"
3538 ;; (string-append info "/numpy.info"))
3539 (for-each (lambda (file)
3540 (copy-file (string-append "build/latex" file)
3541 (string-append doc file)))
3542 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3543 (with-directory-excursion "build/html"
3544 (for-each (lambda (file)
3545 (let* ((dir (dirname file))
3546 (tgt-dir (string-append html "/" dir)))
3547 (unless (equal? "." dir)
3548 (mkdir-p tgt-dir))
3549 (install-file file html)))
3550 (find-files "." ".*")))))
3551 #t)))))
3552 (home-page (package-home-page python-numpy))
3553 (synopsis "Documentation for the python-numpy package")
3554 (description (package-description python-numpy))
3555 (license (package-license python-numpy))))
3556
3557(define-public python2-numpy-documentation
3558 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3559 (package
3560 (inherit numpy-documentation)
3561 (native-inputs `(("python2-functools32" ,python2-functools32)
3562 ,@(package-native-inputs numpy-documentation))))))
3563
3564(define-public python-pygit2
3565 (package
3566 (name "python-pygit2")
dac8b275 3567 (version "0.28.2")
44d10b1f
RW
3568 (source
3569 (origin
3570 (method url-fetch)
3571 (uri (pypi-uri "pygit2" version))
3572 (sha256
dac8b275 3573 (base32 "11kzj5mjkspvplnpdb6bj8dcj6rgmkk986k8hjcklyg5yaxkz32d"))))
44d10b1f
RW
3574 (build-system python-build-system)
3575 (arguments
c3ecab0d 3576 '(#:tests? #f)) ; tests don't run correctly in our environment
44d10b1f
RW
3577 (propagated-inputs
3578 `(("python-six" ,python-six)
3579 ("python-cffi" ,python-cffi)
3580 ("libgit2" ,libgit2)
3581 ("python-tox" ,python-tox)))
3582 (native-inputs
3583 `(("python-pytest" ,python-pytest)))
3584 (home-page "https://github.com/libgit2/pygit2")
3585 (synopsis "Python bindings for libgit2")
3586 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3587library, libgit2 implements Git plumbing.")
3588 ;; GPL2.0 only, with linking exception.
3589 (license license:gpl2)))
3590
3591(define-public python2-pygit2
3592 (package-with-python2 python-pygit2))
3593
3594(define-public python-pyparsing
3595 (package
3596 (name "python-pyparsing")
6d3cff5a 3597 (version "2.3.1")
44d10b1f
RW
3598 (source
3599 (origin
3600 (method url-fetch)
3601 (uri (pypi-uri "pyparsing" version))
3602 (sha256
6d3cff5a 3603 (base32 "0yk6xl885b91dmlhlsap7x78hk2rdr879fln9anbq6k4ca42djb6"))))
44d10b1f
RW
3604 (build-system python-build-system)
3605 (outputs '("out" "doc"))
3606 (arguments
3607 `(#:tests? #f ; no test target
3608 #:phases
3609 (modify-phases %standard-phases
3610 (add-after 'install 'install-doc
3611 (lambda* (#:key outputs #:allow-other-keys)
3612 (let* ((doc (string-append (assoc-ref outputs "doc")
3613 "/share/doc/" ,name "-" ,version))
3614 (html-doc (string-append doc "/html"))
3615 (examples (string-append doc "/examples")))
3616 (mkdir-p html-doc)
3617 (mkdir-p examples)
3618 (for-each
3619 (lambda (dir tgt)
3620 (map (lambda (file)
3621 (install-file file tgt))
3622 (find-files dir ".*")))
3623 (list "docs" "htmldoc" "examples")
3624 (list doc html-doc examples))
3625 #t))))))
3626 (home-page "https://github.com/pyparsing/pyparsing")
3627 (synopsis "Python parsing class library")
3628 (description
3629 "The pyparsing module is an alternative approach to creating and
3630executing simple grammars, vs. the traditional lex/yacc approach, or the use
3631of regular expressions. The pyparsing module provides a library of classes
3632that client code uses to construct the grammar directly in Python code.")
3633 (license license:expat)))
3634
3635(define-public python2-pyparsing
3636 (package-with-python2 python-pyparsing))
3637
3638(define-public python-numpydoc
3639 (package
3640 (name "python-numpydoc")
3641 (version "0.8.0")
3642 (source
3643 (origin
3644 (method url-fetch)
3645 (uri (pypi-uri "numpydoc" version))
3646 (sha256
3647 (base32
3648 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
3649 (build-system python-build-system)
3650 (propagated-inputs
3651 `(("python-sphinx" ,python-sphinx)))
3652 (native-inputs
3653 `(("python-nose" ,python-nose)))
3654 (home-page "https://pypi.python.org/pypi/numpydoc")
3655 (synopsis
3656 "Numpy's Sphinx extensions")
3657 (description
3658 "Sphinx extension to support docstrings in Numpy format.")
3659 (license license:bsd-2)))
3660
3661(define-public python2-numpydoc
3662 (package-with-python2 python-numpydoc))
3663
3664(define-public python-numexpr
3665 (package
3666 (name "python-numexpr")
3667 (version "2.6.5")
3668 (source
3669 (origin
3670 (method url-fetch)
3671 (uri (pypi-uri "numexpr" version))
3672 (sha256
3673 (base32
3674 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3675 (build-system python-build-system)
3676 (arguments `(#:tests? #f)) ; no tests included
3677 (propagated-inputs
3678 `(("python-numpy" ,python-numpy)))
3679 (home-page "https://github.com/pydata/numexpr")
3680 (synopsis "Fast numerical expression evaluator for NumPy")
3681 (description
3682 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3683expressions that operate on arrays are accelerated and use less memory than
3684doing the same calculation in Python. In addition, its multi-threaded
3685capabilities can make use of all your cores, which may accelerate
3686computations, most specially if they are not memory-bounded (e.g. those using
3687transcendental functions).")
3688 (license license:expat)))
3689
3690(define-public python2-numexpr
3691 (package-with-python2 python-numexpr))
3692
3693(define-public python-cycler
3694 (package
3695 (name "python-cycler")
3696 (version "0.10.0")
3697 (source (origin
3698 (method url-fetch)
3699 (uri (pypi-uri "cycler" version))
3700 (sha256
3701 (base32
3702 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3703 (build-system python-build-system)
3704 (arguments
3705 ;; XXX: The current version requires 'coveralls' which we don't have.
3706 ;; Enable this for the next release which uses 'python-pytest'.
3707 '(#:tests? #f))
3708 (propagated-inputs
3709 `(("python-six" ,python-six)))
3710 (home-page "http://matplotlib.org/cycler/")
3711 (synopsis "Composable keyword argument iterator")
3712 (description
3713 "When using @code{matplotlib} and plotting more than one line, it is
3714common to want to be able to want to be able to cycle over one or more artist
3715styles; but the plotting logic can quickly become involved.
3716To address this and enable easy cycling over arbitrary @code{kwargs}, the
3717@code{Cycler} class was developed.")
3718 (license license:bsd-3)))
3719
3720(define-public python2-cycler
3721 (package-with-python2 python-cycler))
3722
3723(define-public python-colorspacious
3724 (package
3725 (name "python-colorspacious")
3726 (version "1.1.0")
3727 (source
dee92e65
TGR
3728 (origin
3729 (method git-fetch)
3730 (uri (git-reference
3731 (url "https://github.com/njsmith/colorspacious.git")
3732 (commit (string-append "v" version))))
3733 (file-name (git-file-name name version))
3734 (sha256
3735 (base32 "0g0lxqiscy5g5rq9421vv7abg0c90jzy0zmas2z3hya6k2dr5aid"))))
44d10b1f
RW
3736 (build-system python-build-system)
3737 (propagated-inputs
3738 `(("python-numpy" ,python-numpy)))
3739 (native-inputs
3740 `(("python-nose" ,python-nose)))
3741 (arguments
3742 `(#:phases
3743 (modify-phases %standard-phases
3744 (replace 'check
3745 (lambda _
c988afda 3746 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
44d10b1f
RW
3747 (home-page "https://github.com/njsmith/colorspacious")
3748 (synopsis "Python library for colorspace conversions")
3749 (description "@code{colorspacious} is a Python library that lets you
3750convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3751 (license license:expat)))
3752
3753(define-public python2-colorspacious
3754 (package-with-python2 python-colorspacious))
3755
3756(define-public python-matplotlib
3757 (package
3758 (name "python-matplotlib")
3759 (version "2.2.3")
3760 (source
3761 (origin
3762 (method url-fetch)
3763 (uri (pypi-uri "matplotlib" version))
3764 (sha256
3765 (base32
3766 "1rcc7x9ig3hpchkc4cwdvym3y451w74275fxr455zkfagrsvymbk"))))
3767 (build-system python-build-system)
3768 (propagated-inputs ; the following packages are all needed at run time
3769 `(("python-cycler" ,python-cycler)
3770 ("python-kiwisolver" ,python-kiwisolver)
3771 ("python-pyparsing" ,python-pyparsing)
3772 ("python-pygobject" ,python-pygobject)
3773 ("gobject-introspection" ,gobject-introspection)
3774 ("python-tkinter" ,python "tk")
3775 ("python-dateutil" ,python-dateutil)
3776 ("python-numpy" ,python-numpy)
3777 ("python-pillow" ,python-pillow)
3778 ("python-pytz" ,python-pytz)
3779 ("python-six" ,python-six)
3780 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3781 ;; from 'gtk+') provides the required 'typelib' files used by
3782 ;; 'gobject-introspection'. The location of these files is set with the
3783 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3784 ;; is done automatically by a 'native-search-path' procedure. However,
3785 ;; at run-time the user must set this variable as follows:
3786 ;;
3787 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
3788 ("gtk+" ,gtk+)
3789 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3790 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3791 ;; object. For this reason we need to import both libraries.
3792 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3793 ("python-pycairo" ,python-pycairo)
3794 ;; XXX: qtwebkit cannot be built reliably.
3795 ("python-pyqt" ,python-pyqt-without-qtwebkit)
3796 ("python-cairocffi" ,python-cairocffi)))
3797 (inputs
3798 `(("libpng" ,libpng)
3799 ("imagemagick" ,imagemagick)
3800 ("freetype" ,freetype)
3801 ("cairo" ,cairo)
3802 ("glib" ,glib)
3803 ;; FIXME: Add backends when available.
3804 ;("python-wxpython" ,python-wxpython)
3805 ("tcl" ,tcl)
3806 ("tk" ,tk)))
3807 (native-inputs
3808 `(("pkg-config" ,pkg-config)
3809 ("python-nose" ,python-nose)
3810 ("python-mock" ,python-mock)))
3811 (arguments
3812 `(#:phases
3813 (modify-phases %standard-phases
3814 (add-before 'build 'configure-environment
3815 (lambda* (#:key outputs inputs #:allow-other-keys)
3816 (let ((cairo (assoc-ref inputs "cairo"))
3817 (gtk+ (assoc-ref inputs "gtk+")))
3818 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3819 ;; has not effect.
3820 (setenv "LD_LIBRARY_PATH"
3821 (string-append cairo "/lib:" gtk+ "/lib"))
3822 (setenv "HOME" (getcwd))
3823 (call-with-output-file "setup.cfg"
3824 (lambda (port)
3825 (format port "[directories]~%
3826basedirlist = ~a,~a~%
3827 [rc_options]~%
3828backend = TkAgg~%"
3829 (assoc-ref inputs "tcl")
3830 (assoc-ref inputs "tk")))))
3831 #t)))))
3832 (home-page "http://matplotlib.org")
3833 (synopsis "2D plotting library for Python")
3834 (description
3835 "Matplotlib is a Python 2D plotting library which produces publication
3836quality figures in a variety of hardcopy formats and interactive environments
3837across platforms. Matplotlib can be used in Python scripts, the python and
3838ipython shell, web application servers, and six graphical user interface
3839toolkits.")
3840 (license license:psfl)
3841 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3842
3843(define-public python2-matplotlib
3844 (let ((matplotlib (package-with-python2
3845 (strip-python2-variant python-matplotlib))))
3846 (package (inherit matplotlib)
3847 ;; Make sure to use special packages for Python 2 instead
3848 ;; of those automatically rewritten by package-with-python2.
3849 (propagated-inputs
3850 `(("python2-pycairo" ,python2-pycairo)
3851 ("python2-backports-functools-lru-cache"
3852 ,python2-backports-functools-lru-cache)
3853 ("python2-functools32" ,python2-functools32)
3854 ("python2-pygobject-2" ,python2-pygobject-2)
3855 ("python2-subprocess32" ,python2-subprocess32)
3856 ("python2-tkinter" ,python-2 "tk")
3857 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3858 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
3859
3860(define-public python-matplotlib-documentation
3861 (package
3862 (name "python-matplotlib-documentation")
3863 (version (package-version python-matplotlib))
3864 (source (package-source python-matplotlib))
3865 (build-system python-build-system)
3866 (native-inputs
3867 `(("python-matplotlib" ,python-matplotlib)
3868 ("python-colorspacious" ,python-colorspacious)
3869 ("python-sphinx" ,python-sphinx)
3870 ("python-sphinx-gallery" ,python-sphinx-gallery)
3871 ("python-numpydoc" ,python-numpydoc)
3872 ("python-ipython" ,python-ipython)
e7a53914 3873 ("python-ipykernel" ,python-ipykernel)
44d10b1f
RW
3874 ("python-mock" ,python-mock)
3875 ("graphviz" ,graphviz)
e7a53914
RW
3876 ("texlive" ,(texlive-union (list texlive-latex-amsfonts
3877 texlive-latex-amsmath
3878 texlive-latex-enumitem
3879 texlive-latex-expdlist
3880 texlive-latex-geometry
3881 texlive-latex-preview
3882 texlive-latex-type1cm
3883 texlive-latex-ucs
3884
3885 texlive-generic-pdftex
3886
3887 texlive-fonts-amsfonts
3888 texlive-fonts-ec
3889 texlive-fonts-adobe-times
3890 texlive-fonts-txfonts)))
44d10b1f
RW
3891 ("texinfo" ,texinfo)
3892 ,@(package-native-inputs python-matplotlib)))
3893 (arguments
3894 `(#:tests? #f ; we're only generating documentation
3895 #:phases
3896 (modify-phases %standard-phases
3897 (replace 'build
3898 (lambda _
3899 (chdir "doc")
e7a53914
RW
3900 (setenv "PYTHONPATH"
3901 (string-append (getenv "PYTHONPATH")
3902 ":" (getcwd) "/../examples/units"))
44d10b1f 3903 (substitute* "conf.py"
e7a53914
RW
3904 ;; Don't use git.
3905 (("^SHA = check_output.*")
3906 (string-append "SHA = \"" ,version "\"\n"))
3907 ;; Don't fetch intersphinx files from the Internet
3908 (("^explicit_order_folders" m)
3909 (string-append "intersphinx_mapping = {}\n" m))
3910 (("'sphinx.ext.intersphinx',") "")
3911 ;; Disable URL embedding which requires internet access.
3912 (("'https://docs.scipy.org/doc/numpy'") "None")
3913 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
3914 (invoke "make"
3915 "SPHINXBUILD=sphinx-build"
3916 "SPHINXOPTS=" ; don't abort on warnings
3917 "html" "texinfo")))
44d10b1f
RW
3918 (replace 'install
3919 (lambda* (#:key inputs outputs #:allow-other-keys)
3920 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3921 (doc (string-append data "/doc/python-matplotlib-" ,version))
3922 (info (string-append data "/info"))
3923 (html (string-append doc "/html")))
3924 (mkdir-p html)
3925 (mkdir-p info)
3926 (copy-recursively "build/html" html)
3927 (symlink (string-append html "/_images")
3928 (string-append info "/matplotlib-figures"))
3929 (with-directory-excursion "build/texinfo"
3930 (substitute* "matplotlib.texi"
3931 (("@image\\{([^,]*)" all file)
3932 (string-append "@image{matplotlib-figures/" file)))
3933 (symlink (string-append html "/_images")
3934 "./matplotlib-figures")
e7a53914
RW
3935 (invoke "makeinfo" "--no-split"
3936 "-o" "matplotlib.info" "matplotlib.texi"))
3937 (install-file "build/texinfo/matplotlib.info" info))
44d10b1f
RW
3938 #t)))))
3939 (home-page (package-home-page python-matplotlib))
3940 (synopsis "Documentation for the python-matplotlib package")
3941 (description (package-description python-matplotlib))
3942 (license (package-license python-matplotlib))))
3943
3944(define-public python2-matplotlib-documentation
3945 (package-with-python2 python-matplotlib-documentation))
3946
55dae98f
RW
3947(define-public python-matplotlib-venn
3948 (package
3949 (name "python-matplotlib-venn")
3950 (version "0.11.5")
3951 (source
3952 (origin
3953 (method url-fetch)
3954 (uri (pypi-uri "matplotlib-venn" version ".zip"))
3955 (sha256
3956 (base32
3957 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
3958 (build-system python-build-system)
3959 (arguments '(#:tests? #f)) ; tests are not included
3960 (propagated-inputs
3961 `(("python-matplotlib" ,python-matplotlib)
3962 ("python-numpy" ,python-numpy)
3963 ("python-scipy" ,python-scipy)))
3964 (native-inputs
3965 `(("unzip" ,unzip)))
3966 (home-page "https://github.com/konstantint/matplotlib-venn")
3967 (synopsis "Plot area-proportional Venn diagrams")
3968 (description
3969 "This package provides tools for plotting area-proportional two- and
3970three-way Venn diagrams in @code{matplotlib}.")
3971 (license license:expat)))
3972
44d10b1f
RW
3973(define-public python2-pysnptools
3974 (package
3975 (name "python2-pysnptools")
5d1ade85 3976 (version "0.3.13")
44d10b1f
RW
3977 (source
3978 (origin
3979 (method url-fetch)
5d1ade85 3980 (uri (pypi-uri "pysnptools" version))
44d10b1f
RW
3981 (sha256
3982 (base32
5d1ade85 3983 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
44d10b1f
RW
3984 (build-system python-build-system)
3985 (arguments
5d1ade85
RW
3986 `(#:python ,python-2 ; only Python 2.7 is supported
3987 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
44d10b1f
RW
3988 (propagated-inputs
3989 `(("python2-numpy" ,python2-numpy)
3990 ("python2-scipy" ,python2-scipy)
3991 ("python2-pandas" ,python2-pandas)))
44d10b1f 3992 (native-inputs
5d1ade85 3993 `(("python2-cython" ,python2-cython)))
1b66989b 3994 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
44d10b1f
RW
3995 (synopsis "Library for reading and manipulating genetic data")
3996 (description
3997 "PySnpTools is a library for reading and manipulating genetic data. It
3998can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
3999those files. It can also efficiently manipulate ranges of integers using set
4000operators such as union, intersection, and difference.")
4001 (license license:asl2.0)))
4002
4003(define-public python-scipy
4004 (package
4005 (name "python-scipy")
5cfc1632 4006 (version "1.2.2")
44d10b1f
RW
4007 (source
4008 (origin
4009 (method url-fetch)
4010 (uri (pypi-uri "scipy" version))
4011 (sha256
4012 (base32
5cfc1632 4013 "1cgvgin8fvckv96hjh3ikmwkra5rif51bdb75ifzf7xbil5iwcx4"))))
44d10b1f
RW
4014 (build-system python-build-system)
4015 (propagated-inputs
4016 `(("python-numpy" ,python-numpy)
4017 ("python-matplotlib" ,python-matplotlib)
4018 ("python-pyparsing" ,python-pyparsing)))
4019 (inputs
4020 `(("lapack" ,lapack)
4021 ("openblas" ,openblas)))
4022 (native-inputs
4023 `(("python-cython" ,python-cython)
4024 ("python-pytest" ,python-pytest)
4025 ("python-sphinx" ,python-sphinx)
4026 ("python-numpydoc" ,python-numpydoc)
4027 ("gfortran" ,gfortran)
4028 ("perl" ,perl)
4029 ("which" ,which)))
4030 (outputs '("out" "doc"))
4031 (arguments
4032 `(#:phases
4033 (modify-phases %standard-phases
4034 (add-after 'unpack 'disable-broken-tests
4035 (lambda _
4036 (substitute* "scipy/sparse/linalg/dsolve/tests/test_linsolve.py"
4037 (("^( +)def test_threads_parallel\\(self\\):" m indent)
4038 (string-append indent
4039 "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
4040 m)))
4041 (substitute* "scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py"
4042 (("^def test_parallel_threads\\(\\):" m)
4043 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
4044 m)))
4045 #t))
4046 (add-before 'build 'configure-openblas
4047 (lambda* (#:key inputs #:allow-other-keys)
4048 (call-with-output-file "site.cfg"
4049 (lambda (port)
4050 (format port
4051 "[blas]
4052libraries = openblas
4053library_dirs = ~a/lib
4054include_dirs = ~a/include
4055
4056# backslash-n to make emacs happy
4057\n[atlas]
4058library_dirs = ~a/lib
4059atlas_libs = openblas
4060"
4061 (assoc-ref inputs "openblas")
4062 (assoc-ref inputs "openblas")
4063 (assoc-ref inputs "openblas"))))
4064 #t))
4065 (add-after 'install 'install-doc
4066 (lambda* (#:key inputs outputs #:allow-other-keys)
4067 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4068 (doc (string-append data "/doc/" ,name "-" ,version))
4069 (html (string-append doc "/html"))
4070 (pyver ,(string-append "PYVER=" (version-major+minor
4071 (package-version python))))
4072 ;; By default it tries to run sphinx-build through the Python
4073 ;; interpreter which won't work with our shell wrapper.
4074 (sphinxbuild "SPHINXBUILD=LANG=C sphinx-build"))
4075 ;; Make installed package available for building the
4076 ;; documentation
4077 (add-installed-pythonpath inputs outputs)
4078 (with-directory-excursion "doc"
4079 ;; Fix generation of images for mathematical expressions.
4080 (substitute* (find-files "source" "conf\\.py")
4081 (("pngmath_use_preview = True")
4082 "pngmath_use_preview = False"))
4083 (mkdir-p html)
4084 (invoke "make" "html" pyver sphinxbuild)
4085 (with-directory-excursion "build/html"
4086 (for-each (lambda (file)
4087 (let* ((dir (dirname file))
4088 (tgt-dir (string-append html "/" dir)))
4089 (install-file file html)))
4090 (find-files "." ".*")))))
4091 #t))
4092 ;; Tests can only be run after the library has been installed and not
4093 ;; within the source directory.
4094 (delete 'check)
4095 (add-after 'install 'check
4096 (lambda* (#:key inputs outputs #:allow-other-keys)
4097 (add-installed-pythonpath inputs outputs)
4098 (with-directory-excursion "/tmp"
4099 (invoke "python" "-c"
4100 "import scipy; scipy.test(verbose=2)")))))))
4101 (home-page "https://www.scipy.org/")
4102 (synopsis "The Scipy library provides efficient numerical routines")
4103 (description "The SciPy library is one of the core packages that make up
4104the SciPy stack. It provides many user-friendly and efficient numerical
4105routines such as routines for numerical integration and optimization.")
4106 (properties `((python2-variant . ,(delay python2-scipy))))
4107 (license license:bsd-3)))
4108
4109(define-public python2-scipy
4110 (package-with-python2
4111 (strip-python2-variant python-scipy)))
4112
4113(define-public python-socksipy-branch
4114 (package
4115 (name "python-socksipy-branch")
4116 (version "1.01")
4117 (source
4118 (origin
4119 (method url-fetch)
4120 (uri (pypi-uri "SocksiPy-branch" version))
4121 (sha256
4122 (base32
4123 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4124 (build-system python-build-system)
4125 (arguments
4126 `(#:tests? #f)) ; There are no tests
4127 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4128 (synopsis "Python SOCKS module")
4129 (description
4130 "SocksiPy - A Python SOCKS client module. It provides a
4131socket-like interface that supports connections to any TCP
4132service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4133The original version was developed by Dan Haim, this is a
4134branch created by Mario Vilas to address some open issues,
4135as the original project seems to have been abandoned circa 2007.")
4136 (license license:bsd-3)))
4137
4138(define-public python2-socksipy-branch
4139 (package-with-python2 python-socksipy-branch))
4140
4141(define-public python-pycodestyle
4142 (package
4143 (name "python-pycodestyle")
4144 (version "2.4.0")
4145 (source
4146 (origin
4147 (method url-fetch)
4148 (uri (pypi-uri "pycodestyle" version))
4149 (sha256
4150 (base32
4151 "0fhy4vnlgpjq4qd1wdnl6pvdw7rah0ypmn8c9mkhz8clsndskz6b"))))
4152 (build-system python-build-system)
4153 (home-page "https://pycodestyle.readthedocs.io/")
4154 (synopsis "Python style guide checker")
4155 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4156Python code against some of the style conventions in
4157@url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4158 (license license:expat)))
4159
4160(define-public python2-pycodestyle
4161 (package-with-python2 python-pycodestyle))
4162
4163(define-public python-multidict
4164 (package
4165 (name "python-multidict")
4166 (version "4.2.0")
4167 (source
4168 (origin
4169 (method url-fetch)
4170 (uri (pypi-uri "multidict" version))
4171 (sha256
4172 (base32
4173 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
4174 (build-system python-build-system)
4175 (native-inputs
4176 `(("python-pytest" ,python-pytest)
4177 ("python-pytest-runner" ,python-pytest-runner)))
4178 (home-page "https://github.com/aio-libs/multidict/")
4179 (synopsis "Multidict implementation")
4180 (description "Multidict is dict-like collection of key-value pairs
4181where key might be occurred more than once in the container.")
4182 (license license:asl2.0)))
4183
4184(define-public python-orderedmultidict
4185 (package
4186 (name "python-orderedmultidict")
4187 (version "0.7.11")
4188 (source
4189 (origin
4190 (method url-fetch)
4191 (uri (pypi-uri "orderedmultidict" version))
4192 (sha256
4193 (base32
4194 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4195 (build-system python-build-system)
4196 (arguments
4197 `(#:phases
4198 (modify-phases %standard-phases
4199 (add-after 'unpack 'fix-tests
4200 (lambda _
4201 ;; The package uses nosetest for running the tests.
4202 ;; Adding this initfile allows to run the test suite
4203 ;; without requiring nosetest.
d1c4f329
RW
4204 (with-output-to-file "tests/__init__.py" newline)
4205 #t)))))
44d10b1f
RW
4206 (propagated-inputs
4207 `(("python-six" ,python-six)))
4208 (native-inputs
4209 `(("python-pycodestyle" ,python-pycodestyle)))
4210 (home-page "https://github.com/gruns/orderedmultidict")
4211 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4212 (description "This package contains a library for ordered multivalue
4213dictionaries. A multivalue dictionary is a dictionary that can store
4214multiple values for the same key. An ordered multivalue dictionary is a
4215multivalue dictionary that retains the order of insertions and deletions.")
4216 (license license:unlicense)))
4217
4218(define-public python2-orderedmultidict
4219 (package-with-python2 python-orderedmultidict))
4220
4221(define-public python-autopep8
4222 (package
4223 (name "python-autopep8")
4224 (version "1.3.5")
4225 (source
4226 (origin
4227 (method url-fetch)
4228 (uri (pypi-uri "autopep8" version))
4229 (sha256
4230 (base32
4231 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
4232 (build-system python-build-system)
4233 (propagated-inputs
4234 `(("python-pycodestyle" ,python-pycodestyle)))
4235 (home-page "https://github.com/hhatto/autopep8")
4236 (synopsis "Format Python code according to the PEP 8 style guide")
4237 (description
4238 "@code{autopep8} automatically formats Python code to conform to
4239the PEP 8 style guide. It uses the pycodestyle utility to determine
4240what parts of the code needs to be formatted. @code{autopep8} is
4241capable of fixing most of the formatting issues that can be reported
4242by pycodestyle.")
4243 (license (license:non-copyleft
4244 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4245
4246(define-public python2-autopep8
4247 (package-with-python2 python-autopep8))
4248
4249(define-public python-distutils-extra
4250 (package
4251 (name "python-distutils-extra")
4252 (version "2.38")
4253 (source
4254 (origin
4255 (method url-fetch)
4256 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4257 version "/+download/python-distutils-extra-"
4258 version ".tar.gz"))
4259 (sha256
4260 (base32
4261 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4262 (build-system python-build-system)
4263 (home-page "https://launchpad.net/python-distutils-extra/")
4264 (synopsis "Enhancements to Python's distutils")
4265 (description
4266 "The python-distutils-extra module enables you to easily integrate
4267gettext support, themed icons, and scrollkeeper-based documentation into
4268Python's distutils.")
4269 (license license:gpl2)))
4270
4271(define-public python2-distutils-extra
4272 (package-with-python2 python-distutils-extra))
4273
4274(define-public python2-elib.intl
4275 (package
4276 (name "python2-elib.intl")
4277 (version "0.0.3")
4278 (source
4279 (origin
4280 ;; This project doesn't tag releases or publish tarballs, so we take
4281 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4282 (method git-fetch)
4283 (uri (git-reference
4284 (url "https://github.com/dieterv/elib.intl.git")
4285 (commit "d09997cfef")))
4286 (file-name (string-append name "-" version "-checkout"))
4287 (sha256
4288 (base32
4289 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4290 (build-system python-build-system)
4291 (arguments
4292 ;; incompatible with Python 3 (exception syntax)
4293 `(#:python ,python-2
4294 #:tests? #f))
4295 (home-page "https://github.com/dieterv/elib.intl")
4296 (synopsis "Enhanced internationalization for Python")
4297 (description
4298 "The elib.intl module provides enhanced internationalization (I18N)
4299services for your Python modules and applications.")
4300 (license license:lgpl3+)))
4301
4302(define-public python-olefile
4303 (package
4304 (name "python-olefile")
5bef0f10 4305 (version "0.46")
44d10b1f
RW
4306 (source
4307 (origin
4308 (method url-fetch)
5bef0f10
MB
4309 (uri (string-append "https://github.com/decalage2/olefile/releases/"
4310 "download/v" version "/olefile-" version ".tar.gz"))
44d10b1f
RW
4311 (file-name (string-append name "-" version ".tar.gz"))
4312 (sha256
4313 (base32
5bef0f10 4314 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
44d10b1f 4315 (build-system python-build-system)
5bef0f10 4316 (home-page "https://www.decalage.info/python/olefileio")
44d10b1f
RW
4317 (synopsis "Read and write Microsoft OLE2 files.")
4318 (description
4319 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
4320Storage or Compound Document, Microsoft Office). It is an improved version of
4321the OleFileIO module from PIL, the Python Image Library.")
4322 (license license:bsd-3)))
4323
4324(define-public python2-olefile
4325 (package-with-python2 python-olefile))
4326
4327(define-public python-pillow
4328 (package
4329 (name "python-pillow")
4330 (version "5.4.1")
4331 (source
4332 (origin
4333 (method url-fetch)
4334 (uri (pypi-uri "Pillow" version))
4335 (sha256
4336 (base32
4337 "17waygkhhzjd75kajlfw9v57mbb41lcpg6cvkdijqd7smm76ccsj"))))
4338 (build-system python-build-system)
4339 (native-inputs
4340 `(("python-pytest" ,python-pytest)))
4341 (inputs
4342 `(("freetype" ,freetype)
4343 ("lcms" ,lcms)
4344 ("zlib" ,zlib)
4345 ("libjpeg" ,libjpeg)
4346 ("openjpeg" ,openjpeg)
4347 ("libtiff" ,libtiff)
4348 ("libwebp" ,libwebp)))
4349 (propagated-inputs
4350 `(("python-olefile" ,python-olefile)))
4351 (arguments
4352 `(#:phases
4353 (modify-phases %standard-phases
4354 (add-after 'unpack 'patch-ldconfig
4355 (lambda _
4356 (substitute* "setup.py"
4357 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
4358 (delete 'check) ; We must run checks after python-pillow is installed.
4359 (add-after 'install 'check-installed
4360 (lambda* (#:key outputs inputs #:allow-other-keys)
4361 (begin
4362 (setenv "HOME" (getcwd))
4363 ;; Make installed package available for running the tests.
4364 (add-installed-pythonpath inputs outputs)
4365 (invoke "python" "selftest.py" "--installed")
4366 (invoke "python" "-m" "pytest" "-vv")))))))
4367 (home-page "https://python-pillow.org")
4368 (synopsis "Fork of the Python Imaging Library")
4369 (description
4370 "The Python Imaging Library adds image processing capabilities to your
4371Python interpreter. This library provides extensive file format support, an
4372efficient internal representation, and fairly powerful image processing
4373capabilities. The core image library is designed for fast access to data
4374stored in a few basic pixel formats. It should provide a solid foundation for
4375a general image processing tool.")
4376 (license (license:x11-style
4377 "http://www.pythonware.com/products/pil/license.htm"
4378 "The PIL Software License"))))
4379
4380(define-public python2-pillow
4381 (package-with-python2 python-pillow))
4382
4383(define-public python-pycparser
4384 (package
4385 (name "python-pycparser")
4386 (version "2.18")
4387 (source
4388 (origin
4389 (method url-fetch)
4390 (uri (pypi-uri "pycparser" version))
4391 (sha256
4392 (base32
4393 "09mjyw82ibqzl449g7swy8bfxnfpmas0815d2rkdjlcqw81wma4r"))))
4394 (outputs '("out" "doc"))
4395 (build-system python-build-system)
4396 (native-inputs
4397 `(("pkg-config" ,pkg-config)))
4398 (arguments
4399 `(#:phases
4400 (modify-phases %standard-phases
4401 (replace 'check
4402 (lambda _
4403 (with-directory-excursion "tests"
acb75c03
RW
4404 (invoke "python" "all_tests.py"))
4405 #t))
44d10b1f
RW
4406 (add-after 'install 'install-doc
4407 (lambda* (#:key outputs #:allow-other-keys)
4408 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4409 (doc (string-append data "/doc/" ,name "-" ,version))
4410 (examples (string-append doc "/examples")))
4411 (mkdir-p examples)
4412 (for-each (lambda (file)
4413 (copy-file (string-append "." file)
4414 (string-append doc file)))
4415 '("/README.rst" "/CHANGES" "/LICENSE"))
4416 (copy-recursively "examples" examples)))))))
4417 (home-page "https://github.com/eliben/pycparser")
4418 (synopsis "C parser in Python")
4419 (description
4420 "Pycparser is a complete parser of the C language, written in pure Python
4421using the PLY parsing library. It parses C code into an AST and can serve as
4422a front-end for C compilers or analysis tools.")
4423 (license license:bsd-3)))
4424
4425(define-public python2-pycparser
4426 (package-with-python2 python-pycparser))
4427
4428(define-public python-pywavelets
4429 (package
4430 (name "python-pywavelets")
4431 (version "1.0.1")
4432 (home-page "https://github.com/PyWavelets/pywt")
4433 (source (origin
4434 (method url-fetch)
4435 (uri (pypi-uri "PyWavelets" version))
4436 (sha256
4437 (base32
4438 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
4439 (build-system python-build-system)
4440 (arguments
4441 '(#:modules ((ice-9 ftw)
4442 (srfi srfi-1)
4443 (srfi srfi-26)
4444 (guix build utils)
4445 (guix build python-build-system))
4446 #:phases (modify-phases %standard-phases
4447 (replace 'check
4448 (lambda _
4449 (let ((cwd (getcwd))
4450 (libdir (find (cut string-prefix? "lib." <>)
4451 (scandir "build"))))
4452 (with-directory-excursion (string-append cwd "/build/" libdir)
4453 (invoke "nosetests" "-v" "."))))))))
4454 (native-inputs
4455 `(("python-matplotlib" ,python-matplotlib) ;for tests
4456 ("python-nose" ,python-nose)))
4457 (propagated-inputs
4458 `(("python-numpy" ,python-numpy)))
4459 (synopsis "Wavelet transforms in Python")
4460 (description
4461 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
4462mathematical basis functions that are localized in both time and frequency.
4463Wavelet transforms are time-frequency transforms employing wavelets. They are
4464similar to Fourier transforms, the difference being that Fourier transforms are
4465localized only in frequency instead of in time and frequency.")
4466 (license license:expat)))
4467
4468(define-public python2-pywavelets
4469 (package-with-python2 python-pywavelets))
4470
4471(define-public python-xcffib
4472 (package
4473 (name "python-xcffib")
4474 (version "0.6.0")
4475 (source
4476 (origin
4477 (method url-fetch)
4478 (uri (pypi-uri "xcffib" version))
4479 (sha256
4480 (base32
4481 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
4482 (build-system python-build-system)
4483 (inputs
4484 `(("libxcb" ,libxcb)))
4485 (propagated-inputs
4486 `(("python-cffi" ,python-cffi) ; used at run time
4487 ("python-six" ,python-six)))
4488 (arguments
4489 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4490 #:tests? #f
4491 #:phases
4492 (modify-phases %standard-phases
4493 (add-after 'unpack 'fix-libxcb-path
4494 (lambda* (#:key inputs #:allow-other-keys)
4495 (let ((libxcb (assoc-ref inputs "libxcb")))
4496 (substitute* '("xcffib/__init__.py")
4497 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4498 #t)))
4499 (add-after 'install 'install-doc
4500 (lambda* (#:key outputs #:allow-other-keys)
4501 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4502 "/doc/" ,name "-" ,version)))
4503 (mkdir-p doc)
4504 (copy-file "README.md"
4505 (string-append doc "/README.md"))
4506 #t))))))
4507 (home-page "https://github.com/tych0/xcffib")
4508 (synopsis "XCB Python bindings")
4509 (description
4510 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4511support for Python 3 and PyPy. It is based on cffi.")
4512 (license license:expat)))
4513
4514(define-public python2-xcffib
4515 (package-with-python2 python-xcffib))
4516
4517(define-public python-cairocffi
4518 (package
4519 (name "python-cairocffi")
4520 (version "0.9.0")
4521 (source
4522 (origin
4523 (method url-fetch)
4524 (uri (pypi-uri "cairocffi" version))
4525 (sha256
4526 (base32
4527 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
4528 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
4529 (build-system python-build-system)
4530 (outputs '("out" "doc"))
4531 (inputs
4532 `(("glib" ,glib)
4533 ("gtk+" ,gtk+)
4534 ("gdk-pixbuf" ,gdk-pixbuf)
4535 ("cairo" ,cairo)
4536 ("pango" ,pango)))
4537 (native-inputs
4538 `(("pkg-config" ,pkg-config)
4539 ("python-pytest" ,python-pytest)
4540 ("python-pytest-cov" ,python-pytest-cov)
4541 ("python-pytest-runner" ,python-pytest-runner)
4542 ("python-sphinx" ,python-sphinx)
4543 ("python-docutils" ,python-docutils)))
4544 (propagated-inputs
4545 `(("python-xcffib" ,python-xcffib))) ; used at run time
4546 (arguments
4547 `(#:phases
4548 (modify-phases %standard-phases
4549 (add-after 'unpack 'patch-paths
4550 (lambda* (#:key inputs outputs #:allow-other-keys)
4551 (substitute* (find-files "." "\\.py$")
4552 (("dlopen\\(ffi, 'cairo'")
4553 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
4554 "/lib/libcairo.so.2'"))
4555 (("dlopen\\(ffi, 'gdk-3'")
4556 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
4557 "/lib/libgtk-3.so.0'"))
4558 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
4559 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
4560 "/lib/libgdk_pixbuf-2.0.so.0'"))
4561 (("dlopen\\(ffi, 'glib-2.0'")
4562 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4563 "/lib/libglib-2.0.so.0'"))
4564 (("dlopen\\(ffi, 'gobject-2.0'")
4565 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4566 "/lib/libgobject-2.0.so.0'"))
4567 (("dlopen\\(ffi, 'pangocairo-1.0'")
4568 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4569 "/lib/libpangocairo-1.0.so.0'"))
4570 (("dlopen\\(ffi, 'pango-1.0'")
4571 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4572 "/lib/libpango-1.0.so.0'")))
4573 #t))
4574 (add-after 'install 'install-doc
4575 (lambda* (#:key inputs outputs #:allow-other-keys)
4576 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4577 (doc (string-append data "/doc/" ,name "-" ,version))
4578 (html (string-append doc "/html")))
4579 (setenv "LD_LIBRARY_PATH"
4580 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4581 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4582 (setenv "LANG" "en_US.UTF-8")
4583 (mkdir-p html)
4584 (for-each (lambda (file)
4585 (copy-file (string-append "." file)
4586 (string-append doc file)))
4587 '("/README.rst" "/CHANGES" "/LICENSE"))
4588 (system* "python" "setup.py" "build_sphinx")
4589 (copy-recursively "docs/_build/html" html)
4590 #t))))))
4591 (home-page "https://github.com/Kozea/cairocffi")
4592 (synopsis "Python bindings and object-oriented API for Cairo")
4593 (description
4594 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4595Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4596graphics library with support for multiple backends including image buffers,
4597PNG, PostScript, PDF, and SVG file output.")
4598 (license license:bsd-3)))
4599
4600(define-public python2-cairocffi
4601 (package-with-python2 python-cairocffi))
4602
4603(define-public python-decorator
4604 (package
4605 (name "python-decorator")
4606 (version "4.3.0")
4607 (source
4608 (origin
4609 (method url-fetch)
4610 (uri (pypi-uri "decorator" version))
4611 (sha256
4612 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4613 (build-system python-build-system)
4614 (home-page "https://pypi.python.org/pypi/decorator/")
4615 (synopsis "Python module to simplify usage of decorators")
4616 (description
4617 "The aim of the decorator module is to simplify the usage of decorators
4618for the average programmer, and to popularize decorators usage giving examples
4619of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4620etc. The core of this module is a decorator factory.")
4621 (license license:expat)))
4622
4623(define-public python2-decorator
4624 (package-with-python2 python-decorator))
4625
4626(define-public python-drmaa
4627 (package
4628 (name "python-drmaa")
4629 (version "0.7.7")
4630 (source
4631 (origin
4632 (method url-fetch)
4633 (uri (pypi-uri "drmaa" version))
4634 (sha256
4635 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4636 (build-system python-build-system)
4637 ;; The test suite requires libdrmaa which is provided by the cluster
4638 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4639 ;; should be set to the path of the libdrmaa library.
4640 (arguments '(#:tests? #f))
4641 (native-inputs
4642 `(("python-nose" ,python-nose)))
4643 (home-page "https://pypi.python.org/pypi/drmaa")
4644 (synopsis "Python bindings for the DRMAA library")
4645 (description
4646 "A Python package for Distributed Resource Management (DRM) job
4647submission and control. This package is an implementation of the DRMAA 1.0
4648Python language binding specification.")
4649 (license license:bsd-3)))
4650
4651(define-public python2-drmaa
4652 (package-with-python2 python-drmaa))
4653
4654(define-public python-grako
4655 (package
4656 (name "python-grako")
4657 (version "3.99.9")
4658 (source
4659 (origin
4660 (method url-fetch)
4661 (uri
4662 (pypi-uri "grako" version ".zip"))
4663 (sha256
4664 (base32
4665 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4666 (build-system python-build-system)
4667 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4668 (native-inputs
4669 `(("unzip" ,unzip)
4670 ("python-pytest" ,python-pytest)
4671 ("python-pytest-runner" ,python-pytest-runner)))
4672 (home-page "https://bitbucket.org/neogeny/grako")
4673 (synopsis "EBNF parser generator")
4674 (description
4675 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4676memoizing PEG/Packrat parser in Python.")
4677 (license license:bsd-3)))
4678
4679(define-public python2-grako
4680 (package-with-python2 python-grako))
4681
4682(define-public python-gridmap
4683 (package
4684 (name "python-gridmap")
4685 (version "0.13.0")
4686 (source
4687 (origin
768fea0f
TGR
4688 (method git-fetch)
4689 (uri (git-reference
4690 (url "https://github.com/pygridtools/gridmap.git")
4691 (commit (string-append "v" version))))
4692 (file-name (git-file-name name version))
44d10b1f 4693 (sha256
768fea0f 4694 (base32 "1478lbwsr1w24cii2x01m2910fvh8r43ghnb78nc972a96hqiknm"))))
44d10b1f
RW
4695 (build-system python-build-system)
4696 (arguments
4697 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4698 (propagated-inputs
4699 `(("python-psutil" ,python-psutil)
4700 ("python-drmaa" ,python-drmaa)
4701 ("python-pyzmq" ,python-pyzmq)))
4702 (home-page "https://github.com/pygridtools/gridmap")
4703 (synopsis "Create jobs on a cluster directly from Python")
4704 (description
4705 "Gridmap is a Python package to allow you to easily create jobs on the
4706cluster directly from Python. You can directly map Python functions onto the
4707cluster without needing to write any wrapper code yourself.")
4708 (license license:gpl3+)))
4709
4710(define-public python2-gridmap
4711 (package-with-python2 python-gridmap))
4712
4713(define-public python-honcho
4714 (package
4715 (name "python-honcho")
4716 (version "1.0.1")
4717 (source
4718 (origin
8524d130
TGR
4719 (method git-fetch)
4720 (uri (git-reference
4721 (url "https://github.com/nickstenning/honcho.git")
4722 (commit (string-append "v" version))))
4723 (file-name (git-file-name name version))
44d10b1f 4724 (sha256
8524d130 4725 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
44d10b1f
RW
4726 (build-system python-build-system)
4727 (native-inputs
4728 `(("python-pytest" ,python-pytest)
4729 ("python-mock" ,python-mock)
4730 ("python-tox" ,python-tox)
4731 ("which" ,which))) ;for tests
4732 (propagated-inputs
4733 `(("python-jinja2" ,python-jinja2)))
4734 (arguments
4735 `(#:phases
4736 (modify-phases %standard-phases
4737 (delete 'check)
4738 (add-after 'install 'check
4739 (lambda* (#:key outputs inputs #:allow-other-keys)
4740 ;; fix honcho path in testsuite
4741 (substitute* "tests/conftest.py"
4742 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4743 "/bin/honcho" "'")))
4744 ;; It's easier to run tests after install.
4745 ;; Make installed package available for running the tests
4746 (add-installed-pythonpath inputs outputs)
95b707fb 4747 (invoke "py.test" "-v"))))))
44d10b1f
RW
4748 (home-page "https://github.com/nickstenning/honcho")
4749 (synopsis "Manage Procfile-based applications")
4750 (description
4751 "A Procfile is a file which describes how to run an application
50fceab0 4752consisting of several processes. honcho starts all listed processes.
44d10b1f
RW
4753The output of all running processes is collected by honcho and
4754displayed.")
4755 (license license:expat)))
4756
4757(define-public python2-honcho
4758 (package-with-python2 python-honcho))
4759
4760(define-public python-pexpect
4761 (package
4762 (name "python-pexpect")
4763 (version "4.6.0")
4764 (source
4765 (origin
4766 (method url-fetch)
4767 (uri (pypi-uri "pexpect" version))
4768 (sha256
4769 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
4770 (build-system python-build-system)
4771 (arguments
4772 `(#:phases
4773 (modify-phases %standard-phases
4774 (add-before 'check 'prepare-tests
4775 (lambda _
4776 (substitute* (find-files "tests")
4777 (("/bin/ls") (which "ls"))
4778 (("/bin/echo") (which "echo"))
4779 (("/bin/which") (which "which"))
4780 ;; Many tests try to use the /bin directory which
4781 ;; is not present in the build environment.
4782 ;; Use one that's non-empty and unlikely to change.
4783 (("/bin'") "/dev'"))
4784 ;; XXX: Socket connection test gets "Connection reset by peer".
4785 ;; Why does it not work? Delete for now.
4786 (delete-file "tests/test_socket.py")
4787 #t))
4788 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
4789 (native-inputs
4790 `(("python-nose" ,python-nose)
4791 ("python-pytest" ,python-pytest)
4792 ("man-db" ,man-db)
4793 ("which" ,which)
4794 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
4795 (propagated-inputs
4796 `(("python-ptyprocess" ,python-ptyprocess)))
4797 (home-page "http://pexpect.readthedocs.org/")
4798 (synopsis "Controlling interactive console applications")
4799 (description
4800 "Pexpect is a pure Python module for spawning child applications;
4801controlling them; and responding to expected patterns in their output.
4802Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4803child application and control it as if a human were typing commands.")
4804 (license license:isc)))
4805
4806(define-public python2-pexpect
4807 (package-with-python2 python-pexpect))
4808
4809(define-public python-setuptools-scm
4810 (package
4811 (name "python-setuptools-scm")
4812 (version "3.1.0")
4813 (source (origin
4814 (method url-fetch)
4815 (uri (pypi-uri "setuptools_scm" version))
4816 (sha256
4817 (base32
4818 "0h4bglwfz8b9prqljv8z3w9rgydfyxzaj05bm1y6zs5m6shz548i"))))
4819 (build-system python-build-system)
4820 (home-page "https://github.com/pypa/setuptools_scm/")
4821 (synopsis "Manage Python package versions in SCM metadata")
4822 (description
4823 "Setuptools_scm handles managing your Python package versions in
4824@dfn{software configuration management} (SCM) metadata instead of declaring
4825them as the version argument or in a SCM managed file.")
4826 (license license:expat)))
4827
4828(define-public python2-setuptools-scm
4829 (package-with-python2 python-setuptools-scm))
4830
bb74ea09
RW
4831(define-public python-pathlib2
4832 (package
4833 (name "python-pathlib2")
4834 (version "2.3.3")
4835 (source
4836 (origin
4837 (method url-fetch)
4838 (uri (pypi-uri "pathlib2" version))
4839 (sha256
4840 (base32
4841 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
4842 (build-system python-build-system)
4843 (propagated-inputs
4844 `(("python-scandir" ,python-scandir)
4845 ("python-six" ,python-six)))
4846 (home-page "https://pypi.python.org/pypi/pathlib2/")
4847 (synopsis "Object-oriented filesystem paths")
4848 (description "The goal of pathlib2 is to provide a backport of the
4849standard @code{pathlib} module which tracks the standard library module, so
4850all the newest features of the standard @code{pathlib} can be used also on
4851older Python versions.")
4852 (license license:expat)))
4853
15b65617
RW
4854(define-public python-importlib-metadata
4855 (package
4856 (name "python-importlib-metadata")
4857 (version "0.18")
4858 (source
4859 (origin
4860 (method url-fetch)
4861 (uri (pypi-uri "importlib_metadata" version))
4862 (sha256
4863 (base32
4864 "1nqj6vj2z4byi8flzf2lbldhqgicsz9mkpv4k69kjd8p8qxy4vnb"))))
4865 (build-system python-build-system)
4866 (propagated-inputs
4867 `(("python-configparser" ,python-configparser)
4868 ("python-contextlib2" ,python-contextlib2)
4869 ("python-docutils" ,python-docutils)
4870 ("python-pathlib2" ,python-pathlib2)
4871 ("python-rst.linker" ,python-rst.linker)
4872 ("python-zipp" ,python-zipp)))
4873 (native-inputs
4874 `(("python-setuptools-scm" ,python-setuptools-scm)
4875 ("python-sphinx" ,python-sphinx)))
4876 (home-page "https://importlib-metadata.readthedocs.io/")
4877 (synopsis "Read metadata from Python packages")
4878 (description
4879 "@code{importlib_metadata} is a library which provides an API for
4880accessing an installed Python package's metadata, such as its entry points or
4881its top-level name. This functionality intends to replace most uses of
4882@code{pkg_resources} entry point API and metadata API. Along with
4883@code{importlib.resources} in Python 3.7 and newer, this can eliminate the
4884need to use the older and less efficient @code{pkg_resources} package.")
4885 (license license:asl2.0)))
4886
37c173d1
RW
4887(define-public python-jaraco-packaging
4888 (package
4889 (name "python-jaraco-packaging")
4890 (version "6.1")
4891 (source
4892 (origin
4893 (method url-fetch)
4894 (uri (pypi-uri "jaraco.packaging" version))
4895 (sha256
4896 (base32
4897 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
4898 (build-system python-build-system)
4899 (propagated-inputs
4900 `(("python-pytest" ,python-pytest)
4901 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
4902 ("python-pytest-flake8" ,python-pytest-flake8)
4903 ("python-rst.linker" ,python-rst.linker)
4904 ("python-setuptools" ,python-setuptools)
4905 ("python-setuptools-scm" ,python-setuptools-scm)
4906 ("python-six" ,python-six)
4907 ("python-sphinx" ,python-sphinx)))
4908 (home-page "https://github.com/jaraco/jaraco.packaging")
4909 (synopsis "Tools to supplement packaging Python releases")
4910 (description
4911 "This package provides various tools to supplement packaging Python
4912releases.")
4913 (license license:expat)))
4914
44d10b1f
RW
4915(define-public python-pathpy
4916 (package
4917 (name "python-pathpy")
49ad11e9 4918 (version "11.5.0")
44d10b1f
RW
4919 (source
4920 (origin
4921 (method url-fetch)
4922 (uri (pypi-uri "path.py" version))
4923 (sha256
49ad11e9
RW
4924 (base32 "1jxkf91syzxlpiwgm83fjfz1m5xh3jrvv4iyl5wjsnkk599pls5n"))))
4925 (outputs '("out" "doc"))
44d10b1f
RW
4926 (build-system python-build-system)
4927 (propagated-inputs
4928 `(("python-appdirs" ,python-appdirs)))
4929 (native-inputs
4930 `(("python-setuptools-scm" ,python-setuptools-scm)
4931 ("python-sphinx" ,python-sphinx)
4932 ("python-rst.linker" ,python-rst.linker)
4933 ("python-pytest" ,python-pytest)
49ad11e9
RW
4934 ("python-pytest-runner" ,python-pytest-runner)
4935 ("python-jaraco-packaging" ,python-jaraco-packaging)))
44d10b1f 4936 (arguments
49ad11e9
RW
4937 `(#:phases
4938 (modify-phases %standard-phases
4939 (add-after 'build 'build-doc
4940 (lambda _
4941 (setenv "LANG" "en_US.UTF-8")
4942 (invoke "python" "setup.py" "build_sphinx")))
4943 (add-after 'install 'install-doc
4944 (lambda* (#:key outputs #:allow-other-keys)
4945 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4946 (doc (string-append data "/doc/" ,name "-" ,version))
4947 (html (string-append doc "/html")))
4948 (mkdir-p html)
4949 (for-each (lambda (file)
4950 (copy-file file (string-append doc "/" file)))
4951 '("README.rst" "CHANGES.rst"))
4952 (copy-recursively "build/sphinx/html" html)
4953 #t)))
4954 (replace 'check
4955 (lambda _
4956 ;; The import time test aborts if an import takes longer than
4957 ;; 100ms. It may very well take a little longer than that.
4958 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
44d10b1f
RW
4959 (home-page "https://github.com/jaraco/path.py")
4960 (synopsis "Python module wrapper for built-in os.path")
4961 (description
4962 "@code{path.py} implements path objects as first-class entities, allowing
4963common operations on files to be invoked on those path objects directly.")
4964 (license license:expat)))
4965
4966(define-public python2-pathpy
4967 (package-with-python2 python-pathpy))
4968
4969(define-public python-simplegeneric
4970 (package
4971 (name "python-simplegeneric")
4972 (version "0.8.1")
4973 (source
4974 (origin
4975 (method url-fetch)
6c8c3980 4976 (uri (pypi-uri "simplegeneric" version ".zip"))
44d10b1f
RW
4977 (sha256
4978 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4979 (build-system python-build-system)
4980 (native-inputs
4981 `(("unzip" ,unzip)))
4982 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
4983 (synopsis "Python module for simple generic functions")
4984 (description
4985 "The simplegeneric module lets you define simple single-dispatch generic
4986functions, akin to Python’s built-in generic functions like @code{len()},
4987@code{iter()} and so on. However, instead of using specially-named methods,
4988these generic functions use simple lookup tables, akin to those used by
4989e.g. @code{pickle.dump()} and other generic functions found in the Python
4990standard library.")
4991 (license license:zpl2.1)))
4992
4993(define-public python2-simplegeneric
4994 (package-with-python2 python-simplegeneric))
4995
4996(define-public python-ipython-genutils
4997 ;; TODO: This package is retired, check if can be removed, see description.
4998 (package
4999 (name "python-ipython-genutils")
5000 (version "0.1.0")
5001 (source
5002 (origin
5003 (method url-fetch)
c9671d4b 5004 (uri (pypi-uri "ipython_genutils" version))
44d10b1f
RW
5005 (sha256
5006 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5007 (build-system python-build-system)
5008 (arguments `(#:tests? #f)) ; no tests
5009 (home-page "https://ipython.org")
5010 (synopsis "Vestigial utilities from IPython")
5011 (description
5012 "This package provides retired utilities from IPython. No packages
5013outside IPython/Jupyter should depend on it.
5014
5015This package shouldn't exist. It contains some common utilities shared by
5016Jupyter and IPython projects during The Big Split. As soon as possible, those
5017packages will remove their dependency on this, and this package will go
5018away.")
5019 (license license:bsd-3)))
5020
5021(define-public python2-ipython-genutils
5022 (package-with-python2 python-ipython-genutils))
5023
5024(define-public python-traitlets
5025 (package
5026 (name "python-traitlets")
5027 (version "4.3.2")
5028 (source
5029 (origin
5030 (method url-fetch)
5031 (uri (pypi-uri "traitlets" version))
5032 (sha256
5033 (base32
5034 "0dbq7sx26xqz5ixs711k5nc88p8a0nqyz6162pwks5dpcz9d4jww"))))
5035 (build-system python-build-system)
5036 (arguments
5037 `(#:phases
5038 (modify-phases %standard-phases
5039 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
5040 (propagated-inputs
5041 `(("python-ipython-genutils" ,python-ipython-genutils)
5042 ("python-decorator" ,python-decorator))) ;not needed for >4.3.2
5043 (native-inputs
5044 `(("python-pytest" ,python-pytest)))
5045 (properties `((python2-variant . ,(delay python2-traitlets))))
5046 (home-page "https://ipython.org")
5047 (synopsis "Configuration system for Python applications")
5048 (description
5049 "Traitlets is a framework that lets Python classes have attributes with
5050type checking, dynamically calculated default values, and ‘on change’
5051callbacks. The package also includes a mechanism to use traitlets for
5052configuration, loading values from files or from command line arguments. This
5053is a distinct layer on top of traitlets, so you can use traitlets in your code
5054without using the configuration machinery.")
5055 (license license:bsd-3)))
5056
5057(define-public python2-traitlets
5058 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
5059 (package
5060 (inherit traitlets)
5061 (propagated-inputs
5062 `(("python2-enum34" ,python2-enum34)
5063 ,@(package-propagated-inputs traitlets))))))
5064
5065(define-public python-jupyter-core
5066 (package
5067 (name "python-jupyter-core")
5068 (version "4.4.0")
5069 (source
5070 (origin
5071 (method url-fetch)
5072 (uri (string-append (pypi-uri "jupyter_core" version)))
5073 (sha256
5074 (base32
5075 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
5076 (build-system python-build-system)
5077 ;; FIXME: not sure how to run the tests
5078 (arguments `(#:tests? #f))
5079 (propagated-inputs
5080 `(("python-traitlets" ,python-traitlets)))
5081 (home-page "http://jupyter.org/")
5082 (synopsis "Jupyter base package")
5083 (description
5084 "Jupyter core is the base package on which Jupyter projects rely.")
5085 (license license:bsd-3)))
5086
5087(define-public python2-jupyter-core
5088 (package-with-python2 python-jupyter-core))
5089
5090(define-public python-jupyter-client
5091 (package
5092 (name "python-jupyter-client")
5093 (version "5.2.4")
5094 (source
5095 (origin
5096 (method url-fetch)
5097 (uri (pypi-uri "jupyter_client" version))
5098 (sha256
5099 (base32
5100 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
5101 (build-system python-build-system)
5102 ;; Tests fail because of missing native python kernel which I assume is
5103 ;; provided by the ipython package, which we cannot use because it would
5104 ;; cause a dependency cycle.
5105 (arguments `(#:tests? #f))
5106 (propagated-inputs
5107 `(("python-pyzmq" ,python-pyzmq)
5108 ("python-traitlets" ,python-traitlets)
5109 ("python-jupyter-core" ,python-jupyter-core)))
5110 (home-page "http://jupyter.org/")
5111 (synopsis "Jupyter protocol implementation and client libraries")
5112 (description
5113 "The @code{jupyter_client} package contains the reference implementation
5114of the Jupyter protocol. It also provides client and kernel management APIs
5115for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5116installing @code{kernelspec}s for use with Jupyter frontends.")
5117 (license license:bsd-3)))
5118
5119(define-public python2-jupyter-client
5120 (package-with-python2 python-jupyter-client))
5121
5122(define-public python-ipykernel
5123 (package
5124 (name "python-ipykernel")
82110dea 5125 (version "5.1.1")
44d10b1f
RW
5126 (source
5127 (origin
5128 (method url-fetch)
5129 (uri (pypi-uri "ipykernel" version))
5130 (sha256
82110dea 5131 (base32 "173nm29g85w8cac3fg40b27qaq26g41wgg6qn79ql1hq4w2n5sgh"))))
44d10b1f
RW
5132 (build-system python-build-system)
5133 (arguments
5134 `(#:phases
5135 (modify-phases %standard-phases
5136 (replace 'check
5137 (lambda _
5138 (setenv "HOME" "/tmp")
5139 (invoke "pytest" "-v")
5140 #t)))))
5141 (propagated-inputs
5142 `(("python-ipython" ,python-ipython)
5143 ;; imported at runtime during connect
5144 ("python-jupyter-client" ,python-jupyter-client)))
5145 (native-inputs
5146 `(("python-pytest" ,python-pytest)
5147 ("python-nose" ,python-nose)))
5148 (home-page "https://ipython.org")
5149 (synopsis "IPython Kernel for Jupyter")
5150 (description
5151 "This package provides the IPython kernel for Jupyter.")
5152 (license license:bsd-3)))
5153
0f378947 5154;; Version 5.1.1 and above no longer support Python 2.
44d10b1f 5155(define-public python2-ipykernel
0f378947
RW
5156 (package
5157 (name "python2-ipykernel")
5158 (version "5.1.0")
5159 (source
5160 (origin
5161 (method url-fetch)
5162 (uri (pypi-uri "ipykernel" version))
5163 (sha256
5164 (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g"))))
5165 (build-system python-build-system)
5166 (arguments
5167 `(#:python ,python-2
5168 #:phases
5169 (modify-phases %standard-phases
5170 (replace 'check
5171 (lambda _
5172 (setenv "HOME" "/tmp")
5173 (invoke "pytest" "-v")
5174 #t)))))
5175 (propagated-inputs
5176 `(("python2-ipython" ,python2-ipython)
5177 ;; imported at runtime during connect
5178 ("python2-jupyter-client" ,python2-jupyter-client)))
5179 (native-inputs
5180 `(("python2-pytest" ,python2-pytest)
5181 ("python2-nose" ,python2-nose)))
5182 (home-page "https://ipython.org")
5183 (synopsis "IPython Kernel for Jupyter")
5184 (description
5185 "This package provides the IPython kernel for Jupyter.")
5186 (license license:bsd-3)))
44d10b1f 5187
966aa714
AE
5188(define-public python-pari-jupyter
5189 (package
5190 (name "python-pari-jupyter")
5191 (version "1.3.2")
5192 (source
5193 (origin
5194 (method url-fetch)
5195 (uri (pypi-uri "pari_jupyter" version))
5196 (sha256
5197 (base32
5198 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
5199 (build-system python-build-system)
5200 (propagated-inputs
5201 `(("python-ipykernel" ,python-ipykernel)))
5202 (inputs
5203 `(("pari-gp" ,pari-gp)
5204 ("readline" ,readline)))
5205 (arguments
5206 `(#:tests? #f)) ; no test suite
5207 (home-page
5208 "https://github.com/jdemeyer/pari_jupyter")
5209 (synopsis "A Jupyter kernel for PARI/GP")
5210 (description "The package provides a PARI/GP kernel for Jupyter.")
5211 (license license:gpl3+)))
5212
dede052a
RW
5213(define-public python-backcall
5214 (package
5215 (name "python-backcall")
5216 (version "0.1.0")
5217 (source
5218 (origin
5219 (method url-fetch)
5220 (uri (pypi-uri "backcall" version))
5221 (sha256
5222 (base32
5223 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
5224 (build-system python-build-system)
5225 (home-page "https://github.com/takluyver/backcall/")
5226 (synopsis "Specifications for callback functions passed in to an API")
5227 (description
5228 "If your code lets other people supply callback functions, it's important
5229to specify the function signature you expect, and check that functions support
5230that. Adding extra parameters later would break other peoples code unless
5231you're careful. The @code{backcall} package provides a way of specifying the
5232callback signature using a prototype function.")
5233 (license license:bsd-3)))
5234
44d10b1f
RW
5235;; This is the latest release of the LTS version of ipython with support for
5236;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
8b5f756c
RW
5237;; dropped support for Python 2.7.
5238(define-public python2-ipython
44d10b1f 5239 (package
8b5f756c 5240 (name "python2-ipython")
44d10b1f
RW
5241 (version "5.8.0")
5242 (source
5243 (origin
5244 (method url-fetch)
5245 (uri (pypi-uri "ipython" version ".tar.gz"))
5246 (sha256
5247 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
5248 (build-system python-build-system)
44d10b1f 5249 (propagated-inputs
8b5f756c
RW
5250 `(("python2-backports-shutil-get-terminal-size"
5251 ,python2-backports-shutil-get-terminal-size)
5252 ("python2-pathlib2" ,python2-pathlib2)
5253 ("python2-pyzmq" ,python2-pyzmq)
5254 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
5255 ("python2-terminado" ,python2-terminado)
5256 ("python2-matplotlib" ,python2-matplotlib)
5257 ("python2-numpy" ,python2-numpy)
5258 ("python2-numpydoc" ,python2-numpydoc)
5259 ("python2-jinja2" ,python2-jinja2)
5260 ("python2-mistune" ,python2-mistune)
5261 ("python2-pexpect" ,python2-pexpect)
5262 ("python2-pickleshare" ,python2-pickleshare)
5263 ("python2-simplegeneric" ,python2-simplegeneric)
5264 ("python2-jsonschema" ,python2-jsonschema)
5265 ("python2-traitlets" ,python2-traitlets)
5266 ("python2-nbformat" ,python2-nbformat)
5267 ("python2-pygments" ,python2-pygments)))
5268 (inputs
5269 `(("readline" ,readline)
5270 ("which" ,which)))
5271 (native-inputs
5272 `(("graphviz" ,graphviz)
5273 ("pkg-config" ,pkg-config)
5274 ("python2-requests" ,python2-requests) ;; for tests
5275 ("python2-testpath" ,python2-testpath)
5276 ("python2-mock" ,python2-mock)
5277 ("python2-nose" ,python2-nose)))
5278 (arguments
5279 `(#:python ,python-2
5280 #:phases
5281 (modify-phases %standard-phases
5282 (add-before 'check 'delete-broken-tests
5283 (lambda* (#:key inputs #:allow-other-keys)
5284 ;; These tests throw errors for unknown reasons.
5285 (delete-file "IPython/core/tests/test_profile.py")
5286 (delete-file "IPython/core/tests/test_interactiveshell.py")
5287 (delete-file "IPython/core/tests/test_magic.py")
5288 #t)))))
5289 (home-page "https://ipython.org")
5290 (synopsis "IPython is a tool for interactive computing in Python")
5291 (description
5292 "IPython provides a rich architecture for interactive computing with:
5293Powerful interactive shells, a browser-based notebook, support for interactive
5294data visualization, embeddable interpreters and tools for parallel
5295computing.")
5296 (license license:bsd-3)))
5297
5298(define-public python-ipython
5299 (package
5300 (name "python-ipython")
5301 (version "7.5.0")
5302 (source
5303 (origin
5304 (method url-fetch)
5305 (uri (pypi-uri "ipython" version ".tar.gz"))
5306 (sha256
5307 (base32 "09mbxq37mfn88xjnib7qfzaq9krr7gf1jxwy1p6mcjr254082h78"))))
5308 (build-system python-build-system)
5309 (propagated-inputs
5310 `(("python-backcall" ,python-backcall)
5311 ("python-pyzmq" ,python-pyzmq)
5312 ("python-prompt-toolkit" ,python-prompt-toolkit)
44d10b1f
RW
5313 ("python-terminado" ,python-terminado)
5314 ("python-matplotlib" ,python-matplotlib)
5315 ("python-numpy" ,python-numpy)
5316 ("python-numpydoc" ,python-numpydoc)
8b5f756c 5317 ("python-jedi" ,python-jedi)
44d10b1f
RW
5318 ("python-jinja2" ,python-jinja2)
5319 ("python-mistune" ,python-mistune)
5320 ("python-pexpect" ,python-pexpect)
5321 ("python-pickleshare" ,python-pickleshare)
5322 ("python-simplegeneric" ,python-simplegeneric)
5323 ("python-jsonschema" ,python-jsonschema)
5324 ("python-traitlets" ,python-traitlets)
5325 ("python-nbformat" ,python-nbformat)
5326 ("python-pygments" ,python-pygments)))
5327 (inputs
5328 `(("readline" ,readline)
5329 ("which" ,which)))
5330 (native-inputs
5331 `(("graphviz" ,graphviz)
5332 ("pkg-config" ,pkg-config)
5333 ("python-requests" ,python-requests) ;; for tests
5334 ("python-testpath" ,python-testpath)
8b5f756c 5335 ("python-nose" ,python-nose)))
44d10b1f
RW
5336 (arguments
5337 `(#:phases
5338 (modify-phases %standard-phases
44d10b1f
RW
5339 ;; Tests can only be run after the library has been installed and not
5340 ;; within the source directory.
5341 (delete 'check)
5342 (add-after 'install 'check
5343 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5344 (if tests?
5345 (begin
5346 ;; Make installed package available for running the tests
5347 (add-installed-pythonpath inputs outputs)
5348 (setenv "HOME" "/tmp/") ;; required by a test
5349 ;; We only test the core because one of the other tests
5350 ;; tries to import ipykernel.
5351 (invoke "python" "IPython/testing/iptest.py"
5352 "-v" "IPython/core/tests"))
5353 #t)))
5354 (add-before 'check 'fix-tests
5355 (lambda* (#:key inputs #:allow-other-keys)
5356 (substitute* "./IPython/utils/_process_posix.py"
5357 (("/usr/bin/env', 'which") (which "which")))
5358 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5359 (("#!/usr/bin/env python")
5360 (string-append "#!" (which "python"))))
44d10b1f
RW
5361 ;; This test introduces a circular dependency on ipykernel
5362 ;; (which depends on ipython).
5363 (delete-file "IPython/core/tests/test_display.py")
8b5f756c 5364 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
44d10b1f 5365 (delete-file "IPython/core/tests/test_interactiveshell.py")
44d10b1f
RW
5366 #t)))))
5367 (home-page "https://ipython.org")
5368 (synopsis "IPython is a tool for interactive computing in Python")
5369 (description
5370 "IPython provides a rich architecture for interactive computing with:
5371Powerful interactive shells, a browser-based notebook, support for interactive
5372data visualization, embeddable interpreters and tools for parallel
5373computing.")
8b5f756c 5374 (license license:bsd-3)))
44d10b1f 5375
8b5f756c
RW
5376(define-public python-ipython-documentation
5377 (package
5378 (inherit python-ipython)
5379 (name "python-ipython-documentation")
5380 (version (package-version python-ipython))
5381 (arguments
5382 `(#:phases
5383 (modify-phases %standard-phases
5384 (delete 'build)
5385 (delete 'check)
5386 (replace 'install
5387 (lambda* (#:key outputs #:allow-other-keys)
5388 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5389 (doc (string-append data "/doc/" ,name "-" ,version))
5390 (html (string-append doc "/html"))
5391 (man1 (string-append data "/man/man1"))
5392 (info (string-append data "/info"))
5393 (examples (string-append doc "/examples"))
5394 (python-arg (string-append "PYTHON=" (which "python"))))
5395 (setenv "LANG" "en_US.utf8")
5396 (with-directory-excursion "docs"
5397 ;; FIXME: pdf fails to build
5398 ;;(system* "make" "pdf" "PAPER=a4")
5399 (system* "make" python-arg "html")
5400 ;; FIXME: the generated texi file contains ^@^@, which trips
5401 ;; up the parser.
5402 ;; (system* "make" python-arg "info")
5403 )
5404 (copy-recursively "docs/man" man1)
5405 (copy-recursively "examples" examples)
5406 (copy-recursively "docs/build/html" html)
5407 ;; (copy-file "docs/build/latex/ipython.pdf"
5408 ;; (string-append doc "/ipython.pdf"))
5409 (mkdir-p info)
5410 ;; (copy-file "docs/build/texinfo/ipython.info"
5411 ;; (string-append info "/ipython.info"))
5412 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
5413 #t)))))
5414 (inputs
5415 `(("python-ipython" ,python-ipython)
5416 ("python-ipykernel" ,python-ipykernel)))
5417 (native-inputs
5418 `(("python-sphinx" ,python-sphinx)
5419 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
5420 ;; FIXME: It's possible that a smaller union would work just as well.
5421 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
5422 texlive-fonts-ec
5423 texlive-generic-ifxetex
5424 texlive-generic-pdftex
5425 texlive-latex-amsfonts
5426 texlive-latex-capt-of
5427 texlive-latex-cmap
5428 texlive-latex-environ
5429 texlive-latex-eqparbox
5430 texlive-latex-etoolbox
5431 texlive-latex-expdlist
5432 texlive-latex-fancyhdr
5433 texlive-latex-fancyvrb
5434 texlive-latex-fncychap
5435 texlive-latex-float
5436 texlive-latex-framed
5437 texlive-latex-geometry
5438 texlive-latex-graphics
5439 texlive-latex-hyperref
5440 texlive-latex-mdwtools
5441 texlive-latex-multirow
5442 texlive-latex-needspace
5443 texlive-latex-oberdiek
5444 texlive-latex-parskip
5445 texlive-latex-preview
5446 texlive-latex-tabulary
5447 texlive-latex-threeparttable
5448 texlive-latex-titlesec
5449 texlive-latex-trimspaces
5450 texlive-latex-ucs
5451 texlive-latex-upquote
5452 texlive-latex-url
5453 texlive-latex-varwidth
5454 texlive-latex-wrapfig)))
5455 ("texinfo" ,texinfo)))))
44d10b1f
RW
5456
5457(define-public python-urwid
5458 (package
5459 (name "python-urwid")
5460 (version "2.0.1")
5461 (source
5462 (origin
5463 (method url-fetch)
5464 (uri (pypi-uri "urwid" version))
5465 (sha256
5466 (base32
5467 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
5468 (build-system python-build-system)
5469 (home-page "http://urwid.org")
5470 (synopsis "Console user interface library for Python")
5471 (description
5472 "Urwid is a curses-based UI/widget library for Python. It includes many
5473features useful for text console applications.")
5474 (license license:lgpl2.1+)))
5475
5476(define-public python2-urwid
5477 (package-with-python2 python-urwid))
5478
5479(define-public python-urwidtrees
5480 (package
5481 (name "python-urwidtrees")
5482 (version "1.0.2")
5483 (source
5484 (origin
5485 (method url-fetch)
5486 ;; package author intends on distributing via github rather than pypi:
5487 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5488 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5489 version ".tar.gz"))
5490 (file-name (string-append name "-" version ".tar.gz"))
5491 (sha256
5492 (base32
5493 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
5494 (build-system python-build-system)
5495 (arguments
5496 '(#:tests? #f)) ; no tests
5497 (propagated-inputs `(("python-urwid" ,python-urwid)))
5498 (home-page "https://github.com/pazz/urwidtrees")
5499 (synopsis "Tree widgets for urwid")
5500 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5501toolkit. Use it to build trees of widgets.")
5502 (license license:gpl3+)))
5503
5504(define-public python2-urwidtrees
5505 (package-with-python2 python-urwidtrees))
5506
5507(define-public python-ua-parser
5508 (package
5509 (name "python-ua-parser")
5510 (version "0.8.0")
5511 (source
5512 (origin
5513 (method url-fetch)
5514 (uri (pypi-uri "ua-parser" version))
5515 (sha256
5516 (base32
5517 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
5518 (build-system python-build-system)
5519 (arguments
5520 `(#:tests? #f)) ;no test suite in release
5521 (native-inputs
5522 `(("python-pyyaml" ,python-pyyaml)))
5523 (home-page "https://github.com/ua-parser/uap-python")
5524 (synopsis "User agent parser")
5525 (description
5526 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
5527 (license license:asl2.0)))
5528
5529(define-public python2-ua-parser
5530 (package-with-python2 python-ua-parser))
5531
5532(define-public python-user-agents
5533 (package
5534 (name "python-user-agents")
5535 (version "1.1.0")
5536 (source
5537 (origin
5538 (method url-fetch)
5539 (uri (pypi-uri "user-agents" version))
5540 (sha256
5541 (base32
5542 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
5543 (build-system python-build-system)
5544 (arguments
5545 `(#:tests? #f)) ;missing devices.json test file in release
5546 (propagated-inputs
5547 `(("python-ua-parser" ,python-ua-parser)))
5548 (home-page "https://github.com/selwin/python-user-agents")
5549 (synopsis "User Agent strings parsing library")
5550 (description
5551 "A library to identify devices (phones, tablets) and their capabilities by
5552parsing (browser/HTTP) user agent strings.")
5553 (license license:expat)))
5554
5555(define-public python2-user-agents
5556 (package-with-python2 python-user-agents))
5557
5558(define-public python-dbus
5559 (package
5560 (name "python-dbus")
5561 (version "1.2.8")
5562 (source
5563 (origin
5564 (method url-fetch)
5565 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
5566 "dbus-python-" version ".tar.gz"))
5567 (sha256
5568 (base32
5569 "0vvvjmiwnc9cjlks3gcdk43ap7llhlpz7cm1wbw0nc2yfsxjpwdb"))))
5570 (build-system gnu-build-system)
5571 (arguments
5572 '(#:phases
5573 (modify-phases %standard-phases
5574 (add-before
5575 'check 'pre-check
5576 (lambda _
5577 ;; XXX: For the missing '/etc/machine-id'.
5578 (substitute* "test/run-test.sh"
5579 (("DBUS_FATAL_WARNINGS=1")
5580 "DBUS_FATAL_WARNINGS=0"))
5581 #t)))))
5582 (native-inputs
5583 `(("pkg-config" ,pkg-config)))
5584 (inputs
5585 `(("python" ,python-wrapper)
5586 ("dbus-glib" ,dbus-glib)))
5587 (synopsis "Python bindings for D-bus")
5588 (description "python-dbus provides bindings for libdbus, the reference
5589implementation of D-Bus.")
5590 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
5591 (license license:expat)))
5592
5593(define-public python2-dbus
5594 (package (inherit python-dbus)
5595 (name "python2-dbus")
5596 (inputs `(("python" ,python-2)
5597 ,@(alist-delete "python"
5598 (package-inputs python-dbus)
5599 equal?)))
5600 ;; FIXME: on Python 2, the test_utf8 fails with:
5601 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5602 (arguments `(#:tests? #f))))
5603
fb236fdd
AG
5604(define-public python-notify2
5605 (package
5606 (name "python-notify2")
5607 (version "0.3.1")
5608 (source
5609 (origin
5610 (method url-fetch)
5611 (uri (pypi-uri "notify2" version))
5612 (sha256
5613 (base32
5614 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
5615 (build-system python-build-system)
5616 (arguments `(#:tests? #f)) ; tests depend on system state
5617 (native-inputs
5618 `(("python-dbus" ,python-dbus)))
5619 (home-page "https://bitbucket.org/takluyver/pynotify2")
5620 (synopsis "Python interface to D-Bus notifications")
5621 (description
5622 "Pynotify2 provides a Python interface for sending D-Bus notifications.
5623It is a reimplementation of pynotify in pure Python, and an alternative to
5624the GObject Introspection bindings to libnotify for non-GTK applications.")
5625 (license (list license:bsd-2
5626 license:lgpl2.1+))))
5627
5628(define-public python2-notify2
5629 (package-with-python2 python-notify2))
5630
44d10b1f
RW
5631(define-public python-lxml
5632 (package
5633 (name "python-lxml")
5634 (version "4.2.5")
5635 (source
5636 (origin
5637 (method url-fetch)
5638 (uri (pypi-uri "lxml" version))
5639 (sha256
5640 (base32
5641 "0zw0y9hs0nflxhl9cs6ipwwh53szi3w2x06wl0k9cylyqac0cwin"))))
5642 (build-system python-build-system)
5643 (inputs
5644 `(("libxml2" ,libxml2)
5645 ("libxslt" ,libxslt)))
5646 (home-page "http://lxml.de/")
5647 (synopsis
5648 "Python XML processing library")
5649 (description
5650 "The lxml XML toolkit is a Pythonic binding for the C libraries
5651libxml2 and libxslt.")
5652 (license license:bsd-3))) ; and a few more, see LICENSES.txt
5653
5654(define-public python2-lxml
5655 (package-with-python2 python-lxml))
5656
5657;; beautifulsoup4 has a totally different namespace than 3.x,
5658;; and pypi seems to put it under its own name, so I guess we should too
5659(define-public python-beautifulsoup4
5660 (package
5661 (name "python-beautifulsoup4")
abb53e6f 5662 (version "4.7.1")
44d10b1f
RW
5663 (source
5664 (origin
5665 (method url-fetch)
5666 (uri (pypi-uri "beautifulsoup4" version))
5667 (sha256
5668 (base32
abb53e6f 5669 "0j2kycz2dxgx68xzjm7rxg5xn6v61gq5ifvxyg99slmqkybnal4l"))))
44d10b1f
RW
5670 (build-system python-build-system)
5671 (arguments
5672 `(#:phases
5673 (modify-phases %standard-phases
5674 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5675 ;; must use this conversion script when building with Python 3. The
5676 ;; conversion script also runs the tests.
5677 ;; For more information, see the file 'convert-py3k' in the source
5678 ;; distribution.
5679 (replace 'check
dff0197e 5680 (lambda _ (invoke "./convert-py3k"))))))
f83e10e4 5681 (propagated-inputs
abb53e6f 5682 `(("python-soupsieve" ,python-soupsieve)))
44d10b1f
RW
5683 (home-page
5684 "https://www.crummy.com/software/BeautifulSoup/bs4/")
5685 (synopsis
5686 "Python screen-scraping library")
5687 (description
5688 "Beautiful Soup is a Python library designed for rapidly setting up
5689screen-scraping projects. It offers Pythonic idioms for navigating,
5690searching, and modifying a parse tree, providing a toolkit for
5691dissecting a document and extracting what you need. It automatically
5692converts incoming documents to Unicode and outgoing documents to UTF-8.")
5693 (license license:expat)
5694 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5695
5696(define-public python2-beautifulsoup4
5697 (package
5698 (inherit (package-with-python2
5699 (strip-python2-variant python-beautifulsoup4)))
5700 (arguments `(#:python ,python-2))))
5701
ad74978a
BT
5702(define-public python-soupsieve
5703 (package
5704 (name "python-soupsieve")
e9cb6edd 5705 (version "1.9.2")
ad74978a
BT
5706 (source
5707 (origin
5708 (method url-fetch)
5709 (uri (pypi-uri "soupsieve" version))
5710 (sha256
5711 (base32
e9cb6edd 5712 "0in9rc9q3h8w5b4qf7kvl3qxcvw6vrz35ckblchgf70hm6pg3dbj"))))
ad74978a
BT
5713 (build-system python-build-system)
5714 (arguments `(#:tests? #f))
5715 ;;XXX: 2 tests fail currently despite claming they were to be
5716 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
5717 ;;don't want to create a circular dependency.
5718 (home-page "https://github.com/facelessuser/soupsieve")
5719 (synopsis "CSS selector library")
5720 (description
5721 "Soup Sieve is a CSS selector library designed to be used with Beautiful
5722Soup 4. It aims to provide selecting, matching, and filtering using modern
5723CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
5724specifications up through the latest CSS level 4 drafts and beyond (though
5725some are not yet implemented).")
d00b83fb 5726 (properties `((python2-variant . ,(delay python2-soupsieve))))
ad74978a
BT
5727 (license license:expat)))
5728
5729(define-public python2-soupsieve
d00b83fb 5730 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
ad74978a
BT
5731 (package
5732 (inherit base)
5733 (propagated-inputs
d00b83fb
MB
5734 `(("python2-backports-functools-lru-cache"
5735 ,python2-backports-functools-lru-cache)
5736 ,@(package-propagated-inputs base))))))
ad74978a 5737
44d10b1f
RW
5738(define-public python-netifaces
5739 (package
5740 (name "python-netifaces")
5741 (version "0.10.7")
5742 (source
5743 (origin
5744 (method url-fetch)
5745 (uri (pypi-uri "netifaces" version))
5746 (sha256
5747 (base32
5748 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
5749 (build-system python-build-system)
5750 (home-page "https://github.com/al45tair/netifaces")
5751 (synopsis
5752 "Python module for portable network interface information")
5753 (description
5754 "Netifaces is a Python module providing information on network
5755interfaces in an easy and portable manner.")
5756 (license license:expat)))
5757
5758(define-public python2-netifaces
5759 (package-with-python2 python-netifaces))
5760
5761(define-public python-networkx
5762 (package
5763 (name "python-networkx")
5764 (version "2.2")
5765 (source
5766 (origin
5767 (method url-fetch)
5768 (uri (pypi-uri "networkx" version ".zip"))
5769 (sha256
5770 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
5771 (build-system python-build-system)
5772 ;; python-decorator is needed at runtime.
5773 (propagated-inputs
5774 `(("python-decorator" ,python-decorator)))
5775 (native-inputs
5776 `(("python-nose" ,python-nose)
5777 ("unzip" ,unzip)))
5778 (home-page "https://networkx.github.io/")
5779 (synopsis "Python module for creating and manipulating graphs and networks")
5780 (description
5781 "NetworkX is a Python package for the creation, manipulation, and study
5782of the structure, dynamics, and functions of complex networks.")
5783 (license license:bsd-3)))
5784
5785(define-public python2-networkx
5786 (package-with-python2 python-networkx))
5787
5788(define-public python-datrie
5789 (package
5790 (name "python-datrie")
5791 (version "0.7.1")
5792 (source
5793 (origin
5794 (method url-fetch)
5795 (uri (pypi-uri "datrie" version))
5796 (sha256
5797 (base32
5798 "08r0if7dry2q7p34gf7ffyrlnf4bdvnprxgydlfxgfnvq8f3f4bs"))))
5799 (build-system python-build-system)
5800 (arguments
5801 `(#:phases (modify-phases %standard-phases
5802 (add-before 'build 'cythonize
5803 (lambda _
5804 ;; Regenerate Cython classes to solve ABI issues with Python
5805 ;; 3.7.0. See <https://github.com/pytries/datrie/issues/52>.
5806 (invoke "cython" "src/datrie.pyx" "src/cdatrie.pxd"
5807 "src/stdio_ext.pxd" "-a"))))))
5808 (native-inputs
5809 `(("python-cython" ,python-cython)
5810 ("python-hypothesis" ,python-hypothesis)
5811 ("python-pytest" ,python-pytest)
5812 ("python-pytest-runner" ,python-pytest-runner)))
5813 (home-page "https://github.com/kmike/datrie")
5814 (synopsis "Fast, efficiently stored trie for Python")
5815 (description
5816 "This package provides a fast, efficiently stored trie implementation for
5817Python.")
5818 (license license:lgpl2.1+)))
5819
5820(define-public snakemake
5821 (package
5822 (name "snakemake")
5823 (version "5.2.4")
5824 (source
5825 (origin
5826 (method url-fetch)
5827 (uri (pypi-uri "snakemake" version))
5828 (sha256
5829 (base32 "0gj0xxgiq3mp9qyyrbfzldiaq1giliqw0in64nqiz7vx49myqj7z"))))
5830 (build-system python-build-system)
5831 (arguments
5832 ;; TODO: Package missing test dependencies.
5833 '(#:tests? #f
5834 #:phases
5835 (modify-phases %standard-phases
5836 ;; For cluster execution Snakemake will call Python. Since there is
5837 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
5838 ;; this by calling the snakemake wrapper instead.
5839 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
5840 (lambda* (#:key outputs #:allow-other-keys)
5841 (substitute* "snakemake/executors.py"
5842 (("\\{sys.executable\\} -m snakemake")
5843 (string-append (assoc-ref outputs "out")
5844 "/bin/snakemake")))
5845 #t)))))
5846 (propagated-inputs
5847 `(("python-gitpython" ,python-gitpython)
5848 ("python-wrapt" ,python-wrapt)
5849 ("python-requests" ,python-requests)
5850 ("python-appdirs" ,python-appdirs)
5851 ("python-configargparse" ,python-configargparse)
5852 ("python-datrie" ,python-datrie)
5853 ("python-docutils" ,python-docutils)
5854 ("python-jinja2" ,python-jinja2)
5855 ("python-jsonschema" ,python-jsonschema)
5856 ("python-networkx" ,python-networkx)
5857 ("python-pyyaml" ,python-pyyaml)
5858 ("python-ratelimiter" ,python-ratelimiter)))
5859 (home-page "https://snakemake.readthedocs.io")
5860 (synopsis "Python-based execution environment for make-like workflows")
5861 (description
5862 "Snakemake aims to reduce the complexity of creating workflows by
5863providing a clean and modern domain specific specification language (DSL) in
5864Python style, together with a fast and comfortable execution environment.")
5865 (license license:expat)))
5866
5867;; This is currently needed for the pigx-* packages.
5868(define-public snakemake-4
5869 (package (inherit snakemake)
5870 (version "4.4.0")
5871 (source
5872 (origin
5873 (method url-fetch)
5874 (uri (pypi-uri "snakemake" version))
5875 (sha256
5876 (base32 "0g0paia4z7w3srnqdmavq3hrb2x7qnpf81jx50njl0p7y4y0j8jv"))))
5877 (propagated-inputs
5878 `(("python-wrapt" ,python-wrapt)
5879 ("python-requests" ,python-requests)
5880 ("python-appdirs" ,python-appdirs)
5881 ("python-configargparse" ,python-configargparse)
5882 ("python-pyyaml" ,python-pyyaml)
5883 ("python-ratelimiter" ,python-ratelimiter)))))
5884
5885(define-public python-pyqrcode
5886 (package
5887 (name "python-pyqrcode")
5888 (version "1.2.1")
5889 (source
5890 (origin
5891 (method url-fetch)
5892 (uri (pypi-uri "PyQRCode" version))
5893 (sha256
5894 (base32
5895 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
5896 (build-system python-build-system)
5897 (home-page
5898 "https://github.com/mnooner256/pyqrcode")
5899 (synopsis "QR code generator")
5900 (description
5901 "Pyqrcode is a QR code generator written purely in Python with
5902SVG, EPS, PNG and terminal output.")
5903 (license license:bsd-3)))
5904
5905(define-public python-seaborn
5906 (package
5907 (name "python-seaborn")
5908 (version "0.9.0")
5909 (source
5910 (origin
5911 (method url-fetch)
5912 (uri (pypi-uri "seaborn" version))
5913 (sha256
5914 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))))
5915 (build-system python-build-system)
5916 (arguments
5917 `(#:phases
5918 (modify-phases %standard-phases
5919 (add-before 'check 'start-xserver
5920 (lambda* (#:key inputs #:allow-other-keys)
5921 (let ((xorg-server (assoc-ref inputs "xorg-server")))
5922 ;; There must be a running X server and make check doesn't
5923 ;; start one. Therefore we must do it.
5924 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
5925 (setenv "DISPLAY" ":1")
5926 #t)))
5927 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
5928 (propagated-inputs
5929 `(("python-pandas" ,python-pandas)
5930 ("python-matplotlib" ,python-matplotlib)
5931 ("python-numpy" ,python-numpy)
5932 ("python-scipy" ,python-scipy)))
5933 (native-inputs
5934 `(("python-pytest" ,python-pytest)
5935 ("xorg-server" ,xorg-server)))
5936 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5937 (synopsis "Statistical data visualization")
5938 (description
5939 "Seaborn is a library for making attractive and informative statistical
5940graphics in Python. It is built on top of matplotlib and tightly integrated
5941with the PyData stack, including support for numpy and pandas data structures
5942and statistical routines from scipy and statsmodels.")
5943 (license license:bsd-3)))
5944
5945(define-public python2-seaborn
5946 (package-with-python2 python-seaborn))
5947
5948(define-public python-mpmath
5949 (package
5950 (name "python-mpmath")
5951 (version "0.19")
5952 (source (origin
5953 (method url-fetch)
5954 (uri (string-append "http://mpmath.org/files/mpmath-"
5955 version ".tar.gz"))
5956 (sha256
5957 (base32
5958 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
5959 (build-system python-build-system)
5960 (arguments
5961 '(#:phases
5962 (modify-phases %standard-phases
5963 (replace 'check
5964 (lambda _
5d7a6f1c 5965 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
44d10b1f
RW
5966 (home-page "http://mpmath.org")
5967 (synopsis "Arbitrary-precision floating-point arithmetic in python")
5968 (description
5969 "@code{mpmath} can be used as an arbitrary-precision substitute for
5970Python's float/complex types and math/cmath modules, but also does much
5971more advanced mathematics.")
5972 (license license:bsd-3)))
5973
5974(define-public python2-mpmath
5975 (package-with-python2 python-mpmath))
5976
5977(define-public python-bigfloat
5978 (package
5979 (name "python-bigfloat")
5980 (version "0.3.0")
5981 (source
5982 (origin
5983 (method url-fetch)
5984 (uri (pypi-uri "bigfloat" version))
5985 (sha256
5986 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
5987 (build-system python-build-system)
5988 (inputs
5989 `(("mpfr" ,mpfr)))
5990 (home-page "https://github.com/mdickinson/bigfloat")
5991 (synopsis "Arbitrary precision floating-point arithmetic for Python")
5992 (description
e36de31b 5993 "This package provides a Python interface to the MPFR library for
44d10b1f
RW
5994multiprecision arithmetic.")
5995 (license license:lgpl3+)))
5996
5997(define-public python2-bigfloat
5998 (package-with-python2 python-bigfloat))
5999
6000(define-public python-sympy
6001 (package
6002 (name "python-sympy")
6003 (version "1.1.1")
6004 (source
6005 (origin
6006 (method url-fetch)
6007 (uri (string-append
6008 "https://github.com/sympy/sympy/releases/download/sympy-"
6009 version "/sympy-" version ".tar.gz"))
6010 (sha256
6011 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
6012 (build-system python-build-system)
6013 (arguments
6014 `(#:phases
6015 (modify-phases %standard-phases
6016 ;; Run the core tests after installation. By default it would run
6017 ;; *all* tests, which take a very long time to complete and are known
6018 ;; to be flaky.
6019 (delete 'check)
6020 (add-after 'install 'check
6021 (lambda* (#:key outputs #:allow-other-keys)
6022 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
6023 #t)))))
6024 (propagated-inputs
6025 `(("python-mpmath" ,python-mpmath)))
6026 (home-page "http://www.sympy.org/")
6027 (synopsis "Python library for symbolic mathematics")
6028 (description
6029 "SymPy is a Python library for symbolic mathematics. It aims to become a
6030full-featured computer algebra system (CAS) while keeping the code as simple
6031as possible in order to be comprehensible and easily extensible.")
6032 (license license:bsd-3)))
6033
6034(define-public python2-sympy
6035 (package
6036 (inherit (package-with-python2 python-sympy))
6037 (arguments
6038 `(#:phases
6039 (modify-phases %standard-phases
6040 ;; Run the core tests after installation. By default it would run
6041 ;; *all* tests, which take a very long time to complete and are known
6042 ;; to be flaky.
6043 (delete 'check)
6044 (add-after 'install 'check
6045 (lambda* (#:key outputs #:allow-other-keys)
6046 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
6047 #t)))))))
6048
6049(define-public python-q
6050 (package
6051 (name "python-q")
6052 (version "2.6")
6053 (source
6054 (origin
6055 (method url-fetch)
6056 (uri (pypi-uri "q" version))
6057 (sha256
6058 (base32
6059 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6060 (build-system python-build-system)
6061 (home-page "https://github.com/zestyping/q")
6062 (synopsis "Quick-and-dirty debugging output for tired programmers")
6063 (description
6064 "q is a Python module for \"print\" style of debugging Python code. It
6065provides convenient short API for print out of values, tracebacks, and
6066falling into the Python interpreter.")
6067 (license license:asl2.0)))
6068
6069(define-public python2-q
6070 (package-with-python2 python-q))
6071
6072(define-public python2-xlib
6073 (package
6074 (name "python2-xlib")
6075 (version "0.14")
6076 (source (origin
6077 (method url-fetch)
6078 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6079 "/" version "/"
6080 "python-xlib-" version ".tar.gz"))
6081 (sha256
6082 (base32
6083 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6084 (build-system python-build-system)
6085 (arguments
6086 `(#:python ,python-2 ;Python 2 only
6087 #:tests? #f)) ;no tests
6088 (home-page "http://python-xlib.sourceforge.net/")
6089 (synopsis "Python X11 client library")
6090 (description
6091 "The Python X Library is intended to be a fully functional X client
6092library for Python programs. It is useful to implement low-level X clients.
6093It is written entirely in Python.")
6094 (license license:gpl2+)))
6095
6096(define-public python-singledispatch
6097 (package
6098 (name "python-singledispatch")
6099 (version "3.4.0.3")
6100 (source
6101 (origin
6102 (method url-fetch)
6103 (uri (pypi-uri "singledispatch" version))
6104 (sha256
6105 (base32
6106 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6107 (build-system python-build-system)
6108 (native-inputs
6109 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6110 (home-page
6111 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
6112 (synopsis "Backport of singledispatch feature from Python 3.4")
6113 (description
6114 "This library brings functools.singledispatch from Python 3.4 to Python
61152.6-3.3.")
6116 (license license:expat)))
6117
6118(define-public python2-singledispatch
6119 (package-with-python2 python-singledispatch))
6120
6121;; the python- version can be removed with python-3.5
6122(define-public python-backports-abc
6123 (package
6124 (name "python-backports-abc")
6125 (version "0.5")
6126 (source
6127 (origin
6128 (method url-fetch)
6129 (uri (pypi-uri "backports_abc" version))
6130 (sha256
6131 (base32
6132 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6133 (build-system python-build-system)
6134 (home-page "https://github.com/cython/backports_abc")
6135 (synopsis "Backport of additions to the 'collections.abc' module")
6136 (description
6137 "Python-backports-abc provides a backport of additions to the
36a4366d 6138@code{collections.abc} module in Python-3.5.")
44d10b1f
RW
6139 (license license:psfl)))
6140
6141(define-public python2-backports-abc
6142 (package-with-python2 python-backports-abc))
6143
6144(define-public python-backports-csv
6145 (package
6146 (name "python-backports-csv")
6147 (version "1.0.5")
6148 (source
6149 (origin
6150 (method url-fetch)
6151 (uri (pypi-uri "backports.csv" version))
6152 (sha256
6153 (base32
6154 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
6155 (build-system python-build-system)
6156 (home-page "https://github.com/ryanhiebert/backports.csv")
6157 (synopsis "Backport of Python 3's csv module for Python 2")
6158 (description
6159 "Provides a backport of Python 3's @code{csv} module for parsing
6160comma separated values. The API of the @code{csv} module in Python 2
6161is drastically different from the @code{csv} module in Python 3.
6162This is due, for the most part, to the difference between str in
6163Python 2 and Python 3.")
6164 (license license:psfl)))
6165
6166(define-public python2-backports-csv
6167 (package-with-python2 python-backports-csv))
6168
6169(define-public python2-backports-shutil-get-terminal-size
6170 (package
6171 (name "python2-backports-shutil-get-terminal-size")
6172 (version "1.0.0")
6173 (source
6174 (origin
6175 (method url-fetch)
6176 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6177 (sha256
6178 (base32
6179 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6180 (build-system python-build-system)
6181 (arguments
6182 `(#:python ,python-2
6183 #:phases
6184 (modify-phases %standard-phases
6185 (replace 'check
6186 (lambda _
4a4a7d9a 6187 (invoke "py.test" "-v"))))))
44d10b1f
RW
6188 (native-inputs
6189 `(("python2-pytest" ,python2-pytest)))
6190 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6191 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6192 (description
6193 "This package provides a backport of the @code{get_terminal_size
6194function} from Python 3.3's @code{shutil}.
6195Unlike the original version it is written in pure Python rather than C,
6196so it might be a tiny bit slower.")
6197 (license license:expat)))
6198
6199(define-public python-waf
6200 (package
6201 (name "python-waf")
6202 (version "2.0.11")
6203 (source (origin
6204 (method url-fetch)
6205 (uri (string-append "https://waf.io/"
6206 "waf-" version ".tar.bz2"))
6207 (sha256
6208 (base32
6209 "13zrniwkmfqgsgzi9v5m1367fppp9yzrz6z2ny6hy8dmpb8mj4z4"))))
6210 (build-system python-build-system)
6211 (arguments
6212 '(#:phases
6213 (modify-phases %standard-phases
6214 (replace 'build
6215 (lambda _
6216 (invoke "python" "waf-light" "configure" "build")))
6217 (replace 'check
6218 (lambda _
6219 (invoke "python" "waf" "--version")))
6220 (replace 'install
6221 (lambda* (#:key outputs #:allow-other-keys)
6222 (let ((out (assoc-ref outputs "out")))
6223 (install-file "waf" (string-append out "/bin")))
6224 #t))
6225 ;; waf breaks when it is wrapped.
6226 (delete 'wrap))))
6227 (home-page "https://waf.io/")
6228 (synopsis "Python-based build system")
6229 (description
6230 "Waf is a Python-based framework for configuring, compiling and installing
6231applications.")
6232 (license license:bsd-3)))
6233
6234(define-public python2-waf
6235 (package-with-python2 python-waf))
6236
6237(define-public python-pyzmq
6238 (package
6239 (name "python-pyzmq")
6240 (version "17.1.2")
6241 (source
6242 (origin
6243 (method url-fetch)
6244 (uri (pypi-uri "pyzmq" version))
6245 (sha256
6246 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
6247 (build-system python-build-system)
6248 (arguments
6249 `(#:configure-flags
6250 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6251 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6252 ;; --inplace' for 'python setup.py test' to work.
6253 #:tests? #f))
6254 (inputs
6255 `(("zeromq" ,zeromq)))
6256 (native-inputs
6257 `(("pkg-config" ,pkg-config)
6258 ("python-nose" ,python-nose)))
6259 (home-page "https://github.com/zeromq/pyzmq")
6260 (synopsis "Python bindings for 0MQ")
6261 (description
6262 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6263 (license license:bsd-4)))
6264
6265(define-public python2-pyzmq
6266 (package-with-python2 python-pyzmq))
6267
6268(define-public python-pep8
6269 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
6270 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
6271 ;; some dependents' test suites, and nothing more.
6272 (package
6273 (name "python-pep8")
6274 (version "1.7.0")
6275 (source
6276 (origin
6277 (method url-fetch)
6278 (uri (pypi-uri "pep8" version))
6279 (sha256
6280 (base32
6281 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
6282 (build-system python-build-system)
6283 (home-page "https://pep8.readthedocs.org/")
6284 (synopsis "Python style guide checker")
6285 (description
6286 "This tools checks Python code against some of the style conventions in
6287PEP 8.")
6288 (license license:expat)))
6289
6290(define-public python2-pep8
6291 (package-with-python2 python-pep8))
6292
6293(define-public python-pyflakes
6294 (package
6295 (name "python-pyflakes")
6296 (version "2.0.0")
6297 (source
6298 (origin
6299 (method url-fetch)
6300 (uri (pypi-uri "pyflakes" version))
6301 (sha256
6302 (base32
6303 "0jba28czyvimdc72llms3f17swp3i8jdcabf5w0j00adfbn64xls"))))
6304 (build-system python-build-system)
6305 (home-page
6306 "https://github.com/pyflakes/pyflakes")
6307 (synopsis "Passive checker of Python programs")
6308 (description
6309 "Pyflakes statically checks Python source code for common errors.")
6310 (license license:expat)))
6311
6312(define-public python2-pyflakes
6313 (package-with-python2 python-pyflakes))
6314
6315(define-public python-mccabe
6316 (package
6317 (name "python-mccabe")
6318 (version "0.6.1")
6319 (source
6320 (origin
6321 (method url-fetch)
6322 (uri (pypi-uri "mccabe" version))
6323 (sha256
6324 (base32
6325 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
6326 (build-system python-build-system)
6327 (native-inputs
6328 `(("python-pytest" ,python-pytest-bootstrap)
6329 ("python-pytest-runner" ,python-pytest-runner)))
6330 (home-page "https://github.com/flintwork/mccabe")
6331 (synopsis "McCabe checker, plugin for flake8")
6332 (description
6333 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6334complexity of Python source code.")
6335 (license license:expat)))
6336
6337(define-public python2-mccabe
6338 (package-with-python2 python-mccabe))
6339
6340(define-public python-mccabe-0.2.1
6341 (package (inherit python-mccabe)
6342 (version "0.2.1")
6343 (source
6344 (origin
6345 (method url-fetch)
6346 (uri (pypi-uri "mccabe" version))
6347 (sha256
6348 (base32
6349 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6350
6351(define-public python2-mccabe-0.2.1
6352 (package-with-python2 python-mccabe-0.2.1))
6353
6354;; Flake8 2.4.1 requires an older version of pep8.
6355;; This should be removed ASAP.
6356(define-public python-pep8-1.5.7
6357 (package (inherit python-pep8)
6358 (version "1.5.7")
6359 (source
f3576970
RW
6360 (origin
6361 (method url-fetch)
6362 (uri (pypi-uri "pep8" version))
6363 (sha256
6364 (base32
6365 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
44d10b1f
RW
6366 (arguments
6367 ;; XXX Tests not compatible with Python 3.5.
6368 '(#:tests? #f))))
6369
6370(define-public python2-pep8-1.5.7
6371 (package-with-python2 python-pep8-1.5.7))
6372
6373;; Flake8 2.4.1 requires an older version of pyflakes.
6374;; This should be removed ASAP.
6375(define-public python-pyflakes-0.8.1
6376 (package (inherit python-pyflakes)
6377 (version "0.8.1")
6378 (source
8c4dffb5
RW
6379 (origin
6380 (method url-fetch)
6381 (uri (pypi-uri "pyflakes" version))
6382 (sha256
6383 (base32
6384 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
44d10b1f
RW
6385 (arguments
6386 ;; XXX Tests not compatible with Python 3.5.
6387 '(#:tests? #f))))
6388
6389(define-public python2-pyflakes-0.8.1
6390 (package-with-python2 python-pyflakes-0.8.1))
6391
6392;; This package is used by hypothesis which has thousands of dependent packages.
6393;; FIXME: Consolidate this with "python-flake8" below in the next rebuild cycle.
6394(define-public python-flake8-3.5
6395 (package
6396 (name "python-flake8")
6397 (version "3.5.0")
6398 (source
6399 (origin
6400 (method url-fetch)
6401 (uri (pypi-uri "flake8" version))
6402 (sha256
6403 (base32
6404 "184b33grvvjmiwlv9kyd7yng9qv5ld24154j70z332xxg9gjclvj"))))
6405 (build-system python-build-system)
6406 (arguments
6407 `(#:phases
6408 (modify-phases %standard-phases
6409 ;; Two errors don't seem to have assigned codes.
6410 (add-after 'unpack 'delete-broken-test
6411 (lambda _ (delete-file "tests/unit/test_pyflakes_codes.py") #t))
6412 (add-after 'unpack 'fix-problem-with-pycodestyle
6413 (lambda _
6414 ;; See https://gitlab.com/pycqa/flake8/merge_requests/230
6415 ;; This should no longer be needed with the next release.
6416 (substitute* "setup.py"
6417 (("PEP8_PLUGIN\\('break_around_binary_operator'\\),")
6418 "PEP8_PLUGIN('break_after_binary_operator'),\
6419PEP8_PLUGIN('break_before_binary_operator'),"))
6420 #t))
6421 (delete 'check)
6422 (add-after 'install 'check
6423 (lambda* (#:key inputs outputs #:allow-other-keys)
6424 (add-installed-pythonpath inputs outputs)
6425 (invoke "pytest" "-v")
6426 #t)))))
6427 (propagated-inputs
6428 `(("python-pycodestyle" ,python-pycodestyle)
6429 ("python-pyflakes" ,python-pyflakes)
6430 ("python-mccabe" ,python-mccabe)))
6431 (native-inputs
6432 `(("python-mock" ,python-mock)
6433 ("python-pytest" ,python-pytest-bootstrap)
6434 ("python-pytest-runner" ,python-pytest-runner)))
6435 (home-page "https://gitlab.com/pycqa/flake8")
6436 (synopsis
6437 "The modular source code checker: pep8, pyflakes and co")
6438 (description
6439 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
6440 (properties `((python2-variant . ,(delay python2-flake8-3.5))))
6441 (license license:expat)))
6442
6443(define-public python2-flake8-3.5
6444 (let ((base (package-with-python2 (strip-python2-variant python-flake8-3.5))))
6445 (package (inherit base)
6446 (propagated-inputs
6447 `(("python2-configparser" ,python2-configparser)
6448 ("python2-enum34" ,python2-enum34)
6449 ,@(package-propagated-inputs base))))))
6450
6451;; Version 3.5.0 has compatibility issues with Pyflakes 2.0, so we need
6452;; this newer version. Keep it as a separate variable for now to avoid
6453;; rebuilding "python-hypothesis"; this should be removed in the next
6454;; rebuild cycle.
6455(define-public python-flake8
6456 (package
6457 (inherit python-flake8-3.5)
6458 (version "3.6.0")
6459 (source (origin
6460 (method url-fetch)
6461 (uri (pypi-uri "flake8" version))
6462 (sha256
6463 (base32
6464 "0w0nprx22rbvrrkbfx9v5jc5gskbm08g219l7r8wai8zfswgadba"))))
6465 (arguments
6466 (substitute-keyword-arguments (package-arguments python-flake8-3.5)
6467 ((#:phases phases)
6468 `(modify-phases ,phases
6469 (delete 'delete-broken-test)
6470 (delete 'fix-problem-with-pycodestyle)))))
6471 (properties `((python2-variant . ,(delay python2-flake8))))))
6472
6473(define-public python2-flake8
6474 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
6475 (package (inherit base)
6476 (propagated-inputs
6477 (package-propagated-inputs python2-flake8-3.5)))))
6478
6479;; python-hacking requires flake8 <2.6.0.
6480(define-public python-flake8-2.5
6481 (package
6482 (inherit python-flake8)
6483 (version "2.5.5")
6484 (source (origin
6485 (method url-fetch)
6486 (uri (pypi-uri "flake8" version))
6487 (sha256
6488 (base32
6489 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
6490 (propagated-inputs
6491 `(("python-pep8" ,python-pep8)
6492 ,@(package-propagated-inputs python-flake8)))
6493 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
6494
6495(define-public python2-flake8-2.5
6496 (package
6497 (inherit python2-flake8)
6498 (version (package-version python-flake8-2.5))
6499 (source (origin
6500 (inherit (package-source python-flake8-2.5))))
6501 (propagated-inputs
6502 `(("python2-pep8" ,python2-pep8)
6503 ,@(package-propagated-inputs python2-flake8)))))
6504
6505(define-public python-flake8-polyfill
6506 (package
6507 (name "python-flake8-polyfill")
6508 (version "1.0.2")
6509 (source
6510 (origin
6511 (method url-fetch)
6512 (uri (pypi-uri "flake8-polyfill" version))
6513 (sha256
6514 (base32
6515 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
6516 (build-system python-build-system)
6517 (arguments
6518 '(#:phases
6519 (modify-phases %standard-phases
6520 (replace 'check
6521 (lambda _
6522 (setenv "PYTHONPATH"
6523 (string-append (getcwd) "/build/lib:"
6524 (getenv "PYTHONPATH")))
4f0a0894 6525 (invoke "py.test" "-v"))))))
44d10b1f
RW
6526 (native-inputs
6527 `(("python-flake8" ,python-flake8)
6528 ("python-mock" ,python-mock)
6529 ("python-pep8" ,python-pep8)
6530 ("python-pycodestyle" ,python-pycodestyle)
6531 ("python-pytest" ,python-pytest)))
6532 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6533 (synopsis "Polyfill package for Flake8 plugins")
6534 (description
6535 "This package that provides some compatibility helpers for Flake8
6536plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6537 (license license:expat)))
6538
6539(define-public python2-flake8-polyfill
6540 (package-with-python2 python-flake8-polyfill))
6541
6542(define-public python-mistune
6543 (package
6544 (name "python-mistune")
6545 (version "0.8.4")
6546 (source
6547 (origin
6548 (method url-fetch)
6549 (uri (pypi-uri "mistune" version))
6550 (sha256
6551 (base32
6552 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
6553 (build-system python-build-system)
6554 (native-inputs
6555 `(("python-nose" ,python-nose)
6556 ("python-cython" ,python-cython)))
6557 (home-page "https://github.com/lepture/mistune")
6558 (synopsis "Markdown parser in pure Python")
6559 (description "This package provides a fast markdown parser in pure
6560Python.")
6561 (license license:bsd-3)))
6562
6563(define-public python2-mistune
6564 (package-with-python2 python-mistune))
6565
6566(define-public python-markdown
6567 (package
6568 (name "python-markdown")
ceb1936a 6569 (version "3.1.1")
44d10b1f
RW
6570 (source
6571 (origin
6572 (method url-fetch)
6573 (uri (pypi-uri "Markdown" version))
6574 (sha256
6575 (base32
ceb1936a 6576 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f"))))
44d10b1f
RW
6577 (build-system python-build-system)
6578 (native-inputs
6579 `(("python-nose" ,python-nose)
6580 ("python-pyyaml" ,python-pyyaml)))
6581 (home-page "https://python-markdown.github.io/")
6582 (synopsis "Python implementation of Markdown")
6583 (description
6584 "This package provides a Python implementation of John Gruber's
6585Markdown. The library features international input, various Markdown
6586extensions, and several HTML output formats. A command line wrapper
6587markdown_py is also provided to convert Markdown files to HTML.")
6588 (license license:bsd-3)))
6589
6590(define-public python2-markdown
6591 (package-with-python2 python-markdown))
6592
6593(define-public python-ptyprocess
6594 (package
6595 (name "python-ptyprocess")
6596 (version "0.5.2")
6597 (source
6598 (origin
6599 (method url-fetch)
6600 (uri (pypi-uri "ptyprocess" version))
6601 (sha256
6602 (base32
6603 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
6604 (build-system python-build-system)
6605 (native-inputs
6606 `(("python-nose" ,python-nose)))
6607 (arguments
6608 `(#:phases
6609 (modify-phases %standard-phases
6610 (replace 'check
7904d6fa 6611 (lambda _ (invoke "nosetests"))))))
44d10b1f
RW
6612 (home-page "https://github.com/pexpect/ptyprocess")
6613 (synopsis "Run a subprocess in a pseudo terminal")
6614 (description
6615 "This package provides a Python library used to launch a subprocess in a
6616pseudo terminal (pty), and interact with both the process and its pty.")
6617 (license license:isc)))
6618
6619(define-public python2-ptyprocess
6620 (package-with-python2 python-ptyprocess))
6621
6622(define-public python-cram
6623 (package
6624 (name "python-cram")
6625 (version "0.7")
6626 (home-page "https://bitheap.org/cram/")
6627 (source (origin
6628 (method url-fetch)
6629 (uri (list (string-append home-page "cram-"
6630 version ".tar.gz")
6631 (pypi-uri "cram" version)))
6632 (sha256
6633 (base32
6634 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6635 (arguments
6636 '(#:phases
6637 (modify-phases %standard-phases
6638 (add-after 'unpack 'patch-source
6639 (lambda _
6640 (substitute* (find-files "cram" ".*\\.py$")
6641 ;; Replace default shell path.
6642 (("/bin/sh") (which "sh")))
6643 (substitute* (find-files "tests" ".*\\.t$")
6644 (("md5") "md5sum")
6645 (("/bin/bash") (which "bash"))
6646 (("/bin/sh") (which "sh")))
6647 (substitute* "cram/_test.py"
6648 ;; This hack works around a bug triggered by substituting
6649 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6650 ;; "cram -h", which breaks the output at 80 characters. This
6651 ;; causes the line showing the default shell to break into two
6652 ;; lines, but the test expects a single line...
6653 (("env\\['COLUMNS'\\] = '80'")
6654 "env['COLUMNS'] = '160'"))
6655 #t))
6656 (delete 'check)
6657 (add-after 'install 'check
6658 ;; The test phase uses the built library and executable.
6659 ;; It's easier to run it after install since the build
6660 ;; directory contains version-specific PATH.
6661 (lambda* (#:key inputs outputs #:allow-other-keys)
6662 (add-installed-pythonpath inputs outputs)
6663 (setenv "PATH" (string-append (getenv "PATH") ":"
6664 (assoc-ref outputs "out") "/bin"))
2d7db192 6665 (invoke "make" "test"))))))
44d10b1f
RW
6666 (build-system python-build-system)
6667 (native-inputs
6668 `(("python-coverage" ,python-coverage)
6669 ("which" ,which)))
6670 (synopsis "Simple testing framework for command line applications")
6671 (description
6672 "Cram is a functional testing framework for command line applications.
6673Cram tests look like snippets of interactive shell sessions. Cram runs each
6674command and compares the command output in the test with the command’s actual
6675output.")
6676 (license license:gpl2+)))
6677
6678(define-public python2-cram
6679 (package-with-python2 python-cram))
6680
6681(define-public python-straight-plugin
6682 (package
6683 (name "python-straight-plugin")
6684 (version "1.4.1")
6685 (source
6686 (origin
6687 (method url-fetch)
6688 (uri (pypi-uri "straight.plugin" version))
6689 (sha256
6690 (base32
6691 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6692 (build-system python-build-system)
6693 (home-page "https://github.com/ironfroggy/straight.plugin")
6694 (synopsis "Simple namespaced plugin facility")
6695 (description "Straight Plugin provides a type of plugin you can create from
6696almost any existing Python modules, and an easy way for outside developers to
6697add functionality and customization to your projects with their own plugins.")
6698 (license license:expat)))
6699
6700(define-public python2-straight-plugin
6701 (package-with-python2 python-straight-plugin))
6702
6703(define-public python-fonttools
6704 (package
6705 (name "python-fonttools")
6706 (version "3.28.0")
6707 (source (origin
6708 (method url-fetch)
6709 (uri (pypi-uri "fonttools" version ".zip"))
6710 (sha256
6711 (base32
6712 "0vsvjhidpb5kywpjgz1j3fywzkddxkb0afqai18qa3h6lqjyxwpb"))))
6713 (build-system python-build-system)
6714 (native-inputs
6715 `(("unzip" ,unzip)
6716 ("python-pytest" ,python-pytest)
6717 ("python-pytest-runner" ,python-pytest-runner)))
6718 (home-page "https://github.com/behdad/fonttools")
6719 (synopsis "Tools to manipulate font files")
6720 (description
6721 "FontTools/TTX is a library to manipulate font files from Python. It
6722supports reading and writing of TrueType/OpenType fonts, reading and writing
6723of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6724also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6725from an XML-based format.")
6726 (license license:expat)))
6727
6728(define-public python2-fonttools
6729 (package-with-python2 python-fonttools))
6730
6731(define-public python-ly
6732 (package
6733 (name "python-ly")
6734 (version "0.9.5")
6735 (source
6736 (origin
6737 (method url-fetch)
6738 (uri (pypi-uri name version))
6739 (sha256
6740 (base32
6741 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
6742 (build-system python-build-system)
6743 (arguments
6744 ;; FIXME: Some tests need network access.
6745 '(#:tests? #f))
6746 (synopsis "Tool and library for manipulating LilyPond files")
6747 (description "This package provides a Python library to parse, manipulate
6748or create documents in LilyPond format. A command line program ly is also
6749provided that can be used to do various manipulations with LilyPond files.")
6750 (home-page "https://pypi.python.org/pypi/python-ly")
6751 (license license:gpl2+)))
6752
6753(define-public python-appdirs
6754 (package
6755 (name "python-appdirs")
6756 (version "1.4.3")
6757 (source
6758 (origin
6759 (method url-fetch)
6760 (uri (pypi-uri "appdirs" version))
6761 (sha256
6762 (base32
6763 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
6764 (build-system python-build-system)
6765 (home-page "https://github.com/ActiveState/appdirs")
6766 (synopsis
6767 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6768 (description
6769 "This module provides a portable way of finding out where user data
6770should be stored on various operating systems.")
6771 (license license:expat)))
6772
6773(define-public python2-appdirs
6774 (package-with-python2 python-appdirs))
6775
6776(define-public python-llfuse
6777 (package
6778 (name "python-llfuse")
6779 (version "1.3.5")
6780 (source (origin
6781 (method url-fetch)
6782 (uri (pypi-uri "llfuse" version ".tar.bz2"))
6783 (sha256
6784 (base32
6785 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
6786 (build-system python-build-system)
6787 (inputs
6788 `(("fuse" ,fuse)
6789 ("attr" ,attr)))
6790 (native-inputs
6791 `(("pkg-config" ,pkg-config)))
6792 (synopsis "Python bindings for FUSE")
6793 (description
6794 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6795 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
6796 (license license:lgpl2.0+)
6797 (properties `((python2-variant . ,(delay python2-llfuse))))))
6798
6799(define-public python2-llfuse
6800 (package (inherit (package-with-python2
6801 (strip-python2-variant python-llfuse)))
6802 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6803
6804;; For attic-0.16
6805(define-public python-llfuse-0.41
6806 (package (inherit python-llfuse)
6807 (version "0.41.1")
6808 (source (origin
6809 (method url-fetch)
6810 (uri (string-append
6811 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6812 "llfuse-" version ".tar.bz2"))
6813 (sha256
6814 (base32
6815 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
6816 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6817 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
6818 (license (list license:expat license:lgpl2.0+))))
6819
6820(define-public python-msgpack
6821 (package
6822 (name "python-msgpack")
6823 (version "0.5.6")
6824 (source (origin
6825 (method url-fetch)
6826 (uri (pypi-uri "msgpack" version))
6827 (sha256
6828 (base32
6829 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
6830 (build-system python-build-system)
6831 (arguments
6832 `(#:modules ((guix build utils)
6833 (guix build python-build-system)
6834 (ice-9 ftw)
6835 (srfi srfi-1)
6836 (srfi srfi-26))
6837 #:phases
6838 (modify-phases %standard-phases
6839 (replace 'check
6840 (lambda _
6841 (let ((cwd (getcwd)))
6842 (setenv "PYTHONPATH"
6843 (string-append cwd "/build/"
6844 (find (cut string-prefix? "lib" <>)
6845 (scandir (string-append cwd "/build")))
6846 ":"
6847 (getenv "PYTHONPATH")))
6848 (invoke "pytest" "-v" "test")))))))
6849 (native-inputs
6850 `(("python-pytest" ,python-pytest)))
6851 (synopsis "MessagePack (de)serializer")
6852 (description "MessagePack is a fast, compact binary serialization format,
6853suitable for similar data to JSON. This package provides CPython bindings for
6854reading and writing MessagePack data.")
6855 (home-page "https://pypi.python.org/pypi/msgpack/")
6856 (license license:asl2.0)))
6857
6858;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
6859;; release 0.5. Some packages like borg still call it by the old name for now.
6860;; <https://bugs.gnu.org/30662>
6861(define-public python-msgpack-transitional
6862 (package
6863 (inherit python-msgpack)
6864 (name "python-msgpack-transitional")
6865 (arguments
6866 (substitute-keyword-arguments (package-arguments python-msgpack)
6867 ((#:phases phases)
6868 `(modify-phases ,phases
6869 (add-after 'unpack 'configure-transitional
6870 (lambda _
6871 ;; Keep using the old name.
6872 (substitute* "setup.py"
6873 (("TRANSITIONAL = False")
6874 "TRANSITIONAL = 1"))
6875 #t))))))))
6876
6877(define-public python2-msgpack
6878 (package-with-python2 python-msgpack))
6879
6880(define-public python-netaddr
6881 (package
6882 (name "python-netaddr")
6883 (version "0.7.19")
6884 (source
6885 (origin
6886 (method url-fetch)
6887 (uri (pypi-uri "netaddr" version))
6888 (sha256
6889 (base32
6890 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
6891 (build-system python-build-system)
6892 (arguments `(#:tests? #f)) ;; No tests.
6893 (home-page "https://github.com/drkjam/netaddr/")
6894 (synopsis "Pythonic manipulation of network addresses")
6895 (description
6896 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6897and MAC network addresses.")
6898 (license license:bsd-3)))
6899
6900(define-public python2-netaddr
6901 (package-with-python2 python-netaddr))
6902
dd85eca0
AG
6903(define-public python2-pyroute2
6904 (package
6905 (name "python2-pyroute2")
6906 (version "0.5.6")
6907 (source
6908 (origin
6909 (method url-fetch)
6910 (uri (pypi-uri "pyroute2" version))
6911 (sha256
6912 (base32
6913 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
6914 (build-system python-build-system)
6915 (arguments
6916 `(#:python ,python-2)) ;Python 3.x is not supported
6917 (home-page "https://github.com/svinota/pyroute2")
6918 (synopsis "Python netlink library")
6919 (description
6920 "Pyroute2 is a pure Python netlink library with minimal dependencies.
6921Supported netlink families and protocols include:
6922@itemize
6923@item rtnl, network settings - addresses, routes, traffic controls
6924@item nfnetlink - netfilter API: ipset, nftables, ...
6925@item ipq - simplest userspace packet filtering, iptables QUEUE target
6926@item devlink - manage and monitor devlink-enabled hardware
6927@item generic - generic netlink families
6928 @itemize
6929 @item nl80211 - wireless functions API (basic support)
6930 @item taskstats - extended process statistics
6931 @item acpi_events - ACPI events monitoring
6932 @item thermal_events - thermal events monitoring
6933 @item VFS_DQUOT - disk quota events monitoring
6934 @end itemize
6935@end itemize")
6936 (license license:gpl2+)))
6937
44d10b1f
RW
6938(define-public python-wrapt
6939 (package
6940 (name "python-wrapt")
dddd7a75 6941 (version "1.11.1")
44d10b1f
RW
6942 (source
6943 (origin
6944 (method url-fetch)
6945 (uri (pypi-uri "wrapt" version))
6946 (sha256
6947 (base32
dddd7a75 6948 "0cqmysny1pz01jw26q48q5zasvns6507rwhgm6wcw743f0r01sja"))))
44d10b1f
RW
6949 (build-system python-build-system)
6950 (arguments
6951 ;; Tests are not included in the tarball, they are only available in the
6952 ;; git repository.
6953 `(#:tests? #f))
6954 (home-page "https://github.com/GrahamDumpleton/wrapt")
6955 (synopsis "Module for decorators, wrappers and monkey patching")
6956 (description
6957 "The aim of the wrapt module is to provide a transparent object proxy for
6958 Python, which can be used as the basis for the construction of function
6959 wrappers and decorator functions.")
6960 (license license:bsd-2)))
6961
6962(define-public python2-wrapt
6963 (package-with-python2 python-wrapt))
6964
6965(define-public python-xlrd
6966 (package
6967 (name "python-xlrd")
6968 (version "1.0.0")
6969 (source (origin
6970 (method url-fetch)
6971 (uri (pypi-uri "xlrd" version))
6972 (sha256
6973 (base32
6974 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
6975 (build-system python-build-system)
6976 (arguments
6977 `(#:phases
6978 (modify-phases %standard-phases
6979 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
6980 ;; run tests instead for now.
45fd0081 6981 (replace 'check (lambda _ (invoke "nosetests"))))))
44d10b1f
RW
6982 (native-inputs `(("python-nose" ,python-nose)))
6983 (home-page "http://www.python-excel.org/")
6984 (synopsis "Library for extracting data from Excel files")
a0909286 6985 (description "This package provides a library to extract data from
44d10b1f
RW
6986spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
6987@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
6988Unicode-aware. It is not intended as an end-user tool.")
6989 (license license:bsd-3)))
6990
6991(define-public python2-xlrd
6992 (package-with-python2 python-xlrd))
6993
6994(define-public python-prettytable
6995 (package
6996 (name "python-prettytable")
6997 (version "0.7.2")
6998 (source
6999 (origin
7000 (method url-fetch)
337c3a1e 7001 (uri (pypi-uri "prettytable" version ".tar.bz2"))
44d10b1f
RW
7002 (sha256
7003 (base32
7004 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7005 (build-system python-build-system)
7006 (home-page "http://code.google.com/p/prettytable/")
7007 (synopsis "Display tabular data in an ASCII table format")
7008 (description
7009 "A library designed to represent tabular data in visually appealing ASCII
7010tables. PrettyTable allows for selection of which columns are to be printed,
7011independent alignment of columns (left or right justified or centred) and
7012printing of sub-tables by specifying a row range.")
7013 (license license:bsd-3)))
7014
7015(define-public python2-prettytable
7016 (package-with-python2 python-prettytable))
7017
7018(define-public python-tables
7019 (package
7020 (name "python-tables")
7021 (version "3.4.4")
7022 (source
7023 (origin
7024 (method url-fetch)
7025 (uri (pypi-uri "tables" version))
7026 (sha256
7027 (base32
7028 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
7029 (modules '((guix build utils)))
7030 (snippet
7031 '(begin
7032 ;; Remove pre-compiled .pyc files from source.
7033 (for-each delete-file-recursively
7034 (find-files "." "__pycache__" #:directories? #t))
7035 (for-each delete-file (find-files "." "\\.pyc$"))
7036 #t))))
7037 (build-system python-build-system)
7038 (arguments
7039 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7040 ;; or "check", so we must override the build and check phases.
7041 #:phases
7042 (modify-phases %standard-phases
7043 (add-after 'unpack 'use-gcc
7044 (lambda _
7045 (substitute* "setup.py"
7046 (("compiler = new_compiler\\(\\)" line)
7047 (string-append line
7048 "\ncompiler.set_executables(compiler='gcc',"
7049 "compiler_so='gcc',"
7050 "linker_exe='gcc',"
7051 "linker_so='gcc -shared')")))
7052 #t))
7053 (replace 'build
7054 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
7055 (invoke "python" "setup.py" "build"
7056 (string-append "--hdf5="
7057 (assoc-ref inputs "hdf5")))))
44d10b1f
RW
7058 (replace 'check
7059 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
7060 (invoke "python" "setup.py" "check"
7061 (string-append "--hdf5="
7062 (assoc-ref inputs "hdf5"))))))))
44d10b1f
RW
7063 (propagated-inputs
7064 `(("python-numexpr" ,python-numexpr)
7065 ("python-numpy" ,python-numpy)))
7066 (native-inputs
7067 `(("python-cython" ,python-cython)
7068 ("pkg-config" ,pkg-config)))
7069 (inputs
7070 `(("hdf5" ,hdf5)
7071 ("bzip2" ,bzip2)
7072 ("zlib" ,zlib)))
7073 (home-page "http://www.pytables.org/")
7074 (synopsis "Hierarchical datasets for Python")
7075 (description "PyTables is a package for managing hierarchical datasets and
7076designed to efficiently cope with extremely large amounts of data.")
7077 (license license:bsd-3)))
7078
7079(define-public python2-tables
7080 (package-with-python2 python-tables))
7081
7082(define-public python-pyasn1
7083 (package
7084 (name "python-pyasn1")
7085 (version "0.4.3")
7086 (source
7087 (origin
7088 (method url-fetch)
7089 (uri (pypi-uri "pyasn1" version))
7090 (sha256
7091 (base32
7092 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
7093 (build-system python-build-system)
7094 (home-page "http://pyasn1.sourceforge.net/")
7095 (synopsis "ASN.1 types and codecs")
7096 (description
7097 "This is an implementation of ASN.1 types and codecs in Python. It is
7098suitable for a wide range of protocols based on the ASN.1 specification.")
7099 (license license:bsd-2)))
7100
7101(define-public python2-pyasn1
7102 (package-with-python2 python-pyasn1))
7103
7104(define-public python-pyasn1-modules
7105 (package
7106 (name "python-pyasn1-modules")
7107 (version "0.2.2")
7108 (source
7109 (origin
7110 (method url-fetch)
7111 (uri (pypi-uri "pyasn1-modules" version))
7112 (sha256
7113 (base32
7114 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
7115 (build-system python-build-system)
7116 (propagated-inputs
7117 `(("python-pyasn1" ,python-pyasn1)))
7118 (home-page "https://sourceforge.net/projects/pyasn1/")
7119 (synopsis "ASN.1 codec implementations")
7120 (description
7121 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7122implementations of ASN.1-based codecs and protocols.")
7123 (license license:bsd-3)))
7124
7125(define-public python2-pyasn1-modules
7126 (package-with-python2 python-pyasn1-modules))
7127
7128(define-public python-ipaddress
7129 (package
7130 (name "python-ipaddress")
7131 (version "1.0.22")
7132 (source (origin
7133 (method url-fetch)
7134 (uri (pypi-uri "ipaddress" version))
7135 (sha256
7136 (base32
7137 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
7138 (build-system python-build-system)
7139 (home-page "https://github.com/phihag/ipaddress")
7140 (synopsis "IP address manipulation library")
7141 (description
7142 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7143 in Python. This library is used to create, poke at, and manipulate IPv4 and
7144 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7145 module to older versions of Python.")
7146 (license license:psfl)))
7147
7148(define-public python2-ipaddress
7149 (package-with-python2 python-ipaddress))
7150
7151(define-public python2-ipaddr
7152 (package
7153 (name "python2-ipaddr")
7154 (version "2.1.11")
7155 (source
7156 (origin
7157 (method url-fetch)
7158 (uri (pypi-uri "ipaddr" version))
7159 (sha256
7160 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7161 (build-system python-build-system)
7162 (arguments
7163 `(#:python ,python-2 ;version 2 only
7164 #:phases
7165 (modify-phases %standard-phases
7166 (replace 'check
40b8c4e3 7167 (lambda _ (invoke "python" "ipaddr_test.py"))))))
44d10b1f
RW
7168 (home-page "https://github.com/google/ipaddr-py")
7169 (synopsis "IP address manipulation library")
7170 (description
7171 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7172IPv6 addresses and networks.
7173
7174For new implementations you may prefer to use the standard module
7175@code{ipaddress}, which was introduced in Python 3.3 and backported to older
7176versions of Python.")
7177 (license license:asl2.0)))
7178
7179(define-public python-idna
7180 (package
7181 (name "python-idna")
e95c9837 7182 (version "2.8")
44d10b1f
RW
7183 (source
7184 (origin
7185 (method url-fetch)
7186 (uri (pypi-uri "idna" version))
7187 (sha256
7188 (base32
e95c9837 7189 "01rlkigdxg17sf9yar1jl8n18ls59367wqh59hnawlyg53vb6my3"))))
44d10b1f
RW
7190 (build-system python-build-system)
7191 (home-page "https://github.com/kjd/idna")
7192 (synopsis "Internationalized domain names in applications")
7193 (description
7194 "This is a library to support the Internationalised Domain Names in
7195Applications (IDNA) protocol as specified in RFC 5891. This version of the
7196protocol is often referred to as “IDNA2008” and can produce different results
7197from the earlier standard from 2003. The library is also intended to act as a
7198suitable drop-in replacement for the “encodings.idna” module that comes with
7199the Python standard library but currently only supports the older 2003
7200specification.")
7201 (license license:bsd-4)))
7202
7203(define-public python2-idna
7204 (package-with-python2 python-idna))
7205
7206(define-public python-idna-ssl
7207 (package
7208 (name "python-idna-ssl")
7209 (version "1.0.1")
7210 (source
7211 (origin
7212 (method url-fetch)
7213 (uri (pypi-uri "idna-ssl" version))
7214 (sha256
7215 (base32
7216 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
7217 (build-system python-build-system)
7218 (arguments
7219 `(#:tests? #f)) ;circular dependency with python-aiohttp
7220 (home-page "https://github.com/aio-libs/idna-ssl")
7221 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
7222 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
7223domains support.")
7224 (license license:expat)))
7225
7226(define-public python-pretend
7227 (package
7228 (name "python-pretend")
7229 (version "1.0.9")
7230 (source
7231 (origin
7232 (method url-fetch)
9f1f22ee 7233 (uri (pypi-uri "pretend" version))
44d10b1f
RW
7234 (sha256
7235 (base32
7236 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
7237 (build-system python-build-system)
7238 (home-page "https://github.com/alex/pretend")
7239 (synopsis "Library for stubbing in Python")
7240 (description
7241 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7242technique for writing tests. You may hear the term mixed up with mocks,
7243fakes, or doubles. Basically, a stub is an object that returns pre-canned
7244responses, rather than doing any computation.")
7245 (license license:bsd-3)))
7246
7247(define-public python2-pretend
7248 (package-with-python2 python-pretend))
7249
7250(define-public python-pip
7251 (package
7252 (name "python-pip")
7253 (version "18.1")
7254 (source
7255 (origin
7256 (method url-fetch)
7257 (uri (pypi-uri "pip" version))
7258 (sha256
7259 (base32
7260 "188fclay154s520n43s7cxxlhdaiysvxf19zk8vr1xbyjyyr58n0"))))
7261 (build-system python-build-system)
7262 (arguments
7263 '(#:tests? #f)) ; there are no tests in the pypi archive.
7264 (home-page "https://pip.pypa.io/")
7265 (synopsis "Package manager for Python software")
7266 (description
7267 "Pip is a package manager for Python software, that finds packages on the
7268Python Package Index (PyPI).")
7269 (license license:expat)))
7270
7271(define-public python2-pip
7272 (package-with-python2 python-pip))
7273
7274(define-public python-tlsh
7275 (package
7276 (name "python-tlsh")
7277 (version "3.4.5")
7278 (home-page "https://github.com/trendmicro/tlsh")
3e3ff8ad
TGR
7279 (source
7280 (origin
7281 (method git-fetch)
7282 (uri (git-reference
7283 (url "https://github.com/trendmicro/tlsh.git")
7284 (commit (string-append "v" version))))
7285 (file-name (git-file-name name version))
7286 (sha256
7287 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
44d10b1f
RW
7288 (build-system cmake-build-system)
7289 (arguments
7290 '(#:out-of-source? #f
7291 #:phases (modify-phases %standard-phases
7292 (replace
7293 'install
7294 (lambda* (#:key outputs #:allow-other-keys)
7295 ;; Build and install the Python bindings. The underlying
7296 ;; C++ library is apparently not meant to be installed.
7297 (let ((out (assoc-ref outputs "out")))
7298 (with-directory-excursion "py_ext"
7299 (and (system* "python" "setup.py" "build")
7300 (system* "python" "setup.py" "install"
7301 (string-append "--prefix=" out))))))))))
7302 (inputs `(("python" ,python-wrapper))) ;for the bindings
7303 (synopsis "Fuzzy matching library for Python")
7304 (description
7305 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7306Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7307value which can be used for similarity comparisons. Similar objects have
7308similar hash values, which allows for the detection of similar objects by
7309comparing their hash values. The byte stream should have a sufficient amount
7310of complexity; for example, a byte stream of identical bytes will not generate
7311a hash value.")
7312 (license license:asl2.0)))
7313
7314(define-public python2-tlsh
7315 (package
7316 (inherit python-tlsh)
7317 (name "python2-tlsh")
7318 (inputs `(("python" ,python-2)))))
7319
7320(define-public python-termcolor
7321 (package
7322 (name "python-termcolor")
7323 (version "1.1.0")
7324 (source
7325 (origin
7326 (method url-fetch)
7327 (uri (pypi-uri "termcolor" version))
7328 (sha256
7329 (base32
7330 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7331 (build-system python-build-system)
7332 (arguments
7333 ;; There are no tests.
7334 `(#:tests? #f))
7335 (home-page "https://pypi.python.org/pypi/termcolor")
7336 (synopsis "ANSII Color formatting for terminal output")
7337 (description
7338 "This package provides ANSII Color formatting for output in terminals.")
7339 (license license:expat)))
7340
7341(define-public python2-termcolor
7342 (package-with-python2 python-termcolor))
7343
7344(define-public python-libarchive-c
7345 (package
7346 (name "python-libarchive-c")
7347 (version "2.8")
7348 (source (origin
7349 (method url-fetch)
7350 (uri (pypi-uri "libarchive-c" version))
7351 (sha256
7352 (base32
7353 "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06"))))
7354 (build-system python-build-system)
7355 (arguments
7356 '(#:phases (modify-phases %standard-phases
7357 (add-before
7358 'build 'reference-libarchive
7359 (lambda* (#:key inputs #:allow-other-keys)
7360 ;; Retain the absolute file name of libarchive.so.
7361 (let ((libarchive (assoc-ref inputs "libarchive")))
7362 (substitute* "libarchive/ffi.py"
7363 (("find_library\\('archive'\\)")
7364 (string-append "'" libarchive
7365 "/lib/libarchive.so'"))))))
7366 (replace 'check
7367 (lambda _ (invoke "pytest" "-vv"))))))
7368 (native-inputs
7369 `(("python-mock" ,python-mock)
7370 ("python-pytest" ,python-pytest)))
7371 (inputs
7372 `(("libarchive" ,libarchive)))
7373 (home-page "https://github.com/Changaco/python-libarchive-c")
7374 (synopsis "Python interface to libarchive")
7375 (description
7376 "This package provides Python bindings to libarchive, a C library to
7377access possibly compressed archives in many different formats. It uses
7378Python's @code{ctypes} foreign function interface (FFI).")
7379 (license license:lgpl2.0+)))
7380
7381(define-public python2-libarchive-c
7382 (package-with-python2 python-libarchive-c))
7383
7384(define-public python-file
7385 (package
7386 (inherit file)
7387 (name "python-file")
7388 (build-system python-build-system)
7389 (arguments
7390 '(#:tests? #f ;no tests
7391 #:configure-flags '("--single-version-externally-managed" "--root=/")
7392 #:phases (modify-phases %standard-phases
7393 (add-before 'build 'change-directory
7394 (lambda _
7395 (chdir "python")
7396 #t))
7397 (add-before 'build 'set-library-file-name
7398 (lambda* (#:key inputs #:allow-other-keys)
7399 (let ((file (assoc-ref inputs "file")))
7400 (substitute* "magic.py"
7401 (("find_library\\('magic'\\)")
7402 (string-append "'" file "/lib/libmagic.so'")))
7403 #t))))))
7404 (inputs `(("file" ,file)))
528ea990
LC
7405 (native-inputs (if (%current-target-system)
7406 `(("self" ,this-package))
7407 '()))
44d10b1f
RW
7408 (synopsis "Python bindings to the libmagic file type guesser. Note that
7409this module and the python-magic module both provide a \"magic.py\" file;
7410these two modules, which are different and were developed separately, both
7411serve the same purpose: provide Python bindings for libmagic.")))
7412
7413(define-public python2-file
7414 (package-with-python2 python-file))
7415
7416(define-public python-debian
7417 (package
7418 (name "python-debian")
7419 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
7420 (version "0.1.28")
7421 (source
7422 (origin
7423 (method url-fetch)
7424 (uri (pypi-uri name version))
7425 (sha256
7426 (base32
7427 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
7428 (build-system python-build-system)
7429 (propagated-inputs
7430 `(("python-six" ,python-six)))
7431 (synopsis "Debian package related modules")
7432 (description
7433 ;; XXX: Use @enumerate instead of @itemize to work around
7434 ;; <http://bugs.gnu.org/21772>.
7435 "This package provides Python modules that abstract many formats of
7436Debian-related files, such as:
7437
7438@enumerate
7439@item Debtags information;
7440@item @file{debian/changelog} files;
7441@item packages files, pdiffs;
7442@item control files of single or multiple RFC822-style paragraphs---e.g.
7443 @file{debian/control}, @file{.changes}, @file{.dsc};
7444@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7445 contained files and meta-information.
7446@end enumerate\n")
7447
7448 ;; Modules are either GPLv2+ or GPLv3+.
7449 (license license:gpl3+)))
7450
7451(define-public python2-debian
7452 (package-with-python2 python-debian))
7453
7454(define-public python-nbformat
7455 (package
7456 (name "python-nbformat")
7457 (version "4.4.0")
7458 (source
7459 (origin
7460 (method url-fetch)
7461 (uri (pypi-uri "nbformat" version))
7462 (sha256
7463 (base32
7464 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
7465 (build-system python-build-system)
7466 (arguments `(#:tests? #f)) ; no test target
7467 (propagated-inputs
7468 `(("python-ipython-genutils" ,python-ipython-genutils)
7469 ("python-jsonschema" ,python-jsonschema)
7470 ("python-jupyter-core" ,python-jupyter-core)
7471 ("python-traitlets" ,python-traitlets)))
7472 (home-page "http://jupyter.org")
7473 (synopsis "Jupyter Notebook format")
7474 (description "This package provides the reference implementation of the
7475Jupyter Notebook format and Python APIs for working with notebooks.")
7476 (license license:bsd-3)))
7477
7478(define-public python2-nbformat
7479 (package-with-python2 python-nbformat))
7480
7481(define-public python-bleach
7482 (package
7483 (name "python-bleach")
7484 (version "1.4.3")
7485 (source
7486 (origin
7487 (method url-fetch)
7488 (uri (pypi-uri "bleach" version))
7489 (sha256
7490 (base32
7491 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
7492 (build-system python-build-system)
7493 (propagated-inputs
7494 `(("python-html5lib" ,python-html5lib-0.9)
7495 ("python-six" ,python-six)))
7496 (native-inputs
7497 `(("python-nose" ,python-nose)))
7498 (home-page "https://github.com/jsocol/bleach")
7499 (synopsis "Whitelist-based HTML-sanitizing tool")
7500 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7501 (license license:asl2.0)))
7502
7503(define-public python2-bleach
7504 (package-with-python2 python-bleach))
7505
7506(define-public python-entrypoints
7507 (package
7508 (name "python-entrypoints")
a7f1b718 7509 (version "0.3")
44d10b1f
RW
7510 (source
7511 (origin
7512 (method url-fetch)
a7f1b718 7513 (uri (pypi-uri "entrypoints" version))
44d10b1f
RW
7514 (sha256
7515 (base32
a7f1b718 7516 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
44d10b1f
RW
7517 (build-system python-build-system)
7518 ;; The package does not come with a setup.py file, so we have to generate
7519 ;; one ourselves.
7520 (arguments
7521 `(#:tests? #f
7522 #:phases
7523 (modify-phases %standard-phases
7524 (add-after 'unpack 'create-setup.py
7525 (lambda _
7526 (call-with-output-file "setup.py"
7527 (lambda (port)
7528 (format port "\
7529from setuptools import setup
7530setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7531" ,version))))))))
7532 (home-page "https://github.com/takluyver/entrypoints")
7533 (synopsis "Discover and load entry points from installed Python packages")
7534 (description "Entry points are a way for Python packages to advertise
7535objects with some common interface. The most common examples are
7536@code{console_scripts} entry points, which define shell commands by
7537identifying a Python function to run. The @code{entrypoints} module contains
7538functions to find and load entry points.")
7539 (license license:expat)))
7540
7541(define-public python2-entrypoints
7542 (package-with-python2 python-entrypoints))
7543
7544(define-public python-nbconvert
7545 (package
7546 (name "python-nbconvert")
7547 (version "5.0.0b1")
7548 (source
7549 (origin
7550 (method url-fetch)
7551 (uri (pypi-uri "nbconvert" version))
7552 (sha256
7553 (base32
7554 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7555 (build-system python-build-system)
7556 (arguments
7557 `(;; The "bdist_egg" target is disabled by default, causing the installation
7558 ;; to fail.
7559 #:configure-flags (list "bdist_egg")
7560 ;; FIXME: 5 failures, 40 errors.
7561 #:tests? #f))
7562 ;; #:phases
7563 ;; (modify-phases %standard-phases
7564 ;; (replace 'check
7565 ;; (lambda _
7566 ;; (zero? (system* "py.test" "-v")))))
7567 (native-inputs
7568 `(("python-pytest" ,python-pytest)))
7569 (propagated-inputs
7570 `(("python-bleach" ,python-bleach)
7571 ("python-entrypoints" ,python-entrypoints)
7572 ("python-jinja2" ,python-jinja2)
7573 ("python-jupyter-core" ,python-jupyter-core)
7574 ("python-mistune" ,python-mistune)
7575 ("python-nbformat" ,python-nbformat)
7576 ("python-pygments" ,python-pygments)
7577 ("python-traitlets" ,python-traitlets)))
7578 (home-page "http://jupyter.org")
7579 (synopsis "Converting Jupyter Notebooks")
7580 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7581notebooks to various other formats via Jinja templates. It allows you to
7582convert an @code{.ipynb} notebook file into various static formats including:
7583
7584@enumerate
7585@item HTML
7586@item LaTeX
7587@item PDF
7588@item Reveal JS
7589@item Markdown (md)
7590@item ReStructured Text (rst)
7591@item executable script
7592@end enumerate\n")
7593 (license license:bsd-3)))
7594
7595(define-public python2-nbconvert
7596 (package-with-python2 python-nbconvert))
7597
44d10b1f
RW
7598(define-public python-notebook
7599 (package
7600 (name "python-notebook")
7601 (version "5.7.4")
7602 (source (origin
7603 (method url-fetch)
7604 (uri (pypi-uri "notebook" version))
7605 (sha256
7606 (base32
7607 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
7608 (build-system python-build-system)
7609 (arguments
7610 `(#:phases
7611 (modify-phases %standard-phases
7612 (replace 'check
7613 (lambda _
7614 ;; These tests require a browser
7615 (delete-file-recursively "notebook/tests/selenium")
7616 ;; Some tests need HOME
7617 (setenv "HOME" "/tmp")
7618 ;; This file contains "warningfilters", which are not supported
7619 ;; by this version of nose.
7620 (delete-file "setup.cfg")
7621 (with-directory-excursion "/tmp"
7622 (invoke "nosetests" "-v"))
7623 #t)))))
7624 (propagated-inputs
7625 `(("python-jupyter-core" ,python-jupyter-core)
7626 ("python-nbformat" ,python-nbformat)
7627 ("python-nbconvert" ,python-nbconvert)
7628 ("python-prometheus-client" ,python-prometheus-client)
7629 ("python-send2trash" ,python-send2trash)
7630 ("python-terminado" ,python-terminado)))
7631 (native-inputs
7632 `(("python-nose" ,python-nose)
7633 ("python-sphinx" ,python-sphinx)
7634 ("python-requests" ,python-requests)))
7635 (home-page "http://jupyter.org/")
7636 (synopsis "Web-based notebook environment for interactive computing")
7637 (description
7638 "The Jupyter HTML notebook is a web-based notebook environment for
7639interactive computing.")
7640 (properties `((python2-variant . ,(delay python2-notebook))))
7641 (license license:bsd-3)))
7642
7643(define-public python2-notebook
7644 (let ((base (package-with-python2
7645 (strip-python2-variant python-notebook))))
7646 (package (inherit base)
7647 (native-inputs
7648 `(("python2-mock" ,python2-mock)
7649 ,@(package-native-inputs base)))
7650 (arguments
7651 (substitute-keyword-arguments (package-arguments base)
7652 ((#:phases phases)
7653 `(modify-phases ,phases
7654 (add-before 'check 'disable-test-case
7655 ;; The test requires network access to localhost. Curiously it
7656 ;; fails with Python 2 only. Simply make the test-case return
7657 ;; immediately.
7658 (lambda _
7659 (substitute*
7660 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7661 (("formats = self.nbconvert_api") "return #")))))))))))
7662
7663(define-public python-widgetsnbextension
7664 (package
7665 (name "python-widgetsnbextension")
7666 (version "3.4.2")
7667 (source
7668 (origin
7669 (method url-fetch)
7670 (uri (pypi-uri "widgetsnbextension" version))
7671 (sha256
7672 (base32
7673 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
7674 (build-system python-build-system)
7675 (propagated-inputs
7676 `(("python-ipykernel" ,python-ipykernel)
7677 ("python-notebook" ,python-notebook)))
7678 (native-inputs
7679 `(("python-certifi" ,python-certifi)
7680 ("python-nose" ,python-nose)))
7681 (home-page "https://ipython.org")
7682 (synopsis "IPython HTML widgets for Jupyter")
7683 (description "This package provides interactive HTML widgets for Jupyter
7684notebooks.")
7685 (license license:bsd-3)))
7686
7687(define-public python2-widgetsnbextension
7688 (package-with-python2 python-widgetsnbextension))
7689
7690(define-public python-ipywidgets
7691 (package
7692 (name "python-ipywidgets")
7693 (version "5.2.2")
7694 (source
7695 (origin
7696 (method url-fetch)
7697 (uri (pypi-uri "ipywidgets" version))
7698 (sha256
7699 (base32
7700 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7701 (build-system python-build-system)
7702 (propagated-inputs
7703 `(("python-ipython" ,python-ipython)
7704 ("python-traitlets" ,python-traitlets)
7705 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7706 (native-inputs
7707 `(("python-nose" ,python-nose)
7708 ("python-pytest" ,python-pytest)))
7709 (home-page "https://ipython.org")
7710 (synopsis "IPython HTML widgets for Jupyter")
7711 (description "Ipywidgets are interactive HTML widgets for Jupyter
7712notebooks and the IPython kernel. Notebooks come alive when interactive
7713widgets are used. Users gain control of their data and can visualize changes
7714in the data.")
7715 (license license:bsd-3)))
7716
7717(define-public python2-ipywidgets
7718 (package-with-python2 python-ipywidgets))
7719
7720(define-public python-jupyter-console
7721 (package
7722 (name "python-jupyter-console")
becb9cbf 7723 (version "6.0.0")
44d10b1f
RW
7724 (source
7725 (origin
7726 (method url-fetch)
7727 (uri (pypi-uri "jupyter_console" version))
7728 (sha256
7729 (base32
becb9cbf 7730 "1xdjw11cppf1fxvwkw2bk13ckkwas3bdah8baingn9296mvfi31h"))))
44d10b1f 7731 (build-system python-build-system)
44d10b1f
RW
7732 (propagated-inputs
7733 `(("python-ipykernel" ,python-ipykernel)
7734 ("python-jupyter-client" ,python-jupyter-client)
becb9cbf 7735 ("python-prompt-toolkit" ,python-prompt-toolkit)
44d10b1f
RW
7736 ("python-pygments" ,python-pygments)))
7737 (native-inputs
7738 `(("python-nose" ,python-nose)))
7739 (home-page "https://jupyter.org")
7740 (synopsis "Jupyter terminal console")
7741 (description "This package provides a terminal-based console frontend for
7742Jupyter kernels. It also allows for console-based interaction with non-Python
7743Jupyter kernels such as IJulia and IRKernel.")
7744 (license license:bsd-3)))
7745
7746(define-public python2-jupyter-console
8e590c81
RW
7747 (package
7748 (name "python2-jupyter-console")
7749 (version "5.2.0")
7750 (source
7751 (origin
7752 (method url-fetch)
7753 (uri (pypi-uri "jupyter_console" version))
7754 (sha256
7755 (base32
7756 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
7757 (build-system python-build-system)
7758 ;; Tests only run in an TTY.
7759 (arguments `(#:tests? #f))
7760 (propagated-inputs
7761 `(("python2-ipykernel" ,python2-ipykernel)
7762 ("python2-jupyter-client" ,python2-jupyter-client)
7763 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
7764 ("python2-pygments" ,python2-pygments)))
7765 (native-inputs
7766 `(("python2-nose" ,python2-nose)))
7767 (home-page "https://jupyter.org")
7768 (synopsis "Jupyter terminal console")
7769 (description "This package provides a terminal-based console frontend for
7770Jupyter kernels. It also allows for console-based interaction with non-Python
7771Jupyter kernels such as IJulia and IRKernel.")
7772 (license license:bsd-3)))
44d10b1f
RW
7773
7774;; The python-ipython and python-jupyter-console require each other. To get
7775;; the functionality in both packages working, strip down the
7776;; python-jupyter-console package when using it as an input to python-ipython.
7777(define python-jupyter-console-minimal
7778 (package
7779 (inherit python-jupyter-console)
7780 (name "python-jupyter-console-minimal")
7781 (arguments
7782 (substitute-keyword-arguments
7783 (package-arguments python-jupyter-console)
7784 ((#:phases phases)
7785 `(modify-phases ,phases
7786 (add-after 'install 'delete-bin
7787 (lambda* (#:key outputs #:allow-other-keys)
7788 ;; Delete the bin files, to avoid conflicts in profiles
7789 ;; where python-ipython and python-jupyter-console are
7790 ;; both present.
7791 (delete-file-recursively
7792 (string-append
7793 (assoc-ref outputs "out") "/bin"))))))))
7794 ;; Remove the python-ipython propagated input, to avoid the cycle
7795 (propagated-inputs
7796 (alist-delete
7797 "python-ipython"
7798 (package-propagated-inputs python-jupyter-console)))))
7799
7800(define-public python-qtconsole
7801 (package
7802 (name "python-qtconsole")
7803 (version "4.4.3")
7804 (source
7805 (origin
7806 (method url-fetch)
7807 (uri (pypi-uri "qtconsole" version))
7808 (sha256
7809 (base32
7810 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
7811 (build-system python-build-system)
7812 (arguments
7813 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
7814 ;; but we only have the LTS version 5.x. This means that there might be
7815 ;; runtime errors, but since this is a dependency of the Jupyter package,
7816 ;; and Jupyter can be used without the qtconsole we can overlook this for
7817 ;; now.
7818 `(#:tests? #f
7819 #:phases
7820 (modify-phases %standard-phases
7821 (add-before 'check 'pre-check
7822 (lambda _
7823 (setenv "QT_QPA_PLATFORM" "offscreen")
7824 #t)))))
7825 (propagated-inputs
7826 `(("python-ipykernel" ,python-ipykernel)
7827 ("python-ipython" ,python-ipython)))
7828 (native-inputs
7829 `(("python-pytest" ,python-pytest)))
7830 (home-page "http://jupyter.org")
7831 (synopsis "Jupyter Qt console")
7832 (description "This package provides a Qt-based console for Jupyter with
7833support for rich media output.")
7834 (license license:bsd-3)))
7835
7836(define-public jupyter
7837 (package
7838 (name "jupyter")
7839 (version "1.0.0")
7840 (source
7841 (origin
7842 (method url-fetch)
7843 (uri (pypi-uri "jupyter" version))
7844 (sha256
7845 (base32
7846 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
7847 (build-system python-build-system)
7848 (arguments '(#:tests? #f)) ; there are none.
7849 (propagated-inputs
7850 `(("python-ipykernel" ,python-ipykernel)
7851 ("python-ipywidgets" ,python-ipywidgets)
7852 ("python-jupyter-console" ,python-jupyter-console)
7853 ("python-nbconvert" ,python-nbconvert)
7854 ("python-notebook" ,python-notebook)
7855 ("python-qtconsole" ,python-qtconsole)))
7856 (native-search-paths
7857 (list (search-path-specification
7858 (variable "JUPYTER_PATH")
7859 (files '("share/jupyter")))))
7860 (home-page "https://jupyter.org")
7861 (synopsis "Web application for interactive documents")
7862 (description
7863 "The Jupyter Notebook is a web application that allows you to create and
7864share documents that contain live code, equations, visualizations and
7865explanatory text. Uses include: data cleaning and transformation, numerical
7866simulation, statistical modeling, machine learning and much more.")
7867 (license license:bsd-3)))
7868
7869(define-public python-chardet
7870 (package
7871 (name "python-chardet")
7872 (version "3.0.4")
7873 (source
7874 (origin
7875 (method url-fetch)
7876 (uri (pypi-uri "chardet" version))
7877 (sha256
7878 (base32
7879 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
7880 (native-inputs
7881 `(("python-hypothesis" ,python-hypothesis)
7882 ("python-pytest" ,python-pytest)
7883 ("python-pytest-runner" ,python-pytest-runner)))
7884 (build-system python-build-system)
7885 (home-page "https://github.com/chardet/chardet")
7886 (synopsis "Universal encoding detector for Python 2 and 3")
7887 (description
7888 "This package provides @code{chardet}, a Python module that can
7889automatically detect a wide range of file encodings.")
7890 (license license:lgpl2.1+)))
7891
7892(define-public python2-chardet
7893 (package-with-python2 python-chardet))
7894
7895(define-public python-docopt
7896 (package
7897 (name "python-docopt")
7898 (version "0.6.2")
7899 (source
7900 (origin
7901 (method url-fetch)
7902 ;; The release on PyPI does not include tests.
7903 (uri (string-append
7904 "https://github.com/docopt/docopt/archive/"
7905 version ".tar.gz"))
7906 (file-name (string-append name "-" version ".tar.gz"))
7907 (sha256
7908 (base32
7909 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
7910 (build-system python-build-system)
7911 (native-inputs
7912 `(("python-pytest" ,python-pytest)))
7913 (arguments
7914 `(#:phases
7915 (modify-phases %standard-phases
7916 (replace 'check
7917 (lambda _ (invoke "py.test"))))))
7918 (home-page "http://docopt.org")
7919 (synopsis "Command-line interface description language for Python")
7920 (description "This library allows the user to define a command-line
7921interface from a program's help message rather than specifying it
4ca7207b 7922programmatically with command-line parsers like @code{getopt} and
44d10b1f
RW
7923@code{argparse}.")
7924 (license license:expat)))
7925
7926(define-public python2-docopt
7927 (package-with-python2 python-docopt))
7928
7929(define-public python-pythondialog
7930 (package
7931 (name "python-pythondialog")
7932 (version "3.4.0")
7933 (source
7934 (origin
7935 (method url-fetch)
7936 (uri (pypi-uri "pythondialog" version))
7937 (sha256
7938 (base32
7939 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
7940 (build-system python-build-system)
7941 (arguments
7942 `(#:phases
7943 (modify-phases %standard-phases
7944 (add-after 'unpack 'patch-path
7945 (lambda* (#:key inputs #:allow-other-keys)
7946 (let* ((dialog (assoc-ref inputs "dialog")))
7947 ;; Since this library really wants to grovel the search path, we
7948 ;; must hardcode dialog's store path into it.
7949 (substitute* "dialog.py"
7950 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
7951 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
7952 #t))))
7953 #:tests? #f)) ; no test suite
7954 (propagated-inputs
7955 `(("dialog" ,dialog)))
7956 (home-page "http://pythondialog.sourceforge.net/")
7957 (synopsis "Python interface to the UNIX dialog utility")
7958 (description "A Python wrapper for the dialog utility. Its purpose is to
7959provide an easy to use, pythonic and comprehensive Python interface to dialog.
7960This allows one to make simple text-mode user interfaces on Unix-like systems")
7961 (license license:lgpl2.1)
7962 (properties `((python2-variant . ,(delay python2-pythondialog))))))
7963
7964(define-public python2-pythondialog
7965 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
7966 (package
7967 (inherit base)
7968 (version (package-version python-pythondialog))
7969 (source (origin
7970 (method url-fetch)
7971 (uri (pypi-uri "python2-pythondialog" version))
7972 (sha256
7973 (base32
7974 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
7975
7976(define-public python-configobj
7977 (package
7978 (name "python-configobj")
7979 (version "5.0.6")
7980 (source (origin
7981 (method url-fetch)
b0758fbb 7982 (uri (pypi-uri "configobj" version))
44d10b1f
RW
7983 (sha256
7984 (base32
7985 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
7986 ;; Patch setup.py so it looks for python-setuptools, which is
7987 ;; required to parse the keyword 'install_requires' in setup.py.
7988 (patches (search-patches "python-configobj-setuptools.patch"))))
7989 (build-system python-build-system)
7990 (propagated-inputs
7991 `(("python-six" ,python-six)))
7992 (synopsis "Config file reading, writing and validation")
7993 (description "ConfigObj is a simple but powerful config file reader and
7994writer: an ini file round tripper. Its main feature is that it is very easy to
7995use, with a straightforward programmer’s interface and a simple syntax for
7996config files.")
7997 (home-page "https://github.com/DiffSK/configobj")
7998 (license license:bsd-3)))
7999
8000(define-public python2-configobj
8001 (package-with-python2 python-configobj))
8002
8003(define-public python-configargparse
8004 (package
8005 (name "python-configargparse")
86ae491f 8006 (version "0.14.0")
44d10b1f
RW
8007 (source (origin
8008 (method url-fetch)
8009 (uri (pypi-uri "ConfigArgParse" version))
8010 (sha256
8011 (base32
86ae491f 8012 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
44d10b1f
RW
8013 (build-system python-build-system)
8014 (native-inputs
8015 `(("python-pyyaml" ,python-pyyaml)))
8016 (arguments
8017 `(#:phases
8018 (modify-phases %standard-phases
8019 (replace 'check
8020 (lambda _
8021 ;; Bypass setuptools-shim because one test relies on "setup.py"
8022 ;; being the first argument passed to the python call.
8023 ;;
8024 ;; NOTE: Many tests do not run because they rely on Python's
8025 ;; built-in test.test_argparse, but we remove the unit tests from
8026 ;; our Python installation.
8027 (invoke "python" "setup.py" "test"))))))
8028 (synopsis "Replacement for argparse")
8029 (description "A drop-in replacement for argparse that allows options to also
8030be set via config files and/or environment variables.")
8031 (home-page "https://github.com/bw2/ConfigArgParse")
8032 (license license:expat)))
8033
8034(define-public python2-configargparse
8035 (package-with-python2 python-configargparse))
8036
8037(define-public python-argparse-manpage
8038 (package
8039 (name "python-argparse-manpage")
8040 (version "1.1")
8041 (source
8042 (origin
8043 (method url-fetch)
8044 (uri (pypi-uri "argparse-manpage" version))
8045 (sha256
8046 (base32
8047 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
8048 (build-system python-build-system)
8049 (home-page "https://github.com/praiskup/argparse-manpage")
8050 (synopsis "Build manual page from Python's ArgumentParser object")
8051 (description
8052 "This package provides tools to build manual pages from Python's
8053@code{ArgumentParser} object.")
8054 (license license:asl2.0)))
8055
3e8f76d8
RW
8056(define-public python-contextlib2
8057 (package
8058 (name "python-contextlib2")
8059 (version "0.5.5")
8060 (source
8061 (origin
8062 (method url-fetch)
8063 (uri (pypi-uri "contextlib2" version))
8064 (sha256
8065 (base32
8066 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8067 (build-system python-build-system)
8068 (home-page "http://contextlib2.readthedocs.org/")
8069 (synopsis "Tools for decorators and context managers")
8070 (description "This module is primarily a backport of the Python
80713.2 contextlib to earlier Python versions. Like contextlib, it
8072provides utilities for common tasks involving decorators and context
8073managers. It also contains additional features that are not part of
8074the standard library.")
8075 (license license:psfl)))
8076
44d10b1f
RW
8077(define-public python2-contextlib2
8078 (package
8079 (name "python2-contextlib2")
8080 (version "0.5.5")
8081 (source
8082 (origin
8083 (method url-fetch)
8084 (uri (pypi-uri "contextlib2" version))
8085 (sha256
8086 (base32
8087 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8088 (build-system python-build-system)
8089 (arguments
8090 `(#:python ,python-2
8091 #:phases
8092 (modify-phases %standard-phases
8093 (replace 'check
8094 (lambda _ (invoke "python" "test_contextlib2.py" "-v"))))))
8095 (native-inputs
8096 `(("python2-unittest2" ,python2-unittest2)))
8097 (home-page "http://contextlib2.readthedocs.org/")
8098 (synopsis "Tools for decorators and context managers")
8099 (description "This module is primarily a backport of the Python
81003.2 contextlib to earlier Python versions. Like contextlib, it
8101provides utilities for common tasks involving decorators and context
8102managers. It also contains additional features that are not part of
8103the standard library.")
8104 (license license:psfl)))
8105
8106(define-public python-texttable
8107 (package
8108 (name "python-texttable")
8109 (version "0.8.7")
8110 (source
8111 (origin
8112 (method url-fetch)
8113 (uri (pypi-uri "texttable" version))
8114 (sha256
8115 (base32
8116 "1liiiydgkg37i46a418aw19fyf6z3ds51wdwwpyjbs12x0phhf4a"))))
8117 (build-system python-build-system)
8118 (arguments '(#:tests? #f)) ; no tests
8119 (home-page "https://github.com/foutaise/texttable/")
8120 (synopsis "Python module for creating simple ASCII tables")
8121 (description "Texttable is a Python module for creating simple ASCII
8122tables.")
8123 (license license:lgpl2.1+)))
8124
8125(define-public python2-texttable
8126 (package-with-python2 python-texttable))
8127
8128(define-public python-atomicwrites
8129 (package
8130 (name "python-atomicwrites")
8131 (version "1.1.5")
8132 (source (origin
8133 (method url-fetch)
8134 (uri (pypi-uri "atomicwrites" version))
8135 (sha256
8136 (base32
8137 "11bm90fwm2avvf4f3ib8g925w7jr4m11vcsinn1bi6ns4bm32214"))))
8138 (build-system python-build-system)
8139 (synopsis "Atomic file writes in Python")
8140 (description "Library for atomic file writes using platform dependent tools
8141for atomic file system operations.")
8142 (home-page "https://github.com/untitaker/python-atomicwrites")
8143 (license license:expat)))
8144
8145(define-public python2-atomicwrites
8146 (package-with-python2 python-atomicwrites))
8147
8148(define-public python-click-threading
8149 (package
8150 (name "python-click-threading")
8151 (version "0.4.4")
8152 (source (origin
8153 (method url-fetch)
8154 (uri (pypi-uri "click-threading" version))
8155 (sha256
8156 (base32
8157 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
8158 (build-system python-build-system)
8159 (propagated-inputs
8160 `(("python-click" ,python-click)))
8161 (synopsis "Utilities for multithreading in Click")
8162 (description "This package provides utilities for multithreading in Click
8163applications.")
8164 (home-page "https://github.com/click-contrib/click-threading")
8165 (license license:expat)))
8166
8167(define-public python-click-log
8168 (package
8169 (name "python-click-log")
8170 (version "0.3.2")
8171 (source (origin
8172 (method url-fetch)
8173 (uri (pypi-uri "click-log" version))
8174 (sha256
8175 (base32
8176 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
8177 (build-system python-build-system)
8178 (propagated-inputs
8179 `(("python-click" ,python-click)))
8180 (synopsis "Logging for click applications")
8181 (description "This package provides a Python library for logging Click
8182applications.")
8183 (home-page "https://github.com/click-contrib/click-log")
8184 (license license:expat)))
8185
8186(define-public python-apipkg
8187 (package
8188 (name "python-apipkg")
8189 (version "1.4")
8190 (source (origin
8191 (method url-fetch)
8192 (uri (pypi-uri "apipkg" version))
8193 (sha256
8194 (base32
8195 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8196 (build-system python-build-system)
8197 (native-inputs
8198 `(("python-pytest" ,python-pytest)))
8199 (synopsis "Namespace control and lazy-import mechanism")
8200 (description "With apipkg you can control the exported namespace of a Python
8201package and greatly reduce the number of imports for your users. It is a small
8202pure Python module that works on virtually all Python versions.")
8203 (home-page "https://github.com/pytest-dev/apipkg")
8204 (license license:expat)))
8205
8206(define-public python2-apipkg
8207 (package-with-python2 python-apipkg))
8208
8209(define-public python-execnet
8210 (package
8211 (name "python-execnet")
8212 (version "1.4.1")
8213 (source (origin
8214 (method url-fetch)
8215 (uri (pypi-uri "execnet" version))
8216 (sha256
8217 (base32
8218 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8219 (build-system python-build-system)
8220 (arguments
8221 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8222 ;; The two test failures are caused by the lack of an `ssh` executable.
8223 ;; The test suite can be run with pytest after the 'install' phase.
8224 #:tests? #f))
8225 (native-inputs
8226 `(("python-pytest" ,python-pytest)
8227 ("python-setuptools-scm" ,python-setuptools-scm)))
8228 (propagated-inputs
8229 `(("python-apipkg" ,python-apipkg)))
8230 (synopsis "Rapid multi-Python deployment")
8231 (description "Execnet provides a share-nothing model with
8232channel-send/receive communication for distributing execution across many
8233Python interpreters across version, platform and network barriers. It has a
8234minimal and fast API targeting the following uses:
8235@enumerate
8236@item distribute tasks to (many) local or remote CPUs
8237@item write and deploy hybrid multi-process applications
8238@item write scripts to administer multiple environments
8239@end enumerate")
8240 (home-page "http://codespeak.net/execnet/")
8241 (license license:expat)))
8242
8243(define-public python2-execnet
8244 (package-with-python2 python-execnet))
8245
8246(define-public python-icalendar
8247 (package
8248 (name "python-icalendar")
8249 (version "4.0.3")
8250 (source (origin
8251 (method url-fetch)
8252 (uri (pypi-uri "icalendar" version))
8253 (sha256
8254 (base32
8255 "0mk3dk1dxkcm46jy48v27j2w2349iv4sbimqj1yb5js43mx49hh7"))))
8256 (build-system python-build-system)
8257 (propagated-inputs
8258 `(("python-dateutil" ,python-dateutil)
8259 ("python-pytz" ,python-pytz)))
8260 (synopsis "Python library for parsing iCalendar files")
8261 (description "The icalendar package is a parser/generator of iCalendar
8262files for use with Python.")
8263 (home-page "https://github.com/collective/icalendar")
8264 (license license:bsd-2)))
8265
44d10b1f
RW
8266(define-public python-args
8267 (package
8268 (name "python-args")
8269 (version "0.1.0")
8270 (source (origin
8271 (method url-fetch)
8272 (uri (pypi-uri "args" version))
8273 (sha256
8274 (base32
8275 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8276 (build-system python-build-system)
8277 (home-page "https://github.com/kennethreitz/args")
8278 (synopsis "Command-line argument parser")
8279 (description
8280 "This library provides a Python module to parse command-line arguments.")
8281 (license license:bsd-3)))
8282
8283(define-public python2-args
8284 (package-with-python2 python-args))
8285
8286(define-public python-clint
8287 (package
8288 (name "python-clint")
8289 (version "0.5.1")
8290 (source (origin
8291 (method url-fetch)
8292 (uri (pypi-uri "clint" version))
8293 (sha256
8294 (base32
8295 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8296 (build-system python-build-system)
8297 (arguments
8298 '(#:phases
8299 (modify-phases %standard-phases
8300 (replace 'check
8301 (lambda _ (invoke "py.test" "-v"))))))
8302 (native-inputs
8303 `(("python-pytest" ,python-pytest)))
8304 (propagated-inputs
8305 `(("python-args" ,python-args)))
8306 (home-page "https://github.com/kennethreitz/clint")
8307 (synopsis "Command-line interface tools")
8308 (description
8309 "Clint is a Python module filled with a set of tools for developing
8310command-line applications, including tools for colored and indented
8311output, progress bar display, and pipes.")
8312 (license license:isc)))
8313
8314(define-public python2-clint
8315 (package-with-python2 python-clint))
8316
44d10b1f
RW
8317(define-public python-rply
8318 (package
8319 (name "python-rply")
8320 (version "0.7.5")
8321 (source (origin
8322 (method url-fetch)
8323 (uri (pypi-uri "rply" version))
8324 (sha256
8325 (base32
8326 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
8327 (build-system python-build-system)
8328 (propagated-inputs
8329 `(("python-appdirs" ,python-appdirs)))
8330 (home-page "https://github.com/alex/rply")
8331 (synopsis "Parser generator for Python")
8332 (description
8333 "This package provides a pure Python based parser generator, that also
8334works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8335with a new public API, and RPython support.")
8336 (license license:bsd-3)))
8337
8338(define-public python2-rply
8339 (package-with-python2 python-rply))
8340
8341(define-public python-hy
8342 (package
8343 (name "python-hy")
8344 (version "0.13.0")
8345 (source (origin
8346 (method url-fetch)
8347 (uri (pypi-uri "hy" version))
8348 (sha256
8349 (base32
8350 "19sfymaksx9jhksfnb15ahid46mzrhdfzz6yy2craz2qnzvpmky8"))))
8351 (build-system python-build-system)
8352 (arguments
8353 '(#:phases
8354 (modify-phases %standard-phases
8355 (replace 'check
8356 (lambda _
8357 ;; Tests require write access to HOME.
8358 (setenv "HOME" "/tmp")
8359 (invoke "nosetests"))))))
8360 (native-inputs
8361 `(("python-coverage" ,python-coverage)
8362 ("python-nose" ,python-nose)))
8363 (propagated-inputs
8364 `(("python-astor" ,python-astor)
8365 ("python-clint" ,python-clint)
8366 ("python-rply" ,python-rply)))
8367 (home-page "http://hylang.org/")
8368 (synopsis "Lisp frontend to Python")
8369 (description
8370 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8371its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8372Python at your fingertips, in Lisp form.")
8373 (license license:expat)))
8374
8375(define-public python2-hy
8376 (package-with-python2 python-hy))
8377
8378(define-public python2-functools32
8379 (package
8380 (name "python2-functools32")
8381 (version "3.2.3-2")
8382 (source
8383 (origin
8384 (method url-fetch)
8385 (uri (pypi-uri "functools32" version))
8386 (sha256
8387 (base32
8388 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8389 (build-system python-build-system)
8390 (arguments
8391 `(#:python ,python-2
8392 #:tests? #f)) ; no test target
8393 (home-page "https://github.com/MiCHiLU/python-functools32")
8394 (synopsis
8395 "Backport of the functools module from Python 3.2.3")
8396 (description
8397 "This package is a backport of the @code{functools} module from Python
83983.2.3 for use with older versions of Python and PyPy.")
8399 (license license:expat)))
8400
8401(define-public python2-subprocess32
8402 (package
8403 (name "python2-subprocess32")
8404 (version "3.2.7")
8405 (source (origin
8406 (method url-fetch)
8407 (uri (pypi-uri "subprocess32" version))
8408 (sha256
8409 (base32
8410 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
8411 (patches
8412 (search-patches "python2-subprocess32-disable-input-test.patch"))))
8413 (build-system python-build-system)
8414 (arguments
8415 `(#:python ,python-2
8416 ;; The test suite fails with Python > 2.7.13:
8417 ;; import test.support
8418 ;; ImportError: No module named support
8419 #:tests? #f
8420 #:phases
8421 (modify-phases %standard-phases
8422 (add-after 'unpack 'patch-/bin/sh
8423 (lambda _
8424 (substitute* '("subprocess32.py"
8425 "test_subprocess32.py")
8426 (("/bin/sh") (which "sh")))
8427 #t)))))
8428 (home-page "https://github.com/google/python-subprocess32")
8429 (synopsis "Backport of the subprocess module from Python 3.2")
8430 (description
8431 "This is a backport of the @code{subprocess} standard library module
8432from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
8433new features. On POSIX systems it is guaranteed to be reliable when used
8434in threaded applications. It includes timeout support from Python 3.3 but
8435otherwise matches 3.2’s API.")
8436 (license license:psfl)))
8437
8438(define-public python2-futures
8439 (package
8440 (name "python2-futures")
8441 (version "3.2.0")
8442 (source
8443 (origin
8444 (method url-fetch)
8445 (uri (pypi-uri "futures" version))
8446 (sha256
8447 (base32
8448 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
8449 (build-system python-build-system)
8450 (arguments `(#:python ,python-2
8451 ;; FIXME: Python 2.7.14 moved the test.support library,
8452 ;; but our package has not yet been adjusted. Enable
8453 ;; tests when the python2 package has been fixed.
8454 #:tests? #f))
8455 (home-page "https://github.com/agronholm/pythonfutures")
8456 (synopsis
8457 "Backport of the concurrent.futures package from Python 3.2")
8458 (description
8459 "The concurrent.futures module provides a high-level interface for
8460asynchronously executing callables. This package backports the
8461concurrent.futures package from Python 3.2")
8462 (license license:bsd-3)))
8463
8464(define-public python-promise
8465 (package
8466 (name "python-promise")
8467 (version "0.4.2")
8468 (source
8469 (origin
8470 (method url-fetch)
8471 (uri (pypi-uri "promise" version))
8472 (sha256
8473 (base32
8474 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8475 (build-system python-build-system)
8476 ;; Tests wants python-futures, which is a python2 only program, and
8477 ;; can't be found by python-promise at test time.
8478 (arguments `(#:tests? #f))
8479 (home-page "https://github.com/syrusakbary/promise")
8480 (synopsis "Promises/A+ implementation for Python")
8481 (description
8482 "Promises/A+ implementation for Python")
8483 (properties `((python2-variant . ,(delay python2-promise))))
8484 (license license:expat)))
8485
8486(define-public python2-promise
8487 (let ((promise (package-with-python2
8488 (strip-python2-variant python-promise))))
8489 (package (inherit promise)
8490 (arguments (substitute-keyword-arguments (package-arguments promise)
8491 ((#:tests? _) #t)))
8492 (native-inputs
8493 `(("python2-futures" ,python2-futures)
8494 ("python2-pytest" ,python2-pytest)
8495 ,@(package-native-inputs promise))))))
8496
8497(define-public python-colorama
8498 (package
8499 (name "python-colorama")
8500 (version "0.3.9")
8501 (source
8502 (origin
8503 (method url-fetch)
8504 (uri (pypi-uri "colorama" version))
8505 (sha256
8506 (base32
8507 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
8508 (build-system python-build-system)
8509 (synopsis "Colored terminal text rendering for Python")
8510 (description "Colorama is a Python library for rendering colored terminal
8511text.")
8512 (home-page "https://pypi.python.org/pypi/colorama")
8513 (license license:bsd-3)))
8514
8515(define-public python2-colorama
8516 (package-with-python2 python-colorama))
8517
8518(define-public python-rsa
8519 (package
8520 (name "python-rsa")
8521 (version "3.4.2")
8522 (source
8523 (origin
8524 (method url-fetch)
8525 (uri (pypi-uri "rsa" version))
8526 (sha256
8527 (base32
8528 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
8529 (build-system python-build-system)
8530 (propagated-inputs
8531 `(("python-pyasn1" ,python-pyasn1)))
8532 (synopsis "Pure-Python RSA implementation")
8533 (description "Python-RSA is a pure-Python RSA implementation. It supports
8534encryption and decryption, signing and verifying signatures, and key
8535generation according to PKCS#1 version 1.5. It can be used as a Python
8536library as well as on the command line.")
8537 (home-page "https://stuvel.eu/rsa")
8538 (license license:asl2.0)))
8539
8540(define-public python2-rsa
8541 (package-with-python2 python-rsa))
8542
8543(define-public python-pluggy
8544 (package
8545 (name "python-pluggy")
8546 (version "0.7.1")
8547 (source
8548 (origin
8549 (method url-fetch)
8550 (uri (pypi-uri "pluggy" version))
8551 (sha256
8552 (base32
8553 "1qbn70mksmr03hac6jgp6fiqc4l7859z8dchx2x950vhlij87swm"))))
8554 (build-system python-build-system)
8555 (native-inputs
8556 `(("python-setuptools-scm" ,python-setuptools-scm)))
8557 (synopsis "Plugin and hook calling mechanism for Python")
8558 (description "Pluggy is an extraction of the plugin manager as used by
8559Pytest but stripped of Pytest specific details.")
8560 (home-page "https://pypi.python.org/pypi/pluggy")
8561 (license license:expat)))
8562
8563(define-public python2-pluggy
8564 (package-with-python2 python-pluggy))
8565
8566(define-public python-tox
8567 (package
8568 (name "python-tox")
8569 (version "2.8.1")
8570 (source
8571 (origin
8572 (method url-fetch)
8573 (uri (pypi-uri "tox" version))
8574 (sha256
8575 (base32
8576 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
8577 (build-system python-build-system)
8578 (arguments
8579 ;; FIXME: Tests require pytest-timeout, which itself requires
8580 ;; pytest>=2.8.0 for installation.
8581 '(#:tests? #f))
8582 (propagated-inputs
8583 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
8584 ("python-py" ,python-py)
8585 ("python-virtualenv" ,python-virtualenv)))
8586 (native-inputs
8587 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
8588 ("python-pytest" ,python-pytest) ; >= 2.3.5
8589 ("python-setuptools-scm" ,python-setuptools-scm)))
8590 (home-page "http://tox.testrun.org/")
8591 (synopsis "Virtualenv-based automation of test activities")
8592 (description "Tox is a generic virtualenv management and test command line
8593tool. It can be used to check that a package installs correctly with
8594different Python versions and interpreters, or run tests in each type of
8595supported environment, or act as a frontend to continuous integration
8596servers.")
8597 (license license:expat)))
8598
8599(define-public python2-tox
8600 (package-with-python2 python-tox))
8601
8602(define-public python-jmespath
8603 (package
8604 (name "python-jmespath")
8605 (version "0.9.3")
8606 (source
8607 (origin
8608 (method url-fetch)
8609 (uri (pypi-uri "jmespath" version))
8610 (sha256
8611 (base32
8612 "0r7wc7fsxmlwzxx9j1j7rms06c6xs6d4sysirdhz1jk2mb4x90ba"))))
8613 (build-system python-build-system)
8614 (native-inputs
8615 `(("python-nose" ,python-nose)))
8616 (synopsis "JSON Matching Expressions")
8617 (description "JMESPath (pronounced “james path”) is a Python library that
8618allows one to declaratively specify how to extract elements from a JSON
8619document.")
8620 (home-page "https://github.com/jmespath/jmespath.py")
8621 (license license:expat)))
8622
8623(define-public python2-jmespath
8624 (package-with-python2 python-jmespath))
8625
8626(define-public python-botocore
8627 (package
7bcf827c
RW
8628 (name "python-botocore")
8629 (version "1.12.149")
8630 (source
8631 (origin
8632 (method url-fetch)
8633 (uri (pypi-uri "botocore" version))
8634 (sha256
8635 (base32
8636 "12597f74khp3ngwr282cb949w0gcqj20rkfc3x275dijavyy5cmf"))))
8637 (build-system python-build-system)
8638 (arguments
8639 ;; FIXME: Many tests are failing.
8640 '(#:tests? #f))
8641 (propagated-inputs
8642 `(("python-dateutil" ,python-dateutil)
8643 ("python-docutils" ,python-docutils)
8644 ("python-jmespath" ,python-jmespath)))
8645 (native-inputs
8646 `(("python-mock" ,python-mock)
8647 ("python-nose" ,python-nose)
8648 ("behave" ,behave)
8649 ("python-tox" ,python-tox)
8650 ("python-urllib3" ,python-urllib3)
8651 ("python-wheel" ,python-wheel)))
8652 (home-page "https://github.com/boto/botocore")
8653 (synopsis "Low-level interface to AWS")
8654 (description "Botocore is a Python library that provides a low-level
44d10b1f 8655interface to the Amazon Web Services (AWS) API.")
7bcf827c 8656 (license license:asl2.0)))
44d10b1f
RW
8657
8658(define-public python2-botocore
8659 (package-with-python2 python-botocore))
8660
8661(define-public python-xdo
8662 (package
8663 (name "python-xdo")
8664 (version "0.3")
8665 (source (origin
8666 (method url-fetch)
8667 (uri (string-append
8668 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8669 "python-xdo_" version ".orig.tar.gz"))
8670 (sha256
8671 (base32
8672 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
8673 (build-system python-build-system)
8674 (arguments
8675 '(#:phases
8676 (modify-phases %standard-phases
8677 (add-before 'install 'patch-libxdo-path
8678 ;; Hardcode the path of dynamically loaded libxdo library.
8679 (lambda* (#:key inputs #:allow-other-keys)
8680 (let ((libxdo (string-append
8681 (assoc-ref inputs "xdotool")
8682 "/lib/libxdo.so")))
8683 (substitute* "xdo/_xdo.py"
8684 (("find_library\\(\"xdo\"\\)")
8685 (simple-format #f "\"~a\"" libxdo)))
8686 #t))))
8687 #:tests? #f)) ; no tests provided
8688 (propagated-inputs
8689 `(("python-six" ,python-six)))
8690 (inputs
8691 `(("xdotool" ,xdotool)
8692 ("libX11" ,libx11)))
8693 (home-page "https://tracker.debian.org/pkg/python-xdo")
8694 (synopsis "Python library for simulating X11 keyboard/mouse input")
8695 (description "Provides bindings to libxdo for manipulating X11 via simulated
8696input. (Note that this is mostly a legacy library; you may wish to look at
8697python-xdo for newer bindings.)")
8698 (license license:bsd-3)))
8699
8700(define-public python2-xdo
8701 (package-with-python2 python-xdo))
8702
8703(define-public python-mako
8704 (package
8705 (name "python-mako")
b2965b26 8706 (version "1.0.10")
44d10b1f
RW
8707 (source
8708 (origin
8709 (method url-fetch)
8710 (uri (pypi-uri "Mako" version))
8711 (sha256
8712 (base32
b2965b26 8713 "0r9rysn19fmrxnzfcn7sg20kjhcrx9qri0my9n5vdzp1g2g92rbi"))))
44d10b1f
RW
8714 (build-system python-build-system)
8715 (propagated-inputs
8716 `(("python-markupsafe" ,python-markupsafe)))
8717 (native-inputs
8718 `(("python-mock" ,python-mock)
8719 ("python-nose" ,python-nose)
8720 ("python-pytest" ,python-pytest)))
7016e620 8721 (home-page "https://www.makotemplates.org/")
44d10b1f
RW
8722 (synopsis "Templating language for Python")
8723 (description "Mako is a templating language for Python that compiles
8724templates into Python modules.")
8725 (license license:expat)))
8726
8727(define-public python2-mako
8728 (package-with-python2 python-mako))
8729
8730(define-public python-waitress
8731 (package
8732 (name "python-waitress")
8733 (version "1.1.0")
8734 (source
8735 (origin
8736 (method url-fetch)
8737 (uri (pypi-uri "waitress" version))
8738 (patches (search-patches "python-waitress-fix-tests.patch"))
8739 (sha256
8740 (base32
8741 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
8742 (build-system python-build-system)
8743 (home-page "https://github.com/Pylons/waitress")
8744 (synopsis "Waitress WSGI server")
8745 (description "Waitress is meant to be a production-quality pure-Python WSGI
8746server with very acceptable performance.")
8747 (license license:zpl2.1)))
8748
8749(define-public python2-waitress
8750 (package-with-python2 python-waitress))
8751
8752(define-public python-pyquery
8753 (package
8754 (name "python-pyquery")
8755 (version "1.2.17")
8756 (source
8757 (origin
8758 (method url-fetch)
8759 (uri (pypi-uri "pyquery" version))
8760 (sha256
8761 (base32
8762 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
8763 (build-system python-build-system)
8764 (native-inputs
8765 `(("python-webob" ,python-webob)
8766 ("python-webtest" ,python-webtest)))
8767 (propagated-inputs
8768 `(("python-lxml" ,python-lxml)
8769 ("python-cssselect" ,python-cssselect)))
8770 (home-page "https://github.com/gawel/pyquery")
8771 (synopsis "Make jQuery-like queries on xml documents")
8772 (description "pyquery allows you to make jQuery queries on xml documents.
8773The API is as much as possible the similar to jQuery. pyquery uses lxml for
8774fast xml and html manipulation.")
8775 (license license:bsd-3)))
8776
44d10b1f
RW
8777(define-public python-anyjson
8778 (package
8779 (name "python-anyjson")
8780 (version "0.3.3")
8781 (source
8782 (origin
8783 (method url-fetch)
8784 (uri (pypi-uri "anyjson" version))
8785 (sha256
8786 (base32
8787 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
8788 (build-system python-build-system)
8789 (arguments
8790 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
8791 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
8792 ;; whatever) so this transformation needs to be done before the tests
8793 ;; can be run. Maybe we could add a build step to transform beforehand
8794 ;; but it could be annoying/difficult.
8795 ;; We can enable tests for the Python 2 version, though, and do below.
8796 #:tests? #f))
8797 (home-page "https://bitbucket.org/runeh/anyjson/")
8798 (synopsis
8799 "Wraps best available JSON implementation in a common interface")
8800 (description
8801 "Anyjson loads whichever is the fastest JSON module installed
8802and provides a uniform API regardless of which JSON implementation is used.")
8803 (license license:bsd-3)
8804 (properties `((python2-variant . ,(delay python2-anyjson))))))
8805
8806(define-public python2-anyjson
8807 (let ((anyjson (package-with-python2
8808 (strip-python2-variant python-anyjson))))
8809 (package
8810 (inherit anyjson)
8811 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
8812 #:tests? #t
8813 ,@(package-arguments anyjson)))
8814 (native-inputs `(("python2-nose" ,python2-nose))))))
8815
8816(define-public python-amqp
8817 (package
8818 (name "python-amqp")
8819 (version "2.3.2")
8820 (source
8821 (origin
8822 (method url-fetch)
8823 (uri (pypi-uri "amqp" version))
8824 (sha256
8825 (base32
8826 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
8827 (build-system python-build-system)
8828 (native-inputs
8829 `(("python-case" ,python-case)
8830 ("python-pytest-sugar" ,python-pytest-sugar)
8831 ("python-mock" ,python-mock)))
8832 (propagated-inputs
8833 `(("python-vine" ,python-vine)))
8834 (home-page "https://github.com/celery/py-amqp")
8835 (synopsis
8836 "Low-level AMQP client for Python (fork of amqplib)")
8837 (description
8838 "This is a fork of amqplib which was originally written by Barry Pederson.
8839It is maintained by the Celery project, and used by kombu as a pure python
8840alternative when librabbitmq is not available.")
8841 (license license:lgpl2.1+)
8842 (properties `((python2-variant . ,(delay python2-amqp))))))
8843
8844(define-public python2-amqp
8845 (let ((amqp (package-with-python2
8846 (strip-python2-variant python-amqp))))
8847 (package
8848 (inherit amqp)
8849 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
8850 ;; unmaintained. Weirdly, does not do this on the python 3
8851 ;; version?
8852 #:tests? #f
8853 ,@(package-arguments amqp))))))
8854
8855(define-public python-txamqp
8856 (package
8857 (name "python-txamqp")
8858 (version "0.8.2")
8859 (source
8860 (origin
8861 (method url-fetch)
8862 (uri (pypi-uri "txAMQP" version))
8863 (sha256
8864 (base32
8865 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
8866 (build-system python-build-system)
8867 (propagated-inputs
8868 `(("python-six" ,python-six)
8869 ("python-twisted" ,python-twisted)))
8870 (home-page "https://github.com/txamqp/txamqp")
8871 (synopsis "Communicate with AMQP peers and brokers using Twisted")
8872 (description
8873 "This package provides a Python library for communicating with AMQP peers
8874and brokers using the asynchronous networking framework Twisted. It contains
8875all the necessary code to connect, send and receive messages to/from an
8876AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
8877also includes support for using Thrift RPC over AMQP in Twisted
8878applications.")
8879 (license license:asl2.0)))
8880
8881(define-public python2-txamqp
8882 (package-with-python2 python-txamqp))
8883
8884(define-public python-kombu
8885 (package
8886 (name "python-kombu")
8887 (version "4.2.2")
8888 (source
8889 (origin
8890 (method url-fetch)
8891 (uri (pypi-uri "kombu" version))
8892 (sha256
8893 (base32
8894 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
8895 (build-system python-build-system)
8896 (native-inputs
8897 `(("python-mock" ,python-mock)
8898 ("python-case" ,python-case)
8899 ("python-pyro4" ,python-pyro4)
8900 ("python-pytest-sugar" ,python-pytest-sugar)
8901 ("python-pytz" ,python-pytz)))
8902 (propagated-inputs
8903 `(("python-anyjson" ,python-anyjson)
8904 ("python-amqp" ,python-amqp)
8905 ("python-redis" ,python-redis)))
8906 (home-page "https://kombu.readthedocs.io")
8907 (synopsis "Message passing library for Python")
8908 (description "The aim of Kombu is to make messaging in Python as easy as
8909possible by providing an idiomatic high-level interface for the AMQ protocol,
8910and also provide proven and tested solutions to common messaging problems.
8911AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
8912message orientation, queuing, routing, reliability and security, for which the
8913RabbitMQ messaging server is the most popular implementation.")
8914 (license license:bsd-3)
8915 (properties `((python2-variant . ,(delay python2-kombu))))))
8916
8917(define-public python2-kombu
8918 (let ((kombu (package-with-python2
8919 (strip-python2-variant python-kombu))))
8920 (package
8921 (inherit kombu)
8922 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
8923 ;; It works fine on the python3 variant.
8924 #:tests? #f
8925 ,@(package-arguments kombu)))
8926 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8927 ,@(package-native-inputs kombu))))))
8928
8929(define-public python-billiard
8930 (package
8931 (name "python-billiard")
8932 (version "3.5.0.5")
8933 (source
8934 (origin
8935 (method url-fetch)
8936 (uri (pypi-uri "billiard" version))
8937 (sha256
8938 (base32
8939 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
8940 (build-system python-build-system)
8941 (native-inputs
8942 `(("python-case" ,python-case)
8943 ("python-pytest" ,python-pytest)))
8944 (home-page "https://github.com/celery/billiard")
8945 (synopsis
8946 "Python multiprocessing fork with improvements and bugfixes")
8947 (description
8948 "Billiard is a fork of the Python 2.7 multiprocessing package. The
8949multiprocessing package itself is a renamed and updated version of R Oudkerk's
8950pyprocessing package. This standalone variant is intended to be compatible with
8951Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
8952 (license license:bsd-3)
8953 (properties `((python2-variant . ,(delay python2-billiard))))))
8954
8955(define-public python2-billiard
8956 (let ((billiard (package-with-python2
8957 (strip-python2-variant python-billiard))))
8958 (package
8959 (inherit billiard)
8960 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8961 ("python2-mock" ,python2-mock)
8962 ,@(package-native-inputs billiard))))))
8963
8964(define-public python-celery
8965 (package
8966 (name "python-celery")
8967 (version "4.2.1")
8968 (source
8969 (origin
8970 (method url-fetch)
8971 (uri (pypi-uri "celery" version))
8972 (sha256
8973 (base32
8974 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
8975 (build-system python-build-system)
8976 (arguments
8977 '(;; TODO The tests fail with Python 3.7
8978 ;; https://github.com/celery/celery/issues/4849
8979 #:tests? #f
8980 #:phases
8981 (modify-phases %standard-phases
8982 (add-after 'unpack 'patch-requirements
8983 (lambda _
8984 (substitute* "requirements/test.txt"
8985 (("pytest>=3\\.0,<3\\.3")
8986 "pytest>=3.0"))
8987 #t)))))
8988 (native-inputs
8989 `(("python-case" ,python-case)
8990 ("python-pytest" ,python-pytest)))
8991 (propagated-inputs
8992 `(("python-pytz" ,python-pytz)
8993 ("python-billiard" ,python-billiard)
8994 ("python-kombu" ,python-kombu)))
8995 (home-page "https://celeryproject.org")
8996 (synopsis "Distributed Task Queue")
8997 (description "Celery is an asynchronous task queue/job queue based on
8998distributed message passing. It is focused on real-time operation, but
8999supports scheduling as well. The execution units, called tasks, are executed
9000concurrently on a single or more worker servers using multiprocessing,
9001Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9002synchronously (wait until ready).")
9003 (license license:bsd-3)
9004 (properties `((python2-variant . ,(delay python2-celery))))))
9005
9006(define-public python2-celery
9007 (let ((celery (package-with-python2
9008 (strip-python2-variant python-celery))))
9009 (package
9010 (inherit celery)
9011 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9012 ("python2-mock" ,python2-mock)
9013 ,@(package-native-inputs celery))))))
9014
9015(define-public python-translitcodec
9016 (package
9017 (name "python-translitcodec")
9018 (version "0.4.0")
9019 (source
9020 (origin
9021 (method url-fetch)
9022 (uri (pypi-uri "translitcodec" version))
9023 (sha256
9024 (base32
9025 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9026 (build-system python-build-system)
9027 (arguments
9028 `(#:tests? #f)) ; no tests provided
9029 (home-page
9030 "https://github.com/claudep/translitcodec")
9031 (synopsis
9032 "Unicode to 8-bit charset transliteration codec")
9033 (description
9034 "This package contains codecs for transliterating ISO 10646 texts into
9035best-effort representations using smaller coded character sets (ASCII,
9036ISO 8859, etc.).")
9037 (license license:expat)))
9038
9039(define-public python2-translitcodec
9040 (package-with-python2 python-translitcodec))
9041
9042(define-public python-editor
9043 (package
9044 (name "python-editor")
9045 (version "0.5")
9046 (source
9047 (origin
9048 (method url-fetch)
9049 (uri (pypi-uri "python-editor" version))
9050 (sha256
9051 (base32
9052 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9053 (build-system python-build-system)
9054 (home-page
9055 "https://github.com/fmoo/python-editor")
9056 (synopsis
9057 "Programmatically open an editor, capture the result")
9058 (description
9059 "python-editor is a library that provides the editor module for
9060programmatically interfacing with your system's $EDITOR.")
9061 (license license:asl2.0)))
9062
9063(define-public python2-editor
9064 (package-with-python2 python-editor))
9065
44d10b1f
RW
9066(define-public python-vobject
9067 (package
9068 (name "python-vobject")
9069 (version "0.9.5")
9070 (source (origin
9071 (method url-fetch)
9072 (uri (pypi-uri "vobject" version))
9073 (sha256
9074 (base32
9075 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
9076 (build-system python-build-system)
9077 (arguments
9078 '(;; The test suite relies on some non-portable Windows interfaces.
9079 #:tests? #f))
9080 (propagated-inputs
9081 `(("python-dateutil" ,python-dateutil)
9082 ("python-pyicu" ,python-pyicu)))
9083 (synopsis "Parse and generate vCard and vCalendar files")
9084 (description "Vobject is intended to be a full featured Python package for
9085parsing and generating vCard and vCalendar files. Currently, iCalendar files
9086are supported and well tested. vCard 3.0 files are supported, and all data
9087should be imported, but only a few components are understood in a sophisticated
9088way.")
9089 (home-page "http://eventable.github.io/vobject/")
9090 (license license:asl2.0)))
9091
9092(define-public python2-vobject
9093 (package-with-python2 python-vobject))
9094
9095(define-public python-munkres
9096 (package
9097 (name "python-munkres")
9098 (version "1.0.8")
9099 (source (origin
9100 (method url-fetch)
9101 (uri (pypi-uri "munkres" version))
9102 (sha256
9103 (base32
9104 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
9105 (build-system python-build-system)
9106 (arguments
9107 '(#:tests? #f)) ; no test suite
9108 (home-page "http://software.clapper.org/munkres/")
9109 (synopsis "Implementation of the Munkres algorithm")
9110 (description "The Munkres module provides an implementation of the Munkres
9111algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9112useful for solving the Assignment Problem.")
9113 (license license:bsd-3)))
9114
9115(define-public python2-munkres
9116 (package-with-python2 python-munkres))
9117
9118(define-public python-whoosh
9119 (package
9120 (name "python-whoosh")
9121 (version "2.7.4")
9122 (source
9123 (origin
9124 (method url-fetch)
9125 (uri (pypi-uri "Whoosh" version))
9126 (sha256
9127 (base32
9128 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9129 (build-system python-build-system)
9130 (native-inputs
9131 `(("python-pytest" ,python-pytest)))
9132 (home-page "https://bitbucket.org/mchaput/whoosh")
9133 (synopsis "Full text indexing, search, and spell checking library")
9134 (description
9135 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9136checking library.")
9137 (license license:bsd-2)))
9138
9139(define-public python2-whoosh
9140 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9141 (package (inherit whoosh)
9142 (propagated-inputs
9143 `(("python2-backport-ssl-match-hostname"
9144 ,python2-backport-ssl-match-hostname)
9145 ,@(package-propagated-inputs whoosh))))))
9146
9147(define-public python-pathlib
9148 (package
9149 (name "python-pathlib")
9150 (version "1.0.1")
9151 (source (origin
9152 (method url-fetch)
9153 (uri (pypi-uri "pathlib" version))
9154 (sha256
9155 (base32
9156 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9157 (build-system python-build-system)
9158 ;; The tests depend on the internal "test" module, which does not provide
9159 ;; a stable interface.
9160 (arguments `(#:tests? #f))
9161 (home-page "https://pathlib.readthedocs.org/")
9162 (synopsis "Object-oriented file system paths")
9163 (description "Pathlib offers a set of classes to handle file system paths.
9164It offers the following advantages over using string objects:
9165
9166@enumerate
9167@item No more cumbersome use of os and os.path functions. Everything can
9168be done easily through operators, attribute accesses, and method calls.
9169@item Embodies the semantics of different path types. For example,
9170comparing Windows paths ignores casing.
9171@item Well-defined semantics, eliminating any inconsistencies or
9172ambiguities (forward vs. backward slashes, etc.).
9173@end enumerate
9174
9175Note: In Python 3.4, pathlib is now part of the standard library. For other
9176Python versions please consider python-pathlib2 instead, which tracks the
9177standard library module. This module (python-pathlib) isn't maintained
9178anymore.")
9179 (license license:expat)))
9180
9181(define-public python2-pathlib
9182 (package-with-python2 python-pathlib))
9183
9184(define-public python2-pathlib2
9185 (package
9186 (name "python2-pathlib2")
9187 (version "2.3.2")
9188 (source (origin
9189 (method url-fetch)
9190 (uri (pypi-uri "pathlib2" version))
9191 (sha256
9192 (base32
9193 "10yb0iv5x2hs631rcppkhbddx799d3h8pcwmkbh2a66ns3w71ccf"))))
9194 (build-system python-build-system)
9195 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9196 ;; version is 3.4 which already includes this package as part of the
9197 ;; standard library.
9198 (arguments
9199 `(#:python ,python-2))
9200 (propagated-inputs
9201 `(("python2-scandir" ,python2-scandir)
9202 ("python2-six" ,python2-six)))
9203 (home-page "https://pypi.python.org/pypi/pathlib2/")
9204 (synopsis "Object-oriented file system paths - backport of standard
9205pathlib module")
9206 (description "The goal of pathlib2 is to provide a backport of standard
9207pathlib module which tracks the standard library module, so all the newest
9208features of the standard pathlib can be used also on older Python versions.
9209
9210Pathlib offers a set of classes to handle file system paths. It offers the
9211following advantages over using string objects:
9212
9213@enumerate
9214@item No more cumbersome use of os and os.path functions. Everything can
9215be done easily through operators, attribute accesses, and method calls.
9216@item Embodies the semantics of different path types. For example,
9217comparing Windows paths ignores casing.
9218@item Well-defined semantics, eliminating any inconsistencies or
9219ambiguities (forward vs. backward slashes, etc.).
9220@end enumerate")
9221 (license license:expat)))
9222
9223(define-public python2-pathlib2-bootstrap
9224 (hidden-package
9225 (package
9226 (inherit python2-pathlib2)
9227 (name "python2-pathlib2-bootstrap")
9228 (propagated-inputs
9229 `(("python2-scandir" ,python2-scandir)
9230 ("python2-six" ,python2-six-bootstrap))))))
9231
9232(define-public python-jellyfish
9233 (package
9234 (name "python-jellyfish")
9235 (version "0.5.6")
9236 (source (origin
9237 (method url-fetch)
9238 (uri (pypi-uri "jellyfish" version))
9239 (sha256
9240 (base32
9241 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
9242 (build-system python-build-system)
9243 (native-inputs
9244 `(("python-pytest" ,python-pytest)))
9245 (home-page "https://github.com/jamesturk/jellyfish")
9246 (synopsis "Approximate and phonetic matching of strings")
9247 (description "Jellyfish uses a variety of string comparison and phonetic
9248encoding algorithms to do fuzzy string matching.")
9249 (license license:bsd-2)
9250 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9251
9252(define-public python2-jellyfish
9253 (let ((jellyfish (package-with-python2
9254 (strip-python2-variant python-jellyfish))))
9255 (package (inherit jellyfish)
9256 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
9257 ,@(package-native-inputs jellyfish))))))
9258
9259(define-public python2-unicodecsv
9260 (package
9261 (name "python2-unicodecsv")
9262 (version "0.14.1")
9263 (source (origin
9264 (method url-fetch)
9265 ;; The test suite is not included in the PyPi release.
9266 ;; https://github.com/jdunck/python-unicodecsv/issues/19
9267 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
9268 "archive/" version ".tar.gz"))
9269 (file-name (string-append name "-" version ".tar.gz"))
9270 (sha256
9271 (base32
9272 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
9273 (build-system python-build-system)
9274 (arguments
9275 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9276 #:python ,python-2))
9277 (native-inputs
9278 `(("python2-unittest2" ,python2-unittest2)))
9279 (home-page "https://github.com/jdunck/python-unicodecsv")
9280 (synopsis "Unicode CSV module for Python 2")
9281 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9282module, adding support for Unicode strings.")
9283 (license license:bsd-2)))
9284
9285(define-public python-rarfile
9286 (package
9287 (name "python-rarfile")
9288 (version "2.8")
9289 (source (origin
9290 (method url-fetch)
9291 (uri (pypi-uri "rarfile" version))
9292 (sha256
9293 (base32
9294 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
9295 (build-system python-build-system)
9296 (arguments
9297 '(#:phases
9298 (modify-phases %standard-phases
9299 (replace 'check
9300 ;; Many tests fail, but the installation proceeds.
e59dd341 9301 (lambda _ (invoke "make" "-C" "test" "test"))))))
44d10b1f
RW
9302 (native-inputs
9303 `(("which" ,which))) ; required for tests
9304 (propagated-inputs
9305 `(("libarchive" ,libarchive)))
9306 (home-page "https://github.com/markokr/rarfile")
9307 (synopsis "RAR archive reader for Python")
9308 (description "This is Python module for RAR archive reading. The interface
9309is made as zipfile like as possible.")
9310 (license license:isc)))
9311
9312(define-public python2-rarfile
9313 (package-with-python2 python-rarfile))
9314
9315(define-public python-magic
9316 (package
9317 (name "python-magic")
9318 (version "0.4.15")
9319 (source
9320 (origin
9321 (method url-fetch)
9322 (uri (pypi-uri "python-magic" version))
9323 (sha256
9324 (base32
9325 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
9326 (file-name (string-append name "-" version "-checkout"))))
9327 (build-system python-build-system)
9328 (arguments
9329 ;; The tests are unreliable, so don't run them. The tests fail
9330 ;; under Python3 because they were written for Python2 and
9331 ;; contain import statements that do not work in Python3. One of
9332 ;; the tests fails under Python2 because its assertions are
9333 ;; overly stringent; it relies on comparing output strings which
9334 ;; are brittle and can change depending on the version of
9335 ;; libmagic being used and the system on which the test is
9336 ;; running. In my case, under GuixSD 0.10.0, only one test
9337 ;; failed, and it seems to have failed only because the version
9338 ;; of libmagic that is packaged in Guix outputs a slightly
9339 ;; different (but not wrong) string than the one that the test
9340 ;; expected.
9341 '(#:tests? #f
9342 #:phases (modify-phases %standard-phases
9343 ;; Replace a specific method call with a hard-coded
9344 ;; path to the necessary libmagic.so file in the
9345 ;; store. If we don't do this, then the method call
9346 ;; will fail to find the libmagic.so file, which in
9347 ;; turn will cause any application using
9348 ;; python-magic to fail.
9349 (add-before 'build 'hard-code-path-to-libmagic
9350 (lambda* (#:key inputs #:allow-other-keys)
9351 (let ((file (assoc-ref inputs "file")))
9352 (substitute* "magic.py"
9353 (("ctypes.util.find_library\\('magic'\\)")
9354 (string-append "'" file "/lib/libmagic.so'")))
9355 #t)))
9356 (add-before 'install 'disable-egg-compression
9357 (lambda _
9358 (let ((port (open-file "setup.cfg" "a")))
9359 (display "\n[easy_install]\nzip_ok = 0\n"
9360 port)
9361 (close-port port)
9362 #t))))))
9363 (inputs
9364 ;; python-magic needs to be able to find libmagic.so.
9365 `(("file" ,file)))
9366 (home-page
9367 "https://github.com/ahupp/python-magic")
9368 (synopsis
9369 "File type identification using libmagic")
9370 (description
9371 "This module uses ctypes to access the libmagic file type
9372identification library. It makes use of the local magic database and
9373supports both textual and MIME-type output. Note that this module and
9374the python-file module both provide a \"magic.py\" file; these two
9375modules, which are different and were developed separately, both serve
9376the same purpose: to provide Python bindings for libmagic.")
9377 (license license:expat)))
9378
9379(define-public python2-magic
9380 (package-with-python2 python-magic))
9381
9382(define-public python2-s3cmd
9383 (package
9384 (name "python2-s3cmd")
9385 (version "1.6.1")
9386 (source
9387 (origin
9388 (method url-fetch)
9389 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
9390 "s3cmd-" version ".tar.gz"))
9391 (sha256
9392 (base32
9393 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9394 (build-system python-build-system)
9395 (arguments
9396 ;; s3cmd is written for python2 only and contains no tests.
9397 `(#:python ,python-2
9398 #:tests? #f))
9399 (propagated-inputs
9400 `(("python2-dateutil" ,python2-dateutil)
9401 ;; The python-file package also provides a magic.py module.
9402 ;; This is an unfortunate state of affairs; however, s3cmd
9403 ;; fails to install if it cannot find specifically the
9404 ;; python-magic package. Thus we include it, instead of using
9405 ;; python-file. Ironically, s3cmd sometimes works better
9406 ;; without libmagic bindings at all:
9407 ;; https://github.com/s3tools/s3cmd/issues/198
9408 ("python2-magic" ,python2-magic)))
9409 (home-page "http://s3tools.org/s3cmd")
9410 (synopsis "Command line tool for S3-compatible storage services")
9411 (description
9412 "S3cmd is a command line tool for uploading, retrieving and managing data
9413in storage services that are compatible with the Amazon Simple Storage
9414Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9415GnuPG encryption, and more. It also supports management of Amazon's
9416CloudFront content delivery network.")
9417 (license license:gpl2+)))
9418
9419(define-public python-pkgconfig
9420 (package
9421 (name "python-pkgconfig")
9422 (version "1.3.1")
9423 (source
9424 (origin
9425 (method url-fetch)
9426 (uri (pypi-uri "pkgconfig" version))
9427 (sha256
9428 (base32
9429 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
9430 (build-system python-build-system)
9431 (native-inputs
9432 `(("python-nose" ,python-nose)))
9433 (inputs
9434 `(("pkg-config" ,pkg-config)))
9435 (arguments
9436 `(#:phases
9437 (modify-phases %standard-phases
9438 (add-before 'build 'patch
9439 ;; Hard-code the path to pkg-config.
9440 (lambda _
9441 (substitute* "pkgconfig/pkgconfig.py"
9442 (("cmd = 'pkg-config")
9443 (string-append "cmd = '" (which "pkg-config"))))
9444 #t))
9445 (replace 'check
9446 (lambda _
9447 (invoke "nosetests" "test.py"))))))
9448 (home-page "https://github.com/matze/pkgconfig")
9449 (synopsis "Python interface for pkg-config")
9450 (description "This module provides a Python interface to pkg-config. It
9451can be used to find all pkg-config packages, check if a package exists,
9452check if a package meets certain version requirements, query CFLAGS and
9453LDFLAGS and parse the output to build extensions with setup.py.")
9454 (license license:expat)))
9455
9456(define-public python2-pkgconfig
9457 (package-with-python2 python-pkgconfig))
9458
9459(define-public python-bz2file
9460 (package
9461 (name "python-bz2file")
9462 (version "0.98")
9463 (source
9464 (origin
9465 (method url-fetch)
9466 (uri (pypi-uri "bz2file" version))
9467 (sha256
9468 (base32
9469 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9470 (build-system python-build-system)
9471 (arguments
9472 `(#:tests? #f)) ; Tests use deprecated python modules.
9473 (home-page "https://github.com/nvawda/bz2file")
9474 (synopsis "Read and write bzip2-compressed files")
9475 (description
9476 "Bz2file is a Python library for reading and writing bzip2-compressed
9477files. It contains a drop-in replacement for the I/O interface in the
9478standard library's @code{bz2} module, including features from the latest
9479development version of CPython that are not available in older releases.")
9480 (license license:asl2.0)))
9481
9482(define-public python2-bz2file
9483 (package-with-python2 python-bz2file))
9484
9485(define-public python-future
9486 (package
9487 (name "python-future")
d5d54030 9488 (version "0.17.1")
44d10b1f
RW
9489 (source
9490 (origin
9491 (method url-fetch)
9492 (uri (pypi-uri "future" version))
9493 (sha256
9494 (base32
d5d54030 9495 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
44d10b1f
RW
9496 (build-system python-build-system)
9497 ;; Many tests connect to the network or are otherwise flawed.
9498 ;; https://github.com/PythonCharmers/python-future/issues/210
9499 (arguments
9500 `(#:tests? #f))
9501 (home-page "http://python-future.org")
9502 (synopsis "Single-source support for Python 3 and 2")
9503 (description
9504 "@code{python-future} is the missing compatibility layer between Python 2 and
9505Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9506to support both Python 2 and Python 3 with minimal overhead.")
9507 (license license:expat)))
9508
9509(define-public python2-future
9510 (package-with-python2 python-future))
9511
9512(define-public python-cysignals
9513 (package
9514 (name "python-cysignals")
8e3e51df 9515 (version "1.9.0")
44d10b1f
RW
9516 (source
9517 (origin
9518 (method url-fetch)
8e3e51df 9519 (uri (pypi-uri "cysignals" version))
44d10b1f
RW
9520 (sha256
9521 (base32
8e3e51df 9522 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
44d10b1f
RW
9523 (build-system python-build-system)
9524 (native-inputs
9525 `(("python-cython" ,python-cython)
9526 ("python-sphinx" ,python-sphinx)))
9527 (inputs
9528 `(("pari-gp" ,pari-gp)))
9529 (arguments
9530 `(#:modules ((guix build python-build-system)
9531 ((guix build gnu-build-system) #:prefix gnu:)
9532 (guix build utils))
9533 ;; FIXME: Tests are executed after installation and currently fail
9534 ;; when not installing into standard locations; the author is working
9535 ;; on a fix.
9536 #:tests? #f
9537 #:phases
9538 (modify-phases %standard-phases
9539 (add-before
9540 'build 'configure
9541 (assoc-ref gnu:%standard-phases 'configure)))))
9542 (home-page
9543 "https://github.com/sagemath/cysignals")
9544 (synopsis
9545 "Handling of interrupts and signals for Cython")
9546 (description
9547 "The cysignals package provides mechanisms to handle interrupts (and
9548other signals and errors) in Cython code, using two related approaches,
9549for mixed Cython/Python code or external C libraries and pure Cython code,
9550respectively.")
9551 (license license:lgpl3+)))
9552
9553(define-public python2-cysignals
9554 (package-with-python2 python-cysignals))
9555
9556(define-public python2-shedskin
9557 (package
9558 (name "python2-shedskin")
9559 (version "0.9.4")
9560 (source
9561 (origin
9562 (method url-fetch)
9563 (uri (string-append "https://github.com/shedskin/shedskin/"
9564 "releases/download/v" version
9565 "/shedskin-" version ".tgz"))
9566 (sha256
9567 (base32
9568 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9569 (build-system python-build-system)
9570 (arguments
9571 `(#:python ,python-2
9572 #:phases (modify-phases %standard-phases
9573 (add-after 'unpack 'fix-resulting-include-libs
9574 (lambda* (#:key inputs #:allow-other-keys)
9575 (let ((libgc (assoc-ref inputs "libgc"))
9576 (pcre (assoc-ref inputs "pcre")))
9577 (substitute* "shedskin/makefile.py"
9578 (("variable == 'CCFLAGS':[ ]*")
9579 (string-append "variable == 'CCFLAGS':\n"
9580 " line += ' -I " pcre "/include"
9581 " -I " libgc "/include'"))
9582 (("variable == 'LFLAGS':[ ]*")
9583 (string-append "variable == 'LFLAGS':\n"
9584 " line += ' -L" pcre "/lib"
9585 " -L " libgc "/lib'")))
9586 #t))))))
9587 (inputs `(("pcre" ,pcre)
9588 ("libgc" ,libgc)))
9589 (home-page "https://shedskin.github.io/")
9590 (synopsis "Experimental Python-2 to C++ Compiler")
9591 (description (string-append "This is an experimental compiler for a subset of
9592Python. It generates C++ code and a Makefile."))
9593 (license (list license:gpl3 license:bsd-3 license:expat))))
9594
9595(define-public python2-rope
9596 (package
9597 (name "python2-rope")
a9ba0a31 9598 (version "0.11.0")
44d10b1f
RW
9599 (source
9600 (origin
9601 (method url-fetch)
9602 (uri (pypi-uri "rope" version))
9603 (sha256
9604 (base32
a9ba0a31 9605 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
44d10b1f 9606 (arguments
afb29715 9607 ;; Rope has only partial python3 support, see `python-rope'
44d10b1f
RW
9608 `(#:python ,python-2))
9609 (build-system python-build-system)
9610 (native-inputs
9611 `(("python2-unittest2" ,python2-unittest2)))
9612 (home-page "https://github.com/python-rope/rope")
9613 (synopsis "Refactoring library for Python")
9614 (description "Rope is a refactoring library for Python. It facilitates
9615the renaming, moving and extracting of attributes, functions, modules, fields
9616and parameters in Python 2 source code. These refactorings can also be applied
9617to occurrences in strings and comments.")
9618 (license license:gpl2)))
9619
2c880ef4
LC
9620(define-public python-rope
9621 (package
9622 (inherit python2-rope)
9623 (name "python-rope")
9624 (arguments `(#:python ,python-wrapper
9625 ;; XXX: Only partial python3 support, results in some failing
9626 ;; tests: <https://github.com/python-rope/rope/issues/247>.
9627 #:tests? #f))
9628 (properties `((python2-variant . ,(delay python2-rope))))))
9629
44d10b1f
RW
9630(define-public python-py3status
9631 (package
9632 (name "python-py3status")
77f3d303 9633 (version "3.16")
44d10b1f
RW
9634 (source
9635 (origin
9636 (method url-fetch)
9637 (uri (pypi-uri "py3status" version))
9638 (sha256
9639 (base32
77f3d303 9640 "1xrfph277bgjln3jbpzpgkhxad04fjvj7s3xfil42q1sxi4s3q3g"))))
44d10b1f
RW
9641 (build-system python-build-system)
9642 (inputs
9643 `(("file" ,file)))
9644 (arguments
9645 '(#:phases
9646 (modify-phases %standard-phases
9647 ;; 'file' is used for detection of configuration file encoding
9648 ;; let's make link the dependency to particular input
9649 (add-before 'build 'patch-file-path
9650 (lambda* (#:key inputs #:allow-other-keys)
9651 (let ((file-path (assoc-ref inputs "file")))
9652 (substitute* "py3status/parse_config.py"
9653 (("\\['file', '-b'")
9654 (string-append "['" file-path "/bin/file', '-b'")))
9655 #t))))
9656 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
9657 (home-page "https://github.com/ultrabug/py3status")
9658 (synopsis "Extensible i3status wrapper written in Python")
9659 (description "py3status is an i3status wrapper which extends i3status
9660functionality in a modular way, allowing you to extend your panel with your
9661own code, responding to click events and updating clock every second.")
9662 (license license:bsd-3)))
9663
9664(define-public python-tblib
9665 (package
9666 (name "python-tblib")
9667 (version "1.3.2")
9668 (source (origin
9669 (method url-fetch)
9670 (uri (pypi-uri "tblib" version))
9671 (sha256 (base32
9672 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
9673 (build-system python-build-system)
9674 (arguments
9675 `(#:phases
9676 (modify-phases %standard-phases
9677 (add-before 'check 'adjust-tests
9678 (lambda _
9679 (when (which "python3")
9680 ;; Adjust the example output to match that of Python 3.7:
9681 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
9682 (substitute* "README.rst"
9683 (("Exception\\('fail',") "Exception('fail'"))
9684 #t)))
9685 (replace 'check
9686 (lambda _
9687 ;; Upstream runs tests after installation and the package itself
9688 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
9689 ;; found.
9690 (setenv "PYTHONPATH"
9691 (string-append (getcwd) "/build/lib:"
9692 (getenv "PYTHONPATH")))
9693 (invoke "py.test" "-vv" "tests" "README.rst"))))))
9694 (native-inputs
9695 `(("python-pytest" ,python-pytest)
9696 ("python-six" ,python-six)))
9697 (home-page "https://github.com/ionelmc/python-tblib")
9698 (synopsis "Traceback serialization library")
9699 (description
9700 "Traceback serialization allows you to:
9701
9702@enumerate
9703@item Pickle tracebacks and raise exceptions with pickled tracebacks in
9704different processes. This allows better error handling when running code over
9705multiple processes (imagine multiprocessing, billiard, futures, celery etc).
9706
9707@item Parse traceback strings and raise with the parsed tracebacks.
9708@end enumerate\n")
9709 (license license:bsd-3)))
9710
9711(define-public python2-tblib
9712 (package-with-python2 python-tblib))
9713
9714(define-public python-greenlet
9715 (package
9716 (name "python-greenlet")
9717 (version "0.4.15")
9718 (source (origin
9719 (method url-fetch)
9720 (uri (pypi-uri "greenlet" version))
9721 (sha256
9722 (base32
9723 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
9724 (build-system python-build-system)
9725 (home-page "https://greenlet.readthedocs.io/")
9726 (synopsis "Lightweight in-process concurrent programming")
9727 (description
9728 "Greenlet package is a spin-off of Stackless, a version of CPython
9729that supports micro-threads called \"tasklets\". Tasklets run
9730pseudo-concurrently (typically in a single or a few OS-level threads) and
9731are synchronized with data exchanges on \"channels\".")
9732 (license (list license:psfl license:expat))))
9733
9734(define-public python2-greenlet
9735 (package-with-python2 python-greenlet))
9736
9737(define-public python-objgraph
9738 (package
9739 (name "python-objgraph")
9740 (version "3.4.0")
9741 (source
9742 (origin
9743 (method url-fetch)
9744 (uri (pypi-uri "objgraph" version))
9745 (sha256
9746 (base32
9747 "184m09am5gpbqfaiy7l0hwh476mczbrly1dffs0rw2p1d1i2q32a"))))
9748 (build-system python-build-system)
9749 (propagated-inputs
9750 `(("python-graphviz" ,python-graphviz)))
9751 (native-inputs
9752 `(("python-mock" ,python-mock)
9753 ("graphviz" ,graphviz)))
9754 (home-page "https://mg.pov.lt/objgraph/")
9755 (synopsis "Draw Python object reference graphs with graphviz")
9756 (description
9757 "This package provides tools to draw Python object reference graphs with
9758graphviz.")
9759 (license license:expat)))
9760
9761(define-public python-gevent
9762 (package
9763 (name "python-gevent")
9764 (version "1.3.7")
9765 (source (origin
9766 (method url-fetch)
9767 (uri (pypi-uri "gevent" version))
9768 (sha256
9769 (base32
9770 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
9771 (modules '((guix build utils)))
9772 (snippet
9773 '(begin
9774 ;; unbunding libev and c-ares
9775 (delete-file-recursively "deps")
9776 #t))))
9777 (build-system python-build-system)
9778 (arguments
9779 `(#:modules ((ice-9 ftw)
9780 (ice-9 match)
9781 (srfi srfi-26)
9782 (guix build utils)
9783 (guix build python-build-system))
9784 #:phases (modify-phases %standard-phases
9785 (add-after 'unpack 'unpack-libev
9786 (lambda* (#:key inputs #:allow-other-keys)
9787 (mkdir-p "deps/libev")
9788 ;; FIXME: gevent requires building libev, even though
9789 ;; it only links against the proper one.
9790 (invoke "tar" "-xf" (assoc-ref inputs "libev-source")
9791 "--strip-components=1" "-C" "deps/libev")))
9792 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
9793 (lambda _
9794 (substitute* "src/gevent/subprocess.py"
9795 (("/bin/sh") (which "sh")))
9796 (for-each (lambda (file)
9797 (substitute* file
9798 (("/bin/sh") (which "sh"))
9799 (("/bin/true") (which "true"))))
9800 (find-files "src/greentest" "\\.py$"))
9801 #t))
9802 (add-before 'build 'do-not-use-bundled-sources
9803 (lambda* (#:key inputs #:allow-other-keys)
9804 (setenv "CONFIG_SHELL" (which "bash"))
9805 (setenv "LIBEV_EMBED" "false")
9806 (setenv "CARES_EMBED" "false")
9807 (setenv "EMBED" "false")
9808
9809 (let ((greenlet (string-append
9810 (assoc-ref inputs "python-greenlet")
9811 "/include")))
9812 (match (scandir greenlet
9813 (lambda (item)
9814 (string-prefix? "python" item)))
9815 ((python)
9816 (setenv "CPATH"
9817 (string-append greenlet "/" python)))))
9818 #t))
9819 (add-before 'check 'skip-timer-test
9820 (lambda _
9821 ;; XXX: Skip 'TestTimerResolution', which appears to be
9822 ;; unreliable.
9823 (substitute* "src/greentest/test__core_timer.py"
9824 (("not greentest.RUNNING_ON_CI") "False"))
9825 #t))
9826 (replace 'check
9827 (lambda _
9828 ;; Make sure the build directory is on PYTHONPATH.
9829 (setenv "PYTHONPATH"
9830 (string-append
9831 (getenv "PYTHONPATH") ":"
9832 (getcwd) "/build/"
9833 (car (scandir "build" (cut string-prefix? "lib." <>)))))
9834 (with-directory-excursion "src/greentest"
9835 ;; XXX: Many tests require network access. Instead we only
9836 ;; run known-good tests. Unfortunately we cannot use
9837 ;; recursion here since this directory also contains
9838 ;; Python-version-specific subfolders.
9839 (apply invoke "python" "testrunner.py" "--config"
9840 "known_failures.py"
9841 (scandir "." (cut regexp-exec
9842 (make-regexp "test_+(subprocess|core)")
9843 <>)))))))))
9844 (propagated-inputs
9845 `(("python-greenlet" ,python-greenlet)
9846 ("python-objgraph" ,python-objgraph)))
9847 (native-inputs
9848 `(("libev-source" ,(package-source libev))
9849 ("python-six" ,python-six)))
9850 (inputs
9851 `(("c-ares" ,c-ares)
9852 ("libev" ,libev)))
9853 (home-page "http://www.gevent.org/")
9854 (synopsis "Coroutine-based network library")
9855 (description
9856 "gevent is a coroutine-based Python networking library that uses greenlet
9857to provide a high-level synchronous API on top of the libev event loop.")
9858 (license license:expat)
9859 (properties `((python2-variant . ,(delay python2-gevent))))))
9860
9861(define-public python2-gevent
9862 (let ((base (package-with-python2
9863 (strip-python2-variant python-gevent))))
9864 (package
9865 (inherit base)
9866 (native-inputs `(,@(package-native-inputs python-gevent)
9867 ("python-mock" ,python2-mock))))))
9868
9869(define-public python-fastimport
9870 (package
9871 (name "python-fastimport")
9872 (version "0.9.6")
9873 (source
9874 (origin
9875 (method url-fetch)
9876 (uri (pypi-uri "fastimport" version))
9877 (sha256
9878 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
9879 (build-system python-build-system)
9880 (home-page "https://github.com/jelmer/python-fastimport")
9881 (synopsis "VCS fastimport parser and generator in Python")
9882 (description "This package provides a parser for and generator of the Git
9883@url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
9884format.")
9885 (license license:gpl2+)))
9886
9887(define-public python2-fastimport
9888 (package-with-python2 python-fastimport))
9889
9890(define-public python-twisted
9891 (package
9892 (name "python-twisted")
0107c9b8 9893 (version "19.2.1")
44d10b1f
RW
9894 (source (origin
9895 (method url-fetch)
9896 (uri (pypi-uri "Twisted" version ".tar.bz2"))
9897 (sha256
9898 (base32
0107c9b8 9899 "0liymyd4pzphizjlpwkncxjpm9akyr3lkfkm77yfg6wasv108b7s"))))
44d10b1f
RW
9900 (build-system python-build-system)
9901 (arguments
0107c9b8 9902 '(#:tests? #f)) ; FIXME: some tests fail
44d10b1f
RW
9903 (propagated-inputs
9904 `(("python-zope-interface" ,python-zope-interface)
52ca1c4a 9905 ("python-pyhamcrest" ,python-pyhamcrest)
44d10b1f 9906 ("python-incremental" ,python-incremental)
e5ba2fe3 9907 ("python-hyperlink" ,python-hyperlink)
44d10b1f
RW
9908 ("python-constantly" ,python-constantly)
9909 ("python-automat" ,python-automat)))
9910 (home-page "https://twistedmatrix.com/")
9911 (synopsis "Asynchronous networking framework written in Python")
9912 (description
9913 "Twisted is an extensible framework for Python programming, with special
9914focus on event-based network programming and multiprotocol integration.")
9915 (license license:expat)))
9916
9917(define-public python2-twisted
9918 (package-with-python2 python-twisted))
9919
9920(define-public python-pika
9921 (package
9922 (name "python-pika")
9923 (version "0.12.0")
9924 (source
9925 (origin
9926 (method url-fetch)
9927 (uri (pypi-uri "pika" version))
9928 (sha256
9929 (base32
9930 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
9931 (build-system python-build-system)
9932 (native-inputs
9933 `(("python-pyev" ,python-pyev)
9934 ("python-tornado" ,python-tornado)
9935 ("python-twisted" ,python-twisted)))
9936 (home-page "https://pika.readthedocs.org")
9937 (synopsis "Pure Python AMQP Client Library")
9938 (description
9939 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
9940Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
9941network support library.")
9942 (license license:bsd-3)))
9943
9944(define-public python2-pika
9945 (package-with-python2 python-pika))
9946
9947(define-public python-ply
9948 (package
9949 (name "python-ply")
9950 (version "3.10")
9951 (source
9952 (origin
9953 (method url-fetch)
9954 (uri (pypi-uri "ply" version))
9955 (sha256
9956 (base32
9957 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
9958 (build-system python-build-system)
9959 (home-page "http://www.dabeaz.com/ply/")
9960 (synopsis "Python Lex & Yacc")
9961 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
9962It uses LR parsing and does extensive error checking.")
9963 (license license:bsd-3)))
9964
9965(define-public python2-ply
9966 (package-with-python2 python-ply))
9967
9968(define-public python-tabulate
9969 (package
9970 (name "python-tabulate")
9971 (version "0.7.7")
9972 (source (origin
9973 (method url-fetch)
9974 (uri (pypi-uri "tabulate" version))
9975 (sha256
9976 (base32
9977 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
9978 (build-system python-build-system)
9979 (arguments
9980 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
9981 ;; and the latest release is not tagged in the upstream repository.
9982 '(#:tests? #f))
9983 (home-page "https://bitbucket.org/astanin/python-tabulate")
9984 (synopsis "Pretty-print tabular data")
9985 (description
9986 "Tabulate is a library and command-line utility to pretty-print tabular
9987data in Python.")
9988 (license license:expat)))
9989
9990(define-public python2-tabulate
9991 (package-with-python2 python-tabulate))
9992
9993(define-public python-kazoo
9994 (package
9995 (name "python-kazoo")
9996 (version "2.4.0")
9997 (source
9998 (origin
9999 (method url-fetch)
10000 (uri (pypi-uri "kazoo" version))
10001 (sha256
10002 (base32
10003 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
10004 (build-system python-build-system)
10005 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
10006 (propagated-inputs
10007 `(("python-six" ,python-six)))
10008 (home-page "https://kazoo.readthedocs.org")
10009 (synopsis "High-level Zookeeper client library")
10010 (description
10011 "Kazoo is a Python client library for the Apache Zookeeper distributed
10012application service. It is designed to be easy to use and to avoid common
10013programming errors.")
10014 (license license:asl2.0)))
10015
10016(define-public python2-kazoo
10017 (package-with-python2 python-kazoo))
10018
10019(define-public python-pykafka
10020 (package
10021 (name "python-pykafka")
10022 (version "2.4.0")
10023 (source (origin
10024 (method url-fetch)
0ca1d040 10025 (uri (pypi-uri "pykafka" version))
44d10b1f
RW
10026 (sha256
10027 (base32
10028 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10029 (build-system python-build-system)
10030 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
10031 (propagated-inputs
10032 `(("python-gevent" ,python-gevent)
10033 ("python-kazoo" ,python-kazoo)
10034 ("python-tabulate" ,python-tabulate)))
10035 (inputs
10036 `(("librdkafka" ,librdkafka)))
10037 (home-page "https://pykafka.readthedocs.io/")
10038 (synopsis "Apache Kafka client for Python")
10039 (description
10040 "PyKafka is a client for the Apache Kafka distributed messaging system.
10041It includes Python implementations of Kafka producers and consumers, which
10042are optionally backed by a C extension built on librdkafka.")
10043 (license license:asl2.0)))
10044
10045(define-public python2-pykafka
10046 (package-with-python2 python-pykafka))
10047
10048(define-public python-wcwidth
10049 (package
10050 (name "python-wcwidth")
10051 (version "0.1.7")
10052 (source
10053 (origin
10054 (method url-fetch)
10055 (uri (pypi-uri "wcwidth" version))
10056 (sha256
10057 (base32
10058 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
10059 (build-system python-build-system)
10060 (home-page "https://github.com/jquast/wcwidth")
10061 (synopsis "Measure number of terminal column cells of wide-character codes")
10062 (description "Wcwidth measures the number of terminal column cells of
10063wide-character codes. It is useful for those implementing a terminal emulator,
10064or programs that carefully produce output to be interpreted by one. It is a
10065Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10066specified in POSIX.1-2001 and POSIX.1-2008.")
10067 (license license:expat)))
10068
10069(define-public python2-wcwidth
10070 (package-with-python2 python-wcwidth))
10071
10072(define-public python2-jsonrpclib
10073 (package
10074 (name "python2-jsonrpclib")
10075 (version "0.1.7")
10076 (source (origin
10077 (method url-fetch)
6571bba0 10078 (uri (pypi-uri "jsonrpclib" version))
44d10b1f
RW
10079 (sha256
10080 (base32
10081 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10082 (build-system python-build-system)
10083 (arguments
10084 `(#:tests? #f
10085 #:python ,python-2))
10086 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10087 (synopsis "Implementation of JSON-RPC specification for Python")
10088 (description
10089 "This library is an implementation of the JSON-RPC specification.
10090It supports both the original 1.0 specification, as well as the
10091new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10092etc.")
10093 (license license:asl2.0)))
10094
10095(define-public python-chai
10096 (package
10097 (name "python-chai")
10098 (version "1.1.2")
10099 (source (origin
10100 (method url-fetch)
10101 (uri (pypi-uri "chai" version))
10102 (sha256
10103 (base32
10104 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
10105 (build-system python-build-system)
10106 (home-page "https://github.com/agoragames/chai")
10107 (synopsis "Mocking framework for Python")
10108 (description
10109 "Chai provides an api for mocking, stubbing and spying your python
10110objects, patterned after the Mocha library for Ruby.")
10111 (license license:bsd-3)))
10112
10113(define-public python2-chai
10114 (package-with-python2 python-chai))
10115
10116(define-public python-inflection
10117 (package
10118 (name "python-inflection")
10119 (version "0.3.1")
10120 (source
10121 (origin (method url-fetch)
10122 (uri (pypi-uri "inflection" version))
10123 (sha256
10124 (base32
10125 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10126 (build-system python-build-system)
10127 (native-inputs
10128 `(("python-pytest" ,python-pytest)))
10129 (home-page "https://github.com/jpvanhal/inflection")
10130 (synopsis "Python string transformation library")
10131 (description
10132 "Inflection is a string transformation library. It singularizes
10133and pluralizes English words, and transforms strings from CamelCase to
10134underscored string.")
10135 (license license:expat)))
10136
10137(define-public python2-inflection
10138 (package-with-python2 python-inflection))
10139
10140(define-public python-pylev
10141 (package
10142 (name "python-pylev")
10143 (version "1.3.0")
10144 (source (origin
10145 (method url-fetch)
10146 (uri (pypi-uri "pylev" version))
10147 (sha256
10148 (base32
10149 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10150 (build-system python-build-system)
10151 (home-page "https://github.com/toastdriven/pylev")
10152 (synopsis "Levenshtein distance implementation in Python")
10153 (description "Pure Python Levenshtein implementation, based off the
10154Wikipedia code samples at
10155@url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
10156 (license license:bsd-3)))
10157
10158(define-public python2-pylev
10159 (package-with-python2 python-pylev))
10160
10161(define-public python-cleo
10162 (package
10163 (name "python-cleo")
10164 (version "0.6.1")
10165 (source (origin
10166 (method url-fetch)
10167 (uri (pypi-uri "cleo" version))
10168 (sha256
10169 (base32
10170 "0q1cf0szr0d54am4pypzwdnm74zpladdsinad94c2fz5i06fdpf7"))))
10171 (build-system python-build-system)
10172 (native-inputs
10173 `(;; For testing
10174 ("python-mock" ,python-mock)
10175 ("python-pytest-mock" ,python-pytest-mock)
10176 ("python-pytest" ,python-pytest)))
10177 (propagated-inputs
10178 `(("python-backpack" ,python-backpack)
10179 ("python-pastel" ,python-pastel)
10180 ("python-pylev" ,python-pylev)))
10181 (home-page "https://github.com/sdispater/cleo")
10182 (synopsis "Command-line arguments library for Python")
10183 (description
10184 "Cleo allows you to create command-line commands with signature in
10185docstring and colored output.")
10186 (license license:expat)))
10187
10188(define-public python2-cleo
10189 (package-with-python2 python-cleo))
10190
10191(define-public python-lazy-object-proxy
10192 (package
10193 (name "python-lazy-object-proxy")
10194 (version "1.3.1")
10195 (source (origin
10196 (method url-fetch)
10197 (uri (pypi-uri "lazy-object-proxy" version))
10198 (sha256
10199 (base32
10200 "0yha7q9bhw857fwaby785d63mffhngl9npwzlk9i0pwlkwvbx4gb"))))
10201 (build-system python-build-system)
10202 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10203 (synopsis "Lazy object proxy for python")
10204 (description
10205 "Lazy object proxy is an object that wraps a callable but defers the call
10206until the object is actually required, and caches the result of said call.")
10207 (license license:bsd-2)))
10208
10209(define-public python2-lazy-object-proxy
10210 (package-with-python2 python-lazy-object-proxy))
10211
10212(define-public python-dnspython
10213 (package
10214 (name "python-dnspython")
10215 (version "1.15.0")
10216 (source (origin
10217 (method url-fetch)
10218 (uri (string-append "http://www.dnspython.org/kits/"
10219 version "/dnspython-" version ".tar.gz"))
10220 (sha256
10221 (base32
10222 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
10223 (build-system python-build-system)
10224 (arguments '(#:tests? #f)) ; XXX: requires internet access
10225 (home-page "http://www.dnspython.org")
10226 (synopsis "DNS toolkit for Python")
10227 (description
10228 "dnspython is a DNS toolkit for Python. It supports almost all record
10229types. It can be used for queries, zone transfers, and dynamic updates.
10230It supports TSIG authenticated messages and EDNS0.")
10231 (license license:expat)))
10232
10233(define-public python2-dnspython
10234 (package-with-python2 python-dnspython))
10235
10236(define-public python-email-validator
10237 (package
10238 (name "python-email-validator")
10239 (version "1.0.2")
10240 (source
10241 (origin (method url-fetch)
10242 (uri (pypi-uri "email_validator" version))
10243 (sha256
10244 (base32
10245 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
10246 (build-system python-build-system)
10247 (arguments
10248 '(#:phases
10249 (modify-phases %standard-phases
10250 (add-before 'build 'use-dnspython
10251 (lambda _
10252 (substitute* "setup.py"
10253 (("dnspython3") "dnspython"))
10254 #t)))))
10255 (propagated-inputs
10256 `(("python-dnspython" ,python-dnspython)
10257 ("python-idna" ,python-idna)))
10258 (home-page "https://github.com/JoshData/python-email-validator")
10259 (synopsis "Email address validation library for Python")
10260 (description
10261 "This library validates email address syntax and deliverability.")
10262 (license license:cc0)))
10263
10264(define-public python2-email-validator
10265 (package-with-python2 python-email-validator))
10266
10267(define-public python-ukpostcodeparser
10268 (package
10269 (name "python-ukpostcodeparser")
10270 (version "1.0.3")
10271 (source (origin
10272 (method url-fetch)
10273 (uri (pypi-uri "UkPostcodeParser" version))
10274 (sha256
10275 (base32
10276 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10277 (build-system python-build-system)
10278 (home-page "https://github.com/hamstah/ukpostcodeparser")
10279 (synopsis "UK Postcode parser for Python")
10280 (description
10281 "This library provides the @code{parse_uk_postcode} function for
10282parsing UK postcodes.")
10283 (license license:expat)))
10284
10285(define-public python2-ukpostcodeparser
10286 (package-with-python2 python-ukpostcodeparser))
10287
10288(define-public python-faker
10289 (package
10290 (name "python-faker")
10291 (version "0.7.9")
10292 (source (origin
10293 (method url-fetch)
10294 (uri (pypi-uri "Faker" version))
10295 (sha256
10296 (base32
10297 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
10298 (patches
10299 (search-patches "python-faker-fix-build-32bit.patch"))
10300 (modules '((guix build utils)))
10301 (snippet
10302 '(begin
10303 (for-each delete-file (find-files "." "\\.pyc$"))
10304 #t))))
10305 (build-system python-build-system)
10306 (arguments
10307 '(#:phases
10308 (modify-phases %standard-phases
10309 (replace 'check
49ff8827 10310 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
44d10b1f
RW
10311 (native-inputs
10312 `(;; For testing
10313 ("python-email-validator" ,python-email-validator)
10314 ("python-mock" ,python-mock)
10315 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
10316 (propagated-inputs
10317 `(("python-dateutil" ,python-dateutil)
10318 ("python-six" ,python-six)))
10319 (home-page "https://github.com/joke2k/faker")
10320 (synopsis "Python package that generates fake data")
10321 (description
10322 "Faker is a Python package that generates fake data such as names,
10323addresses, and phone numbers.")
10324 (license license:expat)
10325 (properties `((python2-variant . ,(delay python2-faker))))))
10326
10327(define-public python2-faker
10328 (let ((base (package-with-python2 (strip-python2-variant
10329 python-faker))))
10330 (package
10331 (inherit base)
10332 (propagated-inputs
10333 `(("python2-ipaddress" ,python2-ipaddress)
10334 ,@(package-propagated-inputs base))))))
10335
10336(define-public python-pyaml
10337 (package
10338 (name "python-pyaml")
10339 (version "18.11.0")
10340 (source (origin
10341 (method url-fetch)
10342 (uri (pypi-uri "pyaml" version))
10343 (sha256
10344 (base32
10345 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
10346 (build-system python-build-system)
10347 (native-inputs
10348 `(("python-unidecode" ,python-unidecode)))
10349 (propagated-inputs
10350 `(("python-pyyaml" ,python-pyyaml)))
10351 (home-page "https://github.com/mk-fg/pretty-yaml")
10352 (synopsis "YAML pretty-print library for Python")
10353 (description
10354 "pyaml is a PyYAML based python module to produce pretty and readable
10355YAML-serialized data.")
492e3a7a 10356 (license license:wtfpl2)))
44d10b1f
RW
10357
10358(define-public python2-pyaml
10359 (package-with-python2 python-pyaml))
10360
10361(define-public python-backpack
10362 (package
10363 (name "python-backpack")
10364 (version "0.1")
10365 (source
10366 (origin
10367 (method url-fetch)
10368 (uri (pypi-uri "backpack" version))
10369 (sha256
10370 (base32
10371 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
10372 (build-system python-build-system)
10373 (native-inputs
10374 `(("python-pytest" ,python-pytest)
10375 ("python-nose" ,python-nose)))
10376 (propagated-inputs
10377 `(("python-simplejson" ,python-simplejson)))
10378 (home-page "https://github.com/sdispater/backpack")
10379 (synopsis "Utilities for working with Python collections")
10380 (description "Backpack provides some useful utilities for working with
10381collections of data.")
10382 (license license:expat)))
10383
10384(define-public python2-backpack
10385 (package-with-python2 python-backpack))
10386
10387(define-public python-prompt-toolkit
10388 (package
10389 (name "python-prompt-toolkit")
10390 (version "2.0.7")
10391 (source
10392 (origin
10393 (method url-fetch)
10394 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10395 (sha256
10396 (base32
10397 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
10398 (build-system python-build-system)
10399 (arguments
10400 `(#:phases
10401 (modify-phases %standard-phases
10402 (delete 'check)
10403 (add-after 'install 'post-install-check
10404 (lambda* (#:key inputs outputs #:allow-other-keys)
10405 ;; HOME is needed for the test
10406 ;; "test_pathcompleter_can_expanduser".
10407 (setenv "HOME" "/tmp")
10408 (add-installed-pythonpath inputs outputs)
10409 (invoke "py.test"))))))
10410 (propagated-inputs
10411 `(("python-wcwidth" ,python-wcwidth)
10412 ("python-six" ,python-six)
10413 ("python-pygments" ,python-pygments)))
10414 (native-inputs
10415 `(("python-pytest" ,python-pytest)))
10416 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10417 (synopsis "Library for building command line interfaces in Python")
10418 (description
10419 "Prompt-Toolkit is a library for building interactive command line
10420interfaces in Python. It's like GNU Readline but it also features syntax
10421highlighting while typing, out-of-the-box multi-line input editing, advanced
10422code completion, incremental search, support for Chinese double-width
10423characters, mouse support, and auto suggestions.")
10424 (license license:bsd-3)))
10425
10426(define-public python2-prompt-toolkit
10427 (package-with-python2 python-prompt-toolkit))
10428
10429(define-public python-prompt-toolkit-1
10430 (package (inherit python-prompt-toolkit)
10431 (version "1.0.15")
10432 (source
10433 (origin
10434 (method url-fetch)
10435 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10436 (sha256
10437 (base32
10438 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
10439
10440(define-public python2-prompt-toolkit-1
10441 (package-with-python2 python-prompt-toolkit-1))
10442
10443(define-public python-jedi
10444 (package
10445 (name "python-jedi")
b8e5de56 10446 (version "0.13.3")
44d10b1f
RW
10447 (source
10448 (origin
10449 (method url-fetch)
10450 (uri (pypi-uri "jedi" version))
10451 (sha256
10452 (base32
b8e5de56 10453 "0nsrjlb57njqppxmi8wjsb1dkad7qa7svx67jbkhixq66lz61c1b"))))
44d10b1f
RW
10454 (build-system python-build-system)
10455 (arguments
b8e5de56 10456 `( ;; Many tests are failing with Python 3.7.x as of version 0.13.3 (see:
44d10b1f
RW
10457 ;; https://github.com/davidhalter/jedi/issues/1263)
10458 #:tests? #f
10459 #:phases
10460 (modify-phases %standard-phases
10461 (replace 'check
10462 (lambda* (#:key tests? #:allow-other-keys)
10463 (when tests?
10464 (invoke "py.test" "-vv")))))))
10465 (native-inputs
10466 `(("python-pytest" ,python-pytest)
10467 ("python-docopt" ,python-docopt)))
10468 (propagated-inputs
10469 `(("python-parso" ,python-parso)))
10470 (home-page "https://github.com/davidhalter/jedi")
10471 (synopsis "Autocompletion and static analysis library for Python")
10472 (description
10473 "Jedi is a static analysis tool for Python that can be used in Integrated
10474Development Environments (@dfn{IDE}s) and text editors. It understands Python
10475on a deeper level than many other static analysis frameworks for Python.
10476
10477Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
10478well.")
10479 (license license:expat)))
10480
10481(define-public python2-jedi
b8e5de56
MC
10482 (let ((base (package-with-python2 (strip-python2-variant python-jedi))))
10483 (package
10484 (inherit base)
10485 (arguments (substitute-keyword-arguments (package-arguments base)
10486 ((#:tests? _) #t))))))
44d10b1f
RW
10487
10488(define-public ptpython
10489 (package
10490 (name "ptpython")
10491 (version "0.34")
10492 (source (origin
10493 (method url-fetch)
10494 (uri (pypi-uri "ptpython" version))
10495 (sha256
10496 (base32
10497 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10498 (build-system python-build-system)
10499 (arguments
10500 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
10501 (propagated-inputs
10502 `(("python-docopt" ,python-docopt)
10503 ("python-jedi" ,python-jedi)
10504 ("python-prompt-toolkit" ,python-prompt-toolkit)
10505 ("python-pygments" ,python-pygments)))
10506 (home-page "https://github.com/jonathanslenders/ptpython")
10507 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10508 (description
10509 "ptpython is a Python read-eval-print loop with IDE-like features.
10510It supports syntax highlighting, multiline editing, autocompletion, mouse,
10511color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10512etc.")
10513 (license license:bsd-3)
10514 (properties `((python2-variant . ,(delay ptpython-2))))))
10515
10516(define-public ptpython-2
10517 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10518 (package
10519 (inherit base)
10520 (name "ptpython2"))))
10521
10522(define-public python-stem
10523 (package
10524 (name "python-stem")
e746d1c3 10525 (version "1.7.1")
44d10b1f
RW
10526 (source
10527 (origin
10528 (method url-fetch)
10529 (uri (pypi-uri "stem" version))
10530 (sha256
10531 (base32
e746d1c3 10532 "18lc95pmc7i089nlsb06dsxyjl5wbhxfqgdxbjcia35ndh8z7sn9"))))
44d10b1f
RW
10533 (build-system python-build-system)
10534 (arguments
10535 `(#:phases
10536 (modify-phases %standard-phases
10537 (replace 'check
10538 (lambda _
10539 (invoke "./run_tests.py" "--unit")
10540 #t)))))
10541 (native-inputs
10542 `(("python-mock" ,python-mock)
10543 ("python-pycodestyle" ,python-pycodestyle)
10544 ("python-pyflakes" ,python-pyflakes)))
10545 (home-page "https://stem.torproject.org/")
10546 (synopsis
10547 "Python controller library that allows applications to interact with Tor")
10548 (description
10549 "Stem is a Python controller library for Tor. With it you can use Tor's
10550control protocol to script against the Tor process and read descriptor data
10551relays publish about themselves.")
10552 (license license:lgpl3)))
10553
10554(define-public python2-stem
10555 (package-with-python2 python-stem))
10556
10557(define-public python-pyserial
10558 (package
10559 (name "python-pyserial")
10560 (version "3.1.1")
10561 (source
10562 (origin
10563 (method url-fetch)
10564 (uri (pypi-uri "pyserial" version))
10565 (sha256
10566 (base32
10567 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
10568 (build-system python-build-system)
10569 (arguments
10570 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
10571 ;; #:phases
10572 ;; (modify-phases %standard-phases
10573 ;; (replace 'check
10574 ;; (lambda _
10575 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
10576 (home-page
10577 "https://github.com/pyserial/pyserial")
10578 (synopsis "Python Serial Port Bindings")
10579 (description "@code{pyserial} provide serial port bindings for Python. It
10580supports different byte sizes, stop bits, parity and flow control with RTS/CTS
10581and/or Xon/Xoff. The port is accessed in RAW mode.")
10582 (license license:bsd-3)))
10583
10584(define-public python2-pyserial
10585 (package-with-python2 python-pyserial))
10586
10587(define-public python-kivy
10588 (package
10589 (name "python-kivy")
10590 (version "1.10.1")
10591 (source
10592 (origin
10593 (method url-fetch)
10594 (uri (pypi-uri "Kivy" version))
10595 (file-name (string-append name "-" version ".tar.gz"))
10596 (sha256
10597 (base32
10598 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
10599 (build-system python-build-system)
10600 (arguments
10601 `(#:tests? #f ; Tests require many optional packages
10602 #:phases
10603 (modify-phases %standard-phases
10604 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
10605 (lambda* (#:key inputs #:allow-other-keys)
10606 (setenv "KIVY_SDL2_PATH"
10607 (string-append (assoc-ref inputs "sdl-union")
10608 "/include/SDL2"))
10609 #t)))))
10610 (native-inputs
10611 `(("git" ,git)
10612 ("pkg-config" ,pkg-config)
10613 ("python-cython" ,python-cython)))
10614 (inputs
10615 `(("gstreamer" ,gstreamer)
10616 ("mesa" ,mesa)
10617 ("sdl-union"
10618 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
10619 (home-page "http://kivy.org")
10620 (synopsis
10621 "Multitouch application framework")
10622 (description
10623 "A software library for rapid development of
10624hardware-accelerated multitouch applications.")
10625 (license license:expat)))
10626
10627(define-public python2-kivy
10628 (package-with-python2 python-kivy))
10629
10630(define-public python-kivy-next
10631 (deprecated-package "python-kivy-next" python-kivy))
10632
10633(define-public python2-kivy-next
10634 (deprecated-package "python2-kivy-next" python2-kivy))
10635
10636(define-public python-binaryornot
10637 (package
10638 (name "python-binaryornot")
10639 (version "0.4.4")
10640 (source (origin
10641 (method url-fetch)
10642 (uri (pypi-uri "binaryornot" version))
10643 (sha256
10644 (base32
10645 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
10646 (build-system python-build-system)
10647 (propagated-inputs
10648 `(("python-chardet" ,python-chardet)
10649 ("python-hypothesis" ,python-hypothesis)))
10650 (home-page "https://github.com/audreyr/binaryornot")
10651 (synopsis "Package to check if a file is binary or text")
10652 (description "Ultra-lightweight pure Python package to check if a file is
10653binary or text.")
10654 (license license:bsd-3)
10655 (properties `((python2-variant . ,(delay python2-binaryornot))))))
10656
10657(define-public python2-binaryornot
10658 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
10659 (package (inherit base)
10660 (propagated-inputs
10661 `(("python2-enum34" ,python2-enum34)
10662 ,@(package-propagated-inputs base))))))
10663
10664(define-public python-nltk
10665 (package
10666 (name "python-nltk")
10667 (version "3.2.1")
10668 (source (origin
10669 (method url-fetch)
10670 (uri (pypi-uri "nltk" version))
10671 (sha256
10672 (base32
10673 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
10674 (build-system python-build-system)
10675 (arguments
10676 '(;; The tests require some extra resources to be downloaded.
10677 ;; TODO Try packaging these resources.
10678 #:tests? #f))
10679 (home-page "http://nltk.org/")
10680 (synopsis "Natural Language Toolkit")
10681 (description "It provides interfaces to over 50 corpora and lexical
10682resources such as WordNet, along with a suite of text processing libraries
10683for classification, tokenization, stemming, tagging, parsing, and semantic
10684reasoning, wrappers for natural language processing libraries.")
10685 (license license:asl2.0)))
10686
10687(define-public python2-nltk
10688 (package-with-python2 python-nltk))
10689
10690(define-public python-pymongo
10691 (package
10692 (name "python-pymongo")
10693 (version "3.7.2")
10694 (source (origin
10695 (method url-fetch)
10696 (uri (pypi-uri "pymongo" version))
10697 (sha256
10698 (base32
10699 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
10700 (build-system python-build-system)
10701 (propagated-inputs
10702 `(("python-certifi" ,python-certifi)))
10703 (home-page "https://github.com/mongodb/mongo-python-driver")
10704 (synopsis "Python driver for MongoDB")
10705 (description "Python driver for MongoDB.")
10706 (license license:asl2.0)))
10707
10708(define-public python2-pymongo
10709 (package-with-python2 python-pymongo))
10710
44d10b1f
RW
10711(define-public python-consul
10712 (package
10713 (name "python-consul")
10714 (version "0.6.1")
10715 (source
10716 (origin
10717 (method url-fetch)
10718 (uri (pypi-uri "python-consul" version))
10719 (sha256
10720 (base32
10721 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
10722 (build-system python-build-system)
10723 (arguments
10724 '(#:tests? #f)) ; The tests are not distributed
10725 (propagated-inputs
10726 `(("python-requests" ,python-requests)
10727 ("python-six" ,python-six)))
10728 (home-page "https://github.com/cablehead/python-consul")
10729 (synopsis "Python client for Consul")
10730 (description
10731 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
10732discovery, monitoring and configuration.")
10733 (license license:expat)))
10734
10735(define-public python2-consul
10736 (package-with-python2 python-consul))
10737
10738(define-public python-schematics
10739 (package
10740 (name "python-schematics")
10741 (version "1.1.1")
10742 (source
1961d187
TGR
10743 (origin
10744 (method git-fetch)
10745 (uri (git-reference
10746 (url "https://github.com/schematics/schematics.git")
10747 (commit (string-append "v" version))))
10748 (file-name (git-file-name name version))
10749 (sha256
10750 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
44d10b1f
RW
10751 (build-system python-build-system)
10752 (propagated-inputs
10753 `(("python-six" ,python-six)))
10754 (arguments
1961d187
TGR
10755 ;; The tests require a bunch of not very nice packages with fixed
10756 ;; version requirements (e.g. python-coveralls).
10757 `(#:tests? #f))
44d10b1f
RW
10758 (home-page "https://github.com/schematics/schematics")
10759 (synopsis "Python Data Structures for Humans")
10760 (description "Python Data Structures for Humans.")
10761 (license license:bsd-3)))
10762
10763(define-public python2-schematics
10764 (package-with-python2 python-schematics))
10765
10766(define-public python-odfpy
10767 (package
10768 (name "python-odfpy")
10769 (version "1.3.3")
10770 (source (origin
10771 (method url-fetch)
10772 (uri (pypi-uri "odfpy" version))
10773 (sha256
10774 (base32
10775 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
10776 (arguments
10777 `(#:modules ((srfi srfi-1)
10778 (guix build python-build-system)
10779 (guix build utils))
10780 #:phases
10781 (modify-phases %standard-phases
10782 (replace 'check
10783 ;; The test runner invokes python2 and python3 for test*.py.
10784 ;; To avoid having both in inputs, we replicate it here.
10785 (lambda _
21ccc01d
RW
10786 (for-each (lambda (test-file) (invoke "python" test-file))
10787 (find-files "tests" "^test.*\\.py$"))
10788 #t)))))
44d10b1f
RW
10789 (build-system python-build-system)
10790 (home-page "https://github.com/eea/odfpy")
10791 (synopsis "Python API and tools to manipulate OpenDocument files")
10792 (description "Collection of libraries and utility programs written in
10793Python to manipulate OpenDocument 1.2 files.")
10794 (license
10795 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
10796 ;; number of files with other licenses.
10797 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
10798
10799(define-public python2-odfpy
10800 (package-with-python2 python-odfpy))
10801
10802(define-public python-natsort
10803 (package
10804 (name "python-natsort")
10805 (version "5.4.1")
10806 (source (origin
10807 (method url-fetch)
10808 (uri (pypi-uri "natsort" version))
10809 (sha256
10810 (base32
10811 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
10812 (build-system python-build-system)
10813 (arguments
10814 `(#:modules ((guix build utils)
10815 (guix build python-build-system)
10816 (srfi srfi-1)
10817 (srfi srfi-26)
10818 (ice-9 ftw))
10819 #:phases
10820 (modify-phases %standard-phases
10821 (add-before 'check 'set-cachedir
10822 ;; Tests require write access to $HOME by default
10823 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
10824 (replace 'check
10825 (lambda _
10826 (let ((cwd (getcwd)))
10827 (setenv "PYTHONPATH"
10828 (string-append
10829 cwd "/build/"
10830 (find (cut string-prefix? "lib" <>)
10831 (scandir (string-append cwd "/build")))
10832 ":"
10833 (getenv "PYTHONPATH")))
10834 (invoke "pytest" "-v")))))))
10835 (native-inputs
10836 `(("python-hypothesis" ,python-hypothesis)
10837 ("python-pytest-cov" ,python-pytest-cov)
10838 ("python-pytest-mock" ,python-pytest-mock)
10839 ("python-pytest" ,python-pytest)))
10840 (propagated-inputs ; TODO: Add python-fastnumbers.
10841 `(("python-pyicu" ,python-pyicu)))
10842 (home-page "https://github.com/SethMMorton/natsort")
10843 (synopsis "Natural sorting for python and shell")
10844 (description
10845 "Natsort lets you apply natural sorting on lists instead of
10846lexicographical. If you use the built-in @code{sorted} method in python
36a4366d
EF
10847on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
10848@code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
10849@code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
10850identifies numbers and sorts them separately from strings. It can also sort
10851version numbers, real numbers, mixed types and more, and comes with a shell
10852command @command{natsort} that exposes this functionality in the command line.")
44d10b1f
RW
10853 (license license:expat)
10854 (properties `((python2-variant . ,(delay python2-natsort))))))
10855
10856(define-public python2-natsort
10857 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
10858 (package (inherit base)
10859 (native-inputs
10860 `(("python2-pathlib" ,python2-pathlib)
10861 ,@(package-native-inputs base))))))
10862
10863(define-public python-glances
10864 (package
10865 (name "python-glances")
10866 (version "3.0.2")
10867 (source
10868 (origin
10869 (method url-fetch)
10870 (uri (pypi-uri "Glances" version))
10871 (sha256
10872 (base32
10873 "09fxysfp1n16csqvzvawy74qm6a94nvwjf3vcf5gkqp4i6k4vjjy"))))
10874 (build-system python-build-system)
10875 (propagated-inputs
10876 `(("python-psutil" ,python-psutil)))
10877 (home-page
10878 "https://github.com/nicolargo/glances")
10879 (synopsis
10880 "A cross-platform curses-based monitoring tool")
10881 (description
10882 "Glances is a curses-based monitoring tool for a wide variety of platforms.
10883Glances uses the PsUtil library to get information from your system. It monitors
10884CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
10885 (license license:lgpl3+)))
10886
10887(define-public python2-glances
10888 (package-with-python2 python-glances))
10889
10890(define-public python-graphql-core
10891 (package
10892 (name "python-graphql-core")
10893 (version "0.5.3")
10894 (source
10895 (origin
10896 (method url-fetch)
10897 (uri (pypi-uri "graphql-core" version))
10898 (sha256
10899 (base32
10900 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
10901 (build-system python-build-system)
10902 (arguments
10903 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
10904 #:phases
10905 (modify-phases %standard-phases
10906 (add-after 'unpack 'patch-hardcoded-version
10907 (lambda _ (substitute*
10908 "setup.py"
10909 (("'gevent==1.1rc1'") "'gevent'"))
10910 #t)))))
10911 (native-inputs
10912 `(("python-gevent" ,python-gevent)
10913 ("python-mock" ,python-mock)
10914 ("python-pytest-mock" ,python-pytest-mock)))
10915 (propagated-inputs
10916 `(("python-promise" ,python-promise)
10917 ("python-six" ,python-six)))
10918 (home-page "https://github.com/graphql-python/graphql-core")
10919 (synopsis "GraphQL implementation for Python")
10920 (description
10921 "GraphQL implementation for Python. GraphQL is a data query language and
10922runtime designed and used to request and deliver data to mobile and web apps.
10923This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
10924to Python.")
10925 (license license:expat)))
10926
10927(define-public python2-graphql-core
10928 (package-with-python2 python-graphql-core))
10929
10930(define-public python-graphql-relay
10931 (package
10932 (name "python-graphql-relay")
10933 (version "0.4.5")
10934 (source
10935 (origin
10936 (method url-fetch)
10937 (uri (pypi-uri "graphql-relay" version))
10938 (sha256
10939 (base32
10940 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
10941 (build-system python-build-system)
10942 (arguments
10943 '(#:tests? #f)) ; The tests are not distributed
10944 (propagated-inputs
10945 `(("python-graphql-core" ,python-graphql-core)
10946 ("python-promise" ,python-promise)
10947 ("python-six" ,python-six)))
10948 (home-page "https://github.com/graphql-python/graphql-relay-py")
10949 (synopsis "Relay implementation for Python")
10950 (description
10951 "This is a library to allow the easy creation of Relay-compliant servers
10952using the GraphQL Python reference implementation of a GraphQL server. It
10953should be noted that the code is a exact port of the original
10954@url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
10955from Facebook.")
10956 (license license:expat)))
10957
10958(define-public python2-graphql-relay
10959 (package-with-python2 python-graphql-relay))
10960
10961(define-public python-graphene
10962 (package
10963 (name "python-graphene")
10964 (version "0.10.2")
10965 (source
10966 (origin
10967 (method url-fetch)
10968 (uri (pypi-uri "graphene" version))
10969 (sha256
10970 (base32
10971 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
10972 (build-system python-build-system)
10973 (propagated-inputs
10974 `(("python-graphql-core" ,python-graphql-core)
10975 ("python-graphql-relay" ,python-graphql-relay)
10976 ("python-iso8601" ,python-iso8601)
10977 ("python-promise" ,python-promise)
10978 ("python-six" ,python-six)))
10979 (arguments
10980 `(#:tests? #f)) ; no tests/ in the PyPI tarball
10981 (home-page "http://graphene-python.org/")
10982 (synopsis "GraphQL Framework for Python")
10983 (description
10984 "Graphene is a Python library for building GraphQL schemas/types.
10985A GraphQL schema describes your data model, and provides a GraphQL server
10986with an associated set of resolve methods that know how to fetch data.")
10987 (properties `((python2-variant . ,(delay python2-graphene))))
10988 (license license:expat)))
10989
10990(define-public python2-graphene
10991 (let ((base (package-with-python2
10992 (strip-python2-variant python-graphene))))
10993 (package (inherit base)
10994 (native-inputs
10995 `(("python2-sqlalchemy" ,python2-sqlalchemy)
10996 ,@(package-native-inputs base))))))
10997
10998(define-public python-nautilus
10999 (package
11000 (name "python-nautilus")
11001 (version "0.4.9")
11002 (source
11003 (origin
11004 (method url-fetch)
11005 (uri (pypi-uri "nautilus" version))
11006 (sha256
11007 (base32
11008 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11009 (build-system python-build-system)
11010 (arguments `(#:tests? #f)) ; fails to import test modules
11011 (propagated-inputs
11012 `(("python-bcrypt" ,python-bcrypt)
11013 ("python-click" ,python-click)
11014 ("python-consul" ,python-consul)
11015 ("python-graphene" ,python-graphene)
11016 ("python-jinja2" ,python-jinja2)
11017 ("python-peewee" ,python-peewee)
11018 ("python-pika" ,python-pika)
11019 ("python-tornado" ,python-tornado)
11020 ("python-wtforms" ,python-wtforms)))
11021 (native-inputs
11022 `(("python-nose2" ,python-nose2)))
11023 (home-page "https://github.com/AlecAivazis/nautilus")
11024 (synopsis "Library for creating microservice applications")
11025 (description
11026 "Nautilus is a framework for flux based microservices that looks to
11027provide extendible implementations of common aspects of a cloud so that you can
11028focus on building massively scalable web applications.")
11029 (license license:expat)))
11030
11031(define-public python-snowballstemmer
11032 (package
11033 (name "python-snowballstemmer")
11034 (version "1.2.1")
11035 (source (origin
11036 (method url-fetch)
11037 (uri (pypi-uri "snowballstemmer" version))
11038 (sha256
11039 (base32
11040 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
11041 (build-system python-build-system)
11042 (arguments
11043 `(;; No tests exist
11044 #:tests? #f))
11045 (home-page "https://github.com/shibukawa/snowball_py")
11046 (synopsis "Snowball stemming library collection for Python")
11047 (description "This package provides 16 word stemmer algorithms generated
11048from Snowball algorithms. It includes the 15 original ones plus the Poerter
11049English stemmer.")
11050 (license license:bsd-3)))
11051
11052(define-public python2-snowballstemmer
11053 (package-with-python2 python-snowballstemmer))
11054
44d10b1f
RW
11055(define-public python-setproctitle
11056(package
11057 (name "python-setproctitle")
11058 (version "1.1.10")
11059 (source
11060 (origin
11061 (method url-fetch)
11062 (uri (pypi-uri "setproctitle" version))
11063 (sha256
11064 (base32
11065 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11066 (build-system python-build-system)
11067 (arguments
11068 '(#:phases
11069 (modify-phases %standard-phases
11070 (add-before 'check 'patch-Makefile
11071 ;; Stricly this is only required for the python2 variant.
11072 ;; But adding a phase in an inherited package seems to be
11073 ;; cumbersum. So we patch even for python3.
11074 (lambda _
11075 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11076 (when nose
11077 (substitute* "Makefile"
11078 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11079 (string-append nose "/bin/nosetests "))))
11080 #t)))
11081 (replace 'check
11082 (lambda _
11083 (setenv "PYTHON" (or (which "python3") (which "python")))
11084 (setenv "PYCONFIG" (or (which "python3-config")
11085 (which "python-config")))
11086 (setenv "CC" "gcc")
11087 ;; No need to extend PYTHONPATH to find the built package, since
11088 ;; the Makefile will build anyway
11089 (invoke "make" "check"))))))
11090 (native-inputs
11091 `(("procps" ,procps))) ; required for tests
11092 (home-page
11093 "https://github.com/dvarrazzo/py-setproctitle")
11094 (synopsis
11095 "Setproctitle implementation for Python to customize the process title")
11096 (description "The library allows a process to change its title (as displayed
11097by system tools such as ps and top).
11098
11099Changing the title is mostly useful in multi-process systems, for
11100example when a master process is forked: changing the children's title
11101allows to identify the task each process is busy with. The technique
11102is used by PostgreSQL and the OpenSSH Server for example.")
11103 (license license:bsd-3)
11104 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11105
11106(define-public python2-setproctitle
11107 (let ((base (package-with-python2
11108 (strip-python2-variant python-setproctitle))))
11109 (package
11110 (inherit base)
11111 (native-inputs `(("python2-nose" ,python2-nose)
11112 ,@(package-native-inputs base))))))
11113
11114(define-public python-validictory
11115 (package
11116 (name "python-validictory")
11117 (version "1.0.1")
11118 (source
11119 (origin
11120 (method url-fetch)
11121 (uri (pypi-uri "validictory" version))
11122 (sha256
11123 (base32
11124 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11125 (build-system python-build-system)
11126 (arguments
11127 '(#:phases
11128 (modify-phases %standard-phases
11129 (add-after 'unpack 'bootstrap
11130 ;; Move the tests out of the package directory to avoid
11131 ;; packaging them.
11132 (lambda* _
11133 (rename-file "validictory/tests" "tests")
11134 (delete-file "tests/__init__.py")))
11135 (replace 'check
11136 (lambda _
11137 ;; Extend PYTHONPATH so the built package will be found.
11138 (setenv "PYTHONPATH"
11139 (string-append (getcwd) "/build/lib:"
11140 (getenv "PYTHONPATH")))
6568bd5d 11141 (invoke "py.test" "-vv" ))))))
44d10b1f
RW
11142 (native-inputs
11143 `(("python-pytest" ,python-pytest)))
11144 (home-page
11145 "https://github.com/jamesturk/validictory")
11146 (synopsis "General purpose Python data validator")
11147 (description "It allows validation of arbitrary Python data structures.
11148
11149The schema format is based on the JSON Schema
11150proposal (http://json-schema.org), so combined with json the library is also
11151useful as a validator for JSON data.")
11152 (license license:expat)))
11153
11154(define-public python2-validictory
11155 (package-with-python2 python-validictory))
11156
11157(define-public python-pyelftools
11158 (package
11159 (name "python-pyelftools")
11160 (version "0.25")
11161 (source
11162 (origin
11163 (method url-fetch)
11164 (uri (pypi-uri "pyelftools" version))
11165 (sha256
11166 (base32
11167 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
11168 (build-system python-build-system)
11169 (arguments
11170 `(#:phases
11171 (modify-phases %standard-phases
11172 (add-before 'check 'set-pythonpath
11173 (lambda _
11174 (setenv "PYTHONPATH"
11175 (string-append
11176 (getcwd) "/test/"
11177 ":" (getenv "PYTHONPATH")))
11178 #t)))))
11179 (home-page
11180 "https://github.com/eliben/pyelftools")
11181 (synopsis
11182 "Analyze binary and library file information")
11183 (description "This Python library provides interfaces for parsing and
11184analyzing two binary and library file formats; the Executable and Linking
11185Format (ELF), and debugging information in the Debugging With Attributed
11186Record Format (DWARF).")
11187 (license license:public-domain)))
11188
11189(define-public python-pyev
11190 (package
11191 (name "python-pyev")
11192 (version "0.9.0")
11193 (source
11194 (origin
11195 (method url-fetch)
11196 (uri (pypi-uri "pyev" version))
11197 (sha256
11198 (base32
11199 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11200 (build-system python-build-system)
11201 (arguments
11202 `(#:tests? #f ; no test suite
11203 #:phases
11204 (modify-phases %standard-phases
11205 (add-after 'unpack 'patch
11206 (lambda* (#:key inputs #:allow-other-keys)
11207 (let ((libev (string-append (assoc-ref inputs "libev")
11208 "/lib/libev.so.4")))
11209 (substitute* "setup.py"
11210 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
11211 (string-append "libev_dll_name = \"" libev "\"")))))))))
11212 (inputs
11213 `(("libev" ,libev)))
11214 (home-page "http://pythonhosted.org/pyev/")
11215 (synopsis "Python libev interface")
11216 (description "Pyev provides a Python interface to libev.")
11217 (license license:gpl3)))
11218
11219(define-public python2-pyev
11220 (package-with-python2 python-pyev))
11221
11222(define-public python-imagesize
11223 (package
11224 (name "python-imagesize")
11225 (version "1.1.0")
11226 (source
11227 (origin
11228 (method url-fetch)
11229 (uri (pypi-uri "imagesize" version))
11230 (sha256
11231 (base32
11232 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
11233 (build-system python-build-system)
11234 (home-page "https://github.com/shibukawa/imagesize_py")
11235 (synopsis "Gets image size of files in various formats in Python")
11236 (description
11237 "This package allows determination of image size from
11238PNG, JPEG, JPEG2000 and GIF files in pure Python.")
11239 (license license:expat)))
11240
11241(define-public python2-imagesize
11242 (package-with-python2 python-imagesize))
11243
11244(define-public python-termstyle
11245 (package
11246 (name "python-termstyle")
11247 (version "0.1.11")
11248 (source
11249 (origin
11250 (method url-fetch)
11251 (uri (pypi-uri "termstyle" version))
11252 (sha256
11253 (base32
11254 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
11255 (build-system python-build-system)
11256 (arguments
11257 '(#:phases
11258 (modify-phases %standard-phases
11259 (replace 'check
11260 (lambda _
831080a6 11261 (invoke "python" "test3.py"))))))
44d10b1f
RW
11262 (home-page "https://github.com/gfxmonk/termstyle")
11263 (synopsis "Console text coloring for Python")
11264 (description "This package provides console text coloring for Python.")
11265 (license license:bsd-3)))
11266
11267(define-public python-argcomplete
11268 (package
11269 (name "python-argcomplete")
11270 (version "1.7.0")
11271 (source
11272 (origin
11273 (method url-fetch)
11274 (uri (pypi-uri "argcomplete" version))
11275 (sha256
11276 (base32
11277 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
11278 (build-system python-build-system)
11279 (native-inputs
11280 `(("python-pexpect" ,python-pexpect)
11281 ("tcsh" ,tcsh)
11282 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
11283 (home-page "https://github.com/kislyuk/argcomplete")
11284 (synopsis "Shell tab completion for Python argparse")
11285 (description "argcomplete provides extensible command line tab completion
11286of arguments and options for Python scripts using @code{argparse}. It's
11287particularly useful for programs with many options or sub-parsers that can
11288dynamically suggest completions; for example, when browsing resources over the
11289network.")
11290 (license license:asl2.0)))
11291
11292(define-public python2-argcomplete
11293 (package-with-python2 python-argcomplete))
11294
11295(define-public python-xopen
11296 (package
11297 (name "python-xopen")
24d64989 11298 (version "0.5.0")
44d10b1f
RW
11299 (source
11300 (origin
11301 (method url-fetch)
11302 (uri (pypi-uri "xopen" version))
11303 (sha256
11304 (base32
24d64989 11305 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
44d10b1f 11306 (build-system python-build-system)
24d64989
RW
11307 (propagated-inputs
11308 `(("python-setuptools-scm" ,python-setuptools-scm)))
44d10b1f
RW
11309 (home-page "https://github.com/marcelm/xopen/")
11310 (synopsis "Open compressed files transparently")
11311 (description "This module provides an @code{xopen} function that works like
11312Python's built-in @code{open} function, but can also deal with compressed files.
11313Supported compression formats are gzip, bzip2 and, xz, and are automatically
11314recognized by their file extensions. The focus is on being as efficient as
11315possible on all supported Python versions.")
11316 (license license:expat)))
11317
11318(define-public python2-xopen
11319 (let ((base (package-with-python2
11320 (strip-python2-variant python-xopen))))
11321 (package
11322 (inherit base)
11323 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
11324 ,@(package-propagated-inputs base))))))
11325
11326(define-public python-cheetah
11327 (package
11328 (name "python-cheetah")
11329 (version "3.1.0")
11330 (source
11331 (origin
11332 (method url-fetch)
11333 (uri (pypi-uri "Cheetah3" version))
11334 (sha256
11335 (base32
11336 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
11337 (build-system python-build-system)
11338 (arguments
11339 `(#:modules ((guix build utils)
11340 (guix build python-build-system)
11341 (ice-9 ftw)
11342 (srfi srfi-1)
11343 (srfi srfi-26))
11344 #:phases (modify-phases %standard-phases
11345 (add-after 'unpack 'use-absolute-python
11346 (lambda _
11347 (substitute* "Cheetah/CheetahWrapper.py"
11348 (("#!/usr/bin/env python")
11349 (string-append "#!" (which "python"))))
11350 #t))
11351 (replace 'check
11352 (lambda _
11353 (let ((cwd (getcwd)))
11354 (setenv "PYTHONPATH"
11355 (string-append
11356 cwd "/build/"
11357 (find (cut string-prefix? "lib" <>)
11358 (scandir (string-append cwd "/build")))
11359 ":" (getenv "PYTHONPATH")))
11360 (setenv "PATH"
11361 (string-append (getenv "PATH")
11362 ":" cwd "/bin"))
11363 (setenv "TMPDIR" "/tmp")
11364
11365 (substitute* "Cheetah/Tests/Test.py"
11366 (("unittest.TextTestRunner\\(\\)")
11367 "unittest.TextTestRunner(verbosity=2)"))
11368
11369 (invoke "python" "Cheetah/Tests/Test.py")))))))
11370 (propagated-inputs
11371 `(("python-markdown" ,python-markdown))) ;optional
11372 (home-page "http://cheetahtemplate.org/")
11373 (synopsis "Template engine")
11374 (description "Cheetah is a text-based template engine and Python code
11375generator.
11376
11377Cheetah can be used as a standalone templating utility or referenced as
11378a library from other Python applications. It has many potential uses,
11379but web developers looking for a viable alternative to ASP, JSP, PHP and
11380PSP are expected to be its principle user group.
11381
11382Features:
11383@enumerate
11384@item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
11385 text-based format.
11386@item Cleanly separates content, graphic design, and program code.
11387@item Blends the power and flexibility of Python with a simple template language
11388 that non-programmers can understand.
11389@item Gives template writers full access to any Python data structure, module,
11390 function, object, or method in their templates.
11391@item Makes code reuse easy by providing an object-orientated interface to
11392 templates that is accessible from Python code or other Cheetah templates.
11393 One template can subclass another and selectively reimplement sections of it.
11394@item Provides a simple, yet powerful, caching mechanism that can dramatically
11395 improve the performance of a dynamic website.
11396@item Compiles templates into optimized, yet readable, Python code.
11397@end enumerate")
11398 (license (license:x11-style "file://LICENSE"))))
11399
11400(define-public python2-cheetah
11401 (package-with-python2 python-cheetah))
11402
11403(define-public python-dulwich
11404 (package
11405 (name "python-dulwich")
11406 (version "0.18.6")
11407 (source
11408 (origin
11409 (method url-fetch)
11410 (uri (list (string-append "https://www.dulwich.io/releases/"
11411 "dulwich-" version ".tar.gz")
11412 (pypi-uri "dulwich" version)))
11413 (sha256
11414 (base32
11415 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
11416 (build-system python-build-system)
11417 (arguments
11418 `(#:phases
11419 (modify-phases %standard-phases
11420 (add-before 'check 'fix-tests
11421 (lambda* (#:key inputs #:allow-other-keys)
11422 ;; The tests use Popen with a custom environment which doesn't
11423 ;; include PATH.
11424 (substitute* "dulwich/tests/compat/utils.py"
11425 (("'git'") (string-append "'"
11426 (which "git")
11427 "'")))
11428 (substitute* '("dulwich/tests/test_repository.py"
11429 "dulwich/tests/test_hooks.py")
11430 (("#!/bin/sh") (string-append "#!" (which "sh"))))
11431 (setenv "TEST_RUNNER" "unittest")
11432 (setenv "PYTHONHASHSEED" "random")
11433 #t)))))
11434 (propagated-inputs
11435 `(("python-fastimport" ,python-fastimport)))
11436 (native-inputs
11437 `(("python-mock" ,python-mock)
11438 ("python-geventhttpclient" ,python-geventhttpclient)
11439 ("git" ,git)))
11440 (home-page "https://www.dulwich.io/")
11441 (synopsis "Git implementation in Python")
11442 (description "Dulwich is an implementation of the Git file formats and
11443protocols written in pure Python.")
11444 ;; Can be used with either license.
11445 (license (list license:asl2.0 license:gpl2+))))
11446
11447(define-public python2-dulwich
11448 (package-with-python2 python-dulwich))
11449
11450(define-public python-pbkdf2
11451 (package
11452 (name "python-pbkdf2")
11453 (version "1.3")
11454 (source
11455 (origin
11456 (method url-fetch)
11457 (uri (pypi-uri "pbkdf2" version))
11458 (sha256
11459 (base32
11460 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
11461 (build-system python-build-system)
11462 (arguments
11463 '(#:phases
11464 (modify-phases %standard-phases
11465 (replace 'check
11466 (lambda _
11467 (setenv "PYTHONPATH"
11468 (string-append (getcwd) "/build/lib:"
11469 (getenv "PYTHONPATH")))
ee2bb944 11470 (invoke "python" "test/test_pbkdf2.py"))))))
44d10b1f
RW
11471 (propagated-inputs
11472 `(("python-pycrypto" ,python-pycrypto))) ; optional
11473 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
11474 (synopsis "Password-based key derivation")
11475 (description "This module implements the password-based key derivation
11476function, PBKDF2, specified in RSA PKCS#5 v2.0.
11477
11478PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
11479is part of the RSA Public Key Cryptography Standards series. The provided
11480implementation takes a password or a passphrase and a salt value (and
11481optionally a iteration count, a digest module, and a MAC module) and provides
11482a file-like object from which an arbitrarly-sized key can be read.")
11483 (license license:expat)))
11484
11485(define-public python2-pbkdf2
11486 (package-with-python2 python-pbkdf2))
11487
11488(define-public python-qrcode
11489 (package
11490 (name "python-qrcode")
217ea1a1 11491 (version "6.1")
44d10b1f
RW
11492 (source
11493 (origin
11494 (method url-fetch)
11495 (uri (pypi-uri "qrcode" version))
11496 (sha256
217ea1a1 11497 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
44d10b1f
RW
11498 (build-system python-build-system)
11499 (arguments
11500 ;; FIXME: Tests require packaging 'pymaging'.
11501 '(#:tests? #f))
11502 (propagated-inputs
11503 `(("python-lxml" ,python-lxml) ; for SVG output
11504 ("python-pillow" ,python-pillow) ; for PNG output
11505 ("python-six" ,python-six)))
44d10b1f
RW
11506 (home-page "https://github.com/lincolnloop/python-qrcode")
11507 (synopsis "QR Code image generator")
11508 (description "This package provides a pure Python QR Code generator
11509module. It uses the Python Imaging Library (PIL) to allow for the generation
11510of QR Codes.
11511
11512In addition this package provides a command line tool to generate QR codes and
11513either write these QR codes to a file or do the output as ascii art at the
11514console.")
11515 (license license:bsd-3)))
11516
11517(define-public python2-qrcode
11518 (package-with-python2 python-qrcode))
11519
11520(define-public python-rst2ansi
11521 (package
11522 (name "python-rst2ansi")
11523 (version "0.1.5")
11524 (source
11525 (origin
11526 (method url-fetch)
11527 (uri (pypi-uri "rst2ansi" version))
11528 (sha256
11529 (base32
11530 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
11531 (build-system python-build-system)
11532 (propagated-inputs
11533 `(("python-docutils" ,python-docutils)))
11534 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
11535 (synopsis "Convert RST to ANSI-decorated console output")
11536 (description
11537 "Python module dedicated to rendering RST (reStructuredText) documents
11538to ansi-escaped strings suitable for display in a terminal.")
11539 (license license:expat)))
11540
11541(define-public python-ansi2html
11542 (package
11543 (name "python-ansi2html")
11544 (version "1.2.0")
11545 (source
11546 (origin
11547 (method url-fetch)
11548 (uri (pypi-uri "ansi2html" version))
11549 (sha256
11550 (base32
11551 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
11552 (build-system python-build-system)
11553 (native-inputs
11554 `(("python-mock" ,python-mock)
11555 ("python-nose" ,python-nose)))
11556 (propagated-inputs
11557 `(("python-six" ,python-six)))
11558 (home-page "https://github.com/ralphbean/ansi2html")
11559 (synopsis "Convert ANSI-decorated console output to HTML")
11560 (description
11561 "@command{ansi2html} is a Python library and command line utility for
11562convering text with ANSI color codes to HTML or LaTeX.")
11563 (license license:gpl3+)))
11564
11565(define-public python2-ansi2html
11566 (package-with-python2 python-ansi2html))
11567
11568(define-public python-ddt
11569 (package
11570 (name "python-ddt")
11571 (version "1.1.3")
11572 (source
11573 (origin
11574 (method url-fetch)
11575 (uri (pypi-uri "ddt" version))
11576 (sha256
11577 (base32
11578 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
11579 (build-system python-build-system)
11580 (native-inputs
11581 `(("python-mock" ,python-mock)
11582 ("python-nose" ,python-nose)))
11583 (propagated-inputs
11584 `(("python-six" ,python-six)
11585 ("python-pyyaml" ,python-pyyaml)))
11586 (home-page "https://github.com/txels/ddt")
11587 (synopsis "Data-Driven Tests")
11588 (description
11589 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
11590running it with different test data, and make it appear as multiple test
11591cases.")
11592 (license license:expat)))
11593
11594(define-public python2-ddt
11595 (package-with-python2 python-ddt))
11596
11597(define-public python-pycountry
11598 (package
11599 (name "python-pycountry")
11600 (version "18.5.26")
11601 (source
11602 (origin
11603 (method url-fetch)
11604 (uri (pypi-uri "pycountry" version))
11605 (sha256
11606 (base32
11607 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
11608 (build-system python-build-system)
11609 (home-page "https://bitbucket.org/flyingcircus/pycountry")
11610 (synopsis "ISO databases for languages, countries, currencies, etc.")
11611 (description
11612 "@code{pycountry} provides the ISO databases for the standards:
11613@enumerate
11614@item 639-3 (Languages)
11615@item 3166 (Countries)
11616@item 3166-3 (Deleted Countries)
11617@item 3166-2 (Subdivisions of countries)
11618@item 4217 (Currencies)
11619@item 15924 (Scripts)
11620@end enumerate
11621It includes a copy from Debian’s pkg-isocodes and makes the data accessible
11622through a Python API.")
11623 (license license:lgpl2.1+)))
11624
11625(define-public python2-pycountry
11626 (package-with-python2 python-pycountry))
11627
11628(define-public python-pycosat
11629 (package
11630 (name "python-pycosat")
11631 (version "0.6.1")
11632 (source
11633 (origin
11634 (method url-fetch)
11635 (uri (pypi-uri "pycosat" version))
11636 (sha256
11637 (base32
11638 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
11639 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
11640 (build-system python-build-system)
11641 (home-page "https://github.com/ContinuumIO/pycosat")
11642 (synopsis "Bindings to picosat (a SAT solver)")
11643 (description
11644 "This package provides efficient Python bindings to @code{picosat} on
11645the C level. When importing pycosat, the @code{picosat} solver becomes part
11646of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
11647Problem} (SAT) solver.")
11648 (license license:expat)))
11649
11650(define-public python2-pycosat
11651 (package-with-python2 python-pycosat))
11652
11653(define-public python2-ruamel.ordereddict
11654 (package
11655 (name "python2-ruamel.ordereddict")
11656 (version "0.4.9")
11657 (source
11658 (origin
11659 (method url-fetch)
11660 (uri (pypi-uri "ruamel.ordereddict" version))
11661 (sha256
11662 (base32
11663 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
11664 (build-system python-build-system)
11665 (arguments
11666 `(#:python ,python-2
11667 #:phases
11668 (modify-phases %standard-phases
11669 (delete 'check)
11670 (add-after 'install 'check
11671 (lambda* (#:key inputs outputs #:allow-other-keys)
11672 (add-installed-pythonpath inputs outputs)
f987ac30 11673 (invoke "python" "test/testordereddict.py"))))))
44d10b1f
RW
11674 (home-page "https://bitbucket.org/ruamel/ordereddict")
11675 (synopsis "Version of dict that keeps keys in insertion order")
11676 (description
11677 "This is an implementation of an ordered dictionary with @dfn{Key
11678Insertion Order} (KIO: updates of values do not affect the position of the
11679key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
11680removed and put at the back). The standard library module @code{OrderedDict},
11681implemented later, implements a subset of @code{ordereddict} functionality.
11682Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
11683Order} (KSO, no sorting function can be specified, but a transform can be
11684specified to apply on the key before comparison (e.g. @code{string.lower})).")
11685 (license license:expat)))
11686
11687(define-public python-pypeg2
11688 (package
11689 (name "python-pypeg2")
11690 (version "2.15.2")
11691 (source
11692 (origin
11693 (method url-fetch)
11694 (uri (pypi-uri "pyPEG2" version))
11695 (sha256
11696 (base32
11697 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
11698 (build-system python-build-system)
11699 (propagated-inputs `(("python-lxml" ,python-lxml)))
11700 (arguments
11701 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
11702 '(#:tests? #f))
11703 (home-page "https://fdik.org/pyPEG/")
11704 (synopsis "Parsering Expression Grammars in Python")
11705 (description "PyPEG is an intrinsic parser interpreter framework for
11706Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
11707parse many formal languages.")
11708 (license license:gpl2)))
11709
11710(define-public python-incremental
11711 (package
11712 (name "python-incremental")
11713 (version "17.5.0")
11714 (source
11715 (origin
11716 (method url-fetch)
11717 (uri (pypi-uri "incremental" version))
11718 (sha256
11719 (base32
11720 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
11721 (build-system python-build-system)
11722 (home-page "https://github.com/hawkowl/incremental")
11723 (synopsis "Library for versioning Python projects")
11724 (description "Incremental is a small library that versions your Python
11725projects.")
11726 (license license:expat)))
11727
11728(define-public python2-incremental
11729 (package-with-python2 python-incremental))
11730
11731(define-public python-invoke
11732 (package
11733 (name "python-invoke")
11734 (home-page "http://www.pyinvoke.org/")
11735 (version "1.1.0")
11736 (source (origin
11737 (method url-fetch)
11738 (uri (pypi-uri "invoke" version))
11739 (sha256
11740 (base32
11741 "0aiy1xvk1f91246zxd1zqrm679vdvd10h843a2na41cqr3cflpi6"))))
11742 (build-system python-build-system)
11743 (arguments
11744 ;; XXX: Requires many dependencies that are not yet in Guix.
11745 `(#:tests? #f))
11746 (synopsis "Pythonic task execution")
11747 (description
11748 "Invoke is a Python task execution tool and library, drawing inspiration
11749from various sources to arrive at a powerful and clean feature set. It is
11750evolved from the Fabric project, but focuses on local and abstract concerns
11751instead of servers and network commands.")
11752 (license license:bsd-3)))
11753
11754(define-public python2-invoke
11755 (package-with-python2 python-invoke))
11756
11757(define-public python-automat
11758 (package
11759 (name "python-automat")
919d80a0 11760 (version "0.7.0")
44d10b1f
RW
11761 (source (origin
11762 (method url-fetch)
11763 (uri (pypi-uri "Automat" version))
11764 (sha256
11765 (base32
919d80a0 11766 "03ivg70n3b1cbcd2zvjhk8y4kmqxcvhmili39lmgx09dza1qpmyb"))))
44d10b1f
RW
11767 (build-system python-build-system)
11768 ;; We disable the tests because they require python-twisted, while
11769 ;; python-twisted depends on python-automat. Twisted is optional, but the
11770 ;; tests fail if it is not available. Also see
11771 ;; <https://github.com/glyph/automat/issues/71>.
11772 (arguments '(#:tests? #f))
11773 (native-inputs
11774 `(("python-m2r" ,python-m2r)
11775 ("python-setuptools-scm" ,python-setuptools-scm)
11776 ("python-graphviz" ,python-graphviz)))
11777 (propagated-inputs
11778 `(("python-six" ,python-six)
11779 ("python-attrs" ,python-attrs)))
11780 (home-page "https://github.com/glyph/Automat")
11781 (synopsis "Self-service finite-state machines")
11782 (description "Automat is a library for concise, idiomatic Python
11783expression of finite-state automata (particularly deterministic finite-state
11784transducers).")
11785 (license license:expat)))
11786
11787(define-public python2-automat
11788 (package-with-python2 python-automat))
11789
11790(define-public python-m2r
11791 (package
11792 (name "python-m2r")
bcfb8fac 11793 (version "0.2.1")
44d10b1f
RW
11794 (source (origin
11795 (method url-fetch)
11796 (uri (pypi-uri "m2r" version))
11797 (sha256
11798 (base32
bcfb8fac 11799 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
44d10b1f
RW
11800 (build-system python-build-system)
11801 (propagated-inputs
11802 `(("python-docutils" ,python-docutils)
11803 ("python-mistune" ,python-mistune)))
11804 (native-inputs
11805 `(("python-pygments" ,python-pygments)
11806 ("python-mock" ,python-mock)))
11807 (home-page "https://github.com/miyakogi/m2r")
11808 (synopsis "Markdown to reStructuredText converter")
11809 (description "M2R converts a markdown file including reST markups to valid
11810reST format.")
11811 (license license:expat)))
11812
11813(define-public python2-m2r
11814 (package-with-python2 python-m2r))
11815
11816(define-public python-constantly
11817 (package
11818 (name "python-constantly")
11819 (version "15.1.0")
11820 (source (origin
11821 (method url-fetch)
11822 (uri (pypi-uri "constantly" version))
11823 (sha256
11824 (base32
11825 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
11826 (build-system python-build-system)
11827 (home-page "https://github.com/twisted/constantly")
11828 (synopsis "Symbolic constants in Python")
11829 (description "Constantly is a Python library that provides symbolic
11830constant support. It includes collections and constants with text, numeric,
11831and bit flag values.")
11832 (license license:expat)))
11833
11834(define-public python2-constantly
11835 (package-with-python2 python-constantly))
11836
11837(define-public python-attrs
11838 (package
11839 (name "python-attrs")
67458e20 11840 (version "19.1.0")
44d10b1f
RW
11841 (source (origin
11842 (method url-fetch)
11843 (uri (pypi-uri "attrs" version))
11844 (sha256
11845 (base32
67458e20 11846 "16g33zr5f449lqc5wgvzpknxryfzrfsxcr6kpgxwn7l5fkv71f7h"))))
44d10b1f
RW
11847 (build-system python-build-system)
11848 (arguments
11849 `(#:modules ((guix build utils)
11850 (guix build python-build-system)
11851 (ice-9 ftw)
11852 (srfi srfi-1)
11853 (srfi srfi-26))
11854 #:phases (modify-phases %standard-phases
11855 (replace 'check
11856 (lambda _
11857 (let ((cwd (getcwd)))
11858 (setenv "PYTHONPATH"
11859 (string-append
11860 cwd "/build/"
11861 (find (cut string-prefix? "lib" <>)
11862 (scandir (string-append cwd "/build")))
11863 ":"
11864 (getenv "PYTHONPATH")))
11865 (invoke "python" "-m" "pytest")))))))
11866 (native-inputs
11867 `(("python-coverage" ,python-coverage)
11868 ("python-hypothesis" ,python-hypothesis)
11869 ("python-pympler" ,python-pympler)
11870 ("python-pytest" ,python-pytest)
11871 ("python-six" ,python-six)
11872 ("python-sphinx" ,python-sphinx)
11873 ("python-zope-interface" ,python-zope-interface)))
11874 (home-page "https://github.com/python-attrs/attrs/")
11875 (synopsis "Attributes without boilerplate")
11876 (description "@code{attrs} is a Python package with class decorators that
11877ease the chores of implementing the most common attribute-related object
11878protocols.")
11879 (license license:expat)))
11880
11881(define-public python2-attrs
11882 (package-with-python2 python-attrs))
11883
11884(define-public python-attrs-bootstrap
11885 (package
11886 (inherit python-attrs)
11887 (name "python-attrs-bootstrap")
11888 ;; Keep this on a fixed version so python-attrs can be updated without
11889 ;; triggering a mass-rebuild. FIXME: Update this in the next rebuild cycle.
11890 (version "17.4.0")
11891 (source (origin
11892 (method url-fetch)
11893 (uri (pypi-uri "attrs" version))
11894 (sha256
11895 (base32
11896 "1jafnn1kzd6qhxgprhx6y6ik1r5m2rilx25syzcmq03azp660y8w"))))
11897 (native-inputs `())
11898 (arguments `(#:tests? #f))))
11899
11900(define-public python2-attrs-bootstrap
11901 (package-with-python2 python-attrs-bootstrap))
11902
11903(define-public python2-cliapp
11904 (package
11905 (name "python2-cliapp")
9064b84e 11906 (version "1.20180812.1")
44d10b1f
RW
11907 (source
11908 (origin
11909 (method url-fetch)
11910 (uri (string-append
11911 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
11912 version ".tar.gz"))
11913 (sha256
11914 (base32
9064b84e 11915 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
44d10b1f
RW
11916 (build-system python-build-system)
11917 (arguments
11918 `(#:python ,python-2
11919 #:phases
11920 (modify-phases %standard-phases
11921 ;; check phase needs to be run before the build phase. If not,
11922 ;; coverage-test-runner looks for tests for the built source files,
11923 ;; and fails.
11924 (delete 'check)
11925 (add-before 'build 'check
11926 (lambda _
11927 ;; Disable python3 tests
11928 (substitute* "check"
11929 (("python3") "# python3"))
6c826d32 11930 (invoke "./check"))))))
44d10b1f
RW
11931 (native-inputs
11932 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
11933 ("python2-pep8" ,python2-pep8)))
11934 (propagated-inputs
11935 `(("python2-pyaml" ,python2-pyaml)))
11936 (home-page "https://liw.fi/cliapp/")
11937 (synopsis "Python framework for command line programs")
11938 (description "@code{python2-cliapp} is a python framework for
11939command line programs. It contains the typical stuff such programs
11940need to do, such as parsing the command line for options, and
11941iterating over input files.")
11942 (license license:gpl2+)))
11943
11944(define-public python2-ttystatus
11945 (package
11946 (name "python2-ttystatus")
e516a9c2 11947 (version "0.36")
44d10b1f
RW
11948 (source
11949 (origin
11950 (method url-fetch)
11951 (uri (string-append
11952 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
11953 version ".tar.gz"))
11954 (sha256
11955 (base32
e516a9c2 11956 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
44d10b1f
RW
11957 (build-system python-build-system)
11958 (native-inputs
11959 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
11960 ("python2-pep8" ,python2-pep8)))
11961 (arguments
11962 `(#:python ,python-2
11963 #:phases
11964 (modify-phases %standard-phases
11965 ;; check phase needs to be run before the build phase. If not,
11966 ;; coverage-test-runner looks for tests for the built source files,
11967 ;; and fails.
11968 (delete 'check)
11969 (add-before 'build 'check
cbeee881 11970 (lambda _ (invoke "make" "check"))))))
44d10b1f
RW
11971 (home-page "https://liw.fi/ttystatus/")
11972 (synopsis "Python library for showing progress reporting and
11973status updates on terminals")
11974 (description "@code{python2-ttystatus} is a python library for
11975showing progress reporting and status updates on terminals, for
11976command line programs. Output is automatically adapted to the width
11977of the terminal: truncated if it does not fit, and resized if the
11978terminal size changes.")
11979 (license license:gpl3+)))
11980
11981(define-public python2-tracing
11982 (package
11983 (name "python2-tracing")
11984 (version "0.10")
11985 (source
11986 (origin
11987 (method url-fetch)
11988 (uri (string-append
11989 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
11990 version ".tar.gz"))
11991 (sha256
11992 (base32
11993 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
11994 (build-system python-build-system)
11995 (arguments
11996 `(#:python ,python-2))
11997 (home-page "https://liw.fi/tracing/")
11998 (synopsis "Python debug logging helper")
11999 (description "@code{python2-tracing} is a python library for
12000logging debug messages. It provides a way to turn debugging messages
12001on and off, based on the filename they occur in. It is much faster
12002than using @code{logging.Filter} to accomplish the same thing, which
12003matters when code is run in production mode. The actual logging still
12004happens using the @code{logging} library.")
12005 (license license:gpl3+)))
12006
12007(define-public python2-larch
12008 (package
12009 (name "python2-larch")
12010 (version "1.20151025")
12011 (source
12012 (origin
12013 (method url-fetch)
12014 (uri (string-append
12015 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
12016 version ".tar.gz"))
12017 (patches (search-patches
12018 "python2-larch-coverage-4.0a6-compatibility.patch"))
12019 (sha256
12020 (base32
12021 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
12022 (build-system python-build-system)
12023 (arguments
12024 `(#:python ,python-2
12025 #:phases
12026 (modify-phases %standard-phases
12027 ;; check phase needs to be run before the build phase. If not,
12028 ;; coverage-test-runner looks for tests for the built source files,
12029 ;; and fails.
12030 (delete 'check)
12031 (add-before 'build 'check
204ad455 12032 (lambda _ (invoke "make" "check"))))))
44d10b1f
RW
12033 (native-inputs
12034 `(("cmdtest" ,cmdtest)
12035 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
12036 (propagated-inputs
12037 `(("python2-tracing" ,python2-tracing)))
12038 (home-page "https://liw.fi/larch/")
12039 (synopsis "Python copy-on-write B-tree library")
12040 (description "@code{python2-larch} is an implementation of
12041particular kind of B-tree, based on research by Ohad Rodeh. See
12042@url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
12043on the data structure.
12044
12045The distinctive feature of this B-tree is that a node is never
12046(conceptually) modified. Instead, all updates are done by
12047copy-on-write. This makes it easy to clone a tree, and modify only the
12048clone, while other processes access the original tree.")
12049 (license license:gpl3+)))
12050
12051(define-public python-astroid
12052 (package
12053 (name "python-astroid")
12054 (version "2.1.0")
12055 (source
12056 (origin
12057 (method url-fetch)
12058 (uri (pypi-uri "astroid" version))
12059 (sha256
12060 (base32
12061 "08hz675knh4294bancdapql392fmbjyimhbyrmfkz1ka7l035c1m"))))
12062 (build-system python-build-system)
12063 (propagated-inputs
12064 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
12065 ("python-six" ,python-six)
12066 ("python-wrapt" ,python-wrapt)))
12067 (native-inputs
12068 `(("python-dateutil" ,python-dateutil)
12069 ("python-nose" ,python-nose)
12070 ("python-pytest" ,python-pytest)
12071 ("python-pytest-runner" ,python-pytest-runner)))
12072 (arguments
12073 `(#:phases
12074 (modify-phases %standard-phases
12075 (add-after 'unpack 'remove-spurious-test
12076 (lambda _
12077 ;; This can be removed after upgrading from python-3.7
12078 ;; https://github.com/PyCQA/astroid/issues/593
12079 ;; https://bugs.python.org/issue34056
12080 (delete-file "astroid/tests/unittest_modutils.py")
12081 #t))
12082 (replace 'check
12083 (lambda _
12084 (invoke "pytest" "astroid"))))))
12085 (home-page "https://github.com/PyCQA/astroid")
12086 (synopsis "Common base representation of python source code for pylint and
12087other projects")
12088 (description "@code{python-astroid} provides a common base representation
12089of python source code for projects such as pychecker, pyreverse, pylint, etc.
12090
12091It provides a compatible representation which comes from the _ast module. It
12092rebuilds the tree generated by the builtin _ast module by recursively walking
12093down the AST and building an extended ast. The new node classes have
12094additional methods and attributes for different usages. They include some
12095support for static inference and local name scopes. Furthermore, astroid
12096builds partial trees by inspecting living objects.")
12097 (license license:lgpl2.1+)
12098 (properties `((python2-variant . ,(delay python2-astroid))))))
12099
12100(define-public python2-astroid
12101 (let ((base (package-with-python2
12102 (strip-python2-variant python-astroid))))
12103 (package (inherit base)
12104 ;; Version 2.x removes python2 support.
12105 (version "1.6.5")
12106 (source
12107 (origin
12108 (method url-fetch)
12109 (uri (pypi-uri "astroid" version))
12110 (sha256
12111 (base32
12112 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
12113 (arguments
12114 (substitute-keyword-arguments (package-arguments base)
12115 ((#:phases phases)
12116 `(modify-phases ,phases
12117 (add-after 'unpack 'remove-spurious-test
12118 (lambda _
12119 ;; https://github.com/PyCQA/astroid/issues/276
12120 (delete-file "astroid/tests/unittest_brain.py")
12121 #t))
12122 (replace 'check
12123 (lambda _
12124 (invoke"python" "-m" "unittest" "discover"
12125 "-p" "unittest*.py")))))))
12126 (native-inputs `())
12127 (propagated-inputs
12128 `(("python2-backports-functools-lru-cache"
12129 ,python2-backports-functools-lru-cache)
12130 ("python2-enum34" ,python2-enum34)
12131 ("python2-singledispatch" ,python2-singledispatch)
12132 ,@(package-propagated-inputs base))))))
12133
12134(define-public python-isort
12135 (package
12136 (name "python-isort")
e2227b6a 12137 (version "4.3.4")
44d10b1f
RW
12138 (source
12139 (origin
e2227b6a
EF
12140 (method git-fetch)
12141 (uri (git-reference
12142 ;; Tests pass only from the Github sources
12143 (url "https://github.com/timothycrosley/isort")
12144 (commit version)))
12145 (file-name (git-file-name name version))
44d10b1f
RW
12146 (sha256
12147 (base32
e2227b6a 12148 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
44d10b1f
RW
12149 (build-system python-build-system)
12150 (native-inputs
12151 `(("python-mock" ,python-mock)
12152 ("python-pytest" ,python-pytest)))
12153 (home-page "https://github.com/timothycrosley/isort")
12154 (synopsis "Python utility/library to sort python imports")
12155 (description "@code{python-isort} is a python utility/library to sort
12156imports alphabetically, and automatically separated into sections. It
12157provides a command line utility, a python library and plugins for various
12158editors.")
e2227b6a
EF
12159 (license license:expat)
12160 (properties `((python2-variant . ,(delay python2-isort))))))
44d10b1f
RW
12161
12162(define-public python2-isort
e2227b6a
EF
12163 (let ((base (package-with-python2
12164 (strip-python2-variant python-isort))))
12165 (package (inherit base)
12166 (native-inputs
12167 `(("python2-futures" ,python2-futures)
12168 ,@(package-native-inputs base))))))
44d10b1f
RW
12169
12170(define-public python2-backports-functools-lru-cache
12171 (package
12172 (name "python2-backports-functools-lru-cache")
12173 (version "1.5")
12174 (source
12175 (origin
12176 (method url-fetch)
12177 ;; only the pypi tarballs contain the necessary metadata
12178 (uri (pypi-uri "backports.functools_lru_cache" version))
12179 (sha256
12180 (base32
12181 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
12182 (build-system python-build-system)
12183 (native-inputs
12184 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
12185 (arguments
12186 `(#:python ,python-2))
12187 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
12188 (synopsis "Backport of functools.lru_cache from Python 3.3")
12189 (description "@code{python2-backports-functools-lru-cache} is a backport
12190of @code{functools.lru_cache} from python 3.3.")
12191 (license license:expat)))
12192
12193(define-public python-configparser
12194 (package
12195 (name "python-configparser")
12196 (version "3.5.0")
12197 (source
12198 (origin
12199 (method url-fetch)
12200 (uri (string-append
12201 "https://bitbucket.org/ambv/configparser/get/"
12202 version ".tar.bz2"))
12203 (file-name (string-append name "-" version ".tar.gz"))
12204 (sha256
12205 (base32
12206 "0waq40as14abwzbb321hfz4vr1fi363nscy32ga14qvfygrg96wa"))))
12207 (build-system python-build-system)
809f003f 12208 (home-page "https://github.com/jaraco/configparser/")
44d10b1f
RW
12209 (synopsis "Backport of configparser from python 3.5")
12210 (description "@code{python-configparser} is a backport of
12211@code{configparser} from Python 3.5 so that it can be used directly
12212in other versions.")
12213 (license license:expat)))
12214
12215(define-public python2-configparser
12216 (package-with-python2 python-configparser))
12217
12218(define-public python-mando
12219 (package
12220 (name "python-mando")
12221 (version "0.6.4")
12222 (source (origin
12223 (method url-fetch)
12224 (uri (pypi-uri "mando" version))
12225 (sha256
12226 (base32
12227 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
12228 (build-system python-build-system)
12229 (propagated-inputs
12230 `(("python-rst2ansi" ,python-rst2ansi)
12231 ("python-six" ,python-six)))
12232 (native-inputs
12233 `(("python-pytest" ,python-pytest)))
12234 (home-page "https://mando.readthedocs.org/")
12235 (synopsis
12236 "Wrapper around argparse, allowing creation of complete CLI applications")
12237 (description
12238 "This package is a wrapper around argparse, allowing you to write complete CLI
12239applications in seconds while maintaining all the flexibility.")
12240 (license license:expat)))
12241
12242(define-public python2-mando
12243 (package-with-python2 python-mando))
12244
70daf82f
RW
12245(define-public python2-argparse
12246 (package
12247 (name "python2-argparse")
12248 (version "1.4.0")
12249 (source
12250 (origin
12251 (method url-fetch)
12252 (uri (pypi-uri "argparse" version))
12253 (sha256
12254 (base32
12255 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
12256 (build-system python-build-system)
12257 (arguments
12258 `(#:python ,python-2))
12259 (home-page "https://github.com/ThomasWaldmann/argparse/")
12260 (synopsis "Python command-line parsing library")
12261 (description
12262 "This package is mostly for people who want to have @code{argparse} on
12263older Pythons because it was not part of the standard library back then.")
12264 (license license:psfl)))
12265
44d10b1f
RW
12266(define-public python-fudge
12267 (package
12268 (name "python-fudge")
12269 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
12270 ;; package, which is currently the only use of this package.
12271 (version "0.9.6")
12272 (source
12273 (origin
12274 (method url-fetch)
12275 (uri (pypi-uri "fudge" version))
12276 (sha256
12277 (base32
12278 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
12279 (build-system python-build-system)
12280 (arguments
12281 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
12282 (home-page "https://github.com/fudge-py/fudge")
12283 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
12284 (description
12285 "Fudge is a Python module for using fake objects (mocks and stubs) to
12286test real ones.
12287
12288In readable Python code, you declare the methods available on your fake object
12289and how they should be called. Then you inject that into your application and
12290start testing. This declarative approach means you don’t have to record and
12291playback actions and you don’t have to inspect your fakes after running code.
12292If the fake object was used incorrectly then you’ll see an informative
12293exception message with a traceback that points to the culprit.")
12294 (license license:expat)))
12295
12296(define-public python2-fudge
12297 (package-with-python2 python-fudge))
12298
12299(define-public python-mwclient
12300 (package
12301 (name "python-mwclient")
12302 (version "0.8.4")
12303 (source
12304 (origin
12305 (method url-fetch)
12306 ;; The PyPI version wouldn't contain tests.
12307 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
12308 "v" version ".tar.gz"))
12309 (file-name (string-append name "-" version ".tar.gz"))
12310 (sha256
12311 (base32
12312 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
12313 (build-system python-build-system)
12314 (propagated-inputs
12315 `(("python-requests" ,python-requests)
12316 ("python-requests-oauthlib"
12317 ,python-requests-oauthlib)
12318 ("python-six" ,python-six)))
12319 (native-inputs
12320 `(("python-mock" ,python-mock)
12321 ("python-pytest" ,python-pytest)
12322 ("python-pytest-pep8" ,python-pytest-pep8)
12323 ("python-pytest-cache" ,python-pytest-cache)
12324 ("python-pytest-cov" ,python-pytest-cov)
12325 ("python-responses" ,python-responses)))
12326 (home-page "https://github.com/btongminh/mwclient")
12327 (synopsis "MediaWiki API client")
12328 (description "This package provides a MediaWiki API client.")
12329 (license license:expat)))
12330
12331(define-public python2-mwclient
12332 (package-with-python2 python-mwclient))
12333
12334(define-public python-utils
12335 (package
12336 (name "python-utils")
12337 (version "2.1.0")
12338 (source (origin
12339 (method url-fetch)
12340 (uri (pypi-uri "python-utils" version))
12341 (sha256
12342 (base32
12343 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
12344 (build-system python-build-system)
12345 (native-inputs
12346 `(("pytest-runner" ,python-pytest-runner)
12347 ("pytest" ,python-pytest)
12348 ("six" ,python-six)))
12349 (home-page "https://github.com/WoLpH/python-utils")
12350 (synopsis "Convenient utilities not included with the standard Python install")
12351 (description
12352 "Python Utils is a collection of small Python functions and classes which
12353make common patterns shorter and easier.")
12354 (license license:bsd-2)))
12355
12356(define-public python2-utils
12357 (package-with-python2 python-utils))
12358
44d10b1f
RW
12359(define-public python-diff-match-patch
12360 (package
12361 (name "python-diff-match-patch")
12362 (version "20121119")
12363 (source
12364 (origin
12365 (method url-fetch)
12366 (uri (pypi-uri "diff-match-patch" version))
12367 (sha256
12368 (base32
12369 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
12370 (build-system python-build-system)
12371 (home-page "https://code.google.com/p/google-diff-match-patch")
12372 (synopsis "Synchronize plain text")
12373 (description "Diff Match and Patch libraries offer robust algorithms to
12374perform the operations required for synchronizing plain text.")
12375 (license license:asl2.0)))
12376
12377(define-public python2-diff-match-patch
12378 (package-with-python2 python-diff-match-patch))
12379
12380(define-public python-dirsync
12381 (package
12382 (name "python-dirsync")
12383 (version "2.2.3")
12384 (source
12385 (origin
12386 (method url-fetch)
12387 (uri (pypi-uri "dirsync" version))
12388 (sha256
12389 (base32
12390 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
12391 (build-system python-build-system)
12392 (propagated-inputs
12393 `(("six" ,python-six)))
12394 (home-page "https://bitbucket.org/tkhyn/dirsync")
12395 (synopsis "Advanced directory tree synchronisation tool")
12396 (description "Advanced directory tree synchronisation tool.")
12397 (license license:expat)))
12398
12399(define-public python2-dirsync
12400 (package-with-python2 python-dirsync))
12401
12402(define-public python-levenshtein
12403 (package
12404 (name "python-levenshtein")
12405 (version "0.12.0")
12406 (source
12407 (origin
12408 (method url-fetch)
12409 (uri (pypi-uri "python-Levenshtein" version))
12410 (sha256
12411 (base32
12412 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
12413 (build-system python-build-system)
12414 (home-page "https://github.com/ztane/python-Levenshtein")
12415 (synopsis "Fast computation of Levenshtein distance and string similarity")
12416 (description
12417 "The Levenshtein Python C extension module contains functions for fast computation of
12418@enumerate
12419@item Levenshtein (edit) distance, and edit operations
12420@item string similarity
12421@item approximate median strings, and generally string averaging
12422@item string sequence and set similarity
12423@end enumerate
12424It supports both normal and Unicode strings.")
12425 (license license:gpl2+)))
12426
12427(define-public python2-levenshtein
12428 (package-with-python2 python-levenshtein))
12429
12430(define-public python-scandir
12431 (package
12432 (name "python-scandir")
12433 (version "1.9.0")
12434 (source
12435 (origin
12436 (method url-fetch)
12437 (uri (pypi-uri "scandir" version))
12438 (sha256
12439 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
12440 (build-system python-build-system)
12441 (arguments
12442 `(#:phases (modify-phases %standard-phases
12443 (replace 'check
12444 (lambda _
12445 (invoke "python" "test/run_tests.py"))))))
12446 (home-page "https://github.com/benhoyt/scandir")
12447 (synopsis "Directory iteration function")
12448 (description
12449 "Directory iteration function like os.listdir(), except that instead of
12450returning a list of bare filenames, it yields DirEntry objects that include
12451file type and stat information along with the name. Using scandir() increases
12452the speed of os.walk() by 2-20 times (depending on the platform and file
12453system) by avoiding unnecessary calls to os.stat() in most cases.
12454
12455This package is part of the Python standard library since version 3.5.")
12456 (license license:bsd-3)))
12457
12458(define-public python2-scandir
12459 (package-with-python2 python-scandir))
12460
12461(define-public python2-stemming
12462 (package
12463 (name "python2-stemming")
12464 (version "1.0.1")
12465 (source
12466 (origin
12467 (method url-fetch)
12468 (uri (pypi-uri "stemming" version))
12469 (sha256
12470 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
12471 (build-system python-build-system)
12472 (arguments
12473 `(#:python ,python-2))
12474 (home-page "https://bitbucket.org/mchaput/stemming/overview")
12475 (synopsis "Python implementations of various stemming algorithms")
12476 (description
12477 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
12478stemming algorithms for English. These implementations are straightforward and
12479efficient, unlike some Python versions of the same algorithms available on the
12480Web. This package is an extraction of the stemming code included in the Whoosh
12481search engine.")
12482 (license license:public-domain)))
12483
12484(define-public python-factory-boy
12485 (package
12486 (name "python-factory-boy")
12487 (version "2.8.1")
12488 (source
12489 (origin
12490 (method url-fetch)
12491 (uri (pypi-uri "factory_boy" version))
12492 (sha256
12493 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
12494 (build-system python-build-system)
12495 (arguments
12496 ;; Tests are not included in the tarball.
12497 `(#:tests? #f))
12498 (propagated-inputs
12499 `(("faker" ,python-faker)))
12500 (home-page "https://github.com/benhoyt/scandir")
12501 (synopsis "Versatile test fixtures replacement")
12502 (description
12503 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
12504
12505As a fixtures replacement tool, it aims to replace static, hard to maintain
12506fixtures with easy-to-use factories for complex object.
12507
12508Instead of building an exhaustive test setup with every possible combination
12509of corner cases, factory_boy allows you to use objects customized for the
12510current test, while only declaring the test-specific fields")
12511 (license license:expat)))
12512
12513(define-public python2-factory-boy
12514 (package-with-python2 python-factory-boy))
12515
12516(define-public python-translate-toolkit
12517 (package
12518 (name "python-translate-toolkit")
12519 (version "2.1.0")
12520 (source
12521 (origin
12522 (method url-fetch)
12523 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
12524 (sha256
12525 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
12526 (build-system python-build-system)
12527 (native-inputs
12528 `(("python-pytest" ,python-pytest)
12529 ("python-sphinx" ,python-sphinx)))
12530 (propagated-inputs
12531 `(("python-babel" ,python-babel)
12532 ("python-beautifulsoup4" ,python-beautifulsoup4)
12533 ("python-chardet" ,python-chardet)
12534 ("python-diff-match-patch" ,python-diff-match-patch)
12535 ("python-levenshtein" ,python-levenshtein)
12536 ("python-lxml" ,python-lxml)
12537 ("python-six" ,python-six)
12538 ("python-vobject" ,python-vobject)
12539 ("python-pyyaml" ,python-pyyaml)))
12540 (arguments
12541 ;; TODO: tests are not run, because they end with
12542 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
12543 ;; 'parse_funcs'
12544 ;; during test setup.
12545 `(#:tests? #f))
18919cf9 12546 (home-page "https://toolkit.translatehouse.org")
44d10b1f
RW
12547 (synopsis "Tools and API for translation and localization engineering")
12548 (description
12549 "Tools and API for translation and localization engineering. It contains
12550several utilities, as well as an API for building localization tools.")
12551 (license license:gpl2+)))
12552
12553(define-public python2-translate-toolkit
12554 (package-with-python2 python-translate-toolkit))
12555
12556(define-public python-packaging
12557 (package
12558 (name "python-packaging")
9dc6ff5a 12559 (version "19.0")
44d10b1f
RW
12560 (source
12561 (origin
12562 (method url-fetch)
12563 (uri (pypi-uri "packaging" version))
12564 (sha256
12565 (base32
9dc6ff5a 12566 "1brjhygq9dz6x1kdljivkjfldi3qf5rbkqgck1bpgv9qpv8ab60c"))))
44d10b1f
RW
12567 (build-system python-build-system)
12568 (arguments
12569 `(#:phases (modify-phases %standard-phases
12570 (replace 'check
12571 (lambda _ (invoke "py.test" "-vv"))))))
12572 (native-inputs
12573 `(("python-pretend" ,python-pretend)
12574 ("python-pytest" ,python-pytest)))
12575 (propagated-inputs
12576 `(("python-pyparsing" ,python-pyparsing)
12577 ("python-six" ,python-six)))
12578 (home-page "https://github.com/pypa/packaging")
12579 (synopsis "Core utilities for Python packages")
12580 (description "Packaging is a Python module for dealing with Python packages.
12581It offers an interface for working with package versions, names, and dependency
12582information.")
12583 ;; From 'LICENSE': This software is made available under the terms of
12584 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
12585 ;; Contributions to this software is made under the terms of *both* these
12586 ;; licenses.
12587 (license (list license:asl2.0 license:bsd-2))))
12588
12589(define-public python2-packaging
12590 (package-with-python2 python-packaging))
12591
12592(define-public python-relatorio
12593 (package
12594 (name "python-relatorio")
12595 (version "0.8.0")
12596 (source
12597 (origin
12598 (method url-fetch)
12599 (uri (pypi-uri "relatorio" version))
12600 (sha256
12601 (base32
12602 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
12603 (build-system python-build-system)
12604 (propagated-inputs
12605 `(("python-lxml" ,python-lxml)
12606 ("python-genshi" ,python-genshi)))
12607 (native-inputs
12608 `(("python-magic" ,python-magic)))
12609 (home-page "https://relatorio.tryton.org/")
12610 (synopsis "Templating library able to output ODT and PDF files")
12611 (description "Relatorio is a templating library which provides a way to
12612easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
12613for more filetypes can be easily added by creating plugins for them.")
12614 (license license:gpl3+)))
12615
12616(define-public python2-relatorio
12617 (package-with-python2 python-relatorio))
12618
12619(define-public python-radon
12620 (package
12621 (name "python-radon")
12622 (version "2.2.0")
12623 (source
12624 (origin
12625 (method url-fetch)
12626 (uri (pypi-uri "radon" version))
12627 (sha256
12628 (base32
12629 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
12630 (build-system python-build-system)
12631 (arguments
12632 `(#:phases (modify-phases %standard-phases
12633 (replace 'check
12634 (lambda _
12635 (invoke "python" "radon/tests/run.py"))))))
12636 (propagated-inputs
12637 `(("python-colorama" ,python-colorama)
12638 ("python-flake8-polyfill" ,python-flake8-polyfill)
12639 ("python-mando" ,python-mando)))
12640 (native-inputs
12641 `(("python-pytest" ,python-pytest)
12642 ("python-pytest-mock" ,python-pytest-mock)))
12643 (home-page "https://radon.readthedocs.org/")
12644 (synopsis "Code Metrics in Python")
12645 (description "Radon is a Python tool which computes various code metrics.
12646Supported metrics are:
12647@itemize @bullet
12648@item raw metrics: SLOC, comment lines, blank lines, &c.
12649@item Cyclomatic Complexity (i.e. McCabe’s Complexity)
12650@item Halstead metrics (all of them)
12651@item the Maintainability Index (a Visual Studio metric)
12652@end itemize")
12653 (license license:expat)))
12654
12655(define-public python2-radon
12656 (package-with-python2 python-radon))
12657
12658(define-public python-sure
12659 (package
12660 (name "python-sure")
12661 (version "1.4.11")
12662 (source
12663 (origin
12664 (method url-fetch)
12665 (uri (pypi-uri "sure" version))
12666 (sha256
12667 (base32
12668 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
12669 (build-system python-build-system)
12670 (propagated-inputs
12671 `(("python-mock" ,python-mock)
12672 ("python-six" ,python-six)))
12673 (native-inputs
12674 `(("python-nose" ,python-nose)))
12675 (home-page "https://github.com/gabrielfalcao/sure")
12676 (synopsis "Automated testing library in python for python")
12677 (description
12678 "Sure is a python library that leverages a DSL for writing assertions.
12679Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
12680 (license license:gpl3+)))
12681
12682(define-public python2-sure
12683 (package-with-python2 python-sure))
12684
12685(define-public python2-couleur
12686 ;; This package does not seem to support python3 at all, hence,
12687 ;; only the python2 variant definition is provided.
12688 (package
12689 (name "python2-couleur")
12690 (version "0.6.2")
12691 (source
12692 (origin
12693 (method url-fetch)
12694 (uri (pypi-uri "couleur" version))
12695 (sha256
12696 (base32
12697 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
12698 (build-system python-build-system)
12699 (arguments
12700 `(#:python ,python-2))
12701 (home-page "https://github.com/gabrielfalcao/couleur")
12702 (synopsis
12703 "ANSI terminal tool for python, colored shell and other handy fancy features")
12704 (description
12705 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
12706terminal such as coloured output in the shell, overwriting output, indentation, etc.")
12707 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
12708 ;; https://github.com/gabrielfalcao/couleur/issues/11
12709 (license license:lgpl3+)))
12710
12711(define-public python-misaka
12712 (package
12713 (name "python-misaka")
0dcb3412 12714 (version "2.1.1")
44d10b1f
RW
12715 (source
12716 (origin
12717 (method url-fetch)
12718 (uri (pypi-uri "misaka" version))
12719 (sha256
12720 (base32
0dcb3412 12721 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
44d10b1f
RW
12722 (build-system python-build-system)
12723 (arguments
12724 `(;; Line 37 of setup.py calls self.run_command('develop')
12725 ;; in the 'check' phase. This command seems to be trying
12726 ;; to write to
12727 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
12728 ;; for which it does not have the permission to write.
12729 #:tests? #f))
12730 (propagated-inputs
12731 `(("python-cffi" ,python-cffi)))
12732 (home-page "https://github.com/FSX/misaka")
12733 (synopsis "Python binding for Hoedown")
12734 (description
12735 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
12736library written in C. It features a fast HTML renderer and functionality to make custom
12737renderers (e.g. man pages or LaTeX).")
12738 (license license:expat)))
12739
12740(define-public python2-misaka
12741 (package-with-python2 python-misaka))
12742
12743(define-public python2-steadymark
12744 ;; This is forced into being a python2 only variant
12745 ;; due to its dependence on couleur that has no support
12746 ;; for python3
12747 (package
12748 (name "python2-steadymark")
12749 (version "0.7.3")
12750 (source
12751 (origin
12752 (method url-fetch)
12753 (uri (pypi-uri "steadymark" version))
12754 (sha256
12755 (base32
12756 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
12757 (build-system python-build-system)
12758 (native-inputs
12759 `(("python-couleur" ,python2-couleur)
12760 ("python-sure" ,python2-sure)
12761 ("python-misaka" ,python2-misaka)))
12762 (arguments
12763 `(#:python ,python-2
12764 #:phases
12765 (modify-phases %standard-phases
12766 (add-before 'build 'patch-setup-py
12767 (lambda _
12768 ;; Update requirements from dependency==version
12769 ;; to dependency>=version
12770 (substitute* "setup.py"
12771 (("==") ">="))
12772 #t)))))
12773 (home-page "https://github.com/gabrielfalcao/steadymark")
12774 (synopsis "Markdown-based test runner for python")
12775 (description
12776 "@code{Steadymark} allows documentation to be written in github-flavoured
12777markdown. The documentation may contain snippets of code surrounded by python
12778code blocks and @code{Steadymark} will find these snippets and run them, making
12779sure that there are no old malfunctional examples in the documentation examples.")
12780 (license license:expat)))
12781
12782(define-public python-jsonpointer
12783 (package
12784 (name "python-jsonpointer")
12785 (version "1.10")
12786 (source
12787 (origin
12788 (method url-fetch)
12789 (uri (pypi-uri "jsonpointer" version))
12790 (sha256
12791 (base32
12792 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
12793 (build-system python-build-system)
12794 (home-page "https://github.com/stefankoegl/python-json-pointer")
12795 (synopsis "Identify specific nodes in a JSON document")
12796 (description "@code{jsonpointer} allows you to access specific nodes
12797by path in a JSON document (see RFC 6901).")
12798 (license license:bsd-3)))
12799
12800(define-public python2-jsonpointer
12801 (package-with-python2 python-jsonpointer))
12802
12803(define-public python-jsonpatch
12804 (package
12805 (name "python-jsonpatch")
12806 (version "1.16")
12807 (source
12808 (origin
12809 (method url-fetch)
12810 ;; pypi version lacks tests.js
12811 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12812 "archive/v" version ".tar.gz"))
12813 (file-name (string-append name "-" version ".tar.gz"))
12814 (sha256
12815 (base32
12816 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
12817 (build-system python-build-system)
12818 (native-inputs
12819 `(("python-jsonpointer" ,python-jsonpointer)))
12820 (home-page "https://github.com/stefankoegl/python-json-patch")
12821 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
12822 (description "@code{jsonpatch} is a library and program that allows
12823applying JSON Patches according to RFC 6902.")
12824 (license license:bsd-3)))
12825
12826(define-public python2-jsonpatch
12827 (package-with-python2 python-jsonpatch))
12828
12829(define-public python-jsonpatch-0.4
12830 (package (inherit python-jsonpatch)
12831 (name "python-jsonpatch")
12832 (version "0.4")
12833 (source
12834 (origin
12835 (method url-fetch)
12836 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12837 "archive/v" version ".tar.gz"))
12838 (file-name (string-append name "-" version ".tar.gz"))
12839 (sha256
12840 (base32
12841 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
12842
12843(define-public python2-jsonpatch-0.4
12844 (package-with-python2 python-jsonpatch-0.4))
12845
12846(define-public python-rfc3986
12847 (package
12848 (name "python-rfc3986")
12849 (version "1.1.0")
12850 (source (origin
12851 (method url-fetch)
12852 (uri (pypi-uri "rfc3986" version))
12853 (sha256
12854 (base32
12855 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
12856 (build-system python-build-system)
12857 (arguments
12858 `(#:modules ((guix build utils)
12859 (guix build python-build-system)
12860 (ice-9 ftw)
12861 (srfi srfi-1)
12862 (srfi srfi-26))
12863 #:phases
12864 (modify-phases %standard-phases
12865 (replace 'check
12866 (lambda _
12867 (let ((cwd (getcwd)))
12868 (setenv "PYTHONPATH"
12869 (string-append cwd "/build/"
12870 (find (cut string-prefix? "lib" <>)
12871 (scandir (string-append cwd "/build")))
12872 ":"
12873 (getenv "PYTHONPATH")))
12874 (invoke "pytest" "-v")))))))
12875 (native-inputs
12876 `(("python-pytest" ,python-pytest)))
12877 (home-page "https://rfc3986.readthedocs.io/")
12878 (synopsis "Parse and validate URI references")
12879 (description
12880 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
12881validation and authority parsing. This module also supports RFC@tie{}6874
12882which adds support for zone identifiers to IPv6 addresses.")
12883 (license license:asl2.0)))
12884
12885(define-public python2-rfc3986
12886 (package-with-python2 python-rfc3986))
12887
12888(define-public python-rfc3987
12889 (package
12890 (name "python-rfc3987")
12891 (version "1.3.7")
12892 (source
12893 (origin
12894 (method url-fetch)
12895 (uri (pypi-uri "rfc3987" version))
12896 (sha256
12897 (base32
12898 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
12899 (build-system python-build-system)
12900 (home-page "https://pypi.python.org/pypi/rfc3987")
12901 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
12902 (description "@code{rfc3987} provides routines for parsing and
12903validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
12904 (license license:gpl3+)))
12905
12906(define-public python2-rfc3987
12907 (package-with-python2 python-rfc3987))
12908
12909(define-public python-validate-email
12910 (package
12911 (name "python-validate-email")
12912 (version "1.3")
12913 (source
12914 (origin
12915 (method url-fetch)
12916 (uri (pypi-uri "validate_email" version))
12917 (sha256
12918 (base32
12919 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
12920 (build-system python-build-system)
12921 (home-page "https://github.com/syrusakbary/validate_email")
12922 (synopsis "Verifies if an email address is valid and really exists")
12923 (description "@code{validate_email} can be used to verify if an email
12924address is valid and really exists.")
12925 (license license:lgpl3+)))
12926
12927(define-public python2-validate-email
12928 (package-with-python2 python-validate-email))
12929
12930(define-public python-flex
12931 (package
12932 (name "python-flex")
12933 (version "6.10.0")
12934 (source
12935 (origin
12936 (method url-fetch)
12937 (uri (pypi-uri "flex" version))
12938 (sha256
12939 (base32
12940 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
12941 (build-system python-build-system)
12942 (propagated-inputs
12943 `(("python-click" ,python-click)
12944 ("python-iso8601" ,python-iso8601)
12945 ("python-jsonpointer" ,python-jsonpointer)
12946 ("python-pyyaml" ,python-pyyaml)
12947 ("python-requests" ,python-requests)
12948 ("python-rfc3987" ,python-rfc3987)
12949 ("python-six" ,python-six)
12950 ("python-validate-email" ,python-validate-email)))
12951 (home-page "https://github.com/pipermerriam/flex")
12952 (synopsis "Validates Swagger schemata")
12953 (description "@code{flex} can be used to validate Swagger schemata.")
12954 (license license:bsd-3)))
12955
12956(define-public python2-flex
12957 (package-with-python2 python-flex))
12958
12959(define-public python-marshmallow
12960 (package
12961 (name "python-marshmallow")
12962 (version "3.0.0b14")
12963 (source
12964 (origin
12965 (method url-fetch)
12966 (uri (pypi-uri "marshmallow" version))
12967 (sha256
12968 (base32
12969 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
12970 (build-system python-build-system)
12971 (propagated-inputs
12972 `(("python-dateutil" ,python-dateutil)
12973 ("python-simplejson" ,python-simplejson)))
12974 (native-inputs
12975 `(("python-pytest" ,python-pytest)
12976 ("python-pytz" ,python-pytz)))
12977 (home-page "https://github.com/marshmallow-code/marshmallow")
12978 (synopsis "Convert complex datatypes to and from native
12979Python datatypes.")
12980 (description "@code{marshmallow} provides a library for converting
12981complex datatypes to and from native Python datatypes.")
12982 (license license:expat)))
12983
12984(define-public python2-marshmallow
12985 (package-with-python2 python-marshmallow))
12986
12987(define-public python-apispec
12988 (package
12989 (name "python-apispec")
12990 (version "0.25.3")
12991 (source
12992 (origin
12993 (method url-fetch)
12994 (uri (pypi-uri "apispec" version))
12995 (sha256
12996 (base32
12997 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
12998 (build-system python-build-system)
12999 (propagated-inputs
13000 `(("python-pyyaml" ,python-pyyaml)))
13001 (native-inputs
13002 `(("python-pytest" ,python-pytest)
13003 ("python-flask" ,python-flask)
13004 ("python-marshmallow" ,python-marshmallow)
13005 ("python-tornado" ,python-tornado)
13006 ("python-bottle" ,python-bottle)
13007 ("python-mock" ,python-mock)))
13008 (home-page "https://github.com/marshmallow-code/apispec")
13009 (synopsis "Swagger 2.0 API specification generator")
13010 (description "@code{python-apispec} is a pluggable API specification
13011generator. Currently supports the OpenAPI specification (f.k.a.
13012Swagger 2.0).")
13013 (license license:expat)))
13014
13015(define-public python2-apispec
13016 (package-with-python2 python-apispec))
13017
13018(define-public python-flasgger
13019 (package
13020 (name "python-flasgger")
13021 (version "0.6.3")
13022 (source
13023 (origin
1a04d421
TGR
13024 (method git-fetch)
13025 (uri (git-reference
13026 (url "https://github.com/rochacbruno/flasgger.git")
13027 (commit version)))
13028 (file-name (git-file-name name version))
44d10b1f 13029 (sha256
1a04d421 13030 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
44d10b1f
RW
13031 (build-system python-build-system)
13032 (arguments
13033 `(#:phases
13034 (modify-phases %standard-phases
13035 (replace 'check
13036 (lambda* (#:key inputs outputs #:allow-other-keys)
13037 (substitute* "Makefile"
13038 (("flake8 flasgger --ignore=F403")
13039 "flake8 flasgger --ignore=E731,F403"))
13040 (setenv "PYTHONPATH" (string-append (getcwd)
13041 ":"
13042 (getenv "PYTHONPATH")))
ac599a09 13043 (invoke "py.test"))))))
44d10b1f
RW
13044 (propagated-inputs
13045 `(("python-flask" ,python-flask)
13046 ("python-pyyaml" ,python-pyyaml)
13047 ("python-jsonschema" ,python-jsonschema)
13048 ("python-mistune" ,python-mistune)
13049 ("python-six" ,python-six)))
13050 (native-inputs
13051 `(("python-decorator" ,python-decorator)
13052 ("python-flake8" ,python-flake8)
13053 ("python-flask-restful" ,python-flask-restful)
13054 ("python-flex" ,python-flex)
13055 ("python-pytest" ,python-pytest)
13056 ("python-pytest-cov" ,python-pytest-cov)
13057 ("python-marshmallow" ,python-marshmallow)
13058 ("python-apispec" ,python-apispec)))
13059 (home-page "https://github.com/rochacbruno/flasgger/")
13060 (synopsis "Extract Swagger specs from your Flask project")
13061 (description "@code{python-flasgger} allows extracting Swagger specs
13062from your Flask project. It is a fork of Flask-Swagger.")
13063 (license license:expat)))
13064
13065(define-public python2-flasgger
13066 (package-with-python2 python-flasgger))
13067
13068(define-public python-swagger-spec-validator
13069 (package
13070 (name "python-swagger-spec-validator")
13071 (version "2.1.0")
13072 (source
13073 (origin
13074 (method url-fetch)
13075 (uri (pypi-uri "swagger-spec-validator" version))
13076 (sha256
13077 (base32
13078 "13hkpn2lycwr0468yqhjb3kwszqf7hjwlq61w7vdxq1caz31k4nw"))))
13079 (build-system python-build-system)
13080 (propagated-inputs
13081 `(("python-jsonschema" ,python-jsonschema)
13082 ("python-six" ,python-six)))
13083 (home-page
13084 "https://github.com/Yelp/swagger_spec_validator")
13085 (synopsis "Validation of Swagger specifications")
13086 (description "@code{swagger_spec_validator} provides a library for
13087validating Swagger API specifications.")
13088 (license license:asl2.0)))
13089
13090(define-public python2-swagger-spec-validator
13091 (package-with-python2 python-swagger-spec-validator))
13092
13093(define-public python-apache-libcloud
13094 (package
13095 (name "python-apache-libcloud")
13096 (version "2.4.0")
13097 (source
13098 (origin
13099 (method url-fetch)
13100 (uri (pypi-uri "apache-libcloud" version))
13101 (sha256
13102 (base32
13103 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
13104 (build-system python-build-system)
13105 (arguments
13106 `(#:phases
13107 (modify-phases %standard-phases
13108 (add-after 'unpack 'patch-ssh
13109 (lambda* (#:key inputs #:allow-other-keys)
13110 (substitute* "libcloud/compute/ssh.py"
13111 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
13112 "/bin/ssh" "'")))
13113 #t))
13114 (add-after 'unpack 'patch-tests
13115 (lambda _
13116 (substitute* "./libcloud/test/test_file_fixtures.py"
13117 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
13118 (("def _ascii") "def _raw_data(self, method, url, body, headers):
13119 return (httplib.OK,
13120 \"1234abcd\",
13121 {\"test\": \"value\"},
13122 httplib.responses[httplib.OK])
13123 def _ascii"))
13124 (substitute* "libcloud/test/compute/test_ssh_client.py"
13125 (("class ShellOutSSHClientTests")
13126 "@unittest.skip(\"Guix container doesn't have ssh service\")
13127class ShellOutSSHClientTests")
13128 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
13129 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
13130 (("'.xF0', '.x90', '.x8D', '.x88'")
13131 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
13132 #t))
13133 (add-before 'check 'copy-secret
13134 (lambda _
13135 (copy-file "libcloud/test/secrets.py-dist"
13136 "libcloud/test/secrets.py")
13137 #t)))))
13138 (inputs
13139 `(("openssh" ,openssh)))
13140 (propagated-inputs
13141 `(("python-paramiko" ,python-paramiko)
13142 ("python-requests" ,python-requests)))
13143 (native-inputs
13144 `(("python-lockfile" ,python-lockfile)
13145 ("python-mock" ,python-mock)
13146 ("python-pytest" ,python-pytest)
13147 ("python-pytest-runner" ,python-pytest-runner)
13148 ("python-requests-mock" ,python-requests-mock)))
13149 (home-page "https://libcloud.apache.org/")
13150 (synopsis "Unified Cloud API")
13151 (description "@code{libcloud} is a Python library for interacting with
13152many of the popular cloud service providers using a unified API.")
13153 (license license:asl2.0)))
13154
13155(define-public python2-apache-libcloud
13156 (package-with-python2 python-apache-libcloud))
13157
13158(define-public python-smmap2
13159 (package
13160 (name "python-smmap2")
13161 (version "2.0.3")
13162 (source
13163 (origin
13164 (method url-fetch)
13165 (uri (pypi-uri "smmap2" version))
13166 (sha256
13167 (base32
13168 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
13169 (build-system python-build-system)
13170 (native-inputs
13171 `(("python-nosexcover" ,python-nosexcover)))
13172 (home-page "https://github.com/Byron/smmap")
13173 (synopsis "Python sliding window memory map manager")
13174 (description "@code{smmap2} is a pure Python implementation of a sliding
13175window memory map manager.")
13176 (license license:bsd-3)))
13177
13178(define-public python2-smmap2
13179 (package-with-python2 python-smmap2))
13180
13181(define-public python-regex
13182 (package
13183 (name "python-regex")
c187c9d7 13184 (version "2019.04.14")
44d10b1f
RW
13185 (source (origin
13186 (method url-fetch)
13187 (uri (pypi-uri "regex" version))
13188 (sha256
13189 (base32
c187c9d7
BT
13190 "1a6hhfs6l6snr1z654ay6wzbmwdkmv282fzfkd5hk2d1n73y8v6m"))))
13191 ;; TODO: Fix and enable regex_test.py tests that complain about the
13192 ;; test.support module not existing.
44d10b1f
RW
13193 (build-system python-build-system)
13194 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
13195 (synopsis "Alternative regular expression module")
13196 (description "This regular expression implementation is backwards-
13197compatible with the standard @code{re} module, but offers additional
13198functionality like full case-folding for case-insensitive matches in Unicode.")
13199 (license license:psfl)))
13200
13201(define-public python2-regex
13202 (package-with-python2 python-regex))
13203
13204(define-public python2-pyopengl
13205 (package
13206 (name "python2-pyopengl")
13207 (version "3.1.0")
13208 (source
13209 (origin
13210 (method url-fetch)
13211 (uri (pypi-uri "PyOpenGL" version))
13212 (sha256
13213 (base32
13214 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
13215 (arguments
13216 `(#:python ,python-2))
13217 (build-system python-build-system)
13218 (home-page "http://pyopengl.sourceforge.net")
13219 (synopsis "Standard OpenGL bindings for Python")
13220 (description
13221 "PyOpenGL is the most common cross platform Python binding to OpenGL and
13222related APIs. The binding is created using the standard @code{ctypes}
13223library.")
13224 (license license:bsd-3)))
13225
13226(define-public python2-pyopengl-accelerate
13227 (package
13228 (inherit python2-pyopengl)
13229 (name "python2-pyopengl-accelerate")
13230 (version "3.1.0")
13231 (source
13232 (origin
13233 (method url-fetch)
13234 (uri (pypi-uri "PyOpenGL-accelerate" version))
13235 (sha256
13236 (base32
13237 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
13238 (synopsis "Acceleration code for PyOpenGL")
13239 (description
13240 "This is the Cython-coded accelerator module for PyOpenGL.")))
13241
13242(define-public python-rencode
13243 (package
13244 (name "python-rencode")
13245 (version "1.0.5")
13246 (source
13247 (origin
13248 (method url-fetch)
13249 (uri (pypi-uri "rencode" version))
13250 (sha256
13251 (base32
13252 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
13253 (build-system python-build-system)
13254 (arguments
13255 `(#:phases
13256 (modify-phases %standard-phases
13257 (add-before 'check 'delete-bogus-test
13258 ;; This test requires /home/aresch/Downloads, which is not provided by
13259 ;; the build environment.
13260 (lambda _
13261 (delete-file "rencode/t.py")
13262 #t)))))
13263 (native-inputs `(("pkg-config" ,pkg-config)
13264 ("python-cython" ,python-cython)))
13265 (home-page "https://github.com/aresch/rencode")
13266 (synopsis "Serialization of heterogeneous data structures")
13267 (description
13268 "The @code{rencode} module is a data structure serialization library,
13269similar to @code{bencode} from the BitTorrent project. For complex,
13270heterogeneous data structures with many small elements, r-encoding stake up
13271significantly less space than b-encodings. This version of rencode is a
13272complete rewrite in Cython to attempt to increase the performance over the
13273pure Python module.")
13274 (license license:bsd-3)))
13275
13276(define-public python2-rencode
13277 (package-with-python2 python-rencode))
13278
13279(define-public python-xenon
13280 (package
13281 (name "python-xenon")
13282 (version "0.5.4")
13283 (source
13284 (origin
13285 (method url-fetch)
13286 (uri (pypi-uri "xenon" version))
13287 (sha256
13288 (base32
13289 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
13290 (build-system python-build-system)
13291 (native-inputs
13292 `(("python-pyyaml" ,python-pyyaml)
13293 ("python-radon" ,python-radon)
13294 ("python-requests" ,python-requests)
13295 ("python-flake8" ,python-flake8)
13296 ("python-tox" ,python-tox)))
13297 (arguments
13298 `(#:phases
13299 (modify-phases %standard-phases
13300 (add-before 'build 'patch-test-requirements
13301 (lambda _
13302 ;; Remove httpretty dependency for tests.
13303 (substitute* "setup.py"
13304 (("httpretty") ""))
13305 #t)))))
13306 (home-page "https://xenon.readthedocs.org/")
13307 (synopsis "Monitor code metrics for Python on your CI server")
13308 (description
13309 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
13310Ideally, @code{xenon} is run every time code is committed. Through command
13311line options, various thresholds can be set for the complexity of code. It
13312will fail (i.e. it will exit with a non-zero exit code) when any of these
13313requirements is not met.")
13314 (license license:expat)))
13315
13316(define-public python2-xenon
13317 (package-with-python2 python-xenon))
13318
13319(define-public python-pysocks
13320 (package
13321 (name "python-pysocks")
b8725cdf 13322 (version "1.7.0")
44d10b1f
RW
13323 (source
13324 (origin
13325 (method url-fetch)
13326 (uri (pypi-uri "PySocks" version))
13327 (sha256
13328 (base32
b8725cdf 13329 "0z4p31bpqm893cf87qqgb30k7nwd8kqfjwwjm5cvxb6zbyj1w0yr"))))
44d10b1f
RW
13330 (build-system python-build-system)
13331 (arguments `(#:tests? #f))
13332 (home-page "https://github.com/Anorov/PySocks")
13333 (synopsis "SOCKS client module")
13334 (description "@code{pysocks} is an updated and semi-actively maintained
13335version of @code{SocksiPy} with bug fixes and extra features.")
13336 (license license:bsd-3)))
13337
13338(define-public python2-pysocks
13339 (package-with-python2 python-pysocks))
13340
13341(define-public python-pydiff
13342 (package
13343 (name "python-pydiff")
13344 (version "0.2")
13345 (source
13346 (origin
13347 (method url-fetch)
13348 (uri (pypi-uri "pydiff" version))
13349 (sha256
13350 (base32
13351 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
13352 (build-system python-build-system)
13353 (home-page "https://github.com/myint/pydiff")
13354 (synopsis "Library to diff two Python files at the bytecode level")
13355 (description
13356 "@code{pydiff} makes it easy to look for actual code changes while
13357ignoring formatting changes.")
13358 (license license:expat)))
13359
13360(define-public python2-pydiff
13361 (package-with-python2 python-pydiff))
13362
13363(define-public python-tqdm
13364 (package
13365 (name "python-tqdm")
13366 (version "4.19.6")
13367 (source
13368 (origin
13369 (method url-fetch)
13370 (uri (pypi-uri "tqdm" version))
13371 (sha256
13372 (base32
13373 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
13374 (build-system python-build-system)
13375 (native-inputs
13376 `(("python-flake8" ,python-flake8)
13377 ("python-nose" ,python-nose)
13378 ("python-coverage" ,python-coverage)))
13379 (home-page "https://github.com/tqdm/tqdm")
13380 (synopsis "Fast, extensible progress meter")
13381 (description
13382 "Make loops show a progress bar on the console by just wrapping any
13383iterable with @code{|tqdm(iterable)|}. Offers many options to define
13384design and layout.")
13385 (license (list license:mpl2.0 license:expat))))
13386
13387(define-public python2-tqdm
13388 (package-with-python2 python-tqdm))
13389
13390(define-public python-pkginfo
13391 (package
13392 (name "python-pkginfo")
13393 (version "1.4.2")
13394 (source
13395 (origin
13396 (method url-fetch)
13397 (uri (pypi-uri "pkginfo" version))
13398 (sha256
13399 (base32
13400 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
13401 (build-system python-build-system)
13402 (arguments
13403 ;; The tests are broken upstream.
13404 '(#:tests? #f))
13405 (home-page
13406 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
13407 (synopsis
13408 "Query metadatdata from sdists, bdists, and installed packages")
13409 (description
13410 "API to query the distutils metadata written in @file{PKG-INFO} inside a
13411source distriubtion (an sdist) or a binary distribution (e.g., created by
13412running bdist_egg). It can also query the EGG-INFO directory of an installed
13413distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
13414created by running @code{python setup.py develop}).")
13415 (license license:expat)))
13416
13417(define-public python2-pkginfo
13418 (package-with-python2 python-pkginfo))
13419
13420(define-public python-twine
13421 (package
13422 (name "python-twine")
13423 (version "1.9.1")
13424 (source
13425 (origin
13426 (method url-fetch)
13427 (uri (pypi-uri "twine" version))
13428 (sha256
13429 (base32
13430 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
13431 (build-system python-build-system)
13432 (propagated-inputs
13433 `(("python-tqdm" ,python-tqdm)
13434 ("python-pkginfo" ,python-pkginfo)
13435 ("python-requests" ,python-requests)
13436 ("python-requests-toolbelt" ,python-requests-toolbelt)))
13437 (home-page "https://github.com/pypa/twine")
13438 (synopsis "Collection of utilities for interacting with PyPI")
13439 (description
13440 "@code{twine} currently supports registering projects and uploading
13441distributions. It authenticates the user over HTTPS, allows them to pre-sign
13442their files and supports any packaging format (including wheels).")
13443 (license license:asl2.0)))
13444
13445(define-public python2-twine
13446 (package-with-python2 python-twine))
13447
13448(define-public python-linecache2
13449 (package
13450 (name "python-linecache2")
13451 (version "1.0.0")
13452 (source
13453 (origin
13454 (method url-fetch)
13455 (uri (pypi-uri "linecache2" version))
13456 (sha256
13457 (base32
13458 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
13459 (build-system python-build-system)
13460 (arguments
13461 `(;; The tests depend on unittest2, and our version is a bit too old.
13462 #:tests? #f))
13463 (native-inputs
13464 `(("python-pbr" ,python-pbr-minimal)))
13465 (home-page
13466 "https://github.com/testing-cabal/linecache2")
13467 (synopsis "Backports of the linecache module")
13468 (description
13469 "The linecache module allows one to get any line from any file, while
13470attempting to optimize internally, using a cache, the common case where many
13471lines are read from a single file.")
13472 (license license:psfl)))
13473
13474(define-public python2-linecache2
13475 (package-with-python2 python-linecache2))
13476
13477(define-public python-traceback2
13478 (package
13479 (name "python-traceback2")
13480 (version "1.4.0")
13481 (source
13482 (origin
13483 (method url-fetch)
13484 (uri (pypi-uri "traceback2" version))
13485 (sha256
13486 (base32
13487 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
13488 (build-system python-build-system)
13489 (arguments
13490 `(;; python-traceback2 and python-unittest2 depend on one another.
13491 #:tests? #f))
13492 (native-inputs
13493 `(("python-pbr" ,python-pbr-minimal)))
13494 (propagated-inputs
13495 `(("python-linecache2" ,python-linecache2)))
13496 (home-page
13497 "https://github.com/testing-cabal/traceback2")
13498 (synopsis "Backports of the traceback module")
13499 (description
13500 "This module provides a standard interface to extract, format and print
13501stack traces of Python programs. It exactly mimics the behavior of the Python
13502interpreter when it prints a stack trace.")
13503 (license license:psfl)))
13504
13505(define-public python2-traceback2
13506 (package-with-python2 python-traceback2))
13507
13508(define-public python-ratelimiter
13509 (package
13510 (name "python-ratelimiter")
13511 (version "1.2.0")
13512 (source
13513 (origin
13514 (method url-fetch)
13515 (uri (pypi-uri "ratelimiter" version))
13516 (sha256
13517 (base32
13518 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
13519 (build-system python-build-system)
13520 (arguments
13521 '(#:tests? #f)) ; There are no tests in the pypi archive.
13522 (home-page "https://github.com/RazerM/ratelimiter")
13523 (synopsis "Simple rate limiting object")
13524 (description
13525 "The @code{ratelimiter} module ensures that an operation will not be
13526executed more than a given number of times during a given period.")
13527 (license license:asl2.0)))
13528
13529(define-public python2-ratelimiter
13530 (package-with-python2 python-ratelimiter))
13531
13532(define-public python-dukpy
13533 (package
13534 (name "python-dukpy")
13535 (version "0.3")
13536 (source
13537 (origin
5b77ebe1
TGR
13538 (method git-fetch)
13539 (uri (git-reference
13540 (url "https://github.com/kovidgoyal/dukpy.git")
13541 (commit (string-append "v" version))))
13542 (file-name (git-file-name name version))
44d10b1f 13543 (sha256
5b77ebe1 13544 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
44d10b1f
RW
13545 (build-system python-build-system)
13546 (home-page "https://github.com/kovidgoyal/dukpy")
13547 (synopsis "Run JavaScript in python")
13548 (description
13549 "dukpy is a JavaScript runtime environment for Python using the duktape
13550embeddable JavaScript engine.")
13551 ;; Dukpy is licensed under MIT like the embedded duktape library,
13552 ;; with 'errors.c' as GPL3.
13553 (license (list license:expat license:gpl3))))
13554
13555(define-public python2-dukpy
13556 (package-with-python2 python-dukpy))
13557
13558(define-public python-jsonrpclib-pelix
13559 (package
13560 (name "python-jsonrpclib-pelix")
13561 (version "0.3.2")
13562 (source
13563 (origin
13564 (method url-fetch)
13565 (uri (pypi-uri "jsonrpclib-pelix" version))
13566 (sha256
13567 (base32
13568 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
13569 (build-system python-build-system)
13570 (arguments
13571 `(#:tests? #f)) ; no tests in PyPI tarball
13572 (home-page "https://github.com/tcalmant/jsonrpclib/")
13573 (synopsis "JSON-RPC 2.0 client library for Python")
13574 (description
13575 "This library implements the JSON-RPC v2.0
13576specification (backwards-compatible) as a client library for Python. This
13577version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
13578services.")
13579 (license license:asl2.0)))
13580
13581(define-public python2-jsonrpclib-pelix
13582 (package-with-python2 python-jsonrpclib-pelix))
13583
13584(define-public python-setuptools-scm-git-archive
13585 (package
13586 (name "python-setuptools-scm-git-archive")
13587 (version "1.0")
13588 (source
13589 (origin
13590 (method url-fetch)
13591 (uri (pypi-uri "setuptools_scm_git_archive" version))
13592 (sha256
13593 (base32
13594 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
13595 (build-system python-build-system)
13596 (native-inputs
13597 `(("python-pytest" ,python-pytest)))
13598 (propagated-inputs
13599 `(("python-setuptools-scm" ,python-setuptools-scm)))
13600 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
13601 (synopsis "Setuptools_scm plugin for git archives")
13602 (description
13603 "The setuptools_scm_git_archive package is a plugin to
13604setuptools_scm, which supports obtaining versions from git archives that
13605belong to tagged versions.")
13606 (license license:expat)))
13607
13608(define-public python2-setuptools-scm-git-archive
13609 (package-with-python2 python-setuptools-scm-git-archive))
13610
724a350c
RW
13611(define-public python-setuptools-git
13612 (package
13613 (name "python-setuptools-git")
13614 (version "1.2")
13615 (source
13616 (origin
13617 (method url-fetch)
13618 (uri (pypi-uri "setuptools-git" version))
13619 (sha256
13620 (base32
13621 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
13622 (build-system python-build-system)
13623 (arguments
13624 `(#:phases
13625 (modify-phases %standard-phases
13626 ;; This is needed for tests.
13627 (add-after 'unpack 'configure-git
13628 (lambda _
13629 (setenv "HOME" "/tmp")
13630 (invoke "git" "config" "--global" "user.email" "guix")
13631 (invoke "git" "config" "--global" "user.name" "guix")
13632 #t)))))
13633 (native-inputs
13634 `(("git" ,git-minimal)))
13635 (home-page "https://github.com/msabramo/setuptools-git")
13636 (synopsis "Setuptools revision control system plugin for Git")
13637 (description
13638 "This package provides a plugin for Setuptools for revision control with
13639Git.")
13640 (license license:bsd-3)))
13641
44d10b1f
RW
13642(define-public python-pyclipper
13643 (package
13644 (name "python-pyclipper")
13645 (version "1.1.0.post1")
13646 (source
13647 (origin
13648 (method url-fetch)
13649 (uri (pypi-uri "pyclipper" version ".zip"))
13650 (sha256
13651 (base32
13652 "0ldbkbnx94an4zzrwb1sxmg6k0jgk4cwmvcdyy8y5k1zslc612wa"))
13653 (modules '((guix build utils)))
13654 (snippet
13655 '(begin
13656 ;; This file is generated by Cython.
13657 (delete-file "pyclipper/pyclipper.cpp") #t))))
13658 (build-system python-build-system)
13659 (arguments
13660 `(#:phases
13661 (modify-phases %standard-phases
13662 (add-before 'build 'cythonize-sources
13663 (lambda _
13664 (with-directory-excursion "pyclipper"
13665 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
13666 (propagated-inputs
13667 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
13668 (native-inputs
13669 `(("python-cython" ,python-cython)
13670 ("python-pytest" ,python-pytest)
13671 ("python-pytest-runner" ,python-pytest-runner)
13672 ("python-unittest2" ,python-unittest2)
13673 ("unzip" ,unzip)))
13674 (home-page "https://github.com/greginvm/pyclipper")
13675 (synopsis "Wrapper for Angus Johnson's Clipper library")
13676 (description
13677 "Pyclipper is a Cython wrapper for the C++ translation of the
13678Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
13679 (license license:expat)))
13680
13681(define-public python2-pyclipper
13682 (package-with-python2 python-pyclipper))
13683
13684(define-public python2-booleanoperations
13685 (package
13686 (name "python2-booleanoperations")
13687 (version "0.7.1")
13688 (source
13689 (origin
13690 (method url-fetch)
13691 (uri (pypi-uri "booleanOperations" version ".zip"))
13692 (sha256
13693 (base32
13694 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
13695 (build-system python-build-system)
13696 (arguments
13697 `(#:python ,python-2))
13698 (native-inputs
13699 `(("unzip" ,unzip)
13700 ("python2-pytest" ,python2-pytest)
13701 ("python2-pytest-runner" ,python2-pytest-runner)))
13702 (propagated-inputs
13703 `(("python-fonttools" ,python2-fonttools)
13704 ("python-pyclipper" ,python2-pyclipper)
13705 ("python-ufolib" ,python2-ufolib)))
13706 (home-page "https://github.com/typemytype/booleanOperations")
13707 (synopsis "Boolean operations on paths")
13708 (description
13709 "BooleanOperations provides a Python library that enables
13710boolean operations on paths.")
13711 (license license:expat)))
13712
13713(define-public python-tempdir
13714 (package
13715 (name "python-tempdir")
13716 (version "0.7.1")
13717 (source
13718 (origin
13719 (method url-fetch)
13720 (uri (pypi-uri "tempdir" version))
13721 (sha256
13722 (base32
13723 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
13724 (build-system python-build-system)
13725 (home-page "https://pypi.org/project/tempdir/")
13726 (arguments
13727 ;; the package has no tests
13728 '(#:tests? #f))
13729 (synopsis "Python library for managing temporary directories")
13730 (description
13731 "This library manages temporary directories that are automatically
13732deleted with all their contents when they are no longer needed. It is
13733particularly convenient for use in tests.")
13734 (license license:expat)))
13735
13736(define-public python2-tempdir
13737 (package-with-python2 python-tempdir))
13738
13739(define-public python-activepapers
13740 (package
13741 (name "python-activepapers")
13742 (version "0.2.2")
13743 (source
13744 (origin
13745 (method url-fetch)
13746 (uri (pypi-uri "ActivePapers.Py" version))
13747 (sha256
13748 (base32
13749 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
13750 (build-system python-build-system)
13751 (arguments
13752 `(#:modules ((ice-9 ftw)
13753 (srfi srfi-1)
13754 (guix build utils)
13755 (guix build python-build-system))
13756
13757 #:phases
13758 (modify-phases %standard-phases
13759 (add-after 'unpack 'delete-python2-code
13760 (lambda _
13761 (for-each delete-file
13762 '("lib/activepapers/builtins2.py"
13763 "lib/activepapers/standardlib2.py"
13764 "lib/activepapers/utility2.py"))))
13765 (replace 'check
13766 (lambda _
13767 ;; Deactivate the test cases that download files
13768 (setenv "NO_NETWORK_ACCESS" "1")
13769 ;; For some strange reason, some tests fail if nosetests runs all
13770 ;; test modules in a single execution. They pass if each test
13771 ;; module is run individually.
13772 (for-each (lambda (filename)
13773 (invoke "nosetests"
13774 (string-append "tests/" filename)))
13775 (scandir "tests"
13776 (lambda (filename)
13777 (string-suffix? ".py" filename)))))))))
13778 (native-inputs
13779 `(("python-tempdir" ,python-tempdir)
13780 ("python-nose" ,python-nose)))
13781 (propagated-inputs
13782 `(("python-h5py" ,python-h5py)))
13783 (home-page "http://www.activepapers.org/")
13784 (synopsis "Executable papers for scientific computing")
13785 (description
13786 "ActivePapers is a tool for working with executable papers, which
13787combine data, code, and documentation in single-file packages,
13788suitable for publication as supplementary material or on repositories
13789such as figshare or Zenodo.")
13790 (properties `((python2-variant . ,(delay python2-activepapers))))
13791 (license license:bsd-3)))
13792
13793(define-public python2-activepapers
13794 (let ((base (package-with-python2
13795 (strip-python2-variant python-activepapers))))
13796 (package
13797 (inherit base)
13798 (arguments
13799 (substitute-keyword-arguments (package-arguments base)
13800 ((#:phases phases)
13801 `(modify-phases ,phases
13802 (delete 'delete-python2-code)
13803 (add-after 'unpack 'delete-python3-code
13804 (lambda _
13805 (for-each delete-file
13806 '("lib/activepapers/builtins3.py"
13807 "lib/activepapers/standardlib3.py"
13808 "lib/activepapers/utility3.py")))))))))))
13809
13810(define-public python-semver
13811 (package
13812 (name "python-semver")
13813 (version "2.7.9")
13814 (source
13815 (origin
13816 (method url-fetch)
13817 (uri (pypi-uri "semver" version))
13818 (sha256
13819 (base32
13820 "0hhgqppchv59rqj0yzi1prdg2nfsywqmjsqy2rycyxm0hvxmbyqz"))))
13821 (build-system python-build-system)
13822 (arguments
13823 `(#:phases
13824 (modify-phases %standard-phases
13825 (add-after 'unpack 'patch-test-requirements
13826 (lambda _
13827 (substitute* "setup.py"
13828 ;; Our Python is new enough.
13829 (("'virtualenv<14\\.0\\.0'") "'virtualenv'"))
13830 #t)))))
13831 (native-inputs
13832 `(("python-tox" ,python-tox)
13833 ("python-virtualenv" ,python-virtualenv)))
13834 (home-page "https://github.com/k-bx/python-semver")
13835 (synopsis "Python helper for Semantic Versioning")
13836 (description "This package provides a Python library for
13837@url{Semantic Versioning, http://semver.org/}.")
13838 (license license:bsd-3)))
13839
13840(define-public python2-semver
13841 (package-with-python2 python-semver))
13842
13843(define-public python-pyro4
13844 (package
13845 (name "python-pyro4")
ad1acb81 13846 (version "4.75")
44d10b1f
RW
13847 (source
13848 (origin
13849 (method url-fetch)
13850 (uri (pypi-uri "Pyro4" version))
13851 (sha256
ad1acb81 13852 (base32 "1dfpp36imddx19yv0kd28gk1l71ckhpqy6jd590wpm2680jw15rq"))))
44d10b1f
RW
13853 (build-system python-build-system)
13854 (propagated-inputs
13855 `(("python-serpent" ,python-serpent)))
13856 (home-page "https://pyro4.readthedocs.io")
13857 (synopsis "Distributed object middleware for Python")
13858 (description
13859 "Pyro enables you to build applications in which objects can talk to each
13860other over the network. You can just use normal Python method calls to call
13861objects on other machines, also known as remote procedure calls (RPC).")
13862 (license license:expat)))
13863
13864(define-public python2-pyro
13865 (package
13866 (name "python2-pyro")
13867 (version "3.16")
13868 (source
13869 (origin
13870 (method url-fetch)
13871 (uri (pypi-uri "Pyro" version))
13872 (file-name (string-append "Pyro-" version ".tar.gz"))
13873 (sha256
13874 (base32
13875 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
13876 (build-system python-build-system)
13877 (arguments
13878 ;; Pyro is not compatible with Python 3
13879 `(#:python ,python-2
13880 ;; Pyro has no test cases for automatic execution
13881 #:tests? #f))
13882 (home-page "http://pythonhosted.org/Pyro/")
13883 (synopsis "Distributed object manager for Python")
13884 (description "Pyro is a Distributed Object Technology system
13885written in Python that is designed to be easy to use. It resembles
13886Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
13887which is a system and language independent Distributed Object Technology
13888and has much more to offer than Pyro or RMI. Pyro 3.x is no
13889longer maintained. New projects should use Pyro4 instead, which
13890is the new Pyro version that is actively developed.")
13891 (license license:expat)))
13892
13893(define-public python2-scientific
13894 (package
13895 (name "python2-scientific")
13896 (version "2.9.4")
13897 (source
13898 (origin
13899 (method url-fetch)
13900 (uri (string-append "https://bitbucket.org/khinsen/"
13901 "scientificpython/downloads/ScientificPython-"
13902 version ".tar.gz"))
13903 (file-name (string-append "ScientificPython-" version ".tar.gz"))
13904 (sha256
13905 (base32
13906 "0fc69zhlsn9d2jvbzyjl9ah53vj598h84nkq230c83ahfvgzx5y3"))))
13907 (build-system python-build-system)
13908 (inputs
13909 `(("netcdf" ,netcdf)))
13910 (propagated-inputs
13911 `(("python-numpy" ,python2-numpy-1.8)
13912 ("python-pyro" ,python2-pyro)))
13913 (arguments
13914 ;; ScientificPython is not compatible with Python 3
13915 `(#:python ,python-2
13916 #:tests? #f ; No test suite
13917 #:phases
13918 (modify-phases %standard-phases
13919 (replace 'build
13920 (lambda* (#:key inputs #:allow-other-keys)
77e61e25
RW
13921 (invoke "python" "setup.py" "build"
13922 (string-append "--netcdf_prefix="
13923 (assoc-ref inputs "netcdf"))))))))
44d10b1f
RW
13924 (home-page "https://bitbucket.org/khinsen/scientificpython")
13925 (synopsis "Python modules for scientific computing")
13926 (description "ScientificPython is a collection of Python modules that are
13927useful for scientific computing. Most modules are rather general (Geometry,
13928physical units, automatic derivatives, ...) whereas others are more
13929domain-specific (e.g. netCDF and PDB support). The library is currently
13930not actively maintained and works only with Python 2 and NumPy < 1.9.")
13931 (license license:cecill-c)))
13932
13933(define-public python2-mmtk
13934 (package
13935 (name "python2-mmtk")
13936 (version "2.7.11")
13937 (source
13938 (origin
13939 (method url-fetch)
13940 (uri (string-append "https://bitbucket.org/khinsen/"
13941 "mmtk/downloads/MMTK-" version ".tar.gz"))
13942 (file-name (string-append "MMTK-" version ".tar.gz"))
13943 (sha256
13944 (base32
13945 "1d0nnjx4lwsvh8f99vv1r6gi50d93yba0adkz8b4zgv4za4c5862"))))
13946 (build-system python-build-system)
13947 (native-inputs
13948 `(("netcdf" ,netcdf)))
13949 (propagated-inputs
13950 `(("python-scientific" ,python2-scientific)
13951 ("python-tkinter" ,python-2 "tk")))
13952 (arguments
13953 `(#:python ,python-2
13954 #:tests? #f
13955 #:phases
13956 (modify-phases %standard-phases
13957 (add-before 'build 'includes-from-scientific
13958 (lambda* (#:key inputs #:allow-other-keys)
13959 (mkdir-p "Include/Scientific")
13960 (copy-recursively
13961 (string-append
13962 (assoc-ref inputs "python-scientific")
13963 "/include/python2.7/Scientific")
13964 "Include/Scientific"))))))
13965 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
13966 (synopsis "Python library for molecular simulation")
13967 (description "MMTK is a library for molecular simulations with an emphasis
13968on biomolecules. It provides widely used methods such as Molecular Dynamics
13969and normal mode analysis, but also basic routines for implementing new methods
13970for simulation and analysis. The library is currently not actively maintained
13971and works only with Python 2 and NumPy < 1.9.")
13972 (license license:cecill-c)))
13973
13974(define-public python-phonenumbers
13975 (package
13976 (name "python-phonenumbers")
13977 (version "8.9.1")
13978 (source
13979 (origin
13980 (method url-fetch)
13981 (uri (pypi-uri "phonenumbers" version))
13982 (sha256
13983 (base32
13984 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
13985 (build-system python-build-system)
13986 (home-page
13987 "https://github.com/daviddrysdale/python-phonenumbers")
13988 (synopsis
13989 "Python library for dealing with international phone numbers")
13990 (description
13991 "This package provides a Python port of Google's libphonenumber library.")
13992 (license license:asl2.0)))
13993
13994(define-public python2-phonenumbers
13995 (package-with-python2 python-phonenumbers))
13996
13997(define-public python-send2trash
13998 (package
13999 (name "python-send2trash")
d9b0216b 14000 (version "1.5.0")
44d10b1f 14001 (source
d9b0216b 14002 (origin (method git-fetch)
44d10b1f 14003 ;; Source tarball on PyPI doesn't include tests.
d9b0216b
RW
14004 (uri (git-reference
14005 (url "https://github.com/hsoft/send2trash.git")
14006 (commit version)))
14007 (file-name (git-file-name name version))
44d10b1f
RW
14008 (sha256
14009 (base32
d9b0216b 14010 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
44d10b1f
RW
14011 (build-system python-build-system)
14012 (arguments
14013 '(#:phases
14014 (modify-phases %standard-phases
14015 (add-before 'check 'pre-check
14016 (lambda _
14017 (mkdir-p "/tmp/foo")
14018 (setenv "HOME" "/tmp/foo")
14019 #t)))))
14020 (home-page "https://github.com/hsoft/send2trash")
14021 (synopsis "Send files to the user's @file{~/Trash} directory")
14022 (description "This package provides a Python library to send files to the
14023user's @file{~/Trash} directory.")
20b3fde7 14024 (properties `((python2-variant . ,(delay python2-send2trash))))
44d10b1f
RW
14025 (license license:bsd-3)))
14026
14027(define-public python2-send2trash
14028 (package
f32164ab 14029 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
44d10b1f
RW
14030 (arguments
14031 (substitute-keyword-arguments (package-arguments python-send2trash)
14032 ((#:phases phases)
14033 `(modify-phases ,phases
14034 (add-before 'check 'setenv
14035 (lambda _
14036 (setenv "PYTHONPATH"
14037 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
4782a06f 14038 #t))))))))
44d10b1f
RW
14039
14040(define-public python-yapf
14041 (package
14042 (name "python-yapf")
14043 (version "0.24.0")
14044 (source
14045 (origin
14046 (method url-fetch)
14047 (uri (pypi-uri "yapf" version))
14048 (sha256
14049 (base32
14050 "0anwby0ydmyzcsgjc5dn1ryddwvii4dq61vck447q0n96npnzfyf"))))
14051 (build-system python-build-system)
14052 (home-page "https://github.com/google/yapf")
14053 (synopsis "Formatter for Python code")
14054 (description "YAPF is a formatter for Python code. It's based off of
14055@dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
14056takes the code and reformats it to the best formatting that conforms to the
14057style guide, even if the original code didn't violate the style guide.")
14058 (license license:asl2.0)))
14059
14060(define-public python2-yapf
14061 (package-with-python2 python-yapf))
14062
14063(define-public python-gyp
14064 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
14065 (revision "0"))
14066 (package
14067 (name "python-gyp")
14068 ;; Google does not release versions,
14069 ;; based on second most recent commit date.
14070 (version (git-version "0.0.0" revision commit))
14071 (source
14072 (origin
14073 ;; Google does not release tarballs,
14074 ;; git checkout is needed.
14075 (method git-fetch)
14076 (uri (git-reference
14077 (url "https://chromium.googlesource.com/external/gyp")
14078 (commit commit)))
14079 (file-name (git-file-name name version))
14080 (sha256
14081 (base32
14082 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
14083 (build-system python-build-system)
14084 (home-page "https://gyp.gsrc.io/")
14085 (synopsis "GYP is a Meta-Build system")
14086 (description
14087 "GYP builds build systems for large, cross platform applications.
14088It can be used to generate XCode projects, Visual Studio projects, Ninja build
14089files, and Makefiles.")
14090 (license license:bsd-3))))
14091
14092(define-public python2-gyp
14093 (package-with-python2 python-gyp))
14094
14095(define-public python-whatever
14096 (package
14097 (name "python-whatever")
14098 (version "0.5")
14099 (source
14100 (origin
14101 (method url-fetch)
14102 (uri (string-append "https://github.com/Suor/whatever/archive/" version
14103 ".tar.gz"))
14104 (sha256
14105 (base32
14106 "1iqvnaf0zpc6b4rvbqq4xy45mszcscyzpzknv8wg6j84pbp22sap"))
14107 (file-name (string-append name "-" version ".tar.gz"))))
14108 (build-system python-build-system)
14109 (arguments
14110 `(#:phases
14111 (modify-phases %standard-phases
14112 (replace 'check
14113 (lambda _
14114 (invoke "py.test"))))))
14115 (native-inputs
14116 `(("python-pytest" ,python-pytest)))
14117 (home-page "http://github.com/Suor/whatever")
14118 (synopsis "Make anonymous functions by partial application of operators")
14119 (description "@code{whatever} provides an easy way to make anonymous
14120functions by partial application of operators.")
14121 (license license:bsd-3)))
14122
14123(define-public python2-whatever
14124 (package-with-python2 python-whatever))
14125
14126(define-public python-funcy
14127 (package
14128 (name "python-funcy")
9e396ab8 14129 (version "1.11")
44d10b1f
RW
14130 (source
14131 (origin
a85c6027
TGR
14132 (method git-fetch)
14133 (uri (git-reference
14134 (url "https://github.com/Suor/funcy.git")
14135 (commit version)))
44d10b1f 14136 (sha256
a85c6027
TGR
14137 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
14138 (file-name (git-file-name name version))))
44d10b1f
RW
14139 (build-system python-build-system)
14140 (arguments
14141 `(#:phases
14142 (modify-phases %standard-phases
14143 (replace 'check
14144 (lambda _
14145 (invoke "py.test"))))))
14146 (native-inputs
14147 `(("python-pytest" ,python-pytest)
14148 ("python-whatever" ,python-whatever)))
14149 (home-page "http://github.com/Suor/funcy")
14150 (synopsis "Functional tools")
14151 (description "@code{funcy} is a library that provides functional tools.
14152Examples are:
14153@enumerate
14154@item merge - Merges collections of the same type
14155@item walk - Type-preserving map
14156@item select - Selects a part of a collection
14157@item take - Takes the first n items of a collection
14158@item first - Takes the first item of a collection
14159@item remove - Predicated-removes items of a collection
14160@item concat - Concatenates two collections
14161@item flatten - Flattens a collection with subcollections
14162@item distinct - Returns only distinct items
14163@item split - Predicated-splits a collection
14164@item split_at - Splits a collection at a given item
14165@item group_by - Groups items by group
14166@item pairwise - Pairs off adjacent items
14167@item partial - Partially-applies a function
14168@item curry - Curries a function
14169@item compose - Composes functions
14170@item complement - Complements a predicate
14171@item all_fn - \"all\" with predicate
14172@end enumerate")
14173 (license license:bsd-3)))
14174
14175(define-public python2-funcy
14176 (package-with-python2 python-funcy))
14177
14178(define-public python-isoweek
14179 (package
14180 (name "python-isoweek")
14181 (version "1.3.3")
14182 (source
14183 (origin
14184 (method url-fetch)
14185 (uri (pypi-uri "isoweek" version))
14186 (sha256
14187 (base32
14188 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
14189 (build-system python-build-system)
14190 (home-page "https://github.com/gisle/isoweek")
14191 (synopsis "Objects representing a week")
14192 (description "The @code{isoweek} module provide the class Week that
14193implements the week definition of ISO 8601. This standard also defines
14194a notation for identifying weeks; yyyyWww (where the W is a literal).
14195Week instances stringify to this form.")
14196 (license license:bsd-3)))
14197
14198(define-public python2-isoweek
14199 (package-with-python2 python-isoweek))
14200
14201(define-public python-tokenize-rt
14202 (package
14203 (name "python-tokenize-rt")
14204 (version "2.0.1")
14205 (source
14206 (origin
14207 (method url-fetch)
14208 (uri (pypi-uri "tokenize-rt" version))
14209 (sha256
14210 (base32
14211 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
14212 (build-system python-build-system)
14213 (home-page "https://github.com/asottile/tokenize-rt")
14214 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
14215 (description
14216 "This Python library is a wrapper around @code{tokenize} from the Python
14217standard library. It provides two additional tokens @code{ESCAPED_NL} and
14218@code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
14219and @code{tokens_to_src} to roundtrip.")
14220 (license license:expat)))
14221
14222(define-public python-future-fstrings
14223 (package
14224 (name "python-future-fstrings")
14225 (version "0.4.1")
14226 (source
14227 (origin
14228 (method url-fetch)
14229 (uri (pypi-uri "future_fstrings" version))
14230 (sha256
14231 (base32
14232 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
14233 (build-system python-build-system)
14234 (propagated-inputs
14235 `(("python-tokenize-rt" ,python-tokenize-rt)))
14236 (home-page "https://github.com/asottile/future-fstrings")
14237 (synopsis "Backport of fstrings to Python < 3.6")
14238 (description
14239 "This package provides a UTF-8 compatible encoding
14240@code{future_fstrings}, which performs source manipulation. It decodes the
14241source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
14242@code{f} strings.")
14243 (license license:expat)))
14244
dae2eb1c
MC
14245(define-public python-typed-ast
14246 (package
14247 (name "python-typed-ast")
14248 (version "1.3.5")
14249 (source
14250 (origin
14251 (method url-fetch)
14252 (uri (pypi-uri "typed-ast" version))
14253 (sha256
14254 (base32
14255 "1m7pr6qpana3cvqwiw7mlvrgvmw27ch5mx1592572xhlki8g85ak"))))
14256 (build-system python-build-system)
14257 (arguments
14258 `(#:modules ((guix build utils)
14259 (guix build python-build-system)
14260 (ice-9 ftw)
14261 (srfi srfi-1)
14262 (srfi srfi-26))
14263 #:phases
14264 (modify-phases %standard-phases
14265 (replace 'check
14266 (lambda _
14267 (let ((cwd (getcwd)))
14268 (setenv "PYTHONPATH"
14269 (string-append cwd "/build/"
14270 (find (cut string-prefix? "lib" <>)
14271 (scandir (string-append cwd "/build")))
14272 ":"
14273 (getenv "PYTHONPATH"))))
14274 (invoke "pytest")
14275 #t)))))
14276 (native-inputs `(("python-pytest" ,python-pytest)))
14277 (home-page "https://github.com/python/typed_ast")
14278 (synopsis "Fork of Python @code{ast} modules with type comment support")
14279 (description "This package provides a parser similar to the standard
14280@code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
14281include PEP 484 type comments and are independent of the version of Python
14282under which they are run. The @code{typed_ast} parsers produce the standard
14283Python AST (plus type comments), and are both fast and correct, as they are
14284based on the CPython 2.7 and 3.7 parsers.")
14285 ;; See the file "LICENSE" for the details.
14286 (license (list license:psfl
14287 license:asl2.0
14288 license:expat)))) ;ast27/Parser/spark.py
14289
44d10b1f
RW
14290(define-public python-typing
14291 (package
14292 (name "python-typing")
14293 (version "3.6.6")
14294 (source
14295 (origin
14296 (method url-fetch)
14297 (uri (pypi-uri "typing" version))
14298 (sha256
14299 (base32
14300 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
14301 (build-system python-build-system)
14302 (home-page "https://docs.python.org/3/library/typing.html")
14303 (synopsis "Type hints for Python")
14304 (description "This is a backport of the standard library @code{typing}
14305module to Python versions older than 3.5. Typing defines a standard notation
14306for Python function and variable type annotations. The notation can be used
14307for documenting code in a concise, standard format, and it has been designed
14308to also be used by static and runtime type checkers, static analyzers, IDEs
14309and other tools.")
14310 (license license:psfl)))
14311
14312(define-public python2-typing
14313 (package-with-python2 python-typing))
14314
f89d443b
VC
14315(define-public python-typing-extensions
14316 (package
14317 (name "python-typing-extensions")
14318 (version "3.7.2")
14319 (source
14320 (origin
14321 (method url-fetch)
14322 (uri (pypi-uri "typing_extensions" version))
14323 (sha256
14324 (base32
14325 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
14326 (build-system python-build-system)
14327 (home-page
14328 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
14329 (synopsis "Experimental type hints for Python")
14330 (description
14331 "The typing_extensions module contains additional @code{typing} hints not
14332yet present in the of the @code{typing} standard library.
14333Included are implementations of:
14334@enumerate
14335@item ClassVar
14336@item ContextManager
14337@item Counter
14338@item DefaultDict
14339@item Deque
14340@item NewType
14341@item NoReturn
14342@item overload
14343@item Protocol
14344@item runtime
14345@item Text
14346@item Type
14347@item TYPE_CHECKING
14348@item AsyncGenerator
14349@end enumerate\n")
14350 (license license:psfl)))
14351
44d10b1f
RW
14352(define-public bpython
14353 (package
14354 (name "bpython")
14355 (version "0.17.1")
14356 (source
14357 (origin
14358 (method url-fetch)
14359 (uri (pypi-uri "bpython" version))
14360 (sha256
14361 (base32
14362 "0bxhxi5zxdkrf8b4gwn0d363kdz3qnypjwhm1aydki53ph8ca1w9"))))
14363 (build-system python-build-system)
14364 (arguments
14365 `(#:phases
14366 (modify-phases %standard-phases
14367 (add-after 'unpack 'remove-failing-test
14368 (lambda _
14369 ;; Remove failing test. FIXME: make it pass
14370 (delete-file "bpython/test/test_args.py")
14371 #t))
14372 (add-after 'wrap 'add-aliases
14373 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
14374 (lambda* (#:key outputs #:allow-other-keys)
14375 (let ((out (assoc-ref outputs "out")))
14376 (for-each
14377 (lambda (old new)
14378 (symlink old (string-append out "/bin/" new)))
14379 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
14380 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
14381 #t)))))
14382 (propagated-inputs
14383 `(("python-pygments" ,python-pygments)
14384 ("python-requests" ,python-requests)
14385 ("python-babel" ,python-babel) ; optional, for internationalization
14386 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
14387 ("python-greenlet" ,python-greenlet)
14388 ("python-urwid" ,python-urwid) ; for bpython-urwid only
14389 ("python-six" ,python-six)))
14390 (native-inputs
14391 `(("python-sphinx" ,python-sphinx)
14392 ("python-mock" ,python-mock)))
14393 (home-page "https://bpython-interpreter.org/")
14394 (synopsis "Fancy interface to the Python interpreter")
14395 (description "Bpython is a fancy interface to the Python
14396interpreter. bpython's main features are
14397
14398@enumerate
14399@item in-line syntax highlighting,
14400@item readline-like autocomplete with suggestions displayed as you type,
14401@item expected parameter list for any Python function,
14402@item \"rewind\" function to pop the last line of code from memory and
14403 re-evaluate,
14404@item send the code you've entered off to a pastebin,
14405@item save the code you've entered to a file, and
14406@item auto-indentation.
14407@end enumerate")
14408 (license license:expat)))
14409
14410(define-public bpython2
14411 (let ((base (package-with-python2
14412 (strip-python2-variant bpython))))
14413 (package (inherit base)
14414 (name "bpython2")
14415 (arguments
14416 `(#:python ,python-2
14417 #:phases
14418 (modify-phases %standard-phases
14419 (add-after 'unpack 'remove-failing-test
14420 (lambda _
14421 ;; Remove failing test. FIXME: make it pass
14422 (delete-file "bpython/test/test_args.py")
14423 ;; Disable failing test-cases (renaming inhibits they are
14424 ;; discovered)
14425 (substitute* "bpython/test/test_curtsies_repl.py"
14426 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
14427 (string-append a "xxx_off_" b))
14428 (("^(\\s*def )(test_complex\\W)" _ a b)
14429 (string-append a "xxx_off_" b)))
14430 #t))
14431 (add-before 'build 'rename-scripts
14432 ;; rename the scripts to bypthon2, bpdb2, etc.
14433 (lambda _
14434 (substitute* "setup.py"
14435 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
14436 (string-append name "2" rest "\n"))
14437 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
14438 (string-append name "2" (or sub "") rest "\n")))
14439 #t))))))))
14440
14441(define-public python-pyinotify
14442 (package
14443 (name "python-pyinotify")
14444 (version "0.9.6")
14445 (source (origin
14446 (method url-fetch)
14447 (uri (pypi-uri "pyinotify" version))
14448 (sha256
14449 (base32
14450 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
14451 (build-system python-build-system)
14452 (arguments `(#:tests? #f)) ;no tests
14453 (home-page "https://github.com/seb-m/pyinotify")
14454 (synopsis "Python library for monitoring inotify events")
14455 (description
14456 "@code{pyinotify} provides a Python interface for monitoring
14457file system events on Linux.")
14458 (license license:expat)))
14459
14460(define-public python2-pyinotify
14461 (package-with-python2 python-pyinotify))
14462
14463;; Ada parser uses this version.
14464(define-public python2-quex-0.67.3
14465 (package
14466 (name "python2-quex")
14467 (version "0.67.3")
14468 (source
14469 (origin
14470 (method url-fetch)
14471 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
14472 (version-major+minor version)
14473 "/quex-" version ".zip"))
14474 (sha256
14475 (base32
14476 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
14477 (build-system python-build-system)
14478 (native-inputs
14479 `(("unzip" ,unzip)))
14480 (arguments
14481 `(#:python ,python-2
14482 #:tests? #f
14483 #:phases
14484 (modify-phases %standard-phases
14485 (delete 'configure)
14486 (delete 'build)
14487 (replace 'install
14488 (lambda* (#:key outputs #:allow-other-keys)
14489 (let* ((out (assoc-ref outputs "out"))
14490 (share/quex (string-append out "/share/quex"))
14491 (bin (string-append out "/bin")))
14492 (copy-recursively "." share/quex)
14493 (mkdir-p bin)
14494 (symlink (string-append share/quex "/quex-exe.py")
14495 (string-append bin "/quex"))
14496 #t))))))
14497 (native-search-paths
14498 (list (search-path-specification
14499 (variable "QUEX_PATH")
14500 (files '("share/quex")))))
14501 (home-page "http://quex.sourceforge.net/")
14502 (synopsis "Lexical analyzer generator in Python")
14503 (description "@code{quex} is a lexical analyzer generator in Python.")
14504 (license license:lgpl2.1+))) ; Non-military
14505
14506(define-public python2-quex
14507 (package (inherit python2-quex-0.67.3)
14508 (name "python2-quex")
14509 (version "0.68.1")
14510 (source
14511 (origin
14512 (method url-fetch)
14513 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
14514 (sha256
14515 (base32
14516 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
14517 (file-name (string-append name "-" version ".tar.gz"))))))
14518
14519(define-public python-more-itertools
14520 (package
14521 (name "python-more-itertools")
14522 (version "4.3.0")
14523 (source
14524 (origin
14525 (method url-fetch)
14526 (uri (pypi-uri "more-itertools" version))
14527 (sha256
14528 (base32
14529 "17h3na0rdh8xq30w4b9pizgkdxmm51896bxw600x84jflg9vaxn4"))))
14530 (build-system python-build-system)
14531 (arguments
14532 `(,@(if (any (cute string-prefix? <> (or (%current-system)
14533 (%current-target-system)))
14534 '("armhf" "i686"))
14535 '(#:phases
14536 (modify-phases %standard-phases
14537 ;; This is required for 32-bit hardware.
14538 ;; TODO: Try to remove this when upgrading.
14539 (add-after 'unpack 'patch-test
14540 (lambda _
14541 (substitute* "more_itertools/tests/test_more.py"
14542 (("10 \\*\\* 10") "9 ** 9"))
14543 #t))))
14544 '())))
14545 (propagated-inputs
14546 `(("python-six" ,python-six-bootstrap)))
14547 (home-page "https://github.com/erikrose/more-itertools")
14548 (synopsis "More routines for operating on iterables, beyond itertools")
14549 (description "Python's built-in @code{itertools} module implements a
14550number of iterator building blocks inspired by constructs from APL, Haskell,
14551and SML. @code{more-itertools} includes additional building blocks for
14552working with iterables.")
14553 (license license:expat)))
14554
14555(define-public python2-more-itertools
14556 (package-with-python2 python-more-itertools))
14557
14558(define-public python-latexcodec
14559 (package
14560 (name "python-latexcodec")
91b61f02 14561 (version "1.0.6")
44d10b1f
RW
14562 (source
14563 (origin
14564 (method url-fetch)
14565 (uri (pypi-uri "latexcodec" version))
14566 (sha256
91b61f02 14567 (base32 "0s4wdbg0w2l8pj3i0y4510i0s04p8nhxcsa2z41bjsv0k66npb81"))))
44d10b1f
RW
14568 (build-system python-build-system)
14569 (inputs
14570 `(("python-six" ,python-six)))
14571 (home-page "https://readthedocs.org/projects/latexcodec/")
14572 (synopsis "Work with LaTeX code in Python")
14573 (description "Lexer and codec to work with LaTeX code in Python.")
14574 (license license:expat)))
14575
14576(define-public python-pybtex
14577 (package
14578 (name "python-pybtex")
14579 (version "0.21")
14580 (source
14581 (origin
14582 (method url-fetch)
14583 (uri (pypi-uri "pybtex" version))
14584 (sha256
14585 (base32
14586 "00300j8dn5pxq4ndxmfmbmycg2znawkqs49val2x6jlmfiy6r2mg"))))
14587 (build-system python-build-system)
14588 (native-inputs
14589 `(("python-nose" ,python-nose)))
14590 (inputs
14591 `(("python-latexcodec" ,python-latexcodec)
14592 ("python-pyyaml" ,python-pyyaml)
14593 ("python-six" ,python-six)))
14594 (arguments
14595 `(#:test-target "nosetests"))
14596 (home-page "https://pybtex.org/")
14597 (synopsis "BibTeX-compatible bibliography processor")
14598 (description "Pybtex is a BibTeX-compatible bibliography processor written
14599in Python. You can simply type pybtex instead of bibtex.")
14600 (license license:expat)))
14601
14602(define-public python-onetimepass
14603 (package
14604 (name "python-onetimepass")
14605 (version "1.0.1")
14606 (source
14607 (origin
14608 (method url-fetch)
14609 (uri (pypi-uri "onetimepass" version))
14610 (sha256
14611 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
14612 (build-system python-build-system)
14613 (propagated-inputs `(("python-six" ,python-six)))
14614 (home-page "https://github.com/tadeck/onetimepass/")
14615 (synopsis "One-time password library")
14616 (description "Python one-time password library for HMAC-based (HOTP) and
14617time-based (TOTP) passwords.")
14618 (license license:expat)))
14619
14620(define-public python-parso
14621 (package
14622 (name "python-parso")
14623 (version "0.3.1")
14624 (source
14625 (origin
14626 (method url-fetch)
14627 (uri (pypi-uri "parso" version))
14628 (sha256
14629 (base32
14630 "18p89iwcm8mnf380f92g9w0bhx5km8wxp392vvjcq4y1ld1llw1m"))))
14631 (native-inputs
14632 `(("python-pytest" ,python-pytest)))
14633 (build-system python-build-system)
14634 (home-page "https://github.com/davidhalter/parso")
14635 (synopsis "Python Parser")
14636 (description "Parso is a Python parser that supports error recovery and
14637round-trip parsing for different Python versions (in multiple Python versions).
14638Parso is also able to list multiple syntax errors in your Python file.")
14639 (license license:expat)))
14640
14641(define-public python2-parso
14642 (package-with-python2 python-parso))
14643
14644(define-public python-async-generator
14645 (package
14646 (name "python-async-generator")
94fcbf8d 14647 (version "1.10")
44d10b1f
RW
14648 (source
14649 (origin
14650 (method url-fetch)
14651 (uri (pypi-uri "async_generator" version))
14652 (sha256
14653 (base32
94fcbf8d 14654 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
44d10b1f
RW
14655 (build-system python-build-system)
14656 (native-inputs
14657 `(("python-pytest" ,python-pytest)))
14658 (home-page "https://github.com/python-trio/async_generator")
14659 (synopsis "Async generators and context managers for Python 3.5+")
14660 (description "@code{async_generator} back-ports Python 3.6's native async
14661generators and Python 3.7's context managers into Python 3.5.")
14662 ;; Dual licensed.
14663 (license (list license:expat license:asl2.0))))
14664
14665(define-public python-async-timeout
14666 (package
14667 (name "python-async-timeout")
14668 (version "3.0.1")
14669 (source
14670 (origin
14671 (method url-fetch)
14672 (uri (pypi-uri "async-timeout" version))
14673 (sha256
14674 (base32
14675 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
14676 (build-system python-build-system)
14677 (home-page "https://github.com/aio-libs/async_timeout/")
14678 (synopsis "Timeout context manager for asyncio programs")
14679 (description "@code{async-timeout} provides a timeout timeout context
14680manager compatible with @code{asyncio}.")
14681 (license license:asl2.0)))
14682
14683(define-public python-glob2
14684 (package
14685 (name "python-glob2")
14686 (version "0.6")
8fa2bcc7
TGR
14687 (source
14688 (origin
14689 (method git-fetch)
14690 (uri (git-reference
14691 (url "https://github.com/miracle2k/python-glob2.git")
14692 (commit version)))
14693 (file-name (git-file-name name version))
14694 (sha256
14695 (base32 "1lm1xz3k3l0k1c5bcp9hlzmi3gp5j8dl1k3xhpiq5mnm0xq6n163"))))
44d10b1f
RW
14696 (build-system python-build-system)
14697 (home-page "https://github.com/miracle2k/python-glob2/")
14698 (synopsis "Extended Version of the python buildin glob module")
14699 (description "This is an extended version of the Python
14700@url{http://docs.python.org/library/glob.html, built-in glob module} which
14701adds:
14702
14703@itemize
14704@item The ability to capture the text matched by glob patterns, and return
14705those matches alongside the file names.
14706@item A recursive @code{**} globbing syntax, akin for example to the
14707@code{globstar} option of Bash.
14708@item The ability to replace the file system functions used, in order to glob
14709on virtual file systems.
14710@item Compatible with Python 2 and Python 3 (tested with 3.3).
14711@end itemize
14712
14713Glob2 currently based on the glob code from Python 3.3.1.")
14714 (license license:bsd-2)))
14715
14716(define-public python2-glob2
14717 (package-with-python2 python-glob2))
14718
14719(define-public python-gipc
14720 (package
14721 (name "python-gipc")
14722 (version "0.6.0")
14723 (source
14724 (origin
14725 (method url-fetch)
14726 (uri (pypi-uri "gipc" version ".zip"))
14727 (sha256
14728 (base32
14729 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
14730 (build-system python-build-system)
14731 (native-inputs
14732 `(("unzip" ,unzip)))
14733 (propagated-inputs
14734 `(("python-gevent" ,python-gevent)))
14735 (home-page "http://gehrcke.de/gipc")
14736 (synopsis "Child process management in the context of gevent")
14737 (description "Usage of Python's multiprocessing package in a
14738gevent-powered application may raise problems. With @code{gipc},
14739process-based child processes can safely be created anywhere within a
14740gevent-powered application.")
14741 (license license:expat)))
14742
14743(define-public python2-gipc
14744 (package-with-python2 python-gipc))
14745
14746(define-public python-fusepy
14747 (package
14748 (name "python-fusepy")
14749 (version "2.0.4")
14750 (source
14751 (origin
14752 (method url-fetch)
14753 (uri (pypi-uri "fusepy" version))
14754 (sha256
14755 (base32
14756 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
14757 (build-system python-build-system)
14758 (arguments
14759 `(#:phases
14760 (modify-phases %standard-phases
14761 (add-before 'build 'set-library-file-name
14762 (lambda* (#:key inputs #:allow-other-keys)
14763 (let ((fuse (assoc-ref inputs "fuse")))
14764 (substitute* "fuse.py"
14765 (("find_library\\('fuse'\\)")
14766 (string-append "'" fuse "/lib/libfuse.so'")))
14767 #t))))))
14768 (propagated-inputs
14769 `(("fuse" ,fuse)))
14770 (home-page "https://github.com/fusepy/fusepy")
14771 (synopsis "Simple ctypes bindings for FUSE")
14772 (description "Python module that provides a simple interface to FUSE and
14773MacFUSE. The binding is created using the standard @code{ctypes} library.")
14774 (license license:isc)))
14775
14776(define-public python2-fusepy
14777 (package-with-python2 python-fusepy))
14778
14779(define-public python2-gdrivefs
14780 (package
14781 (name "python2-gdrivefs")
14782 (version "0.14.9")
14783 (source
14784 (origin
14785 (method url-fetch)
14786 (uri (pypi-uri "gdrivefs" version))
14787 (sha256
14788 (base32
14789 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
14790 (build-system python-build-system)
14791 (arguments
14792 `(#:python ,python-2
14793 #:phases
14794 (modify-phases %standard-phases
14795 (add-before 'build 'patch-setup-py
14796 (lambda _
14797 ;; Update requirements from dependency==version
14798 ;; to dependency>=version
14799 (substitute* "gdrivefs/resources/requirements.txt"
14800 (("==") ">="))
14801 #t)))))
14802 (native-inputs
14803 `(("python2-gipc" ,python2-gipc)
14804 ("python2-gevent" ,python2-gevent)
14805 ("python2-greenlet" ,python2-greenlet)
14806 ("python2-httplib2" ,python2-httplib2)
14807 ("python2-uritemplate" ,python2-uritemplate)
14808 ("python2-oauth2client" ,python2-oauth2client)
14809 ("python2-six" ,python2-six)))
14810 (propagated-inputs
14811 `(("python2-dateutil" ,python2-dateutil)
14812 ("python2-fusepy" ,python2-fusepy)
14813 ("python2-google-api-client" ,python2-google-api-client)))
14814 (home-page "https://github.com/dsoprea/GDriveFS")
14815 (synopsis "Mount Google Drive as a local file system")
14816 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
14817under Python 2.7.")
14818 (license license:gpl2)))
14819
14820(define-public pybind11
14821 (package
14822 (name "pybind11")
14823 (version "2.2.4")
14824 (source (origin
14825 (method git-fetch)
14826 (uri (git-reference
14827 (url "https://github.com/pybind/pybind11.git")
14828 (commit (string-append "v" version))))
14829 (sha256
14830 (base32
14831 "0pa79ymcasv8br5ifbx7878id5py2jpjac3i20cqxr6gs9l6ivlv"))
14832 (file-name (git-file-name name version))))
14833 (build-system cmake-build-system)
14834 (native-inputs
14835 `(("python" ,python)
14836 ("python-pytest" ,python-pytest)))
14837 (arguments
14838 `(#:test-target "check"))
14839 (home-page "https://github.com/pybind/pybind11/")
14840 (synopsis "Seamless operability between C++11 and Python")
14841 (description "pybind11 is a lightweight header-only library that exposes
14842C++ types in Python and vice versa, mainly to create Python bindings of
14843existing C++ code. Its goals and syntax are similar to the excellent
14844Boost.Python library by David Abrahams: to minimize boilerplate code in
14845traditional extension modules by inferring type information using compile-time
14846introspection.")
14847 (license license:expat)))
14848
14849(define-public python-fasteners
14850 (package
14851 (name "python-fasteners")
14852 (version "0.14.1")
14853 (source
14854 (origin
14855 (method url-fetch)
14856 (uri (pypi-uri "fasteners" version))
14857 (sha256
14858 (base32
14859 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
14860 (build-system python-build-system)
14861 (propagated-inputs
14862 `(("python-monotonic" ,python-monotonic)
14863 ("python-six" ,python-six)
14864 ("python-testtools" ,python-testtools)))
14865 (home-page "https://github.com/harlowja/fasteners")
14866 (synopsis "Python package that provides useful locks")
14867 (description
14868 "This package provides a Python program that provides following locks:
14869
14870@itemize
14871@item Locking decorator
14872@item Reader-writer locks
14873@item Inter-process locks
14874@item Generic helpers
14875@end itemize\n")
14876 (properties `((python2-variant . ,(delay python2-fasteners))))
14877 (license license:asl2.0)))
14878
14879(define-public python2-fasteners
14880 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
14881 (package
14882 (inherit base)
14883 (propagated-inputs
14884 `(("python2-futures" ,python2-futures)
14885 ,@(package-propagated-inputs base))))))
14886
14887(define-public python-requests-file
14888 (package
14889 (name "python-requests-file")
14890 (version "1.4.3")
14891 (source
14892 (origin
14893 (method url-fetch)
14894 (uri (pypi-uri "requests-file" version))
14895 (sha256
14896 (base32
14897 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
14898 (build-system python-build-system)
14899 (propagated-inputs
14900 `(("python-requests" ,python-requests)
14901 ("python-six" ,python-six)))
14902 (home-page
14903 "https://github.com/dashea/requests-file")
14904 (synopsis "File transport adapter for Requests")
14905 (description
14906 "Requests-File is a transport adapter for use with the Requests Python
52beae7b 14907library to allow local file system access via @code{file://} URLs.")
44d10b1f
RW
14908 (license license:asl2.0)))
14909
14910(define-public python2-requests-file
14911 (package-with-python2 python-requests-file))
14912
14913(define-public python-tldextract
14914 (package
14915 (name "python-tldextract")
14916 (version "2.2.0")
14917 (source
14918 (origin
14919 (method url-fetch)
14920 (uri (pypi-uri "tldextract" version))
14921 (sha256
14922 (base32
14923 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
14924 (build-system python-build-system)
14925 (native-inputs
14926 `(("python-pytest" ,python-pytest)
14927 ("python-responses" ,python-responses)))
14928 (propagated-inputs
14929 `(("python-idna" ,python-idna)
14930 ("python-requests" ,python-requests)
14931 ("python-requests-file" ,python-requests-file)))
14932 (home-page
14933 "https://github.com/john-kurkowski/tldextract")
14934 (synopsis
14935 "Separate the TLD from the registered domain and subdomains of a URL")
14936 (description
14937 "TLDExtract accurately separates the TLD from the registered domain and
14938subdomains of a URL, using the Public Suffix List. By default, this includes
14939the public ICANN TLDs and their exceptions. It can optionally support the
14940Public Suffix List's private domains as well.")
14941 (license license:bsd-3)))
14942
14943(define-public python2-tldextract
14944 (package-with-python2 python-tldextract))
14945
14946(define-public python-pynamecheap
14947 (package
14948 (name "python-pynamecheap")
14949 (version "0.0.3")
14950 (source
14951 (origin
14952 (method url-fetch)
14953 (uri (pypi-uri "PyNamecheap" version))
14954 (sha256
14955 (base32
14956 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
14957 (build-system python-build-system)
14958 (propagated-inputs
14959 `(("python-requests" ,python-requests)))
14960 (home-page
14961 "https://github.com/Bemmu/PyNamecheap")
14962 (synopsis
14963 "Namecheap API client in Python")
14964 (description
14965 "PyNamecheap is a Namecheap API client in Python.")
14966 (license license:expat)))
14967
14968(define-public python2-pynamecheap
14969 (package-with-python2 python-pynamecheap))
14970
14971(define-public python-dns-lexicon
14972 (package
14973 (name "python-dns-lexicon")
14974 (version "2.4.0")
14975 (source
14976 (origin
14977 (method url-fetch)
14978 (uri (pypi-uri "dns-lexicon" version))
14979 (sha256
14980 (base32
14981 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
14982 (build-system python-build-system)
14983 (arguments
14984 `(#:tests? #f)) ;requires internet access
14985 (propagated-inputs
14986 `(("python-future" ,python-future)
14987 ("python-pynamecheap" ,python-pynamecheap)
14988 ("python-requests" ,python-requests)
14989 ("python-tldextract" ,python-tldextract)
14990 ("python-urllib3" ,python-urllib3)))
14991 (home-page "https://github.com/AnalogJ/lexicon")
14992 (synopsis
14993 "Manipulate DNS records on various DNS providers")
14994 (description
14995 "Lexicon provides a way to manipulate DNS records on multiple DNS
14996providers in a standardized way. It has a CLI but it can also be used as a
14997Python library. It was designed to be used in automation, specifically with
14998Let's Encrypt.")
14999 (license license:expat)))
15000
15001(define-public python2-dns-lexicon
15002 (package-with-python2 python-dns-lexicon))
15003
15004(define-public python-commandlines
15005 (package
15006 (name "python-commandlines")
15007 (version "0.4.1")
15008 (source
15009 (origin
15010 (method url-fetch)
15011 (uri (pypi-uri "commandlines" version))
15012 (sha256
15013 (base32
15014 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
15015 (build-system python-build-system)
15016 (home-page "https://github.com/chrissimpkins/commandlines")
15017 (synopsis "Command line argument to object parsing library")
15018 (description
15019 "@code{Commandlines} is a Python library for command line application
15020development that supports command line argument parsing, command string
15021validation testing and application logic.")
15022 (license license:expat)))
15023
15024;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
15025;; python-numba. They have a very unflexible relationship.
15026(define-public python-numba
15027 (package
15028 (name "python-numba")
7757e6d8 15029 (version "0.42.0")
44d10b1f
RW
15030 (source
15031 (origin
15032 (method url-fetch)
15033 (uri (pypi-uri "numba" version))
15034 (sha256
15035 (base32
7757e6d8 15036 "03rqdfx0512lcri2bcpngx5k3jwfbqnanqj3n19c7d6h6hqxvq9x"))))
44d10b1f
RW
15037 (build-system python-build-system)
15038 (arguments
15039 `(#:modules ((guix build utils)
15040 (guix build python-build-system)
15041 (ice-9 ftw)
15042 (srfi srfi-1)
15043 (srfi srfi-26))
15044 #:phases
15045 (modify-phases %standard-phases
15046 (add-after 'unpack 'disable-proprietary-features
15047 (lambda _
15048 (setenv "NUMBA_DISABLE_HSA" "1")
15049 (setenv "NUMBA_DISABLE_CUDA" "1")
15050 #t))
15051 (add-after 'unpack 'remove-failing-tests
15052 (lambda _
15053 ;; FIXME: these tests fail for unknown reasons:
15054 ;; test_non_writable_pycache, test_non_creatable_pycache, and
15055 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
15056 (substitute* "numba/tests/test_dispatcher.py"
15057 (("def test(_non_writable_pycache)" _ m)
15058 (string-append "def guix_skip" m))
15059 (("def test(_non_creatable_pycache)" _ m)
15060 (string-append "def guix_skip" m))
15061 (("def test(_frozen)" _ m)
15062 (string-append "def guix_skip" m)))
15063
15064 ;; These tests fail because we don't run the tests from the build
15065 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
15066 ;; They ar in numba.tests.test_pycc.TestDistutilsSupport.
15067 (substitute* "numba/tests/test_pycc.py"
15068 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
15069 (string-append "def guix_skip" m)))
15070 #t))
15071 (replace 'check
15072 (lambda _
15073 (let ((cwd (getcwd)))
15074 (setenv "PYTHONPATH"
15075 (string-append cwd "/build/"
15076 (find (cut string-prefix? "lib" <>)
15077 (scandir (string-append cwd "/build")))
15078 ":"
15079 (getenv "PYTHONPATH")))
15080 ;; Something is wrong with the PYTHONPATH when running the
15081 ;; tests from the build directory, as it complains about not being
15082 ;; able to import certain modules.
15083 (with-directory-excursion "/tmp"
15084 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
15085 #t)))))
15086 (propagated-inputs
15087 `(("python-llvmlite" ,python-llvmlite)
15088 ("python-numpy" ,python-numpy)
15089 ("python-singledispatch" ,python-singledispatch)))
15090 ;; Needed for tests.
15091 (inputs
15092 `(("python-jinja2" ,python-jinja2)
15093 ("python-pygments" ,python-pygments)))
15094 (home-page "https://numba.pydata.org")
15095 (synopsis "Compile Python code using LLVM")
15096 (description "Numba gives you the power to speed up your applications with
15097high performance functions written directly in Python. With a few
15098annotations, array-oriented and math-heavy Python code can be just-in-time
15099compiled to native machine instructions, similar in performance to C, C++ and
15100Fortran, without having to switch languages or Python interpreters.
15101
15102Numba works by generating optimized machine code using the LLVM compiler
15103infrastructure at import time, runtime, or statically (using the included pycc
15104tool).")
15105 (license license:bsd-3)))
15106
15107(define-public python-anndata
15108 (package
15109 (name "python-anndata")
8c9372c1 15110 (version "0.6.18")
44d10b1f
RW
15111 (source
15112 (origin
15113 (method url-fetch)
15114 (uri (pypi-uri "anndata" version))
15115 (sha256
15116 (base32
8c9372c1 15117 "03x83yjaccbqszj7x4fwwmpil0ai59yx64d1zmf2691za3j03w73"))))
44d10b1f
RW
15118 (build-system python-build-system)
15119 (propagated-inputs
15120 `(("python-h5py" ,python-h5py)
15121 ("python-natsort" ,python-natsort)
15122 ("python-pandas" ,python-pandas)
15123 ("python-scipy" ,python-scipy)))
15124 (home-page "https://github.com/theislab/anndata")
15125 (synopsis "Annotated data for data analysis pipelines")
15126 (description "Anndata is a package for simple (functional) high-level APIs
15127for data analysis pipelines. In this context, it provides an efficient,
15128scalable way of keeping track of data together with learned annotations and
15129reduces the code overhead typically encountered when using a mostly
15130object-oriented library such as @code{scikit-learn}.")
15131 (license license:bsd-3)))
15132
15133(define-public python-dill
15134 (package
15135 (name "python-dill")
c60b15cc 15136 (version "0.2.9")
44d10b1f
RW
15137 (source
15138 (origin
15139 (method url-fetch)
15140 (uri (pypi-uri "dill" version))
15141 (sha256
c60b15cc 15142 (base32 "0vwqyi6hyz2r29zydc78dqymkbc5y7gia16xcdh215cikxph9mpn"))))
44d10b1f 15143 (build-system python-build-system)
c60b15cc 15144 ;; FIXME: The check phase fails with "don't know how to make test from: …".
44d10b1f
RW
15145 (arguments '(#:tests? #f))
15146 (home-page "https://pypi.org/project/dill")
15147 (synopsis "Serialize all of Python")
15148 (description "Dill extends Python's @code{pickle} module for serializing
15149and de-serializing Python objects to the majority of the built-in Python
15150types. Dill provides the user the same interface as the @code{pickle} module,
15151and also includes some additional features. In addition to pickling Python
15152objects, @code{dill} provides the ability to save the state of an interpreter
61985d65 15153session in a single command. Hence, it would be feasible to save a
44d10b1f
RW
15154interpreter session, close the interpreter, ship the pickled file to another
15155computer, open a new interpreter, unpickle the session and thus continue from
15156the saved state of the original interpreter session.")
15157 (license license:bsd-3)))
15158
15159(define-public python-multiprocess
15160 (package
15161 (name "python-multiprocess")
15162 (version "0.70.6.1")
15163 (source
15164 (origin
15165 (method url-fetch)
15166 (uri (pypi-uri "multiprocess" version))
15167 (sha256
15168 (base32
15169 "1ip5caz67b3q0553mr8gm8xwsb8x500jn8ml0gihgyfy52m2ypcq"))))
15170 (build-system python-build-system)
15171 (propagated-inputs
15172 `(("python-dill" ,python-dill)))
15173 (home-page "https://pypi.org/project/multiprocess")
15174 (synopsis "Multiprocessing and multithreading in Python")
15175 (description
15176 "This package is a fork of the multiprocessing Python package, a package
15177which supports the spawning of processes using the API of the standard
15178library's @code{threading} module.")
15179 (license license:bsd-3)))
15180
15181(define-public python-toolz
15182 (package
15183 (name "python-toolz")
15184 (version "0.9.0")
15185 (source
15186 (origin
15187 (method url-fetch)
15188 (uri (pypi-uri "toolz" version))
15189 (sha256
15190 (base32
15191 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
15192 (build-system python-build-system)
15193 ;; FIXME: tests cannot be computed: "Can't perform this operation for
15194 ;; unregistered loader type"
15195 (arguments '(#:tests? #f))
15196 (home-page "https://github.com/pytoolz/toolz/")
15197 (synopsis "List processing tools and functional utilities")
15198 (description
15199 "This package provides a set of utility functions for iterators,
15200functions, and dictionaries.")
15201 (license license:bsd-3)))
15202
15203(define-public python2-toolz
15204 (package-with-python2 python-toolz))
15205
15206(define-public python-cytoolz
15207 (package
15208 (name "python-cytoolz")
15209 (version "0.9.0.1")
15210 (source
15211 (origin
15212 (method url-fetch)
15213 (uri (pypi-uri "cytoolz" version))
15214 (sha256
15215 (base32
15216 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
15217 (build-system python-build-system)
15218 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
15219 ;; 'exceptions'"
15220 (arguments '(#:tests? #f))
15221 (propagated-inputs
15222 `(("python-toolz" ,python-toolz)))
15223 (native-inputs
15224 `(("python-cython" ,python-cython)))
15225 (home-page "https://github.com/pytoolz/cytoolz")
15226 (synopsis "High performance functional utilities")
15227 (description
15228 "The cytoolz package implements the same API as provided by toolz. The
15229main differences are that @code{cytoolz} is faster and cytoolz offers a C API
15230that is accessible to other projects developed in Cython.")
15231 (license license:bsd-3)))
15232
15233(define-public python-sortedcontainers
15234 (package
15235 (name "python-sortedcontainers")
15236 (version "2.0.4")
15237 (source
15238 (origin
15239 (method url-fetch)
15240 (uri (pypi-uri "sortedcontainers" version))
15241 (sha256
15242 (base32
15243 "10hrk2k0hbf9x78vd3f0lj277m1yzfhzzxr0hja718liwb398wk0"))))
15244 (build-system python-build-system)
15245 (native-inputs
15246 `(("python-tox" ,python-tox)))
15247 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
15248 (synopsis "Sorted List, Sorted Dict, Sorted Set")
15249 (description
15250 "This package provides a sorted collections library, written in
15251pure-Python.")
15252 (license license:asl2.0)))
15253
15254(define-public python-cloudpickle
15255 (package
15256 (name "python-cloudpickle")
15257 (version "0.6.1")
15258 (source
15259 (origin
15260 (method url-fetch)
15261 (uri (pypi-uri "cloudpickle" version))
15262 (sha256
15263 (base32
15264 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
15265 (build-system python-build-system)
15266 ;; FIXME: there are 5 errors in 122 tests:
15267 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
15268 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
15269 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15270 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15271 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
15272 ;; TypeError: cannot serialize '_io.BufferedRandom' object
15273 (arguments '(#:tests? #f))
15274 (native-inputs
15275 `(("python-pytest" ,python-pytest)
15276 ("python-mock" ,python-mock)
15277 ("python-tornado" ,python-tornado)))
15278 (home-page "https://github.com/cloudpipe/cloudpickle")
15279 (synopsis "Extended pickling support for Python objects")
15280 (description
15281 "Cloudpickle makes it possible to serialize Python constructs not
15282supported by the default pickle module from the Python standard library. It
15283is especially useful for cluster computing where Python expressions are
15284shipped over the network to execute on remote hosts, possibly close to the
15285data.")
15286 (license license:bsd-3)))
15287
15288(define-public python2-cloudpickle
15289 (package-with-python2 python-cloudpickle))
15290
15291(define-public python-locket
15292 (package
15293 (name "python-locket")
15294 (version "0.2.0")
15295 (source
15296 (origin
15297 (method url-fetch)
15298 (uri (pypi-uri "locket" version))
15299 (sha256
15300 (base32
15301 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
15302 (build-system python-build-system)
15303 (home-page "https://github.com/mwilliamson/locket.py")
15304 (synopsis "File-based locks for Python")
15305 (description
15306 "Locket implements a lock that can be used by multiple processes provided
15307they use the same path.")
15308 (license license:bsd-2)))
15309
15310(define-public python2-locket
15311 (package-with-python2 python-locket))
15312
15313(define-public python-blosc
15314 (package
15315 (name "python-blosc")
15316 (version "1.5.1")
15317 (source
15318 (origin
15319 (method url-fetch)
15320 (uri (pypi-uri "blosc" version))
15321 (sha256
15322 (base32
15323 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
15324 (build-system python-build-system)
15325 ;; FIXME: all tests pass, but then this error is printed:
15326 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
15327 (arguments '(#:tests? #f))
15328 (propagated-inputs
15329 `(("python-numpy" ,python-numpy)))
15330 (home-page "https://github.com/blosc/python-blosc")
15331 (synopsis "Python wrapper for the Blosc data compressor library")
15332 (description "Blosc is a high performance compressor optimized for binary
15333data. It has been designed to transmit data to the processor cache faster
15334than the traditional, non-compressed, direct memory fetch approach via a
15335@code{memcpy()} system call.
15336
15337Blosc works well for compressing numerical arrays that contains data with
15338relatively low entropy, like sparse data, time series, grids with
15339regular-spaced values, etc.
15340
15341This Python package wraps the Blosc library.")
15342 (license license:bsd-3)))
15343
15344(define-public python2-blosc
15345 (package-with-python2 python-blosc))
15346
15347(define-public python-partd
15348 (package
15349 (name "python-partd")
15350 (version "0.3.9")
15351 (source
15352 (origin
15353 (method url-fetch)
15354 (uri (pypi-uri "partd" version))
15355 (sha256
15356 (base32
15357 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
15358 (build-system python-build-system)
15359 (propagated-inputs
15360 `(("python-blosc" ,python-blosc)
15361 ("python-locket" ,python-locket)
15362 ("python-numpy" ,python-numpy)
15363 ("python-pandas" ,python-pandas)
15364 ("python-pyzmq" ,python-pyzmq)
15365 ("python-toolz" ,python-toolz)))
15366 (home-page "https://github.com/dask/partd/")
15367 (synopsis "Appendable key-value storage")
15368 (description "Partd stores key-value pairs. Values are raw bytes. We
15369append on old values. Partd excels at shuffling operations.")
15370 (license license:bsd-3)))
15371
15372(define-public python2-partd
15373 (package-with-python2 python-partd))
15374
15375(define-public python-dask
15376 (package
15377 (name "python-dask")
0998175f 15378 (version "1.2.2")
44d10b1f
RW
15379 (source
15380 (origin
15381 (method url-fetch)
15382 (uri (pypi-uri "dask" version))
15383 (sha256
0998175f 15384 (base32 "0b29gvf96gmp20wicly3v3mhyc93zbm3mdv935fka6x0wax7cy2y"))))
44d10b1f
RW
15385 (build-system python-build-system)
15386 ;; A single test out of 5000+ fails. This test is marked as xfail when
15387 ;; pytest-xdist is used.
15388 (arguments
15389 `(#:phases
15390 (modify-phases %standard-phases
15391 (add-after 'unpack 'disable-broken-test
15392 (lambda _
15393 (substitute* "dask/tests/test_threaded.py"
15394 (("def test_interrupt\\(\\)" m)
15395 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15396 m)))
15397 (when (which "python2")
15398 ;; This test fails with recent Pandas:
15399 ;; <https://github.com/dask/dask/issues/3794>.
15400 (substitute* "dask/dataframe/tests/test_dataframe.py"
15401 (("def test_info\\(\\)" m)
15402 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15403 m))))
15404 #t))
15405 (replace 'check
15406 (lambda _ (invoke "pytest" "-vv"))))))
15407 (propagated-inputs
15408 `(("python-cloudpickle" ,python-cloudpickle)
15409 ("python-numpy" ,python-numpy)
15410 ("python-pandas" ,python-pandas)
15411 ("python-partd" ,python-partd)
15412 ("python-toolz" ,python-toolz)
15413 ("python-pyyaml" ,python-pyyaml)))
15414 (native-inputs
15415 `(("python-pytest" ,python-pytest)
15416 ("python-pytest-runner" ,python-pytest-runner)))
15417 (home-page "https://github.com/dask/dask/")
15418 (synopsis "Parallel computing with task scheduling")
15419 (description
15420 "Dask is a flexible parallel computing library for analytics. It
15421consists of two components: dynamic task scheduling optimized for computation,
15422and large data collections like parallel arrays, dataframes, and lists that
15423extend common interfaces like NumPy, Pandas, or Python iterators to
15424larger-than-memory or distributed environments. These parallel collections
15425run on top of the dynamic task schedulers. ")
15426 (license license:bsd-3)))
15427
15428(define-public python2-dask
15429 (package-with-python2 python-dask))
15430
15431(define-public python-ilinkedlist
15432 (package
15433 (name "python-ilinkedlist")
15434 (version "0.4.0")
15435 (source
15436 (origin
15437 (method url-fetch)
15438 (uri (pypi-uri "ilinkedlist" version))
15439 (sha256
15440 (base32
15441 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
15442 (build-system python-build-system)
15443 (native-inputs `(("python-pytest" ,python-pytest)))
15444 (inputs `(("python" ,python)))
15445 (home-page "https://github.com/luther9/ilinkedlist-py")
15446 (synopsis "Immutable linked list library")
15447 (description
15448 "This is a implementation of immutable linked lists for Python. It
15449contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
15450Since a linked list is treated as immutable, it is hashable, and its length
15451can be retrieved in constant time. Some of the terminology is inspired by
15452LISP. It is possible to create an improper list by creating a @code{Pair}
15453with a non-list @code{cdr}.")
15454 (license license:gpl3+)))
15455
15456(define-public python-readlike
15457 (package
15458 (name "python-readlike")
15459 (version "0.1.3")
15460 (source
15461 (origin
15462 (method url-fetch)
15463 (uri (pypi-uri "readlike" version))
15464 (sha256
15465 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
15466 (build-system python-build-system)
15467 (home-page "https://github.com/jangler/readlike")
15468 (synopsis "GNU Readline-like line editing module")
15469 (description
15470 "This Python module provides line editing functions similar to the default
15471Emacs-style ones of GNU Readline. Unlike the Python standard library's
15472@code{readline} package, this one allows access to those capabilties in settings
15473outside of a standard command-line interface. It is especially well-suited to
15474interfacing with Urwid, due to a shared syntax for describing key inputs.
15475
15476Currently, all stateless Readline commands are implemented. Yanking and history
15477are not supported.")
15478 (license license:expat)))
15479
15480(define-public python2-readlike
15481 (package-with-python2 python-readlike))
15482
15483(define-public python-reparser
15484 (package
15485 (name "python-reparser")
15486 (version "1.4.3")
15487 (source
15488 (origin
15489 (method url-fetch)
15490 (uri (pypi-uri "ReParser" version))
15491 (sha256
15492 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
15493 (build-system python-build-system)
15494 (home-page "https://github.com/xmikos/reparser")
15495 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
15496 (description
15497 "This Python library provides a simple lexer/parser for inline markup based
15498on regular expressions.")
15499 (license license:expat)))
15500
15501(define-public python2-reparser
15502 (let ((reparser (package-with-python2
15503 (strip-python2-variant python-reparser))))
15504 (package (inherit reparser)
15505 (propagated-inputs
15506 `(("python2-enum34" ,python2-enum34)
15507 ,@(package-propagated-inputs reparser))))))
15508
15509(define-public python-precis-i18n
15510 (package
15511 (name "python-precis-i18n")
15512 (version "1.0.0")
15513 (source
15514 (origin
15515 (method url-fetch)
15516 (uri (pypi-uri "precis_i18n" version))
15517 (sha256
15518 (base32
15519 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
15520 (build-system python-build-system)
15521 (home-page "https://github.com/byllyfish/precis_i18n")
15522 (synopsis "Implementation of the PRECIS framework")
15523 (description
15524 "This module implements the PRECIS Framework as described in RFC 8264,
15525RFC 8265 and RFC 8266.")
15526 (license license:expat)))
15527
d0446c4b
RW
15528(define-public python-absl-py
15529 (package
15530 (name "python-absl-py")
15531 (version "0.6.1")
15532 (source
15533 (origin
15534 (method url-fetch)
15535 (uri (pypi-uri "absl-py" version))
15536 (sha256
15537 (base32
15538 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
15539 (build-system python-build-system)
15540 (propagated-inputs
15541 `(("python-six" ,python-six)))
15542 (home-page "https://github.com/abseil/abseil-py")
15543 (synopsis "Abseil Python common libraries")
15544 (description
15545 "This package provides the Abseil Python Common Libraries, a collection
15546of Python libraries for building Python applications.")
15547 (license license:asl2.0)))
15548
81bed4e9
RW
15549(define-public python-astor
15550 (package
15551 (name "python-astor")
15552 (version "0.7.1")
15553 (source
15554 (origin
15555 (method url-fetch)
15556 (uri (pypi-uri "astor" version))
15557 (sha256
15558 (base32
15559 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
15560 (build-system python-build-system)
15561 ;; FIXME: There are two errors and two test failures.
15562 (arguments `(#:tests? #f))
15563 (home-page "https://github.com/berkerpeksag/astor")
39ee82ff 15564 (synopsis "Read and write Python ASTs")
81bed4e9 15565 (description "Astor is designed to allow easy manipulation of Python
39ee82ff 15566source via the Abstract Syntax Tree.")
81bed4e9
RW
15567 (license license:bsd-3)))
15568
39ee82ff
RW
15569(define-public python2-astor
15570 (package-with-python2 python-astor))
15571
22e623ae
RW
15572(define-public python-grpcio
15573 (package
15574 (name "python-grpcio")
15575 (version "1.17.1")
15576 (source
15577 (origin
15578 (method url-fetch)
15579 (uri (pypi-uri "grpcio" version))
15580 (sha256
15581 (base32
15582 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
15583 (build-system python-build-system)
15584 (propagated-inputs
15585 `(("python-six" ,python-six)))
15586 (home-page "https://grpc.io")
15587 (synopsis "HTTP/2-based RPC framework")
15588 (description "This package provides a Python library for communicating
15589with the HTTP/2-based RPC framework gRPC.")
15590 (license license:asl2.0)))
15591
79869f80
RW
15592(define-public python-astunparse
15593 (package
15594 (name "python-astunparse")
47d79541 15595 (version "1.6.2")
79869f80
RW
15596 (source
15597 (origin
15598 (method url-fetch)
15599 (uri (pypi-uri "astunparse" version))
15600 (sha256
47d79541 15601 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
79869f80 15602 (build-system python-build-system)
47d79541 15603 (arguments '(#:tests? #f)) ; there are none
79869f80
RW
15604 (propagated-inputs
15605 `(("python-six" ,python-six)
15606 ("python-wheel" ,python-wheel)))
15607 (home-page "https://github.com/simonpercivall/astunparse")
15608 (synopsis "AST unparser for Python")
15609 (description "This package provides an AST unparser for Python. It is a
15610factored out version of @code{unparse} found in the Python source
15611distribution.")
15612 (license license:bsd-3)))
15613
2884aac0
RW
15614(define-public python-gast
15615 (package
15616 (name "python-gast")
bd300261 15617 (version "0.2.2")
2884aac0
RW
15618 (source
15619 (origin
15620 (method url-fetch)
15621 (uri (pypi-uri "gast" version))
15622 (sha256
bd300261 15623 (base32 "1w5dzdb3gpcfmd2s0b93d8gff40a1s41rv31458z14inb3s9v4zy"))))
2884aac0
RW
15624 (build-system python-build-system)
15625 (propagated-inputs
15626 `(("python-astunparse" ,python-astunparse)))
15627 (home-page "https://pypi.org/project/gast/")
15628 (synopsis "Generic Python AST that abstracts the underlying Python version")
15629 (description
15630 "GAST provides a compatibility layer between the AST of various Python
15631versions, as produced by @code{ast.parse} from the standard @code{ast}
15632module.")
15633 (license license:bsd-3)))
15634
44d10b1f
RW
15635(define-public python-wikidata
15636 (package
15637 (name "python-wikidata")
15638 (version "0.6.1")
15639 (source
15640 (origin
15641 (method url-fetch)
15642 (uri (pypi-uri "Wikidata" version))
15643 (sha256
15644 (base32
15645 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
15646 (build-system python-build-system)
15647 (propagated-inputs
15648 `(("python-babel" ,python-babel)))
15649 (home-page "https://github.com/dahlia/wikidata")
15650 (synopsis "Wikidata client library")
15651 (description
15652 "This package provides a Python interface to
15653@url{https://www.wikidata.org/, Wikidata}.")
15654 (properties '((upstream-name . "Wikidata")))
15655 (license license:gpl3+)))
15656
15657(define-public python-doctest-ignore-unicode
15658 (package
15659 (name "python-doctest-ignore-unicode")
15660 (version "0.1.2")
15661 (source
15662 (origin
15663 (method url-fetch)
15664 (uri (pypi-uri "doctest-ignore-unicode" version))
15665 (sha256
15666 (base32
15667 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
15668 (build-system python-build-system)
15669 (native-inputs
15670 `(("python-nose" ,python-nose)))
15671 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
15672 (synopsis "Ignore Unicode literal prefixes in doctests")
15673 (description
15674 "This package adds support for a flag to ignore Unicode literal prefixes
15675in doctests.")
15676 (license license:asl2.0)))
15677
15678(define-public python-attr
15679 (package
15680 (name "python-attr")
15681 (version "0.3.1")
15682 (source
15683 (origin
15684 (method url-fetch)
15685 (uri (pypi-uri "attr" version))
15686 (sha256
15687 (base32
15688 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
15689 (build-system python-build-system)
15690 (home-page "https://github.com/denis-ryzhkov/attr")
15691 (synopsis "Decorator for attributes of target function or class")
15692 (description "Simple decorator to set attributes of target function or
15693class in a @acronym{DRY, Don't Repeat Yourself} way.")
15694 (license license:expat)))
f98232a3
VC
15695
15696(define-public python-construct
15697 (package
15698 (name "python-construct")
15699 (version "2.9.45")
15700 (source
15701 (origin
15702 (method url-fetch)
15703 (uri (pypi-uri "construct" version))
15704 (sha256
15705 (base32
15706 "130iy05awzigm2xah2yvlmb08mac5bi4gzr5m3g7k1krs3ps0w92"))))
15707 (build-system python-build-system)
15708 (arguments
15709 `(#:tests? #f)) ; No tests exist.
15710 (propagated-inputs
15711 `(("python-extras" ,python-extras)
15712 ("python-arrow" ,python-arrow)
15713 ("python-numpy" ,python-numpy)
15714 ("python-ruamel.yaml" ,python-ruamel.yaml)))
15715 (home-page "http://construct.readthedocs.io")
15716 (synopsis "Declarative and symmetrical parser and builder for binary data")
15717 (description
15718 "This package provides both simple, atomic constructs (such as
15719integers of various sizes), as well as composite ones which allow you
15720form hierarchical and sequential structures of increasing complexity.
15721It features bit and byte granularity, easy debugging and testing, an
15722easy-to-extend subclass system, and lots of primitive constructs to
15723make your work easier.")
15724 (license license:expat)))
b742c006
LF
15725
15726(define-public python-humanize
15727 (package
15728 (name "python-humanize")
15729 (version "0.5.1")
15730 (source
15731 (origin
15732 (method url-fetch)
15733 (uri (pypi-uri "humanize" version))
15734 (sha256
15735 (base32
15736 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
15737 (arguments
15738 '(#:tests? #f)) ; tests not in pypi archive
15739 (build-system python-build-system)
15740 (home-page "https://github.com/jmoiron/humanize")
15741 (synopsis "Print numerical information in a human-readable form")
15742 (description "This package provides a Python module that displays numbers
15743and dates in \"human readable\" forms. For example, it would display
15744\"12345591313\" as \"12.3 billion\".")
15745 (license license:expat)))
d5bbf66d
LF
15746
15747(define-public python-txaio
15748 (package
15749 (name "python-txaio")
15750 (version "18.8.1")
15751 (source
15752 (origin
15753 (method url-fetch)
15754 (uri (pypi-uri "txaio" version))
15755 (sha256
15756 (base32
15757 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
15758 (build-system python-build-system)
15759 (propagated-inputs
15760 `(("python-twisted" ,python-twisted)
15761 ("python-six" ,python-six)))
15762 (home-page "https://github.com/crossbario/txaio")
15763 (synopsis "Compatibility layer between Python asyncio and Twisted")
15764 (description "Txaio provides a compatibility layer between the Python
15765@code{asyncio} module and @code{Twisted}.")
15766 (license license:expat)))
963dfd3a
RW
15767
15768(define-public python-toolshed
15769 (package
15770 (name "python-toolshed")
15771 (version "0.4.6")
15772 (source
15773 (origin
15774 (method url-fetch)
15775 (uri (pypi-uri "toolshed" version))
15776 (sha256
15777 (base32
15778 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
15779 (build-system python-build-system)
15780 (native-inputs
15781 `(("python-nose" ,python-nose)))
15782 (home-page "https://github.com/brentp/toolshed/")
15783 (synopsis "Collection of modules and functions for working with data")
15784 (description "This is a collection of well-tested, simple modules and
15785functions that aim to reduce boilerplate when working with data.")
15786 (license license:bsd-2)))
c91ecf2d
RW
15787
15788(define-public python-annoy
15789 (package
15790 (name "python-annoy")
15791 (version "1.15.1")
15792 (source
15793 (origin
15794 (method url-fetch)
15795 (uri (pypi-uri "annoy" version))
15796 (sha256
15797 (base32
15798 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
15799 (build-system python-build-system)
15800 (native-inputs
15801 `(("python-nose" ,python-nose)))
15802 (home-page "https://github.com/spotify/annoy/")
15803 (synopsis "Approximate nearest neighbors library")
15804 (description
15805 "Annoy is a C++ library with Python bindings to search for points in
15806space that are close to a given query point. It also creates large read-only
15807file-based data structures that are @code{mmap}ped into memory so that many
15808processes may share the same data.")
15809 (license license:asl2.0)))
412342d1 15810
79bfa422 15811(define-public python-pylzma
412342d1 15812 (package
79bfa422
DM
15813 (name "python-pylzma")
15814 (version "0.5.0")
15815 (source
15816 (origin
15817 (method url-fetch)
15818 (uri (pypi-uri "pylzma" version))
15819 (sha256
15820 (base32
15821 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
412342d1 15822 (build-system python-build-system)
79bfa422
DM
15823 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
15824 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
15825 (description "This package provides Python bindings for the LZMA library
15826by Igor Pavlov.")
15827 (license license:lgpl2.1+)))
15828
15829(define-public python2-pylzma
15830 (package-with-python2 python-pylzma))
f825e605 15831
6609ebe7
AG
15832(define-public python2-zeroconf
15833 (package
15834 (name "python2-zeroconf")
15835
15836 ;; This is the last version that supports Python 2.x.
15837 (version "0.19.1")
15838 (source
15839 (origin
15840 (method url-fetch)
15841 (uri (pypi-uri "zeroconf" version))
15842 (sha256
15843 (base32
15844 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
15845 (build-system python-build-system)
15846 (arguments
15847 `(#:python ,python-2
15848 #:phases
15849 (modify-phases %standard-phases
15850 (add-after 'unpack 'patch-requires
15851 (lambda* (#:key inputs #:allow-other-keys)
15852 (substitute* "setup.py"
15853 (("enum-compat")
15854 "enum34"))
15855 #t)))))
15856 (native-inputs
15857 `(("python2-six" ,python2-six)
15858 ("python2-enum32" ,python2-enum34)
15859 ("python2-netifaces" ,python2-netifaces)
15860 ("python2-typing" ,python2-typing)))
15861 (home-page "https://github.com/jstasiak/python-zeroconf")
15862 (synopsis "Pure Python mDNS service discovery")
15863 (description
15864 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
15865compatible).")
15866 (license license:lgpl2.1+)))
15867
f825e605
GLV
15868(define-public python-bsddb3
15869 (package
15870 (name "python-bsddb3")
15871 (version "6.2.6")
15872 (source
15873 (origin
15874 (method url-fetch)
15875 (uri (pypi-uri "bsddb3" version))
15876 (sha256
15877 (base32
15878 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
15879 (build-system python-build-system)
15880 (inputs
15881 `(("bdb" ,bdb)))
15882 (arguments
15883 '(#:phases
15884 (modify-phases %standard-phases
15885 (add-after 'unpack 'configure-locations
15886 (lambda* (#:key inputs #:allow-other-keys)
15887 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
15888 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
15889 #t))
15890 (replace 'check
15891 (lambda _
15892 (invoke "python3" "test3.py" "-v"))))))
15893 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
15894 (synopsis "Python bindings for Oracle Berkeley DB")
15895 (description
15896 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
15897C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
15898Transaction objects, and each of these is exposed as a Python type in the
15899bsddb3.db module. The database objects can use various access methods: btree,
15900hash, recno, and queue. Complete support of Berkeley DB distributed
15901transactions. Complete support for Berkeley DB Replication Manager.
15902Complete support for Berkeley DB Base Replication. Support for RPC.")
15903 (license license:bsd-3)))