gnu: perl-namespace-autoclean: Update to 0.29.
[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>
edeb04bf 65;;; Copyright © 2019 Pierre Langlois <pierre.langlois@gmx.com>
e308b4f0 66;;; Copyright © 2019 Jacob MacDonald <jaccarmac@gmail.com>
44d10b1f
RW
67;;;
68;;; This file is part of GNU Guix.
69;;;
70;;; GNU Guix is free software; you can redistribute it and/or modify it
71;;; under the terms of the GNU General Public License as published by
72;;; the Free Software Foundation; either version 3 of the License, or (at
73;;; your option) any later version.
74;;;
75;;; GNU Guix is distributed in the hope that it will be useful, but
76;;; WITHOUT ANY WARRANTY; without even the implied warranty of
77;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
78;;; GNU General Public License for more details.
79;;;
80;;; You should have received a copy of the GNU General Public License
81;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
82
83(define-module (gnu packages python-xyz)
84 #:use-module ((guix licenses) #:prefix license:)
85 #:use-module (gnu packages)
86 #:use-module (gnu packages algebra)
87 #:use-module (gnu packages adns)
88 #:use-module (gnu packages attr)
89 #:use-module (gnu packages backup)
90 #:use-module (gnu packages bash)
91 #:use-module (gnu packages check)
92 #:use-module (gnu packages compression)
93 #:use-module (gnu packages crypto)
94 #:use-module (gnu packages databases)
f825e605 95 #:use-module (gnu packages dbm)
44d10b1f
RW
96 #:use-module (gnu packages file)
97 #:use-module (gnu packages fontutils)
98 #:use-module (gnu packages gcc)
99 #:use-module (gnu packages geo)
100 #:use-module (gnu packages ghostscript)
101 #:use-module (gnu packages gl)
102 #:use-module (gnu packages glib)
103 #:use-module (gnu packages graphviz)
104 #:use-module (gnu packages graphics)
105 #:use-module (gnu packages gstreamer)
106 #:use-module (gnu packages gtk)
107 #:use-module (gnu packages icu4c)
108 #:use-module (gnu packages image)
109 #:use-module (gnu packages imagemagick)
110 #:use-module (gnu packages libevent)
111 #:use-module (gnu packages libffi)
112 #:use-module (gnu packages linux)
113 #:use-module (gnu packages llvm)
114 #:use-module (gnu packages man)
115 #:use-module (gnu packages maths)
42f0b0c2 116 #:use-module (gnu packages monitoring)
44d10b1f
RW
117 #:use-module (gnu packages multiprecision)
118 #:use-module (gnu packages networking)
119 #:use-module (gnu packages ncurses)
120 #:use-module (gnu packages openstack)
121 #:use-module (gnu packages pcre)
122 #:use-module (gnu packages perl)
123 #:use-module (gnu packages pkg-config)
124 #:use-module (gnu packages python)
d362b11d 125 #:use-module (gnu packages python-check)
15b65617 126 #:use-module (gnu packages python-compression)
44d10b1f
RW
127 #:use-module (gnu packages python-crypto)
128 #:use-module (gnu packages python-web)
129 #:use-module (gnu packages qt)
130 #:use-module (gnu packages readline)
131 #:use-module (gnu packages sdl)
132 #:use-module (gnu packages search)
133 #:use-module (gnu packages shells)
9d0c291e 134 #:use-module (gnu packages sphinx)
44d10b1f
RW
135 #:use-module (gnu packages ssh)
136 #:use-module (gnu packages terminals)
137 #:use-module (gnu packages tex)
138 #:use-module (gnu packages texinfo)
139 #:use-module (gnu packages time)
140 #:use-module (gnu packages tls)
141 #:use-module (gnu packages version-control)
142 #:use-module (gnu packages video)
143 #:use-module (gnu packages web)
144 #:use-module (gnu packages base)
145 #:use-module (gnu packages xml)
146 #:use-module (gnu packages xorg)
147 #:use-module (gnu packages xdisorg)
148 #:use-module (gnu packages tcl)
149 #:use-module (gnu packages bdw-gc)
f98232a3 150 #:use-module (gnu packages serialization)
44d10b1f
RW
151 #:use-module (guix packages)
152 #:use-module (guix download)
153 #:use-module (guix git-download)
a042d348 154 #:use-module (guix hg-download)
44d10b1f
RW
155 #:use-module (guix utils)
156 #:use-module (guix build-system gnu)
157 #:use-module (guix build-system cmake)
158 #:use-module (guix build-system python)
159 #:use-module (guix build-system trivial)
160 #:use-module (srfi srfi-1)
161 #:use-module (srfi srfi-26))
162
163(define-public python-psutil
164 (package
165 (name "python-psutil")
7abf3cbf 166 (version "5.6.2")
44d10b1f
RW
167 (source
168 (origin
169 (method url-fetch)
170 (uri (pypi-uri "psutil" version))
171 (sha256
172 (base32
7abf3cbf 173 "1v95vb5385qscfdvphv8l2w22bmir3d7yhpi02n58v3mlqy1r3l2"))))
44d10b1f
RW
174 (build-system python-build-system)
175 (arguments
176 ;; FIXME: some tests does not return and times out.
177 '(#:tests? #f))
178 (home-page "https://www.github.com/giampaolo/psutil")
179 (synopsis "Library for retrieving information on running processes")
180 (description
181 "psutil (Python system and process utilities) is a library for retrieving
182information on running processes and system utilization (CPU, memory, disks,
183network) in Python. It is useful mainly for system monitoring, profiling and
184limiting process resources and management of running processes. It implements
185many functionalities offered by command line tools such as: ps, top, lsof,
186netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
187pidof, tty, taskset, pmap.")
188 (properties `((python2-variant . ,(delay python2-psutil))))
189 (license license:bsd-3)))
190
191(define-public python2-psutil
192 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
193 (package
194 (inherit base)
195 (propagated-inputs
196 `(("python2-enum34" ,python2-enum34) ;optional
197 ,@(package-propagated-inputs base))))))
198
199(define-public python-shapely
200 (package
201 (name "python-shapely")
6d94465b 202 (version "1.6.4.post2")
44d10b1f
RW
203 (source
204 (origin
205 (method url-fetch)
206 (uri (pypi-uri "Shapely" version))
207 (sha256
208 (base32
6d94465b 209 "03r42fmd9alp6r3q95ad6rldq2f7n1wimrw53zy5kpn33yv7pf64"))))
44d10b1f
RW
210 (build-system python-build-system)
211 (native-inputs
212 `(("python-cython" ,python-cython)
213 ("python-matplotlib" ,python-matplotlib)
214 ("python-pytest" ,python-pytest)
215 ("python-pytest-cov" ,python-pytest-cov)))
216 (inputs
217 `(("geos" ,geos)))
218 (propagated-inputs
219 `(("python-numpy" ,python-numpy)))
220 (arguments
221 `(#:phases
222 (modify-phases %standard-phases
223 (add-after 'unpack 'patch-geos-path
224 (lambda* (#:key inputs #:allow-other-keys)
225 (let ((geos (assoc-ref inputs "geos"))
226 (glibc (assoc-ref inputs ,(if (%current-target-system)
227 "cross-libc" "libc"))))
228 (substitute* "shapely/geos.py"
229 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
230 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
231 geos "/lib/libgeos_c.so'])"))
232 (("free = load_dll\\('c'\\)\\.free")
233 (string-append "free = load_dll('c', fallbacks=['"
234 glibc "/lib/libc.so.6']).free"))))
235 #t)))))
236 (home-page "https://github.com/Toblerity/Shapely")
237 (synopsis "Library for the manipulation and analysis of geometric objects")
238 (description "Shapely is a Python package for manipulation and analysis of
239planar geometric objects. It is based on the @code{GEOS} library.")
240 (license license:bsd-3)))
241
a91f4eba
S
242(define-public python-shortuuid
243 (package
244 (name "python-shortuuid")
245 (version "0.5.0")
246 (source
247 (origin
248 (method url-fetch)
249 (uri (pypi-uri "shortuuid" version))
250 (sha256
251 (base32
252 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
253 (build-system python-build-system)
254 (native-inputs
255 `(("python-pep8" ,python-pep8)))
256 (home-page "https://github.com/skorokithakis/shortuuid")
257 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
258 (description
259 "@code{shortuuid} is a Python library for generating concise, unambiguous
260and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
261module and then similar looking characters are removed.")
262 (license license:bsd-3)))
263
44d10b1f
RW
264(define-public python-logwrap
265 (package
266 (name "python-logwrap")
267 (version "3.2.1")
268 (source
269 (origin
270 (method url-fetch)
271 (uri (pypi-uri "logwrap" version ".zip"))
272 (sha256
273 (base32
274 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
275 (build-system python-build-system)
276 (propagated-inputs
277 `(("python-six" ,python-six)
278 ("python-typing" ,python-typing)))
279 (native-inputs
280 `(("unzip" ,unzip)
281 ("python-cython" ,python-cython)
282 ("python-pytest" ,python-pytest)
283 ("python-pytest-cov" ,python-pytest-cov)
284 ("python-pytest-runner" ,python-pytest-runner)))
285 (home-page "https://github.com/penguinolog/logwrap")
286 (synopsis "Decorator for logging function arguments")
287 (description "This package provides a decorator to log function arguments
288and function call return values in a human-readable way.")
289 (license license:asl2.0)))
290
291(define-public python2-shapely
292 (package-with-python2 python-shapely))
293
294(define-public python-clyent
295 (package
296 (name "python-clyent")
297 (version "1.2.1")
298 (source
299 (origin
300 (method url-fetch)
301 (uri (pypi-uri "clyent" version))
302 (sha256
303 (base32
304 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
305 (build-system python-build-system)
306 (native-inputs
307 `(("python-mock" ,python-mock)))
308 (home-page "https://github.com/binstar/clyent")
309 (synopsis "Command line client library")
310 (description "Clyent is a Python command line utiliy library. It is used
311by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
312 (license license:bsd-3)))
313
314(define-public python2-clyent
315 (package-with-python2 python-clyent))
316
317(define-public python-babel
318 (package
319 (name "python-babel")
93253411 320 (version "2.7.0")
44d10b1f
RW
321 (source
322 (origin
323 (method url-fetch)
324 (uri (pypi-uri "Babel" version))
325 (sha256
326 (base32
93253411 327 "0a7wawx8vsg7igvz6p3x909fskhg4b2y1910xk4f4c8y22p3aqg8"))))
44d10b1f
RW
328 (build-system python-build-system)
329 (native-inputs
330 `(("python-freezegun" ,python-freezegun)
331 ("python-pytest" ,python-pytest)))
332 (propagated-inputs
333 `(("python-pytz" ,python-pytz)))
334 (arguments
335 `(#:phases (modify-phases %standard-phases
336 (replace 'check
337 (lambda _ (invoke "pytest" "-vv"))))))
338 (home-page "http://babel.pocoo.org/")
339 (synopsis
340 "Tools for internationalizing Python applications")
341 (description
342 "Babel is composed of two major parts:
343- tools to build and work with gettext message catalogs
344- a Python interface to the CLDR (Common Locale Data Repository), providing
345access to various locale display names, localized number and date formatting,
346etc. ")
347 (license license:bsd-3)))
348
349(define-public python2-babel
350 (package-with-python2 python-babel))
351
93253411
MB
352;; Sphinx < 2.0 requires this version. Remove once no longer needed.
353(define-public python2-babel-2.6
354 (package
355 (inherit python2-babel)
356 (version "2.6.0")
357 (source (origin
358 (method url-fetch)
359 (uri (pypi-uri "Babel" version))
360 (sha256
361 (base32
362 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))))
363
44d10b1f
RW
364(define-public python2-backport-ssl-match-hostname
365 (package
366 (name "python2-backport-ssl-match-hostname")
367 (version "3.5.0.1")
368 (source
369 (origin
370 (method url-fetch)
2c1f0d09 371 (uri (pypi-uri "backports.ssl_match_hostname" version))
44d10b1f
RW
372 (sha256
373 (base32
374 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
375 (build-system python-build-system)
376 (arguments
377 `(#:python ,python-2
378 #:tests? #f)) ; no test target
379 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
380 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
381 (description
382 "This backport brings the ssl.match_hostname() function to users of
383earlier versions of Python. The function checks the hostname in the
384certificate returned by the server to which a connection has been established,
385and verifies that it matches the intended target hostname.")
386 (license license:psfl)))
387
388(define-public python-hdf4
389 (package
390 (name "python-hdf4")
391 (version "0.9")
392 (source
393 (origin
394 (method url-fetch)
395 (uri (pypi-uri name version))
396 (sha256
397 (base32
398 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
399 (build-system python-build-system)
400 (native-inputs `(("nose" ,python-nose)))
401 (propagated-inputs `(("numpy" ,python-numpy)))
402 (inputs
403 `(("hdf4" ,hdf4)
404 ("libjpeg" ,libjpeg)
405 ("zlib" ,zlib)))
406 (arguments
407 `(#:phases
408 (modify-phases %standard-phases
409 (replace 'check
410 (lambda _
411 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
412 ;; on to import numpy. Somehow this works on their CI system.
413 ;; Let's just manage PYTHONPATH here instead.
414 (substitute* "runexamples.sh"
415 (("export PYTHONPATH=.*") ""))
416 (setenv "PYTHONPATH"
417 (string-append (getcwd) ":"
418 (getenv "PYTHONPATH")))
419 (invoke "./runexamples.sh")
420 (invoke "nosetests" "-v"))))))
421 (home-page "https://github.com/fhs/python-hdf4")
422 (synopsis "Python interface to the NCSA HDF4 library")
423 (description
424 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
425which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
426NetCDF files can also be read and modified. Python-HDF4 is a fork of
427@url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
428 (license license:expat)))
429
430(define-public python2-hdf4
431 (package-with-python2 python-hdf4))
432
433(define-public python-h5py
434 (package
435 (name "python-h5py")
436 (version "2.8.0")
437 (source
438 (origin
439 (method url-fetch)
440 (uri (pypi-uri "h5py" version))
441 (sha256
442 (base32
443 "0mdr6wrq02ac93m1aqx9kad0ppfzmm4imlxqgyy1x4l7hmdcc9p6"))))
444 (build-system python-build-system)
445 (arguments
446 `(#:tests? #f ; no test target
447 #:phases
448 (modify-phases %standard-phases
449 (add-after 'unpack 'fix-hdf5-paths
450 (lambda* (#:key inputs #:allow-other-keys)
451 (let ((prefix (assoc-ref inputs "hdf5")))
452 (substitute* "setup_build.py"
453 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
454 (string-append "['" prefix "/lib" "']"))
455 (("'/opt/local/include', '/usr/local/include'")
456 (string-append "'" prefix "/include" "'")))
457 (substitute* "setup_configure.py"
458 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
459 (string-append "['" prefix "/lib" "']")))
460 #t))))))
461 (propagated-inputs
462 `(("python-six" ,python-six)
463 ("python-numpy" ,python-numpy)))
464 (inputs
465 `(("hdf5" ,hdf5)))
466 (native-inputs
467 `(("python-cython" ,python-cython)
468 ("python-pkgconfig" ,python-pkgconfig)))
469 (home-page "http://www.h5py.org/")
470 (synopsis "Read and write HDF5 files from Python")
471 (description
472 "The h5py package provides both a high- and low-level interface to the
473HDF5 library from Python. The low-level interface is intended to be a
474complete wrapping of the HDF5 API, while the high-level component supports
475access to HDF5 files, datasets and groups using established Python and NumPy
476concepts.")
477 (license license:bsd-3)))
478
479(define-public python2-h5py
480 (package-with-python2 python-h5py))
481
8b89dedc
RW
482(define-public python-sh
483 (package
484 (name "python-sh")
485 (version "1.12.14")
486 (source
487 (origin
488 (method url-fetch)
489 (uri (pypi-uri "sh" version))
490 (sha256
491 (base32
492 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
493 (build-system python-build-system)
fd3638d8
EF
494 (arguments
495 '(#:phases
496 (modify-phases %standard-phases
497 (replace 'check
498 (lambda _
ca983a2f
NG
499 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
500 (setenv "HOME" "/tmp")
fd3638d8
EF
501 (invoke "python" "sh.py" "test"))))))
502 (native-inputs
503 `(("python-coverage" ,python-coverage)))
8b89dedc
RW
504 (home-page "https://github.com/amoffat/sh")
505 (synopsis "Python subprocess replacement")
506 (description "This package provides a replacement for Python's
507@code{subprocess} feature.")
508 (license license:expat)))
509
3869effd
RW
510(define-public python2-sh
511 (package-with-python2 python-sh))
512
d362b11d
RW
513(define-public python-cftime
514 (package
515 (name "python-cftime")
516 (version "1.0.3.4")
517 (source
518 (origin
519 (method url-fetch)
520 (uri (pypi-uri "cftime" version))
521 (sha256
522 (base32
523 "0362dhxbzk593walyjz30dll6y2y79wialik647cbwdsf3ad0x6x"))))
524 (build-system python-build-system)
525 (propagated-inputs
526 `(("python-numpy" ,python-numpy)))
527 (native-inputs
528 `(("python-coveralls" ,python-coveralls)
529 ("python-cython" ,python-cython)
530 ("python-pytest-cov" ,python-pytest-cov)))
531 (home-page "https://github.com/Unidata/cftime")
532 (synopsis "Library for time handling")
533 (description
534 "This package provides time-handling functionality that used to be part
535of the netcdf4 package before.")
536 ;; This package claims to include code under the GPLv3 but is released
537 ;; under ISC.
538 (license (list license:isc license:gpl3+))))
539
44d10b1f
RW
540(define-public python-netcdf4
541 (package
542 (name "python-netcdf4")
93e7b209 543 (version "1.4.2")
44d10b1f
RW
544 (source
545 (origin
546 (method url-fetch)
547 (uri (pypi-uri "netCDF4" version))
548 (sha256
549 (base32
93e7b209 550 "0c0sklgrmv15ygliin8qq0hp7vanmbi74m6zpi0r1ksr0hssyd5r"))))
44d10b1f 551 (build-system python-build-system)
93e7b209
RW
552 (arguments
553 '(#:phases
554 (modify-phases %standard-phases
555 (add-after 'unpack 'configure-locations
556 (lambda* (#:key inputs #:allow-other-keys)
557 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
558 #t)))))
44d10b1f
RW
559 (native-inputs
560 `(("python-cython" ,python-cython)))
561 (propagated-inputs
93e7b209
RW
562 `(("python-numpy" ,python-numpy)
563 ("python-cftime" ,python-cftime)))
44d10b1f
RW
564 (inputs
565 `(("netcdf" ,netcdf)
566 ("hdf4" ,hdf4)
567 ("hdf5" ,hdf5)))
93e7b209 568 (home-page "https://github.com/Unidata/netcdf4-python")
44d10b1f
RW
569 (synopsis "Python/numpy interface to the netCDF library")
570 (description "Netcdf4-python is a Python interface to the netCDF C
571library. netCDF version 4 has many features not found in earlier
572versions of the library and is implemented on top of HDF5. This module
573can read and write files in both the new netCDF 4 and the old netCDF 3
574format, and can create files that are readable by HDF5 clients. The
575API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
576to users of that module.")
577 ;; The software is mainly ISC, but includes some files covered
578 ;; by the Expat license.
579 (license (list license:isc license:expat))))
580
581(define-public python2-netcdf4
582 (package-with-python2 python-netcdf4))
583
584(define-public python-lockfile
585 (package
586 (name "python-lockfile")
587 (version "0.12.2")
588 (source
589 (origin
590 (method url-fetch)
8318bf07 591 (uri (pypi-uri "lockfile" version))
44d10b1f
RW
592 (sha256
593 (base32
594 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
595 (build-system python-build-system)
596 (arguments '(#:test-target "check"))
597 (native-inputs
598 `(("python-pbr" ,python-pbr)))
599 (home-page "https://launchpad.net/pylockfile")
600 (synopsis "Platform-independent file locking module")
601 (description
602 "The lockfile package exports a LockFile class which provides a simple
603API for locking files.")
604 (license license:expat)))
605
606(define-public python2-lockfile
607 (package-with-python2 python-lockfile))
608
609(define-public python-semantic-version
610 (package
611 (name "python-semantic-version")
612 (version "2.6.0")
613 (source
614 (origin
615 (method url-fetch)
616 (uri (pypi-uri "semantic_version" version))
617 (sha256
618 (base32
619 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
620 (build-system python-build-system)
621 (arguments
622 `(#:tests? #f)) ; PyPI tarball lacks tests
623 (home-page "https://github.com/rbarrois/python-semanticversion")
624 (synopsis "Semantic versioning module for Python")
625 (description
626 "The @code{semantic_version} class is a small library for handling
627@uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
628
629It can compare versions, generate a new version that represents a bump in one of
630the version levels, and check whether any given string is a proper semantic
631version identifier.")
632 (license license:bsd-3)))
633
634(define-public python2-semantic-version
635 (package-with-python2 python-semantic-version))
636
637(define-public python-serpent
638 (package
639 (name "python-serpent")
fa9d14ac 640 (version "1.28")
44d10b1f
RW
641 (source
642 (origin
643 (method url-fetch)
644 (uri (pypi-uri "serpent" version))
645 (sha256
fa9d14ac 646 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
44d10b1f 647 (build-system python-build-system)
fa9d14ac
TGR
648 (native-inputs
649 `(("python-attrs" ,python-attrs)
650 ("python-pytz" ,python-pytz)))
44d10b1f
RW
651 (home-page "https://github.com/irmen/Serpent")
652 (synopsis "Serializer for literal Python expressions")
653 (description
1d3c7803
TGR
654 "Serpent provides @code{ast.literal_eval()}-compatible object tree
655serialization. It serializes an object tree into bytes (an utf-8 encoded
656string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
657to rebuild the original object tree.
658
659Because only safe literals are encoded, it is safe to send serpent data to
660other machines, such as over the network.")
44d10b1f
RW
661 (license license:expat)))
662
663(define-public python-setuptools
664 (package
665 (name "python-setuptools")
e39d4933 666 (version "41.0.1")
44d10b1f
RW
667 (source
668 (origin
669 (method url-fetch)
670 (uri (pypi-uri "setuptools" version ".zip"))
671 (sha256
672 (base32
e39d4933 673 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
44d10b1f
RW
674 (modules '((guix build utils)))
675 (snippet
676 '(begin
677 ;; Remove included binaries which are used to build self-extracting
678 ;; installers for Windows.
679 ;; TODO: Find some way to build them ourself so we can include them.
680 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
681 #t))))
682 (build-system python-build-system)
683 ;; FIXME: Tests require pytest, which itself relies on setuptools.
684 ;; One could bootstrap with an internal untested setuptools.
685 (arguments
686 `(#:tests? #f))
687 (home-page "https://pypi.python.org/pypi/setuptools")
688 (synopsis
689 "Library designed to facilitate packaging Python projects")
690 (description
691 "Setuptools is a fully-featured, stable library designed to facilitate
692packaging Python projects, where packaging includes:
693Python package and module definitions,
694distribution package metadata,
695test hooks,
696project installation,
697platform-specific details,
698Python 3 support.")
699 ;; TODO: setuptools now bundles the following libraries:
700 ;; packaging, pyparsing, six and appdirs. How to unbundle?
701 (license (list license:psfl ; setuptools itself
702 license:expat ; six, appdirs, pyparsing
703 license:asl2.0 ; packaging is dual ASL2/BSD-2
704 license:bsd-2))))
705
706(define-public python2-setuptools
707 (package-with-python2 python-setuptools))
708
709(define-public python-uniseg
710 (package
711 (name "python-uniseg")
712 (version "0.7.1")
713 (source
714 (origin
715 (method url-fetch)
716 (uri (pypi-uri "uniseg" version ".zip"))
717 (sha256
718 (base32
719 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
720 (build-system python-build-system)
721 (arguments
722 '(#:tests? #f)) ; The test suite requires network access.
723 (native-inputs
724 `(("unzip" ,unzip)))
725 (home-page
726 "https://bitbucket.org/emptypage/uniseg-python")
727 (synopsis
728 "Python library to determine Unicode text segmentations")
729 (description
730 "Uniseg is a Python package used to determine Unicode text segmentations.
731Supported segmentations include:
732@enumerate
733@item @dfn{Code point} (any value in the Unicode codespace)
734@item @dfn{Grapheme cluster} (user-perceived character made of a single or
735multiple Unicode code points, e.g. \"G\" + acute-accent)
736@item Word break
737@item Sentence break
738@item Line break
739@end enumerate")
740 (license license:expat)))
741
742(define-public python2-uniseg
743 (package-with-python2 python-uniseg))
744
745(define-public python-humanfriendly
746 (package
747 (name "python-humanfriendly")
748 (version "4.4.1")
749 (source
750 (origin
751 (method url-fetch)
752 (uri (pypi-uri "humanfriendly" version))
753 (sha256
754 (base32
755 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
756 (build-system python-build-system)
757 (arguments
758 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
759 #:tests? #f))
760 (propagated-inputs
761 `(("python-monotonic" ,python-monotonic)))
762 (home-page "https://humanfriendly.readthedocs.io")
763 (synopsis "Human-friendly input and output in Python")
764 (description
765 "The functions and classes in @code{humanfriendly} can be used to make
766text interfaces more user-friendly. It includes tools to parse and format
767numbers, file sizes, and timespans, timers for long-running operations, menus
768to allow the user to choose from a list of options, and terminal interaction
769helpers.")
770 (license license:expat)))
771
772(define-public python2-humanfriendly
773 (package-with-python2 python-humanfriendly))
774
775(define-public python-capturer
776 (package
777 (name "python-capturer")
778 (version "2.4")
779 (source
780 (origin
781 (method url-fetch)
782 (uri (pypi-uri "capturer" version))
783 (sha256
784 (base32
785 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
786 (build-system python-build-system)
787 (arguments
788 `(#:tests? #f))
789 (propagated-inputs
790 `(("python-humanfriendly" ,python-humanfriendly)))
791 (home-page "https://capturer.readthedocs.io")
792 (synopsis "Capture stdout and stderr streams of the current process")
793 (description
794 "The capturer package makes it easy to capture the stdout and stderr
795streams of the current process and subprocesses. Output can be relayed
796to the terminal in real time but is also available to the Python program
797for additional processing.")
798 (license license:expat)))
799
800(define-public python2-capturer
801 (package-with-python2 python-capturer))
802
803(define-public python-case
804 (package
805 (name "python-case")
806 (version "1.5.3")
807 (source
808 (origin
809 (method url-fetch)
810 (uri (pypi-uri "case" version))
811 (sha256
812 (base32
813 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
814 (build-system python-build-system)
815 (propagated-inputs
816 `(("python-mock" ,python-mock)
817 ("python-nose" ,python-nose)
818 ("python-six" ,python-six)
819 ("python-unittest2" ,python-unittest2)))
820 (native-inputs
821 `(("python-coverage" ,python-coverage)))
822 (home-page "https://github.com/celery/case")
823 (synopsis "Unittest utilities and convenience methods")
824 (description
825 "The @code{case} package provides utilities on top of unittest, including
826some helpful Python 2 compatibility convenience methods.")
827 (license license:bsd-3)))
828
829(define-public python-verboselogs
830 (package
831 (name "python-verboselogs")
832 (version "1.7")
833 (source
834 (origin
835 (method url-fetch)
836 (uri (pypi-uri "verboselogs" version))
837 (sha256
838 (base32
839 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
840 (build-system python-build-system)
841 (native-inputs
842 `(("python-mock" ,python-mock)
843 ("python-astroid" ,python-astroid)
844 ("python-pylint" ,python-pylint)))
845 (home-page "https://verboselogs.readthedocs.io")
846 (synopsis "Verbose logging level for Python's logging module")
847 (description
848 "The @code{verboselogs} package extends Python's @code{logging} module to
849add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
850 (license license:expat)))
851
852(define-public python2-verboselogs
853 (package-with-python2 python-verboselogs))
854
855(define-public python-coloredlogs
856 (package
857 (name "python-coloredlogs")
858 (version "7.3")
859 (source
860 (origin
861 (method url-fetch)
862 (uri (pypi-uri "coloredlogs" version))
863 (sha256
864 (base32
865 "1blcann6dyg5dhps9pg12rn0q0rjrlajpmmil0gy0j4cbvnl2il9"))))
866 (build-system python-build-system)
867 (arguments
868 `(;Tests require some updated modules
869 #:tests? #f))
870 (propagated-inputs
871 `(("python-capturer" ,python-capturer)))
872 (home-page "https://coloredlogs.readthedocs.io")
873 (synopsis "Colored stream handler for Python's logging module")
874 (description
875 "The @code{coloredlogs} package enables colored terminal output for
876Python's logging module. The @code{ColoredFormatter} class inherits from
877@code{logging.Formatter} and uses ANSI escape sequences to render your logging
878messages in color.")
879 (license license:expat)))
880
881(define-public python2-coloredlogs
882 (package-with-python2 python-coloredlogs))
883
4caf37b0
MC
884(define-public python-et-xmlfile
885 (package
886 (name "python-et-xmlfile")
887 (version "1.0.1")
888 (source
889 (origin
890 (method url-fetch)
891 (uri (pypi-uri "et_xmlfile" version))
892 (sha256
893 (base32
894 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
895 (build-system python-build-system)
896 (arguments
897 `(#:phases (modify-phases %standard-phases
898 (replace 'check
899 (lambda _
900 (invoke "pytest"))))))
901 (native-inputs
902 `(("python-pytest" ,python-pytest)
903 ("python-lxml" ,python-lxml))) ;used for the tests
904 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
905 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
906 (description "This Python library is based upon the @code{xmlfile} module
907from @code{lxml}. It aims to provide a low memory, compatible implementation
908of @code{xmlfile}.")
909 (license license:expat)))
910
911(define-public python2-et-xmlfile
912 (package-with-python2 python-et-xmlfile))
913
a042d348
MC
914(define-public python-openpyxl
915 (package
916 (name "python-openpyxl")
441e6d93 917 (version "2.6.2")
a042d348
MC
918 (source
919 (origin
920 ;; We use the upstream repository, as the tests are not included in the
921 ;; PyPI releases.
922 (method hg-fetch)
923 (uri (hg-reference
924 (url "https://bitbucket.org/openpyxl/openpyxl")
925 (changeset version)))
926 (file-name (string-append name "-" version "-checkout"))
927 (sha256
441e6d93 928 (base32 "1qhij6kcvdxqjy4g6193nsv4q7fy8n4fwyd3c2z047idlm6s3j4w"))))
a042d348
MC
929 (build-system python-build-system)
930 (arguments
931 `(#:phases (modify-phases %standard-phases
932 (replace 'check
933 (lambda _
934 (invoke "pytest"))))))
935 (native-inputs
936 ;; For the test suite.
937 `(("python-lxml" ,python-lxml)
938 ("python-pillow" ,python-pillow)
939 ("python-pytest" ,python-pytest)))
940 (propagated-inputs
941 `(("python-et-xmlfile" ,python-et-xmlfile)
942 ("python-jdcal" ,python-jdcal)))
943 (home-page "https://openpyxl.readthedocs.io")
944 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
945 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
946XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
947standard.")
948 (license license:expat)))
949
44d10b1f
RW
950(define-public python-eventlet
951 (package
952 (name "python-eventlet")
953 (version "0.20.1")
954 (source
955 (origin
956 (method url-fetch)
957 (uri (pypi-uri "eventlet" version))
958 (sha256
959 (base32
960 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
961 (build-system python-build-system)
962 (propagated-inputs
963 `(("python-greenlet" ,python-greenlet)))
964 (arguments
965 ;; TODO: Requires unpackaged 'enum-compat'.
966 '(#:tests? #f))
967 (home-page "http://eventlet.net")
968 (synopsis "Concurrent networking library for Python")
969 (description
970 "Eventlet is a concurrent networking library for Python that
971allows you to change how you run your code, not how you write it.
972It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
973Coroutines ensure that the developer uses a blocking style of programming
974that is similar to threading, but provide the benefits of non-blocking I/O.
975The event dispatch is implicit, which means you can easily use @code{Eventlet}
976from the Python interpreter, or as a small part of a larger application.")
977 (license license:expat)))
978
979(define-public python2-eventlet
980 (let ((base (package-with-python2
981 (strip-python2-variant python-eventlet))))
982 (package (inherit base)
983 (propagated-inputs
984 `(("python2-enum34" ,python2-enum34)
985 ,@(package-propagated-inputs base))))))
986
987(define-public python-six
988 (package
989 (name "python-six")
990 (version "1.11.0")
991 (source
992 (origin
993 (method url-fetch)
994 (uri (pypi-uri "six" version))
995 (sha256
996 (base32
997 "1scqzwc51c875z23phj48gircqjgnn3af8zy2izjwmnlxrxsgs3h"))))
998 (build-system python-build-system)
999 (arguments
1000 `(#:phases
1001 (modify-phases %standard-phases
1002 (replace 'check
1003 (lambda _
1004 (invoke "py.test" "-v"))))))
1005 (native-inputs
1006 `(("python-py" ,python-py)
1007 ("python-pytest" ,python-pytest-bootstrap)))
1008 (home-page "https://pypi.python.org/pypi/six/")
1009 (synopsis "Python 2 and 3 compatibility utilities")
1010 (description
1011 "Six is a Python 2 and 3 compatibility library. It provides utility
1012functions for smoothing over the differences between the Python versions with
1013the goal of writing Python code that is compatible on both Python versions.
1014Six supports every Python version since 2.5. It is contained in only one
1015Python file, so it can be easily copied into your project.")
1016 (license license:x11)))
1017
1018(define-public python2-six
1019 (package-with-python2 python-six))
1020
1021(define-public python-six-bootstrap
1022 (package
1023 (inherit python-six)
1024 (name "python-six-bootstrap")
1025 (native-inputs `())
1026 (arguments `(#:tests? #f))))
1027
1028(define-public python2-six-bootstrap
1029 (package-with-python2 python-six-bootstrap))
1030
1031(define-public python-schedule
1032 (package
1033 (name "python-schedule")
1034 (version "0.4.3")
1035 (source
1036 (origin
1037 (method url-fetch)
1038 (uri (pypi-uri "schedule" version))
1039 (sha256
1040 (base32
1041 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1042 (build-system python-build-system)
1043 (native-inputs
1044 `(("python-pytest" ,python-pytest)
1045 ("python-mock" ,python-mock)))
1046 (home-page "https://github.com/dbader/schedule")
1047 (synopsis "Schedule periodic function calls in Python")
1048 (description
1049 "Schedule is an in-process scheduler for periodic jobs that uses the
1050builder pattern for configuration. Schedule lets you run Python functions (or
1051any other callable) periodically at pre-determined intervals using a simple,
1052human-friendly syntax.")
1053 (license license:expat)))
1054
1055(define-public python2-schedule
1056 (package-with-python2 python-schedule))
1057
1058(define-public python-pandas
1059 (package
1060 (name "python-pandas")
c0d43f62 1061 (version "0.24.2")
44d10b1f
RW
1062 (source
1063 (origin
1064 (method url-fetch)
1065 (uri (pypi-uri "pandas" version))
1066 (sha256
c0d43f62 1067 (base32 "18imlm8xbhcbwy4wa957a1fkamrcb0z988z006jpfda3ki09z4ag"))))
44d10b1f
RW
1068 (build-system python-build-system)
1069 (arguments
1070 `(#:modules ((guix build utils)
1071 (guix build python-build-system)
1072 (ice-9 ftw)
1073 (srfi srfi-26))
1074 #:phases (modify-phases %standard-phases
c0d43f62
MC
1075 (add-after 'unpack 'patch-which
1076 (lambda* (#:key inputs #:allow-other-keys)
1077 (let ((which (assoc-ref inputs "which")))
1078 (substitute* "pandas/io/clipboard/__init__.py"
1079 (("^CHECK_CMD = .*")
1080 (string-append "CHECK_CMD = \"" which "\"\n"))))
1081 #t))
44d10b1f
RW
1082 (replace 'check
1083 (lambda _
1084 (let ((build-directory
1085 (string-append
1086 (getcwd) "/build/"
1087 (car (scandir "build"
1088 (cut string-prefix? "lib." <>))))))
1089 ;; Disable the "strict data files" option which causes
c0d43f62
MC
1090 ;; the build to error out if required data files are
1091 ;; not available (as is the case with PyPI archives).
44d10b1f
RW
1092 (substitute* "setup.cfg"
1093 (("addopts = --strict-data-files") "addopts = "))
1094 (with-directory-excursion build-directory
c0d43f62
MC
1095 ;; Delete tests that require "moto" which is not yet
1096 ;; in Guix.
44d10b1f
RW
1097 (for-each delete-file
1098 '("pandas/tests/io/conftest.py"
1099 "pandas/tests/io/json/test_compression.py"
1100 "pandas/tests/io/parser/test_network.py"
44d10b1f
RW
1101 "pandas/tests/io/test_parquet.py"))
1102 (invoke "pytest" "-vv" "pandas" "--skip-slow"
1103 "--skip-network" "-k"
1104 ;; XXX: Due to the deleted tests above.
1105 "not test_read_s3_jsonl"))))))))
1106 (propagated-inputs
1107 `(("python-numpy" ,python-numpy)
667c6ef5 1108 ("python-openpyxl" ,python-openpyxl)
44d10b1f 1109 ("python-pytz" ,python-pytz)
667c6ef5
MC
1110 ("python-dateutil" ,python-dateutil)
1111 ("python-xlrd" ,python-xlrd)))
c0d43f62
MC
1112 (inputs
1113 `(("which" ,which)))
44d10b1f
RW
1114 (native-inputs
1115 `(("python-cython" ,python-cython)
1116 ("python-beautifulsoup4" ,python-beautifulsoup4)
1117 ("python-lxml" ,python-lxml)
1118 ("python-html5lib" ,python-html5lib)
1119 ("python-nose" ,python-nose)
c0d43f62
MC
1120 ("python-pytest" ,python-pytest)
1121 ("python-pytest-mock" ,python-pytest-mock)))
44d10b1f
RW
1122 (home-page "https://pandas.pydata.org")
1123 (synopsis "Data structures for data analysis, time series, and statistics")
1124 (description
1125 "Pandas is a Python package providing fast, flexible, and expressive data
1126structures designed to make working with structured (tabular,
1127multidimensional, potentially heterogeneous) and time series data both easy
1128and intuitive. It aims to be the fundamental high-level building block for
1129doing practical, real world data analysis in Python.")
1130 (license license:bsd-3)))
1131
1132(define-public python2-pandas
1133 (package-with-python2 python-pandas))
1134
1135(define-public python2-mechanize
1136 (package
1137 (name "python2-mechanize")
1138 (version "0.2.5")
1139 (source
1140 (origin
1141 (method url-fetch)
1cc184e6 1142 (uri (pypi-uri "mechanize" version))
44d10b1f
RW
1143 (sha256
1144 (base32
1145 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1146 (build-system python-build-system)
1147 (arguments
1148 `(#:python ,python-2 ; apparently incompatible with Python 3
1149 #:tests? #f))
1150 ;; test fails with message
1151 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1152 ;; (python-3.3.2) or
1153 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1154 ;; (python-2.7.5).
1155 ;; The source code is from March 2011 and probably not up-to-date
1156 ;; with respect to python unit tests.
1157 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1158 (synopsis
1159 "Stateful programmatic web browsing in Python")
1160 (description
1161 "Mechanize implements stateful programmatic web browsing in Python,
1162after Andy Lester’s Perl module WWW::Mechanize.")
1163 (license (license:non-copyleft
1164 "file://COPYING"
1165 "See COPYING in the distribution."))))
1166
1167
1168(define-public python-simplejson
1169 (package
1170 (name "python-simplejson")
1171 (version "3.14.0")
1172 (source
1173 (origin
1174 (method url-fetch)
1175 (uri (pypi-uri "simplejson" version))
1176 (sha256
1177 (base32
1178 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1179 (build-system python-build-system)
1180 (home-page "http://simplejson.readthedocs.org/en/latest/")
1181 (synopsis
1182 "Json library for Python")
1183 (description
1184 "JSON (JavaScript Object Notation) is a subset of JavaScript
1185syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1186format.
1187
1188Simplejson exposes an API familiar to users of the standard library marshal
1189and pickle modules. It is the externally maintained version of the json
1190library contained in Python 2.6, but maintains compatibility with Python 2.5
1191and (currently) has significant performance advantages, even without using
1192the optional C extension for speedups. Simplejson is also supported on
1193Python 3.3+.")
1194 (license license:x11)))
1195
1196(define-public python2-simplejson
1197 (package-with-python2 python-simplejson))
1198
1199
1200(define-public python-pyicu
1201 (package
1202 (name "python-pyicu")
1203 (version "2.2")
1204 (source
1205 (origin
1206 (method url-fetch)
1207 (uri (pypi-uri "PyICU" version))
1208 (sha256
1209 (base32
1210 "0wq9y5fi1ighgf5aws9nr87vi1w44p7q1k83rx2y3qj5d2xyhspa"))))
1211 (build-system python-build-system)
1212 (inputs
1213 `(("icu4c" ,icu4c)))
1214 (native-inputs
1215 `(("python-pytest" ,python-pytest)
1216 ("python-six" ,python-six)))
1217 (home-page "https://github.com/ovalhub/pyicu")
1218 (synopsis "Python extension wrapping the ICU C++ API")
1219 (description
1220 "PyICU is a python extension wrapping the ICU C++ API.")
1221 (properties `((python2-variant . ,(delay python2-pyicu))))
1222 (license license:x11)))
1223
1224(define-public python2-pyicu
1225 (let ((base (package-with-python2
1226 (strip-python2-variant python-pyicu))))
1227 (package
1228 (inherit base)
1229 (arguments
1230 `(,@(package-arguments base)
1231 #:phases
1232 (modify-phases %standard-phases
1233 (add-before 'check 'delete-failing-test
1234 (λ _
1235 ;; XXX: This fails due to Unicode issues unique to Python 2,
1236 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1237 (delete-file "test/test_Script.py")
1238 #t))))))))
1239
1240(define-public python2-dogtail
1241 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1242 ;; spaces in indentation" with Python 3.
1243 (package
1244 (name "python2-dogtail")
1245 (version "0.9.9")
1246 (source (origin
1247 (method url-fetch)
1248 (uri (pypi-uri "dogtail" version))
1249 (sha256
1250 (base32
1251 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1252 (build-system python-build-system)
1253 (arguments `(#:python ,python-2
1254 #:tests? #f)) ; invalid command "test"
1255 ;; Currently no offical homepage.
1256 (home-page "https://pypi.python.org/pypi/dogtail/")
1257 (synopsis "GUI test tool and automation framework written in Python")
1258 (description
1259 "Dogtail is a GUI test tool and automation framework written in Python.
1260It uses Accessibility (a11y) technologies to communicate with desktop
1261applications. dogtail scripts are written in Python and executed like any
1262other Python program.")
1263 (license license:gpl2+)))
1264
1265(define-public python-empy
1266 (package
1267 (name "python-empy")
0f6d5115 1268 (version "3.3.3")
44d10b1f
RW
1269 (source (origin
1270 (method url-fetch)
1271 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1272 version ".tar.gz"))
1273 (sha256
1274 (base32
0f6d5115 1275 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
44d10b1f
RW
1276 (build-system python-build-system)
1277 (arguments
0f6d5115 1278 `(#:tests? #f)) ; python2 only
44d10b1f
RW
1279 (home-page "http://www.alcyone.com/software/empy/")
1280 (synopsis "Templating system for Python")
1281 (description
1282 "EmPy is a system for embedding Python expressions and statements in
1283template text; it takes an EmPy source file, processes it, and produces
1284output. This is accomplished via expansions, which are special signals to the
1285EmPy system and are set off by a special prefix (by default the at sign, @@).
1286EmPy can expand arbitrary Python expressions and statements in this way, as
1287well as a variety of special forms. Textual data not explicitly delimited in
1288this way is sent unaffected to the output, allowing Python to be used in
1289effect as a markup language. Also supported are callbacks via hooks,
1290recording and playback via diversions, and dynamic, chainable filters. The
1291system is highly configurable via command line options and embedded
1292commands.")
1293 (license license:lgpl2.1+)))
1294
1295(define-public python2-empy
0f064242
TGR
1296 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
1297 (package
1298 (inherit base)
1299 (arguments `(,@(package-arguments base)
1300 #:tests? #t)))))
44d10b1f
RW
1301
1302(define-public python2-element-tree
1303 (package
1304 (name "python2-element-tree")
1305 (version "1.2.6")
1306 (source (origin
1307 (method url-fetch)
1308 (uri (string-append
1309 "http://effbot.org/media/downloads/elementtree-"
1310 version "-20050316.tar.gz"))
1311 (sha256
1312 (base32
1313 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1314 (build-system python-build-system)
1315 (arguments
1316 `(#:python ,python-2 ; seems to be part of Python 3
1317 #:tests? #f)) ; no 'test' sub-command
1318 (synopsis "Toolkit for XML processing in Python")
1319 (description
1320 "ElementTree is a Python library supporting lightweight XML processing.")
1321 (home-page "http://effbot.org/zone/element-index.htm")
1322 (license (license:x11-style
1323 "http://docs.python.org/2/license.html"
1324 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1325
1326(define-public python2-pybugz
1327 (package
1328 (name "python2-pybugz")
1329 (version "0.6.11")
1330 (source (origin
1331 (method url-fetch)
1332 (uri (string-append
1333 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1334 version ".tar.gz"))
1335 (sha256
1336 (base32
1337 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1338 (patches (search-patches "pybugz-stty.patch"
1339 "pybugz-encode-error.patch"))))
1340 (build-system python-build-system)
1341 (arguments
1342 `(#:python ,python-2 ; SyntaxError with Python 3
1343 #:tests? #f)) ; no 'test' sub-command
1344 (propagated-inputs
1345 `(("element-tree" ,python2-element-tree)))
1346 (synopsis "Python and command-line interface to Bugzilla")
1347 (description
1348 "PyBugz is a Python library and command-line tool to query the Bugzilla
1349bug tracking system. It is meant as an aid to speed up interaction with the
1350bug tracker.")
1351 (home-page "http://www.liquidx.net/pybugz/")
1352 (license license:gpl2)))
1353
1354(define-public python2-enum
1355 (package
1356 (name "python2-enum")
1357 (version "0.4.6")
1358 (source (origin
1359 (method url-fetch)
1360 (uri (pypi-uri "enum" version))
1361 (sha256
1362 (base32
1363 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1364 (build-system python-build-system)
1365 (arguments
1366 `(#:python ,python-2))
1367 (home-page "http://pypi.python.org/pypi/enum/")
1368 (synopsis "Robust enumerated type support in Python")
1369 (description
1370 "This provides a module for robust enumerations in Python. It has
1371been superseded by the Python standard library and is provided only for
1372compatibility.")
1373 ;; Choice of either license.
1374 (license (list license:gpl3+ license:psfl))))
1375
1376(define-public python-enum34
1377 (package
1378 (name "python-enum34")
1379 (version "1.1.6")
1380 (source
1381 (origin
1382 (method url-fetch)
1383 (uri (pypi-uri "enum34" version))
1384 (sha256
1385 (base32
1386 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1387 (build-system python-build-system)
1388 (home-page "https://pypi.python.org/pypi/enum34")
1389 (synopsis "Backported Python 3.4 Enum")
1390 (description
1391 "Enum34 is the new Python stdlib enum module available in Python 3.4
1392backported for previous versions of Python from 2.4 to 3.3.")
1393 (license license:bsd-3)))
1394
1395(define-public python2-enum34
1396 (package-with-python2 python-enum34))
1397
1398(define-public python-parse-type
1399 (package
1400 (name "python-parse-type")
1401 (version "0.4.2")
1402 (source
1403 (origin
1404 (method url-fetch)
1405 (uri (pypi-uri "parse_type" version))
1406 (sha256
1407 (base32
1408 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1409 (build-system python-build-system)
1410 (propagated-inputs
1411 `(("python-six" ,python-six)
1412 ("python-parse" ,python-parse)))
1413 (native-inputs
1414 `(("python-pytest" ,python-pytest)
1415 ("python-pytest-runner" ,python-pytest-runner)))
1416 (home-page "https://github.com/jenisys/parse_type")
1417 (synopsis "Extended parse module")
1418 (description
1419 "Parse_type extends the python parse module.")
1420 (properties
1421 `((python2-variant . ,(delay python2-parse-type))))
1422 (license license:bsd-3)))
1423
1424(define-public python2-parse-type
1425 (let ((base (package-with-python2
1426 (strip-python2-variant python-parse-type))))
1427 (package (inherit base)
1428 (propagated-inputs
1429 `(("python2-enum34" ,python2-enum34)
1430 ,@(package-propagated-inputs base))))))
1431
1432(define-public python-parse
1433 (package
1434 (name "python-parse")
1435 (version "1.8.4")
1436 (source
1437 (origin
1438 (method url-fetch)
1439 (uri (pypi-uri "parse" version))
1440 (sha256
1441 (base32
1442 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
1443 (build-system python-build-system)
1444 (arguments
1445 `(#:phases
1446 (modify-phases %standard-phases
1447 (replace 'check
1448 (lambda _ (invoke "python" "test_parse.py"))))))
1449 (home-page "https://github.com/r1chardj0n3s/parse")
1450 (synopsis "Parse strings")
1451 (description
1452 "Parse strings using a specification based on the Python @code{format()}
1453syntax.")
1454 (license license:x11)))
1455
1456(define-public python-polib
1457 (package
1458 (name "python-polib")
1459 (version "1.0.8")
1460 (source (origin
1461 (method url-fetch)
1462 (uri (pypi-uri "polib" version))
1463 (sha256
1464 (base32
1465 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1466 (build-system python-build-system)
1467 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1468 (synopsis "Manipulate, create and modify gettext files")
1469 (description "Polib can manipulate any gettext format (po, pot and mo)
1470files. It can be used to create po files from scratch or to modify
1471existing ones.")
1472 (license license:expat)))
1473
1474(define-public python2-polib
1475 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1476 (package
1477 (inherit base)
1478 (arguments `(,@(package-arguments base)
1479 ;; Tests don't work with python2.
1480 #:tests? #f)))))
1481
1482(define-public scons
1483 (package
1484 (name "scons")
05487ed8 1485 (version "3.0.4")
44d10b1f 1486 (source (origin
ad34338d
RW
1487 (method git-fetch)
1488 (uri (git-reference
1489 (url "https://github.com/SCons/scons.git")
1490 (commit version)))
1491 (file-name (git-file-name name version))
44d10b1f
RW
1492 (sha256
1493 (base32
05487ed8 1494 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
44d10b1f
RW
1495 (build-system python-build-system)
1496 (arguments
1497 `(#:use-setuptools? #f ; still relies on distutils
ad34338d
RW
1498 #:tests? #f ; no 'python setup.py test' command
1499 #:phases
1500 (modify-phases %standard-phases
1501 (add-before 'build 'bootstrap
1502 (lambda _
1503 (substitute* "src/engine/SCons/compat/__init__.py"
1504 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
1505 "sys.modules[new] = __import__(old)"))
05487ed8
RW
1506 (substitute* "src/engine/SCons/Platform/__init__.py"
1507 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
1508 "mod = __import__(full_name)"))
ad34338d
RW
1509 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
1510 (chdir "build/scons")
1511 #t)))))
44d10b1f
RW
1512 (home-page "http://scons.org/")
1513 (synopsis "Software construction tool written in Python")
1514 (description
1515 "SCons is a software construction tool. Think of SCons as an improved,
1516cross-platform substitute for the classic Make utility with integrated
1517functionality similar to autoconf/automake and compiler caches such as ccache.
1518In short, SCons is an easier, more reliable and faster way to build
1519software.")
1520 (license license:x11)))
1521
1522(define-public scons-python2
1523 (package
1524 (inherit (package-with-python2 scons))
1525 (name "scons-python2")))
1526
1527(define-public python-extras
1528 (package
1529 (name "python-extras")
1530 (version "1.0.0")
1531 (source
1532 (origin
1533 (method url-fetch)
1534 (uri (pypi-uri "extras" version))
1535 (sha256
1536 (base32
1537 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1538 (build-system python-build-system)
1539 (arguments
1540 ;; FIXME: Circular dependency on testtools.
1541 '(#:tests? #f))
1542 (home-page "https://github.com/testing-cabal/extras")
1543 (synopsis "Useful extensions to the Python standard library")
1544 (description
1545 "Extras is a set of extensions to the Python standard library.")
1546 (license license:expat)))
1547
1548(define-public python2-extras
1549 (package-with-python2 python-extras))
1550
1551(define-public python-mimeparse
1552 (package
1553 (name "python-mimeparse")
1554 (version "1.6.0")
1555 (source
1556 (origin
1557 (method url-fetch)
89bf667c 1558 (uri (pypi-uri "python-mimeparse" version))
44d10b1f
RW
1559 (sha256
1560 (base32
1561 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
1562 (build-system python-build-system)
1563 (arguments
1564 '(#:phases
1565 (modify-phases %standard-phases
1566 (replace 'check
1567 (lambda _
1568 (invoke "./mimeparse_test.py"))))))
1569 (home-page
1570 "https://github.com/dbtsai/python-mimeparse")
1571 (synopsis "Python library for parsing MIME types")
1572 (description
1573 "Mimeparse provides basic functions for parsing MIME type names and
1574matching them against a list of media-ranges.")
1575 (license license:expat)))
1576
1577(define-public python2-mimeparse
1578 (package-with-python2 python-mimeparse))
1579
1580(define-public python-miniboa
1581 (package
1582 (name "python-miniboa")
1583 (version "1.0.7")
1584 (source
1585 (origin
1586 (method url-fetch)
1587 (uri (pypi-uri "miniboa" version))
1588 (sha256
1589 (base32
1590 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
1591 (build-system python-build-system)
1592 (home-page "https://github.com/shmup/miniboa")
1593 (synopsis "Simple, single-threaded Telnet server")
1594 (description
1595 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
1596server.")
1597 (license license:asl2.0)))
1598
1599(define-public python2-miniboa
1600 (package-with-python2 python-miniboa))
1601
1602(define-public python-pafy
1603 (package
1604 (name "python-pafy")
1605 (version "0.5.3.1")
1606 (source
1607 (origin
1608 (method url-fetch)
1609 (uri (pypi-uri "pafy" version))
1610 (sha256
1611 (base32
1612 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1613 (build-system python-build-system)
1614 (arguments
1615 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1616 (propagated-inputs
1617 ;; Youtube-dl is a python package which is imported in the file
1618 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1619 `(("youtube-dl" ,youtube-dl)))
1620 (home-page "https://np1.github.io/pafy/")
1621 (synopsis "Retrieve YouTube content and metadata")
1622 (description
1623 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1624 (license license:lgpl3+)))
1625
1626(define-public python2-funcsigs
1627 (package
1628 (name "python2-funcsigs")
1629 (version "1.0.2")
1630 (source (origin
1631 (method url-fetch)
1632 (uri (pypi-uri "funcsigs" version))
1633 (sha256
1634 (base32
1635 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1636 (build-system python-build-system)
1637 (arguments
1638 `(#:python ,python-2))
1639 (native-inputs
1640 `(("python2-unittest2" ,python2-unittest2)))
1641 (home-page "http://funcsigs.readthedocs.org")
1642 (synopsis "Python function signatures from PEP362")
1643 (description
1644 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1645 (license license:asl2.0)))
1646
1647(define-public python2-funcsigs-bootstrap
1648 (package
1649 (inherit python2-funcsigs)
1650 (name "python2-funcsigs-bootstrap")
1651 (native-inputs `())
1652 (arguments
1653 `(#:tests? #f
1654 ,@(package-arguments python2-funcsigs)))))
1655
1656(define-public python-py
1657 (package
1658 (name "python-py")
1659 (version "1.5.4")
1660 (source
1661 (origin
1662 (method url-fetch)
1663 (uri (pypi-uri "py" version))
1664 (sha256
1665 (base32
1666 "1xxvwfn82457djf55f5n2c94699rfqnk43br8fif2r2q8gvrmm9z"))))
1667 (build-system python-build-system)
1668 (arguments
1669 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1670 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1671 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1672 ;; Is this module globally installed?"
1673 '(#:tests? #f))
1674 (native-inputs
1675 `(("python-setuptools-scm" ,python-setuptools-scm)))
1676 (home-page "https://github.com/pytest-dev/py")
1677 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1678 (description
1679 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1680code introspection, and logging.")
1681 (license license:expat)))
1682
1683(define-public python2-py
1684 (package-with-python2 python-py))
1685
1686;; Recent versions of python-fixtures and python-testrepository need
1687;; python-pbr for packaging, which itself needs these two packages for
1688;; testing.
1689;; To fix this circular dependency, we use a build of python-pbr, based on the
1690;; same source, just without any test dependencies and with tests disabled.
1691;; python-pbr-minmal is then used to package python-fixtures and
1692;; python-testrepository.
1693;; Strictly speaking we currently could remove the test-requirements from the
1694;; normal python-pbr package (and save this package) since test are disabled
1695;; there anyway. But this may change in future.
1696(define-public python-pbr-minimal
1697 (package
1698 (name "python-pbr-minimal")
1699 (version "3.0.1")
1700 (source
1701 (origin
1702 (method url-fetch)
1703 (uri (pypi-uri "pbr" version))
1704 (sha256
1705 (base32
1706 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1707 (build-system python-build-system)
1708 (arguments
1709 `(#:tests? #f))
1710 (home-page "http://docs.openstack.org/developer/pbr/")
1711 (synopsis "Minimal build of python-pbr used for bootstrapping")
1712 (description
1713 "Used only for bootstrapping python2-pbr, you should not need this.")
1714 (license license:asl2.0)))
1715
1716(define-public python2-pbr-minimal
1717 (package-with-python2 python-pbr-minimal))
1718
1719(define-public python-pbr
1720 (package
1721 (inherit python-pbr-minimal)
1722 (name "python-pbr")
1723 (arguments
1724 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1725 (propagated-inputs
1726 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1727 (native-inputs
1728 `(("python-fixtures" ,python-fixtures-bootstrap)
1729 ;; discover, coverage, hacking, subunit
1730 ("python-mock" ,python-mock)
1731 ("python-six" ,python-six)
1732 ("python-sphinx" ,python-sphinx)
1733 ("python-testrepository" ,python-testrepository-bootstrap)
1734 ("python-testresources" ,python-testresources-bootstrap)
1735 ("python-testscenarios" ,python-testscenarios-bootstrap)
1736 ("python-testtools" ,python-testtools-bootstrap)
1737 ("python-virtualenv" ,python-virtualenv)))
1738 (synopsis "Enhance the default behavior of Python’s setuptools")
1739 (description
1740 "Python Build Reasonableness (PBR) is a library that injects some useful
1741and sensible default behaviors into your setuptools run. It will set
1742versions, process requirements files and generate AUTHORS and ChangeLog file
1743from git information.
1744")))
1745
1746(define-public python2-pbr
1747 (package-with-python2 python-pbr))
1748
ea43f0d5
MB
1749(define-public python-pyrsistent
1750 (package
1751 (name "python-pyrsistent")
1752 (version "0.14.11")
1753 (home-page "https://github.com/tobgu/pyrsistent")
1754 (source (origin
1755 (method url-fetch)
1756 (uri (pypi-uri "pyrsistent" version))
1757 (sha256
1758 (base32
1759 "1qkh74bm296mp5g3r11lgsksr6bh4w1bf8pji4nmxdlfj542ga1w"))))
1760 (build-system python-build-system)
1761 (native-inputs
1762 `(("python-hypothesis" ,python-hypothesis)
1763 ("python-pytest" ,python-pytest)
1764 ("python-pytest-runner" ,python-pytest-runner)))
1765 (propagated-inputs
1766 `(("python-six" ,python-six)))
1767 (synopsis "Persistent data structures for Python")
1768 (description
1769 "Pyrsistent is a number of persistent collections (by some referred to as
1770functional data structures). Persistent in the sense that they are immutable.
1771
1772All methods on a data structure that would normally mutate it instead return a
1773new copy of the structure containing the requested updates. The original
1774structure is left untouched.")
1775 (license license:expat)))
1776
1777(define-public python2-pyrsistent
1778 (package-with-python2 python-pyrsistent))
1779
44d10b1f
RW
1780(define-public python-exif-read
1781 (package
1782 (name "python-exif-read")
1783 (version "2.1.2")
1784 (source (origin
1785 (method url-fetch)
1786 (uri (pypi-uri "ExifRead" version))
1787 (sha256
1788 (base32
1789 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
1790 (build-system python-build-system)
1791 (arguments `(#:tests? #f)) ; no tests
1792 (home-page "https://github.com/ianare/exif-py")
1793 (synopsis "Python library to extract EXIF data from image files")
1794 (description
1795 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1796files.")
1797 (license license:bsd-3)))
1798
1799(define-public python2-exif-read
1800 (package-with-python2 python-exif-read))
1801
1802(define-public python-pyld
1803 (package
1804 (name "python-pyld")
1805 (version "1.0.3")
1806 (source (origin
1807 (method url-fetch)
1808 (uri (pypi-uri "PyLD" version))
1809 (sha256
1810 (base32
1811 "12i2g6xdj30k7xxcibg3sc5y76snwq8l6n8fy9lyi577kgy0h2pm"))))
1812 (build-system python-build-system)
1813 (home-page "https://github.com/digitalbazaar/pyld")
1814 (synopsis "Python implementation of the JSON-LD specification")
1815 (description
1816 "PyLD is an implementation of the JSON-LD specification.")
1817 (license license:bsd-3)))
1818
1819(define-public python2-pyld
1820 (package-with-python2 python-pyld))
1821
1822(define-public python-click
1823 (package
1824 (name "python-click")
61984855 1825 (version "7.0")
44d10b1f
RW
1826 (source
1827 (origin
1828 (method url-fetch)
1829 (uri (pypi-uri "click" version))
1830 (sha256
1831 (base32
61984855 1832 "1mzjixd4vjbjvzb6vylki9w1556a9qmdh35kzmq6cign46av952v"))))
44d10b1f
RW
1833 (build-system python-build-system)
1834 (arguments
8d7e7ca6 1835 `(#:phases
44d10b1f
RW
1836 (modify-phases %standard-phases
1837 (add-after 'unpack 'fix-paths
1838 (lambda* (#:key inputs #:allow-other-keys)
1839 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
1840 "cross-libc" "libc"))))
1841 (substitute* "click/_unicodefun.py"
1842 (("'locale'")
1843 (string-append "'" glibc "/bin/locale'"))))
8d7e7ca6
EF
1844 #t))
1845 (replace 'check
1846 (lambda _
1847 (invoke "python" "-m" "pytest"))))))
44d10b1f
RW
1848 (native-inputs
1849 `(("python-pytest" ,python-pytest)))
61984855 1850 (home-page "https://palletsprojects.com/p/click/")
44d10b1f
RW
1851 (synopsis "Command line library for Python")
1852 (description
1853 "Click is a Python package for creating command line interfaces in a
1854composable way with as little code as necessary. Its name stands for
1855\"Command Line Interface Creation Kit\". It's highly configurable but comes
1856with sensible defaults out of the box.")
1857 (license license:bsd-3)))
1858
1859(define-public python2-click
1860 (package-with-python2 python-click))
1861
1862(define-public python-wheel
1863 (package
1864 (name "python-wheel")
746c074b 1865 (version "0.32.3")
44d10b1f
RW
1866 (source
1867 (origin
1868 (method url-fetch)
1869 (uri (pypi-uri "wheel" version))
1870 (sha256
1871 (base32
746c074b 1872 "1dhxl1bf18bx9szmqcnxbg6204hp3im8089q3hkwh5jfa6zh75q2"))))
44d10b1f
RW
1873 (build-system python-build-system)
1874 (native-inputs
1875 `(("python-jsonschema" ,python-jsonschema)
1876 ("python-pytest-cov" ,python-pytest-cov)))
1877 (home-page "https://bitbucket.org/pypa/wheel/")
1878 (synopsis "Format for built Python packages")
1879 (description
1880 "A wheel is a ZIP-format archive with a specially formatted filename and
1881the @code{.whl} extension. It is designed to contain all the files for a PEP
1882376 compatible install in a way that is very close to the on-disk format. Many
1883packages will be properly installed with only the @code{Unpack} step and the
1884unpacked archive preserves enough information to @code{Spread} (copy data and
1885scripts to their final locations) at any later time. Wheel files can be
1886installed with a newer @code{pip} or with wheel's own command line utility.")
1887 (license license:expat)
1888 (properties `((python2-variant . ,(delay python2-wheel))))))
1889
1890(define-public python2-wheel
1891 (let ((wheel (package-with-python2
1892 (strip-python2-variant python-wheel))))
1893 (package (inherit wheel)
1894 (native-inputs `(("python2-functools32" ,python2-functools32)
1895 ,@(package-native-inputs wheel))))))
1896
1897(define-public python-vcversioner
1898 (package
1899 (name "python-vcversioner")
1900 (version "2.16.0.0")
1901 (source
1902 (origin
1903 (method url-fetch)
1904 (uri (pypi-uri "vcversioner" version))
1905 (sha256
1906 (base32
1907 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
1908 (build-system python-build-system)
1909 (synopsis "Python library for version number discovery")
1910 (description "Vcversioner is a Python library that inspects tagging
1911information in a variety of version control systems in order to discover
1912version numbers.")
1913 (home-page "https://github.com/habnabit/vcversioner")
1914 (license license:isc)))
1915
1916(define-public python2-vcversioner
1917 (package-with-python2 python-vcversioner))
1918
5591fc4f
MC
1919(define-public python-jdcal
1920 (package
1921 (name "python-jdcal")
1922 (version "1.4")
1923 (source
1924 (origin
1925 (method url-fetch)
1926 (uri (pypi-uri "jdcal" version))
1927 (sha256
1928 (base32
1929 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
1930 (build-system python-build-system)
1931 (arguments
1932 `(#:phases (modify-phases %standard-phases
1933 (replace 'check
1934 (lambda _
1935 (invoke "pytest"))))))
1936 (native-inputs
1937 `(("python-pytest" ,python-pytest)))
1938 (home-page "https://github.com/phn/jdcal")
1939 (synopsis "Functions to convert between Julian dates Gregorian dates")
1940 (description "This Python library provides functions for converting
1941between Julian dates and Gregorian dates.")
1942 (license license:bsd-2)))
1943
1944(define-public python2-jdcal
1945 (package-with-python2 python-jdcal))
1946
44d10b1f
RW
1947(define-public python-jsonschema
1948 (package
1949 (name "python-jsonschema")
1adde06e 1950 (version "3.0.1")
44d10b1f
RW
1951 (source (origin
1952 (method url-fetch)
786ccb87 1953 (uri (pypi-uri "jsonschema" version))
44d10b1f
RW
1954 (sha256
1955 (base32
1adde06e 1956 "03g20i1xfg4qdlk4475pl4pp7y0h37g1fbgs5qhy678q9xb822hc"))))
44d10b1f
RW
1957 (build-system python-build-system)
1958 (arguments
1959 '(#:phases
1960 (modify-phases %standard-phases
1adde06e
MB
1961 (replace 'check
1962 (lambda _
1963 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
1964 (invoke "trial" "jsonschema"))))))
44d10b1f 1965 (native-inputs
1adde06e
MB
1966 `(("python-setuptools_scm" ,python-setuptools-scm)
1967 ("python-twisted" ,python-twisted)))
1968 (propagated-inputs
1969 `(("python-attrs" ,python-attrs)
1970 ("python-pyrsistent" ,python-pyrsistent)
1971 ("python-six" ,python-six)))
44d10b1f
RW
1972 (home-page "https://github.com/Julian/jsonschema")
1973 (synopsis "Implementation of JSON Schema for Python")
1974 (description
1975 "Jsonschema is an implementation of JSON Schema for Python.")
1976 (license license:expat)
1977 (properties `((python2-variant . ,(delay python2-jsonschema))))))
1978
1979(define-public python2-jsonschema
1980 (let ((jsonschema (package-with-python2
1981 (strip-python2-variant python-jsonschema))))
1982 (package (inherit jsonschema)
44d10b1f 1983 (propagated-inputs
1adde06e
MB
1984 `(("python2-functools32" ,python2-functools32)
1985 ,@(package-propagated-inputs jsonschema))))))
44d10b1f 1986
914bba28
TGR
1987;; This old version is still required by docker-compose as of 1.24.0.
1988(define-public python-jsonschema-2.6
1989 (package
1990 (name "python-jsonschema")
1991 (version "2.6.0")
1992 (source (origin
1993 (method url-fetch)
1994 (uri (pypi-uri "jsonschema" version))
1995 (sha256
1996 (base32
1997 "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg"))))
1998 (build-system python-build-system)
1999 (arguments
2000 '(#:phases
2001 (modify-phases %standard-phases
2002 (replace 'check (lambda _ (invoke "nosetests"))))))
2003 (native-inputs
2004 `(("python-nose" ,python-nose)
2005 ("python-vcversioner" ,python-vcversioner)))
2006 (home-page "https://github.com/Julian/jsonschema")
2007 (synopsis "Implementation of JSON Schema for Python")
2008 (description
2009 "Jsonschema is an implementation of JSON Schema for Python.")
2010 (license license:expat)
2011 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2012
44d10b1f
RW
2013(define-public python-schema
2014 (package
2015 (name "python-schema")
2016 (version "0.6.6")
2017 (source
2018 (origin
2019 (method url-fetch)
2020 (uri (pypi-uri "schema" version))
2021 (sha256
2022 (base32
2023 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2024 (build-system python-build-system)
2025 (native-inputs
2026 `(("python-pytest" ,python-pytest)))
2027 (home-page "https://github.com/keleshev/schema")
2028 (synopsis "Simple data validation library")
2029 (description
2030 "@code{python-schema} is a library for validating Python data
2031structures, such as those obtained from config-files, forms, external
2032services or command-line parsing, converted from JSON/YAML (or
2033something else) to Python data-types.")
2034 (license license:psfl)))
2035
2036(define-public python2-schema
2037 (package-with-python2 python-schema))
2038
2039(define-public python-schema-0.5
2040 (package (inherit python-schema)
2041 (version "0.5.0")
2042 (source
2043 (origin
2044 (method url-fetch)
2045 (uri (pypi-uri "schema" version))
2046 (sha256
2047 (base32
2048 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2049
2050(define-public python2-schema-0.5
2051 (package-with-python2 python-schema-0.5))
2052
2053(define-public python-kitchen
2054 (package
2055 (name "python-kitchen")
2056 (version "1.2.5")
2057 (source
2058 (origin
2059 (method url-fetch)
2060 (uri (pypi-uri "kitchen" version))
2061 (sha256
2062 (base32
2063 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2064 (build-system python-build-system)
2065 (propagated-inputs
2066 `(("python-chardet" ,python-chardet)))
2067 (home-page "https://github.com/fedora-infra/kitchen")
2068 (synopsis "Python API for snippets")
2069 (description "@code{kitchen} module provides a python API for all sorts of
2070little useful snippets of code that everybody ends up writing for their projects
2071but never seem big enough to build an independent release. Use kitchen and stop
2072cutting and pasting that code over and over.")
2073 (license (list license:lgpl2.1+
2074 ;; subprocess.py, test_subprocess.py,
2075 ;; kitchen/pycompat25/defaultdict.py:
2076 license:psfl))))
2077
2078(define-public python2-kitchen
2079 (package-with-python2 python-kitchen))
2080
2081(define-public python-unidecode
2082 (package
2083 (name "python-unidecode")
bd9d7206 2084 (version "1.1.0")
44d10b1f
RW
2085 (source (origin
2086 (method url-fetch)
2087 (uri (pypi-uri "Unidecode" version))
2088 (sha256
2089 (base32
bd9d7206 2090 "00pi0czzwvbf7djhkkjyvimj60wqdx0llbddzfnax650g9b8yscc"))))
44d10b1f
RW
2091 (build-system python-build-system)
2092 (home-page "https://pypi.python.org/pypi/Unidecode")
2093 (synopsis "ASCII transliterations of Unicode text")
2094 (description
2095 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2096useful when integrating with legacy code that doesn't support Unicode, or for
2097ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2098machine identifiers from human-readable Unicode strings that should still be
2099somewhat intelligible.")
2100 (license license:gpl2+)))
2101
2102(define-public python2-unidecode
2103 (package-with-python2 python-unidecode))
2104
2105(define-public python-pyjwt
2106 (package
2107 (name "python-pyjwt")
2108 (version "1.5.3")
2109 (source
2110 (origin
2111 (method url-fetch)
2112 (uri (pypi-uri "PyJWT" version))
2113 (sha256
2114 (base32
2115 "1rxsg14i33vm2i6lz0my628108c81k43v10n4h3p0gx62xdyf2sh"))
2116 (modules '((guix build utils)))
2117 (snippet
2118 '(begin
2119 (for-each delete-file-recursively
2120 (find-files "." "\\.pyc$"))
2121 #t))))
2122 (build-system python-build-system)
2123 (native-inputs
2124 `(("python-pytest" ,python-pytest)
2125 ("python-pytest-cov" ,python-pytest-cov)
2126 ("python-pytest-runner" ,python-pytest-runner)))
2127 (home-page "https://github.com/progrium/pyjwt")
2128 (synopsis "JSON Web Token implementation in Python")
2129 (description
2130 "PyJWT is a JSON Web Token implementation written in Python.")
2131 (license license:expat)))
2132
2133(define-public python2-pyjwt
2134 (package-with-python2 python-pyjwt))
2135
2136(define-public python-pykka
2137 (package
2138 (name "python-pykka")
2139 (version "1.2.1")
2140 (source
2141 (origin
2142 (method url-fetch)
2143 (uri (pypi-uri "Pykka" version))
2144 (sha256
2145 (base32
2146 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2147 (build-system python-build-system)
2148 (native-inputs
2149 `(("python-mock" ,python-mock)
2150 ("python-nose" ,python-nose)
2151 ("python-gevent" ,python-gevent)
2152 ("python-eventlet" ,python-eventlet)))
2153 (home-page "https://www.pykka.org/")
2154 (synopsis "Pykka is a Python implementation of the actor model")
2155 (description
2156 "Pykka is a Python implementation of the actor model.
2157The actor model introduces some simple rules to control the sharing
2158of state and cooperation between execution units, which makes it
2159easier to build concurrent applications.")
2160 (license license:asl2.0)))
2161
2162(define-public python2-pykka
2163 (package-with-python2 python-pykka))
2164
8d22f7e3
VC
2165(define-public python-pymsgbox
2166 (package
2167 (name "python-pymsgbox")
2168 (version "1.0.6")
2169 (source
2170 (origin
2171 (method git-fetch)
2172 (uri (git-reference
2173 ;; LICENSE.txt is not present on pypi
2174 (url "https://github.com/asweigart/PyMsgBox")
2175 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
2176 (file-name (git-file-name name version))
2177 (sha256
2178 (base32
2179 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
2180 (arguments
2181 ;; Circular dependency to run tests:
2182 ;; Tests need pyautogui, which depends on pymsgbox.
2183 '(#:tests? #f))
2184 (build-system python-build-system)
2185 (home-page "https://github.com/asweigart/PyMsgBox")
2186 (synopsis "Python module for JavaScript-like message boxes")
2187 (description
2188 "PyMsgBox is a simple, cross-platform, pure Python module for
2189JavaScript-like message boxes. Types of dialog boxes include:
2190@enumerate
2191@item alert
2192@item confirm
2193@item prompt
2194@item password
2195@end enumerate
2196")
2197 (license license:bsd-3)))
2198
44d10b1f
RW
2199(define-public python-pympler
2200 (package
2201 (name "python-pympler")
2202 (home-page "https://pythonhosted.org/Pympler/")
2203 (version "0.5")
2204 (source (origin
2205 (method url-fetch)
2206 (uri (pypi-uri "Pympler" version))
2207 (sha256
2208 (base32
2209 "03qwsbilqgvnbl3a1jmpgixbr2kq6m3fvdlzyr3wdp01bwlc85kx"))))
2210 (build-system python-build-system)
2211 (arguments
2212 `(#:phases (modify-phases %standard-phases
2213 (delete 'check)
2214 (add-after 'install 'check
2215 (lambda* (#:key inputs outputs #:allow-other-keys)
2216 (add-installed-pythonpath inputs outputs)
2217 (invoke "python" "setup.py" "test"))))))
2218 (synopsis "Measure, monitor and analyze memory behavior")
2219 (description
2220 "Pympler is a development tool to measure, monitor and analyze
2221the memory behavior of Python objects in a running Python application.
2222
2223By pympling a Python application, detailed insight in the size and the
2224lifetime of Python objects can be obtained. Undesirable or unexpected
2225runtime behavior like memory bloat and other @samp{pymples} can easily
2226be identified.
2227
2228A web profiling frontend exposes process statistics, garbage
2229visualisation and class tracker statistics.")
2230 (license license:asl2.0)))
2231
2232(define-public python2-pympler
2233 (package-with-python2 python-pympler))
2234
2235(define-public python-itsdangerous
2236 (package
2237 (name "python-itsdangerous")
acfcf2ed 2238 (version "1.1.0")
44d10b1f
RW
2239 (source
2240 (origin
2241 (method url-fetch)
acfcf2ed 2242 (uri (pypi-uri "itsdangerous" version))
44d10b1f
RW
2243 (sha256
2244 (base32
acfcf2ed 2245 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
44d10b1f 2246 (build-system python-build-system)
acfcf2ed 2247 (home-page "https://palletsprojects.com/p/itsdangerous/")
44d10b1f
RW
2248 (synopsis "Python library for passing data to/from untrusted environments")
2249 (description
2250 "Itsdangerous provides various helpers to pass trusted data to untrusted
2251environments and back.")
2252 (license license:bsd-3)))
2253
2254(define-public python2-itsdangerous
2255 (package-with-python2 python-itsdangerous))
2256
2257(define-public python-pyyaml
2258 (package
2259 (name "python-pyyaml")
2260 (version "3.13")
2261 (source
2262 (origin
2263 (method url-fetch)
2264 (uri (pypi-uri "PyYAML" version))
2265 (sha256
2266 (base32
2267 "1gx603g484z46cb74j9rzr6sjlh2vndxayicvlyhxdz98lhhkwry"))))
2268 (build-system python-build-system)
2269 (inputs
2270 `(("libyaml" ,libyaml)))
2271 (home-page "http://pyyaml.org/wiki/PyYAML")
2272 (synopsis "YAML parser and emitter for Python")
2273 (description
2274 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2275complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2276API, and sensible error messages. PyYAML supports standard YAML tags and
2277provides Python-specific tags that allow to represent an arbitrary Python
2278object.")
2279 (license license:expat)))
2280
2281(define-public python2-pyyaml
2282 (package-with-python2 python-pyyaml))
2283
2284(define-public python-vine
2285 (package
2286 (name "python-vine")
2287 (version "1.1.4")
2288 (source
2289 (origin
2290 (method url-fetch)
2291 (uri (pypi-uri "vine" version))
2292 (sha256
2293 (base32
2294 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
2295 (build-system python-build-system)
2296 (native-inputs
2297 `(("python-pytest" ,python-pytest)
2298 ("python-case" ,python-case)))
2299 (home-page "https://github.com/celery/vine")
2300 (synopsis "Promises for Python")
2301 (description
2302 "@code{vine} provides a special implementation of promises in that it can
2303be used both for \"promise of a value\" and lazy evaluation. The biggest
2304upside for this is that everything in a promise can also be a promise,
2305e.g. filters, callbacks and errbacks can all be promises.")
2306 (license license:bsd-3)))
2307
2308(define-public python-virtualenv
2309 (package
2310 (name "python-virtualenv")
2782bd51 2311 (version "16.1.0")
44d10b1f
RW
2312 (source
2313 (origin
2314 (method url-fetch)
2315 (uri (pypi-uri "virtualenv" version))
2316 (sha256
2317 (base32
2782bd51 2318 "0242cg3hdq3qdvx5flyrki8lpwlgwf5k45c21ks5049fv7ygm6gq"))))
44d10b1f
RW
2319 (build-system python-build-system)
2320 (arguments
2321 `(#:phases
2322 (modify-phases %standard-phases
2782bd51 2323 (add-before 'check 'disable-failing-test
44d10b1f
RW
2324 (lambda _
2325 ;; Disable failing test. See upstream bug report
2326 ;; https://github.com/pypa/virtualenv/issues/957
2327 (substitute* "tests/test_virtualenv.py"
2328 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2782bd51 2329 #t)))))
44d10b1f
RW
2330 (native-inputs
2331 `(("python-mock" ,python-mock)
2332 ("python-pytest" ,python-pytest)))
2333 (home-page "https://virtualenv.pypa.io/")
2334 (synopsis "Virtual Python environment builder")
2335 (description
2336 "Virtualenv is a tool to create isolated Python environments.")
2337 (license license:expat)))
2338
2339(define-public python2-virtualenv
2340 (package-with-python2 python-virtualenv))
2341
2342(define-public python-markupsafe
2343 (package
2344 (name "python-markupsafe")
753eb411 2345 (version "1.1.1")
44d10b1f
RW
2346 (source
2347 (origin
2348 (method url-fetch)
5182927c 2349 (uri (pypi-uri "MarkupSafe" version))
44d10b1f
RW
2350 (sha256
2351 (base32
753eb411 2352 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
44d10b1f 2353 (build-system python-build-system)
753eb411
MB
2354 (arguments
2355 `(#:modules ((ice-9 ftw)
2356 (srfi srfi-1)
2357 (srfi srfi-26)
2358 (guix build utils)
2359 (guix build python-build-system))
2360 #:phases (modify-phases %standard-phases
2361 (replace 'check
2362 (lambda _
2363 (let ((cwd (getcwd))
2364 (libdir (find (cut string-prefix? "lib." <>)
2365 (scandir "build"))))
2366 (setenv "PYTHONPATH"
2367 (string-append cwd "/build/" libdir ":"
2368 (getenv "PYTHONPATH")))
2369 (invoke "pytest" "-vv")))))))
2370 (native-inputs
2371 `(("python-pytest" ,python-pytest)))
44d10b1f
RW
2372 (home-page "https://github.com/mitsuhiko/markupsafe")
2373 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2374 (description
2375 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2376for Python.")
2377 (license license:bsd-3)))
2378
2379(define-public python2-markupsafe
2380 (package-with-python2 python-markupsafe))
2381
2382(define-public python-jinja2
2383 (package
2384 (name "python-jinja2")
4a5c7934 2385 (version "2.10.1")
44d10b1f
RW
2386 (source
2387 (origin
2388 (method url-fetch)
2389 (uri (pypi-uri "Jinja2" version))
2390 (sha256
2391 (base32
4a5c7934 2392 "04shqrs56aj04ipyqykj512rw2l0zfammvj9krawzxz7xc14yp06"))))
44d10b1f
RW
2393 (build-system python-build-system)
2394 (propagated-inputs
2395 `(("python-markupsafe" ,python-markupsafe)))
2396 (home-page "http://jinja.pocoo.org/")
2397 (synopsis "Python template engine")
2398 (description
2399 "Jinja2 is a small but fast and easy to use stand-alone template engine
2400written in pure Python.")
2401 (license license:bsd-3)))
2402
2403(define-public python2-jinja2
2404 (package-with-python2 python-jinja2))
2405
2406(define-public python-pystache
2407 (package
2408 (name "python-pystache")
2409 (version "0.5.4")
2410 (source (origin
2411 (method url-fetch)
2412 (uri (pypi-uri "pystache" version))
2413 (sha256
2414 (base32
2415 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2416 (build-system python-build-system)
2417 (arguments
2418 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2419 (home-page "http://defunkt.io/pystache/")
2420 (synopsis "Python logic-less template engine")
2421 (description
2422 "Pystache is a Python implementation of the framework agnostic,
2423logic-free templating system Mustache.")
2424 (license license:expat)
2425 (properties `((python2-variant . ,(delay python2-pystache))))))
2426
2427(define-public python2-pystache
2428 (package (inherit (package-with-python2
2429 (strip-python2-variant python-pystache)))
2430 (arguments
2431 `(#:python ,python-2
2432 #:phases
2433 (modify-phases %standard-phases
2434 (replace 'check
2435 (lambda _
dfafc29b 2436 (invoke "python" "test_pystache.py"))))))))
44d10b1f
RW
2437
2438(define-public python-joblib
2439 (package
2440 (name "python-joblib")
2441 (version "0.13.0")
2442 (source (origin
2443 (method url-fetch)
2444 (uri (pypi-uri "joblib" version))
2445 (sha256
2446 (base32
2447 "0612nazad8dxmn3xghfrmjax6456l4xy6hn9cngs7vydi14ds7v5"))))
2448 (build-system python-build-system)
2449 (arguments
2450 `(#:phases
2451 (modify-phases %standard-phases
2452 (replace 'check
2453 (lambda _ (invoke "pytest" "-v" "joblib"))))))
2454 (native-inputs
2455 `(("python-pytest" ,python-pytest)))
2456 (home-page "https://joblib.readthedocs.io/")
2457 (synopsis "Using Python functions as pipeline jobs")
2458 (description
2459 "Joblib is a set of tools to provide lightweight pipelining in Python.
2460In particular, joblib offers: transparent disk-caching of the output values
2461and lazy re-evaluation (memoize pattern), easy simple parallel computing
2462logging and tracing of the execution.")
2463 (license license:bsd-3)))
2464
2465(define-public python2-joblib
2466 (package-with-python2 python-joblib))
2467
a3363341
VC
2468(define-public python-daemon
2469 (package
2470 (name "python-daemon")
2471 (version "2.2.3")
2472 (source
2473 (origin
2474 (method url-fetch)
2475 (uri (pypi-uri "python-daemon" version))
2476 (sha256
2477 (base32
2478 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
2479 (build-system python-build-system)
2480 (arguments
2481 `(#:phases
2482 (modify-phases %standard-phases
2483 (add-before 'check 'disable-tests
2484 (lambda _
2485 ;; FIXME: Determine why test fails
2486 (substitute* "test/test_daemon.py"
2487 (("test_detaches_process_context")
2488 "skip_test_detaches_process_context"))
2489 #t)))))
2490 (propagated-inputs
2491 `(("python-lockfile" ,python-lockfile)))
2492 (native-inputs
2493 `(("python-unittest2" ,python-unittest2)
2494 ("python-testtools" ,python-testtools)
2495 ("python-testscenarios" ,python-testscenarios)
2496 ("python-mock" ,python-mock)
2497 ("python-docutils" ,python-docutils)))
2498 (home-page "https://pagure.io/python-daemon/")
2499 (synopsis "Python library for making a Unix daemon process")
2500 (description "Python-daemon is a library that assists a Python program to
2501turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
2502
2503This library provides a @code{DaemonContext} class that manages the following
2504important tasks for becoming a daemon process:
2505@enumerate
2506@item Detach the process into its own process group.
2507@item Set process environment appropriate for running inside a chroot.
2508@item Renounce suid and sgid privileges.
2509@item Close all open file descriptors.
2510@item Change the working directory, uid, gid, and umask.
2511@item Set appropriate signal handlers.
2512@item Open new file descriptors for stdin, stdout, and stderr.
2513@item Manage a specified PID lock file.
2514@item Register cleanup functions for at-exit processing.
2515@end enumerate")
2516 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
2517 (license (list license:asl2.0 license:gpl3+))))
2518
44d10b1f
RW
2519(define-public python-docutils
2520 (package
2521 (name "python-docutils")
2522 (version "0.14")
2523 (source
2524 (origin
2525 (method url-fetch)
2526 (uri (pypi-uri "docutils" version))
2527 (sha256
2528 (base32
2529 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2530 (build-system python-build-system)
2531 (arguments
2532 '(#:tests? #f)) ; no setup.py test command
2533 (home-page "http://docutils.sourceforge.net/")
2534 (synopsis "Python Documentation Utilities")
2535 (description
2536 "Docutils is a modular system for processing documentation into useful
2537formats, such as HTML, XML, and LaTeX. For input Docutils supports
2538reStructuredText.")
2539 ;; Most of the source code is public domain, but some source files are
2540 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2541 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2542
2543(define-public python2-docutils
2544 (package-with-python2 python-docutils))
2545
2546(define-public python-pygments
2547 (package
2548 (name "python-pygments")
eed81080 2549 (version "2.4.2")
44d10b1f
RW
2550 (source
2551 (origin
2552 (method url-fetch)
2553 (uri (pypi-uri "Pygments" version))
2554 (sha256
2555 (base32
eed81080 2556 "15v2sqm5g12bqa0c7wikfh9ck2nl97ayizy1hpqhmws5gqalq748"))))
44d10b1f
RW
2557 (build-system python-build-system)
2558 (arguments
2559 ;; FIXME: Tests require sphinx, which depends on this.
2560 '(#:tests? #f))
2561 (home-page "http://pygments.org/")
2562 (synopsis "Syntax highlighting")
2563 (description
2564 "Pygments is a syntax highlighting package written in Python.")
2565 (license license:bsd-2)))
2566
2567(define-public python2-pygments
2568 (package-with-python2 python-pygments))
2569
0f0a5ef9
MC
2570(define-public python-bumpversion
2571 (package
2572 (name "python-bumpversion")
2573 (version "0.5.3")
2574 (source
2575 (origin
2576 (method url-fetch)
2577 (uri (pypi-uri "bumpversion" version))
2578 (sha256
2579 (base32
2580 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
2581 (build-system python-build-system)
2582 (home-page "https://github.com/peritus/bumpversion")
2583 (synopsis "Tool to bump software version")
2584 (description "This tool provides a command-line interface (CLI) to bump a
2585software version simply.")
2586 (license license:expat)))
2587
b24fd2c2
MC
2588(define-public python-deprecated
2589 (package
2590 (name "python-deprecated")
2591 (version "1.2.5")
2592 (source
2593 (origin
2594 (method git-fetch)
2595 (uri (git-reference
2596 (url "https://github.com/tantale/deprecated.git")
2597 (commit (string-append "v" version))))
2598 (file-name (git-file-name name version))
2599 (sha256
2600 (base32
2601 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
2602 (build-system python-build-system)
2603 (arguments
2604 `(#:phases (modify-phases %standard-phases
2605 (replace 'check
2606 (lambda _
2607 (invoke "pytest"))))))
2608 (propagated-inputs
2609 `(("python-wrapt" ,python-wrapt)))
2610 (native-inputs
2611 `(("python-bumpversion" ,python-bumpversion)
2612 ("python-pytest" ,python-pytest)
2613 ("python-pytest-cov" ,python-pytest-cov)
2614 ("python-sphinx" ,python-sphinx)
2615 ("python-tox" ,python-tox)))
2616 (home-page "https://github.com/tantale/deprecated")
2617 (synopsis "Python decorator to deprecate classes, functions or methods")
2618 (description "The @code{deprecated} decorator provides a convenient way to deprecate
2619to deprecate classes, functions or methods.")
2620 (license license:expat)))
2621
d5a998fa
MC
2622(define-public python-pygithub
2623 (package
2624 (name "python-pygithub")
2625 (version "1.43.7")
2626 (source
2627 ;; We fetch from the Git repo because there are no tests in the PyPI
2628 ;; archive.
2629 (origin
2630 (method git-fetch)
2631 (uri (git-reference
2632 (url "https://github.com/PyGithub/PyGithub.git")
2633 (commit (string-append "v" version))))
2634 (file-name (git-file-name name version))
2635 (sha256
2636 (base32
2637 "0ww92zz0ja9w6rw83vphmn8rwmcn6abg16j4q7zxjc0rrg2cfj9i"))))
2638 (build-system python-build-system)
2639 (arguments
2640 `(#:phases (modify-phases %standard-phases
2641 ;; Some tests rely on the network.
2642 (add-after 'unpack 'disable-failing-tests
2643 (lambda _
2644 (substitute* "tests/Issue142.py"
2645 (("testDecodeJson") "disabled_testDecodeJson"))
2646 #t))
2647 (add-before 'check 'prepare-for-tests
2648 (lambda _
2649 (for-each (lambda (f)
2650 (chmod f #o666))
2651 (find-files "./tests"))
2652 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
2653 (setenv "PYTHONPATH"
2654 (string-append "./tests:" (getenv "PYTHONPATH")))
2655 #t)))))
2656 (propagated-inputs
2657 `(("python-deprecated" ,python-deprecated)
2658 ("python-pyjwt" ,python-pyjwt)
2659 ("python-requests" ,python-requests)))
2660 (native-inputs `(("python-httpretty" ,python-httpretty)))
2661 (home-page "https://pygithub.readthedocs.io/en/latest/")
2662 (synopsis "Python library for the GitHub API")
2663 (description "This library allows managing GitHub resources such as
2664repositories, user profiles, and organizations in your Python applications,
2665using version 3 of the GitHub application programming interface (API).")
2666 (license license:lgpl3+)))
2667
c0c0bb38
MC
2668(define-public python-rellu
2669 (package
2670 (name "python-rellu")
2671 (version "0.7")
2672 (source
2673 (origin
2674 (method url-fetch)
2675 (uri (pypi-uri "rellu" version))
2676 (sha256
2677 (base32
2678 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
2679 (build-system python-build-system)
2680 (propagated-inputs
2681 `(("python-invoke" ,python-invoke)
2682 ("python-pygithub" ,python-pygithub)))
2683 (home-page "https://github.com/robotframework/rellu")
2684 (synopsis "Utilities to create PyPI releases")
2685 (description "This collection of utilities contains tooling and templates
2686to assist in creating releases on GitHub and publishing them on PyPI. It is
2687designed to be used by Robot Framework and tools and libraries in its
2688ecosystem, but can naturally be used also by other projects.")
2689 (license license:asl2.0)))
2690
b9790285
MC
2691(define-public python-robotframework
2692 (package
2693 (name "python-robotframework")
1710b8f8 2694 (version "3.1.2")
b9790285
MC
2695 ;; There are no tests in the PyPI archive.
2696 (source
2697 (origin
2698 (method git-fetch)
2699 (uri (git-reference
2700 (url "https://github.com/robotframework/robotframework.git")
2701 (commit (string-append "v" version))))
2702 (file-name (git-file-name name version))
2703 (sha256
1710b8f8 2704 (base32 "16gnxy0qinh8fhs0qvhff5z2xh49c3cqgm0d7bfjw120df6x7fym"))
b9790285
MC
2705 (patches (search-patches
2706 "python-robotframework-honor-source-date-epoch.patch"))))
2707 (build-system python-build-system)
2708 (arguments
2709 `(#:phases (modify-phases %standard-phases
2710 (add-before 'build 'build-and-install-doc
2711 (lambda* (#:key outputs #:allow-other-keys)
2712 (let* ((doc-output (assoc-ref outputs "doc"))
2713 (doc (string-append doc-output "/share/"
2714 ,name "-" ,version "/")))
2715 (invoke "invoke" "library-docs" "all")
2716 (mkdir-p doc)
2717 (copy-recursively "doc/libraries"
2718 (string-append doc "/libraries"))
2719 #t)))
2720 (replace 'check
2721 (lambda _
2722 (invoke "python" "utest/run.py"))))))
2723 (native-inputs
2724 `(("python-invoke" ,python-invoke)
2725 ("python-rellu" ,python-rellu)
2726 ("python:tk" ,python "tk"))) ;used when building the HTML doc
2727 (outputs '("out" "doc"))
2728 (home-page "https://robotframework.org")
2729 (synopsis "Generic automation framework")
2730 (description "Robot Framework is a generic automation framework for
2731acceptance testing, acceptance test driven development (ATDD), and robotic
2732process automation (RPA).")
2733 (license license:asl2.0)))
2734
5b84c120
MC
2735(define-public python-robotframework-lint
2736 ;; There is no properly tagged release; the commit below seems to correspond
2737 ;; to the 0.9 stable release available from PyPI. The tests are not
2738 ;; included in the PyPI archive, so we fetch the sources from the upstream
2739 ;; Git repo.
2740 (let ((commit "e851879bab1f63e4e53b34a4dc8a67ed95102830")
2741 (revision "1"))
2742 (package
2743 (name "python-robotframework-lint")
2744 (version (git-version "0.9.0" revision commit))
2745 (source
2746 (origin
2747 (method git-fetch)
2748 (uri (git-reference
2749 (url "https://github.com/boakley/robotframework-lint.git")
2750 (commit commit)))
2751 (file-name (git-file-name name version))
2752 (sha256
2753 (base32
2754 "1p6fknqg5sb9qz5857ji4a877657vgfjm5v3zn45994parx6ml1m"))))
2755 (build-system python-build-system)
2756 (arguments
2757 `(#:phases
2758 (modify-phases %standard-phases
2759 (replace 'check
2760 (lambda _
2761 (invoke "python" "-m" "robot" "-A"
2762 "tests/conf/default.args" "tests"))))))
2763 (propagated-inputs
2764 `(("python-robotframework" ,python-robotframework)))
2765 (home-page "https://github.com/boakley/robotframework-lint/")
2766 (synopsis "Static analysis tool (linter) for Robot Framework")
2767 (description "This package provides the @code{rflint} command-line
2768utility, a static analysis tool (linter) for Robot Framework source files.")
2769 (license license:asl2.0))))
2770
c0c64f17
MC
2771(define-public python-robotframework-sshlibrary
2772 (package
2773 (name "python-robotframework-sshlibrary")
2774 (version "3.3.0")
2775 ;; There are no tests in the PyPI archive.
2776 (source
2777 (origin
2778 (method git-fetch)
2779 (uri (git-reference
2780 (url "https://github.com/robotframework/SSHLibrary.git")
2781 (commit (string-append "v" version))))
2782 (file-name (git-file-name name version))
2783 (sha256
2784 (base32
2785 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
2786 (build-system python-build-system)
2787 (arguments
2788 `(#:phases
2789 (modify-phases %standard-phases
2790 (add-before 'build 'build-and-install-doc
2791 (lambda* (#:key outputs #:allow-other-keys)
2792 (let* ((doc-output (assoc-ref outputs "doc"))
2793 (doc (string-append doc-output "/share/"
2794 ,name "-" ,version "/")))
2795 (invoke "chmod" "-R" "+w" "docs")
2796 (invoke "invoke" "kw-docs" "project-docs")
2797 (mkdir-p doc)
2798 (for-each delete-file (find-files "docs" "\\.rst"))
2799 (copy-recursively "docs" doc)
2800 #t)))
2801 (replace 'check
2802 (lambda _
2803 ;; Some tests require an SSH server; we remove them.
2804 (delete-file "utest/test_client_api.py")
2805 (delete-file "utest/test_scp.py")
2806 (invoke "python" "utest/run.py"))))))
2807 (propagated-inputs
2808 `(("python-robotframework" ,python-robotframework)
2809 ("python-paramiko" ,python-paramiko)
2810 ("python-scp" ,python-scp)))
2811 (native-inputs
2812 `(("openssh" ,openssh)
2813 ("which" ,which)
2814 ;; To generate the documentation
2815 ("python-docutils" ,python-docutils)
2816 ("python-invoke" ,python-invoke)
2817 ("python-pygments" ,python-pygments)
2818 ("python-rellu" ,python-rellu)))
2819 (outputs '("out" "doc"))
2820 (home-page "https://github.com/robotframework/SSHLibrary")
2821 (synopsis "Robot Framework library for SSH and SFTP")
2822 (description "SSHLibrary is a Robot Framework library providing support
2823for SSH and SFTP. It has the following main usages:
2824@itemize @bullet
2825@item Executing commands on the remote machine, either blocking or non-blocking.
2826@item Writing and reading in an interactive shell.
2827@item Transferring files and directories over SFTP.
2828@item Ensuring that files and directories exist on the remote machine.
2829@end itemize")
2830 (license license:asl2.0)))
2831
13d825fc
MC
2832(define-public python-scp
2833 (package
2834 (name "python-scp")
2835 (version "0.13.2")
2836 (source
2837 (origin
2838 (method url-fetch)
2839 (uri (pypi-uri "scp" version))
2840 (sha256
2841 (base32
2842 "1crlpw9lnn58fs1c1rmh7s7s9y5gkgpgjsqlvg9qa51kq1knx7gg"))))
2843 (build-system python-build-system)
2844 (arguments
2845 '(#:tests? #f)) ;tests require an SSH server
2846 (propagated-inputs
2847 `(("python-paramiko" ,python-paramiko)))
2848 (home-page "https://github.com/jbardin/scp.py")
2849 (synopsis "SCP protocol module for Python and Paramiko")
2850 (description "The scp module extends the Paramiko library to send and
2851receive files via the SCP1 protocol, as implemented by the OpenSSH
2852@command{scp} program.")
2853 (license license:gpl2+)))
2854
44d10b1f
RW
2855(define-public python-rst.linker
2856 (package
2857 (name "python-rst.linker")
2858 (version "1.10")
2859 (source
2860 (origin
2861 (method url-fetch)
2862 (uri (pypi-uri "rst.linker" version))
2863 (sha256
2864 (base32
2865 "0iqaacp7pj1s8avs4kc0qg0r7dscywaq37y6l9j14glqdikk0wdj"))))
2866 (build-system python-build-system)
2867 (propagated-inputs
2868 `(("python-dateutil" ,python-dateutil)
2869 ("python-six" ,python-six)))
2870 (native-inputs
2871 `(("python-setuptools-scm" ,python-setuptools-scm)))
2872 ;; Test would require path.py, which would introduce a cyclic dependence.
2873 (arguments `(#:tests? #f))
2874 ;; Note: As of version 1.7 the documentation is not worth building.
2875 (home-page "https://github.com/jaraco/rst.linker")
2876 (synopsis "Sphinx plugin to add links and timestamps")
2877 (description "rst.linker allows to automatically replace text by a
2878reStructuredText external reference or timestamps. It's primary purpose is to
2879augment the changelog, but it can be used for other documents, too.")
2880 (license license:expat)))
2881
2882(define-public python2-rst.linker
2883 (package-with-python2 python-rst.linker))
2884
2885(define-public python-feedgenerator
2886 (package
2887 (name "python-feedgenerator")
2888 (version "1.9")
2889 (source
2890 (origin
2891 (method url-fetch)
2892 (uri (pypi-uri "feedgenerator" version))
2893 (sha256
2894 (base32
2895 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
2896 (modules '((guix build utils)))
2897 (snippet
2898 '(begin
2899 ;; Remove pre-compiled .pyc files from source.
2900 (for-each delete-file-recursively
2901 (find-files "." "__pycache__" #:directories? #t))
2902 (for-each delete-file (find-files "." "\\.pyc$"))
2903 #t))))
2904 (build-system python-build-system)
2905 (propagated-inputs
2906 `(("python-pytz" ,python-pytz)
2907 ("python-six" ,python-six)))
2908 (home-page "https://github.com/getpelican/feedgenerator")
2909 (synopsis
2910 "Standalone version of Django's Atom/RSS feed generator")
2911 (description
2912 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2913which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
2914 (license license:bsd-3)))
2915
2916(define-public python2-feedgenerator
2917 (package-with-python2 python-feedgenerator))
2918
2919(define-public python-toml
2920 (package
2921 (name "python-toml")
2922 (version "0.9.4")
2923 (source
2924 (origin
2925 (method url-fetch)
2926 (uri (pypi-uri "toml" version))
2927 (sha256
2928 (base32
2929 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
2930 (build-system python-build-system)
2931 (arguments
2932 `(#:tests? #f)) ;no tests suite in release
2933 (home-page "https://github.com/uiri/toml")
2934 (synopsis "Library for TOML")
2935 (description
2936 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
2937Language (TOML) configuration files.")
2938 (license license:expat)))
2939
346c8752
BG
2940(define-public python-jsonrpc-server
2941 (package
2942 (name "python-jsonrpc-server")
2943 (version "0.1.2")
2944 (source
2945 (origin
2946 (method url-fetch)
2947 (uri (pypi-uri "python-jsonrpc-server" version))
2948 (sha256
2949 (base32
2950 "0m4ykpcdy52x37n1ikysp07j7p8ialcdvvvsrjp3545sn7iiid09"))))
2951 (build-system python-build-system)
2952 (propagated-inputs
2953 `(("python-future" ,python-future)
2954 ("python-mock" ,python-mock)
2955 ("python-pytest" ,python-pytest)))
2956 (home-page
2957 "https://github.com/palantir/python-jsonrpc-server")
2958 (synopsis "JSON RPC 2.0 server library")
2959 (description
1df5407c 2960 "This package provides a JSON RPC 2.0 server library for Python.")
346c8752
BG
2961 (license license:expat)))
2962
56f4ad47
BG
2963(define-public python-pydocstyle
2964 (package
2965 (name "python-pydocstyle")
2966 (version "3.0.0")
2967 (source
2968 (origin
2969 (method url-fetch)
2970 (uri (pypi-uri "pydocstyle" version))
2971 (sha256
2972 (base32
2973 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
2974 (build-system python-build-system)
2975 (propagated-inputs
2976 `(("python-six" ,python-six)
2977 ("python-snowballstemmer" ,python-snowballstemmer)))
2978 (home-page
2979 "https://github.com/PyCQA/pydocstyle/")
2980 (synopsis "Python docstring style checker")
2981 (description
2982 "This package provides a style checker for the Python Language
2983Server (PLS).")
2984 (license license:expat)))
2985
be4d840c
BG
2986(define-public python-language-server
2987 (package
2988 (name "python-language-server")
ccbaeba3 2989 (version "0.26.1")
be4d840c
BG
2990 (source
2991 (origin
2992 (method url-fetch)
2993 (uri (pypi-uri "python-language-server" version))
2994 (sha256
2995 (base32
ccbaeba3 2996 "1vs9ckfmm534n1hq3m871916wsjvi5h4gyj6wlzg13ck6506lx0s"))))
be4d840c
BG
2997 (build-system python-build-system)
2998 (propagated-inputs
2999 `(("python-pluggy" ,python-pluggy)
3000 ("python-jsonrpc-server" ,python-jsonrpc-server)
3001 ("python-jedi" ,python-jedi)
3002 ("python-yapf" ,python-yapf)
3003 ("python-pyflakes" ,python-pyflakes)
3004 ("python-pydocstyle" ,python-pydocstyle)
3005 ("python-pycodestyle" ,python-pycodestyle)
3006 ("python-mccabe" ,python-mccabe)
3007 ("python-rope" ,python-rope)
fe4a4bd2
BG
3008 ("python-autopep8" ,python-autopep8)
3009 ("python-pylint" ,python-pylint)))
be4d840c
BG
3010 (home-page "https://github.com/palantir/python-language-server")
3011 (synopsis "Python implementation of the Language Server Protocol")
3012 (description
3013 "The Python Language Server (pyls) is an implementation of the Python 3
3014language specification for the Language Server Protocol (LSP). This tool is
3015used in text editing environments to provide a complete and integrated
3016feature-set for programming Python effectively.")
3017 (license license:expat)))
3018
44d10b1f
RW
3019(define-public python-black
3020 (package
3021 (name "python-black")
3022 (version "18.6b4")
3023 (source
3024 (origin
3025 (method url-fetch)
3026 (uri (pypi-uri "black" version))
3027 (sha256
3028 (base32
3029 "0i4sfqgz6w15vd50kbhi7g7rifgqlf8yfr8y78rypd56q64qn592"))))
3030 (build-system python-build-system)
3031 (arguments
3032 `(#:phases
3033 (modify-phases %standard-phases
3034 (add-after 'patch-source-shebangs 'patch-extra-shebangs
3035 (lambda _
3036 (let ((python3 (which "python3")))
3037 (substitute* '("tests/data/fmtonoff.py"
3038 "tests/data/string_prefixes.py"
3039 "tests/data/function.py")
3040 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
3041 (string-append "#!" python3 (if (string? minor-version)
3042 minor-version
3043 ""))))))))))
3044 (propagated-inputs
3045 `(("python-click" ,python-click)
3046 ("python-attrs" ,python-attrs)
3047 ("python-appdirs" ,python-appdirs)
3048 ("python-toml" ,python-toml)))
3049 (home-page "https://github.com/ambv/black")
3050 (synopsis "The uncompromising code formatter")
3051 (description "Black is the uncompromising Python code formatter.")
3052 (license license:expat)))
3053
3054(define-public python-blinker
3055 (package
3056 (name "python-blinker")
3057 (version "1.4")
3058 (source
3059 (origin
3060 (method url-fetch)
3061 (uri (pypi-uri "blinker" version))
3062 (sha256
3063 (base32
3064 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3065 (build-system python-build-system)
3066 (home-page "http://pythonhosted.org/blinker/")
3067 (synopsis "Fast, simple object-to-object and broadcast signaling")
3068 (description
3069 "Blinker provides a fast dispatching system that allows any number of
3070interested parties to subscribe to events, or \"signals\".")
3071 (license license:expat)))
3072
3073(define-public python2-blinker
3074 (package-with-python2 python-blinker))
3075
3076(define-public pelican
3077 (package
3078 (name "pelican")
aa71b690 3079 (version "4.0.1")
44d10b1f
RW
3080 (source
3081 (origin
3082 (method url-fetch)
3083 (uri (pypi-uri "pelican" version))
3084 (sha256
3085 (base32
aa71b690 3086 "05yda7n6r0ll18fpdjzkzyr0ls8hbb86fnjyb33k9jvv5avah2lr"))))
44d10b1f
RW
3087 (build-system python-build-system)
3088 (propagated-inputs
3089 `(("python-feedgenerator" ,python-feedgenerator)
3090 ("python-jinja2" ,python-jinja2)
3091 ("python-pygments" ,python-pygments)
3092 ("python-docutils" ,python-docutils)
3093 ("python-pytz" ,python-pytz)
3094 ("python-blinker" ,python-blinker)
3095 ("python-unidecode" ,python-unidecode)
3096 ("python-six" ,python-six)
3097 ("python-dateutil" ,python-dateutil)
3098 ("python-markdown" ,python-markdown)))
3099 (home-page "https://getpelican.com/")
3100 (arguments
3101 `(;; XXX Requires a lot more packages to do unit tests :P
3102 #:tests? #f
3103 #:phases (modify-phases %standard-phases
3104 (add-before
3105 'install 'adjust-requires
3106 ;; Since feedgenerator is installed from git, it doesn't
3107 ;; conform to the version requirements.
3108 ;;
3109 ;; We *do have* "feedgenerator >= 1.6", but strip off the
3110 ;; version requirement so setuptools doesn't get confused.
3111 (lambda _
3112 (substitute* "setup.py"
3113 (("['\"]feedgenerator.*?['\"]")
3114 "'feedgenerator'")))))))
3115 (synopsis "Python-based static site publishing system")
3116 (description
3117 "Pelican is a tool to generate a static blog from reStructuredText,
3118Markdown input files, and more. Pelican uses Jinja2 for templating
3119and is very extensible.")
3120 (license license:agpl3+)))
3121
8c141421
JH
3122(define-public mallard-ducktype
3123 (package
3124 (name "mallard-ducktype")
12cc3da5 3125 (version "1.0.2")
8c141421
JH
3126 (source
3127 (origin
3128 (method git-fetch)
12cc3da5
JH
3129 ;; git-reference because tests are not included in pypi source tarball
3130 ;; https://issues.guix.gnu.org/issue/36755#2
8c141421
JH
3131 (uri (git-reference
3132 (url "https://github.com/projectmallard/mallard-ducktype.git")
3133 (commit version)))
3134 (file-name (git-file-name name version))
3135 (sha256
3136 (base32
12cc3da5 3137 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
8c141421 3138 (build-system python-build-system)
5246655f
EF
3139 (arguments
3140 '(#:phases
3141 (modify-phases %standard-phases
3142 (replace 'check
3143 (lambda _
3144 (with-directory-excursion "tests"
3145 (invoke "sh" "runtests")))))))
8c141421
JH
3146 (home-page "http://projectmallard.org")
3147 (synopsis "Convert Ducktype to Mallard documentation markup")
3148 (description
3149 "Ducktype is a lightweight syntax that can represent all the semantics
3150of the Mallard XML documentation system. Ducktype files can be converted to
3151Mallard using the @command{ducktype} tool. The yelp-tools package
3152provides additional functionality on the produced Mallard documents.")
3153 (license license:expat)))
3154
44d10b1f
RW
3155(define-public python-scikit-image
3156 (package
3157 (name "python-scikit-image")
9ff04084 3158 (version "0.14.2")
44d10b1f
RW
3159 (source
3160 (origin
3161 (method url-fetch)
3162 (uri (pypi-uri "scikit-image" version))
3163 (sha256
9ff04084 3164 (base32 "07qchljkyxvg5nrm12fvszi7pmjk4m01qp0w0z8syxzxxs20pz8s"))))
44d10b1f
RW
3165 (build-system python-build-system)
3166 (arguments
3167 ;; TODO: Some tests require running X11 server. Disable them?
3168 '(#:tests? #f))
3169 ;; See DEPENDS.txt for the list of build and run time requiremnts
3170 (propagated-inputs
3171 `(("python-cloudpickle" ,python-cloudpickle)
3172 ("python-dask" ,python-dask)
3173 ("python-matplotlib" ,python-matplotlib)
3174 ("python-networkx" ,python-networkx)
3175 ("python-numpy" ,python-numpy)
3176 ("python-pillow" ,python-pillow)
3177 ("python-pywavelets" ,python-pywavelets)
3178 ("python-scipy" ,python-scipy)
3179 ("python-six" ,python-six)))
3180 (native-inputs
3181 `(("python-cython" ,python-cython)))
3182 (home-page "http://scikit-image.org/")
3183 (synopsis "Image processing in Python")
3184 (description
3185 "Scikit-image is a collection of algorithms for image processing.")
3186 (license license:bsd-3)))
3187
3188(define-public python2-scikit-image
3189 (package-with-python2 python-scikit-image))
3190
3191(define-public python-cython
3192 (package
3193 (name "python-cython")
756a9809 3194 (version "0.29.13")
44d10b1f
RW
3195 (source
3196 (origin
3197 (method url-fetch)
3198 (uri (pypi-uri "Cython" version))
3199 (sha256
3200 (base32
756a9809 3201 "13k37lrcgagwwnzr5bzririsscb793vndj234d475x1h9ad0d7f2"))))
44d10b1f
RW
3202 (build-system python-build-system)
3203 ;; we need the full python package and not just the python-wrapper
3204 ;; because we need libpython3.3m.so
3205 (inputs
3206 `(("python" ,python)))
3207 (arguments
3208 `(#:phases
3209 (modify-phases %standard-phases
3210 (add-before 'check 'set-HOME
3211 ;; some tests require access to "$HOME/.cython"
3212 (lambda _ (setenv "HOME" "/tmp") #t))
3213
3214 ;; FIXME: These tests started failing on armhf after the 0.28 update
3215 ;; (commit c69d11c5930), both with an error such as this:
3216 ;; compiling (cpp) and running dictcomp ...
3217 ;; === C/C++ compiler error output: ===
3218 ;; ‘
3219 ;; dictcomp.cpp:5221: confused by earlier errors, bailing out
3220 ;; See <https://hydra.gnu.org/build/2948724> for logs.
3221 ,@(if (target-arm32?)
3222 `((add-before 'check 'disable-failing-tests
3223 (lambda _
3224 (let ((disabled-tests (open-file "tests/bugs.txt" "a")))
3225 (for-each (lambda (test)
3226 (format disabled-tests "~a\n" test))
3227 '("memslice" "dictcomp"))
3228 (close-port disabled-tests)))))
3229 '())
3230
3231 (replace 'check
3232 (lambda _
275cce3d
MB
3233 ;; Disable compiler optimizations to greatly reduce the running
3234 ;; time of the test suite.
3235 (setenv "CFLAGS" "-O0")
3236
3237 (invoke "python" "runtests.py" "-vv"
3238 "-j" (number->string (parallel-job-count))))))))
f319409b 3239 (home-page "https://cython.org/")
44d10b1f
RW
3240 (synopsis "C extensions for Python")
3241 (description "Cython is an optimising static compiler for both the Python
3242programming language and the extended Cython programming language. It makes
3243writing C extensions for Python as easy as Python itself.")
3244 (license license:asl2.0)
3245 (properties `((python2-variant . ,(delay python2-cython))))))
3246
3247(define-public python2-cython
3248 (package (inherit (package-with-python2
3249 (strip-python2-variant python-cython)))
3250 (name "python2-cython")
3251 (inputs
3252 `(("python-2" ,python-2))))) ; this is not automatically changed
3253
3254;; The RPython toolchain currently does not support Python 3.
3255(define-public python2-rpython
3256 (package
3257 (name "python2-rpython")
3258 (version "0.2.1")
3259 (source
3260 (origin
3261 (method url-fetch)
3262 (uri (pypi-uri "rpython" version))
3263 (sha256
3264 (base32
3265 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
3266 (build-system python-build-system)
3267 (arguments `(#:python ,python-2))
3268 (native-inputs
3269 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3270 (home-page "https://rpython.readthedocs.org")
3271 (synopsis "Framework for implementing interpreters and virtual machines")
3272 (description "RPython is a translation and support framework for
3273producing implementations of dynamic languages, emphasizing a clean separation
3274between language specification and implementation aspects.")
3275 (license license:expat)))
3276
3277;; NOTE: when upgrading numpy please make sure that python-pandas and
3278;; python-scipy still build, as these three packages are often used together.
3279(define-public python-numpy
3280 (package
3281 (name "python-numpy")
3282 (version "1.15.4")
3283 (source
3284 (origin
3285 (method url-fetch)
3286 (uri (string-append
3287 "https://github.com/numpy/numpy/releases/download/v"
3288 version "/numpy-" version ".tar.gz"))
3289 (sha256
3290 (base32
3291 "102vcl2qq4pjbm7a3d67vkkvn4466ngia1d8wi5avqwqh8j0jvkn"))))
3292 (build-system python-build-system)
3293 (inputs
3294 `(("openblas" ,openblas)
3295 ("lapack" ,lapack)))
3296 (native-inputs
3297 `(("python-cython" ,python-cython)
3298 ("python-pytest" ,python-pytest)
3299 ("gfortran" ,gfortran)))
3300 (arguments
3301 `(#:phases
3302 (modify-phases %standard-phases
3303 (add-before 'build 'configure-blas-lapack
3304 (lambda* (#:key inputs #:allow-other-keys)
3305 (call-with-output-file "site.cfg"
3306 (lambda (port)
3307 (format port
3308 "[openblas]
3309libraries = openblas
3310library_dirs = ~a/lib
3311include_dirs = ~a/include
3312
3313# backslash-n to make emacs happy
3314\n[lapack]
3315lapack_libs = lapack
3316library_dirs = ~a/lib
3317include_dirs = ~a/include
3318"
3319 (assoc-ref inputs "openblas")
3320 (assoc-ref inputs "openblas")
3321 (assoc-ref inputs "lapack")
3322 (assoc-ref inputs "lapack"))))
3323 #t))
3324 (add-before 'build 'fix-executable-paths
3325 (lambda* (#:key inputs #:allow-other-keys)
3326 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
3327 ;; instead of /bin/sh.
3328 (substitute* "numpy/distutils/exec_command.py"
3329 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
3330 (string-append match-start (assoc-ref inputs "bash") match-end)))
3331 ;; Use "gcc" executable, not "cc".
3332 (substitute* "numpy/distutils/system_info.py"
3333 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3334 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3335 #t))
3336 ;; Tests can only be run after the library has been installed and not
3337 ;; within the source directory.
3338 (delete 'check)
3339 (add-after 'install 'check
3340 (lambda* (#:key outputs inputs #:allow-other-keys)
3341 ;; Make installed package available for running the tests
3342 (add-installed-pythonpath inputs outputs)
3343 ;; Make sure "f2py" etc is found.
3344 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
3345 ":" (getenv "PATH")))
3346 (with-directory-excursion "/tmp"
3347 (invoke "python" "-c"
3348 "import numpy; numpy.test(verbose=2)")))))))
3349 (home-page "http://www.numpy.org/")
3350 (synopsis "Fundamental package for scientific computing with Python")
3351 (description "NumPy is the fundamental package for scientific computing
3352with Python. It contains among other things: a powerful N-dimensional array
3353object, sophisticated (broadcasting) functions, tools for integrating C/C++
3354and Fortran code, useful linear algebra, Fourier transform, and random number
3355capabilities.")
3356 (license license:bsd-3)))
3357
3358(define-public python2-numpy
3359 (package-with-python2 python-numpy))
3360
3361;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
3362;; interest only for legacy code going back to NumPy's predecessor
3363;; Numeric.
3364(define-public python2-numpy-1.8
3365 (package (inherit python2-numpy)
3366 (version "1.8.2")
3367 (source
3368 (origin
3369 (method url-fetch)
3370 (uri (string-append
3371 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
3372 (file-name (string-append "python2-numpy-" version ".tar.gz"))
3373 (sha256
3374 (base32
3375 "0sc20gz1b17xnyrkp5frca3ql5qfalpv916hfg2kqxpwr6jg0f1g"))))
3376 (arguments
3377 (substitute-keyword-arguments (package-arguments python2-numpy)
3378 ((#:phases phases)
3379 `(modify-phases ,phases
3380 (replace 'configure-blas-lapack
3381 (lambda* (#:key inputs #:allow-other-keys)
3382 (call-with-output-file "site.cfg"
3383 (lambda (port)
3384 (format port
3385 "[openblas]
3386libraries = openblas,lapack
3387library_dirs = ~a/lib:~a/lib
3388include_dirs = ~a/include:~a/include
3389"
3390 (assoc-ref inputs "openblas")
3391 (assoc-ref inputs "lapack")
3392 (assoc-ref inputs "openblas")
3393 (assoc-ref inputs "lapack"))))
3394 #t))))))
3395 (native-inputs
3396 `(("python2-nose" ,python2-nose)))
3397 (description "NumPy is the fundamental package for scientific computing
3398with Python. It contains among other things: a powerful N-dimensional array
3399object, sophisticated (broadcasting) functions, tools for integrating C/C++
3400and Fortran code, useful linear algebra, Fourier transform, and random number
3401capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
3402that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
3403Numeric.")
3404 (license license:bsd-3)))
3405
3406(define-public python-munch
3407 (package
3408 (name "python-munch")
3409 (version "2.0.4")
3410 (source
3411 (origin
3412 (method url-fetch)
3413 (uri (pypi-uri "munch" version))
3414 (sha256
3415 (base32
3416 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3417 (build-system python-build-system)
3418 (home-page "https://github.com/Infinidat/munch")
3419 (synopsis "Dot-accessible dictionary")
3420 (description "Munch is a dot-accessible dictionary similar to JavaScript
3421objects.")
3422 (license license:expat)))
3423
3424(define-public python2-munch
3425 (package-with-python2 python-munch))
3426
3427(define-public python-colormath
3428 (package
3429 (name "python-colormath")
3430 (version "3.0.0")
3431 (source
3432 (origin
3433 (method url-fetch)
3434 (uri (pypi-uri "colormath" version))
3435 (sha256
3436 (base32
3437 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3438 (build-system python-build-system)
3439 (propagated-inputs
3440 `(("python-networkx" ,python-networkx)
3441 ("python-numpy" ,python-numpy)))
3442 (home-page "https://github.com/gtaylor/python-colormath")
3443 (synopsis "Color math and conversion library")
3444 (description
3445 "This is a Python library for color math and conversions.")
3446 (license license:bsd-3)))
3447
3448(define-public python2-colormath
3449 (package-with-python2 python-colormath))
3450
3451(define-public python-spectra
3452 (package
3453 (name "python-spectra")
3454 (version "0.0.11")
3455 (source
3456 (origin
3457 (method url-fetch)
3458 (uri (pypi-uri "spectra" version))
3459 (sha256
3460 (base32
3461 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3462 (build-system python-build-system)
3463 (arguments
3464 `(#:phases
3465 (modify-phases %standard-phases
3466 (replace 'check
38ec0f6a 3467 (lambda _ (invoke "nosetests" "-v"))))))
44d10b1f
RW
3468 (propagated-inputs
3469 `(("python-colormath" ,python-colormath)))
3470 (native-inputs
3471 `(("python-nose" ,python-nose)))
3472 (home-page "https://github.com/jsvine/spectra")
3473 (synopsis "Color scales and color conversion")
3474 (description
3475 "This package provides a Python library intended to make color math,
3476color scales, and color space conversion easy. It has support for:
3477
3478@enumerate
3479@item Color scales
3480@item Color ranges
3481@item Color blending
3482@item Brightening/darkening colors
3483@item Saturating/desaturating colors
3484@item Conversion to/from multiple color spaces.
3485@end enumerate\n")
3486 (license license:expat)))
3487
3488(define-public python2-spectra
3489 (package-with-python2 python-spectra))
3490
3491(define-public python-numpy-documentation
3492 (package
3493 (name "python-numpy-documentation")
3494 (version (package-version python-numpy))
3495 (source (package-source python-numpy))
3496 (build-system python-build-system)
3497 (native-inputs
3498 `(("python-matplotlib" ,python-matplotlib)
3499 ("python-numpy" ,python-numpy)
3500 ("pkg-config" ,pkg-config)
3501 ("python-sphinx" ,python-sphinx)
3502 ("python-numpydoc" ,python-numpydoc)
f75aa97f 3503 ("texlive" ,(texlive-union (list texlive-fonts-cm-super
44d10b1f
RW
3504 texlive-fonts-ec
3505 texlive-generic-ifxetex
3506 texlive-generic-pdftex
f75aa97f 3507 texlive-amsfonts
44d10b1f
RW
3508 texlive-latex-capt-of
3509 texlive-latex-cmap
3510 texlive-latex-environ
3511 texlive-latex-eqparbox
3512 texlive-latex-etoolbox
3513 texlive-latex-expdlist
3514 texlive-latex-fancyhdr
3515 texlive-latex-fancyvrb
3516 texlive-latex-fncychap
3517 texlive-latex-float
3518 texlive-latex-framed
3519 texlive-latex-geometry
3520 texlive-latex-graphics
3521 texlive-latex-hyperref
3522 texlive-latex-mdwtools
3523 texlive-latex-multirow
3524 texlive-latex-needspace
3525 texlive-latex-oberdiek
3526 texlive-latex-parskip
3527 texlive-latex-preview
3528 texlive-latex-tabulary
3529 texlive-latex-threeparttable
3530 texlive-latex-titlesec
3531 texlive-latex-trimspaces
3532 texlive-latex-ucs
3533 texlive-latex-upquote
3534 texlive-latex-url
3535 texlive-latex-varwidth
3536 texlive-latex-wrapfig)))
3537 ("texinfo" ,texinfo)
3538 ("perl" ,perl)
3539 ("scipy-sphinx-theme"
3540 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3541 (method git-fetch)
3542 (uri (git-reference
3543 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3544 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3545 (sha256
3546 (base32
3547 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3548 ,@(package-native-inputs python-numpy)))
3549 (arguments
3550 `(#:tests? #f ; we're only generating the documentation
3551 #:phases
3552 (modify-phases %standard-phases
3553 (delete 'build)
3554 (replace 'install
3555 (lambda* (#:key inputs outputs #:allow-other-keys)
3556 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3557 (doc (string-append
3558 data "/doc/" ,name "-"
3559 ,(package-version python-numpy)))
3560 (info-reader (string-append data "/info"))
3561 (html (string-append doc "/html"))
3562 (scipy-sphinx-theme "scipy-sphinx-theme")
3563 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3564 (pyver ,(string-append "PYVER=")))
3565
3566 ;; FIXME: this is needed to for texlive-union to generate
3567 ;; fonts, which are not found.
3568 (setenv "HOME" "/tmp")
3569
3570 (with-directory-excursion "doc"
3571 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3572 (mkdir-p html)
4fc898da
RW
3573 (invoke "make" "html" pyver)
3574 (invoke "make" "latex" "PAPER=a4" pyver)
3575 (invoke "make" "-C" "build/latex"
44d10b1f
RW
3576 "all-pdf" "PAPER=a4" pyver)
3577 ;; FIXME: Generation of the info file fails.
4fc898da 3578 ;; (invoke "make" "info" pyver)
44d10b1f
RW
3579 ;; (mkdir-p info)
3580 ;; (copy-file "build/texinfo/numpy.info"
3581 ;; (string-append info "/numpy.info"))
3582 (for-each (lambda (file)
3583 (copy-file (string-append "build/latex" file)
3584 (string-append doc file)))
3585 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3586 (with-directory-excursion "build/html"
3587 (for-each (lambda (file)
3588 (let* ((dir (dirname file))
3589 (tgt-dir (string-append html "/" dir)))
3590 (unless (equal? "." dir)
3591 (mkdir-p tgt-dir))
3592 (install-file file html)))
3593 (find-files "." ".*")))))
3594 #t)))))
3595 (home-page (package-home-page python-numpy))
3596 (synopsis "Documentation for the python-numpy package")
3597 (description (package-description python-numpy))
3598 (license (package-license python-numpy))))
3599
3600(define-public python2-numpy-documentation
3601 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3602 (package
3603 (inherit numpy-documentation)
3604 (native-inputs `(("python2-functools32" ,python2-functools32)
3605 ,@(package-native-inputs numpy-documentation))))))
3606
3607(define-public python-pygit2
3608 (package
3609 (name "python-pygit2")
dac8b275 3610 (version "0.28.2")
44d10b1f
RW
3611 (source
3612 (origin
3613 (method url-fetch)
3614 (uri (pypi-uri "pygit2" version))
3615 (sha256
dac8b275 3616 (base32 "11kzj5mjkspvplnpdb6bj8dcj6rgmkk986k8hjcklyg5yaxkz32d"))))
44d10b1f
RW
3617 (build-system python-build-system)
3618 (arguments
c3ecab0d 3619 '(#:tests? #f)) ; tests don't run correctly in our environment
44d10b1f
RW
3620 (propagated-inputs
3621 `(("python-six" ,python-six)
3622 ("python-cffi" ,python-cffi)
3623 ("libgit2" ,libgit2)
3624 ("python-tox" ,python-tox)))
3625 (native-inputs
3626 `(("python-pytest" ,python-pytest)))
3627 (home-page "https://github.com/libgit2/pygit2")
3628 (synopsis "Python bindings for libgit2")
3629 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3630library, libgit2 implements Git plumbing.")
3631 ;; GPL2.0 only, with linking exception.
3632 (license license:gpl2)))
3633
3634(define-public python2-pygit2
3635 (package-with-python2 python-pygit2))
3636
3637(define-public python-pyparsing
3638 (package
3639 (name "python-pyparsing")
6d3cff5a 3640 (version "2.3.1")
44d10b1f
RW
3641 (source
3642 (origin
3643 (method url-fetch)
3644 (uri (pypi-uri "pyparsing" version))
3645 (sha256
6d3cff5a 3646 (base32 "0yk6xl885b91dmlhlsap7x78hk2rdr879fln9anbq6k4ca42djb6"))))
44d10b1f
RW
3647 (build-system python-build-system)
3648 (outputs '("out" "doc"))
3649 (arguments
3650 `(#:tests? #f ; no test target
3651 #:phases
3652 (modify-phases %standard-phases
3653 (add-after 'install 'install-doc
3654 (lambda* (#:key outputs #:allow-other-keys)
3655 (let* ((doc (string-append (assoc-ref outputs "doc")
3656 "/share/doc/" ,name "-" ,version))
3657 (html-doc (string-append doc "/html"))
3658 (examples (string-append doc "/examples")))
3659 (mkdir-p html-doc)
3660 (mkdir-p examples)
3661 (for-each
3662 (lambda (dir tgt)
3663 (map (lambda (file)
3664 (install-file file tgt))
3665 (find-files dir ".*")))
3666 (list "docs" "htmldoc" "examples")
3667 (list doc html-doc examples))
3668 #t))))))
3669 (home-page "https://github.com/pyparsing/pyparsing")
3670 (synopsis "Python parsing class library")
3671 (description
3672 "The pyparsing module is an alternative approach to creating and
3673executing simple grammars, vs. the traditional lex/yacc approach, or the use
3674of regular expressions. The pyparsing module provides a library of classes
3675that client code uses to construct the grammar directly in Python code.")
3676 (license license:expat)))
3677
3678(define-public python2-pyparsing
3679 (package-with-python2 python-pyparsing))
3680
3681(define-public python-numpydoc
3682 (package
3683 (name "python-numpydoc")
3684 (version "0.8.0")
3685 (source
3686 (origin
3687 (method url-fetch)
3688 (uri (pypi-uri "numpydoc" version))
3689 (sha256
3690 (base32
3691 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
3692 (build-system python-build-system)
3693 (propagated-inputs
3694 `(("python-sphinx" ,python-sphinx)))
3695 (native-inputs
3696 `(("python-nose" ,python-nose)))
3697 (home-page "https://pypi.python.org/pypi/numpydoc")
3698 (synopsis
3699 "Numpy's Sphinx extensions")
3700 (description
3701 "Sphinx extension to support docstrings in Numpy format.")
3702 (license license:bsd-2)))
3703
3704(define-public python2-numpydoc
3705 (package-with-python2 python-numpydoc))
3706
3707(define-public python-numexpr
3708 (package
3709 (name "python-numexpr")
3710 (version "2.6.5")
3711 (source
3712 (origin
3713 (method url-fetch)
3714 (uri (pypi-uri "numexpr" version))
3715 (sha256
3716 (base32
3717 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3718 (build-system python-build-system)
3719 (arguments `(#:tests? #f)) ; no tests included
3720 (propagated-inputs
3721 `(("python-numpy" ,python-numpy)))
3722 (home-page "https://github.com/pydata/numexpr")
3723 (synopsis "Fast numerical expression evaluator for NumPy")
3724 (description
3725 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3726expressions that operate on arrays are accelerated and use less memory than
3727doing the same calculation in Python. In addition, its multi-threaded
3728capabilities can make use of all your cores, which may accelerate
3729computations, most specially if they are not memory-bounded (e.g. those using
3730transcendental functions).")
3731 (license license:expat)))
3732
3733(define-public python2-numexpr
3734 (package-with-python2 python-numexpr))
3735
3736(define-public python-cycler
3737 (package
3738 (name "python-cycler")
3739 (version "0.10.0")
3740 (source (origin
3741 (method url-fetch)
3742 (uri (pypi-uri "cycler" version))
3743 (sha256
3744 (base32
3745 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3746 (build-system python-build-system)
3747 (arguments
3748 ;; XXX: The current version requires 'coveralls' which we don't have.
3749 ;; Enable this for the next release which uses 'python-pytest'.
3750 '(#:tests? #f))
3751 (propagated-inputs
3752 `(("python-six" ,python-six)))
3753 (home-page "http://matplotlib.org/cycler/")
3754 (synopsis "Composable keyword argument iterator")
3755 (description
3756 "When using @code{matplotlib} and plotting more than one line, it is
3757common to want to be able to want to be able to cycle over one or more artist
3758styles; but the plotting logic can quickly become involved.
3759To address this and enable easy cycling over arbitrary @code{kwargs}, the
3760@code{Cycler} class was developed.")
3761 (license license:bsd-3)))
3762
3763(define-public python2-cycler
3764 (package-with-python2 python-cycler))
3765
3766(define-public python-colorspacious
3767 (package
3768 (name "python-colorspacious")
3769 (version "1.1.0")
3770 (source
dee92e65
TGR
3771 (origin
3772 (method git-fetch)
3773 (uri (git-reference
3774 (url "https://github.com/njsmith/colorspacious.git")
3775 (commit (string-append "v" version))))
3776 (file-name (git-file-name name version))
3777 (sha256
3778 (base32 "0g0lxqiscy5g5rq9421vv7abg0c90jzy0zmas2z3hya6k2dr5aid"))))
44d10b1f
RW
3779 (build-system python-build-system)
3780 (propagated-inputs
3781 `(("python-numpy" ,python-numpy)))
3782 (native-inputs
3783 `(("python-nose" ,python-nose)))
3784 (arguments
3785 `(#:phases
3786 (modify-phases %standard-phases
3787 (replace 'check
3788 (lambda _
c988afda 3789 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
44d10b1f
RW
3790 (home-page "https://github.com/njsmith/colorspacious")
3791 (synopsis "Python library for colorspace conversions")
3792 (description "@code{colorspacious} is a Python library that lets you
3793convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3794 (license license:expat)))
3795
3796(define-public python2-colorspacious
3797 (package-with-python2 python-colorspacious))
3798
3799(define-public python-matplotlib
3800 (package
3801 (name "python-matplotlib")
3802 (version "2.2.3")
3803 (source
3804 (origin
3805 (method url-fetch)
3806 (uri (pypi-uri "matplotlib" version))
3807 (sha256
3808 (base32
3809 "1rcc7x9ig3hpchkc4cwdvym3y451w74275fxr455zkfagrsvymbk"))))
3810 (build-system python-build-system)
3811 (propagated-inputs ; the following packages are all needed at run time
3812 `(("python-cycler" ,python-cycler)
3813 ("python-kiwisolver" ,python-kiwisolver)
3814 ("python-pyparsing" ,python-pyparsing)
3815 ("python-pygobject" ,python-pygobject)
3816 ("gobject-introspection" ,gobject-introspection)
3817 ("python-tkinter" ,python "tk")
3818 ("python-dateutil" ,python-dateutil)
3819 ("python-numpy" ,python-numpy)
3820 ("python-pillow" ,python-pillow)
3821 ("python-pytz" ,python-pytz)
3822 ("python-six" ,python-six)
44d10b1f
RW
3823 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3824 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3825 ;; object. For this reason we need to import both libraries.
3826 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3827 ("python-pycairo" ,python-pycairo)
44d10b1f
RW
3828 ("python-cairocffi" ,python-cairocffi)))
3829 (inputs
3830 `(("libpng" ,libpng)
3831 ("imagemagick" ,imagemagick)
3832 ("freetype" ,freetype)
3833 ("cairo" ,cairo)
3834 ("glib" ,glib)
3835 ;; FIXME: Add backends when available.
3836 ;("python-wxpython" ,python-wxpython)
3837 ("tcl" ,tcl)
3838 ("tk" ,tk)))
3839 (native-inputs
3840 `(("pkg-config" ,pkg-config)
3841 ("python-nose" ,python-nose)
3842 ("python-mock" ,python-mock)))
3843 (arguments
3844 `(#:phases
3845 (modify-phases %standard-phases
3846 (add-before 'build 'configure-environment
3847 (lambda* (#:key outputs inputs #:allow-other-keys)
34c2a16b
RW
3848 (let ((cairo (assoc-ref inputs "cairo")))
3849 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
44d10b1f 3850 ;; has not effect.
34c2a16b 3851 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
44d10b1f
RW
3852 (setenv "HOME" (getcwd))
3853 (call-with-output-file "setup.cfg"
3854 (lambda (port)
3855 (format port "[directories]~%
3856basedirlist = ~a,~a~%
3857 [rc_options]~%
3858backend = TkAgg~%"
3859 (assoc-ref inputs "tcl")
3860 (assoc-ref inputs "tk")))))
3861 #t)))))
3862 (home-page "http://matplotlib.org")
3863 (synopsis "2D plotting library for Python")
3864 (description
3865 "Matplotlib is a Python 2D plotting library which produces publication
3866quality figures in a variety of hardcopy formats and interactive environments
3867across platforms. Matplotlib can be used in Python scripts, the python and
3868ipython shell, web application servers, and six graphical user interface
3869toolkits.")
3870 (license license:psfl)
3871 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3872
3873(define-public python2-matplotlib
3874 (let ((matplotlib (package-with-python2
3875 (strip-python2-variant python-matplotlib))))
3876 (package (inherit matplotlib)
3877 ;; Make sure to use special packages for Python 2 instead
3878 ;; of those automatically rewritten by package-with-python2.
3879 (propagated-inputs
3880 `(("python2-pycairo" ,python2-pycairo)
3881 ("python2-backports-functools-lru-cache"
3882 ,python2-backports-functools-lru-cache)
3883 ("python2-functools32" ,python2-functools32)
3884 ("python2-pygobject-2" ,python2-pygobject-2)
3885 ("python2-subprocess32" ,python2-subprocess32)
3886 ("python2-tkinter" ,python-2 "tk")
3887 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3888 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
3889
3890(define-public python-matplotlib-documentation
3891 (package
3892 (name "python-matplotlib-documentation")
3893 (version (package-version python-matplotlib))
3894 (source (package-source python-matplotlib))
3895 (build-system python-build-system)
3896 (native-inputs
3897 `(("python-matplotlib" ,python-matplotlib)
3898 ("python-colorspacious" ,python-colorspacious)
3899 ("python-sphinx" ,python-sphinx)
3900 ("python-sphinx-gallery" ,python-sphinx-gallery)
3901 ("python-numpydoc" ,python-numpydoc)
3902 ("python-ipython" ,python-ipython)
e7a53914 3903 ("python-ipykernel" ,python-ipykernel)
44d10b1f
RW
3904 ("python-mock" ,python-mock)
3905 ("graphviz" ,graphviz)
f75aa97f 3906 ("texlive" ,(texlive-union (list texlive-amsfonts
e7a53914
RW
3907 texlive-latex-amsmath
3908 texlive-latex-enumitem
3909 texlive-latex-expdlist
3910 texlive-latex-geometry
3911 texlive-latex-preview
3912 texlive-latex-type1cm
3913 texlive-latex-ucs
3914
3915 texlive-generic-pdftex
3916
e7a53914
RW
3917 texlive-fonts-ec
3918 texlive-fonts-adobe-times
3919 texlive-fonts-txfonts)))
44d10b1f
RW
3920 ("texinfo" ,texinfo)
3921 ,@(package-native-inputs python-matplotlib)))
3922 (arguments
3923 `(#:tests? #f ; we're only generating documentation
3924 #:phases
3925 (modify-phases %standard-phases
3926 (replace 'build
3927 (lambda _
3928 (chdir "doc")
e7a53914
RW
3929 (setenv "PYTHONPATH"
3930 (string-append (getenv "PYTHONPATH")
3931 ":" (getcwd) "/../examples/units"))
44d10b1f 3932 (substitute* "conf.py"
e7a53914
RW
3933 ;; Don't use git.
3934 (("^SHA = check_output.*")
3935 (string-append "SHA = \"" ,version "\"\n"))
3936 ;; Don't fetch intersphinx files from the Internet
3937 (("^explicit_order_folders" m)
3938 (string-append "intersphinx_mapping = {}\n" m))
3939 (("'sphinx.ext.intersphinx',") "")
3940 ;; Disable URL embedding which requires internet access.
3941 (("'https://docs.scipy.org/doc/numpy'") "None")
3942 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
3943 (invoke "make"
3944 "SPHINXBUILD=sphinx-build"
3945 "SPHINXOPTS=" ; don't abort on warnings
3946 "html" "texinfo")))
44d10b1f
RW
3947 (replace 'install
3948 (lambda* (#:key inputs outputs #:allow-other-keys)
3949 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3950 (doc (string-append data "/doc/python-matplotlib-" ,version))
3951 (info (string-append data "/info"))
3952 (html (string-append doc "/html")))
3953 (mkdir-p html)
3954 (mkdir-p info)
3955 (copy-recursively "build/html" html)
3956 (symlink (string-append html "/_images")
3957 (string-append info "/matplotlib-figures"))
3958 (with-directory-excursion "build/texinfo"
3959 (substitute* "matplotlib.texi"
3960 (("@image\\{([^,]*)" all file)
3961 (string-append "@image{matplotlib-figures/" file)))
3962 (symlink (string-append html "/_images")
3963 "./matplotlib-figures")
e7a53914
RW
3964 (invoke "makeinfo" "--no-split"
3965 "-o" "matplotlib.info" "matplotlib.texi"))
3966 (install-file "build/texinfo/matplotlib.info" info))
44d10b1f
RW
3967 #t)))))
3968 (home-page (package-home-page python-matplotlib))
3969 (synopsis "Documentation for the python-matplotlib package")
3970 (description (package-description python-matplotlib))
3971 (license (package-license python-matplotlib))))
3972
3973(define-public python2-matplotlib-documentation
3974 (package-with-python2 python-matplotlib-documentation))
3975
55dae98f
RW
3976(define-public python-matplotlib-venn
3977 (package
3978 (name "python-matplotlib-venn")
3979 (version "0.11.5")
3980 (source
3981 (origin
3982 (method url-fetch)
3983 (uri (pypi-uri "matplotlib-venn" version ".zip"))
3984 (sha256
3985 (base32
3986 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
3987 (build-system python-build-system)
3988 (arguments '(#:tests? #f)) ; tests are not included
3989 (propagated-inputs
3990 `(("python-matplotlib" ,python-matplotlib)
3991 ("python-numpy" ,python-numpy)
3992 ("python-scipy" ,python-scipy)))
3993 (native-inputs
3994 `(("unzip" ,unzip)))
3995 (home-page "https://github.com/konstantint/matplotlib-venn")
3996 (synopsis "Plot area-proportional Venn diagrams")
3997 (description
3998 "This package provides tools for plotting area-proportional two- and
3999three-way Venn diagrams in @code{matplotlib}.")
4000 (license license:expat)))
4001
44d10b1f
RW
4002(define-public python2-pysnptools
4003 (package
4004 (name "python2-pysnptools")
5d1ade85 4005 (version "0.3.13")
44d10b1f
RW
4006 (source
4007 (origin
4008 (method url-fetch)
5d1ade85 4009 (uri (pypi-uri "pysnptools" version))
44d10b1f
RW
4010 (sha256
4011 (base32
5d1ade85 4012 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
44d10b1f
RW
4013 (build-system python-build-system)
4014 (arguments
5d1ade85
RW
4015 `(#:python ,python-2 ; only Python 2.7 is supported
4016 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
44d10b1f
RW
4017 (propagated-inputs
4018 `(("python2-numpy" ,python2-numpy)
4019 ("python2-scipy" ,python2-scipy)
4020 ("python2-pandas" ,python2-pandas)))
44d10b1f 4021 (native-inputs
5d1ade85 4022 `(("python2-cython" ,python2-cython)))
1b66989b 4023 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
44d10b1f
RW
4024 (synopsis "Library for reading and manipulating genetic data")
4025 (description
4026 "PySnpTools is a library for reading and manipulating genetic data. It
4027can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4028those files. It can also efficiently manipulate ranges of integers using set
4029operators such as union, intersection, and difference.")
4030 (license license:asl2.0)))
4031
4032(define-public python-scipy
4033 (package
4034 (name "python-scipy")
5cfc1632 4035 (version "1.2.2")
44d10b1f
RW
4036 (source
4037 (origin
4038 (method url-fetch)
4039 (uri (pypi-uri "scipy" version))
4040 (sha256
4041 (base32
5cfc1632 4042 "1cgvgin8fvckv96hjh3ikmwkra5rif51bdb75ifzf7xbil5iwcx4"))))
44d10b1f
RW
4043 (build-system python-build-system)
4044 (propagated-inputs
4045 `(("python-numpy" ,python-numpy)
4046 ("python-matplotlib" ,python-matplotlib)
4047 ("python-pyparsing" ,python-pyparsing)))
4048 (inputs
4049 `(("lapack" ,lapack)
4050 ("openblas" ,openblas)))
4051 (native-inputs
4052 `(("python-cython" ,python-cython)
4053 ("python-pytest" ,python-pytest)
4054 ("python-sphinx" ,python-sphinx)
4055 ("python-numpydoc" ,python-numpydoc)
4056 ("gfortran" ,gfortran)
4057 ("perl" ,perl)
4058 ("which" ,which)))
4059 (outputs '("out" "doc"))
4060 (arguments
4061 `(#:phases
4062 (modify-phases %standard-phases
4063 (add-after 'unpack 'disable-broken-tests
4064 (lambda _
4065 (substitute* "scipy/sparse/linalg/dsolve/tests/test_linsolve.py"
4066 (("^( +)def test_threads_parallel\\(self\\):" m indent)
4067 (string-append indent
4068 "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
4069 m)))
4070 (substitute* "scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py"
4071 (("^def test_parallel_threads\\(\\):" m)
4072 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
4073 m)))
4074 #t))
4075 (add-before 'build 'configure-openblas
4076 (lambda* (#:key inputs #:allow-other-keys)
4077 (call-with-output-file "site.cfg"
4078 (lambda (port)
4079 (format port
4080 "[blas]
4081libraries = openblas
4082library_dirs = ~a/lib
4083include_dirs = ~a/include
4084
4085# backslash-n to make emacs happy
4086\n[atlas]
4087library_dirs = ~a/lib
4088atlas_libs = openblas
4089"
4090 (assoc-ref inputs "openblas")
4091 (assoc-ref inputs "openblas")
4092 (assoc-ref inputs "openblas"))))
4093 #t))
4094 (add-after 'install 'install-doc
4095 (lambda* (#:key inputs outputs #:allow-other-keys)
4096 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4097 (doc (string-append data "/doc/" ,name "-" ,version))
4098 (html (string-append doc "/html"))
4099 (pyver ,(string-append "PYVER=" (version-major+minor
4100 (package-version python))))
4101 ;; By default it tries to run sphinx-build through the Python
4102 ;; interpreter which won't work with our shell wrapper.
4103 (sphinxbuild "SPHINXBUILD=LANG=C sphinx-build"))
4104 ;; Make installed package available for building the
4105 ;; documentation
4106 (add-installed-pythonpath inputs outputs)
4107 (with-directory-excursion "doc"
4108 ;; Fix generation of images for mathematical expressions.
4109 (substitute* (find-files "source" "conf\\.py")
4110 (("pngmath_use_preview = True")
4111 "pngmath_use_preview = False"))
4112 (mkdir-p html)
4113 (invoke "make" "html" pyver sphinxbuild)
4114 (with-directory-excursion "build/html"
4115 (for-each (lambda (file)
4116 (let* ((dir (dirname file))
4117 (tgt-dir (string-append html "/" dir)))
4118 (install-file file html)))
4119 (find-files "." ".*")))))
4120 #t))
4121 ;; Tests can only be run after the library has been installed and not
4122 ;; within the source directory.
4123 (delete 'check)
4124 (add-after 'install 'check
4125 (lambda* (#:key inputs outputs #:allow-other-keys)
4126 (add-installed-pythonpath inputs outputs)
4127 (with-directory-excursion "/tmp"
4128 (invoke "python" "-c"
4129 "import scipy; scipy.test(verbose=2)")))))))
4130 (home-page "https://www.scipy.org/")
4131 (synopsis "The Scipy library provides efficient numerical routines")
4132 (description "The SciPy library is one of the core packages that make up
4133the SciPy stack. It provides many user-friendly and efficient numerical
4134routines such as routines for numerical integration and optimization.")
4135 (properties `((python2-variant . ,(delay python2-scipy))))
4136 (license license:bsd-3)))
4137
4138(define-public python2-scipy
4139 (package-with-python2
4140 (strip-python2-variant python-scipy)))
4141
4142(define-public python-socksipy-branch
4143 (package
4144 (name "python-socksipy-branch")
4145 (version "1.01")
4146 (source
4147 (origin
4148 (method url-fetch)
4149 (uri (pypi-uri "SocksiPy-branch" version))
4150 (sha256
4151 (base32
4152 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4153 (build-system python-build-system)
4154 (arguments
4155 `(#:tests? #f)) ; There are no tests
4156 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4157 (synopsis "Python SOCKS module")
4158 (description
4159 "SocksiPy - A Python SOCKS client module. It provides a
4160socket-like interface that supports connections to any TCP
4161service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4162The original version was developed by Dan Haim, this is a
4163branch created by Mario Vilas to address some open issues,
4164as the original project seems to have been abandoned circa 2007.")
4165 (license license:bsd-3)))
4166
4167(define-public python2-socksipy-branch
4168 (package-with-python2 python-socksipy-branch))
4169
4170(define-public python-pycodestyle
4171 (package
4172 (name "python-pycodestyle")
4173 (version "2.4.0")
4174 (source
4175 (origin
4176 (method url-fetch)
4177 (uri (pypi-uri "pycodestyle" version))
4178 (sha256
4179 (base32
4180 "0fhy4vnlgpjq4qd1wdnl6pvdw7rah0ypmn8c9mkhz8clsndskz6b"))))
4181 (build-system python-build-system)
4182 (home-page "https://pycodestyle.readthedocs.io/")
4183 (synopsis "Python style guide checker")
4184 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4185Python code against some of the style conventions in
4186@url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4187 (license license:expat)))
4188
4189(define-public python2-pycodestyle
4190 (package-with-python2 python-pycodestyle))
4191
4192(define-public python-multidict
4193 (package
4194 (name "python-multidict")
4195 (version "4.2.0")
4196 (source
4197 (origin
4198 (method url-fetch)
4199 (uri (pypi-uri "multidict" version))
4200 (sha256
4201 (base32
4202 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
4203 (build-system python-build-system)
4204 (native-inputs
4205 `(("python-pytest" ,python-pytest)
4206 ("python-pytest-runner" ,python-pytest-runner)))
4207 (home-page "https://github.com/aio-libs/multidict/")
4208 (synopsis "Multidict implementation")
4209 (description "Multidict is dict-like collection of key-value pairs
4210where key might be occurred more than once in the container.")
4211 (license license:asl2.0)))
4212
4213(define-public python-orderedmultidict
4214 (package
4215 (name "python-orderedmultidict")
4216 (version "0.7.11")
4217 (source
4218 (origin
4219 (method url-fetch)
4220 (uri (pypi-uri "orderedmultidict" version))
4221 (sha256
4222 (base32
4223 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4224 (build-system python-build-system)
4225 (arguments
4226 `(#:phases
4227 (modify-phases %standard-phases
4228 (add-after 'unpack 'fix-tests
4229 (lambda _
4230 ;; The package uses nosetest for running the tests.
4231 ;; Adding this initfile allows to run the test suite
4232 ;; without requiring nosetest.
d1c4f329
RW
4233 (with-output-to-file "tests/__init__.py" newline)
4234 #t)))))
44d10b1f
RW
4235 (propagated-inputs
4236 `(("python-six" ,python-six)))
4237 (native-inputs
4238 `(("python-pycodestyle" ,python-pycodestyle)))
4239 (home-page "https://github.com/gruns/orderedmultidict")
4240 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4241 (description "This package contains a library for ordered multivalue
4242dictionaries. A multivalue dictionary is a dictionary that can store
4243multiple values for the same key. An ordered multivalue dictionary is a
4244multivalue dictionary that retains the order of insertions and deletions.")
4245 (license license:unlicense)))
4246
4247(define-public python2-orderedmultidict
4248 (package-with-python2 python-orderedmultidict))
4249
4250(define-public python-autopep8
4251 (package
4252 (name "python-autopep8")
4253 (version "1.3.5")
4254 (source
4255 (origin
4256 (method url-fetch)
4257 (uri (pypi-uri "autopep8" version))
4258 (sha256
4259 (base32
4260 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
4261 (build-system python-build-system)
4262 (propagated-inputs
4263 `(("python-pycodestyle" ,python-pycodestyle)))
4264 (home-page "https://github.com/hhatto/autopep8")
4265 (synopsis "Format Python code according to the PEP 8 style guide")
4266 (description
4267 "@code{autopep8} automatically formats Python code to conform to
4268the PEP 8 style guide. It uses the pycodestyle utility to determine
4269what parts of the code needs to be formatted. @code{autopep8} is
4270capable of fixing most of the formatting issues that can be reported
4271by pycodestyle.")
4272 (license (license:non-copyleft
4273 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4274
4275(define-public python2-autopep8
4276 (package-with-python2 python-autopep8))
4277
4278(define-public python-distutils-extra
4279 (package
4280 (name "python-distutils-extra")
4281 (version "2.38")
4282 (source
4283 (origin
4284 (method url-fetch)
4285 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4286 version "/+download/python-distutils-extra-"
4287 version ".tar.gz"))
4288 (sha256
4289 (base32
4290 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4291 (build-system python-build-system)
4292 (home-page "https://launchpad.net/python-distutils-extra/")
4293 (synopsis "Enhancements to Python's distutils")
4294 (description
4295 "The python-distutils-extra module enables you to easily integrate
4296gettext support, themed icons, and scrollkeeper-based documentation into
4297Python's distutils.")
4298 (license license:gpl2)))
4299
4300(define-public python2-distutils-extra
4301 (package-with-python2 python-distutils-extra))
4302
4303(define-public python2-elib.intl
4304 (package
4305 (name "python2-elib.intl")
4306 (version "0.0.3")
4307 (source
4308 (origin
4309 ;; This project doesn't tag releases or publish tarballs, so we take
4310 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4311 (method git-fetch)
4312 (uri (git-reference
4313 (url "https://github.com/dieterv/elib.intl.git")
4314 (commit "d09997cfef")))
4315 (file-name (string-append name "-" version "-checkout"))
4316 (sha256
4317 (base32
4318 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4319 (build-system python-build-system)
4320 (arguments
4321 ;; incompatible with Python 3 (exception syntax)
4322 `(#:python ,python-2
4323 #:tests? #f))
4324 (home-page "https://github.com/dieterv/elib.intl")
4325 (synopsis "Enhanced internationalization for Python")
4326 (description
4327 "The elib.intl module provides enhanced internationalization (I18N)
4328services for your Python modules and applications.")
4329 (license license:lgpl3+)))
4330
4331(define-public python-olefile
4332 (package
4333 (name "python-olefile")
5bef0f10 4334 (version "0.46")
44d10b1f
RW
4335 (source
4336 (origin
4337 (method url-fetch)
5bef0f10
MB
4338 (uri (string-append "https://github.com/decalage2/olefile/releases/"
4339 "download/v" version "/olefile-" version ".tar.gz"))
44d10b1f
RW
4340 (file-name (string-append name "-" version ".tar.gz"))
4341 (sha256
4342 (base32
5bef0f10 4343 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
44d10b1f 4344 (build-system python-build-system)
5bef0f10 4345 (home-page "https://www.decalage.info/python/olefileio")
44d10b1f
RW
4346 (synopsis "Read and write Microsoft OLE2 files.")
4347 (description
4348 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
4349Storage or Compound Document, Microsoft Office). It is an improved version of
4350the OleFileIO module from PIL, the Python Image Library.")
4351 (license license:bsd-3)))
4352
4353(define-public python2-olefile
4354 (package-with-python2 python-olefile))
4355
4356(define-public python-pillow
4357 (package
4358 (name "python-pillow")
4359 (version "5.4.1")
4360 (source
4361 (origin
4362 (method url-fetch)
4363 (uri (pypi-uri "Pillow" version))
4364 (sha256
4365 (base32
4366 "17waygkhhzjd75kajlfw9v57mbb41lcpg6cvkdijqd7smm76ccsj"))))
4367 (build-system python-build-system)
4368 (native-inputs
4369 `(("python-pytest" ,python-pytest)))
4370 (inputs
4371 `(("freetype" ,freetype)
4372 ("lcms" ,lcms)
4373 ("zlib" ,zlib)
4374 ("libjpeg" ,libjpeg)
4375 ("openjpeg" ,openjpeg)
4376 ("libtiff" ,libtiff)
4377 ("libwebp" ,libwebp)))
4378 (propagated-inputs
4379 `(("python-olefile" ,python-olefile)))
4380 (arguments
4381 `(#:phases
4382 (modify-phases %standard-phases
4383 (add-after 'unpack 'patch-ldconfig
4384 (lambda _
4385 (substitute* "setup.py"
4386 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
4387 (delete 'check) ; We must run checks after python-pillow is installed.
4388 (add-after 'install 'check-installed
4389 (lambda* (#:key outputs inputs #:allow-other-keys)
4390 (begin
4391 (setenv "HOME" (getcwd))
4392 ;; Make installed package available for running the tests.
4393 (add-installed-pythonpath inputs outputs)
4394 (invoke "python" "selftest.py" "--installed")
4395 (invoke "python" "-m" "pytest" "-vv")))))))
4396 (home-page "https://python-pillow.org")
4397 (synopsis "Fork of the Python Imaging Library")
4398 (description
4399 "The Python Imaging Library adds image processing capabilities to your
4400Python interpreter. This library provides extensive file format support, an
4401efficient internal representation, and fairly powerful image processing
4402capabilities. The core image library is designed for fast access to data
4403stored in a few basic pixel formats. It should provide a solid foundation for
4404a general image processing tool.")
4405 (license (license:x11-style
4406 "http://www.pythonware.com/products/pil/license.htm"
4407 "The PIL Software License"))))
4408
4409(define-public python2-pillow
4410 (package-with-python2 python-pillow))
4411
4412(define-public python-pycparser
4413 (package
4414 (name "python-pycparser")
c6c0940e 4415 (version "2.19")
44d10b1f
RW
4416 (source
4417 (origin
4418 (method url-fetch)
4419 (uri (pypi-uri "pycparser" version))
4420 (sha256
4421 (base32
c6c0940e 4422 "1cr5dcj9628lkz1qlwq3fv97c25363qppkmcayqvd05dpy573259"))))
44d10b1f
RW
4423 (outputs '("out" "doc"))
4424 (build-system python-build-system)
4425 (native-inputs
4426 `(("pkg-config" ,pkg-config)))
4427 (arguments
4428 `(#:phases
4429 (modify-phases %standard-phases
4430 (replace 'check
4431 (lambda _
4432 (with-directory-excursion "tests"
acb75c03
RW
4433 (invoke "python" "all_tests.py"))
4434 #t))
44d10b1f
RW
4435 (add-after 'install 'install-doc
4436 (lambda* (#:key outputs #:allow-other-keys)
4437 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4438 (doc (string-append data "/doc/" ,name "-" ,version))
4439 (examples (string-append doc "/examples")))
4440 (mkdir-p examples)
4441 (for-each (lambda (file)
4442 (copy-file (string-append "." file)
4443 (string-append doc file)))
4444 '("/README.rst" "/CHANGES" "/LICENSE"))
c6c0940e
MB
4445 (copy-recursively "examples" examples)
4446 #t))))))
44d10b1f
RW
4447 (home-page "https://github.com/eliben/pycparser")
4448 (synopsis "C parser in Python")
4449 (description
4450 "Pycparser is a complete parser of the C language, written in pure Python
4451using the PLY parsing library. It parses C code into an AST and can serve as
4452a front-end for C compilers or analysis tools.")
4453 (license license:bsd-3)))
4454
4455(define-public python2-pycparser
4456 (package-with-python2 python-pycparser))
4457
4458(define-public python-pywavelets
4459 (package
4460 (name "python-pywavelets")
4461 (version "1.0.1")
4462 (home-page "https://github.com/PyWavelets/pywt")
4463 (source (origin
4464 (method url-fetch)
4465 (uri (pypi-uri "PyWavelets" version))
4466 (sha256
4467 (base32
4468 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
4469 (build-system python-build-system)
4470 (arguments
4471 '(#:modules ((ice-9 ftw)
4472 (srfi srfi-1)
4473 (srfi srfi-26)
4474 (guix build utils)
4475 (guix build python-build-system))
4476 #:phases (modify-phases %standard-phases
4477 (replace 'check
4478 (lambda _
4479 (let ((cwd (getcwd))
4480 (libdir (find (cut string-prefix? "lib." <>)
4481 (scandir "build"))))
4482 (with-directory-excursion (string-append cwd "/build/" libdir)
4483 (invoke "nosetests" "-v" "."))))))))
4484 (native-inputs
4485 `(("python-matplotlib" ,python-matplotlib) ;for tests
4486 ("python-nose" ,python-nose)))
4487 (propagated-inputs
4488 `(("python-numpy" ,python-numpy)))
4489 (synopsis "Wavelet transforms in Python")
4490 (description
4491 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
4492mathematical basis functions that are localized in both time and frequency.
4493Wavelet transforms are time-frequency transforms employing wavelets. They are
4494similar to Fourier transforms, the difference being that Fourier transforms are
4495localized only in frequency instead of in time and frequency.")
4496 (license license:expat)))
4497
4498(define-public python2-pywavelets
4499 (package-with-python2 python-pywavelets))
4500
4501(define-public python-xcffib
4502 (package
4503 (name "python-xcffib")
4504 (version "0.6.0")
4505 (source
4506 (origin
4507 (method url-fetch)
4508 (uri (pypi-uri "xcffib" version))
4509 (sha256
4510 (base32
4511 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
4512 (build-system python-build-system)
4513 (inputs
4514 `(("libxcb" ,libxcb)))
4515 (propagated-inputs
4516 `(("python-cffi" ,python-cffi) ; used at run time
4517 ("python-six" ,python-six)))
4518 (arguments
4519 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4520 #:tests? #f
4521 #:phases
4522 (modify-phases %standard-phases
4523 (add-after 'unpack 'fix-libxcb-path
4524 (lambda* (#:key inputs #:allow-other-keys)
4525 (let ((libxcb (assoc-ref inputs "libxcb")))
4526 (substitute* '("xcffib/__init__.py")
4527 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4528 #t)))
4529 (add-after 'install 'install-doc
4530 (lambda* (#:key outputs #:allow-other-keys)
4531 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4532 "/doc/" ,name "-" ,version)))
4533 (mkdir-p doc)
4534 (copy-file "README.md"
4535 (string-append doc "/README.md"))
4536 #t))))))
4537 (home-page "https://github.com/tych0/xcffib")
4538 (synopsis "XCB Python bindings")
4539 (description
4540 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4541support for Python 3 and PyPy. It is based on cffi.")
4542 (license license:expat)))
4543
4544(define-public python2-xcffib
4545 (package-with-python2 python-xcffib))
4546
4547(define-public python-cairocffi
4548 (package
4549 (name "python-cairocffi")
4550 (version "0.9.0")
4551 (source
4552 (origin
4553 (method url-fetch)
4554 (uri (pypi-uri "cairocffi" version))
4555 (sha256
4556 (base32
4557 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
4558 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
4559 (build-system python-build-system)
4560 (outputs '("out" "doc"))
4561 (inputs
4562 `(("glib" ,glib)
4563 ("gtk+" ,gtk+)
4564 ("gdk-pixbuf" ,gdk-pixbuf)
4565 ("cairo" ,cairo)
4566 ("pango" ,pango)))
4567 (native-inputs
4568 `(("pkg-config" ,pkg-config)
4569 ("python-pytest" ,python-pytest)
4570 ("python-pytest-cov" ,python-pytest-cov)
4571 ("python-pytest-runner" ,python-pytest-runner)
4572 ("python-sphinx" ,python-sphinx)
4573 ("python-docutils" ,python-docutils)))
4574 (propagated-inputs
4575 `(("python-xcffib" ,python-xcffib))) ; used at run time
4576 (arguments
4577 `(#:phases
4578 (modify-phases %standard-phases
4579 (add-after 'unpack 'patch-paths
4580 (lambda* (#:key inputs outputs #:allow-other-keys)
4581 (substitute* (find-files "." "\\.py$")
4582 (("dlopen\\(ffi, 'cairo'")
4583 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
4584 "/lib/libcairo.so.2'"))
4585 (("dlopen\\(ffi, 'gdk-3'")
4586 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
4587 "/lib/libgtk-3.so.0'"))
4588 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
4589 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
4590 "/lib/libgdk_pixbuf-2.0.so.0'"))
4591 (("dlopen\\(ffi, 'glib-2.0'")
4592 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4593 "/lib/libglib-2.0.so.0'"))
4594 (("dlopen\\(ffi, 'gobject-2.0'")
4595 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4596 "/lib/libgobject-2.0.so.0'"))
4597 (("dlopen\\(ffi, 'pangocairo-1.0'")
4598 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4599 "/lib/libpangocairo-1.0.so.0'"))
4600 (("dlopen\\(ffi, 'pango-1.0'")
4601 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4602 "/lib/libpango-1.0.so.0'")))
4603 #t))
4604 (add-after 'install 'install-doc
4605 (lambda* (#:key inputs outputs #:allow-other-keys)
4606 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4607 (doc (string-append data "/doc/" ,name "-" ,version))
4608 (html (string-append doc "/html")))
4609 (setenv "LD_LIBRARY_PATH"
4610 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4611 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4612 (setenv "LANG" "en_US.UTF-8")
4613 (mkdir-p html)
4614 (for-each (lambda (file)
4615 (copy-file (string-append "." file)
4616 (string-append doc file)))
4617 '("/README.rst" "/CHANGES" "/LICENSE"))
4618 (system* "python" "setup.py" "build_sphinx")
4619 (copy-recursively "docs/_build/html" html)
4620 #t))))))
4621 (home-page "https://github.com/Kozea/cairocffi")
4622 (synopsis "Python bindings and object-oriented API for Cairo")
4623 (description
4624 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4625Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4626graphics library with support for multiple backends including image buffers,
4627PNG, PostScript, PDF, and SVG file output.")
4628 (license license:bsd-3)))
4629
4630(define-public python2-cairocffi
4631 (package-with-python2 python-cairocffi))
4632
4633(define-public python-decorator
4634 (package
4635 (name "python-decorator")
4636 (version "4.3.0")
4637 (source
4638 (origin
4639 (method url-fetch)
4640 (uri (pypi-uri "decorator" version))
4641 (sha256
4642 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4643 (build-system python-build-system)
4644 (home-page "https://pypi.python.org/pypi/decorator/")
4645 (synopsis "Python module to simplify usage of decorators")
4646 (description
4647 "The aim of the decorator module is to simplify the usage of decorators
4648for the average programmer, and to popularize decorators usage giving examples
4649of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4650etc. The core of this module is a decorator factory.")
4651 (license license:expat)))
4652
4653(define-public python2-decorator
4654 (package-with-python2 python-decorator))
4655
4656(define-public python-drmaa
4657 (package
4658 (name "python-drmaa")
4659 (version "0.7.7")
4660 (source
4661 (origin
4662 (method url-fetch)
4663 (uri (pypi-uri "drmaa" version))
4664 (sha256
4665 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4666 (build-system python-build-system)
4667 ;; The test suite requires libdrmaa which is provided by the cluster
4668 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4669 ;; should be set to the path of the libdrmaa library.
4670 (arguments '(#:tests? #f))
4671 (native-inputs
4672 `(("python-nose" ,python-nose)))
4673 (home-page "https://pypi.python.org/pypi/drmaa")
4674 (synopsis "Python bindings for the DRMAA library")
4675 (description
4676 "A Python package for Distributed Resource Management (DRM) job
4677submission and control. This package is an implementation of the DRMAA 1.0
4678Python language binding specification.")
4679 (license license:bsd-3)))
4680
4681(define-public python2-drmaa
4682 (package-with-python2 python-drmaa))
4683
4684(define-public python-grako
4685 (package
4686 (name "python-grako")
4687 (version "3.99.9")
4688 (source
4689 (origin
4690 (method url-fetch)
4691 (uri
4692 (pypi-uri "grako" version ".zip"))
4693 (sha256
4694 (base32
4695 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4696 (build-system python-build-system)
4697 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4698 (native-inputs
4699 `(("unzip" ,unzip)
4700 ("python-pytest" ,python-pytest)
4701 ("python-pytest-runner" ,python-pytest-runner)))
4702 (home-page "https://bitbucket.org/neogeny/grako")
4703 (synopsis "EBNF parser generator")
4704 (description
4705 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4706memoizing PEG/Packrat parser in Python.")
4707 (license license:bsd-3)))
4708
4709(define-public python2-grako
4710 (package-with-python2 python-grako))
4711
4712(define-public python-gridmap
4713 (package
4714 (name "python-gridmap")
4715 (version "0.13.0")
4716 (source
4717 (origin
768fea0f
TGR
4718 (method git-fetch)
4719 (uri (git-reference
4720 (url "https://github.com/pygridtools/gridmap.git")
4721 (commit (string-append "v" version))))
4722 (file-name (git-file-name name version))
44d10b1f 4723 (sha256
768fea0f 4724 (base32 "1478lbwsr1w24cii2x01m2910fvh8r43ghnb78nc972a96hqiknm"))))
44d10b1f
RW
4725 (build-system python-build-system)
4726 (arguments
4727 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4728 (propagated-inputs
4729 `(("python-psutil" ,python-psutil)
4730 ("python-drmaa" ,python-drmaa)
4731 ("python-pyzmq" ,python-pyzmq)))
4732 (home-page "https://github.com/pygridtools/gridmap")
4733 (synopsis "Create jobs on a cluster directly from Python")
4734 (description
4735 "Gridmap is a Python package to allow you to easily create jobs on the
4736cluster directly from Python. You can directly map Python functions onto the
4737cluster without needing to write any wrapper code yourself.")
4738 (license license:gpl3+)))
4739
4740(define-public python2-gridmap
4741 (package-with-python2 python-gridmap))
4742
4743(define-public python-honcho
4744 (package
4745 (name "python-honcho")
4746 (version "1.0.1")
4747 (source
4748 (origin
8524d130
TGR
4749 (method git-fetch)
4750 (uri (git-reference
4751 (url "https://github.com/nickstenning/honcho.git")
4752 (commit (string-append "v" version))))
4753 (file-name (git-file-name name version))
44d10b1f 4754 (sha256
8524d130 4755 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
44d10b1f
RW
4756 (build-system python-build-system)
4757 (native-inputs
4758 `(("python-pytest" ,python-pytest)
4759 ("python-mock" ,python-mock)
4760 ("python-tox" ,python-tox)
4761 ("which" ,which))) ;for tests
4762 (propagated-inputs
4763 `(("python-jinja2" ,python-jinja2)))
4764 (arguments
4765 `(#:phases
4766 (modify-phases %standard-phases
4767 (delete 'check)
4768 (add-after 'install 'check
4769 (lambda* (#:key outputs inputs #:allow-other-keys)
4770 ;; fix honcho path in testsuite
4771 (substitute* "tests/conftest.py"
4772 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4773 "/bin/honcho" "'")))
4774 ;; It's easier to run tests after install.
4775 ;; Make installed package available for running the tests
4776 (add-installed-pythonpath inputs outputs)
95b707fb 4777 (invoke "py.test" "-v"))))))
44d10b1f
RW
4778 (home-page "https://github.com/nickstenning/honcho")
4779 (synopsis "Manage Procfile-based applications")
4780 (description
4781 "A Procfile is a file which describes how to run an application
50fceab0 4782consisting of several processes. honcho starts all listed processes.
44d10b1f
RW
4783The output of all running processes is collected by honcho and
4784displayed.")
4785 (license license:expat)))
4786
4787(define-public python2-honcho
4788 (package-with-python2 python-honcho))
4789
4790(define-public python-pexpect
4791 (package
4792 (name "python-pexpect")
4793 (version "4.6.0")
4794 (source
4795 (origin
4796 (method url-fetch)
4797 (uri (pypi-uri "pexpect" version))
4798 (sha256
4799 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
4800 (build-system python-build-system)
4801 (arguments
4802 `(#:phases
4803 (modify-phases %standard-phases
4804 (add-before 'check 'prepare-tests
4805 (lambda _
4806 (substitute* (find-files "tests")
4807 (("/bin/ls") (which "ls"))
4808 (("/bin/echo") (which "echo"))
4809 (("/bin/which") (which "which"))
4810 ;; Many tests try to use the /bin directory which
4811 ;; is not present in the build environment.
4812 ;; Use one that's non-empty and unlikely to change.
4813 (("/bin'") "/dev'"))
4814 ;; XXX: Socket connection test gets "Connection reset by peer".
4815 ;; Why does it not work? Delete for now.
4816 (delete-file "tests/test_socket.py")
4817 #t))
4818 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
4819 (native-inputs
4820 `(("python-nose" ,python-nose)
4821 ("python-pytest" ,python-pytest)
4822 ("man-db" ,man-db)
4823 ("which" ,which)
4824 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
4825 (propagated-inputs
4826 `(("python-ptyprocess" ,python-ptyprocess)))
4827 (home-page "http://pexpect.readthedocs.org/")
4828 (synopsis "Controlling interactive console applications")
4829 (description
4830 "Pexpect is a pure Python module for spawning child applications;
4831controlling them; and responding to expected patterns in their output.
4832Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4833child application and control it as if a human were typing commands.")
4834 (license license:isc)))
4835
4836(define-public python2-pexpect
4837 (package-with-python2 python-pexpect))
4838
4839(define-public python-setuptools-scm
4840 (package
4841 (name "python-setuptools-scm")
4842 (version "3.1.0")
4843 (source (origin
4844 (method url-fetch)
4845 (uri (pypi-uri "setuptools_scm" version))
4846 (sha256
4847 (base32
4848 "0h4bglwfz8b9prqljv8z3w9rgydfyxzaj05bm1y6zs5m6shz548i"))))
4849 (build-system python-build-system)
4850 (home-page "https://github.com/pypa/setuptools_scm/")
4851 (synopsis "Manage Python package versions in SCM metadata")
4852 (description
4853 "Setuptools_scm handles managing your Python package versions in
4854@dfn{software configuration management} (SCM) metadata instead of declaring
4855them as the version argument or in a SCM managed file.")
4856 (license license:expat)))
4857
4858(define-public python2-setuptools-scm
4859 (package-with-python2 python-setuptools-scm))
4860
bb74ea09
RW
4861(define-public python-pathlib2
4862 (package
4863 (name "python-pathlib2")
4864 (version "2.3.3")
4865 (source
4866 (origin
4867 (method url-fetch)
4868 (uri (pypi-uri "pathlib2" version))
4869 (sha256
4870 (base32
4871 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
4872 (build-system python-build-system)
4873 (propagated-inputs
4874 `(("python-scandir" ,python-scandir)
4875 ("python-six" ,python-six)))
4876 (home-page "https://pypi.python.org/pypi/pathlib2/")
746d3384 4877 (synopsis "Object-oriented file system paths")
bb74ea09
RW
4878 (description "The goal of pathlib2 is to provide a backport of the
4879standard @code{pathlib} module which tracks the standard library module, so
4880all the newest features of the standard @code{pathlib} can be used also on
4881older Python versions.")
4882 (license license:expat)))
4883
15b65617
RW
4884(define-public python-importlib-metadata
4885 (package
4886 (name "python-importlib-metadata")
4887 (version "0.18")
4888 (source
4889 (origin
4890 (method url-fetch)
4891 (uri (pypi-uri "importlib_metadata" version))
4892 (sha256
4893 (base32
4894 "1nqj6vj2z4byi8flzf2lbldhqgicsz9mkpv4k69kjd8p8qxy4vnb"))))
4895 (build-system python-build-system)
4896 (propagated-inputs
4897 `(("python-configparser" ,python-configparser)
4898 ("python-contextlib2" ,python-contextlib2)
4899 ("python-docutils" ,python-docutils)
4900 ("python-pathlib2" ,python-pathlib2)
4901 ("python-rst.linker" ,python-rst.linker)
4902 ("python-zipp" ,python-zipp)))
4903 (native-inputs
4904 `(("python-setuptools-scm" ,python-setuptools-scm)
4905 ("python-sphinx" ,python-sphinx)))
4906 (home-page "https://importlib-metadata.readthedocs.io/")
4907 (synopsis "Read metadata from Python packages")
4908 (description
4909 "@code{importlib_metadata} is a library which provides an API for
4910accessing an installed Python package's metadata, such as its entry points or
4911its top-level name. This functionality intends to replace most uses of
4912@code{pkg_resources} entry point API and metadata API. Along with
4913@code{importlib.resources} in Python 3.7 and newer, this can eliminate the
4914need to use the older and less efficient @code{pkg_resources} package.")
4915 (license license:asl2.0)))
4916
37c173d1
RW
4917(define-public python-jaraco-packaging
4918 (package
4919 (name "python-jaraco-packaging")
4920 (version "6.1")
4921 (source
4922 (origin
4923 (method url-fetch)
4924 (uri (pypi-uri "jaraco.packaging" version))
4925 (sha256
4926 (base32
4927 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
4928 (build-system python-build-system)
4929 (propagated-inputs
4930 `(("python-pytest" ,python-pytest)
4931 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
4932 ("python-pytest-flake8" ,python-pytest-flake8)
4933 ("python-rst.linker" ,python-rst.linker)
4934 ("python-setuptools" ,python-setuptools)
4935 ("python-setuptools-scm" ,python-setuptools-scm)
4936 ("python-six" ,python-six)
4937 ("python-sphinx" ,python-sphinx)))
4938 (home-page "https://github.com/jaraco/jaraco.packaging")
4939 (synopsis "Tools to supplement packaging Python releases")
4940 (description
4941 "This package provides various tools to supplement packaging Python
4942releases.")
4943 (license license:expat)))
4944
44d10b1f
RW
4945(define-public python-pathpy
4946 (package
4947 (name "python-pathpy")
49ad11e9 4948 (version "11.5.0")
44d10b1f
RW
4949 (source
4950 (origin
4951 (method url-fetch)
4952 (uri (pypi-uri "path.py" version))
4953 (sha256
49ad11e9
RW
4954 (base32 "1jxkf91syzxlpiwgm83fjfz1m5xh3jrvv4iyl5wjsnkk599pls5n"))))
4955 (outputs '("out" "doc"))
44d10b1f
RW
4956 (build-system python-build-system)
4957 (propagated-inputs
4958 `(("python-appdirs" ,python-appdirs)))
4959 (native-inputs
4960 `(("python-setuptools-scm" ,python-setuptools-scm)
4961 ("python-sphinx" ,python-sphinx)
4962 ("python-rst.linker" ,python-rst.linker)
4963 ("python-pytest" ,python-pytest)
49ad11e9
RW
4964 ("python-pytest-runner" ,python-pytest-runner)
4965 ("python-jaraco-packaging" ,python-jaraco-packaging)))
44d10b1f 4966 (arguments
49ad11e9
RW
4967 `(#:phases
4968 (modify-phases %standard-phases
4969 (add-after 'build 'build-doc
4970 (lambda _
4971 (setenv "LANG" "en_US.UTF-8")
4972 (invoke "python" "setup.py" "build_sphinx")))
4973 (add-after 'install 'install-doc
4974 (lambda* (#:key outputs #:allow-other-keys)
4975 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4976 (doc (string-append data "/doc/" ,name "-" ,version))
4977 (html (string-append doc "/html")))
4978 (mkdir-p html)
4979 (for-each (lambda (file)
4980 (copy-file file (string-append doc "/" file)))
4981 '("README.rst" "CHANGES.rst"))
4982 (copy-recursively "build/sphinx/html" html)
4983 #t)))
4984 (replace 'check
4985 (lambda _
4986 ;; The import time test aborts if an import takes longer than
4987 ;; 100ms. It may very well take a little longer than that.
4988 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
44d10b1f
RW
4989 (home-page "https://github.com/jaraco/path.py")
4990 (synopsis "Python module wrapper for built-in os.path")
4991 (description
4992 "@code{path.py} implements path objects as first-class entities, allowing
4993common operations on files to be invoked on those path objects directly.")
4994 (license license:expat)))
4995
4996(define-public python2-pathpy
4997 (package-with-python2 python-pathpy))
4998
4999(define-public python-simplegeneric
5000 (package
5001 (name "python-simplegeneric")
5002 (version "0.8.1")
5003 (source
5004 (origin
5005 (method url-fetch)
6c8c3980 5006 (uri (pypi-uri "simplegeneric" version ".zip"))
44d10b1f
RW
5007 (sha256
5008 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5009 (build-system python-build-system)
5010 (native-inputs
5011 `(("unzip" ,unzip)))
5012 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5013 (synopsis "Python module for simple generic functions")
5014 (description
5015 "The simplegeneric module lets you define simple single-dispatch generic
5016functions, akin to Python’s built-in generic functions like @code{len()},
5017@code{iter()} and so on. However, instead of using specially-named methods,
5018these generic functions use simple lookup tables, akin to those used by
5019e.g. @code{pickle.dump()} and other generic functions found in the Python
5020standard library.")
5021 (license license:zpl2.1)))
5022
5023(define-public python2-simplegeneric
5024 (package-with-python2 python-simplegeneric))
5025
5026(define-public python-ipython-genutils
5027 ;; TODO: This package is retired, check if can be removed, see description.
5028 (package
5029 (name "python-ipython-genutils")
5030 (version "0.1.0")
5031 (source
5032 (origin
5033 (method url-fetch)
c9671d4b 5034 (uri (pypi-uri "ipython_genutils" version))
44d10b1f
RW
5035 (sha256
5036 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5037 (build-system python-build-system)
5038 (arguments `(#:tests? #f)) ; no tests
5039 (home-page "https://ipython.org")
5040 (synopsis "Vestigial utilities from IPython")
5041 (description
5042 "This package provides retired utilities from IPython. No packages
5043outside IPython/Jupyter should depend on it.
5044
5045This package shouldn't exist. It contains some common utilities shared by
5046Jupyter and IPython projects during The Big Split. As soon as possible, those
5047packages will remove their dependency on this, and this package will go
5048away.")
5049 (license license:bsd-3)))
5050
5051(define-public python2-ipython-genutils
5052 (package-with-python2 python-ipython-genutils))
5053
5054(define-public python-traitlets
5055 (package
5056 (name "python-traitlets")
5057 (version "4.3.2")
5058 (source
5059 (origin
5060 (method url-fetch)
5061 (uri (pypi-uri "traitlets" version))
5062 (sha256
5063 (base32
5064 "0dbq7sx26xqz5ixs711k5nc88p8a0nqyz6162pwks5dpcz9d4jww"))))
5065 (build-system python-build-system)
5066 (arguments
5067 `(#:phases
5068 (modify-phases %standard-phases
5069 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
5070 (propagated-inputs
5071 `(("python-ipython-genutils" ,python-ipython-genutils)
5072 ("python-decorator" ,python-decorator))) ;not needed for >4.3.2
5073 (native-inputs
5074 `(("python-pytest" ,python-pytest)))
5075 (properties `((python2-variant . ,(delay python2-traitlets))))
5076 (home-page "https://ipython.org")
5077 (synopsis "Configuration system for Python applications")
5078 (description
5079 "Traitlets is a framework that lets Python classes have attributes with
5080type checking, dynamically calculated default values, and ‘on change’
5081callbacks. The package also includes a mechanism to use traitlets for
5082configuration, loading values from files or from command line arguments. This
5083is a distinct layer on top of traitlets, so you can use traitlets in your code
5084without using the configuration machinery.")
5085 (license license:bsd-3)))
5086
5087(define-public python2-traitlets
5088 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
5089 (package
5090 (inherit traitlets)
5091 (propagated-inputs
5092 `(("python2-enum34" ,python2-enum34)
5093 ,@(package-propagated-inputs traitlets))))))
5094
5095(define-public python-jupyter-core
5096 (package
5097 (name "python-jupyter-core")
5098 (version "4.4.0")
5099 (source
5100 (origin
5101 (method url-fetch)
5102 (uri (string-append (pypi-uri "jupyter_core" version)))
5103 (sha256
5104 (base32
5105 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
5106 (build-system python-build-system)
5107 ;; FIXME: not sure how to run the tests
5108 (arguments `(#:tests? #f))
5109 (propagated-inputs
5110 `(("python-traitlets" ,python-traitlets)))
5111 (home-page "http://jupyter.org/")
5112 (synopsis "Jupyter base package")
5113 (description
5114 "Jupyter core is the base package on which Jupyter projects rely.")
5115 (license license:bsd-3)))
5116
5117(define-public python2-jupyter-core
5118 (package-with-python2 python-jupyter-core))
5119
5120(define-public python-jupyter-client
5121 (package
5122 (name "python-jupyter-client")
5123 (version "5.2.4")
5124 (source
5125 (origin
5126 (method url-fetch)
5127 (uri (pypi-uri "jupyter_client" version))
5128 (sha256
5129 (base32
5130 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
5131 (build-system python-build-system)
5132 ;; Tests fail because of missing native python kernel which I assume is
5133 ;; provided by the ipython package, which we cannot use because it would
5134 ;; cause a dependency cycle.
ddc586ea
LC
5135 (arguments
5136 `(#:tests? #f
5137
5138 #:phases (modify-phases %standard-phases
5139 (add-after 'unpack 'set-tool-file-names
5140 (lambda* (#:key inputs #:allow-other-keys)
5141 (let ((iproute (assoc-ref inputs "iproute")))
5142 (substitute* "jupyter_client/localinterfaces.py"
5143 (("'ip'")
5144 (string-append "'" iproute "/sbin/ip'")))
5145 #t))))))
5146 (inputs
5147 `(("iproute" ,iproute)))
44d10b1f
RW
5148 (propagated-inputs
5149 `(("python-pyzmq" ,python-pyzmq)
5150 ("python-traitlets" ,python-traitlets)
5151 ("python-jupyter-core" ,python-jupyter-core)))
5152 (home-page "http://jupyter.org/")
5153 (synopsis "Jupyter protocol implementation and client libraries")
5154 (description
5155 "The @code{jupyter_client} package contains the reference implementation
5156of the Jupyter protocol. It also provides client and kernel management APIs
5157for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5158installing @code{kernelspec}s for use with Jupyter frontends.")
5159 (license license:bsd-3)))
5160
5161(define-public python2-jupyter-client
5162 (package-with-python2 python-jupyter-client))
5163
5164(define-public python-ipykernel
5165 (package
5166 (name "python-ipykernel")
82110dea 5167 (version "5.1.1")
44d10b1f
RW
5168 (source
5169 (origin
5170 (method url-fetch)
5171 (uri (pypi-uri "ipykernel" version))
5172 (sha256
82110dea 5173 (base32 "173nm29g85w8cac3fg40b27qaq26g41wgg6qn79ql1hq4w2n5sgh"))))
44d10b1f
RW
5174 (build-system python-build-system)
5175 (arguments
5176 `(#:phases
5177 (modify-phases %standard-phases
5178 (replace 'check
5179 (lambda _
5180 (setenv "HOME" "/tmp")
5181 (invoke "pytest" "-v")
aa856d02
LC
5182 #t))
5183 (add-after 'install 'set-python-file-name
5184 (lambda* (#:key outputs #:allow-other-keys)
5185 ;; Record the absolute file name of the 'python' executable in
5186 ;; 'kernel.json'.
5187 (let ((out (assoc-ref outputs "out")))
5188 (substitute* (string-append out "/share/jupyter"
5189 "/kernels/python3/kernel.json")
5190 (("\"python\"")
5191 (string-append "\"" (which "python") "\"")))
5192 #t))))))
44d10b1f
RW
5193 (propagated-inputs
5194 `(("python-ipython" ,python-ipython)
5195 ;; imported at runtime during connect
5196 ("python-jupyter-client" ,python-jupyter-client)))
5197 (native-inputs
5198 `(("python-pytest" ,python-pytest)
5199 ("python-nose" ,python-nose)))
5200 (home-page "https://ipython.org")
5201 (synopsis "IPython Kernel for Jupyter")
5202 (description
5203 "This package provides the IPython kernel for Jupyter.")
5204 (license license:bsd-3)))
5205
0f378947 5206;; Version 5.1.1 and above no longer support Python 2.
44d10b1f 5207(define-public python2-ipykernel
0f378947
RW
5208 (package
5209 (name "python2-ipykernel")
5210 (version "5.1.0")
5211 (source
5212 (origin
5213 (method url-fetch)
5214 (uri (pypi-uri "ipykernel" version))
5215 (sha256
5216 (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g"))))
5217 (build-system python-build-system)
5218 (arguments
5219 `(#:python ,python-2
5220 #:phases
5221 (modify-phases %standard-phases
5222 (replace 'check
5223 (lambda _
5224 (setenv "HOME" "/tmp")
5225 (invoke "pytest" "-v")
5226 #t)))))
5227 (propagated-inputs
5228 `(("python2-ipython" ,python2-ipython)
5229 ;; imported at runtime during connect
5230 ("python2-jupyter-client" ,python2-jupyter-client)))
5231 (native-inputs
5232 `(("python2-pytest" ,python2-pytest)
5233 ("python2-nose" ,python2-nose)))
5234 (home-page "https://ipython.org")
5235 (synopsis "IPython Kernel for Jupyter")
5236 (description
5237 "This package provides the IPython kernel for Jupyter.")
5238 (license license:bsd-3)))
44d10b1f 5239
966aa714
AE
5240(define-public python-pari-jupyter
5241 (package
5242 (name "python-pari-jupyter")
5243 (version "1.3.2")
5244 (source
5245 (origin
5246 (method url-fetch)
5247 (uri (pypi-uri "pari_jupyter" version))
5248 (sha256
5249 (base32
5250 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
5251 (build-system python-build-system)
5252 (propagated-inputs
5253 `(("python-ipykernel" ,python-ipykernel)))
5254 (inputs
5255 `(("pari-gp" ,pari-gp)
5256 ("readline" ,readline)))
5257 (arguments
5258 `(#:tests? #f)) ; no test suite
5259 (home-page
5260 "https://github.com/jdemeyer/pari_jupyter")
5261 (synopsis "A Jupyter kernel for PARI/GP")
5262 (description "The package provides a PARI/GP kernel for Jupyter.")
5263 (license license:gpl3+)))
5264
dede052a
RW
5265(define-public python-backcall
5266 (package
5267 (name "python-backcall")
5268 (version "0.1.0")
5269 (source
5270 (origin
5271 (method url-fetch)
5272 (uri (pypi-uri "backcall" version))
5273 (sha256
5274 (base32
5275 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
5276 (build-system python-build-system)
5277 (home-page "https://github.com/takluyver/backcall/")
5278 (synopsis "Specifications for callback functions passed in to an API")
5279 (description
5280 "If your code lets other people supply callback functions, it's important
5281to specify the function signature you expect, and check that functions support
5282that. Adding extra parameters later would break other peoples code unless
5283you're careful. The @code{backcall} package provides a way of specifying the
5284callback signature using a prototype function.")
5285 (license license:bsd-3)))
5286
44d10b1f
RW
5287;; This is the latest release of the LTS version of ipython with support for
5288;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
8b5f756c
RW
5289;; dropped support for Python 2.7.
5290(define-public python2-ipython
44d10b1f 5291 (package
8b5f756c 5292 (name "python2-ipython")
44d10b1f
RW
5293 (version "5.8.0")
5294 (source
5295 (origin
5296 (method url-fetch)
5297 (uri (pypi-uri "ipython" version ".tar.gz"))
5298 (sha256
5299 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
5300 (build-system python-build-system)
44d10b1f 5301 (propagated-inputs
8b5f756c
RW
5302 `(("python2-backports-shutil-get-terminal-size"
5303 ,python2-backports-shutil-get-terminal-size)
5304 ("python2-pathlib2" ,python2-pathlib2)
5305 ("python2-pyzmq" ,python2-pyzmq)
5306 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
5307 ("python2-terminado" ,python2-terminado)
5308 ("python2-matplotlib" ,python2-matplotlib)
5309 ("python2-numpy" ,python2-numpy)
5310 ("python2-numpydoc" ,python2-numpydoc)
5311 ("python2-jinja2" ,python2-jinja2)
5312 ("python2-mistune" ,python2-mistune)
5313 ("python2-pexpect" ,python2-pexpect)
5314 ("python2-pickleshare" ,python2-pickleshare)
5315 ("python2-simplegeneric" ,python2-simplegeneric)
5316 ("python2-jsonschema" ,python2-jsonschema)
5317 ("python2-traitlets" ,python2-traitlets)
5318 ("python2-nbformat" ,python2-nbformat)
5319 ("python2-pygments" ,python2-pygments)))
5320 (inputs
5321 `(("readline" ,readline)
5322 ("which" ,which)))
5323 (native-inputs
5324 `(("graphviz" ,graphviz)
5325 ("pkg-config" ,pkg-config)
5326 ("python2-requests" ,python2-requests) ;; for tests
5327 ("python2-testpath" ,python2-testpath)
5328 ("python2-mock" ,python2-mock)
5329 ("python2-nose" ,python2-nose)))
5330 (arguments
5331 `(#:python ,python-2
5332 #:phases
5333 (modify-phases %standard-phases
5334 (add-before 'check 'delete-broken-tests
5335 (lambda* (#:key inputs #:allow-other-keys)
5336 ;; These tests throw errors for unknown reasons.
5337 (delete-file "IPython/core/tests/test_profile.py")
5338 (delete-file "IPython/core/tests/test_interactiveshell.py")
5339 (delete-file "IPython/core/tests/test_magic.py")
5340 #t)))))
5341 (home-page "https://ipython.org")
5342 (synopsis "IPython is a tool for interactive computing in Python")
5343 (description
5344 "IPython provides a rich architecture for interactive computing with:
5345Powerful interactive shells, a browser-based notebook, support for interactive
5346data visualization, embeddable interpreters and tools for parallel
5347computing.")
5348 (license license:bsd-3)))
5349
5350(define-public python-ipython
5351 (package
5352 (name "python-ipython")
5353 (version "7.5.0")
5354 (source
5355 (origin
5356 (method url-fetch)
5357 (uri (pypi-uri "ipython" version ".tar.gz"))
5358 (sha256
5359 (base32 "09mbxq37mfn88xjnib7qfzaq9krr7gf1jxwy1p6mcjr254082h78"))))
5360 (build-system python-build-system)
5361 (propagated-inputs
5362 `(("python-backcall" ,python-backcall)
5363 ("python-pyzmq" ,python-pyzmq)
5364 ("python-prompt-toolkit" ,python-prompt-toolkit)
44d10b1f
RW
5365 ("python-terminado" ,python-terminado)
5366 ("python-matplotlib" ,python-matplotlib)
5367 ("python-numpy" ,python-numpy)
5368 ("python-numpydoc" ,python-numpydoc)
8b5f756c 5369 ("python-jedi" ,python-jedi)
44d10b1f
RW
5370 ("python-jinja2" ,python-jinja2)
5371 ("python-mistune" ,python-mistune)
5372 ("python-pexpect" ,python-pexpect)
5373 ("python-pickleshare" ,python-pickleshare)
5374 ("python-simplegeneric" ,python-simplegeneric)
5375 ("python-jsonschema" ,python-jsonschema)
5376 ("python-traitlets" ,python-traitlets)
5377 ("python-nbformat" ,python-nbformat)
5378 ("python-pygments" ,python-pygments)))
5379 (inputs
5380 `(("readline" ,readline)
5381 ("which" ,which)))
5382 (native-inputs
5383 `(("graphviz" ,graphviz)
5384 ("pkg-config" ,pkg-config)
5385 ("python-requests" ,python-requests) ;; for tests
5386 ("python-testpath" ,python-testpath)
8b5f756c 5387 ("python-nose" ,python-nose)))
44d10b1f
RW
5388 (arguments
5389 `(#:phases
5390 (modify-phases %standard-phases
44d10b1f
RW
5391 ;; Tests can only be run after the library has been installed and not
5392 ;; within the source directory.
5393 (delete 'check)
5394 (add-after 'install 'check
5395 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5396 (if tests?
5397 (begin
5398 ;; Make installed package available for running the tests
5399 (add-installed-pythonpath inputs outputs)
5400 (setenv "HOME" "/tmp/") ;; required by a test
5401 ;; We only test the core because one of the other tests
5402 ;; tries to import ipykernel.
5403 (invoke "python" "IPython/testing/iptest.py"
5404 "-v" "IPython/core/tests"))
5405 #t)))
5406 (add-before 'check 'fix-tests
5407 (lambda* (#:key inputs #:allow-other-keys)
5408 (substitute* "./IPython/utils/_process_posix.py"
5409 (("/usr/bin/env', 'which") (which "which")))
5410 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5411 (("#!/usr/bin/env python")
5412 (string-append "#!" (which "python"))))
44d10b1f
RW
5413 ;; This test introduces a circular dependency on ipykernel
5414 ;; (which depends on ipython).
5415 (delete-file "IPython/core/tests/test_display.py")
8b5f756c 5416 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
44d10b1f 5417 (delete-file "IPython/core/tests/test_interactiveshell.py")
44d10b1f
RW
5418 #t)))))
5419 (home-page "https://ipython.org")
5420 (synopsis "IPython is a tool for interactive computing in Python")
5421 (description
5422 "IPython provides a rich architecture for interactive computing with:
5423Powerful interactive shells, a browser-based notebook, support for interactive
5424data visualization, embeddable interpreters and tools for parallel
5425computing.")
8b5f756c 5426 (license license:bsd-3)))
44d10b1f 5427
8b5f756c
RW
5428(define-public python-ipython-documentation
5429 (package
5430 (inherit python-ipython)
5431 (name "python-ipython-documentation")
5432 (version (package-version python-ipython))
5433 (arguments
5434 `(#:phases
5435 (modify-phases %standard-phases
5436 (delete 'build)
5437 (delete 'check)
5438 (replace 'install
5439 (lambda* (#:key outputs #:allow-other-keys)
5440 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5441 (doc (string-append data "/doc/" ,name "-" ,version))
5442 (html (string-append doc "/html"))
5443 (man1 (string-append data "/man/man1"))
5444 (info (string-append data "/info"))
5445 (examples (string-append doc "/examples"))
5446 (python-arg (string-append "PYTHON=" (which "python"))))
5447 (setenv "LANG" "en_US.utf8")
5448 (with-directory-excursion "docs"
5449 ;; FIXME: pdf fails to build
5450 ;;(system* "make" "pdf" "PAPER=a4")
5451 (system* "make" python-arg "html")
5452 ;; FIXME: the generated texi file contains ^@^@, which trips
5453 ;; up the parser.
5454 ;; (system* "make" python-arg "info")
5455 )
5456 (copy-recursively "docs/man" man1)
5457 (copy-recursively "examples" examples)
5458 (copy-recursively "docs/build/html" html)
5459 ;; (copy-file "docs/build/latex/ipython.pdf"
5460 ;; (string-append doc "/ipython.pdf"))
5461 (mkdir-p info)
5462 ;; (copy-file "docs/build/texinfo/ipython.info"
5463 ;; (string-append info "/ipython.info"))
5464 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
5465 #t)))))
5466 (inputs
5467 `(("python-ipython" ,python-ipython)
5468 ("python-ipykernel" ,python-ipykernel)))
5469 (native-inputs
5470 `(("python-sphinx" ,python-sphinx)
5471 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
5472 ;; FIXME: It's possible that a smaller union would work just as well.
f75aa97f 5473 ("texlive" ,(texlive-union (list texlive-amsfonts
8b5f756c
RW
5474 texlive-fonts-ec
5475 texlive-generic-ifxetex
5476 texlive-generic-pdftex
8b5f756c
RW
5477 texlive-latex-capt-of
5478 texlive-latex-cmap
5479 texlive-latex-environ
5480 texlive-latex-eqparbox
5481 texlive-latex-etoolbox
5482 texlive-latex-expdlist
5483 texlive-latex-fancyhdr
5484 texlive-latex-fancyvrb
5485 texlive-latex-fncychap
5486 texlive-latex-float
5487 texlive-latex-framed
5488 texlive-latex-geometry
5489 texlive-latex-graphics
5490 texlive-latex-hyperref
5491 texlive-latex-mdwtools
5492 texlive-latex-multirow
5493 texlive-latex-needspace
5494 texlive-latex-oberdiek
5495 texlive-latex-parskip
5496 texlive-latex-preview
5497 texlive-latex-tabulary
5498 texlive-latex-threeparttable
5499 texlive-latex-titlesec
5500 texlive-latex-trimspaces
5501 texlive-latex-ucs
5502 texlive-latex-upquote
5503 texlive-latex-url
5504 texlive-latex-varwidth
5505 texlive-latex-wrapfig)))
5506 ("texinfo" ,texinfo)))))
44d10b1f
RW
5507
5508(define-public python-urwid
5509 (package
5510 (name "python-urwid")
5511 (version "2.0.1")
5512 (source
5513 (origin
5514 (method url-fetch)
5515 (uri (pypi-uri "urwid" version))
5516 (sha256
5517 (base32
5518 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
5519 (build-system python-build-system)
5520 (home-page "http://urwid.org")
5521 (synopsis "Console user interface library for Python")
5522 (description
5523 "Urwid is a curses-based UI/widget library for Python. It includes many
5524features useful for text console applications.")
5525 (license license:lgpl2.1+)))
5526
5527(define-public python2-urwid
5528 (package-with-python2 python-urwid))
5529
5530(define-public python-urwidtrees
5531 (package
5532 (name "python-urwidtrees")
5533 (version "1.0.2")
5534 (source
5535 (origin
5536 (method url-fetch)
5537 ;; package author intends on distributing via github rather than pypi:
5538 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5539 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5540 version ".tar.gz"))
5541 (file-name (string-append name "-" version ".tar.gz"))
5542 (sha256
5543 (base32
5544 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
5545 (build-system python-build-system)
5546 (arguments
5547 '(#:tests? #f)) ; no tests
5548 (propagated-inputs `(("python-urwid" ,python-urwid)))
5549 (home-page "https://github.com/pazz/urwidtrees")
5550 (synopsis "Tree widgets for urwid")
5551 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5552toolkit. Use it to build trees of widgets.")
5553 (license license:gpl3+)))
5554
5555(define-public python2-urwidtrees
5556 (package-with-python2 python-urwidtrees))
5557
5558(define-public python-ua-parser
5559 (package
5560 (name "python-ua-parser")
5561 (version "0.8.0")
5562 (source
5563 (origin
5564 (method url-fetch)
5565 (uri (pypi-uri "ua-parser" version))
5566 (sha256
5567 (base32
5568 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
5569 (build-system python-build-system)
5570 (arguments
5571 `(#:tests? #f)) ;no test suite in release
5572 (native-inputs
5573 `(("python-pyyaml" ,python-pyyaml)))
5574 (home-page "https://github.com/ua-parser/uap-python")
5575 (synopsis "User agent parser")
5576 (description
5577 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
5578 (license license:asl2.0)))
5579
5580(define-public python2-ua-parser
5581 (package-with-python2 python-ua-parser))
5582
5583(define-public python-user-agents
5584 (package
5585 (name "python-user-agents")
5586 (version "1.1.0")
5587 (source
5588 (origin
5589 (method url-fetch)
5590 (uri (pypi-uri "user-agents" version))
5591 (sha256
5592 (base32
5593 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
5594 (build-system python-build-system)
5595 (arguments
5596 `(#:tests? #f)) ;missing devices.json test file in release
5597 (propagated-inputs
5598 `(("python-ua-parser" ,python-ua-parser)))
5599 (home-page "https://github.com/selwin/python-user-agents")
5600 (synopsis "User Agent strings parsing library")
5601 (description
5602 "A library to identify devices (phones, tablets) and their capabilities by
5603parsing (browser/HTTP) user agent strings.")
5604 (license license:expat)))
5605
5606(define-public python2-user-agents
5607 (package-with-python2 python-user-agents))
5608
5609(define-public python-dbus
5610 (package
5611 (name "python-dbus")
5612 (version "1.2.8")
5613 (source
5614 (origin
5615 (method url-fetch)
5616 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
5617 "dbus-python-" version ".tar.gz"))
5618 (sha256
5619 (base32
5620 "0vvvjmiwnc9cjlks3gcdk43ap7llhlpz7cm1wbw0nc2yfsxjpwdb"))))
5621 (build-system gnu-build-system)
5622 (arguments
5623 '(#:phases
5624 (modify-phases %standard-phases
5625 (add-before
5626 'check 'pre-check
5627 (lambda _
5628 ;; XXX: For the missing '/etc/machine-id'.
5629 (substitute* "test/run-test.sh"
5630 (("DBUS_FATAL_WARNINGS=1")
5631 "DBUS_FATAL_WARNINGS=0"))
5632 #t)))))
5633 (native-inputs
5634 `(("pkg-config" ,pkg-config)))
5635 (inputs
5636 `(("python" ,python-wrapper)
5637 ("dbus-glib" ,dbus-glib)))
5638 (synopsis "Python bindings for D-bus")
5639 (description "python-dbus provides bindings for libdbus, the reference
5640implementation of D-Bus.")
5641 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
5642 (license license:expat)))
5643
5644(define-public python2-dbus
5645 (package (inherit python-dbus)
5646 (name "python2-dbus")
5647 (inputs `(("python" ,python-2)
5648 ,@(alist-delete "python"
5649 (package-inputs python-dbus)
5650 equal?)))
5651 ;; FIXME: on Python 2, the test_utf8 fails with:
5652 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5653 (arguments `(#:tests? #f))))
5654
fb236fdd
AG
5655(define-public python-notify2
5656 (package
5657 (name "python-notify2")
5658 (version "0.3.1")
5659 (source
5660 (origin
5661 (method url-fetch)
5662 (uri (pypi-uri "notify2" version))
5663 (sha256
5664 (base32
5665 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
5666 (build-system python-build-system)
5667 (arguments `(#:tests? #f)) ; tests depend on system state
5668 (native-inputs
5669 `(("python-dbus" ,python-dbus)))
5670 (home-page "https://bitbucket.org/takluyver/pynotify2")
5671 (synopsis "Python interface to D-Bus notifications")
5672 (description
5673 "Pynotify2 provides a Python interface for sending D-Bus notifications.
5674It is a reimplementation of pynotify in pure Python, and an alternative to
5675the GObject Introspection bindings to libnotify for non-GTK applications.")
5676 (license (list license:bsd-2
5677 license:lgpl2.1+))))
5678
5679(define-public python2-notify2
5680 (package-with-python2 python-notify2))
5681
44d10b1f
RW
5682(define-public python-lxml
5683 (package
5684 (name "python-lxml")
5685 (version "4.2.5")
5686 (source
5687 (origin
5688 (method url-fetch)
5689 (uri (pypi-uri "lxml" version))
5690 (sha256
5691 (base32
5692 "0zw0y9hs0nflxhl9cs6ipwwh53szi3w2x06wl0k9cylyqac0cwin"))))
5693 (build-system python-build-system)
5694 (inputs
5695 `(("libxml2" ,libxml2)
5696 ("libxslt" ,libxslt)))
5697 (home-page "http://lxml.de/")
5698 (synopsis
5699 "Python XML processing library")
5700 (description
5701 "The lxml XML toolkit is a Pythonic binding for the C libraries
5702libxml2 and libxslt.")
5703 (license license:bsd-3))) ; and a few more, see LICENSES.txt
5704
5705(define-public python2-lxml
5706 (package-with-python2 python-lxml))
5707
5708;; beautifulsoup4 has a totally different namespace than 3.x,
5709;; and pypi seems to put it under its own name, so I guess we should too
5710(define-public python-beautifulsoup4
5711 (package
5712 (name "python-beautifulsoup4")
abb53e6f 5713 (version "4.7.1")
44d10b1f
RW
5714 (source
5715 (origin
5716 (method url-fetch)
5717 (uri (pypi-uri "beautifulsoup4" version))
5718 (sha256
5719 (base32
abb53e6f 5720 "0j2kycz2dxgx68xzjm7rxg5xn6v61gq5ifvxyg99slmqkybnal4l"))))
44d10b1f
RW
5721 (build-system python-build-system)
5722 (arguments
5723 `(#:phases
5724 (modify-phases %standard-phases
5725 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5726 ;; must use this conversion script when building with Python 3. The
5727 ;; conversion script also runs the tests.
5728 ;; For more information, see the file 'convert-py3k' in the source
5729 ;; distribution.
5730 (replace 'check
dff0197e 5731 (lambda _ (invoke "./convert-py3k"))))))
f83e10e4 5732 (propagated-inputs
abb53e6f 5733 `(("python-soupsieve" ,python-soupsieve)))
44d10b1f
RW
5734 (home-page
5735 "https://www.crummy.com/software/BeautifulSoup/bs4/")
5736 (synopsis
5737 "Python screen-scraping library")
5738 (description
5739 "Beautiful Soup is a Python library designed for rapidly setting up
5740screen-scraping projects. It offers Pythonic idioms for navigating,
5741searching, and modifying a parse tree, providing a toolkit for
5742dissecting a document and extracting what you need. It automatically
5743converts incoming documents to Unicode and outgoing documents to UTF-8.")
5744 (license license:expat)
5745 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5746
5747(define-public python2-beautifulsoup4
5748 (package
5749 (inherit (package-with-python2
5750 (strip-python2-variant python-beautifulsoup4)))
5751 (arguments `(#:python ,python-2))))
5752
ad74978a
BT
5753(define-public python-soupsieve
5754 (package
5755 (name "python-soupsieve")
e9cb6edd 5756 (version "1.9.2")
ad74978a
BT
5757 (source
5758 (origin
5759 (method url-fetch)
5760 (uri (pypi-uri "soupsieve" version))
5761 (sha256
5762 (base32
e9cb6edd 5763 "0in9rc9q3h8w5b4qf7kvl3qxcvw6vrz35ckblchgf70hm6pg3dbj"))))
ad74978a
BT
5764 (build-system python-build-system)
5765 (arguments `(#:tests? #f))
5766 ;;XXX: 2 tests fail currently despite claming they were to be
5767 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
5768 ;;don't want to create a circular dependency.
5769 (home-page "https://github.com/facelessuser/soupsieve")
5770 (synopsis "CSS selector library")
5771 (description
5772 "Soup Sieve is a CSS selector library designed to be used with Beautiful
5773Soup 4. It aims to provide selecting, matching, and filtering using modern
5774CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
5775specifications up through the latest CSS level 4 drafts and beyond (though
5776some are not yet implemented).")
d00b83fb 5777 (properties `((python2-variant . ,(delay python2-soupsieve))))
ad74978a
BT
5778 (license license:expat)))
5779
5780(define-public python2-soupsieve
d00b83fb 5781 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
ad74978a
BT
5782 (package
5783 (inherit base)
5784 (propagated-inputs
d00b83fb
MB
5785 `(("python2-backports-functools-lru-cache"
5786 ,python2-backports-functools-lru-cache)
5787 ,@(package-propagated-inputs base))))))
ad74978a 5788
44d10b1f
RW
5789(define-public python-netifaces
5790 (package
5791 (name "python-netifaces")
5792 (version "0.10.7")
5793 (source
5794 (origin
5795 (method url-fetch)
5796 (uri (pypi-uri "netifaces" version))
5797 (sha256
5798 (base32
5799 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
5800 (build-system python-build-system)
5801 (home-page "https://github.com/al45tair/netifaces")
5802 (synopsis
5803 "Python module for portable network interface information")
5804 (description
5805 "Netifaces is a Python module providing information on network
5806interfaces in an easy and portable manner.")
5807 (license license:expat)))
5808
5809(define-public python2-netifaces
5810 (package-with-python2 python-netifaces))
5811
5812(define-public python-networkx
5813 (package
5814 (name "python-networkx")
5815 (version "2.2")
5816 (source
5817 (origin
5818 (method url-fetch)
5819 (uri (pypi-uri "networkx" version ".zip"))
5820 (sha256
5821 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
5822 (build-system python-build-system)
5823 ;; python-decorator is needed at runtime.
5824 (propagated-inputs
5825 `(("python-decorator" ,python-decorator)))
5826 (native-inputs
5827 `(("python-nose" ,python-nose)
5828 ("unzip" ,unzip)))
5829 (home-page "https://networkx.github.io/")
5830 (synopsis "Python module for creating and manipulating graphs and networks")
5831 (description
5832 "NetworkX is a Python package for the creation, manipulation, and study
5833of the structure, dynamics, and functions of complex networks.")
5834 (license license:bsd-3)))
5835
5836(define-public python2-networkx
5837 (package-with-python2 python-networkx))
5838
5839(define-public python-datrie
5840 (package
5841 (name "python-datrie")
5842 (version "0.7.1")
5843 (source
5844 (origin
5845 (method url-fetch)
5846 (uri (pypi-uri "datrie" version))
5847 (sha256
5848 (base32
5849 "08r0if7dry2q7p34gf7ffyrlnf4bdvnprxgydlfxgfnvq8f3f4bs"))))
5850 (build-system python-build-system)
5851 (arguments
5852 `(#:phases (modify-phases %standard-phases
5853 (add-before 'build 'cythonize
5854 (lambda _
5855 ;; Regenerate Cython classes to solve ABI issues with Python
5856 ;; 3.7.0. See <https://github.com/pytries/datrie/issues/52>.
5857 (invoke "cython" "src/datrie.pyx" "src/cdatrie.pxd"
5858 "src/stdio_ext.pxd" "-a"))))))
5859 (native-inputs
5860 `(("python-cython" ,python-cython)
5861 ("python-hypothesis" ,python-hypothesis)
5862 ("python-pytest" ,python-pytest)
5863 ("python-pytest-runner" ,python-pytest-runner)))
5864 (home-page "https://github.com/kmike/datrie")
5865 (synopsis "Fast, efficiently stored trie for Python")
5866 (description
5867 "This package provides a fast, efficiently stored trie implementation for
5868Python.")
5869 (license license:lgpl2.1+)))
5870
5871(define-public snakemake
5872 (package
5873 (name "snakemake")
5874 (version "5.2.4")
5875 (source
5876 (origin
5877 (method url-fetch)
5878 (uri (pypi-uri "snakemake" version))
5879 (sha256
5880 (base32 "0gj0xxgiq3mp9qyyrbfzldiaq1giliqw0in64nqiz7vx49myqj7z"))))
5881 (build-system python-build-system)
5882 (arguments
5883 ;; TODO: Package missing test dependencies.
5884 '(#:tests? #f
5885 #:phases
5886 (modify-phases %standard-phases
5887 ;; For cluster execution Snakemake will call Python. Since there is
5888 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
5889 ;; this by calling the snakemake wrapper instead.
5890 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
5891 (lambda* (#:key outputs #:allow-other-keys)
5892 (substitute* "snakemake/executors.py"
5893 (("\\{sys.executable\\} -m snakemake")
5894 (string-append (assoc-ref outputs "out")
5895 "/bin/snakemake")))
5896 #t)))))
5897 (propagated-inputs
5898 `(("python-gitpython" ,python-gitpython)
5899 ("python-wrapt" ,python-wrapt)
5900 ("python-requests" ,python-requests)
5901 ("python-appdirs" ,python-appdirs)
5902 ("python-configargparse" ,python-configargparse)
5903 ("python-datrie" ,python-datrie)
5904 ("python-docutils" ,python-docutils)
5905 ("python-jinja2" ,python-jinja2)
5906 ("python-jsonschema" ,python-jsonschema)
5907 ("python-networkx" ,python-networkx)
5908 ("python-pyyaml" ,python-pyyaml)
5909 ("python-ratelimiter" ,python-ratelimiter)))
5910 (home-page "https://snakemake.readthedocs.io")
5911 (synopsis "Python-based execution environment for make-like workflows")
5912 (description
5913 "Snakemake aims to reduce the complexity of creating workflows by
5914providing a clean and modern domain specific specification language (DSL) in
5915Python style, together with a fast and comfortable execution environment.")
5916 (license license:expat)))
5917
5918;; This is currently needed for the pigx-* packages.
5919(define-public snakemake-4
5920 (package (inherit snakemake)
5921 (version "4.4.0")
5922 (source
5923 (origin
5924 (method url-fetch)
5925 (uri (pypi-uri "snakemake" version))
5926 (sha256
5927 (base32 "0g0paia4z7w3srnqdmavq3hrb2x7qnpf81jx50njl0p7y4y0j8jv"))))
5928 (propagated-inputs
5929 `(("python-wrapt" ,python-wrapt)
5930 ("python-requests" ,python-requests)
5931 ("python-appdirs" ,python-appdirs)
5932 ("python-configargparse" ,python-configargparse)
5933 ("python-pyyaml" ,python-pyyaml)
5934 ("python-ratelimiter" ,python-ratelimiter)))))
5935
5936(define-public python-pyqrcode
5937 (package
5938 (name "python-pyqrcode")
5939 (version "1.2.1")
5940 (source
5941 (origin
5942 (method url-fetch)
5943 (uri (pypi-uri "PyQRCode" version))
5944 (sha256
5945 (base32
5946 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
5947 (build-system python-build-system)
5948 (home-page
5949 "https://github.com/mnooner256/pyqrcode")
5950 (synopsis "QR code generator")
5951 (description
5952 "Pyqrcode is a QR code generator written purely in Python with
5953SVG, EPS, PNG and terminal output.")
5954 (license license:bsd-3)))
5955
5956(define-public python-seaborn
5957 (package
5958 (name "python-seaborn")
5959 (version "0.9.0")
5960 (source
5961 (origin
5962 (method url-fetch)
5963 (uri (pypi-uri "seaborn" version))
5964 (sha256
5965 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))))
5966 (build-system python-build-system)
5967 (arguments
5968 `(#:phases
5969 (modify-phases %standard-phases
5970 (add-before 'check 'start-xserver
5971 (lambda* (#:key inputs #:allow-other-keys)
5972 (let ((xorg-server (assoc-ref inputs "xorg-server")))
5973 ;; There must be a running X server and make check doesn't
5974 ;; start one. Therefore we must do it.
5975 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
5976 (setenv "DISPLAY" ":1")
5977 #t)))
5978 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
5979 (propagated-inputs
5980 `(("python-pandas" ,python-pandas)
5981 ("python-matplotlib" ,python-matplotlib)
5982 ("python-numpy" ,python-numpy)
5983 ("python-scipy" ,python-scipy)))
5984 (native-inputs
5985 `(("python-pytest" ,python-pytest)
5986 ("xorg-server" ,xorg-server)))
5987 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5988 (synopsis "Statistical data visualization")
5989 (description
5990 "Seaborn is a library for making attractive and informative statistical
5991graphics in Python. It is built on top of matplotlib and tightly integrated
5992with the PyData stack, including support for numpy and pandas data structures
5993and statistical routines from scipy and statsmodels.")
5994 (license license:bsd-3)))
5995
5996(define-public python2-seaborn
5997 (package-with-python2 python-seaborn))
5998
5999(define-public python-mpmath
6000 (package
6001 (name "python-mpmath")
6002 (version "0.19")
6003 (source (origin
6004 (method url-fetch)
6005 (uri (string-append "http://mpmath.org/files/mpmath-"
6006 version ".tar.gz"))
6007 (sha256
6008 (base32
6009 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
6010 (build-system python-build-system)
6011 (arguments
6012 '(#:phases
6013 (modify-phases %standard-phases
6014 (replace 'check
6015 (lambda _
5d7a6f1c 6016 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
44d10b1f
RW
6017 (home-page "http://mpmath.org")
6018 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6019 (description
6020 "@code{mpmath} can be used as an arbitrary-precision substitute for
6021Python's float/complex types and math/cmath modules, but also does much
6022more advanced mathematics.")
6023 (license license:bsd-3)))
6024
6025(define-public python2-mpmath
6026 (package-with-python2 python-mpmath))
6027
6028(define-public python-bigfloat
6029 (package
6030 (name "python-bigfloat")
6031 (version "0.3.0")
6032 (source
6033 (origin
6034 (method url-fetch)
6035 (uri (pypi-uri "bigfloat" version))
6036 (sha256
6037 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
6038 (build-system python-build-system)
6039 (inputs
6040 `(("mpfr" ,mpfr)))
6041 (home-page "https://github.com/mdickinson/bigfloat")
6042 (synopsis "Arbitrary precision floating-point arithmetic for Python")
6043 (description
e36de31b 6044 "This package provides a Python interface to the MPFR library for
44d10b1f
RW
6045multiprecision arithmetic.")
6046 (license license:lgpl3+)))
6047
6048(define-public python2-bigfloat
6049 (package-with-python2 python-bigfloat))
6050
6051(define-public python-sympy
6052 (package
6053 (name "python-sympy")
6054 (version "1.1.1")
6055 (source
6056 (origin
6057 (method url-fetch)
6058 (uri (string-append
6059 "https://github.com/sympy/sympy/releases/download/sympy-"
6060 version "/sympy-" version ".tar.gz"))
6061 (sha256
6062 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
6063 (build-system python-build-system)
6064 (arguments
6065 `(#:phases
6066 (modify-phases %standard-phases
6067 ;; Run the core tests after installation. By default it would run
6068 ;; *all* tests, which take a very long time to complete and are known
6069 ;; to be flaky.
6070 (delete 'check)
6071 (add-after 'install 'check
6072 (lambda* (#:key outputs #:allow-other-keys)
6073 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
6074 #t)))))
6075 (propagated-inputs
6076 `(("python-mpmath" ,python-mpmath)))
6077 (home-page "http://www.sympy.org/")
6078 (synopsis "Python library for symbolic mathematics")
6079 (description
6080 "SymPy is a Python library for symbolic mathematics. It aims to become a
6081full-featured computer algebra system (CAS) while keeping the code as simple
6082as possible in order to be comprehensible and easily extensible.")
6083 (license license:bsd-3)))
6084
6085(define-public python2-sympy
6086 (package
6087 (inherit (package-with-python2 python-sympy))
6088 (arguments
6089 `(#:phases
6090 (modify-phases %standard-phases
6091 ;; Run the core tests after installation. By default it would run
6092 ;; *all* tests, which take a very long time to complete and are known
6093 ;; to be flaky.
6094 (delete 'check)
6095 (add-after 'install 'check
6096 (lambda* (#:key outputs #:allow-other-keys)
6097 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
6098 #t)))))))
6099
6100(define-public python-q
6101 (package
6102 (name "python-q")
6103 (version "2.6")
6104 (source
6105 (origin
6106 (method url-fetch)
6107 (uri (pypi-uri "q" version))
6108 (sha256
6109 (base32
6110 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6111 (build-system python-build-system)
6112 (home-page "https://github.com/zestyping/q")
6113 (synopsis "Quick-and-dirty debugging output for tired programmers")
6114 (description
6115 "q is a Python module for \"print\" style of debugging Python code. It
6116provides convenient short API for print out of values, tracebacks, and
6117falling into the Python interpreter.")
6118 (license license:asl2.0)))
6119
6120(define-public python2-q
6121 (package-with-python2 python-q))
6122
6123(define-public python2-xlib
6124 (package
6125 (name "python2-xlib")
6126 (version "0.14")
6127 (source (origin
6128 (method url-fetch)
6129 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6130 "/" version "/"
6131 "python-xlib-" version ".tar.gz"))
6132 (sha256
6133 (base32
6134 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6135 (build-system python-build-system)
6136 (arguments
6137 `(#:python ,python-2 ;Python 2 only
6138 #:tests? #f)) ;no tests
6139 (home-page "http://python-xlib.sourceforge.net/")
6140 (synopsis "Python X11 client library")
6141 (description
6142 "The Python X Library is intended to be a fully functional X client
6143library for Python programs. It is useful to implement low-level X clients.
6144It is written entirely in Python.")
6145 (license license:gpl2+)))
6146
6147(define-public python-singledispatch
6148 (package
6149 (name "python-singledispatch")
6150 (version "3.4.0.3")
6151 (source
6152 (origin
6153 (method url-fetch)
6154 (uri (pypi-uri "singledispatch" version))
6155 (sha256
6156 (base32
6157 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6158 (build-system python-build-system)
6159 (native-inputs
6160 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6161 (home-page
6162 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
6163 (synopsis "Backport of singledispatch feature from Python 3.4")
6164 (description
6165 "This library brings functools.singledispatch from Python 3.4 to Python
61662.6-3.3.")
6167 (license license:expat)))
6168
6169(define-public python2-singledispatch
6170 (package-with-python2 python-singledispatch))
6171
6172;; the python- version can be removed with python-3.5
6173(define-public python-backports-abc
6174 (package
6175 (name "python-backports-abc")
6176 (version "0.5")
6177 (source
6178 (origin
6179 (method url-fetch)
6180 (uri (pypi-uri "backports_abc" version))
6181 (sha256
6182 (base32
6183 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6184 (build-system python-build-system)
6185 (home-page "https://github.com/cython/backports_abc")
6186 (synopsis "Backport of additions to the 'collections.abc' module")
6187 (description
6188 "Python-backports-abc provides a backport of additions to the
36a4366d 6189@code{collections.abc} module in Python-3.5.")
44d10b1f
RW
6190 (license license:psfl)))
6191
6192(define-public python2-backports-abc
6193 (package-with-python2 python-backports-abc))
6194
6195(define-public python-backports-csv
6196 (package
6197 (name "python-backports-csv")
6198 (version "1.0.5")
6199 (source
6200 (origin
6201 (method url-fetch)
6202 (uri (pypi-uri "backports.csv" version))
6203 (sha256
6204 (base32
6205 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
6206 (build-system python-build-system)
6207 (home-page "https://github.com/ryanhiebert/backports.csv")
6208 (synopsis "Backport of Python 3's csv module for Python 2")
6209 (description
6210 "Provides a backport of Python 3's @code{csv} module for parsing
6211comma separated values. The API of the @code{csv} module in Python 2
6212is drastically different from the @code{csv} module in Python 3.
6213This is due, for the most part, to the difference between str in
6214Python 2 and Python 3.")
6215 (license license:psfl)))
6216
6217(define-public python2-backports-csv
6218 (package-with-python2 python-backports-csv))
6219
6220(define-public python2-backports-shutil-get-terminal-size
6221 (package
6222 (name "python2-backports-shutil-get-terminal-size")
6223 (version "1.0.0")
6224 (source
6225 (origin
6226 (method url-fetch)
6227 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6228 (sha256
6229 (base32
6230 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6231 (build-system python-build-system)
6232 (arguments
6233 `(#:python ,python-2
6234 #:phases
6235 (modify-phases %standard-phases
6236 (replace 'check
6237 (lambda _
4a4a7d9a 6238 (invoke "py.test" "-v"))))))
44d10b1f
RW
6239 (native-inputs
6240 `(("python2-pytest" ,python2-pytest)))
6241 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6242 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6243 (description
6244 "This package provides a backport of the @code{get_terminal_size
6245function} from Python 3.3's @code{shutil}.
6246Unlike the original version it is written in pure Python rather than C,
6247so it might be a tiny bit slower.")
6248 (license license:expat)))
6249
6250(define-public python-waf
6251 (package
6252 (name "python-waf")
6253 (version "2.0.11")
6254 (source (origin
6255 (method url-fetch)
6256 (uri (string-append "https://waf.io/"
6257 "waf-" version ".tar.bz2"))
6258 (sha256
6259 (base32
6260 "13zrniwkmfqgsgzi9v5m1367fppp9yzrz6z2ny6hy8dmpb8mj4z4"))))
6261 (build-system python-build-system)
6262 (arguments
6263 '(#:phases
6264 (modify-phases %standard-phases
6265 (replace 'build
6266 (lambda _
6267 (invoke "python" "waf-light" "configure" "build")))
6268 (replace 'check
6269 (lambda _
6270 (invoke "python" "waf" "--version")))
6271 (replace 'install
6272 (lambda* (#:key outputs #:allow-other-keys)
6273 (let ((out (assoc-ref outputs "out")))
6274 (install-file "waf" (string-append out "/bin")))
6275 #t))
6276 ;; waf breaks when it is wrapped.
6277 (delete 'wrap))))
6278 (home-page "https://waf.io/")
6279 (synopsis "Python-based build system")
6280 (description
6281 "Waf is a Python-based framework for configuring, compiling and installing
6282applications.")
6283 (license license:bsd-3)))
6284
6285(define-public python2-waf
6286 (package-with-python2 python-waf))
6287
6288(define-public python-pyzmq
6289 (package
6290 (name "python-pyzmq")
6291 (version "17.1.2")
6292 (source
6293 (origin
6294 (method url-fetch)
6295 (uri (pypi-uri "pyzmq" version))
6296 (sha256
6297 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
6298 (build-system python-build-system)
6299 (arguments
6300 `(#:configure-flags
6301 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6302 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6303 ;; --inplace' for 'python setup.py test' to work.
6304 #:tests? #f))
6305 (inputs
6306 `(("zeromq" ,zeromq)))
6307 (native-inputs
6308 `(("pkg-config" ,pkg-config)
6309 ("python-nose" ,python-nose)))
6310 (home-page "https://github.com/zeromq/pyzmq")
6311 (synopsis "Python bindings for 0MQ")
6312 (description
6313 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6314 (license license:bsd-4)))
6315
6316(define-public python2-pyzmq
6317 (package-with-python2 python-pyzmq))
6318
6319(define-public python-pep8
6320 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
6321 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
6322 ;; some dependents' test suites, and nothing more.
6323 (package
6324 (name "python-pep8")
6325 (version "1.7.0")
6326 (source
6327 (origin
6328 (method url-fetch)
6329 (uri (pypi-uri "pep8" version))
6330 (sha256
6331 (base32
6332 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
6333 (build-system python-build-system)
6334 (home-page "https://pep8.readthedocs.org/")
6335 (synopsis "Python style guide checker")
6336 (description
6337 "This tools checks Python code against some of the style conventions in
6338PEP 8.")
6339 (license license:expat)))
6340
6341(define-public python2-pep8
6342 (package-with-python2 python-pep8))
6343
6344(define-public python-pyflakes
6345 (package
6346 (name "python-pyflakes")
6347 (version "2.0.0")
6348 (source
6349 (origin
6350 (method url-fetch)
6351 (uri (pypi-uri "pyflakes" version))
6352 (sha256
6353 (base32
6354 "0jba28czyvimdc72llms3f17swp3i8jdcabf5w0j00adfbn64xls"))))
6355 (build-system python-build-system)
6356 (home-page
6357 "https://github.com/pyflakes/pyflakes")
6358 (synopsis "Passive checker of Python programs")
6359 (description
6360 "Pyflakes statically checks Python source code for common errors.")
6361 (license license:expat)))
6362
6363(define-public python2-pyflakes
6364 (package-with-python2 python-pyflakes))
6365
6366(define-public python-mccabe
6367 (package
6368 (name "python-mccabe")
6369 (version "0.6.1")
6370 (source
6371 (origin
6372 (method url-fetch)
6373 (uri (pypi-uri "mccabe" version))
6374 (sha256
6375 (base32
6376 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
6377 (build-system python-build-system)
6378 (native-inputs
6379 `(("python-pytest" ,python-pytest-bootstrap)
6380 ("python-pytest-runner" ,python-pytest-runner)))
6381 (home-page "https://github.com/flintwork/mccabe")
6382 (synopsis "McCabe checker, plugin for flake8")
6383 (description
6384 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6385complexity of Python source code.")
6386 (license license:expat)))
6387
6388(define-public python2-mccabe
6389 (package-with-python2 python-mccabe))
6390
6391(define-public python-mccabe-0.2.1
6392 (package (inherit python-mccabe)
6393 (version "0.2.1")
6394 (source
6395 (origin
6396 (method url-fetch)
6397 (uri (pypi-uri "mccabe" version))
6398 (sha256
6399 (base32
6400 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6401
6402(define-public python2-mccabe-0.2.1
6403 (package-with-python2 python-mccabe-0.2.1))
6404
6405;; Flake8 2.4.1 requires an older version of pep8.
6406;; This should be removed ASAP.
6407(define-public python-pep8-1.5.7
6408 (package (inherit python-pep8)
6409 (version "1.5.7")
6410 (source
f3576970
RW
6411 (origin
6412 (method url-fetch)
6413 (uri (pypi-uri "pep8" version))
6414 (sha256
6415 (base32
6416 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
44d10b1f
RW
6417 (arguments
6418 ;; XXX Tests not compatible with Python 3.5.
6419 '(#:tests? #f))))
6420
6421(define-public python2-pep8-1.5.7
6422 (package-with-python2 python-pep8-1.5.7))
6423
6424;; Flake8 2.4.1 requires an older version of pyflakes.
6425;; This should be removed ASAP.
6426(define-public python-pyflakes-0.8.1
6427 (package (inherit python-pyflakes)
6428 (version "0.8.1")
6429 (source
8c4dffb5
RW
6430 (origin
6431 (method url-fetch)
6432 (uri (pypi-uri "pyflakes" version))
6433 (sha256
6434 (base32
6435 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
44d10b1f
RW
6436 (arguments
6437 ;; XXX Tests not compatible with Python 3.5.
6438 '(#:tests? #f))))
6439
6440(define-public python2-pyflakes-0.8.1
6441 (package-with-python2 python-pyflakes-0.8.1))
6442
6443;; This package is used by hypothesis which has thousands of dependent packages.
6444;; FIXME: Consolidate this with "python-flake8" below in the next rebuild cycle.
6445(define-public python-flake8-3.5
6446 (package
6447 (name "python-flake8")
6448 (version "3.5.0")
6449 (source
6450 (origin
6451 (method url-fetch)
6452 (uri (pypi-uri "flake8" version))
6453 (sha256
6454 (base32
6455 "184b33grvvjmiwlv9kyd7yng9qv5ld24154j70z332xxg9gjclvj"))))
6456 (build-system python-build-system)
6457 (arguments
6458 `(#:phases
6459 (modify-phases %standard-phases
6460 ;; Two errors don't seem to have assigned codes.
6461 (add-after 'unpack 'delete-broken-test
6462 (lambda _ (delete-file "tests/unit/test_pyflakes_codes.py") #t))
6463 (add-after 'unpack 'fix-problem-with-pycodestyle
6464 (lambda _
6465 ;; See https://gitlab.com/pycqa/flake8/merge_requests/230
6466 ;; This should no longer be needed with the next release.
6467 (substitute* "setup.py"
6468 (("PEP8_PLUGIN\\('break_around_binary_operator'\\),")
6469 "PEP8_PLUGIN('break_after_binary_operator'),\
6470PEP8_PLUGIN('break_before_binary_operator'),"))
6471 #t))
6472 (delete 'check)
6473 (add-after 'install 'check
6474 (lambda* (#:key inputs outputs #:allow-other-keys)
6475 (add-installed-pythonpath inputs outputs)
6476 (invoke "pytest" "-v")
6477 #t)))))
6478 (propagated-inputs
6479 `(("python-pycodestyle" ,python-pycodestyle)
6480 ("python-pyflakes" ,python-pyflakes)
6481 ("python-mccabe" ,python-mccabe)))
6482 (native-inputs
6483 `(("python-mock" ,python-mock)
6484 ("python-pytest" ,python-pytest-bootstrap)
6485 ("python-pytest-runner" ,python-pytest-runner)))
6486 (home-page "https://gitlab.com/pycqa/flake8")
6487 (synopsis
6488 "The modular source code checker: pep8, pyflakes and co")
6489 (description
6490 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
6491 (properties `((python2-variant . ,(delay python2-flake8-3.5))))
6492 (license license:expat)))
6493
6494(define-public python2-flake8-3.5
6495 (let ((base (package-with-python2 (strip-python2-variant python-flake8-3.5))))
6496 (package (inherit base)
6497 (propagated-inputs
6498 `(("python2-configparser" ,python2-configparser)
6499 ("python2-enum34" ,python2-enum34)
6500 ,@(package-propagated-inputs base))))))
6501
6502;; Version 3.5.0 has compatibility issues with Pyflakes 2.0, so we need
6503;; this newer version. Keep it as a separate variable for now to avoid
6504;; rebuilding "python-hypothesis"; this should be removed in the next
6505;; rebuild cycle.
6506(define-public python-flake8
6507 (package
6508 (inherit python-flake8-3.5)
6509 (version "3.6.0")
6510 (source (origin
6511 (method url-fetch)
6512 (uri (pypi-uri "flake8" version))
6513 (sha256
6514 (base32
6515 "0w0nprx22rbvrrkbfx9v5jc5gskbm08g219l7r8wai8zfswgadba"))))
6516 (arguments
6517 (substitute-keyword-arguments (package-arguments python-flake8-3.5)
6518 ((#:phases phases)
6519 `(modify-phases ,phases
6520 (delete 'delete-broken-test)
6521 (delete 'fix-problem-with-pycodestyle)))))
6522 (properties `((python2-variant . ,(delay python2-flake8))))))
6523
6524(define-public python2-flake8
6525 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
6526 (package (inherit base)
6527 (propagated-inputs
6528 (package-propagated-inputs python2-flake8-3.5)))))
6529
6530;; python-hacking requires flake8 <2.6.0.
6531(define-public python-flake8-2.5
6532 (package
6533 (inherit python-flake8)
6534 (version "2.5.5")
6535 (source (origin
6536 (method url-fetch)
6537 (uri (pypi-uri "flake8" version))
6538 (sha256
6539 (base32
6540 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
6541 (propagated-inputs
6542 `(("python-pep8" ,python-pep8)
6543 ,@(package-propagated-inputs python-flake8)))
6544 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
6545
6546(define-public python2-flake8-2.5
6547 (package
6548 (inherit python2-flake8)
6549 (version (package-version python-flake8-2.5))
6550 (source (origin
6551 (inherit (package-source python-flake8-2.5))))
6552 (propagated-inputs
6553 `(("python2-pep8" ,python2-pep8)
6554 ,@(package-propagated-inputs python2-flake8)))))
6555
6556(define-public python-flake8-polyfill
6557 (package
6558 (name "python-flake8-polyfill")
6559 (version "1.0.2")
6560 (source
6561 (origin
6562 (method url-fetch)
6563 (uri (pypi-uri "flake8-polyfill" version))
6564 (sha256
6565 (base32
6566 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
6567 (build-system python-build-system)
6568 (arguments
6569 '(#:phases
6570 (modify-phases %standard-phases
6571 (replace 'check
6572 (lambda _
6573 (setenv "PYTHONPATH"
6574 (string-append (getcwd) "/build/lib:"
6575 (getenv "PYTHONPATH")))
4f0a0894 6576 (invoke "py.test" "-v"))))))
44d10b1f
RW
6577 (native-inputs
6578 `(("python-flake8" ,python-flake8)
6579 ("python-mock" ,python-mock)
6580 ("python-pep8" ,python-pep8)
6581 ("python-pycodestyle" ,python-pycodestyle)
6582 ("python-pytest" ,python-pytest)))
6583 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6584 (synopsis "Polyfill package for Flake8 plugins")
6585 (description
6586 "This package that provides some compatibility helpers for Flake8
6587plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6588 (license license:expat)))
6589
6590(define-public python2-flake8-polyfill
6591 (package-with-python2 python-flake8-polyfill))
6592
6593(define-public python-mistune
6594 (package
6595 (name "python-mistune")
6596 (version "0.8.4")
6597 (source
6598 (origin
6599 (method url-fetch)
6600 (uri (pypi-uri "mistune" version))
6601 (sha256
6602 (base32
6603 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
6604 (build-system python-build-system)
6605 (native-inputs
6606 `(("python-nose" ,python-nose)
6607 ("python-cython" ,python-cython)))
6608 (home-page "https://github.com/lepture/mistune")
6609 (synopsis "Markdown parser in pure Python")
6610 (description "This package provides a fast markdown parser in pure
6611Python.")
6612 (license license:bsd-3)))
6613
6614(define-public python2-mistune
6615 (package-with-python2 python-mistune))
6616
6617(define-public python-markdown
6618 (package
6619 (name "python-markdown")
ceb1936a 6620 (version "3.1.1")
44d10b1f
RW
6621 (source
6622 (origin
6623 (method url-fetch)
6624 (uri (pypi-uri "Markdown" version))
6625 (sha256
6626 (base32
ceb1936a 6627 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f"))))
44d10b1f
RW
6628 (build-system python-build-system)
6629 (native-inputs
6630 `(("python-nose" ,python-nose)
6631 ("python-pyyaml" ,python-pyyaml)))
6632 (home-page "https://python-markdown.github.io/")
6633 (synopsis "Python implementation of Markdown")
6634 (description
6635 "This package provides a Python implementation of John Gruber's
6636Markdown. The library features international input, various Markdown
6637extensions, and several HTML output formats. A command line wrapper
6638markdown_py is also provided to convert Markdown files to HTML.")
6639 (license license:bsd-3)))
6640
6641(define-public python2-markdown
6642 (package-with-python2 python-markdown))
6643
6644(define-public python-ptyprocess
6645 (package
6646 (name "python-ptyprocess")
6647 (version "0.5.2")
6648 (source
6649 (origin
6650 (method url-fetch)
6651 (uri (pypi-uri "ptyprocess" version))
6652 (sha256
6653 (base32
6654 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
6655 (build-system python-build-system)
6656 (native-inputs
6657 `(("python-nose" ,python-nose)))
6658 (arguments
6659 `(#:phases
6660 (modify-phases %standard-phases
6661 (replace 'check
7904d6fa 6662 (lambda _ (invoke "nosetests"))))))
44d10b1f
RW
6663 (home-page "https://github.com/pexpect/ptyprocess")
6664 (synopsis "Run a subprocess in a pseudo terminal")
6665 (description
6666 "This package provides a Python library used to launch a subprocess in a
6667pseudo terminal (pty), and interact with both the process and its pty.")
6668 (license license:isc)))
6669
6670(define-public python2-ptyprocess
6671 (package-with-python2 python-ptyprocess))
6672
6673(define-public python-cram
6674 (package
6675 (name "python-cram")
6676 (version "0.7")
6677 (home-page "https://bitheap.org/cram/")
6678 (source (origin
6679 (method url-fetch)
6680 (uri (list (string-append home-page "cram-"
6681 version ".tar.gz")
6682 (pypi-uri "cram" version)))
6683 (sha256
6684 (base32
6685 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6686 (arguments
6687 '(#:phases
6688 (modify-phases %standard-phases
6689 (add-after 'unpack 'patch-source
6690 (lambda _
6691 (substitute* (find-files "cram" ".*\\.py$")
6692 ;; Replace default shell path.
6693 (("/bin/sh") (which "sh")))
6694 (substitute* (find-files "tests" ".*\\.t$")
6695 (("md5") "md5sum")
6696 (("/bin/bash") (which "bash"))
6697 (("/bin/sh") (which "sh")))
6698 (substitute* "cram/_test.py"
6699 ;; This hack works around a bug triggered by substituting
6700 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6701 ;; "cram -h", which breaks the output at 80 characters. This
6702 ;; causes the line showing the default shell to break into two
6703 ;; lines, but the test expects a single line...
6704 (("env\\['COLUMNS'\\] = '80'")
6705 "env['COLUMNS'] = '160'"))
6706 #t))
6707 (delete 'check)
6708 (add-after 'install 'check
6709 ;; The test phase uses the built library and executable.
6710 ;; It's easier to run it after install since the build
6711 ;; directory contains version-specific PATH.
6712 (lambda* (#:key inputs outputs #:allow-other-keys)
6713 (add-installed-pythonpath inputs outputs)
6714 (setenv "PATH" (string-append (getenv "PATH") ":"
6715 (assoc-ref outputs "out") "/bin"))
2d7db192 6716 (invoke "make" "test"))))))
44d10b1f
RW
6717 (build-system python-build-system)
6718 (native-inputs
6719 `(("python-coverage" ,python-coverage)
6720 ("which" ,which)))
6721 (synopsis "Simple testing framework for command line applications")
6722 (description
6723 "Cram is a functional testing framework for command line applications.
6724Cram tests look like snippets of interactive shell sessions. Cram runs each
6725command and compares the command output in the test with the command’s actual
6726output.")
6727 (license license:gpl2+)))
6728
6729(define-public python2-cram
6730 (package-with-python2 python-cram))
6731
6732(define-public python-straight-plugin
6733 (package
6734 (name "python-straight-plugin")
6735 (version "1.4.1")
6736 (source
6737 (origin
6738 (method url-fetch)
6739 (uri (pypi-uri "straight.plugin" version))
6740 (sha256
6741 (base32
6742 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6743 (build-system python-build-system)
6744 (home-page "https://github.com/ironfroggy/straight.plugin")
6745 (synopsis "Simple namespaced plugin facility")
6746 (description "Straight Plugin provides a type of plugin you can create from
6747almost any existing Python modules, and an easy way for outside developers to
6748add functionality and customization to your projects with their own plugins.")
6749 (license license:expat)))
6750
6751(define-public python2-straight-plugin
6752 (package-with-python2 python-straight-plugin))
6753
6754(define-public python-fonttools
6755 (package
6756 (name "python-fonttools")
6757 (version "3.28.0")
6758 (source (origin
6759 (method url-fetch)
6760 (uri (pypi-uri "fonttools" version ".zip"))
6761 (sha256
6762 (base32
6763 "0vsvjhidpb5kywpjgz1j3fywzkddxkb0afqai18qa3h6lqjyxwpb"))))
6764 (build-system python-build-system)
6765 (native-inputs
6766 `(("unzip" ,unzip)
6767 ("python-pytest" ,python-pytest)
6768 ("python-pytest-runner" ,python-pytest-runner)))
6769 (home-page "https://github.com/behdad/fonttools")
6770 (synopsis "Tools to manipulate font files")
6771 (description
6772 "FontTools/TTX is a library to manipulate font files from Python. It
6773supports reading and writing of TrueType/OpenType fonts, reading and writing
6774of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6775also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6776from an XML-based format.")
6777 (license license:expat)))
6778
6779(define-public python2-fonttools
6780 (package-with-python2 python-fonttools))
6781
6782(define-public python-ly
6783 (package
6784 (name "python-ly")
6785 (version "0.9.5")
6786 (source
6787 (origin
6788 (method url-fetch)
6789 (uri (pypi-uri name version))
6790 (sha256
6791 (base32
6792 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
6793 (build-system python-build-system)
6794 (arguments
6795 ;; FIXME: Some tests need network access.
6796 '(#:tests? #f))
6797 (synopsis "Tool and library for manipulating LilyPond files")
6798 (description "This package provides a Python library to parse, manipulate
6799or create documents in LilyPond format. A command line program ly is also
6800provided that can be used to do various manipulations with LilyPond files.")
6801 (home-page "https://pypi.python.org/pypi/python-ly")
6802 (license license:gpl2+)))
6803
6804(define-public python-appdirs
6805 (package
6806 (name "python-appdirs")
6807 (version "1.4.3")
6808 (source
6809 (origin
6810 (method url-fetch)
6811 (uri (pypi-uri "appdirs" version))
6812 (sha256
6813 (base32
6814 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
6815 (build-system python-build-system)
6816 (home-page "https://github.com/ActiveState/appdirs")
6817 (synopsis
6818 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6819 (description
6820 "This module provides a portable way of finding out where user data
6821should be stored on various operating systems.")
6822 (license license:expat)))
6823
6824(define-public python2-appdirs
6825 (package-with-python2 python-appdirs))
6826
6827(define-public python-llfuse
6828 (package
6829 (name "python-llfuse")
6830 (version "1.3.5")
6831 (source (origin
6832 (method url-fetch)
6833 (uri (pypi-uri "llfuse" version ".tar.bz2"))
6834 (sha256
6835 (base32
6836 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
6837 (build-system python-build-system)
6838 (inputs
6839 `(("fuse" ,fuse)
6840 ("attr" ,attr)))
6841 (native-inputs
6842 `(("pkg-config" ,pkg-config)))
6843 (synopsis "Python bindings for FUSE")
6844 (description
6845 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6846 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
6847 (license license:lgpl2.0+)
6848 (properties `((python2-variant . ,(delay python2-llfuse))))))
6849
6850(define-public python2-llfuse
6851 (package (inherit (package-with-python2
6852 (strip-python2-variant python-llfuse)))
6853 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6854
6855;; For attic-0.16
6856(define-public python-llfuse-0.41
6857 (package (inherit python-llfuse)
6858 (version "0.41.1")
6859 (source (origin
6860 (method url-fetch)
6861 (uri (string-append
6862 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6863 "llfuse-" version ".tar.bz2"))
6864 (sha256
6865 (base32
6866 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
6867 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6868 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
6869 (license (list license:expat license:lgpl2.0+))))
6870
6871(define-public python-msgpack
6872 (package
6873 (name "python-msgpack")
6874 (version "0.5.6")
6875 (source (origin
6876 (method url-fetch)
6877 (uri (pypi-uri "msgpack" version))
6878 (sha256
6879 (base32
6880 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
6881 (build-system python-build-system)
6882 (arguments
6883 `(#:modules ((guix build utils)
6884 (guix build python-build-system)
6885 (ice-9 ftw)
6886 (srfi srfi-1)
6887 (srfi srfi-26))
6888 #:phases
6889 (modify-phases %standard-phases
6890 (replace 'check
6891 (lambda _
6892 (let ((cwd (getcwd)))
6893 (setenv "PYTHONPATH"
6894 (string-append cwd "/build/"
6895 (find (cut string-prefix? "lib" <>)
6896 (scandir (string-append cwd "/build")))
6897 ":"
6898 (getenv "PYTHONPATH")))
6899 (invoke "pytest" "-v" "test")))))))
6900 (native-inputs
6901 `(("python-pytest" ,python-pytest)))
6902 (synopsis "MessagePack (de)serializer")
6903 (description "MessagePack is a fast, compact binary serialization format,
6904suitable for similar data to JSON. This package provides CPython bindings for
6905reading and writing MessagePack data.")
6906 (home-page "https://pypi.python.org/pypi/msgpack/")
6907 (license license:asl2.0)))
6908
6909;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
6910;; release 0.5. Some packages like borg still call it by the old name for now.
6911;; <https://bugs.gnu.org/30662>
6912(define-public python-msgpack-transitional
6913 (package
6914 (inherit python-msgpack)
6915 (name "python-msgpack-transitional")
6916 (arguments
6917 (substitute-keyword-arguments (package-arguments python-msgpack)
6918 ((#:phases phases)
6919 `(modify-phases ,phases
6920 (add-after 'unpack 'configure-transitional
6921 (lambda _
6922 ;; Keep using the old name.
6923 (substitute* "setup.py"
6924 (("TRANSITIONAL = False")
6925 "TRANSITIONAL = 1"))
6926 #t))))))))
6927
6928(define-public python2-msgpack
6929 (package-with-python2 python-msgpack))
6930
6931(define-public python-netaddr
6932 (package
6933 (name "python-netaddr")
6934 (version "0.7.19")
6935 (source
6936 (origin
6937 (method url-fetch)
6938 (uri (pypi-uri "netaddr" version))
6939 (sha256
6940 (base32
6941 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
6942 (build-system python-build-system)
6943 (arguments `(#:tests? #f)) ;; No tests.
6944 (home-page "https://github.com/drkjam/netaddr/")
6945 (synopsis "Pythonic manipulation of network addresses")
6946 (description
6947 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6948and MAC network addresses.")
6949 (license license:bsd-3)))
6950
6951(define-public python2-netaddr
6952 (package-with-python2 python-netaddr))
6953
dd85eca0
AG
6954(define-public python2-pyroute2
6955 (package
6956 (name "python2-pyroute2")
6957 (version "0.5.6")
6958 (source
6959 (origin
6960 (method url-fetch)
6961 (uri (pypi-uri "pyroute2" version))
6962 (sha256
6963 (base32
6964 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
6965 (build-system python-build-system)
6966 (arguments
6967 `(#:python ,python-2)) ;Python 3.x is not supported
6968 (home-page "https://github.com/svinota/pyroute2")
6969 (synopsis "Python netlink library")
6970 (description
6971 "Pyroute2 is a pure Python netlink library with minimal dependencies.
6972Supported netlink families and protocols include:
6973@itemize
6974@item rtnl, network settings - addresses, routes, traffic controls
6975@item nfnetlink - netfilter API: ipset, nftables, ...
6976@item ipq - simplest userspace packet filtering, iptables QUEUE target
6977@item devlink - manage and monitor devlink-enabled hardware
6978@item generic - generic netlink families
6979 @itemize
6980 @item nl80211 - wireless functions API (basic support)
6981 @item taskstats - extended process statistics
6982 @item acpi_events - ACPI events monitoring
6983 @item thermal_events - thermal events monitoring
6984 @item VFS_DQUOT - disk quota events monitoring
6985 @end itemize
6986@end itemize")
6987 (license license:gpl2+)))
6988
44d10b1f
RW
6989(define-public python-wrapt
6990 (package
6991 (name "python-wrapt")
dddd7a75 6992 (version "1.11.1")
44d10b1f
RW
6993 (source
6994 (origin
6995 (method url-fetch)
6996 (uri (pypi-uri "wrapt" version))
6997 (sha256
6998 (base32
dddd7a75 6999 "0cqmysny1pz01jw26q48q5zasvns6507rwhgm6wcw743f0r01sja"))))
44d10b1f
RW
7000 (build-system python-build-system)
7001 (arguments
7002 ;; Tests are not included in the tarball, they are only available in the
7003 ;; git repository.
7004 `(#:tests? #f))
7005 (home-page "https://github.com/GrahamDumpleton/wrapt")
7006 (synopsis "Module for decorators, wrappers and monkey patching")
7007 (description
7008 "The aim of the wrapt module is to provide a transparent object proxy for
7009 Python, which can be used as the basis for the construction of function
7010 wrappers and decorator functions.")
7011 (license license:bsd-2)))
7012
7013(define-public python2-wrapt
7014 (package-with-python2 python-wrapt))
7015
7016(define-public python-xlrd
7017 (package
7018 (name "python-xlrd")
7019 (version "1.0.0")
7020 (source (origin
7021 (method url-fetch)
7022 (uri (pypi-uri "xlrd" version))
7023 (sha256
7024 (base32
7025 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
7026 (build-system python-build-system)
7027 (arguments
7028 `(#:phases
7029 (modify-phases %standard-phases
7030 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
7031 ;; run tests instead for now.
45fd0081 7032 (replace 'check (lambda _ (invoke "nosetests"))))))
44d10b1f
RW
7033 (native-inputs `(("python-nose" ,python-nose)))
7034 (home-page "http://www.python-excel.org/")
7035 (synopsis "Library for extracting data from Excel files")
a0909286 7036 (description "This package provides a library to extract data from
44d10b1f
RW
7037spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
7038@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
7039Unicode-aware. It is not intended as an end-user tool.")
7040 (license license:bsd-3)))
7041
7042(define-public python2-xlrd
7043 (package-with-python2 python-xlrd))
7044
7045(define-public python-prettytable
7046 (package
7047 (name "python-prettytable")
7048 (version "0.7.2")
7049 (source
7050 (origin
7051 (method url-fetch)
337c3a1e 7052 (uri (pypi-uri "prettytable" version ".tar.bz2"))
44d10b1f
RW
7053 (sha256
7054 (base32
7055 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7056 (build-system python-build-system)
7057 (home-page "http://code.google.com/p/prettytable/")
7058 (synopsis "Display tabular data in an ASCII table format")
7059 (description
7060 "A library designed to represent tabular data in visually appealing ASCII
7061tables. PrettyTable allows for selection of which columns are to be printed,
7062independent alignment of columns (left or right justified or centred) and
7063printing of sub-tables by specifying a row range.")
7064 (license license:bsd-3)))
7065
7066(define-public python2-prettytable
7067 (package-with-python2 python-prettytable))
7068
7069(define-public python-tables
7070 (package
7071 (name "python-tables")
7072 (version "3.4.4")
7073 (source
7074 (origin
7075 (method url-fetch)
7076 (uri (pypi-uri "tables" version))
7077 (sha256
7078 (base32
7079 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
7080 (modules '((guix build utils)))
7081 (snippet
7082 '(begin
7083 ;; Remove pre-compiled .pyc files from source.
7084 (for-each delete-file-recursively
7085 (find-files "." "__pycache__" #:directories? #t))
7086 (for-each delete-file (find-files "." "\\.pyc$"))
7087 #t))))
7088 (build-system python-build-system)
7089 (arguments
7090 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7091 ;; or "check", so we must override the build and check phases.
7092 #:phases
7093 (modify-phases %standard-phases
7094 (add-after 'unpack 'use-gcc
7095 (lambda _
7096 (substitute* "setup.py"
7097 (("compiler = new_compiler\\(\\)" line)
7098 (string-append line
7099 "\ncompiler.set_executables(compiler='gcc',"
7100 "compiler_so='gcc',"
7101 "linker_exe='gcc',"
7102 "linker_so='gcc -shared')")))
7103 #t))
7104 (replace 'build
7105 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
7106 (invoke "python" "setup.py" "build"
7107 (string-append "--hdf5="
7108 (assoc-ref inputs "hdf5")))))
44d10b1f
RW
7109 (replace 'check
7110 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
7111 (invoke "python" "setup.py" "check"
7112 (string-append "--hdf5="
7113 (assoc-ref inputs "hdf5"))))))))
44d10b1f
RW
7114 (propagated-inputs
7115 `(("python-numexpr" ,python-numexpr)
7116 ("python-numpy" ,python-numpy)))
7117 (native-inputs
7118 `(("python-cython" ,python-cython)
7119 ("pkg-config" ,pkg-config)))
7120 (inputs
7121 `(("hdf5" ,hdf5)
7122 ("bzip2" ,bzip2)
7123 ("zlib" ,zlib)))
7124 (home-page "http://www.pytables.org/")
7125 (synopsis "Hierarchical datasets for Python")
7126 (description "PyTables is a package for managing hierarchical datasets and
7127designed to efficiently cope with extremely large amounts of data.")
7128 (license license:bsd-3)))
7129
7130(define-public python2-tables
7131 (package-with-python2 python-tables))
7132
7133(define-public python-pyasn1
7134 (package
7135 (name "python-pyasn1")
7136 (version "0.4.3")
7137 (source
7138 (origin
7139 (method url-fetch)
7140 (uri (pypi-uri "pyasn1" version))
7141 (sha256
7142 (base32
7143 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
7144 (build-system python-build-system)
7145 (home-page "http://pyasn1.sourceforge.net/")
7146 (synopsis "ASN.1 types and codecs")
7147 (description
7148 "This is an implementation of ASN.1 types and codecs in Python. It is
7149suitable for a wide range of protocols based on the ASN.1 specification.")
7150 (license license:bsd-2)))
7151
7152(define-public python2-pyasn1
7153 (package-with-python2 python-pyasn1))
7154
7155(define-public python-pyasn1-modules
7156 (package
7157 (name "python-pyasn1-modules")
7158 (version "0.2.2")
7159 (source
7160 (origin
7161 (method url-fetch)
7162 (uri (pypi-uri "pyasn1-modules" version))
7163 (sha256
7164 (base32
7165 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
7166 (build-system python-build-system)
7167 (propagated-inputs
7168 `(("python-pyasn1" ,python-pyasn1)))
7169 (home-page "https://sourceforge.net/projects/pyasn1/")
7170 (synopsis "ASN.1 codec implementations")
7171 (description
7172 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7173implementations of ASN.1-based codecs and protocols.")
7174 (license license:bsd-3)))
7175
7176(define-public python2-pyasn1-modules
7177 (package-with-python2 python-pyasn1-modules))
7178
7179(define-public python-ipaddress
7180 (package
7181 (name "python-ipaddress")
7182 (version "1.0.22")
7183 (source (origin
7184 (method url-fetch)
7185 (uri (pypi-uri "ipaddress" version))
7186 (sha256
7187 (base32
7188 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
7189 (build-system python-build-system)
7190 (home-page "https://github.com/phihag/ipaddress")
7191 (synopsis "IP address manipulation library")
7192 (description
7193 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7194 in Python. This library is used to create, poke at, and manipulate IPv4 and
7195 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7196 module to older versions of Python.")
7197 (license license:psfl)))
7198
7199(define-public python2-ipaddress
7200 (package-with-python2 python-ipaddress))
7201
7202(define-public python2-ipaddr
7203 (package
7204 (name "python2-ipaddr")
7205 (version "2.1.11")
7206 (source
7207 (origin
7208 (method url-fetch)
7209 (uri (pypi-uri "ipaddr" version))
7210 (sha256
7211 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7212 (build-system python-build-system)
7213 (arguments
7214 `(#:python ,python-2 ;version 2 only
7215 #:phases
7216 (modify-phases %standard-phases
7217 (replace 'check
40b8c4e3 7218 (lambda _ (invoke "python" "ipaddr_test.py"))))))
44d10b1f
RW
7219 (home-page "https://github.com/google/ipaddr-py")
7220 (synopsis "IP address manipulation library")
7221 (description
7222 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7223IPv6 addresses and networks.
7224
7225For new implementations you may prefer to use the standard module
7226@code{ipaddress}, which was introduced in Python 3.3 and backported to older
7227versions of Python.")
7228 (license license:asl2.0)))
7229
7230(define-public python-idna
7231 (package
7232 (name "python-idna")
e95c9837 7233 (version "2.8")
44d10b1f
RW
7234 (source
7235 (origin
7236 (method url-fetch)
7237 (uri (pypi-uri "idna" version))
7238 (sha256
7239 (base32
e95c9837 7240 "01rlkigdxg17sf9yar1jl8n18ls59367wqh59hnawlyg53vb6my3"))))
44d10b1f
RW
7241 (build-system python-build-system)
7242 (home-page "https://github.com/kjd/idna")
7243 (synopsis "Internationalized domain names in applications")
7244 (description
7245 "This is a library to support the Internationalised Domain Names in
7246Applications (IDNA) protocol as specified in RFC 5891. This version of the
7247protocol is often referred to as “IDNA2008” and can produce different results
7248from the earlier standard from 2003. The library is also intended to act as a
7249suitable drop-in replacement for the “encodings.idna” module that comes with
7250the Python standard library but currently only supports the older 2003
7251specification.")
7252 (license license:bsd-4)))
7253
a76e6a69
JM
7254(define-public python-idna-2.7
7255 (package (inherit python-idna)
7256 (version "2.7")
7257 (source (origin
7258 (method url-fetch)
7259 (uri (pypi-uri "idna" version))
7260 (sha256
7261 (base32
7262 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
7263
7264
44d10b1f
RW
7265(define-public python2-idna
7266 (package-with-python2 python-idna))
7267
7268(define-public python-idna-ssl
7269 (package
7270 (name "python-idna-ssl")
7271 (version "1.0.1")
7272 (source
7273 (origin
7274 (method url-fetch)
7275 (uri (pypi-uri "idna-ssl" version))
7276 (sha256
7277 (base32
7278 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
7279 (build-system python-build-system)
7280 (arguments
7281 `(#:tests? #f)) ;circular dependency with python-aiohttp
7282 (home-page "https://github.com/aio-libs/idna-ssl")
7283 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
7284 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
7285domains support.")
7286 (license license:expat)))
7287
7288(define-public python-pretend
7289 (package
7290 (name "python-pretend")
7291 (version "1.0.9")
7292 (source
7293 (origin
7294 (method url-fetch)
9f1f22ee 7295 (uri (pypi-uri "pretend" version))
44d10b1f
RW
7296 (sha256
7297 (base32
7298 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
7299 (build-system python-build-system)
7300 (home-page "https://github.com/alex/pretend")
7301 (synopsis "Library for stubbing in Python")
7302 (description
7303 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7304technique for writing tests. You may hear the term mixed up with mocks,
7305fakes, or doubles. Basically, a stub is an object that returns pre-canned
7306responses, rather than doing any computation.")
7307 (license license:bsd-3)))
7308
7309(define-public python2-pretend
7310 (package-with-python2 python-pretend))
7311
7312(define-public python-pip
7313 (package
7314 (name "python-pip")
7315 (version "18.1")
7316 (source
7317 (origin
7318 (method url-fetch)
7319 (uri (pypi-uri "pip" version))
7320 (sha256
7321 (base32
7322 "188fclay154s520n43s7cxxlhdaiysvxf19zk8vr1xbyjyyr58n0"))))
7323 (build-system python-build-system)
7324 (arguments
7325 '(#:tests? #f)) ; there are no tests in the pypi archive.
7326 (home-page "https://pip.pypa.io/")
7327 (synopsis "Package manager for Python software")
7328 (description
7329 "Pip is a package manager for Python software, that finds packages on the
7330Python Package Index (PyPI).")
7331 (license license:expat)))
7332
7333(define-public python2-pip
7334 (package-with-python2 python-pip))
7335
7336(define-public python-tlsh
7337 (package
7338 (name "python-tlsh")
7339 (version "3.4.5")
7340 (home-page "https://github.com/trendmicro/tlsh")
3e3ff8ad
TGR
7341 (source
7342 (origin
7343 (method git-fetch)
7344 (uri (git-reference
7345 (url "https://github.com/trendmicro/tlsh.git")
7346 (commit (string-append "v" version))))
7347 (file-name (git-file-name name version))
7348 (sha256
7349 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
44d10b1f
RW
7350 (build-system cmake-build-system)
7351 (arguments
7352 '(#:out-of-source? #f
7353 #:phases (modify-phases %standard-phases
7354 (replace
7355 'install
7356 (lambda* (#:key outputs #:allow-other-keys)
7357 ;; Build and install the Python bindings. The underlying
7358 ;; C++ library is apparently not meant to be installed.
7359 (let ((out (assoc-ref outputs "out")))
7360 (with-directory-excursion "py_ext"
7361 (and (system* "python" "setup.py" "build")
7362 (system* "python" "setup.py" "install"
7363 (string-append "--prefix=" out))))))))))
7364 (inputs `(("python" ,python-wrapper))) ;for the bindings
7365 (synopsis "Fuzzy matching library for Python")
7366 (description
7367 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7368Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7369value which can be used for similarity comparisons. Similar objects have
7370similar hash values, which allows for the detection of similar objects by
7371comparing their hash values. The byte stream should have a sufficient amount
7372of complexity; for example, a byte stream of identical bytes will not generate
7373a hash value.")
7374 (license license:asl2.0)))
7375
7376(define-public python2-tlsh
7377 (package
7378 (inherit python-tlsh)
7379 (name "python2-tlsh")
7380 (inputs `(("python" ,python-2)))))
7381
7382(define-public python-termcolor
7383 (package
7384 (name "python-termcolor")
7385 (version "1.1.0")
7386 (source
7387 (origin
7388 (method url-fetch)
7389 (uri (pypi-uri "termcolor" version))
7390 (sha256
7391 (base32
7392 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7393 (build-system python-build-system)
7394 (arguments
7395 ;; There are no tests.
7396 `(#:tests? #f))
7397 (home-page "https://pypi.python.org/pypi/termcolor")
7398 (synopsis "ANSII Color formatting for terminal output")
7399 (description
7400 "This package provides ANSII Color formatting for output in terminals.")
7401 (license license:expat)))
7402
7403(define-public python2-termcolor
7404 (package-with-python2 python-termcolor))
7405
7406(define-public python-libarchive-c
7407 (package
7408 (name "python-libarchive-c")
7409 (version "2.8")
7410 (source (origin
7411 (method url-fetch)
7412 (uri (pypi-uri "libarchive-c" version))
7413 (sha256
7414 (base32
7415 "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06"))))
7416 (build-system python-build-system)
7417 (arguments
7418 '(#:phases (modify-phases %standard-phases
7419 (add-before
7420 'build 'reference-libarchive
7421 (lambda* (#:key inputs #:allow-other-keys)
7422 ;; Retain the absolute file name of libarchive.so.
7423 (let ((libarchive (assoc-ref inputs "libarchive")))
7424 (substitute* "libarchive/ffi.py"
7425 (("find_library\\('archive'\\)")
7426 (string-append "'" libarchive
7427 "/lib/libarchive.so'"))))))
7428 (replace 'check
7429 (lambda _ (invoke "pytest" "-vv"))))))
7430 (native-inputs
7431 `(("python-mock" ,python-mock)
7432 ("python-pytest" ,python-pytest)))
7433 (inputs
7434 `(("libarchive" ,libarchive)))
7435 (home-page "https://github.com/Changaco/python-libarchive-c")
7436 (synopsis "Python interface to libarchive")
7437 (description
7438 "This package provides Python bindings to libarchive, a C library to
7439access possibly compressed archives in many different formats. It uses
7440Python's @code{ctypes} foreign function interface (FFI).")
7441 (license license:lgpl2.0+)))
7442
7443(define-public python2-libarchive-c
7444 (package-with-python2 python-libarchive-c))
7445
7446(define-public python-file
7447 (package
7448 (inherit file)
7449 (name "python-file")
7450 (build-system python-build-system)
7451 (arguments
7452 '(#:tests? #f ;no tests
7453 #:configure-flags '("--single-version-externally-managed" "--root=/")
7454 #:phases (modify-phases %standard-phases
7455 (add-before 'build 'change-directory
7456 (lambda _
7457 (chdir "python")
7458 #t))
7459 (add-before 'build 'set-library-file-name
7460 (lambda* (#:key inputs #:allow-other-keys)
7461 (let ((file (assoc-ref inputs "file")))
7462 (substitute* "magic.py"
7463 (("find_library\\('magic'\\)")
7464 (string-append "'" file "/lib/libmagic.so'")))
7465 #t))))))
7466 (inputs `(("file" ,file)))
528ea990
LC
7467 (native-inputs (if (%current-target-system)
7468 `(("self" ,this-package))
7469 '()))
44d10b1f
RW
7470 (synopsis "Python bindings to the libmagic file type guesser. Note that
7471this module and the python-magic module both provide a \"magic.py\" file;
7472these two modules, which are different and were developed separately, both
7473serve the same purpose: provide Python bindings for libmagic.")))
7474
7475(define-public python2-file
7476 (package-with-python2 python-file))
7477
7478(define-public python-debian
7479 (package
7480 (name "python-debian")
7481 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
7482 (version "0.1.28")
7483 (source
7484 (origin
7485 (method url-fetch)
7486 (uri (pypi-uri name version))
7487 (sha256
7488 (base32
7489 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
7490 (build-system python-build-system)
7491 (propagated-inputs
7492 `(("python-six" ,python-six)))
7493 (synopsis "Debian package related modules")
7494 (description
7495 ;; XXX: Use @enumerate instead of @itemize to work around
7496 ;; <http://bugs.gnu.org/21772>.
7497 "This package provides Python modules that abstract many formats of
7498Debian-related files, such as:
7499
7500@enumerate
7501@item Debtags information;
7502@item @file{debian/changelog} files;
7503@item packages files, pdiffs;
7504@item control files of single or multiple RFC822-style paragraphs---e.g.
7505 @file{debian/control}, @file{.changes}, @file{.dsc};
7506@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7507 contained files and meta-information.
7508@end enumerate\n")
7509
7510 ;; Modules are either GPLv2+ or GPLv3+.
7511 (license license:gpl3+)))
7512
7513(define-public python2-debian
7514 (package-with-python2 python-debian))
7515
7516(define-public python-nbformat
7517 (package
7518 (name "python-nbformat")
7519 (version "4.4.0")
7520 (source
7521 (origin
7522 (method url-fetch)
7523 (uri (pypi-uri "nbformat" version))
7524 (sha256
7525 (base32
7526 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
7527 (build-system python-build-system)
7528 (arguments `(#:tests? #f)) ; no test target
7529 (propagated-inputs
7530 `(("python-ipython-genutils" ,python-ipython-genutils)
7531 ("python-jsonschema" ,python-jsonschema)
7532 ("python-jupyter-core" ,python-jupyter-core)
7533 ("python-traitlets" ,python-traitlets)))
7534 (home-page "http://jupyter.org")
7535 (synopsis "Jupyter Notebook format")
7536 (description "This package provides the reference implementation of the
7537Jupyter Notebook format and Python APIs for working with notebooks.")
7538 (license license:bsd-3)))
7539
7540(define-public python2-nbformat
7541 (package-with-python2 python-nbformat))
7542
7543(define-public python-bleach
7544 (package
7545 (name "python-bleach")
7546 (version "1.4.3")
7547 (source
7548 (origin
7549 (method url-fetch)
7550 (uri (pypi-uri "bleach" version))
7551 (sha256
7552 (base32
7553 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
7554 (build-system python-build-system)
7555 (propagated-inputs
7556 `(("python-html5lib" ,python-html5lib-0.9)
7557 ("python-six" ,python-six)))
7558 (native-inputs
7559 `(("python-nose" ,python-nose)))
7560 (home-page "https://github.com/jsocol/bleach")
7561 (synopsis "Whitelist-based HTML-sanitizing tool")
7562 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7563 (license license:asl2.0)))
7564
7565(define-public python2-bleach
7566 (package-with-python2 python-bleach))
7567
7568(define-public python-entrypoints
7569 (package
7570 (name "python-entrypoints")
a7f1b718 7571 (version "0.3")
44d10b1f
RW
7572 (source
7573 (origin
7574 (method url-fetch)
a7f1b718 7575 (uri (pypi-uri "entrypoints" version))
44d10b1f
RW
7576 (sha256
7577 (base32
a7f1b718 7578 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
44d10b1f
RW
7579 (build-system python-build-system)
7580 ;; The package does not come with a setup.py file, so we have to generate
7581 ;; one ourselves.
7582 (arguments
7583 `(#:tests? #f
7584 #:phases
7585 (modify-phases %standard-phases
7586 (add-after 'unpack 'create-setup.py
7587 (lambda _
7588 (call-with-output-file "setup.py"
7589 (lambda (port)
7590 (format port "\
7591from setuptools import setup
7592setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7593" ,version))))))))
7594 (home-page "https://github.com/takluyver/entrypoints")
7595 (synopsis "Discover and load entry points from installed Python packages")
7596 (description "Entry points are a way for Python packages to advertise
7597objects with some common interface. The most common examples are
7598@code{console_scripts} entry points, which define shell commands by
7599identifying a Python function to run. The @code{entrypoints} module contains
7600functions to find and load entry points.")
7601 (license license:expat)))
7602
7603(define-public python2-entrypoints
7604 (package-with-python2 python-entrypoints))
7605
7606(define-public python-nbconvert
7607 (package
7608 (name "python-nbconvert")
7609 (version "5.0.0b1")
7610 (source
7611 (origin
7612 (method url-fetch)
7613 (uri (pypi-uri "nbconvert" version))
7614 (sha256
7615 (base32
7616 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7617 (build-system python-build-system)
7618 (arguments
7619 `(;; The "bdist_egg" target is disabled by default, causing the installation
7620 ;; to fail.
7621 #:configure-flags (list "bdist_egg")
7622 ;; FIXME: 5 failures, 40 errors.
7623 #:tests? #f))
7624 ;; #:phases
7625 ;; (modify-phases %standard-phases
7626 ;; (replace 'check
7627 ;; (lambda _
7628 ;; (zero? (system* "py.test" "-v")))))
7629 (native-inputs
7630 `(("python-pytest" ,python-pytest)))
7631 (propagated-inputs
7632 `(("python-bleach" ,python-bleach)
7633 ("python-entrypoints" ,python-entrypoints)
7634 ("python-jinja2" ,python-jinja2)
7635 ("python-jupyter-core" ,python-jupyter-core)
7636 ("python-mistune" ,python-mistune)
7637 ("python-nbformat" ,python-nbformat)
7638 ("python-pygments" ,python-pygments)
7639 ("python-traitlets" ,python-traitlets)))
7640 (home-page "http://jupyter.org")
7641 (synopsis "Converting Jupyter Notebooks")
7642 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7643notebooks to various other formats via Jinja templates. It allows you to
7644convert an @code{.ipynb} notebook file into various static formats including:
7645
7646@enumerate
7647@item HTML
7648@item LaTeX
7649@item PDF
7650@item Reveal JS
7651@item Markdown (md)
7652@item ReStructured Text (rst)
7653@item executable script
7654@end enumerate\n")
7655 (license license:bsd-3)))
7656
7657(define-public python2-nbconvert
7658 (package-with-python2 python-nbconvert))
7659
44d10b1f
RW
7660(define-public python-notebook
7661 (package
7662 (name "python-notebook")
7663 (version "5.7.4")
7664 (source (origin
7665 (method url-fetch)
7666 (uri (pypi-uri "notebook" version))
7667 (sha256
7668 (base32
7669 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
7670 (build-system python-build-system)
7671 (arguments
7672 `(#:phases
7673 (modify-phases %standard-phases
7674 (replace 'check
7675 (lambda _
7676 ;; These tests require a browser
7677 (delete-file-recursively "notebook/tests/selenium")
7678 ;; Some tests need HOME
7679 (setenv "HOME" "/tmp")
7680 ;; This file contains "warningfilters", which are not supported
7681 ;; by this version of nose.
7682 (delete-file "setup.cfg")
7683 (with-directory-excursion "/tmp"
7684 (invoke "nosetests" "-v"))
7685 #t)))))
7686 (propagated-inputs
7687 `(("python-jupyter-core" ,python-jupyter-core)
7688 ("python-nbformat" ,python-nbformat)
7689 ("python-nbconvert" ,python-nbconvert)
7690 ("python-prometheus-client" ,python-prometheus-client)
7691 ("python-send2trash" ,python-send2trash)
7692 ("python-terminado" ,python-terminado)))
7693 (native-inputs
7694 `(("python-nose" ,python-nose)
7695 ("python-sphinx" ,python-sphinx)
7696 ("python-requests" ,python-requests)))
7697 (home-page "http://jupyter.org/")
7698 (synopsis "Web-based notebook environment for interactive computing")
7699 (description
7700 "The Jupyter HTML notebook is a web-based notebook environment for
7701interactive computing.")
7702 (properties `((python2-variant . ,(delay python2-notebook))))
7703 (license license:bsd-3)))
7704
7705(define-public python2-notebook
7706 (let ((base (package-with-python2
7707 (strip-python2-variant python-notebook))))
7708 (package (inherit base)
7709 (native-inputs
7710 `(("python2-mock" ,python2-mock)
7711 ,@(package-native-inputs base)))
7712 (arguments
7713 (substitute-keyword-arguments (package-arguments base)
7714 ((#:phases phases)
7715 `(modify-phases ,phases
7716 (add-before 'check 'disable-test-case
7717 ;; The test requires network access to localhost. Curiously it
7718 ;; fails with Python 2 only. Simply make the test-case return
7719 ;; immediately.
7720 (lambda _
7721 (substitute*
7722 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7723 (("formats = self.nbconvert_api") "return #")))))))))))
7724
7725(define-public python-widgetsnbextension
7726 (package
7727 (name "python-widgetsnbextension")
7728 (version "3.4.2")
7729 (source
7730 (origin
7731 (method url-fetch)
7732 (uri (pypi-uri "widgetsnbextension" version))
7733 (sha256
7734 (base32
7735 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
7736 (build-system python-build-system)
7737 (propagated-inputs
7738 `(("python-ipykernel" ,python-ipykernel)
7739 ("python-notebook" ,python-notebook)))
7740 (native-inputs
7741 `(("python-certifi" ,python-certifi)
7742 ("python-nose" ,python-nose)))
7743 (home-page "https://ipython.org")
7744 (synopsis "IPython HTML widgets for Jupyter")
7745 (description "This package provides interactive HTML widgets for Jupyter
7746notebooks.")
7747 (license license:bsd-3)))
7748
7749(define-public python2-widgetsnbextension
7750 (package-with-python2 python-widgetsnbextension))
7751
7752(define-public python-ipywidgets
7753 (package
7754 (name "python-ipywidgets")
7755 (version "5.2.2")
7756 (source
7757 (origin
7758 (method url-fetch)
7759 (uri (pypi-uri "ipywidgets" version))
7760 (sha256
7761 (base32
7762 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7763 (build-system python-build-system)
7764 (propagated-inputs
7765 `(("python-ipython" ,python-ipython)
7766 ("python-traitlets" ,python-traitlets)
7767 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7768 (native-inputs
7769 `(("python-nose" ,python-nose)
7770 ("python-pytest" ,python-pytest)))
7771 (home-page "https://ipython.org")
7772 (synopsis "IPython HTML widgets for Jupyter")
7773 (description "Ipywidgets are interactive HTML widgets for Jupyter
7774notebooks and the IPython kernel. Notebooks come alive when interactive
7775widgets are used. Users gain control of their data and can visualize changes
7776in the data.")
7777 (license license:bsd-3)))
7778
7779(define-public python2-ipywidgets
7780 (package-with-python2 python-ipywidgets))
7781
7782(define-public python-jupyter-console
7783 (package
7784 (name "python-jupyter-console")
becb9cbf 7785 (version "6.0.0")
44d10b1f
RW
7786 (source
7787 (origin
7788 (method url-fetch)
7789 (uri (pypi-uri "jupyter_console" version))
7790 (sha256
7791 (base32
becb9cbf 7792 "1xdjw11cppf1fxvwkw2bk13ckkwas3bdah8baingn9296mvfi31h"))))
44d10b1f 7793 (build-system python-build-system)
44d10b1f
RW
7794 (propagated-inputs
7795 `(("python-ipykernel" ,python-ipykernel)
7796 ("python-jupyter-client" ,python-jupyter-client)
becb9cbf 7797 ("python-prompt-toolkit" ,python-prompt-toolkit)
44d10b1f
RW
7798 ("python-pygments" ,python-pygments)))
7799 (native-inputs
7800 `(("python-nose" ,python-nose)))
7801 (home-page "https://jupyter.org")
7802 (synopsis "Jupyter terminal console")
7803 (description "This package provides a terminal-based console frontend for
7804Jupyter kernels. It also allows for console-based interaction with non-Python
7805Jupyter kernels such as IJulia and IRKernel.")
7806 (license license:bsd-3)))
7807
7808(define-public python2-jupyter-console
8e590c81
RW
7809 (package
7810 (name "python2-jupyter-console")
7811 (version "5.2.0")
7812 (source
7813 (origin
7814 (method url-fetch)
7815 (uri (pypi-uri "jupyter_console" version))
7816 (sha256
7817 (base32
7818 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
7819 (build-system python-build-system)
7820 ;; Tests only run in an TTY.
7821 (arguments `(#:tests? #f))
7822 (propagated-inputs
7823 `(("python2-ipykernel" ,python2-ipykernel)
7824 ("python2-jupyter-client" ,python2-jupyter-client)
7825 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
7826 ("python2-pygments" ,python2-pygments)))
7827 (native-inputs
7828 `(("python2-nose" ,python2-nose)))
7829 (home-page "https://jupyter.org")
7830 (synopsis "Jupyter terminal console")
7831 (description "This package provides a terminal-based console frontend for
7832Jupyter kernels. It also allows for console-based interaction with non-Python
7833Jupyter kernels such as IJulia and IRKernel.")
7834 (license license:bsd-3)))
44d10b1f
RW
7835
7836;; The python-ipython and python-jupyter-console require each other. To get
7837;; the functionality in both packages working, strip down the
7838;; python-jupyter-console package when using it as an input to python-ipython.
7839(define python-jupyter-console-minimal
7840 (package
7841 (inherit python-jupyter-console)
7842 (name "python-jupyter-console-minimal")
7843 (arguments
7844 (substitute-keyword-arguments
7845 (package-arguments python-jupyter-console)
7846 ((#:phases phases)
7847 `(modify-phases ,phases
7848 (add-after 'install 'delete-bin
7849 (lambda* (#:key outputs #:allow-other-keys)
7850 ;; Delete the bin files, to avoid conflicts in profiles
7851 ;; where python-ipython and python-jupyter-console are
7852 ;; both present.
7853 (delete-file-recursively
7854 (string-append
7855 (assoc-ref outputs "out") "/bin"))))))))
7856 ;; Remove the python-ipython propagated input, to avoid the cycle
7857 (propagated-inputs
7858 (alist-delete
7859 "python-ipython"
7860 (package-propagated-inputs python-jupyter-console)))))
7861
7862(define-public python-qtconsole
7863 (package
7864 (name "python-qtconsole")
7865 (version "4.4.3")
7866 (source
7867 (origin
7868 (method url-fetch)
7869 (uri (pypi-uri "qtconsole" version))
7870 (sha256
7871 (base32
7872 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
7873 (build-system python-build-system)
7874 (arguments
7875 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
7876 ;; but we only have the LTS version 5.x. This means that there might be
7877 ;; runtime errors, but since this is a dependency of the Jupyter package,
7878 ;; and Jupyter can be used without the qtconsole we can overlook this for
7879 ;; now.
7880 `(#:tests? #f
7881 #:phases
7882 (modify-phases %standard-phases
7883 (add-before 'check 'pre-check
7884 (lambda _
7885 (setenv "QT_QPA_PLATFORM" "offscreen")
7886 #t)))))
7887 (propagated-inputs
7888 `(("python-ipykernel" ,python-ipykernel)
7889 ("python-ipython" ,python-ipython)))
7890 (native-inputs
7891 `(("python-pytest" ,python-pytest)))
7892 (home-page "http://jupyter.org")
7893 (synopsis "Jupyter Qt console")
7894 (description "This package provides a Qt-based console for Jupyter with
7895support for rich media output.")
7896 (license license:bsd-3)))
7897
7898(define-public jupyter
7899 (package
7900 (name "jupyter")
7901 (version "1.0.0")
7902 (source
7903 (origin
7904 (method url-fetch)
7905 (uri (pypi-uri "jupyter" version))
7906 (sha256
7907 (base32
7908 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
7909 (build-system python-build-system)
7910 (arguments '(#:tests? #f)) ; there are none.
7911 (propagated-inputs
7912 `(("python-ipykernel" ,python-ipykernel)
7913 ("python-ipywidgets" ,python-ipywidgets)
7914 ("python-jupyter-console" ,python-jupyter-console)
7915 ("python-nbconvert" ,python-nbconvert)
7916 ("python-notebook" ,python-notebook)
7917 ("python-qtconsole" ,python-qtconsole)))
7918 (native-search-paths
7919 (list (search-path-specification
7920 (variable "JUPYTER_PATH")
7921 (files '("share/jupyter")))))
7922 (home-page "https://jupyter.org")
7923 (synopsis "Web application for interactive documents")
7924 (description
7925 "The Jupyter Notebook is a web application that allows you to create and
7926share documents that contain live code, equations, visualizations and
7927explanatory text. Uses include: data cleaning and transformation, numerical
7928simulation, statistical modeling, machine learning and much more.")
7929 (license license:bsd-3)))
7930
7931(define-public python-chardet
7932 (package
7933 (name "python-chardet")
7934 (version "3.0.4")
7935 (source
7936 (origin
7937 (method url-fetch)
7938 (uri (pypi-uri "chardet" version))
7939 (sha256
7940 (base32
7941 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
7942 (native-inputs
7943 `(("python-hypothesis" ,python-hypothesis)
7944 ("python-pytest" ,python-pytest)
7945 ("python-pytest-runner" ,python-pytest-runner)))
7946 (build-system python-build-system)
7947 (home-page "https://github.com/chardet/chardet")
7948 (synopsis "Universal encoding detector for Python 2 and 3")
7949 (description
7950 "This package provides @code{chardet}, a Python module that can
7951automatically detect a wide range of file encodings.")
7952 (license license:lgpl2.1+)))
7953
7954(define-public python2-chardet
7955 (package-with-python2 python-chardet))
7956
7957(define-public python-docopt
7958 (package
7959 (name "python-docopt")
7960 (version "0.6.2")
7961 (source
7962 (origin
7963 (method url-fetch)
7964 ;; The release on PyPI does not include tests.
7965 (uri (string-append
7966 "https://github.com/docopt/docopt/archive/"
7967 version ".tar.gz"))
7968 (file-name (string-append name "-" version ".tar.gz"))
7969 (sha256
7970 (base32
7971 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
7972 (build-system python-build-system)
7973 (native-inputs
7974 `(("python-pytest" ,python-pytest)))
7975 (arguments
7976 `(#:phases
7977 (modify-phases %standard-phases
7978 (replace 'check
7979 (lambda _ (invoke "py.test"))))))
7980 (home-page "http://docopt.org")
7981 (synopsis "Command-line interface description language for Python")
7982 (description "This library allows the user to define a command-line
7983interface from a program's help message rather than specifying it
4ca7207b 7984programmatically with command-line parsers like @code{getopt} and
44d10b1f
RW
7985@code{argparse}.")
7986 (license license:expat)))
7987
7988(define-public python2-docopt
7989 (package-with-python2 python-docopt))
7990
7991(define-public python-pythondialog
7992 (package
7993 (name "python-pythondialog")
7994 (version "3.4.0")
7995 (source
7996 (origin
7997 (method url-fetch)
7998 (uri (pypi-uri "pythondialog" version))
7999 (sha256
8000 (base32
8001 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
8002 (build-system python-build-system)
8003 (arguments
8004 `(#:phases
8005 (modify-phases %standard-phases
8006 (add-after 'unpack 'patch-path
8007 (lambda* (#:key inputs #:allow-other-keys)
8008 (let* ((dialog (assoc-ref inputs "dialog")))
8009 ;; Since this library really wants to grovel the search path, we
8010 ;; must hardcode dialog's store path into it.
8011 (substitute* "dialog.py"
8012 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8013 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8014 #t))))
8015 #:tests? #f)) ; no test suite
8016 (propagated-inputs
8017 `(("dialog" ,dialog)))
8018 (home-page "http://pythondialog.sourceforge.net/")
8019 (synopsis "Python interface to the UNIX dialog utility")
8020 (description "A Python wrapper for the dialog utility. Its purpose is to
8021provide an easy to use, pythonic and comprehensive Python interface to dialog.
8022This allows one to make simple text-mode user interfaces on Unix-like systems")
8023 (license license:lgpl2.1)
8024 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8025
8026(define-public python2-pythondialog
8027 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8028 (package
8029 (inherit base)
8030 (version (package-version python-pythondialog))
8031 (source (origin
8032 (method url-fetch)
8033 (uri (pypi-uri "python2-pythondialog" version))
8034 (sha256
8035 (base32
8036 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
8037
8038(define-public python-configobj
8039 (package
8040 (name "python-configobj")
8041 (version "5.0.6")
8042 (source (origin
8043 (method url-fetch)
b0758fbb 8044 (uri (pypi-uri "configobj" version))
44d10b1f
RW
8045 (sha256
8046 (base32
8047 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8048 ;; Patch setup.py so it looks for python-setuptools, which is
8049 ;; required to parse the keyword 'install_requires' in setup.py.
8050 (patches (search-patches "python-configobj-setuptools.patch"))))
8051 (build-system python-build-system)
8052 (propagated-inputs
8053 `(("python-six" ,python-six)))
8054 (synopsis "Config file reading, writing and validation")
8055 (description "ConfigObj is a simple but powerful config file reader and
8056writer: an ini file round tripper. Its main feature is that it is very easy to
8057use, with a straightforward programmer’s interface and a simple syntax for
8058config files.")
8059 (home-page "https://github.com/DiffSK/configobj")
8060 (license license:bsd-3)))
8061
8062(define-public python2-configobj
8063 (package-with-python2 python-configobj))
8064
8065(define-public python-configargparse
8066 (package
8067 (name "python-configargparse")
86ae491f 8068 (version "0.14.0")
44d10b1f
RW
8069 (source (origin
8070 (method url-fetch)
8071 (uri (pypi-uri "ConfigArgParse" version))
8072 (sha256
8073 (base32
86ae491f 8074 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
44d10b1f
RW
8075 (build-system python-build-system)
8076 (native-inputs
8077 `(("python-pyyaml" ,python-pyyaml)))
8078 (arguments
8079 `(#:phases
8080 (modify-phases %standard-phases
8081 (replace 'check
8082 (lambda _
8083 ;; Bypass setuptools-shim because one test relies on "setup.py"
8084 ;; being the first argument passed to the python call.
8085 ;;
8086 ;; NOTE: Many tests do not run because they rely on Python's
8087 ;; built-in test.test_argparse, but we remove the unit tests from
8088 ;; our Python installation.
8089 (invoke "python" "setup.py" "test"))))))
8090 (synopsis "Replacement for argparse")
8091 (description "A drop-in replacement for argparse that allows options to also
8092be set via config files and/or environment variables.")
8093 (home-page "https://github.com/bw2/ConfigArgParse")
8094 (license license:expat)))
8095
8096(define-public python2-configargparse
8097 (package-with-python2 python-configargparse))
8098
8099(define-public python-argparse-manpage
8100 (package
8101 (name "python-argparse-manpage")
8102 (version "1.1")
8103 (source
8104 (origin
8105 (method url-fetch)
8106 (uri (pypi-uri "argparse-manpage" version))
8107 (sha256
8108 (base32
8109 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
8110 (build-system python-build-system)
8111 (home-page "https://github.com/praiskup/argparse-manpage")
8112 (synopsis "Build manual page from Python's ArgumentParser object")
8113 (description
8114 "This package provides tools to build manual pages from Python's
8115@code{ArgumentParser} object.")
8116 (license license:asl2.0)))
8117
3e8f76d8
RW
8118(define-public python-contextlib2
8119 (package
8120 (name "python-contextlib2")
8121 (version "0.5.5")
8122 (source
8123 (origin
8124 (method url-fetch)
8125 (uri (pypi-uri "contextlib2" version))
8126 (sha256
8127 (base32
8128 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8129 (build-system python-build-system)
8130 (home-page "http://contextlib2.readthedocs.org/")
8131 (synopsis "Tools for decorators and context managers")
8132 (description "This module is primarily a backport of the Python
81333.2 contextlib to earlier Python versions. Like contextlib, it
8134provides utilities for common tasks involving decorators and context
8135managers. It also contains additional features that are not part of
8136the standard library.")
8137 (license license:psfl)))
8138
44d10b1f
RW
8139(define-public python2-contextlib2
8140 (package
8141 (name "python2-contextlib2")
8142 (version "0.5.5")
8143 (source
8144 (origin
8145 (method url-fetch)
8146 (uri (pypi-uri "contextlib2" version))
8147 (sha256
8148 (base32
8149 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8150 (build-system python-build-system)
8151 (arguments
8152 `(#:python ,python-2
8153 #:phases
8154 (modify-phases %standard-phases
8155 (replace 'check
8156 (lambda _ (invoke "python" "test_contextlib2.py" "-v"))))))
8157 (native-inputs
8158 `(("python2-unittest2" ,python2-unittest2)))
8159 (home-page "http://contextlib2.readthedocs.org/")
8160 (synopsis "Tools for decorators and context managers")
8161 (description "This module is primarily a backport of the Python
81623.2 contextlib to earlier Python versions. Like contextlib, it
8163provides utilities for common tasks involving decorators and context
8164managers. It also contains additional features that are not part of
8165the standard library.")
8166 (license license:psfl)))
8167
8168(define-public python-texttable
8169 (package
8170 (name "python-texttable")
52cc4892 8171 (version "0.9.1")
44d10b1f
RW
8172 (source
8173 (origin
8174 (method url-fetch)
8175 (uri (pypi-uri "texttable" version))
8176 (sha256
8177 (base32
52cc4892 8178 "0yawv64c0zbawwv6zz84whb32fnb2n9jylwjcfsrcdgh7xvl340i"))))
44d10b1f
RW
8179 (build-system python-build-system)
8180 (arguments '(#:tests? #f)) ; no tests
8181 (home-page "https://github.com/foutaise/texttable/")
8182 (synopsis "Python module for creating simple ASCII tables")
8183 (description "Texttable is a Python module for creating simple ASCII
8184tables.")
8185 (license license:lgpl2.1+)))
8186
8187(define-public python2-texttable
8188 (package-with-python2 python-texttable))
8189
8190(define-public python-atomicwrites
8191 (package
8192 (name "python-atomicwrites")
8193 (version "1.1.5")
8194 (source (origin
8195 (method url-fetch)
8196 (uri (pypi-uri "atomicwrites" version))
8197 (sha256
8198 (base32
8199 "11bm90fwm2avvf4f3ib8g925w7jr4m11vcsinn1bi6ns4bm32214"))))
8200 (build-system python-build-system)
8201 (synopsis "Atomic file writes in Python")
8202 (description "Library for atomic file writes using platform dependent tools
8203for atomic file system operations.")
8204 (home-page "https://github.com/untitaker/python-atomicwrites")
8205 (license license:expat)))
8206
8207(define-public python2-atomicwrites
8208 (package-with-python2 python-atomicwrites))
8209
8210(define-public python-click-threading
8211 (package
8212 (name "python-click-threading")
8213 (version "0.4.4")
8214 (source (origin
8215 (method url-fetch)
8216 (uri (pypi-uri "click-threading" version))
8217 (sha256
8218 (base32
8219 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
8220 (build-system python-build-system)
8221 (propagated-inputs
8222 `(("python-click" ,python-click)))
8223 (synopsis "Utilities for multithreading in Click")
8224 (description "This package provides utilities for multithreading in Click
8225applications.")
8226 (home-page "https://github.com/click-contrib/click-threading")
8227 (license license:expat)))
8228
8229(define-public python-click-log
8230 (package
8231 (name "python-click-log")
8232 (version "0.3.2")
8233 (source (origin
8234 (method url-fetch)
8235 (uri (pypi-uri "click-log" version))
8236 (sha256
8237 (base32
8238 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
8239 (build-system python-build-system)
8240 (propagated-inputs
8241 `(("python-click" ,python-click)))
8242 (synopsis "Logging for click applications")
8243 (description "This package provides a Python library for logging Click
8244applications.")
8245 (home-page "https://github.com/click-contrib/click-log")
8246 (license license:expat)))
8247
8248(define-public python-apipkg
8249 (package
8250 (name "python-apipkg")
8251 (version "1.4")
8252 (source (origin
8253 (method url-fetch)
8254 (uri (pypi-uri "apipkg" version))
8255 (sha256
8256 (base32
8257 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8258 (build-system python-build-system)
8259 (native-inputs
8260 `(("python-pytest" ,python-pytest)))
8261 (synopsis "Namespace control and lazy-import mechanism")
8262 (description "With apipkg you can control the exported namespace of a Python
8263package and greatly reduce the number of imports for your users. It is a small
8264pure Python module that works on virtually all Python versions.")
8265 (home-page "https://github.com/pytest-dev/apipkg")
8266 (license license:expat)))
8267
8268(define-public python2-apipkg
8269 (package-with-python2 python-apipkg))
8270
8271(define-public python-execnet
8272 (package
8273 (name "python-execnet")
8274 (version "1.4.1")
8275 (source (origin
8276 (method url-fetch)
8277 (uri (pypi-uri "execnet" version))
8278 (sha256
8279 (base32
8280 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8281 (build-system python-build-system)
8282 (arguments
8283 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8284 ;; The two test failures are caused by the lack of an `ssh` executable.
8285 ;; The test suite can be run with pytest after the 'install' phase.
8286 #:tests? #f))
8287 (native-inputs
8288 `(("python-pytest" ,python-pytest)
8289 ("python-setuptools-scm" ,python-setuptools-scm)))
8290 (propagated-inputs
8291 `(("python-apipkg" ,python-apipkg)))
8292 (synopsis "Rapid multi-Python deployment")
8293 (description "Execnet provides a share-nothing model with
8294channel-send/receive communication for distributing execution across many
8295Python interpreters across version, platform and network barriers. It has a
8296minimal and fast API targeting the following uses:
8297@enumerate
8298@item distribute tasks to (many) local or remote CPUs
8299@item write and deploy hybrid multi-process applications
8300@item write scripts to administer multiple environments
8301@end enumerate")
8302 (home-page "http://codespeak.net/execnet/")
8303 (license license:expat)))
8304
8305(define-public python2-execnet
8306 (package-with-python2 python-execnet))
8307
8308(define-public python-icalendar
8309 (package
8310 (name "python-icalendar")
8311 (version "4.0.3")
8312 (source (origin
8313 (method url-fetch)
8314 (uri (pypi-uri "icalendar" version))
8315 (sha256
8316 (base32
8317 "0mk3dk1dxkcm46jy48v27j2w2349iv4sbimqj1yb5js43mx49hh7"))))
8318 (build-system python-build-system)
8319 (propagated-inputs
8320 `(("python-dateutil" ,python-dateutil)
8321 ("python-pytz" ,python-pytz)))
8322 (synopsis "Python library for parsing iCalendar files")
8323 (description "The icalendar package is a parser/generator of iCalendar
8324files for use with Python.")
8325 (home-page "https://github.com/collective/icalendar")
8326 (license license:bsd-2)))
8327
44d10b1f
RW
8328(define-public python-args
8329 (package
8330 (name "python-args")
8331 (version "0.1.0")
8332 (source (origin
8333 (method url-fetch)
8334 (uri (pypi-uri "args" version))
8335 (sha256
8336 (base32
8337 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8338 (build-system python-build-system)
8339 (home-page "https://github.com/kennethreitz/args")
8340 (synopsis "Command-line argument parser")
8341 (description
8342 "This library provides a Python module to parse command-line arguments.")
8343 (license license:bsd-3)))
8344
8345(define-public python2-args
8346 (package-with-python2 python-args))
8347
8348(define-public python-clint
8349 (package
8350 (name "python-clint")
8351 (version "0.5.1")
8352 (source (origin
8353 (method url-fetch)
8354 (uri (pypi-uri "clint" version))
8355 (sha256
8356 (base32
8357 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8358 (build-system python-build-system)
8359 (arguments
8360 '(#:phases
8361 (modify-phases %standard-phases
8362 (replace 'check
8363 (lambda _ (invoke "py.test" "-v"))))))
8364 (native-inputs
8365 `(("python-pytest" ,python-pytest)))
8366 (propagated-inputs
8367 `(("python-args" ,python-args)))
8368 (home-page "https://github.com/kennethreitz/clint")
8369 (synopsis "Command-line interface tools")
8370 (description
8371 "Clint is a Python module filled with a set of tools for developing
8372command-line applications, including tools for colored and indented
8373output, progress bar display, and pipes.")
8374 (license license:isc)))
8375
8376(define-public python2-clint
8377 (package-with-python2 python-clint))
8378
44d10b1f
RW
8379(define-public python-rply
8380 (package
8381 (name "python-rply")
8382 (version "0.7.5")
8383 (source (origin
8384 (method url-fetch)
8385 (uri (pypi-uri "rply" version))
8386 (sha256
8387 (base32
8388 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
8389 (build-system python-build-system)
8390 (propagated-inputs
8391 `(("python-appdirs" ,python-appdirs)))
8392 (home-page "https://github.com/alex/rply")
8393 (synopsis "Parser generator for Python")
8394 (description
8395 "This package provides a pure Python based parser generator, that also
8396works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8397with a new public API, and RPython support.")
8398 (license license:bsd-3)))
8399
8400(define-public python2-rply
8401 (package-with-python2 python-rply))
8402
8403(define-public python-hy
8404 (package
8405 (name "python-hy")
8406 (version "0.13.0")
8407 (source (origin
8408 (method url-fetch)
8409 (uri (pypi-uri "hy" version))
8410 (sha256
8411 (base32
8412 "19sfymaksx9jhksfnb15ahid46mzrhdfzz6yy2craz2qnzvpmky8"))))
8413 (build-system python-build-system)
8414 (arguments
8415 '(#:phases
8416 (modify-phases %standard-phases
8417 (replace 'check
8418 (lambda _
8419 ;; Tests require write access to HOME.
8420 (setenv "HOME" "/tmp")
8421 (invoke "nosetests"))))))
8422 (native-inputs
8423 `(("python-coverage" ,python-coverage)
8424 ("python-nose" ,python-nose)))
8425 (propagated-inputs
8426 `(("python-astor" ,python-astor)
8427 ("python-clint" ,python-clint)
8428 ("python-rply" ,python-rply)))
8429 (home-page "http://hylang.org/")
8430 (synopsis "Lisp frontend to Python")
8431 (description
8432 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8433its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8434Python at your fingertips, in Lisp form.")
8435 (license license:expat)))
8436
8437(define-public python2-hy
8438 (package-with-python2 python-hy))
8439
8440(define-public python2-functools32
8441 (package
8442 (name "python2-functools32")
8443 (version "3.2.3-2")
8444 (source
8445 (origin
8446 (method url-fetch)
8447 (uri (pypi-uri "functools32" version))
8448 (sha256
8449 (base32
8450 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8451 (build-system python-build-system)
8452 (arguments
8453 `(#:python ,python-2
8454 #:tests? #f)) ; no test target
8455 (home-page "https://github.com/MiCHiLU/python-functools32")
8456 (synopsis
8457 "Backport of the functools module from Python 3.2.3")
8458 (description
8459 "This package is a backport of the @code{functools} module from Python
84603.2.3 for use with older versions of Python and PyPy.")
8461 (license license:expat)))
8462
8463(define-public python2-subprocess32
8464 (package
8465 (name "python2-subprocess32")
8466 (version "3.2.7")
8467 (source (origin
8468 (method url-fetch)
8469 (uri (pypi-uri "subprocess32" version))
8470 (sha256
8471 (base32
8472 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
8473 (patches
8474 (search-patches "python2-subprocess32-disable-input-test.patch"))))
8475 (build-system python-build-system)
8476 (arguments
8477 `(#:python ,python-2
8478 ;; The test suite fails with Python > 2.7.13:
8479 ;; import test.support
8480 ;; ImportError: No module named support
8481 #:tests? #f
8482 #:phases
8483 (modify-phases %standard-phases
8484 (add-after 'unpack 'patch-/bin/sh
8485 (lambda _
8486 (substitute* '("subprocess32.py"
8487 "test_subprocess32.py")
8488 (("/bin/sh") (which "sh")))
8489 #t)))))
8490 (home-page "https://github.com/google/python-subprocess32")
8491 (synopsis "Backport of the subprocess module from Python 3.2")
8492 (description
8493 "This is a backport of the @code{subprocess} standard library module
8494from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
8495new features. On POSIX systems it is guaranteed to be reliable when used
8496in threaded applications. It includes timeout support from Python 3.3 but
8497otherwise matches 3.2’s API.")
8498 (license license:psfl)))
8499
8500(define-public python2-futures
8501 (package
8502 (name "python2-futures")
8503 (version "3.2.0")
8504 (source
8505 (origin
8506 (method url-fetch)
8507 (uri (pypi-uri "futures" version))
8508 (sha256
8509 (base32
8510 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
8511 (build-system python-build-system)
8512 (arguments `(#:python ,python-2
8513 ;; FIXME: Python 2.7.14 moved the test.support library,
8514 ;; but our package has not yet been adjusted. Enable
8515 ;; tests when the python2 package has been fixed.
8516 #:tests? #f))
8517 (home-page "https://github.com/agronholm/pythonfutures")
8518 (synopsis
8519 "Backport of the concurrent.futures package from Python 3.2")
8520 (description
8521 "The concurrent.futures module provides a high-level interface for
8522asynchronously executing callables. This package backports the
8523concurrent.futures package from Python 3.2")
8524 (license license:bsd-3)))
8525
8526(define-public python-promise
8527 (package
8528 (name "python-promise")
8529 (version "0.4.2")
8530 (source
8531 (origin
8532 (method url-fetch)
8533 (uri (pypi-uri "promise" version))
8534 (sha256
8535 (base32
8536 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8537 (build-system python-build-system)
8538 ;; Tests wants python-futures, which is a python2 only program, and
8539 ;; can't be found by python-promise at test time.
8540 (arguments `(#:tests? #f))
8541 (home-page "https://github.com/syrusakbary/promise")
8542 (synopsis "Promises/A+ implementation for Python")
8543 (description
8544 "Promises/A+ implementation for Python")
8545 (properties `((python2-variant . ,(delay python2-promise))))
8546 (license license:expat)))
8547
8548(define-public python2-promise
8549 (let ((promise (package-with-python2
8550 (strip-python2-variant python-promise))))
8551 (package (inherit promise)
8552 (arguments (substitute-keyword-arguments (package-arguments promise)
8553 ((#:tests? _) #t)))
8554 (native-inputs
8555 `(("python2-futures" ,python2-futures)
8556 ("python2-pytest" ,python2-pytest)
8557 ,@(package-native-inputs promise))))))
8558
d71d85cd
RW
8559(define-public python-progressbar33
8560 (package
8561 (name "python-progressbar33")
8562 (version "2.4")
8563 (source
8564 (origin
8565 (method url-fetch)
8566 (uri (pypi-uri "progressbar33" version))
8567 (sha256
8568 (base32
8569 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
8570 (build-system python-build-system)
8571 (home-page "http://github.com/germangh/python-progressbar")
8572 (synopsis "Text progress bar library for Python")
8573 (description
8574 "This package provides a text progress bar library for Python. This
8575version only differs from the original @code{progressbar} package in that it
8576uses relative package imports instead of absolute imports, which is necessary
8577for the module to work under Python 3.3.")
8578 ;; Either or both of these licenses may be selected.
8579 (license (list license:lgpl2.1+ license:bsd-3))))
8580
44d10b1f
RW
8581(define-public python-colorama
8582 (package
8583 (name "python-colorama")
8584 (version "0.3.9")
8585 (source
8586 (origin
8587 (method url-fetch)
8588 (uri (pypi-uri "colorama" version))
8589 (sha256
8590 (base32
8591 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
8592 (build-system python-build-system)
8593 (synopsis "Colored terminal text rendering for Python")
8594 (description "Colorama is a Python library for rendering colored terminal
8595text.")
8596 (home-page "https://pypi.python.org/pypi/colorama")
8597 (license license:bsd-3)))
8598
8599(define-public python2-colorama
8600 (package-with-python2 python-colorama))
8601
8602(define-public python-rsa
8603 (package
8604 (name "python-rsa")
8605 (version "3.4.2")
8606 (source
8607 (origin
8608 (method url-fetch)
8609 (uri (pypi-uri "rsa" version))
8610 (sha256
8611 (base32
8612 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
8613 (build-system python-build-system)
8614 (propagated-inputs
8615 `(("python-pyasn1" ,python-pyasn1)))
8616 (synopsis "Pure-Python RSA implementation")
8617 (description "Python-RSA is a pure-Python RSA implementation. It supports
8618encryption and decryption, signing and verifying signatures, and key
8619generation according to PKCS#1 version 1.5. It can be used as a Python
8620library as well as on the command line.")
8621 (home-page "https://stuvel.eu/rsa")
8622 (license license:asl2.0)))
8623
8624(define-public python2-rsa
8625 (package-with-python2 python-rsa))
8626
8627(define-public python-pluggy
8628 (package
8629 (name "python-pluggy")
8630 (version "0.7.1")
8631 (source
8632 (origin
8633 (method url-fetch)
8634 (uri (pypi-uri "pluggy" version))
8635 (sha256
8636 (base32
8637 "1qbn70mksmr03hac6jgp6fiqc4l7859z8dchx2x950vhlij87swm"))))
8638 (build-system python-build-system)
8639 (native-inputs
8640 `(("python-setuptools-scm" ,python-setuptools-scm)))
8641 (synopsis "Plugin and hook calling mechanism for Python")
8642 (description "Pluggy is an extraction of the plugin manager as used by
8643Pytest but stripped of Pytest specific details.")
8644 (home-page "https://pypi.python.org/pypi/pluggy")
8645 (license license:expat)))
8646
8647(define-public python2-pluggy
8648 (package-with-python2 python-pluggy))
8649
8650(define-public python-tox
8651 (package
8652 (name "python-tox")
8653 (version "2.8.1")
8654 (source
8655 (origin
8656 (method url-fetch)
8657 (uri (pypi-uri "tox" version))
8658 (sha256
8659 (base32
8660 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
8661 (build-system python-build-system)
8662 (arguments
8663 ;; FIXME: Tests require pytest-timeout, which itself requires
8664 ;; pytest>=2.8.0 for installation.
8665 '(#:tests? #f))
8666 (propagated-inputs
8667 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
8668 ("python-py" ,python-py)
8669 ("python-virtualenv" ,python-virtualenv)))
8670 (native-inputs
8671 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
8672 ("python-pytest" ,python-pytest) ; >= 2.3.5
8673 ("python-setuptools-scm" ,python-setuptools-scm)))
8674 (home-page "http://tox.testrun.org/")
8675 (synopsis "Virtualenv-based automation of test activities")
8676 (description "Tox is a generic virtualenv management and test command line
8677tool. It can be used to check that a package installs correctly with
8678different Python versions and interpreters, or run tests in each type of
8679supported environment, or act as a frontend to continuous integration
8680servers.")
8681 (license license:expat)))
8682
8683(define-public python2-tox
8684 (package-with-python2 python-tox))
8685
8686(define-public python-jmespath
8687 (package
8688 (name "python-jmespath")
8689 (version "0.9.3")
8690 (source
8691 (origin
8692 (method url-fetch)
8693 (uri (pypi-uri "jmespath" version))
8694 (sha256
8695 (base32
8696 "0r7wc7fsxmlwzxx9j1j7rms06c6xs6d4sysirdhz1jk2mb4x90ba"))))
8697 (build-system python-build-system)
8698 (native-inputs
8699 `(("python-nose" ,python-nose)))
8700 (synopsis "JSON Matching Expressions")
8701 (description "JMESPath (pronounced “james path”) is a Python library that
8702allows one to declaratively specify how to extract elements from a JSON
8703document.")
8704 (home-page "https://github.com/jmespath/jmespath.py")
8705 (license license:expat)))
8706
8707(define-public python2-jmespath
8708 (package-with-python2 python-jmespath))
8709
8710(define-public python-botocore
8711 (package
7bcf827c
RW
8712 (name "python-botocore")
8713 (version "1.12.149")
8714 (source
8715 (origin
8716 (method url-fetch)
8717 (uri (pypi-uri "botocore" version))
8718 (sha256
8719 (base32
8720 "12597f74khp3ngwr282cb949w0gcqj20rkfc3x275dijavyy5cmf"))))
8721 (build-system python-build-system)
8722 (arguments
8723 ;; FIXME: Many tests are failing.
8724 '(#:tests? #f))
8725 (propagated-inputs
8726 `(("python-dateutil" ,python-dateutil)
8727 ("python-docutils" ,python-docutils)
8728 ("python-jmespath" ,python-jmespath)))
8729 (native-inputs
8730 `(("python-mock" ,python-mock)
8731 ("python-nose" ,python-nose)
8732 ("behave" ,behave)
8733 ("python-tox" ,python-tox)
8734 ("python-urllib3" ,python-urllib3)
8735 ("python-wheel" ,python-wheel)))
8736 (home-page "https://github.com/boto/botocore")
8737 (synopsis "Low-level interface to AWS")
8738 (description "Botocore is a Python library that provides a low-level
44d10b1f 8739interface to the Amazon Web Services (AWS) API.")
7bcf827c 8740 (license license:asl2.0)))
44d10b1f
RW
8741
8742(define-public python2-botocore
8743 (package-with-python2 python-botocore))
8744
8745(define-public python-xdo
8746 (package
8747 (name "python-xdo")
8748 (version "0.3")
8749 (source (origin
8750 (method url-fetch)
8751 (uri (string-append
8752 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8753 "python-xdo_" version ".orig.tar.gz"))
8754 (sha256
8755 (base32
8756 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
8757 (build-system python-build-system)
8758 (arguments
8759 '(#:phases
8760 (modify-phases %standard-phases
8761 (add-before 'install 'patch-libxdo-path
8762 ;; Hardcode the path of dynamically loaded libxdo library.
8763 (lambda* (#:key inputs #:allow-other-keys)
8764 (let ((libxdo (string-append
8765 (assoc-ref inputs "xdotool")
8766 "/lib/libxdo.so")))
8767 (substitute* "xdo/_xdo.py"
8768 (("find_library\\(\"xdo\"\\)")
8769 (simple-format #f "\"~a\"" libxdo)))
8770 #t))))
8771 #:tests? #f)) ; no tests provided
8772 (propagated-inputs
8773 `(("python-six" ,python-six)))
8774 (inputs
8775 `(("xdotool" ,xdotool)
8776 ("libX11" ,libx11)))
8777 (home-page "https://tracker.debian.org/pkg/python-xdo")
8778 (synopsis "Python library for simulating X11 keyboard/mouse input")
8779 (description "Provides bindings to libxdo for manipulating X11 via simulated
8780input. (Note that this is mostly a legacy library; you may wish to look at
8781python-xdo for newer bindings.)")
8782 (license license:bsd-3)))
8783
8784(define-public python2-xdo
8785 (package-with-python2 python-xdo))
8786
8787(define-public python-mako
8788 (package
8789 (name "python-mako")
6bf53ad5 8790 (version "1.1.0")
44d10b1f
RW
8791 (source
8792 (origin
8793 (method url-fetch)
8794 (uri (pypi-uri "Mako" version))
8795 (sha256
8796 (base32
6bf53ad5 8797 "0jqa3qfpykyn4fmkn0kh6043sfls7br8i2bsdbccazcvk9cijsd3"))))
44d10b1f 8798 (build-system python-build-system)
6bf53ad5
MB
8799 (arguments
8800 `(#:phases (modify-phases %standard-phases
8801 (replace 'check
8802 (lambda _
8803 (invoke "pytest" "-vv"))))))
44d10b1f
RW
8804 (propagated-inputs
8805 `(("python-markupsafe" ,python-markupsafe)))
8806 (native-inputs
8807 `(("python-mock" ,python-mock)
44d10b1f 8808 ("python-pytest" ,python-pytest)))
7016e620 8809 (home-page "https://www.makotemplates.org/")
44d10b1f
RW
8810 (synopsis "Templating language for Python")
8811 (description "Mako is a templating language for Python that compiles
8812templates into Python modules.")
8813 (license license:expat)))
8814
8815(define-public python2-mako
8816 (package-with-python2 python-mako))
8817
8818(define-public python-waitress
8819 (package
8820 (name "python-waitress")
8821 (version "1.1.0")
8822 (source
8823 (origin
8824 (method url-fetch)
8825 (uri (pypi-uri "waitress" version))
8826 (patches (search-patches "python-waitress-fix-tests.patch"))
8827 (sha256
8828 (base32
8829 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
8830 (build-system python-build-system)
8831 (home-page "https://github.com/Pylons/waitress")
8832 (synopsis "Waitress WSGI server")
8833 (description "Waitress is meant to be a production-quality pure-Python WSGI
8834server with very acceptable performance.")
8835 (license license:zpl2.1)))
8836
8837(define-public python2-waitress
8838 (package-with-python2 python-waitress))
8839
8840(define-public python-pyquery
8841 (package
8842 (name "python-pyquery")
8843 (version "1.2.17")
8844 (source
8845 (origin
8846 (method url-fetch)
8847 (uri (pypi-uri "pyquery" version))
8848 (sha256
8849 (base32
8850 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
8851 (build-system python-build-system)
8852 (native-inputs
8853 `(("python-webob" ,python-webob)
8854 ("python-webtest" ,python-webtest)))
8855 (propagated-inputs
8856 `(("python-lxml" ,python-lxml)
8857 ("python-cssselect" ,python-cssselect)))
8858 (home-page "https://github.com/gawel/pyquery")
8859 (synopsis "Make jQuery-like queries on xml documents")
8860 (description "pyquery allows you to make jQuery queries on xml documents.
8861The API is as much as possible the similar to jQuery. pyquery uses lxml for
8862fast xml and html manipulation.")
8863 (license license:bsd-3)))
8864
44d10b1f
RW
8865(define-public python-anyjson
8866 (package
8867 (name "python-anyjson")
8868 (version "0.3.3")
8869 (source
8870 (origin
8871 (method url-fetch)
8872 (uri (pypi-uri "anyjson" version))
8873 (sha256
8874 (base32
8875 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
8876 (build-system python-build-system)
8877 (arguments
8878 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
8879 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
8880 ;; whatever) so this transformation needs to be done before the tests
8881 ;; can be run. Maybe we could add a build step to transform beforehand
8882 ;; but it could be annoying/difficult.
8883 ;; We can enable tests for the Python 2 version, though, and do below.
8884 #:tests? #f))
8885 (home-page "https://bitbucket.org/runeh/anyjson/")
8886 (synopsis
8887 "Wraps best available JSON implementation in a common interface")
8888 (description
8889 "Anyjson loads whichever is the fastest JSON module installed
8890and provides a uniform API regardless of which JSON implementation is used.")
8891 (license license:bsd-3)
8892 (properties `((python2-variant . ,(delay python2-anyjson))))))
8893
8894(define-public python2-anyjson
8895 (let ((anyjson (package-with-python2
8896 (strip-python2-variant python-anyjson))))
8897 (package
8898 (inherit anyjson)
8899 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
8900 #:tests? #t
8901 ,@(package-arguments anyjson)))
8902 (native-inputs `(("python2-nose" ,python2-nose))))))
8903
8904(define-public python-amqp
8905 (package
8906 (name "python-amqp")
8907 (version "2.3.2")
8908 (source
8909 (origin
8910 (method url-fetch)
8911 (uri (pypi-uri "amqp" version))
8912 (sha256
8913 (base32
8914 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
8915 (build-system python-build-system)
8916 (native-inputs
8917 `(("python-case" ,python-case)
8918 ("python-pytest-sugar" ,python-pytest-sugar)
8919 ("python-mock" ,python-mock)))
8920 (propagated-inputs
8921 `(("python-vine" ,python-vine)))
8922 (home-page "https://github.com/celery/py-amqp")
8923 (synopsis
8924 "Low-level AMQP client for Python (fork of amqplib)")
8925 (description
8926 "This is a fork of amqplib which was originally written by Barry Pederson.
8927It is maintained by the Celery project, and used by kombu as a pure python
8928alternative when librabbitmq is not available.")
8929 (license license:lgpl2.1+)
8930 (properties `((python2-variant . ,(delay python2-amqp))))))
8931
8932(define-public python2-amqp
8933 (let ((amqp (package-with-python2
8934 (strip-python2-variant python-amqp))))
8935 (package
8936 (inherit amqp)
8937 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
8938 ;; unmaintained. Weirdly, does not do this on the python 3
8939 ;; version?
8940 #:tests? #f
8941 ,@(package-arguments amqp))))))
8942
8943(define-public python-txamqp
8944 (package
8945 (name "python-txamqp")
8946 (version "0.8.2")
8947 (source
8948 (origin
8949 (method url-fetch)
8950 (uri (pypi-uri "txAMQP" version))
8951 (sha256
8952 (base32
8953 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
8954 (build-system python-build-system)
8955 (propagated-inputs
8956 `(("python-six" ,python-six)
8957 ("python-twisted" ,python-twisted)))
8958 (home-page "https://github.com/txamqp/txamqp")
8959 (synopsis "Communicate with AMQP peers and brokers using Twisted")
8960 (description
8961 "This package provides a Python library for communicating with AMQP peers
8962and brokers using the asynchronous networking framework Twisted. It contains
8963all the necessary code to connect, send and receive messages to/from an
8964AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
8965also includes support for using Thrift RPC over AMQP in Twisted
8966applications.")
8967 (license license:asl2.0)))
8968
8969(define-public python2-txamqp
8970 (package-with-python2 python-txamqp))
8971
8972(define-public python-kombu
8973 (package
8974 (name "python-kombu")
8975 (version "4.2.2")
8976 (source
8977 (origin
8978 (method url-fetch)
8979 (uri (pypi-uri "kombu" version))
8980 (sha256
8981 (base32
8982 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
8983 (build-system python-build-system)
8984 (native-inputs
8985 `(("python-mock" ,python-mock)
8986 ("python-case" ,python-case)
8987 ("python-pyro4" ,python-pyro4)
8988 ("python-pytest-sugar" ,python-pytest-sugar)
8989 ("python-pytz" ,python-pytz)))
8990 (propagated-inputs
8991 `(("python-anyjson" ,python-anyjson)
8992 ("python-amqp" ,python-amqp)
8993 ("python-redis" ,python-redis)))
8994 (home-page "https://kombu.readthedocs.io")
8995 (synopsis "Message passing library for Python")
8996 (description "The aim of Kombu is to make messaging in Python as easy as
8997possible by providing an idiomatic high-level interface for the AMQ protocol,
8998and also provide proven and tested solutions to common messaging problems.
8999AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9000message orientation, queuing, routing, reliability and security, for which the
9001RabbitMQ messaging server is the most popular implementation.")
9002 (license license:bsd-3)
9003 (properties `((python2-variant . ,(delay python2-kombu))))))
9004
9005(define-public python2-kombu
9006 (let ((kombu (package-with-python2
9007 (strip-python2-variant python-kombu))))
9008 (package
9009 (inherit kombu)
9010 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
9011 ;; It works fine on the python3 variant.
9012 #:tests? #f
9013 ,@(package-arguments kombu)))
9014 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9015 ,@(package-native-inputs kombu))))))
9016
9017(define-public python-billiard
9018 (package
9019 (name "python-billiard")
9020 (version "3.5.0.5")
9021 (source
9022 (origin
9023 (method url-fetch)
9024 (uri (pypi-uri "billiard" version))
9025 (sha256
9026 (base32
9027 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
9028 (build-system python-build-system)
9029 (native-inputs
9030 `(("python-case" ,python-case)
9031 ("python-pytest" ,python-pytest)))
9032 (home-page "https://github.com/celery/billiard")
9033 (synopsis
9034 "Python multiprocessing fork with improvements and bugfixes")
9035 (description
9036 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9037multiprocessing package itself is a renamed and updated version of R Oudkerk's
9038pyprocessing package. This standalone variant is intended to be compatible with
9039Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
9040 (license license:bsd-3)
9041 (properties `((python2-variant . ,(delay python2-billiard))))))
9042
9043(define-public python2-billiard
9044 (let ((billiard (package-with-python2
9045 (strip-python2-variant python-billiard))))
9046 (package
9047 (inherit billiard)
9048 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9049 ("python2-mock" ,python2-mock)
9050 ,@(package-native-inputs billiard))))))
9051
9052(define-public python-celery
9053 (package
9054 (name "python-celery")
9055 (version "4.2.1")
9056 (source
9057 (origin
9058 (method url-fetch)
9059 (uri (pypi-uri "celery" version))
9060 (sha256
9061 (base32
9062 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
9063 (build-system python-build-system)
9064 (arguments
9065 '(;; TODO The tests fail with Python 3.7
9066 ;; https://github.com/celery/celery/issues/4849
9067 #:tests? #f
9068 #:phases
9069 (modify-phases %standard-phases
9070 (add-after 'unpack 'patch-requirements
9071 (lambda _
9072 (substitute* "requirements/test.txt"
9073 (("pytest>=3\\.0,<3\\.3")
9074 "pytest>=3.0"))
9075 #t)))))
9076 (native-inputs
9077 `(("python-case" ,python-case)
9078 ("python-pytest" ,python-pytest)))
9079 (propagated-inputs
9080 `(("python-pytz" ,python-pytz)
9081 ("python-billiard" ,python-billiard)
9082 ("python-kombu" ,python-kombu)))
9083 (home-page "https://celeryproject.org")
9084 (synopsis "Distributed Task Queue")
9085 (description "Celery is an asynchronous task queue/job queue based on
9086distributed message passing. It is focused on real-time operation, but
9087supports scheduling as well. The execution units, called tasks, are executed
9088concurrently on a single or more worker servers using multiprocessing,
9089Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9090synchronously (wait until ready).")
9091 (license license:bsd-3)
9092 (properties `((python2-variant . ,(delay python2-celery))))))
9093
9094(define-public python2-celery
9095 (let ((celery (package-with-python2
9096 (strip-python2-variant python-celery))))
9097 (package
9098 (inherit celery)
9099 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9100 ("python2-mock" ,python2-mock)
9101 ,@(package-native-inputs celery))))))
9102
9103(define-public python-translitcodec
9104 (package
9105 (name "python-translitcodec")
9106 (version "0.4.0")
9107 (source
9108 (origin
9109 (method url-fetch)
9110 (uri (pypi-uri "translitcodec" version))
9111 (sha256
9112 (base32
9113 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9114 (build-system python-build-system)
9115 (arguments
9116 `(#:tests? #f)) ; no tests provided
9117 (home-page
9118 "https://github.com/claudep/translitcodec")
9119 (synopsis
9120 "Unicode to 8-bit charset transliteration codec")
9121 (description
9122 "This package contains codecs for transliterating ISO 10646 texts into
9123best-effort representations using smaller coded character sets (ASCII,
9124ISO 8859, etc.).")
9125 (license license:expat)))
9126
9127(define-public python2-translitcodec
9128 (package-with-python2 python-translitcodec))
9129
9130(define-public python-editor
9131 (package
9132 (name "python-editor")
9133 (version "0.5")
9134 (source
9135 (origin
9136 (method url-fetch)
9137 (uri (pypi-uri "python-editor" version))
9138 (sha256
9139 (base32
9140 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9141 (build-system python-build-system)
9142 (home-page
9143 "https://github.com/fmoo/python-editor")
9144 (synopsis
9145 "Programmatically open an editor, capture the result")
9146 (description
9147 "python-editor is a library that provides the editor module for
9148programmatically interfacing with your system's $EDITOR.")
9149 (license license:asl2.0)))
9150
9151(define-public python2-editor
9152 (package-with-python2 python-editor))
9153
44d10b1f
RW
9154(define-public python-vobject
9155 (package
9156 (name "python-vobject")
9157 (version "0.9.5")
9158 (source (origin
9159 (method url-fetch)
9160 (uri (pypi-uri "vobject" version))
9161 (sha256
9162 (base32
9163 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
9164 (build-system python-build-system)
9165 (arguments
9166 '(;; The test suite relies on some non-portable Windows interfaces.
9167 #:tests? #f))
9168 (propagated-inputs
9169 `(("python-dateutil" ,python-dateutil)
9170 ("python-pyicu" ,python-pyicu)))
9171 (synopsis "Parse and generate vCard and vCalendar files")
9172 (description "Vobject is intended to be a full featured Python package for
9173parsing and generating vCard and vCalendar files. Currently, iCalendar files
9174are supported and well tested. vCard 3.0 files are supported, and all data
9175should be imported, but only a few components are understood in a sophisticated
9176way.")
9177 (home-page "http://eventable.github.io/vobject/")
9178 (license license:asl2.0)))
9179
9180(define-public python2-vobject
9181 (package-with-python2 python-vobject))
9182
9183(define-public python-munkres
9184 (package
9185 (name "python-munkres")
9186 (version "1.0.8")
9187 (source (origin
9188 (method url-fetch)
9189 (uri (pypi-uri "munkres" version))
9190 (sha256
9191 (base32
9192 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
9193 (build-system python-build-system)
9194 (arguments
9195 '(#:tests? #f)) ; no test suite
9196 (home-page "http://software.clapper.org/munkres/")
9197 (synopsis "Implementation of the Munkres algorithm")
9198 (description "The Munkres module provides an implementation of the Munkres
9199algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9200useful for solving the Assignment Problem.")
9201 (license license:bsd-3)))
9202
9203(define-public python2-munkres
9204 (package-with-python2 python-munkres))
9205
9206(define-public python-whoosh
9207 (package
9208 (name "python-whoosh")
9209 (version "2.7.4")
9210 (source
9211 (origin
9212 (method url-fetch)
9213 (uri (pypi-uri "Whoosh" version))
9214 (sha256
9215 (base32
9216 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9217 (build-system python-build-system)
9218 (native-inputs
9219 `(("python-pytest" ,python-pytest)))
9220 (home-page "https://bitbucket.org/mchaput/whoosh")
9221 (synopsis "Full text indexing, search, and spell checking library")
9222 (description
9223 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9224checking library.")
9225 (license license:bsd-2)))
9226
9227(define-public python2-whoosh
9228 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9229 (package (inherit whoosh)
9230 (propagated-inputs
9231 `(("python2-backport-ssl-match-hostname"
9232 ,python2-backport-ssl-match-hostname)
9233 ,@(package-propagated-inputs whoosh))))))
9234
9235(define-public python-pathlib
9236 (package
9237 (name "python-pathlib")
9238 (version "1.0.1")
9239 (source (origin
9240 (method url-fetch)
9241 (uri (pypi-uri "pathlib" version))
9242 (sha256
9243 (base32
9244 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9245 (build-system python-build-system)
9246 ;; The tests depend on the internal "test" module, which does not provide
9247 ;; a stable interface.
9248 (arguments `(#:tests? #f))
9249 (home-page "https://pathlib.readthedocs.org/")
9250 (synopsis "Object-oriented file system paths")
9251 (description "Pathlib offers a set of classes to handle file system paths.
9252It offers the following advantages over using string objects:
9253
9254@enumerate
9255@item No more cumbersome use of os and os.path functions. Everything can
9256be done easily through operators, attribute accesses, and method calls.
9257@item Embodies the semantics of different path types. For example,
9258comparing Windows paths ignores casing.
9259@item Well-defined semantics, eliminating any inconsistencies or
9260ambiguities (forward vs. backward slashes, etc.).
9261@end enumerate
9262
9263Note: In Python 3.4, pathlib is now part of the standard library. For other
9264Python versions please consider python-pathlib2 instead, which tracks the
9265standard library module. This module (python-pathlib) isn't maintained
9266anymore.")
9267 (license license:expat)))
9268
9269(define-public python2-pathlib
9270 (package-with-python2 python-pathlib))
9271
9272(define-public python2-pathlib2
9273 (package
9274 (name "python2-pathlib2")
9275 (version "2.3.2")
9276 (source (origin
9277 (method url-fetch)
9278 (uri (pypi-uri "pathlib2" version))
9279 (sha256
9280 (base32
9281 "10yb0iv5x2hs631rcppkhbddx799d3h8pcwmkbh2a66ns3w71ccf"))))
9282 (build-system python-build-system)
9283 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9284 ;; version is 3.4 which already includes this package as part of the
9285 ;; standard library.
9286 (arguments
9287 `(#:python ,python-2))
9288 (propagated-inputs
9289 `(("python2-scandir" ,python2-scandir)
9290 ("python2-six" ,python2-six)))
9291 (home-page "https://pypi.python.org/pypi/pathlib2/")
9292 (synopsis "Object-oriented file system paths - backport of standard
9293pathlib module")
9294 (description "The goal of pathlib2 is to provide a backport of standard
9295pathlib module which tracks the standard library module, so all the newest
9296features of the standard pathlib can be used also on older Python versions.
9297
9298Pathlib offers a set of classes to handle file system paths. It offers the
9299following advantages over using string objects:
9300
9301@enumerate
9302@item No more cumbersome use of os and os.path functions. Everything can
9303be done easily through operators, attribute accesses, and method calls.
9304@item Embodies the semantics of different path types. For example,
9305comparing Windows paths ignores casing.
9306@item Well-defined semantics, eliminating any inconsistencies or
9307ambiguities (forward vs. backward slashes, etc.).
9308@end enumerate")
9309 (license license:expat)))
9310
9311(define-public python2-pathlib2-bootstrap
9312 (hidden-package
9313 (package
9314 (inherit python2-pathlib2)
9315 (name "python2-pathlib2-bootstrap")
9316 (propagated-inputs
9317 `(("python2-scandir" ,python2-scandir)
9318 ("python2-six" ,python2-six-bootstrap))))))
9319
9320(define-public python-jellyfish
9321 (package
9322 (name "python-jellyfish")
9323 (version "0.5.6")
9324 (source (origin
9325 (method url-fetch)
9326 (uri (pypi-uri "jellyfish" version))
9327 (sha256
9328 (base32
9329 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
9330 (build-system python-build-system)
9331 (native-inputs
9332 `(("python-pytest" ,python-pytest)))
9333 (home-page "https://github.com/jamesturk/jellyfish")
9334 (synopsis "Approximate and phonetic matching of strings")
9335 (description "Jellyfish uses a variety of string comparison and phonetic
9336encoding algorithms to do fuzzy string matching.")
9337 (license license:bsd-2)
9338 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9339
9340(define-public python2-jellyfish
9341 (let ((jellyfish (package-with-python2
9342 (strip-python2-variant python-jellyfish))))
9343 (package (inherit jellyfish)
9344 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
9345 ,@(package-native-inputs jellyfish))))))
9346
9347(define-public python2-unicodecsv
9348 (package
9349 (name "python2-unicodecsv")
9350 (version "0.14.1")
9351 (source (origin
9352 (method url-fetch)
9353 ;; The test suite is not included in the PyPi release.
9354 ;; https://github.com/jdunck/python-unicodecsv/issues/19
9355 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
9356 "archive/" version ".tar.gz"))
9357 (file-name (string-append name "-" version ".tar.gz"))
9358 (sha256
9359 (base32
9360 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
9361 (build-system python-build-system)
9362 (arguments
9363 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9364 #:python ,python-2))
9365 (native-inputs
9366 `(("python2-unittest2" ,python2-unittest2)))
9367 (home-page "https://github.com/jdunck/python-unicodecsv")
9368 (synopsis "Unicode CSV module for Python 2")
9369 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9370module, adding support for Unicode strings.")
9371 (license license:bsd-2)))
9372
9373(define-public python-rarfile
9374 (package
9375 (name "python-rarfile")
9376 (version "2.8")
9377 (source (origin
9378 (method url-fetch)
9379 (uri (pypi-uri "rarfile" version))
9380 (sha256
9381 (base32
9382 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
9383 (build-system python-build-system)
9384 (arguments
9385 '(#:phases
9386 (modify-phases %standard-phases
9387 (replace 'check
9388 ;; Many tests fail, but the installation proceeds.
e59dd341 9389 (lambda _ (invoke "make" "-C" "test" "test"))))))
44d10b1f
RW
9390 (native-inputs
9391 `(("which" ,which))) ; required for tests
9392 (propagated-inputs
9393 `(("libarchive" ,libarchive)))
9394 (home-page "https://github.com/markokr/rarfile")
9395 (synopsis "RAR archive reader for Python")
9396 (description "This is Python module for RAR archive reading. The interface
9397is made as zipfile like as possible.")
9398 (license license:isc)))
9399
9400(define-public python2-rarfile
9401 (package-with-python2 python-rarfile))
9402
9403(define-public python-magic
9404 (package
9405 (name "python-magic")
9406 (version "0.4.15")
9407 (source
9408 (origin
9409 (method url-fetch)
9410 (uri (pypi-uri "python-magic" version))
9411 (sha256
9412 (base32
9413 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
9414 (file-name (string-append name "-" version "-checkout"))))
9415 (build-system python-build-system)
9416 (arguments
9417 ;; The tests are unreliable, so don't run them. The tests fail
9418 ;; under Python3 because they were written for Python2 and
9419 ;; contain import statements that do not work in Python3. One of
9420 ;; the tests fails under Python2 because its assertions are
9421 ;; overly stringent; it relies on comparing output strings which
9422 ;; are brittle and can change depending on the version of
9423 ;; libmagic being used and the system on which the test is
9424 ;; running. In my case, under GuixSD 0.10.0, only one test
9425 ;; failed, and it seems to have failed only because the version
9426 ;; of libmagic that is packaged in Guix outputs a slightly
9427 ;; different (but not wrong) string than the one that the test
9428 ;; expected.
9429 '(#:tests? #f
9430 #:phases (modify-phases %standard-phases
9431 ;; Replace a specific method call with a hard-coded
9432 ;; path to the necessary libmagic.so file in the
9433 ;; store. If we don't do this, then the method call
9434 ;; will fail to find the libmagic.so file, which in
9435 ;; turn will cause any application using
9436 ;; python-magic to fail.
9437 (add-before 'build 'hard-code-path-to-libmagic
9438 (lambda* (#:key inputs #:allow-other-keys)
9439 (let ((file (assoc-ref inputs "file")))
9440 (substitute* "magic.py"
9441 (("ctypes.util.find_library\\('magic'\\)")
9442 (string-append "'" file "/lib/libmagic.so'")))
9443 #t)))
9444 (add-before 'install 'disable-egg-compression
9445 (lambda _
9446 (let ((port (open-file "setup.cfg" "a")))
9447 (display "\n[easy_install]\nzip_ok = 0\n"
9448 port)
9449 (close-port port)
9450 #t))))))
9451 (inputs
9452 ;; python-magic needs to be able to find libmagic.so.
9453 `(("file" ,file)))
9454 (home-page
9455 "https://github.com/ahupp/python-magic")
9456 (synopsis
9457 "File type identification using libmagic")
9458 (description
9459 "This module uses ctypes to access the libmagic file type
9460identification library. It makes use of the local magic database and
9461supports both textual and MIME-type output. Note that this module and
9462the python-file module both provide a \"magic.py\" file; these two
9463modules, which are different and were developed separately, both serve
9464the same purpose: to provide Python bindings for libmagic.")
9465 (license license:expat)))
9466
9467(define-public python2-magic
9468 (package-with-python2 python-magic))
9469
9470(define-public python2-s3cmd
9471 (package
9472 (name "python2-s3cmd")
9473 (version "1.6.1")
9474 (source
9475 (origin
9476 (method url-fetch)
9477 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
9478 "s3cmd-" version ".tar.gz"))
9479 (sha256
9480 (base32
9481 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9482 (build-system python-build-system)
9483 (arguments
9484 ;; s3cmd is written for python2 only and contains no tests.
9485 `(#:python ,python-2
9486 #:tests? #f))
9487 (propagated-inputs
9488 `(("python2-dateutil" ,python2-dateutil)
9489 ;; The python-file package also provides a magic.py module.
9490 ;; This is an unfortunate state of affairs; however, s3cmd
9491 ;; fails to install if it cannot find specifically the
9492 ;; python-magic package. Thus we include it, instead of using
9493 ;; python-file. Ironically, s3cmd sometimes works better
9494 ;; without libmagic bindings at all:
9495 ;; https://github.com/s3tools/s3cmd/issues/198
9496 ("python2-magic" ,python2-magic)))
9497 (home-page "http://s3tools.org/s3cmd")
9498 (synopsis "Command line tool for S3-compatible storage services")
9499 (description
9500 "S3cmd is a command line tool for uploading, retrieving and managing data
9501in storage services that are compatible with the Amazon Simple Storage
9502Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9503GnuPG encryption, and more. It also supports management of Amazon's
9504CloudFront content delivery network.")
9505 (license license:gpl2+)))
9506
9507(define-public python-pkgconfig
9508 (package
9509 (name "python-pkgconfig")
9510 (version "1.3.1")
9511 (source
9512 (origin
9513 (method url-fetch)
9514 (uri (pypi-uri "pkgconfig" version))
9515 (sha256
9516 (base32
9517 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
9518 (build-system python-build-system)
9519 (native-inputs
9520 `(("python-nose" ,python-nose)))
9521 (inputs
9522 `(("pkg-config" ,pkg-config)))
9523 (arguments
9524 `(#:phases
9525 (modify-phases %standard-phases
9526 (add-before 'build 'patch
9527 ;; Hard-code the path to pkg-config.
9528 (lambda _
9529 (substitute* "pkgconfig/pkgconfig.py"
9530 (("cmd = 'pkg-config")
9531 (string-append "cmd = '" (which "pkg-config"))))
9532 #t))
9533 (replace 'check
9534 (lambda _
9535 (invoke "nosetests" "test.py"))))))
9536 (home-page "https://github.com/matze/pkgconfig")
9537 (synopsis "Python interface for pkg-config")
9538 (description "This module provides a Python interface to pkg-config. It
9539can be used to find all pkg-config packages, check if a package exists,
9540check if a package meets certain version requirements, query CFLAGS and
9541LDFLAGS and parse the output to build extensions with setup.py.")
9542 (license license:expat)))
9543
9544(define-public python2-pkgconfig
9545 (package-with-python2 python-pkgconfig))
9546
9547(define-public python-bz2file
9548 (package
9549 (name "python-bz2file")
9550 (version "0.98")
9551 (source
9552 (origin
9553 (method url-fetch)
9554 (uri (pypi-uri "bz2file" version))
9555 (sha256
9556 (base32
9557 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9558 (build-system python-build-system)
9559 (arguments
9560 `(#:tests? #f)) ; Tests use deprecated python modules.
9561 (home-page "https://github.com/nvawda/bz2file")
9562 (synopsis "Read and write bzip2-compressed files")
9563 (description
9564 "Bz2file is a Python library for reading and writing bzip2-compressed
9565files. It contains a drop-in replacement for the I/O interface in the
9566standard library's @code{bz2} module, including features from the latest
9567development version of CPython that are not available in older releases.")
9568 (license license:asl2.0)))
9569
9570(define-public python2-bz2file
9571 (package-with-python2 python-bz2file))
9572
9573(define-public python-future
9574 (package
9575 (name "python-future")
d5d54030 9576 (version "0.17.1")
44d10b1f
RW
9577 (source
9578 (origin
9579 (method url-fetch)
9580 (uri (pypi-uri "future" version))
9581 (sha256
9582 (base32
d5d54030 9583 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
44d10b1f
RW
9584 (build-system python-build-system)
9585 ;; Many tests connect to the network or are otherwise flawed.
9586 ;; https://github.com/PythonCharmers/python-future/issues/210
9587 (arguments
9588 `(#:tests? #f))
9589 (home-page "http://python-future.org")
9590 (synopsis "Single-source support for Python 3 and 2")
9591 (description
9592 "@code{python-future} is the missing compatibility layer between Python 2 and
9593Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9594to support both Python 2 and Python 3 with minimal overhead.")
9595 (license license:expat)))
9596
9597(define-public python2-future
9598 (package-with-python2 python-future))
9599
9600(define-public python-cysignals
9601 (package
9602 (name "python-cysignals")
8e3e51df 9603 (version "1.9.0")
44d10b1f
RW
9604 (source
9605 (origin
9606 (method url-fetch)
8e3e51df 9607 (uri (pypi-uri "cysignals" version))
44d10b1f
RW
9608 (sha256
9609 (base32
8e3e51df 9610 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
44d10b1f
RW
9611 (build-system python-build-system)
9612 (native-inputs
9613 `(("python-cython" ,python-cython)
9614 ("python-sphinx" ,python-sphinx)))
9615 (inputs
9616 `(("pari-gp" ,pari-gp)))
9617 (arguments
9618 `(#:modules ((guix build python-build-system)
9619 ((guix build gnu-build-system) #:prefix gnu:)
9620 (guix build utils))
9621 ;; FIXME: Tests are executed after installation and currently fail
9622 ;; when not installing into standard locations; the author is working
9623 ;; on a fix.
9624 #:tests? #f
9625 #:phases
9626 (modify-phases %standard-phases
9627 (add-before
9628 'build 'configure
9629 (assoc-ref gnu:%standard-phases 'configure)))))
9630 (home-page
9631 "https://github.com/sagemath/cysignals")
9632 (synopsis
9633 "Handling of interrupts and signals for Cython")
9634 (description
9635 "The cysignals package provides mechanisms to handle interrupts (and
9636other signals and errors) in Cython code, using two related approaches,
9637for mixed Cython/Python code or external C libraries and pure Cython code,
9638respectively.")
9639 (license license:lgpl3+)))
9640
9641(define-public python2-cysignals
9642 (package-with-python2 python-cysignals))
9643
9644(define-public python2-shedskin
9645 (package
9646 (name "python2-shedskin")
9647 (version "0.9.4")
9648 (source
9649 (origin
9650 (method url-fetch)
9651 (uri (string-append "https://github.com/shedskin/shedskin/"
9652 "releases/download/v" version
9653 "/shedskin-" version ".tgz"))
9654 (sha256
9655 (base32
9656 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9657 (build-system python-build-system)
9658 (arguments
9659 `(#:python ,python-2
9660 #:phases (modify-phases %standard-phases
9661 (add-after 'unpack 'fix-resulting-include-libs
9662 (lambda* (#:key inputs #:allow-other-keys)
9663 (let ((libgc (assoc-ref inputs "libgc"))
9664 (pcre (assoc-ref inputs "pcre")))
9665 (substitute* "shedskin/makefile.py"
9666 (("variable == 'CCFLAGS':[ ]*")
9667 (string-append "variable == 'CCFLAGS':\n"
9668 " line += ' -I " pcre "/include"
9669 " -I " libgc "/include'"))
9670 (("variable == 'LFLAGS':[ ]*")
9671 (string-append "variable == 'LFLAGS':\n"
9672 " line += ' -L" pcre "/lib"
9673 " -L " libgc "/lib'")))
9674 #t))))))
9675 (inputs `(("pcre" ,pcre)
9676 ("libgc" ,libgc)))
9677 (home-page "https://shedskin.github.io/")
9678 (synopsis "Experimental Python-2 to C++ Compiler")
9679 (description (string-append "This is an experimental compiler for a subset of
9680Python. It generates C++ code and a Makefile."))
9681 (license (list license:gpl3 license:bsd-3 license:expat))))
9682
9683(define-public python2-rope
9684 (package
9685 (name "python2-rope")
a9ba0a31 9686 (version "0.11.0")
44d10b1f
RW
9687 (source
9688 (origin
9689 (method url-fetch)
9690 (uri (pypi-uri "rope" version))
9691 (sha256
9692 (base32
a9ba0a31 9693 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
44d10b1f 9694 (arguments
afb29715 9695 ;; Rope has only partial python3 support, see `python-rope'
44d10b1f
RW
9696 `(#:python ,python-2))
9697 (build-system python-build-system)
9698 (native-inputs
9699 `(("python2-unittest2" ,python2-unittest2)))
9700 (home-page "https://github.com/python-rope/rope")
9701 (synopsis "Refactoring library for Python")
9702 (description "Rope is a refactoring library for Python. It facilitates
9703the renaming, moving and extracting of attributes, functions, modules, fields
9704and parameters in Python 2 source code. These refactorings can also be applied
9705to occurrences in strings and comments.")
9706 (license license:gpl2)))
9707
2c880ef4
LC
9708(define-public python-rope
9709 (package
9710 (inherit python2-rope)
9711 (name "python-rope")
9712 (arguments `(#:python ,python-wrapper
9713 ;; XXX: Only partial python3 support, results in some failing
9714 ;; tests: <https://github.com/python-rope/rope/issues/247>.
9715 #:tests? #f))
9716 (properties `((python2-variant . ,(delay python2-rope))))))
9717
44d10b1f
RW
9718(define-public python-py3status
9719 (package
9720 (name "python-py3status")
77f3d303 9721 (version "3.16")
44d10b1f
RW
9722 (source
9723 (origin
9724 (method url-fetch)
9725 (uri (pypi-uri "py3status" version))
9726 (sha256
9727 (base32
77f3d303 9728 "1xrfph277bgjln3jbpzpgkhxad04fjvj7s3xfil42q1sxi4s3q3g"))))
44d10b1f
RW
9729 (build-system python-build-system)
9730 (inputs
9731 `(("file" ,file)))
9732 (arguments
9733 '(#:phases
9734 (modify-phases %standard-phases
9735 ;; 'file' is used for detection of configuration file encoding
9736 ;; let's make link the dependency to particular input
9737 (add-before 'build 'patch-file-path
9738 (lambda* (#:key inputs #:allow-other-keys)
9739 (let ((file-path (assoc-ref inputs "file")))
9740 (substitute* "py3status/parse_config.py"
9741 (("\\['file', '-b'")
9742 (string-append "['" file-path "/bin/file', '-b'")))
9743 #t))))
9744 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
9745 (home-page "https://github.com/ultrabug/py3status")
9746 (synopsis "Extensible i3status wrapper written in Python")
9747 (description "py3status is an i3status wrapper which extends i3status
9748functionality in a modular way, allowing you to extend your panel with your
9749own code, responding to click events and updating clock every second.")
9750 (license license:bsd-3)))
9751
9752(define-public python-tblib
9753 (package
9754 (name "python-tblib")
9755 (version "1.3.2")
9756 (source (origin
9757 (method url-fetch)
9758 (uri (pypi-uri "tblib" version))
9759 (sha256 (base32
9760 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
9761 (build-system python-build-system)
9762 (arguments
9763 `(#:phases
9764 (modify-phases %standard-phases
9765 (add-before 'check 'adjust-tests
9766 (lambda _
9767 (when (which "python3")
9768 ;; Adjust the example output to match that of Python 3.7:
9769 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
9770 (substitute* "README.rst"
9771 (("Exception\\('fail',") "Exception('fail'"))
9772 #t)))
9773 (replace 'check
9774 (lambda _
9775 ;; Upstream runs tests after installation and the package itself
9776 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
9777 ;; found.
9778 (setenv "PYTHONPATH"
9779 (string-append (getcwd) "/build/lib:"
9780 (getenv "PYTHONPATH")))
9781 (invoke "py.test" "-vv" "tests" "README.rst"))))))
9782 (native-inputs
9783 `(("python-pytest" ,python-pytest)
9784 ("python-six" ,python-six)))
9785 (home-page "https://github.com/ionelmc/python-tblib")
9786 (synopsis "Traceback serialization library")
9787 (description
9788 "Traceback serialization allows you to:
9789
9790@enumerate
9791@item Pickle tracebacks and raise exceptions with pickled tracebacks in
9792different processes. This allows better error handling when running code over
9793multiple processes (imagine multiprocessing, billiard, futures, celery etc).
9794
9795@item Parse traceback strings and raise with the parsed tracebacks.
9796@end enumerate\n")
9797 (license license:bsd-3)))
9798
9799(define-public python2-tblib
9800 (package-with-python2 python-tblib))
9801
9802(define-public python-greenlet
9803 (package
9804 (name "python-greenlet")
9805 (version "0.4.15")
9806 (source (origin
9807 (method url-fetch)
9808 (uri (pypi-uri "greenlet" version))
9809 (sha256
9810 (base32
9811 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
9812 (build-system python-build-system)
9813 (home-page "https://greenlet.readthedocs.io/")
9814 (synopsis "Lightweight in-process concurrent programming")
9815 (description
9816 "Greenlet package is a spin-off of Stackless, a version of CPython
9817that supports micro-threads called \"tasklets\". Tasklets run
9818pseudo-concurrently (typically in a single or a few OS-level threads) and
9819are synchronized with data exchanges on \"channels\".")
9820 (license (list license:psfl license:expat))))
9821
9822(define-public python2-greenlet
9823 (package-with-python2 python-greenlet))
9824
9825(define-public python-objgraph
9826 (package
9827 (name "python-objgraph")
9828 (version "3.4.0")
9829 (source
9830 (origin
9831 (method url-fetch)
9832 (uri (pypi-uri "objgraph" version))
9833 (sha256
9834 (base32
9835 "184m09am5gpbqfaiy7l0hwh476mczbrly1dffs0rw2p1d1i2q32a"))))
9836 (build-system python-build-system)
9837 (propagated-inputs
9838 `(("python-graphviz" ,python-graphviz)))
9839 (native-inputs
9840 `(("python-mock" ,python-mock)
9841 ("graphviz" ,graphviz)))
9842 (home-page "https://mg.pov.lt/objgraph/")
9843 (synopsis "Draw Python object reference graphs with graphviz")
9844 (description
9845 "This package provides tools to draw Python object reference graphs with
9846graphviz.")
9847 (license license:expat)))
9848
9849(define-public python-gevent
9850 (package
9851 (name "python-gevent")
9852 (version "1.3.7")
9853 (source (origin
9854 (method url-fetch)
9855 (uri (pypi-uri "gevent" version))
9856 (sha256
9857 (base32
9858 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
9859 (modules '((guix build utils)))
9860 (snippet
9861 '(begin
9862 ;; unbunding libev and c-ares
9863 (delete-file-recursively "deps")
9864 #t))))
9865 (build-system python-build-system)
9866 (arguments
9867 `(#:modules ((ice-9 ftw)
9868 (ice-9 match)
9869 (srfi srfi-26)
9870 (guix build utils)
9871 (guix build python-build-system))
9872 #:phases (modify-phases %standard-phases
9873 (add-after 'unpack 'unpack-libev
9874 (lambda* (#:key inputs #:allow-other-keys)
9875 (mkdir-p "deps/libev")
9876 ;; FIXME: gevent requires building libev, even though
9877 ;; it only links against the proper one.
9878 (invoke "tar" "-xf" (assoc-ref inputs "libev-source")
9879 "--strip-components=1" "-C" "deps/libev")))
9880 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
9881 (lambda _
9882 (substitute* "src/gevent/subprocess.py"
9883 (("/bin/sh") (which "sh")))
9884 (for-each (lambda (file)
9885 (substitute* file
9886 (("/bin/sh") (which "sh"))
9887 (("/bin/true") (which "true"))))
9888 (find-files "src/greentest" "\\.py$"))
9889 #t))
9890 (add-before 'build 'do-not-use-bundled-sources
9891 (lambda* (#:key inputs #:allow-other-keys)
9892 (setenv "CONFIG_SHELL" (which "bash"))
9893 (setenv "LIBEV_EMBED" "false")
9894 (setenv "CARES_EMBED" "false")
9895 (setenv "EMBED" "false")
9896
9897 (let ((greenlet (string-append
9898 (assoc-ref inputs "python-greenlet")
9899 "/include")))
9900 (match (scandir greenlet
9901 (lambda (item)
9902 (string-prefix? "python" item)))
9903 ((python)
9904 (setenv "CPATH"
9905 (string-append greenlet "/" python)))))
9906 #t))
9907 (add-before 'check 'skip-timer-test
9908 (lambda _
9909 ;; XXX: Skip 'TestTimerResolution', which appears to be
9910 ;; unreliable.
9911 (substitute* "src/greentest/test__core_timer.py"
9912 (("not greentest.RUNNING_ON_CI") "False"))
9913 #t))
9914 (replace 'check
9915 (lambda _
9916 ;; Make sure the build directory is on PYTHONPATH.
9917 (setenv "PYTHONPATH"
9918 (string-append
9919 (getenv "PYTHONPATH") ":"
9920 (getcwd) "/build/"
9921 (car (scandir "build" (cut string-prefix? "lib." <>)))))
9922 (with-directory-excursion "src/greentest"
9923 ;; XXX: Many tests require network access. Instead we only
9924 ;; run known-good tests. Unfortunately we cannot use
9925 ;; recursion here since this directory also contains
9926 ;; Python-version-specific subfolders.
9927 (apply invoke "python" "testrunner.py" "--config"
9928 "known_failures.py"
9929 (scandir "." (cut regexp-exec
9930 (make-regexp "test_+(subprocess|core)")
9931 <>)))))))))
9932 (propagated-inputs
9933 `(("python-greenlet" ,python-greenlet)
9934 ("python-objgraph" ,python-objgraph)))
9935 (native-inputs
9936 `(("libev-source" ,(package-source libev))
9937 ("python-six" ,python-six)))
9938 (inputs
9939 `(("c-ares" ,c-ares)
9940 ("libev" ,libev)))
9941 (home-page "http://www.gevent.org/")
9942 (synopsis "Coroutine-based network library")
9943 (description
9944 "gevent is a coroutine-based Python networking library that uses greenlet
9945to provide a high-level synchronous API on top of the libev event loop.")
9946 (license license:expat)
9947 (properties `((python2-variant . ,(delay python2-gevent))))))
9948
9949(define-public python2-gevent
9950 (let ((base (package-with-python2
9951 (strip-python2-variant python-gevent))))
9952 (package
9953 (inherit base)
9954 (native-inputs `(,@(package-native-inputs python-gevent)
9955 ("python-mock" ,python2-mock))))))
9956
9957(define-public python-fastimport
9958 (package
9959 (name "python-fastimport")
9960 (version "0.9.6")
9961 (source
9962 (origin
9963 (method url-fetch)
9964 (uri (pypi-uri "fastimport" version))
9965 (sha256
9966 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
9967 (build-system python-build-system)
9968 (home-page "https://github.com/jelmer/python-fastimport")
9969 (synopsis "VCS fastimport parser and generator in Python")
9970 (description "This package provides a parser for and generator of the Git
9971@url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
9972format.")
9973 (license license:gpl2+)))
9974
9975(define-public python2-fastimport
9976 (package-with-python2 python-fastimport))
9977
9978(define-public python-twisted
9979 (package
9980 (name "python-twisted")
fdfad2fc 9981 (version "19.7.0")
44d10b1f
RW
9982 (source (origin
9983 (method url-fetch)
9984 (uri (pypi-uri "Twisted" version ".tar.bz2"))
9985 (sha256
9986 (base32
fdfad2fc 9987 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
44d10b1f
RW
9988 (build-system python-build-system)
9989 (arguments
0107c9b8 9990 '(#:tests? #f)) ; FIXME: some tests fail
44d10b1f
RW
9991 (propagated-inputs
9992 `(("python-zope-interface" ,python-zope-interface)
52ca1c4a 9993 ("python-pyhamcrest" ,python-pyhamcrest)
44d10b1f 9994 ("python-incremental" ,python-incremental)
e5ba2fe3 9995 ("python-hyperlink" ,python-hyperlink)
44d10b1f
RW
9996 ("python-constantly" ,python-constantly)
9997 ("python-automat" ,python-automat)))
9998 (home-page "https://twistedmatrix.com/")
9999 (synopsis "Asynchronous networking framework written in Python")
10000 (description
10001 "Twisted is an extensible framework for Python programming, with special
10002focus on event-based network programming and multiprotocol integration.")
10003 (license license:expat)))
10004
10005(define-public python2-twisted
10006 (package-with-python2 python-twisted))
10007
10008(define-public python-pika
10009 (package
10010 (name "python-pika")
10011 (version "0.12.0")
10012 (source
10013 (origin
10014 (method url-fetch)
10015 (uri (pypi-uri "pika" version))
10016 (sha256
10017 (base32
10018 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
10019 (build-system python-build-system)
10020 (native-inputs
10021 `(("python-pyev" ,python-pyev)
10022 ("python-tornado" ,python-tornado)
10023 ("python-twisted" ,python-twisted)))
10024 (home-page "https://pika.readthedocs.org")
10025 (synopsis "Pure Python AMQP Client Library")
10026 (description
10027 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
10028Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
10029network support library.")
10030 (license license:bsd-3)))
10031
10032(define-public python2-pika
10033 (package-with-python2 python-pika))
10034
10035(define-public python-ply
10036 (package
10037 (name "python-ply")
10038 (version "3.10")
10039 (source
10040 (origin
10041 (method url-fetch)
10042 (uri (pypi-uri "ply" version))
10043 (sha256
10044 (base32
10045 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
10046 (build-system python-build-system)
10047 (home-page "http://www.dabeaz.com/ply/")
10048 (synopsis "Python Lex & Yacc")
10049 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
10050It uses LR parsing and does extensive error checking.")
10051 (license license:bsd-3)))
10052
10053(define-public python2-ply
10054 (package-with-python2 python-ply))
10055
10056(define-public python-tabulate
10057 (package
10058 (name "python-tabulate")
10059 (version "0.7.7")
10060 (source (origin
10061 (method url-fetch)
10062 (uri (pypi-uri "tabulate" version))
10063 (sha256
10064 (base32
10065 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
10066 (build-system python-build-system)
10067 (arguments
10068 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
10069 ;; and the latest release is not tagged in the upstream repository.
10070 '(#:tests? #f))
10071 (home-page "https://bitbucket.org/astanin/python-tabulate")
10072 (synopsis "Pretty-print tabular data")
10073 (description
10074 "Tabulate is a library and command-line utility to pretty-print tabular
10075data in Python.")
10076 (license license:expat)))
10077
10078(define-public python2-tabulate
10079 (package-with-python2 python-tabulate))
10080
10081(define-public python-kazoo
10082 (package
10083 (name "python-kazoo")
10084 (version "2.4.0")
10085 (source
10086 (origin
10087 (method url-fetch)
10088 (uri (pypi-uri "kazoo" version))
10089 (sha256
10090 (base32
10091 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
10092 (build-system python-build-system)
10093 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
10094 (propagated-inputs
10095 `(("python-six" ,python-six)))
10096 (home-page "https://kazoo.readthedocs.org")
10097 (synopsis "High-level Zookeeper client library")
10098 (description
10099 "Kazoo is a Python client library for the Apache Zookeeper distributed
10100application service. It is designed to be easy to use and to avoid common
10101programming errors.")
10102 (license license:asl2.0)))
10103
10104(define-public python2-kazoo
10105 (package-with-python2 python-kazoo))
10106
10107(define-public python-pykafka
10108 (package
10109 (name "python-pykafka")
10110 (version "2.4.0")
10111 (source (origin
10112 (method url-fetch)
0ca1d040 10113 (uri (pypi-uri "pykafka" version))
44d10b1f
RW
10114 (sha256
10115 (base32
10116 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10117 (build-system python-build-system)
10118 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
10119 (propagated-inputs
10120 `(("python-gevent" ,python-gevent)
10121 ("python-kazoo" ,python-kazoo)
10122 ("python-tabulate" ,python-tabulate)))
10123 (inputs
10124 `(("librdkafka" ,librdkafka)))
10125 (home-page "https://pykafka.readthedocs.io/")
10126 (synopsis "Apache Kafka client for Python")
10127 (description
10128 "PyKafka is a client for the Apache Kafka distributed messaging system.
10129It includes Python implementations of Kafka producers and consumers, which
10130are optionally backed by a C extension built on librdkafka.")
10131 (license license:asl2.0)))
10132
10133(define-public python2-pykafka
10134 (package-with-python2 python-pykafka))
10135
10136(define-public python-wcwidth
10137 (package
10138 (name "python-wcwidth")
10139 (version "0.1.7")
10140 (source
10141 (origin
10142 (method url-fetch)
10143 (uri (pypi-uri "wcwidth" version))
10144 (sha256
10145 (base32
10146 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
10147 (build-system python-build-system)
10148 (home-page "https://github.com/jquast/wcwidth")
10149 (synopsis "Measure number of terminal column cells of wide-character codes")
10150 (description "Wcwidth measures the number of terminal column cells of
10151wide-character codes. It is useful for those implementing a terminal emulator,
10152or programs that carefully produce output to be interpreted by one. It is a
10153Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10154specified in POSIX.1-2001 and POSIX.1-2008.")
10155 (license license:expat)))
10156
10157(define-public python2-wcwidth
10158 (package-with-python2 python-wcwidth))
10159
10160(define-public python2-jsonrpclib
10161 (package
10162 (name "python2-jsonrpclib")
10163 (version "0.1.7")
10164 (source (origin
10165 (method url-fetch)
6571bba0 10166 (uri (pypi-uri "jsonrpclib" version))
44d10b1f
RW
10167 (sha256
10168 (base32
10169 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10170 (build-system python-build-system)
10171 (arguments
10172 `(#:tests? #f
10173 #:python ,python-2))
10174 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10175 (synopsis "Implementation of JSON-RPC specification for Python")
10176 (description
10177 "This library is an implementation of the JSON-RPC specification.
10178It supports both the original 1.0 specification, as well as the
10179new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10180etc.")
10181 (license license:asl2.0)))
10182
10183(define-public python-chai
10184 (package
10185 (name "python-chai")
10186 (version "1.1.2")
10187 (source (origin
10188 (method url-fetch)
10189 (uri (pypi-uri "chai" version))
10190 (sha256
10191 (base32
10192 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
10193 (build-system python-build-system)
10194 (home-page "https://github.com/agoragames/chai")
10195 (synopsis "Mocking framework for Python")
10196 (description
10197 "Chai provides an api for mocking, stubbing and spying your python
10198objects, patterned after the Mocha library for Ruby.")
10199 (license license:bsd-3)))
10200
10201(define-public python2-chai
10202 (package-with-python2 python-chai))
10203
10204(define-public python-inflection
10205 (package
10206 (name "python-inflection")
10207 (version "0.3.1")
10208 (source
10209 (origin (method url-fetch)
10210 (uri (pypi-uri "inflection" version))
10211 (sha256
10212 (base32
10213 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10214 (build-system python-build-system)
10215 (native-inputs
10216 `(("python-pytest" ,python-pytest)))
10217 (home-page "https://github.com/jpvanhal/inflection")
10218 (synopsis "Python string transformation library")
10219 (description
10220 "Inflection is a string transformation library. It singularizes
10221and pluralizes English words, and transforms strings from CamelCase to
10222underscored string.")
10223 (license license:expat)))
10224
10225(define-public python2-inflection
10226 (package-with-python2 python-inflection))
10227
10228(define-public python-pylev
10229 (package
10230 (name "python-pylev")
10231 (version "1.3.0")
10232 (source (origin
10233 (method url-fetch)
10234 (uri (pypi-uri "pylev" version))
10235 (sha256
10236 (base32
10237 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10238 (build-system python-build-system)
10239 (home-page "https://github.com/toastdriven/pylev")
10240 (synopsis "Levenshtein distance implementation in Python")
10241 (description "Pure Python Levenshtein implementation, based off the
10242Wikipedia code samples at
10243@url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
10244 (license license:bsd-3)))
10245
10246(define-public python2-pylev
10247 (package-with-python2 python-pylev))
10248
10249(define-public python-cleo
10250 (package
10251 (name "python-cleo")
10252 (version "0.6.1")
10253 (source (origin
10254 (method url-fetch)
10255 (uri (pypi-uri "cleo" version))
10256 (sha256
10257 (base32
10258 "0q1cf0szr0d54am4pypzwdnm74zpladdsinad94c2fz5i06fdpf7"))))
10259 (build-system python-build-system)
10260 (native-inputs
10261 `(;; For testing
10262 ("python-mock" ,python-mock)
10263 ("python-pytest-mock" ,python-pytest-mock)
10264 ("python-pytest" ,python-pytest)))
10265 (propagated-inputs
10266 `(("python-backpack" ,python-backpack)
10267 ("python-pastel" ,python-pastel)
10268 ("python-pylev" ,python-pylev)))
10269 (home-page "https://github.com/sdispater/cleo")
10270 (synopsis "Command-line arguments library for Python")
10271 (description
10272 "Cleo allows you to create command-line commands with signature in
10273docstring and colored output.")
10274 (license license:expat)))
10275
10276(define-public python2-cleo
10277 (package-with-python2 python-cleo))
10278
10279(define-public python-lazy-object-proxy
10280 (package
10281 (name "python-lazy-object-proxy")
10282 (version "1.3.1")
10283 (source (origin
10284 (method url-fetch)
10285 (uri (pypi-uri "lazy-object-proxy" version))
10286 (sha256
10287 (base32
10288 "0yha7q9bhw857fwaby785d63mffhngl9npwzlk9i0pwlkwvbx4gb"))))
10289 (build-system python-build-system)
10290 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10291 (synopsis "Lazy object proxy for python")
10292 (description
10293 "Lazy object proxy is an object that wraps a callable but defers the call
10294until the object is actually required, and caches the result of said call.")
10295 (license license:bsd-2)))
10296
10297(define-public python2-lazy-object-proxy
10298 (package-with-python2 python-lazy-object-proxy))
10299
10300(define-public python-dnspython
10301 (package
10302 (name "python-dnspython")
10303 (version "1.15.0")
10304 (source (origin
10305 (method url-fetch)
10306 (uri (string-append "http://www.dnspython.org/kits/"
10307 version "/dnspython-" version ".tar.gz"))
10308 (sha256
10309 (base32
10310 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
10311 (build-system python-build-system)
10312 (arguments '(#:tests? #f)) ; XXX: requires internet access
10313 (home-page "http://www.dnspython.org")
10314 (synopsis "DNS toolkit for Python")
10315 (description
10316 "dnspython is a DNS toolkit for Python. It supports almost all record
10317types. It can be used for queries, zone transfers, and dynamic updates.
10318It supports TSIG authenticated messages and EDNS0.")
10319 (license license:expat)))
10320
10321(define-public python2-dnspython
10322 (package-with-python2 python-dnspython))
10323
10324(define-public python-email-validator
10325 (package
10326 (name "python-email-validator")
10327 (version "1.0.2")
10328 (source
10329 (origin (method url-fetch)
10330 (uri (pypi-uri "email_validator" version))
10331 (sha256
10332 (base32
10333 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
10334 (build-system python-build-system)
10335 (arguments
10336 '(#:phases
10337 (modify-phases %standard-phases
10338 (add-before 'build 'use-dnspython
10339 (lambda _
10340 (substitute* "setup.py"
10341 (("dnspython3") "dnspython"))
10342 #t)))))
10343 (propagated-inputs
10344 `(("python-dnspython" ,python-dnspython)
10345 ("python-idna" ,python-idna)))
10346 (home-page "https://github.com/JoshData/python-email-validator")
10347 (synopsis "Email address validation library for Python")
10348 (description
10349 "This library validates email address syntax and deliverability.")
10350 (license license:cc0)))
10351
10352(define-public python2-email-validator
10353 (package-with-python2 python-email-validator))
10354
10355(define-public python-ukpostcodeparser
10356 (package
10357 (name "python-ukpostcodeparser")
10358 (version "1.0.3")
10359 (source (origin
10360 (method url-fetch)
10361 (uri (pypi-uri "UkPostcodeParser" version))
10362 (sha256
10363 (base32
10364 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10365 (build-system python-build-system)
10366 (home-page "https://github.com/hamstah/ukpostcodeparser")
10367 (synopsis "UK Postcode parser for Python")
10368 (description
10369 "This library provides the @code{parse_uk_postcode} function for
10370parsing UK postcodes.")
10371 (license license:expat)))
10372
10373(define-public python2-ukpostcodeparser
10374 (package-with-python2 python-ukpostcodeparser))
10375
10376(define-public python-faker
10377 (package
10378 (name "python-faker")
10379 (version "0.7.9")
10380 (source (origin
10381 (method url-fetch)
10382 (uri (pypi-uri "Faker" version))
10383 (sha256
10384 (base32
10385 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
10386 (patches
10387 (search-patches "python-faker-fix-build-32bit.patch"))
10388 (modules '((guix build utils)))
10389 (snippet
10390 '(begin
10391 (for-each delete-file (find-files "." "\\.pyc$"))
10392 #t))))
10393 (build-system python-build-system)
10394 (arguments
10395 '(#:phases
10396 (modify-phases %standard-phases
10397 (replace 'check
49ff8827 10398 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
44d10b1f
RW
10399 (native-inputs
10400 `(;; For testing
10401 ("python-email-validator" ,python-email-validator)
10402 ("python-mock" ,python-mock)
10403 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
10404 (propagated-inputs
10405 `(("python-dateutil" ,python-dateutil)
10406 ("python-six" ,python-six)))
10407 (home-page "https://github.com/joke2k/faker")
10408 (synopsis "Python package that generates fake data")
10409 (description
10410 "Faker is a Python package that generates fake data such as names,
10411addresses, and phone numbers.")
10412 (license license:expat)
10413 (properties `((python2-variant . ,(delay python2-faker))))))
10414
10415(define-public python2-faker
10416 (let ((base (package-with-python2 (strip-python2-variant
10417 python-faker))))
10418 (package
10419 (inherit base)
10420 (propagated-inputs
10421 `(("python2-ipaddress" ,python2-ipaddress)
10422 ,@(package-propagated-inputs base))))))
10423
10424(define-public python-pyaml
10425 (package
10426 (name "python-pyaml")
10427 (version "18.11.0")
10428 (source (origin
10429 (method url-fetch)
10430 (uri (pypi-uri "pyaml" version))
10431 (sha256
10432 (base32
10433 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
10434 (build-system python-build-system)
10435 (native-inputs
10436 `(("python-unidecode" ,python-unidecode)))
10437 (propagated-inputs
10438 `(("python-pyyaml" ,python-pyyaml)))
10439 (home-page "https://github.com/mk-fg/pretty-yaml")
10440 (synopsis "YAML pretty-print library for Python")
10441 (description
10442 "pyaml is a PyYAML based python module to produce pretty and readable
10443YAML-serialized data.")
492e3a7a 10444 (license license:wtfpl2)))
44d10b1f
RW
10445
10446(define-public python2-pyaml
10447 (package-with-python2 python-pyaml))
10448
10449(define-public python-backpack
10450 (package
10451 (name "python-backpack")
10452 (version "0.1")
10453 (source
10454 (origin
10455 (method url-fetch)
10456 (uri (pypi-uri "backpack" version))
10457 (sha256
10458 (base32
10459 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
10460 (build-system python-build-system)
10461 (native-inputs
10462 `(("python-pytest" ,python-pytest)
10463 ("python-nose" ,python-nose)))
10464 (propagated-inputs
10465 `(("python-simplejson" ,python-simplejson)))
10466 (home-page "https://github.com/sdispater/backpack")
10467 (synopsis "Utilities for working with Python collections")
10468 (description "Backpack provides some useful utilities for working with
10469collections of data.")
10470 (license license:expat)))
10471
10472(define-public python2-backpack
10473 (package-with-python2 python-backpack))
10474
10475(define-public python-prompt-toolkit
10476 (package
10477 (name "python-prompt-toolkit")
10478 (version "2.0.7")
10479 (source
10480 (origin
10481 (method url-fetch)
10482 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10483 (sha256
10484 (base32
10485 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
10486 (build-system python-build-system)
10487 (arguments
10488 `(#:phases
10489 (modify-phases %standard-phases
10490 (delete 'check)
10491 (add-after 'install 'post-install-check
10492 (lambda* (#:key inputs outputs #:allow-other-keys)
10493 ;; HOME is needed for the test
10494 ;; "test_pathcompleter_can_expanduser".
10495 (setenv "HOME" "/tmp")
10496 (add-installed-pythonpath inputs outputs)
10497 (invoke "py.test"))))))
10498 (propagated-inputs
10499 `(("python-wcwidth" ,python-wcwidth)
10500 ("python-six" ,python-six)
10501 ("python-pygments" ,python-pygments)))
10502 (native-inputs
10503 `(("python-pytest" ,python-pytest)))
10504 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10505 (synopsis "Library for building command line interfaces in Python")
10506 (description
10507 "Prompt-Toolkit is a library for building interactive command line
10508interfaces in Python. It's like GNU Readline but it also features syntax
10509highlighting while typing, out-of-the-box multi-line input editing, advanced
10510code completion, incremental search, support for Chinese double-width
10511characters, mouse support, and auto suggestions.")
10512 (license license:bsd-3)))
10513
10514(define-public python2-prompt-toolkit
10515 (package-with-python2 python-prompt-toolkit))
10516
10517(define-public python-prompt-toolkit-1
10518 (package (inherit python-prompt-toolkit)
10519 (version "1.0.15")
10520 (source
10521 (origin
10522 (method url-fetch)
10523 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10524 (sha256
10525 (base32
10526 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
10527
10528(define-public python2-prompt-toolkit-1
10529 (package-with-python2 python-prompt-toolkit-1))
10530
10531(define-public python-jedi
10532 (package
10533 (name "python-jedi")
b8e5de56 10534 (version "0.13.3")
44d10b1f
RW
10535 (source
10536 (origin
10537 (method url-fetch)
10538 (uri (pypi-uri "jedi" version))
10539 (sha256
10540 (base32
b8e5de56 10541 "0nsrjlb57njqppxmi8wjsb1dkad7qa7svx67jbkhixq66lz61c1b"))))
44d10b1f
RW
10542 (build-system python-build-system)
10543 (arguments
b8e5de56 10544 `( ;; Many tests are failing with Python 3.7.x as of version 0.13.3 (see:
44d10b1f
RW
10545 ;; https://github.com/davidhalter/jedi/issues/1263)
10546 #:tests? #f
10547 #:phases
10548 (modify-phases %standard-phases
10549 (replace 'check
10550 (lambda* (#:key tests? #:allow-other-keys)
10551 (when tests?
10552 (invoke "py.test" "-vv")))))))
10553 (native-inputs
10554 `(("python-pytest" ,python-pytest)
10555 ("python-docopt" ,python-docopt)))
10556 (propagated-inputs
10557 `(("python-parso" ,python-parso)))
10558 (home-page "https://github.com/davidhalter/jedi")
10559 (synopsis "Autocompletion and static analysis library for Python")
10560 (description
10561 "Jedi is a static analysis tool for Python that can be used in Integrated
10562Development Environments (@dfn{IDE}s) and text editors. It understands Python
10563on a deeper level than many other static analysis frameworks for Python.
10564
10565Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
10566well.")
10567 (license license:expat)))
10568
10569(define-public python2-jedi
b8e5de56
MC
10570 (let ((base (package-with-python2 (strip-python2-variant python-jedi))))
10571 (package
10572 (inherit base)
10573 (arguments (substitute-keyword-arguments (package-arguments base)
10574 ((#:tests? _) #t))))))
44d10b1f
RW
10575
10576(define-public ptpython
10577 (package
10578 (name "ptpython")
10579 (version "0.34")
10580 (source (origin
10581 (method url-fetch)
10582 (uri (pypi-uri "ptpython" version))
10583 (sha256
10584 (base32
10585 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10586 (build-system python-build-system)
10587 (arguments
10588 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
10589 (propagated-inputs
10590 `(("python-docopt" ,python-docopt)
10591 ("python-jedi" ,python-jedi)
10592 ("python-prompt-toolkit" ,python-prompt-toolkit)
10593 ("python-pygments" ,python-pygments)))
10594 (home-page "https://github.com/jonathanslenders/ptpython")
10595 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10596 (description
10597 "ptpython is a Python read-eval-print loop with IDE-like features.
10598It supports syntax highlighting, multiline editing, autocompletion, mouse,
10599color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10600etc.")
10601 (license license:bsd-3)
10602 (properties `((python2-variant . ,(delay ptpython-2))))))
10603
10604(define-public ptpython-2
10605 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10606 (package
10607 (inherit base)
10608 (name "ptpython2"))))
10609
10610(define-public python-stem
10611 (package
10612 (name "python-stem")
e746d1c3 10613 (version "1.7.1")
44d10b1f
RW
10614 (source
10615 (origin
10616 (method url-fetch)
10617 (uri (pypi-uri "stem" version))
10618 (sha256
10619 (base32
e746d1c3 10620 "18lc95pmc7i089nlsb06dsxyjl5wbhxfqgdxbjcia35ndh8z7sn9"))))
44d10b1f
RW
10621 (build-system python-build-system)
10622 (arguments
10623 `(#:phases
10624 (modify-phases %standard-phases
10625 (replace 'check
10626 (lambda _
10627 (invoke "./run_tests.py" "--unit")
10628 #t)))))
10629 (native-inputs
10630 `(("python-mock" ,python-mock)
10631 ("python-pycodestyle" ,python-pycodestyle)
10632 ("python-pyflakes" ,python-pyflakes)))
10633 (home-page "https://stem.torproject.org/")
10634 (synopsis
10635 "Python controller library that allows applications to interact with Tor")
10636 (description
10637 "Stem is a Python controller library for Tor. With it you can use Tor's
10638control protocol to script against the Tor process and read descriptor data
10639relays publish about themselves.")
10640 (license license:lgpl3)))
10641
10642(define-public python2-stem
10643 (package-with-python2 python-stem))
10644
10645(define-public python-pyserial
10646 (package
10647 (name "python-pyserial")
10648 (version "3.1.1")
10649 (source
10650 (origin
10651 (method url-fetch)
10652 (uri (pypi-uri "pyserial" version))
10653 (sha256
10654 (base32
10655 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
10656 (build-system python-build-system)
10657 (arguments
10658 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
10659 ;; #:phases
10660 ;; (modify-phases %standard-phases
10661 ;; (replace 'check
10662 ;; (lambda _
10663 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
10664 (home-page
10665 "https://github.com/pyserial/pyserial")
10666 (synopsis "Python Serial Port Bindings")
10667 (description "@code{pyserial} provide serial port bindings for Python. It
10668supports different byte sizes, stop bits, parity and flow control with RTS/CTS
10669and/or Xon/Xoff. The port is accessed in RAW mode.")
10670 (license license:bsd-3)))
10671
10672(define-public python2-pyserial
10673 (package-with-python2 python-pyserial))
10674
10675(define-public python-kivy
10676 (package
10677 (name "python-kivy")
10678 (version "1.10.1")
10679 (source
10680 (origin
10681 (method url-fetch)
10682 (uri (pypi-uri "Kivy" version))
10683 (file-name (string-append name "-" version ".tar.gz"))
10684 (sha256
10685 (base32
10686 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
10687 (build-system python-build-system)
10688 (arguments
10689 `(#:tests? #f ; Tests require many optional packages
10690 #:phases
10691 (modify-phases %standard-phases
10692 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
10693 (lambda* (#:key inputs #:allow-other-keys)
10694 (setenv "KIVY_SDL2_PATH"
10695 (string-append (assoc-ref inputs "sdl-union")
10696 "/include/SDL2"))
10697 #t)))))
10698 (native-inputs
10699 `(("git" ,git)
10700 ("pkg-config" ,pkg-config)
10701 ("python-cython" ,python-cython)))
10702 (inputs
10703 `(("gstreamer" ,gstreamer)
10704 ("mesa" ,mesa)
10705 ("sdl-union"
10706 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
10707 (home-page "http://kivy.org")
10708 (synopsis
10709 "Multitouch application framework")
10710 (description
10711 "A software library for rapid development of
10712hardware-accelerated multitouch applications.")
10713 (license license:expat)))
10714
10715(define-public python2-kivy
10716 (package-with-python2 python-kivy))
10717
10718(define-public python-kivy-next
10719 (deprecated-package "python-kivy-next" python-kivy))
10720
10721(define-public python2-kivy-next
10722 (deprecated-package "python2-kivy-next" python2-kivy))
10723
10724(define-public python-binaryornot
10725 (package
10726 (name "python-binaryornot")
10727 (version "0.4.4")
10728 (source (origin
10729 (method url-fetch)
10730 (uri (pypi-uri "binaryornot" version))
10731 (sha256
10732 (base32
10733 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
10734 (build-system python-build-system)
10735 (propagated-inputs
10736 `(("python-chardet" ,python-chardet)
10737 ("python-hypothesis" ,python-hypothesis)))
10738 (home-page "https://github.com/audreyr/binaryornot")
10739 (synopsis "Package to check if a file is binary or text")
10740 (description "Ultra-lightweight pure Python package to check if a file is
10741binary or text.")
10742 (license license:bsd-3)
10743 (properties `((python2-variant . ,(delay python2-binaryornot))))))
10744
10745(define-public python2-binaryornot
10746 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
10747 (package (inherit base)
10748 (propagated-inputs
10749 `(("python2-enum34" ,python2-enum34)
10750 ,@(package-propagated-inputs base))))))
10751
10752(define-public python-nltk
10753 (package
10754 (name "python-nltk")
10755 (version "3.2.1")
10756 (source (origin
10757 (method url-fetch)
10758 (uri (pypi-uri "nltk" version))
10759 (sha256
10760 (base32
10761 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
10762 (build-system python-build-system)
10763 (arguments
10764 '(;; The tests require some extra resources to be downloaded.
10765 ;; TODO Try packaging these resources.
10766 #:tests? #f))
10767 (home-page "http://nltk.org/")
10768 (synopsis "Natural Language Toolkit")
10769 (description "It provides interfaces to over 50 corpora and lexical
10770resources such as WordNet, along with a suite of text processing libraries
10771for classification, tokenization, stemming, tagging, parsing, and semantic
10772reasoning, wrappers for natural language processing libraries.")
10773 (license license:asl2.0)))
10774
10775(define-public python2-nltk
10776 (package-with-python2 python-nltk))
10777
10778(define-public python-pymongo
10779 (package
10780 (name "python-pymongo")
10781 (version "3.7.2")
10782 (source (origin
10783 (method url-fetch)
10784 (uri (pypi-uri "pymongo" version))
10785 (sha256
10786 (base32
10787 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
10788 (build-system python-build-system)
10789 (propagated-inputs
10790 `(("python-certifi" ,python-certifi)))
10791 (home-page "https://github.com/mongodb/mongo-python-driver")
10792 (synopsis "Python driver for MongoDB")
10793 (description "Python driver for MongoDB.")
10794 (license license:asl2.0)))
10795
10796(define-public python2-pymongo
10797 (package-with-python2 python-pymongo))
10798
44d10b1f
RW
10799(define-public python-consul
10800 (package
10801 (name "python-consul")
10802 (version "0.6.1")
10803 (source
10804 (origin
10805 (method url-fetch)
10806 (uri (pypi-uri "python-consul" version))
10807 (sha256
10808 (base32
10809 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
10810 (build-system python-build-system)
10811 (arguments
10812 '(#:tests? #f)) ; The tests are not distributed
10813 (propagated-inputs
10814 `(("python-requests" ,python-requests)
10815 ("python-six" ,python-six)))
10816 (home-page "https://github.com/cablehead/python-consul")
10817 (synopsis "Python client for Consul")
10818 (description
10819 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
10820discovery, monitoring and configuration.")
10821 (license license:expat)))
10822
10823(define-public python2-consul
10824 (package-with-python2 python-consul))
10825
10826(define-public python-schematics
10827 (package
10828 (name "python-schematics")
10829 (version "1.1.1")
10830 (source
1961d187
TGR
10831 (origin
10832 (method git-fetch)
10833 (uri (git-reference
10834 (url "https://github.com/schematics/schematics.git")
10835 (commit (string-append "v" version))))
10836 (file-name (git-file-name name version))
10837 (sha256
10838 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
44d10b1f
RW
10839 (build-system python-build-system)
10840 (propagated-inputs
10841 `(("python-six" ,python-six)))
10842 (arguments
1961d187
TGR
10843 ;; The tests require a bunch of not very nice packages with fixed
10844 ;; version requirements (e.g. python-coveralls).
10845 `(#:tests? #f))
44d10b1f
RW
10846 (home-page "https://github.com/schematics/schematics")
10847 (synopsis "Python Data Structures for Humans")
10848 (description "Python Data Structures for Humans.")
10849 (license license:bsd-3)))
10850
10851(define-public python2-schematics
10852 (package-with-python2 python-schematics))
10853
10854(define-public python-odfpy
10855 (package
10856 (name "python-odfpy")
10857 (version "1.3.3")
10858 (source (origin
10859 (method url-fetch)
10860 (uri (pypi-uri "odfpy" version))
10861 (sha256
10862 (base32
10863 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
10864 (arguments
10865 `(#:modules ((srfi srfi-1)
10866 (guix build python-build-system)
10867 (guix build utils))
10868 #:phases
10869 (modify-phases %standard-phases
10870 (replace 'check
10871 ;; The test runner invokes python2 and python3 for test*.py.
10872 ;; To avoid having both in inputs, we replicate it here.
10873 (lambda _
21ccc01d
RW
10874 (for-each (lambda (test-file) (invoke "python" test-file))
10875 (find-files "tests" "^test.*\\.py$"))
10876 #t)))))
44d10b1f
RW
10877 (build-system python-build-system)
10878 (home-page "https://github.com/eea/odfpy")
10879 (synopsis "Python API and tools to manipulate OpenDocument files")
10880 (description "Collection of libraries and utility programs written in
10881Python to manipulate OpenDocument 1.2 files.")
10882 (license
10883 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
10884 ;; number of files with other licenses.
10885 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
10886
10887(define-public python2-odfpy
10888 (package-with-python2 python-odfpy))
10889
10890(define-public python-natsort
10891 (package
10892 (name "python-natsort")
10893 (version "5.4.1")
10894 (source (origin
10895 (method url-fetch)
10896 (uri (pypi-uri "natsort" version))
10897 (sha256
10898 (base32
10899 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
10900 (build-system python-build-system)
10901 (arguments
10902 `(#:modules ((guix build utils)
10903 (guix build python-build-system)
10904 (srfi srfi-1)
10905 (srfi srfi-26)
10906 (ice-9 ftw))
10907 #:phases
10908 (modify-phases %standard-phases
10909 (add-before 'check 'set-cachedir
10910 ;; Tests require write access to $HOME by default
10911 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
10912 (replace 'check
10913 (lambda _
10914 (let ((cwd (getcwd)))
10915 (setenv "PYTHONPATH"
10916 (string-append
10917 cwd "/build/"
10918 (find (cut string-prefix? "lib" <>)
10919 (scandir (string-append cwd "/build")))
10920 ":"
10921 (getenv "PYTHONPATH")))
10922 (invoke "pytest" "-v")))))))
10923 (native-inputs
10924 `(("python-hypothesis" ,python-hypothesis)
10925 ("python-pytest-cov" ,python-pytest-cov)
10926 ("python-pytest-mock" ,python-pytest-mock)
10927 ("python-pytest" ,python-pytest)))
10928 (propagated-inputs ; TODO: Add python-fastnumbers.
10929 `(("python-pyicu" ,python-pyicu)))
10930 (home-page "https://github.com/SethMMorton/natsort")
10931 (synopsis "Natural sorting for python and shell")
10932 (description
10933 "Natsort lets you apply natural sorting on lists instead of
10934lexicographical. If you use the built-in @code{sorted} method in python
36a4366d
EF
10935on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
10936@code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
10937@code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
10938identifies numbers and sorts them separately from strings. It can also sort
10939version numbers, real numbers, mixed types and more, and comes with a shell
10940command @command{natsort} that exposes this functionality in the command line.")
44d10b1f
RW
10941 (license license:expat)
10942 (properties `((python2-variant . ,(delay python2-natsort))))))
10943
10944(define-public python2-natsort
10945 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
10946 (package (inherit base)
10947 (native-inputs
10948 `(("python2-pathlib" ,python2-pathlib)
10949 ,@(package-native-inputs base))))))
10950
10951(define-public python-glances
10952 (package
10953 (name "python-glances")
9898a2d3 10954 (version "3.1.1")
44d10b1f
RW
10955 (source
10956 (origin
10957 (method url-fetch)
10958 (uri (pypi-uri "Glances" version))
10959 (sha256
10960 (base32
15b4c911
TGR
10961 "07j1ggzsqiskyz1i4mrnyr9i95v0dqi0i0hibnv1l188km8shmi8"))
10962 (modules '((guix build utils)))
10963 (snippet
10964 '(begin
10965 ;; Glances phones PyPI for weekly update checks by default.
10966 ;; Disable these. The user can re-enable them if desired.
10967 (substitute* "glances/outdated.py"
10968 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
10969 (string-append indentation
10970 "self.args.disable_check_update = True\n"
10971 line)))
10972 #t))))
44d10b1f
RW
10973 (build-system python-build-system)
10974 (propagated-inputs
9898a2d3
TGR
10975 `(("python-future" ,python-future)
10976 ("python-psutil" ,python-psutil)))
44d10b1f
RW
10977 (home-page
10978 "https://github.com/nicolargo/glances")
bab94ffa 10979 (synopsis "Cross-platform curses-based monitoring tool")
44d10b1f
RW
10980 (description
10981 "Glances is a curses-based monitoring tool for a wide variety of platforms.
bab94ffa
TGR
10982Glances uses the PsUtil library to get information from your system. It
10983monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
44d10b1f
RW
10984 (license license:lgpl3+)))
10985
10986(define-public python2-glances
10987 (package-with-python2 python-glances))
10988
10989(define-public python-graphql-core
10990 (package
10991 (name "python-graphql-core")
10992 (version "0.5.3")
10993 (source
10994 (origin
10995 (method url-fetch)
10996 (uri (pypi-uri "graphql-core" version))
10997 (sha256
10998 (base32
10999 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
11000 (build-system python-build-system)
11001 (arguments
11002 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
11003 #:phases
11004 (modify-phases %standard-phases
11005 (add-after 'unpack 'patch-hardcoded-version
11006 (lambda _ (substitute*
11007 "setup.py"
11008 (("'gevent==1.1rc1'") "'gevent'"))
11009 #t)))))
11010 (native-inputs
11011 `(("python-gevent" ,python-gevent)
11012 ("python-mock" ,python-mock)
11013 ("python-pytest-mock" ,python-pytest-mock)))
11014 (propagated-inputs
11015 `(("python-promise" ,python-promise)
11016 ("python-six" ,python-six)))
11017 (home-page "https://github.com/graphql-python/graphql-core")
11018 (synopsis "GraphQL implementation for Python")
11019 (description
11020 "GraphQL implementation for Python. GraphQL is a data query language and
11021runtime designed and used to request and deliver data to mobile and web apps.
11022This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
11023to Python.")
11024 (license license:expat)))
11025
11026(define-public python2-graphql-core
11027 (package-with-python2 python-graphql-core))
11028
11029(define-public python-graphql-relay
11030 (package
11031 (name "python-graphql-relay")
11032 (version "0.4.5")
11033 (source
11034 (origin
11035 (method url-fetch)
11036 (uri (pypi-uri "graphql-relay" version))
11037 (sha256
11038 (base32
11039 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
11040 (build-system python-build-system)
11041 (arguments
11042 '(#:tests? #f)) ; The tests are not distributed
11043 (propagated-inputs
11044 `(("python-graphql-core" ,python-graphql-core)
11045 ("python-promise" ,python-promise)
11046 ("python-six" ,python-six)))
11047 (home-page "https://github.com/graphql-python/graphql-relay-py")
11048 (synopsis "Relay implementation for Python")
11049 (description
11050 "This is a library to allow the easy creation of Relay-compliant servers
11051using the GraphQL Python reference implementation of a GraphQL server. It
11052should be noted that the code is a exact port of the original
11053@url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11054from Facebook.")
11055 (license license:expat)))
11056
11057(define-public python2-graphql-relay
11058 (package-with-python2 python-graphql-relay))
11059
11060(define-public python-graphene
11061 (package
11062 (name "python-graphene")
11063 (version "0.10.2")
11064 (source
11065 (origin
11066 (method url-fetch)
11067 (uri (pypi-uri "graphene" version))
11068 (sha256
11069 (base32
11070 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11071 (build-system python-build-system)
11072 (propagated-inputs
11073 `(("python-graphql-core" ,python-graphql-core)
11074 ("python-graphql-relay" ,python-graphql-relay)
11075 ("python-iso8601" ,python-iso8601)
11076 ("python-promise" ,python-promise)
11077 ("python-six" ,python-six)))
11078 (arguments
11079 `(#:tests? #f)) ; no tests/ in the PyPI tarball
11080 (home-page "http://graphene-python.org/")
11081 (synopsis "GraphQL Framework for Python")
11082 (description
11083 "Graphene is a Python library for building GraphQL schemas/types.
11084A GraphQL schema describes your data model, and provides a GraphQL server
11085with an associated set of resolve methods that know how to fetch data.")
11086 (properties `((python2-variant . ,(delay python2-graphene))))
11087 (license license:expat)))
11088
11089(define-public python2-graphene
11090 (let ((base (package-with-python2
11091 (strip-python2-variant python-graphene))))
11092 (package (inherit base)
11093 (native-inputs
11094 `(("python2-sqlalchemy" ,python2-sqlalchemy)
11095 ,@(package-native-inputs base))))))
11096
11097(define-public python-nautilus
11098 (package
11099 (name "python-nautilus")
11100 (version "0.4.9")
11101 (source
11102 (origin
11103 (method url-fetch)
11104 (uri (pypi-uri "nautilus" version))
11105 (sha256
11106 (base32
11107 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11108 (build-system python-build-system)
11109 (arguments `(#:tests? #f)) ; fails to import test modules
11110 (propagated-inputs
11111 `(("python-bcrypt" ,python-bcrypt)
11112 ("python-click" ,python-click)
11113 ("python-consul" ,python-consul)
11114 ("python-graphene" ,python-graphene)
11115 ("python-jinja2" ,python-jinja2)
11116 ("python-peewee" ,python-peewee)
11117 ("python-pika" ,python-pika)
11118 ("python-tornado" ,python-tornado)
11119 ("python-wtforms" ,python-wtforms)))
11120 (native-inputs
11121 `(("python-nose2" ,python-nose2)))
11122 (home-page "https://github.com/AlecAivazis/nautilus")
11123 (synopsis "Library for creating microservice applications")
11124 (description
11125 "Nautilus is a framework for flux based microservices that looks to
11126provide extendible implementations of common aspects of a cloud so that you can
11127focus on building massively scalable web applications.")
11128 (license license:expat)))
11129
11130(define-public python-snowballstemmer
11131 (package
11132 (name "python-snowballstemmer")
11133 (version "1.2.1")
11134 (source (origin
11135 (method url-fetch)
11136 (uri (pypi-uri "snowballstemmer" version))
11137 (sha256
11138 (base32
11139 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
11140 (build-system python-build-system)
11141 (arguments
11142 `(;; No tests exist
11143 #:tests? #f))
11144 (home-page "https://github.com/shibukawa/snowball_py")
11145 (synopsis "Snowball stemming library collection for Python")
11146 (description "This package provides 16 word stemmer algorithms generated
11147from Snowball algorithms. It includes the 15 original ones plus the Poerter
11148English stemmer.")
11149 (license license:bsd-3)))
11150
11151(define-public python2-snowballstemmer
11152 (package-with-python2 python-snowballstemmer))
11153
44d10b1f
RW
11154(define-public python-setproctitle
11155(package
11156 (name "python-setproctitle")
11157 (version "1.1.10")
11158 (source
11159 (origin
11160 (method url-fetch)
11161 (uri (pypi-uri "setproctitle" version))
11162 (sha256
11163 (base32
11164 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11165 (build-system python-build-system)
11166 (arguments
11167 '(#:phases
11168 (modify-phases %standard-phases
11169 (add-before 'check 'patch-Makefile
11170 ;; Stricly this is only required for the python2 variant.
11171 ;; But adding a phase in an inherited package seems to be
11172 ;; cumbersum. So we patch even for python3.
11173 (lambda _
11174 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11175 (when nose
11176 (substitute* "Makefile"
11177 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11178 (string-append nose "/bin/nosetests "))))
11179 #t)))
11180 (replace 'check
11181 (lambda _
11182 (setenv "PYTHON" (or (which "python3") (which "python")))
11183 (setenv "PYCONFIG" (or (which "python3-config")
11184 (which "python-config")))
11185 (setenv "CC" "gcc")
11186 ;; No need to extend PYTHONPATH to find the built package, since
11187 ;; the Makefile will build anyway
11188 (invoke "make" "check"))))))
11189 (native-inputs
11190 `(("procps" ,procps))) ; required for tests
11191 (home-page
11192 "https://github.com/dvarrazzo/py-setproctitle")
11193 (synopsis
11194 "Setproctitle implementation for Python to customize the process title")
11195 (description "The library allows a process to change its title (as displayed
11196by system tools such as ps and top).
11197
11198Changing the title is mostly useful in multi-process systems, for
11199example when a master process is forked: changing the children's title
11200allows to identify the task each process is busy with. The technique
11201is used by PostgreSQL and the OpenSSH Server for example.")
11202 (license license:bsd-3)
11203 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11204
11205(define-public python2-setproctitle
11206 (let ((base (package-with-python2
11207 (strip-python2-variant python-setproctitle))))
11208 (package
11209 (inherit base)
11210 (native-inputs `(("python2-nose" ,python2-nose)
11211 ,@(package-native-inputs base))))))
11212
11213(define-public python-validictory
11214 (package
11215 (name "python-validictory")
11216 (version "1.0.1")
11217 (source
11218 (origin
11219 (method url-fetch)
11220 (uri (pypi-uri "validictory" version))
11221 (sha256
11222 (base32
11223 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11224 (build-system python-build-system)
11225 (arguments
11226 '(#:phases
11227 (modify-phases %standard-phases
11228 (add-after 'unpack 'bootstrap
11229 ;; Move the tests out of the package directory to avoid
11230 ;; packaging them.
11231 (lambda* _
11232 (rename-file "validictory/tests" "tests")
11233 (delete-file "tests/__init__.py")))
11234 (replace 'check
11235 (lambda _
11236 ;; Extend PYTHONPATH so the built package will be found.
11237 (setenv "PYTHONPATH"
11238 (string-append (getcwd) "/build/lib:"
11239 (getenv "PYTHONPATH")))
6568bd5d 11240 (invoke "py.test" "-vv" ))))))
44d10b1f
RW
11241 (native-inputs
11242 `(("python-pytest" ,python-pytest)))
11243 (home-page
11244 "https://github.com/jamesturk/validictory")
11245 (synopsis "General purpose Python data validator")
11246 (description "It allows validation of arbitrary Python data structures.
11247
11248The schema format is based on the JSON Schema
11249proposal (http://json-schema.org), so combined with json the library is also
11250useful as a validator for JSON data.")
11251 (license license:expat)))
11252
11253(define-public python2-validictory
11254 (package-with-python2 python-validictory))
11255
11256(define-public python-pyelftools
11257 (package
11258 (name "python-pyelftools")
11259 (version "0.25")
11260 (source
11261 (origin
11262 (method url-fetch)
11263 (uri (pypi-uri "pyelftools" version))
11264 (sha256
11265 (base32
11266 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
11267 (build-system python-build-system)
11268 (arguments
11269 `(#:phases
11270 (modify-phases %standard-phases
11271 (add-before 'check 'set-pythonpath
11272 (lambda _
11273 (setenv "PYTHONPATH"
11274 (string-append
11275 (getcwd) "/test/"
11276 ":" (getenv "PYTHONPATH")))
11277 #t)))))
11278 (home-page
11279 "https://github.com/eliben/pyelftools")
11280 (synopsis
11281 "Analyze binary and library file information")
11282 (description "This Python library provides interfaces for parsing and
11283analyzing two binary and library file formats; the Executable and Linking
11284Format (ELF), and debugging information in the Debugging With Attributed
11285Record Format (DWARF).")
11286 (license license:public-domain)))
11287
11288(define-public python-pyev
11289 (package
11290 (name "python-pyev")
11291 (version "0.9.0")
11292 (source
11293 (origin
11294 (method url-fetch)
11295 (uri (pypi-uri "pyev" version))
11296 (sha256
11297 (base32
11298 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11299 (build-system python-build-system)
11300 (arguments
11301 `(#:tests? #f ; no test suite
11302 #:phases
11303 (modify-phases %standard-phases
11304 (add-after 'unpack 'patch
11305 (lambda* (#:key inputs #:allow-other-keys)
11306 (let ((libev (string-append (assoc-ref inputs "libev")
11307 "/lib/libev.so.4")))
11308 (substitute* "setup.py"
11309 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
11310 (string-append "libev_dll_name = \"" libev "\"")))))))))
11311 (inputs
11312 `(("libev" ,libev)))
11313 (home-page "http://pythonhosted.org/pyev/")
11314 (synopsis "Python libev interface")
11315 (description "Pyev provides a Python interface to libev.")
11316 (license license:gpl3)))
11317
11318(define-public python2-pyev
11319 (package-with-python2 python-pyev))
11320
11321(define-public python-imagesize
11322 (package
11323 (name "python-imagesize")
11324 (version "1.1.0")
11325 (source
11326 (origin
11327 (method url-fetch)
11328 (uri (pypi-uri "imagesize" version))
11329 (sha256
11330 (base32
11331 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
11332 (build-system python-build-system)
11333 (home-page "https://github.com/shibukawa/imagesize_py")
11334 (synopsis "Gets image size of files in various formats in Python")
11335 (description
11336 "This package allows determination of image size from
11337PNG, JPEG, JPEG2000 and GIF files in pure Python.")
11338 (license license:expat)))
11339
11340(define-public python2-imagesize
11341 (package-with-python2 python-imagesize))
11342
11343(define-public python-termstyle
11344 (package
11345 (name "python-termstyle")
11346 (version "0.1.11")
11347 (source
11348 (origin
11349 (method url-fetch)
11350 (uri (pypi-uri "termstyle" version))
11351 (sha256
11352 (base32
11353 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
11354 (build-system python-build-system)
11355 (arguments
11356 '(#:phases
11357 (modify-phases %standard-phases
11358 (replace 'check
11359 (lambda _
831080a6 11360 (invoke "python" "test3.py"))))))
44d10b1f
RW
11361 (home-page "https://github.com/gfxmonk/termstyle")
11362 (synopsis "Console text coloring for Python")
11363 (description "This package provides console text coloring for Python.")
11364 (license license:bsd-3)))
11365
11366(define-public python-argcomplete
11367 (package
11368 (name "python-argcomplete")
11369 (version "1.7.0")
11370 (source
11371 (origin
11372 (method url-fetch)
11373 (uri (pypi-uri "argcomplete" version))
11374 (sha256
11375 (base32
11376 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
11377 (build-system python-build-system)
11378 (native-inputs
11379 `(("python-pexpect" ,python-pexpect)
11380 ("tcsh" ,tcsh)
11381 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
11382 (home-page "https://github.com/kislyuk/argcomplete")
11383 (synopsis "Shell tab completion for Python argparse")
11384 (description "argcomplete provides extensible command line tab completion
11385of arguments and options for Python scripts using @code{argparse}. It's
11386particularly useful for programs with many options or sub-parsers that can
11387dynamically suggest completions; for example, when browsing resources over the
11388network.")
11389 (license license:asl2.0)))
11390
11391(define-public python2-argcomplete
11392 (package-with-python2 python-argcomplete))
11393
11394(define-public python-xopen
11395 (package
11396 (name "python-xopen")
24d64989 11397 (version "0.5.0")
44d10b1f
RW
11398 (source
11399 (origin
11400 (method url-fetch)
11401 (uri (pypi-uri "xopen" version))
11402 (sha256
11403 (base32
24d64989 11404 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
44d10b1f 11405 (build-system python-build-system)
24d64989
RW
11406 (propagated-inputs
11407 `(("python-setuptools-scm" ,python-setuptools-scm)))
44d10b1f
RW
11408 (home-page "https://github.com/marcelm/xopen/")
11409 (synopsis "Open compressed files transparently")
11410 (description "This module provides an @code{xopen} function that works like
11411Python's built-in @code{open} function, but can also deal with compressed files.
11412Supported compression formats are gzip, bzip2 and, xz, and are automatically
11413recognized by their file extensions. The focus is on being as efficient as
11414possible on all supported Python versions.")
11415 (license license:expat)))
11416
11417(define-public python2-xopen
11418 (let ((base (package-with-python2
11419 (strip-python2-variant python-xopen))))
11420 (package
11421 (inherit base)
11422 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
11423 ,@(package-propagated-inputs base))))))
11424
11425(define-public python-cheetah
11426 (package
11427 (name "python-cheetah")
11428 (version "3.1.0")
11429 (source
11430 (origin
11431 (method url-fetch)
11432 (uri (pypi-uri "Cheetah3" version))
11433 (sha256
11434 (base32
11435 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
11436 (build-system python-build-system)
11437 (arguments
11438 `(#:modules ((guix build utils)
11439 (guix build python-build-system)
11440 (ice-9 ftw)
11441 (srfi srfi-1)
11442 (srfi srfi-26))
11443 #:phases (modify-phases %standard-phases
11444 (add-after 'unpack 'use-absolute-python
11445 (lambda _
11446 (substitute* "Cheetah/CheetahWrapper.py"
11447 (("#!/usr/bin/env python")
11448 (string-append "#!" (which "python"))))
11449 #t))
11450 (replace 'check
11451 (lambda _
11452 (let ((cwd (getcwd)))
11453 (setenv "PYTHONPATH"
11454 (string-append
11455 cwd "/build/"
11456 (find (cut string-prefix? "lib" <>)
11457 (scandir (string-append cwd "/build")))
11458 ":" (getenv "PYTHONPATH")))
11459 (setenv "PATH"
11460 (string-append (getenv "PATH")
11461 ":" cwd "/bin"))
11462 (setenv "TMPDIR" "/tmp")
11463
11464 (substitute* "Cheetah/Tests/Test.py"
11465 (("unittest.TextTestRunner\\(\\)")
11466 "unittest.TextTestRunner(verbosity=2)"))
11467
11468 (invoke "python" "Cheetah/Tests/Test.py")))))))
11469 (propagated-inputs
11470 `(("python-markdown" ,python-markdown))) ;optional
11471 (home-page "http://cheetahtemplate.org/")
11472 (synopsis "Template engine")
11473 (description "Cheetah is a text-based template engine and Python code
11474generator.
11475
11476Cheetah can be used as a standalone templating utility or referenced as
11477a library from other Python applications. It has many potential uses,
11478but web developers looking for a viable alternative to ASP, JSP, PHP and
11479PSP are expected to be its principle user group.
11480
11481Features:
11482@enumerate
11483@item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
11484 text-based format.
11485@item Cleanly separates content, graphic design, and program code.
11486@item Blends the power and flexibility of Python with a simple template language
11487 that non-programmers can understand.
11488@item Gives template writers full access to any Python data structure, module,
11489 function, object, or method in their templates.
11490@item Makes code reuse easy by providing an object-orientated interface to
11491 templates that is accessible from Python code or other Cheetah templates.
11492 One template can subclass another and selectively reimplement sections of it.
11493@item Provides a simple, yet powerful, caching mechanism that can dramatically
11494 improve the performance of a dynamic website.
11495@item Compiles templates into optimized, yet readable, Python code.
11496@end enumerate")
11497 (license (license:x11-style "file://LICENSE"))))
11498
11499(define-public python2-cheetah
11500 (package-with-python2 python-cheetah))
11501
11502(define-public python-dulwich
11503 (package
11504 (name "python-dulwich")
11505 (version "0.18.6")
11506 (source
11507 (origin
11508 (method url-fetch)
11509 (uri (list (string-append "https://www.dulwich.io/releases/"
11510 "dulwich-" version ".tar.gz")
11511 (pypi-uri "dulwich" version)))
11512 (sha256
11513 (base32
11514 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
11515 (build-system python-build-system)
11516 (arguments
11517 `(#:phases
11518 (modify-phases %standard-phases
11519 (add-before 'check 'fix-tests
11520 (lambda* (#:key inputs #:allow-other-keys)
11521 ;; The tests use Popen with a custom environment which doesn't
11522 ;; include PATH.
11523 (substitute* "dulwich/tests/compat/utils.py"
11524 (("'git'") (string-append "'"
11525 (which "git")
11526 "'")))
11527 (substitute* '("dulwich/tests/test_repository.py"
11528 "dulwich/tests/test_hooks.py")
11529 (("#!/bin/sh") (string-append "#!" (which "sh"))))
11530 (setenv "TEST_RUNNER" "unittest")
11531 (setenv "PYTHONHASHSEED" "random")
11532 #t)))))
11533 (propagated-inputs
11534 `(("python-fastimport" ,python-fastimport)))
11535 (native-inputs
11536 `(("python-mock" ,python-mock)
11537 ("python-geventhttpclient" ,python-geventhttpclient)
11538 ("git" ,git)))
11539 (home-page "https://www.dulwich.io/")
11540 (synopsis "Git implementation in Python")
11541 (description "Dulwich is an implementation of the Git file formats and
11542protocols written in pure Python.")
11543 ;; Can be used with either license.
11544 (license (list license:asl2.0 license:gpl2+))))
11545
11546(define-public python2-dulwich
11547 (package-with-python2 python-dulwich))
11548
11549(define-public python-pbkdf2
11550 (package
11551 (name "python-pbkdf2")
11552 (version "1.3")
11553 (source
11554 (origin
11555 (method url-fetch)
11556 (uri (pypi-uri "pbkdf2" version))
11557 (sha256
11558 (base32
11559 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
11560 (build-system python-build-system)
11561 (arguments
11562 '(#:phases
11563 (modify-phases %standard-phases
11564 (replace 'check
11565 (lambda _
11566 (setenv "PYTHONPATH"
11567 (string-append (getcwd) "/build/lib:"
11568 (getenv "PYTHONPATH")))
ee2bb944 11569 (invoke "python" "test/test_pbkdf2.py"))))))
44d10b1f
RW
11570 (propagated-inputs
11571 `(("python-pycrypto" ,python-pycrypto))) ; optional
11572 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
11573 (synopsis "Password-based key derivation")
11574 (description "This module implements the password-based key derivation
11575function, PBKDF2, specified in RSA PKCS#5 v2.0.
11576
11577PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
11578is part of the RSA Public Key Cryptography Standards series. The provided
11579implementation takes a password or a passphrase and a salt value (and
11580optionally a iteration count, a digest module, and a MAC module) and provides
11581a file-like object from which an arbitrarly-sized key can be read.")
11582 (license license:expat)))
11583
11584(define-public python2-pbkdf2
11585 (package-with-python2 python-pbkdf2))
11586
11587(define-public python-qrcode
11588 (package
11589 (name "python-qrcode")
217ea1a1 11590 (version "6.1")
44d10b1f
RW
11591 (source
11592 (origin
11593 (method url-fetch)
11594 (uri (pypi-uri "qrcode" version))
11595 (sha256
217ea1a1 11596 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
44d10b1f
RW
11597 (build-system python-build-system)
11598 (arguments
11599 ;; FIXME: Tests require packaging 'pymaging'.
11600 '(#:tests? #f))
11601 (propagated-inputs
11602 `(("python-lxml" ,python-lxml) ; for SVG output
11603 ("python-pillow" ,python-pillow) ; for PNG output
11604 ("python-six" ,python-six)))
44d10b1f
RW
11605 (home-page "https://github.com/lincolnloop/python-qrcode")
11606 (synopsis "QR Code image generator")
11607 (description "This package provides a pure Python QR Code generator
11608module. It uses the Python Imaging Library (PIL) to allow for the generation
11609of QR Codes.
11610
11611In addition this package provides a command line tool to generate QR codes and
11612either write these QR codes to a file or do the output as ascii art at the
11613console.")
11614 (license license:bsd-3)))
11615
11616(define-public python2-qrcode
11617 (package-with-python2 python-qrcode))
11618
11619(define-public python-rst2ansi
11620 (package
11621 (name "python-rst2ansi")
11622 (version "0.1.5")
11623 (source
11624 (origin
11625 (method url-fetch)
11626 (uri (pypi-uri "rst2ansi" version))
11627 (sha256
11628 (base32
11629 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
11630 (build-system python-build-system)
11631 (propagated-inputs
11632 `(("python-docutils" ,python-docutils)))
11633 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
11634 (synopsis "Convert RST to ANSI-decorated console output")
11635 (description
11636 "Python module dedicated to rendering RST (reStructuredText) documents
11637to ansi-escaped strings suitable for display in a terminal.")
11638 (license license:expat)))
11639
11640(define-public python-ansi2html
11641 (package
11642 (name "python-ansi2html")
11643 (version "1.2.0")
11644 (source
11645 (origin
11646 (method url-fetch)
11647 (uri (pypi-uri "ansi2html" version))
11648 (sha256
11649 (base32
11650 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
11651 (build-system python-build-system)
11652 (native-inputs
11653 `(("python-mock" ,python-mock)
11654 ("python-nose" ,python-nose)))
11655 (propagated-inputs
11656 `(("python-six" ,python-six)))
11657 (home-page "https://github.com/ralphbean/ansi2html")
11658 (synopsis "Convert ANSI-decorated console output to HTML")
11659 (description
11660 "@command{ansi2html} is a Python library and command line utility for
11661convering text with ANSI color codes to HTML or LaTeX.")
11662 (license license:gpl3+)))
11663
11664(define-public python2-ansi2html
11665 (package-with-python2 python-ansi2html))
11666
11667(define-public python-ddt
11668 (package
11669 (name "python-ddt")
11670 (version "1.1.3")
11671 (source
11672 (origin
11673 (method url-fetch)
11674 (uri (pypi-uri "ddt" version))
11675 (sha256
11676 (base32
11677 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
11678 (build-system python-build-system)
11679 (native-inputs
11680 `(("python-mock" ,python-mock)
11681 ("python-nose" ,python-nose)))
11682 (propagated-inputs
11683 `(("python-six" ,python-six)
11684 ("python-pyyaml" ,python-pyyaml)))
11685 (home-page "https://github.com/txels/ddt")
11686 (synopsis "Data-Driven Tests")
11687 (description
11688 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
11689running it with different test data, and make it appear as multiple test
11690cases.")
11691 (license license:expat)))
11692
11693(define-public python2-ddt
11694 (package-with-python2 python-ddt))
11695
11696(define-public python-pycountry
11697 (package
11698 (name "python-pycountry")
11699 (version "18.5.26")
11700 (source
11701 (origin
11702 (method url-fetch)
11703 (uri (pypi-uri "pycountry" version))
11704 (sha256
11705 (base32
11706 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
11707 (build-system python-build-system)
11708 (home-page "https://bitbucket.org/flyingcircus/pycountry")
11709 (synopsis "ISO databases for languages, countries, currencies, etc.")
11710 (description
11711 "@code{pycountry} provides the ISO databases for the standards:
11712@enumerate
11713@item 639-3 (Languages)
11714@item 3166 (Countries)
11715@item 3166-3 (Deleted Countries)
11716@item 3166-2 (Subdivisions of countries)
11717@item 4217 (Currencies)
11718@item 15924 (Scripts)
11719@end enumerate
11720It includes a copy from Debian’s pkg-isocodes and makes the data accessible
11721through a Python API.")
11722 (license license:lgpl2.1+)))
11723
11724(define-public python2-pycountry
11725 (package-with-python2 python-pycountry))
11726
11727(define-public python-pycosat
11728 (package
11729 (name "python-pycosat")
11730 (version "0.6.1")
11731 (source
11732 (origin
11733 (method url-fetch)
11734 (uri (pypi-uri "pycosat" version))
11735 (sha256
11736 (base32
11737 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
11738 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
11739 (build-system python-build-system)
11740 (home-page "https://github.com/ContinuumIO/pycosat")
11741 (synopsis "Bindings to picosat (a SAT solver)")
11742 (description
11743 "This package provides efficient Python bindings to @code{picosat} on
11744the C level. When importing pycosat, the @code{picosat} solver becomes part
11745of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
11746Problem} (SAT) solver.")
11747 (license license:expat)))
11748
11749(define-public python2-pycosat
11750 (package-with-python2 python-pycosat))
11751
11752(define-public python2-ruamel.ordereddict
11753 (package
11754 (name "python2-ruamel.ordereddict")
11755 (version "0.4.9")
11756 (source
11757 (origin
11758 (method url-fetch)
11759 (uri (pypi-uri "ruamel.ordereddict" version))
11760 (sha256
11761 (base32
11762 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
11763 (build-system python-build-system)
11764 (arguments
11765 `(#:python ,python-2
11766 #:phases
11767 (modify-phases %standard-phases
11768 (delete 'check)
11769 (add-after 'install 'check
11770 (lambda* (#:key inputs outputs #:allow-other-keys)
11771 (add-installed-pythonpath inputs outputs)
f987ac30 11772 (invoke "python" "test/testordereddict.py"))))))
44d10b1f
RW
11773 (home-page "https://bitbucket.org/ruamel/ordereddict")
11774 (synopsis "Version of dict that keeps keys in insertion order")
11775 (description
11776 "This is an implementation of an ordered dictionary with @dfn{Key
11777Insertion Order} (KIO: updates of values do not affect the position of the
11778key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
11779removed and put at the back). The standard library module @code{OrderedDict},
11780implemented later, implements a subset of @code{ordereddict} functionality.
11781Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
11782Order} (KSO, no sorting function can be specified, but a transform can be
11783specified to apply on the key before comparison (e.g. @code{string.lower})).")
11784 (license license:expat)))
11785
11786(define-public python-pypeg2
11787 (package
11788 (name "python-pypeg2")
11789 (version "2.15.2")
11790 (source
11791 (origin
11792 (method url-fetch)
11793 (uri (pypi-uri "pyPEG2" version))
11794 (sha256
11795 (base32
11796 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
11797 (build-system python-build-system)
11798 (propagated-inputs `(("python-lxml" ,python-lxml)))
11799 (arguments
11800 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
11801 '(#:tests? #f))
11802 (home-page "https://fdik.org/pyPEG/")
11803 (synopsis "Parsering Expression Grammars in Python")
11804 (description "PyPEG is an intrinsic parser interpreter framework for
11805Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
11806parse many formal languages.")
11807 (license license:gpl2)))
11808
11809(define-public python-incremental
11810 (package
11811 (name "python-incremental")
11812 (version "17.5.0")
11813 (source
11814 (origin
11815 (method url-fetch)
11816 (uri (pypi-uri "incremental" version))
11817 (sha256
11818 (base32
11819 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
11820 (build-system python-build-system)
11821 (home-page "https://github.com/hawkowl/incremental")
11822 (synopsis "Library for versioning Python projects")
11823 (description "Incremental is a small library that versions your Python
11824projects.")
11825 (license license:expat)))
11826
11827(define-public python2-incremental
11828 (package-with-python2 python-incremental))
11829
11830(define-public python-invoke
11831 (package
11832 (name "python-invoke")
11833 (home-page "http://www.pyinvoke.org/")
11834 (version "1.1.0")
11835 (source (origin
11836 (method url-fetch)
11837 (uri (pypi-uri "invoke" version))
11838 (sha256
11839 (base32
11840 "0aiy1xvk1f91246zxd1zqrm679vdvd10h843a2na41cqr3cflpi6"))))
11841 (build-system python-build-system)
11842 (arguments
11843 ;; XXX: Requires many dependencies that are not yet in Guix.
11844 `(#:tests? #f))
11845 (synopsis "Pythonic task execution")
11846 (description
11847 "Invoke is a Python task execution tool and library, drawing inspiration
11848from various sources to arrive at a powerful and clean feature set. It is
11849evolved from the Fabric project, but focuses on local and abstract concerns
11850instead of servers and network commands.")
11851 (license license:bsd-3)))
11852
11853(define-public python2-invoke
11854 (package-with-python2 python-invoke))
11855
11856(define-public python-automat
11857 (package
11858 (name "python-automat")
919d80a0 11859 (version "0.7.0")
44d10b1f
RW
11860 (source (origin
11861 (method url-fetch)
11862 (uri (pypi-uri "Automat" version))
11863 (sha256
11864 (base32
919d80a0 11865 "03ivg70n3b1cbcd2zvjhk8y4kmqxcvhmili39lmgx09dza1qpmyb"))))
44d10b1f
RW
11866 (build-system python-build-system)
11867 ;; We disable the tests because they require python-twisted, while
11868 ;; python-twisted depends on python-automat. Twisted is optional, but the
11869 ;; tests fail if it is not available. Also see
11870 ;; <https://github.com/glyph/automat/issues/71>.
11871 (arguments '(#:tests? #f))
11872 (native-inputs
11873 `(("python-m2r" ,python-m2r)
11874 ("python-setuptools-scm" ,python-setuptools-scm)
11875 ("python-graphviz" ,python-graphviz)))
11876 (propagated-inputs
11877 `(("python-six" ,python-six)
11878 ("python-attrs" ,python-attrs)))
11879 (home-page "https://github.com/glyph/Automat")
11880 (synopsis "Self-service finite-state machines")
11881 (description "Automat is a library for concise, idiomatic Python
11882expression of finite-state automata (particularly deterministic finite-state
11883transducers).")
11884 (license license:expat)))
11885
11886(define-public python2-automat
11887 (package-with-python2 python-automat))
11888
11889(define-public python-m2r
11890 (package
11891 (name "python-m2r")
bcfb8fac 11892 (version "0.2.1")
44d10b1f
RW
11893 (source (origin
11894 (method url-fetch)
11895 (uri (pypi-uri "m2r" version))
11896 (sha256
11897 (base32
bcfb8fac 11898 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
44d10b1f
RW
11899 (build-system python-build-system)
11900 (propagated-inputs
11901 `(("python-docutils" ,python-docutils)
11902 ("python-mistune" ,python-mistune)))
11903 (native-inputs
11904 `(("python-pygments" ,python-pygments)
11905 ("python-mock" ,python-mock)))
11906 (home-page "https://github.com/miyakogi/m2r")
11907 (synopsis "Markdown to reStructuredText converter")
11908 (description "M2R converts a markdown file including reST markups to valid
11909reST format.")
11910 (license license:expat)))
11911
11912(define-public python2-m2r
11913 (package-with-python2 python-m2r))
11914
11915(define-public python-constantly
11916 (package
11917 (name "python-constantly")
11918 (version "15.1.0")
11919 (source (origin
11920 (method url-fetch)
11921 (uri (pypi-uri "constantly" version))
11922 (sha256
11923 (base32
11924 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
11925 (build-system python-build-system)
11926 (home-page "https://github.com/twisted/constantly")
11927 (synopsis "Symbolic constants in Python")
11928 (description "Constantly is a Python library that provides symbolic
11929constant support. It includes collections and constants with text, numeric,
11930and bit flag values.")
11931 (license license:expat)))
11932
11933(define-public python2-constantly
11934 (package-with-python2 python-constantly))
11935
11936(define-public python-attrs
11937 (package
11938 (name "python-attrs")
67458e20 11939 (version "19.1.0")
44d10b1f
RW
11940 (source (origin
11941 (method url-fetch)
11942 (uri (pypi-uri "attrs" version))
11943 (sha256
11944 (base32
67458e20 11945 "16g33zr5f449lqc5wgvzpknxryfzrfsxcr6kpgxwn7l5fkv71f7h"))))
44d10b1f
RW
11946 (build-system python-build-system)
11947 (arguments
11948 `(#:modules ((guix build utils)
11949 (guix build python-build-system)
11950 (ice-9 ftw)
11951 (srfi srfi-1)
11952 (srfi srfi-26))
11953 #:phases (modify-phases %standard-phases
11954 (replace 'check
11955 (lambda _
11956 (let ((cwd (getcwd)))
11957 (setenv "PYTHONPATH"
11958 (string-append
11959 cwd "/build/"
11960 (find (cut string-prefix? "lib" <>)
11961 (scandir (string-append cwd "/build")))
11962 ":"
11963 (getenv "PYTHONPATH")))
11964 (invoke "python" "-m" "pytest")))))))
11965 (native-inputs
11966 `(("python-coverage" ,python-coverage)
11967 ("python-hypothesis" ,python-hypothesis)
11968 ("python-pympler" ,python-pympler)
11969 ("python-pytest" ,python-pytest)
11970 ("python-six" ,python-six)
11971 ("python-sphinx" ,python-sphinx)
11972 ("python-zope-interface" ,python-zope-interface)))
11973 (home-page "https://github.com/python-attrs/attrs/")
11974 (synopsis "Attributes without boilerplate")
11975 (description "@code{attrs} is a Python package with class decorators that
11976ease the chores of implementing the most common attribute-related object
11977protocols.")
11978 (license license:expat)))
11979
11980(define-public python2-attrs
11981 (package-with-python2 python-attrs))
11982
11983(define-public python-attrs-bootstrap
11984 (package
11985 (inherit python-attrs)
11986 (name "python-attrs-bootstrap")
11987 ;; Keep this on a fixed version so python-attrs can be updated without
11988 ;; triggering a mass-rebuild. FIXME: Update this in the next rebuild cycle.
11989 (version "17.4.0")
11990 (source (origin
11991 (method url-fetch)
11992 (uri (pypi-uri "attrs" version))
11993 (sha256
11994 (base32
11995 "1jafnn1kzd6qhxgprhx6y6ik1r5m2rilx25syzcmq03azp660y8w"))))
11996 (native-inputs `())
11997 (arguments `(#:tests? #f))))
11998
11999(define-public python2-attrs-bootstrap
12000 (package-with-python2 python-attrs-bootstrap))
12001
12002(define-public python2-cliapp
12003 (package
12004 (name "python2-cliapp")
9064b84e 12005 (version "1.20180812.1")
44d10b1f
RW
12006 (source
12007 (origin
12008 (method url-fetch)
12009 (uri (string-append
12010 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
12011 version ".tar.gz"))
12012 (sha256
12013 (base32
9064b84e 12014 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
44d10b1f
RW
12015 (build-system python-build-system)
12016 (arguments
12017 `(#:python ,python-2
12018 #:phases
12019 (modify-phases %standard-phases
12020 ;; check phase needs to be run before the build phase. If not,
12021 ;; coverage-test-runner looks for tests for the built source files,
12022 ;; and fails.
12023 (delete 'check)
12024 (add-before 'build 'check
12025 (lambda _
12026 ;; Disable python3 tests
12027 (substitute* "check"
12028 (("python3") "# python3"))
6c826d32 12029 (invoke "./check"))))))
44d10b1f
RW
12030 (native-inputs
12031 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12032 ("python2-pep8" ,python2-pep8)))
12033 (propagated-inputs
12034 `(("python2-pyaml" ,python2-pyaml)))
12035 (home-page "https://liw.fi/cliapp/")
12036 (synopsis "Python framework for command line programs")
12037 (description "@code{python2-cliapp} is a python framework for
12038command line programs. It contains the typical stuff such programs
12039need to do, such as parsing the command line for options, and
12040iterating over input files.")
12041 (license license:gpl2+)))
12042
12043(define-public python2-ttystatus
12044 (package
12045 (name "python2-ttystatus")
e516a9c2 12046 (version "0.36")
44d10b1f
RW
12047 (source
12048 (origin
12049 (method url-fetch)
12050 (uri (string-append
12051 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
12052 version ".tar.gz"))
12053 (sha256
12054 (base32
e516a9c2 12055 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
44d10b1f
RW
12056 (build-system python-build-system)
12057 (native-inputs
12058 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12059 ("python2-pep8" ,python2-pep8)))
12060 (arguments
12061 `(#:python ,python-2
12062 #:phases
12063 (modify-phases %standard-phases
12064 ;; check phase needs to be run before the build phase. If not,
12065 ;; coverage-test-runner looks for tests for the built source files,
12066 ;; and fails.
12067 (delete 'check)
12068 (add-before 'build 'check
cbeee881 12069 (lambda _ (invoke "make" "check"))))))
44d10b1f
RW
12070 (home-page "https://liw.fi/ttystatus/")
12071 (synopsis "Python library for showing progress reporting and
12072status updates on terminals")
12073 (description "@code{python2-ttystatus} is a python library for
12074showing progress reporting and status updates on terminals, for
12075command line programs. Output is automatically adapted to the width
12076of the terminal: truncated if it does not fit, and resized if the
12077terminal size changes.")
12078 (license license:gpl3+)))
12079
12080(define-public python2-tracing
12081 (package
12082 (name "python2-tracing")
12083 (version "0.10")
12084 (source
12085 (origin
12086 (method url-fetch)
12087 (uri (string-append
12088 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
12089 version ".tar.gz"))
12090 (sha256
12091 (base32
12092 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
12093 (build-system python-build-system)
12094 (arguments
12095 `(#:python ,python-2))
12096 (home-page "https://liw.fi/tracing/")
12097 (synopsis "Python debug logging helper")
12098 (description "@code{python2-tracing} is a python library for
12099logging debug messages. It provides a way to turn debugging messages
12100on and off, based on the filename they occur in. It is much faster
12101than using @code{logging.Filter} to accomplish the same thing, which
12102matters when code is run in production mode. The actual logging still
12103happens using the @code{logging} library.")
12104 (license license:gpl3+)))
12105
12106(define-public python2-larch
12107 (package
12108 (name "python2-larch")
12109 (version "1.20151025")
12110 (source
12111 (origin
12112 (method url-fetch)
12113 (uri (string-append
12114 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
12115 version ".tar.gz"))
12116 (patches (search-patches
12117 "python2-larch-coverage-4.0a6-compatibility.patch"))
12118 (sha256
12119 (base32
12120 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
12121 (build-system python-build-system)
12122 (arguments
12123 `(#:python ,python-2
12124 #:phases
12125 (modify-phases %standard-phases
12126 ;; check phase needs to be run before the build phase. If not,
12127 ;; coverage-test-runner looks for tests for the built source files,
12128 ;; and fails.
12129 (delete 'check)
12130 (add-before 'build 'check
204ad455 12131 (lambda _ (invoke "make" "check"))))))
44d10b1f
RW
12132 (native-inputs
12133 `(("cmdtest" ,cmdtest)
12134 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
12135 (propagated-inputs
12136 `(("python2-tracing" ,python2-tracing)))
12137 (home-page "https://liw.fi/larch/")
12138 (synopsis "Python copy-on-write B-tree library")
12139 (description "@code{python2-larch} is an implementation of
12140particular kind of B-tree, based on research by Ohad Rodeh. See
12141@url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
12142on the data structure.
12143
12144The distinctive feature of this B-tree is that a node is never
12145(conceptually) modified. Instead, all updates are done by
12146copy-on-write. This makes it easy to clone a tree, and modify only the
12147clone, while other processes access the original tree.")
12148 (license license:gpl3+)))
12149
12150(define-public python-astroid
12151 (package
12152 (name "python-astroid")
12153 (version "2.1.0")
12154 (source
12155 (origin
12156 (method url-fetch)
12157 (uri (pypi-uri "astroid" version))
12158 (sha256
12159 (base32
12160 "08hz675knh4294bancdapql392fmbjyimhbyrmfkz1ka7l035c1m"))))
12161 (build-system python-build-system)
12162 (propagated-inputs
12163 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
12164 ("python-six" ,python-six)
12165 ("python-wrapt" ,python-wrapt)))
12166 (native-inputs
12167 `(("python-dateutil" ,python-dateutil)
12168 ("python-nose" ,python-nose)
12169 ("python-pytest" ,python-pytest)
12170 ("python-pytest-runner" ,python-pytest-runner)))
12171 (arguments
12172 `(#:phases
12173 (modify-phases %standard-phases
12174 (add-after 'unpack 'remove-spurious-test
12175 (lambda _
12176 ;; This can be removed after upgrading from python-3.7
12177 ;; https://github.com/PyCQA/astroid/issues/593
12178 ;; https://bugs.python.org/issue34056
12179 (delete-file "astroid/tests/unittest_modutils.py")
12180 #t))
12181 (replace 'check
12182 (lambda _
12183 (invoke "pytest" "astroid"))))))
12184 (home-page "https://github.com/PyCQA/astroid")
12185 (synopsis "Common base representation of python source code for pylint and
12186other projects")
12187 (description "@code{python-astroid} provides a common base representation
12188of python source code for projects such as pychecker, pyreverse, pylint, etc.
12189
12190It provides a compatible representation which comes from the _ast module. It
12191rebuilds the tree generated by the builtin _ast module by recursively walking
12192down the AST and building an extended ast. The new node classes have
12193additional methods and attributes for different usages. They include some
12194support for static inference and local name scopes. Furthermore, astroid
12195builds partial trees by inspecting living objects.")
12196 (license license:lgpl2.1+)
12197 (properties `((python2-variant . ,(delay python2-astroid))))))
12198
12199(define-public python2-astroid
12200 (let ((base (package-with-python2
12201 (strip-python2-variant python-astroid))))
12202 (package (inherit base)
12203 ;; Version 2.x removes python2 support.
12204 (version "1.6.5")
12205 (source
12206 (origin
12207 (method url-fetch)
12208 (uri (pypi-uri "astroid" version))
12209 (sha256
12210 (base32
12211 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
12212 (arguments
12213 (substitute-keyword-arguments (package-arguments base)
12214 ((#:phases phases)
12215 `(modify-phases ,phases
12216 (add-after 'unpack 'remove-spurious-test
12217 (lambda _
12218 ;; https://github.com/PyCQA/astroid/issues/276
12219 (delete-file "astroid/tests/unittest_brain.py")
12220 #t))
12221 (replace 'check
12222 (lambda _
12223 (invoke"python" "-m" "unittest" "discover"
12224 "-p" "unittest*.py")))))))
12225 (native-inputs `())
12226 (propagated-inputs
12227 `(("python2-backports-functools-lru-cache"
12228 ,python2-backports-functools-lru-cache)
12229 ("python2-enum34" ,python2-enum34)
12230 ("python2-singledispatch" ,python2-singledispatch)
12231 ,@(package-propagated-inputs base))))))
12232
12233(define-public python-isort
12234 (package
12235 (name "python-isort")
e2227b6a 12236 (version "4.3.4")
44d10b1f
RW
12237 (source
12238 (origin
e2227b6a
EF
12239 (method git-fetch)
12240 (uri (git-reference
12241 ;; Tests pass only from the Github sources
12242 (url "https://github.com/timothycrosley/isort")
12243 (commit version)))
12244 (file-name (git-file-name name version))
44d10b1f
RW
12245 (sha256
12246 (base32
e2227b6a 12247 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
44d10b1f
RW
12248 (build-system python-build-system)
12249 (native-inputs
12250 `(("python-mock" ,python-mock)
12251 ("python-pytest" ,python-pytest)))
12252 (home-page "https://github.com/timothycrosley/isort")
12253 (synopsis "Python utility/library to sort python imports")
12254 (description "@code{python-isort} is a python utility/library to sort
12255imports alphabetically, and automatically separated into sections. It
12256provides a command line utility, a python library and plugins for various
12257editors.")
e2227b6a
EF
12258 (license license:expat)
12259 (properties `((python2-variant . ,(delay python2-isort))))))
44d10b1f
RW
12260
12261(define-public python2-isort
e2227b6a
EF
12262 (let ((base (package-with-python2
12263 (strip-python2-variant python-isort))))
12264 (package (inherit base)
12265 (native-inputs
12266 `(("python2-futures" ,python2-futures)
12267 ,@(package-native-inputs base))))))
44d10b1f
RW
12268
12269(define-public python2-backports-functools-lru-cache
12270 (package
12271 (name "python2-backports-functools-lru-cache")
12272 (version "1.5")
12273 (source
12274 (origin
12275 (method url-fetch)
12276 ;; only the pypi tarballs contain the necessary metadata
12277 (uri (pypi-uri "backports.functools_lru_cache" version))
12278 (sha256
12279 (base32
12280 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
12281 (build-system python-build-system)
12282 (native-inputs
12283 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
12284 (arguments
12285 `(#:python ,python-2))
12286 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
12287 (synopsis "Backport of functools.lru_cache from Python 3.3")
12288 (description "@code{python2-backports-functools-lru-cache} is a backport
12289of @code{functools.lru_cache} from python 3.3.")
12290 (license license:expat)))
12291
12292(define-public python-configparser
12293 (package
12294 (name "python-configparser")
12295 (version "3.5.0")
12296 (source
12297 (origin
12298 (method url-fetch)
12299 (uri (string-append
12300 "https://bitbucket.org/ambv/configparser/get/"
12301 version ".tar.bz2"))
12302 (file-name (string-append name "-" version ".tar.gz"))
12303 (sha256
12304 (base32
12305 "0waq40as14abwzbb321hfz4vr1fi363nscy32ga14qvfygrg96wa"))))
12306 (build-system python-build-system)
809f003f 12307 (home-page "https://github.com/jaraco/configparser/")
44d10b1f
RW
12308 (synopsis "Backport of configparser from python 3.5")
12309 (description "@code{python-configparser} is a backport of
12310@code{configparser} from Python 3.5 so that it can be used directly
12311in other versions.")
12312 (license license:expat)))
12313
12314(define-public python2-configparser
12315 (package-with-python2 python-configparser))
12316
12317(define-public python-mando
12318 (package
12319 (name "python-mando")
12320 (version "0.6.4")
12321 (source (origin
12322 (method url-fetch)
12323 (uri (pypi-uri "mando" version))
12324 (sha256
12325 (base32
12326 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
12327 (build-system python-build-system)
12328 (propagated-inputs
12329 `(("python-rst2ansi" ,python-rst2ansi)
12330 ("python-six" ,python-six)))
12331 (native-inputs
12332 `(("python-pytest" ,python-pytest)))
12333 (home-page "https://mando.readthedocs.org/")
12334 (synopsis
12335 "Wrapper around argparse, allowing creation of complete CLI applications")
12336 (description
12337 "This package is a wrapper around argparse, allowing you to write complete CLI
12338applications in seconds while maintaining all the flexibility.")
12339 (license license:expat)))
12340
12341(define-public python2-mando
12342 (package-with-python2 python-mando))
12343
70daf82f
RW
12344(define-public python2-argparse
12345 (package
12346 (name "python2-argparse")
12347 (version "1.4.0")
12348 (source
12349 (origin
12350 (method url-fetch)
12351 (uri (pypi-uri "argparse" version))
12352 (sha256
12353 (base32
12354 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
12355 (build-system python-build-system)
12356 (arguments
12357 `(#:python ,python-2))
12358 (home-page "https://github.com/ThomasWaldmann/argparse/")
12359 (synopsis "Python command-line parsing library")
12360 (description
12361 "This package is mostly for people who want to have @code{argparse} on
12362older Pythons because it was not part of the standard library back then.")
12363 (license license:psfl)))
12364
44d10b1f
RW
12365(define-public python-fudge
12366 (package
12367 (name "python-fudge")
12368 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
12369 ;; package, which is currently the only use of this package.
12370 (version "0.9.6")
12371 (source
12372 (origin
12373 (method url-fetch)
12374 (uri (pypi-uri "fudge" version))
12375 (sha256
12376 (base32
12377 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
12378 (build-system python-build-system)
12379 (arguments
12380 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
12381 (home-page "https://github.com/fudge-py/fudge")
12382 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
12383 (description
12384 "Fudge is a Python module for using fake objects (mocks and stubs) to
12385test real ones.
12386
12387In readable Python code, you declare the methods available on your fake object
12388and how they should be called. Then you inject that into your application and
12389start testing. This declarative approach means you don’t have to record and
12390playback actions and you don’t have to inspect your fakes after running code.
12391If the fake object was used incorrectly then you’ll see an informative
12392exception message with a traceback that points to the culprit.")
12393 (license license:expat)))
12394
12395(define-public python2-fudge
12396 (package-with-python2 python-fudge))
12397
12398(define-public python-mwclient
12399 (package
12400 (name "python-mwclient")
12401 (version "0.8.4")
12402 (source
12403 (origin
12404 (method url-fetch)
12405 ;; The PyPI version wouldn't contain tests.
12406 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
12407 "v" version ".tar.gz"))
12408 (file-name (string-append name "-" version ".tar.gz"))
12409 (sha256
12410 (base32
12411 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
12412 (build-system python-build-system)
12413 (propagated-inputs
12414 `(("python-requests" ,python-requests)
12415 ("python-requests-oauthlib"
12416 ,python-requests-oauthlib)
12417 ("python-six" ,python-six)))
12418 (native-inputs
12419 `(("python-mock" ,python-mock)
12420 ("python-pytest" ,python-pytest)
12421 ("python-pytest-pep8" ,python-pytest-pep8)
12422 ("python-pytest-cache" ,python-pytest-cache)
12423 ("python-pytest-cov" ,python-pytest-cov)
12424 ("python-responses" ,python-responses)))
12425 (home-page "https://github.com/btongminh/mwclient")
12426 (synopsis "MediaWiki API client")
12427 (description "This package provides a MediaWiki API client.")
12428 (license license:expat)))
12429
12430(define-public python2-mwclient
12431 (package-with-python2 python-mwclient))
12432
12433(define-public python-utils
12434 (package
12435 (name "python-utils")
12436 (version "2.1.0")
12437 (source (origin
12438 (method url-fetch)
12439 (uri (pypi-uri "python-utils" version))
12440 (sha256
12441 (base32
12442 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
12443 (build-system python-build-system)
12444 (native-inputs
12445 `(("pytest-runner" ,python-pytest-runner)
12446 ("pytest" ,python-pytest)
12447 ("six" ,python-six)))
12448 (home-page "https://github.com/WoLpH/python-utils")
12449 (synopsis "Convenient utilities not included with the standard Python install")
12450 (description
12451 "Python Utils is a collection of small Python functions and classes which
12452make common patterns shorter and easier.")
12453 (license license:bsd-2)))
12454
12455(define-public python2-utils
12456 (package-with-python2 python-utils))
12457
44d10b1f
RW
12458(define-public python-diff-match-patch
12459 (package
12460 (name "python-diff-match-patch")
12461 (version "20121119")
12462 (source
12463 (origin
12464 (method url-fetch)
12465 (uri (pypi-uri "diff-match-patch" version))
12466 (sha256
12467 (base32
12468 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
12469 (build-system python-build-system)
12470 (home-page "https://code.google.com/p/google-diff-match-patch")
12471 (synopsis "Synchronize plain text")
12472 (description "Diff Match and Patch libraries offer robust algorithms to
12473perform the operations required for synchronizing plain text.")
12474 (license license:asl2.0)))
12475
12476(define-public python2-diff-match-patch
12477 (package-with-python2 python-diff-match-patch))
12478
12479(define-public python-dirsync
12480 (package
12481 (name "python-dirsync")
12482 (version "2.2.3")
12483 (source
12484 (origin
12485 (method url-fetch)
12486 (uri (pypi-uri "dirsync" version))
12487 (sha256
12488 (base32
12489 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
12490 (build-system python-build-system)
12491 (propagated-inputs
12492 `(("six" ,python-six)))
12493 (home-page "https://bitbucket.org/tkhyn/dirsync")
12494 (synopsis "Advanced directory tree synchronisation tool")
12495 (description "Advanced directory tree synchronisation tool.")
12496 (license license:expat)))
12497
12498(define-public python2-dirsync
12499 (package-with-python2 python-dirsync))
12500
12501(define-public python-levenshtein
12502 (package
12503 (name "python-levenshtein")
12504 (version "0.12.0")
12505 (source
12506 (origin
12507 (method url-fetch)
12508 (uri (pypi-uri "python-Levenshtein" version))
12509 (sha256
12510 (base32
12511 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
12512 (build-system python-build-system)
12513 (home-page "https://github.com/ztane/python-Levenshtein")
12514 (synopsis "Fast computation of Levenshtein distance and string similarity")
12515 (description
12516 "The Levenshtein Python C extension module contains functions for fast computation of
12517@enumerate
12518@item Levenshtein (edit) distance, and edit operations
12519@item string similarity
12520@item approximate median strings, and generally string averaging
12521@item string sequence and set similarity
12522@end enumerate
12523It supports both normal and Unicode strings.")
12524 (license license:gpl2+)))
12525
12526(define-public python2-levenshtein
12527 (package-with-python2 python-levenshtein))
12528
12529(define-public python-scandir
12530 (package
12531 (name "python-scandir")
12532 (version "1.9.0")
12533 (source
12534 (origin
12535 (method url-fetch)
12536 (uri (pypi-uri "scandir" version))
12537 (sha256
12538 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
12539 (build-system python-build-system)
12540 (arguments
12541 `(#:phases (modify-phases %standard-phases
12542 (replace 'check
12543 (lambda _
12544 (invoke "python" "test/run_tests.py"))))))
12545 (home-page "https://github.com/benhoyt/scandir")
12546 (synopsis "Directory iteration function")
12547 (description
12548 "Directory iteration function like os.listdir(), except that instead of
12549returning a list of bare filenames, it yields DirEntry objects that include
12550file type and stat information along with the name. Using scandir() increases
12551the speed of os.walk() by 2-20 times (depending on the platform and file
12552system) by avoiding unnecessary calls to os.stat() in most cases.
12553
12554This package is part of the Python standard library since version 3.5.")
12555 (license license:bsd-3)))
12556
12557(define-public python2-scandir
12558 (package-with-python2 python-scandir))
12559
12560(define-public python2-stemming
12561 (package
12562 (name "python2-stemming")
12563 (version "1.0.1")
12564 (source
12565 (origin
12566 (method url-fetch)
12567 (uri (pypi-uri "stemming" version))
12568 (sha256
12569 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
12570 (build-system python-build-system)
12571 (arguments
12572 `(#:python ,python-2))
12573 (home-page "https://bitbucket.org/mchaput/stemming/overview")
12574 (synopsis "Python implementations of various stemming algorithms")
12575 (description
12576 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
12577stemming algorithms for English. These implementations are straightforward and
12578efficient, unlike some Python versions of the same algorithms available on the
12579Web. This package is an extraction of the stemming code included in the Whoosh
12580search engine.")
12581 (license license:public-domain)))
12582
12583(define-public python-factory-boy
12584 (package
12585 (name "python-factory-boy")
12586 (version "2.8.1")
12587 (source
12588 (origin
12589 (method url-fetch)
12590 (uri (pypi-uri "factory_boy" version))
12591 (sha256
12592 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
12593 (build-system python-build-system)
12594 (arguments
12595 ;; Tests are not included in the tarball.
12596 `(#:tests? #f))
12597 (propagated-inputs
12598 `(("faker" ,python-faker)))
12599 (home-page "https://github.com/benhoyt/scandir")
12600 (synopsis "Versatile test fixtures replacement")
12601 (description
12602 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
12603
12604As a fixtures replacement tool, it aims to replace static, hard to maintain
12605fixtures with easy-to-use factories for complex object.
12606
12607Instead of building an exhaustive test setup with every possible combination
12608of corner cases, factory_boy allows you to use objects customized for the
12609current test, while only declaring the test-specific fields")
12610 (license license:expat)))
12611
12612(define-public python2-factory-boy
12613 (package-with-python2 python-factory-boy))
12614
12615(define-public python-translate-toolkit
12616 (package
12617 (name "python-translate-toolkit")
12618 (version "2.1.0")
12619 (source
12620 (origin
12621 (method url-fetch)
12622 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
12623 (sha256
12624 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
12625 (build-system python-build-system)
12626 (native-inputs
12627 `(("python-pytest" ,python-pytest)
12628 ("python-sphinx" ,python-sphinx)))
12629 (propagated-inputs
12630 `(("python-babel" ,python-babel)
12631 ("python-beautifulsoup4" ,python-beautifulsoup4)
12632 ("python-chardet" ,python-chardet)
12633 ("python-diff-match-patch" ,python-diff-match-patch)
12634 ("python-levenshtein" ,python-levenshtein)
12635 ("python-lxml" ,python-lxml)
12636 ("python-six" ,python-six)
12637 ("python-vobject" ,python-vobject)
12638 ("python-pyyaml" ,python-pyyaml)))
12639 (arguments
12640 ;; TODO: tests are not run, because they end with
12641 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
12642 ;; 'parse_funcs'
12643 ;; during test setup.
12644 `(#:tests? #f))
18919cf9 12645 (home-page "https://toolkit.translatehouse.org")
44d10b1f
RW
12646 (synopsis "Tools and API for translation and localization engineering")
12647 (description
12648 "Tools and API for translation and localization engineering. It contains
12649several utilities, as well as an API for building localization tools.")
12650 (license license:gpl2+)))
12651
12652(define-public python2-translate-toolkit
12653 (package-with-python2 python-translate-toolkit))
12654
12655(define-public python-packaging
12656 (package
12657 (name "python-packaging")
5e5cdac0 12658 (version "19.0")
44d10b1f
RW
12659 (source
12660 (origin
12661 (method url-fetch)
12662 (uri (pypi-uri "packaging" version))
12663 (sha256
12664 (base32
5e5cdac0 12665 "1brjhygq9dz6x1kdljivkjfldi3qf5rbkqgck1bpgv9qpv8ab60c"))))
44d10b1f
RW
12666 (build-system python-build-system)
12667 (arguments
12668 `(#:phases (modify-phases %standard-phases
12669 (replace 'check
12670 (lambda _ (invoke "py.test" "-vv"))))))
12671 (native-inputs
12672 `(("python-pretend" ,python-pretend)
12673 ("python-pytest" ,python-pytest)))
12674 (propagated-inputs
12675 `(("python-pyparsing" ,python-pyparsing)
12676 ("python-six" ,python-six)))
12677 (home-page "https://github.com/pypa/packaging")
12678 (synopsis "Core utilities for Python packages")
12679 (description "Packaging is a Python module for dealing with Python packages.
12680It offers an interface for working with package versions, names, and dependency
12681information.")
12682 ;; From 'LICENSE': This software is made available under the terms of
12683 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
12684 ;; Contributions to this software is made under the terms of *both* these
12685 ;; licenses.
12686 (license (list license:asl2.0 license:bsd-2))))
12687
12688(define-public python2-packaging
12689 (package-with-python2 python-packaging))
12690
12691(define-public python-relatorio
12692 (package
12693 (name "python-relatorio")
12694 (version "0.8.0")
12695 (source
12696 (origin
12697 (method url-fetch)
12698 (uri (pypi-uri "relatorio" version))
12699 (sha256
12700 (base32
12701 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
12702 (build-system python-build-system)
12703 (propagated-inputs
12704 `(("python-lxml" ,python-lxml)
12705 ("python-genshi" ,python-genshi)))
12706 (native-inputs
12707 `(("python-magic" ,python-magic)))
12708 (home-page "https://relatorio.tryton.org/")
12709 (synopsis "Templating library able to output ODT and PDF files")
12710 (description "Relatorio is a templating library which provides a way to
12711easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
12712for more filetypes can be easily added by creating plugins for them.")
12713 (license license:gpl3+)))
12714
12715(define-public python2-relatorio
12716 (package-with-python2 python-relatorio))
12717
12718(define-public python-radon
12719 (package
12720 (name "python-radon")
12721 (version "2.2.0")
12722 (source
12723 (origin
12724 (method url-fetch)
12725 (uri (pypi-uri "radon" version))
12726 (sha256
12727 (base32
12728 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
12729 (build-system python-build-system)
12730 (arguments
12731 `(#:phases (modify-phases %standard-phases
12732 (replace 'check
12733 (lambda _
12734 (invoke "python" "radon/tests/run.py"))))))
12735 (propagated-inputs
12736 `(("python-colorama" ,python-colorama)
12737 ("python-flake8-polyfill" ,python-flake8-polyfill)
12738 ("python-mando" ,python-mando)))
12739 (native-inputs
12740 `(("python-pytest" ,python-pytest)
12741 ("python-pytest-mock" ,python-pytest-mock)))
12742 (home-page "https://radon.readthedocs.org/")
12743 (synopsis "Code Metrics in Python")
12744 (description "Radon is a Python tool which computes various code metrics.
12745Supported metrics are:
12746@itemize @bullet
12747@item raw metrics: SLOC, comment lines, blank lines, &c.
12748@item Cyclomatic Complexity (i.e. McCabe’s Complexity)
12749@item Halstead metrics (all of them)
12750@item the Maintainability Index (a Visual Studio metric)
12751@end itemize")
12752 (license license:expat)))
12753
12754(define-public python2-radon
12755 (package-with-python2 python-radon))
12756
12757(define-public python-sure
12758 (package
12759 (name "python-sure")
12760 (version "1.4.11")
12761 (source
12762 (origin
12763 (method url-fetch)
12764 (uri (pypi-uri "sure" version))
12765 (sha256
12766 (base32
12767 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
12768 (build-system python-build-system)
12769 (propagated-inputs
12770 `(("python-mock" ,python-mock)
12771 ("python-six" ,python-six)))
12772 (native-inputs
12773 `(("python-nose" ,python-nose)))
12774 (home-page "https://github.com/gabrielfalcao/sure")
12775 (synopsis "Automated testing library in python for python")
12776 (description
12777 "Sure is a python library that leverages a DSL for writing assertions.
12778Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
12779 (license license:gpl3+)))
12780
12781(define-public python2-sure
12782 (package-with-python2 python-sure))
12783
12784(define-public python2-couleur
12785 ;; This package does not seem to support python3 at all, hence,
12786 ;; only the python2 variant definition is provided.
12787 (package
12788 (name "python2-couleur")
12789 (version "0.6.2")
12790 (source
12791 (origin
12792 (method url-fetch)
12793 (uri (pypi-uri "couleur" version))
12794 (sha256
12795 (base32
12796 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
12797 (build-system python-build-system)
12798 (arguments
12799 `(#:python ,python-2))
12800 (home-page "https://github.com/gabrielfalcao/couleur")
12801 (synopsis
12802 "ANSI terminal tool for python, colored shell and other handy fancy features")
12803 (description
12804 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
12805terminal such as coloured output in the shell, overwriting output, indentation, etc.")
12806 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
12807 ;; https://github.com/gabrielfalcao/couleur/issues/11
12808 (license license:lgpl3+)))
12809
12810(define-public python-misaka
12811 (package
12812 (name "python-misaka")
0dcb3412 12813 (version "2.1.1")
44d10b1f
RW
12814 (source
12815 (origin
12816 (method url-fetch)
12817 (uri (pypi-uri "misaka" version))
12818 (sha256
12819 (base32
0dcb3412 12820 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
44d10b1f
RW
12821 (build-system python-build-system)
12822 (arguments
12823 `(;; Line 37 of setup.py calls self.run_command('develop')
12824 ;; in the 'check' phase. This command seems to be trying
12825 ;; to write to
12826 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
12827 ;; for which it does not have the permission to write.
12828 #:tests? #f))
12829 (propagated-inputs
12830 `(("python-cffi" ,python-cffi)))
12831 (home-page "https://github.com/FSX/misaka")
12832 (synopsis "Python binding for Hoedown")
12833 (description
12834 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
12835library written in C. It features a fast HTML renderer and functionality to make custom
12836renderers (e.g. man pages or LaTeX).")
12837 (license license:expat)))
12838
12839(define-public python2-misaka
12840 (package-with-python2 python-misaka))
12841
12842(define-public python2-steadymark
12843 ;; This is forced into being a python2 only variant
12844 ;; due to its dependence on couleur that has no support
12845 ;; for python3
12846 (package
12847 (name "python2-steadymark")
12848 (version "0.7.3")
12849 (source
12850 (origin
12851 (method url-fetch)
12852 (uri (pypi-uri "steadymark" version))
12853 (sha256
12854 (base32
12855 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
12856 (build-system python-build-system)
12857 (native-inputs
12858 `(("python-couleur" ,python2-couleur)
12859 ("python-sure" ,python2-sure)
12860 ("python-misaka" ,python2-misaka)))
12861 (arguments
12862 `(#:python ,python-2
12863 #:phases
12864 (modify-phases %standard-phases
12865 (add-before 'build 'patch-setup-py
12866 (lambda _
12867 ;; Update requirements from dependency==version
12868 ;; to dependency>=version
12869 (substitute* "setup.py"
12870 (("==") ">="))
12871 #t)))))
12872 (home-page "https://github.com/gabrielfalcao/steadymark")
12873 (synopsis "Markdown-based test runner for python")
12874 (description
12875 "@code{Steadymark} allows documentation to be written in github-flavoured
12876markdown. The documentation may contain snippets of code surrounded by python
12877code blocks and @code{Steadymark} will find these snippets and run them, making
12878sure that there are no old malfunctional examples in the documentation examples.")
12879 (license license:expat)))
12880
12881(define-public python-jsonpointer
12882 (package
12883 (name "python-jsonpointer")
12884 (version "1.10")
12885 (source
12886 (origin
12887 (method url-fetch)
12888 (uri (pypi-uri "jsonpointer" version))
12889 (sha256
12890 (base32
12891 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
12892 (build-system python-build-system)
12893 (home-page "https://github.com/stefankoegl/python-json-pointer")
12894 (synopsis "Identify specific nodes in a JSON document")
12895 (description "@code{jsonpointer} allows you to access specific nodes
12896by path in a JSON document (see RFC 6901).")
12897 (license license:bsd-3)))
12898
12899(define-public python2-jsonpointer
12900 (package-with-python2 python-jsonpointer))
12901
12902(define-public python-jsonpatch
12903 (package
12904 (name "python-jsonpatch")
12905 (version "1.16")
12906 (source
12907 (origin
12908 (method url-fetch)
12909 ;; pypi version lacks tests.js
12910 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12911 "archive/v" version ".tar.gz"))
12912 (file-name (string-append name "-" version ".tar.gz"))
12913 (sha256
12914 (base32
12915 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
12916 (build-system python-build-system)
12917 (native-inputs
12918 `(("python-jsonpointer" ,python-jsonpointer)))
12919 (home-page "https://github.com/stefankoegl/python-json-patch")
12920 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
12921 (description "@code{jsonpatch} is a library and program that allows
12922applying JSON Patches according to RFC 6902.")
12923 (license license:bsd-3)))
12924
12925(define-public python2-jsonpatch
12926 (package-with-python2 python-jsonpatch))
12927
12928(define-public python-jsonpatch-0.4
12929 (package (inherit python-jsonpatch)
12930 (name "python-jsonpatch")
12931 (version "0.4")
12932 (source
12933 (origin
12934 (method url-fetch)
12935 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12936 "archive/v" version ".tar.gz"))
12937 (file-name (string-append name "-" version ".tar.gz"))
12938 (sha256
12939 (base32
12940 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
12941
12942(define-public python2-jsonpatch-0.4
12943 (package-with-python2 python-jsonpatch-0.4))
12944
12945(define-public python-rfc3986
12946 (package
12947 (name "python-rfc3986")
12948 (version "1.1.0")
12949 (source (origin
12950 (method url-fetch)
12951 (uri (pypi-uri "rfc3986" version))
12952 (sha256
12953 (base32
12954 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
12955 (build-system python-build-system)
12956 (arguments
12957 `(#:modules ((guix build utils)
12958 (guix build python-build-system)
12959 (ice-9 ftw)
12960 (srfi srfi-1)
12961 (srfi srfi-26))
12962 #:phases
12963 (modify-phases %standard-phases
12964 (replace 'check
12965 (lambda _
12966 (let ((cwd (getcwd)))
12967 (setenv "PYTHONPATH"
12968 (string-append cwd "/build/"
12969 (find (cut string-prefix? "lib" <>)
12970 (scandir (string-append cwd "/build")))
12971 ":"
12972 (getenv "PYTHONPATH")))
12973 (invoke "pytest" "-v")))))))
12974 (native-inputs
12975 `(("python-pytest" ,python-pytest)))
12976 (home-page "https://rfc3986.readthedocs.io/")
12977 (synopsis "Parse and validate URI references")
12978 (description
12979 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
12980validation and authority parsing. This module also supports RFC@tie{}6874
12981which adds support for zone identifiers to IPv6 addresses.")
12982 (license license:asl2.0)))
12983
12984(define-public python2-rfc3986
12985 (package-with-python2 python-rfc3986))
12986
12987(define-public python-rfc3987
12988 (package
12989 (name "python-rfc3987")
12990 (version "1.3.7")
12991 (source
12992 (origin
12993 (method url-fetch)
12994 (uri (pypi-uri "rfc3987" version))
12995 (sha256
12996 (base32
12997 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
12998 (build-system python-build-system)
12999 (home-page "https://pypi.python.org/pypi/rfc3987")
13000 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
13001 (description "@code{rfc3987} provides routines for parsing and
13002validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
13003 (license license:gpl3+)))
13004
13005(define-public python2-rfc3987
13006 (package-with-python2 python-rfc3987))
13007
13008(define-public python-validate-email
13009 (package
13010 (name "python-validate-email")
13011 (version "1.3")
13012 (source
13013 (origin
13014 (method url-fetch)
13015 (uri (pypi-uri "validate_email" version))
13016 (sha256
13017 (base32
13018 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
13019 (build-system python-build-system)
13020 (home-page "https://github.com/syrusakbary/validate_email")
13021 (synopsis "Verifies if an email address is valid and really exists")
13022 (description "@code{validate_email} can be used to verify if an email
13023address is valid and really exists.")
13024 (license license:lgpl3+)))
13025
13026(define-public python2-validate-email
13027 (package-with-python2 python-validate-email))
13028
13029(define-public python-flex
13030 (package
13031 (name "python-flex")
13032 (version "6.10.0")
13033 (source
13034 (origin
13035 (method url-fetch)
13036 (uri (pypi-uri "flex" version))
13037 (sha256
13038 (base32
13039 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
13040 (build-system python-build-system)
13041 (propagated-inputs
13042 `(("python-click" ,python-click)
13043 ("python-iso8601" ,python-iso8601)
13044 ("python-jsonpointer" ,python-jsonpointer)
13045 ("python-pyyaml" ,python-pyyaml)
13046 ("python-requests" ,python-requests)
13047 ("python-rfc3987" ,python-rfc3987)
13048 ("python-six" ,python-six)
13049 ("python-validate-email" ,python-validate-email)))
13050 (home-page "https://github.com/pipermerriam/flex")
13051 (synopsis "Validates Swagger schemata")
13052 (description "@code{flex} can be used to validate Swagger schemata.")
13053 (license license:bsd-3)))
13054
13055(define-public python2-flex
13056 (package-with-python2 python-flex))
13057
13058(define-public python-marshmallow
13059 (package
13060 (name "python-marshmallow")
13061 (version "3.0.0b14")
13062 (source
13063 (origin
13064 (method url-fetch)
13065 (uri (pypi-uri "marshmallow" version))
13066 (sha256
13067 (base32
13068 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
13069 (build-system python-build-system)
13070 (propagated-inputs
13071 `(("python-dateutil" ,python-dateutil)
13072 ("python-simplejson" ,python-simplejson)))
13073 (native-inputs
13074 `(("python-pytest" ,python-pytest)
13075 ("python-pytz" ,python-pytz)))
13076 (home-page "https://github.com/marshmallow-code/marshmallow")
13077 (synopsis "Convert complex datatypes to and from native
13078Python datatypes.")
13079 (description "@code{marshmallow} provides a library for converting
13080complex datatypes to and from native Python datatypes.")
13081 (license license:expat)))
13082
13083(define-public python2-marshmallow
13084 (package-with-python2 python-marshmallow))
13085
13086(define-public python-apispec
13087 (package
13088 (name "python-apispec")
13089 (version "0.25.3")
13090 (source
13091 (origin
13092 (method url-fetch)
13093 (uri (pypi-uri "apispec" version))
13094 (sha256
13095 (base32
13096 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
13097 (build-system python-build-system)
13098 (propagated-inputs
13099 `(("python-pyyaml" ,python-pyyaml)))
13100 (native-inputs
13101 `(("python-pytest" ,python-pytest)
13102 ("python-flask" ,python-flask)
13103 ("python-marshmallow" ,python-marshmallow)
13104 ("python-tornado" ,python-tornado)
13105 ("python-bottle" ,python-bottle)
13106 ("python-mock" ,python-mock)))
13107 (home-page "https://github.com/marshmallow-code/apispec")
13108 (synopsis "Swagger 2.0 API specification generator")
13109 (description "@code{python-apispec} is a pluggable API specification
13110generator. Currently supports the OpenAPI specification (f.k.a.
13111Swagger 2.0).")
13112 (license license:expat)))
13113
13114(define-public python2-apispec
13115 (package-with-python2 python-apispec))
13116
13117(define-public python-flasgger
13118 (package
13119 (name "python-flasgger")
13120 (version "0.6.3")
13121 (source
13122 (origin
1a04d421
TGR
13123 (method git-fetch)
13124 (uri (git-reference
13125 (url "https://github.com/rochacbruno/flasgger.git")
13126 (commit version)))
13127 (file-name (git-file-name name version))
44d10b1f 13128 (sha256
1a04d421 13129 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
44d10b1f
RW
13130 (build-system python-build-system)
13131 (arguments
13132 `(#:phases
13133 (modify-phases %standard-phases
13134 (replace 'check
13135 (lambda* (#:key inputs outputs #:allow-other-keys)
13136 (substitute* "Makefile"
13137 (("flake8 flasgger --ignore=F403")
13138 "flake8 flasgger --ignore=E731,F403"))
13139 (setenv "PYTHONPATH" (string-append (getcwd)
13140 ":"
13141 (getenv "PYTHONPATH")))
ac599a09 13142 (invoke "py.test"))))))
44d10b1f
RW
13143 (propagated-inputs
13144 `(("python-flask" ,python-flask)
13145 ("python-pyyaml" ,python-pyyaml)
13146 ("python-jsonschema" ,python-jsonschema)
13147 ("python-mistune" ,python-mistune)
13148 ("python-six" ,python-six)))
13149 (native-inputs
13150 `(("python-decorator" ,python-decorator)
13151 ("python-flake8" ,python-flake8)
13152 ("python-flask-restful" ,python-flask-restful)
13153 ("python-flex" ,python-flex)
13154 ("python-pytest" ,python-pytest)
13155 ("python-pytest-cov" ,python-pytest-cov)
13156 ("python-marshmallow" ,python-marshmallow)
13157 ("python-apispec" ,python-apispec)))
13158 (home-page "https://github.com/rochacbruno/flasgger/")
13159 (synopsis "Extract Swagger specs from your Flask project")
13160 (description "@code{python-flasgger} allows extracting Swagger specs
13161from your Flask project. It is a fork of Flask-Swagger.")
13162 (license license:expat)))
13163
13164(define-public python2-flasgger
13165 (package-with-python2 python-flasgger))
13166
13167(define-public python-swagger-spec-validator
13168 (package
13169 (name "python-swagger-spec-validator")
fe9c5b1d 13170 (version "2.4.3")
44d10b1f
RW
13171 (source
13172 (origin
13173 (method url-fetch)
13174 (uri (pypi-uri "swagger-spec-validator" version))
13175 (sha256
13176 (base32
fe9c5b1d 13177 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
44d10b1f
RW
13178 (build-system python-build-system)
13179 (propagated-inputs
13180 `(("python-jsonschema" ,python-jsonschema)
fe9c5b1d 13181 ("python-pyyaml" ,python-pyyaml)
44d10b1f
RW
13182 ("python-six" ,python-six)))
13183 (home-page
13184 "https://github.com/Yelp/swagger_spec_validator")
13185 (synopsis "Validation of Swagger specifications")
13186 (description "@code{swagger_spec_validator} provides a library for
13187validating Swagger API specifications.")
13188 (license license:asl2.0)))
13189
13190(define-public python2-swagger-spec-validator
13191 (package-with-python2 python-swagger-spec-validator))
13192
13193(define-public python-apache-libcloud
13194 (package
13195 (name "python-apache-libcloud")
13196 (version "2.4.0")
13197 (source
13198 (origin
13199 (method url-fetch)
13200 (uri (pypi-uri "apache-libcloud" version))
13201 (sha256
13202 (base32
13203 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
13204 (build-system python-build-system)
13205 (arguments
13206 `(#:phases
13207 (modify-phases %standard-phases
13208 (add-after 'unpack 'patch-ssh
13209 (lambda* (#:key inputs #:allow-other-keys)
13210 (substitute* "libcloud/compute/ssh.py"
13211 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
13212 "/bin/ssh" "'")))
13213 #t))
13214 (add-after 'unpack 'patch-tests
13215 (lambda _
13216 (substitute* "./libcloud/test/test_file_fixtures.py"
13217 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
13218 (("def _ascii") "def _raw_data(self, method, url, body, headers):
13219 return (httplib.OK,
13220 \"1234abcd\",
13221 {\"test\": \"value\"},
13222 httplib.responses[httplib.OK])
13223 def _ascii"))
13224 (substitute* "libcloud/test/compute/test_ssh_client.py"
13225 (("class ShellOutSSHClientTests")
13226 "@unittest.skip(\"Guix container doesn't have ssh service\")
13227class ShellOutSSHClientTests")
13228 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
13229 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
13230 (("'.xF0', '.x90', '.x8D', '.x88'")
13231 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
13232 #t))
13233 (add-before 'check 'copy-secret
13234 (lambda _
13235 (copy-file "libcloud/test/secrets.py-dist"
13236 "libcloud/test/secrets.py")
13237 #t)))))
13238 (inputs
13239 `(("openssh" ,openssh)))
13240 (propagated-inputs
13241 `(("python-paramiko" ,python-paramiko)
13242 ("python-requests" ,python-requests)))
13243 (native-inputs
13244 `(("python-lockfile" ,python-lockfile)
13245 ("python-mock" ,python-mock)
13246 ("python-pytest" ,python-pytest)
13247 ("python-pytest-runner" ,python-pytest-runner)
13248 ("python-requests-mock" ,python-requests-mock)))
13249 (home-page "https://libcloud.apache.org/")
13250 (synopsis "Unified Cloud API")
13251 (description "@code{libcloud} is a Python library for interacting with
13252many of the popular cloud service providers using a unified API.")
13253 (license license:asl2.0)))
13254
13255(define-public python2-apache-libcloud
13256 (package-with-python2 python-apache-libcloud))
13257
13258(define-public python-smmap2
13259 (package
13260 (name "python-smmap2")
13261 (version "2.0.3")
13262 (source
13263 (origin
13264 (method url-fetch)
13265 (uri (pypi-uri "smmap2" version))
13266 (sha256
13267 (base32
13268 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
13269 (build-system python-build-system)
13270 (native-inputs
13271 `(("python-nosexcover" ,python-nosexcover)))
13272 (home-page "https://github.com/Byron/smmap")
13273 (synopsis "Python sliding window memory map manager")
13274 (description "@code{smmap2} is a pure Python implementation of a sliding
13275window memory map manager.")
13276 (license license:bsd-3)))
13277
13278(define-public python2-smmap2
13279 (package-with-python2 python-smmap2))
13280
13281(define-public python-regex
13282 (package
13283 (name "python-regex")
c187c9d7 13284 (version "2019.04.14")
44d10b1f
RW
13285 (source (origin
13286 (method url-fetch)
13287 (uri (pypi-uri "regex" version))
13288 (sha256
13289 (base32
c187c9d7
BT
13290 "1a6hhfs6l6snr1z654ay6wzbmwdkmv282fzfkd5hk2d1n73y8v6m"))))
13291 ;; TODO: Fix and enable regex_test.py tests that complain about the
13292 ;; test.support module not existing.
44d10b1f
RW
13293 (build-system python-build-system)
13294 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
13295 (synopsis "Alternative regular expression module")
13296 (description "This regular expression implementation is backwards-
13297compatible with the standard @code{re} module, but offers additional
13298functionality like full case-folding for case-insensitive matches in Unicode.")
13299 (license license:psfl)))
13300
13301(define-public python2-regex
13302 (package-with-python2 python-regex))
13303
13304(define-public python2-pyopengl
13305 (package
13306 (name "python2-pyopengl")
13307 (version "3.1.0")
13308 (source
13309 (origin
13310 (method url-fetch)
13311 (uri (pypi-uri "PyOpenGL" version))
13312 (sha256
13313 (base32
13314 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
13315 (arguments
13316 `(#:python ,python-2))
13317 (build-system python-build-system)
13318 (home-page "http://pyopengl.sourceforge.net")
13319 (synopsis "Standard OpenGL bindings for Python")
13320 (description
13321 "PyOpenGL is the most common cross platform Python binding to OpenGL and
13322related APIs. The binding is created using the standard @code{ctypes}
13323library.")
13324 (license license:bsd-3)))
13325
13326(define-public python2-pyopengl-accelerate
13327 (package
13328 (inherit python2-pyopengl)
13329 (name "python2-pyopengl-accelerate")
13330 (version "3.1.0")
13331 (source
13332 (origin
13333 (method url-fetch)
13334 (uri (pypi-uri "PyOpenGL-accelerate" version))
13335 (sha256
13336 (base32
13337 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
13338 (synopsis "Acceleration code for PyOpenGL")
13339 (description
13340 "This is the Cython-coded accelerator module for PyOpenGL.")))
13341
13342(define-public python-rencode
13343 (package
13344 (name "python-rencode")
13345 (version "1.0.5")
13346 (source
13347 (origin
13348 (method url-fetch)
13349 (uri (pypi-uri "rencode" version))
13350 (sha256
13351 (base32
13352 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
13353 (build-system python-build-system)
13354 (arguments
13355 `(#:phases
13356 (modify-phases %standard-phases
13357 (add-before 'check 'delete-bogus-test
13358 ;; This test requires /home/aresch/Downloads, which is not provided by
13359 ;; the build environment.
13360 (lambda _
13361 (delete-file "rencode/t.py")
13362 #t)))))
13363 (native-inputs `(("pkg-config" ,pkg-config)
13364 ("python-cython" ,python-cython)))
13365 (home-page "https://github.com/aresch/rencode")
13366 (synopsis "Serialization of heterogeneous data structures")
13367 (description
13368 "The @code{rencode} module is a data structure serialization library,
13369similar to @code{bencode} from the BitTorrent project. For complex,
13370heterogeneous data structures with many small elements, r-encoding stake up
13371significantly less space than b-encodings. This version of rencode is a
13372complete rewrite in Cython to attempt to increase the performance over the
13373pure Python module.")
13374 (license license:bsd-3)))
13375
13376(define-public python2-rencode
13377 (package-with-python2 python-rencode))
13378
13379(define-public python-xenon
13380 (package
13381 (name "python-xenon")
13382 (version "0.5.4")
13383 (source
13384 (origin
13385 (method url-fetch)
13386 (uri (pypi-uri "xenon" version))
13387 (sha256
13388 (base32
13389 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
13390 (build-system python-build-system)
13391 (native-inputs
13392 `(("python-pyyaml" ,python-pyyaml)
13393 ("python-radon" ,python-radon)
13394 ("python-requests" ,python-requests)
13395 ("python-flake8" ,python-flake8)
13396 ("python-tox" ,python-tox)))
13397 (arguments
13398 `(#:phases
13399 (modify-phases %standard-phases
13400 (add-before 'build 'patch-test-requirements
13401 (lambda _
13402 ;; Remove httpretty dependency for tests.
13403 (substitute* "setup.py"
13404 (("httpretty") ""))
13405 #t)))))
13406 (home-page "https://xenon.readthedocs.org/")
13407 (synopsis "Monitor code metrics for Python on your CI server")
13408 (description
13409 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
13410Ideally, @code{xenon} is run every time code is committed. Through command
13411line options, various thresholds can be set for the complexity of code. It
13412will fail (i.e. it will exit with a non-zero exit code) when any of these
13413requirements is not met.")
13414 (license license:expat)))
13415
13416(define-public python2-xenon
13417 (package-with-python2 python-xenon))
13418
13419(define-public python-pysocks
13420 (package
13421 (name "python-pysocks")
b8725cdf 13422 (version "1.7.0")
44d10b1f
RW
13423 (source
13424 (origin
13425 (method url-fetch)
13426 (uri (pypi-uri "PySocks" version))
13427 (sha256
13428 (base32
b8725cdf 13429 "0z4p31bpqm893cf87qqgb30k7nwd8kqfjwwjm5cvxb6zbyj1w0yr"))))
44d10b1f
RW
13430 (build-system python-build-system)
13431 (arguments `(#:tests? #f))
13432 (home-page "https://github.com/Anorov/PySocks")
13433 (synopsis "SOCKS client module")
13434 (description "@code{pysocks} is an updated and semi-actively maintained
13435version of @code{SocksiPy} with bug fixes and extra features.")
13436 (license license:bsd-3)))
13437
13438(define-public python2-pysocks
13439 (package-with-python2 python-pysocks))
13440
13441(define-public python-pydiff
13442 (package
13443 (name "python-pydiff")
13444 (version "0.2")
13445 (source
13446 (origin
13447 (method url-fetch)
13448 (uri (pypi-uri "pydiff" version))
13449 (sha256
13450 (base32
13451 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
13452 (build-system python-build-system)
13453 (home-page "https://github.com/myint/pydiff")
13454 (synopsis "Library to diff two Python files at the bytecode level")
13455 (description
13456 "@code{pydiff} makes it easy to look for actual code changes while
13457ignoring formatting changes.")
13458 (license license:expat)))
13459
13460(define-public python2-pydiff
13461 (package-with-python2 python-pydiff))
13462
13463(define-public python-tqdm
13464 (package
13465 (name "python-tqdm")
13466 (version "4.19.6")
13467 (source
13468 (origin
13469 (method url-fetch)
13470 (uri (pypi-uri "tqdm" version))
13471 (sha256
13472 (base32
13473 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
13474 (build-system python-build-system)
13475 (native-inputs
13476 `(("python-flake8" ,python-flake8)
13477 ("python-nose" ,python-nose)
13478 ("python-coverage" ,python-coverage)))
13479 (home-page "https://github.com/tqdm/tqdm")
13480 (synopsis "Fast, extensible progress meter")
13481 (description
13482 "Make loops show a progress bar on the console by just wrapping any
13483iterable with @code{|tqdm(iterable)|}. Offers many options to define
13484design and layout.")
13485 (license (list license:mpl2.0 license:expat))))
13486
13487(define-public python2-tqdm
13488 (package-with-python2 python-tqdm))
13489
13490(define-public python-pkginfo
13491 (package
13492 (name "python-pkginfo")
13493 (version "1.4.2")
13494 (source
13495 (origin
13496 (method url-fetch)
13497 (uri (pypi-uri "pkginfo" version))
13498 (sha256
13499 (base32
13500 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
13501 (build-system python-build-system)
13502 (arguments
13503 ;; The tests are broken upstream.
13504 '(#:tests? #f))
13505 (home-page
13506 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
13507 (synopsis
13508 "Query metadatdata from sdists, bdists, and installed packages")
13509 (description
13510 "API to query the distutils metadata written in @file{PKG-INFO} inside a
13511source distriubtion (an sdist) or a binary distribution (e.g., created by
13512running bdist_egg). It can also query the EGG-INFO directory of an installed
13513distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
13514created by running @code{python setup.py develop}).")
13515 (license license:expat)))
13516
13517(define-public python2-pkginfo
13518 (package-with-python2 python-pkginfo))
13519
13520(define-public python-twine
13521 (package
13522 (name "python-twine")
13523 (version "1.9.1")
13524 (source
13525 (origin
13526 (method url-fetch)
13527 (uri (pypi-uri "twine" version))
13528 (sha256
13529 (base32
13530 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
13531 (build-system python-build-system)
13532 (propagated-inputs
13533 `(("python-tqdm" ,python-tqdm)
13534 ("python-pkginfo" ,python-pkginfo)
13535 ("python-requests" ,python-requests)
13536 ("python-requests-toolbelt" ,python-requests-toolbelt)))
13537 (home-page "https://github.com/pypa/twine")
13538 (synopsis "Collection of utilities for interacting with PyPI")
13539 (description
13540 "@code{twine} currently supports registering projects and uploading
13541distributions. It authenticates the user over HTTPS, allows them to pre-sign
13542their files and supports any packaging format (including wheels).")
13543 (license license:asl2.0)))
13544
13545(define-public python2-twine
13546 (package-with-python2 python-twine))
13547
13548(define-public python-linecache2
13549 (package
13550 (name "python-linecache2")
13551 (version "1.0.0")
13552 (source
13553 (origin
13554 (method url-fetch)
13555 (uri (pypi-uri "linecache2" version))
13556 (sha256
13557 (base32
13558 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
13559 (build-system python-build-system)
13560 (arguments
13561 `(;; The tests depend on unittest2, and our version is a bit too old.
13562 #:tests? #f))
13563 (native-inputs
13564 `(("python-pbr" ,python-pbr-minimal)))
13565 (home-page
13566 "https://github.com/testing-cabal/linecache2")
13567 (synopsis "Backports of the linecache module")
13568 (description
13569 "The linecache module allows one to get any line from any file, while
13570attempting to optimize internally, using a cache, the common case where many
13571lines are read from a single file.")
13572 (license license:psfl)))
13573
13574(define-public python2-linecache2
13575 (package-with-python2 python-linecache2))
13576
13577(define-public python-traceback2
13578 (package
13579 (name "python-traceback2")
13580 (version "1.4.0")
13581 (source
13582 (origin
13583 (method url-fetch)
13584 (uri (pypi-uri "traceback2" version))
13585 (sha256
13586 (base32
13587 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
13588 (build-system python-build-system)
13589 (arguments
13590 `(;; python-traceback2 and python-unittest2 depend on one another.
13591 #:tests? #f))
13592 (native-inputs
13593 `(("python-pbr" ,python-pbr-minimal)))
13594 (propagated-inputs
13595 `(("python-linecache2" ,python-linecache2)))
13596 (home-page
13597 "https://github.com/testing-cabal/traceback2")
13598 (synopsis "Backports of the traceback module")
13599 (description
13600 "This module provides a standard interface to extract, format and print
13601stack traces of Python programs. It exactly mimics the behavior of the Python
13602interpreter when it prints a stack trace.")
13603 (license license:psfl)))
13604
13605(define-public python2-traceback2
13606 (package-with-python2 python-traceback2))
13607
13608(define-public python-ratelimiter
13609 (package
13610 (name "python-ratelimiter")
13611 (version "1.2.0")
13612 (source
13613 (origin
13614 (method url-fetch)
13615 (uri (pypi-uri "ratelimiter" version))
13616 (sha256
13617 (base32
13618 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
13619 (build-system python-build-system)
13620 (arguments
13621 '(#:tests? #f)) ; There are no tests in the pypi archive.
13622 (home-page "https://github.com/RazerM/ratelimiter")
13623 (synopsis "Simple rate limiting object")
13624 (description
13625 "The @code{ratelimiter} module ensures that an operation will not be
13626executed more than a given number of times during a given period.")
13627 (license license:asl2.0)))
13628
13629(define-public python2-ratelimiter
13630 (package-with-python2 python-ratelimiter))
13631
13632(define-public python-dukpy
13633 (package
13634 (name "python-dukpy")
13635 (version "0.3")
13636 (source
13637 (origin
5b77ebe1
TGR
13638 (method git-fetch)
13639 (uri (git-reference
13640 (url "https://github.com/kovidgoyal/dukpy.git")
13641 (commit (string-append "v" version))))
13642 (file-name (git-file-name name version))
44d10b1f 13643 (sha256
5b77ebe1 13644 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
44d10b1f
RW
13645 (build-system python-build-system)
13646 (home-page "https://github.com/kovidgoyal/dukpy")
13647 (synopsis "Run JavaScript in python")
13648 (description
13649 "dukpy is a JavaScript runtime environment for Python using the duktape
13650embeddable JavaScript engine.")
13651 ;; Dukpy is licensed under MIT like the embedded duktape library,
13652 ;; with 'errors.c' as GPL3.
13653 (license (list license:expat license:gpl3))))
13654
13655(define-public python2-dukpy
13656 (package-with-python2 python-dukpy))
13657
13658(define-public python-jsonrpclib-pelix
13659 (package
13660 (name "python-jsonrpclib-pelix")
13661 (version "0.3.2")
13662 (source
13663 (origin
13664 (method url-fetch)
13665 (uri (pypi-uri "jsonrpclib-pelix" version))
13666 (sha256
13667 (base32
13668 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
13669 (build-system python-build-system)
13670 (arguments
13671 `(#:tests? #f)) ; no tests in PyPI tarball
13672 (home-page "https://github.com/tcalmant/jsonrpclib/")
13673 (synopsis "JSON-RPC 2.0 client library for Python")
13674 (description
13675 "This library implements the JSON-RPC v2.0
13676specification (backwards-compatible) as a client library for Python. This
13677version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
13678services.")
13679 (license license:asl2.0)))
13680
13681(define-public python2-jsonrpclib-pelix
13682 (package-with-python2 python-jsonrpclib-pelix))
13683
13684(define-public python-setuptools-scm-git-archive
13685 (package
13686 (name "python-setuptools-scm-git-archive")
13687 (version "1.0")
13688 (source
13689 (origin
13690 (method url-fetch)
13691 (uri (pypi-uri "setuptools_scm_git_archive" version))
13692 (sha256
13693 (base32
13694 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
13695 (build-system python-build-system)
13696 (native-inputs
13697 `(("python-pytest" ,python-pytest)))
13698 (propagated-inputs
13699 `(("python-setuptools-scm" ,python-setuptools-scm)))
13700 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
13701 (synopsis "Setuptools_scm plugin for git archives")
13702 (description
13703 "The setuptools_scm_git_archive package is a plugin to
13704setuptools_scm, which supports obtaining versions from git archives that
13705belong to tagged versions.")
13706 (license license:expat)))
13707
13708(define-public python2-setuptools-scm-git-archive
13709 (package-with-python2 python-setuptools-scm-git-archive))
13710
724a350c
RW
13711(define-public python-setuptools-git
13712 (package
13713 (name "python-setuptools-git")
13714 (version "1.2")
13715 (source
13716 (origin
13717 (method url-fetch)
13718 (uri (pypi-uri "setuptools-git" version))
13719 (sha256
13720 (base32
13721 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
13722 (build-system python-build-system)
13723 (arguments
13724 `(#:phases
13725 (modify-phases %standard-phases
13726 ;; This is needed for tests.
13727 (add-after 'unpack 'configure-git
13728 (lambda _
13729 (setenv "HOME" "/tmp")
13730 (invoke "git" "config" "--global" "user.email" "guix")
13731 (invoke "git" "config" "--global" "user.name" "guix")
13732 #t)))))
13733 (native-inputs
13734 `(("git" ,git-minimal)))
13735 (home-page "https://github.com/msabramo/setuptools-git")
13736 (synopsis "Setuptools revision control system plugin for Git")
13737 (description
13738 "This package provides a plugin for Setuptools for revision control with
13739Git.")
13740 (license license:bsd-3)))
13741
44d10b1f
RW
13742(define-public python-pyclipper
13743 (package
13744 (name "python-pyclipper")
13745 (version "1.1.0.post1")
13746 (source
13747 (origin
13748 (method url-fetch)
13749 (uri (pypi-uri "pyclipper" version ".zip"))
13750 (sha256
13751 (base32
13752 "0ldbkbnx94an4zzrwb1sxmg6k0jgk4cwmvcdyy8y5k1zslc612wa"))
13753 (modules '((guix build utils)))
13754 (snippet
13755 '(begin
13756 ;; This file is generated by Cython.
13757 (delete-file "pyclipper/pyclipper.cpp") #t))))
13758 (build-system python-build-system)
13759 (arguments
13760 `(#:phases
13761 (modify-phases %standard-phases
13762 (add-before 'build 'cythonize-sources
13763 (lambda _
13764 (with-directory-excursion "pyclipper"
13765 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
13766 (propagated-inputs
13767 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
13768 (native-inputs
13769 `(("python-cython" ,python-cython)
13770 ("python-pytest" ,python-pytest)
13771 ("python-pytest-runner" ,python-pytest-runner)
13772 ("python-unittest2" ,python-unittest2)
13773 ("unzip" ,unzip)))
13774 (home-page "https://github.com/greginvm/pyclipper")
13775 (synopsis "Wrapper for Angus Johnson's Clipper library")
13776 (description
13777 "Pyclipper is a Cython wrapper for the C++ translation of the
13778Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
13779 (license license:expat)))
13780
13781(define-public python2-pyclipper
13782 (package-with-python2 python-pyclipper))
13783
13784(define-public python2-booleanoperations
13785 (package
13786 (name "python2-booleanoperations")
13787 (version "0.7.1")
13788 (source
13789 (origin
13790 (method url-fetch)
13791 (uri (pypi-uri "booleanOperations" version ".zip"))
13792 (sha256
13793 (base32
13794 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
13795 (build-system python-build-system)
13796 (arguments
13797 `(#:python ,python-2))
13798 (native-inputs
13799 `(("unzip" ,unzip)
13800 ("python2-pytest" ,python2-pytest)
13801 ("python2-pytest-runner" ,python2-pytest-runner)))
13802 (propagated-inputs
13803 `(("python-fonttools" ,python2-fonttools)
13804 ("python-pyclipper" ,python2-pyclipper)
13805 ("python-ufolib" ,python2-ufolib)))
13806 (home-page "https://github.com/typemytype/booleanOperations")
13807 (synopsis "Boolean operations on paths")
13808 (description
13809 "BooleanOperations provides a Python library that enables
13810boolean operations on paths.")
13811 (license license:expat)))
13812
13813(define-public python-tempdir
13814 (package
13815 (name "python-tempdir")
13816 (version "0.7.1")
13817 (source
13818 (origin
13819 (method url-fetch)
13820 (uri (pypi-uri "tempdir" version))
13821 (sha256
13822 (base32
13823 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
13824 (build-system python-build-system)
13825 (home-page "https://pypi.org/project/tempdir/")
13826 (arguments
13827 ;; the package has no tests
13828 '(#:tests? #f))
13829 (synopsis "Python library for managing temporary directories")
13830 (description
13831 "This library manages temporary directories that are automatically
13832deleted with all their contents when they are no longer needed. It is
13833particularly convenient for use in tests.")
13834 (license license:expat)))
13835
13836(define-public python2-tempdir
13837 (package-with-python2 python-tempdir))
13838
13839(define-public python-activepapers
13840 (package
13841 (name "python-activepapers")
13842 (version "0.2.2")
13843 (source
13844 (origin
13845 (method url-fetch)
13846 (uri (pypi-uri "ActivePapers.Py" version))
13847 (sha256
13848 (base32
13849 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
13850 (build-system python-build-system)
13851 (arguments
13852 `(#:modules ((ice-9 ftw)
13853 (srfi srfi-1)
13854 (guix build utils)
13855 (guix build python-build-system))
13856
13857 #:phases
13858 (modify-phases %standard-phases
13859 (add-after 'unpack 'delete-python2-code
13860 (lambda _
13861 (for-each delete-file
13862 '("lib/activepapers/builtins2.py"
13863 "lib/activepapers/standardlib2.py"
13864 "lib/activepapers/utility2.py"))))
13865 (replace 'check
13866 (lambda _
13867 ;; Deactivate the test cases that download files
13868 (setenv "NO_NETWORK_ACCESS" "1")
13869 ;; For some strange reason, some tests fail if nosetests runs all
13870 ;; test modules in a single execution. They pass if each test
13871 ;; module is run individually.
13872 (for-each (lambda (filename)
13873 (invoke "nosetests"
13874 (string-append "tests/" filename)))
13875 (scandir "tests"
13876 (lambda (filename)
13877 (string-suffix? ".py" filename)))))))))
13878 (native-inputs
13879 `(("python-tempdir" ,python-tempdir)
13880 ("python-nose" ,python-nose)))
13881 (propagated-inputs
13882 `(("python-h5py" ,python-h5py)))
13883 (home-page "http://www.activepapers.org/")
13884 (synopsis "Executable papers for scientific computing")
13885 (description
13886 "ActivePapers is a tool for working with executable papers, which
13887combine data, code, and documentation in single-file packages,
13888suitable for publication as supplementary material or on repositories
13889such as figshare or Zenodo.")
13890 (properties `((python2-variant . ,(delay python2-activepapers))))
13891 (license license:bsd-3)))
13892
13893(define-public python2-activepapers
13894 (let ((base (package-with-python2
13895 (strip-python2-variant python-activepapers))))
13896 (package
13897 (inherit base)
13898 (arguments
13899 (substitute-keyword-arguments (package-arguments base)
13900 ((#:phases phases)
13901 `(modify-phases ,phases
13902 (delete 'delete-python2-code)
13903 (add-after 'unpack 'delete-python3-code
13904 (lambda _
13905 (for-each delete-file
13906 '("lib/activepapers/builtins3.py"
13907 "lib/activepapers/standardlib3.py"
13908 "lib/activepapers/utility3.py")))))))))))
13909
13910(define-public python-semver
13911 (package
13912 (name "python-semver")
13913 (version "2.7.9")
13914 (source
13915 (origin
13916 (method url-fetch)
13917 (uri (pypi-uri "semver" version))
13918 (sha256
13919 (base32
13920 "0hhgqppchv59rqj0yzi1prdg2nfsywqmjsqy2rycyxm0hvxmbyqz"))))
13921 (build-system python-build-system)
13922 (arguments
13923 `(#:phases
13924 (modify-phases %standard-phases
13925 (add-after 'unpack 'patch-test-requirements
13926 (lambda _
13927 (substitute* "setup.py"
13928 ;; Our Python is new enough.
13929 (("'virtualenv<14\\.0\\.0'") "'virtualenv'"))
13930 #t)))))
13931 (native-inputs
13932 `(("python-tox" ,python-tox)
13933 ("python-virtualenv" ,python-virtualenv)))
13934 (home-page "https://github.com/k-bx/python-semver")
13935 (synopsis "Python helper for Semantic Versioning")
13936 (description "This package provides a Python library for
13937@url{Semantic Versioning, http://semver.org/}.")
13938 (license license:bsd-3)))
13939
13940(define-public python2-semver
13941 (package-with-python2 python-semver))
13942
13943(define-public python-pyro4
13944 (package
13945 (name "python-pyro4")
ad1acb81 13946 (version "4.75")
44d10b1f
RW
13947 (source
13948 (origin
13949 (method url-fetch)
13950 (uri (pypi-uri "Pyro4" version))
13951 (sha256
ad1acb81 13952 (base32 "1dfpp36imddx19yv0kd28gk1l71ckhpqy6jd590wpm2680jw15rq"))))
44d10b1f
RW
13953 (build-system python-build-system)
13954 (propagated-inputs
13955 `(("python-serpent" ,python-serpent)))
13956 (home-page "https://pyro4.readthedocs.io")
13957 (synopsis "Distributed object middleware for Python")
13958 (description
13959 "Pyro enables you to build applications in which objects can talk to each
13960other over the network. You can just use normal Python method calls to call
13961objects on other machines, also known as remote procedure calls (RPC).")
13962 (license license:expat)))
13963
13964(define-public python2-pyro
13965 (package
13966 (name "python2-pyro")
13967 (version "3.16")
13968 (source
13969 (origin
13970 (method url-fetch)
13971 (uri (pypi-uri "Pyro" version))
13972 (file-name (string-append "Pyro-" version ".tar.gz"))
13973 (sha256
13974 (base32
13975 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
13976 (build-system python-build-system)
13977 (arguments
13978 ;; Pyro is not compatible with Python 3
13979 `(#:python ,python-2
13980 ;; Pyro has no test cases for automatic execution
13981 #:tests? #f))
13982 (home-page "http://pythonhosted.org/Pyro/")
13983 (synopsis "Distributed object manager for Python")
13984 (description "Pyro is a Distributed Object Technology system
13985written in Python that is designed to be easy to use. It resembles
13986Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
13987which is a system and language independent Distributed Object Technology
13988and has much more to offer than Pyro or RMI. Pyro 3.x is no
13989longer maintained. New projects should use Pyro4 instead, which
13990is the new Pyro version that is actively developed.")
13991 (license license:expat)))
13992
13993(define-public python2-scientific
13994 (package
13995 (name "python2-scientific")
13996 (version "2.9.4")
13997 (source
13998 (origin
13999 (method url-fetch)
14000 (uri (string-append "https://bitbucket.org/khinsen/"
14001 "scientificpython/downloads/ScientificPython-"
14002 version ".tar.gz"))
14003 (file-name (string-append "ScientificPython-" version ".tar.gz"))
14004 (sha256
14005 (base32
14006 "0fc69zhlsn9d2jvbzyjl9ah53vj598h84nkq230c83ahfvgzx5y3"))))
14007 (build-system python-build-system)
14008 (inputs
14009 `(("netcdf" ,netcdf)))
14010 (propagated-inputs
14011 `(("python-numpy" ,python2-numpy-1.8)
14012 ("python-pyro" ,python2-pyro)))
14013 (arguments
14014 ;; ScientificPython is not compatible with Python 3
14015 `(#:python ,python-2
14016 #:tests? #f ; No test suite
14017 #:phases
14018 (modify-phases %standard-phases
14019 (replace 'build
14020 (lambda* (#:key inputs #:allow-other-keys)
77e61e25
RW
14021 (invoke "python" "setup.py" "build"
14022 (string-append "--netcdf_prefix="
14023 (assoc-ref inputs "netcdf"))))))))
44d10b1f
RW
14024 (home-page "https://bitbucket.org/khinsen/scientificpython")
14025 (synopsis "Python modules for scientific computing")
14026 (description "ScientificPython is a collection of Python modules that are
14027useful for scientific computing. Most modules are rather general (Geometry,
14028physical units, automatic derivatives, ...) whereas others are more
14029domain-specific (e.g. netCDF and PDB support). The library is currently
14030not actively maintained and works only with Python 2 and NumPy < 1.9.")
14031 (license license:cecill-c)))
14032
14033(define-public python2-mmtk
14034 (package
14035 (name "python2-mmtk")
14036 (version "2.7.11")
14037 (source
14038 (origin
14039 (method url-fetch)
14040 (uri (string-append "https://bitbucket.org/khinsen/"
14041 "mmtk/downloads/MMTK-" version ".tar.gz"))
14042 (file-name (string-append "MMTK-" version ".tar.gz"))
14043 (sha256
14044 (base32
14045 "1d0nnjx4lwsvh8f99vv1r6gi50d93yba0adkz8b4zgv4za4c5862"))))
14046 (build-system python-build-system)
14047 (native-inputs
14048 `(("netcdf" ,netcdf)))
14049 (propagated-inputs
14050 `(("python-scientific" ,python2-scientific)
14051 ("python-tkinter" ,python-2 "tk")))
14052 (arguments
14053 `(#:python ,python-2
14054 #:tests? #f
14055 #:phases
14056 (modify-phases %standard-phases
14057 (add-before 'build 'includes-from-scientific
14058 (lambda* (#:key inputs #:allow-other-keys)
14059 (mkdir-p "Include/Scientific")
14060 (copy-recursively
14061 (string-append
14062 (assoc-ref inputs "python-scientific")
14063 "/include/python2.7/Scientific")
14064 "Include/Scientific"))))))
14065 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
14066 (synopsis "Python library for molecular simulation")
14067 (description "MMTK is a library for molecular simulations with an emphasis
14068on biomolecules. It provides widely used methods such as Molecular Dynamics
14069and normal mode analysis, but also basic routines for implementing new methods
14070for simulation and analysis. The library is currently not actively maintained
14071and works only with Python 2 and NumPy < 1.9.")
14072 (license license:cecill-c)))
14073
14074(define-public python-phonenumbers
14075 (package
14076 (name "python-phonenumbers")
14077 (version "8.9.1")
14078 (source
14079 (origin
14080 (method url-fetch)
14081 (uri (pypi-uri "phonenumbers" version))
14082 (sha256
14083 (base32
14084 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
14085 (build-system python-build-system)
14086 (home-page
14087 "https://github.com/daviddrysdale/python-phonenumbers")
14088 (synopsis
14089 "Python library for dealing with international phone numbers")
14090 (description
14091 "This package provides a Python port of Google's libphonenumber library.")
14092 (license license:asl2.0)))
14093
14094(define-public python2-phonenumbers
14095 (package-with-python2 python-phonenumbers))
14096
14097(define-public python-send2trash
14098 (package
14099 (name "python-send2trash")
d9b0216b 14100 (version "1.5.0")
44d10b1f 14101 (source
d9b0216b 14102 (origin (method git-fetch)
44d10b1f 14103 ;; Source tarball on PyPI doesn't include tests.
d9b0216b
RW
14104 (uri (git-reference
14105 (url "https://github.com/hsoft/send2trash.git")
14106 (commit version)))
14107 (file-name (git-file-name name version))
44d10b1f
RW
14108 (sha256
14109 (base32
d9b0216b 14110 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
44d10b1f
RW
14111 (build-system python-build-system)
14112 (arguments
14113 '(#:phases
14114 (modify-phases %standard-phases
14115 (add-before 'check 'pre-check
14116 (lambda _
14117 (mkdir-p "/tmp/foo")
14118 (setenv "HOME" "/tmp/foo")
14119 #t)))))
14120 (home-page "https://github.com/hsoft/send2trash")
14121 (synopsis "Send files to the user's @file{~/Trash} directory")
14122 (description "This package provides a Python library to send files to the
14123user's @file{~/Trash} directory.")
20b3fde7 14124 (properties `((python2-variant . ,(delay python2-send2trash))))
44d10b1f
RW
14125 (license license:bsd-3)))
14126
14127(define-public python2-send2trash
14128 (package
f32164ab 14129 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
44d10b1f
RW
14130 (arguments
14131 (substitute-keyword-arguments (package-arguments python-send2trash)
14132 ((#:phases phases)
14133 `(modify-phases ,phases
14134 (add-before 'check 'setenv
14135 (lambda _
14136 (setenv "PYTHONPATH"
14137 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
4782a06f 14138 #t))))))))
44d10b1f
RW
14139
14140(define-public python-yapf
14141 (package
14142 (name "python-yapf")
14143 (version "0.24.0")
14144 (source
14145 (origin
14146 (method url-fetch)
14147 (uri (pypi-uri "yapf" version))
14148 (sha256
14149 (base32
14150 "0anwby0ydmyzcsgjc5dn1ryddwvii4dq61vck447q0n96npnzfyf"))))
14151 (build-system python-build-system)
14152 (home-page "https://github.com/google/yapf")
14153 (synopsis "Formatter for Python code")
14154 (description "YAPF is a formatter for Python code. It's based off of
14155@dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
14156takes the code and reformats it to the best formatting that conforms to the
14157style guide, even if the original code didn't violate the style guide.")
14158 (license license:asl2.0)))
14159
14160(define-public python2-yapf
14161 (package-with-python2 python-yapf))
14162
14163(define-public python-gyp
14164 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
14165 (revision "0"))
14166 (package
14167 (name "python-gyp")
14168 ;; Google does not release versions,
14169 ;; based on second most recent commit date.
14170 (version (git-version "0.0.0" revision commit))
14171 (source
14172 (origin
14173 ;; Google does not release tarballs,
14174 ;; git checkout is needed.
14175 (method git-fetch)
14176 (uri (git-reference
14177 (url "https://chromium.googlesource.com/external/gyp")
14178 (commit commit)))
14179 (file-name (git-file-name name version))
14180 (sha256
14181 (base32
14182 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
14183 (build-system python-build-system)
14184 (home-page "https://gyp.gsrc.io/")
14185 (synopsis "GYP is a Meta-Build system")
14186 (description
14187 "GYP builds build systems for large, cross platform applications.
14188It can be used to generate XCode projects, Visual Studio projects, Ninja build
14189files, and Makefiles.")
14190 (license license:bsd-3))))
14191
14192(define-public python2-gyp
14193 (package-with-python2 python-gyp))
14194
14195(define-public python-whatever
14196 (package
14197 (name "python-whatever")
14198 (version "0.5")
14199 (source
14200 (origin
14201 (method url-fetch)
14202 (uri (string-append "https://github.com/Suor/whatever/archive/" version
14203 ".tar.gz"))
14204 (sha256
14205 (base32
14206 "1iqvnaf0zpc6b4rvbqq4xy45mszcscyzpzknv8wg6j84pbp22sap"))
14207 (file-name (string-append name "-" version ".tar.gz"))))
14208 (build-system python-build-system)
14209 (arguments
14210 `(#:phases
14211 (modify-phases %standard-phases
14212 (replace 'check
14213 (lambda _
14214 (invoke "py.test"))))))
14215 (native-inputs
14216 `(("python-pytest" ,python-pytest)))
14217 (home-page "http://github.com/Suor/whatever")
14218 (synopsis "Make anonymous functions by partial application of operators")
14219 (description "@code{whatever} provides an easy way to make anonymous
14220functions by partial application of operators.")
14221 (license license:bsd-3)))
14222
14223(define-public python2-whatever
14224 (package-with-python2 python-whatever))
14225
14226(define-public python-funcy
14227 (package
14228 (name "python-funcy")
9e396ab8 14229 (version "1.11")
44d10b1f
RW
14230 (source
14231 (origin
a85c6027
TGR
14232 (method git-fetch)
14233 (uri (git-reference
14234 (url "https://github.com/Suor/funcy.git")
14235 (commit version)))
44d10b1f 14236 (sha256
a85c6027
TGR
14237 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
14238 (file-name (git-file-name name version))))
44d10b1f
RW
14239 (build-system python-build-system)
14240 (arguments
14241 `(#:phases
14242 (modify-phases %standard-phases
14243 (replace 'check
14244 (lambda _
14245 (invoke "py.test"))))))
14246 (native-inputs
14247 `(("python-pytest" ,python-pytest)
14248 ("python-whatever" ,python-whatever)))
14249 (home-page "http://github.com/Suor/funcy")
14250 (synopsis "Functional tools")
14251 (description "@code{funcy} is a library that provides functional tools.
14252Examples are:
14253@enumerate
14254@item merge - Merges collections of the same type
14255@item walk - Type-preserving map
14256@item select - Selects a part of a collection
14257@item take - Takes the first n items of a collection
14258@item first - Takes the first item of a collection
14259@item remove - Predicated-removes items of a collection
14260@item concat - Concatenates two collections
14261@item flatten - Flattens a collection with subcollections
14262@item distinct - Returns only distinct items
14263@item split - Predicated-splits a collection
14264@item split_at - Splits a collection at a given item
14265@item group_by - Groups items by group
14266@item pairwise - Pairs off adjacent items
14267@item partial - Partially-applies a function
14268@item curry - Curries a function
14269@item compose - Composes functions
14270@item complement - Complements a predicate
14271@item all_fn - \"all\" with predicate
14272@end enumerate")
14273 (license license:bsd-3)))
14274
14275(define-public python2-funcy
14276 (package-with-python2 python-funcy))
14277
14278(define-public python-isoweek
14279 (package
14280 (name "python-isoweek")
14281 (version "1.3.3")
14282 (source
14283 (origin
14284 (method url-fetch)
14285 (uri (pypi-uri "isoweek" version))
14286 (sha256
14287 (base32
14288 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
14289 (build-system python-build-system)
14290 (home-page "https://github.com/gisle/isoweek")
14291 (synopsis "Objects representing a week")
14292 (description "The @code{isoweek} module provide the class Week that
14293implements the week definition of ISO 8601. This standard also defines
14294a notation for identifying weeks; yyyyWww (where the W is a literal).
14295Week instances stringify to this form.")
14296 (license license:bsd-3)))
14297
14298(define-public python2-isoweek
14299 (package-with-python2 python-isoweek))
14300
14301(define-public python-tokenize-rt
14302 (package
14303 (name "python-tokenize-rt")
14304 (version "2.0.1")
14305 (source
14306 (origin
14307 (method url-fetch)
14308 (uri (pypi-uri "tokenize-rt" version))
14309 (sha256
14310 (base32
14311 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
14312 (build-system python-build-system)
14313 (home-page "https://github.com/asottile/tokenize-rt")
14314 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
14315 (description
14316 "This Python library is a wrapper around @code{tokenize} from the Python
14317standard library. It provides two additional tokens @code{ESCAPED_NL} and
14318@code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
14319and @code{tokens_to_src} to roundtrip.")
14320 (license license:expat)))
14321
14322(define-public python-future-fstrings
14323 (package
14324 (name "python-future-fstrings")
14325 (version "0.4.1")
14326 (source
14327 (origin
14328 (method url-fetch)
14329 (uri (pypi-uri "future_fstrings" version))
14330 (sha256
14331 (base32
14332 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
14333 (build-system python-build-system)
14334 (propagated-inputs
14335 `(("python-tokenize-rt" ,python-tokenize-rt)))
14336 (home-page "https://github.com/asottile/future-fstrings")
14337 (synopsis "Backport of fstrings to Python < 3.6")
14338 (description
14339 "This package provides a UTF-8 compatible encoding
14340@code{future_fstrings}, which performs source manipulation. It decodes the
14341source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
14342@code{f} strings.")
14343 (license license:expat)))
14344
dae2eb1c
MC
14345(define-public python-typed-ast
14346 (package
14347 (name "python-typed-ast")
14348 (version "1.3.5")
14349 (source
14350 (origin
14351 (method url-fetch)
14352 (uri (pypi-uri "typed-ast" version))
14353 (sha256
14354 (base32
14355 "1m7pr6qpana3cvqwiw7mlvrgvmw27ch5mx1592572xhlki8g85ak"))))
14356 (build-system python-build-system)
14357 (arguments
14358 `(#:modules ((guix build utils)
14359 (guix build python-build-system)
14360 (ice-9 ftw)
14361 (srfi srfi-1)
14362 (srfi srfi-26))
14363 #:phases
14364 (modify-phases %standard-phases
14365 (replace 'check
14366 (lambda _
14367 (let ((cwd (getcwd)))
14368 (setenv "PYTHONPATH"
14369 (string-append cwd "/build/"
14370 (find (cut string-prefix? "lib" <>)
14371 (scandir (string-append cwd "/build")))
14372 ":"
14373 (getenv "PYTHONPATH"))))
14374 (invoke "pytest")
14375 #t)))))
14376 (native-inputs `(("python-pytest" ,python-pytest)))
14377 (home-page "https://github.com/python/typed_ast")
14378 (synopsis "Fork of Python @code{ast} modules with type comment support")
14379 (description "This package provides a parser similar to the standard
14380@code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
14381include PEP 484 type comments and are independent of the version of Python
14382under which they are run. The @code{typed_ast} parsers produce the standard
14383Python AST (plus type comments), and are both fast and correct, as they are
14384based on the CPython 2.7 and 3.7 parsers.")
14385 ;; See the file "LICENSE" for the details.
14386 (license (list license:psfl
14387 license:asl2.0
14388 license:expat)))) ;ast27/Parser/spark.py
14389
44d10b1f
RW
14390(define-public python-typing
14391 (package
14392 (name "python-typing")
14393 (version "3.6.6")
14394 (source
14395 (origin
14396 (method url-fetch)
14397 (uri (pypi-uri "typing" version))
14398 (sha256
14399 (base32
14400 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
14401 (build-system python-build-system)
14402 (home-page "https://docs.python.org/3/library/typing.html")
14403 (synopsis "Type hints for Python")
14404 (description "This is a backport of the standard library @code{typing}
14405module to Python versions older than 3.5. Typing defines a standard notation
14406for Python function and variable type annotations. The notation can be used
14407for documenting code in a concise, standard format, and it has been designed
14408to also be used by static and runtime type checkers, static analyzers, IDEs
14409and other tools.")
14410 (license license:psfl)))
14411
14412(define-public python2-typing
14413 (package-with-python2 python-typing))
14414
f89d443b
VC
14415(define-public python-typing-extensions
14416 (package
14417 (name "python-typing-extensions")
14418 (version "3.7.2")
14419 (source
14420 (origin
14421 (method url-fetch)
14422 (uri (pypi-uri "typing_extensions" version))
14423 (sha256
14424 (base32
14425 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
14426 (build-system python-build-system)
14427 (home-page
14428 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
14429 (synopsis "Experimental type hints for Python")
14430 (description
14431 "The typing_extensions module contains additional @code{typing} hints not
14432yet present in the of the @code{typing} standard library.
14433Included are implementations of:
14434@enumerate
14435@item ClassVar
14436@item ContextManager
14437@item Counter
14438@item DefaultDict
14439@item Deque
14440@item NewType
14441@item NoReturn
14442@item overload
14443@item Protocol
14444@item runtime
14445@item Text
14446@item Type
14447@item TYPE_CHECKING
14448@item AsyncGenerator
14449@end enumerate\n")
14450 (license license:psfl)))
14451
44d10b1f
RW
14452(define-public bpython
14453 (package
14454 (name "bpython")
14455 (version "0.17.1")
14456 (source
14457 (origin
14458 (method url-fetch)
14459 (uri (pypi-uri "bpython" version))
14460 (sha256
14461 (base32
14462 "0bxhxi5zxdkrf8b4gwn0d363kdz3qnypjwhm1aydki53ph8ca1w9"))))
14463 (build-system python-build-system)
14464 (arguments
14465 `(#:phases
14466 (modify-phases %standard-phases
14467 (add-after 'unpack 'remove-failing-test
14468 (lambda _
14469 ;; Remove failing test. FIXME: make it pass
14470 (delete-file "bpython/test/test_args.py")
14471 #t))
14472 (add-after 'wrap 'add-aliases
14473 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
14474 (lambda* (#:key outputs #:allow-other-keys)
14475 (let ((out (assoc-ref outputs "out")))
14476 (for-each
14477 (lambda (old new)
14478 (symlink old (string-append out "/bin/" new)))
14479 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
14480 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
14481 #t)))))
14482 (propagated-inputs
14483 `(("python-pygments" ,python-pygments)
14484 ("python-requests" ,python-requests)
14485 ("python-babel" ,python-babel) ; optional, for internationalization
14486 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
14487 ("python-greenlet" ,python-greenlet)
14488 ("python-urwid" ,python-urwid) ; for bpython-urwid only
14489 ("python-six" ,python-six)))
14490 (native-inputs
14491 `(("python-sphinx" ,python-sphinx)
14492 ("python-mock" ,python-mock)))
14493 (home-page "https://bpython-interpreter.org/")
14494 (synopsis "Fancy interface to the Python interpreter")
14495 (description "Bpython is a fancy interface to the Python
14496interpreter. bpython's main features are
14497
14498@enumerate
14499@item in-line syntax highlighting,
14500@item readline-like autocomplete with suggestions displayed as you type,
14501@item expected parameter list for any Python function,
14502@item \"rewind\" function to pop the last line of code from memory and
14503 re-evaluate,
14504@item send the code you've entered off to a pastebin,
14505@item save the code you've entered to a file, and
14506@item auto-indentation.
14507@end enumerate")
14508 (license license:expat)))
14509
14510(define-public bpython2
14511 (let ((base (package-with-python2
14512 (strip-python2-variant bpython))))
14513 (package (inherit base)
14514 (name "bpython2")
14515 (arguments
14516 `(#:python ,python-2
14517 #:phases
14518 (modify-phases %standard-phases
14519 (add-after 'unpack 'remove-failing-test
14520 (lambda _
14521 ;; Remove failing test. FIXME: make it pass
14522 (delete-file "bpython/test/test_args.py")
14523 ;; Disable failing test-cases (renaming inhibits they are
14524 ;; discovered)
14525 (substitute* "bpython/test/test_curtsies_repl.py"
14526 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
14527 (string-append a "xxx_off_" b))
14528 (("^(\\s*def )(test_complex\\W)" _ a b)
14529 (string-append a "xxx_off_" b)))
14530 #t))
14531 (add-before 'build 'rename-scripts
14532 ;; rename the scripts to bypthon2, bpdb2, etc.
14533 (lambda _
14534 (substitute* "setup.py"
14535 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
14536 (string-append name "2" rest "\n"))
14537 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
14538 (string-append name "2" (or sub "") rest "\n")))
14539 #t))))))))
14540
14541(define-public python-pyinotify
14542 (package
14543 (name "python-pyinotify")
14544 (version "0.9.6")
14545 (source (origin
14546 (method url-fetch)
14547 (uri (pypi-uri "pyinotify" version))
14548 (sha256
14549 (base32
14550 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
14551 (build-system python-build-system)
14552 (arguments `(#:tests? #f)) ;no tests
14553 (home-page "https://github.com/seb-m/pyinotify")
14554 (synopsis "Python library for monitoring inotify events")
14555 (description
14556 "@code{pyinotify} provides a Python interface for monitoring
14557file system events on Linux.")
14558 (license license:expat)))
14559
14560(define-public python2-pyinotify
14561 (package-with-python2 python-pyinotify))
14562
14563;; Ada parser uses this version.
14564(define-public python2-quex-0.67.3
14565 (package
14566 (name "python2-quex")
14567 (version "0.67.3")
14568 (source
14569 (origin
14570 (method url-fetch)
14571 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
14572 (version-major+minor version)
14573 "/quex-" version ".zip"))
14574 (sha256
14575 (base32
14576 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
14577 (build-system python-build-system)
14578 (native-inputs
14579 `(("unzip" ,unzip)))
14580 (arguments
14581 `(#:python ,python-2
14582 #:tests? #f
14583 #:phases
14584 (modify-phases %standard-phases
14585 (delete 'configure)
14586 (delete 'build)
14587 (replace 'install
14588 (lambda* (#:key outputs #:allow-other-keys)
14589 (let* ((out (assoc-ref outputs "out"))
14590 (share/quex (string-append out "/share/quex"))
14591 (bin (string-append out "/bin")))
14592 (copy-recursively "." share/quex)
14593 (mkdir-p bin)
14594 (symlink (string-append share/quex "/quex-exe.py")
14595 (string-append bin "/quex"))
14596 #t))))))
14597 (native-search-paths
14598 (list (search-path-specification
14599 (variable "QUEX_PATH")
14600 (files '("share/quex")))))
14601 (home-page "http://quex.sourceforge.net/")
14602 (synopsis "Lexical analyzer generator in Python")
14603 (description "@code{quex} is a lexical analyzer generator in Python.")
14604 (license license:lgpl2.1+))) ; Non-military
14605
14606(define-public python2-quex
14607 (package (inherit python2-quex-0.67.3)
14608 (name "python2-quex")
14609 (version "0.68.1")
14610 (source
14611 (origin
14612 (method url-fetch)
14613 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
14614 (sha256
14615 (base32
14616 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
14617 (file-name (string-append name "-" version ".tar.gz"))))))
14618
14619(define-public python-more-itertools
14620 (package
14621 (name "python-more-itertools")
14622 (version "4.3.0")
14623 (source
14624 (origin
14625 (method url-fetch)
14626 (uri (pypi-uri "more-itertools" version))
14627 (sha256
14628 (base32
14629 "17h3na0rdh8xq30w4b9pizgkdxmm51896bxw600x84jflg9vaxn4"))))
14630 (build-system python-build-system)
14631 (arguments
14632 `(,@(if (any (cute string-prefix? <> (or (%current-system)
14633 (%current-target-system)))
14634 '("armhf" "i686"))
14635 '(#:phases
14636 (modify-phases %standard-phases
14637 ;; This is required for 32-bit hardware.
14638 ;; TODO: Try to remove this when upgrading.
14639 (add-after 'unpack 'patch-test
14640 (lambda _
14641 (substitute* "more_itertools/tests/test_more.py"
14642 (("10 \\*\\* 10") "9 ** 9"))
14643 #t))))
14644 '())))
14645 (propagated-inputs
14646 `(("python-six" ,python-six-bootstrap)))
14647 (home-page "https://github.com/erikrose/more-itertools")
14648 (synopsis "More routines for operating on iterables, beyond itertools")
14649 (description "Python's built-in @code{itertools} module implements a
14650number of iterator building blocks inspired by constructs from APL, Haskell,
14651and SML. @code{more-itertools} includes additional building blocks for
14652working with iterables.")
14653 (license license:expat)))
14654
14655(define-public python2-more-itertools
14656 (package-with-python2 python-more-itertools))
14657
14658(define-public python-latexcodec
14659 (package
14660 (name "python-latexcodec")
91b61f02 14661 (version "1.0.6")
44d10b1f
RW
14662 (source
14663 (origin
14664 (method url-fetch)
14665 (uri (pypi-uri "latexcodec" version))
14666 (sha256
91b61f02 14667 (base32 "0s4wdbg0w2l8pj3i0y4510i0s04p8nhxcsa2z41bjsv0k66npb81"))))
44d10b1f
RW
14668 (build-system python-build-system)
14669 (inputs
14670 `(("python-six" ,python-six)))
14671 (home-page "https://readthedocs.org/projects/latexcodec/")
14672 (synopsis "Work with LaTeX code in Python")
14673 (description "Lexer and codec to work with LaTeX code in Python.")
14674 (license license:expat)))
14675
14676(define-public python-pybtex
14677 (package
14678 (name "python-pybtex")
14679 (version "0.21")
14680 (source
14681 (origin
14682 (method url-fetch)
14683 (uri (pypi-uri "pybtex" version))
14684 (sha256
14685 (base32
14686 "00300j8dn5pxq4ndxmfmbmycg2znawkqs49val2x6jlmfiy6r2mg"))))
14687 (build-system python-build-system)
14688 (native-inputs
14689 `(("python-nose" ,python-nose)))
14690 (inputs
14691 `(("python-latexcodec" ,python-latexcodec)
14692 ("python-pyyaml" ,python-pyyaml)
14693 ("python-six" ,python-six)))
14694 (arguments
14695 `(#:test-target "nosetests"))
14696 (home-page "https://pybtex.org/")
14697 (synopsis "BibTeX-compatible bibliography processor")
14698 (description "Pybtex is a BibTeX-compatible bibliography processor written
14699in Python. You can simply type pybtex instead of bibtex.")
14700 (license license:expat)))
14701
14702(define-public python-onetimepass
14703 (package
14704 (name "python-onetimepass")
14705 (version "1.0.1")
14706 (source
14707 (origin
14708 (method url-fetch)
14709 (uri (pypi-uri "onetimepass" version))
14710 (sha256
14711 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
14712 (build-system python-build-system)
14713 (propagated-inputs `(("python-six" ,python-six)))
14714 (home-page "https://github.com/tadeck/onetimepass/")
14715 (synopsis "One-time password library")
14716 (description "Python one-time password library for HMAC-based (HOTP) and
14717time-based (TOTP) passwords.")
14718 (license license:expat)))
14719
14720(define-public python-parso
14721 (package
14722 (name "python-parso")
14723 (version "0.3.1")
14724 (source
14725 (origin
14726 (method url-fetch)
14727 (uri (pypi-uri "parso" version))
14728 (sha256
14729 (base32
14730 "18p89iwcm8mnf380f92g9w0bhx5km8wxp392vvjcq4y1ld1llw1m"))))
14731 (native-inputs
14732 `(("python-pytest" ,python-pytest)))
14733 (build-system python-build-system)
14734 (home-page "https://github.com/davidhalter/parso")
14735 (synopsis "Python Parser")
14736 (description "Parso is a Python parser that supports error recovery and
14737round-trip parsing for different Python versions (in multiple Python versions).
14738Parso is also able to list multiple syntax errors in your Python file.")
14739 (license license:expat)))
14740
14741(define-public python2-parso
14742 (package-with-python2 python-parso))
14743
14744(define-public python-async-generator
14745 (package
14746 (name "python-async-generator")
94fcbf8d 14747 (version "1.10")
44d10b1f
RW
14748 (source
14749 (origin
14750 (method url-fetch)
14751 (uri (pypi-uri "async_generator" version))
14752 (sha256
14753 (base32
94fcbf8d 14754 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
44d10b1f
RW
14755 (build-system python-build-system)
14756 (native-inputs
14757 `(("python-pytest" ,python-pytest)))
14758 (home-page "https://github.com/python-trio/async_generator")
14759 (synopsis "Async generators and context managers for Python 3.5+")
14760 (description "@code{async_generator} back-ports Python 3.6's native async
14761generators and Python 3.7's context managers into Python 3.5.")
14762 ;; Dual licensed.
14763 (license (list license:expat license:asl2.0))))
14764
14765(define-public python-async-timeout
14766 (package
14767 (name "python-async-timeout")
14768 (version "3.0.1")
14769 (source
14770 (origin
14771 (method url-fetch)
14772 (uri (pypi-uri "async-timeout" version))
14773 (sha256
14774 (base32
14775 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
14776 (build-system python-build-system)
14777 (home-page "https://github.com/aio-libs/async_timeout/")
14778 (synopsis "Timeout context manager for asyncio programs")
14779 (description "@code{async-timeout} provides a timeout timeout context
14780manager compatible with @code{asyncio}.")
14781 (license license:asl2.0)))
14782
14783(define-public python-glob2
14784 (package
14785 (name "python-glob2")
14786 (version "0.6")
8fa2bcc7
TGR
14787 (source
14788 (origin
14789 (method git-fetch)
14790 (uri (git-reference
14791 (url "https://github.com/miracle2k/python-glob2.git")
14792 (commit version)))
14793 (file-name (git-file-name name version))
14794 (sha256
14795 (base32 "1lm1xz3k3l0k1c5bcp9hlzmi3gp5j8dl1k3xhpiq5mnm0xq6n163"))))
44d10b1f
RW
14796 (build-system python-build-system)
14797 (home-page "https://github.com/miracle2k/python-glob2/")
14798 (synopsis "Extended Version of the python buildin glob module")
14799 (description "This is an extended version of the Python
14800@url{http://docs.python.org/library/glob.html, built-in glob module} which
14801adds:
14802
14803@itemize
14804@item The ability to capture the text matched by glob patterns, and return
14805those matches alongside the file names.
14806@item A recursive @code{**} globbing syntax, akin for example to the
14807@code{globstar} option of Bash.
14808@item The ability to replace the file system functions used, in order to glob
14809on virtual file systems.
14810@item Compatible with Python 2 and Python 3 (tested with 3.3).
14811@end itemize
14812
14813Glob2 currently based on the glob code from Python 3.3.1.")
14814 (license license:bsd-2)))
14815
14816(define-public python2-glob2
14817 (package-with-python2 python-glob2))
14818
14819(define-public python-gipc
14820 (package
14821 (name "python-gipc")
14822 (version "0.6.0")
14823 (source
14824 (origin
14825 (method url-fetch)
14826 (uri (pypi-uri "gipc" version ".zip"))
14827 (sha256
14828 (base32
14829 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
14830 (build-system python-build-system)
14831 (native-inputs
14832 `(("unzip" ,unzip)))
14833 (propagated-inputs
14834 `(("python-gevent" ,python-gevent)))
14835 (home-page "http://gehrcke.de/gipc")
14836 (synopsis "Child process management in the context of gevent")
14837 (description "Usage of Python's multiprocessing package in a
14838gevent-powered application may raise problems. With @code{gipc},
14839process-based child processes can safely be created anywhere within a
14840gevent-powered application.")
14841 (license license:expat)))
14842
14843(define-public python2-gipc
14844 (package-with-python2 python-gipc))
14845
14846(define-public python-fusepy
14847 (package
14848 (name "python-fusepy")
14849 (version "2.0.4")
14850 (source
14851 (origin
14852 (method url-fetch)
14853 (uri (pypi-uri "fusepy" version))
14854 (sha256
14855 (base32
14856 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
14857 (build-system python-build-system)
14858 (arguments
14859 `(#:phases
14860 (modify-phases %standard-phases
14861 (add-before 'build 'set-library-file-name
14862 (lambda* (#:key inputs #:allow-other-keys)
14863 (let ((fuse (assoc-ref inputs "fuse")))
14864 (substitute* "fuse.py"
14865 (("find_library\\('fuse'\\)")
14866 (string-append "'" fuse "/lib/libfuse.so'")))
14867 #t))))))
14868 (propagated-inputs
14869 `(("fuse" ,fuse)))
14870 (home-page "https://github.com/fusepy/fusepy")
14871 (synopsis "Simple ctypes bindings for FUSE")
14872 (description "Python module that provides a simple interface to FUSE and
14873MacFUSE. The binding is created using the standard @code{ctypes} library.")
14874 (license license:isc)))
14875
14876(define-public python2-fusepy
14877 (package-with-python2 python-fusepy))
14878
14879(define-public python2-gdrivefs
14880 (package
14881 (name "python2-gdrivefs")
14882 (version "0.14.9")
14883 (source
14884 (origin
14885 (method url-fetch)
14886 (uri (pypi-uri "gdrivefs" version))
14887 (sha256
14888 (base32
14889 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
14890 (build-system python-build-system)
14891 (arguments
14892 `(#:python ,python-2
14893 #:phases
14894 (modify-phases %standard-phases
14895 (add-before 'build 'patch-setup-py
14896 (lambda _
14897 ;; Update requirements from dependency==version
14898 ;; to dependency>=version
14899 (substitute* "gdrivefs/resources/requirements.txt"
14900 (("==") ">="))
14901 #t)))))
14902 (native-inputs
14903 `(("python2-gipc" ,python2-gipc)
14904 ("python2-gevent" ,python2-gevent)
14905 ("python2-greenlet" ,python2-greenlet)
14906 ("python2-httplib2" ,python2-httplib2)
14907 ("python2-uritemplate" ,python2-uritemplate)
14908 ("python2-oauth2client" ,python2-oauth2client)
14909 ("python2-six" ,python2-six)))
14910 (propagated-inputs
14911 `(("python2-dateutil" ,python2-dateutil)
14912 ("python2-fusepy" ,python2-fusepy)
14913 ("python2-google-api-client" ,python2-google-api-client)))
14914 (home-page "https://github.com/dsoprea/GDriveFS")
14915 (synopsis "Mount Google Drive as a local file system")
14916 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
14917under Python 2.7.")
14918 (license license:gpl2)))
14919
14920(define-public pybind11
14921 (package
14922 (name "pybind11")
14923 (version "2.2.4")
14924 (source (origin
14925 (method git-fetch)
14926 (uri (git-reference
14927 (url "https://github.com/pybind/pybind11.git")
14928 (commit (string-append "v" version))))
14929 (sha256
14930 (base32
14931 "0pa79ymcasv8br5ifbx7878id5py2jpjac3i20cqxr6gs9l6ivlv"))
14932 (file-name (git-file-name name version))))
14933 (build-system cmake-build-system)
14934 (native-inputs
14935 `(("python" ,python)
14936 ("python-pytest" ,python-pytest)))
14937 (arguments
14938 `(#:test-target "check"))
14939 (home-page "https://github.com/pybind/pybind11/")
14940 (synopsis "Seamless operability between C++11 and Python")
14941 (description "pybind11 is a lightweight header-only library that exposes
14942C++ types in Python and vice versa, mainly to create Python bindings of
14943existing C++ code. Its goals and syntax are similar to the excellent
14944Boost.Python library by David Abrahams: to minimize boilerplate code in
14945traditional extension modules by inferring type information using compile-time
14946introspection.")
14947 (license license:expat)))
14948
14949(define-public python-fasteners
14950 (package
14951 (name "python-fasteners")
14952 (version "0.14.1")
14953 (source
14954 (origin
14955 (method url-fetch)
14956 (uri (pypi-uri "fasteners" version))
14957 (sha256
14958 (base32
14959 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
14960 (build-system python-build-system)
14961 (propagated-inputs
14962 `(("python-monotonic" ,python-monotonic)
14963 ("python-six" ,python-six)
14964 ("python-testtools" ,python-testtools)))
14965 (home-page "https://github.com/harlowja/fasteners")
14966 (synopsis "Python package that provides useful locks")
14967 (description
14968 "This package provides a Python program that provides following locks:
14969
14970@itemize
14971@item Locking decorator
14972@item Reader-writer locks
14973@item Inter-process locks
14974@item Generic helpers
14975@end itemize\n")
14976 (properties `((python2-variant . ,(delay python2-fasteners))))
14977 (license license:asl2.0)))
14978
14979(define-public python2-fasteners
14980 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
14981 (package
14982 (inherit base)
14983 (propagated-inputs
14984 `(("python2-futures" ,python2-futures)
14985 ,@(package-propagated-inputs base))))))
14986
14987(define-public python-requests-file
14988 (package
14989 (name "python-requests-file")
14990 (version "1.4.3")
14991 (source
14992 (origin
14993 (method url-fetch)
14994 (uri (pypi-uri "requests-file" version))
14995 (sha256
14996 (base32
14997 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
14998 (build-system python-build-system)
14999 (propagated-inputs
15000 `(("python-requests" ,python-requests)
15001 ("python-six" ,python-six)))
15002 (home-page
15003 "https://github.com/dashea/requests-file")
15004 (synopsis "File transport adapter for Requests")
15005 (description
15006 "Requests-File is a transport adapter for use with the Requests Python
52beae7b 15007library to allow local file system access via @code{file://} URLs.")
44d10b1f
RW
15008 (license license:asl2.0)))
15009
15010(define-public python2-requests-file
15011 (package-with-python2 python-requests-file))
15012
15013(define-public python-tldextract
15014 (package
15015 (name "python-tldextract")
15016 (version "2.2.0")
15017 (source
15018 (origin
15019 (method url-fetch)
15020 (uri (pypi-uri "tldextract" version))
15021 (sha256
15022 (base32
15023 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
15024 (build-system python-build-system)
15025 (native-inputs
15026 `(("python-pytest" ,python-pytest)
15027 ("python-responses" ,python-responses)))
15028 (propagated-inputs
15029 `(("python-idna" ,python-idna)
15030 ("python-requests" ,python-requests)
15031 ("python-requests-file" ,python-requests-file)))
15032 (home-page
15033 "https://github.com/john-kurkowski/tldextract")
15034 (synopsis
15035 "Separate the TLD from the registered domain and subdomains of a URL")
15036 (description
15037 "TLDExtract accurately separates the TLD from the registered domain and
15038subdomains of a URL, using the Public Suffix List. By default, this includes
15039the public ICANN TLDs and their exceptions. It can optionally support the
15040Public Suffix List's private domains as well.")
15041 (license license:bsd-3)))
15042
15043(define-public python2-tldextract
15044 (package-with-python2 python-tldextract))
15045
15046(define-public python-pynamecheap
15047 (package
15048 (name "python-pynamecheap")
15049 (version "0.0.3")
15050 (source
15051 (origin
15052 (method url-fetch)
15053 (uri (pypi-uri "PyNamecheap" version))
15054 (sha256
15055 (base32
15056 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
15057 (build-system python-build-system)
15058 (propagated-inputs
15059 `(("python-requests" ,python-requests)))
15060 (home-page
15061 "https://github.com/Bemmu/PyNamecheap")
15062 (synopsis
15063 "Namecheap API client in Python")
15064 (description
15065 "PyNamecheap is a Namecheap API client in Python.")
15066 (license license:expat)))
15067
15068(define-public python2-pynamecheap
15069 (package-with-python2 python-pynamecheap))
15070
15071(define-public python-dns-lexicon
15072 (package
15073 (name "python-dns-lexicon")
15074 (version "2.4.0")
15075 (source
15076 (origin
15077 (method url-fetch)
15078 (uri (pypi-uri "dns-lexicon" version))
15079 (sha256
15080 (base32
15081 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
15082 (build-system python-build-system)
15083 (arguments
15084 `(#:tests? #f)) ;requires internet access
15085 (propagated-inputs
15086 `(("python-future" ,python-future)
15087 ("python-pynamecheap" ,python-pynamecheap)
15088 ("python-requests" ,python-requests)
15089 ("python-tldextract" ,python-tldextract)
15090 ("python-urllib3" ,python-urllib3)))
15091 (home-page "https://github.com/AnalogJ/lexicon")
15092 (synopsis
15093 "Manipulate DNS records on various DNS providers")
15094 (description
15095 "Lexicon provides a way to manipulate DNS records on multiple DNS
15096providers in a standardized way. It has a CLI but it can also be used as a
15097Python library. It was designed to be used in automation, specifically with
15098Let's Encrypt.")
15099 (license license:expat)))
15100
15101(define-public python2-dns-lexicon
15102 (package-with-python2 python-dns-lexicon))
15103
15104(define-public python-commandlines
15105 (package
15106 (name "python-commandlines")
15107 (version "0.4.1")
15108 (source
15109 (origin
15110 (method url-fetch)
15111 (uri (pypi-uri "commandlines" version))
15112 (sha256
15113 (base32
15114 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
15115 (build-system python-build-system)
15116 (home-page "https://github.com/chrissimpkins/commandlines")
15117 (synopsis "Command line argument to object parsing library")
15118 (description
15119 "@code{Commandlines} is a Python library for command line application
15120development that supports command line argument parsing, command string
15121validation testing and application logic.")
15122 (license license:expat)))
15123
15124;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
15125;; python-numba. They have a very unflexible relationship.
15126(define-public python-numba
15127 (package
15128 (name "python-numba")
7757e6d8 15129 (version "0.42.0")
44d10b1f
RW
15130 (source
15131 (origin
15132 (method url-fetch)
15133 (uri (pypi-uri "numba" version))
15134 (sha256
15135 (base32
7757e6d8 15136 "03rqdfx0512lcri2bcpngx5k3jwfbqnanqj3n19c7d6h6hqxvq9x"))))
44d10b1f
RW
15137 (build-system python-build-system)
15138 (arguments
15139 `(#:modules ((guix build utils)
15140 (guix build python-build-system)
15141 (ice-9 ftw)
15142 (srfi srfi-1)
15143 (srfi srfi-26))
15144 #:phases
15145 (modify-phases %standard-phases
15146 (add-after 'unpack 'disable-proprietary-features
15147 (lambda _
15148 (setenv "NUMBA_DISABLE_HSA" "1")
15149 (setenv "NUMBA_DISABLE_CUDA" "1")
15150 #t))
15151 (add-after 'unpack 'remove-failing-tests
15152 (lambda _
15153 ;; FIXME: these tests fail for unknown reasons:
15154 ;; test_non_writable_pycache, test_non_creatable_pycache, and
15155 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
15156 (substitute* "numba/tests/test_dispatcher.py"
15157 (("def test(_non_writable_pycache)" _ m)
15158 (string-append "def guix_skip" m))
15159 (("def test(_non_creatable_pycache)" _ m)
15160 (string-append "def guix_skip" m))
15161 (("def test(_frozen)" _ m)
15162 (string-append "def guix_skip" m)))
15163
15164 ;; These tests fail because we don't run the tests from the build
15165 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
15166 ;; They ar in numba.tests.test_pycc.TestDistutilsSupport.
15167 (substitute* "numba/tests/test_pycc.py"
15168 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
15169 (string-append "def guix_skip" m)))
15170 #t))
15171 (replace 'check
15172 (lambda _
15173 (let ((cwd (getcwd)))
15174 (setenv "PYTHONPATH"
15175 (string-append cwd "/build/"
15176 (find (cut string-prefix? "lib" <>)
15177 (scandir (string-append cwd "/build")))
15178 ":"
15179 (getenv "PYTHONPATH")))
15180 ;; Something is wrong with the PYTHONPATH when running the
15181 ;; tests from the build directory, as it complains about not being
15182 ;; able to import certain modules.
15183 (with-directory-excursion "/tmp"
15184 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
15185 #t)))))
15186 (propagated-inputs
15187 `(("python-llvmlite" ,python-llvmlite)
15188 ("python-numpy" ,python-numpy)
15189 ("python-singledispatch" ,python-singledispatch)))
15190 ;; Needed for tests.
15191 (inputs
15192 `(("python-jinja2" ,python-jinja2)
15193 ("python-pygments" ,python-pygments)))
15194 (home-page "https://numba.pydata.org")
15195 (synopsis "Compile Python code using LLVM")
15196 (description "Numba gives you the power to speed up your applications with
15197high performance functions written directly in Python. With a few
15198annotations, array-oriented and math-heavy Python code can be just-in-time
15199compiled to native machine instructions, similar in performance to C, C++ and
15200Fortran, without having to switch languages or Python interpreters.
15201
15202Numba works by generating optimized machine code using the LLVM compiler
15203infrastructure at import time, runtime, or statically (using the included pycc
15204tool).")
15205 (license license:bsd-3)))
15206
15207(define-public python-anndata
15208 (package
15209 (name "python-anndata")
8c9372c1 15210 (version "0.6.18")
44d10b1f
RW
15211 (source
15212 (origin
15213 (method url-fetch)
15214 (uri (pypi-uri "anndata" version))
15215 (sha256
15216 (base32
8c9372c1 15217 "03x83yjaccbqszj7x4fwwmpil0ai59yx64d1zmf2691za3j03w73"))))
44d10b1f
RW
15218 (build-system python-build-system)
15219 (propagated-inputs
15220 `(("python-h5py" ,python-h5py)
15221 ("python-natsort" ,python-natsort)
15222 ("python-pandas" ,python-pandas)
15223 ("python-scipy" ,python-scipy)))
15224 (home-page "https://github.com/theislab/anndata")
15225 (synopsis "Annotated data for data analysis pipelines")
15226 (description "Anndata is a package for simple (functional) high-level APIs
15227for data analysis pipelines. In this context, it provides an efficient,
15228scalable way of keeping track of data together with learned annotations and
15229reduces the code overhead typically encountered when using a mostly
15230object-oriented library such as @code{scikit-learn}.")
15231 (license license:bsd-3)))
15232
15233(define-public python-dill
15234 (package
15235 (name "python-dill")
c60b15cc 15236 (version "0.2.9")
44d10b1f
RW
15237 (source
15238 (origin
15239 (method url-fetch)
15240 (uri (pypi-uri "dill" version))
15241 (sha256
c60b15cc 15242 (base32 "0vwqyi6hyz2r29zydc78dqymkbc5y7gia16xcdh215cikxph9mpn"))))
44d10b1f 15243 (build-system python-build-system)
c60b15cc 15244 ;; FIXME: The check phase fails with "don't know how to make test from: …".
44d10b1f
RW
15245 (arguments '(#:tests? #f))
15246 (home-page "https://pypi.org/project/dill")
15247 (synopsis "Serialize all of Python")
15248 (description "Dill extends Python's @code{pickle} module for serializing
15249and de-serializing Python objects to the majority of the built-in Python
15250types. Dill provides the user the same interface as the @code{pickle} module,
15251and also includes some additional features. In addition to pickling Python
15252objects, @code{dill} provides the ability to save the state of an interpreter
61985d65 15253session in a single command. Hence, it would be feasible to save a
44d10b1f
RW
15254interpreter session, close the interpreter, ship the pickled file to another
15255computer, open a new interpreter, unpickle the session and thus continue from
15256the saved state of the original interpreter session.")
15257 (license license:bsd-3)))
15258
15259(define-public python-multiprocess
15260 (package
15261 (name "python-multiprocess")
15262 (version "0.70.6.1")
15263 (source
15264 (origin
15265 (method url-fetch)
15266 (uri (pypi-uri "multiprocess" version))
15267 (sha256
15268 (base32
15269 "1ip5caz67b3q0553mr8gm8xwsb8x500jn8ml0gihgyfy52m2ypcq"))))
15270 (build-system python-build-system)
15271 (propagated-inputs
15272 `(("python-dill" ,python-dill)))
15273 (home-page "https://pypi.org/project/multiprocess")
15274 (synopsis "Multiprocessing and multithreading in Python")
15275 (description
15276 "This package is a fork of the multiprocessing Python package, a package
15277which supports the spawning of processes using the API of the standard
15278library's @code{threading} module.")
15279 (license license:bsd-3)))
15280
15281(define-public python-toolz
15282 (package
15283 (name "python-toolz")
15284 (version "0.9.0")
15285 (source
15286 (origin
15287 (method url-fetch)
15288 (uri (pypi-uri "toolz" version))
15289 (sha256
15290 (base32
15291 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
15292 (build-system python-build-system)
15293 ;; FIXME: tests cannot be computed: "Can't perform this operation for
15294 ;; unregistered loader type"
15295 (arguments '(#:tests? #f))
15296 (home-page "https://github.com/pytoolz/toolz/")
15297 (synopsis "List processing tools and functional utilities")
15298 (description
15299 "This package provides a set of utility functions for iterators,
15300functions, and dictionaries.")
15301 (license license:bsd-3)))
15302
15303(define-public python2-toolz
15304 (package-with-python2 python-toolz))
15305
15306(define-public python-cytoolz
15307 (package
15308 (name "python-cytoolz")
15309 (version "0.9.0.1")
15310 (source
15311 (origin
15312 (method url-fetch)
15313 (uri (pypi-uri "cytoolz" version))
15314 (sha256
15315 (base32
15316 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
15317 (build-system python-build-system)
15318 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
15319 ;; 'exceptions'"
15320 (arguments '(#:tests? #f))
15321 (propagated-inputs
15322 `(("python-toolz" ,python-toolz)))
15323 (native-inputs
15324 `(("python-cython" ,python-cython)))
15325 (home-page "https://github.com/pytoolz/cytoolz")
15326 (synopsis "High performance functional utilities")
15327 (description
15328 "The cytoolz package implements the same API as provided by toolz. The
15329main differences are that @code{cytoolz} is faster and cytoolz offers a C API
15330that is accessible to other projects developed in Cython.")
15331 (license license:bsd-3)))
15332
15333(define-public python-sortedcontainers
15334 (package
15335 (name "python-sortedcontainers")
15336 (version "2.0.4")
15337 (source
15338 (origin
15339 (method url-fetch)
15340 (uri (pypi-uri "sortedcontainers" version))
15341 (sha256
15342 (base32
15343 "10hrk2k0hbf9x78vd3f0lj277m1yzfhzzxr0hja718liwb398wk0"))))
15344 (build-system python-build-system)
15345 (native-inputs
15346 `(("python-tox" ,python-tox)))
15347 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
15348 (synopsis "Sorted List, Sorted Dict, Sorted Set")
15349 (description
15350 "This package provides a sorted collections library, written in
15351pure-Python.")
15352 (license license:asl2.0)))
15353
15354(define-public python-cloudpickle
15355 (package
15356 (name "python-cloudpickle")
15357 (version "0.6.1")
15358 (source
15359 (origin
15360 (method url-fetch)
15361 (uri (pypi-uri "cloudpickle" version))
15362 (sha256
15363 (base32
15364 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
15365 (build-system python-build-system)
15366 ;; FIXME: there are 5 errors in 122 tests:
15367 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
15368 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
15369 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15370 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15371 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
15372 ;; TypeError: cannot serialize '_io.BufferedRandom' object
15373 (arguments '(#:tests? #f))
15374 (native-inputs
15375 `(("python-pytest" ,python-pytest)
15376 ("python-mock" ,python-mock)
15377 ("python-tornado" ,python-tornado)))
15378 (home-page "https://github.com/cloudpipe/cloudpickle")
15379 (synopsis "Extended pickling support for Python objects")
15380 (description
15381 "Cloudpickle makes it possible to serialize Python constructs not
15382supported by the default pickle module from the Python standard library. It
15383is especially useful for cluster computing where Python expressions are
15384shipped over the network to execute on remote hosts, possibly close to the
15385data.")
15386 (license license:bsd-3)))
15387
15388(define-public python2-cloudpickle
15389 (package-with-python2 python-cloudpickle))
15390
15391(define-public python-locket
15392 (package
15393 (name "python-locket")
15394 (version "0.2.0")
15395 (source
15396 (origin
15397 (method url-fetch)
15398 (uri (pypi-uri "locket" version))
15399 (sha256
15400 (base32
15401 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
15402 (build-system python-build-system)
15403 (home-page "https://github.com/mwilliamson/locket.py")
15404 (synopsis "File-based locks for Python")
15405 (description
15406 "Locket implements a lock that can be used by multiple processes provided
15407they use the same path.")
15408 (license license:bsd-2)))
15409
15410(define-public python2-locket
15411 (package-with-python2 python-locket))
15412
15413(define-public python-blosc
15414 (package
15415 (name "python-blosc")
15416 (version "1.5.1")
15417 (source
15418 (origin
15419 (method url-fetch)
15420 (uri (pypi-uri "blosc" version))
15421 (sha256
15422 (base32
15423 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
15424 (build-system python-build-system)
15425 ;; FIXME: all tests pass, but then this error is printed:
15426 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
15427 (arguments '(#:tests? #f))
15428 (propagated-inputs
15429 `(("python-numpy" ,python-numpy)))
15430 (home-page "https://github.com/blosc/python-blosc")
15431 (synopsis "Python wrapper for the Blosc data compressor library")
15432 (description "Blosc is a high performance compressor optimized for binary
15433data. It has been designed to transmit data to the processor cache faster
15434than the traditional, non-compressed, direct memory fetch approach via a
15435@code{memcpy()} system call.
15436
15437Blosc works well for compressing numerical arrays that contains data with
15438relatively low entropy, like sparse data, time series, grids with
15439regular-spaced values, etc.
15440
15441This Python package wraps the Blosc library.")
15442 (license license:bsd-3)))
15443
15444(define-public python2-blosc
15445 (package-with-python2 python-blosc))
15446
15447(define-public python-partd
15448 (package
15449 (name "python-partd")
15450 (version "0.3.9")
15451 (source
15452 (origin
15453 (method url-fetch)
15454 (uri (pypi-uri "partd" version))
15455 (sha256
15456 (base32
15457 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
15458 (build-system python-build-system)
15459 (propagated-inputs
15460 `(("python-blosc" ,python-blosc)
15461 ("python-locket" ,python-locket)
15462 ("python-numpy" ,python-numpy)
15463 ("python-pandas" ,python-pandas)
15464 ("python-pyzmq" ,python-pyzmq)
15465 ("python-toolz" ,python-toolz)))
15466 (home-page "https://github.com/dask/partd/")
15467 (synopsis "Appendable key-value storage")
15468 (description "Partd stores key-value pairs. Values are raw bytes. We
15469append on old values. Partd excels at shuffling operations.")
15470 (license license:bsd-3)))
15471
15472(define-public python2-partd
15473 (package-with-python2 python-partd))
15474
15475(define-public python-dask
15476 (package
15477 (name "python-dask")
0998175f 15478 (version "1.2.2")
44d10b1f
RW
15479 (source
15480 (origin
15481 (method url-fetch)
15482 (uri (pypi-uri "dask" version))
15483 (sha256
0998175f 15484 (base32 "0b29gvf96gmp20wicly3v3mhyc93zbm3mdv935fka6x0wax7cy2y"))))
44d10b1f
RW
15485 (build-system python-build-system)
15486 ;; A single test out of 5000+ fails. This test is marked as xfail when
15487 ;; pytest-xdist is used.
15488 (arguments
15489 `(#:phases
15490 (modify-phases %standard-phases
15491 (add-after 'unpack 'disable-broken-test
15492 (lambda _
15493 (substitute* "dask/tests/test_threaded.py"
15494 (("def test_interrupt\\(\\)" m)
15495 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15496 m)))
15497 (when (which "python2")
15498 ;; This test fails with recent Pandas:
15499 ;; <https://github.com/dask/dask/issues/3794>.
15500 (substitute* "dask/dataframe/tests/test_dataframe.py"
15501 (("def test_info\\(\\)" m)
15502 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15503 m))))
15504 #t))
15505 (replace 'check
15506 (lambda _ (invoke "pytest" "-vv"))))))
15507 (propagated-inputs
15508 `(("python-cloudpickle" ,python-cloudpickle)
15509 ("python-numpy" ,python-numpy)
15510 ("python-pandas" ,python-pandas)
15511 ("python-partd" ,python-partd)
15512 ("python-toolz" ,python-toolz)
15513 ("python-pyyaml" ,python-pyyaml)))
15514 (native-inputs
15515 `(("python-pytest" ,python-pytest)
15516 ("python-pytest-runner" ,python-pytest-runner)))
15517 (home-page "https://github.com/dask/dask/")
15518 (synopsis "Parallel computing with task scheduling")
15519 (description
15520 "Dask is a flexible parallel computing library for analytics. It
15521consists of two components: dynamic task scheduling optimized for computation,
15522and large data collections like parallel arrays, dataframes, and lists that
15523extend common interfaces like NumPy, Pandas, or Python iterators to
15524larger-than-memory or distributed environments. These parallel collections
15525run on top of the dynamic task schedulers. ")
15526 (license license:bsd-3)))
15527
15528(define-public python2-dask
15529 (package-with-python2 python-dask))
15530
15531(define-public python-ilinkedlist
15532 (package
15533 (name "python-ilinkedlist")
15534 (version "0.4.0")
15535 (source
15536 (origin
15537 (method url-fetch)
15538 (uri (pypi-uri "ilinkedlist" version))
15539 (sha256
15540 (base32
15541 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
15542 (build-system python-build-system)
15543 (native-inputs `(("python-pytest" ,python-pytest)))
15544 (inputs `(("python" ,python)))
15545 (home-page "https://github.com/luther9/ilinkedlist-py")
15546 (synopsis "Immutable linked list library")
15547 (description
15548 "This is a implementation of immutable linked lists for Python. It
15549contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
15550Since a linked list is treated as immutable, it is hashable, and its length
15551can be retrieved in constant time. Some of the terminology is inspired by
15552LISP. It is possible to create an improper list by creating a @code{Pair}
15553with a non-list @code{cdr}.")
15554 (license license:gpl3+)))
15555
15556(define-public python-readlike
15557 (package
15558 (name "python-readlike")
15559 (version "0.1.3")
15560 (source
15561 (origin
15562 (method url-fetch)
15563 (uri (pypi-uri "readlike" version))
15564 (sha256
15565 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
15566 (build-system python-build-system)
15567 (home-page "https://github.com/jangler/readlike")
15568 (synopsis "GNU Readline-like line editing module")
15569 (description
15570 "This Python module provides line editing functions similar to the default
15571Emacs-style ones of GNU Readline. Unlike the Python standard library's
15572@code{readline} package, this one allows access to those capabilties in settings
15573outside of a standard command-line interface. It is especially well-suited to
15574interfacing with Urwid, due to a shared syntax for describing key inputs.
15575
15576Currently, all stateless Readline commands are implemented. Yanking and history
15577are not supported.")
15578 (license license:expat)))
15579
15580(define-public python2-readlike
15581 (package-with-python2 python-readlike))
15582
15583(define-public python-reparser
15584 (package
15585 (name "python-reparser")
15586 (version "1.4.3")
15587 (source
15588 (origin
15589 (method url-fetch)
15590 (uri (pypi-uri "ReParser" version))
15591 (sha256
15592 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
15593 (build-system python-build-system)
15594 (home-page "https://github.com/xmikos/reparser")
15595 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
15596 (description
15597 "This Python library provides a simple lexer/parser for inline markup based
15598on regular expressions.")
15599 (license license:expat)))
15600
15601(define-public python2-reparser
15602 (let ((reparser (package-with-python2
15603 (strip-python2-variant python-reparser))))
15604 (package (inherit reparser)
15605 (propagated-inputs
15606 `(("python2-enum34" ,python2-enum34)
15607 ,@(package-propagated-inputs reparser))))))
15608
15609(define-public python-precis-i18n
15610 (package
15611 (name "python-precis-i18n")
15612 (version "1.0.0")
15613 (source
15614 (origin
15615 (method url-fetch)
15616 (uri (pypi-uri "precis_i18n" version))
15617 (sha256
15618 (base32
15619 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
15620 (build-system python-build-system)
15621 (home-page "https://github.com/byllyfish/precis_i18n")
15622 (synopsis "Implementation of the PRECIS framework")
15623 (description
15624 "This module implements the PRECIS Framework as described in RFC 8264,
15625RFC 8265 and RFC 8266.")
15626 (license license:expat)))
15627
d0446c4b
RW
15628(define-public python-absl-py
15629 (package
15630 (name "python-absl-py")
15631 (version "0.6.1")
15632 (source
15633 (origin
15634 (method url-fetch)
15635 (uri (pypi-uri "absl-py" version))
15636 (sha256
15637 (base32
15638 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
15639 (build-system python-build-system)
15640 (propagated-inputs
15641 `(("python-six" ,python-six)))
15642 (home-page "https://github.com/abseil/abseil-py")
15643 (synopsis "Abseil Python common libraries")
15644 (description
15645 "This package provides the Abseil Python Common Libraries, a collection
15646of Python libraries for building Python applications.")
15647 (license license:asl2.0)))
15648
81bed4e9
RW
15649(define-public python-astor
15650 (package
15651 (name "python-astor")
15652 (version "0.7.1")
15653 (source
15654 (origin
15655 (method url-fetch)
15656 (uri (pypi-uri "astor" version))
15657 (sha256
15658 (base32
15659 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
15660 (build-system python-build-system)
15661 ;; FIXME: There are two errors and two test failures.
15662 (arguments `(#:tests? #f))
15663 (home-page "https://github.com/berkerpeksag/astor")
39ee82ff 15664 (synopsis "Read and write Python ASTs")
81bed4e9 15665 (description "Astor is designed to allow easy manipulation of Python
39ee82ff 15666source via the Abstract Syntax Tree.")
81bed4e9
RW
15667 (license license:bsd-3)))
15668
39ee82ff
RW
15669(define-public python2-astor
15670 (package-with-python2 python-astor))
15671
22e623ae
RW
15672(define-public python-grpcio
15673 (package
15674 (name "python-grpcio")
15675 (version "1.17.1")
15676 (source
15677 (origin
15678 (method url-fetch)
15679 (uri (pypi-uri "grpcio" version))
15680 (sha256
15681 (base32
15682 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
15683 (build-system python-build-system)
15684 (propagated-inputs
15685 `(("python-six" ,python-six)))
15686 (home-page "https://grpc.io")
15687 (synopsis "HTTP/2-based RPC framework")
15688 (description "This package provides a Python library for communicating
15689with the HTTP/2-based RPC framework gRPC.")
15690 (license license:asl2.0)))
15691
79869f80
RW
15692(define-public python-astunparse
15693 (package
15694 (name "python-astunparse")
47d79541 15695 (version "1.6.2")
79869f80
RW
15696 (source
15697 (origin
15698 (method url-fetch)
15699 (uri (pypi-uri "astunparse" version))
15700 (sha256
47d79541 15701 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
79869f80 15702 (build-system python-build-system)
47d79541 15703 (arguments '(#:tests? #f)) ; there are none
79869f80
RW
15704 (propagated-inputs
15705 `(("python-six" ,python-six)
15706 ("python-wheel" ,python-wheel)))
15707 (home-page "https://github.com/simonpercivall/astunparse")
15708 (synopsis "AST unparser for Python")
15709 (description "This package provides an AST unparser for Python. It is a
15710factored out version of @code{unparse} found in the Python source
15711distribution.")
15712 (license license:bsd-3)))
15713
2884aac0
RW
15714(define-public python-gast
15715 (package
15716 (name "python-gast")
bd300261 15717 (version "0.2.2")
2884aac0
RW
15718 (source
15719 (origin
15720 (method url-fetch)
15721 (uri (pypi-uri "gast" version))
15722 (sha256
bd300261 15723 (base32 "1w5dzdb3gpcfmd2s0b93d8gff40a1s41rv31458z14inb3s9v4zy"))))
2884aac0
RW
15724 (build-system python-build-system)
15725 (propagated-inputs
15726 `(("python-astunparse" ,python-astunparse)))
15727 (home-page "https://pypi.org/project/gast/")
15728 (synopsis "Generic Python AST that abstracts the underlying Python version")
15729 (description
15730 "GAST provides a compatibility layer between the AST of various Python
15731versions, as produced by @code{ast.parse} from the standard @code{ast}
15732module.")
15733 (license license:bsd-3)))
15734
44d10b1f
RW
15735(define-public python-wikidata
15736 (package
15737 (name "python-wikidata")
15738 (version "0.6.1")
15739 (source
15740 (origin
15741 (method url-fetch)
15742 (uri (pypi-uri "Wikidata" version))
15743 (sha256
15744 (base32
15745 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
15746 (build-system python-build-system)
15747 (propagated-inputs
15748 `(("python-babel" ,python-babel)))
15749 (home-page "https://github.com/dahlia/wikidata")
15750 (synopsis "Wikidata client library")
15751 (description
15752 "This package provides a Python interface to
15753@url{https://www.wikidata.org/, Wikidata}.")
15754 (properties '((upstream-name . "Wikidata")))
15755 (license license:gpl3+)))
15756
15757(define-public python-doctest-ignore-unicode
15758 (package
15759 (name "python-doctest-ignore-unicode")
15760 (version "0.1.2")
15761 (source
15762 (origin
15763 (method url-fetch)
15764 (uri (pypi-uri "doctest-ignore-unicode" version))
15765 (sha256
15766 (base32
15767 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
15768 (build-system python-build-system)
15769 (native-inputs
15770 `(("python-nose" ,python-nose)))
15771 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
15772 (synopsis "Ignore Unicode literal prefixes in doctests")
15773 (description
15774 "This package adds support for a flag to ignore Unicode literal prefixes
15775in doctests.")
15776 (license license:asl2.0)))
15777
15778(define-public python-attr
15779 (package
15780 (name "python-attr")
15781 (version "0.3.1")
15782 (source
15783 (origin
15784 (method url-fetch)
15785 (uri (pypi-uri "attr" version))
15786 (sha256
15787 (base32
15788 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
15789 (build-system python-build-system)
15790 (home-page "https://github.com/denis-ryzhkov/attr")
15791 (synopsis "Decorator for attributes of target function or class")
15792 (description "Simple decorator to set attributes of target function or
15793class in a @acronym{DRY, Don't Repeat Yourself} way.")
15794 (license license:expat)))
f98232a3
VC
15795
15796(define-public python-construct
15797 (package
15798 (name "python-construct")
15799 (version "2.9.45")
15800 (source
15801 (origin
15802 (method url-fetch)
15803 (uri (pypi-uri "construct" version))
15804 (sha256
15805 (base32
15806 "130iy05awzigm2xah2yvlmb08mac5bi4gzr5m3g7k1krs3ps0w92"))))
15807 (build-system python-build-system)
15808 (arguments
15809 `(#:tests? #f)) ; No tests exist.
15810 (propagated-inputs
15811 `(("python-extras" ,python-extras)
15812 ("python-arrow" ,python-arrow)
15813 ("python-numpy" ,python-numpy)
15814 ("python-ruamel.yaml" ,python-ruamel.yaml)))
15815 (home-page "http://construct.readthedocs.io")
15816 (synopsis "Declarative and symmetrical parser and builder for binary data")
15817 (description
15818 "This package provides both simple, atomic constructs (such as
15819integers of various sizes), as well as composite ones which allow you
15820form hierarchical and sequential structures of increasing complexity.
15821It features bit and byte granularity, easy debugging and testing, an
15822easy-to-extend subclass system, and lots of primitive constructs to
15823make your work easier.")
15824 (license license:expat)))
b742c006
LF
15825
15826(define-public python-humanize
15827 (package
15828 (name "python-humanize")
15829 (version "0.5.1")
15830 (source
15831 (origin
15832 (method url-fetch)
15833 (uri (pypi-uri "humanize" version))
15834 (sha256
15835 (base32
15836 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
15837 (arguments
15838 '(#:tests? #f)) ; tests not in pypi archive
15839 (build-system python-build-system)
15840 (home-page "https://github.com/jmoiron/humanize")
15841 (synopsis "Print numerical information in a human-readable form")
15842 (description "This package provides a Python module that displays numbers
15843and dates in \"human readable\" forms. For example, it would display
15844\"12345591313\" as \"12.3 billion\".")
15845 (license license:expat)))
d5bbf66d
LF
15846
15847(define-public python-txaio
15848 (package
15849 (name "python-txaio")
15850 (version "18.8.1")
15851 (source
15852 (origin
15853 (method url-fetch)
15854 (uri (pypi-uri "txaio" version))
15855 (sha256
15856 (base32
15857 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
15858 (build-system python-build-system)
15859 (propagated-inputs
15860 `(("python-twisted" ,python-twisted)
15861 ("python-six" ,python-six)))
15862 (home-page "https://github.com/crossbario/txaio")
15863 (synopsis "Compatibility layer between Python asyncio and Twisted")
15864 (description "Txaio provides a compatibility layer between the Python
15865@code{asyncio} module and @code{Twisted}.")
15866 (license license:expat)))
963dfd3a
RW
15867
15868(define-public python-toolshed
15869 (package
15870 (name "python-toolshed")
15871 (version "0.4.6")
15872 (source
15873 (origin
15874 (method url-fetch)
15875 (uri (pypi-uri "toolshed" version))
15876 (sha256
15877 (base32
15878 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
15879 (build-system python-build-system)
15880 (native-inputs
15881 `(("python-nose" ,python-nose)))
15882 (home-page "https://github.com/brentp/toolshed/")
15883 (synopsis "Collection of modules and functions for working with data")
15884 (description "This is a collection of well-tested, simple modules and
15885functions that aim to reduce boilerplate when working with data.")
15886 (license license:bsd-2)))
c91ecf2d
RW
15887
15888(define-public python-annoy
15889 (package
15890 (name "python-annoy")
15891 (version "1.15.1")
15892 (source
15893 (origin
15894 (method url-fetch)
15895 (uri (pypi-uri "annoy" version))
15896 (sha256
15897 (base32
15898 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
15899 (build-system python-build-system)
15900 (native-inputs
15901 `(("python-nose" ,python-nose)))
15902 (home-page "https://github.com/spotify/annoy/")
15903 (synopsis "Approximate nearest neighbors library")
15904 (description
15905 "Annoy is a C++ library with Python bindings to search for points in
15906space that are close to a given query point. It also creates large read-only
15907file-based data structures that are @code{mmap}ped into memory so that many
15908processes may share the same data.")
15909 (license license:asl2.0)))
412342d1 15910
79bfa422 15911(define-public python-pylzma
412342d1 15912 (package
79bfa422
DM
15913 (name "python-pylzma")
15914 (version "0.5.0")
15915 (source
15916 (origin
15917 (method url-fetch)
15918 (uri (pypi-uri "pylzma" version))
15919 (sha256
15920 (base32
15921 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
412342d1 15922 (build-system python-build-system)
79bfa422
DM
15923 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
15924 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
15925 (description "This package provides Python bindings for the LZMA library
15926by Igor Pavlov.")
15927 (license license:lgpl2.1+)))
15928
15929(define-public python2-pylzma
15930 (package-with-python2 python-pylzma))
f825e605 15931
6609ebe7
AG
15932(define-public python2-zeroconf
15933 (package
15934 (name "python2-zeroconf")
15935
15936 ;; This is the last version that supports Python 2.x.
15937 (version "0.19.1")
15938 (source
15939 (origin
15940 (method url-fetch)
15941 (uri (pypi-uri "zeroconf" version))
15942 (sha256
15943 (base32
15944 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
15945 (build-system python-build-system)
15946 (arguments
15947 `(#:python ,python-2
15948 #:phases
15949 (modify-phases %standard-phases
15950 (add-after 'unpack 'patch-requires
15951 (lambda* (#:key inputs #:allow-other-keys)
15952 (substitute* "setup.py"
15953 (("enum-compat")
15954 "enum34"))
15955 #t)))))
15956 (native-inputs
15957 `(("python2-six" ,python2-six)
15958 ("python2-enum32" ,python2-enum34)
15959 ("python2-netifaces" ,python2-netifaces)
15960 ("python2-typing" ,python2-typing)))
15961 (home-page "https://github.com/jstasiak/python-zeroconf")
15962 (synopsis "Pure Python mDNS service discovery")
15963 (description
15964 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
15965compatible).")
15966 (license license:lgpl2.1+)))
15967
f825e605
GLV
15968(define-public python-bsddb3
15969 (package
15970 (name "python-bsddb3")
15971 (version "6.2.6")
15972 (source
15973 (origin
15974 (method url-fetch)
15975 (uri (pypi-uri "bsddb3" version))
15976 (sha256
15977 (base32
15978 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
15979 (build-system python-build-system)
15980 (inputs
15981 `(("bdb" ,bdb)))
15982 (arguments
15983 '(#:phases
15984 (modify-phases %standard-phases
15985 (add-after 'unpack 'configure-locations
15986 (lambda* (#:key inputs #:allow-other-keys)
15987 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
15988 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
15989 #t))
15990 (replace 'check
15991 (lambda _
15992 (invoke "python3" "test3.py" "-v"))))))
15993 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
15994 (synopsis "Python bindings for Oracle Berkeley DB")
15995 (description
15996 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
15997C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
15998Transaction objects, and each of these is exposed as a Python type in the
15999bsddb3.db module. The database objects can use various access methods: btree,
16000hash, recno, and queue. Complete support of Berkeley DB distributed
16001transactions. Complete support for Berkeley DB Replication Manager.
16002Complete support for Berkeley DB Base Replication. Support for RPC.")
16003 (license license:bsd-3)))
edeb04bf
PL
16004
16005(define-public python-dbfread
16006 (package
16007 (name "python-dbfread")
16008 (version "2.0.7")
16009 (source (origin
16010 (method url-fetch)
16011 (uri (pypi-uri "dbfread" version))
16012 (sha256
16013 (base32
16014 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
16015 (build-system python-build-system)
16016 (native-inputs
16017 `(("python-pytest" ,python-pytest)))
16018 (home-page "https://dbfread.readthedocs.io")
16019 (synopsis "Read DBF Files with Python")
16020 (description
16021 "This library reads DBF files and returns the data as native Python data
16022types for further processing. It is primarily intended for batch jobs and
16023one-off scripts.")
16024 (license license:expat)))
e308b4f0
JM
16025
16026(define-public python-cached-property
16027 (package
16028 (name "python-cached-property")
16029 (version "1.5.1")
16030 (source
16031 (origin
16032 (method url-fetch)
16033 (uri (pypi-uri "cached-property" version))
16034 (sha256
16035 (base32
16036 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
16037 (build-system python-build-system)
16038 (arguments
16039 `(#:phases
16040 (modify-phases %standard-phases
16041 ;; https://github.com/pydanny/cached-property/issues/131
16042 ;; recent versions of freezegun break one test
16043 (add-after 'unpack 'disable-broken-test
16044 (lambda _
16045 (substitute* "tests/test_cached_property.py"
16046 (("def test_threads_ttl_expiry\\(self\\)" m)
16047 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
16048 " " m)))
16049 #t)))))
16050 (native-inputs
16051 `(("python-freezegun" ,python-freezegun)))
16052 (home-page
16053 "https://github.com/pydanny/cached-property")
16054 (synopsis
16055 "Decorator for caching properties in classes")
16056 (description
16057 "This package provides a decorator which makes caching
16058time-or-computationally-expensive properties quick and easy and works in Python
160592 or 3.")
16060 (license license:bsd-3)))
dfe8a704
NG
16061
16062(define-public python-folium
16063 (package
16064 (name "python-folium")
16065 (version "0.10.0")
16066 (source
16067 (origin
16068 (method url-fetch)
16069 (uri (pypi-uri "folium" version))
16070 (sha256
16071 (base32
16072 "18fzxijsgrb95r0a8anc9ba5ijyw3nlnv3rpavfbkqa5v878x84f"))))
16073 (build-system python-build-system)
16074 (propagated-inputs
16075 `(("python-branca" ,python-branca)
16076 ("python-jinja2" ,python-jinja2)
16077 ("python-numpy" ,python-numpy)
16078 ("python-requests" ,python-requests)))
16079 (native-inputs
16080 `(("python-pytest" ,python-pytest)))
16081 (home-page "https://github.com/python-visualization/folium")
16082 (synopsis "Make beautiful maps with Leaflet.js & Python")
16083 (description "@code{folium} makes it easy to visualize data that’s been
16084manipulated in Python on an interactive leaflet map. It enables both the
16085binding of data to a map for @code{choropleth} visualizations as well as
16086passing rich vector/raster/HTML visualizations as markers on the map.
16087
16088The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
16089Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
16090supports Image, Video, GeoJSON and TopoJSON overlays.")
16091 (license license:expat)))
9dd5f475
LC
16092
16093(define-public jube
16094 (package
16095 ;; This is a command-line tool, so no "python-" prefix.
16096 (name "jube")
16097 (version "2.2.2")
16098 (source (origin
16099 (method url-fetch)
16100 (uri (string-append
16101 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
16102 version))
16103 (sha256
16104 (base32
16105 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
16106 (file-name (string-append "jube-" version ".tar.gz"))))
16107 (build-system python-build-system)
16108 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
16109 (synopsis "Benchmarking environment")
16110 (description
16111 "JUBE helps perform and analyze benchmarks in a systematic way. For each
16112benchmarked application, benchmark data is stored in a format that allows JUBE
16113to deduct the desired information. This data can be parsed by automatic pre-
16114and post-processing scripts that draw information and store it more densely
16115for manual interpretation.")
a9f33960 16116 (license license:gpl3+)))