gnu: python-pygments: Update to 2.4.0.
[jackhill/guix/guix.git] / gnu / packages / python-xyz.scm
CommitLineData
44d10b1f
RW
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
2d040763 3;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
fa8ffaa0 4;;; Copyright © 2013, 2014, 2015, 2016, 2019 Andreas Enge <andreas@enge.fr>
44d10b1f
RW
5;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
6;;; Copyright © 2014, 2017 Eric Bavier <bavier@member.fsf.org>
7;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch>
8;;; Copyright © 2015 Omar Radwan <toxemicsquire4@gmail.com>
9;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu>
10;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
11;;; Copyright © 2015, 2016 Christopher Allan Webber <cwebber@dustycloud.org>
12;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
13;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
b742c006 14;;; Copyright © 2015, 2016, 2017, 2019 Leo Famulari <leo@famulari.name>
44d10b1f
RW
15;;; Copyright © 2015, 2017 Ben Woodcroft <donttrustben@gmail.com>
16;;; Copyright © 2015, 2016 Erik Edrosa <erik.edrosa@gmail.com>
17;;; Copyright © 2015, 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
18;;; Copyright © 2015, 2017 Kyle Meyer <kyle@kyleam.com>
19;;; Copyright © 2015, 2016 Chris Marusich <cmmarusich@gmail.com>
20;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
21;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
22;;; Copyright © 2016, 2018 Hartmut Goebel <h.goebel@crazy-compilers.com>
23;;; Copyright © 2016 Daniel Pimentel <d4n1@d4n1.org>
24;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
25;;; Copyright © 2016, 2017 Troy Sankey <sankeytms@gmail.com>
47956fa0 26;;; Copyright © 2016, 2017 ng0 <ng0@n0.is>
44d10b1f
RW
27;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
28;;; Copyright © 2016 David Craven <david@craven.ch>
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>
32;;; Copyright © 2016, 2017 Alex Vong <alexvong1995@gmail.com>
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>
47;;; Copyright © 2017 Brendan Tildesley <brendan.tildesley@openmailbox.org>
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>
44d10b1f
RW
62;;;
63;;; This file is part of GNU Guix.
64;;;
65;;; GNU Guix is free software; you can redistribute it and/or modify it
66;;; under the terms of the GNU General Public License as published by
67;;; the Free Software Foundation; either version 3 of the License, or (at
68;;; your option) any later version.
69;;;
70;;; GNU Guix is distributed in the hope that it will be useful, but
71;;; WITHOUT ANY WARRANTY; without even the implied warranty of
72;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
73;;; GNU General Public License for more details.
74;;;
75;;; You should have received a copy of the GNU General Public License
76;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
77
78(define-module (gnu packages python-xyz)
79 #:use-module ((guix licenses) #:prefix license:)
80 #:use-module (gnu packages)
81 #:use-module (gnu packages algebra)
82 #:use-module (gnu packages adns)
83 #:use-module (gnu packages attr)
84 #:use-module (gnu packages backup)
85 #:use-module (gnu packages bash)
86 #:use-module (gnu packages check)
87 #:use-module (gnu packages compression)
88 #:use-module (gnu packages crypto)
89 #:use-module (gnu packages databases)
90 #:use-module (gnu packages file)
91 #:use-module (gnu packages fontutils)
92 #:use-module (gnu packages gcc)
93 #:use-module (gnu packages geo)
94 #:use-module (gnu packages ghostscript)
95 #:use-module (gnu packages gl)
96 #:use-module (gnu packages glib)
97 #:use-module (gnu packages graphviz)
98 #:use-module (gnu packages graphics)
99 #:use-module (gnu packages gstreamer)
100 #:use-module (gnu packages gtk)
101 #:use-module (gnu packages icu4c)
102 #:use-module (gnu packages image)
103 #:use-module (gnu packages imagemagick)
104 #:use-module (gnu packages libevent)
105 #:use-module (gnu packages libffi)
106 #:use-module (gnu packages linux)
107 #:use-module (gnu packages llvm)
108 #:use-module (gnu packages man)
109 #:use-module (gnu packages maths)
42f0b0c2 110 #:use-module (gnu packages monitoring)
44d10b1f
RW
111 #:use-module (gnu packages multiprecision)
112 #:use-module (gnu packages networking)
113 #:use-module (gnu packages ncurses)
114 #:use-module (gnu packages openstack)
115 #:use-module (gnu packages pcre)
116 #:use-module (gnu packages perl)
117 #:use-module (gnu packages pkg-config)
118 #:use-module (gnu packages python)
d362b11d 119 #:use-module (gnu packages python-check)
44d10b1f
RW
120 #:use-module (gnu packages python-crypto)
121 #:use-module (gnu packages python-web)
122 #:use-module (gnu packages qt)
123 #:use-module (gnu packages readline)
124 #:use-module (gnu packages sdl)
125 #:use-module (gnu packages search)
126 #:use-module (gnu packages shells)
127 #:use-module (gnu packages ssh)
128 #:use-module (gnu packages terminals)
129 #:use-module (gnu packages tex)
130 #:use-module (gnu packages texinfo)
131 #:use-module (gnu packages time)
132 #:use-module (gnu packages tls)
133 #:use-module (gnu packages version-control)
134 #:use-module (gnu packages video)
135 #:use-module (gnu packages web)
136 #:use-module (gnu packages base)
137 #:use-module (gnu packages xml)
138 #:use-module (gnu packages xorg)
139 #:use-module (gnu packages xdisorg)
140 #:use-module (gnu packages tcl)
141 #:use-module (gnu packages bdw-gc)
f98232a3 142 #:use-module (gnu packages serialization)
44d10b1f
RW
143 #:use-module (guix packages)
144 #:use-module (guix download)
145 #:use-module (guix git-download)
a042d348 146 #:use-module (guix hg-download)
44d10b1f
RW
147 #:use-module (guix utils)
148 #:use-module (guix build-system gnu)
149 #:use-module (guix build-system cmake)
150 #:use-module (guix build-system python)
151 #:use-module (guix build-system trivial)
152 #:use-module (srfi srfi-1)
153 #:use-module (srfi srfi-26))
154
155(define-public python-psutil
156 (package
157 (name "python-psutil")
158 (version "5.4.3")
159 (source
160 (origin
161 (method url-fetch)
162 (uri (pypi-uri "psutil" version))
163 (sha256
164 (base32
165 "063v69x7spyclyaxrd3gmzj3p16q5ayg97xqhwb1kyn22a9pwip2"))))
166 (build-system python-build-system)
167 (arguments
168 ;; FIXME: some tests does not return and times out.
169 '(#:tests? #f))
170 (home-page "https://www.github.com/giampaolo/psutil")
171 (synopsis "Library for retrieving information on running processes")
172 (description
173 "psutil (Python system and process utilities) is a library for retrieving
174information on running processes and system utilization (CPU, memory, disks,
175network) in Python. It is useful mainly for system monitoring, profiling and
176limiting process resources and management of running processes. It implements
177many functionalities offered by command line tools such as: ps, top, lsof,
178netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
179pidof, tty, taskset, pmap.")
180 (properties `((python2-variant . ,(delay python2-psutil))))
181 (license license:bsd-3)))
182
183(define-public python2-psutil
184 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
185 (package
186 (inherit base)
187 (propagated-inputs
188 `(("python2-enum34" ,python2-enum34) ;optional
189 ,@(package-propagated-inputs base))))))
190
191(define-public python-shapely
192 (package
193 (name "python-shapely")
194 (version "1.6.3")
195 (source
196 (origin
197 (method url-fetch)
198 (uri (pypi-uri "Shapely" version))
199 (sha256
200 (base32
201 "0svc58dzcw9gj92b4sgq35sdxkf85z0qwlzxarkzq4bp3h8jy58l"))))
202 (build-system python-build-system)
203 (native-inputs
204 `(("python-cython" ,python-cython)
205 ("python-matplotlib" ,python-matplotlib)
206 ("python-pytest" ,python-pytest)
207 ("python-pytest-cov" ,python-pytest-cov)))
208 (inputs
209 `(("geos" ,geos)))
210 (propagated-inputs
211 `(("python-numpy" ,python-numpy)))
212 (arguments
213 `(#:phases
214 (modify-phases %standard-phases
215 (add-after 'unpack 'patch-geos-path
216 (lambda* (#:key inputs #:allow-other-keys)
217 (let ((geos (assoc-ref inputs "geos"))
218 (glibc (assoc-ref inputs ,(if (%current-target-system)
219 "cross-libc" "libc"))))
220 (substitute* "shapely/geos.py"
221 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
222 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
223 geos "/lib/libgeos_c.so'])"))
224 (("free = load_dll\\('c'\\)\\.free")
225 (string-append "free = load_dll('c', fallbacks=['"
226 glibc "/lib/libc.so.6']).free"))))
227 #t)))))
228 (home-page "https://github.com/Toblerity/Shapely")
229 (synopsis "Library for the manipulation and analysis of geometric objects")
230 (description "Shapely is a Python package for manipulation and analysis of
231planar geometric objects. It is based on the @code{GEOS} library.")
232 (license license:bsd-3)))
233
a91f4eba
S
234(define-public python-shortuuid
235 (package
236 (name "python-shortuuid")
237 (version "0.5.0")
238 (source
239 (origin
240 (method url-fetch)
241 (uri (pypi-uri "shortuuid" version))
242 (sha256
243 (base32
244 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
245 (build-system python-build-system)
246 (native-inputs
247 `(("python-pep8" ,python-pep8)))
248 (home-page "https://github.com/skorokithakis/shortuuid")
249 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
250 (description
251 "@code{shortuuid} is a Python library for generating concise, unambiguous
252and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
253module and then similar looking characters are removed.")
254 (license license:bsd-3)))
255
44d10b1f
RW
256(define-public python-logwrap
257 (package
258 (name "python-logwrap")
259 (version "3.2.1")
260 (source
261 (origin
262 (method url-fetch)
263 (uri (pypi-uri "logwrap" version ".zip"))
264 (sha256
265 (base32
266 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
267 (build-system python-build-system)
268 (propagated-inputs
269 `(("python-six" ,python-six)
270 ("python-typing" ,python-typing)))
271 (native-inputs
272 `(("unzip" ,unzip)
273 ("python-cython" ,python-cython)
274 ("python-pytest" ,python-pytest)
275 ("python-pytest-cov" ,python-pytest-cov)
276 ("python-pytest-runner" ,python-pytest-runner)))
277 (home-page "https://github.com/penguinolog/logwrap")
278 (synopsis "Decorator for logging function arguments")
279 (description "This package provides a decorator to log function arguments
280and function call return values in a human-readable way.")
281 (license license:asl2.0)))
282
283(define-public python2-shapely
284 (package-with-python2 python-shapely))
285
286(define-public python-clyent
287 (package
288 (name "python-clyent")
289 (version "1.2.1")
290 (source
291 (origin
292 (method url-fetch)
293 (uri (pypi-uri "clyent" version))
294 (sha256
295 (base32
296 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
297 (build-system python-build-system)
298 (native-inputs
299 `(("python-mock" ,python-mock)))
300 (home-page "https://github.com/binstar/clyent")
301 (synopsis "Command line client library")
302 (description "Clyent is a Python command line utiliy library. It is used
303by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
304 (license license:bsd-3)))
305
306(define-public python2-clyent
307 (package-with-python2 python-clyent))
308
309(define-public python-babel
310 (package
311 (name "python-babel")
312 (version "2.6.0")
313 (source
314 (origin
315 (method url-fetch)
316 (uri (pypi-uri "Babel" version))
317 (sha256
318 (base32
319 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))
320 (build-system python-build-system)
321 (native-inputs
322 `(("python-freezegun" ,python-freezegun)
323 ("python-pytest" ,python-pytest)))
324 (propagated-inputs
325 `(("python-pytz" ,python-pytz)))
326 (arguments
327 `(#:phases (modify-phases %standard-phases
328 (replace 'check
329 (lambda _ (invoke "pytest" "-vv"))))))
330 (home-page "http://babel.pocoo.org/")
331 (synopsis
332 "Tools for internationalizing Python applications")
333 (description
334 "Babel is composed of two major parts:
335- tools to build and work with gettext message catalogs
336- a Python interface to the CLDR (Common Locale Data Repository), providing
337access to various locale display names, localized number and date formatting,
338etc. ")
339 (license license:bsd-3)))
340
341(define-public python2-babel
342 (package-with-python2 python-babel))
343
344(define-public python2-backport-ssl-match-hostname
345 (package
346 (name "python2-backport-ssl-match-hostname")
347 (version "3.5.0.1")
348 (source
349 (origin
350 (method url-fetch)
2c1f0d09 351 (uri (pypi-uri "backports.ssl_match_hostname" version))
44d10b1f
RW
352 (sha256
353 (base32
354 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
355 (build-system python-build-system)
356 (arguments
357 `(#:python ,python-2
358 #:tests? #f)) ; no test target
359 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
360 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
361 (description
362 "This backport brings the ssl.match_hostname() function to users of
363earlier versions of Python. The function checks the hostname in the
364certificate returned by the server to which a connection has been established,
365and verifies that it matches the intended target hostname.")
366 (license license:psfl)))
367
368(define-public python-hdf4
369 (package
370 (name "python-hdf4")
371 (version "0.9")
372 (source
373 (origin
374 (method url-fetch)
375 (uri (pypi-uri name version))
376 (sha256
377 (base32
378 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
379 (build-system python-build-system)
380 (native-inputs `(("nose" ,python-nose)))
381 (propagated-inputs `(("numpy" ,python-numpy)))
382 (inputs
383 `(("hdf4" ,hdf4)
384 ("libjpeg" ,libjpeg)
385 ("zlib" ,zlib)))
386 (arguments
387 `(#:phases
388 (modify-phases %standard-phases
389 (replace 'check
390 (lambda _
391 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
392 ;; on to import numpy. Somehow this works on their CI system.
393 ;; Let's just manage PYTHONPATH here instead.
394 (substitute* "runexamples.sh"
395 (("export PYTHONPATH=.*") ""))
396 (setenv "PYTHONPATH"
397 (string-append (getcwd) ":"
398 (getenv "PYTHONPATH")))
399 (invoke "./runexamples.sh")
400 (invoke "nosetests" "-v"))))))
401 (home-page "https://github.com/fhs/python-hdf4")
402 (synopsis "Python interface to the NCSA HDF4 library")
403 (description
404 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
405which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
406NetCDF files can also be read and modified. Python-HDF4 is a fork of
407@url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
408 (license license:expat)))
409
410(define-public python2-hdf4
411 (package-with-python2 python-hdf4))
412
413(define-public python-h5py
414 (package
415 (name "python-h5py")
416 (version "2.8.0")
417 (source
418 (origin
419 (method url-fetch)
420 (uri (pypi-uri "h5py" version))
421 (sha256
422 (base32
423 "0mdr6wrq02ac93m1aqx9kad0ppfzmm4imlxqgyy1x4l7hmdcc9p6"))))
424 (build-system python-build-system)
425 (arguments
426 `(#:tests? #f ; no test target
427 #:phases
428 (modify-phases %standard-phases
429 (add-after 'unpack 'fix-hdf5-paths
430 (lambda* (#:key inputs #:allow-other-keys)
431 (let ((prefix (assoc-ref inputs "hdf5")))
432 (substitute* "setup_build.py"
433 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
434 (string-append "['" prefix "/lib" "']"))
435 (("'/opt/local/include', '/usr/local/include'")
436 (string-append "'" prefix "/include" "'")))
437 (substitute* "setup_configure.py"
438 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
439 (string-append "['" prefix "/lib" "']")))
440 #t))))))
441 (propagated-inputs
442 `(("python-six" ,python-six)
443 ("python-numpy" ,python-numpy)))
444 (inputs
445 `(("hdf5" ,hdf5)))
446 (native-inputs
447 `(("python-cython" ,python-cython)
448 ("python-pkgconfig" ,python-pkgconfig)))
449 (home-page "http://www.h5py.org/")
450 (synopsis "Read and write HDF5 files from Python")
451 (description
452 "The h5py package provides both a high- and low-level interface to the
453HDF5 library from Python. The low-level interface is intended to be a
454complete wrapping of the HDF5 API, while the high-level component supports
455access to HDF5 files, datasets and groups using established Python and NumPy
456concepts.")
457 (license license:bsd-3)))
458
459(define-public python2-h5py
460 (package-with-python2 python-h5py))
461
8b89dedc
RW
462(define-public python-sh
463 (package
464 (name "python-sh")
465 (version "1.12.14")
466 (source
467 (origin
468 (method url-fetch)
469 (uri (pypi-uri "sh" version))
470 (sha256
471 (base32
472 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
473 (build-system python-build-system)
fd3638d8
EF
474 (arguments
475 '(#:phases
476 (modify-phases %standard-phases
477 (replace 'check
478 (lambda _
ca983a2f
NG
479 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
480 (setenv "HOME" "/tmp")
fd3638d8
EF
481 (invoke "python" "sh.py" "test"))))))
482 (native-inputs
483 `(("python-coverage" ,python-coverage)))
8b89dedc
RW
484 (home-page "https://github.com/amoffat/sh")
485 (synopsis "Python subprocess replacement")
486 (description "This package provides a replacement for Python's
487@code{subprocess} feature.")
488 (license license:expat)))
489
3869effd
RW
490(define-public python2-sh
491 (package-with-python2 python-sh))
492
d362b11d
RW
493(define-public python-cftime
494 (package
495 (name "python-cftime")
496 (version "1.0.3.4")
497 (source
498 (origin
499 (method url-fetch)
500 (uri (pypi-uri "cftime" version))
501 (sha256
502 (base32
503 "0362dhxbzk593walyjz30dll6y2y79wialik647cbwdsf3ad0x6x"))))
504 (build-system python-build-system)
505 (propagated-inputs
506 `(("python-numpy" ,python-numpy)))
507 (native-inputs
508 `(("python-coveralls" ,python-coveralls)
509 ("python-cython" ,python-cython)
510 ("python-pytest-cov" ,python-pytest-cov)))
511 (home-page "https://github.com/Unidata/cftime")
512 (synopsis "Library for time handling")
513 (description
514 "This package provides time-handling functionality that used to be part
515of the netcdf4 package before.")
516 ;; This package claims to include code under the GPLv3 but is released
517 ;; under ISC.
518 (license (list license:isc license:gpl3+))))
519
44d10b1f
RW
520(define-public python-netcdf4
521 (package
522 (name "python-netcdf4")
93e7b209 523 (version "1.4.2")
44d10b1f
RW
524 (source
525 (origin
526 (method url-fetch)
527 (uri (pypi-uri "netCDF4" version))
528 (sha256
529 (base32
93e7b209 530 "0c0sklgrmv15ygliin8qq0hp7vanmbi74m6zpi0r1ksr0hssyd5r"))))
44d10b1f 531 (build-system python-build-system)
93e7b209
RW
532 (arguments
533 '(#:phases
534 (modify-phases %standard-phases
535 (add-after 'unpack 'configure-locations
536 (lambda* (#:key inputs #:allow-other-keys)
537 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
538 #t)))))
44d10b1f
RW
539 (native-inputs
540 `(("python-cython" ,python-cython)))
541 (propagated-inputs
93e7b209
RW
542 `(("python-numpy" ,python-numpy)
543 ("python-cftime" ,python-cftime)))
44d10b1f
RW
544 (inputs
545 `(("netcdf" ,netcdf)
546 ("hdf4" ,hdf4)
547 ("hdf5" ,hdf5)))
93e7b209 548 (home-page "https://github.com/Unidata/netcdf4-python")
44d10b1f
RW
549 (synopsis "Python/numpy interface to the netCDF library")
550 (description "Netcdf4-python is a Python interface to the netCDF C
551library. netCDF version 4 has many features not found in earlier
552versions of the library and is implemented on top of HDF5. This module
553can read and write files in both the new netCDF 4 and the old netCDF 3
554format, and can create files that are readable by HDF5 clients. The
555API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
556to users of that module.")
557 ;; The software is mainly ISC, but includes some files covered
558 ;; by the Expat license.
559 (license (list license:isc license:expat))))
560
561(define-public python2-netcdf4
562 (package-with-python2 python-netcdf4))
563
564(define-public python-lockfile
565 (package
566 (name "python-lockfile")
567 (version "0.12.2")
568 (source
569 (origin
570 (method url-fetch)
8318bf07 571 (uri (pypi-uri "lockfile" version))
44d10b1f
RW
572 (sha256
573 (base32
574 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
575 (build-system python-build-system)
576 (arguments '(#:test-target "check"))
577 (native-inputs
578 `(("python-pbr" ,python-pbr)))
579 (home-page "https://launchpad.net/pylockfile")
580 (synopsis "Platform-independent file locking module")
581 (description
582 "The lockfile package exports a LockFile class which provides a simple
583API for locking files.")
584 (license license:expat)))
585
586(define-public python2-lockfile
587 (package-with-python2 python-lockfile))
588
589(define-public python-semantic-version
590 (package
591 (name "python-semantic-version")
592 (version "2.6.0")
593 (source
594 (origin
595 (method url-fetch)
596 (uri (pypi-uri "semantic_version" version))
597 (sha256
598 (base32
599 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
600 (build-system python-build-system)
601 (arguments
602 `(#:tests? #f)) ; PyPI tarball lacks tests
603 (home-page "https://github.com/rbarrois/python-semanticversion")
604 (synopsis "Semantic versioning module for Python")
605 (description
606 "The @code{semantic_version} class is a small library for handling
607@uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
608
609It can compare versions, generate a new version that represents a bump in one of
610the version levels, and check whether any given string is a proper semantic
611version identifier.")
612 (license license:bsd-3)))
613
614(define-public python2-semantic-version
615 (package-with-python2 python-semantic-version))
616
617(define-public python-serpent
618 (package
619 (name "python-serpent")
fa9d14ac 620 (version "1.28")
44d10b1f
RW
621 (source
622 (origin
623 (method url-fetch)
624 (uri (pypi-uri "serpent" version))
625 (sha256
fa9d14ac 626 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
44d10b1f 627 (build-system python-build-system)
fa9d14ac
TGR
628 (native-inputs
629 `(("python-attrs" ,python-attrs)
630 ("python-pytz" ,python-pytz)))
44d10b1f
RW
631 (home-page "https://github.com/irmen/Serpent")
632 (synopsis "Serializer for literal Python expressions")
633 (description
1d3c7803
TGR
634 "Serpent provides @code{ast.literal_eval()}-compatible object tree
635serialization. It serializes an object tree into bytes (an utf-8 encoded
636string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
637to rebuild the original object tree.
638
639Because only safe literals are encoded, it is safe to send serpent data to
640other machines, such as over the network.")
44d10b1f
RW
641 (license license:expat)))
642
643(define-public python-setuptools
644 (package
645 (name "python-setuptools")
646 (version "40.0.0")
647 (source
648 (origin
649 (method url-fetch)
650 (uri (pypi-uri "setuptools" version ".zip"))
651 (sha256
652 (base32
653 "0pq116lr14gnc62v76nk0npkm6krb2mpp7p9ab369zgv4n7dnah1"))
654 (modules '((guix build utils)))
655 (snippet
656 '(begin
657 ;; Remove included binaries which are used to build self-extracting
658 ;; installers for Windows.
659 ;; TODO: Find some way to build them ourself so we can include them.
660 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
661 #t))))
662 (build-system python-build-system)
663 ;; FIXME: Tests require pytest, which itself relies on setuptools.
664 ;; One could bootstrap with an internal untested setuptools.
665 (arguments
666 `(#:tests? #f))
667 (home-page "https://pypi.python.org/pypi/setuptools")
668 (synopsis
669 "Library designed to facilitate packaging Python projects")
670 (description
671 "Setuptools is a fully-featured, stable library designed to facilitate
672packaging Python projects, where packaging includes:
673Python package and module definitions,
674distribution package metadata,
675test hooks,
676project installation,
677platform-specific details,
678Python 3 support.")
679 ;; TODO: setuptools now bundles the following libraries:
680 ;; packaging, pyparsing, six and appdirs. How to unbundle?
681 (license (list license:psfl ; setuptools itself
682 license:expat ; six, appdirs, pyparsing
683 license:asl2.0 ; packaging is dual ASL2/BSD-2
684 license:bsd-2))))
685
686(define-public python2-setuptools
687 (package-with-python2 python-setuptools))
688
689(define-public python-uniseg
690 (package
691 (name "python-uniseg")
692 (version "0.7.1")
693 (source
694 (origin
695 (method url-fetch)
696 (uri (pypi-uri "uniseg" version ".zip"))
697 (sha256
698 (base32
699 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
700 (build-system python-build-system)
701 (arguments
702 '(#:tests? #f)) ; The test suite requires network access.
703 (native-inputs
704 `(("unzip" ,unzip)))
705 (home-page
706 "https://bitbucket.org/emptypage/uniseg-python")
707 (synopsis
708 "Python library to determine Unicode text segmentations")
709 (description
710 "Uniseg is a Python package used to determine Unicode text segmentations.
711Supported segmentations include:
712@enumerate
713@item @dfn{Code point} (any value in the Unicode codespace)
714@item @dfn{Grapheme cluster} (user-perceived character made of a single or
715multiple Unicode code points, e.g. \"G\" + acute-accent)
716@item Word break
717@item Sentence break
718@item Line break
719@end enumerate")
720 (license license:expat)))
721
722(define-public python2-uniseg
723 (package-with-python2 python-uniseg))
724
725(define-public python-humanfriendly
726 (package
727 (name "python-humanfriendly")
728 (version "4.4.1")
729 (source
730 (origin
731 (method url-fetch)
732 (uri (pypi-uri "humanfriendly" version))
733 (sha256
734 (base32
735 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
736 (build-system python-build-system)
737 (arguments
738 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
739 #:tests? #f))
740 (propagated-inputs
741 `(("python-monotonic" ,python-monotonic)))
742 (home-page "https://humanfriendly.readthedocs.io")
743 (synopsis "Human-friendly input and output in Python")
744 (description
745 "The functions and classes in @code{humanfriendly} can be used to make
746text interfaces more user-friendly. It includes tools to parse and format
747numbers, file sizes, and timespans, timers for long-running operations, menus
748to allow the user to choose from a list of options, and terminal interaction
749helpers.")
750 (license license:expat)))
751
752(define-public python2-humanfriendly
753 (package-with-python2 python-humanfriendly))
754
755(define-public python-capturer
756 (package
757 (name "python-capturer")
758 (version "2.4")
759 (source
760 (origin
761 (method url-fetch)
762 (uri (pypi-uri "capturer" version))
763 (sha256
764 (base32
765 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
766 (build-system python-build-system)
767 (arguments
768 `(#:tests? #f))
769 (propagated-inputs
770 `(("python-humanfriendly" ,python-humanfriendly)))
771 (home-page "https://capturer.readthedocs.io")
772 (synopsis "Capture stdout and stderr streams of the current process")
773 (description
774 "The capturer package makes it easy to capture the stdout and stderr
775streams of the current process and subprocesses. Output can be relayed
776to the terminal in real time but is also available to the Python program
777for additional processing.")
778 (license license:expat)))
779
780(define-public python2-capturer
781 (package-with-python2 python-capturer))
782
783(define-public python-case
784 (package
785 (name "python-case")
786 (version "1.5.3")
787 (source
788 (origin
789 (method url-fetch)
790 (uri (pypi-uri "case" version))
791 (sha256
792 (base32
793 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
794 (build-system python-build-system)
795 (propagated-inputs
796 `(("python-mock" ,python-mock)
797 ("python-nose" ,python-nose)
798 ("python-six" ,python-six)
799 ("python-unittest2" ,python-unittest2)))
800 (native-inputs
801 `(("python-coverage" ,python-coverage)))
802 (home-page "https://github.com/celery/case")
803 (synopsis "Unittest utilities and convenience methods")
804 (description
805 "The @code{case} package provides utilities on top of unittest, including
806some helpful Python 2 compatibility convenience methods.")
807 (license license:bsd-3)))
808
809(define-public python-verboselogs
810 (package
811 (name "python-verboselogs")
812 (version "1.7")
813 (source
814 (origin
815 (method url-fetch)
816 (uri (pypi-uri "verboselogs" version))
817 (sha256
818 (base32
819 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
820 (build-system python-build-system)
821 (native-inputs
822 `(("python-mock" ,python-mock)
823 ("python-astroid" ,python-astroid)
824 ("python-pylint" ,python-pylint)))
825 (home-page "https://verboselogs.readthedocs.io")
826 (synopsis "Verbose logging level for Python's logging module")
827 (description
828 "The @code{verboselogs} package extends Python's @code{logging} module to
829add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
830 (license license:expat)))
831
832(define-public python2-verboselogs
833 (package-with-python2 python-verboselogs))
834
835(define-public python-coloredlogs
836 (package
837 (name "python-coloredlogs")
838 (version "7.3")
839 (source
840 (origin
841 (method url-fetch)
842 (uri (pypi-uri "coloredlogs" version))
843 (sha256
844 (base32
845 "1blcann6dyg5dhps9pg12rn0q0rjrlajpmmil0gy0j4cbvnl2il9"))))
846 (build-system python-build-system)
847 (arguments
848 `(;Tests require some updated modules
849 #:tests? #f))
850 (propagated-inputs
851 `(("python-capturer" ,python-capturer)))
852 (home-page "https://coloredlogs.readthedocs.io")
853 (synopsis "Colored stream handler for Python's logging module")
854 (description
855 "The @code{coloredlogs} package enables colored terminal output for
856Python's logging module. The @code{ColoredFormatter} class inherits from
857@code{logging.Formatter} and uses ANSI escape sequences to render your logging
858messages in color.")
859 (license license:expat)))
860
861(define-public python2-coloredlogs
862 (package-with-python2 python-coloredlogs))
863
4caf37b0
MC
864(define-public python-et-xmlfile
865 (package
866 (name "python-et-xmlfile")
867 (version "1.0.1")
868 (source
869 (origin
870 (method url-fetch)
871 (uri (pypi-uri "et_xmlfile" version))
872 (sha256
873 (base32
874 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
875 (build-system python-build-system)
876 (arguments
877 `(#:phases (modify-phases %standard-phases
878 (replace 'check
879 (lambda _
880 (invoke "pytest"))))))
881 (native-inputs
882 `(("python-pytest" ,python-pytest)
883 ("python-lxml" ,python-lxml))) ;used for the tests
884 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
885 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
886 (description "This Python library is based upon the @code{xmlfile} module
887from @code{lxml}. It aims to provide a low memory, compatible implementation
888of @code{xmlfile}.")
889 (license license:expat)))
890
891(define-public python2-et-xmlfile
892 (package-with-python2 python-et-xmlfile))
893
a042d348
MC
894(define-public python-openpyxl
895 (package
896 (name "python-openpyxl")
441e6d93 897 (version "2.6.2")
a042d348
MC
898 (source
899 (origin
900 ;; We use the upstream repository, as the tests are not included in the
901 ;; PyPI releases.
902 (method hg-fetch)
903 (uri (hg-reference
904 (url "https://bitbucket.org/openpyxl/openpyxl")
905 (changeset version)))
906 (file-name (string-append name "-" version "-checkout"))
907 (sha256
441e6d93 908 (base32 "1qhij6kcvdxqjy4g6193nsv4q7fy8n4fwyd3c2z047idlm6s3j4w"))))
a042d348
MC
909 (build-system python-build-system)
910 (arguments
911 `(#:phases (modify-phases %standard-phases
912 (replace 'check
913 (lambda _
914 (invoke "pytest"))))))
915 (native-inputs
916 ;; For the test suite.
917 `(("python-lxml" ,python-lxml)
918 ("python-pillow" ,python-pillow)
919 ("python-pytest" ,python-pytest)))
920 (propagated-inputs
921 `(("python-et-xmlfile" ,python-et-xmlfile)
922 ("python-jdcal" ,python-jdcal)))
923 (home-page "https://openpyxl.readthedocs.io")
924 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
925 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
926XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
927standard.")
928 (license license:expat)))
929
44d10b1f
RW
930(define-public python-eventlet
931 (package
932 (name "python-eventlet")
933 (version "0.20.1")
934 (source
935 (origin
936 (method url-fetch)
937 (uri (pypi-uri "eventlet" version))
938 (sha256
939 (base32
940 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
941 (build-system python-build-system)
942 (propagated-inputs
943 `(("python-greenlet" ,python-greenlet)))
944 (arguments
945 ;; TODO: Requires unpackaged 'enum-compat'.
946 '(#:tests? #f))
947 (home-page "http://eventlet.net")
948 (synopsis "Concurrent networking library for Python")
949 (description
950 "Eventlet is a concurrent networking library for Python that
951allows you to change how you run your code, not how you write it.
952It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
953Coroutines ensure that the developer uses a blocking style of programming
954that is similar to threading, but provide the benefits of non-blocking I/O.
955The event dispatch is implicit, which means you can easily use @code{Eventlet}
956from the Python interpreter, or as a small part of a larger application.")
957 (license license:expat)))
958
959(define-public python2-eventlet
960 (let ((base (package-with-python2
961 (strip-python2-variant python-eventlet))))
962 (package (inherit base)
963 (propagated-inputs
964 `(("python2-enum34" ,python2-enum34)
965 ,@(package-propagated-inputs base))))))
966
967(define-public python-six
968 (package
969 (name "python-six")
970 (version "1.11.0")
971 (source
972 (origin
973 (method url-fetch)
974 (uri (pypi-uri "six" version))
975 (sha256
976 (base32
977 "1scqzwc51c875z23phj48gircqjgnn3af8zy2izjwmnlxrxsgs3h"))))
978 (build-system python-build-system)
979 (arguments
980 `(#:phases
981 (modify-phases %standard-phases
982 (replace 'check
983 (lambda _
984 (invoke "py.test" "-v"))))))
985 (native-inputs
986 `(("python-py" ,python-py)
987 ("python-pytest" ,python-pytest-bootstrap)))
988 (home-page "https://pypi.python.org/pypi/six/")
989 (synopsis "Python 2 and 3 compatibility utilities")
990 (description
991 "Six is a Python 2 and 3 compatibility library. It provides utility
992functions for smoothing over the differences between the Python versions with
993the goal of writing Python code that is compatible on both Python versions.
994Six supports every Python version since 2.5. It is contained in only one
995Python file, so it can be easily copied into your project.")
996 (license license:x11)))
997
998(define-public python2-six
999 (package-with-python2 python-six))
1000
1001(define-public python-six-bootstrap
1002 (package
1003 (inherit python-six)
1004 (name "python-six-bootstrap")
1005 (native-inputs `())
1006 (arguments `(#:tests? #f))))
1007
1008(define-public python2-six-bootstrap
1009 (package-with-python2 python-six-bootstrap))
1010
1011(define-public python-schedule
1012 (package
1013 (name "python-schedule")
1014 (version "0.4.3")
1015 (source
1016 (origin
1017 (method url-fetch)
1018 (uri (pypi-uri "schedule" version))
1019 (sha256
1020 (base32
1021 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1022 (build-system python-build-system)
1023 (native-inputs
1024 `(("python-pytest" ,python-pytest)
1025 ("python-mock" ,python-mock)))
1026 (home-page "https://github.com/dbader/schedule")
1027 (synopsis "Schedule periodic function calls in Python")
1028 (description
1029 "Schedule is an in-process scheduler for periodic jobs that uses the
1030builder pattern for configuration. Schedule lets you run Python functions (or
1031any other callable) periodically at pre-determined intervals using a simple,
1032human-friendly syntax.")
1033 (license license:expat)))
1034
1035(define-public python2-schedule
1036 (package-with-python2 python-schedule))
1037
1038(define-public python-pandas
1039 (package
1040 (name "python-pandas")
c0d43f62 1041 (version "0.24.2")
44d10b1f
RW
1042 (source
1043 (origin
1044 (method url-fetch)
1045 (uri (pypi-uri "pandas" version))
1046 (sha256
c0d43f62 1047 (base32 "18imlm8xbhcbwy4wa957a1fkamrcb0z988z006jpfda3ki09z4ag"))))
44d10b1f
RW
1048 (build-system python-build-system)
1049 (arguments
1050 `(#:modules ((guix build utils)
1051 (guix build python-build-system)
1052 (ice-9 ftw)
1053 (srfi srfi-26))
1054 #:phases (modify-phases %standard-phases
c0d43f62
MC
1055 (add-after 'unpack 'patch-which
1056 (lambda* (#:key inputs #:allow-other-keys)
1057 (let ((which (assoc-ref inputs "which")))
1058 (substitute* "pandas/io/clipboard/__init__.py"
1059 (("^CHECK_CMD = .*")
1060 (string-append "CHECK_CMD = \"" which "\"\n"))))
1061 #t))
44d10b1f
RW
1062 (replace 'check
1063 (lambda _
1064 (let ((build-directory
1065 (string-append
1066 (getcwd) "/build/"
1067 (car (scandir "build"
1068 (cut string-prefix? "lib." <>))))))
1069 ;; Disable the "strict data files" option which causes
c0d43f62
MC
1070 ;; the build to error out if required data files are
1071 ;; not available (as is the case with PyPI archives).
44d10b1f
RW
1072 (substitute* "setup.cfg"
1073 (("addopts = --strict-data-files") "addopts = "))
1074 (with-directory-excursion build-directory
c0d43f62
MC
1075 ;; Delete tests that require "moto" which is not yet
1076 ;; in Guix.
44d10b1f
RW
1077 (for-each delete-file
1078 '("pandas/tests/io/conftest.py"
1079 "pandas/tests/io/json/test_compression.py"
1080 "pandas/tests/io/parser/test_network.py"
44d10b1f
RW
1081 "pandas/tests/io/test_parquet.py"))
1082 (invoke "pytest" "-vv" "pandas" "--skip-slow"
1083 "--skip-network" "-k"
1084 ;; XXX: Due to the deleted tests above.
1085 "not test_read_s3_jsonl"))))))))
1086 (propagated-inputs
1087 `(("python-numpy" ,python-numpy)
667c6ef5 1088 ("python-openpyxl" ,python-openpyxl)
44d10b1f 1089 ("python-pytz" ,python-pytz)
667c6ef5
MC
1090 ("python-dateutil" ,python-dateutil)
1091 ("python-xlrd" ,python-xlrd)))
c0d43f62
MC
1092 (inputs
1093 `(("which" ,which)))
44d10b1f
RW
1094 (native-inputs
1095 `(("python-cython" ,python-cython)
1096 ("python-beautifulsoup4" ,python-beautifulsoup4)
1097 ("python-lxml" ,python-lxml)
1098 ("python-html5lib" ,python-html5lib)
1099 ("python-nose" ,python-nose)
c0d43f62
MC
1100 ("python-pytest" ,python-pytest)
1101 ("python-pytest-mock" ,python-pytest-mock)))
44d10b1f
RW
1102 (home-page "https://pandas.pydata.org")
1103 (synopsis "Data structures for data analysis, time series, and statistics")
1104 (description
1105 "Pandas is a Python package providing fast, flexible, and expressive data
1106structures designed to make working with structured (tabular,
1107multidimensional, potentially heterogeneous) and time series data both easy
1108and intuitive. It aims to be the fundamental high-level building block for
1109doing practical, real world data analysis in Python.")
1110 (license license:bsd-3)))
1111
1112(define-public python2-pandas
1113 (package-with-python2 python-pandas))
1114
1115(define-public python2-mechanize
1116 (package
1117 (name "python2-mechanize")
1118 (version "0.2.5")
1119 (source
1120 (origin
1121 (method url-fetch)
1cc184e6 1122 (uri (pypi-uri "mechanize" version))
44d10b1f
RW
1123 (sha256
1124 (base32
1125 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1126 (build-system python-build-system)
1127 (arguments
1128 `(#:python ,python-2 ; apparently incompatible with Python 3
1129 #:tests? #f))
1130 ;; test fails with message
1131 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1132 ;; (python-3.3.2) or
1133 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1134 ;; (python-2.7.5).
1135 ;; The source code is from March 2011 and probably not up-to-date
1136 ;; with respect to python unit tests.
1137 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1138 (synopsis
1139 "Stateful programmatic web browsing in Python")
1140 (description
1141 "Mechanize implements stateful programmatic web browsing in Python,
1142after Andy Lester’s Perl module WWW::Mechanize.")
1143 (license (license:non-copyleft
1144 "file://COPYING"
1145 "See COPYING in the distribution."))))
1146
1147
1148(define-public python-simplejson
1149 (package
1150 (name "python-simplejson")
1151 (version "3.14.0")
1152 (source
1153 (origin
1154 (method url-fetch)
1155 (uri (pypi-uri "simplejson" version))
1156 (sha256
1157 (base32
1158 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1159 (build-system python-build-system)
1160 (home-page "http://simplejson.readthedocs.org/en/latest/")
1161 (synopsis
1162 "Json library for Python")
1163 (description
1164 "JSON (JavaScript Object Notation) is a subset of JavaScript
1165syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1166format.
1167
1168Simplejson exposes an API familiar to users of the standard library marshal
1169and pickle modules. It is the externally maintained version of the json
1170library contained in Python 2.6, but maintains compatibility with Python 2.5
1171and (currently) has significant performance advantages, even without using
1172the optional C extension for speedups. Simplejson is also supported on
1173Python 3.3+.")
1174 (license license:x11)))
1175
1176(define-public python2-simplejson
1177 (package-with-python2 python-simplejson))
1178
1179
1180(define-public python-pyicu
1181 (package
1182 (name "python-pyicu")
1183 (version "2.2")
1184 (source
1185 (origin
1186 (method url-fetch)
1187 (uri (pypi-uri "PyICU" version))
1188 (sha256
1189 (base32
1190 "0wq9y5fi1ighgf5aws9nr87vi1w44p7q1k83rx2y3qj5d2xyhspa"))))
1191 (build-system python-build-system)
1192 (inputs
1193 `(("icu4c" ,icu4c)))
1194 (native-inputs
1195 `(("python-pytest" ,python-pytest)
1196 ("python-six" ,python-six)))
1197 (home-page "https://github.com/ovalhub/pyicu")
1198 (synopsis "Python extension wrapping the ICU C++ API")
1199 (description
1200 "PyICU is a python extension wrapping the ICU C++ API.")
1201 (properties `((python2-variant . ,(delay python2-pyicu))))
1202 (license license:x11)))
1203
1204(define-public python2-pyicu
1205 (let ((base (package-with-python2
1206 (strip-python2-variant python-pyicu))))
1207 (package
1208 (inherit base)
1209 (arguments
1210 `(,@(package-arguments base)
1211 #:phases
1212 (modify-phases %standard-phases
1213 (add-before 'check 'delete-failing-test
1214 (λ _
1215 ;; XXX: This fails due to Unicode issues unique to Python 2,
1216 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1217 (delete-file "test/test_Script.py")
1218 #t))))))))
1219
1220(define-public python2-dogtail
1221 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1222 ;; spaces in indentation" with Python 3.
1223 (package
1224 (name "python2-dogtail")
1225 (version "0.9.9")
1226 (source (origin
1227 (method url-fetch)
1228 (uri (pypi-uri "dogtail" version))
1229 (sha256
1230 (base32
1231 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1232 (build-system python-build-system)
1233 (arguments `(#:python ,python-2
1234 #:tests? #f)) ; invalid command "test"
1235 ;; Currently no offical homepage.
1236 (home-page "https://pypi.python.org/pypi/dogtail/")
1237 (synopsis "GUI test tool and automation framework written in Python")
1238 (description
1239 "Dogtail is a GUI test tool and automation framework written in Python.
1240It uses Accessibility (a11y) technologies to communicate with desktop
1241applications. dogtail scripts are written in Python and executed like any
1242other Python program.")
1243 (license license:gpl2+)))
1244
1245(define-public python-empy
1246 (package
1247 (name "python-empy")
0f6d5115 1248 (version "3.3.3")
44d10b1f
RW
1249 (source (origin
1250 (method url-fetch)
1251 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1252 version ".tar.gz"))
1253 (sha256
1254 (base32
0f6d5115 1255 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
44d10b1f
RW
1256 (build-system python-build-system)
1257 (arguments
0f6d5115 1258 `(#:tests? #f)) ; python2 only
44d10b1f
RW
1259 (home-page "http://www.alcyone.com/software/empy/")
1260 (synopsis "Templating system for Python")
1261 (description
1262 "EmPy is a system for embedding Python expressions and statements in
1263template text; it takes an EmPy source file, processes it, and produces
1264output. This is accomplished via expansions, which are special signals to the
1265EmPy system and are set off by a special prefix (by default the at sign, @@).
1266EmPy can expand arbitrary Python expressions and statements in this way, as
1267well as a variety of special forms. Textual data not explicitly delimited in
1268this way is sent unaffected to the output, allowing Python to be used in
1269effect as a markup language. Also supported are callbacks via hooks,
1270recording and playback via diversions, and dynamic, chainable filters. The
1271system is highly configurable via command line options and embedded
1272commands.")
1273 (license license:lgpl2.1+)))
1274
1275(define-public python2-empy
0f064242
TGR
1276 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
1277 (package
1278 (inherit base)
1279 (arguments `(,@(package-arguments base)
1280 #:tests? #t)))))
44d10b1f
RW
1281
1282(define-public python2-element-tree
1283 (package
1284 (name "python2-element-tree")
1285 (version "1.2.6")
1286 (source (origin
1287 (method url-fetch)
1288 (uri (string-append
1289 "http://effbot.org/media/downloads/elementtree-"
1290 version "-20050316.tar.gz"))
1291 (sha256
1292 (base32
1293 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1294 (build-system python-build-system)
1295 (arguments
1296 `(#:python ,python-2 ; seems to be part of Python 3
1297 #:tests? #f)) ; no 'test' sub-command
1298 (synopsis "Toolkit for XML processing in Python")
1299 (description
1300 "ElementTree is a Python library supporting lightweight XML processing.")
1301 (home-page "http://effbot.org/zone/element-index.htm")
1302 (license (license:x11-style
1303 "http://docs.python.org/2/license.html"
1304 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1305
1306(define-public python2-pybugz
1307 (package
1308 (name "python2-pybugz")
1309 (version "0.6.11")
1310 (source (origin
1311 (method url-fetch)
1312 (uri (string-append
1313 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1314 version ".tar.gz"))
1315 (sha256
1316 (base32
1317 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1318 (patches (search-patches "pybugz-stty.patch"
1319 "pybugz-encode-error.patch"))))
1320 (build-system python-build-system)
1321 (arguments
1322 `(#:python ,python-2 ; SyntaxError with Python 3
1323 #:tests? #f)) ; no 'test' sub-command
1324 (propagated-inputs
1325 `(("element-tree" ,python2-element-tree)))
1326 (synopsis "Python and command-line interface to Bugzilla")
1327 (description
1328 "PyBugz is a Python library and command-line tool to query the Bugzilla
1329bug tracking system. It is meant as an aid to speed up interaction with the
1330bug tracker.")
1331 (home-page "http://www.liquidx.net/pybugz/")
1332 (license license:gpl2)))
1333
1334(define-public python2-enum
1335 (package
1336 (name "python2-enum")
1337 (version "0.4.6")
1338 (source (origin
1339 (method url-fetch)
1340 (uri (pypi-uri "enum" version))
1341 (sha256
1342 (base32
1343 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1344 (build-system python-build-system)
1345 (arguments
1346 `(#:python ,python-2))
1347 (home-page "http://pypi.python.org/pypi/enum/")
1348 (synopsis "Robust enumerated type support in Python")
1349 (description
1350 "This provides a module for robust enumerations in Python. It has
1351been superseded by the Python standard library and is provided only for
1352compatibility.")
1353 ;; Choice of either license.
1354 (license (list license:gpl3+ license:psfl))))
1355
1356(define-public python-enum34
1357 (package
1358 (name "python-enum34")
1359 (version "1.1.6")
1360 (source
1361 (origin
1362 (method url-fetch)
1363 (uri (pypi-uri "enum34" version))
1364 (sha256
1365 (base32
1366 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1367 (build-system python-build-system)
1368 (home-page "https://pypi.python.org/pypi/enum34")
1369 (synopsis "Backported Python 3.4 Enum")
1370 (description
1371 "Enum34 is the new Python stdlib enum module available in Python 3.4
1372backported for previous versions of Python from 2.4 to 3.3.")
1373 (license license:bsd-3)))
1374
1375(define-public python2-enum34
1376 (package-with-python2 python-enum34))
1377
1378(define-public python-parse-type
1379 (package
1380 (name "python-parse-type")
1381 (version "0.4.2")
1382 (source
1383 (origin
1384 (method url-fetch)
1385 (uri (pypi-uri "parse_type" version))
1386 (sha256
1387 (base32
1388 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1389 (build-system python-build-system)
1390 (propagated-inputs
1391 `(("python-six" ,python-six)
1392 ("python-parse" ,python-parse)))
1393 (native-inputs
1394 `(("python-pytest" ,python-pytest)
1395 ("python-pytest-runner" ,python-pytest-runner)))
1396 (home-page "https://github.com/jenisys/parse_type")
1397 (synopsis "Extended parse module")
1398 (description
1399 "Parse_type extends the python parse module.")
1400 (properties
1401 `((python2-variant . ,(delay python2-parse-type))))
1402 (license license:bsd-3)))
1403
1404(define-public python2-parse-type
1405 (let ((base (package-with-python2
1406 (strip-python2-variant python-parse-type))))
1407 (package (inherit base)
1408 (propagated-inputs
1409 `(("python2-enum34" ,python2-enum34)
1410 ,@(package-propagated-inputs base))))))
1411
1412(define-public python-parse
1413 (package
1414 (name "python-parse")
1415 (version "1.8.4")
1416 (source
1417 (origin
1418 (method url-fetch)
1419 (uri (pypi-uri "parse" version))
1420 (sha256
1421 (base32
1422 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
1423 (build-system python-build-system)
1424 (arguments
1425 `(#:phases
1426 (modify-phases %standard-phases
1427 (replace 'check
1428 (lambda _ (invoke "python" "test_parse.py"))))))
1429 (home-page "https://github.com/r1chardj0n3s/parse")
1430 (synopsis "Parse strings")
1431 (description
1432 "Parse strings using a specification based on the Python @code{format()}
1433syntax.")
1434 (license license:x11)))
1435
1436(define-public python-polib
1437 (package
1438 (name "python-polib")
1439 (version "1.0.8")
1440 (source (origin
1441 (method url-fetch)
1442 (uri (pypi-uri "polib" version))
1443 (sha256
1444 (base32
1445 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1446 (build-system python-build-system)
1447 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1448 (synopsis "Manipulate, create and modify gettext files")
1449 (description "Polib can manipulate any gettext format (po, pot and mo)
1450files. It can be used to create po files from scratch or to modify
1451existing ones.")
1452 (license license:expat)))
1453
1454(define-public python2-polib
1455 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1456 (package
1457 (inherit base)
1458 (arguments `(,@(package-arguments base)
1459 ;; Tests don't work with python2.
1460 #:tests? #f)))))
1461
1462(define-public scons
1463 (package
1464 (name "scons")
05487ed8 1465 (version "3.0.4")
44d10b1f 1466 (source (origin
ad34338d
RW
1467 (method git-fetch)
1468 (uri (git-reference
1469 (url "https://github.com/SCons/scons.git")
1470 (commit version)))
1471 (file-name (git-file-name name version))
44d10b1f
RW
1472 (sha256
1473 (base32
05487ed8 1474 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
44d10b1f
RW
1475 (build-system python-build-system)
1476 (arguments
1477 `(#:use-setuptools? #f ; still relies on distutils
ad34338d
RW
1478 #:tests? #f ; no 'python setup.py test' command
1479 #:phases
1480 (modify-phases %standard-phases
1481 (add-before 'build 'bootstrap
1482 (lambda _
1483 (substitute* "src/engine/SCons/compat/__init__.py"
1484 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
1485 "sys.modules[new] = __import__(old)"))
05487ed8
RW
1486 (substitute* "src/engine/SCons/Platform/__init__.py"
1487 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
1488 "mod = __import__(full_name)"))
ad34338d
RW
1489 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
1490 (chdir "build/scons")
1491 #t)))))
44d10b1f
RW
1492 (home-page "http://scons.org/")
1493 (synopsis "Software construction tool written in Python")
1494 (description
1495 "SCons is a software construction tool. Think of SCons as an improved,
1496cross-platform substitute for the classic Make utility with integrated
1497functionality similar to autoconf/automake and compiler caches such as ccache.
1498In short, SCons is an easier, more reliable and faster way to build
1499software.")
1500 (license license:x11)))
1501
1502(define-public scons-python2
1503 (package
1504 (inherit (package-with-python2 scons))
1505 (name "scons-python2")))
1506
1507(define-public python-extras
1508 (package
1509 (name "python-extras")
1510 (version "1.0.0")
1511 (source
1512 (origin
1513 (method url-fetch)
1514 (uri (pypi-uri "extras" version))
1515 (sha256
1516 (base32
1517 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1518 (build-system python-build-system)
1519 (arguments
1520 ;; FIXME: Circular dependency on testtools.
1521 '(#:tests? #f))
1522 (home-page "https://github.com/testing-cabal/extras")
1523 (synopsis "Useful extensions to the Python standard library")
1524 (description
1525 "Extras is a set of extensions to the Python standard library.")
1526 (license license:expat)))
1527
1528(define-public python2-extras
1529 (package-with-python2 python-extras))
1530
1531(define-public python-mimeparse
1532 (package
1533 (name "python-mimeparse")
1534 (version "1.6.0")
1535 (source
1536 (origin
1537 (method url-fetch)
89bf667c 1538 (uri (pypi-uri "python-mimeparse" version))
44d10b1f
RW
1539 (sha256
1540 (base32
1541 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
1542 (build-system python-build-system)
1543 (arguments
1544 '(#:phases
1545 (modify-phases %standard-phases
1546 (replace 'check
1547 (lambda _
1548 (invoke "./mimeparse_test.py"))))))
1549 (home-page
1550 "https://github.com/dbtsai/python-mimeparse")
1551 (synopsis "Python library for parsing MIME types")
1552 (description
1553 "Mimeparse provides basic functions for parsing MIME type names and
1554matching them against a list of media-ranges.")
1555 (license license:expat)))
1556
1557(define-public python2-mimeparse
1558 (package-with-python2 python-mimeparse))
1559
1560(define-public python-miniboa
1561 (package
1562 (name "python-miniboa")
1563 (version "1.0.7")
1564 (source
1565 (origin
1566 (method url-fetch)
1567 (uri (pypi-uri "miniboa" version))
1568 (sha256
1569 (base32
1570 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
1571 (build-system python-build-system)
1572 (home-page "https://github.com/shmup/miniboa")
1573 (synopsis "Simple, single-threaded Telnet server")
1574 (description
1575 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
1576server.")
1577 (license license:asl2.0)))
1578
1579(define-public python2-miniboa
1580 (package-with-python2 python-miniboa))
1581
1582(define-public python-pafy
1583 (package
1584 (name "python-pafy")
1585 (version "0.5.3.1")
1586 (source
1587 (origin
1588 (method url-fetch)
1589 (uri (pypi-uri "pafy" version))
1590 (sha256
1591 (base32
1592 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1593 (build-system python-build-system)
1594 (arguments
1595 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1596 (propagated-inputs
1597 ;; Youtube-dl is a python package which is imported in the file
1598 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1599 `(("youtube-dl" ,youtube-dl)))
1600 (home-page "https://np1.github.io/pafy/")
1601 (synopsis "Retrieve YouTube content and metadata")
1602 (description
1603 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1604 (license license:lgpl3+)))
1605
1606(define-public python2-funcsigs
1607 (package
1608 (name "python2-funcsigs")
1609 (version "1.0.2")
1610 (source (origin
1611 (method url-fetch)
1612 (uri (pypi-uri "funcsigs" version))
1613 (sha256
1614 (base32
1615 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1616 (build-system python-build-system)
1617 (arguments
1618 `(#:python ,python-2))
1619 (native-inputs
1620 `(("python2-unittest2" ,python2-unittest2)))
1621 (home-page "http://funcsigs.readthedocs.org")
1622 (synopsis "Python function signatures from PEP362")
1623 (description
1624 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1625 (license license:asl2.0)))
1626
1627(define-public python2-funcsigs-bootstrap
1628 (package
1629 (inherit python2-funcsigs)
1630 (name "python2-funcsigs-bootstrap")
1631 (native-inputs `())
1632 (arguments
1633 `(#:tests? #f
1634 ,@(package-arguments python2-funcsigs)))))
1635
1636(define-public python-py
1637 (package
1638 (name "python-py")
1639 (version "1.5.4")
1640 (source
1641 (origin
1642 (method url-fetch)
1643 (uri (pypi-uri "py" version))
1644 (sha256
1645 (base32
1646 "1xxvwfn82457djf55f5n2c94699rfqnk43br8fif2r2q8gvrmm9z"))))
1647 (build-system python-build-system)
1648 (arguments
1649 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1650 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1651 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1652 ;; Is this module globally installed?"
1653 '(#:tests? #f))
1654 (native-inputs
1655 `(("python-setuptools-scm" ,python-setuptools-scm)))
1656 (home-page "https://github.com/pytest-dev/py")
1657 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1658 (description
1659 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1660code introspection, and logging.")
1661 (license license:expat)))
1662
1663(define-public python2-py
1664 (package-with-python2 python-py))
1665
1666;; Recent versions of python-fixtures and python-testrepository need
1667;; python-pbr for packaging, which itself needs these two packages for
1668;; testing.
1669;; To fix this circular dependency, we use a build of python-pbr, based on the
1670;; same source, just without any test dependencies and with tests disabled.
1671;; python-pbr-minmal is then used to package python-fixtures and
1672;; python-testrepository.
1673;; Strictly speaking we currently could remove the test-requirements from the
1674;; normal python-pbr package (and save this package) since test are disabled
1675;; there anyway. But this may change in future.
1676(define-public python-pbr-minimal
1677 (package
1678 (name "python-pbr-minimal")
1679 (version "3.0.1")
1680 (source
1681 (origin
1682 (method url-fetch)
1683 (uri (pypi-uri "pbr" version))
1684 (sha256
1685 (base32
1686 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1687 (build-system python-build-system)
1688 (arguments
1689 `(#:tests? #f))
1690 (home-page "http://docs.openstack.org/developer/pbr/")
1691 (synopsis "Minimal build of python-pbr used for bootstrapping")
1692 (description
1693 "Used only for bootstrapping python2-pbr, you should not need this.")
1694 (license license:asl2.0)))
1695
1696(define-public python2-pbr-minimal
1697 (package-with-python2 python-pbr-minimal))
1698
1699(define-public python-pbr
1700 (package
1701 (inherit python-pbr-minimal)
1702 (name "python-pbr")
1703 (arguments
1704 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1705 (propagated-inputs
1706 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1707 (native-inputs
1708 `(("python-fixtures" ,python-fixtures-bootstrap)
1709 ;; discover, coverage, hacking, subunit
1710 ("python-mock" ,python-mock)
1711 ("python-six" ,python-six)
1712 ("python-sphinx" ,python-sphinx)
1713 ("python-testrepository" ,python-testrepository-bootstrap)
1714 ("python-testresources" ,python-testresources-bootstrap)
1715 ("python-testscenarios" ,python-testscenarios-bootstrap)
1716 ("python-testtools" ,python-testtools-bootstrap)
1717 ("python-virtualenv" ,python-virtualenv)))
1718 (synopsis "Enhance the default behavior of Python’s setuptools")
1719 (description
1720 "Python Build Reasonableness (PBR) is a library that injects some useful
1721and sensible default behaviors into your setuptools run. It will set
1722versions, process requirements files and generate AUTHORS and ChangeLog file
1723from git information.
1724")))
1725
1726(define-public python2-pbr
1727 (package-with-python2 python-pbr))
1728
ea43f0d5
MB
1729(define-public python-pyrsistent
1730 (package
1731 (name "python-pyrsistent")
1732 (version "0.14.11")
1733 (home-page "https://github.com/tobgu/pyrsistent")
1734 (source (origin
1735 (method url-fetch)
1736 (uri (pypi-uri "pyrsistent" version))
1737 (sha256
1738 (base32
1739 "1qkh74bm296mp5g3r11lgsksr6bh4w1bf8pji4nmxdlfj542ga1w"))))
1740 (build-system python-build-system)
1741 (native-inputs
1742 `(("python-hypothesis" ,python-hypothesis)
1743 ("python-pytest" ,python-pytest)
1744 ("python-pytest-runner" ,python-pytest-runner)))
1745 (propagated-inputs
1746 `(("python-six" ,python-six)))
1747 (synopsis "Persistent data structures for Python")
1748 (description
1749 "Pyrsistent is a number of persistent collections (by some referred to as
1750functional data structures). Persistent in the sense that they are immutable.
1751
1752All methods on a data structure that would normally mutate it instead return a
1753new copy of the structure containing the requested updates. The original
1754structure is left untouched.")
1755 (license license:expat)))
1756
1757(define-public python2-pyrsistent
1758 (package-with-python2 python-pyrsistent))
1759
44d10b1f
RW
1760(define-public python-exif-read
1761 (package
1762 (name "python-exif-read")
1763 (version "2.1.2")
1764 (source (origin
1765 (method url-fetch)
1766 (uri (pypi-uri "ExifRead" version))
1767 (sha256
1768 (base32
1769 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
1770 (build-system python-build-system)
1771 (arguments `(#:tests? #f)) ; no tests
1772 (home-page "https://github.com/ianare/exif-py")
1773 (synopsis "Python library to extract EXIF data from image files")
1774 (description
1775 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1776files.")
1777 (license license:bsd-3)))
1778
1779(define-public python2-exif-read
1780 (package-with-python2 python-exif-read))
1781
1782(define-public python-pyld
1783 (package
1784 (name "python-pyld")
1785 (version "1.0.3")
1786 (source (origin
1787 (method url-fetch)
1788 (uri (pypi-uri "PyLD" version))
1789 (sha256
1790 (base32
1791 "12i2g6xdj30k7xxcibg3sc5y76snwq8l6n8fy9lyi577kgy0h2pm"))))
1792 (build-system python-build-system)
1793 (home-page "https://github.com/digitalbazaar/pyld")
1794 (synopsis "Python implementation of the JSON-LD specification")
1795 (description
1796 "PyLD is an implementation of the JSON-LD specification.")
1797 (license license:bsd-3)))
1798
1799(define-public python2-pyld
1800 (package-with-python2 python-pyld))
1801
1802(define-public python-click
1803 (package
1804 (name "python-click")
61984855 1805 (version "7.0")
44d10b1f
RW
1806 (source
1807 (origin
1808 (method url-fetch)
1809 (uri (pypi-uri "click" version))
1810 (sha256
1811 (base32
61984855 1812 "1mzjixd4vjbjvzb6vylki9w1556a9qmdh35kzmq6cign46av952v"))))
44d10b1f
RW
1813 (build-system python-build-system)
1814 (arguments
8d7e7ca6 1815 `(#:phases
44d10b1f
RW
1816 (modify-phases %standard-phases
1817 (add-after 'unpack 'fix-paths
1818 (lambda* (#:key inputs #:allow-other-keys)
1819 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
1820 "cross-libc" "libc"))))
1821 (substitute* "click/_unicodefun.py"
1822 (("'locale'")
1823 (string-append "'" glibc "/bin/locale'"))))
8d7e7ca6
EF
1824 #t))
1825 (replace 'check
1826 (lambda _
1827 (invoke "python" "-m" "pytest"))))))
44d10b1f
RW
1828 (native-inputs
1829 `(("python-pytest" ,python-pytest)))
61984855 1830 (home-page "https://palletsprojects.com/p/click/")
44d10b1f
RW
1831 (synopsis "Command line library for Python")
1832 (description
1833 "Click is a Python package for creating command line interfaces in a
1834composable way with as little code as necessary. Its name stands for
1835\"Command Line Interface Creation Kit\". It's highly configurable but comes
1836with sensible defaults out of the box.")
1837 (license license:bsd-3)))
1838
1839(define-public python2-click
1840 (package-with-python2 python-click))
1841
1842(define-public python-wheel
1843 (package
1844 (name "python-wheel")
746c074b 1845 (version "0.32.3")
44d10b1f
RW
1846 (source
1847 (origin
1848 (method url-fetch)
1849 (uri (pypi-uri "wheel" version))
1850 (sha256
1851 (base32
746c074b 1852 "1dhxl1bf18bx9szmqcnxbg6204hp3im8089q3hkwh5jfa6zh75q2"))))
44d10b1f
RW
1853 (build-system python-build-system)
1854 (native-inputs
1855 `(("python-jsonschema" ,python-jsonschema)
1856 ("python-pytest-cov" ,python-pytest-cov)))
1857 (home-page "https://bitbucket.org/pypa/wheel/")
1858 (synopsis "Format for built Python packages")
1859 (description
1860 "A wheel is a ZIP-format archive with a specially formatted filename and
1861the @code{.whl} extension. It is designed to contain all the files for a PEP
1862376 compatible install in a way that is very close to the on-disk format. Many
1863packages will be properly installed with only the @code{Unpack} step and the
1864unpacked archive preserves enough information to @code{Spread} (copy data and
1865scripts to their final locations) at any later time. Wheel files can be
1866installed with a newer @code{pip} or with wheel's own command line utility.")
1867 (license license:expat)
1868 (properties `((python2-variant . ,(delay python2-wheel))))))
1869
1870(define-public python2-wheel
1871 (let ((wheel (package-with-python2
1872 (strip-python2-variant python-wheel))))
1873 (package (inherit wheel)
1874 (native-inputs `(("python2-functools32" ,python2-functools32)
1875 ,@(package-native-inputs wheel))))))
1876
1877(define-public python-vcversioner
1878 (package
1879 (name "python-vcversioner")
1880 (version "2.16.0.0")
1881 (source
1882 (origin
1883 (method url-fetch)
1884 (uri (pypi-uri "vcversioner" version))
1885 (sha256
1886 (base32
1887 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
1888 (build-system python-build-system)
1889 (synopsis "Python library for version number discovery")
1890 (description "Vcversioner is a Python library that inspects tagging
1891information in a variety of version control systems in order to discover
1892version numbers.")
1893 (home-page "https://github.com/habnabit/vcversioner")
1894 (license license:isc)))
1895
1896(define-public python2-vcversioner
1897 (package-with-python2 python-vcversioner))
1898
5591fc4f
MC
1899(define-public python-jdcal
1900 (package
1901 (name "python-jdcal")
1902 (version "1.4")
1903 (source
1904 (origin
1905 (method url-fetch)
1906 (uri (pypi-uri "jdcal" version))
1907 (sha256
1908 (base32
1909 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
1910 (build-system python-build-system)
1911 (arguments
1912 `(#:phases (modify-phases %standard-phases
1913 (replace 'check
1914 (lambda _
1915 (invoke "pytest"))))))
1916 (native-inputs
1917 `(("python-pytest" ,python-pytest)))
1918 (home-page "https://github.com/phn/jdcal")
1919 (synopsis "Functions to convert between Julian dates Gregorian dates")
1920 (description "This Python library provides functions for converting
1921between Julian dates and Gregorian dates.")
1922 (license license:bsd-2)))
1923
1924(define-public python2-jdcal
1925 (package-with-python2 python-jdcal))
1926
44d10b1f
RW
1927(define-public python-jsonschema
1928 (package
1929 (name "python-jsonschema")
1adde06e 1930 (version "3.0.1")
44d10b1f
RW
1931 (source (origin
1932 (method url-fetch)
786ccb87 1933 (uri (pypi-uri "jsonschema" version))
44d10b1f
RW
1934 (sha256
1935 (base32
1adde06e 1936 "03g20i1xfg4qdlk4475pl4pp7y0h37g1fbgs5qhy678q9xb822hc"))))
44d10b1f
RW
1937 (build-system python-build-system)
1938 (arguments
1939 '(#:phases
1940 (modify-phases %standard-phases
1adde06e
MB
1941 (replace 'check
1942 (lambda _
1943 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
1944 (invoke "trial" "jsonschema"))))))
44d10b1f 1945 (native-inputs
1adde06e
MB
1946 `(("python-setuptools_scm" ,python-setuptools-scm)
1947 ("python-twisted" ,python-twisted)))
1948 (propagated-inputs
1949 `(("python-attrs" ,python-attrs)
1950 ("python-pyrsistent" ,python-pyrsistent)
1951 ("python-six" ,python-six)))
44d10b1f
RW
1952 (home-page "https://github.com/Julian/jsonschema")
1953 (synopsis "Implementation of JSON Schema for Python")
1954 (description
1955 "Jsonschema is an implementation of JSON Schema for Python.")
1956 (license license:expat)
1957 (properties `((python2-variant . ,(delay python2-jsonschema))))))
1958
1959(define-public python2-jsonschema
1960 (let ((jsonschema (package-with-python2
1961 (strip-python2-variant python-jsonschema))))
1962 (package (inherit jsonschema)
44d10b1f 1963 (propagated-inputs
1adde06e
MB
1964 `(("python2-functools32" ,python2-functools32)
1965 ,@(package-propagated-inputs jsonschema))))))
44d10b1f
RW
1966
1967(define-public python-schema
1968 (package
1969 (name "python-schema")
1970 (version "0.6.6")
1971 (source
1972 (origin
1973 (method url-fetch)
1974 (uri (pypi-uri "schema" version))
1975 (sha256
1976 (base32
1977 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
1978 (build-system python-build-system)
1979 (native-inputs
1980 `(("python-pytest" ,python-pytest)))
1981 (home-page "https://github.com/keleshev/schema")
1982 (synopsis "Simple data validation library")
1983 (description
1984 "@code{python-schema} is a library for validating Python data
1985structures, such as those obtained from config-files, forms, external
1986services or command-line parsing, converted from JSON/YAML (or
1987something else) to Python data-types.")
1988 (license license:psfl)))
1989
1990(define-public python2-schema
1991 (package-with-python2 python-schema))
1992
1993(define-public python-schema-0.5
1994 (package (inherit python-schema)
1995 (version "0.5.0")
1996 (source
1997 (origin
1998 (method url-fetch)
1999 (uri (pypi-uri "schema" version))
2000 (sha256
2001 (base32
2002 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2003
2004(define-public python2-schema-0.5
2005 (package-with-python2 python-schema-0.5))
2006
2007(define-public python-kitchen
2008 (package
2009 (name "python-kitchen")
2010 (version "1.2.5")
2011 (source
2012 (origin
2013 (method url-fetch)
2014 (uri (pypi-uri "kitchen" version))
2015 (sha256
2016 (base32
2017 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2018 (build-system python-build-system)
2019 (propagated-inputs
2020 `(("python-chardet" ,python-chardet)))
2021 (home-page "https://github.com/fedora-infra/kitchen")
2022 (synopsis "Python API for snippets")
2023 (description "@code{kitchen} module provides a python API for all sorts of
2024little useful snippets of code that everybody ends up writing for their projects
2025but never seem big enough to build an independent release. Use kitchen and stop
2026cutting and pasting that code over and over.")
2027 (license (list license:lgpl2.1+
2028 ;; subprocess.py, test_subprocess.py,
2029 ;; kitchen/pycompat25/defaultdict.py:
2030 license:psfl))))
2031
2032(define-public python2-kitchen
2033 (package-with-python2 python-kitchen))
2034
2035(define-public python-unidecode
2036 (package
2037 (name "python-unidecode")
2038 (version "1.0.23")
2039 (source (origin
2040 (method url-fetch)
2041 (uri (pypi-uri "Unidecode" version))
2042 (sha256
2043 (base32
2044 "1ysjbr3nqfqj97h8zyj3v9pya413vkv7a1mzml80w37xx15kb1cb"))))
2045 (build-system python-build-system)
2046 (home-page "https://pypi.python.org/pypi/Unidecode")
2047 (synopsis "ASCII transliterations of Unicode text")
2048 (description
2049 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2050useful when integrating with legacy code that doesn't support Unicode, or for
2051ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2052machine identifiers from human-readable Unicode strings that should still be
2053somewhat intelligible.")
2054 (license license:gpl2+)))
2055
2056(define-public python2-unidecode
2057 (package-with-python2 python-unidecode))
2058
2059(define-public python-pyjwt
2060 (package
2061 (name "python-pyjwt")
2062 (version "1.5.3")
2063 (source
2064 (origin
2065 (method url-fetch)
2066 (uri (pypi-uri "PyJWT" version))
2067 (sha256
2068 (base32
2069 "1rxsg14i33vm2i6lz0my628108c81k43v10n4h3p0gx62xdyf2sh"))
2070 (modules '((guix build utils)))
2071 (snippet
2072 '(begin
2073 (for-each delete-file-recursively
2074 (find-files "." "\\.pyc$"))
2075 #t))))
2076 (build-system python-build-system)
2077 (native-inputs
2078 `(("python-pytest" ,python-pytest)
2079 ("python-pytest-cov" ,python-pytest-cov)
2080 ("python-pytest-runner" ,python-pytest-runner)))
2081 (home-page "https://github.com/progrium/pyjwt")
2082 (synopsis "JSON Web Token implementation in Python")
2083 (description
2084 "PyJWT is a JSON Web Token implementation written in Python.")
2085 (license license:expat)))
2086
2087(define-public python2-pyjwt
2088 (package-with-python2 python-pyjwt))
2089
2090(define-public python-pykka
2091 (package
2092 (name "python-pykka")
2093 (version "1.2.1")
2094 (source
2095 (origin
2096 (method url-fetch)
2097 (uri (pypi-uri "Pykka" version))
2098 (sha256
2099 (base32
2100 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2101 (build-system python-build-system)
2102 (native-inputs
2103 `(("python-mock" ,python-mock)
2104 ("python-nose" ,python-nose)
2105 ("python-gevent" ,python-gevent)
2106 ("python-eventlet" ,python-eventlet)))
2107 (home-page "https://www.pykka.org/")
2108 (synopsis "Pykka is a Python implementation of the actor model")
2109 (description
2110 "Pykka is a Python implementation of the actor model.
2111The actor model introduces some simple rules to control the sharing
2112of state and cooperation between execution units, which makes it
2113easier to build concurrent applications.")
2114 (license license:asl2.0)))
2115
2116(define-public python2-pykka
2117 (package-with-python2 python-pykka))
2118
8d22f7e3
VC
2119(define-public python-pymsgbox
2120 (package
2121 (name "python-pymsgbox")
2122 (version "1.0.6")
2123 (source
2124 (origin
2125 (method git-fetch)
2126 (uri (git-reference
2127 ;; LICENSE.txt is not present on pypi
2128 (url "https://github.com/asweigart/PyMsgBox")
2129 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
2130 (file-name (git-file-name name version))
2131 (sha256
2132 (base32
2133 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
2134 (arguments
2135 ;; Circular dependency to run tests:
2136 ;; Tests need pyautogui, which depends on pymsgbox.
2137 '(#:tests? #f))
2138 (build-system python-build-system)
2139 (home-page "https://github.com/asweigart/PyMsgBox")
2140 (synopsis "Python module for JavaScript-like message boxes")
2141 (description
2142 "PyMsgBox is a simple, cross-platform, pure Python module for
2143JavaScript-like message boxes. Types of dialog boxes include:
2144@enumerate
2145@item alert
2146@item confirm
2147@item prompt
2148@item password
2149@end enumerate
2150")
2151 (license license:bsd-3)))
2152
44d10b1f
RW
2153(define-public python-pympler
2154 (package
2155 (name "python-pympler")
2156 (home-page "https://pythonhosted.org/Pympler/")
2157 (version "0.5")
2158 (source (origin
2159 (method url-fetch)
2160 (uri (pypi-uri "Pympler" version))
2161 (sha256
2162 (base32
2163 "03qwsbilqgvnbl3a1jmpgixbr2kq6m3fvdlzyr3wdp01bwlc85kx"))))
2164 (build-system python-build-system)
2165 (arguments
2166 `(#:phases (modify-phases %standard-phases
2167 (delete 'check)
2168 (add-after 'install 'check
2169 (lambda* (#:key inputs outputs #:allow-other-keys)
2170 (add-installed-pythonpath inputs outputs)
2171 (invoke "python" "setup.py" "test"))))))
2172 (synopsis "Measure, monitor and analyze memory behavior")
2173 (description
2174 "Pympler is a development tool to measure, monitor and analyze
2175the memory behavior of Python objects in a running Python application.
2176
2177By pympling a Python application, detailed insight in the size and the
2178lifetime of Python objects can be obtained. Undesirable or unexpected
2179runtime behavior like memory bloat and other @samp{pymples} can easily
2180be identified.
2181
2182A web profiling frontend exposes process statistics, garbage
2183visualisation and class tracker statistics.")
2184 (license license:asl2.0)))
2185
2186(define-public python2-pympler
2187 (package-with-python2 python-pympler))
2188
2189(define-public python-itsdangerous
2190 (package
2191 (name "python-itsdangerous")
acfcf2ed 2192 (version "1.1.0")
44d10b1f
RW
2193 (source
2194 (origin
2195 (method url-fetch)
acfcf2ed 2196 (uri (pypi-uri "itsdangerous" version))
44d10b1f
RW
2197 (sha256
2198 (base32
acfcf2ed 2199 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
44d10b1f 2200 (build-system python-build-system)
acfcf2ed 2201 (home-page "https://palletsprojects.com/p/itsdangerous/")
44d10b1f
RW
2202 (synopsis "Python library for passing data to/from untrusted environments")
2203 (description
2204 "Itsdangerous provides various helpers to pass trusted data to untrusted
2205environments and back.")
2206 (license license:bsd-3)))
2207
2208(define-public python2-itsdangerous
2209 (package-with-python2 python-itsdangerous))
2210
2211(define-public python-pyyaml
2212 (package
2213 (name "python-pyyaml")
2214 (version "3.13")
2215 (source
2216 (origin
2217 (method url-fetch)
2218 (uri (pypi-uri "PyYAML" version))
2219 (sha256
2220 (base32
2221 "1gx603g484z46cb74j9rzr6sjlh2vndxayicvlyhxdz98lhhkwry"))))
2222 (build-system python-build-system)
2223 (inputs
2224 `(("libyaml" ,libyaml)))
2225 (home-page "http://pyyaml.org/wiki/PyYAML")
2226 (synopsis "YAML parser and emitter for Python")
2227 (description
2228 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2229complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2230API, and sensible error messages. PyYAML supports standard YAML tags and
2231provides Python-specific tags that allow to represent an arbitrary Python
2232object.")
2233 (license license:expat)))
2234
2235(define-public python2-pyyaml
2236 (package-with-python2 python-pyyaml))
2237
2238(define-public python-vine
2239 (package
2240 (name "python-vine")
2241 (version "1.1.4")
2242 (source
2243 (origin
2244 (method url-fetch)
2245 (uri (pypi-uri "vine" version))
2246 (sha256
2247 (base32
2248 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
2249 (build-system python-build-system)
2250 (native-inputs
2251 `(("python-pytest" ,python-pytest)
2252 ("python-case" ,python-case)))
2253 (home-page "https://github.com/celery/vine")
2254 (synopsis "Promises for Python")
2255 (description
2256 "@code{vine} provides a special implementation of promises in that it can
2257be used both for \"promise of a value\" and lazy evaluation. The biggest
2258upside for this is that everything in a promise can also be a promise,
2259e.g. filters, callbacks and errbacks can all be promises.")
2260 (license license:bsd-3)))
2261
2262(define-public python-virtualenv
2263 (package
2264 (name "python-virtualenv")
2782bd51 2265 (version "16.1.0")
44d10b1f
RW
2266 (source
2267 (origin
2268 (method url-fetch)
2269 (uri (pypi-uri "virtualenv" version))
2270 (sha256
2271 (base32
2782bd51 2272 "0242cg3hdq3qdvx5flyrki8lpwlgwf5k45c21ks5049fv7ygm6gq"))))
44d10b1f
RW
2273 (build-system python-build-system)
2274 (arguments
2275 `(#:phases
2276 (modify-phases %standard-phases
2782bd51 2277 (add-before 'check 'disable-failing-test
44d10b1f
RW
2278 (lambda _
2279 ;; Disable failing test. See upstream bug report
2280 ;; https://github.com/pypa/virtualenv/issues/957
2281 (substitute* "tests/test_virtualenv.py"
2282 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2782bd51 2283 #t)))))
44d10b1f
RW
2284 (native-inputs
2285 `(("python-mock" ,python-mock)
2286 ("python-pytest" ,python-pytest)))
2287 (home-page "https://virtualenv.pypa.io/")
2288 (synopsis "Virtual Python environment builder")
2289 (description
2290 "Virtualenv is a tool to create isolated Python environments.")
2291 (license license:expat)))
2292
2293(define-public python2-virtualenv
2294 (package-with-python2 python-virtualenv))
2295
2296(define-public python-markupsafe
2297 (package
2298 (name "python-markupsafe")
2299 (version "1.0")
2300 (source
2301 (origin
2302 (method url-fetch)
5182927c 2303 (uri (pypi-uri "MarkupSafe" version))
44d10b1f
RW
2304 (sha256
2305 (base32
2306 "0rdn1s8x9ni7ss8rfiacj7x1085lx8mh2zdwqslnw8xc3l4nkgm6"))))
2307 (build-system python-build-system)
2308 (home-page "https://github.com/mitsuhiko/markupsafe")
2309 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2310 (description
2311 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2312for Python.")
2313 (license license:bsd-3)))
2314
2315(define-public python2-markupsafe
2316 (package-with-python2 python-markupsafe))
2317
2318(define-public python-jinja2
2319 (package
2320 (name "python-jinja2")
4a5c7934 2321 (version "2.10.1")
44d10b1f
RW
2322 (source
2323 (origin
2324 (method url-fetch)
2325 (uri (pypi-uri "Jinja2" version))
2326 (sha256
2327 (base32
4a5c7934 2328 "04shqrs56aj04ipyqykj512rw2l0zfammvj9krawzxz7xc14yp06"))))
44d10b1f
RW
2329 (build-system python-build-system)
2330 (propagated-inputs
2331 `(("python-markupsafe" ,python-markupsafe)))
2332 (home-page "http://jinja.pocoo.org/")
2333 (synopsis "Python template engine")
2334 (description
2335 "Jinja2 is a small but fast and easy to use stand-alone template engine
2336written in pure Python.")
2337 (license license:bsd-3)))
2338
2339(define-public python2-jinja2
2340 (package-with-python2 python-jinja2))
2341
2342(define-public python-pystache
2343 (package
2344 (name "python-pystache")
2345 (version "0.5.4")
2346 (source (origin
2347 (method url-fetch)
2348 (uri (pypi-uri "pystache" version))
2349 (sha256
2350 (base32
2351 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2352 (build-system python-build-system)
2353 (arguments
2354 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2355 (home-page "http://defunkt.io/pystache/")
2356 (synopsis "Python logic-less template engine")
2357 (description
2358 "Pystache is a Python implementation of the framework agnostic,
2359logic-free templating system Mustache.")
2360 (license license:expat)
2361 (properties `((python2-variant . ,(delay python2-pystache))))))
2362
2363(define-public python2-pystache
2364 (package (inherit (package-with-python2
2365 (strip-python2-variant python-pystache)))
2366 (arguments
2367 `(#:python ,python-2
2368 #:phases
2369 (modify-phases %standard-phases
2370 (replace 'check
2371 (lambda _
dfafc29b 2372 (invoke "python" "test_pystache.py"))))))))
44d10b1f
RW
2373
2374(define-public python-joblib
2375 (package
2376 (name "python-joblib")
2377 (version "0.13.0")
2378 (source (origin
2379 (method url-fetch)
2380 (uri (pypi-uri "joblib" version))
2381 (sha256
2382 (base32
2383 "0612nazad8dxmn3xghfrmjax6456l4xy6hn9cngs7vydi14ds7v5"))))
2384 (build-system python-build-system)
2385 (arguments
2386 `(#:phases
2387 (modify-phases %standard-phases
2388 (replace 'check
2389 (lambda _ (invoke "pytest" "-v" "joblib"))))))
2390 (native-inputs
2391 `(("python-pytest" ,python-pytest)))
2392 (home-page "https://joblib.readthedocs.io/")
2393 (synopsis "Using Python functions as pipeline jobs")
2394 (description
2395 "Joblib is a set of tools to provide lightweight pipelining in Python.
2396In particular, joblib offers: transparent disk-caching of the output values
2397and lazy re-evaluation (memoize pattern), easy simple parallel computing
2398logging and tracing of the execution.")
2399 (license license:bsd-3)))
2400
2401(define-public python2-joblib
2402 (package-with-python2 python-joblib))
2403
a3363341
VC
2404(define-public python-daemon
2405 (package
2406 (name "python-daemon")
2407 (version "2.2.3")
2408 (source
2409 (origin
2410 (method url-fetch)
2411 (uri (pypi-uri "python-daemon" version))
2412 (sha256
2413 (base32
2414 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
2415 (build-system python-build-system)
2416 (arguments
2417 `(#:phases
2418 (modify-phases %standard-phases
2419 (add-before 'check 'disable-tests
2420 (lambda _
2421 ;; FIXME: Determine why test fails
2422 (substitute* "test/test_daemon.py"
2423 (("test_detaches_process_context")
2424 "skip_test_detaches_process_context"))
2425 #t)))))
2426 (propagated-inputs
2427 `(("python-lockfile" ,python-lockfile)))
2428 (native-inputs
2429 `(("python-unittest2" ,python-unittest2)
2430 ("python-testtools" ,python-testtools)
2431 ("python-testscenarios" ,python-testscenarios)
2432 ("python-mock" ,python-mock)
2433 ("python-docutils" ,python-docutils)))
2434 (home-page "https://pagure.io/python-daemon/")
2435 (synopsis "Python library for making a Unix daemon process")
2436 (description "Python-daemon is a library that assists a Python program to
2437turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
2438
2439This library provides a @code{DaemonContext} class that manages the following
2440important tasks for becoming a daemon process:
2441@enumerate
2442@item Detach the process into its own process group.
2443@item Set process environment appropriate for running inside a chroot.
2444@item Renounce suid and sgid privileges.
2445@item Close all open file descriptors.
2446@item Change the working directory, uid, gid, and umask.
2447@item Set appropriate signal handlers.
2448@item Open new file descriptors for stdin, stdout, and stderr.
2449@item Manage a specified PID lock file.
2450@item Register cleanup functions for at-exit processing.
2451@end enumerate")
2452 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
2453 (license (list license:asl2.0 license:gpl3+))))
2454
44d10b1f
RW
2455(define-public python-docutils
2456 (package
2457 (name "python-docutils")
2458 (version "0.14")
2459 (source
2460 (origin
2461 (method url-fetch)
2462 (uri (pypi-uri "docutils" version))
2463 (sha256
2464 (base32
2465 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2466 (build-system python-build-system)
2467 (arguments
2468 '(#:tests? #f)) ; no setup.py test command
2469 (home-page "http://docutils.sourceforge.net/")
2470 (synopsis "Python Documentation Utilities")
2471 (description
2472 "Docutils is a modular system for processing documentation into useful
2473formats, such as HTML, XML, and LaTeX. For input Docutils supports
2474reStructuredText.")
2475 ;; Most of the source code is public domain, but some source files are
2476 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2477 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2478
2479(define-public python2-docutils
2480 (package-with-python2 python-docutils))
2481
2482(define-public python-pygments
2483 (package
2484 (name "python-pygments")
4cd4173d 2485 (version "2.4.0")
44d10b1f
RW
2486 (source
2487 (origin
2488 (method url-fetch)
2489 (uri (pypi-uri "Pygments" version))
2490 (sha256
2491 (base32
4cd4173d 2492 "1xb5n3hvhk63kxypc03k7kfry20pny6gygi4bsl9kw1rnzzsdjri"))))
44d10b1f
RW
2493 (build-system python-build-system)
2494 (arguments
2495 ;; FIXME: Tests require sphinx, which depends on this.
2496 '(#:tests? #f))
2497 (home-page "http://pygments.org/")
2498 (synopsis "Syntax highlighting")
2499 (description
2500 "Pygments is a syntax highlighting package written in Python.")
2501 (license license:bsd-2)))
2502
2503(define-public python2-pygments
2504 (package-with-python2 python-pygments))
2505
2506(define-public python-sphinxcontrib-websupport
2507 (package
2508 (name "python-sphinxcontrib-websupport")
2509 (version "1.1.0")
2510 (source (origin
2511 (method url-fetch)
2512 (uri (pypi-uri "sphinxcontrib-websupport" version))
2513 (sha256
2514 (base32
2515 "1ff3ix76xi1y6m99qxhaq5161ix9swwzydilvdya07mgbcvpzr4x"))))
2516 (build-system python-build-system)
2517 (arguments
2518 ;; FIXME: Tests depend on Sphinx, which depends on this.
2519 `(#:tests? #f))
2520 (home-page "http://sphinx-doc.org/")
2521 (synopsis "Sphinx API for web applications")
2522 (description "This package provides a Python API to easily integrate
2523Sphinx documentation into your web application. It provides tools to
2524integrate Sphinx documents in web templates and to handle searches.")
2525 (license license:bsd-3)))
2526
2527(define-public python2-sphinxcontrib-websupport
2528 (package-with-python2 python-sphinxcontrib-websupport))
2529
2530(define-public python-sphinx
2531 (package
2532 (name "python-sphinx")
2533 (version "1.7.7")
2534 (source
2535 (origin
2536 (method url-fetch)
2537 (uri (pypi-uri "Sphinx" version))
2538 (sha256
2539 (base32
2540 "0pkkbfj7cl157q550gcs45am5y78ps0h7q6455d64s1zmw01jlvi"))))
2541 (build-system python-build-system)
2542 (arguments
2543 `(#:phases
2544 (modify-phases %standard-phases
2545 (replace 'check
2546 (lambda _
2547 ;; Requires Internet access.
2548 (delete-file "tests/test_build_linkcheck.py")
2549 (substitute* "tests/test_build_latex.py"
2550 (("@pytest.mark.sphinx\\('latex', testroot='images'\\)")
2551 "@pytest.mark.skip()"))
2552 (when (which "python")
2553 ;; XXX: These tests are broken when using Python2:
2554 ;; <https://github.com/sphinx-doc/sphinx/issues/4710>.
2555 (delete-file "tests/test_api_translator.py")
2556 (delete-file "tests/test_setup_command.py"))
2557 (invoke "make" "test"))))))
2558 (propagated-inputs
2559 `(("python-imagesize" ,python-imagesize)
2560 ("python-sphinx-alabaster-theme"
2561 ,python-sphinx-alabaster-theme)
2562 ("python-babel" ,python-babel)
2563 ("python-snowballstemmer" ,python-snowballstemmer)
2564 ("python-docutils" ,python-docutils)
2565 ("python-jinja2" ,python-jinja2)
2566 ("python-packaging" ,python-packaging)
2567 ("python-pygments" ,python-pygments)
2568 ("python-requests" ,python-requests)
2569 ("python-six" ,python-six)
2570 ("python-sphinxcontrib-websupport" ,python-sphinxcontrib-websupport)))
2571 (native-inputs
2572 `(("graphviz" ,graphviz)
2573 ("imagemagick" ,imagemagick) ;for "convert"
2574 ("python-html5lib" ,python-html5lib)
2575 ("python-mock" ,python-mock)
2576 ("python-nose" ,python-nose)
2577 ("python-pytest" ,python-pytest)))
2578 (home-page "http://sphinx-doc.org/")
2579 (synopsis "Python documentation generator")
2580 (description "Sphinx is a tool that makes it easy to create documentation
2581for Python projects or other documents consisting of multiple reStructuredText
2582sources.")
2583 (license license:bsd-3)
2584 (properties `((python2-variant . ,(delay python2-sphinx))))))
2585
2586(define-public python2-sphinx
2587 (let ((base (package-with-python2 (strip-python2-variant python-sphinx))))
2588 (package
2589 (inherit base)
2590 (native-inputs `(("python2-mock" ,python2-mock)
2591 ("python2-enum34" ,python2-enum34)
2592 ,@(package-native-inputs base)))
2593 (propagated-inputs `(("python2-pytz" ,python2-pytz)
2594 ("python2-typing" ,python2-typing)
2595 ,@(package-propagated-inputs base))))))
2596
2597(define-public python-sphinx-gallery
2598 (package
2599 (name "python-sphinx-gallery")
2600 (version "0.1.13")
2601 (source (origin
2602 (method url-fetch)
2603 (uri (string-append "https://github.com/sphinx-gallery/sphinx-gallery"
2604 "/archive/v" version ".tar.gz"))
2605 (file-name (string-append name "-" version ".tar.gz"))
2606 (sha256
2607 (base32
2608 "03fs99mcb1r7qp0xixqv07vcz98sk21yq19ffdysi0infdcpzfkd"))))
2609 (build-system python-build-system)
2610 (arguments
2611 ;; FIXME: Tests attempt to download <https://docs.python.org/3/objects.inv>,
2612 ;; <https://docs.scipy.org/doc/numpy/objects.inv>, and
2613 ;; <https://matplotlib.org/objects.inv>.
2614 `(#:tests? #f))
2615 (native-inputs
2616 `(("python-pytest-runner" ,python-pytest-runner)))
2617 (home-page "https://sphinx-gallery.github.io/")
2618 (synopsis "Generate an examples gallery automatically")
2619 (description
2620 "@code{sphinx_gallery} is a Sphinx extension that builds an HTML version
2621from any set of Python scripts and puts it into an examples gallery.")
2622 (license license:bsd-3)))
2623
2624(define-public python2-sphinx-gallery
2625 (package-with-python2 python-sphinx-gallery))
2626
2627(define-public python-sphinx-rtd-theme
2628 (package
2629 (name "python-sphinx-rtd-theme")
2630 (version "0.2.4")
2631 (source
2632 (origin
2633 (method url-fetch)
2634 (uri (pypi-uri "sphinx_rtd_theme" version))
2635 (sha256
2636 (base32
2637 "05rlhjzdyapr2w74jjs7mrm8hi69qskcr5vya9f9drpsys7lpxrd"))))
2638 (build-system python-build-system)
2639 (arguments '(#:tests? #f)) ; No tests.
2640 (propagated-inputs
2641 `(("python-sphinx" ,python-sphinx)))
2642 (home-page "https://github.com/snide/sphinx_rtd_theme/")
2643 (synopsis "ReadTheDocs.org theme for Sphinx")
2644 (description "A theme for Sphinx used by ReadTheDocs.org.")
2645 (license license:expat)))
2646
2647(define-public python2-sphinx-rtd-theme
2648 (package-with-python2 python-sphinx-rtd-theme))
2649
2650(define-public python-guzzle-sphinx-theme
2651 (package
2652 (name "python-guzzle-sphinx-theme")
2653 (version "0.7.11")
2654 (source
2655 (origin
2656 (method url-fetch)
2657 (uri (pypi-uri "guzzle_sphinx_theme" version))
2658 (sha256
2659 (base32
2660 "1rnkzrrsbnifn3vsb4pfaia3nlvgvw6ndpxp7lzjrh23qcwid34v"))))
2661 (build-system python-build-system)
2662 (propagated-inputs
2663 `(("python-sphinx" ,python-sphinx)))
2664 (home-page "https://github.com/guzzle/guzzle_sphinx_theme")
2665 (synopsis "Sphinx theme used by Guzzle")
2666 (description "This package provides guzzle_sphinx_theme, a theme for the
2667Sphinx documentation system, used by @uref{http://docs.guzzlephp.org, Guzzle}
2668and several other projects.")
2669 (license license:expat)))
2670
2671(define-public python2-guzzle-sphinx-theme
2672 (package-with-python2 python-guzzle-sphinx-theme))
2673
0f0a5ef9
MC
2674(define-public python-bumpversion
2675 (package
2676 (name "python-bumpversion")
2677 (version "0.5.3")
2678 (source
2679 (origin
2680 (method url-fetch)
2681 (uri (pypi-uri "bumpversion" version))
2682 (sha256
2683 (base32
2684 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
2685 (build-system python-build-system)
2686 (home-page "https://github.com/peritus/bumpversion")
2687 (synopsis "Tool to bump software version")
2688 (description "This tool provides a command-line interface (CLI) to bump a
2689software version simply.")
2690 (license license:expat)))
2691
b24fd2c2
MC
2692(define-public python-deprecated
2693 (package
2694 (name "python-deprecated")
2695 (version "1.2.5")
2696 (source
2697 (origin
2698 (method git-fetch)
2699 (uri (git-reference
2700 (url "https://github.com/tantale/deprecated.git")
2701 (commit (string-append "v" version))))
2702 (file-name (git-file-name name version))
2703 (sha256
2704 (base32
2705 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
2706 (build-system python-build-system)
2707 (arguments
2708 `(#:phases (modify-phases %standard-phases
2709 (replace 'check
2710 (lambda _
2711 (invoke "pytest"))))))
2712 (propagated-inputs
2713 `(("python-wrapt" ,python-wrapt)))
2714 (native-inputs
2715 `(("python-bumpversion" ,python-bumpversion)
2716 ("python-pytest" ,python-pytest)
2717 ("python-pytest-cov" ,python-pytest-cov)
2718 ("python-sphinx" ,python-sphinx)
2719 ("python-tox" ,python-tox)))
2720 (home-page "https://github.com/tantale/deprecated")
2721 (synopsis "Python decorator to deprecate classes, functions or methods")
2722 (description "The @code{deprecated} decorator provides a convenient way to deprecate
2723to deprecate classes, functions or methods.")
2724 (license license:expat)))
2725
d5a998fa
MC
2726(define-public python-pygithub
2727 (package
2728 (name "python-pygithub")
2729 (version "1.43.7")
2730 (source
2731 ;; We fetch from the Git repo because there are no tests in the PyPI
2732 ;; archive.
2733 (origin
2734 (method git-fetch)
2735 (uri (git-reference
2736 (url "https://github.com/PyGithub/PyGithub.git")
2737 (commit (string-append "v" version))))
2738 (file-name (git-file-name name version))
2739 (sha256
2740 (base32
2741 "0ww92zz0ja9w6rw83vphmn8rwmcn6abg16j4q7zxjc0rrg2cfj9i"))))
2742 (build-system python-build-system)
2743 (arguments
2744 `(#:phases (modify-phases %standard-phases
2745 ;; Some tests rely on the network.
2746 (add-after 'unpack 'disable-failing-tests
2747 (lambda _
2748 (substitute* "tests/Issue142.py"
2749 (("testDecodeJson") "disabled_testDecodeJson"))
2750 #t))
2751 (add-before 'check 'prepare-for-tests
2752 (lambda _
2753 (for-each (lambda (f)
2754 (chmod f #o666))
2755 (find-files "./tests"))
2756 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
2757 (setenv "PYTHONPATH"
2758 (string-append "./tests:" (getenv "PYTHONPATH")))
2759 #t)))))
2760 (propagated-inputs
2761 `(("python-deprecated" ,python-deprecated)
2762 ("python-pyjwt" ,python-pyjwt)
2763 ("python-requests" ,python-requests)))
2764 (native-inputs `(("python-httpretty" ,python-httpretty)))
2765 (home-page "https://pygithub.readthedocs.io/en/latest/")
2766 (synopsis "Python library for the GitHub API")
2767 (description "This library allows managing GitHub resources such as
2768repositories, user profiles, and organizations in your Python applications,
2769using version 3 of the GitHub application programming interface (API).")
2770 (license license:lgpl3+)))
2771
c0c0bb38
MC
2772(define-public python-rellu
2773 (package
2774 (name "python-rellu")
2775 (version "0.7")
2776 (source
2777 (origin
2778 (method url-fetch)
2779 (uri (pypi-uri "rellu" version))
2780 (sha256
2781 (base32
2782 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
2783 (build-system python-build-system)
2784 (propagated-inputs
2785 `(("python-invoke" ,python-invoke)
2786 ("python-pygithub" ,python-pygithub)))
2787 (home-page "https://github.com/robotframework/rellu")
2788 (synopsis "Utilities to create PyPI releases")
2789 (description "This collection of utilities contains tooling and templates
2790to assist in creating releases on GitHub and publishing them on PyPI. It is
2791designed to be used by Robot Framework and tools and libraries in its
2792ecosystem, but can naturally be used also by other projects.")
2793 (license license:asl2.0)))
2794
b9790285
MC
2795(define-public python-robotframework
2796 (package
2797 (name "python-robotframework")
2798 (version "3.1.1")
2799 ;; There are no tests in the PyPI archive.
2800 (source
2801 (origin
2802 (method git-fetch)
2803 (uri (git-reference
2804 (url "https://github.com/robotframework/robotframework.git")
2805 (commit (string-append "v" version))))
2806 (file-name (git-file-name name version))
2807 (sha256
2808 (base32
2809 "1aaiamc9l35m5sf7xl2qc5q9308v7sz3p1qgzcslsjxzddphyn4v"))
2810 (patches (search-patches
2811 "python-robotframework-honor-source-date-epoch.patch"))))
2812 (build-system python-build-system)
2813 (arguments
2814 `(#:phases (modify-phases %standard-phases
2815 (add-before 'build 'build-and-install-doc
2816 (lambda* (#:key outputs #:allow-other-keys)
2817 (let* ((doc-output (assoc-ref outputs "doc"))
2818 (doc (string-append doc-output "/share/"
2819 ,name "-" ,version "/")))
2820 (invoke "invoke" "library-docs" "all")
2821 (mkdir-p doc)
2822 (copy-recursively "doc/libraries"
2823 (string-append doc "/libraries"))
2824 #t)))
2825 (replace 'check
2826 (lambda _
2827 (invoke "python" "utest/run.py"))))))
2828 (native-inputs
2829 `(("python-invoke" ,python-invoke)
2830 ("python-rellu" ,python-rellu)
2831 ("python:tk" ,python "tk"))) ;used when building the HTML doc
2832 (outputs '("out" "doc"))
2833 (home-page "https://robotframework.org")
2834 (synopsis "Generic automation framework")
2835 (description "Robot Framework is a generic automation framework for
2836acceptance testing, acceptance test driven development (ATDD), and robotic
2837process automation (RPA).")
2838 (license license:asl2.0)))
2839
5b84c120
MC
2840(define-public python-robotframework-lint
2841 ;; There is no properly tagged release; the commit below seems to correspond
2842 ;; to the 0.9 stable release available from PyPI. The tests are not
2843 ;; included in the PyPI archive, so we fetch the sources from the upstream
2844 ;; Git repo.
2845 (let ((commit "e851879bab1f63e4e53b34a4dc8a67ed95102830")
2846 (revision "1"))
2847 (package
2848 (name "python-robotframework-lint")
2849 (version (git-version "0.9.0" revision commit))
2850 (source
2851 (origin
2852 (method git-fetch)
2853 (uri (git-reference
2854 (url "https://github.com/boakley/robotframework-lint.git")
2855 (commit commit)))
2856 (file-name (git-file-name name version))
2857 (sha256
2858 (base32
2859 "1p6fknqg5sb9qz5857ji4a877657vgfjm5v3zn45994parx6ml1m"))))
2860 (build-system python-build-system)
2861 (arguments
2862 `(#:phases
2863 (modify-phases %standard-phases
2864 (replace 'check
2865 (lambda _
2866 (invoke "python" "-m" "robot" "-A"
2867 "tests/conf/default.args" "tests"))))))
2868 (propagated-inputs
2869 `(("python-robotframework" ,python-robotframework)))
2870 (home-page "https://github.com/boakley/robotframework-lint/")
2871 (synopsis "Static analysis tool (linter) for Robot Framework")
2872 (description "This package provides the @code{rflint} command-line
2873utility, a static analysis tool (linter) for Robot Framework source files.")
2874 (license license:asl2.0))))
2875
c0c64f17
MC
2876(define-public python-robotframework-sshlibrary
2877 (package
2878 (name "python-robotframework-sshlibrary")
2879 (version "3.3.0")
2880 ;; There are no tests in the PyPI archive.
2881 (source
2882 (origin
2883 (method git-fetch)
2884 (uri (git-reference
2885 (url "https://github.com/robotframework/SSHLibrary.git")
2886 (commit (string-append "v" version))))
2887 (file-name (git-file-name name version))
2888 (sha256
2889 (base32
2890 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
2891 (build-system python-build-system)
2892 (arguments
2893 `(#:phases
2894 (modify-phases %standard-phases
2895 (add-before 'build 'build-and-install-doc
2896 (lambda* (#:key outputs #:allow-other-keys)
2897 (let* ((doc-output (assoc-ref outputs "doc"))
2898 (doc (string-append doc-output "/share/"
2899 ,name "-" ,version "/")))
2900 (invoke "chmod" "-R" "+w" "docs")
2901 (invoke "invoke" "kw-docs" "project-docs")
2902 (mkdir-p doc)
2903 (for-each delete-file (find-files "docs" "\\.rst"))
2904 (copy-recursively "docs" doc)
2905 #t)))
2906 (replace 'check
2907 (lambda _
2908 ;; Some tests require an SSH server; we remove them.
2909 (delete-file "utest/test_client_api.py")
2910 (delete-file "utest/test_scp.py")
2911 (invoke "python" "utest/run.py"))))))
2912 (propagated-inputs
2913 `(("python-robotframework" ,python-robotframework)
2914 ("python-paramiko" ,python-paramiko)
2915 ("python-scp" ,python-scp)))
2916 (native-inputs
2917 `(("openssh" ,openssh)
2918 ("which" ,which)
2919 ;; To generate the documentation
2920 ("python-docutils" ,python-docutils)
2921 ("python-invoke" ,python-invoke)
2922 ("python-pygments" ,python-pygments)
2923 ("python-rellu" ,python-rellu)))
2924 (outputs '("out" "doc"))
2925 (home-page "https://github.com/robotframework/SSHLibrary")
2926 (synopsis "Robot Framework library for SSH and SFTP")
2927 (description "SSHLibrary is a Robot Framework library providing support
2928for SSH and SFTP. It has the following main usages:
2929@itemize @bullet
2930@item Executing commands on the remote machine, either blocking or non-blocking.
2931@item Writing and reading in an interactive shell.
2932@item Transferring files and directories over SFTP.
2933@item Ensuring that files and directories exist on the remote machine.
2934@end itemize")
2935 (license license:asl2.0)))
2936
13d825fc
MC
2937(define-public python-scp
2938 (package
2939 (name "python-scp")
2940 (version "0.13.2")
2941 (source
2942 (origin
2943 (method url-fetch)
2944 (uri (pypi-uri "scp" version))
2945 (sha256
2946 (base32
2947 "1crlpw9lnn58fs1c1rmh7s7s9y5gkgpgjsqlvg9qa51kq1knx7gg"))))
2948 (build-system python-build-system)
2949 (arguments
2950 '(#:tests? #f)) ;tests require an SSH server
2951 (propagated-inputs
2952 `(("python-paramiko" ,python-paramiko)))
2953 (home-page "https://github.com/jbardin/scp.py")
2954 (synopsis "SCP protocol module for Python and Paramiko")
2955 (description "The scp module extends the Paramiko library to send and
2956receive files via the SCP1 protocol, as implemented by the OpenSSH
2957@command{scp} program.")
2958 (license license:gpl2+)))
2959
44d10b1f
RW
2960(define-public python-rst.linker
2961 (package
2962 (name "python-rst.linker")
2963 (version "1.10")
2964 (source
2965 (origin
2966 (method url-fetch)
2967 (uri (pypi-uri "rst.linker" version))
2968 (sha256
2969 (base32
2970 "0iqaacp7pj1s8avs4kc0qg0r7dscywaq37y6l9j14glqdikk0wdj"))))
2971 (build-system python-build-system)
2972 (propagated-inputs
2973 `(("python-dateutil" ,python-dateutil)
2974 ("python-six" ,python-six)))
2975 (native-inputs
2976 `(("python-setuptools-scm" ,python-setuptools-scm)))
2977 ;; Test would require path.py, which would introduce a cyclic dependence.
2978 (arguments `(#:tests? #f))
2979 ;; Note: As of version 1.7 the documentation is not worth building.
2980 (home-page "https://github.com/jaraco/rst.linker")
2981 (synopsis "Sphinx plugin to add links and timestamps")
2982 (description "rst.linker allows to automatically replace text by a
2983reStructuredText external reference or timestamps. It's primary purpose is to
2984augment the changelog, but it can be used for other documents, too.")
2985 (license license:expat)))
2986
2987(define-public python2-rst.linker
2988 (package-with-python2 python-rst.linker))
2989
2990(define-public python-feedgenerator
2991 (package
2992 (name "python-feedgenerator")
2993 (version "1.9")
2994 (source
2995 (origin
2996 (method url-fetch)
2997 (uri (pypi-uri "feedgenerator" version))
2998 (sha256
2999 (base32
3000 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
3001 (modules '((guix build utils)))
3002 (snippet
3003 '(begin
3004 ;; Remove pre-compiled .pyc files from source.
3005 (for-each delete-file-recursively
3006 (find-files "." "__pycache__" #:directories? #t))
3007 (for-each delete-file (find-files "." "\\.pyc$"))
3008 #t))))
3009 (build-system python-build-system)
3010 (propagated-inputs
3011 `(("python-pytz" ,python-pytz)
3012 ("python-six" ,python-six)))
3013 (home-page "https://github.com/getpelican/feedgenerator")
3014 (synopsis
3015 "Standalone version of Django's Atom/RSS feed generator")
3016 (description
3017 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
3018which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3019 (license license:bsd-3)))
3020
3021(define-public python2-feedgenerator
3022 (package-with-python2 python-feedgenerator))
3023
3024(define-public python-toml
3025 (package
3026 (name "python-toml")
3027 (version "0.9.4")
3028 (source
3029 (origin
3030 (method url-fetch)
3031 (uri (pypi-uri "toml" version))
3032 (sha256
3033 (base32
3034 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
3035 (build-system python-build-system)
3036 (arguments
3037 `(#:tests? #f)) ;no tests suite in release
3038 (home-page "https://github.com/uiri/toml")
3039 (synopsis "Library for TOML")
3040 (description
3041 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
3042Language (TOML) configuration files.")
3043 (license license:expat)))
3044
346c8752
BG
3045(define-public python-jsonrpc-server
3046 (package
3047 (name "python-jsonrpc-server")
3048 (version "0.1.2")
3049 (source
3050 (origin
3051 (method url-fetch)
3052 (uri (pypi-uri "python-jsonrpc-server" version))
3053 (sha256
3054 (base32
3055 "0m4ykpcdy52x37n1ikysp07j7p8ialcdvvvsrjp3545sn7iiid09"))))
3056 (build-system python-build-system)
3057 (propagated-inputs
3058 `(("python-future" ,python-future)
3059 ("python-mock" ,python-mock)
3060 ("python-pytest" ,python-pytest)))
3061 (home-page
3062 "https://github.com/palantir/python-jsonrpc-server")
3063 (synopsis "JSON RPC 2.0 server library")
3064 (description
3065 "This packages provides a JSON RPC 2.0 server library for Python.")
3066 (license license:expat)))
3067
56f4ad47
BG
3068(define-public python-pydocstyle
3069 (package
3070 (name "python-pydocstyle")
3071 (version "3.0.0")
3072 (source
3073 (origin
3074 (method url-fetch)
3075 (uri (pypi-uri "pydocstyle" version))
3076 (sha256
3077 (base32
3078 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
3079 (build-system python-build-system)
3080 (propagated-inputs
3081 `(("python-six" ,python-six)
3082 ("python-snowballstemmer" ,python-snowballstemmer)))
3083 (home-page
3084 "https://github.com/PyCQA/pydocstyle/")
3085 (synopsis "Python docstring style checker")
3086 (description
3087 "This package provides a style checker for the Python Language
3088Server (PLS).")
3089 (license license:expat)))
3090
be4d840c
BG
3091(define-public python-language-server
3092 (package
3093 (name "python-language-server")
ccbaeba3 3094 (version "0.26.1")
be4d840c
BG
3095 (source
3096 (origin
3097 (method url-fetch)
3098 (uri (pypi-uri "python-language-server" version))
3099 (sha256
3100 (base32
ccbaeba3 3101 "1vs9ckfmm534n1hq3m871916wsjvi5h4gyj6wlzg13ck6506lx0s"))))
be4d840c
BG
3102 (build-system python-build-system)
3103 (propagated-inputs
3104 `(("python-pluggy" ,python-pluggy)
3105 ("python-jsonrpc-server" ,python-jsonrpc-server)
3106 ("python-jedi" ,python-jedi)
3107 ("python-yapf" ,python-yapf)
3108 ("python-pyflakes" ,python-pyflakes)
3109 ("python-pydocstyle" ,python-pydocstyle)
3110 ("python-pycodestyle" ,python-pycodestyle)
3111 ("python-mccabe" ,python-mccabe)
3112 ("python-rope" ,python-rope)
fe4a4bd2
BG
3113 ("python-autopep8" ,python-autopep8)
3114 ("python-pylint" ,python-pylint)))
be4d840c
BG
3115 (home-page "https://github.com/palantir/python-language-server")
3116 (synopsis "Python implementation of the Language Server Protocol")
3117 (description
3118 "The Python Language Server (pyls) is an implementation of the Python 3
3119language specification for the Language Server Protocol (LSP). This tool is
3120used in text editing environments to provide a complete and integrated
3121feature-set for programming Python effectively.")
3122 (license license:expat)))
3123
44d10b1f
RW
3124(define-public python-black
3125 (package
3126 (name "python-black")
3127 (version "18.6b4")
3128 (source
3129 (origin
3130 (method url-fetch)
3131 (uri (pypi-uri "black" version))
3132 (sha256
3133 (base32
3134 "0i4sfqgz6w15vd50kbhi7g7rifgqlf8yfr8y78rypd56q64qn592"))))
3135 (build-system python-build-system)
3136 (arguments
3137 `(#:phases
3138 (modify-phases %standard-phases
3139 (add-after 'patch-source-shebangs 'patch-extra-shebangs
3140 (lambda _
3141 (let ((python3 (which "python3")))
3142 (substitute* '("tests/data/fmtonoff.py"
3143 "tests/data/string_prefixes.py"
3144 "tests/data/function.py")
3145 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
3146 (string-append "#!" python3 (if (string? minor-version)
3147 minor-version
3148 ""))))))))))
3149 (propagated-inputs
3150 `(("python-click" ,python-click)
3151 ("python-attrs" ,python-attrs)
3152 ("python-appdirs" ,python-appdirs)
3153 ("python-toml" ,python-toml)))
3154 (home-page "https://github.com/ambv/black")
3155 (synopsis "The uncompromising code formatter")
3156 (description "Black is the uncompromising Python code formatter.")
3157 (license license:expat)))
3158
3159(define-public python-blinker
3160 (package
3161 (name "python-blinker")
3162 (version "1.4")
3163 (source
3164 (origin
3165 (method url-fetch)
3166 (uri (pypi-uri "blinker" version))
3167 (sha256
3168 (base32
3169 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3170 (build-system python-build-system)
3171 (home-page "http://pythonhosted.org/blinker/")
3172 (synopsis "Fast, simple object-to-object and broadcast signaling")
3173 (description
3174 "Blinker provides a fast dispatching system that allows any number of
3175interested parties to subscribe to events, or \"signals\".")
3176 (license license:expat)))
3177
3178(define-public python2-blinker
3179 (package-with-python2 python-blinker))
3180
3181(define-public pelican
3182 (package
3183 (name "pelican")
aa71b690 3184 (version "4.0.1")
44d10b1f
RW
3185 (source
3186 (origin
3187 (method url-fetch)
3188 (uri (pypi-uri "pelican" version))
3189 (sha256
3190 (base32
aa71b690 3191 "05yda7n6r0ll18fpdjzkzyr0ls8hbb86fnjyb33k9jvv5avah2lr"))))
44d10b1f
RW
3192 (build-system python-build-system)
3193 (propagated-inputs
3194 `(("python-feedgenerator" ,python-feedgenerator)
3195 ("python-jinja2" ,python-jinja2)
3196 ("python-pygments" ,python-pygments)
3197 ("python-docutils" ,python-docutils)
3198 ("python-pytz" ,python-pytz)
3199 ("python-blinker" ,python-blinker)
3200 ("python-unidecode" ,python-unidecode)
3201 ("python-six" ,python-six)
3202 ("python-dateutil" ,python-dateutil)
3203 ("python-markdown" ,python-markdown)))
3204 (home-page "https://getpelican.com/")
3205 (arguments
3206 `(;; XXX Requires a lot more packages to do unit tests :P
3207 #:tests? #f
3208 #:phases (modify-phases %standard-phases
3209 (add-before
3210 'install 'adjust-requires
3211 ;; Since feedgenerator is installed from git, it doesn't
3212 ;; conform to the version requirements.
3213 ;;
3214 ;; We *do have* "feedgenerator >= 1.6", but strip off the
3215 ;; version requirement so setuptools doesn't get confused.
3216 (lambda _
3217 (substitute* "setup.py"
3218 (("['\"]feedgenerator.*?['\"]")
3219 "'feedgenerator'")))))))
3220 (synopsis "Python-based static site publishing system")
3221 (description
3222 "Pelican is a tool to generate a static blog from reStructuredText,
3223Markdown input files, and more. Pelican uses Jinja2 for templating
3224and is very extensible.")
3225 (license license:agpl3+)))
3226
3227(define-public python-scikit-image
3228 (package
3229 (name "python-scikit-image")
9ff04084 3230 (version "0.14.2")
44d10b1f
RW
3231 (source
3232 (origin
3233 (method url-fetch)
3234 (uri (pypi-uri "scikit-image" version))
3235 (sha256
9ff04084 3236 (base32 "07qchljkyxvg5nrm12fvszi7pmjk4m01qp0w0z8syxzxxs20pz8s"))))
44d10b1f
RW
3237 (build-system python-build-system)
3238 (arguments
3239 ;; TODO: Some tests require running X11 server. Disable them?
3240 '(#:tests? #f))
3241 ;; See DEPENDS.txt for the list of build and run time requiremnts
3242 (propagated-inputs
3243 `(("python-cloudpickle" ,python-cloudpickle)
3244 ("python-dask" ,python-dask)
3245 ("python-matplotlib" ,python-matplotlib)
3246 ("python-networkx" ,python-networkx)
3247 ("python-numpy" ,python-numpy)
3248 ("python-pillow" ,python-pillow)
3249 ("python-pywavelets" ,python-pywavelets)
3250 ("python-scipy" ,python-scipy)
3251 ("python-six" ,python-six)))
3252 (native-inputs
3253 `(("python-cython" ,python-cython)))
3254 (home-page "http://scikit-image.org/")
3255 (synopsis "Image processing in Python")
3256 (description
3257 "Scikit-image is a collection of algorithms for image processing.")
3258 (license license:bsd-3)))
3259
3260(define-public python2-scikit-image
3261 (package-with-python2 python-scikit-image))
3262
3263(define-public python-cython
3264 (package
3265 (name "python-cython")
11bab809 3266 (version "0.29.7")
44d10b1f
RW
3267 (source
3268 (origin
3269 (method url-fetch)
3270 (uri (pypi-uri "Cython" version))
3271 (sha256
3272 (base32
11bab809 3273 "1s61hq2ikawxp6qvmkbfvvaxy9rqj67cddzwgcfc3dwi44b83l2m"))))
44d10b1f
RW
3274 (build-system python-build-system)
3275 ;; we need the full python package and not just the python-wrapper
3276 ;; because we need libpython3.3m.so
3277 (inputs
3278 `(("python" ,python)))
3279 (arguments
3280 `(#:phases
3281 (modify-phases %standard-phases
3282 (add-before 'check 'set-HOME
3283 ;; some tests require access to "$HOME/.cython"
3284 (lambda _ (setenv "HOME" "/tmp") #t))
3285
3286 ;; FIXME: These tests started failing on armhf after the 0.28 update
3287 ;; (commit c69d11c5930), both with an error such as this:
3288 ;; compiling (cpp) and running dictcomp ...
3289 ;; === C/C++ compiler error output: ===
3290 ;; ‘
3291 ;; dictcomp.cpp:5221: confused by earlier errors, bailing out
3292 ;; See <https://hydra.gnu.org/build/2948724> for logs.
3293 ,@(if (target-arm32?)
3294 `((add-before 'check 'disable-failing-tests
3295 (lambda _
3296 (let ((disabled-tests (open-file "tests/bugs.txt" "a")))
3297 (for-each (lambda (test)
3298 (format disabled-tests "~a\n" test))
3299 '("memslice" "dictcomp"))
3300 (close-port disabled-tests)))))
3301 '())
3302
3303 (replace 'check
3304 (lambda _
44d10b1f
RW
3305 (invoke "python" "runtests.py" "-vv"))))))
3306 (home-page "http://cython.org/")
3307 (synopsis "C extensions for Python")
3308 (description "Cython is an optimising static compiler for both the Python
3309programming language and the extended Cython programming language. It makes
3310writing C extensions for Python as easy as Python itself.")
3311 (license license:asl2.0)
3312 (properties `((python2-variant . ,(delay python2-cython))))))
3313
3314(define-public python2-cython
3315 (package (inherit (package-with-python2
3316 (strip-python2-variant python-cython)))
3317 (name "python2-cython")
3318 (inputs
3319 `(("python-2" ,python-2))))) ; this is not automatically changed
3320
3321;; The RPython toolchain currently does not support Python 3.
3322(define-public python2-rpython
3323 (package
3324 (name "python2-rpython")
3325 (version "0.2.1")
3326 (source
3327 (origin
3328 (method url-fetch)
3329 (uri (pypi-uri "rpython" version))
3330 (sha256
3331 (base32
3332 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
3333 (build-system python-build-system)
3334 (arguments `(#:python ,python-2))
3335 (native-inputs
3336 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3337 (home-page "https://rpython.readthedocs.org")
3338 (synopsis "Framework for implementing interpreters and virtual machines")
3339 (description "RPython is a translation and support framework for
3340producing implementations of dynamic languages, emphasizing a clean separation
3341between language specification and implementation aspects.")
3342 (license license:expat)))
3343
3344;; NOTE: when upgrading numpy please make sure that python-pandas and
3345;; python-scipy still build, as these three packages are often used together.
3346(define-public python-numpy
3347 (package
3348 (name "python-numpy")
3349 (version "1.15.4")
3350 (source
3351 (origin
3352 (method url-fetch)
3353 (uri (string-append
3354 "https://github.com/numpy/numpy/releases/download/v"
3355 version "/numpy-" version ".tar.gz"))
3356 (sha256
3357 (base32
3358 "102vcl2qq4pjbm7a3d67vkkvn4466ngia1d8wi5avqwqh8j0jvkn"))))
3359 (build-system python-build-system)
3360 (inputs
3361 `(("openblas" ,openblas)
3362 ("lapack" ,lapack)))
3363 (native-inputs
3364 `(("python-cython" ,python-cython)
3365 ("python-pytest" ,python-pytest)
3366 ("gfortran" ,gfortran)))
3367 (arguments
3368 `(#:phases
3369 (modify-phases %standard-phases
3370 (add-before 'build 'configure-blas-lapack
3371 (lambda* (#:key inputs #:allow-other-keys)
3372 (call-with-output-file "site.cfg"
3373 (lambda (port)
3374 (format port
3375 "[openblas]
3376libraries = openblas
3377library_dirs = ~a/lib
3378include_dirs = ~a/include
3379
3380# backslash-n to make emacs happy
3381\n[lapack]
3382lapack_libs = lapack
3383library_dirs = ~a/lib
3384include_dirs = ~a/include
3385"
3386 (assoc-ref inputs "openblas")
3387 (assoc-ref inputs "openblas")
3388 (assoc-ref inputs "lapack")
3389 (assoc-ref inputs "lapack"))))
3390 #t))
3391 (add-before 'build 'fix-executable-paths
3392 (lambda* (#:key inputs #:allow-other-keys)
3393 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
3394 ;; instead of /bin/sh.
3395 (substitute* "numpy/distutils/exec_command.py"
3396 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
3397 (string-append match-start (assoc-ref inputs "bash") match-end)))
3398 ;; Use "gcc" executable, not "cc".
3399 (substitute* "numpy/distutils/system_info.py"
3400 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3401 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3402 #t))
3403 ;; Tests can only be run after the library has been installed and not
3404 ;; within the source directory.
3405 (delete 'check)
3406 (add-after 'install 'check
3407 (lambda* (#:key outputs inputs #:allow-other-keys)
3408 ;; Make installed package available for running the tests
3409 (add-installed-pythonpath inputs outputs)
3410 ;; Make sure "f2py" etc is found.
3411 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
3412 ":" (getenv "PATH")))
3413 (with-directory-excursion "/tmp"
3414 (invoke "python" "-c"
3415 "import numpy; numpy.test(verbose=2)")))))))
3416 (home-page "http://www.numpy.org/")
3417 (synopsis "Fundamental package for scientific computing with Python")
3418 (description "NumPy is the fundamental package for scientific computing
3419with Python. It contains among other things: a powerful N-dimensional array
3420object, sophisticated (broadcasting) functions, tools for integrating C/C++
3421and Fortran code, useful linear algebra, Fourier transform, and random number
3422capabilities.")
3423 (license license:bsd-3)))
3424
3425(define-public python2-numpy
3426 (package-with-python2 python-numpy))
3427
3428;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
3429;; interest only for legacy code going back to NumPy's predecessor
3430;; Numeric.
3431(define-public python2-numpy-1.8
3432 (package (inherit python2-numpy)
3433 (version "1.8.2")
3434 (source
3435 (origin
3436 (method url-fetch)
3437 (uri (string-append
3438 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
3439 (file-name (string-append "python2-numpy-" version ".tar.gz"))
3440 (sha256
3441 (base32
3442 "0sc20gz1b17xnyrkp5frca3ql5qfalpv916hfg2kqxpwr6jg0f1g"))))
3443 (arguments
3444 (substitute-keyword-arguments (package-arguments python2-numpy)
3445 ((#:phases phases)
3446 `(modify-phases ,phases
3447 (replace 'configure-blas-lapack
3448 (lambda* (#:key inputs #:allow-other-keys)
3449 (call-with-output-file "site.cfg"
3450 (lambda (port)
3451 (format port
3452 "[openblas]
3453libraries = openblas,lapack
3454library_dirs = ~a/lib:~a/lib
3455include_dirs = ~a/include:~a/include
3456"
3457 (assoc-ref inputs "openblas")
3458 (assoc-ref inputs "lapack")
3459 (assoc-ref inputs "openblas")
3460 (assoc-ref inputs "lapack"))))
3461 #t))))))
3462 (native-inputs
3463 `(("python2-nose" ,python2-nose)))
3464 (description "NumPy is the fundamental package for scientific computing
3465with Python. It contains among other things: a powerful N-dimensional array
3466object, sophisticated (broadcasting) functions, tools for integrating C/C++
3467and Fortran code, useful linear algebra, Fourier transform, and random number
3468capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
3469that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
3470Numeric.")
3471 (license license:bsd-3)))
3472
3473(define-public python-munch
3474 (package
3475 (name "python-munch")
3476 (version "2.0.4")
3477 (source
3478 (origin
3479 (method url-fetch)
3480 (uri (pypi-uri "munch" version))
3481 (sha256
3482 (base32
3483 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3484 (build-system python-build-system)
3485 (home-page "https://github.com/Infinidat/munch")
3486 (synopsis "Dot-accessible dictionary")
3487 (description "Munch is a dot-accessible dictionary similar to JavaScript
3488objects.")
3489 (license license:expat)))
3490
3491(define-public python2-munch
3492 (package-with-python2 python-munch))
3493
3494(define-public python-colormath
3495 (package
3496 (name "python-colormath")
3497 (version "3.0.0")
3498 (source
3499 (origin
3500 (method url-fetch)
3501 (uri (pypi-uri "colormath" version))
3502 (sha256
3503 (base32
3504 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3505 (build-system python-build-system)
3506 (propagated-inputs
3507 `(("python-networkx" ,python-networkx)
3508 ("python-numpy" ,python-numpy)))
3509 (home-page "https://github.com/gtaylor/python-colormath")
3510 (synopsis "Color math and conversion library")
3511 (description
3512 "This is a Python library for color math and conversions.")
3513 (license license:bsd-3)))
3514
3515(define-public python2-colormath
3516 (package-with-python2 python-colormath))
3517
3518(define-public python-spectra
3519 (package
3520 (name "python-spectra")
3521 (version "0.0.11")
3522 (source
3523 (origin
3524 (method url-fetch)
3525 (uri (pypi-uri "spectra" version))
3526 (sha256
3527 (base32
3528 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3529 (build-system python-build-system)
3530 (arguments
3531 `(#:phases
3532 (modify-phases %standard-phases
3533 (replace 'check
38ec0f6a 3534 (lambda _ (invoke "nosetests" "-v"))))))
44d10b1f
RW
3535 (propagated-inputs
3536 `(("python-colormath" ,python-colormath)))
3537 (native-inputs
3538 `(("python-nose" ,python-nose)))
3539 (home-page "https://github.com/jsvine/spectra")
3540 (synopsis "Color scales and color conversion")
3541 (description
3542 "This package provides a Python library intended to make color math,
3543color scales, and color space conversion easy. It has support for:
3544
3545@enumerate
3546@item Color scales
3547@item Color ranges
3548@item Color blending
3549@item Brightening/darkening colors
3550@item Saturating/desaturating colors
3551@item Conversion to/from multiple color spaces.
3552@end enumerate\n")
3553 (license license:expat)))
3554
3555(define-public python2-spectra
3556 (package-with-python2 python-spectra))
3557
3558(define-public python-numpy-documentation
3559 (package
3560 (name "python-numpy-documentation")
3561 (version (package-version python-numpy))
3562 (source (package-source python-numpy))
3563 (build-system python-build-system)
3564 (native-inputs
3565 `(("python-matplotlib" ,python-matplotlib)
3566 ("python-numpy" ,python-numpy)
3567 ("pkg-config" ,pkg-config)
3568 ("python-sphinx" ,python-sphinx)
3569 ("python-numpydoc" ,python-numpydoc)
3570 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
3571 texlive-fonts-cm-super
3572 texlive-fonts-ec
3573 texlive-generic-ifxetex
3574 texlive-generic-pdftex
3575 texlive-latex-amsfonts
3576 texlive-latex-capt-of
3577 texlive-latex-cmap
3578 texlive-latex-environ
3579 texlive-latex-eqparbox
3580 texlive-latex-etoolbox
3581 texlive-latex-expdlist
3582 texlive-latex-fancyhdr
3583 texlive-latex-fancyvrb
3584 texlive-latex-fncychap
3585 texlive-latex-float
3586 texlive-latex-framed
3587 texlive-latex-geometry
3588 texlive-latex-graphics
3589 texlive-latex-hyperref
3590 texlive-latex-mdwtools
3591 texlive-latex-multirow
3592 texlive-latex-needspace
3593 texlive-latex-oberdiek
3594 texlive-latex-parskip
3595 texlive-latex-preview
3596 texlive-latex-tabulary
3597 texlive-latex-threeparttable
3598 texlive-latex-titlesec
3599 texlive-latex-trimspaces
3600 texlive-latex-ucs
3601 texlive-latex-upquote
3602 texlive-latex-url
3603 texlive-latex-varwidth
3604 texlive-latex-wrapfig)))
3605 ("texinfo" ,texinfo)
3606 ("perl" ,perl)
3607 ("scipy-sphinx-theme"
3608 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3609 (method git-fetch)
3610 (uri (git-reference
3611 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3612 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3613 (sha256
3614 (base32
3615 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3616 ,@(package-native-inputs python-numpy)))
3617 (arguments
3618 `(#:tests? #f ; we're only generating the documentation
3619 #:phases
3620 (modify-phases %standard-phases
3621 (delete 'build)
3622 (replace 'install
3623 (lambda* (#:key inputs outputs #:allow-other-keys)
3624 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3625 (doc (string-append
3626 data "/doc/" ,name "-"
3627 ,(package-version python-numpy)))
3628 (info-reader (string-append data "/info"))
3629 (html (string-append doc "/html"))
3630 (scipy-sphinx-theme "scipy-sphinx-theme")
3631 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3632 (pyver ,(string-append "PYVER=")))
3633
3634 ;; FIXME: this is needed to for texlive-union to generate
3635 ;; fonts, which are not found.
3636 (setenv "HOME" "/tmp")
3637
3638 (with-directory-excursion "doc"
3639 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3640 (mkdir-p html)
4fc898da
RW
3641 (invoke "make" "html" pyver)
3642 (invoke "make" "latex" "PAPER=a4" pyver)
3643 (invoke "make" "-C" "build/latex"
44d10b1f
RW
3644 "all-pdf" "PAPER=a4" pyver)
3645 ;; FIXME: Generation of the info file fails.
4fc898da 3646 ;; (invoke "make" "info" pyver)
44d10b1f
RW
3647 ;; (mkdir-p info)
3648 ;; (copy-file "build/texinfo/numpy.info"
3649 ;; (string-append info "/numpy.info"))
3650 (for-each (lambda (file)
3651 (copy-file (string-append "build/latex" file)
3652 (string-append doc file)))
3653 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3654 (with-directory-excursion "build/html"
3655 (for-each (lambda (file)
3656 (let* ((dir (dirname file))
3657 (tgt-dir (string-append html "/" dir)))
3658 (unless (equal? "." dir)
3659 (mkdir-p tgt-dir))
3660 (install-file file html)))
3661 (find-files "." ".*")))))
3662 #t)))))
3663 (home-page (package-home-page python-numpy))
3664 (synopsis "Documentation for the python-numpy package")
3665 (description (package-description python-numpy))
3666 (license (package-license python-numpy))))
3667
3668(define-public python2-numpy-documentation
3669 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3670 (package
3671 (inherit numpy-documentation)
3672 (native-inputs `(("python2-functools32" ,python2-functools32)
3673 ,@(package-native-inputs numpy-documentation))))))
3674
3675(define-public python-pygit2
3676 (package
3677 (name "python-pygit2")
c3ecab0d 3678 (version "0.28.0")
44d10b1f
RW
3679 (source
3680 (origin
3681 (method url-fetch)
3682 (uri (pypi-uri "pygit2" version))
3683 (sha256
c3ecab0d 3684 (base32 "0lngsaz029d4fjcwhl17pr59nh9gwl6hwfin36nph60fgsmfdg3d"))))
44d10b1f
RW
3685 (build-system python-build-system)
3686 (arguments
c3ecab0d 3687 '(#:tests? #f)) ; tests don't run correctly in our environment
44d10b1f
RW
3688 (propagated-inputs
3689 `(("python-six" ,python-six)
3690 ("python-cffi" ,python-cffi)
3691 ("libgit2" ,libgit2)
3692 ("python-tox" ,python-tox)))
3693 (native-inputs
3694 `(("python-pytest" ,python-pytest)))
3695 (home-page "https://github.com/libgit2/pygit2")
3696 (synopsis "Python bindings for libgit2")
3697 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3698library, libgit2 implements Git plumbing.")
3699 ;; GPL2.0 only, with linking exception.
3700 (license license:gpl2)))
3701
3702(define-public python2-pygit2
3703 (package-with-python2 python-pygit2))
3704
3705(define-public python-pyparsing
3706 (package
3707 (name "python-pyparsing")
6d3cff5a 3708 (version "2.3.1")
44d10b1f
RW
3709 (source
3710 (origin
3711 (method url-fetch)
3712 (uri (pypi-uri "pyparsing" version))
3713 (sha256
6d3cff5a 3714 (base32 "0yk6xl885b91dmlhlsap7x78hk2rdr879fln9anbq6k4ca42djb6"))))
44d10b1f
RW
3715 (build-system python-build-system)
3716 (outputs '("out" "doc"))
3717 (arguments
3718 `(#:tests? #f ; no test target
3719 #:phases
3720 (modify-phases %standard-phases
3721 (add-after 'install 'install-doc
3722 (lambda* (#:key outputs #:allow-other-keys)
3723 (let* ((doc (string-append (assoc-ref outputs "doc")
3724 "/share/doc/" ,name "-" ,version))
3725 (html-doc (string-append doc "/html"))
3726 (examples (string-append doc "/examples")))
3727 (mkdir-p html-doc)
3728 (mkdir-p examples)
3729 (for-each
3730 (lambda (dir tgt)
3731 (map (lambda (file)
3732 (install-file file tgt))
3733 (find-files dir ".*")))
3734 (list "docs" "htmldoc" "examples")
3735 (list doc html-doc examples))
3736 #t))))))
3737 (home-page "https://github.com/pyparsing/pyparsing")
3738 (synopsis "Python parsing class library")
3739 (description
3740 "The pyparsing module is an alternative approach to creating and
3741executing simple grammars, vs. the traditional lex/yacc approach, or the use
3742of regular expressions. The pyparsing module provides a library of classes
3743that client code uses to construct the grammar directly in Python code.")
3744 (license license:expat)))
3745
3746(define-public python2-pyparsing
3747 (package-with-python2 python-pyparsing))
3748
3749(define-public python-numpydoc
3750 (package
3751 (name "python-numpydoc")
3752 (version "0.8.0")
3753 (source
3754 (origin
3755 (method url-fetch)
3756 (uri (pypi-uri "numpydoc" version))
3757 (sha256
3758 (base32
3759 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
3760 (build-system python-build-system)
3761 (propagated-inputs
3762 `(("python-sphinx" ,python-sphinx)))
3763 (native-inputs
3764 `(("python-nose" ,python-nose)))
3765 (home-page "https://pypi.python.org/pypi/numpydoc")
3766 (synopsis
3767 "Numpy's Sphinx extensions")
3768 (description
3769 "Sphinx extension to support docstrings in Numpy format.")
3770 (license license:bsd-2)))
3771
3772(define-public python2-numpydoc
3773 (package-with-python2 python-numpydoc))
3774
3775(define-public python-numexpr
3776 (package
3777 (name "python-numexpr")
3778 (version "2.6.5")
3779 (source
3780 (origin
3781 (method url-fetch)
3782 (uri (pypi-uri "numexpr" version))
3783 (sha256
3784 (base32
3785 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3786 (build-system python-build-system)
3787 (arguments `(#:tests? #f)) ; no tests included
3788 (propagated-inputs
3789 `(("python-numpy" ,python-numpy)))
3790 (home-page "https://github.com/pydata/numexpr")
3791 (synopsis "Fast numerical expression evaluator for NumPy")
3792 (description
3793 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3794expressions that operate on arrays are accelerated and use less memory than
3795doing the same calculation in Python. In addition, its multi-threaded
3796capabilities can make use of all your cores, which may accelerate
3797computations, most specially if they are not memory-bounded (e.g. those using
3798transcendental functions).")
3799 (license license:expat)))
3800
3801(define-public python2-numexpr
3802 (package-with-python2 python-numexpr))
3803
3804(define-public python-cycler
3805 (package
3806 (name "python-cycler")
3807 (version "0.10.0")
3808 (source (origin
3809 (method url-fetch)
3810 (uri (pypi-uri "cycler" version))
3811 (sha256
3812 (base32
3813 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3814 (build-system python-build-system)
3815 (arguments
3816 ;; XXX: The current version requires 'coveralls' which we don't have.
3817 ;; Enable this for the next release which uses 'python-pytest'.
3818 '(#:tests? #f))
3819 (propagated-inputs
3820 `(("python-six" ,python-six)))
3821 (home-page "http://matplotlib.org/cycler/")
3822 (synopsis "Composable keyword argument iterator")
3823 (description
3824 "When using @code{matplotlib} and plotting more than one line, it is
3825common to want to be able to want to be able to cycle over one or more artist
3826styles; but the plotting logic can quickly become involved.
3827To address this and enable easy cycling over arbitrary @code{kwargs}, the
3828@code{Cycler} class was developed.")
3829 (license license:bsd-3)))
3830
3831(define-public python2-cycler
3832 (package-with-python2 python-cycler))
3833
3834(define-public python-colorspacious
3835 (package
3836 (name "python-colorspacious")
3837 (version "1.1.0")
3838 (source
dee92e65
TGR
3839 (origin
3840 (method git-fetch)
3841 (uri (git-reference
3842 (url "https://github.com/njsmith/colorspacious.git")
3843 (commit (string-append "v" version))))
3844 (file-name (git-file-name name version))
3845 (sha256
3846 (base32 "0g0lxqiscy5g5rq9421vv7abg0c90jzy0zmas2z3hya6k2dr5aid"))))
44d10b1f
RW
3847 (build-system python-build-system)
3848 (propagated-inputs
3849 `(("python-numpy" ,python-numpy)))
3850 (native-inputs
3851 `(("python-nose" ,python-nose)))
3852 (arguments
3853 `(#:phases
3854 (modify-phases %standard-phases
3855 (replace 'check
3856 (lambda _
c988afda 3857 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
44d10b1f
RW
3858 (home-page "https://github.com/njsmith/colorspacious")
3859 (synopsis "Python library for colorspace conversions")
3860 (description "@code{colorspacious} is a Python library that lets you
3861convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3862 (license license:expat)))
3863
3864(define-public python2-colorspacious
3865 (package-with-python2 python-colorspacious))
3866
3867(define-public python-matplotlib
3868 (package
3869 (name "python-matplotlib")
3870 (version "2.2.3")
3871 (source
3872 (origin
3873 (method url-fetch)
3874 (uri (pypi-uri "matplotlib" version))
3875 (sha256
3876 (base32
3877 "1rcc7x9ig3hpchkc4cwdvym3y451w74275fxr455zkfagrsvymbk"))))
3878 (build-system python-build-system)
3879 (propagated-inputs ; the following packages are all needed at run time
3880 `(("python-cycler" ,python-cycler)
3881 ("python-kiwisolver" ,python-kiwisolver)
3882 ("python-pyparsing" ,python-pyparsing)
3883 ("python-pygobject" ,python-pygobject)
3884 ("gobject-introspection" ,gobject-introspection)
3885 ("python-tkinter" ,python "tk")
3886 ("python-dateutil" ,python-dateutil)
3887 ("python-numpy" ,python-numpy)
3888 ("python-pillow" ,python-pillow)
3889 ("python-pytz" ,python-pytz)
3890 ("python-six" ,python-six)
3891 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3892 ;; from 'gtk+') provides the required 'typelib' files used by
3893 ;; 'gobject-introspection'. The location of these files is set with the
3894 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3895 ;; is done automatically by a 'native-search-path' procedure. However,
3896 ;; at run-time the user must set this variable as follows:
3897 ;;
3898 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
3899 ("gtk+" ,gtk+)
3900 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3901 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3902 ;; object. For this reason we need to import both libraries.
3903 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3904 ("python-pycairo" ,python-pycairo)
3905 ;; XXX: qtwebkit cannot be built reliably.
3906 ("python-pyqt" ,python-pyqt-without-qtwebkit)
3907 ("python-cairocffi" ,python-cairocffi)))
3908 (inputs
3909 `(("libpng" ,libpng)
3910 ("imagemagick" ,imagemagick)
3911 ("freetype" ,freetype)
3912 ("cairo" ,cairo)
3913 ("glib" ,glib)
3914 ;; FIXME: Add backends when available.
3915 ;("python-wxpython" ,python-wxpython)
3916 ("tcl" ,tcl)
3917 ("tk" ,tk)))
3918 (native-inputs
3919 `(("pkg-config" ,pkg-config)
3920 ("python-nose" ,python-nose)
3921 ("python-mock" ,python-mock)))
3922 (arguments
3923 `(#:phases
3924 (modify-phases %standard-phases
3925 (add-before 'build 'configure-environment
3926 (lambda* (#:key outputs inputs #:allow-other-keys)
3927 (let ((cairo (assoc-ref inputs "cairo"))
3928 (gtk+ (assoc-ref inputs "gtk+")))
3929 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3930 ;; has not effect.
3931 (setenv "LD_LIBRARY_PATH"
3932 (string-append cairo "/lib:" gtk+ "/lib"))
3933 (setenv "HOME" (getcwd))
3934 (call-with-output-file "setup.cfg"
3935 (lambda (port)
3936 (format port "[directories]~%
3937basedirlist = ~a,~a~%
3938 [rc_options]~%
3939backend = TkAgg~%"
3940 (assoc-ref inputs "tcl")
3941 (assoc-ref inputs "tk")))))
3942 #t)))))
3943 (home-page "http://matplotlib.org")
3944 (synopsis "2D plotting library for Python")
3945 (description
3946 "Matplotlib is a Python 2D plotting library which produces publication
3947quality figures in a variety of hardcopy formats and interactive environments
3948across platforms. Matplotlib can be used in Python scripts, the python and
3949ipython shell, web application servers, and six graphical user interface
3950toolkits.")
3951 (license license:psfl)
3952 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3953
3954(define-public python2-matplotlib
3955 (let ((matplotlib (package-with-python2
3956 (strip-python2-variant python-matplotlib))))
3957 (package (inherit matplotlib)
3958 ;; Make sure to use special packages for Python 2 instead
3959 ;; of those automatically rewritten by package-with-python2.
3960 (propagated-inputs
3961 `(("python2-pycairo" ,python2-pycairo)
3962 ("python2-backports-functools-lru-cache"
3963 ,python2-backports-functools-lru-cache)
3964 ("python2-functools32" ,python2-functools32)
3965 ("python2-pygobject-2" ,python2-pygobject-2)
3966 ("python2-subprocess32" ,python2-subprocess32)
3967 ("python2-tkinter" ,python-2 "tk")
3968 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3969 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
3970
3971(define-public python-matplotlib-documentation
3972 (package
3973 (name "python-matplotlib-documentation")
3974 (version (package-version python-matplotlib))
3975 (source (package-source python-matplotlib))
3976 (build-system python-build-system)
3977 (native-inputs
3978 `(("python-matplotlib" ,python-matplotlib)
3979 ("python-colorspacious" ,python-colorspacious)
3980 ("python-sphinx" ,python-sphinx)
3981 ("python-sphinx-gallery" ,python-sphinx-gallery)
3982 ("python-numpydoc" ,python-numpydoc)
3983 ("python-ipython" ,python-ipython)
e7a53914 3984 ("python-ipykernel" ,python-ipykernel)
44d10b1f
RW
3985 ("python-mock" ,python-mock)
3986 ("graphviz" ,graphviz)
e7a53914
RW
3987 ("texlive" ,(texlive-union (list texlive-latex-amsfonts
3988 texlive-latex-amsmath
3989 texlive-latex-enumitem
3990 texlive-latex-expdlist
3991 texlive-latex-geometry
3992 texlive-latex-preview
3993 texlive-latex-type1cm
3994 texlive-latex-ucs
3995
3996 texlive-generic-pdftex
3997
3998 texlive-fonts-amsfonts
3999 texlive-fonts-ec
4000 texlive-fonts-adobe-times
4001 texlive-fonts-txfonts)))
44d10b1f
RW
4002 ("texinfo" ,texinfo)
4003 ,@(package-native-inputs python-matplotlib)))
4004 (arguments
4005 `(#:tests? #f ; we're only generating documentation
4006 #:phases
4007 (modify-phases %standard-phases
4008 (replace 'build
4009 (lambda _
4010 (chdir "doc")
e7a53914
RW
4011 (setenv "PYTHONPATH"
4012 (string-append (getenv "PYTHONPATH")
4013 ":" (getcwd) "/../examples/units"))
44d10b1f 4014 (substitute* "conf.py"
e7a53914
RW
4015 ;; Don't use git.
4016 (("^SHA = check_output.*")
4017 (string-append "SHA = \"" ,version "\"\n"))
4018 ;; Don't fetch intersphinx files from the Internet
4019 (("^explicit_order_folders" m)
4020 (string-append "intersphinx_mapping = {}\n" m))
4021 (("'sphinx.ext.intersphinx',") "")
4022 ;; Disable URL embedding which requires internet access.
4023 (("'https://docs.scipy.org/doc/numpy'") "None")
4024 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
4025 (invoke "make"
4026 "SPHINXBUILD=sphinx-build"
4027 "SPHINXOPTS=" ; don't abort on warnings
4028 "html" "texinfo")))
44d10b1f
RW
4029 (replace 'install
4030 (lambda* (#:key inputs outputs #:allow-other-keys)
4031 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4032 (doc (string-append data "/doc/python-matplotlib-" ,version))
4033 (info (string-append data "/info"))
4034 (html (string-append doc "/html")))
4035 (mkdir-p html)
4036 (mkdir-p info)
4037 (copy-recursively "build/html" html)
4038 (symlink (string-append html "/_images")
4039 (string-append info "/matplotlib-figures"))
4040 (with-directory-excursion "build/texinfo"
4041 (substitute* "matplotlib.texi"
4042 (("@image\\{([^,]*)" all file)
4043 (string-append "@image{matplotlib-figures/" file)))
4044 (symlink (string-append html "/_images")
4045 "./matplotlib-figures")
e7a53914
RW
4046 (invoke "makeinfo" "--no-split"
4047 "-o" "matplotlib.info" "matplotlib.texi"))
4048 (install-file "build/texinfo/matplotlib.info" info))
44d10b1f
RW
4049 #t)))))
4050 (home-page (package-home-page python-matplotlib))
4051 (synopsis "Documentation for the python-matplotlib package")
4052 (description (package-description python-matplotlib))
4053 (license (package-license python-matplotlib))))
4054
4055(define-public python2-matplotlib-documentation
4056 (package-with-python2 python-matplotlib-documentation))
4057
4058(define-public python2-pysnptools
4059 (package
4060 (name "python2-pysnptools")
5d1ade85 4061 (version "0.3.13")
44d10b1f
RW
4062 (source
4063 (origin
4064 (method url-fetch)
5d1ade85 4065 (uri (pypi-uri "pysnptools" version))
44d10b1f
RW
4066 (sha256
4067 (base32
5d1ade85 4068 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
44d10b1f
RW
4069 (build-system python-build-system)
4070 (arguments
5d1ade85
RW
4071 `(#:python ,python-2 ; only Python 2.7 is supported
4072 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
44d10b1f
RW
4073 (propagated-inputs
4074 `(("python2-numpy" ,python2-numpy)
4075 ("python2-scipy" ,python2-scipy)
4076 ("python2-pandas" ,python2-pandas)))
44d10b1f 4077 (native-inputs
5d1ade85 4078 `(("python2-cython" ,python2-cython)))
1b66989b 4079 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
44d10b1f
RW
4080 (synopsis "Library for reading and manipulating genetic data")
4081 (description
4082 "PySnpTools is a library for reading and manipulating genetic data. It
4083can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4084those files. It can also efficiently manipulate ranges of integers using set
4085operators such as union, intersection, and difference.")
4086 (license license:asl2.0)))
4087
4088(define-public python-scipy
4089 (package
4090 (name "python-scipy")
4091 (version "1.1.0")
4092 (source
4093 (origin
4094 (method url-fetch)
4095 (uri (pypi-uri "scipy" version))
4096 (sha256
4097 (base32
4098 "1lfg686w6vv2m2dfs8v9d0bf2i18z7wz5vgzjnkgmpr4hi0550w7"))))
4099 (build-system python-build-system)
4100 (propagated-inputs
4101 `(("python-numpy" ,python-numpy)
4102 ("python-matplotlib" ,python-matplotlib)
4103 ("python-pyparsing" ,python-pyparsing)))
4104 (inputs
4105 `(("lapack" ,lapack)
4106 ("openblas" ,openblas)))
4107 (native-inputs
4108 `(("python-cython" ,python-cython)
4109 ("python-pytest" ,python-pytest)
4110 ("python-sphinx" ,python-sphinx)
4111 ("python-numpydoc" ,python-numpydoc)
4112 ("gfortran" ,gfortran)
4113 ("perl" ,perl)
4114 ("which" ,which)))
4115 (outputs '("out" "doc"))
4116 (arguments
4117 `(#:phases
4118 (modify-phases %standard-phases
4119 (add-after 'unpack 'disable-broken-tests
4120 (lambda _
4121 (substitute* "scipy/sparse/linalg/dsolve/tests/test_linsolve.py"
4122 (("^( +)def test_threads_parallel\\(self\\):" m indent)
4123 (string-append indent
4124 "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
4125 m)))
4126 (substitute* "scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py"
4127 (("^def test_parallel_threads\\(\\):" m)
4128 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
4129 m)))
4130 #t))
4131 (add-before 'build 'configure-openblas
4132 (lambda* (#:key inputs #:allow-other-keys)
4133 (call-with-output-file "site.cfg"
4134 (lambda (port)
4135 (format port
4136 "[blas]
4137libraries = openblas
4138library_dirs = ~a/lib
4139include_dirs = ~a/include
4140
4141# backslash-n to make emacs happy
4142\n[atlas]
4143library_dirs = ~a/lib
4144atlas_libs = openblas
4145"
4146 (assoc-ref inputs "openblas")
4147 (assoc-ref inputs "openblas")
4148 (assoc-ref inputs "openblas"))))
4149 #t))
4150 (add-after 'install 'install-doc
4151 (lambda* (#:key inputs outputs #:allow-other-keys)
4152 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4153 (doc (string-append data "/doc/" ,name "-" ,version))
4154 (html (string-append doc "/html"))
4155 (pyver ,(string-append "PYVER=" (version-major+minor
4156 (package-version python))))
4157 ;; By default it tries to run sphinx-build through the Python
4158 ;; interpreter which won't work with our shell wrapper.
4159 (sphinxbuild "SPHINXBUILD=LANG=C sphinx-build"))
4160 ;; Make installed package available for building the
4161 ;; documentation
4162 (add-installed-pythonpath inputs outputs)
4163 (with-directory-excursion "doc"
4164 ;; Fix generation of images for mathematical expressions.
4165 (substitute* (find-files "source" "conf\\.py")
4166 (("pngmath_use_preview = True")
4167 "pngmath_use_preview = False"))
4168 (mkdir-p html)
4169 (invoke "make" "html" pyver sphinxbuild)
4170 (with-directory-excursion "build/html"
4171 (for-each (lambda (file)
4172 (let* ((dir (dirname file))
4173 (tgt-dir (string-append html "/" dir)))
4174 (install-file file html)))
4175 (find-files "." ".*")))))
4176 #t))
4177 ;; Tests can only be run after the library has been installed and not
4178 ;; within the source directory.
4179 (delete 'check)
4180 (add-after 'install 'check
4181 (lambda* (#:key inputs outputs #:allow-other-keys)
4182 (add-installed-pythonpath inputs outputs)
4183 (with-directory-excursion "/tmp"
4184 (invoke "python" "-c"
4185 "import scipy; scipy.test(verbose=2)")))))))
4186 (home-page "https://www.scipy.org/")
4187 (synopsis "The Scipy library provides efficient numerical routines")
4188 (description "The SciPy library is one of the core packages that make up
4189the SciPy stack. It provides many user-friendly and efficient numerical
4190routines such as routines for numerical integration and optimization.")
4191 (properties `((python2-variant . ,(delay python2-scipy))))
4192 (license license:bsd-3)))
4193
4194(define-public python2-scipy
4195 (package-with-python2
4196 (strip-python2-variant python-scipy)))
4197
4198(define-public python-socksipy-branch
4199 (package
4200 (name "python-socksipy-branch")
4201 (version "1.01")
4202 (source
4203 (origin
4204 (method url-fetch)
4205 (uri (pypi-uri "SocksiPy-branch" version))
4206 (sha256
4207 (base32
4208 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4209 (build-system python-build-system)
4210 (arguments
4211 `(#:tests? #f)) ; There are no tests
4212 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4213 (synopsis "Python SOCKS module")
4214 (description
4215 "SocksiPy - A Python SOCKS client module. It provides a
4216socket-like interface that supports connections to any TCP
4217service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4218The original version was developed by Dan Haim, this is a
4219branch created by Mario Vilas to address some open issues,
4220as the original project seems to have been abandoned circa 2007.")
4221 (license license:bsd-3)))
4222
4223(define-public python2-socksipy-branch
4224 (package-with-python2 python-socksipy-branch))
4225
4226(define-public python-pycodestyle
4227 (package
4228 (name "python-pycodestyle")
4229 (version "2.4.0")
4230 (source
4231 (origin
4232 (method url-fetch)
4233 (uri (pypi-uri "pycodestyle" version))
4234 (sha256
4235 (base32
4236 "0fhy4vnlgpjq4qd1wdnl6pvdw7rah0ypmn8c9mkhz8clsndskz6b"))))
4237 (build-system python-build-system)
4238 (home-page "https://pycodestyle.readthedocs.io/")
4239 (synopsis "Python style guide checker")
4240 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4241Python code against some of the style conventions in
4242@url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4243 (license license:expat)))
4244
4245(define-public python2-pycodestyle
4246 (package-with-python2 python-pycodestyle))
4247
4248(define-public python-multidict
4249 (package
4250 (name "python-multidict")
4251 (version "4.2.0")
4252 (source
4253 (origin
4254 (method url-fetch)
4255 (uri (pypi-uri "multidict" version))
4256 (sha256
4257 (base32
4258 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
4259 (build-system python-build-system)
4260 (native-inputs
4261 `(("python-pytest" ,python-pytest)
4262 ("python-pytest-runner" ,python-pytest-runner)))
4263 (home-page "https://github.com/aio-libs/multidict/")
4264 (synopsis "Multidict implementation")
4265 (description "Multidict is dict-like collection of key-value pairs
4266where key might be occurred more than once in the container.")
4267 (license license:asl2.0)))
4268
4269(define-public python-orderedmultidict
4270 (package
4271 (name "python-orderedmultidict")
4272 (version "0.7.11")
4273 (source
4274 (origin
4275 (method url-fetch)
4276 (uri (pypi-uri "orderedmultidict" version))
4277 (sha256
4278 (base32
4279 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4280 (build-system python-build-system)
4281 (arguments
4282 `(#:phases
4283 (modify-phases %standard-phases
4284 (add-after 'unpack 'fix-tests
4285 (lambda _
4286 ;; The package uses nosetest for running the tests.
4287 ;; Adding this initfile allows to run the test suite
4288 ;; without requiring nosetest.
d1c4f329
RW
4289 (with-output-to-file "tests/__init__.py" newline)
4290 #t)))))
44d10b1f
RW
4291 (propagated-inputs
4292 `(("python-six" ,python-six)))
4293 (native-inputs
4294 `(("python-pycodestyle" ,python-pycodestyle)))
4295 (home-page "https://github.com/gruns/orderedmultidict")
4296 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4297 (description "This package contains a library for ordered multivalue
4298dictionaries. A multivalue dictionary is a dictionary that can store
4299multiple values for the same key. An ordered multivalue dictionary is a
4300multivalue dictionary that retains the order of insertions and deletions.")
4301 (license license:unlicense)))
4302
4303(define-public python2-orderedmultidict
4304 (package-with-python2 python-orderedmultidict))
4305
4306(define-public python-autopep8
4307 (package
4308 (name "python-autopep8")
4309 (version "1.3.5")
4310 (source
4311 (origin
4312 (method url-fetch)
4313 (uri (pypi-uri "autopep8" version))
4314 (sha256
4315 (base32
4316 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
4317 (build-system python-build-system)
4318 (propagated-inputs
4319 `(("python-pycodestyle" ,python-pycodestyle)))
4320 (home-page "https://github.com/hhatto/autopep8")
4321 (synopsis "Format Python code according to the PEP 8 style guide")
4322 (description
4323 "@code{autopep8} automatically formats Python code to conform to
4324the PEP 8 style guide. It uses the pycodestyle utility to determine
4325what parts of the code needs to be formatted. @code{autopep8} is
4326capable of fixing most of the formatting issues that can be reported
4327by pycodestyle.")
4328 (license (license:non-copyleft
4329 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4330
4331(define-public python2-autopep8
4332 (package-with-python2 python-autopep8))
4333
4334(define-public python-distutils-extra
4335 (package
4336 (name "python-distutils-extra")
4337 (version "2.38")
4338 (source
4339 (origin
4340 (method url-fetch)
4341 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4342 version "/+download/python-distutils-extra-"
4343 version ".tar.gz"))
4344 (sha256
4345 (base32
4346 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4347 (build-system python-build-system)
4348 (home-page "https://launchpad.net/python-distutils-extra/")
4349 (synopsis "Enhancements to Python's distutils")
4350 (description
4351 "The python-distutils-extra module enables you to easily integrate
4352gettext support, themed icons, and scrollkeeper-based documentation into
4353Python's distutils.")
4354 (license license:gpl2)))
4355
4356(define-public python2-distutils-extra
4357 (package-with-python2 python-distutils-extra))
4358
4359(define-public python2-elib.intl
4360 (package
4361 (name "python2-elib.intl")
4362 (version "0.0.3")
4363 (source
4364 (origin
4365 ;; This project doesn't tag releases or publish tarballs, so we take
4366 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4367 (method git-fetch)
4368 (uri (git-reference
4369 (url "https://github.com/dieterv/elib.intl.git")
4370 (commit "d09997cfef")))
4371 (file-name (string-append name "-" version "-checkout"))
4372 (sha256
4373 (base32
4374 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4375 (build-system python-build-system)
4376 (arguments
4377 ;; incompatible with Python 3 (exception syntax)
4378 `(#:python ,python-2
4379 #:tests? #f))
4380 (home-page "https://github.com/dieterv/elib.intl")
4381 (synopsis "Enhanced internationalization for Python")
4382 (description
4383 "The elib.intl module provides enhanced internationalization (I18N)
4384services for your Python modules and applications.")
4385 (license license:lgpl3+)))
4386
4387(define-public python-olefile
4388 (package
4389 (name "python-olefile")
4390 (version "0.45.1")
4391 (source
4392 (origin
4393 (method url-fetch)
4394 (uri (string-append "https://github.com/decalage2/olefile/archive/v"
4395 version ".tar.gz"))
4396 (file-name (string-append name "-" version ".tar.gz"))
4397 (sha256
4398 (base32
4399 "18ai19zwagm6nli14k8bii31ipbab2rp7plrvsm6gmfql551a8ai"))))
4400 (build-system python-build-system)
4401 (home-page
4402 "https://www.decalage.info/python/olefileio")
4403 (synopsis "Read and write Microsoft OLE2 files.")
4404 (description
4405 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
4406Storage or Compound Document, Microsoft Office). It is an improved version of
4407the OleFileIO module from PIL, the Python Image Library.")
4408 (license license:bsd-3)))
4409
4410(define-public python2-olefile
4411 (package-with-python2 python-olefile))
4412
4413(define-public python-pillow
4414 (package
4415 (name "python-pillow")
4416 (version "5.4.1")
4417 (source
4418 (origin
4419 (method url-fetch)
4420 (uri (pypi-uri "Pillow" version))
4421 (sha256
4422 (base32
4423 "17waygkhhzjd75kajlfw9v57mbb41lcpg6cvkdijqd7smm76ccsj"))))
4424 (build-system python-build-system)
4425 (native-inputs
4426 `(("python-pytest" ,python-pytest)))
4427 (inputs
4428 `(("freetype" ,freetype)
4429 ("lcms" ,lcms)
4430 ("zlib" ,zlib)
4431 ("libjpeg" ,libjpeg)
4432 ("openjpeg" ,openjpeg)
4433 ("libtiff" ,libtiff)
4434 ("libwebp" ,libwebp)))
4435 (propagated-inputs
4436 `(("python-olefile" ,python-olefile)))
4437 (arguments
4438 `(#:phases
4439 (modify-phases %standard-phases
4440 (add-after 'unpack 'patch-ldconfig
4441 (lambda _
4442 (substitute* "setup.py"
4443 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
4444 (delete 'check) ; We must run checks after python-pillow is installed.
4445 (add-after 'install 'check-installed
4446 (lambda* (#:key outputs inputs #:allow-other-keys)
4447 (begin
4448 (setenv "HOME" (getcwd))
4449 ;; Make installed package available for running the tests.
4450 (add-installed-pythonpath inputs outputs)
4451 (invoke "python" "selftest.py" "--installed")
4452 (invoke "python" "-m" "pytest" "-vv")))))))
4453 (home-page "https://python-pillow.org")
4454 (synopsis "Fork of the Python Imaging Library")
4455 (description
4456 "The Python Imaging Library adds image processing capabilities to your
4457Python interpreter. This library provides extensive file format support, an
4458efficient internal representation, and fairly powerful image processing
4459capabilities. The core image library is designed for fast access to data
4460stored in a few basic pixel formats. It should provide a solid foundation for
4461a general image processing tool.")
4462 (license (license:x11-style
4463 "http://www.pythonware.com/products/pil/license.htm"
4464 "The PIL Software License"))))
4465
4466(define-public python2-pillow
4467 (package-with-python2 python-pillow))
4468
4469(define-public python-pycparser
4470 (package
4471 (name "python-pycparser")
4472 (version "2.18")
4473 (source
4474 (origin
4475 (method url-fetch)
4476 (uri (pypi-uri "pycparser" version))
4477 (sha256
4478 (base32
4479 "09mjyw82ibqzl449g7swy8bfxnfpmas0815d2rkdjlcqw81wma4r"))))
4480 (outputs '("out" "doc"))
4481 (build-system python-build-system)
4482 (native-inputs
4483 `(("pkg-config" ,pkg-config)))
4484 (arguments
4485 `(#:phases
4486 (modify-phases %standard-phases
4487 (replace 'check
4488 (lambda _
4489 (with-directory-excursion "tests"
acb75c03
RW
4490 (invoke "python" "all_tests.py"))
4491 #t))
44d10b1f
RW
4492 (add-after 'install 'install-doc
4493 (lambda* (#:key outputs #:allow-other-keys)
4494 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4495 (doc (string-append data "/doc/" ,name "-" ,version))
4496 (examples (string-append doc "/examples")))
4497 (mkdir-p examples)
4498 (for-each (lambda (file)
4499 (copy-file (string-append "." file)
4500 (string-append doc file)))
4501 '("/README.rst" "/CHANGES" "/LICENSE"))
4502 (copy-recursively "examples" examples)))))))
4503 (home-page "https://github.com/eliben/pycparser")
4504 (synopsis "C parser in Python")
4505 (description
4506 "Pycparser is a complete parser of the C language, written in pure Python
4507using the PLY parsing library. It parses C code into an AST and can serve as
4508a front-end for C compilers or analysis tools.")
4509 (license license:bsd-3)))
4510
4511(define-public python2-pycparser
4512 (package-with-python2 python-pycparser))
4513
4514(define-public python-pywavelets
4515 (package
4516 (name "python-pywavelets")
4517 (version "1.0.1")
4518 (home-page "https://github.com/PyWavelets/pywt")
4519 (source (origin
4520 (method url-fetch)
4521 (uri (pypi-uri "PyWavelets" version))
4522 (sha256
4523 (base32
4524 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
4525 (build-system python-build-system)
4526 (arguments
4527 '(#:modules ((ice-9 ftw)
4528 (srfi srfi-1)
4529 (srfi srfi-26)
4530 (guix build utils)
4531 (guix build python-build-system))
4532 #:phases (modify-phases %standard-phases
4533 (replace 'check
4534 (lambda _
4535 (let ((cwd (getcwd))
4536 (libdir (find (cut string-prefix? "lib." <>)
4537 (scandir "build"))))
4538 (with-directory-excursion (string-append cwd "/build/" libdir)
4539 (invoke "nosetests" "-v" "."))))))))
4540 (native-inputs
4541 `(("python-matplotlib" ,python-matplotlib) ;for tests
4542 ("python-nose" ,python-nose)))
4543 (propagated-inputs
4544 `(("python-numpy" ,python-numpy)))
4545 (synopsis "Wavelet transforms in Python")
4546 (description
4547 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
4548mathematical basis functions that are localized in both time and frequency.
4549Wavelet transforms are time-frequency transforms employing wavelets. They are
4550similar to Fourier transforms, the difference being that Fourier transforms are
4551localized only in frequency instead of in time and frequency.")
4552 (license license:expat)))
4553
4554(define-public python2-pywavelets
4555 (package-with-python2 python-pywavelets))
4556
4557(define-public python-xcffib
4558 (package
4559 (name "python-xcffib")
4560 (version "0.6.0")
4561 (source
4562 (origin
4563 (method url-fetch)
4564 (uri (pypi-uri "xcffib" version))
4565 (sha256
4566 (base32
4567 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
4568 (build-system python-build-system)
4569 (inputs
4570 `(("libxcb" ,libxcb)))
4571 (propagated-inputs
4572 `(("python-cffi" ,python-cffi) ; used at run time
4573 ("python-six" ,python-six)))
4574 (arguments
4575 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4576 #:tests? #f
4577 #:phases
4578 (modify-phases %standard-phases
4579 (add-after 'unpack 'fix-libxcb-path
4580 (lambda* (#:key inputs #:allow-other-keys)
4581 (let ((libxcb (assoc-ref inputs "libxcb")))
4582 (substitute* '("xcffib/__init__.py")
4583 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4584 #t)))
4585 (add-after 'install 'install-doc
4586 (lambda* (#:key outputs #:allow-other-keys)
4587 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4588 "/doc/" ,name "-" ,version)))
4589 (mkdir-p doc)
4590 (copy-file "README.md"
4591 (string-append doc "/README.md"))
4592 #t))))))
4593 (home-page "https://github.com/tych0/xcffib")
4594 (synopsis "XCB Python bindings")
4595 (description
4596 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4597support for Python 3 and PyPy. It is based on cffi.")
4598 (license license:expat)))
4599
4600(define-public python2-xcffib
4601 (package-with-python2 python-xcffib))
4602
4603(define-public python-cairocffi
4604 (package
4605 (name "python-cairocffi")
4606 (version "0.9.0")
4607 (source
4608 (origin
4609 (method url-fetch)
4610 (uri (pypi-uri "cairocffi" version))
4611 (sha256
4612 (base32
4613 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
4614 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
4615 (build-system python-build-system)
4616 (outputs '("out" "doc"))
4617 (inputs
4618 `(("glib" ,glib)
4619 ("gtk+" ,gtk+)
4620 ("gdk-pixbuf" ,gdk-pixbuf)
4621 ("cairo" ,cairo)
4622 ("pango" ,pango)))
4623 (native-inputs
4624 `(("pkg-config" ,pkg-config)
4625 ("python-pytest" ,python-pytest)
4626 ("python-pytest-cov" ,python-pytest-cov)
4627 ("python-pytest-runner" ,python-pytest-runner)
4628 ("python-sphinx" ,python-sphinx)
4629 ("python-docutils" ,python-docutils)))
4630 (propagated-inputs
4631 `(("python-xcffib" ,python-xcffib))) ; used at run time
4632 (arguments
4633 `(#:phases
4634 (modify-phases %standard-phases
4635 (add-after 'unpack 'patch-paths
4636 (lambda* (#:key inputs outputs #:allow-other-keys)
4637 (substitute* (find-files "." "\\.py$")
4638 (("dlopen\\(ffi, 'cairo'")
4639 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
4640 "/lib/libcairo.so.2'"))
4641 (("dlopen\\(ffi, 'gdk-3'")
4642 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
4643 "/lib/libgtk-3.so.0'"))
4644 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
4645 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
4646 "/lib/libgdk_pixbuf-2.0.so.0'"))
4647 (("dlopen\\(ffi, 'glib-2.0'")
4648 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4649 "/lib/libglib-2.0.so.0'"))
4650 (("dlopen\\(ffi, 'gobject-2.0'")
4651 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4652 "/lib/libgobject-2.0.so.0'"))
4653 (("dlopen\\(ffi, 'pangocairo-1.0'")
4654 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4655 "/lib/libpangocairo-1.0.so.0'"))
4656 (("dlopen\\(ffi, 'pango-1.0'")
4657 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4658 "/lib/libpango-1.0.so.0'")))
4659 #t))
4660 (add-after 'install 'install-doc
4661 (lambda* (#:key inputs outputs #:allow-other-keys)
4662 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4663 (doc (string-append data "/doc/" ,name "-" ,version))
4664 (html (string-append doc "/html")))
4665 (setenv "LD_LIBRARY_PATH"
4666 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4667 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4668 (setenv "LANG" "en_US.UTF-8")
4669 (mkdir-p html)
4670 (for-each (lambda (file)
4671 (copy-file (string-append "." file)
4672 (string-append doc file)))
4673 '("/README.rst" "/CHANGES" "/LICENSE"))
4674 (system* "python" "setup.py" "build_sphinx")
4675 (copy-recursively "docs/_build/html" html)
4676 #t))))))
4677 (home-page "https://github.com/Kozea/cairocffi")
4678 (synopsis "Python bindings and object-oriented API for Cairo")
4679 (description
4680 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4681Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4682graphics library with support for multiple backends including image buffers,
4683PNG, PostScript, PDF, and SVG file output.")
4684 (license license:bsd-3)))
4685
4686(define-public python2-cairocffi
4687 (package-with-python2 python-cairocffi))
4688
4689(define-public python-decorator
4690 (package
4691 (name "python-decorator")
4692 (version "4.3.0")
4693 (source
4694 (origin
4695 (method url-fetch)
4696 (uri (pypi-uri "decorator" version))
4697 (sha256
4698 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4699 (build-system python-build-system)
4700 (home-page "https://pypi.python.org/pypi/decorator/")
4701 (synopsis "Python module to simplify usage of decorators")
4702 (description
4703 "The aim of the decorator module is to simplify the usage of decorators
4704for the average programmer, and to popularize decorators usage giving examples
4705of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4706etc. The core of this module is a decorator factory.")
4707 (license license:expat)))
4708
4709(define-public python2-decorator
4710 (package-with-python2 python-decorator))
4711
4712(define-public python-drmaa
4713 (package
4714 (name "python-drmaa")
4715 (version "0.7.7")
4716 (source
4717 (origin
4718 (method url-fetch)
4719 (uri (pypi-uri "drmaa" version))
4720 (sha256
4721 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4722 (build-system python-build-system)
4723 ;; The test suite requires libdrmaa which is provided by the cluster
4724 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4725 ;; should be set to the path of the libdrmaa library.
4726 (arguments '(#:tests? #f))
4727 (native-inputs
4728 `(("python-nose" ,python-nose)))
4729 (home-page "https://pypi.python.org/pypi/drmaa")
4730 (synopsis "Python bindings for the DRMAA library")
4731 (description
4732 "A Python package for Distributed Resource Management (DRM) job
4733submission and control. This package is an implementation of the DRMAA 1.0
4734Python language binding specification.")
4735 (license license:bsd-3)))
4736
4737(define-public python2-drmaa
4738 (package-with-python2 python-drmaa))
4739
4740(define-public python-grako
4741 (package
4742 (name "python-grako")
4743 (version "3.99.9")
4744 (source
4745 (origin
4746 (method url-fetch)
4747 (uri
4748 (pypi-uri "grako" version ".zip"))
4749 (sha256
4750 (base32
4751 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4752 (build-system python-build-system)
4753 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4754 (native-inputs
4755 `(("unzip" ,unzip)
4756 ("python-pytest" ,python-pytest)
4757 ("python-pytest-runner" ,python-pytest-runner)))
4758 (home-page "https://bitbucket.org/neogeny/grako")
4759 (synopsis "EBNF parser generator")
4760 (description
4761 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4762memoizing PEG/Packrat parser in Python.")
4763 (license license:bsd-3)))
4764
4765(define-public python2-grako
4766 (package-with-python2 python-grako))
4767
4768(define-public python-gridmap
4769 (package
4770 (name "python-gridmap")
4771 (version "0.13.0")
4772 (source
4773 (origin
768fea0f
TGR
4774 (method git-fetch)
4775 (uri (git-reference
4776 (url "https://github.com/pygridtools/gridmap.git")
4777 (commit (string-append "v" version))))
4778 (file-name (git-file-name name version))
44d10b1f 4779 (sha256
768fea0f 4780 (base32 "1478lbwsr1w24cii2x01m2910fvh8r43ghnb78nc972a96hqiknm"))))
44d10b1f
RW
4781 (build-system python-build-system)
4782 (arguments
4783 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4784 (propagated-inputs
4785 `(("python-psutil" ,python-psutil)
4786 ("python-drmaa" ,python-drmaa)
4787 ("python-pyzmq" ,python-pyzmq)))
4788 (home-page "https://github.com/pygridtools/gridmap")
4789 (synopsis "Create jobs on a cluster directly from Python")
4790 (description
4791 "Gridmap is a Python package to allow you to easily create jobs on the
4792cluster directly from Python. You can directly map Python functions onto the
4793cluster without needing to write any wrapper code yourself.")
4794 (license license:gpl3+)))
4795
4796(define-public python2-gridmap
4797 (package-with-python2 python-gridmap))
4798
4799(define-public python-honcho
4800 (package
4801 (name "python-honcho")
4802 (version "1.0.1")
4803 (source
4804 (origin
8524d130
TGR
4805 (method git-fetch)
4806 (uri (git-reference
4807 (url "https://github.com/nickstenning/honcho.git")
4808 (commit (string-append "v" version))))
4809 (file-name (git-file-name name version))
44d10b1f 4810 (sha256
8524d130 4811 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
44d10b1f
RW
4812 (build-system python-build-system)
4813 (native-inputs
4814 `(("python-pytest" ,python-pytest)
4815 ("python-mock" ,python-mock)
4816 ("python-tox" ,python-tox)
4817 ("which" ,which))) ;for tests
4818 (propagated-inputs
4819 `(("python-jinja2" ,python-jinja2)))
4820 (arguments
4821 `(#:phases
4822 (modify-phases %standard-phases
4823 (delete 'check)
4824 (add-after 'install 'check
4825 (lambda* (#:key outputs inputs #:allow-other-keys)
4826 ;; fix honcho path in testsuite
4827 (substitute* "tests/conftest.py"
4828 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4829 "/bin/honcho" "'")))
4830 ;; It's easier to run tests after install.
4831 ;; Make installed package available for running the tests
4832 (add-installed-pythonpath inputs outputs)
95b707fb 4833 (invoke "py.test" "-v"))))))
44d10b1f
RW
4834 (home-page "https://github.com/nickstenning/honcho")
4835 (synopsis "Manage Procfile-based applications")
4836 (description
4837 "A Procfile is a file which describes how to run an application
4838consisting of serveral processes. honcho starts all listed processes.
4839The output of all running processes is collected by honcho and
4840displayed.")
4841 (license license:expat)))
4842
4843(define-public python2-honcho
4844 (package-with-python2 python-honcho))
4845
4846(define-public python-pexpect
4847 (package
4848 (name "python-pexpect")
4849 (version "4.6.0")
4850 (source
4851 (origin
4852 (method url-fetch)
4853 (uri (pypi-uri "pexpect" version))
4854 (sha256
4855 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
4856 (build-system python-build-system)
4857 (arguments
4858 `(#:phases
4859 (modify-phases %standard-phases
4860 (add-before 'check 'prepare-tests
4861 (lambda _
4862 (substitute* (find-files "tests")
4863 (("/bin/ls") (which "ls"))
4864 (("/bin/echo") (which "echo"))
4865 (("/bin/which") (which "which"))
4866 ;; Many tests try to use the /bin directory which
4867 ;; is not present in the build environment.
4868 ;; Use one that's non-empty and unlikely to change.
4869 (("/bin'") "/dev'"))
4870 ;; XXX: Socket connection test gets "Connection reset by peer".
4871 ;; Why does it not work? Delete for now.
4872 (delete-file "tests/test_socket.py")
4873 #t))
4874 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
4875 (native-inputs
4876 `(("python-nose" ,python-nose)
4877 ("python-pytest" ,python-pytest)
4878 ("man-db" ,man-db)
4879 ("which" ,which)
4880 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
4881 (propagated-inputs
4882 `(("python-ptyprocess" ,python-ptyprocess)))
4883 (home-page "http://pexpect.readthedocs.org/")
4884 (synopsis "Controlling interactive console applications")
4885 (description
4886 "Pexpect is a pure Python module for spawning child applications;
4887controlling them; and responding to expected patterns in their output.
4888Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4889child application and control it as if a human were typing commands.")
4890 (license license:isc)))
4891
4892(define-public python2-pexpect
4893 (package-with-python2 python-pexpect))
4894
4895(define-public python-setuptools-scm
4896 (package
4897 (name "python-setuptools-scm")
4898 (version "3.1.0")
4899 (source (origin
4900 (method url-fetch)
4901 (uri (pypi-uri "setuptools_scm" version))
4902 (sha256
4903 (base32
4904 "0h4bglwfz8b9prqljv8z3w9rgydfyxzaj05bm1y6zs5m6shz548i"))))
4905 (build-system python-build-system)
4906 (home-page "https://github.com/pypa/setuptools_scm/")
4907 (synopsis "Manage Python package versions in SCM metadata")
4908 (description
4909 "Setuptools_scm handles managing your Python package versions in
4910@dfn{software configuration management} (SCM) metadata instead of declaring
4911them as the version argument or in a SCM managed file.")
4912 (license license:expat)))
4913
4914(define-public python2-setuptools-scm
4915 (package-with-python2 python-setuptools-scm))
4916
4917(define-public python-pathpy
4918 (package
4919 (name "python-pathpy")
4920 (version "11.0.1")
4921 (source
4922 (origin
4923 (method url-fetch)
4924 (uri (pypi-uri "path.py" version))
4925 (sha256
4926 (base32 "07x15v8c7ry9bvycw294c9yq6ky9v2b0dalvgi6rn38ilh69vsz7"))))
4927 ;; (outputs '("out" "doc"))
4928 (build-system python-build-system)
4929 (propagated-inputs
4930 `(("python-appdirs" ,python-appdirs)))
4931 (native-inputs
4932 `(("python-setuptools-scm" ,python-setuptools-scm)
4933 ("python-sphinx" ,python-sphinx)
4934 ("python-rst.linker" ,python-rst.linker)
4935 ("python-pytest" ,python-pytest)
4936 ("python-pytest-runner" ,python-pytest-runner)))
4937 (arguments
4938 ;; FIXME: Documentation and tests require "jaraco.packaging".
4939 `(#:tests? #f))
4940 ;; #:phases
4941 ;; (modify-phases %standard-phases
4942 ;; (add-after 'build 'build-doc
4943 ;; (lambda _
4944 ;; (setenv "LANG" "en_US.UTF-8")
4945 ;; (zero? (system* "python" "setup.py" "build_sphinx"))))
4946 ;; (add-after 'install 'install-doc
4947 ;; (lambda* (#:key outputs #:allow-other-keys)
4948 ;; (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4949 ;; (doc (string-append data "/doc/" ,name "-" ,version))
4950 ;; (html (string-append doc "/html")))
4951 ;; (mkdir-p html)
4952 ;; (for-each (lambda (file)
4953 ;; (copy-file file (string-append doc "/" file)))
4954 ;; '("README.rst" "CHANGES.rst"))
4955 ;; (copy-recursively "build/sphinx/html" html)))))))
4956 (home-page "https://github.com/jaraco/path.py")
4957 (synopsis "Python module wrapper for built-in os.path")
4958 (description
4959 "@code{path.py} implements path objects as first-class entities, allowing
4960common operations on files to be invoked on those path objects directly.")
4961 (license license:expat)))
4962
4963(define-public python2-pathpy
4964 (package-with-python2 python-pathpy))
4965
4966(define-public python-simplegeneric
4967 (package
4968 (name "python-simplegeneric")
4969 (version "0.8.1")
4970 (source
4971 (origin
4972 (method url-fetch)
6c8c3980 4973 (uri (pypi-uri "simplegeneric" version ".zip"))
44d10b1f
RW
4974 (sha256
4975 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4976 (build-system python-build-system)
4977 (native-inputs
4978 `(("unzip" ,unzip)))
4979 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
4980 (synopsis "Python module for simple generic functions")
4981 (description
4982 "The simplegeneric module lets you define simple single-dispatch generic
4983functions, akin to Python’s built-in generic functions like @code{len()},
4984@code{iter()} and so on. However, instead of using specially-named methods,
4985these generic functions use simple lookup tables, akin to those used by
4986e.g. @code{pickle.dump()} and other generic functions found in the Python
4987standard library.")
4988 (license license:zpl2.1)))
4989
4990(define-public python2-simplegeneric
4991 (package-with-python2 python-simplegeneric))
4992
4993(define-public python-ipython-genutils
4994 ;; TODO: This package is retired, check if can be removed, see description.
4995 (package
4996 (name "python-ipython-genutils")
4997 (version "0.1.0")
4998 (source
4999 (origin
5000 (method url-fetch)
c9671d4b 5001 (uri (pypi-uri "ipython_genutils" version))
44d10b1f
RW
5002 (sha256
5003 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5004 (build-system python-build-system)
5005 (arguments `(#:tests? #f)) ; no tests
5006 (home-page "https://ipython.org")
5007 (synopsis "Vestigial utilities from IPython")
5008 (description
5009 "This package provides retired utilities from IPython. No packages
5010outside IPython/Jupyter should depend on it.
5011
5012This package shouldn't exist. It contains some common utilities shared by
5013Jupyter and IPython projects during The Big Split. As soon as possible, those
5014packages will remove their dependency on this, and this package will go
5015away.")
5016 (license license:bsd-3)))
5017
5018(define-public python2-ipython-genutils
5019 (package-with-python2 python-ipython-genutils))
5020
5021(define-public python-traitlets
5022 (package
5023 (name "python-traitlets")
5024 (version "4.3.2")
5025 (source
5026 (origin
5027 (method url-fetch)
5028 (uri (pypi-uri "traitlets" version))
5029 (sha256
5030 (base32
5031 "0dbq7sx26xqz5ixs711k5nc88p8a0nqyz6162pwks5dpcz9d4jww"))))
5032 (build-system python-build-system)
5033 (arguments
5034 `(#:phases
5035 (modify-phases %standard-phases
5036 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
5037 (propagated-inputs
5038 `(("python-ipython-genutils" ,python-ipython-genutils)
5039 ("python-decorator" ,python-decorator))) ;not needed for >4.3.2
5040 (native-inputs
5041 `(("python-pytest" ,python-pytest)))
5042 (properties `((python2-variant . ,(delay python2-traitlets))))
5043 (home-page "https://ipython.org")
5044 (synopsis "Configuration system for Python applications")
5045 (description
5046 "Traitlets is a framework that lets Python classes have attributes with
5047type checking, dynamically calculated default values, and ‘on change’
5048callbacks. The package also includes a mechanism to use traitlets for
5049configuration, loading values from files or from command line arguments. This
5050is a distinct layer on top of traitlets, so you can use traitlets in your code
5051without using the configuration machinery.")
5052 (license license:bsd-3)))
5053
5054(define-public python2-traitlets
5055 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
5056 (package
5057 (inherit traitlets)
5058 (propagated-inputs
5059 `(("python2-enum34" ,python2-enum34)
5060 ,@(package-propagated-inputs traitlets))))))
5061
5062(define-public python-jupyter-core
5063 (package
5064 (name "python-jupyter-core")
5065 (version "4.4.0")
5066 (source
5067 (origin
5068 (method url-fetch)
5069 (uri (string-append (pypi-uri "jupyter_core" version)))
5070 (sha256
5071 (base32
5072 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
5073 (build-system python-build-system)
5074 ;; FIXME: not sure how to run the tests
5075 (arguments `(#:tests? #f))
5076 (propagated-inputs
5077 `(("python-traitlets" ,python-traitlets)))
5078 (home-page "http://jupyter.org/")
5079 (synopsis "Jupyter base package")
5080 (description
5081 "Jupyter core is the base package on which Jupyter projects rely.")
5082 (license license:bsd-3)))
5083
5084(define-public python2-jupyter-core
5085 (package-with-python2 python-jupyter-core))
5086
5087(define-public python-jupyter-client
5088 (package
5089 (name "python-jupyter-client")
5090 (version "5.2.4")
5091 (source
5092 (origin
5093 (method url-fetch)
5094 (uri (pypi-uri "jupyter_client" version))
5095 (sha256
5096 (base32
5097 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
5098 (build-system python-build-system)
5099 ;; Tests fail because of missing native python kernel which I assume is
5100 ;; provided by the ipython package, which we cannot use because it would
5101 ;; cause a dependency cycle.
5102 (arguments `(#:tests? #f))
5103 (propagated-inputs
5104 `(("python-pyzmq" ,python-pyzmq)
5105 ("python-traitlets" ,python-traitlets)
5106 ("python-jupyter-core" ,python-jupyter-core)))
5107 (home-page "http://jupyter.org/")
5108 (synopsis "Jupyter protocol implementation and client libraries")
5109 (description
5110 "The @code{jupyter_client} package contains the reference implementation
5111of the Jupyter protocol. It also provides client and kernel management APIs
5112for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5113installing @code{kernelspec}s for use with Jupyter frontends.")
5114 (license license:bsd-3)))
5115
5116(define-public python2-jupyter-client
5117 (package-with-python2 python-jupyter-client))
5118
5119(define-public python-ipykernel
5120 (package
5121 (name "python-ipykernel")
5122 (version "5.1.0")
5123 (source
5124 (origin
5125 (method url-fetch)
5126 (uri (pypi-uri "ipykernel" version))
5127 (sha256
5128 (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g"))))
5129 (build-system python-build-system)
5130 (arguments
5131 `(#:phases
5132 (modify-phases %standard-phases
5133 (replace 'check
5134 (lambda _
5135 (setenv "HOME" "/tmp")
5136 (invoke "pytest" "-v")
5137 #t)))))
5138 (propagated-inputs
5139 `(("python-ipython" ,python-ipython)
5140 ;; imported at runtime during connect
5141 ("python-jupyter-client" ,python-jupyter-client)))
5142 (native-inputs
5143 `(("python-pytest" ,python-pytest)
5144 ("python-nose" ,python-nose)))
5145 (home-page "https://ipython.org")
5146 (synopsis "IPython Kernel for Jupyter")
5147 (description
5148 "This package provides the IPython kernel for Jupyter.")
5149 (license license:bsd-3)))
5150
5151(define-public python2-ipykernel
5152 (package-with-python2 python-ipykernel))
5153
966aa714
AE
5154(define-public python-pari-jupyter
5155 (package
5156 (name "python-pari-jupyter")
5157 (version "1.3.2")
5158 (source
5159 (origin
5160 (method url-fetch)
5161 (uri (pypi-uri "pari_jupyter" version))
5162 (sha256
5163 (base32
5164 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
5165 (build-system python-build-system)
5166 (propagated-inputs
5167 `(("python-ipykernel" ,python-ipykernel)))
5168 (inputs
5169 `(("pari-gp" ,pari-gp)
5170 ("readline" ,readline)))
5171 (arguments
5172 `(#:tests? #f)) ; no test suite
5173 (home-page
5174 "https://github.com/jdemeyer/pari_jupyter")
5175 (synopsis "A Jupyter kernel for PARI/GP")
5176 (description "The package provides a PARI/GP kernel for Jupyter.")
5177 (license license:gpl3+)))
5178
44d10b1f
RW
5179;; This is the latest release of the LTS version of ipython with support for
5180;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
5181;; dropped support for Python 2.7. We may want to rename this package.
5182(define-public python-ipython
5183 (package
5184 (name "python-ipython")
5185 (version "5.8.0")
5186 (source
5187 (origin
5188 (method url-fetch)
5189 (uri (pypi-uri "ipython" version ".tar.gz"))
5190 (sha256
5191 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
5192 (build-system python-build-system)
5193 (outputs '("out" "doc"))
5194 (propagated-inputs
5195 `(("python-pyzmq" ,python-pyzmq)
5196 ("python-prompt-toolkit" ,python-prompt-toolkit-1)
5197 ("python-terminado" ,python-terminado)
5198 ("python-matplotlib" ,python-matplotlib)
5199 ("python-numpy" ,python-numpy)
5200 ("python-numpydoc" ,python-numpydoc)
5201 ("python-jinja2" ,python-jinja2)
5202 ("python-mistune" ,python-mistune)
5203 ("python-pexpect" ,python-pexpect)
5204 ("python-pickleshare" ,python-pickleshare)
5205 ("python-simplegeneric" ,python-simplegeneric)
5206 ("python-jsonschema" ,python-jsonschema)
5207 ("python-traitlets" ,python-traitlets)
5208 ("python-nbformat" ,python-nbformat)
5209 ("python-pygments" ,python-pygments)))
5210 (inputs
5211 `(("readline" ,readline)
5212 ("which" ,which)))
5213 (native-inputs
5214 `(("graphviz" ,graphviz)
5215 ("pkg-config" ,pkg-config)
5216 ("python-requests" ,python-requests) ;; for tests
5217 ("python-testpath" ,python-testpath)
5218 ("python-nose" ,python-nose)
5219 ("python-sphinx" ,python-sphinx)
5220 ("python-shpinx-rtd-theme" ,python-sphinx-rtd-theme)
5221 ;; FIXME: It's possible that a smaller union would work just as well.
5222 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
5223 texlive-fonts-ec
5224 texlive-generic-ifxetex
5225 texlive-generic-pdftex
5226 texlive-latex-amsfonts
5227 texlive-latex-capt-of
5228 texlive-latex-cmap
5229 texlive-latex-environ
5230 texlive-latex-eqparbox
5231 texlive-latex-etoolbox
5232 texlive-latex-expdlist
5233 texlive-latex-fancyhdr
5234 texlive-latex-fancyvrb
5235 texlive-latex-fncychap
5236 texlive-latex-float
5237 texlive-latex-framed
5238 texlive-latex-geometry
5239 texlive-latex-graphics
5240 texlive-latex-hyperref
5241 texlive-latex-mdwtools
5242 texlive-latex-multirow
5243 texlive-latex-oberdiek
5244 texlive-latex-parskip
5245 texlive-latex-preview
5246 texlive-latex-tabulary
5247 texlive-latex-threeparttable
5248 texlive-latex-titlesec
5249 texlive-latex-trimspaces
5250 texlive-latex-ucs
5251 texlive-latex-upquote
5252 texlive-latex-url
5253 texlive-latex-varwidth
5254 texlive-latex-wrapfig)))
5255 ("texinfo" ,texinfo)))
5256 (arguments
5257 `(#:phases
5258 (modify-phases %standard-phases
5259 (add-after 'install 'install-doc
5260 (lambda* (#:key inputs outputs #:allow-other-keys)
5261 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5262 (doc (string-append data "/doc/" ,name "-" ,version))
5263 (html (string-append doc "/html"))
5264 (man1 (string-append data "/man/man1"))
5265 (info (string-append data "/info"))
5266 (examples (string-append doc "/examples"))
5267 (python-arg (string-append "PYTHON=" (which "python"))))
5268 (setenv "LANG" "en_US.utf8")
5269 ;; Make installed package available for running the tests
5270 (add-installed-pythonpath inputs outputs)
5271 (with-directory-excursion "docs"
5272 ;; FIXME: pdf fails to build
5273 ;;(system* "make" "pdf" "PAPER=a4")
5274 (system* "make" python-arg "html")
5275 (system* "make" python-arg "info"))
5276 (copy-recursively "docs/man" man1)
5277 (copy-recursively "examples" examples)
5278 (copy-recursively "docs/build/html" html)
5279 ;; (copy-file "docs/build/latex/ipython.pdf"
5280 ;; (string-append doc "/ipython.pdf"))
5281 (mkdir-p info)
5282 (copy-file "docs/build/texinfo/ipython.info"
5283 (string-append info "/ipython.info"))
5284 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
5285 #t))
5286 ;; Tests can only be run after the library has been installed and not
5287 ;; within the source directory.
5288 (delete 'check)
5289 (add-after 'install 'check
5290 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5291 (if tests?
5292 (begin
5293 ;; Make installed package available for running the tests
5294 (add-installed-pythonpath inputs outputs)
5295 (setenv "HOME" "/tmp/") ;; required by a test
5296 ;; We only test the core because one of the other tests
5297 ;; tries to import ipykernel.
5298 (invoke "python" "IPython/testing/iptest.py"
5299 "-v" "IPython/core/tests"))
5300 #t)))
5301 (add-before 'check 'fix-tests
5302 (lambda* (#:key inputs #:allow-other-keys)
5303 (substitute* "./IPython/utils/_process_posix.py"
5304 (("/usr/bin/env', 'which") (which "which")))
5305 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5306 (("#!/usr/bin/env python")
5307 (string-append "#!" (which "python"))))
5308 ;; Disable 1 failing test
5309 (substitute* "./IPython/core/tests/test_magic.py"
5310 (("def test_dirops\\(\\):" all)
5311 (string-append "@dec.skipif(True)\n" all)))
5312 ;; This test introduces a circular dependency on ipykernel
5313 ;; (which depends on ipython).
5314 (delete-file "IPython/core/tests/test_display.py")
5315 ;; These tests throw errors for unknown reasons.
5316 (delete-file "IPython/extensions/tests/test_storemagic.py")
5317 (delete-file "IPython/core/tests/test_displayhook.py")
5318 (delete-file "IPython/core/tests/test_interactiveshell.py")
5319 (delete-file "IPython/core/tests/test_pylabtools.py")
5320 (delete-file "IPython/core/tests/test_paths.py")
5321 #t)))))
5322 (home-page "https://ipython.org")
5323 (synopsis "IPython is a tool for interactive computing in Python")
5324 (description
5325 "IPython provides a rich architecture for interactive computing with:
5326Powerful interactive shells, a browser-based notebook, support for interactive
5327data visualization, embeddable interpreters and tools for parallel
5328computing.")
5329 (license license:bsd-3)
5330 (properties `((python2-variant . ,(delay python2-ipython))))))
5331
5332(define-public python2-ipython
5333 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
5334 (package
5335 (inherit ipython)
5336 ;; FIXME: add pyreadline once available.
5337 (propagated-inputs
5338 `(("python2-backports-shutil-get-terminal-size"
5339 ,python2-backports-shutil-get-terminal-size)
5340 ("python2-pathlib2" ,python2-pathlib2)
5341 ,@(package-propagated-inputs ipython)))
5342 (native-inputs
5343 `(("python2-mock" ,python2-mock)
5344 ,@(package-native-inputs ipython))))))
5345
5346(define-public python-urwid
5347 (package
5348 (name "python-urwid")
5349 (version "2.0.1")
5350 (source
5351 (origin
5352 (method url-fetch)
5353 (uri (pypi-uri "urwid" version))
5354 (sha256
5355 (base32
5356 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
5357 (build-system python-build-system)
5358 (home-page "http://urwid.org")
5359 (synopsis "Console user interface library for Python")
5360 (description
5361 "Urwid is a curses-based UI/widget library for Python. It includes many
5362features useful for text console applications.")
5363 (license license:lgpl2.1+)))
5364
5365(define-public python2-urwid
5366 (package-with-python2 python-urwid))
5367
5368(define-public python-urwidtrees
5369 (package
5370 (name "python-urwidtrees")
5371 (version "1.0.2")
5372 (source
5373 (origin
5374 (method url-fetch)
5375 ;; package author intends on distributing via github rather than pypi:
5376 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5377 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5378 version ".tar.gz"))
5379 (file-name (string-append name "-" version ".tar.gz"))
5380 (sha256
5381 (base32
5382 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
5383 (build-system python-build-system)
5384 (arguments
5385 '(#:tests? #f)) ; no tests
5386 (propagated-inputs `(("python-urwid" ,python-urwid)))
5387 (home-page "https://github.com/pazz/urwidtrees")
5388 (synopsis "Tree widgets for urwid")
5389 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5390toolkit. Use it to build trees of widgets.")
5391 (license license:gpl3+)))
5392
5393(define-public python2-urwidtrees
5394 (package-with-python2 python-urwidtrees))
5395
5396(define-public python-ua-parser
5397 (package
5398 (name "python-ua-parser")
5399 (version "0.8.0")
5400 (source
5401 (origin
5402 (method url-fetch)
5403 (uri (pypi-uri "ua-parser" version))
5404 (sha256
5405 (base32
5406 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
5407 (build-system python-build-system)
5408 (arguments
5409 `(#:tests? #f)) ;no test suite in release
5410 (native-inputs
5411 `(("python-pyyaml" ,python-pyyaml)))
5412 (home-page "https://github.com/ua-parser/uap-python")
5413 (synopsis "User agent parser")
5414 (description
5415 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
5416 (license license:asl2.0)))
5417
5418(define-public python2-ua-parser
5419 (package-with-python2 python-ua-parser))
5420
5421(define-public python-user-agents
5422 (package
5423 (name "python-user-agents")
5424 (version "1.1.0")
5425 (source
5426 (origin
5427 (method url-fetch)
5428 (uri (pypi-uri "user-agents" version))
5429 (sha256
5430 (base32
5431 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
5432 (build-system python-build-system)
5433 (arguments
5434 `(#:tests? #f)) ;missing devices.json test file in release
5435 (propagated-inputs
5436 `(("python-ua-parser" ,python-ua-parser)))
5437 (home-page "https://github.com/selwin/python-user-agents")
5438 (synopsis "User Agent strings parsing library")
5439 (description
5440 "A library to identify devices (phones, tablets) and their capabilities by
5441parsing (browser/HTTP) user agent strings.")
5442 (license license:expat)))
5443
5444(define-public python2-user-agents
5445 (package-with-python2 python-user-agents))
5446
5447(define-public python-dbus
5448 (package
5449 (name "python-dbus")
5450 (version "1.2.8")
5451 (source
5452 (origin
5453 (method url-fetch)
5454 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
5455 "dbus-python-" version ".tar.gz"))
5456 (sha256
5457 (base32
5458 "0vvvjmiwnc9cjlks3gcdk43ap7llhlpz7cm1wbw0nc2yfsxjpwdb"))))
5459 (build-system gnu-build-system)
5460 (arguments
5461 '(#:phases
5462 (modify-phases %standard-phases
5463 (add-before
5464 'check 'pre-check
5465 (lambda _
5466 ;; XXX: For the missing '/etc/machine-id'.
5467 (substitute* "test/run-test.sh"
5468 (("DBUS_FATAL_WARNINGS=1")
5469 "DBUS_FATAL_WARNINGS=0"))
5470 #t)))))
5471 (native-inputs
5472 `(("pkg-config" ,pkg-config)))
5473 (inputs
5474 `(("python" ,python-wrapper)
5475 ("dbus-glib" ,dbus-glib)))
5476 (synopsis "Python bindings for D-bus")
5477 (description "python-dbus provides bindings for libdbus, the reference
5478implementation of D-Bus.")
5479 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
5480 (license license:expat)))
5481
5482(define-public python2-dbus
5483 (package (inherit python-dbus)
5484 (name "python2-dbus")
5485 (inputs `(("python" ,python-2)
5486 ,@(alist-delete "python"
5487 (package-inputs python-dbus)
5488 equal?)))
5489 ;; FIXME: on Python 2, the test_utf8 fails with:
5490 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5491 (arguments `(#:tests? #f))))
5492
5493(define-public python-lxml
5494 (package
5495 (name "python-lxml")
5496 (version "4.2.5")
5497 (source
5498 (origin
5499 (method url-fetch)
5500 (uri (pypi-uri "lxml" version))
5501 (sha256
5502 (base32
5503 "0zw0y9hs0nflxhl9cs6ipwwh53szi3w2x06wl0k9cylyqac0cwin"))))
5504 (build-system python-build-system)
5505 (inputs
5506 `(("libxml2" ,libxml2)
5507 ("libxslt" ,libxslt)))
5508 (home-page "http://lxml.de/")
5509 (synopsis
5510 "Python XML processing library")
5511 (description
5512 "The lxml XML toolkit is a Pythonic binding for the C libraries
5513libxml2 and libxslt.")
5514 (license license:bsd-3))) ; and a few more, see LICENSES.txt
5515
5516(define-public python2-lxml
5517 (package-with-python2 python-lxml))
5518
5519;; beautifulsoup4 has a totally different namespace than 3.x,
5520;; and pypi seems to put it under its own name, so I guess we should too
5521(define-public python-beautifulsoup4
5522 (package
5523 (name "python-beautifulsoup4")
5524 (version "4.6.3")
5525 (source
5526 (origin
5527 (method url-fetch)
5528 (uri (pypi-uri "beautifulsoup4" version))
5529 (sha256
5530 (base32
5531 "041dhalzjciw6qyzzq7a2k4h1yvyk76xigp35hv5ibnn448ydy4h"))))
5532 (build-system python-build-system)
5533 (arguments
5534 `(#:phases
5535 (modify-phases %standard-phases
5536 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5537 ;; must use this conversion script when building with Python 3. The
5538 ;; conversion script also runs the tests.
5539 ;; For more information, see the file 'convert-py3k' in the source
5540 ;; distribution.
5541 (replace 'check
dff0197e 5542 (lambda _ (invoke "./convert-py3k"))))))
44d10b1f
RW
5543 (home-page
5544 "https://www.crummy.com/software/BeautifulSoup/bs4/")
5545 (synopsis
5546 "Python screen-scraping library")
5547 (description
5548 "Beautiful Soup is a Python library designed for rapidly setting up
5549screen-scraping projects. It offers Pythonic idioms for navigating,
5550searching, and modifying a parse tree, providing a toolkit for
5551dissecting a document and extracting what you need. It automatically
5552converts incoming documents to Unicode and outgoing documents to UTF-8.")
5553 (license license:expat)
5554 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5555
5556(define-public python2-beautifulsoup4
5557 (package
5558 (inherit (package-with-python2
5559 (strip-python2-variant python-beautifulsoup4)))
5560 (arguments `(#:python ,python-2))))
5561
5562(define-public python-netifaces
5563 (package
5564 (name "python-netifaces")
5565 (version "0.10.7")
5566 (source
5567 (origin
5568 (method url-fetch)
5569 (uri (pypi-uri "netifaces" version))
5570 (sha256
5571 (base32
5572 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
5573 (build-system python-build-system)
5574 (home-page "https://github.com/al45tair/netifaces")
5575 (synopsis
5576 "Python module for portable network interface information")
5577 (description
5578 "Netifaces is a Python module providing information on network
5579interfaces in an easy and portable manner.")
5580 (license license:expat)))
5581
5582(define-public python2-netifaces
5583 (package-with-python2 python-netifaces))
5584
5585(define-public python-networkx
5586 (package
5587 (name "python-networkx")
5588 (version "2.2")
5589 (source
5590 (origin
5591 (method url-fetch)
5592 (uri (pypi-uri "networkx" version ".zip"))
5593 (sha256
5594 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
5595 (build-system python-build-system)
5596 ;; python-decorator is needed at runtime.
5597 (propagated-inputs
5598 `(("python-decorator" ,python-decorator)))
5599 (native-inputs
5600 `(("python-nose" ,python-nose)
5601 ("unzip" ,unzip)))
5602 (home-page "https://networkx.github.io/")
5603 (synopsis "Python module for creating and manipulating graphs and networks")
5604 (description
5605 "NetworkX is a Python package for the creation, manipulation, and study
5606of the structure, dynamics, and functions of complex networks.")
5607 (license license:bsd-3)))
5608
5609(define-public python2-networkx
5610 (package-with-python2 python-networkx))
5611
5612(define-public python-datrie
5613 (package
5614 (name "python-datrie")
5615 (version "0.7.1")
5616 (source
5617 (origin
5618 (method url-fetch)
5619 (uri (pypi-uri "datrie" version))
5620 (sha256
5621 (base32
5622 "08r0if7dry2q7p34gf7ffyrlnf4bdvnprxgydlfxgfnvq8f3f4bs"))))
5623 (build-system python-build-system)
5624 (arguments
5625 `(#:phases (modify-phases %standard-phases
5626 (add-before 'build 'cythonize
5627 (lambda _
5628 ;; Regenerate Cython classes to solve ABI issues with Python
5629 ;; 3.7.0. See <https://github.com/pytries/datrie/issues/52>.
5630 (invoke "cython" "src/datrie.pyx" "src/cdatrie.pxd"
5631 "src/stdio_ext.pxd" "-a"))))))
5632 (native-inputs
5633 `(("python-cython" ,python-cython)
5634 ("python-hypothesis" ,python-hypothesis)
5635 ("python-pytest" ,python-pytest)
5636 ("python-pytest-runner" ,python-pytest-runner)))
5637 (home-page "https://github.com/kmike/datrie")
5638 (synopsis "Fast, efficiently stored trie for Python")
5639 (description
5640 "This package provides a fast, efficiently stored trie implementation for
5641Python.")
5642 (license license:lgpl2.1+)))
5643
5644(define-public snakemake
5645 (package
5646 (name "snakemake")
5647 (version "5.2.4")
5648 (source
5649 (origin
5650 (method url-fetch)
5651 (uri (pypi-uri "snakemake" version))
5652 (sha256
5653 (base32 "0gj0xxgiq3mp9qyyrbfzldiaq1giliqw0in64nqiz7vx49myqj7z"))))
5654 (build-system python-build-system)
5655 (arguments
5656 ;; TODO: Package missing test dependencies.
5657 '(#:tests? #f
5658 #:phases
5659 (modify-phases %standard-phases
5660 ;; For cluster execution Snakemake will call Python. Since there is
5661 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
5662 ;; this by calling the snakemake wrapper instead.
5663 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
5664 (lambda* (#:key outputs #:allow-other-keys)
5665 (substitute* "snakemake/executors.py"
5666 (("\\{sys.executable\\} -m snakemake")
5667 (string-append (assoc-ref outputs "out")
5668 "/bin/snakemake")))
5669 #t)))))
5670 (propagated-inputs
5671 `(("python-gitpython" ,python-gitpython)
5672 ("python-wrapt" ,python-wrapt)
5673 ("python-requests" ,python-requests)
5674 ("python-appdirs" ,python-appdirs)
5675 ("python-configargparse" ,python-configargparse)
5676 ("python-datrie" ,python-datrie)
5677 ("python-docutils" ,python-docutils)
5678 ("python-jinja2" ,python-jinja2)
5679 ("python-jsonschema" ,python-jsonschema)
5680 ("python-networkx" ,python-networkx)
5681 ("python-pyyaml" ,python-pyyaml)
5682 ("python-ratelimiter" ,python-ratelimiter)))
5683 (home-page "https://snakemake.readthedocs.io")
5684 (synopsis "Python-based execution environment for make-like workflows")
5685 (description
5686 "Snakemake aims to reduce the complexity of creating workflows by
5687providing a clean and modern domain specific specification language (DSL) in
5688Python style, together with a fast and comfortable execution environment.")
5689 (license license:expat)))
5690
5691;; This is currently needed for the pigx-* packages.
5692(define-public snakemake-4
5693 (package (inherit snakemake)
5694 (version "4.4.0")
5695 (source
5696 (origin
5697 (method url-fetch)
5698 (uri (pypi-uri "snakemake" version))
5699 (sha256
5700 (base32 "0g0paia4z7w3srnqdmavq3hrb2x7qnpf81jx50njl0p7y4y0j8jv"))))
5701 (propagated-inputs
5702 `(("python-wrapt" ,python-wrapt)
5703 ("python-requests" ,python-requests)
5704 ("python-appdirs" ,python-appdirs)
5705 ("python-configargparse" ,python-configargparse)
5706 ("python-pyyaml" ,python-pyyaml)
5707 ("python-ratelimiter" ,python-ratelimiter)))))
5708
5709(define-public python-pyqrcode
5710 (package
5711 (name "python-pyqrcode")
5712 (version "1.2.1")
5713 (source
5714 (origin
5715 (method url-fetch)
5716 (uri (pypi-uri "PyQRCode" version))
5717 (sha256
5718 (base32
5719 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
5720 (build-system python-build-system)
5721 (home-page
5722 "https://github.com/mnooner256/pyqrcode")
5723 (synopsis "QR code generator")
5724 (description
5725 "Pyqrcode is a QR code generator written purely in Python with
5726SVG, EPS, PNG and terminal output.")
5727 (license license:bsd-3)))
5728
5729(define-public python-seaborn
5730 (package
5731 (name "python-seaborn")
5732 (version "0.9.0")
5733 (source
5734 (origin
5735 (method url-fetch)
5736 (uri (pypi-uri "seaborn" version))
5737 (sha256
5738 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))))
5739 (build-system python-build-system)
5740 (arguments
5741 `(#:phases
5742 (modify-phases %standard-phases
5743 (add-before 'check 'start-xserver
5744 (lambda* (#:key inputs #:allow-other-keys)
5745 (let ((xorg-server (assoc-ref inputs "xorg-server")))
5746 ;; There must be a running X server and make check doesn't
5747 ;; start one. Therefore we must do it.
5748 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
5749 (setenv "DISPLAY" ":1")
5750 #t)))
5751 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
5752 (propagated-inputs
5753 `(("python-pandas" ,python-pandas)
5754 ("python-matplotlib" ,python-matplotlib)
5755 ("python-numpy" ,python-numpy)
5756 ("python-scipy" ,python-scipy)))
5757 (native-inputs
5758 `(("python-pytest" ,python-pytest)
5759 ("xorg-server" ,xorg-server)))
5760 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5761 (synopsis "Statistical data visualization")
5762 (description
5763 "Seaborn is a library for making attractive and informative statistical
5764graphics in Python. It is built on top of matplotlib and tightly integrated
5765with the PyData stack, including support for numpy and pandas data structures
5766and statistical routines from scipy and statsmodels.")
5767 (license license:bsd-3)))
5768
5769(define-public python2-seaborn
5770 (package-with-python2 python-seaborn))
5771
5772(define-public python-mpmath
5773 (package
5774 (name "python-mpmath")
5775 (version "0.19")
5776 (source (origin
5777 (method url-fetch)
5778 (uri (string-append "http://mpmath.org/files/mpmath-"
5779 version ".tar.gz"))
5780 (sha256
5781 (base32
5782 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
5783 (build-system python-build-system)
5784 (arguments
5785 '(#:phases
5786 (modify-phases %standard-phases
5787 (replace 'check
5788 (lambda _
5d7a6f1c 5789 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
44d10b1f
RW
5790 (home-page "http://mpmath.org")
5791 (synopsis "Arbitrary-precision floating-point arithmetic in python")
5792 (description
5793 "@code{mpmath} can be used as an arbitrary-precision substitute for
5794Python's float/complex types and math/cmath modules, but also does much
5795more advanced mathematics.")
5796 (license license:bsd-3)))
5797
5798(define-public python2-mpmath
5799 (package-with-python2 python-mpmath))
5800
5801(define-public python-bigfloat
5802 (package
5803 (name "python-bigfloat")
5804 (version "0.3.0")
5805 (source
5806 (origin
5807 (method url-fetch)
5808 (uri (pypi-uri "bigfloat" version))
5809 (sha256
5810 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
5811 (build-system python-build-system)
5812 (inputs
5813 `(("mpfr" ,mpfr)))
5814 (home-page "https://github.com/mdickinson/bigfloat")
5815 (synopsis "Arbitrary precision floating-point arithmetic for Python")
5816 (description
5817 "This packages provides a Python interface to the MPFR library for
5818multiprecision arithmetic.")
5819 (license license:lgpl3+)))
5820
5821(define-public python2-bigfloat
5822 (package-with-python2 python-bigfloat))
5823
5824(define-public python-sympy
5825 (package
5826 (name "python-sympy")
5827 (version "1.1.1")
5828 (source
5829 (origin
5830 (method url-fetch)
5831 (uri (string-append
5832 "https://github.com/sympy/sympy/releases/download/sympy-"
5833 version "/sympy-" version ".tar.gz"))
5834 (sha256
5835 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
5836 (build-system python-build-system)
5837 (arguments
5838 `(#:phases
5839 (modify-phases %standard-phases
5840 ;; Run the core tests after installation. By default it would run
5841 ;; *all* tests, which take a very long time to complete and are known
5842 ;; to be flaky.
5843 (delete 'check)
5844 (add-after 'install 'check
5845 (lambda* (#:key outputs #:allow-other-keys)
5846 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
5847 #t)))))
5848 (propagated-inputs
5849 `(("python-mpmath" ,python-mpmath)))
5850 (home-page "http://www.sympy.org/")
5851 (synopsis "Python library for symbolic mathematics")
5852 (description
5853 "SymPy is a Python library for symbolic mathematics. It aims to become a
5854full-featured computer algebra system (CAS) while keeping the code as simple
5855as possible in order to be comprehensible and easily extensible.")
5856 (license license:bsd-3)))
5857
5858(define-public python2-sympy
5859 (package
5860 (inherit (package-with-python2 python-sympy))
5861 (arguments
5862 `(#:phases
5863 (modify-phases %standard-phases
5864 ;; Run the core tests after installation. By default it would run
5865 ;; *all* tests, which take a very long time to complete and are known
5866 ;; to be flaky.
5867 (delete 'check)
5868 (add-after 'install 'check
5869 (lambda* (#:key outputs #:allow-other-keys)
5870 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
5871 #t)))))))
5872
5873(define-public python-q
5874 (package
5875 (name "python-q")
5876 (version "2.6")
5877 (source
5878 (origin
5879 (method url-fetch)
5880 (uri (pypi-uri "q" version))
5881 (sha256
5882 (base32
5883 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
5884 (build-system python-build-system)
5885 (home-page "https://github.com/zestyping/q")
5886 (synopsis "Quick-and-dirty debugging output for tired programmers")
5887 (description
5888 "q is a Python module for \"print\" style of debugging Python code. It
5889provides convenient short API for print out of values, tracebacks, and
5890falling into the Python interpreter.")
5891 (license license:asl2.0)))
5892
5893(define-public python2-q
5894 (package-with-python2 python-q))
5895
5896(define-public python2-xlib
5897 (package
5898 (name "python2-xlib")
5899 (version "0.14")
5900 (source (origin
5901 (method url-fetch)
5902 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
5903 "/" version "/"
5904 "python-xlib-" version ".tar.gz"))
5905 (sha256
5906 (base32
5907 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
5908 (build-system python-build-system)
5909 (arguments
5910 `(#:python ,python-2 ;Python 2 only
5911 #:tests? #f)) ;no tests
5912 (home-page "http://python-xlib.sourceforge.net/")
5913 (synopsis "Python X11 client library")
5914 (description
5915 "The Python X Library is intended to be a fully functional X client
5916library for Python programs. It is useful to implement low-level X clients.
5917It is written entirely in Python.")
5918 (license license:gpl2+)))
5919
5920(define-public python-singledispatch
5921 (package
5922 (name "python-singledispatch")
5923 (version "3.4.0.3")
5924 (source
5925 (origin
5926 (method url-fetch)
5927 (uri (pypi-uri "singledispatch" version))
5928 (sha256
5929 (base32
5930 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
5931 (build-system python-build-system)
5932 (native-inputs
5933 `(("python-six" ,python-six))) ; required for conversion, not at run-time
5934 (home-page
5935 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
5936 (synopsis "Backport of singledispatch feature from Python 3.4")
5937 (description
5938 "This library brings functools.singledispatch from Python 3.4 to Python
59392.6-3.3.")
5940 (license license:expat)))
5941
5942(define-public python2-singledispatch
5943 (package-with-python2 python-singledispatch))
5944
5945;; the python- version can be removed with python-3.5
5946(define-public python-backports-abc
5947 (package
5948 (name "python-backports-abc")
5949 (version "0.5")
5950 (source
5951 (origin
5952 (method url-fetch)
5953 (uri (pypi-uri "backports_abc" version))
5954 (sha256
5955 (base32
5956 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
5957 (build-system python-build-system)
5958 (home-page "https://github.com/cython/backports_abc")
5959 (synopsis "Backport of additions to the 'collections.abc' module")
5960 (description
5961 "Python-backports-abc provides a backport of additions to the
36a4366d 5962@code{collections.abc} module in Python-3.5.")
44d10b1f
RW
5963 (license license:psfl)))
5964
5965(define-public python2-backports-abc
5966 (package-with-python2 python-backports-abc))
5967
5968(define-public python-backports-csv
5969 (package
5970 (name "python-backports-csv")
5971 (version "1.0.5")
5972 (source
5973 (origin
5974 (method url-fetch)
5975 (uri (pypi-uri "backports.csv" version))
5976 (sha256
5977 (base32
5978 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
5979 (build-system python-build-system)
5980 (home-page "https://github.com/ryanhiebert/backports.csv")
5981 (synopsis "Backport of Python 3's csv module for Python 2")
5982 (description
5983 "Provides a backport of Python 3's @code{csv} module for parsing
5984comma separated values. The API of the @code{csv} module in Python 2
5985is drastically different from the @code{csv} module in Python 3.
5986This is due, for the most part, to the difference between str in
5987Python 2 and Python 3.")
5988 (license license:psfl)))
5989
5990(define-public python2-backports-csv
5991 (package-with-python2 python-backports-csv))
5992
5993(define-public python2-backports-shutil-get-terminal-size
5994 (package
5995 (name "python2-backports-shutil-get-terminal-size")
5996 (version "1.0.0")
5997 (source
5998 (origin
5999 (method url-fetch)
6000 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6001 (sha256
6002 (base32
6003 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6004 (build-system python-build-system)
6005 (arguments
6006 `(#:python ,python-2
6007 #:phases
6008 (modify-phases %standard-phases
6009 (replace 'check
6010 (lambda _
4a4a7d9a 6011 (invoke "py.test" "-v"))))))
44d10b1f
RW
6012 (native-inputs
6013 `(("python2-pytest" ,python2-pytest)))
6014 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6015 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6016 (description
6017 "This package provides a backport of the @code{get_terminal_size
6018function} from Python 3.3's @code{shutil}.
6019Unlike the original version it is written in pure Python rather than C,
6020so it might be a tiny bit slower.")
6021 (license license:expat)))
6022
6023(define-public python-waf
6024 (package
6025 (name "python-waf")
6026 (version "2.0.11")
6027 (source (origin
6028 (method url-fetch)
6029 (uri (string-append "https://waf.io/"
6030 "waf-" version ".tar.bz2"))
6031 (sha256
6032 (base32
6033 "13zrniwkmfqgsgzi9v5m1367fppp9yzrz6z2ny6hy8dmpb8mj4z4"))))
6034 (build-system python-build-system)
6035 (arguments
6036 '(#:phases
6037 (modify-phases %standard-phases
6038 (replace 'build
6039 (lambda _
6040 (invoke "python" "waf-light" "configure" "build")))
6041 (replace 'check
6042 (lambda _
6043 (invoke "python" "waf" "--version")))
6044 (replace 'install
6045 (lambda* (#:key outputs #:allow-other-keys)
6046 (let ((out (assoc-ref outputs "out")))
6047 (install-file "waf" (string-append out "/bin")))
6048 #t))
6049 ;; waf breaks when it is wrapped.
6050 (delete 'wrap))))
6051 (home-page "https://waf.io/")
6052 (synopsis "Python-based build system")
6053 (description
6054 "Waf is a Python-based framework for configuring, compiling and installing
6055applications.")
6056 (license license:bsd-3)))
6057
6058(define-public python2-waf
6059 (package-with-python2 python-waf))
6060
6061(define-public python-pyzmq
6062 (package
6063 (name "python-pyzmq")
6064 (version "17.1.2")
6065 (source
6066 (origin
6067 (method url-fetch)
6068 (uri (pypi-uri "pyzmq" version))
6069 (sha256
6070 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
6071 (build-system python-build-system)
6072 (arguments
6073 `(#:configure-flags
6074 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6075 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6076 ;; --inplace' for 'python setup.py test' to work.
6077 #:tests? #f))
6078 (inputs
6079 `(("zeromq" ,zeromq)))
6080 (native-inputs
6081 `(("pkg-config" ,pkg-config)
6082 ("python-nose" ,python-nose)))
6083 (home-page "https://github.com/zeromq/pyzmq")
6084 (synopsis "Python bindings for 0MQ")
6085 (description
6086 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6087 (license license:bsd-4)))
6088
6089(define-public python2-pyzmq
6090 (package-with-python2 python-pyzmq))
6091
6092(define-public python-pep8
6093 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
6094 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
6095 ;; some dependents' test suites, and nothing more.
6096 (package
6097 (name "python-pep8")
6098 (version "1.7.0")
6099 (source
6100 (origin
6101 (method url-fetch)
6102 (uri (pypi-uri "pep8" version))
6103 (sha256
6104 (base32
6105 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
6106 (build-system python-build-system)
6107 (home-page "https://pep8.readthedocs.org/")
6108 (synopsis "Python style guide checker")
6109 (description
6110 "This tools checks Python code against some of the style conventions in
6111PEP 8.")
6112 (license license:expat)))
6113
6114(define-public python2-pep8
6115 (package-with-python2 python-pep8))
6116
6117(define-public python-pyflakes
6118 (package
6119 (name "python-pyflakes")
6120 (version "2.0.0")
6121 (source
6122 (origin
6123 (method url-fetch)
6124 (uri (pypi-uri "pyflakes" version))
6125 (sha256
6126 (base32
6127 "0jba28czyvimdc72llms3f17swp3i8jdcabf5w0j00adfbn64xls"))))
6128 (build-system python-build-system)
6129 (home-page
6130 "https://github.com/pyflakes/pyflakes")
6131 (synopsis "Passive checker of Python programs")
6132 (description
6133 "Pyflakes statically checks Python source code for common errors.")
6134 (license license:expat)))
6135
6136(define-public python2-pyflakes
6137 (package-with-python2 python-pyflakes))
6138
6139(define-public python-mccabe
6140 (package
6141 (name "python-mccabe")
6142 (version "0.6.1")
6143 (source
6144 (origin
6145 (method url-fetch)
6146 (uri (pypi-uri "mccabe" version))
6147 (sha256
6148 (base32
6149 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
6150 (build-system python-build-system)
6151 (native-inputs
6152 `(("python-pytest" ,python-pytest-bootstrap)
6153 ("python-pytest-runner" ,python-pytest-runner)))
6154 (home-page "https://github.com/flintwork/mccabe")
6155 (synopsis "McCabe checker, plugin for flake8")
6156 (description
6157 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6158complexity of Python source code.")
6159 (license license:expat)))
6160
6161(define-public python2-mccabe
6162 (package-with-python2 python-mccabe))
6163
6164(define-public python-mccabe-0.2.1
6165 (package (inherit python-mccabe)
6166 (version "0.2.1")
6167 (source
6168 (origin
6169 (method url-fetch)
6170 (uri (pypi-uri "mccabe" version))
6171 (sha256
6172 (base32
6173 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6174
6175(define-public python2-mccabe-0.2.1
6176 (package-with-python2 python-mccabe-0.2.1))
6177
6178;; Flake8 2.4.1 requires an older version of pep8.
6179;; This should be removed ASAP.
6180(define-public python-pep8-1.5.7
6181 (package (inherit python-pep8)
6182 (version "1.5.7")
6183 (source
f3576970
RW
6184 (origin
6185 (method url-fetch)
6186 (uri (pypi-uri "pep8" version))
6187 (sha256
6188 (base32
6189 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
44d10b1f
RW
6190 (arguments
6191 ;; XXX Tests not compatible with Python 3.5.
6192 '(#:tests? #f))))
6193
6194(define-public python2-pep8-1.5.7
6195 (package-with-python2 python-pep8-1.5.7))
6196
6197;; Flake8 2.4.1 requires an older version of pyflakes.
6198;; This should be removed ASAP.
6199(define-public python-pyflakes-0.8.1
6200 (package (inherit python-pyflakes)
6201 (version "0.8.1")
6202 (source
8c4dffb5
RW
6203 (origin
6204 (method url-fetch)
6205 (uri (pypi-uri "pyflakes" version))
6206 (sha256
6207 (base32
6208 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
44d10b1f
RW
6209 (arguments
6210 ;; XXX Tests not compatible with Python 3.5.
6211 '(#:tests? #f))))
6212
6213(define-public python2-pyflakes-0.8.1
6214 (package-with-python2 python-pyflakes-0.8.1))
6215
6216;; This package is used by hypothesis which has thousands of dependent packages.
6217;; FIXME: Consolidate this with "python-flake8" below in the next rebuild cycle.
6218(define-public python-flake8-3.5
6219 (package
6220 (name "python-flake8")
6221 (version "3.5.0")
6222 (source
6223 (origin
6224 (method url-fetch)
6225 (uri (pypi-uri "flake8" version))
6226 (sha256
6227 (base32
6228 "184b33grvvjmiwlv9kyd7yng9qv5ld24154j70z332xxg9gjclvj"))))
6229 (build-system python-build-system)
6230 (arguments
6231 `(#:phases
6232 (modify-phases %standard-phases
6233 ;; Two errors don't seem to have assigned codes.
6234 (add-after 'unpack 'delete-broken-test
6235 (lambda _ (delete-file "tests/unit/test_pyflakes_codes.py") #t))
6236 (add-after 'unpack 'fix-problem-with-pycodestyle
6237 (lambda _
6238 ;; See https://gitlab.com/pycqa/flake8/merge_requests/230
6239 ;; This should no longer be needed with the next release.
6240 (substitute* "setup.py"
6241 (("PEP8_PLUGIN\\('break_around_binary_operator'\\),")
6242 "PEP8_PLUGIN('break_after_binary_operator'),\
6243PEP8_PLUGIN('break_before_binary_operator'),"))
6244 #t))
6245 (delete 'check)
6246 (add-after 'install 'check
6247 (lambda* (#:key inputs outputs #:allow-other-keys)
6248 (add-installed-pythonpath inputs outputs)
6249 (invoke "pytest" "-v")
6250 #t)))))
6251 (propagated-inputs
6252 `(("python-pycodestyle" ,python-pycodestyle)
6253 ("python-pyflakes" ,python-pyflakes)
6254 ("python-mccabe" ,python-mccabe)))
6255 (native-inputs
6256 `(("python-mock" ,python-mock)
6257 ("python-pytest" ,python-pytest-bootstrap)
6258 ("python-pytest-runner" ,python-pytest-runner)))
6259 (home-page "https://gitlab.com/pycqa/flake8")
6260 (synopsis
6261 "The modular source code checker: pep8, pyflakes and co")
6262 (description
6263 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
6264 (properties `((python2-variant . ,(delay python2-flake8-3.5))))
6265 (license license:expat)))
6266
6267(define-public python2-flake8-3.5
6268 (let ((base (package-with-python2 (strip-python2-variant python-flake8-3.5))))
6269 (package (inherit base)
6270 (propagated-inputs
6271 `(("python2-configparser" ,python2-configparser)
6272 ("python2-enum34" ,python2-enum34)
6273 ,@(package-propagated-inputs base))))))
6274
6275;; Version 3.5.0 has compatibility issues with Pyflakes 2.0, so we need
6276;; this newer version. Keep it as a separate variable for now to avoid
6277;; rebuilding "python-hypothesis"; this should be removed in the next
6278;; rebuild cycle.
6279(define-public python-flake8
6280 (package
6281 (inherit python-flake8-3.5)
6282 (version "3.6.0")
6283 (source (origin
6284 (method url-fetch)
6285 (uri (pypi-uri "flake8" version))
6286 (sha256
6287 (base32
6288 "0w0nprx22rbvrrkbfx9v5jc5gskbm08g219l7r8wai8zfswgadba"))))
6289 (arguments
6290 (substitute-keyword-arguments (package-arguments python-flake8-3.5)
6291 ((#:phases phases)
6292 `(modify-phases ,phases
6293 (delete 'delete-broken-test)
6294 (delete 'fix-problem-with-pycodestyle)))))
6295 (properties `((python2-variant . ,(delay python2-flake8))))))
6296
6297(define-public python2-flake8
6298 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
6299 (package (inherit base)
6300 (propagated-inputs
6301 (package-propagated-inputs python2-flake8-3.5)))))
6302
6303;; python-hacking requires flake8 <2.6.0.
6304(define-public python-flake8-2.5
6305 (package
6306 (inherit python-flake8)
6307 (version "2.5.5")
6308 (source (origin
6309 (method url-fetch)
6310 (uri (pypi-uri "flake8" version))
6311 (sha256
6312 (base32
6313 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
6314 (propagated-inputs
6315 `(("python-pep8" ,python-pep8)
6316 ,@(package-propagated-inputs python-flake8)))
6317 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
6318
6319(define-public python2-flake8-2.5
6320 (package
6321 (inherit python2-flake8)
6322 (version (package-version python-flake8-2.5))
6323 (source (origin
6324 (inherit (package-source python-flake8-2.5))))
6325 (propagated-inputs
6326 `(("python2-pep8" ,python2-pep8)
6327 ,@(package-propagated-inputs python2-flake8)))))
6328
6329(define-public python-flake8-polyfill
6330 (package
6331 (name "python-flake8-polyfill")
6332 (version "1.0.2")
6333 (source
6334 (origin
6335 (method url-fetch)
6336 (uri (pypi-uri "flake8-polyfill" version))
6337 (sha256
6338 (base32
6339 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
6340 (build-system python-build-system)
6341 (arguments
6342 '(#:phases
6343 (modify-phases %standard-phases
6344 (replace 'check
6345 (lambda _
6346 (setenv "PYTHONPATH"
6347 (string-append (getcwd) "/build/lib:"
6348 (getenv "PYTHONPATH")))
4f0a0894 6349 (invoke "py.test" "-v"))))))
44d10b1f
RW
6350 (native-inputs
6351 `(("python-flake8" ,python-flake8)
6352 ("python-mock" ,python-mock)
6353 ("python-pep8" ,python-pep8)
6354 ("python-pycodestyle" ,python-pycodestyle)
6355 ("python-pytest" ,python-pytest)))
6356 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6357 (synopsis "Polyfill package for Flake8 plugins")
6358 (description
6359 "This package that provides some compatibility helpers for Flake8
6360plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6361 (license license:expat)))
6362
6363(define-public python2-flake8-polyfill
6364 (package-with-python2 python-flake8-polyfill))
6365
6366(define-public python-mistune
6367 (package
6368 (name "python-mistune")
6369 (version "0.8.4")
6370 (source
6371 (origin
6372 (method url-fetch)
6373 (uri (pypi-uri "mistune" version))
6374 (sha256
6375 (base32
6376 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
6377 (build-system python-build-system)
6378 (native-inputs
6379 `(("python-nose" ,python-nose)
6380 ("python-cython" ,python-cython)))
6381 (home-page "https://github.com/lepture/mistune")
6382 (synopsis "Markdown parser in pure Python")
6383 (description "This package provides a fast markdown parser in pure
6384Python.")
6385 (license license:bsd-3)))
6386
6387(define-public python2-mistune
6388 (package-with-python2 python-mistune))
6389
6390(define-public python-markdown
6391 (package
6392 (name "python-markdown")
1e3c7119 6393 (version "3.1")
44d10b1f
RW
6394 (source
6395 (origin
6396 (method url-fetch)
6397 (uri (pypi-uri "Markdown" version))
6398 (sha256
6399 (base32
1e3c7119 6400 "0l62x154r9mgdvfap06gf0nkrmjd7xixlfshsxcdif2nlrlnyjpw"))))
44d10b1f
RW
6401 (build-system python-build-system)
6402 (native-inputs
6403 `(("python-nose" ,python-nose)
6404 ("python-pyyaml" ,python-pyyaml)))
6405 (home-page "https://python-markdown.github.io/")
6406 (synopsis "Python implementation of Markdown")
6407 (description
6408 "This package provides a Python implementation of John Gruber's
6409Markdown. The library features international input, various Markdown
6410extensions, and several HTML output formats. A command line wrapper
6411markdown_py is also provided to convert Markdown files to HTML.")
6412 (license license:bsd-3)))
6413
6414(define-public python2-markdown
6415 (package-with-python2 python-markdown))
6416
6417(define-public python-ptyprocess
6418 (package
6419 (name "python-ptyprocess")
6420 (version "0.5.2")
6421 (source
6422 (origin
6423 (method url-fetch)
6424 (uri (pypi-uri "ptyprocess" version))
6425 (sha256
6426 (base32
6427 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
6428 (build-system python-build-system)
6429 (native-inputs
6430 `(("python-nose" ,python-nose)))
6431 (arguments
6432 `(#:phases
6433 (modify-phases %standard-phases
6434 (replace 'check
7904d6fa 6435 (lambda _ (invoke "nosetests"))))))
44d10b1f
RW
6436 (home-page "https://github.com/pexpect/ptyprocess")
6437 (synopsis "Run a subprocess in a pseudo terminal")
6438 (description
6439 "This package provides a Python library used to launch a subprocess in a
6440pseudo terminal (pty), and interact with both the process and its pty.")
6441 (license license:isc)))
6442
6443(define-public python2-ptyprocess
6444 (package-with-python2 python-ptyprocess))
6445
6446(define-public python-cram
6447 (package
6448 (name "python-cram")
6449 (version "0.7")
6450 (home-page "https://bitheap.org/cram/")
6451 (source (origin
6452 (method url-fetch)
6453 (uri (list (string-append home-page "cram-"
6454 version ".tar.gz")
6455 (pypi-uri "cram" version)))
6456 (sha256
6457 (base32
6458 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6459 (arguments
6460 '(#:phases
6461 (modify-phases %standard-phases
6462 (add-after 'unpack 'patch-source
6463 (lambda _
6464 (substitute* (find-files "cram" ".*\\.py$")
6465 ;; Replace default shell path.
6466 (("/bin/sh") (which "sh")))
6467 (substitute* (find-files "tests" ".*\\.t$")
6468 (("md5") "md5sum")
6469 (("/bin/bash") (which "bash"))
6470 (("/bin/sh") (which "sh")))
6471 (substitute* "cram/_test.py"
6472 ;; This hack works around a bug triggered by substituting
6473 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6474 ;; "cram -h", which breaks the output at 80 characters. This
6475 ;; causes the line showing the default shell to break into two
6476 ;; lines, but the test expects a single line...
6477 (("env\\['COLUMNS'\\] = '80'")
6478 "env['COLUMNS'] = '160'"))
6479 #t))
6480 (delete 'check)
6481 (add-after 'install 'check
6482 ;; The test phase uses the built library and executable.
6483 ;; It's easier to run it after install since the build
6484 ;; directory contains version-specific PATH.
6485 (lambda* (#:key inputs outputs #:allow-other-keys)
6486 (add-installed-pythonpath inputs outputs)
6487 (setenv "PATH" (string-append (getenv "PATH") ":"
6488 (assoc-ref outputs "out") "/bin"))
2d7db192 6489 (invoke "make" "test"))))))
44d10b1f
RW
6490 (build-system python-build-system)
6491 (native-inputs
6492 `(("python-coverage" ,python-coverage)
6493 ("which" ,which)))
6494 (synopsis "Simple testing framework for command line applications")
6495 (description
6496 "Cram is a functional testing framework for command line applications.
6497Cram tests look like snippets of interactive shell sessions. Cram runs each
6498command and compares the command output in the test with the command’s actual
6499output.")
6500 (license license:gpl2+)))
6501
6502(define-public python2-cram
6503 (package-with-python2 python-cram))
6504
6505(define-public python-straight-plugin
6506 (package
6507 (name "python-straight-plugin")
6508 (version "1.4.1")
6509 (source
6510 (origin
6511 (method url-fetch)
6512 (uri (pypi-uri "straight.plugin" version))
6513 (sha256
6514 (base32
6515 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6516 (build-system python-build-system)
6517 (home-page "https://github.com/ironfroggy/straight.plugin")
6518 (synopsis "Simple namespaced plugin facility")
6519 (description "Straight Plugin provides a type of plugin you can create from
6520almost any existing Python modules, and an easy way for outside developers to
6521add functionality and customization to your projects with their own plugins.")
6522 (license license:expat)))
6523
6524(define-public python2-straight-plugin
6525 (package-with-python2 python-straight-plugin))
6526
6527(define-public python-fonttools
6528 (package
6529 (name "python-fonttools")
6530 (version "3.28.0")
6531 (source (origin
6532 (method url-fetch)
6533 (uri (pypi-uri "fonttools" version ".zip"))
6534 (sha256
6535 (base32
6536 "0vsvjhidpb5kywpjgz1j3fywzkddxkb0afqai18qa3h6lqjyxwpb"))))
6537 (build-system python-build-system)
6538 (native-inputs
6539 `(("unzip" ,unzip)
6540 ("python-pytest" ,python-pytest)
6541 ("python-pytest-runner" ,python-pytest-runner)))
6542 (home-page "https://github.com/behdad/fonttools")
6543 (synopsis "Tools to manipulate font files")
6544 (description
6545 "FontTools/TTX is a library to manipulate font files from Python. It
6546supports reading and writing of TrueType/OpenType fonts, reading and writing
6547of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6548also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6549from an XML-based format.")
6550 (license license:expat)))
6551
6552(define-public python2-fonttools
6553 (package-with-python2 python-fonttools))
6554
6555(define-public python-ly
6556 (package
6557 (name "python-ly")
6558 (version "0.9.5")
6559 (source
6560 (origin
6561 (method url-fetch)
6562 (uri (pypi-uri name version))
6563 (sha256
6564 (base32
6565 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
6566 (build-system python-build-system)
6567 (arguments
6568 ;; FIXME: Some tests need network access.
6569 '(#:tests? #f))
6570 (synopsis "Tool and library for manipulating LilyPond files")
6571 (description "This package provides a Python library to parse, manipulate
6572or create documents in LilyPond format. A command line program ly is also
6573provided that can be used to do various manipulations with LilyPond files.")
6574 (home-page "https://pypi.python.org/pypi/python-ly")
6575 (license license:gpl2+)))
6576
6577(define-public python-appdirs
6578 (package
6579 (name "python-appdirs")
6580 (version "1.4.3")
6581 (source
6582 (origin
6583 (method url-fetch)
6584 (uri (pypi-uri "appdirs" version))
6585 (sha256
6586 (base32
6587 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
6588 (build-system python-build-system)
6589 (home-page "https://github.com/ActiveState/appdirs")
6590 (synopsis
6591 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6592 (description
6593 "This module provides a portable way of finding out where user data
6594should be stored on various operating systems.")
6595 (license license:expat)))
6596
6597(define-public python2-appdirs
6598 (package-with-python2 python-appdirs))
6599
6600(define-public python-llfuse
6601 (package
6602 (name "python-llfuse")
6603 (version "1.3.5")
6604 (source (origin
6605 (method url-fetch)
6606 (uri (pypi-uri "llfuse" version ".tar.bz2"))
6607 (sha256
6608 (base32
6609 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
6610 (build-system python-build-system)
6611 (inputs
6612 `(("fuse" ,fuse)
6613 ("attr" ,attr)))
6614 (native-inputs
6615 `(("pkg-config" ,pkg-config)))
6616 (synopsis "Python bindings for FUSE")
6617 (description
6618 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6619 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
6620 (license license:lgpl2.0+)
6621 (properties `((python2-variant . ,(delay python2-llfuse))))))
6622
6623(define-public python2-llfuse
6624 (package (inherit (package-with-python2
6625 (strip-python2-variant python-llfuse)))
6626 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6627
6628;; For attic-0.16
6629(define-public python-llfuse-0.41
6630 (package (inherit python-llfuse)
6631 (version "0.41.1")
6632 (source (origin
6633 (method url-fetch)
6634 (uri (string-append
6635 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6636 "llfuse-" version ".tar.bz2"))
6637 (sha256
6638 (base32
6639 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
6640 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6641 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
6642 (license (list license:expat license:lgpl2.0+))))
6643
6644(define-public python-msgpack
6645 (package
6646 (name "python-msgpack")
6647 (version "0.5.6")
6648 (source (origin
6649 (method url-fetch)
6650 (uri (pypi-uri "msgpack" version))
6651 (sha256
6652 (base32
6653 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
6654 (build-system python-build-system)
6655 (arguments
6656 `(#:modules ((guix build utils)
6657 (guix build python-build-system)
6658 (ice-9 ftw)
6659 (srfi srfi-1)
6660 (srfi srfi-26))
6661 #:phases
6662 (modify-phases %standard-phases
6663 (replace 'check
6664 (lambda _
6665 (let ((cwd (getcwd)))
6666 (setenv "PYTHONPATH"
6667 (string-append cwd "/build/"
6668 (find (cut string-prefix? "lib" <>)
6669 (scandir (string-append cwd "/build")))
6670 ":"
6671 (getenv "PYTHONPATH")))
6672 (invoke "pytest" "-v" "test")))))))
6673 (native-inputs
6674 `(("python-pytest" ,python-pytest)))
6675 (synopsis "MessagePack (de)serializer")
6676 (description "MessagePack is a fast, compact binary serialization format,
6677suitable for similar data to JSON. This package provides CPython bindings for
6678reading and writing MessagePack data.")
6679 (home-page "https://pypi.python.org/pypi/msgpack/")
6680 (license license:asl2.0)))
6681
6682;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
6683;; release 0.5. Some packages like borg still call it by the old name for now.
6684;; <https://bugs.gnu.org/30662>
6685(define-public python-msgpack-transitional
6686 (package
6687 (inherit python-msgpack)
6688 (name "python-msgpack-transitional")
6689 (arguments
6690 (substitute-keyword-arguments (package-arguments python-msgpack)
6691 ((#:phases phases)
6692 `(modify-phases ,phases
6693 (add-after 'unpack 'configure-transitional
6694 (lambda _
6695 ;; Keep using the old name.
6696 (substitute* "setup.py"
6697 (("TRANSITIONAL = False")
6698 "TRANSITIONAL = 1"))
6699 #t))))))))
6700
6701(define-public python2-msgpack
6702 (package-with-python2 python-msgpack))
6703
6704(define-public python-netaddr
6705 (package
6706 (name "python-netaddr")
6707 (version "0.7.19")
6708 (source
6709 (origin
6710 (method url-fetch)
6711 (uri (pypi-uri "netaddr" version))
6712 (sha256
6713 (base32
6714 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
6715 (build-system python-build-system)
6716 (arguments `(#:tests? #f)) ;; No tests.
6717 (home-page "https://github.com/drkjam/netaddr/")
6718 (synopsis "Pythonic manipulation of network addresses")
6719 (description
6720 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6721and MAC network addresses.")
6722 (license license:bsd-3)))
6723
6724(define-public python2-netaddr
6725 (package-with-python2 python-netaddr))
6726
6727(define-public python-wrapt
6728 (package
6729 (name "python-wrapt")
dddd7a75 6730 (version "1.11.1")
44d10b1f
RW
6731 (source
6732 (origin
6733 (method url-fetch)
6734 (uri (pypi-uri "wrapt" version))
6735 (sha256
6736 (base32
dddd7a75 6737 "0cqmysny1pz01jw26q48q5zasvns6507rwhgm6wcw743f0r01sja"))))
44d10b1f
RW
6738 (build-system python-build-system)
6739 (arguments
6740 ;; Tests are not included in the tarball, they are only available in the
6741 ;; git repository.
6742 `(#:tests? #f))
6743 (home-page "https://github.com/GrahamDumpleton/wrapt")
6744 (synopsis "Module for decorators, wrappers and monkey patching")
6745 (description
6746 "The aim of the wrapt module is to provide a transparent object proxy for
6747 Python, which can be used as the basis for the construction of function
6748 wrappers and decorator functions.")
6749 (license license:bsd-2)))
6750
6751(define-public python2-wrapt
6752 (package-with-python2 python-wrapt))
6753
6754(define-public python-xlrd
6755 (package
6756 (name "python-xlrd")
6757 (version "1.0.0")
6758 (source (origin
6759 (method url-fetch)
6760 (uri (pypi-uri "xlrd" version))
6761 (sha256
6762 (base32
6763 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
6764 (build-system python-build-system)
6765 (arguments
6766 `(#:phases
6767 (modify-phases %standard-phases
6768 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
6769 ;; run tests instead for now.
45fd0081 6770 (replace 'check (lambda _ (invoke "nosetests"))))))
44d10b1f
RW
6771 (native-inputs `(("python-nose" ,python-nose)))
6772 (home-page "http://www.python-excel.org/")
6773 (synopsis "Library for extracting data from Excel files")
6774 (description "This packages provides a library to extract data from
6775spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
6776@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
6777Unicode-aware. It is not intended as an end-user tool.")
6778 (license license:bsd-3)))
6779
6780(define-public python2-xlrd
6781 (package-with-python2 python-xlrd))
6782
6783(define-public python-prettytable
6784 (package
6785 (name "python-prettytable")
6786 (version "0.7.2")
6787 (source
6788 (origin
6789 (method url-fetch)
337c3a1e 6790 (uri (pypi-uri "prettytable" version ".tar.bz2"))
44d10b1f
RW
6791 (sha256
6792 (base32
6793 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
6794 (build-system python-build-system)
6795 (home-page "http://code.google.com/p/prettytable/")
6796 (synopsis "Display tabular data in an ASCII table format")
6797 (description
6798 "A library designed to represent tabular data in visually appealing ASCII
6799tables. PrettyTable allows for selection of which columns are to be printed,
6800independent alignment of columns (left or right justified or centred) and
6801printing of sub-tables by specifying a row range.")
6802 (license license:bsd-3)))
6803
6804(define-public python2-prettytable
6805 (package-with-python2 python-prettytable))
6806
6807(define-public python-tables
6808 (package
6809 (name "python-tables")
6810 (version "3.4.4")
6811 (source
6812 (origin
6813 (method url-fetch)
6814 (uri (pypi-uri "tables" version))
6815 (sha256
6816 (base32
6817 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
6818 (modules '((guix build utils)))
6819 (snippet
6820 '(begin
6821 ;; Remove pre-compiled .pyc files from source.
6822 (for-each delete-file-recursively
6823 (find-files "." "__pycache__" #:directories? #t))
6824 (for-each delete-file (find-files "." "\\.pyc$"))
6825 #t))))
6826 (build-system python-build-system)
6827 (arguments
6828 `(;; FIXME: python-build-system does not pass configure-flags to "build"
6829 ;; or "check", so we must override the build and check phases.
6830 #:phases
6831 (modify-phases %standard-phases
6832 (add-after 'unpack 'use-gcc
6833 (lambda _
6834 (substitute* "setup.py"
6835 (("compiler = new_compiler\\(\\)" line)
6836 (string-append line
6837 "\ncompiler.set_executables(compiler='gcc',"
6838 "compiler_so='gcc',"
6839 "linker_exe='gcc',"
6840 "linker_so='gcc -shared')")))
6841 #t))
6842 (replace 'build
6843 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
6844 (invoke "python" "setup.py" "build"
6845 (string-append "--hdf5="
6846 (assoc-ref inputs "hdf5")))))
44d10b1f
RW
6847 (replace 'check
6848 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
6849 (invoke "python" "setup.py" "check"
6850 (string-append "--hdf5="
6851 (assoc-ref inputs "hdf5"))))))))
44d10b1f
RW
6852 (propagated-inputs
6853 `(("python-numexpr" ,python-numexpr)
6854 ("python-numpy" ,python-numpy)))
6855 (native-inputs
6856 `(("python-cython" ,python-cython)
6857 ("pkg-config" ,pkg-config)))
6858 (inputs
6859 `(("hdf5" ,hdf5)
6860 ("bzip2" ,bzip2)
6861 ("zlib" ,zlib)))
6862 (home-page "http://www.pytables.org/")
6863 (synopsis "Hierarchical datasets for Python")
6864 (description "PyTables is a package for managing hierarchical datasets and
6865designed to efficiently cope with extremely large amounts of data.")
6866 (license license:bsd-3)))
6867
6868(define-public python2-tables
6869 (package-with-python2 python-tables))
6870
6871(define-public python-pyasn1
6872 (package
6873 (name "python-pyasn1")
6874 (version "0.4.3")
6875 (source
6876 (origin
6877 (method url-fetch)
6878 (uri (pypi-uri "pyasn1" version))
6879 (sha256
6880 (base32
6881 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
6882 (build-system python-build-system)
6883 (home-page "http://pyasn1.sourceforge.net/")
6884 (synopsis "ASN.1 types and codecs")
6885 (description
6886 "This is an implementation of ASN.1 types and codecs in Python. It is
6887suitable for a wide range of protocols based on the ASN.1 specification.")
6888 (license license:bsd-2)))
6889
6890(define-public python2-pyasn1
6891 (package-with-python2 python-pyasn1))
6892
6893(define-public python-pyasn1-modules
6894 (package
6895 (name "python-pyasn1-modules")
6896 (version "0.2.2")
6897 (source
6898 (origin
6899 (method url-fetch)
6900 (uri (pypi-uri "pyasn1-modules" version))
6901 (sha256
6902 (base32
6903 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
6904 (build-system python-build-system)
6905 (propagated-inputs
6906 `(("python-pyasn1" ,python-pyasn1)))
6907 (home-page "https://sourceforge.net/projects/pyasn1/")
6908 (synopsis "ASN.1 codec implementations")
6909 (description
6910 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
6911implementations of ASN.1-based codecs and protocols.")
6912 (license license:bsd-3)))
6913
6914(define-public python2-pyasn1-modules
6915 (package-with-python2 python-pyasn1-modules))
6916
6917(define-public python-ipaddress
6918 (package
6919 (name "python-ipaddress")
6920 (version "1.0.22")
6921 (source (origin
6922 (method url-fetch)
6923 (uri (pypi-uri "ipaddress" version))
6924 (sha256
6925 (base32
6926 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
6927 (build-system python-build-system)
6928 (home-page "https://github.com/phihag/ipaddress")
6929 (synopsis "IP address manipulation library")
6930 (description
6931 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
6932 in Python. This library is used to create, poke at, and manipulate IPv4 and
6933 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
6934 module to older versions of Python.")
6935 (license license:psfl)))
6936
6937(define-public python2-ipaddress
6938 (package-with-python2 python-ipaddress))
6939
6940(define-public python2-ipaddr
6941 (package
6942 (name "python2-ipaddr")
6943 (version "2.1.11")
6944 (source
6945 (origin
6946 (method url-fetch)
6947 (uri (pypi-uri "ipaddr" version))
6948 (sha256
6949 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
6950 (build-system python-build-system)
6951 (arguments
6952 `(#:python ,python-2 ;version 2 only
6953 #:phases
6954 (modify-phases %standard-phases
6955 (replace 'check
40b8c4e3 6956 (lambda _ (invoke "python" "ipaddr_test.py"))))))
44d10b1f
RW
6957 (home-page "https://github.com/google/ipaddr-py")
6958 (synopsis "IP address manipulation library")
6959 (description
6960 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
6961IPv6 addresses and networks.
6962
6963For new implementations you may prefer to use the standard module
6964@code{ipaddress}, which was introduced in Python 3.3 and backported to older
6965versions of Python.")
6966 (license license:asl2.0)))
6967
6968(define-public python-idna
6969 (package
6970 (name "python-idna")
e95c9837 6971 (version "2.8")
44d10b1f
RW
6972 (source
6973 (origin
6974 (method url-fetch)
6975 (uri (pypi-uri "idna" version))
6976 (sha256
6977 (base32
e95c9837 6978 "01rlkigdxg17sf9yar1jl8n18ls59367wqh59hnawlyg53vb6my3"))))
44d10b1f
RW
6979 (build-system python-build-system)
6980 (home-page "https://github.com/kjd/idna")
6981 (synopsis "Internationalized domain names in applications")
6982 (description
6983 "This is a library to support the Internationalised Domain Names in
6984Applications (IDNA) protocol as specified in RFC 5891. This version of the
6985protocol is often referred to as “IDNA2008” and can produce different results
6986from the earlier standard from 2003. The library is also intended to act as a
6987suitable drop-in replacement for the “encodings.idna” module that comes with
6988the Python standard library but currently only supports the older 2003
6989specification.")
6990 (license license:bsd-4)))
6991
6992(define-public python2-idna
6993 (package-with-python2 python-idna))
6994
6995(define-public python-idna-ssl
6996 (package
6997 (name "python-idna-ssl")
6998 (version "1.0.1")
6999 (source
7000 (origin
7001 (method url-fetch)
7002 (uri (pypi-uri "idna-ssl" version))
7003 (sha256
7004 (base32
7005 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
7006 (build-system python-build-system)
7007 (arguments
7008 `(#:tests? #f)) ;circular dependency with python-aiohttp
7009 (home-page "https://github.com/aio-libs/idna-ssl")
7010 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
7011 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
7012domains support.")
7013 (license license:expat)))
7014
7015(define-public python-pretend
7016 (package
7017 (name "python-pretend")
7018 (version "1.0.9")
7019 (source
7020 (origin
7021 (method url-fetch)
9f1f22ee 7022 (uri (pypi-uri "pretend" version))
44d10b1f
RW
7023 (sha256
7024 (base32
7025 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
7026 (build-system python-build-system)
7027 (home-page "https://github.com/alex/pretend")
7028 (synopsis "Library for stubbing in Python")
7029 (description
7030 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7031technique for writing tests. You may hear the term mixed up with mocks,
7032fakes, or doubles. Basically, a stub is an object that returns pre-canned
7033responses, rather than doing any computation.")
7034 (license license:bsd-3)))
7035
7036(define-public python2-pretend
7037 (package-with-python2 python-pretend))
7038
7039(define-public python-pip
7040 (package
7041 (name "python-pip")
7042 (version "18.1")
7043 (source
7044 (origin
7045 (method url-fetch)
7046 (uri (pypi-uri "pip" version))
7047 (sha256
7048 (base32
7049 "188fclay154s520n43s7cxxlhdaiysvxf19zk8vr1xbyjyyr58n0"))))
7050 (build-system python-build-system)
7051 (arguments
7052 '(#:tests? #f)) ; there are no tests in the pypi archive.
7053 (home-page "https://pip.pypa.io/")
7054 (synopsis "Package manager for Python software")
7055 (description
7056 "Pip is a package manager for Python software, that finds packages on the
7057Python Package Index (PyPI).")
7058 (license license:expat)))
7059
7060(define-public python2-pip
7061 (package-with-python2 python-pip))
7062
7063(define-public python-tlsh
7064 (package
7065 (name "python-tlsh")
7066 (version "3.4.5")
7067 (home-page "https://github.com/trendmicro/tlsh")
3e3ff8ad
TGR
7068 (source
7069 (origin
7070 (method git-fetch)
7071 (uri (git-reference
7072 (url "https://github.com/trendmicro/tlsh.git")
7073 (commit (string-append "v" version))))
7074 (file-name (git-file-name name version))
7075 (sha256
7076 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
44d10b1f
RW
7077 (build-system cmake-build-system)
7078 (arguments
7079 '(#:out-of-source? #f
7080 #:phases (modify-phases %standard-phases
7081 (replace
7082 'install
7083 (lambda* (#:key outputs #:allow-other-keys)
7084 ;; Build and install the Python bindings. The underlying
7085 ;; C++ library is apparently not meant to be installed.
7086 (let ((out (assoc-ref outputs "out")))
7087 (with-directory-excursion "py_ext"
7088 (and (system* "python" "setup.py" "build")
7089 (system* "python" "setup.py" "install"
7090 (string-append "--prefix=" out))))))))))
7091 (inputs `(("python" ,python-wrapper))) ;for the bindings
7092 (synopsis "Fuzzy matching library for Python")
7093 (description
7094 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7095Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7096value which can be used for similarity comparisons. Similar objects have
7097similar hash values, which allows for the detection of similar objects by
7098comparing their hash values. The byte stream should have a sufficient amount
7099of complexity; for example, a byte stream of identical bytes will not generate
7100a hash value.")
7101 (license license:asl2.0)))
7102
7103(define-public python2-tlsh
7104 (package
7105 (inherit python-tlsh)
7106 (name "python2-tlsh")
7107 (inputs `(("python" ,python-2)))))
7108
7109(define-public python-termcolor
7110 (package
7111 (name "python-termcolor")
7112 (version "1.1.0")
7113 (source
7114 (origin
7115 (method url-fetch)
7116 (uri (pypi-uri "termcolor" version))
7117 (sha256
7118 (base32
7119 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7120 (build-system python-build-system)
7121 (arguments
7122 ;; There are no tests.
7123 `(#:tests? #f))
7124 (home-page "https://pypi.python.org/pypi/termcolor")
7125 (synopsis "ANSII Color formatting for terminal output")
7126 (description
7127 "This package provides ANSII Color formatting for output in terminals.")
7128 (license license:expat)))
7129
7130(define-public python2-termcolor
7131 (package-with-python2 python-termcolor))
7132
7133(define-public python-libarchive-c
7134 (package
7135 (name "python-libarchive-c")
7136 (version "2.8")
7137 (source (origin
7138 (method url-fetch)
7139 (uri (pypi-uri "libarchive-c" version))
7140 (sha256
7141 (base32
7142 "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06"))))
7143 (build-system python-build-system)
7144 (arguments
7145 '(#:phases (modify-phases %standard-phases
7146 (add-before
7147 'build 'reference-libarchive
7148 (lambda* (#:key inputs #:allow-other-keys)
7149 ;; Retain the absolute file name of libarchive.so.
7150 (let ((libarchive (assoc-ref inputs "libarchive")))
7151 (substitute* "libarchive/ffi.py"
7152 (("find_library\\('archive'\\)")
7153 (string-append "'" libarchive
7154 "/lib/libarchive.so'"))))))
7155 (replace 'check
7156 (lambda _ (invoke "pytest" "-vv"))))))
7157 (native-inputs
7158 `(("python-mock" ,python-mock)
7159 ("python-pytest" ,python-pytest)))
7160 (inputs
7161 `(("libarchive" ,libarchive)))
7162 (home-page "https://github.com/Changaco/python-libarchive-c")
7163 (synopsis "Python interface to libarchive")
7164 (description
7165 "This package provides Python bindings to libarchive, a C library to
7166access possibly compressed archives in many different formats. It uses
7167Python's @code{ctypes} foreign function interface (FFI).")
7168 (license license:lgpl2.0+)))
7169
7170(define-public python2-libarchive-c
7171 (package-with-python2 python-libarchive-c))
7172
7173(define-public python-file
7174 (package
7175 (inherit file)
7176 (name "python-file")
7177 (build-system python-build-system)
7178 (arguments
7179 '(#:tests? #f ;no tests
7180 #:configure-flags '("--single-version-externally-managed" "--root=/")
7181 #:phases (modify-phases %standard-phases
7182 (add-before 'build 'change-directory
7183 (lambda _
7184 (chdir "python")
7185 #t))
7186 (add-before 'build 'set-library-file-name
7187 (lambda* (#:key inputs #:allow-other-keys)
7188 (let ((file (assoc-ref inputs "file")))
7189 (substitute* "magic.py"
7190 (("find_library\\('magic'\\)")
7191 (string-append "'" file "/lib/libmagic.so'")))
7192 #t))))))
7193 (inputs `(("file" ,file)))
528ea990
LC
7194 (native-inputs (if (%current-target-system)
7195 `(("self" ,this-package))
7196 '()))
44d10b1f
RW
7197 (synopsis "Python bindings to the libmagic file type guesser. Note that
7198this module and the python-magic module both provide a \"magic.py\" file;
7199these two modules, which are different and were developed separately, both
7200serve the same purpose: provide Python bindings for libmagic.")))
7201
7202(define-public python2-file
7203 (package-with-python2 python-file))
7204
7205(define-public python-debian
7206 (package
7207 (name "python-debian")
7208 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
7209 (version "0.1.28")
7210 (source
7211 (origin
7212 (method url-fetch)
7213 (uri (pypi-uri name version))
7214 (sha256
7215 (base32
7216 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
7217 (build-system python-build-system)
7218 (propagated-inputs
7219 `(("python-six" ,python-six)))
7220 (synopsis "Debian package related modules")
7221 (description
7222 ;; XXX: Use @enumerate instead of @itemize to work around
7223 ;; <http://bugs.gnu.org/21772>.
7224 "This package provides Python modules that abstract many formats of
7225Debian-related files, such as:
7226
7227@enumerate
7228@item Debtags information;
7229@item @file{debian/changelog} files;
7230@item packages files, pdiffs;
7231@item control files of single or multiple RFC822-style paragraphs---e.g.
7232 @file{debian/control}, @file{.changes}, @file{.dsc};
7233@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7234 contained files and meta-information.
7235@end enumerate\n")
7236
7237 ;; Modules are either GPLv2+ or GPLv3+.
7238 (license license:gpl3+)))
7239
7240(define-public python2-debian
7241 (package-with-python2 python-debian))
7242
7243(define-public python-nbformat
7244 (package
7245 (name "python-nbformat")
7246 (version "4.4.0")
7247 (source
7248 (origin
7249 (method url-fetch)
7250 (uri (pypi-uri "nbformat" version))
7251 (sha256
7252 (base32
7253 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
7254 (build-system python-build-system)
7255 (arguments `(#:tests? #f)) ; no test target
7256 (propagated-inputs
7257 `(("python-ipython-genutils" ,python-ipython-genutils)
7258 ("python-jsonschema" ,python-jsonschema)
7259 ("python-jupyter-core" ,python-jupyter-core)
7260 ("python-traitlets" ,python-traitlets)))
7261 (home-page "http://jupyter.org")
7262 (synopsis "Jupyter Notebook format")
7263 (description "This package provides the reference implementation of the
7264Jupyter Notebook format and Python APIs for working with notebooks.")
7265 (license license:bsd-3)))
7266
7267(define-public python2-nbformat
7268 (package-with-python2 python-nbformat))
7269
7270(define-public python-bleach
7271 (package
7272 (name "python-bleach")
7273 (version "1.4.3")
7274 (source
7275 (origin
7276 (method url-fetch)
7277 (uri (pypi-uri "bleach" version))
7278 (sha256
7279 (base32
7280 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
7281 (build-system python-build-system)
7282 (propagated-inputs
7283 `(("python-html5lib" ,python-html5lib-0.9)
7284 ("python-six" ,python-six)))
7285 (native-inputs
7286 `(("python-nose" ,python-nose)))
7287 (home-page "https://github.com/jsocol/bleach")
7288 (synopsis "Whitelist-based HTML-sanitizing tool")
7289 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7290 (license license:asl2.0)))
7291
7292(define-public python2-bleach
7293 (package-with-python2 python-bleach))
7294
7295(define-public python-entrypoints
7296 (package
7297 (name "python-entrypoints")
a7f1b718 7298 (version "0.3")
44d10b1f
RW
7299 (source
7300 (origin
7301 (method url-fetch)
a7f1b718 7302 (uri (pypi-uri "entrypoints" version))
44d10b1f
RW
7303 (sha256
7304 (base32
a7f1b718 7305 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
44d10b1f
RW
7306 (build-system python-build-system)
7307 ;; The package does not come with a setup.py file, so we have to generate
7308 ;; one ourselves.
7309 (arguments
7310 `(#:tests? #f
7311 #:phases
7312 (modify-phases %standard-phases
7313 (add-after 'unpack 'create-setup.py
7314 (lambda _
7315 (call-with-output-file "setup.py"
7316 (lambda (port)
7317 (format port "\
7318from setuptools import setup
7319setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7320" ,version))))))))
7321 (home-page "https://github.com/takluyver/entrypoints")
7322 (synopsis "Discover and load entry points from installed Python packages")
7323 (description "Entry points are a way for Python packages to advertise
7324objects with some common interface. The most common examples are
7325@code{console_scripts} entry points, which define shell commands by
7326identifying a Python function to run. The @code{entrypoints} module contains
7327functions to find and load entry points.")
7328 (license license:expat)))
7329
7330(define-public python2-entrypoints
7331 (package-with-python2 python-entrypoints))
7332
7333(define-public python-nbconvert
7334 (package
7335 (name "python-nbconvert")
7336 (version "5.0.0b1")
7337 (source
7338 (origin
7339 (method url-fetch)
7340 (uri (pypi-uri "nbconvert" version))
7341 (sha256
7342 (base32
7343 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7344 (build-system python-build-system)
7345 (arguments
7346 `(;; The "bdist_egg" target is disabled by default, causing the installation
7347 ;; to fail.
7348 #:configure-flags (list "bdist_egg")
7349 ;; FIXME: 5 failures, 40 errors.
7350 #:tests? #f))
7351 ;; #:phases
7352 ;; (modify-phases %standard-phases
7353 ;; (replace 'check
7354 ;; (lambda _
7355 ;; (zero? (system* "py.test" "-v")))))
7356 (native-inputs
7357 `(("python-pytest" ,python-pytest)))
7358 (propagated-inputs
7359 `(("python-bleach" ,python-bleach)
7360 ("python-entrypoints" ,python-entrypoints)
7361 ("python-jinja2" ,python-jinja2)
7362 ("python-jupyter-core" ,python-jupyter-core)
7363 ("python-mistune" ,python-mistune)
7364 ("python-nbformat" ,python-nbformat)
7365 ("python-pygments" ,python-pygments)
7366 ("python-traitlets" ,python-traitlets)))
7367 (home-page "http://jupyter.org")
7368 (synopsis "Converting Jupyter Notebooks")
7369 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7370notebooks to various other formats via Jinja templates. It allows you to
7371convert an @code{.ipynb} notebook file into various static formats including:
7372
7373@enumerate
7374@item HTML
7375@item LaTeX
7376@item PDF
7377@item Reveal JS
7378@item Markdown (md)
7379@item ReStructured Text (rst)
7380@item executable script
7381@end enumerate\n")
7382 (license license:bsd-3)))
7383
7384(define-public python2-nbconvert
7385 (package-with-python2 python-nbconvert))
7386
44d10b1f
RW
7387(define-public python-notebook
7388 (package
7389 (name "python-notebook")
7390 (version "5.7.4")
7391 (source (origin
7392 (method url-fetch)
7393 (uri (pypi-uri "notebook" version))
7394 (sha256
7395 (base32
7396 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
7397 (build-system python-build-system)
7398 (arguments
7399 `(#:phases
7400 (modify-phases %standard-phases
7401 (replace 'check
7402 (lambda _
7403 ;; These tests require a browser
7404 (delete-file-recursively "notebook/tests/selenium")
7405 ;; Some tests need HOME
7406 (setenv "HOME" "/tmp")
7407 ;; This file contains "warningfilters", which are not supported
7408 ;; by this version of nose.
7409 (delete-file "setup.cfg")
7410 (with-directory-excursion "/tmp"
7411 (invoke "nosetests" "-v"))
7412 #t)))))
7413 (propagated-inputs
7414 `(("python-jupyter-core" ,python-jupyter-core)
7415 ("python-nbformat" ,python-nbformat)
7416 ("python-nbconvert" ,python-nbconvert)
7417 ("python-prometheus-client" ,python-prometheus-client)
7418 ("python-send2trash" ,python-send2trash)
7419 ("python-terminado" ,python-terminado)))
7420 (native-inputs
7421 `(("python-nose" ,python-nose)
7422 ("python-sphinx" ,python-sphinx)
7423 ("python-requests" ,python-requests)))
7424 (home-page "http://jupyter.org/")
7425 (synopsis "Web-based notebook environment for interactive computing")
7426 (description
7427 "The Jupyter HTML notebook is a web-based notebook environment for
7428interactive computing.")
7429 (properties `((python2-variant . ,(delay python2-notebook))))
7430 (license license:bsd-3)))
7431
7432(define-public python2-notebook
7433 (let ((base (package-with-python2
7434 (strip-python2-variant python-notebook))))
7435 (package (inherit base)
7436 (native-inputs
7437 `(("python2-mock" ,python2-mock)
7438 ,@(package-native-inputs base)))
7439 (arguments
7440 (substitute-keyword-arguments (package-arguments base)
7441 ((#:phases phases)
7442 `(modify-phases ,phases
7443 (add-before 'check 'disable-test-case
7444 ;; The test requires network access to localhost. Curiously it
7445 ;; fails with Python 2 only. Simply make the test-case return
7446 ;; immediately.
7447 (lambda _
7448 (substitute*
7449 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7450 (("formats = self.nbconvert_api") "return #")))))))))))
7451
7452(define-public python-widgetsnbextension
7453 (package
7454 (name "python-widgetsnbextension")
7455 (version "3.4.2")
7456 (source
7457 (origin
7458 (method url-fetch)
7459 (uri (pypi-uri "widgetsnbextension" version))
7460 (sha256
7461 (base32
7462 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
7463 (build-system python-build-system)
7464 (propagated-inputs
7465 `(("python-ipykernel" ,python-ipykernel)
7466 ("python-notebook" ,python-notebook)))
7467 (native-inputs
7468 `(("python-certifi" ,python-certifi)
7469 ("python-nose" ,python-nose)))
7470 (home-page "https://ipython.org")
7471 (synopsis "IPython HTML widgets for Jupyter")
7472 (description "This package provides interactive HTML widgets for Jupyter
7473notebooks.")
7474 (license license:bsd-3)))
7475
7476(define-public python2-widgetsnbextension
7477 (package-with-python2 python-widgetsnbextension))
7478
7479(define-public python-ipywidgets
7480 (package
7481 (name "python-ipywidgets")
7482 (version "5.2.2")
7483 (source
7484 (origin
7485 (method url-fetch)
7486 (uri (pypi-uri "ipywidgets" version))
7487 (sha256
7488 (base32
7489 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7490 (build-system python-build-system)
7491 (propagated-inputs
7492 `(("python-ipython" ,python-ipython)
7493 ("python-traitlets" ,python-traitlets)
7494 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7495 (native-inputs
7496 `(("python-nose" ,python-nose)
7497 ("python-pytest" ,python-pytest)))
7498 (home-page "https://ipython.org")
7499 (synopsis "IPython HTML widgets for Jupyter")
7500 (description "Ipywidgets are interactive HTML widgets for Jupyter
7501notebooks and the IPython kernel. Notebooks come alive when interactive
7502widgets are used. Users gain control of their data and can visualize changes
7503in the data.")
7504 (license license:bsd-3)))
7505
7506(define-public python2-ipywidgets
7507 (package-with-python2 python-ipywidgets))
7508
7509(define-public python-jupyter-console
7510 (package
7511 (name "python-jupyter-console")
7512 (version "5.2.0")
7513 (source
7514 (origin
7515 (method url-fetch)
7516 (uri (pypi-uri "jupyter_console" version))
7517 (sha256
7518 (base32
7519 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
7520 (build-system python-build-system)
7521 ;; Tests only run in an TTY.
7522 (arguments `(#:tests? #f))
7523 (propagated-inputs
7524 `(("python-ipykernel" ,python-ipykernel)
7525 ("python-jupyter-client" ,python-jupyter-client)
7526 ("python-prompt-toolkit" ,python-prompt-toolkit-1)
7527 ("python-pygments" ,python-pygments)))
7528 (native-inputs
7529 `(("python-nose" ,python-nose)))
7530 (home-page "https://jupyter.org")
7531 (synopsis "Jupyter terminal console")
7532 (description "This package provides a terminal-based console frontend for
7533Jupyter kernels. It also allows for console-based interaction with non-Python
7534Jupyter kernels such as IJulia and IRKernel.")
7535 (license license:bsd-3)))
7536
7537(define-public python2-jupyter-console
7538 (package-with-python2 python-jupyter-console))
7539
7540;; The python-ipython and python-jupyter-console require each other. To get
7541;; the functionality in both packages working, strip down the
7542;; python-jupyter-console package when using it as an input to python-ipython.
7543(define python-jupyter-console-minimal
7544 (package
7545 (inherit python-jupyter-console)
7546 (name "python-jupyter-console-minimal")
7547 (arguments
7548 (substitute-keyword-arguments
7549 (package-arguments python-jupyter-console)
7550 ((#:phases phases)
7551 `(modify-phases ,phases
7552 (add-after 'install 'delete-bin
7553 (lambda* (#:key outputs #:allow-other-keys)
7554 ;; Delete the bin files, to avoid conflicts in profiles
7555 ;; where python-ipython and python-jupyter-console are
7556 ;; both present.
7557 (delete-file-recursively
7558 (string-append
7559 (assoc-ref outputs "out") "/bin"))))))))
7560 ;; Remove the python-ipython propagated input, to avoid the cycle
7561 (propagated-inputs
7562 (alist-delete
7563 "python-ipython"
7564 (package-propagated-inputs python-jupyter-console)))))
7565
7566(define-public python-qtconsole
7567 (package
7568 (name "python-qtconsole")
7569 (version "4.4.3")
7570 (source
7571 (origin
7572 (method url-fetch)
7573 (uri (pypi-uri "qtconsole" version))
7574 (sha256
7575 (base32
7576 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
7577 (build-system python-build-system)
7578 (arguments
7579 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
7580 ;; but we only have the LTS version 5.x. This means that there might be
7581 ;; runtime errors, but since this is a dependency of the Jupyter package,
7582 ;; and Jupyter can be used without the qtconsole we can overlook this for
7583 ;; now.
7584 `(#:tests? #f
7585 #:phases
7586 (modify-phases %standard-phases
7587 (add-before 'check 'pre-check
7588 (lambda _
7589 (setenv "QT_QPA_PLATFORM" "offscreen")
7590 #t)))))
7591 (propagated-inputs
7592 `(("python-ipykernel" ,python-ipykernel)
7593 ("python-ipython" ,python-ipython)))
7594 (native-inputs
7595 `(("python-pytest" ,python-pytest)))
7596 (home-page "http://jupyter.org")
7597 (synopsis "Jupyter Qt console")
7598 (description "This package provides a Qt-based console for Jupyter with
7599support for rich media output.")
7600 (license license:bsd-3)))
7601
7602(define-public jupyter
7603 (package
7604 (name "jupyter")
7605 (version "1.0.0")
7606 (source
7607 (origin
7608 (method url-fetch)
7609 (uri (pypi-uri "jupyter" version))
7610 (sha256
7611 (base32
7612 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
7613 (build-system python-build-system)
7614 (arguments '(#:tests? #f)) ; there are none.
7615 (propagated-inputs
7616 `(("python-ipykernel" ,python-ipykernel)
7617 ("python-ipywidgets" ,python-ipywidgets)
7618 ("python-jupyter-console" ,python-jupyter-console)
7619 ("python-nbconvert" ,python-nbconvert)
7620 ("python-notebook" ,python-notebook)
7621 ("python-qtconsole" ,python-qtconsole)))
7622 (native-search-paths
7623 (list (search-path-specification
7624 (variable "JUPYTER_PATH")
7625 (files '("share/jupyter")))))
7626 (home-page "https://jupyter.org")
7627 (synopsis "Web application for interactive documents")
7628 (description
7629 "The Jupyter Notebook is a web application that allows you to create and
7630share documents that contain live code, equations, visualizations and
7631explanatory text. Uses include: data cleaning and transformation, numerical
7632simulation, statistical modeling, machine learning and much more.")
7633 (license license:bsd-3)))
7634
7635(define-public python-chardet
7636 (package
7637 (name "python-chardet")
7638 (version "3.0.4")
7639 (source
7640 (origin
7641 (method url-fetch)
7642 (uri (pypi-uri "chardet" version))
7643 (sha256
7644 (base32
7645 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
7646 (native-inputs
7647 `(("python-hypothesis" ,python-hypothesis)
7648 ("python-pytest" ,python-pytest)
7649 ("python-pytest-runner" ,python-pytest-runner)))
7650 (build-system python-build-system)
7651 (home-page "https://github.com/chardet/chardet")
7652 (synopsis "Universal encoding detector for Python 2 and 3")
7653 (description
7654 "This package provides @code{chardet}, a Python module that can
7655automatically detect a wide range of file encodings.")
7656 (license license:lgpl2.1+)))
7657
7658(define-public python2-chardet
7659 (package-with-python2 python-chardet))
7660
7661(define-public python-docopt
7662 (package
7663 (name "python-docopt")
7664 (version "0.6.2")
7665 (source
7666 (origin
7667 (method url-fetch)
7668 ;; The release on PyPI does not include tests.
7669 (uri (string-append
7670 "https://github.com/docopt/docopt/archive/"
7671 version ".tar.gz"))
7672 (file-name (string-append name "-" version ".tar.gz"))
7673 (sha256
7674 (base32
7675 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
7676 (build-system python-build-system)
7677 (native-inputs
7678 `(("python-pytest" ,python-pytest)))
7679 (arguments
7680 `(#:phases
7681 (modify-phases %standard-phases
7682 (replace 'check
7683 (lambda _ (invoke "py.test"))))))
7684 (home-page "http://docopt.org")
7685 (synopsis "Command-line interface description language for Python")
7686 (description "This library allows the user to define a command-line
7687interface from a program's help message rather than specifying it
7688programatically with command-line parsers like @code{getopt} and
7689@code{argparse}.")
7690 (license license:expat)))
7691
7692(define-public python2-docopt
7693 (package-with-python2 python-docopt))
7694
7695(define-public python-pythondialog
7696 (package
7697 (name "python-pythondialog")
7698 (version "3.4.0")
7699 (source
7700 (origin
7701 (method url-fetch)
7702 (uri (pypi-uri "pythondialog" version))
7703 (sha256
7704 (base32
7705 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
7706 (build-system python-build-system)
7707 (arguments
7708 `(#:phases
7709 (modify-phases %standard-phases
7710 (add-after 'unpack 'patch-path
7711 (lambda* (#:key inputs #:allow-other-keys)
7712 (let* ((dialog (assoc-ref inputs "dialog")))
7713 ;; Since this library really wants to grovel the search path, we
7714 ;; must hardcode dialog's store path into it.
7715 (substitute* "dialog.py"
7716 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
7717 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
7718 #t))))
7719 #:tests? #f)) ; no test suite
7720 (propagated-inputs
7721 `(("dialog" ,dialog)))
7722 (home-page "http://pythondialog.sourceforge.net/")
7723 (synopsis "Python interface to the UNIX dialog utility")
7724 (description "A Python wrapper for the dialog utility. Its purpose is to
7725provide an easy to use, pythonic and comprehensive Python interface to dialog.
7726This allows one to make simple text-mode user interfaces on Unix-like systems")
7727 (license license:lgpl2.1)
7728 (properties `((python2-variant . ,(delay python2-pythondialog))))))
7729
7730(define-public python2-pythondialog
7731 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
7732 (package
7733 (inherit base)
7734 (version (package-version python-pythondialog))
7735 (source (origin
7736 (method url-fetch)
7737 (uri (pypi-uri "python2-pythondialog" version))
7738 (sha256
7739 (base32
7740 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
7741
7742(define-public python-configobj
7743 (package
7744 (name "python-configobj")
7745 (version "5.0.6")
7746 (source (origin
7747 (method url-fetch)
b0758fbb 7748 (uri (pypi-uri "configobj" version))
44d10b1f
RW
7749 (sha256
7750 (base32
7751 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
7752 ;; Patch setup.py so it looks for python-setuptools, which is
7753 ;; required to parse the keyword 'install_requires' in setup.py.
7754 (patches (search-patches "python-configobj-setuptools.patch"))))
7755 (build-system python-build-system)
7756 (propagated-inputs
7757 `(("python-six" ,python-six)))
7758 (synopsis "Config file reading, writing and validation")
7759 (description "ConfigObj is a simple but powerful config file reader and
7760writer: an ini file round tripper. Its main feature is that it is very easy to
7761use, with a straightforward programmer’s interface and a simple syntax for
7762config files.")
7763 (home-page "https://github.com/DiffSK/configobj")
7764 (license license:bsd-3)))
7765
7766(define-public python2-configobj
7767 (package-with-python2 python-configobj))
7768
7769(define-public python-configargparse
7770 (package
7771 (name "python-configargparse")
86ae491f 7772 (version "0.14.0")
44d10b1f
RW
7773 (source (origin
7774 (method url-fetch)
7775 (uri (pypi-uri "ConfigArgParse" version))
7776 (sha256
7777 (base32
86ae491f 7778 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
44d10b1f
RW
7779 (build-system python-build-system)
7780 (native-inputs
7781 `(("python-pyyaml" ,python-pyyaml)))
7782 (arguments
7783 `(#:phases
7784 (modify-phases %standard-phases
7785 (replace 'check
7786 (lambda _
7787 ;; Bypass setuptools-shim because one test relies on "setup.py"
7788 ;; being the first argument passed to the python call.
7789 ;;
7790 ;; NOTE: Many tests do not run because they rely on Python's
7791 ;; built-in test.test_argparse, but we remove the unit tests from
7792 ;; our Python installation.
7793 (invoke "python" "setup.py" "test"))))))
7794 (synopsis "Replacement for argparse")
7795 (description "A drop-in replacement for argparse that allows options to also
7796be set via config files and/or environment variables.")
7797 (home-page "https://github.com/bw2/ConfigArgParse")
7798 (license license:expat)))
7799
7800(define-public python2-configargparse
7801 (package-with-python2 python-configargparse))
7802
7803(define-public python-argparse-manpage
7804 (package
7805 (name "python-argparse-manpage")
7806 (version "1.1")
7807 (source
7808 (origin
7809 (method url-fetch)
7810 (uri (pypi-uri "argparse-manpage" version))
7811 (sha256
7812 (base32
7813 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
7814 (build-system python-build-system)
7815 (home-page "https://github.com/praiskup/argparse-manpage")
7816 (synopsis "Build manual page from Python's ArgumentParser object")
7817 (description
7818 "This package provides tools to build manual pages from Python's
7819@code{ArgumentParser} object.")
7820 (license license:asl2.0)))
7821
7822(define-public python2-contextlib2
7823 (package
7824 (name "python2-contextlib2")
7825 (version "0.5.5")
7826 (source
7827 (origin
7828 (method url-fetch)
7829 (uri (pypi-uri "contextlib2" version))
7830 (sha256
7831 (base32
7832 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
7833 (build-system python-build-system)
7834 (arguments
7835 `(#:python ,python-2
7836 #:phases
7837 (modify-phases %standard-phases
7838 (replace 'check
7839 (lambda _ (invoke "python" "test_contextlib2.py" "-v"))))))
7840 (native-inputs
7841 `(("python2-unittest2" ,python2-unittest2)))
7842 (home-page "http://contextlib2.readthedocs.org/")
7843 (synopsis "Tools for decorators and context managers")
7844 (description "This module is primarily a backport of the Python
78453.2 contextlib to earlier Python versions. Like contextlib, it
7846provides utilities for common tasks involving decorators and context
7847managers. It also contains additional features that are not part of
7848the standard library.")
7849 (license license:psfl)))
7850
7851(define-public python-texttable
7852 (package
7853 (name "python-texttable")
7854 (version "0.8.7")
7855 (source
7856 (origin
7857 (method url-fetch)
7858 (uri (pypi-uri "texttable" version))
7859 (sha256
7860 (base32
7861 "1liiiydgkg37i46a418aw19fyf6z3ds51wdwwpyjbs12x0phhf4a"))))
7862 (build-system python-build-system)
7863 (arguments '(#:tests? #f)) ; no tests
7864 (home-page "https://github.com/foutaise/texttable/")
7865 (synopsis "Python module for creating simple ASCII tables")
7866 (description "Texttable is a Python module for creating simple ASCII
7867tables.")
7868 (license license:lgpl2.1+)))
7869
7870(define-public python2-texttable
7871 (package-with-python2 python-texttable))
7872
7873(define-public python-atomicwrites
7874 (package
7875 (name "python-atomicwrites")
7876 (version "1.1.5")
7877 (source (origin
7878 (method url-fetch)
7879 (uri (pypi-uri "atomicwrites" version))
7880 (sha256
7881 (base32
7882 "11bm90fwm2avvf4f3ib8g925w7jr4m11vcsinn1bi6ns4bm32214"))))
7883 (build-system python-build-system)
7884 (synopsis "Atomic file writes in Python")
7885 (description "Library for atomic file writes using platform dependent tools
7886for atomic file system operations.")
7887 (home-page "https://github.com/untitaker/python-atomicwrites")
7888 (license license:expat)))
7889
7890(define-public python2-atomicwrites
7891 (package-with-python2 python-atomicwrites))
7892
7893(define-public python-click-threading
7894 (package
7895 (name "python-click-threading")
7896 (version "0.4.4")
7897 (source (origin
7898 (method url-fetch)
7899 (uri (pypi-uri "click-threading" version))
7900 (sha256
7901 (base32
7902 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
7903 (build-system python-build-system)
7904 (propagated-inputs
7905 `(("python-click" ,python-click)))
7906 (synopsis "Utilities for multithreading in Click")
7907 (description "This package provides utilities for multithreading in Click
7908applications.")
7909 (home-page "https://github.com/click-contrib/click-threading")
7910 (license license:expat)))
7911
7912(define-public python-click-log
7913 (package
7914 (name "python-click-log")
7915 (version "0.3.2")
7916 (source (origin
7917 (method url-fetch)
7918 (uri (pypi-uri "click-log" version))
7919 (sha256
7920 (base32
7921 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
7922 (build-system python-build-system)
7923 (propagated-inputs
7924 `(("python-click" ,python-click)))
7925 (synopsis "Logging for click applications")
7926 (description "This package provides a Python library for logging Click
7927applications.")
7928 (home-page "https://github.com/click-contrib/click-log")
7929 (license license:expat)))
7930
7931(define-public python-apipkg
7932 (package
7933 (name "python-apipkg")
7934 (version "1.4")
7935 (source (origin
7936 (method url-fetch)
7937 (uri (pypi-uri "apipkg" version))
7938 (sha256
7939 (base32
7940 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
7941 (build-system python-build-system)
7942 (native-inputs
7943 `(("python-pytest" ,python-pytest)))
7944 (synopsis "Namespace control and lazy-import mechanism")
7945 (description "With apipkg you can control the exported namespace of a Python
7946package and greatly reduce the number of imports for your users. It is a small
7947pure Python module that works on virtually all Python versions.")
7948 (home-page "https://github.com/pytest-dev/apipkg")
7949 (license license:expat)))
7950
7951(define-public python2-apipkg
7952 (package-with-python2 python-apipkg))
7953
7954(define-public python-execnet
7955 (package
7956 (name "python-execnet")
7957 (version "1.4.1")
7958 (source (origin
7959 (method url-fetch)
7960 (uri (pypi-uri "execnet" version))
7961 (sha256
7962 (base32
7963 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
7964 (build-system python-build-system)
7965 (arguments
7966 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
7967 ;; The two test failures are caused by the lack of an `ssh` executable.
7968 ;; The test suite can be run with pytest after the 'install' phase.
7969 #:tests? #f))
7970 (native-inputs
7971 `(("python-pytest" ,python-pytest)
7972 ("python-setuptools-scm" ,python-setuptools-scm)))
7973 (propagated-inputs
7974 `(("python-apipkg" ,python-apipkg)))
7975 (synopsis "Rapid multi-Python deployment")
7976 (description "Execnet provides a share-nothing model with
7977channel-send/receive communication for distributing execution across many
7978Python interpreters across version, platform and network barriers. It has a
7979minimal and fast API targeting the following uses:
7980@enumerate
7981@item distribute tasks to (many) local or remote CPUs
7982@item write and deploy hybrid multi-process applications
7983@item write scripts to administer multiple environments
7984@end enumerate")
7985 (home-page "http://codespeak.net/execnet/")
7986 (license license:expat)))
7987
7988(define-public python2-execnet
7989 (package-with-python2 python-execnet))
7990
7991(define-public python-icalendar
7992 (package
7993 (name "python-icalendar")
7994 (version "4.0.3")
7995 (source (origin
7996 (method url-fetch)
7997 (uri (pypi-uri "icalendar" version))
7998 (sha256
7999 (base32
8000 "0mk3dk1dxkcm46jy48v27j2w2349iv4sbimqj1yb5js43mx49hh7"))))
8001 (build-system python-build-system)
8002 (propagated-inputs
8003 `(("python-dateutil" ,python-dateutil)
8004 ("python-pytz" ,python-pytz)))
8005 (synopsis "Python library for parsing iCalendar files")
8006 (description "The icalendar package is a parser/generator of iCalendar
8007files for use with Python.")
8008 (home-page "https://github.com/collective/icalendar")
8009 (license license:bsd-2)))
8010
8011(define-public python-sphinxcontrib-newsfeed
8012 (package
8013 (name "python-sphinxcontrib-newsfeed")
8014 (version "0.1.4")
8015 (source (origin
8016 (method url-fetch)
8017 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
8018 (sha256
8019 (base32
8020 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
8021 (arguments '(#:tests? #f)) ; No tests.
8022 (build-system python-build-system)
8023 (propagated-inputs
8024 `(("python-sphinx" ,python-sphinx)))
8025 (synopsis "News Feed extension for Sphinx")
8026 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
8027Blog, News or Announcements section to a Sphinx website.")
8028 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
8029 (license license:bsd-2)))
8030
8031(define-public python-args
8032 (package
8033 (name "python-args")
8034 (version "0.1.0")
8035 (source (origin
8036 (method url-fetch)
8037 (uri (pypi-uri "args" version))
8038 (sha256
8039 (base32
8040 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8041 (build-system python-build-system)
8042 (home-page "https://github.com/kennethreitz/args")
8043 (synopsis "Command-line argument parser")
8044 (description
8045 "This library provides a Python module to parse command-line arguments.")
8046 (license license:bsd-3)))
8047
8048(define-public python2-args
8049 (package-with-python2 python-args))
8050
8051(define-public python-clint
8052 (package
8053 (name "python-clint")
8054 (version "0.5.1")
8055 (source (origin
8056 (method url-fetch)
8057 (uri (pypi-uri "clint" version))
8058 (sha256
8059 (base32
8060 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8061 (build-system python-build-system)
8062 (arguments
8063 '(#:phases
8064 (modify-phases %standard-phases
8065 (replace 'check
8066 (lambda _ (invoke "py.test" "-v"))))))
8067 (native-inputs
8068 `(("python-pytest" ,python-pytest)))
8069 (propagated-inputs
8070 `(("python-args" ,python-args)))
8071 (home-page "https://github.com/kennethreitz/clint")
8072 (synopsis "Command-line interface tools")
8073 (description
8074 "Clint is a Python module filled with a set of tools for developing
8075command-line applications, including tools for colored and indented
8076output, progress bar display, and pipes.")
8077 (license license:isc)))
8078
8079(define-public python2-clint
8080 (package-with-python2 python-clint))
8081
44d10b1f
RW
8082(define-public python-rply
8083 (package
8084 (name "python-rply")
8085 (version "0.7.5")
8086 (source (origin
8087 (method url-fetch)
8088 (uri (pypi-uri "rply" version))
8089 (sha256
8090 (base32
8091 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
8092 (build-system python-build-system)
8093 (propagated-inputs
8094 `(("python-appdirs" ,python-appdirs)))
8095 (home-page "https://github.com/alex/rply")
8096 (synopsis "Parser generator for Python")
8097 (description
8098 "This package provides a pure Python based parser generator, that also
8099works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8100with a new public API, and RPython support.")
8101 (license license:bsd-3)))
8102
8103(define-public python2-rply
8104 (package-with-python2 python-rply))
8105
8106(define-public python-hy
8107 (package
8108 (name "python-hy")
8109 (version "0.13.0")
8110 (source (origin
8111 (method url-fetch)
8112 (uri (pypi-uri "hy" version))
8113 (sha256
8114 (base32
8115 "19sfymaksx9jhksfnb15ahid46mzrhdfzz6yy2craz2qnzvpmky8"))))
8116 (build-system python-build-system)
8117 (arguments
8118 '(#:phases
8119 (modify-phases %standard-phases
8120 (replace 'check
8121 (lambda _
8122 ;; Tests require write access to HOME.
8123 (setenv "HOME" "/tmp")
8124 (invoke "nosetests"))))))
8125 (native-inputs
8126 `(("python-coverage" ,python-coverage)
8127 ("python-nose" ,python-nose)))
8128 (propagated-inputs
8129 `(("python-astor" ,python-astor)
8130 ("python-clint" ,python-clint)
8131 ("python-rply" ,python-rply)))
8132 (home-page "http://hylang.org/")
8133 (synopsis "Lisp frontend to Python")
8134 (description
8135 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8136its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8137Python at your fingertips, in Lisp form.")
8138 (license license:expat)))
8139
8140(define-public python2-hy
8141 (package-with-python2 python-hy))
8142
8143(define-public python2-functools32
8144 (package
8145 (name "python2-functools32")
8146 (version "3.2.3-2")
8147 (source
8148 (origin
8149 (method url-fetch)
8150 (uri (pypi-uri "functools32" version))
8151 (sha256
8152 (base32
8153 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8154 (build-system python-build-system)
8155 (arguments
8156 `(#:python ,python-2
8157 #:tests? #f)) ; no test target
8158 (home-page "https://github.com/MiCHiLU/python-functools32")
8159 (synopsis
8160 "Backport of the functools module from Python 3.2.3")
8161 (description
8162 "This package is a backport of the @code{functools} module from Python
81633.2.3 for use with older versions of Python and PyPy.")
8164 (license license:expat)))
8165
8166(define-public python2-subprocess32
8167 (package
8168 (name "python2-subprocess32")
8169 (version "3.2.7")
8170 (source (origin
8171 (method url-fetch)
8172 (uri (pypi-uri "subprocess32" version))
8173 (sha256
8174 (base32
8175 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
8176 (patches
8177 (search-patches "python2-subprocess32-disable-input-test.patch"))))
8178 (build-system python-build-system)
8179 (arguments
8180 `(#:python ,python-2
8181 ;; The test suite fails with Python > 2.7.13:
8182 ;; import test.support
8183 ;; ImportError: No module named support
8184 #:tests? #f
8185 #:phases
8186 (modify-phases %standard-phases
8187 (add-after 'unpack 'patch-/bin/sh
8188 (lambda _
8189 (substitute* '("subprocess32.py"
8190 "test_subprocess32.py")
8191 (("/bin/sh") (which "sh")))
8192 #t)))))
8193 (home-page "https://github.com/google/python-subprocess32")
8194 (synopsis "Backport of the subprocess module from Python 3.2")
8195 (description
8196 "This is a backport of the @code{subprocess} standard library module
8197from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
8198new features. On POSIX systems it is guaranteed to be reliable when used
8199in threaded applications. It includes timeout support from Python 3.3 but
8200otherwise matches 3.2’s API.")
8201 (license license:psfl)))
8202
8203(define-public python2-futures
8204 (package
8205 (name "python2-futures")
8206 (version "3.2.0")
8207 (source
8208 (origin
8209 (method url-fetch)
8210 (uri (pypi-uri "futures" version))
8211 (sha256
8212 (base32
8213 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
8214 (build-system python-build-system)
8215 (arguments `(#:python ,python-2
8216 ;; FIXME: Python 2.7.14 moved the test.support library,
8217 ;; but our package has not yet been adjusted. Enable
8218 ;; tests when the python2 package has been fixed.
8219 #:tests? #f))
8220 (home-page "https://github.com/agronholm/pythonfutures")
8221 (synopsis
8222 "Backport of the concurrent.futures package from Python 3.2")
8223 (description
8224 "The concurrent.futures module provides a high-level interface for
8225asynchronously executing callables. This package backports the
8226concurrent.futures package from Python 3.2")
8227 (license license:bsd-3)))
8228
8229(define-public python-promise
8230 (package
8231 (name "python-promise")
8232 (version "0.4.2")
8233 (source
8234 (origin
8235 (method url-fetch)
8236 (uri (pypi-uri "promise" version))
8237 (sha256
8238 (base32
8239 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8240 (build-system python-build-system)
8241 ;; Tests wants python-futures, which is a python2 only program, and
8242 ;; can't be found by python-promise at test time.
8243 (arguments `(#:tests? #f))
8244 (home-page "https://github.com/syrusakbary/promise")
8245 (synopsis "Promises/A+ implementation for Python")
8246 (description
8247 "Promises/A+ implementation for Python")
8248 (properties `((python2-variant . ,(delay python2-promise))))
8249 (license license:expat)))
8250
8251(define-public python2-promise
8252 (let ((promise (package-with-python2
8253 (strip-python2-variant python-promise))))
8254 (package (inherit promise)
8255 (arguments (substitute-keyword-arguments (package-arguments promise)
8256 ((#:tests? _) #t)))
8257 (native-inputs
8258 `(("python2-futures" ,python2-futures)
8259 ("python2-pytest" ,python2-pytest)
8260 ,@(package-native-inputs promise))))))
8261
8262(define-public python-colorama
8263 (package
8264 (name "python-colorama")
8265 (version "0.3.9")
8266 (source
8267 (origin
8268 (method url-fetch)
8269 (uri (pypi-uri "colorama" version))
8270 (sha256
8271 (base32
8272 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
8273 (build-system python-build-system)
8274 (synopsis "Colored terminal text rendering for Python")
8275 (description "Colorama is a Python library for rendering colored terminal
8276text.")
8277 (home-page "https://pypi.python.org/pypi/colorama")
8278 (license license:bsd-3)))
8279
8280(define-public python2-colorama
8281 (package-with-python2 python-colorama))
8282
8283(define-public python-rsa
8284 (package
8285 (name "python-rsa")
8286 (version "3.4.2")
8287 (source
8288 (origin
8289 (method url-fetch)
8290 (uri (pypi-uri "rsa" version))
8291 (sha256
8292 (base32
8293 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
8294 (build-system python-build-system)
8295 (propagated-inputs
8296 `(("python-pyasn1" ,python-pyasn1)))
8297 (synopsis "Pure-Python RSA implementation")
8298 (description "Python-RSA is a pure-Python RSA implementation. It supports
8299encryption and decryption, signing and verifying signatures, and key
8300generation according to PKCS#1 version 1.5. It can be used as a Python
8301library as well as on the command line.")
8302 (home-page "https://stuvel.eu/rsa")
8303 (license license:asl2.0)))
8304
8305(define-public python2-rsa
8306 (package-with-python2 python-rsa))
8307
8308(define-public python-pluggy
8309 (package
8310 (name "python-pluggy")
8311 (version "0.7.1")
8312 (source
8313 (origin
8314 (method url-fetch)
8315 (uri (pypi-uri "pluggy" version))
8316 (sha256
8317 (base32
8318 "1qbn70mksmr03hac6jgp6fiqc4l7859z8dchx2x950vhlij87swm"))))
8319 (build-system python-build-system)
8320 (native-inputs
8321 `(("python-setuptools-scm" ,python-setuptools-scm)))
8322 (synopsis "Plugin and hook calling mechanism for Python")
8323 (description "Pluggy is an extraction of the plugin manager as used by
8324Pytest but stripped of Pytest specific details.")
8325 (home-page "https://pypi.python.org/pypi/pluggy")
8326 (license license:expat)))
8327
8328(define-public python2-pluggy
8329 (package-with-python2 python-pluggy))
8330
8331(define-public python-tox
8332 (package
8333 (name "python-tox")
8334 (version "2.8.1")
8335 (source
8336 (origin
8337 (method url-fetch)
8338 (uri (pypi-uri "tox" version))
8339 (sha256
8340 (base32
8341 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
8342 (build-system python-build-system)
8343 (arguments
8344 ;; FIXME: Tests require pytest-timeout, which itself requires
8345 ;; pytest>=2.8.0 for installation.
8346 '(#:tests? #f))
8347 (propagated-inputs
8348 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
8349 ("python-py" ,python-py)
8350 ("python-virtualenv" ,python-virtualenv)))
8351 (native-inputs
8352 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
8353 ("python-pytest" ,python-pytest) ; >= 2.3.5
8354 ("python-setuptools-scm" ,python-setuptools-scm)))
8355 (home-page "http://tox.testrun.org/")
8356 (synopsis "Virtualenv-based automation of test activities")
8357 (description "Tox is a generic virtualenv management and test command line
8358tool. It can be used to check that a package installs correctly with
8359different Python versions and interpreters, or run tests in each type of
8360supported environment, or act as a frontend to continuous integration
8361servers.")
8362 (license license:expat)))
8363
8364(define-public python2-tox
8365 (package-with-python2 python-tox))
8366
8367(define-public python-jmespath
8368 (package
8369 (name "python-jmespath")
8370 (version "0.9.3")
8371 (source
8372 (origin
8373 (method url-fetch)
8374 (uri (pypi-uri "jmespath" version))
8375 (sha256
8376 (base32
8377 "0r7wc7fsxmlwzxx9j1j7rms06c6xs6d4sysirdhz1jk2mb4x90ba"))))
8378 (build-system python-build-system)
8379 (native-inputs
8380 `(("python-nose" ,python-nose)))
8381 (synopsis "JSON Matching Expressions")
8382 (description "JMESPath (pronounced “james path”) is a Python library that
8383allows one to declaratively specify how to extract elements from a JSON
8384document.")
8385 (home-page "https://github.com/jmespath/jmespath.py")
8386 (license license:expat)))
8387
8388(define-public python2-jmespath
8389 (package-with-python2 python-jmespath))
8390
8391(define-public python-botocore
8392 (package
8393 (name "python-botocore")
8394 (version "1.8.43")
8395 (source
8396 (origin
8397 (method url-fetch)
8398 (uri (pypi-uri "botocore" version))
8399 (sha256
8400 (base32
8401 "12cqpbnz3vfv41mp9admvciw7bc7hz57sjpqs2bxaw9wnfmbw5lg"))))
8402 (build-system python-build-system)
8403 (arguments
8404 ;; FIXME: Many tests are failing.
8405 '(#:tests? #f))
8406 (propagated-inputs
8407 `(("python-dateutil" ,python-dateutil)
8408 ("python-docutils" ,python-docutils)
8409 ("python-jmespath" ,python-jmespath)))
8410 (native-inputs
8411 `(("python-mock" ,python-mock)
8412 ("python-nose" ,python-nose)
8413 ("behave" ,behave)
8414 ("python-tox" ,python-tox)
8415 ("python-wheel" ,python-wheel)))
8416 (home-page "https://github.com/boto/botocore")
8417 (synopsis "Low-level interface to AWS")
8418 (description "Botocore is a Python library that provides a low-level
8419interface to the Amazon Web Services (AWS) API.")
8420 (license license:asl2.0)))
8421
8422(define-public python2-botocore
8423 (package-with-python2 python-botocore))
8424
8425(define-public python-xdo
8426 (package
8427 (name "python-xdo")
8428 (version "0.3")
8429 (source (origin
8430 (method url-fetch)
8431 (uri (string-append
8432 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8433 "python-xdo_" version ".orig.tar.gz"))
8434 (sha256
8435 (base32
8436 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
8437 (build-system python-build-system)
8438 (arguments
8439 '(#:phases
8440 (modify-phases %standard-phases
8441 (add-before 'install 'patch-libxdo-path
8442 ;; Hardcode the path of dynamically loaded libxdo library.
8443 (lambda* (#:key inputs #:allow-other-keys)
8444 (let ((libxdo (string-append
8445 (assoc-ref inputs "xdotool")
8446 "/lib/libxdo.so")))
8447 (substitute* "xdo/_xdo.py"
8448 (("find_library\\(\"xdo\"\\)")
8449 (simple-format #f "\"~a\"" libxdo)))
8450 #t))))
8451 #:tests? #f)) ; no tests provided
8452 (propagated-inputs
8453 `(("python-six" ,python-six)))
8454 (inputs
8455 `(("xdotool" ,xdotool)
8456 ("libX11" ,libx11)))
8457 (home-page "https://tracker.debian.org/pkg/python-xdo")
8458 (synopsis "Python library for simulating X11 keyboard/mouse input")
8459 (description "Provides bindings to libxdo for manipulating X11 via simulated
8460input. (Note that this is mostly a legacy library; you may wish to look at
8461python-xdo for newer bindings.)")
8462 (license license:bsd-3)))
8463
8464(define-public python2-xdo
8465 (package-with-python2 python-xdo))
8466
8467(define-public python-mako
8468 (package
8469 (name "python-mako")
8470 (version "1.0.7")
8471 (source
8472 (origin
8473 (method url-fetch)
8474 (uri (pypi-uri "Mako" version))
8475 (sha256
8476 (base32
8477 "1bi5gnr8r8dva06qpyx4kgjc6spm2k1y908183nbbaylggjzs0jf"))))
8478 (build-system python-build-system)
8479 (propagated-inputs
8480 `(("python-markupsafe" ,python-markupsafe)))
8481 (native-inputs
8482 `(("python-mock" ,python-mock)
8483 ("python-nose" ,python-nose)
8484 ("python-pytest" ,python-pytest)))
7016e620 8485 (home-page "https://www.makotemplates.org/")
44d10b1f
RW
8486 (synopsis "Templating language for Python")
8487 (description "Mako is a templating language for Python that compiles
8488templates into Python modules.")
8489 (license license:expat)))
8490
8491(define-public python2-mako
8492 (package-with-python2 python-mako))
8493
8494(define-public python-waitress
8495 (package
8496 (name "python-waitress")
8497 (version "1.1.0")
8498 (source
8499 (origin
8500 (method url-fetch)
8501 (uri (pypi-uri "waitress" version))
8502 (patches (search-patches "python-waitress-fix-tests.patch"))
8503 (sha256
8504 (base32
8505 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
8506 (build-system python-build-system)
8507 (home-page "https://github.com/Pylons/waitress")
8508 (synopsis "Waitress WSGI server")
8509 (description "Waitress is meant to be a production-quality pure-Python WSGI
8510server with very acceptable performance.")
8511 (license license:zpl2.1)))
8512
8513(define-public python2-waitress
8514 (package-with-python2 python-waitress))
8515
8516(define-public python-pyquery
8517 (package
8518 (name "python-pyquery")
8519 (version "1.2.17")
8520 (source
8521 (origin
8522 (method url-fetch)
8523 (uri (pypi-uri "pyquery" version))
8524 (sha256
8525 (base32
8526 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
8527 (build-system python-build-system)
8528 (native-inputs
8529 `(("python-webob" ,python-webob)
8530 ("python-webtest" ,python-webtest)))
8531 (propagated-inputs
8532 `(("python-lxml" ,python-lxml)
8533 ("python-cssselect" ,python-cssselect)))
8534 (home-page "https://github.com/gawel/pyquery")
8535 (synopsis "Make jQuery-like queries on xml documents")
8536 (description "pyquery allows you to make jQuery queries on xml documents.
8537The API is as much as possible the similar to jQuery. pyquery uses lxml for
8538fast xml and html manipulation.")
8539 (license license:bsd-3)))
8540
44d10b1f
RW
8541(define-public python-anyjson
8542 (package
8543 (name "python-anyjson")
8544 (version "0.3.3")
8545 (source
8546 (origin
8547 (method url-fetch)
8548 (uri (pypi-uri "anyjson" version))
8549 (sha256
8550 (base32
8551 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
8552 (build-system python-build-system)
8553 (arguments
8554 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
8555 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
8556 ;; whatever) so this transformation needs to be done before the tests
8557 ;; can be run. Maybe we could add a build step to transform beforehand
8558 ;; but it could be annoying/difficult.
8559 ;; We can enable tests for the Python 2 version, though, and do below.
8560 #:tests? #f))
8561 (home-page "https://bitbucket.org/runeh/anyjson/")
8562 (synopsis
8563 "Wraps best available JSON implementation in a common interface")
8564 (description
8565 "Anyjson loads whichever is the fastest JSON module installed
8566and provides a uniform API regardless of which JSON implementation is used.")
8567 (license license:bsd-3)
8568 (properties `((python2-variant . ,(delay python2-anyjson))))))
8569
8570(define-public python2-anyjson
8571 (let ((anyjson (package-with-python2
8572 (strip-python2-variant python-anyjson))))
8573 (package
8574 (inherit anyjson)
8575 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
8576 #:tests? #t
8577 ,@(package-arguments anyjson)))
8578 (native-inputs `(("python2-nose" ,python2-nose))))))
8579
8580(define-public python-amqp
8581 (package
8582 (name "python-amqp")
8583 (version "2.3.2")
8584 (source
8585 (origin
8586 (method url-fetch)
8587 (uri (pypi-uri "amqp" version))
8588 (sha256
8589 (base32
8590 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
8591 (build-system python-build-system)
8592 (native-inputs
8593 `(("python-case" ,python-case)
8594 ("python-pytest-sugar" ,python-pytest-sugar)
8595 ("python-mock" ,python-mock)))
8596 (propagated-inputs
8597 `(("python-vine" ,python-vine)))
8598 (home-page "https://github.com/celery/py-amqp")
8599 (synopsis
8600 "Low-level AMQP client for Python (fork of amqplib)")
8601 (description
8602 "This is a fork of amqplib which was originally written by Barry Pederson.
8603It is maintained by the Celery project, and used by kombu as a pure python
8604alternative when librabbitmq is not available.")
8605 (license license:lgpl2.1+)
8606 (properties `((python2-variant . ,(delay python2-amqp))))))
8607
8608(define-public python2-amqp
8609 (let ((amqp (package-with-python2
8610 (strip-python2-variant python-amqp))))
8611 (package
8612 (inherit amqp)
8613 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
8614 ;; unmaintained. Weirdly, does not do this on the python 3
8615 ;; version?
8616 #:tests? #f
8617 ,@(package-arguments amqp))))))
8618
8619(define-public python-txamqp
8620 (package
8621 (name "python-txamqp")
8622 (version "0.8.2")
8623 (source
8624 (origin
8625 (method url-fetch)
8626 (uri (pypi-uri "txAMQP" version))
8627 (sha256
8628 (base32
8629 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
8630 (build-system python-build-system)
8631 (propagated-inputs
8632 `(("python-six" ,python-six)
8633 ("python-twisted" ,python-twisted)))
8634 (home-page "https://github.com/txamqp/txamqp")
8635 (synopsis "Communicate with AMQP peers and brokers using Twisted")
8636 (description
8637 "This package provides a Python library for communicating with AMQP peers
8638and brokers using the asynchronous networking framework Twisted. It contains
8639all the necessary code to connect, send and receive messages to/from an
8640AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
8641also includes support for using Thrift RPC over AMQP in Twisted
8642applications.")
8643 (license license:asl2.0)))
8644
8645(define-public python2-txamqp
8646 (package-with-python2 python-txamqp))
8647
8648(define-public python-kombu
8649 (package
8650 (name "python-kombu")
8651 (version "4.2.2")
8652 (source
8653 (origin
8654 (method url-fetch)
8655 (uri (pypi-uri "kombu" version))
8656 (sha256
8657 (base32
8658 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
8659 (build-system python-build-system)
8660 (native-inputs
8661 `(("python-mock" ,python-mock)
8662 ("python-case" ,python-case)
8663 ("python-pyro4" ,python-pyro4)
8664 ("python-pytest-sugar" ,python-pytest-sugar)
8665 ("python-pytz" ,python-pytz)))
8666 (propagated-inputs
8667 `(("python-anyjson" ,python-anyjson)
8668 ("python-amqp" ,python-amqp)
8669 ("python-redis" ,python-redis)))
8670 (home-page "https://kombu.readthedocs.io")
8671 (synopsis "Message passing library for Python")
8672 (description "The aim of Kombu is to make messaging in Python as easy as
8673possible by providing an idiomatic high-level interface for the AMQ protocol,
8674and also provide proven and tested solutions to common messaging problems.
8675AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
8676message orientation, queuing, routing, reliability and security, for which the
8677RabbitMQ messaging server is the most popular implementation.")
8678 (license license:bsd-3)
8679 (properties `((python2-variant . ,(delay python2-kombu))))))
8680
8681(define-public python2-kombu
8682 (let ((kombu (package-with-python2
8683 (strip-python2-variant python-kombu))))
8684 (package
8685 (inherit kombu)
8686 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
8687 ;; It works fine on the python3 variant.
8688 #:tests? #f
8689 ,@(package-arguments kombu)))
8690 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8691 ,@(package-native-inputs kombu))))))
8692
8693(define-public python-billiard
8694 (package
8695 (name "python-billiard")
8696 (version "3.5.0.5")
8697 (source
8698 (origin
8699 (method url-fetch)
8700 (uri (pypi-uri "billiard" version))
8701 (sha256
8702 (base32
8703 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
8704 (build-system python-build-system)
8705 (native-inputs
8706 `(("python-case" ,python-case)
8707 ("python-pytest" ,python-pytest)))
8708 (home-page "https://github.com/celery/billiard")
8709 (synopsis
8710 "Python multiprocessing fork with improvements and bugfixes")
8711 (description
8712 "Billiard is a fork of the Python 2.7 multiprocessing package. The
8713multiprocessing package itself is a renamed and updated version of R Oudkerk's
8714pyprocessing package. This standalone variant is intended to be compatible with
8715Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
8716 (license license:bsd-3)
8717 (properties `((python2-variant . ,(delay python2-billiard))))))
8718
8719(define-public python2-billiard
8720 (let ((billiard (package-with-python2
8721 (strip-python2-variant python-billiard))))
8722 (package
8723 (inherit billiard)
8724 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8725 ("python2-mock" ,python2-mock)
8726 ,@(package-native-inputs billiard))))))
8727
8728(define-public python-celery
8729 (package
8730 (name "python-celery")
8731 (version "4.2.1")
8732 (source
8733 (origin
8734 (method url-fetch)
8735 (uri (pypi-uri "celery" version))
8736 (sha256
8737 (base32
8738 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
8739 (build-system python-build-system)
8740 (arguments
8741 '(;; TODO The tests fail with Python 3.7
8742 ;; https://github.com/celery/celery/issues/4849
8743 #:tests? #f
8744 #:phases
8745 (modify-phases %standard-phases
8746 (add-after 'unpack 'patch-requirements
8747 (lambda _
8748 (substitute* "requirements/test.txt"
8749 (("pytest>=3\\.0,<3\\.3")
8750 "pytest>=3.0"))
8751 #t)))))
8752 (native-inputs
8753 `(("python-case" ,python-case)
8754 ("python-pytest" ,python-pytest)))
8755 (propagated-inputs
8756 `(("python-pytz" ,python-pytz)
8757 ("python-billiard" ,python-billiard)
8758 ("python-kombu" ,python-kombu)))
8759 (home-page "https://celeryproject.org")
8760 (synopsis "Distributed Task Queue")
8761 (description "Celery is an asynchronous task queue/job queue based on
8762distributed message passing. It is focused on real-time operation, but
8763supports scheduling as well. The execution units, called tasks, are executed
8764concurrently on a single or more worker servers using multiprocessing,
8765Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
8766synchronously (wait until ready).")
8767 (license license:bsd-3)
8768 (properties `((python2-variant . ,(delay python2-celery))))))
8769
8770(define-public python2-celery
8771 (let ((celery (package-with-python2
8772 (strip-python2-variant python-celery))))
8773 (package
8774 (inherit celery)
8775 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8776 ("python2-mock" ,python2-mock)
8777 ,@(package-native-inputs celery))))))
8778
8779(define-public python-translitcodec
8780 (package
8781 (name "python-translitcodec")
8782 (version "0.4.0")
8783 (source
8784 (origin
8785 (method url-fetch)
8786 (uri (pypi-uri "translitcodec" version))
8787 (sha256
8788 (base32
8789 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
8790 (build-system python-build-system)
8791 (arguments
8792 `(#:tests? #f)) ; no tests provided
8793 (home-page
8794 "https://github.com/claudep/translitcodec")
8795 (synopsis
8796 "Unicode to 8-bit charset transliteration codec")
8797 (description
8798 "This package contains codecs for transliterating ISO 10646 texts into
8799best-effort representations using smaller coded character sets (ASCII,
8800ISO 8859, etc.).")
8801 (license license:expat)))
8802
8803(define-public python2-translitcodec
8804 (package-with-python2 python-translitcodec))
8805
8806(define-public python-editor
8807 (package
8808 (name "python-editor")
8809 (version "0.5")
8810 (source
8811 (origin
8812 (method url-fetch)
8813 (uri (pypi-uri "python-editor" version))
8814 (sha256
8815 (base32
8816 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
8817 (build-system python-build-system)
8818 (home-page
8819 "https://github.com/fmoo/python-editor")
8820 (synopsis
8821 "Programmatically open an editor, capture the result")
8822 (description
8823 "python-editor is a library that provides the editor module for
8824programmatically interfacing with your system's $EDITOR.")
8825 (license license:asl2.0)))
8826
8827(define-public python2-editor
8828 (package-with-python2 python-editor))
8829
8830(define-public python-sphinxcontrib-programoutput
8831 (package
8832 (name "python-sphinxcontrib-programoutput")
8833 (version "0.10")
8834 (source (origin
8835 (method url-fetch)
8836 (uri (pypi-uri "sphinxcontrib-programoutput" version))
8837 (sha256
8838 (base32
8839 "153hhnlbx4688zj9wd64819ps5znc2jlyp5crkgzvn5hxgy99vpx"))))
8840 (build-system python-build-system)
8841 (arguments
8842 ;; FIXME: Many tests are failing and the upstream is gone.
8843 '(#:tests? #f))
8844 (propagated-inputs
8845 `(("python-sphinx" ,python-sphinx)))
8846 (synopsis "Sphinx extension to include program output")
8847 (description "A Sphinx extension to literally insert the output of arbitrary
8848commands into documents, helping you to keep your command examples up to date.")
8849 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
8850 (license license:bsd-2)))
8851
8852(define-public python2-sphinxcontrib-programoutput
8853 (package-with-python2 python-sphinxcontrib-programoutput))
8854
8855(define-public python-sphinx-repoze-autointerface
8856 (package
8857 (name "python-sphinx-repoze-autointerface")
8858 (version "0.8")
8859 (source (origin
8860 (method url-fetch)
8861 (uri (pypi-uri "repoze.sphinx.autointerface" version))
8862 (sha256
8863 (base32
8864 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
8865 (build-system python-build-system)
8866 (arguments '(#:tests? #f)) ; No tests.
8867 (propagated-inputs
8868 `(("python-sphinx" ,python-sphinx)
8869 ("python-zope-interface" ,python-zope-interface)))
8870 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
8871 (description "This package defines an extension for the Sphinx documentation
8872system. The extension allows generation of API documentation by
8873introspection of @code{zope.interface} instances in code.")
8874 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
8875 (license license:repoze)))
8876
8877(define-public python2-sphinx-repoze-autointerface
8878 (package-with-python2 python-sphinx-repoze-autointerface))
8879
8880(define-public python-vobject
8881 (package
8882 (name "python-vobject")
8883 (version "0.9.5")
8884 (source (origin
8885 (method url-fetch)
8886 (uri (pypi-uri "vobject" version))
8887 (sha256
8888 (base32
8889 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
8890 (build-system python-build-system)
8891 (arguments
8892 '(;; The test suite relies on some non-portable Windows interfaces.
8893 #:tests? #f))
8894 (propagated-inputs
8895 `(("python-dateutil" ,python-dateutil)
8896 ("python-pyicu" ,python-pyicu)))
8897 (synopsis "Parse and generate vCard and vCalendar files")
8898 (description "Vobject is intended to be a full featured Python package for
8899parsing and generating vCard and vCalendar files. Currently, iCalendar files
8900are supported and well tested. vCard 3.0 files are supported, and all data
8901should be imported, but only a few components are understood in a sophisticated
8902way.")
8903 (home-page "http://eventable.github.io/vobject/")
8904 (license license:asl2.0)))
8905
8906(define-public python2-vobject
8907 (package-with-python2 python-vobject))
8908
8909(define-public python-munkres
8910 (package
8911 (name "python-munkres")
8912 (version "1.0.8")
8913 (source (origin
8914 (method url-fetch)
8915 (uri (pypi-uri "munkres" version))
8916 (sha256
8917 (base32
8918 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
8919 (build-system python-build-system)
8920 (arguments
8921 '(#:tests? #f)) ; no test suite
8922 (home-page "http://software.clapper.org/munkres/")
8923 (synopsis "Implementation of the Munkres algorithm")
8924 (description "The Munkres module provides an implementation of the Munkres
8925algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
8926useful for solving the Assignment Problem.")
8927 (license license:bsd-3)))
8928
8929(define-public python2-munkres
8930 (package-with-python2 python-munkres))
8931
8932(define-public python-whoosh
8933 (package
8934 (name "python-whoosh")
8935 (version "2.7.4")
8936 (source
8937 (origin
8938 (method url-fetch)
8939 (uri (pypi-uri "Whoosh" version))
8940 (sha256
8941 (base32
8942 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
8943 (build-system python-build-system)
8944 (native-inputs
8945 `(("python-pytest" ,python-pytest)))
8946 (home-page "https://bitbucket.org/mchaput/whoosh")
8947 (synopsis "Full text indexing, search, and spell checking library")
8948 (description
8949 "Whoosh is a fast, pure-Python full text indexing, search, and spell
8950checking library.")
8951 (license license:bsd-2)))
8952
8953(define-public python2-whoosh
8954 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
8955 (package (inherit whoosh)
8956 (propagated-inputs
8957 `(("python2-backport-ssl-match-hostname"
8958 ,python2-backport-ssl-match-hostname)
8959 ,@(package-propagated-inputs whoosh))))))
8960
8961(define-public python-pathlib
8962 (package
8963 (name "python-pathlib")
8964 (version "1.0.1")
8965 (source (origin
8966 (method url-fetch)
8967 (uri (pypi-uri "pathlib" version))
8968 (sha256
8969 (base32
8970 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
8971 (build-system python-build-system)
8972 ;; The tests depend on the internal "test" module, which does not provide
8973 ;; a stable interface.
8974 (arguments `(#:tests? #f))
8975 (home-page "https://pathlib.readthedocs.org/")
8976 (synopsis "Object-oriented file system paths")
8977 (description "Pathlib offers a set of classes to handle file system paths.
8978It offers the following advantages over using string objects:
8979
8980@enumerate
8981@item No more cumbersome use of os and os.path functions. Everything can
8982be done easily through operators, attribute accesses, and method calls.
8983@item Embodies the semantics of different path types. For example,
8984comparing Windows paths ignores casing.
8985@item Well-defined semantics, eliminating any inconsistencies or
8986ambiguities (forward vs. backward slashes, etc.).
8987@end enumerate
8988
8989Note: In Python 3.4, pathlib is now part of the standard library. For other
8990Python versions please consider python-pathlib2 instead, which tracks the
8991standard library module. This module (python-pathlib) isn't maintained
8992anymore.")
8993 (license license:expat)))
8994
8995(define-public python2-pathlib
8996 (package-with-python2 python-pathlib))
8997
8998(define-public python2-pathlib2
8999 (package
9000 (name "python2-pathlib2")
9001 (version "2.3.2")
9002 (source (origin
9003 (method url-fetch)
9004 (uri (pypi-uri "pathlib2" version))
9005 (sha256
9006 (base32
9007 "10yb0iv5x2hs631rcppkhbddx799d3h8pcwmkbh2a66ns3w71ccf"))))
9008 (build-system python-build-system)
9009 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9010 ;; version is 3.4 which already includes this package as part of the
9011 ;; standard library.
9012 (arguments
9013 `(#:python ,python-2))
9014 (propagated-inputs
9015 `(("python2-scandir" ,python2-scandir)
9016 ("python2-six" ,python2-six)))
9017 (home-page "https://pypi.python.org/pypi/pathlib2/")
9018 (synopsis "Object-oriented file system paths - backport of standard
9019pathlib module")
9020 (description "The goal of pathlib2 is to provide a backport of standard
9021pathlib module which tracks the standard library module, so all the newest
9022features of the standard pathlib can be used also on older Python versions.
9023
9024Pathlib offers a set of classes to handle file system paths. It offers the
9025following advantages over using string objects:
9026
9027@enumerate
9028@item No more cumbersome use of os and os.path functions. Everything can
9029be done easily through operators, attribute accesses, and method calls.
9030@item Embodies the semantics of different path types. For example,
9031comparing Windows paths ignores casing.
9032@item Well-defined semantics, eliminating any inconsistencies or
9033ambiguities (forward vs. backward slashes, etc.).
9034@end enumerate")
9035 (license license:expat)))
9036
9037(define-public python2-pathlib2-bootstrap
9038 (hidden-package
9039 (package
9040 (inherit python2-pathlib2)
9041 (name "python2-pathlib2-bootstrap")
9042 (propagated-inputs
9043 `(("python2-scandir" ,python2-scandir)
9044 ("python2-six" ,python2-six-bootstrap))))))
9045
9046(define-public python-jellyfish
9047 (package
9048 (name "python-jellyfish")
9049 (version "0.5.6")
9050 (source (origin
9051 (method url-fetch)
9052 (uri (pypi-uri "jellyfish" version))
9053 (sha256
9054 (base32
9055 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
9056 (build-system python-build-system)
9057 (native-inputs
9058 `(("python-pytest" ,python-pytest)))
9059 (home-page "https://github.com/jamesturk/jellyfish")
9060 (synopsis "Approximate and phonetic matching of strings")
9061 (description "Jellyfish uses a variety of string comparison and phonetic
9062encoding algorithms to do fuzzy string matching.")
9063 (license license:bsd-2)
9064 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9065
9066(define-public python2-jellyfish
9067 (let ((jellyfish (package-with-python2
9068 (strip-python2-variant python-jellyfish))))
9069 (package (inherit jellyfish)
9070 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
9071 ,@(package-native-inputs jellyfish))))))
9072
9073(define-public python2-unicodecsv
9074 (package
9075 (name "python2-unicodecsv")
9076 (version "0.14.1")
9077 (source (origin
9078 (method url-fetch)
9079 ;; The test suite is not included in the PyPi release.
9080 ;; https://github.com/jdunck/python-unicodecsv/issues/19
9081 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
9082 "archive/" version ".tar.gz"))
9083 (file-name (string-append name "-" version ".tar.gz"))
9084 (sha256
9085 (base32
9086 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
9087 (build-system python-build-system)
9088 (arguments
9089 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9090 #:python ,python-2))
9091 (native-inputs
9092 `(("python2-unittest2" ,python2-unittest2)))
9093 (home-page "https://github.com/jdunck/python-unicodecsv")
9094 (synopsis "Unicode CSV module for Python 2")
9095 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9096module, adding support for Unicode strings.")
9097 (license license:bsd-2)))
9098
9099(define-public python-rarfile
9100 (package
9101 (name "python-rarfile")
9102 (version "2.8")
9103 (source (origin
9104 (method url-fetch)
9105 (uri (pypi-uri "rarfile" version))
9106 (sha256
9107 (base32
9108 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
9109 (build-system python-build-system)
9110 (arguments
9111 '(#:phases
9112 (modify-phases %standard-phases
9113 (replace 'check
9114 ;; Many tests fail, but the installation proceeds.
e59dd341 9115 (lambda _ (invoke "make" "-C" "test" "test"))))))
44d10b1f
RW
9116 (native-inputs
9117 `(("which" ,which))) ; required for tests
9118 (propagated-inputs
9119 `(("libarchive" ,libarchive)))
9120 (home-page "https://github.com/markokr/rarfile")
9121 (synopsis "RAR archive reader for Python")
9122 (description "This is Python module for RAR archive reading. The interface
9123is made as zipfile like as possible.")
9124 (license license:isc)))
9125
9126(define-public python2-rarfile
9127 (package-with-python2 python-rarfile))
9128
9129(define-public python-magic
9130 (package
9131 (name "python-magic")
9132 (version "0.4.15")
9133 (source
9134 (origin
9135 (method url-fetch)
9136 (uri (pypi-uri "python-magic" version))
9137 (sha256
9138 (base32
9139 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
9140 (file-name (string-append name "-" version "-checkout"))))
9141 (build-system python-build-system)
9142 (arguments
9143 ;; The tests are unreliable, so don't run them. The tests fail
9144 ;; under Python3 because they were written for Python2 and
9145 ;; contain import statements that do not work in Python3. One of
9146 ;; the tests fails under Python2 because its assertions are
9147 ;; overly stringent; it relies on comparing output strings which
9148 ;; are brittle and can change depending on the version of
9149 ;; libmagic being used and the system on which the test is
9150 ;; running. In my case, under GuixSD 0.10.0, only one test
9151 ;; failed, and it seems to have failed only because the version
9152 ;; of libmagic that is packaged in Guix outputs a slightly
9153 ;; different (but not wrong) string than the one that the test
9154 ;; expected.
9155 '(#:tests? #f
9156 #:phases (modify-phases %standard-phases
9157 ;; Replace a specific method call with a hard-coded
9158 ;; path to the necessary libmagic.so file in the
9159 ;; store. If we don't do this, then the method call
9160 ;; will fail to find the libmagic.so file, which in
9161 ;; turn will cause any application using
9162 ;; python-magic to fail.
9163 (add-before 'build 'hard-code-path-to-libmagic
9164 (lambda* (#:key inputs #:allow-other-keys)
9165 (let ((file (assoc-ref inputs "file")))
9166 (substitute* "magic.py"
9167 (("ctypes.util.find_library\\('magic'\\)")
9168 (string-append "'" file "/lib/libmagic.so'")))
9169 #t)))
9170 (add-before 'install 'disable-egg-compression
9171 (lambda _
9172 (let ((port (open-file "setup.cfg" "a")))
9173 (display "\n[easy_install]\nzip_ok = 0\n"
9174 port)
9175 (close-port port)
9176 #t))))))
9177 (inputs
9178 ;; python-magic needs to be able to find libmagic.so.
9179 `(("file" ,file)))
9180 (home-page
9181 "https://github.com/ahupp/python-magic")
9182 (synopsis
9183 "File type identification using libmagic")
9184 (description
9185 "This module uses ctypes to access the libmagic file type
9186identification library. It makes use of the local magic database and
9187supports both textual and MIME-type output. Note that this module and
9188the python-file module both provide a \"magic.py\" file; these two
9189modules, which are different and were developed separately, both serve
9190the same purpose: to provide Python bindings for libmagic.")
9191 (license license:expat)))
9192
9193(define-public python2-magic
9194 (package-with-python2 python-magic))
9195
9196(define-public python2-s3cmd
9197 (package
9198 (name "python2-s3cmd")
9199 (version "1.6.1")
9200 (source
9201 (origin
9202 (method url-fetch)
9203 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
9204 "s3cmd-" version ".tar.gz"))
9205 (sha256
9206 (base32
9207 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9208 (build-system python-build-system)
9209 (arguments
9210 ;; s3cmd is written for python2 only and contains no tests.
9211 `(#:python ,python-2
9212 #:tests? #f))
9213 (propagated-inputs
9214 `(("python2-dateutil" ,python2-dateutil)
9215 ;; The python-file package also provides a magic.py module.
9216 ;; This is an unfortunate state of affairs; however, s3cmd
9217 ;; fails to install if it cannot find specifically the
9218 ;; python-magic package. Thus we include it, instead of using
9219 ;; python-file. Ironically, s3cmd sometimes works better
9220 ;; without libmagic bindings at all:
9221 ;; https://github.com/s3tools/s3cmd/issues/198
9222 ("python2-magic" ,python2-magic)))
9223 (home-page "http://s3tools.org/s3cmd")
9224 (synopsis "Command line tool for S3-compatible storage services")
9225 (description
9226 "S3cmd is a command line tool for uploading, retrieving and managing data
9227in storage services that are compatible with the Amazon Simple Storage
9228Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9229GnuPG encryption, and more. It also supports management of Amazon's
9230CloudFront content delivery network.")
9231 (license license:gpl2+)))
9232
9233(define-public python-pkgconfig
9234 (package
9235 (name "python-pkgconfig")
9236 (version "1.3.1")
9237 (source
9238 (origin
9239 (method url-fetch)
9240 (uri (pypi-uri "pkgconfig" version))
9241 (sha256
9242 (base32
9243 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
9244 (build-system python-build-system)
9245 (native-inputs
9246 `(("python-nose" ,python-nose)))
9247 (inputs
9248 `(("pkg-config" ,pkg-config)))
9249 (arguments
9250 `(#:phases
9251 (modify-phases %standard-phases
9252 (add-before 'build 'patch
9253 ;; Hard-code the path to pkg-config.
9254 (lambda _
9255 (substitute* "pkgconfig/pkgconfig.py"
9256 (("cmd = 'pkg-config")
9257 (string-append "cmd = '" (which "pkg-config"))))
9258 #t))
9259 (replace 'check
9260 (lambda _
9261 (invoke "nosetests" "test.py"))))))
9262 (home-page "https://github.com/matze/pkgconfig")
9263 (synopsis "Python interface for pkg-config")
9264 (description "This module provides a Python interface to pkg-config. It
9265can be used to find all pkg-config packages, check if a package exists,
9266check if a package meets certain version requirements, query CFLAGS and
9267LDFLAGS and parse the output to build extensions with setup.py.")
9268 (license license:expat)))
9269
9270(define-public python2-pkgconfig
9271 (package-with-python2 python-pkgconfig))
9272
9273(define-public python-bz2file
9274 (package
9275 (name "python-bz2file")
9276 (version "0.98")
9277 (source
9278 (origin
9279 (method url-fetch)
9280 (uri (pypi-uri "bz2file" version))
9281 (sha256
9282 (base32
9283 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9284 (build-system python-build-system)
9285 (arguments
9286 `(#:tests? #f)) ; Tests use deprecated python modules.
9287 (home-page "https://github.com/nvawda/bz2file")
9288 (synopsis "Read and write bzip2-compressed files")
9289 (description
9290 "Bz2file is a Python library for reading and writing bzip2-compressed
9291files. It contains a drop-in replacement for the I/O interface in the
9292standard library's @code{bz2} module, including features from the latest
9293development version of CPython that are not available in older releases.")
9294 (license license:asl2.0)))
9295
9296(define-public python2-bz2file
9297 (package-with-python2 python-bz2file))
9298
9299(define-public python-future
9300 (package
9301 (name "python-future")
9302 (version "0.16.0")
9303 (source
9304 (origin
9305 (method url-fetch)
9306 (uri (pypi-uri "future" version))
9307 (sha256
9308 (base32
9309 "1nzy1k4m9966sikp0qka7lirh8sqrsyainyf8rk97db7nwdfv773"))))
9310 (build-system python-build-system)
9311 ;; Many tests connect to the network or are otherwise flawed.
9312 ;; https://github.com/PythonCharmers/python-future/issues/210
9313 (arguments
9314 `(#:tests? #f))
9315 (home-page "http://python-future.org")
9316 (synopsis "Single-source support for Python 3 and 2")
9317 (description
9318 "@code{python-future} is the missing compatibility layer between Python 2 and
9319Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9320to support both Python 2 and Python 3 with minimal overhead.")
9321 (license license:expat)))
9322
9323(define-public python2-future
9324 (package-with-python2 python-future))
9325
9326(define-public python-cysignals
9327 (package
9328 (name "python-cysignals")
8e3e51df 9329 (version "1.9.0")
44d10b1f
RW
9330 (source
9331 (origin
9332 (method url-fetch)
8e3e51df 9333 (uri (pypi-uri "cysignals" version))
44d10b1f
RW
9334 (sha256
9335 (base32
8e3e51df 9336 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
44d10b1f
RW
9337 (build-system python-build-system)
9338 (native-inputs
9339 `(("python-cython" ,python-cython)
9340 ("python-sphinx" ,python-sphinx)))
9341 (inputs
9342 `(("pari-gp" ,pari-gp)))
9343 (arguments
9344 `(#:modules ((guix build python-build-system)
9345 ((guix build gnu-build-system) #:prefix gnu:)
9346 (guix build utils))
9347 ;; FIXME: Tests are executed after installation and currently fail
9348 ;; when not installing into standard locations; the author is working
9349 ;; on a fix.
9350 #:tests? #f
9351 #:phases
9352 (modify-phases %standard-phases
9353 (add-before
9354 'build 'configure
9355 (assoc-ref gnu:%standard-phases 'configure)))))
9356 (home-page
9357 "https://github.com/sagemath/cysignals")
9358 (synopsis
9359 "Handling of interrupts and signals for Cython")
9360 (description
9361 "The cysignals package provides mechanisms to handle interrupts (and
9362other signals and errors) in Cython code, using two related approaches,
9363for mixed Cython/Python code or external C libraries and pure Cython code,
9364respectively.")
9365 (license license:lgpl3+)))
9366
9367(define-public python2-cysignals
9368 (package-with-python2 python-cysignals))
9369
9370(define-public python2-shedskin
9371 (package
9372 (name "python2-shedskin")
9373 (version "0.9.4")
9374 (source
9375 (origin
9376 (method url-fetch)
9377 (uri (string-append "https://github.com/shedskin/shedskin/"
9378 "releases/download/v" version
9379 "/shedskin-" version ".tgz"))
9380 (sha256
9381 (base32
9382 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9383 (build-system python-build-system)
9384 (arguments
9385 `(#:python ,python-2
9386 #:phases (modify-phases %standard-phases
9387 (add-after 'unpack 'fix-resulting-include-libs
9388 (lambda* (#:key inputs #:allow-other-keys)
9389 (let ((libgc (assoc-ref inputs "libgc"))
9390 (pcre (assoc-ref inputs "pcre")))
9391 (substitute* "shedskin/makefile.py"
9392 (("variable == 'CCFLAGS':[ ]*")
9393 (string-append "variable == 'CCFLAGS':\n"
9394 " line += ' -I " pcre "/include"
9395 " -I " libgc "/include'"))
9396 (("variable == 'LFLAGS':[ ]*")
9397 (string-append "variable == 'LFLAGS':\n"
9398 " line += ' -L" pcre "/lib"
9399 " -L " libgc "/lib'")))
9400 #t))))))
9401 (inputs `(("pcre" ,pcre)
9402 ("libgc" ,libgc)))
9403 (home-page "https://shedskin.github.io/")
9404 (synopsis "Experimental Python-2 to C++ Compiler")
9405 (description (string-append "This is an experimental compiler for a subset of
9406Python. It generates C++ code and a Makefile."))
9407 (license (list license:gpl3 license:bsd-3 license:expat))))
9408
9409(define-public python2-rope
9410 (package
9411 (name "python2-rope")
a9ba0a31 9412 (version "0.11.0")
44d10b1f
RW
9413 (source
9414 (origin
9415 (method url-fetch)
9416 (uri (pypi-uri "rope" version))
9417 (sha256
9418 (base32
a9ba0a31 9419 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
44d10b1f 9420 (arguments
afb29715 9421 ;; Rope has only partial python3 support, see `python-rope'
44d10b1f
RW
9422 `(#:python ,python-2))
9423 (build-system python-build-system)
9424 (native-inputs
9425 `(("python2-unittest2" ,python2-unittest2)))
9426 (home-page "https://github.com/python-rope/rope")
9427 (synopsis "Refactoring library for Python")
9428 (description "Rope is a refactoring library for Python. It facilitates
9429the renaming, moving and extracting of attributes, functions, modules, fields
9430and parameters in Python 2 source code. These refactorings can also be applied
9431to occurrences in strings and comments.")
9432 (license license:gpl2)))
9433
2c880ef4
LC
9434(define-public python-rope
9435 (package
9436 (inherit python2-rope)
9437 (name "python-rope")
9438 (arguments `(#:python ,python-wrapper
9439 ;; XXX: Only partial python3 support, results in some failing
9440 ;; tests: <https://github.com/python-rope/rope/issues/247>.
9441 #:tests? #f))
9442 (properties `((python2-variant . ,(delay python2-rope))))))
9443
44d10b1f
RW
9444(define-public python-py3status
9445 (package
9446 (name "python-py3status")
77f3d303 9447 (version "3.16")
44d10b1f
RW
9448 (source
9449 (origin
9450 (method url-fetch)
9451 (uri (pypi-uri "py3status" version))
9452 (sha256
9453 (base32
77f3d303 9454 "1xrfph277bgjln3jbpzpgkhxad04fjvj7s3xfil42q1sxi4s3q3g"))))
44d10b1f
RW
9455 (build-system python-build-system)
9456 (inputs
9457 `(("file" ,file)))
9458 (arguments
9459 '(#:phases
9460 (modify-phases %standard-phases
9461 ;; 'file' is used for detection of configuration file encoding
9462 ;; let's make link the dependency to particular input
9463 (add-before 'build 'patch-file-path
9464 (lambda* (#:key inputs #:allow-other-keys)
9465 (let ((file-path (assoc-ref inputs "file")))
9466 (substitute* "py3status/parse_config.py"
9467 (("\\['file', '-b'")
9468 (string-append "['" file-path "/bin/file', '-b'")))
9469 #t))))
9470 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
9471 (home-page "https://github.com/ultrabug/py3status")
9472 (synopsis "Extensible i3status wrapper written in Python")
9473 (description "py3status is an i3status wrapper which extends i3status
9474functionality in a modular way, allowing you to extend your panel with your
9475own code, responding to click events and updating clock every second.")
9476 (license license:bsd-3)))
9477
9478(define-public python-tblib
9479 (package
9480 (name "python-tblib")
9481 (version "1.3.2")
9482 (source (origin
9483 (method url-fetch)
9484 (uri (pypi-uri "tblib" version))
9485 (sha256 (base32
9486 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
9487 (build-system python-build-system)
9488 (arguments
9489 `(#:phases
9490 (modify-phases %standard-phases
9491 (add-before 'check 'adjust-tests
9492 (lambda _
9493 (when (which "python3")
9494 ;; Adjust the example output to match that of Python 3.7:
9495 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
9496 (substitute* "README.rst"
9497 (("Exception\\('fail',") "Exception('fail'"))
9498 #t)))
9499 (replace 'check
9500 (lambda _
9501 ;; Upstream runs tests after installation and the package itself
9502 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
9503 ;; found.
9504 (setenv "PYTHONPATH"
9505 (string-append (getcwd) "/build/lib:"
9506 (getenv "PYTHONPATH")))
9507 (invoke "py.test" "-vv" "tests" "README.rst"))))))
9508 (native-inputs
9509 `(("python-pytest" ,python-pytest)
9510 ("python-six" ,python-six)))
9511 (home-page "https://github.com/ionelmc/python-tblib")
9512 (synopsis "Traceback serialization library")
9513 (description
9514 "Traceback serialization allows you to:
9515
9516@enumerate
9517@item Pickle tracebacks and raise exceptions with pickled tracebacks in
9518different processes. This allows better error handling when running code over
9519multiple processes (imagine multiprocessing, billiard, futures, celery etc).
9520
9521@item Parse traceback strings and raise with the parsed tracebacks.
9522@end enumerate\n")
9523 (license license:bsd-3)))
9524
9525(define-public python2-tblib
9526 (package-with-python2 python-tblib))
9527
9528(define-public python-greenlet
9529 (package
9530 (name "python-greenlet")
9531 (version "0.4.15")
9532 (source (origin
9533 (method url-fetch)
9534 (uri (pypi-uri "greenlet" version))
9535 (sha256
9536 (base32
9537 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
9538 (build-system python-build-system)
9539 (home-page "https://greenlet.readthedocs.io/")
9540 (synopsis "Lightweight in-process concurrent programming")
9541 (description
9542 "Greenlet package is a spin-off of Stackless, a version of CPython
9543that supports micro-threads called \"tasklets\". Tasklets run
9544pseudo-concurrently (typically in a single or a few OS-level threads) and
9545are synchronized with data exchanges on \"channels\".")
9546 (license (list license:psfl license:expat))))
9547
9548(define-public python2-greenlet
9549 (package-with-python2 python-greenlet))
9550
9551(define-public python-objgraph
9552 (package
9553 (name "python-objgraph")
9554 (version "3.4.0")
9555 (source
9556 (origin
9557 (method url-fetch)
9558 (uri (pypi-uri "objgraph" version))
9559 (sha256
9560 (base32
9561 "184m09am5gpbqfaiy7l0hwh476mczbrly1dffs0rw2p1d1i2q32a"))))
9562 (build-system python-build-system)
9563 (propagated-inputs
9564 `(("python-graphviz" ,python-graphviz)))
9565 (native-inputs
9566 `(("python-mock" ,python-mock)
9567 ("graphviz" ,graphviz)))
9568 (home-page "https://mg.pov.lt/objgraph/")
9569 (synopsis "Draw Python object reference graphs with graphviz")
9570 (description
9571 "This package provides tools to draw Python object reference graphs with
9572graphviz.")
9573 (license license:expat)))
9574
9575(define-public python-gevent
9576 (package
9577 (name "python-gevent")
9578 (version "1.3.7")
9579 (source (origin
9580 (method url-fetch)
9581 (uri (pypi-uri "gevent" version))
9582 (sha256
9583 (base32
9584 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
9585 (modules '((guix build utils)))
9586 (snippet
9587 '(begin
9588 ;; unbunding libev and c-ares
9589 (delete-file-recursively "deps")
9590 #t))))
9591 (build-system python-build-system)
9592 (arguments
9593 `(#:modules ((ice-9 ftw)
9594 (ice-9 match)
9595 (srfi srfi-26)
9596 (guix build utils)
9597 (guix build python-build-system))
9598 #:phases (modify-phases %standard-phases
9599 (add-after 'unpack 'unpack-libev
9600 (lambda* (#:key inputs #:allow-other-keys)
9601 (mkdir-p "deps/libev")
9602 ;; FIXME: gevent requires building libev, even though
9603 ;; it only links against the proper one.
9604 (invoke "tar" "-xf" (assoc-ref inputs "libev-source")
9605 "--strip-components=1" "-C" "deps/libev")))
9606 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
9607 (lambda _
9608 (substitute* "src/gevent/subprocess.py"
9609 (("/bin/sh") (which "sh")))
9610 (for-each (lambda (file)
9611 (substitute* file
9612 (("/bin/sh") (which "sh"))
9613 (("/bin/true") (which "true"))))
9614 (find-files "src/greentest" "\\.py$"))
9615 #t))
9616 (add-before 'build 'do-not-use-bundled-sources
9617 (lambda* (#:key inputs #:allow-other-keys)
9618 (setenv "CONFIG_SHELL" (which "bash"))
9619 (setenv "LIBEV_EMBED" "false")
9620 (setenv "CARES_EMBED" "false")
9621 (setenv "EMBED" "false")
9622
9623 (let ((greenlet (string-append
9624 (assoc-ref inputs "python-greenlet")
9625 "/include")))
9626 (match (scandir greenlet
9627 (lambda (item)
9628 (string-prefix? "python" item)))
9629 ((python)
9630 (setenv "CPATH"
9631 (string-append greenlet "/" python)))))
9632 #t))
9633 (add-before 'check 'skip-timer-test
9634 (lambda _
9635 ;; XXX: Skip 'TestTimerResolution', which appears to be
9636 ;; unreliable.
9637 (substitute* "src/greentest/test__core_timer.py"
9638 (("not greentest.RUNNING_ON_CI") "False"))
9639 #t))
9640 (replace 'check
9641 (lambda _
9642 ;; Make sure the build directory is on PYTHONPATH.
9643 (setenv "PYTHONPATH"
9644 (string-append
9645 (getenv "PYTHONPATH") ":"
9646 (getcwd) "/build/"
9647 (car (scandir "build" (cut string-prefix? "lib." <>)))))
9648 (with-directory-excursion "src/greentest"
9649 ;; XXX: Many tests require network access. Instead we only
9650 ;; run known-good tests. Unfortunately we cannot use
9651 ;; recursion here since this directory also contains
9652 ;; Python-version-specific subfolders.
9653 (apply invoke "python" "testrunner.py" "--config"
9654 "known_failures.py"
9655 (scandir "." (cut regexp-exec
9656 (make-regexp "test_+(subprocess|core)")
9657 <>)))))))))
9658 (propagated-inputs
9659 `(("python-greenlet" ,python-greenlet)
9660 ("python-objgraph" ,python-objgraph)))
9661 (native-inputs
9662 `(("libev-source" ,(package-source libev))
9663 ("python-six" ,python-six)))
9664 (inputs
9665 `(("c-ares" ,c-ares)
9666 ("libev" ,libev)))
9667 (home-page "http://www.gevent.org/")
9668 (synopsis "Coroutine-based network library")
9669 (description
9670 "gevent is a coroutine-based Python networking library that uses greenlet
9671to provide a high-level synchronous API on top of the libev event loop.")
9672 (license license:expat)
9673 (properties `((python2-variant . ,(delay python2-gevent))))))
9674
9675(define-public python2-gevent
9676 (let ((base (package-with-python2
9677 (strip-python2-variant python-gevent))))
9678 (package
9679 (inherit base)
9680 (native-inputs `(,@(package-native-inputs python-gevent)
9681 ("python-mock" ,python2-mock))))))
9682
9683(define-public python-fastimport
9684 (package
9685 (name "python-fastimport")
9686 (version "0.9.6")
9687 (source
9688 (origin
9689 (method url-fetch)
9690 (uri (pypi-uri "fastimport" version))
9691 (sha256
9692 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
9693 (build-system python-build-system)
9694 (home-page "https://github.com/jelmer/python-fastimport")
9695 (synopsis "VCS fastimport parser and generator in Python")
9696 (description "This package provides a parser for and generator of the Git
9697@url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
9698format.")
9699 (license license:gpl2+)))
9700
9701(define-public python2-fastimport
9702 (package-with-python2 python-fastimport))
9703
9704(define-public python-twisted
9705 (package
9706 (name "python-twisted")
52ca1c4a 9707 (version "19.2.0")
44d10b1f
RW
9708 (source (origin
9709 (method url-fetch)
9710 (uri (pypi-uri "Twisted" version ".tar.bz2"))
9711 (sha256
9712 (base32
52ca1c4a 9713 "1gmb8d57s13d8znvqnxi47vqzqz141z443dbxg9wjkp8ia9f220p"))))
44d10b1f
RW
9714 (build-system python-build-system)
9715 (arguments
9716 '(#:tests? #f)) ; FIXME: Some tests are failing.
44d10b1f
RW
9717 (propagated-inputs
9718 `(("python-zope-interface" ,python-zope-interface)
52ca1c4a 9719 ("python-pyhamcrest" ,python-pyhamcrest)
44d10b1f 9720 ("python-incremental" ,python-incremental)
e5ba2fe3 9721 ("python-hyperlink" ,python-hyperlink)
44d10b1f
RW
9722 ("python-constantly" ,python-constantly)
9723 ("python-automat" ,python-automat)))
9724 (home-page "https://twistedmatrix.com/")
9725 (synopsis "Asynchronous networking framework written in Python")
9726 (description
9727 "Twisted is an extensible framework for Python programming, with special
9728focus on event-based network programming and multiprotocol integration.")
9729 (license license:expat)))
9730
9731(define-public python2-twisted
9732 (package-with-python2 python-twisted))
9733
9734(define-public python-pika
9735 (package
9736 (name "python-pika")
9737 (version "0.12.0")
9738 (source
9739 (origin
9740 (method url-fetch)
9741 (uri (pypi-uri "pika" version))
9742 (sha256
9743 (base32
9744 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
9745 (build-system python-build-system)
9746 (native-inputs
9747 `(("python-pyev" ,python-pyev)
9748 ("python-tornado" ,python-tornado)
9749 ("python-twisted" ,python-twisted)))
9750 (home-page "https://pika.readthedocs.org")
9751 (synopsis "Pure Python AMQP Client Library")
9752 (description
9753 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
9754Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
9755network support library.")
9756 (license license:bsd-3)))
9757
9758(define-public python2-pika
9759 (package-with-python2 python-pika))
9760
9761(define-public python-ply
9762 (package
9763 (name "python-ply")
9764 (version "3.10")
9765 (source
9766 (origin
9767 (method url-fetch)
9768 (uri (pypi-uri "ply" version))
9769 (sha256
9770 (base32
9771 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
9772 (build-system python-build-system)
9773 (home-page "http://www.dabeaz.com/ply/")
9774 (synopsis "Python Lex & Yacc")
9775 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
9776It uses LR parsing and does extensive error checking.")
9777 (license license:bsd-3)))
9778
9779(define-public python2-ply
9780 (package-with-python2 python-ply))
9781
9782(define-public python-tabulate
9783 (package
9784 (name "python-tabulate")
9785 (version "0.7.7")
9786 (source (origin
9787 (method url-fetch)
9788 (uri (pypi-uri "tabulate" version))
9789 (sha256
9790 (base32
9791 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
9792 (build-system python-build-system)
9793 (arguments
9794 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
9795 ;; and the latest release is not tagged in the upstream repository.
9796 '(#:tests? #f))
9797 (home-page "https://bitbucket.org/astanin/python-tabulate")
9798 (synopsis "Pretty-print tabular data")
9799 (description
9800 "Tabulate is a library and command-line utility to pretty-print tabular
9801data in Python.")
9802 (license license:expat)))
9803
9804(define-public python2-tabulate
9805 (package-with-python2 python-tabulate))
9806
9807(define-public python-kazoo
9808 (package
9809 (name "python-kazoo")
9810 (version "2.4.0")
9811 (source
9812 (origin
9813 (method url-fetch)
9814 (uri (pypi-uri "kazoo" version))
9815 (sha256
9816 (base32
9817 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
9818 (build-system python-build-system)
9819 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
9820 (propagated-inputs
9821 `(("python-six" ,python-six)))
9822 (home-page "https://kazoo.readthedocs.org")
9823 (synopsis "High-level Zookeeper client library")
9824 (description
9825 "Kazoo is a Python client library for the Apache Zookeeper distributed
9826application service. It is designed to be easy to use and to avoid common
9827programming errors.")
9828 (license license:asl2.0)))
9829
9830(define-public python2-kazoo
9831 (package-with-python2 python-kazoo))
9832
9833(define-public python-pykafka
9834 (package
9835 (name "python-pykafka")
9836 (version "2.4.0")
9837 (source (origin
9838 (method url-fetch)
0ca1d040 9839 (uri (pypi-uri "pykafka" version))
44d10b1f
RW
9840 (sha256
9841 (base32
9842 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
9843 (build-system python-build-system)
9844 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
9845 (propagated-inputs
9846 `(("python-gevent" ,python-gevent)
9847 ("python-kazoo" ,python-kazoo)
9848 ("python-tabulate" ,python-tabulate)))
9849 (inputs
9850 `(("librdkafka" ,librdkafka)))
9851 (home-page "https://pykafka.readthedocs.io/")
9852 (synopsis "Apache Kafka client for Python")
9853 (description
9854 "PyKafka is a client for the Apache Kafka distributed messaging system.
9855It includes Python implementations of Kafka producers and consumers, which
9856are optionally backed by a C extension built on librdkafka.")
9857 (license license:asl2.0)))
9858
9859(define-public python2-pykafka
9860 (package-with-python2 python-pykafka))
9861
9862(define-public python-wcwidth
9863 (package
9864 (name "python-wcwidth")
9865 (version "0.1.7")
9866 (source
9867 (origin
9868 (method url-fetch)
9869 (uri (pypi-uri "wcwidth" version))
9870 (sha256
9871 (base32
9872 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
9873 (build-system python-build-system)
9874 (home-page "https://github.com/jquast/wcwidth")
9875 (synopsis "Measure number of terminal column cells of wide-character codes")
9876 (description "Wcwidth measures the number of terminal column cells of
9877wide-character codes. It is useful for those implementing a terminal emulator,
9878or programs that carefully produce output to be interpreted by one. It is a
9879Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
9880specified in POSIX.1-2001 and POSIX.1-2008.")
9881 (license license:expat)))
9882
9883(define-public python2-wcwidth
9884 (package-with-python2 python-wcwidth))
9885
9886(define-public python2-jsonrpclib
9887 (package
9888 (name "python2-jsonrpclib")
9889 (version "0.1.7")
9890 (source (origin
9891 (method url-fetch)
6571bba0 9892 (uri (pypi-uri "jsonrpclib" version))
44d10b1f
RW
9893 (sha256
9894 (base32
9895 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
9896 (build-system python-build-system)
9897 (arguments
9898 `(#:tests? #f
9899 #:python ,python-2))
9900 (home-page "https://github.com/joshmarshall/jsonrpclib/")
9901 (synopsis "Implementation of JSON-RPC specification for Python")
9902 (description
9903 "This library is an implementation of the JSON-RPC specification.
9904It supports both the original 1.0 specification, as well as the
9905new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
9906etc.")
9907 (license license:asl2.0)))
9908
9909(define-public python-chai
9910 (package
9911 (name "python-chai")
9912 (version "1.1.2")
9913 (source (origin
9914 (method url-fetch)
9915 (uri (pypi-uri "chai" version))
9916 (sha256
9917 (base32
9918 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
9919 (build-system python-build-system)
9920 (home-page "https://github.com/agoragames/chai")
9921 (synopsis "Mocking framework for Python")
9922 (description
9923 "Chai provides an api for mocking, stubbing and spying your python
9924objects, patterned after the Mocha library for Ruby.")
9925 (license license:bsd-3)))
9926
9927(define-public python2-chai
9928 (package-with-python2 python-chai))
9929
9930(define-public python-inflection
9931 (package
9932 (name "python-inflection")
9933 (version "0.3.1")
9934 (source
9935 (origin (method url-fetch)
9936 (uri (pypi-uri "inflection" version))
9937 (sha256
9938 (base32
9939 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
9940 (build-system python-build-system)
9941 (native-inputs
9942 `(("python-pytest" ,python-pytest)))
9943 (home-page "https://github.com/jpvanhal/inflection")
9944 (synopsis "Python string transformation library")
9945 (description
9946 "Inflection is a string transformation library. It singularizes
9947and pluralizes English words, and transforms strings from CamelCase to
9948underscored string.")
9949 (license license:expat)))
9950
9951(define-public python2-inflection
9952 (package-with-python2 python-inflection))
9953
9954(define-public python-pylev
9955 (package
9956 (name "python-pylev")
9957 (version "1.3.0")
9958 (source (origin
9959 (method url-fetch)
9960 (uri (pypi-uri "pylev" version))
9961 (sha256
9962 (base32
9963 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
9964 (build-system python-build-system)
9965 (home-page "https://github.com/toastdriven/pylev")
9966 (synopsis "Levenshtein distance implementation in Python")
9967 (description "Pure Python Levenshtein implementation, based off the
9968Wikipedia code samples at
9969@url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
9970 (license license:bsd-3)))
9971
9972(define-public python2-pylev
9973 (package-with-python2 python-pylev))
9974
9975(define-public python-cleo
9976 (package
9977 (name "python-cleo")
9978 (version "0.6.1")
9979 (source (origin
9980 (method url-fetch)
9981 (uri (pypi-uri "cleo" version))
9982 (sha256
9983 (base32
9984 "0q1cf0szr0d54am4pypzwdnm74zpladdsinad94c2fz5i06fdpf7"))))
9985 (build-system python-build-system)
9986 (native-inputs
9987 `(;; For testing
9988 ("python-mock" ,python-mock)
9989 ("python-pytest-mock" ,python-pytest-mock)
9990 ("python-pytest" ,python-pytest)))
9991 (propagated-inputs
9992 `(("python-backpack" ,python-backpack)
9993 ("python-pastel" ,python-pastel)
9994 ("python-pylev" ,python-pylev)))
9995 (home-page "https://github.com/sdispater/cleo")
9996 (synopsis "Command-line arguments library for Python")
9997 (description
9998 "Cleo allows you to create command-line commands with signature in
9999docstring and colored output.")
10000 (license license:expat)))
10001
10002(define-public python2-cleo
10003 (package-with-python2 python-cleo))
10004
10005(define-public python-lazy-object-proxy
10006 (package
10007 (name "python-lazy-object-proxy")
10008 (version "1.3.1")
10009 (source (origin
10010 (method url-fetch)
10011 (uri (pypi-uri "lazy-object-proxy" version))
10012 (sha256
10013 (base32
10014 "0yha7q9bhw857fwaby785d63mffhngl9npwzlk9i0pwlkwvbx4gb"))))
10015 (build-system python-build-system)
10016 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10017 (synopsis "Lazy object proxy for python")
10018 (description
10019 "Lazy object proxy is an object that wraps a callable but defers the call
10020until the object is actually required, and caches the result of said call.")
10021 (license license:bsd-2)))
10022
10023(define-public python2-lazy-object-proxy
10024 (package-with-python2 python-lazy-object-proxy))
10025
10026(define-public python-dnspython
10027 (package
10028 (name "python-dnspython")
10029 (version "1.15.0")
10030 (source (origin
10031 (method url-fetch)
10032 (uri (string-append "http://www.dnspython.org/kits/"
10033 version "/dnspython-" version ".tar.gz"))
10034 (sha256
10035 (base32
10036 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
10037 (build-system python-build-system)
10038 (arguments '(#:tests? #f)) ; XXX: requires internet access
10039 (home-page "http://www.dnspython.org")
10040 (synopsis "DNS toolkit for Python")
10041 (description
10042 "dnspython is a DNS toolkit for Python. It supports almost all record
10043types. It can be used for queries, zone transfers, and dynamic updates.
10044It supports TSIG authenticated messages and EDNS0.")
10045 (license license:expat)))
10046
10047(define-public python2-dnspython
10048 (package-with-python2 python-dnspython))
10049
10050(define-public python-email-validator
10051 (package
10052 (name "python-email-validator")
10053 (version "1.0.2")
10054 (source
10055 (origin (method url-fetch)
10056 (uri (pypi-uri "email_validator" version))
10057 (sha256
10058 (base32
10059 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
10060 (build-system python-build-system)
10061 (arguments
10062 '(#:phases
10063 (modify-phases %standard-phases
10064 (add-before 'build 'use-dnspython
10065 (lambda _
10066 (substitute* "setup.py"
10067 (("dnspython3") "dnspython"))
10068 #t)))))
10069 (propagated-inputs
10070 `(("python-dnspython" ,python-dnspython)
10071 ("python-idna" ,python-idna)))
10072 (home-page "https://github.com/JoshData/python-email-validator")
10073 (synopsis "Email address validation library for Python")
10074 (description
10075 "This library validates email address syntax and deliverability.")
10076 (license license:cc0)))
10077
10078(define-public python2-email-validator
10079 (package-with-python2 python-email-validator))
10080
10081(define-public python-ukpostcodeparser
10082 (package
10083 (name "python-ukpostcodeparser")
10084 (version "1.0.3")
10085 (source (origin
10086 (method url-fetch)
10087 (uri (pypi-uri "UkPostcodeParser" version))
10088 (sha256
10089 (base32
10090 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10091 (build-system python-build-system)
10092 (home-page "https://github.com/hamstah/ukpostcodeparser")
10093 (synopsis "UK Postcode parser for Python")
10094 (description
10095 "This library provides the @code{parse_uk_postcode} function for
10096parsing UK postcodes.")
10097 (license license:expat)))
10098
10099(define-public python2-ukpostcodeparser
10100 (package-with-python2 python-ukpostcodeparser))
10101
10102(define-public python-faker
10103 (package
10104 (name "python-faker")
10105 (version "0.7.9")
10106 (source (origin
10107 (method url-fetch)
10108 (uri (pypi-uri "Faker" version))
10109 (sha256
10110 (base32
10111 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
10112 (patches
10113 (search-patches "python-faker-fix-build-32bit.patch"))
10114 (modules '((guix build utils)))
10115 (snippet
10116 '(begin
10117 (for-each delete-file (find-files "." "\\.pyc$"))
10118 #t))))
10119 (build-system python-build-system)
10120 (arguments
10121 '(#:phases
10122 (modify-phases %standard-phases
10123 (replace 'check
49ff8827 10124 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
44d10b1f
RW
10125 (native-inputs
10126 `(;; For testing
10127 ("python-email-validator" ,python-email-validator)
10128 ("python-mock" ,python-mock)
10129 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
10130 (propagated-inputs
10131 `(("python-dateutil" ,python-dateutil)
10132 ("python-six" ,python-six)))
10133 (home-page "https://github.com/joke2k/faker")
10134 (synopsis "Python package that generates fake data")
10135 (description
10136 "Faker is a Python package that generates fake data such as names,
10137addresses, and phone numbers.")
10138 (license license:expat)
10139 (properties `((python2-variant . ,(delay python2-faker))))))
10140
10141(define-public python2-faker
10142 (let ((base (package-with-python2 (strip-python2-variant
10143 python-faker))))
10144 (package
10145 (inherit base)
10146 (propagated-inputs
10147 `(("python2-ipaddress" ,python2-ipaddress)
10148 ,@(package-propagated-inputs base))))))
10149
10150(define-public python-pyaml
10151 (package
10152 (name "python-pyaml")
10153 (version "18.11.0")
10154 (source (origin
10155 (method url-fetch)
10156 (uri (pypi-uri "pyaml" version))
10157 (sha256
10158 (base32
10159 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
10160 (build-system python-build-system)
10161 (native-inputs
10162 `(("python-unidecode" ,python-unidecode)))
10163 (propagated-inputs
10164 `(("python-pyyaml" ,python-pyyaml)))
10165 (home-page "https://github.com/mk-fg/pretty-yaml")
10166 (synopsis "YAML pretty-print library for Python")
10167 (description
10168 "pyaml is a PyYAML based python module to produce pretty and readable
10169YAML-serialized data.")
10170 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
10171
10172(define-public python2-pyaml
10173 (package-with-python2 python-pyaml))
10174
10175(define-public python-backpack
10176 (package
10177 (name "python-backpack")
10178 (version "0.1")
10179 (source
10180 (origin
10181 (method url-fetch)
10182 (uri (pypi-uri "backpack" version))
10183 (sha256
10184 (base32
10185 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
10186 (build-system python-build-system)
10187 (native-inputs
10188 `(("python-pytest" ,python-pytest)
10189 ("python-nose" ,python-nose)))
10190 (propagated-inputs
10191 `(("python-simplejson" ,python-simplejson)))
10192 (home-page "https://github.com/sdispater/backpack")
10193 (synopsis "Utilities for working with Python collections")
10194 (description "Backpack provides some useful utilities for working with
10195collections of data.")
10196 (license license:expat)))
10197
10198(define-public python2-backpack
10199 (package-with-python2 python-backpack))
10200
10201(define-public python-prompt-toolkit
10202 (package
10203 (name "python-prompt-toolkit")
10204 (version "2.0.7")
10205 (source
10206 (origin
10207 (method url-fetch)
10208 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10209 (sha256
10210 (base32
10211 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
10212 (build-system python-build-system)
10213 (arguments
10214 `(#:phases
10215 (modify-phases %standard-phases
10216 (delete 'check)
10217 (add-after 'install 'post-install-check
10218 (lambda* (#:key inputs outputs #:allow-other-keys)
10219 ;; HOME is needed for the test
10220 ;; "test_pathcompleter_can_expanduser".
10221 (setenv "HOME" "/tmp")
10222 (add-installed-pythonpath inputs outputs)
10223 (invoke "py.test"))))))
10224 (propagated-inputs
10225 `(("python-wcwidth" ,python-wcwidth)
10226 ("python-six" ,python-six)
10227 ("python-pygments" ,python-pygments)))
10228 (native-inputs
10229 `(("python-pytest" ,python-pytest)))
10230 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10231 (synopsis "Library for building command line interfaces in Python")
10232 (description
10233 "Prompt-Toolkit is a library for building interactive command line
10234interfaces in Python. It's like GNU Readline but it also features syntax
10235highlighting while typing, out-of-the-box multi-line input editing, advanced
10236code completion, incremental search, support for Chinese double-width
10237characters, mouse support, and auto suggestions.")
10238 (license license:bsd-3)))
10239
10240(define-public python2-prompt-toolkit
10241 (package-with-python2 python-prompt-toolkit))
10242
10243(define-public python-prompt-toolkit-1
10244 (package (inherit python-prompt-toolkit)
10245 (version "1.0.15")
10246 (source
10247 (origin
10248 (method url-fetch)
10249 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10250 (sha256
10251 (base32
10252 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
10253
10254(define-public python2-prompt-toolkit-1
10255 (package-with-python2 python-prompt-toolkit-1))
10256
10257(define-public python-jedi
10258 (package
10259 (name "python-jedi")
40bd0aa3 10260 (version "0.13.2")
44d10b1f
RW
10261 (source
10262 (origin
10263 (method url-fetch)
10264 (uri (pypi-uri "jedi" version))
10265 (sha256
10266 (base32
40bd0aa3 10267 "1za944msp0f8x36qa8l309jhv0kzlsdh7r9nj3z12y8npnsh45sp"))))
44d10b1f
RW
10268 (build-system python-build-system)
10269 (arguments
40bd0aa3 10270 `( ;; Many tests are failing with Python 3.7.x as of version 0.13.2 (see:
44d10b1f
RW
10271 ;; https://github.com/davidhalter/jedi/issues/1263)
10272 #:tests? #f
10273 #:phases
10274 (modify-phases %standard-phases
10275 (replace 'check
10276 (lambda* (#:key tests? #:allow-other-keys)
10277 (when tests?
10278 (invoke "py.test" "-vv")))))))
10279 (native-inputs
10280 `(("python-pytest" ,python-pytest)
10281 ("python-docopt" ,python-docopt)))
10282 (propagated-inputs
10283 `(("python-parso" ,python-parso)))
10284 (home-page "https://github.com/davidhalter/jedi")
10285 (synopsis "Autocompletion and static analysis library for Python")
10286 (description
10287 "Jedi is a static analysis tool for Python that can be used in Integrated
10288Development Environments (@dfn{IDE}s) and text editors. It understands Python
10289on a deeper level than many other static analysis frameworks for Python.
10290
10291Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
10292well.")
10293 (license license:expat)))
10294
10295(define-public python2-jedi
10296 (package-with-python2 python-jedi))
10297
10298(define-public ptpython
10299 (package
10300 (name "ptpython")
10301 (version "0.34")
10302 (source (origin
10303 (method url-fetch)
10304 (uri (pypi-uri "ptpython" version))
10305 (sha256
10306 (base32
10307 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10308 (build-system python-build-system)
10309 (arguments
10310 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
10311 (propagated-inputs
10312 `(("python-docopt" ,python-docopt)
10313 ("python-jedi" ,python-jedi)
10314 ("python-prompt-toolkit" ,python-prompt-toolkit)
10315 ("python-pygments" ,python-pygments)))
10316 (home-page "https://github.com/jonathanslenders/ptpython")
10317 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10318 (description
10319 "ptpython is a Python read-eval-print loop with IDE-like features.
10320It supports syntax highlighting, multiline editing, autocompletion, mouse,
10321color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10322etc.")
10323 (license license:bsd-3)
10324 (properties `((python2-variant . ,(delay ptpython-2))))))
10325
10326(define-public ptpython-2
10327 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10328 (package
10329 (inherit base)
10330 (name "ptpython2"))))
10331
10332(define-public python-stem
10333 (package
10334 (name "python-stem")
10335 (version "1.7.0")
10336 (source
10337 (origin
10338 (method url-fetch)
10339 (uri (pypi-uri "stem" version))
10340 (sha256
10341 (base32
10342 "1awiglfiajnx2hva9aqpj3fmdvdb4qg7cwnlfyih827m68y3cq8v"))))
10343 (build-system python-build-system)
10344 (arguments
10345 `(#:phases
10346 (modify-phases %standard-phases
10347 (replace 'check
10348 (lambda _
10349 (invoke "./run_tests.py" "--unit")
10350 #t)))))
10351 (native-inputs
10352 `(("python-mock" ,python-mock)
10353 ("python-pycodestyle" ,python-pycodestyle)
10354 ("python-pyflakes" ,python-pyflakes)))
10355 (home-page "https://stem.torproject.org/")
10356 (synopsis
10357 "Python controller library that allows applications to interact with Tor")
10358 (description
10359 "Stem is a Python controller library for Tor. With it you can use Tor's
10360control protocol to script against the Tor process and read descriptor data
10361relays publish about themselves.")
10362 (license license:lgpl3)))
10363
10364(define-public python2-stem
10365 (package-with-python2 python-stem))
10366
10367(define-public python-pyserial
10368 (package
10369 (name "python-pyserial")
10370 (version "3.1.1")
10371 (source
10372 (origin
10373 (method url-fetch)
10374 (uri (pypi-uri "pyserial" version))
10375 (sha256
10376 (base32
10377 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
10378 (build-system python-build-system)
10379 (arguments
10380 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
10381 ;; #:phases
10382 ;; (modify-phases %standard-phases
10383 ;; (replace 'check
10384 ;; (lambda _
10385 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
10386 (home-page
10387 "https://github.com/pyserial/pyserial")
10388 (synopsis "Python Serial Port Bindings")
10389 (description "@code{pyserial} provide serial port bindings for Python. It
10390supports different byte sizes, stop bits, parity and flow control with RTS/CTS
10391and/or Xon/Xoff. The port is accessed in RAW mode.")
10392 (license license:bsd-3)))
10393
10394(define-public python2-pyserial
10395 (package-with-python2 python-pyserial))
10396
10397(define-public python-kivy
10398 (package
10399 (name "python-kivy")
10400 (version "1.10.1")
10401 (source
10402 (origin
10403 (method url-fetch)
10404 (uri (pypi-uri "Kivy" version))
10405 (file-name (string-append name "-" version ".tar.gz"))
10406 (sha256
10407 (base32
10408 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
10409 (build-system python-build-system)
10410 (arguments
10411 `(#:tests? #f ; Tests require many optional packages
10412 #:phases
10413 (modify-phases %standard-phases
10414 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
10415 (lambda* (#:key inputs #:allow-other-keys)
10416 (setenv "KIVY_SDL2_PATH"
10417 (string-append (assoc-ref inputs "sdl-union")
10418 "/include/SDL2"))
10419 #t)))))
10420 (native-inputs
10421 `(("git" ,git)
10422 ("pkg-config" ,pkg-config)
10423 ("python-cython" ,python-cython)))
10424 (inputs
10425 `(("gstreamer" ,gstreamer)
10426 ("mesa" ,mesa)
10427 ("sdl-union"
10428 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
10429 (home-page "http://kivy.org")
10430 (synopsis
10431 "Multitouch application framework")
10432 (description
10433 "A software library for rapid development of
10434hardware-accelerated multitouch applications.")
10435 (license license:expat)))
10436
10437(define-public python2-kivy
10438 (package-with-python2 python-kivy))
10439
10440(define-public python-kivy-next
10441 (deprecated-package "python-kivy-next" python-kivy))
10442
10443(define-public python2-kivy-next
10444 (deprecated-package "python2-kivy-next" python2-kivy))
10445
10446(define-public python-binaryornot
10447 (package
10448 (name "python-binaryornot")
10449 (version "0.4.4")
10450 (source (origin
10451 (method url-fetch)
10452 (uri (pypi-uri "binaryornot" version))
10453 (sha256
10454 (base32
10455 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
10456 (build-system python-build-system)
10457 (propagated-inputs
10458 `(("python-chardet" ,python-chardet)
10459 ("python-hypothesis" ,python-hypothesis)))
10460 (home-page "https://github.com/audreyr/binaryornot")
10461 (synopsis "Package to check if a file is binary or text")
10462 (description "Ultra-lightweight pure Python package to check if a file is
10463binary or text.")
10464 (license license:bsd-3)
10465 (properties `((python2-variant . ,(delay python2-binaryornot))))))
10466
10467(define-public python2-binaryornot
10468 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
10469 (package (inherit base)
10470 (propagated-inputs
10471 `(("python2-enum34" ,python2-enum34)
10472 ,@(package-propagated-inputs base))))))
10473
10474(define-public python-nltk
10475 (package
10476 (name "python-nltk")
10477 (version "3.2.1")
10478 (source (origin
10479 (method url-fetch)
10480 (uri (pypi-uri "nltk" version))
10481 (sha256
10482 (base32
10483 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
10484 (build-system python-build-system)
10485 (arguments
10486 '(;; The tests require some extra resources to be downloaded.
10487 ;; TODO Try packaging these resources.
10488 #:tests? #f))
10489 (home-page "http://nltk.org/")
10490 (synopsis "Natural Language Toolkit")
10491 (description "It provides interfaces to over 50 corpora and lexical
10492resources such as WordNet, along with a suite of text processing libraries
10493for classification, tokenization, stemming, tagging, parsing, and semantic
10494reasoning, wrappers for natural language processing libraries.")
10495 (license license:asl2.0)))
10496
10497(define-public python2-nltk
10498 (package-with-python2 python-nltk))
10499
10500(define-public python-pymongo
10501 (package
10502 (name "python-pymongo")
10503 (version "3.7.2")
10504 (source (origin
10505 (method url-fetch)
10506 (uri (pypi-uri "pymongo" version))
10507 (sha256
10508 (base32
10509 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
10510 (build-system python-build-system)
10511 (propagated-inputs
10512 `(("python-certifi" ,python-certifi)))
10513 (home-page "https://github.com/mongodb/mongo-python-driver")
10514 (synopsis "Python driver for MongoDB")
10515 (description "Python driver for MongoDB.")
10516 (license license:asl2.0)))
10517
10518(define-public python2-pymongo
10519 (package-with-python2 python-pymongo))
10520
44d10b1f
RW
10521(define-public python-consul
10522 (package
10523 (name "python-consul")
10524 (version "0.6.1")
10525 (source
10526 (origin
10527 (method url-fetch)
10528 (uri (pypi-uri "python-consul" version))
10529 (sha256
10530 (base32
10531 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
10532 (build-system python-build-system)
10533 (arguments
10534 '(#:tests? #f)) ; The tests are not distributed
10535 (propagated-inputs
10536 `(("python-requests" ,python-requests)
10537 ("python-six" ,python-six)))
10538 (home-page "https://github.com/cablehead/python-consul")
10539 (synopsis "Python client for Consul")
10540 (description
10541 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
10542discovery, monitoring and configuration.")
10543 (license license:expat)))
10544
10545(define-public python2-consul
10546 (package-with-python2 python-consul))
10547
10548(define-public python-schematics
10549 (package
10550 (name "python-schematics")
10551 (version "1.1.1")
10552 (source
1961d187
TGR
10553 (origin
10554 (method git-fetch)
10555 (uri (git-reference
10556 (url "https://github.com/schematics/schematics.git")
10557 (commit (string-append "v" version))))
10558 (file-name (git-file-name name version))
10559 (sha256
10560 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
44d10b1f
RW
10561 (build-system python-build-system)
10562 (propagated-inputs
10563 `(("python-six" ,python-six)))
10564 (arguments
1961d187
TGR
10565 ;; The tests require a bunch of not very nice packages with fixed
10566 ;; version requirements (e.g. python-coveralls).
10567 `(#:tests? #f))
44d10b1f
RW
10568 (home-page "https://github.com/schematics/schematics")
10569 (synopsis "Python Data Structures for Humans")
10570 (description "Python Data Structures for Humans.")
10571 (license license:bsd-3)))
10572
10573(define-public python2-schematics
10574 (package-with-python2 python-schematics))
10575
10576(define-public python-odfpy
10577 (package
10578 (name "python-odfpy")
10579 (version "1.3.3")
10580 (source (origin
10581 (method url-fetch)
10582 (uri (pypi-uri "odfpy" version))
10583 (sha256
10584 (base32
10585 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
10586 (arguments
10587 `(#:modules ((srfi srfi-1)
10588 (guix build python-build-system)
10589 (guix build utils))
10590 #:phases
10591 (modify-phases %standard-phases
10592 (replace 'check
10593 ;; The test runner invokes python2 and python3 for test*.py.
10594 ;; To avoid having both in inputs, we replicate it here.
10595 (lambda _
21ccc01d
RW
10596 (for-each (lambda (test-file) (invoke "python" test-file))
10597 (find-files "tests" "^test.*\\.py$"))
10598 #t)))))
44d10b1f
RW
10599 (build-system python-build-system)
10600 (home-page "https://github.com/eea/odfpy")
10601 (synopsis "Python API and tools to manipulate OpenDocument files")
10602 (description "Collection of libraries and utility programs written in
10603Python to manipulate OpenDocument 1.2 files.")
10604 (license
10605 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
10606 ;; number of files with other licenses.
10607 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
10608
10609(define-public python2-odfpy
10610 (package-with-python2 python-odfpy))
10611
10612(define-public python-natsort
10613 (package
10614 (name "python-natsort")
10615 (version "5.4.1")
10616 (source (origin
10617 (method url-fetch)
10618 (uri (pypi-uri "natsort" version))
10619 (sha256
10620 (base32
10621 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
10622 (build-system python-build-system)
10623 (arguments
10624 `(#:modules ((guix build utils)
10625 (guix build python-build-system)
10626 (srfi srfi-1)
10627 (srfi srfi-26)
10628 (ice-9 ftw))
10629 #:phases
10630 (modify-phases %standard-phases
10631 (add-before 'check 'set-cachedir
10632 ;; Tests require write access to $HOME by default
10633 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
10634 (replace 'check
10635 (lambda _
10636 (let ((cwd (getcwd)))
10637 (setenv "PYTHONPATH"
10638 (string-append
10639 cwd "/build/"
10640 (find (cut string-prefix? "lib" <>)
10641 (scandir (string-append cwd "/build")))
10642 ":"
10643 (getenv "PYTHONPATH")))
10644 (invoke "pytest" "-v")))))))
10645 (native-inputs
10646 `(("python-hypothesis" ,python-hypothesis)
10647 ("python-pytest-cov" ,python-pytest-cov)
10648 ("python-pytest-mock" ,python-pytest-mock)
10649 ("python-pytest" ,python-pytest)))
10650 (propagated-inputs ; TODO: Add python-fastnumbers.
10651 `(("python-pyicu" ,python-pyicu)))
10652 (home-page "https://github.com/SethMMorton/natsort")
10653 (synopsis "Natural sorting for python and shell")
10654 (description
10655 "Natsort lets you apply natural sorting on lists instead of
10656lexicographical. If you use the built-in @code{sorted} method in python
36a4366d
EF
10657on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
10658@code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
10659@code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
10660identifies numbers and sorts them separately from strings. It can also sort
10661version numbers, real numbers, mixed types and more, and comes with a shell
10662command @command{natsort} that exposes this functionality in the command line.")
44d10b1f
RW
10663 (license license:expat)
10664 (properties `((python2-variant . ,(delay python2-natsort))))))
10665
10666(define-public python2-natsort
10667 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
10668 (package (inherit base)
10669 (native-inputs
10670 `(("python2-pathlib" ,python2-pathlib)
10671 ,@(package-native-inputs base))))))
10672
10673(define-public python-glances
10674 (package
10675 (name "python-glances")
10676 (version "3.0.2")
10677 (source
10678 (origin
10679 (method url-fetch)
10680 (uri (pypi-uri "Glances" version))
10681 (sha256
10682 (base32
10683 "09fxysfp1n16csqvzvawy74qm6a94nvwjf3vcf5gkqp4i6k4vjjy"))))
10684 (build-system python-build-system)
10685 (propagated-inputs
10686 `(("python-psutil" ,python-psutil)))
10687 (home-page
10688 "https://github.com/nicolargo/glances")
10689 (synopsis
10690 "A cross-platform curses-based monitoring tool")
10691 (description
10692 "Glances is a curses-based monitoring tool for a wide variety of platforms.
10693Glances uses the PsUtil library to get information from your system. It monitors
10694CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
10695 (license license:lgpl3+)))
10696
10697(define-public python2-glances
10698 (package-with-python2 python-glances))
10699
10700(define-public python-graphql-core
10701 (package
10702 (name "python-graphql-core")
10703 (version "0.5.3")
10704 (source
10705 (origin
10706 (method url-fetch)
10707 (uri (pypi-uri "graphql-core" version))
10708 (sha256
10709 (base32
10710 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
10711 (build-system python-build-system)
10712 (arguments
10713 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
10714 #:phases
10715 (modify-phases %standard-phases
10716 (add-after 'unpack 'patch-hardcoded-version
10717 (lambda _ (substitute*
10718 "setup.py"
10719 (("'gevent==1.1rc1'") "'gevent'"))
10720 #t)))))
10721 (native-inputs
10722 `(("python-gevent" ,python-gevent)
10723 ("python-mock" ,python-mock)
10724 ("python-pytest-mock" ,python-pytest-mock)))
10725 (propagated-inputs
10726 `(("python-promise" ,python-promise)
10727 ("python-six" ,python-six)))
10728 (home-page "https://github.com/graphql-python/graphql-core")
10729 (synopsis "GraphQL implementation for Python")
10730 (description
10731 "GraphQL implementation for Python. GraphQL is a data query language and
10732runtime designed and used to request and deliver data to mobile and web apps.
10733This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
10734to Python.")
10735 (license license:expat)))
10736
10737(define-public python2-graphql-core
10738 (package-with-python2 python-graphql-core))
10739
10740(define-public python-graphql-relay
10741 (package
10742 (name "python-graphql-relay")
10743 (version "0.4.5")
10744 (source
10745 (origin
10746 (method url-fetch)
10747 (uri (pypi-uri "graphql-relay" version))
10748 (sha256
10749 (base32
10750 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
10751 (build-system python-build-system)
10752 (arguments
10753 '(#:tests? #f)) ; The tests are not distributed
10754 (propagated-inputs
10755 `(("python-graphql-core" ,python-graphql-core)
10756 ("python-promise" ,python-promise)
10757 ("python-six" ,python-six)))
10758 (home-page "https://github.com/graphql-python/graphql-relay-py")
10759 (synopsis "Relay implementation for Python")
10760 (description
10761 "This is a library to allow the easy creation of Relay-compliant servers
10762using the GraphQL Python reference implementation of a GraphQL server. It
10763should be noted that the code is a exact port of the original
10764@url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
10765from Facebook.")
10766 (license license:expat)))
10767
10768(define-public python2-graphql-relay
10769 (package-with-python2 python-graphql-relay))
10770
10771(define-public python-graphene
10772 (package
10773 (name "python-graphene")
10774 (version "0.10.2")
10775 (source
10776 (origin
10777 (method url-fetch)
10778 (uri (pypi-uri "graphene" version))
10779 (sha256
10780 (base32
10781 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
10782 (build-system python-build-system)
10783 (propagated-inputs
10784 `(("python-graphql-core" ,python-graphql-core)
10785 ("python-graphql-relay" ,python-graphql-relay)
10786 ("python-iso8601" ,python-iso8601)
10787 ("python-promise" ,python-promise)
10788 ("python-six" ,python-six)))
10789 (arguments
10790 `(#:tests? #f)) ; no tests/ in the PyPI tarball
10791 (home-page "http://graphene-python.org/")
10792 (synopsis "GraphQL Framework for Python")
10793 (description
10794 "Graphene is a Python library for building GraphQL schemas/types.
10795A GraphQL schema describes your data model, and provides a GraphQL server
10796with an associated set of resolve methods that know how to fetch data.")
10797 (properties `((python2-variant . ,(delay python2-graphene))))
10798 (license license:expat)))
10799
10800(define-public python2-graphene
10801 (let ((base (package-with-python2
10802 (strip-python2-variant python-graphene))))
10803 (package (inherit base)
10804 (native-inputs
10805 `(("python2-sqlalchemy" ,python2-sqlalchemy)
10806 ,@(package-native-inputs base))))))
10807
10808(define-public python-nautilus
10809 (package
10810 (name "python-nautilus")
10811 (version "0.4.9")
10812 (source
10813 (origin
10814 (method url-fetch)
10815 (uri (pypi-uri "nautilus" version))
10816 (sha256
10817 (base32
10818 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
10819 (build-system python-build-system)
10820 (arguments `(#:tests? #f)) ; fails to import test modules
10821 (propagated-inputs
10822 `(("python-bcrypt" ,python-bcrypt)
10823 ("python-click" ,python-click)
10824 ("python-consul" ,python-consul)
10825 ("python-graphene" ,python-graphene)
10826 ("python-jinja2" ,python-jinja2)
10827 ("python-peewee" ,python-peewee)
10828 ("python-pika" ,python-pika)
10829 ("python-tornado" ,python-tornado)
10830 ("python-wtforms" ,python-wtforms)))
10831 (native-inputs
10832 `(("python-nose2" ,python-nose2)))
10833 (home-page "https://github.com/AlecAivazis/nautilus")
10834 (synopsis "Library for creating microservice applications")
10835 (description
10836 "Nautilus is a framework for flux based microservices that looks to
10837provide extendible implementations of common aspects of a cloud so that you can
10838focus on building massively scalable web applications.")
10839 (license license:expat)))
10840
10841(define-public python-snowballstemmer
10842 (package
10843 (name "python-snowballstemmer")
10844 (version "1.2.1")
10845 (source (origin
10846 (method url-fetch)
10847 (uri (pypi-uri "snowballstemmer" version))
10848 (sha256
10849 (base32
10850 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
10851 (build-system python-build-system)
10852 (arguments
10853 `(;; No tests exist
10854 #:tests? #f))
10855 (home-page "https://github.com/shibukawa/snowball_py")
10856 (synopsis "Snowball stemming library collection for Python")
10857 (description "This package provides 16 word stemmer algorithms generated
10858from Snowball algorithms. It includes the 15 original ones plus the Poerter
10859English stemmer.")
10860 (license license:bsd-3)))
10861
10862(define-public python2-snowballstemmer
10863 (package-with-python2 python-snowballstemmer))
10864
10865(define-public python-sphinx-cloud-sptheme
10866 (package
10867 (name "python-sphinx-cloud-sptheme")
10868 (version "1.8.0")
10869 (source (origin
10870 (method url-fetch)
10871 (uri (pypi-uri "cloud_sptheme" version))
10872 (sha256
10873 (base32
10874 "1dniqb6a39yh786f86c4jn666rwnyi1jvzn4616zhcchb7sfdshd"))))
10875 (build-system python-build-system)
10876 ;; FIXME: The 'pypi' release archive does not contain tests.
10877 (arguments '(#:tests? #f))
10878 (native-inputs
10879 `(("python-sphinx" ,python-sphinx)))
10880 (home-page "https://bitbucket.org/ecollins/cloud_sptheme")
10881 (synopsis "'Cloud' theme for Sphinx documenter")
10882 (description "This package contains the \"Cloud\" theme for Sphinx and some
10883related extensions.")
10884 (license license:bsd-3)))
10885
10886(define-public python2-sphinx-cloud-sptheme
10887 (package-with-python2 python-sphinx-cloud-sptheme))
10888
10889(define-public python-sphinx-alabaster-theme
10890 (package
10891 (name "python-sphinx-alabaster-theme")
10892 (version "0.7.12")
10893 (source (origin
10894 (method url-fetch)
10895 (uri (pypi-uri "alabaster" version))
10896 (sha256
10897 (base32
10898 "00nwwjj2d2ym4s2kk217x7jkx1hnczc3fvm8yxbqmsp6b0nxfqd6"))))
10899 (build-system python-build-system)
10900 (propagated-inputs
10901 `(("python-pygments" ,python-pygments)))
10902 (home-page "https://alabaster.readthedocs.io/")
10903 (synopsis "Configurable sidebar-enabled Sphinx theme")
10904 (description "Alabaster is a visually (c)lean, responsive, configurable
10905theme for the Sphinx documentation system. It's the default theme of Sphinx.")
10906 (license license:bsd-3)))
10907
10908(define-public python2-sphinx-alabaster-theme
10909 (package-with-python2 python-sphinx-alabaster-theme))
10910
10911(define-public python-setproctitle
10912(package
10913 (name "python-setproctitle")
10914 (version "1.1.10")
10915 (source
10916 (origin
10917 (method url-fetch)
10918 (uri (pypi-uri "setproctitle" version))
10919 (sha256
10920 (base32
10921 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
10922 (build-system python-build-system)
10923 (arguments
10924 '(#:phases
10925 (modify-phases %standard-phases
10926 (add-before 'check 'patch-Makefile
10927 ;; Stricly this is only required for the python2 variant.
10928 ;; But adding a phase in an inherited package seems to be
10929 ;; cumbersum. So we patch even for python3.
10930 (lambda _
10931 (let ((nose (assoc-ref %build-inputs "python2-nose")))
10932 (when nose
10933 (substitute* "Makefile"
10934 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
10935 (string-append nose "/bin/nosetests "))))
10936 #t)))
10937 (replace 'check
10938 (lambda _
10939 (setenv "PYTHON" (or (which "python3") (which "python")))
10940 (setenv "PYCONFIG" (or (which "python3-config")
10941 (which "python-config")))
10942 (setenv "CC" "gcc")
10943 ;; No need to extend PYTHONPATH to find the built package, since
10944 ;; the Makefile will build anyway
10945 (invoke "make" "check"))))))
10946 (native-inputs
10947 `(("procps" ,procps))) ; required for tests
10948 (home-page
10949 "https://github.com/dvarrazzo/py-setproctitle")
10950 (synopsis
10951 "Setproctitle implementation for Python to customize the process title")
10952 (description "The library allows a process to change its title (as displayed
10953by system tools such as ps and top).
10954
10955Changing the title is mostly useful in multi-process systems, for
10956example when a master process is forked: changing the children's title
10957allows to identify the task each process is busy with. The technique
10958is used by PostgreSQL and the OpenSSH Server for example.")
10959 (license license:bsd-3)
10960 (properties `((python2-variant . ,(delay python2-setproctitle))))))
10961
10962(define-public python2-setproctitle
10963 (let ((base (package-with-python2
10964 (strip-python2-variant python-setproctitle))))
10965 (package
10966 (inherit base)
10967 (native-inputs `(("python2-nose" ,python2-nose)
10968 ,@(package-native-inputs base))))))
10969
10970(define-public python-validictory
10971 (package
10972 (name "python-validictory")
10973 (version "1.0.1")
10974 (source
10975 (origin
10976 (method url-fetch)
10977 (uri (pypi-uri "validictory" version))
10978 (sha256
10979 (base32
10980 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
10981 (build-system python-build-system)
10982 (arguments
10983 '(#:phases
10984 (modify-phases %standard-phases
10985 (add-after 'unpack 'bootstrap
10986 ;; Move the tests out of the package directory to avoid
10987 ;; packaging them.
10988 (lambda* _
10989 (rename-file "validictory/tests" "tests")
10990 (delete-file "tests/__init__.py")))
10991 (replace 'check
10992 (lambda _
10993 ;; Extend PYTHONPATH so the built package will be found.
10994 (setenv "PYTHONPATH"
10995 (string-append (getcwd) "/build/lib:"
10996 (getenv "PYTHONPATH")))
6568bd5d 10997 (invoke "py.test" "-vv" ))))))
44d10b1f
RW
10998 (native-inputs
10999 `(("python-pytest" ,python-pytest)))
11000 (home-page
11001 "https://github.com/jamesturk/validictory")
11002 (synopsis "General purpose Python data validator")
11003 (description "It allows validation of arbitrary Python data structures.
11004
11005The schema format is based on the JSON Schema
11006proposal (http://json-schema.org), so combined with json the library is also
11007useful as a validator for JSON data.")
11008 (license license:expat)))
11009
11010(define-public python2-validictory
11011 (package-with-python2 python-validictory))
11012
11013(define-public python-pyelftools
11014 (package
11015 (name "python-pyelftools")
11016 (version "0.25")
11017 (source
11018 (origin
11019 (method url-fetch)
11020 (uri (pypi-uri "pyelftools" version))
11021 (sha256
11022 (base32
11023 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
11024 (build-system python-build-system)
11025 (arguments
11026 `(#:phases
11027 (modify-phases %standard-phases
11028 (add-before 'check 'set-pythonpath
11029 (lambda _
11030 (setenv "PYTHONPATH"
11031 (string-append
11032 (getcwd) "/test/"
11033 ":" (getenv "PYTHONPATH")))
11034 #t)))))
11035 (home-page
11036 "https://github.com/eliben/pyelftools")
11037 (synopsis
11038 "Analyze binary and library file information")
11039 (description "This Python library provides interfaces for parsing and
11040analyzing two binary and library file formats; the Executable and Linking
11041Format (ELF), and debugging information in the Debugging With Attributed
11042Record Format (DWARF).")
11043 (license license:public-domain)))
11044
11045(define-public python-pyev
11046 (package
11047 (name "python-pyev")
11048 (version "0.9.0")
11049 (source
11050 (origin
11051 (method url-fetch)
11052 (uri (pypi-uri "pyev" version))
11053 (sha256
11054 (base32
11055 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11056 (build-system python-build-system)
11057 (arguments
11058 `(#:tests? #f ; no test suite
11059 #:phases
11060 (modify-phases %standard-phases
11061 (add-after 'unpack 'patch
11062 (lambda* (#:key inputs #:allow-other-keys)
11063 (let ((libev (string-append (assoc-ref inputs "libev")
11064 "/lib/libev.so.4")))
11065 (substitute* "setup.py"
11066 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
11067 (string-append "libev_dll_name = \"" libev "\"")))))))))
11068 (inputs
11069 `(("libev" ,libev)))
11070 (home-page "http://pythonhosted.org/pyev/")
11071 (synopsis "Python libev interface")
11072 (description "Pyev provides a Python interface to libev.")
11073 (license license:gpl3)))
11074
11075(define-public python2-pyev
11076 (package-with-python2 python-pyev))
11077
11078(define-public python-imagesize
11079 (package
11080 (name "python-imagesize")
11081 (version "1.1.0")
11082 (source
11083 (origin
11084 (method url-fetch)
11085 (uri (pypi-uri "imagesize" version))
11086 (sha256
11087 (base32
11088 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
11089 (build-system python-build-system)
11090 (home-page "https://github.com/shibukawa/imagesize_py")
11091 (synopsis "Gets image size of files in various formats in Python")
11092 (description
11093 "This package allows determination of image size from
11094PNG, JPEG, JPEG2000 and GIF files in pure Python.")
11095 (license license:expat)))
11096
11097(define-public python2-imagesize
11098 (package-with-python2 python-imagesize))
11099
11100(define-public python-termstyle
11101 (package
11102 (name "python-termstyle")
11103 (version "0.1.11")
11104 (source
11105 (origin
11106 (method url-fetch)
11107 (uri (pypi-uri "termstyle" version))
11108 (sha256
11109 (base32
11110 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
11111 (build-system python-build-system)
11112 (arguments
11113 '(#:phases
11114 (modify-phases %standard-phases
11115 (replace 'check
11116 (lambda _
831080a6 11117 (invoke "python" "test3.py"))))))
44d10b1f
RW
11118 (home-page "https://github.com/gfxmonk/termstyle")
11119 (synopsis "Console text coloring for Python")
11120 (description "This package provides console text coloring for Python.")
11121 (license license:bsd-3)))
11122
11123(define-public python-argcomplete
11124 (package
11125 (name "python-argcomplete")
11126 (version "1.7.0")
11127 (source
11128 (origin
11129 (method url-fetch)
11130 (uri (pypi-uri "argcomplete" version))
11131 (sha256
11132 (base32
11133 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
11134 (build-system python-build-system)
11135 (native-inputs
11136 `(("python-pexpect" ,python-pexpect)
11137 ("tcsh" ,tcsh)
11138 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
11139 (home-page "https://github.com/kislyuk/argcomplete")
11140 (synopsis "Shell tab completion for Python argparse")
11141 (description "argcomplete provides extensible command line tab completion
11142of arguments and options for Python scripts using @code{argparse}. It's
11143particularly useful for programs with many options or sub-parsers that can
11144dynamically suggest completions; for example, when browsing resources over the
11145network.")
11146 (license license:asl2.0)))
11147
11148(define-public python2-argcomplete
11149 (package-with-python2 python-argcomplete))
11150
11151(define-public python-xopen
11152 (package
11153 (name "python-xopen")
24d64989 11154 (version "0.5.0")
44d10b1f
RW
11155 (source
11156 (origin
11157 (method url-fetch)
11158 (uri (pypi-uri "xopen" version))
11159 (sha256
11160 (base32
24d64989 11161 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
44d10b1f 11162 (build-system python-build-system)
24d64989
RW
11163 (propagated-inputs
11164 `(("python-setuptools-scm" ,python-setuptools-scm)))
44d10b1f
RW
11165 (home-page "https://github.com/marcelm/xopen/")
11166 (synopsis "Open compressed files transparently")
11167 (description "This module provides an @code{xopen} function that works like
11168Python's built-in @code{open} function, but can also deal with compressed files.
11169Supported compression formats are gzip, bzip2 and, xz, and are automatically
11170recognized by their file extensions. The focus is on being as efficient as
11171possible on all supported Python versions.")
11172 (license license:expat)))
11173
11174(define-public python2-xopen
11175 (let ((base (package-with-python2
11176 (strip-python2-variant python-xopen))))
11177 (package
11178 (inherit base)
11179 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
11180 ,@(package-propagated-inputs base))))))
11181
11182(define-public python-cheetah
11183 (package
11184 (name "python-cheetah")
11185 (version "3.1.0")
11186 (source
11187 (origin
11188 (method url-fetch)
11189 (uri (pypi-uri "Cheetah3" version))
11190 (sha256
11191 (base32
11192 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
11193 (build-system python-build-system)
11194 (arguments
11195 `(#:modules ((guix build utils)
11196 (guix build python-build-system)
11197 (ice-9 ftw)
11198 (srfi srfi-1)
11199 (srfi srfi-26))
11200 #:phases (modify-phases %standard-phases
11201 (add-after 'unpack 'use-absolute-python
11202 (lambda _
11203 (substitute* "Cheetah/CheetahWrapper.py"
11204 (("#!/usr/bin/env python")
11205 (string-append "#!" (which "python"))))
11206 #t))
11207 (replace 'check
11208 (lambda _
11209 (let ((cwd (getcwd)))
11210 (setenv "PYTHONPATH"
11211 (string-append
11212 cwd "/build/"
11213 (find (cut string-prefix? "lib" <>)
11214 (scandir (string-append cwd "/build")))
11215 ":" (getenv "PYTHONPATH")))
11216 (setenv "PATH"
11217 (string-append (getenv "PATH")
11218 ":" cwd "/bin"))
11219 (setenv "TMPDIR" "/tmp")
11220
11221 (substitute* "Cheetah/Tests/Test.py"
11222 (("unittest.TextTestRunner\\(\\)")
11223 "unittest.TextTestRunner(verbosity=2)"))
11224
11225 (invoke "python" "Cheetah/Tests/Test.py")))))))
11226 (propagated-inputs
11227 `(("python-markdown" ,python-markdown))) ;optional
11228 (home-page "http://cheetahtemplate.org/")
11229 (synopsis "Template engine")
11230 (description "Cheetah is a text-based template engine and Python code
11231generator.
11232
11233Cheetah can be used as a standalone templating utility or referenced as
11234a library from other Python applications. It has many potential uses,
11235but web developers looking for a viable alternative to ASP, JSP, PHP and
11236PSP are expected to be its principle user group.
11237
11238Features:
11239@enumerate
11240@item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
11241 text-based format.
11242@item Cleanly separates content, graphic design, and program code.
11243@item Blends the power and flexibility of Python with a simple template language
11244 that non-programmers can understand.
11245@item Gives template writers full access to any Python data structure, module,
11246 function, object, or method in their templates.
11247@item Makes code reuse easy by providing an object-orientated interface to
11248 templates that is accessible from Python code or other Cheetah templates.
11249 One template can subclass another and selectively reimplement sections of it.
11250@item Provides a simple, yet powerful, caching mechanism that can dramatically
11251 improve the performance of a dynamic website.
11252@item Compiles templates into optimized, yet readable, Python code.
11253@end enumerate")
11254 (license (license:x11-style "file://LICENSE"))))
11255
11256(define-public python2-cheetah
11257 (package-with-python2 python-cheetah))
11258
11259(define-public python-dulwich
11260 (package
11261 (name "python-dulwich")
11262 (version "0.18.6")
11263 (source
11264 (origin
11265 (method url-fetch)
11266 (uri (list (string-append "https://www.dulwich.io/releases/"
11267 "dulwich-" version ".tar.gz")
11268 (pypi-uri "dulwich" version)))
11269 (sha256
11270 (base32
11271 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
11272 (build-system python-build-system)
11273 (arguments
11274 `(#:phases
11275 (modify-phases %standard-phases
11276 (add-before 'check 'fix-tests
11277 (lambda* (#:key inputs #:allow-other-keys)
11278 ;; The tests use Popen with a custom environment which doesn't
11279 ;; include PATH.
11280 (substitute* "dulwich/tests/compat/utils.py"
11281 (("'git'") (string-append "'"
11282 (which "git")
11283 "'")))
11284 (substitute* '("dulwich/tests/test_repository.py"
11285 "dulwich/tests/test_hooks.py")
11286 (("#!/bin/sh") (string-append "#!" (which "sh"))))
11287 (setenv "TEST_RUNNER" "unittest")
11288 (setenv "PYTHONHASHSEED" "random")
11289 #t)))))
11290 (propagated-inputs
11291 `(("python-fastimport" ,python-fastimport)))
11292 (native-inputs
11293 `(("python-mock" ,python-mock)
11294 ("python-geventhttpclient" ,python-geventhttpclient)
11295 ("git" ,git)))
11296 (home-page "https://www.dulwich.io/")
11297 (synopsis "Git implementation in Python")
11298 (description "Dulwich is an implementation of the Git file formats and
11299protocols written in pure Python.")
11300 ;; Can be used with either license.
11301 (license (list license:asl2.0 license:gpl2+))))
11302
11303(define-public python2-dulwich
11304 (package-with-python2 python-dulwich))
11305
11306(define-public python-pbkdf2
11307 (package
11308 (name "python-pbkdf2")
11309 (version "1.3")
11310 (source
11311 (origin
11312 (method url-fetch)
11313 (uri (pypi-uri "pbkdf2" version))
11314 (sha256
11315 (base32
11316 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
11317 (build-system python-build-system)
11318 (arguments
11319 '(#:phases
11320 (modify-phases %standard-phases
11321 (replace 'check
11322 (lambda _
11323 (setenv "PYTHONPATH"
11324 (string-append (getcwd) "/build/lib:"
11325 (getenv "PYTHONPATH")))
ee2bb944 11326 (invoke "python" "test/test_pbkdf2.py"))))))
44d10b1f
RW
11327 (propagated-inputs
11328 `(("python-pycrypto" ,python-pycrypto))) ; optional
11329 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
11330 (synopsis "Password-based key derivation")
11331 (description "This module implements the password-based key derivation
11332function, PBKDF2, specified in RSA PKCS#5 v2.0.
11333
11334PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
11335is part of the RSA Public Key Cryptography Standards series. The provided
11336implementation takes a password or a passphrase and a salt value (and
11337optionally a iteration count, a digest module, and a MAC module) and provides
11338a file-like object from which an arbitrarly-sized key can be read.")
11339 (license license:expat)))
11340
11341(define-public python2-pbkdf2
11342 (package-with-python2 python-pbkdf2))
11343
11344(define-public python-qrcode
11345 (package
11346 (name "python-qrcode")
217ea1a1 11347 (version "6.1")
44d10b1f
RW
11348 (source
11349 (origin
11350 (method url-fetch)
11351 (uri (pypi-uri "qrcode" version))
11352 (sha256
217ea1a1 11353 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
44d10b1f
RW
11354 (build-system python-build-system)
11355 (arguments
11356 ;; FIXME: Tests require packaging 'pymaging'.
11357 '(#:tests? #f))
11358 (propagated-inputs
11359 `(("python-lxml" ,python-lxml) ; for SVG output
11360 ("python-pillow" ,python-pillow) ; for PNG output
11361 ("python-six" ,python-six)))
44d10b1f
RW
11362 (home-page "https://github.com/lincolnloop/python-qrcode")
11363 (synopsis "QR Code image generator")
11364 (description "This package provides a pure Python QR Code generator
11365module. It uses the Python Imaging Library (PIL) to allow for the generation
11366of QR Codes.
11367
11368In addition this package provides a command line tool to generate QR codes and
11369either write these QR codes to a file or do the output as ascii art at the
11370console.")
11371 (license license:bsd-3)))
11372
11373(define-public python2-qrcode
11374 (package-with-python2 python-qrcode))
11375
11376(define-public python-rst2ansi
11377 (package
11378 (name "python-rst2ansi")
11379 (version "0.1.5")
11380 (source
11381 (origin
11382 (method url-fetch)
11383 (uri (pypi-uri "rst2ansi" version))
11384 (sha256
11385 (base32
11386 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
11387 (build-system python-build-system)
11388 (propagated-inputs
11389 `(("python-docutils" ,python-docutils)))
11390 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
11391 (synopsis "Convert RST to ANSI-decorated console output")
11392 (description
11393 "Python module dedicated to rendering RST (reStructuredText) documents
11394to ansi-escaped strings suitable for display in a terminal.")
11395 (license license:expat)))
11396
11397(define-public python-ansi2html
11398 (package
11399 (name "python-ansi2html")
11400 (version "1.2.0")
11401 (source
11402 (origin
11403 (method url-fetch)
11404 (uri (pypi-uri "ansi2html" version))
11405 (sha256
11406 (base32
11407 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
11408 (build-system python-build-system)
11409 (native-inputs
11410 `(("python-mock" ,python-mock)
11411 ("python-nose" ,python-nose)))
11412 (propagated-inputs
11413 `(("python-six" ,python-six)))
11414 (home-page "https://github.com/ralphbean/ansi2html")
11415 (synopsis "Convert ANSI-decorated console output to HTML")
11416 (description
11417 "@command{ansi2html} is a Python library and command line utility for
11418convering text with ANSI color codes to HTML or LaTeX.")
11419 (license license:gpl3+)))
11420
11421(define-public python2-ansi2html
11422 (package-with-python2 python-ansi2html))
11423
11424(define-public python-ddt
11425 (package
11426 (name "python-ddt")
11427 (version "1.1.3")
11428 (source
11429 (origin
11430 (method url-fetch)
11431 (uri (pypi-uri "ddt" version))
11432 (sha256
11433 (base32
11434 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
11435 (build-system python-build-system)
11436 (native-inputs
11437 `(("python-mock" ,python-mock)
11438 ("python-nose" ,python-nose)))
11439 (propagated-inputs
11440 `(("python-six" ,python-six)
11441 ("python-pyyaml" ,python-pyyaml)))
11442 (home-page "https://github.com/txels/ddt")
11443 (synopsis "Data-Driven Tests")
11444 (description
11445 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
11446running it with different test data, and make it appear as multiple test
11447cases.")
11448 (license license:expat)))
11449
11450(define-public python2-ddt
11451 (package-with-python2 python-ddt))
11452
11453(define-public python-pycountry
11454 (package
11455 (name "python-pycountry")
11456 (version "18.5.26")
11457 (source
11458 (origin
11459 (method url-fetch)
11460 (uri (pypi-uri "pycountry" version))
11461 (sha256
11462 (base32
11463 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
11464 (build-system python-build-system)
11465 (home-page "https://bitbucket.org/flyingcircus/pycountry")
11466 (synopsis "ISO databases for languages, countries, currencies, etc.")
11467 (description
11468 "@code{pycountry} provides the ISO databases for the standards:
11469@enumerate
11470@item 639-3 (Languages)
11471@item 3166 (Countries)
11472@item 3166-3 (Deleted Countries)
11473@item 3166-2 (Subdivisions of countries)
11474@item 4217 (Currencies)
11475@item 15924 (Scripts)
11476@end enumerate
11477It includes a copy from Debian’s pkg-isocodes and makes the data accessible
11478through a Python API.")
11479 (license license:lgpl2.1+)))
11480
11481(define-public python2-pycountry
11482 (package-with-python2 python-pycountry))
11483
11484(define-public python-pycosat
11485 (package
11486 (name "python-pycosat")
11487 (version "0.6.1")
11488 (source
11489 (origin
11490 (method url-fetch)
11491 (uri (pypi-uri "pycosat" version))
11492 (sha256
11493 (base32
11494 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
11495 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
11496 (build-system python-build-system)
11497 (home-page "https://github.com/ContinuumIO/pycosat")
11498 (synopsis "Bindings to picosat (a SAT solver)")
11499 (description
11500 "This package provides efficient Python bindings to @code{picosat} on
11501the C level. When importing pycosat, the @code{picosat} solver becomes part
11502of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
11503Problem} (SAT) solver.")
11504 (license license:expat)))
11505
11506(define-public python2-pycosat
11507 (package-with-python2 python-pycosat))
11508
11509(define-public python2-ruamel.ordereddict
11510 (package
11511 (name "python2-ruamel.ordereddict")
11512 (version "0.4.9")
11513 (source
11514 (origin
11515 (method url-fetch)
11516 (uri (pypi-uri "ruamel.ordereddict" version))
11517 (sha256
11518 (base32
11519 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
11520 (build-system python-build-system)
11521 (arguments
11522 `(#:python ,python-2
11523 #:phases
11524 (modify-phases %standard-phases
11525 (delete 'check)
11526 (add-after 'install 'check
11527 (lambda* (#:key inputs outputs #:allow-other-keys)
11528 (add-installed-pythonpath inputs outputs)
f987ac30 11529 (invoke "python" "test/testordereddict.py"))))))
44d10b1f
RW
11530 (home-page "https://bitbucket.org/ruamel/ordereddict")
11531 (synopsis "Version of dict that keeps keys in insertion order")
11532 (description
11533 "This is an implementation of an ordered dictionary with @dfn{Key
11534Insertion Order} (KIO: updates of values do not affect the position of the
11535key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
11536removed and put at the back). The standard library module @code{OrderedDict},
11537implemented later, implements a subset of @code{ordereddict} functionality.
11538Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
11539Order} (KSO, no sorting function can be specified, but a transform can be
11540specified to apply on the key before comparison (e.g. @code{string.lower})).")
11541 (license license:expat)))
11542
11543(define-public python-pypeg2
11544 (package
11545 (name "python-pypeg2")
11546 (version "2.15.2")
11547 (source
11548 (origin
11549 (method url-fetch)
11550 (uri (pypi-uri "pyPEG2" version))
11551 (sha256
11552 (base32
11553 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
11554 (build-system python-build-system)
11555 (propagated-inputs `(("python-lxml" ,python-lxml)))
11556 (arguments
11557 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
11558 '(#:tests? #f))
11559 (home-page "https://fdik.org/pyPEG/")
11560 (synopsis "Parsering Expression Grammars in Python")
11561 (description "PyPEG is an intrinsic parser interpreter framework for
11562Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
11563parse many formal languages.")
11564 (license license:gpl2)))
11565
11566(define-public python-incremental
11567 (package
11568 (name "python-incremental")
11569 (version "17.5.0")
11570 (source
11571 (origin
11572 (method url-fetch)
11573 (uri (pypi-uri "incremental" version))
11574 (sha256
11575 (base32
11576 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
11577 (build-system python-build-system)
11578 (home-page "https://github.com/hawkowl/incremental")
11579 (synopsis "Library for versioning Python projects")
11580 (description "Incremental is a small library that versions your Python
11581projects.")
11582 (license license:expat)))
11583
11584(define-public python2-incremental
11585 (package-with-python2 python-incremental))
11586
11587(define-public python-invoke
11588 (package
11589 (name "python-invoke")
11590 (home-page "http://www.pyinvoke.org/")
11591 (version "1.1.0")
11592 (source (origin
11593 (method url-fetch)
11594 (uri (pypi-uri "invoke" version))
11595 (sha256
11596 (base32
11597 "0aiy1xvk1f91246zxd1zqrm679vdvd10h843a2na41cqr3cflpi6"))))
11598 (build-system python-build-system)
11599 (arguments
11600 ;; XXX: Requires many dependencies that are not yet in Guix.
11601 `(#:tests? #f))
11602 (synopsis "Pythonic task execution")
11603 (description
11604 "Invoke is a Python task execution tool and library, drawing inspiration
11605from various sources to arrive at a powerful and clean feature set. It is
11606evolved from the Fabric project, but focuses on local and abstract concerns
11607instead of servers and network commands.")
11608 (license license:bsd-3)))
11609
11610(define-public python2-invoke
11611 (package-with-python2 python-invoke))
11612
11613(define-public python-automat
11614 (package
11615 (name "python-automat")
919d80a0 11616 (version "0.7.0")
44d10b1f
RW
11617 (source (origin
11618 (method url-fetch)
11619 (uri (pypi-uri "Automat" version))
11620 (sha256
11621 (base32
919d80a0 11622 "03ivg70n3b1cbcd2zvjhk8y4kmqxcvhmili39lmgx09dza1qpmyb"))))
44d10b1f
RW
11623 (build-system python-build-system)
11624 ;; We disable the tests because they require python-twisted, while
11625 ;; python-twisted depends on python-automat. Twisted is optional, but the
11626 ;; tests fail if it is not available. Also see
11627 ;; <https://github.com/glyph/automat/issues/71>.
11628 (arguments '(#:tests? #f))
11629 (native-inputs
11630 `(("python-m2r" ,python-m2r)
11631 ("python-setuptools-scm" ,python-setuptools-scm)
11632 ("python-graphviz" ,python-graphviz)))
11633 (propagated-inputs
11634 `(("python-six" ,python-six)
11635 ("python-attrs" ,python-attrs)))
11636 (home-page "https://github.com/glyph/Automat")
11637 (synopsis "Self-service finite-state machines")
11638 (description "Automat is a library for concise, idiomatic Python
11639expression of finite-state automata (particularly deterministic finite-state
11640transducers).")
11641 (license license:expat)))
11642
11643(define-public python2-automat
11644 (package-with-python2 python-automat))
11645
11646(define-public python-m2r
11647 (package
11648 (name "python-m2r")
bcfb8fac 11649 (version "0.2.1")
44d10b1f
RW
11650 (source (origin
11651 (method url-fetch)
11652 (uri (pypi-uri "m2r" version))
11653 (sha256
11654 (base32
bcfb8fac 11655 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
44d10b1f
RW
11656 (build-system python-build-system)
11657 (propagated-inputs
11658 `(("python-docutils" ,python-docutils)
11659 ("python-mistune" ,python-mistune)))
11660 (native-inputs
11661 `(("python-pygments" ,python-pygments)
11662 ("python-mock" ,python-mock)))
11663 (home-page "https://github.com/miyakogi/m2r")
11664 (synopsis "Markdown to reStructuredText converter")
11665 (description "M2R converts a markdown file including reST markups to valid
11666reST format.")
11667 (license license:expat)))
11668
11669(define-public python2-m2r
11670 (package-with-python2 python-m2r))
11671
11672(define-public python-constantly
11673 (package
11674 (name "python-constantly")
11675 (version "15.1.0")
11676 (source (origin
11677 (method url-fetch)
11678 (uri (pypi-uri "constantly" version))
11679 (sha256
11680 (base32
11681 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
11682 (build-system python-build-system)
11683 (home-page "https://github.com/twisted/constantly")
11684 (synopsis "Symbolic constants in Python")
11685 (description "Constantly is a Python library that provides symbolic
11686constant support. It includes collections and constants with text, numeric,
11687and bit flag values.")
11688 (license license:expat)))
11689
11690(define-public python2-constantly
11691 (package-with-python2 python-constantly))
11692
11693(define-public python-attrs
11694 (package
11695 (name "python-attrs")
11696 (version "18.2.0")
11697 (source (origin
11698 (method url-fetch)
11699 (uri (pypi-uri "attrs" version))
11700 (sha256
11701 (base32
11702 "0s9ydh058wmmf5v391pym877x4ahxg45dw6a0w4c7s5wgpigdjqh"))))
11703 (build-system python-build-system)
11704 (arguments
11705 `(#:modules ((guix build utils)
11706 (guix build python-build-system)
11707 (ice-9 ftw)
11708 (srfi srfi-1)
11709 (srfi srfi-26))
11710 #:phases (modify-phases %standard-phases
11711 (replace 'check
11712 (lambda _
11713 (let ((cwd (getcwd)))
11714 (setenv "PYTHONPATH"
11715 (string-append
11716 cwd "/build/"
11717 (find (cut string-prefix? "lib" <>)
11718 (scandir (string-append cwd "/build")))
11719 ":"
11720 (getenv "PYTHONPATH")))
11721 (invoke "python" "-m" "pytest")))))))
11722 (native-inputs
11723 `(("python-coverage" ,python-coverage)
11724 ("python-hypothesis" ,python-hypothesis)
11725 ("python-pympler" ,python-pympler)
11726 ("python-pytest" ,python-pytest)
11727 ("python-six" ,python-six)
11728 ("python-sphinx" ,python-sphinx)
11729 ("python-zope-interface" ,python-zope-interface)))
11730 (home-page "https://github.com/python-attrs/attrs/")
11731 (synopsis "Attributes without boilerplate")
11732 (description "@code{attrs} is a Python package with class decorators that
11733ease the chores of implementing the most common attribute-related object
11734protocols.")
11735 (license license:expat)))
11736
11737(define-public python2-attrs
11738 (package-with-python2 python-attrs))
11739
11740(define-public python-attrs-bootstrap
11741 (package
11742 (inherit python-attrs)
11743 (name "python-attrs-bootstrap")
11744 ;; Keep this on a fixed version so python-attrs can be updated without
11745 ;; triggering a mass-rebuild. FIXME: Update this in the next rebuild cycle.
11746 (version "17.4.0")
11747 (source (origin
11748 (method url-fetch)
11749 (uri (pypi-uri "attrs" version))
11750 (sha256
11751 (base32
11752 "1jafnn1kzd6qhxgprhx6y6ik1r5m2rilx25syzcmq03azp660y8w"))))
11753 (native-inputs `())
11754 (arguments `(#:tests? #f))))
11755
11756(define-public python2-attrs-bootstrap
11757 (package-with-python2 python-attrs-bootstrap))
11758
11759(define-public python2-cliapp
11760 (package
11761 (name "python2-cliapp")
9064b84e 11762 (version "1.20180812.1")
44d10b1f
RW
11763 (source
11764 (origin
11765 (method url-fetch)
11766 (uri (string-append
11767 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
11768 version ".tar.gz"))
11769 (sha256
11770 (base32
9064b84e 11771 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
44d10b1f
RW
11772 (build-system python-build-system)
11773 (arguments
11774 `(#:python ,python-2
11775 #:phases
11776 (modify-phases %standard-phases
11777 ;; check phase needs to be run before the build phase. If not,
11778 ;; coverage-test-runner looks for tests for the built source files,
11779 ;; and fails.
11780 (delete 'check)
11781 (add-before 'build 'check
11782 (lambda _
11783 ;; Disable python3 tests
11784 (substitute* "check"
11785 (("python3") "# python3"))
6c826d32 11786 (invoke "./check"))))))
44d10b1f
RW
11787 (native-inputs
11788 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
11789 ("python2-pep8" ,python2-pep8)))
11790 (propagated-inputs
11791 `(("python2-pyaml" ,python2-pyaml)))
11792 (home-page "https://liw.fi/cliapp/")
11793 (synopsis "Python framework for command line programs")
11794 (description "@code{python2-cliapp} is a python framework for
11795command line programs. It contains the typical stuff such programs
11796need to do, such as parsing the command line for options, and
11797iterating over input files.")
11798 (license license:gpl2+)))
11799
11800(define-public python2-ttystatus
11801 (package
11802 (name "python2-ttystatus")
e516a9c2 11803 (version "0.36")
44d10b1f
RW
11804 (source
11805 (origin
11806 (method url-fetch)
11807 (uri (string-append
11808 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
11809 version ".tar.gz"))
11810 (sha256
11811 (base32
e516a9c2 11812 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
44d10b1f
RW
11813 (build-system python-build-system)
11814 (native-inputs
11815 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
11816 ("python2-pep8" ,python2-pep8)))
11817 (arguments
11818 `(#:python ,python-2
11819 #:phases
11820 (modify-phases %standard-phases
11821 ;; check phase needs to be run before the build phase. If not,
11822 ;; coverage-test-runner looks for tests for the built source files,
11823 ;; and fails.
11824 (delete 'check)
11825 (add-before 'build 'check
cbeee881 11826 (lambda _ (invoke "make" "check"))))))
44d10b1f
RW
11827 (home-page "https://liw.fi/ttystatus/")
11828 (synopsis "Python library for showing progress reporting and
11829status updates on terminals")
11830 (description "@code{python2-ttystatus} is a python library for
11831showing progress reporting and status updates on terminals, for
11832command line programs. Output is automatically adapted to the width
11833of the terminal: truncated if it does not fit, and resized if the
11834terminal size changes.")
11835 (license license:gpl3+)))
11836
11837(define-public python2-tracing
11838 (package
11839 (name "python2-tracing")
11840 (version "0.10")
11841 (source
11842 (origin
11843 (method url-fetch)
11844 (uri (string-append
11845 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
11846 version ".tar.gz"))
11847 (sha256
11848 (base32
11849 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
11850 (build-system python-build-system)
11851 (arguments
11852 `(#:python ,python-2))
11853 (home-page "https://liw.fi/tracing/")
11854 (synopsis "Python debug logging helper")
11855 (description "@code{python2-tracing} is a python library for
11856logging debug messages. It provides a way to turn debugging messages
11857on and off, based on the filename they occur in. It is much faster
11858than using @code{logging.Filter} to accomplish the same thing, which
11859matters when code is run in production mode. The actual logging still
11860happens using the @code{logging} library.")
11861 (license license:gpl3+)))
11862
11863(define-public python2-larch
11864 (package
11865 (name "python2-larch")
11866 (version "1.20151025")
11867 (source
11868 (origin
11869 (method url-fetch)
11870 (uri (string-append
11871 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
11872 version ".tar.gz"))
11873 (patches (search-patches
11874 "python2-larch-coverage-4.0a6-compatibility.patch"))
11875 (sha256
11876 (base32
11877 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
11878 (build-system python-build-system)
11879 (arguments
11880 `(#:python ,python-2
11881 #:phases
11882 (modify-phases %standard-phases
11883 ;; check phase needs to be run before the build phase. If not,
11884 ;; coverage-test-runner looks for tests for the built source files,
11885 ;; and fails.
11886 (delete 'check)
11887 (add-before 'build 'check
204ad455 11888 (lambda _ (invoke "make" "check"))))))
44d10b1f
RW
11889 (native-inputs
11890 `(("cmdtest" ,cmdtest)
11891 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
11892 (propagated-inputs
11893 `(("python2-tracing" ,python2-tracing)))
11894 (home-page "https://liw.fi/larch/")
11895 (synopsis "Python copy-on-write B-tree library")
11896 (description "@code{python2-larch} is an implementation of
11897particular kind of B-tree, based on research by Ohad Rodeh. See
11898@url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
11899on the data structure.
11900
11901The distinctive feature of this B-tree is that a node is never
11902(conceptually) modified. Instead, all updates are done by
11903copy-on-write. This makes it easy to clone a tree, and modify only the
11904clone, while other processes access the original tree.")
11905 (license license:gpl3+)))
11906
11907(define-public python-astroid
11908 (package
11909 (name "python-astroid")
11910 (version "2.1.0")
11911 (source
11912 (origin
11913 (method url-fetch)
11914 (uri (pypi-uri "astroid" version))
11915 (sha256
11916 (base32
11917 "08hz675knh4294bancdapql392fmbjyimhbyrmfkz1ka7l035c1m"))))
11918 (build-system python-build-system)
11919 (propagated-inputs
11920 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
11921 ("python-six" ,python-six)
11922 ("python-wrapt" ,python-wrapt)))
11923 (native-inputs
11924 `(("python-dateutil" ,python-dateutil)
11925 ("python-nose" ,python-nose)
11926 ("python-pytest" ,python-pytest)
11927 ("python-pytest-runner" ,python-pytest-runner)))
11928 (arguments
11929 `(#:phases
11930 (modify-phases %standard-phases
11931 (add-after 'unpack 'remove-spurious-test
11932 (lambda _
11933 ;; This can be removed after upgrading from python-3.7
11934 ;; https://github.com/PyCQA/astroid/issues/593
11935 ;; https://bugs.python.org/issue34056
11936 (delete-file "astroid/tests/unittest_modutils.py")
11937 #t))
11938 (replace 'check
11939 (lambda _
11940 (invoke "pytest" "astroid"))))))
11941 (home-page "https://github.com/PyCQA/astroid")
11942 (synopsis "Common base representation of python source code for pylint and
11943other projects")
11944 (description "@code{python-astroid} provides a common base representation
11945of python source code for projects such as pychecker, pyreverse, pylint, etc.
11946
11947It provides a compatible representation which comes from the _ast module. It
11948rebuilds the tree generated by the builtin _ast module by recursively walking
11949down the AST and building an extended ast. The new node classes have
11950additional methods and attributes for different usages. They include some
11951support for static inference and local name scopes. Furthermore, astroid
11952builds partial trees by inspecting living objects.")
11953 (license license:lgpl2.1+)
11954 (properties `((python2-variant . ,(delay python2-astroid))))))
11955
11956(define-public python2-astroid
11957 (let ((base (package-with-python2
11958 (strip-python2-variant python-astroid))))
11959 (package (inherit base)
11960 ;; Version 2.x removes python2 support.
11961 (version "1.6.5")
11962 (source
11963 (origin
11964 (method url-fetch)
11965 (uri (pypi-uri "astroid" version))
11966 (sha256
11967 (base32
11968 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
11969 (arguments
11970 (substitute-keyword-arguments (package-arguments base)
11971 ((#:phases phases)
11972 `(modify-phases ,phases
11973 (add-after 'unpack 'remove-spurious-test
11974 (lambda _
11975 ;; https://github.com/PyCQA/astroid/issues/276
11976 (delete-file "astroid/tests/unittest_brain.py")
11977 #t))
11978 (replace 'check
11979 (lambda _
11980 (invoke"python" "-m" "unittest" "discover"
11981 "-p" "unittest*.py")))))))
11982 (native-inputs `())
11983 (propagated-inputs
11984 `(("python2-backports-functools-lru-cache"
11985 ,python2-backports-functools-lru-cache)
11986 ("python2-enum34" ,python2-enum34)
11987 ("python2-singledispatch" ,python2-singledispatch)
11988 ,@(package-propagated-inputs base))))))
11989
11990(define-public python-isort
11991 (package
11992 (name "python-isort")
e2227b6a 11993 (version "4.3.4")
44d10b1f
RW
11994 (source
11995 (origin
e2227b6a
EF
11996 (method git-fetch)
11997 (uri (git-reference
11998 ;; Tests pass only from the Github sources
11999 (url "https://github.com/timothycrosley/isort")
12000 (commit version)))
12001 (file-name (git-file-name name version))
44d10b1f
RW
12002 (sha256
12003 (base32
e2227b6a 12004 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
44d10b1f
RW
12005 (build-system python-build-system)
12006 (native-inputs
12007 `(("python-mock" ,python-mock)
12008 ("python-pytest" ,python-pytest)))
12009 (home-page "https://github.com/timothycrosley/isort")
12010 (synopsis "Python utility/library to sort python imports")
12011 (description "@code{python-isort} is a python utility/library to sort
12012imports alphabetically, and automatically separated into sections. It
12013provides a command line utility, a python library and plugins for various
12014editors.")
e2227b6a
EF
12015 (license license:expat)
12016 (properties `((python2-variant . ,(delay python2-isort))))))
44d10b1f
RW
12017
12018(define-public python2-isort
e2227b6a
EF
12019 (let ((base (package-with-python2
12020 (strip-python2-variant python-isort))))
12021 (package (inherit base)
12022 (native-inputs
12023 `(("python2-futures" ,python2-futures)
12024 ,@(package-native-inputs base))))))
44d10b1f
RW
12025
12026(define-public python2-backports-functools-lru-cache
12027 (package
12028 (name "python2-backports-functools-lru-cache")
12029 (version "1.5")
12030 (source
12031 (origin
12032 (method url-fetch)
12033 ;; only the pypi tarballs contain the necessary metadata
12034 (uri (pypi-uri "backports.functools_lru_cache" version))
12035 (sha256
12036 (base32
12037 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
12038 (build-system python-build-system)
12039 (native-inputs
12040 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
12041 (arguments
12042 `(#:python ,python-2))
12043 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
12044 (synopsis "Backport of functools.lru_cache from Python 3.3")
12045 (description "@code{python2-backports-functools-lru-cache} is a backport
12046of @code{functools.lru_cache} from python 3.3.")
12047 (license license:expat)))
12048
12049(define-public python-configparser
12050 (package
12051 (name "python-configparser")
12052 (version "3.5.0")
12053 (source
12054 (origin
12055 (method url-fetch)
12056 (uri (string-append
12057 "https://bitbucket.org/ambv/configparser/get/"
12058 version ".tar.bz2"))
12059 (file-name (string-append name "-" version ".tar.gz"))
12060 (sha256
12061 (base32
12062 "0waq40as14abwzbb321hfz4vr1fi363nscy32ga14qvfygrg96wa"))))
12063 (build-system python-build-system)
809f003f 12064 (home-page "https://github.com/jaraco/configparser/")
44d10b1f
RW
12065 (synopsis "Backport of configparser from python 3.5")
12066 (description "@code{python-configparser} is a backport of
12067@code{configparser} from Python 3.5 so that it can be used directly
12068in other versions.")
12069 (license license:expat)))
12070
12071(define-public python2-configparser
12072 (package-with-python2 python-configparser))
12073
12074(define-public python-mando
12075 (package
12076 (name "python-mando")
12077 (version "0.6.4")
12078 (source (origin
12079 (method url-fetch)
12080 (uri (pypi-uri "mando" version))
12081 (sha256
12082 (base32
12083 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
12084 (build-system python-build-system)
12085 (propagated-inputs
12086 `(("python-rst2ansi" ,python-rst2ansi)
12087 ("python-six" ,python-six)))
12088 (native-inputs
12089 `(("python-pytest" ,python-pytest)))
12090 (home-page "https://mando.readthedocs.org/")
12091 (synopsis
12092 "Wrapper around argparse, allowing creation of complete CLI applications")
12093 (description
12094 "This package is a wrapper around argparse, allowing you to write complete CLI
12095applications in seconds while maintaining all the flexibility.")
12096 (license license:expat)))
12097
12098(define-public python2-mando
12099 (package-with-python2 python-mando))
12100
70daf82f
RW
12101(define-public python2-argparse
12102 (package
12103 (name "python2-argparse")
12104 (version "1.4.0")
12105 (source
12106 (origin
12107 (method url-fetch)
12108 (uri (pypi-uri "argparse" version))
12109 (sha256
12110 (base32
12111 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
12112 (build-system python-build-system)
12113 (arguments
12114 `(#:python ,python-2))
12115 (home-page "https://github.com/ThomasWaldmann/argparse/")
12116 (synopsis "Python command-line parsing library")
12117 (description
12118 "This package is mostly for people who want to have @code{argparse} on
12119older Pythons because it was not part of the standard library back then.")
12120 (license license:psfl)))
12121
44d10b1f
RW
12122(define-public python-fudge
12123 (package
12124 (name "python-fudge")
12125 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
12126 ;; package, which is currently the only use of this package.
12127 (version "0.9.6")
12128 (source
12129 (origin
12130 (method url-fetch)
12131 (uri (pypi-uri "fudge" version))
12132 (sha256
12133 (base32
12134 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
12135 (build-system python-build-system)
12136 (arguments
12137 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
12138 (home-page "https://github.com/fudge-py/fudge")
12139 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
12140 (description
12141 "Fudge is a Python module for using fake objects (mocks and stubs) to
12142test real ones.
12143
12144In readable Python code, you declare the methods available on your fake object
12145and how they should be called. Then you inject that into your application and
12146start testing. This declarative approach means you don’t have to record and
12147playback actions and you don’t have to inspect your fakes after running code.
12148If the fake object was used incorrectly then you’ll see an informative
12149exception message with a traceback that points to the culprit.")
12150 (license license:expat)))
12151
12152(define-public python2-fudge
12153 (package-with-python2 python-fudge))
12154
12155(define-public python-mwclient
12156 (package
12157 (name "python-mwclient")
12158 (version "0.8.4")
12159 (source
12160 (origin
12161 (method url-fetch)
12162 ;; The PyPI version wouldn't contain tests.
12163 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
12164 "v" version ".tar.gz"))
12165 (file-name (string-append name "-" version ".tar.gz"))
12166 (sha256
12167 (base32
12168 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
12169 (build-system python-build-system)
12170 (propagated-inputs
12171 `(("python-requests" ,python-requests)
12172 ("python-requests-oauthlib"
12173 ,python-requests-oauthlib)
12174 ("python-six" ,python-six)))
12175 (native-inputs
12176 `(("python-mock" ,python-mock)
12177 ("python-pytest" ,python-pytest)
12178 ("python-pytest-pep8" ,python-pytest-pep8)
12179 ("python-pytest-cache" ,python-pytest-cache)
12180 ("python-pytest-cov" ,python-pytest-cov)
12181 ("python-responses" ,python-responses)))
12182 (home-page "https://github.com/btongminh/mwclient")
12183 (synopsis "MediaWiki API client")
12184 (description "This package provides a MediaWiki API client.")
12185 (license license:expat)))
12186
12187(define-public python2-mwclient
12188 (package-with-python2 python-mwclient))
12189
12190(define-public python-utils
12191 (package
12192 (name "python-utils")
12193 (version "2.1.0")
12194 (source (origin
12195 (method url-fetch)
12196 (uri (pypi-uri "python-utils" version))
12197 (sha256
12198 (base32
12199 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
12200 (build-system python-build-system)
12201 (native-inputs
12202 `(("pytest-runner" ,python-pytest-runner)
12203 ("pytest" ,python-pytest)
12204 ("six" ,python-six)))
12205 (home-page "https://github.com/WoLpH/python-utils")
12206 (synopsis "Convenient utilities not included with the standard Python install")
12207 (description
12208 "Python Utils is a collection of small Python functions and classes which
12209make common patterns shorter and easier.")
12210 (license license:bsd-2)))
12211
12212(define-public python2-utils
12213 (package-with-python2 python-utils))
12214
12215(define-public python-sphinx-me
12216 (package
12217 (name "python-sphinx-me")
12218 (version "0.3")
12219 (source
12220 (origin
12221 (method url-fetch)
12222 (uri (pypi-uri "sphinx-me" version))
12223 (sha256
12224 (base32
12225 "06jzgp213zihnvpcy2y5jy3ykid3apc2ncp2pg6a2g05lhiziglq"))))
12226 (build-system python-build-system)
12227 (home-page "https://github.com/stephenmcd/sphinx-me")
12228 (synopsis "Create a Sphinx documentation shell")
12229 (description
12230 "Create a Sphinx documentation shell for your project and include the
12231README file as the documentation index. It handles extracting the required
12232meta data such as the project name, author and version from your project for
12233use in your Sphinx docs.")
12234 (license license:bsd-2)))
12235
12236(define-public python2-sphinx-me
12237 (package-with-python2 python-sphinx-me))
12238
12239(define-public python-diff-match-patch
12240 (package
12241 (name "python-diff-match-patch")
12242 (version "20121119")
12243 (source
12244 (origin
12245 (method url-fetch)
12246 (uri (pypi-uri "diff-match-patch" version))
12247 (sha256
12248 (base32
12249 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
12250 (build-system python-build-system)
12251 (home-page "https://code.google.com/p/google-diff-match-patch")
12252 (synopsis "Synchronize plain text")
12253 (description "Diff Match and Patch libraries offer robust algorithms to
12254perform the operations required for synchronizing plain text.")
12255 (license license:asl2.0)))
12256
12257(define-public python2-diff-match-patch
12258 (package-with-python2 python-diff-match-patch))
12259
12260(define-public python-dirsync
12261 (package
12262 (name "python-dirsync")
12263 (version "2.2.3")
12264 (source
12265 (origin
12266 (method url-fetch)
12267 (uri (pypi-uri "dirsync" version))
12268 (sha256
12269 (base32
12270 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
12271 (build-system python-build-system)
12272 (propagated-inputs
12273 `(("six" ,python-six)))
12274 (home-page "https://bitbucket.org/tkhyn/dirsync")
12275 (synopsis "Advanced directory tree synchronisation tool")
12276 (description "Advanced directory tree synchronisation tool.")
12277 (license license:expat)))
12278
12279(define-public python2-dirsync
12280 (package-with-python2 python-dirsync))
12281
12282(define-public python-levenshtein
12283 (package
12284 (name "python-levenshtein")
12285 (version "0.12.0")
12286 (source
12287 (origin
12288 (method url-fetch)
12289 (uri (pypi-uri "python-Levenshtein" version))
12290 (sha256
12291 (base32
12292 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
12293 (build-system python-build-system)
12294 (home-page "https://github.com/ztane/python-Levenshtein")
12295 (synopsis "Fast computation of Levenshtein distance and string similarity")
12296 (description
12297 "The Levenshtein Python C extension module contains functions for fast computation of
12298@enumerate
12299@item Levenshtein (edit) distance, and edit operations
12300@item string similarity
12301@item approximate median strings, and generally string averaging
12302@item string sequence and set similarity
12303@end enumerate
12304It supports both normal and Unicode strings.")
12305 (license license:gpl2+)))
12306
12307(define-public python2-levenshtein
12308 (package-with-python2 python-levenshtein))
12309
12310(define-public python-scandir
12311 (package
12312 (name "python-scandir")
12313 (version "1.9.0")
12314 (source
12315 (origin
12316 (method url-fetch)
12317 (uri (pypi-uri "scandir" version))
12318 (sha256
12319 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
12320 (build-system python-build-system)
12321 (arguments
12322 `(#:phases (modify-phases %standard-phases
12323 (replace 'check
12324 (lambda _
12325 (invoke "python" "test/run_tests.py"))))))
12326 (home-page "https://github.com/benhoyt/scandir")
12327 (synopsis "Directory iteration function")
12328 (description
12329 "Directory iteration function like os.listdir(), except that instead of
12330returning a list of bare filenames, it yields DirEntry objects that include
12331file type and stat information along with the name. Using scandir() increases
12332the speed of os.walk() by 2-20 times (depending on the platform and file
12333system) by avoiding unnecessary calls to os.stat() in most cases.
12334
12335This package is part of the Python standard library since version 3.5.")
12336 (license license:bsd-3)))
12337
12338(define-public python2-scandir
12339 (package-with-python2 python-scandir))
12340
12341(define-public python2-stemming
12342 (package
12343 (name "python2-stemming")
12344 (version "1.0.1")
12345 (source
12346 (origin
12347 (method url-fetch)
12348 (uri (pypi-uri "stemming" version))
12349 (sha256
12350 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
12351 (build-system python-build-system)
12352 (arguments
12353 `(#:python ,python-2))
12354 (home-page "https://bitbucket.org/mchaput/stemming/overview")
12355 (synopsis "Python implementations of various stemming algorithms")
12356 (description
12357 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
12358stemming algorithms for English. These implementations are straightforward and
12359efficient, unlike some Python versions of the same algorithms available on the
12360Web. This package is an extraction of the stemming code included in the Whoosh
12361search engine.")
12362 (license license:public-domain)))
12363
12364(define-public python-factory-boy
12365 (package
12366 (name "python-factory-boy")
12367 (version "2.8.1")
12368 (source
12369 (origin
12370 (method url-fetch)
12371 (uri (pypi-uri "factory_boy" version))
12372 (sha256
12373 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
12374 (build-system python-build-system)
12375 (arguments
12376 ;; Tests are not included in the tarball.
12377 `(#:tests? #f))
12378 (propagated-inputs
12379 `(("faker" ,python-faker)))
12380 (home-page "https://github.com/benhoyt/scandir")
12381 (synopsis "Versatile test fixtures replacement")
12382 (description
12383 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
12384
12385As a fixtures replacement tool, it aims to replace static, hard to maintain
12386fixtures with easy-to-use factories for complex object.
12387
12388Instead of building an exhaustive test setup with every possible combination
12389of corner cases, factory_boy allows you to use objects customized for the
12390current test, while only declaring the test-specific fields")
12391 (license license:expat)))
12392
12393(define-public python2-factory-boy
12394 (package-with-python2 python-factory-boy))
12395
12396(define-public python-translate-toolkit
12397 (package
12398 (name "python-translate-toolkit")
12399 (version "2.1.0")
12400 (source
12401 (origin
12402 (method url-fetch)
12403 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
12404 (sha256
12405 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
12406 (build-system python-build-system)
12407 (native-inputs
12408 `(("python-pytest" ,python-pytest)
12409 ("python-sphinx" ,python-sphinx)))
12410 (propagated-inputs
12411 `(("python-babel" ,python-babel)
12412 ("python-beautifulsoup4" ,python-beautifulsoup4)
12413 ("python-chardet" ,python-chardet)
12414 ("python-diff-match-patch" ,python-diff-match-patch)
12415 ("python-levenshtein" ,python-levenshtein)
12416 ("python-lxml" ,python-lxml)
12417 ("python-six" ,python-six)
12418 ("python-vobject" ,python-vobject)
12419 ("python-pyyaml" ,python-pyyaml)))
12420 (arguments
12421 ;; TODO: tests are not run, because they end with
12422 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
12423 ;; 'parse_funcs'
12424 ;; during test setup.
12425 `(#:tests? #f))
12426 (home-page "http://toolkit.translatehouse.org")
12427 (synopsis "Tools and API for translation and localization engineering")
12428 (description
12429 "Tools and API for translation and localization engineering. It contains
12430several utilities, as well as an API for building localization tools.")
12431 (license license:gpl2+)))
12432
12433(define-public python2-translate-toolkit
12434 (package-with-python2 python-translate-toolkit))
12435
12436(define-public python-packaging
12437 (package
12438 (name "python-packaging")
12439 (version "18.0")
12440 (source
12441 (origin
12442 (method url-fetch)
12443 (uri (pypi-uri "packaging" version))
12444 (sha256
12445 (base32
12446 "01wq9c53ix5rz6qg2c98gy8n4ff768rmanifm8m5jpjiaizj51h8"))))
12447 (build-system python-build-system)
12448 (arguments
12449 `(#:phases (modify-phases %standard-phases
12450 (replace 'check
12451 (lambda _ (invoke "py.test" "-vv"))))))
12452 (native-inputs
12453 `(("python-pretend" ,python-pretend)
12454 ("python-pytest" ,python-pytest)))
12455 (propagated-inputs
12456 `(("python-pyparsing" ,python-pyparsing)
12457 ("python-six" ,python-six)))
12458 (home-page "https://github.com/pypa/packaging")
12459 (synopsis "Core utilities for Python packages")
12460 (description "Packaging is a Python module for dealing with Python packages.
12461It offers an interface for working with package versions, names, and dependency
12462information.")
12463 ;; From 'LICENSE': This software is made available under the terms of
12464 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
12465 ;; Contributions to this software is made under the terms of *both* these
12466 ;; licenses.
12467 (license (list license:asl2.0 license:bsd-2))))
12468
12469(define-public python2-packaging
12470 (package-with-python2 python-packaging))
12471
12472(define-public python-relatorio
12473 (package
12474 (name "python-relatorio")
12475 (version "0.8.0")
12476 (source
12477 (origin
12478 (method url-fetch)
12479 (uri (pypi-uri "relatorio" version))
12480 (sha256
12481 (base32
12482 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
12483 (build-system python-build-system)
12484 (propagated-inputs
12485 `(("python-lxml" ,python-lxml)
12486 ("python-genshi" ,python-genshi)))
12487 (native-inputs
12488 `(("python-magic" ,python-magic)))
12489 (home-page "https://relatorio.tryton.org/")
12490 (synopsis "Templating library able to output ODT and PDF files")
12491 (description "Relatorio is a templating library which provides a way to
12492easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
12493for more filetypes can be easily added by creating plugins for them.")
12494 (license license:gpl3+)))
12495
12496(define-public python2-relatorio
12497 (package-with-python2 python-relatorio))
12498
12499(define-public python-radon
12500 (package
12501 (name "python-radon")
12502 (version "2.2.0")
12503 (source
12504 (origin
12505 (method url-fetch)
12506 (uri (pypi-uri "radon" version))
12507 (sha256
12508 (base32
12509 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
12510 (build-system python-build-system)
12511 (arguments
12512 `(#:phases (modify-phases %standard-phases
12513 (replace 'check
12514 (lambda _
12515 (invoke "python" "radon/tests/run.py"))))))
12516 (propagated-inputs
12517 `(("python-colorama" ,python-colorama)
12518 ("python-flake8-polyfill" ,python-flake8-polyfill)
12519 ("python-mando" ,python-mando)))
12520 (native-inputs
12521 `(("python-pytest" ,python-pytest)
12522 ("python-pytest-mock" ,python-pytest-mock)))
12523 (home-page "https://radon.readthedocs.org/")
12524 (synopsis "Code Metrics in Python")
12525 (description "Radon is a Python tool which computes various code metrics.
12526Supported metrics are:
12527@itemize @bullet
12528@item raw metrics: SLOC, comment lines, blank lines, &c.
12529@item Cyclomatic Complexity (i.e. McCabe’s Complexity)
12530@item Halstead metrics (all of them)
12531@item the Maintainability Index (a Visual Studio metric)
12532@end itemize")
12533 (license license:expat)))
12534
12535(define-public python2-radon
12536 (package-with-python2 python-radon))
12537
12538(define-public python-sure
12539 (package
12540 (name "python-sure")
12541 (version "1.4.11")
12542 (source
12543 (origin
12544 (method url-fetch)
12545 (uri (pypi-uri "sure" version))
12546 (sha256
12547 (base32
12548 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
12549 (build-system python-build-system)
12550 (propagated-inputs
12551 `(("python-mock" ,python-mock)
12552 ("python-six" ,python-six)))
12553 (native-inputs
12554 `(("python-nose" ,python-nose)))
12555 (home-page "https://github.com/gabrielfalcao/sure")
12556 (synopsis "Automated testing library in python for python")
12557 (description
12558 "Sure is a python library that leverages a DSL for writing assertions.
12559Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
12560 (license license:gpl3+)))
12561
12562(define-public python2-sure
12563 (package-with-python2 python-sure))
12564
12565(define-public python2-couleur
12566 ;; This package does not seem to support python3 at all, hence,
12567 ;; only the python2 variant definition is provided.
12568 (package
12569 (name "python2-couleur")
12570 (version "0.6.2")
12571 (source
12572 (origin
12573 (method url-fetch)
12574 (uri (pypi-uri "couleur" version))
12575 (sha256
12576 (base32
12577 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
12578 (build-system python-build-system)
12579 (arguments
12580 `(#:python ,python-2))
12581 (home-page "https://github.com/gabrielfalcao/couleur")
12582 (synopsis
12583 "ANSI terminal tool for python, colored shell and other handy fancy features")
12584 (description
12585 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
12586terminal such as coloured output in the shell, overwriting output, indentation, etc.")
12587 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
12588 ;; https://github.com/gabrielfalcao/couleur/issues/11
12589 (license license:lgpl3+)))
12590
12591(define-public python-misaka
12592 (package
12593 (name "python-misaka")
0dcb3412 12594 (version "2.1.1")
44d10b1f
RW
12595 (source
12596 (origin
12597 (method url-fetch)
12598 (uri (pypi-uri "misaka" version))
12599 (sha256
12600 (base32
0dcb3412 12601 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
44d10b1f
RW
12602 (build-system python-build-system)
12603 (arguments
12604 `(;; Line 37 of setup.py calls self.run_command('develop')
12605 ;; in the 'check' phase. This command seems to be trying
12606 ;; to write to
12607 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
12608 ;; for which it does not have the permission to write.
12609 #:tests? #f))
12610 (propagated-inputs
12611 `(("python-cffi" ,python-cffi)))
12612 (home-page "https://github.com/FSX/misaka")
12613 (synopsis "Python binding for Hoedown")
12614 (description
12615 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
12616library written in C. It features a fast HTML renderer and functionality to make custom
12617renderers (e.g. man pages or LaTeX).")
12618 (license license:expat)))
12619
12620(define-public python2-misaka
12621 (package-with-python2 python-misaka))
12622
12623(define-public python2-steadymark
12624 ;; This is forced into being a python2 only variant
12625 ;; due to its dependence on couleur that has no support
12626 ;; for python3
12627 (package
12628 (name "python2-steadymark")
12629 (version "0.7.3")
12630 (source
12631 (origin
12632 (method url-fetch)
12633 (uri (pypi-uri "steadymark" version))
12634 (sha256
12635 (base32
12636 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
12637 (build-system python-build-system)
12638 (native-inputs
12639 `(("python-couleur" ,python2-couleur)
12640 ("python-sure" ,python2-sure)
12641 ("python-misaka" ,python2-misaka)))
12642 (arguments
12643 `(#:python ,python-2
12644 #:phases
12645 (modify-phases %standard-phases
12646 (add-before 'build 'patch-setup-py
12647 (lambda _
12648 ;; Update requirements from dependency==version
12649 ;; to dependency>=version
12650 (substitute* "setup.py"
12651 (("==") ">="))
12652 #t)))))
12653 (home-page "https://github.com/gabrielfalcao/steadymark")
12654 (synopsis "Markdown-based test runner for python")
12655 (description
12656 "@code{Steadymark} allows documentation to be written in github-flavoured
12657markdown. The documentation may contain snippets of code surrounded by python
12658code blocks and @code{Steadymark} will find these snippets and run them, making
12659sure that there are no old malfunctional examples in the documentation examples.")
12660 (license license:expat)))
12661
12662(define-public python-jsonpointer
12663 (package
12664 (name "python-jsonpointer")
12665 (version "1.10")
12666 (source
12667 (origin
12668 (method url-fetch)
12669 (uri (pypi-uri "jsonpointer" version))
12670 (sha256
12671 (base32
12672 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
12673 (build-system python-build-system)
12674 (home-page "https://github.com/stefankoegl/python-json-pointer")
12675 (synopsis "Identify specific nodes in a JSON document")
12676 (description "@code{jsonpointer} allows you to access specific nodes
12677by path in a JSON document (see RFC 6901).")
12678 (license license:bsd-3)))
12679
12680(define-public python2-jsonpointer
12681 (package-with-python2 python-jsonpointer))
12682
12683(define-public python-jsonpatch
12684 (package
12685 (name "python-jsonpatch")
12686 (version "1.16")
12687 (source
12688 (origin
12689 (method url-fetch)
12690 ;; pypi version lacks tests.js
12691 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12692 "archive/v" version ".tar.gz"))
12693 (file-name (string-append name "-" version ".tar.gz"))
12694 (sha256
12695 (base32
12696 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
12697 (build-system python-build-system)
12698 (native-inputs
12699 `(("python-jsonpointer" ,python-jsonpointer)))
12700 (home-page "https://github.com/stefankoegl/python-json-patch")
12701 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
12702 (description "@code{jsonpatch} is a library and program that allows
12703applying JSON Patches according to RFC 6902.")
12704 (license license:bsd-3)))
12705
12706(define-public python2-jsonpatch
12707 (package-with-python2 python-jsonpatch))
12708
12709(define-public python-jsonpatch-0.4
12710 (package (inherit python-jsonpatch)
12711 (name "python-jsonpatch")
12712 (version "0.4")
12713 (source
12714 (origin
12715 (method url-fetch)
12716 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12717 "archive/v" version ".tar.gz"))
12718 (file-name (string-append name "-" version ".tar.gz"))
12719 (sha256
12720 (base32
12721 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
12722
12723(define-public python2-jsonpatch-0.4
12724 (package-with-python2 python-jsonpatch-0.4))
12725
12726(define-public python-rfc3986
12727 (package
12728 (name "python-rfc3986")
12729 (version "1.1.0")
12730 (source (origin
12731 (method url-fetch)
12732 (uri (pypi-uri "rfc3986" version))
12733 (sha256
12734 (base32
12735 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
12736 (build-system python-build-system)
12737 (arguments
12738 `(#:modules ((guix build utils)
12739 (guix build python-build-system)
12740 (ice-9 ftw)
12741 (srfi srfi-1)
12742 (srfi srfi-26))
12743 #:phases
12744 (modify-phases %standard-phases
12745 (replace 'check
12746 (lambda _
12747 (let ((cwd (getcwd)))
12748 (setenv "PYTHONPATH"
12749 (string-append cwd "/build/"
12750 (find (cut string-prefix? "lib" <>)
12751 (scandir (string-append cwd "/build")))
12752 ":"
12753 (getenv "PYTHONPATH")))
12754 (invoke "pytest" "-v")))))))
12755 (native-inputs
12756 `(("python-pytest" ,python-pytest)))
12757 (home-page "https://rfc3986.readthedocs.io/")
12758 (synopsis "Parse and validate URI references")
12759 (description
12760 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
12761validation and authority parsing. This module also supports RFC@tie{}6874
12762which adds support for zone identifiers to IPv6 addresses.")
12763 (license license:asl2.0)))
12764
12765(define-public python2-rfc3986
12766 (package-with-python2 python-rfc3986))
12767
12768(define-public python-rfc3987
12769 (package
12770 (name "python-rfc3987")
12771 (version "1.3.7")
12772 (source
12773 (origin
12774 (method url-fetch)
12775 (uri (pypi-uri "rfc3987" version))
12776 (sha256
12777 (base32
12778 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
12779 (build-system python-build-system)
12780 (home-page "https://pypi.python.org/pypi/rfc3987")
12781 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
12782 (description "@code{rfc3987} provides routines for parsing and
12783validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
12784 (license license:gpl3+)))
12785
12786(define-public python2-rfc3987
12787 (package-with-python2 python-rfc3987))
12788
12789(define-public python-validate-email
12790 (package
12791 (name "python-validate-email")
12792 (version "1.3")
12793 (source
12794 (origin
12795 (method url-fetch)
12796 (uri (pypi-uri "validate_email" version))
12797 (sha256
12798 (base32
12799 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
12800 (build-system python-build-system)
12801 (home-page "https://github.com/syrusakbary/validate_email")
12802 (synopsis "Verifies if an email address is valid and really exists")
12803 (description "@code{validate_email} can be used to verify if an email
12804address is valid and really exists.")
12805 (license license:lgpl3+)))
12806
12807(define-public python2-validate-email
12808 (package-with-python2 python-validate-email))
12809
12810(define-public python-flex
12811 (package
12812 (name "python-flex")
12813 (version "6.10.0")
12814 (source
12815 (origin
12816 (method url-fetch)
12817 (uri (pypi-uri "flex" version))
12818 (sha256
12819 (base32
12820 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
12821 (build-system python-build-system)
12822 (propagated-inputs
12823 `(("python-click" ,python-click)
12824 ("python-iso8601" ,python-iso8601)
12825 ("python-jsonpointer" ,python-jsonpointer)
12826 ("python-pyyaml" ,python-pyyaml)
12827 ("python-requests" ,python-requests)
12828 ("python-rfc3987" ,python-rfc3987)
12829 ("python-six" ,python-six)
12830 ("python-validate-email" ,python-validate-email)))
12831 (home-page "https://github.com/pipermerriam/flex")
12832 (synopsis "Validates Swagger schemata")
12833 (description "@code{flex} can be used to validate Swagger schemata.")
12834 (license license:bsd-3)))
12835
12836(define-public python2-flex
12837 (package-with-python2 python-flex))
12838
12839(define-public python-marshmallow
12840 (package
12841 (name "python-marshmallow")
12842 (version "3.0.0b14")
12843 (source
12844 (origin
12845 (method url-fetch)
12846 (uri (pypi-uri "marshmallow" version))
12847 (sha256
12848 (base32
12849 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
12850 (build-system python-build-system)
12851 (propagated-inputs
12852 `(("python-dateutil" ,python-dateutil)
12853 ("python-simplejson" ,python-simplejson)))
12854 (native-inputs
12855 `(("python-pytest" ,python-pytest)
12856 ("python-pytz" ,python-pytz)))
12857 (home-page "https://github.com/marshmallow-code/marshmallow")
12858 (synopsis "Convert complex datatypes to and from native
12859Python datatypes.")
12860 (description "@code{marshmallow} provides a library for converting
12861complex datatypes to and from native Python datatypes.")
12862 (license license:expat)))
12863
12864(define-public python2-marshmallow
12865 (package-with-python2 python-marshmallow))
12866
12867(define-public python-apispec
12868 (package
12869 (name "python-apispec")
12870 (version "0.25.3")
12871 (source
12872 (origin
12873 (method url-fetch)
12874 (uri (pypi-uri "apispec" version))
12875 (sha256
12876 (base32
12877 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
12878 (build-system python-build-system)
12879 (propagated-inputs
12880 `(("python-pyyaml" ,python-pyyaml)))
12881 (native-inputs
12882 `(("python-pytest" ,python-pytest)
12883 ("python-flask" ,python-flask)
12884 ("python-marshmallow" ,python-marshmallow)
12885 ("python-tornado" ,python-tornado)
12886 ("python-bottle" ,python-bottle)
12887 ("python-mock" ,python-mock)))
12888 (home-page "https://github.com/marshmallow-code/apispec")
12889 (synopsis "Swagger 2.0 API specification generator")
12890 (description "@code{python-apispec} is a pluggable API specification
12891generator. Currently supports the OpenAPI specification (f.k.a.
12892Swagger 2.0).")
12893 (license license:expat)))
12894
12895(define-public python2-apispec
12896 (package-with-python2 python-apispec))
12897
12898(define-public python-flasgger
12899 (package
12900 (name "python-flasgger")
12901 (version "0.6.3")
12902 (source
12903 (origin
1a04d421
TGR
12904 (method git-fetch)
12905 (uri (git-reference
12906 (url "https://github.com/rochacbruno/flasgger.git")
12907 (commit version)))
12908 (file-name (git-file-name name version))
44d10b1f 12909 (sha256
1a04d421 12910 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
44d10b1f
RW
12911 (build-system python-build-system)
12912 (arguments
12913 `(#:phases
12914 (modify-phases %standard-phases
12915 (replace 'check
12916 (lambda* (#:key inputs outputs #:allow-other-keys)
12917 (substitute* "Makefile"
12918 (("flake8 flasgger --ignore=F403")
12919 "flake8 flasgger --ignore=E731,F403"))
12920 (setenv "PYTHONPATH" (string-append (getcwd)
12921 ":"
12922 (getenv "PYTHONPATH")))
ac599a09 12923 (invoke "py.test"))))))
44d10b1f
RW
12924 (propagated-inputs
12925 `(("python-flask" ,python-flask)
12926 ("python-pyyaml" ,python-pyyaml)
12927 ("python-jsonschema" ,python-jsonschema)
12928 ("python-mistune" ,python-mistune)
12929 ("python-six" ,python-six)))
12930 (native-inputs
12931 `(("python-decorator" ,python-decorator)
12932 ("python-flake8" ,python-flake8)
12933 ("python-flask-restful" ,python-flask-restful)
12934 ("python-flex" ,python-flex)
12935 ("python-pytest" ,python-pytest)
12936 ("python-pytest-cov" ,python-pytest-cov)
12937 ("python-marshmallow" ,python-marshmallow)
12938 ("python-apispec" ,python-apispec)))
12939 (home-page "https://github.com/rochacbruno/flasgger/")
12940 (synopsis "Extract Swagger specs from your Flask project")
12941 (description "@code{python-flasgger} allows extracting Swagger specs
12942from your Flask project. It is a fork of Flask-Swagger.")
12943 (license license:expat)))
12944
12945(define-public python2-flasgger
12946 (package-with-python2 python-flasgger))
12947
12948(define-public python-swagger-spec-validator
12949 (package
12950 (name "python-swagger-spec-validator")
12951 (version "2.1.0")
12952 (source
12953 (origin
12954 (method url-fetch)
12955 (uri (pypi-uri "swagger-spec-validator" version))
12956 (sha256
12957 (base32
12958 "13hkpn2lycwr0468yqhjb3kwszqf7hjwlq61w7vdxq1caz31k4nw"))))
12959 (build-system python-build-system)
12960 (propagated-inputs
12961 `(("python-jsonschema" ,python-jsonschema)
12962 ("python-six" ,python-six)))
12963 (home-page
12964 "https://github.com/Yelp/swagger_spec_validator")
12965 (synopsis "Validation of Swagger specifications")
12966 (description "@code{swagger_spec_validator} provides a library for
12967validating Swagger API specifications.")
12968 (license license:asl2.0)))
12969
12970(define-public python2-swagger-spec-validator
12971 (package-with-python2 python-swagger-spec-validator))
12972
12973(define-public python-apache-libcloud
12974 (package
12975 (name "python-apache-libcloud")
12976 (version "2.4.0")
12977 (source
12978 (origin
12979 (method url-fetch)
12980 (uri (pypi-uri "apache-libcloud" version))
12981 (sha256
12982 (base32
12983 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
12984 (build-system python-build-system)
12985 (arguments
12986 `(#:phases
12987 (modify-phases %standard-phases
12988 (add-after 'unpack 'patch-ssh
12989 (lambda* (#:key inputs #:allow-other-keys)
12990 (substitute* "libcloud/compute/ssh.py"
12991 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
12992 "/bin/ssh" "'")))
12993 #t))
12994 (add-after 'unpack 'patch-tests
12995 (lambda _
12996 (substitute* "./libcloud/test/test_file_fixtures.py"
12997 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
12998 (("def _ascii") "def _raw_data(self, method, url, body, headers):
12999 return (httplib.OK,
13000 \"1234abcd\",
13001 {\"test\": \"value\"},
13002 httplib.responses[httplib.OK])
13003 def _ascii"))
13004 (substitute* "libcloud/test/compute/test_ssh_client.py"
13005 (("class ShellOutSSHClientTests")
13006 "@unittest.skip(\"Guix container doesn't have ssh service\")
13007class ShellOutSSHClientTests")
13008 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
13009 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
13010 (("'.xF0', '.x90', '.x8D', '.x88'")
13011 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
13012 #t))
13013 (add-before 'check 'copy-secret
13014 (lambda _
13015 (copy-file "libcloud/test/secrets.py-dist"
13016 "libcloud/test/secrets.py")
13017 #t)))))
13018 (inputs
13019 `(("openssh" ,openssh)))
13020 (propagated-inputs
13021 `(("python-paramiko" ,python-paramiko)
13022 ("python-requests" ,python-requests)))
13023 (native-inputs
13024 `(("python-lockfile" ,python-lockfile)
13025 ("python-mock" ,python-mock)
13026 ("python-pytest" ,python-pytest)
13027 ("python-pytest-runner" ,python-pytest-runner)
13028 ("python-requests-mock" ,python-requests-mock)))
13029 (home-page "https://libcloud.apache.org/")
13030 (synopsis "Unified Cloud API")
13031 (description "@code{libcloud} is a Python library for interacting with
13032many of the popular cloud service providers using a unified API.")
13033 (license license:asl2.0)))
13034
13035(define-public python2-apache-libcloud
13036 (package-with-python2 python-apache-libcloud))
13037
13038(define-public python-smmap2
13039 (package
13040 (name "python-smmap2")
13041 (version "2.0.3")
13042 (source
13043 (origin
13044 (method url-fetch)
13045 (uri (pypi-uri "smmap2" version))
13046 (sha256
13047 (base32
13048 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
13049 (build-system python-build-system)
13050 (native-inputs
13051 `(("python-nosexcover" ,python-nosexcover)))
13052 (home-page "https://github.com/Byron/smmap")
13053 (synopsis "Python sliding window memory map manager")
13054 (description "@code{smmap2} is a pure Python implementation of a sliding
13055window memory map manager.")
13056 (license license:bsd-3)))
13057
13058(define-public python2-smmap2
13059 (package-with-python2 python-smmap2))
13060
13061(define-public python-regex
13062 (package
13063 (name "python-regex")
13064 (version "2017.06.07")
13065 (source (origin
13066 (method url-fetch)
13067 (uri (pypi-uri "regex" version))
13068 (sha256
13069 (base32
13070 "06r6b7yigikbj3a72whl85r2b64pj1r0ypmw9yalmkm0wnxq8mz4"))))
13071 (build-system python-build-system)
13072 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
13073 (synopsis "Alternative regular expression module")
13074 (description "This regular expression implementation is backwards-
13075compatible with the standard @code{re} module, but offers additional
13076functionality like full case-folding for case-insensitive matches in Unicode.")
13077 (license license:psfl)))
13078
13079(define-public python2-regex
13080 (package-with-python2 python-regex))
13081
13082(define-public python2-pyopengl
13083 (package
13084 (name "python2-pyopengl")
13085 (version "3.1.0")
13086 (source
13087 (origin
13088 (method url-fetch)
13089 (uri (pypi-uri "PyOpenGL" version))
13090 (sha256
13091 (base32
13092 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
13093 (arguments
13094 `(#:python ,python-2))
13095 (build-system python-build-system)
13096 (home-page "http://pyopengl.sourceforge.net")
13097 (synopsis "Standard OpenGL bindings for Python")
13098 (description
13099 "PyOpenGL is the most common cross platform Python binding to OpenGL and
13100related APIs. The binding is created using the standard @code{ctypes}
13101library.")
13102 (license license:bsd-3)))
13103
13104(define-public python2-pyopengl-accelerate
13105 (package
13106 (inherit python2-pyopengl)
13107 (name "python2-pyopengl-accelerate")
13108 (version "3.1.0")
13109 (source
13110 (origin
13111 (method url-fetch)
13112 (uri (pypi-uri "PyOpenGL-accelerate" version))
13113 (sha256
13114 (base32
13115 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
13116 (synopsis "Acceleration code for PyOpenGL")
13117 (description
13118 "This is the Cython-coded accelerator module for PyOpenGL.")))
13119
13120(define-public python-rencode
13121 (package
13122 (name "python-rencode")
13123 (version "1.0.5")
13124 (source
13125 (origin
13126 (method url-fetch)
13127 (uri (pypi-uri "rencode" version))
13128 (sha256
13129 (base32
13130 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
13131 (build-system python-build-system)
13132 (arguments
13133 `(#:phases
13134 (modify-phases %standard-phases
13135 (add-before 'check 'delete-bogus-test
13136 ;; This test requires /home/aresch/Downloads, which is not provided by
13137 ;; the build environment.
13138 (lambda _
13139 (delete-file "rencode/t.py")
13140 #t)))))
13141 (native-inputs `(("pkg-config" ,pkg-config)
13142 ("python-cython" ,python-cython)))
13143 (home-page "https://github.com/aresch/rencode")
13144 (synopsis "Serialization of heterogeneous data structures")
13145 (description
13146 "The @code{rencode} module is a data structure serialization library,
13147similar to @code{bencode} from the BitTorrent project. For complex,
13148heterogeneous data structures with many small elements, r-encoding stake up
13149significantly less space than b-encodings. This version of rencode is a
13150complete rewrite in Cython to attempt to increase the performance over the
13151pure Python module.")
13152 (license license:bsd-3)))
13153
13154(define-public python2-rencode
13155 (package-with-python2 python-rencode))
13156
13157(define-public python-xenon
13158 (package
13159 (name "python-xenon")
13160 (version "0.5.4")
13161 (source
13162 (origin
13163 (method url-fetch)
13164 (uri (pypi-uri "xenon" version))
13165 (sha256
13166 (base32
13167 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
13168 (build-system python-build-system)
13169 (native-inputs
13170 `(("python-pyyaml" ,python-pyyaml)
13171 ("python-radon" ,python-radon)
13172 ("python-requests" ,python-requests)
13173 ("python-flake8" ,python-flake8)
13174 ("python-tox" ,python-tox)))
13175 (arguments
13176 `(#:phases
13177 (modify-phases %standard-phases
13178 (add-before 'build 'patch-test-requirements
13179 (lambda _
13180 ;; Remove httpretty dependency for tests.
13181 (substitute* "setup.py"
13182 (("httpretty") ""))
13183 #t)))))
13184 (home-page "https://xenon.readthedocs.org/")
13185 (synopsis "Monitor code metrics for Python on your CI server")
13186 (description
13187 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
13188Ideally, @code{xenon} is run every time code is committed. Through command
13189line options, various thresholds can be set for the complexity of code. It
13190will fail (i.e. it will exit with a non-zero exit code) when any of these
13191requirements is not met.")
13192 (license license:expat)))
13193
13194(define-public python2-xenon
13195 (package-with-python2 python-xenon))
13196
13197(define-public python-pysocks
13198 (package
13199 (name "python-pysocks")
13200 (version "1.6.8")
13201 (source
13202 (origin
13203 (method url-fetch)
13204 (uri (pypi-uri "PySocks" version))
13205 (sha256
13206 (base32
13207 "0wn6xafwy9c1gamwljw3fyvih5w19qy9xp39zmv8c90ai5ajrr9z"))))
13208 (build-system python-build-system)
13209 (arguments `(#:tests? #f))
13210 (home-page "https://github.com/Anorov/PySocks")
13211 (synopsis "SOCKS client module")
13212 (description "@code{pysocks} is an updated and semi-actively maintained
13213version of @code{SocksiPy} with bug fixes and extra features.")
13214 (license license:bsd-3)))
13215
13216(define-public python2-pysocks
13217 (package-with-python2 python-pysocks))
13218
13219(define-public python-pydiff
13220 (package
13221 (name "python-pydiff")
13222 (version "0.2")
13223 (source
13224 (origin
13225 (method url-fetch)
13226 (uri (pypi-uri "pydiff" version))
13227 (sha256
13228 (base32
13229 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
13230 (build-system python-build-system)
13231 (home-page "https://github.com/myint/pydiff")
13232 (synopsis "Library to diff two Python files at the bytecode level")
13233 (description
13234 "@code{pydiff} makes it easy to look for actual code changes while
13235ignoring formatting changes.")
13236 (license license:expat)))
13237
13238(define-public python2-pydiff
13239 (package-with-python2 python-pydiff))
13240
13241(define-public python-tqdm
13242 (package
13243 (name "python-tqdm")
13244 (version "4.19.6")
13245 (source
13246 (origin
13247 (method url-fetch)
13248 (uri (pypi-uri "tqdm" version))
13249 (sha256
13250 (base32
13251 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
13252 (build-system python-build-system)
13253 (native-inputs
13254 `(("python-flake8" ,python-flake8)
13255 ("python-nose" ,python-nose)
13256 ("python-coverage" ,python-coverage)))
13257 (home-page "https://github.com/tqdm/tqdm")
13258 (synopsis "Fast, extensible progress meter")
13259 (description
13260 "Make loops show a progress bar on the console by just wrapping any
13261iterable with @code{|tqdm(iterable)|}. Offers many options to define
13262design and layout.")
13263 (license (list license:mpl2.0 license:expat))))
13264
13265(define-public python2-tqdm
13266 (package-with-python2 python-tqdm))
13267
13268(define-public python-pkginfo
13269 (package
13270 (name "python-pkginfo")
13271 (version "1.4.2")
13272 (source
13273 (origin
13274 (method url-fetch)
13275 (uri (pypi-uri "pkginfo" version))
13276 (sha256
13277 (base32
13278 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
13279 (build-system python-build-system)
13280 (arguments
13281 ;; The tests are broken upstream.
13282 '(#:tests? #f))
13283 (home-page
13284 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
13285 (synopsis
13286 "Query metadatdata from sdists, bdists, and installed packages")
13287 (description
13288 "API to query the distutils metadata written in @file{PKG-INFO} inside a
13289source distriubtion (an sdist) or a binary distribution (e.g., created by
13290running bdist_egg). It can also query the EGG-INFO directory of an installed
13291distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
13292created by running @code{python setup.py develop}).")
13293 (license license:expat)))
13294
13295(define-public python2-pkginfo
13296 (package-with-python2 python-pkginfo))
13297
13298(define-public python-twine
13299 (package
13300 (name "python-twine")
13301 (version "1.9.1")
13302 (source
13303 (origin
13304 (method url-fetch)
13305 (uri (pypi-uri "twine" version))
13306 (sha256
13307 (base32
13308 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
13309 (build-system python-build-system)
13310 (propagated-inputs
13311 `(("python-tqdm" ,python-tqdm)
13312 ("python-pkginfo" ,python-pkginfo)
13313 ("python-requests" ,python-requests)
13314 ("python-requests-toolbelt" ,python-requests-toolbelt)))
13315 (home-page "https://github.com/pypa/twine")
13316 (synopsis "Collection of utilities for interacting with PyPI")
13317 (description
13318 "@code{twine} currently supports registering projects and uploading
13319distributions. It authenticates the user over HTTPS, allows them to pre-sign
13320their files and supports any packaging format (including wheels).")
13321 (license license:asl2.0)))
13322
13323(define-public python2-twine
13324 (package-with-python2 python-twine))
13325
13326(define-public python-linecache2
13327 (package
13328 (name "python-linecache2")
13329 (version "1.0.0")
13330 (source
13331 (origin
13332 (method url-fetch)
13333 (uri (pypi-uri "linecache2" version))
13334 (sha256
13335 (base32
13336 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
13337 (build-system python-build-system)
13338 (arguments
13339 `(;; The tests depend on unittest2, and our version is a bit too old.
13340 #:tests? #f))
13341 (native-inputs
13342 `(("python-pbr" ,python-pbr-minimal)))
13343 (home-page
13344 "https://github.com/testing-cabal/linecache2")
13345 (synopsis "Backports of the linecache module")
13346 (description
13347 "The linecache module allows one to get any line from any file, while
13348attempting to optimize internally, using a cache, the common case where many
13349lines are read from a single file.")
13350 (license license:psfl)))
13351
13352(define-public python2-linecache2
13353 (package-with-python2 python-linecache2))
13354
13355(define-public python-traceback2
13356 (package
13357 (name "python-traceback2")
13358 (version "1.4.0")
13359 (source
13360 (origin
13361 (method url-fetch)
13362 (uri (pypi-uri "traceback2" version))
13363 (sha256
13364 (base32
13365 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
13366 (build-system python-build-system)
13367 (arguments
13368 `(;; python-traceback2 and python-unittest2 depend on one another.
13369 #:tests? #f))
13370 (native-inputs
13371 `(("python-pbr" ,python-pbr-minimal)))
13372 (propagated-inputs
13373 `(("python-linecache2" ,python-linecache2)))
13374 (home-page
13375 "https://github.com/testing-cabal/traceback2")
13376 (synopsis "Backports of the traceback module")
13377 (description
13378 "This module provides a standard interface to extract, format and print
13379stack traces of Python programs. It exactly mimics the behavior of the Python
13380interpreter when it prints a stack trace.")
13381 (license license:psfl)))
13382
13383(define-public python2-traceback2
13384 (package-with-python2 python-traceback2))
13385
13386(define-public python-ratelimiter
13387 (package
13388 (name "python-ratelimiter")
13389 (version "1.2.0")
13390 (source
13391 (origin
13392 (method url-fetch)
13393 (uri (pypi-uri "ratelimiter" version))
13394 (sha256
13395 (base32
13396 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
13397 (build-system python-build-system)
13398 (arguments
13399 '(#:tests? #f)) ; There are no tests in the pypi archive.
13400 (home-page "https://github.com/RazerM/ratelimiter")
13401 (synopsis "Simple rate limiting object")
13402 (description
13403 "The @code{ratelimiter} module ensures that an operation will not be
13404executed more than a given number of times during a given period.")
13405 (license license:asl2.0)))
13406
13407(define-public python2-ratelimiter
13408 (package-with-python2 python-ratelimiter))
13409
13410(define-public python-dukpy
13411 (package
13412 (name "python-dukpy")
13413 (version "0.3")
13414 (source
13415 (origin
5b77ebe1
TGR
13416 (method git-fetch)
13417 (uri (git-reference
13418 (url "https://github.com/kovidgoyal/dukpy.git")
13419 (commit (string-append "v" version))))
13420 (file-name (git-file-name name version))
44d10b1f 13421 (sha256
5b77ebe1 13422 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
44d10b1f
RW
13423 (build-system python-build-system)
13424 (home-page "https://github.com/kovidgoyal/dukpy")
13425 (synopsis "Run JavaScript in python")
13426 (description
13427 "dukpy is a JavaScript runtime environment for Python using the duktape
13428embeddable JavaScript engine.")
13429 ;; Dukpy is licensed under MIT like the embedded duktape library,
13430 ;; with 'errors.c' as GPL3.
13431 (license (list license:expat license:gpl3))))
13432
13433(define-public python2-dukpy
13434 (package-with-python2 python-dukpy))
13435
13436(define-public python-jsonrpclib-pelix
13437 (package
13438 (name "python-jsonrpclib-pelix")
13439 (version "0.3.2")
13440 (source
13441 (origin
13442 (method url-fetch)
13443 (uri (pypi-uri "jsonrpclib-pelix" version))
13444 (sha256
13445 (base32
13446 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
13447 (build-system python-build-system)
13448 (arguments
13449 `(#:tests? #f)) ; no tests in PyPI tarball
13450 (home-page "https://github.com/tcalmant/jsonrpclib/")
13451 (synopsis "JSON-RPC 2.0 client library for Python")
13452 (description
13453 "This library implements the JSON-RPC v2.0
13454specification (backwards-compatible) as a client library for Python. This
13455version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
13456services.")
13457 (license license:asl2.0)))
13458
13459(define-public python2-jsonrpclib-pelix
13460 (package-with-python2 python-jsonrpclib-pelix))
13461
13462(define-public python-setuptools-scm-git-archive
13463 (package
13464 (name "python-setuptools-scm-git-archive")
13465 (version "1.0")
13466 (source
13467 (origin
13468 (method url-fetch)
13469 (uri (pypi-uri "setuptools_scm_git_archive" version))
13470 (sha256
13471 (base32
13472 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
13473 (build-system python-build-system)
13474 (native-inputs
13475 `(("python-pytest" ,python-pytest)))
13476 (propagated-inputs
13477 `(("python-setuptools-scm" ,python-setuptools-scm)))
13478 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
13479 (synopsis "Setuptools_scm plugin for git archives")
13480 (description
13481 "The setuptools_scm_git_archive package is a plugin to
13482setuptools_scm, which supports obtaining versions from git archives that
13483belong to tagged versions.")
13484 (license license:expat)))
13485
13486(define-public python2-setuptools-scm-git-archive
13487 (package-with-python2 python-setuptools-scm-git-archive))
13488
13489(define-public python-pyclipper
13490 (package
13491 (name "python-pyclipper")
13492 (version "1.1.0.post1")
13493 (source
13494 (origin
13495 (method url-fetch)
13496 (uri (pypi-uri "pyclipper" version ".zip"))
13497 (sha256
13498 (base32
13499 "0ldbkbnx94an4zzrwb1sxmg6k0jgk4cwmvcdyy8y5k1zslc612wa"))
13500 (modules '((guix build utils)))
13501 (snippet
13502 '(begin
13503 ;; This file is generated by Cython.
13504 (delete-file "pyclipper/pyclipper.cpp") #t))))
13505 (build-system python-build-system)
13506 (arguments
13507 `(#:phases
13508 (modify-phases %standard-phases
13509 (add-before 'build 'cythonize-sources
13510 (lambda _
13511 (with-directory-excursion "pyclipper"
13512 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
13513 (propagated-inputs
13514 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
13515 (native-inputs
13516 `(("python-cython" ,python-cython)
13517 ("python-pytest" ,python-pytest)
13518 ("python-pytest-runner" ,python-pytest-runner)
13519 ("python-unittest2" ,python-unittest2)
13520 ("unzip" ,unzip)))
13521 (home-page "https://github.com/greginvm/pyclipper")
13522 (synopsis "Wrapper for Angus Johnson's Clipper library")
13523 (description
13524 "Pyclipper is a Cython wrapper for the C++ translation of the
13525Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
13526 (license license:expat)))
13527
13528(define-public python2-pyclipper
13529 (package-with-python2 python-pyclipper))
13530
13531(define-public python2-booleanoperations
13532 (package
13533 (name "python2-booleanoperations")
13534 (version "0.7.1")
13535 (source
13536 (origin
13537 (method url-fetch)
13538 (uri (pypi-uri "booleanOperations" version ".zip"))
13539 (sha256
13540 (base32
13541 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
13542 (build-system python-build-system)
13543 (arguments
13544 `(#:python ,python-2))
13545 (native-inputs
13546 `(("unzip" ,unzip)
13547 ("python2-pytest" ,python2-pytest)
13548 ("python2-pytest-runner" ,python2-pytest-runner)))
13549 (propagated-inputs
13550 `(("python-fonttools" ,python2-fonttools)
13551 ("python-pyclipper" ,python2-pyclipper)
13552 ("python-ufolib" ,python2-ufolib)))
13553 (home-page "https://github.com/typemytype/booleanOperations")
13554 (synopsis "Boolean operations on paths")
13555 (description
13556 "BooleanOperations provides a Python library that enables
13557boolean operations on paths.")
13558 (license license:expat)))
13559
13560(define-public python-tempdir
13561 (package
13562 (name "python-tempdir")
13563 (version "0.7.1")
13564 (source
13565 (origin
13566 (method url-fetch)
13567 (uri (pypi-uri "tempdir" version))
13568 (sha256
13569 (base32
13570 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
13571 (build-system python-build-system)
13572 (home-page "https://pypi.org/project/tempdir/")
13573 (arguments
13574 ;; the package has no tests
13575 '(#:tests? #f))
13576 (synopsis "Python library for managing temporary directories")
13577 (description
13578 "This library manages temporary directories that are automatically
13579deleted with all their contents when they are no longer needed. It is
13580particularly convenient for use in tests.")
13581 (license license:expat)))
13582
13583(define-public python2-tempdir
13584 (package-with-python2 python-tempdir))
13585
13586(define-public python-activepapers
13587 (package
13588 (name "python-activepapers")
13589 (version "0.2.2")
13590 (source
13591 (origin
13592 (method url-fetch)
13593 (uri (pypi-uri "ActivePapers.Py" version))
13594 (sha256
13595 (base32
13596 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
13597 (build-system python-build-system)
13598 (arguments
13599 `(#:modules ((ice-9 ftw)
13600 (srfi srfi-1)
13601 (guix build utils)
13602 (guix build python-build-system))
13603
13604 #:phases
13605 (modify-phases %standard-phases
13606 (add-after 'unpack 'delete-python2-code
13607 (lambda _
13608 (for-each delete-file
13609 '("lib/activepapers/builtins2.py"
13610 "lib/activepapers/standardlib2.py"
13611 "lib/activepapers/utility2.py"))))
13612 (replace 'check
13613 (lambda _
13614 ;; Deactivate the test cases that download files
13615 (setenv "NO_NETWORK_ACCESS" "1")
13616 ;; For some strange reason, some tests fail if nosetests runs all
13617 ;; test modules in a single execution. They pass if each test
13618 ;; module is run individually.
13619 (for-each (lambda (filename)
13620 (invoke "nosetests"
13621 (string-append "tests/" filename)))
13622 (scandir "tests"
13623 (lambda (filename)
13624 (string-suffix? ".py" filename)))))))))
13625 (native-inputs
13626 `(("python-tempdir" ,python-tempdir)
13627 ("python-nose" ,python-nose)))
13628 (propagated-inputs
13629 `(("python-h5py" ,python-h5py)))
13630 (home-page "http://www.activepapers.org/")
13631 (synopsis "Executable papers for scientific computing")
13632 (description
13633 "ActivePapers is a tool for working with executable papers, which
13634combine data, code, and documentation in single-file packages,
13635suitable for publication as supplementary material or on repositories
13636such as figshare or Zenodo.")
13637 (properties `((python2-variant . ,(delay python2-activepapers))))
13638 (license license:bsd-3)))
13639
13640(define-public python2-activepapers
13641 (let ((base (package-with-python2
13642 (strip-python2-variant python-activepapers))))
13643 (package
13644 (inherit base)
13645 (arguments
13646 (substitute-keyword-arguments (package-arguments base)
13647 ((#:phases phases)
13648 `(modify-phases ,phases
13649 (delete 'delete-python2-code)
13650 (add-after 'unpack 'delete-python3-code
13651 (lambda _
13652 (for-each delete-file
13653 '("lib/activepapers/builtins3.py"
13654 "lib/activepapers/standardlib3.py"
13655 "lib/activepapers/utility3.py")))))))))))
13656
13657(define-public python-semver
13658 (package
13659 (name "python-semver")
13660 (version "2.7.9")
13661 (source
13662 (origin
13663 (method url-fetch)
13664 (uri (pypi-uri "semver" version))
13665 (sha256
13666 (base32
13667 "0hhgqppchv59rqj0yzi1prdg2nfsywqmjsqy2rycyxm0hvxmbyqz"))))
13668 (build-system python-build-system)
13669 (arguments
13670 `(#:phases
13671 (modify-phases %standard-phases
13672 (add-after 'unpack 'patch-test-requirements
13673 (lambda _
13674 (substitute* "setup.py"
13675 ;; Our Python is new enough.
13676 (("'virtualenv<14\\.0\\.0'") "'virtualenv'"))
13677 #t)))))
13678 (native-inputs
13679 `(("python-tox" ,python-tox)
13680 ("python-virtualenv" ,python-virtualenv)))
13681 (home-page "https://github.com/k-bx/python-semver")
13682 (synopsis "Python helper for Semantic Versioning")
13683 (description "This package provides a Python library for
13684@url{Semantic Versioning, http://semver.org/}.")
13685 (license license:bsd-3)))
13686
13687(define-public python2-semver
13688 (package-with-python2 python-semver))
13689
13690(define-public python-pyro4
13691 (package
13692 (name "python-pyro4")
ad1acb81 13693 (version "4.75")
44d10b1f
RW
13694 (source
13695 (origin
13696 (method url-fetch)
13697 (uri (pypi-uri "Pyro4" version))
13698 (sha256
ad1acb81 13699 (base32 "1dfpp36imddx19yv0kd28gk1l71ckhpqy6jd590wpm2680jw15rq"))))
44d10b1f
RW
13700 (build-system python-build-system)
13701 (propagated-inputs
13702 `(("python-serpent" ,python-serpent)))
13703 (home-page "https://pyro4.readthedocs.io")
13704 (synopsis "Distributed object middleware for Python")
13705 (description
13706 "Pyro enables you to build applications in which objects can talk to each
13707other over the network. You can just use normal Python method calls to call
13708objects on other machines, also known as remote procedure calls (RPC).")
13709 (license license:expat)))
13710
13711(define-public python2-pyro
13712 (package
13713 (name "python2-pyro")
13714 (version "3.16")
13715 (source
13716 (origin
13717 (method url-fetch)
13718 (uri (pypi-uri "Pyro" version))
13719 (file-name (string-append "Pyro-" version ".tar.gz"))
13720 (sha256
13721 (base32
13722 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
13723 (build-system python-build-system)
13724 (arguments
13725 ;; Pyro is not compatible with Python 3
13726 `(#:python ,python-2
13727 ;; Pyro has no test cases for automatic execution
13728 #:tests? #f))
13729 (home-page "http://pythonhosted.org/Pyro/")
13730 (synopsis "Distributed object manager for Python")
13731 (description "Pyro is a Distributed Object Technology system
13732written in Python that is designed to be easy to use. It resembles
13733Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
13734which is a system and language independent Distributed Object Technology
13735and has much more to offer than Pyro or RMI. Pyro 3.x is no
13736longer maintained. New projects should use Pyro4 instead, which
13737is the new Pyro version that is actively developed.")
13738 (license license:expat)))
13739
13740(define-public python2-scientific
13741 (package
13742 (name "python2-scientific")
13743 (version "2.9.4")
13744 (source
13745 (origin
13746 (method url-fetch)
13747 (uri (string-append "https://bitbucket.org/khinsen/"
13748 "scientificpython/downloads/ScientificPython-"
13749 version ".tar.gz"))
13750 (file-name (string-append "ScientificPython-" version ".tar.gz"))
13751 (sha256
13752 (base32
13753 "0fc69zhlsn9d2jvbzyjl9ah53vj598h84nkq230c83ahfvgzx5y3"))))
13754 (build-system python-build-system)
13755 (inputs
13756 `(("netcdf" ,netcdf)))
13757 (propagated-inputs
13758 `(("python-numpy" ,python2-numpy-1.8)
13759 ("python-pyro" ,python2-pyro)))
13760 (arguments
13761 ;; ScientificPython is not compatible with Python 3
13762 `(#:python ,python-2
13763 #:tests? #f ; No test suite
13764 #:phases
13765 (modify-phases %standard-phases
13766 (replace 'build
13767 (lambda* (#:key inputs #:allow-other-keys)
77e61e25
RW
13768 (invoke "python" "setup.py" "build"
13769 (string-append "--netcdf_prefix="
13770 (assoc-ref inputs "netcdf"))))))))
44d10b1f
RW
13771 (home-page "https://bitbucket.org/khinsen/scientificpython")
13772 (synopsis "Python modules for scientific computing")
13773 (description "ScientificPython is a collection of Python modules that are
13774useful for scientific computing. Most modules are rather general (Geometry,
13775physical units, automatic derivatives, ...) whereas others are more
13776domain-specific (e.g. netCDF and PDB support). The library is currently
13777not actively maintained and works only with Python 2 and NumPy < 1.9.")
13778 (license license:cecill-c)))
13779
13780(define-public python2-mmtk
13781 (package
13782 (name "python2-mmtk")
13783 (version "2.7.11")
13784 (source
13785 (origin
13786 (method url-fetch)
13787 (uri (string-append "https://bitbucket.org/khinsen/"
13788 "mmtk/downloads/MMTK-" version ".tar.gz"))
13789 (file-name (string-append "MMTK-" version ".tar.gz"))
13790 (sha256
13791 (base32
13792 "1d0nnjx4lwsvh8f99vv1r6gi50d93yba0adkz8b4zgv4za4c5862"))))
13793 (build-system python-build-system)
13794 (native-inputs
13795 `(("netcdf" ,netcdf)))
13796 (propagated-inputs
13797 `(("python-scientific" ,python2-scientific)
13798 ("python-tkinter" ,python-2 "tk")))
13799 (arguments
13800 `(#:python ,python-2
13801 #:tests? #f
13802 #:phases
13803 (modify-phases %standard-phases
13804 (add-before 'build 'includes-from-scientific
13805 (lambda* (#:key inputs #:allow-other-keys)
13806 (mkdir-p "Include/Scientific")
13807 (copy-recursively
13808 (string-append
13809 (assoc-ref inputs "python-scientific")
13810 "/include/python2.7/Scientific")
13811 "Include/Scientific"))))))
13812 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
13813 (synopsis "Python library for molecular simulation")
13814 (description "MMTK is a library for molecular simulations with an emphasis
13815on biomolecules. It provides widely used methods such as Molecular Dynamics
13816and normal mode analysis, but also basic routines for implementing new methods
13817for simulation and analysis. The library is currently not actively maintained
13818and works only with Python 2 and NumPy < 1.9.")
13819 (license license:cecill-c)))
13820
13821(define-public python-phonenumbers
13822 (package
13823 (name "python-phonenumbers")
13824 (version "8.9.1")
13825 (source
13826 (origin
13827 (method url-fetch)
13828 (uri (pypi-uri "phonenumbers" version))
13829 (sha256
13830 (base32
13831 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
13832 (build-system python-build-system)
13833 (home-page
13834 "https://github.com/daviddrysdale/python-phonenumbers")
13835 (synopsis
13836 "Python library for dealing with international phone numbers")
13837 (description
13838 "This package provides a Python port of Google's libphonenumber library.")
13839 (license license:asl2.0)))
13840
13841(define-public python2-phonenumbers
13842 (package-with-python2 python-phonenumbers))
13843
13844(define-public python-send2trash
13845 (package
13846 (name "python-send2trash")
d9b0216b 13847 (version "1.5.0")
44d10b1f 13848 (source
d9b0216b 13849 (origin (method git-fetch)
44d10b1f 13850 ;; Source tarball on PyPI doesn't include tests.
d9b0216b
RW
13851 (uri (git-reference
13852 (url "https://github.com/hsoft/send2trash.git")
13853 (commit version)))
13854 (file-name (git-file-name name version))
44d10b1f
RW
13855 (sha256
13856 (base32
d9b0216b 13857 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
44d10b1f
RW
13858 (build-system python-build-system)
13859 (arguments
13860 '(#:phases
13861 (modify-phases %standard-phases
13862 (add-before 'check 'pre-check
13863 (lambda _
13864 (mkdir-p "/tmp/foo")
13865 (setenv "HOME" "/tmp/foo")
13866 #t)))))
13867 (home-page "https://github.com/hsoft/send2trash")
13868 (synopsis "Send files to the user's @file{~/Trash} directory")
13869 (description "This package provides a Python library to send files to the
13870user's @file{~/Trash} directory.")
20b3fde7 13871 (properties `((python2-variant . ,(delay python2-send2trash))))
44d10b1f
RW
13872 (license license:bsd-3)))
13873
13874(define-public python2-send2trash
13875 (package
f32164ab 13876 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
44d10b1f
RW
13877 (arguments
13878 (substitute-keyword-arguments (package-arguments python-send2trash)
13879 ((#:phases phases)
13880 `(modify-phases ,phases
13881 (add-before 'check 'setenv
13882 (lambda _
13883 (setenv "PYTHONPATH"
13884 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
4782a06f 13885 #t))))))))
44d10b1f
RW
13886
13887(define-public python-yapf
13888 (package
13889 (name "python-yapf")
13890 (version "0.24.0")
13891 (source
13892 (origin
13893 (method url-fetch)
13894 (uri (pypi-uri "yapf" version))
13895 (sha256
13896 (base32
13897 "0anwby0ydmyzcsgjc5dn1ryddwvii4dq61vck447q0n96npnzfyf"))))
13898 (build-system python-build-system)
13899 (home-page "https://github.com/google/yapf")
13900 (synopsis "Formatter for Python code")
13901 (description "YAPF is a formatter for Python code. It's based off of
13902@dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
13903takes the code and reformats it to the best formatting that conforms to the
13904style guide, even if the original code didn't violate the style guide.")
13905 (license license:asl2.0)))
13906
13907(define-public python2-yapf
13908 (package-with-python2 python-yapf))
13909
13910(define-public python-gyp
13911 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
13912 (revision "0"))
13913 (package
13914 (name "python-gyp")
13915 ;; Google does not release versions,
13916 ;; based on second most recent commit date.
13917 (version (git-version "0.0.0" revision commit))
13918 (source
13919 (origin
13920 ;; Google does not release tarballs,
13921 ;; git checkout is needed.
13922 (method git-fetch)
13923 (uri (git-reference
13924 (url "https://chromium.googlesource.com/external/gyp")
13925 (commit commit)))
13926 (file-name (git-file-name name version))
13927 (sha256
13928 (base32
13929 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
13930 (build-system python-build-system)
13931 (home-page "https://gyp.gsrc.io/")
13932 (synopsis "GYP is a Meta-Build system")
13933 (description
13934 "GYP builds build systems for large, cross platform applications.
13935It can be used to generate XCode projects, Visual Studio projects, Ninja build
13936files, and Makefiles.")
13937 (license license:bsd-3))))
13938
13939(define-public python2-gyp
13940 (package-with-python2 python-gyp))
13941
13942(define-public python-whatever
13943 (package
13944 (name "python-whatever")
13945 (version "0.5")
13946 (source
13947 (origin
13948 (method url-fetch)
13949 (uri (string-append "https://github.com/Suor/whatever/archive/" version
13950 ".tar.gz"))
13951 (sha256
13952 (base32
13953 "1iqvnaf0zpc6b4rvbqq4xy45mszcscyzpzknv8wg6j84pbp22sap"))
13954 (file-name (string-append name "-" version ".tar.gz"))))
13955 (build-system python-build-system)
13956 (arguments
13957 `(#:phases
13958 (modify-phases %standard-phases
13959 (replace 'check
13960 (lambda _
13961 (invoke "py.test"))))))
13962 (native-inputs
13963 `(("python-pytest" ,python-pytest)))
13964 (home-page "http://github.com/Suor/whatever")
13965 (synopsis "Make anonymous functions by partial application of operators")
13966 (description "@code{whatever} provides an easy way to make anonymous
13967functions by partial application of operators.")
13968 (license license:bsd-3)))
13969
13970(define-public python2-whatever
13971 (package-with-python2 python-whatever))
13972
13973(define-public python-funcy
13974 (package
13975 (name "python-funcy")
9e396ab8 13976 (version "1.11")
44d10b1f
RW
13977 (source
13978 (origin
a85c6027
TGR
13979 (method git-fetch)
13980 (uri (git-reference
13981 (url "https://github.com/Suor/funcy.git")
13982 (commit version)))
44d10b1f 13983 (sha256
a85c6027
TGR
13984 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
13985 (file-name (git-file-name name version))))
44d10b1f
RW
13986 (build-system python-build-system)
13987 (arguments
13988 `(#:phases
13989 (modify-phases %standard-phases
13990 (replace 'check
13991 (lambda _
13992 (invoke "py.test"))))))
13993 (native-inputs
13994 `(("python-pytest" ,python-pytest)
13995 ("python-whatever" ,python-whatever)))
13996 (home-page "http://github.com/Suor/funcy")
13997 (synopsis "Functional tools")
13998 (description "@code{funcy} is a library that provides functional tools.
13999Examples are:
14000@enumerate
14001@item merge - Merges collections of the same type
14002@item walk - Type-preserving map
14003@item select - Selects a part of a collection
14004@item take - Takes the first n items of a collection
14005@item first - Takes the first item of a collection
14006@item remove - Predicated-removes items of a collection
14007@item concat - Concatenates two collections
14008@item flatten - Flattens a collection with subcollections
14009@item distinct - Returns only distinct items
14010@item split - Predicated-splits a collection
14011@item split_at - Splits a collection at a given item
14012@item group_by - Groups items by group
14013@item pairwise - Pairs off adjacent items
14014@item partial - Partially-applies a function
14015@item curry - Curries a function
14016@item compose - Composes functions
14017@item complement - Complements a predicate
14018@item all_fn - \"all\" with predicate
14019@end enumerate")
14020 (license license:bsd-3)))
14021
14022(define-public python2-funcy
14023 (package-with-python2 python-funcy))
14024
14025(define-public python-isoweek
14026 (package
14027 (name "python-isoweek")
14028 (version "1.3.3")
14029 (source
14030 (origin
14031 (method url-fetch)
14032 (uri (pypi-uri "isoweek" version))
14033 (sha256
14034 (base32
14035 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
14036 (build-system python-build-system)
14037 (home-page "https://github.com/gisle/isoweek")
14038 (synopsis "Objects representing a week")
14039 (description "The @code{isoweek} module provide the class Week that
14040implements the week definition of ISO 8601. This standard also defines
14041a notation for identifying weeks; yyyyWww (where the W is a literal).
14042Week instances stringify to this form.")
14043 (license license:bsd-3)))
14044
14045(define-public python2-isoweek
14046 (package-with-python2 python-isoweek))
14047
14048(define-public python-tokenize-rt
14049 (package
14050 (name "python-tokenize-rt")
14051 (version "2.0.1")
14052 (source
14053 (origin
14054 (method url-fetch)
14055 (uri (pypi-uri "tokenize-rt" version))
14056 (sha256
14057 (base32
14058 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
14059 (build-system python-build-system)
14060 (home-page "https://github.com/asottile/tokenize-rt")
14061 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
14062 (description
14063 "This Python library is a wrapper around @code{tokenize} from the Python
14064standard library. It provides two additional tokens @code{ESCAPED_NL} and
14065@code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
14066and @code{tokens_to_src} to roundtrip.")
14067 (license license:expat)))
14068
14069(define-public python-future-fstrings
14070 (package
14071 (name "python-future-fstrings")
14072 (version "0.4.1")
14073 (source
14074 (origin
14075 (method url-fetch)
14076 (uri (pypi-uri "future_fstrings" version))
14077 (sha256
14078 (base32
14079 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
14080 (build-system python-build-system)
14081 (propagated-inputs
14082 `(("python-tokenize-rt" ,python-tokenize-rt)))
14083 (home-page "https://github.com/asottile/future-fstrings")
14084 (synopsis "Backport of fstrings to Python < 3.6")
14085 (description
14086 "This package provides a UTF-8 compatible encoding
14087@code{future_fstrings}, which performs source manipulation. It decodes the
14088source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
14089@code{f} strings.")
14090 (license license:expat)))
14091
14092(define-public python-typing
14093 (package
14094 (name "python-typing")
14095 (version "3.6.6")
14096 (source
14097 (origin
14098 (method url-fetch)
14099 (uri (pypi-uri "typing" version))
14100 (sha256
14101 (base32
14102 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
14103 (build-system python-build-system)
14104 (home-page "https://docs.python.org/3/library/typing.html")
14105 (synopsis "Type hints for Python")
14106 (description "This is a backport of the standard library @code{typing}
14107module to Python versions older than 3.5. Typing defines a standard notation
14108for Python function and variable type annotations. The notation can be used
14109for documenting code in a concise, standard format, and it has been designed
14110to also be used by static and runtime type checkers, static analyzers, IDEs
14111and other tools.")
14112 (license license:psfl)))
14113
14114(define-public python2-typing
14115 (package-with-python2 python-typing))
14116
f89d443b
VC
14117(define-public python-typing-extensions
14118 (package
14119 (name "python-typing-extensions")
14120 (version "3.7.2")
14121 (source
14122 (origin
14123 (method url-fetch)
14124 (uri (pypi-uri "typing_extensions" version))
14125 (sha256
14126 (base32
14127 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
14128 (build-system python-build-system)
14129 (home-page
14130 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
14131 (synopsis "Experimental type hints for Python")
14132 (description
14133 "The typing_extensions module contains additional @code{typing} hints not
14134yet present in the of the @code{typing} standard library.
14135Included are implementations of:
14136@enumerate
14137@item ClassVar
14138@item ContextManager
14139@item Counter
14140@item DefaultDict
14141@item Deque
14142@item NewType
14143@item NoReturn
14144@item overload
14145@item Protocol
14146@item runtime
14147@item Text
14148@item Type
14149@item TYPE_CHECKING
14150@item AsyncGenerator
14151@end enumerate\n")
14152 (license license:psfl)))
14153
44d10b1f
RW
14154(define-public bpython
14155 (package
14156 (name "bpython")
14157 (version "0.17.1")
14158 (source
14159 (origin
14160 (method url-fetch)
14161 (uri (pypi-uri "bpython" version))
14162 (sha256
14163 (base32
14164 "0bxhxi5zxdkrf8b4gwn0d363kdz3qnypjwhm1aydki53ph8ca1w9"))))
14165 (build-system python-build-system)
14166 (arguments
14167 `(#:phases
14168 (modify-phases %standard-phases
14169 (add-after 'unpack 'remove-failing-test
14170 (lambda _
14171 ;; Remove failing test. FIXME: make it pass
14172 (delete-file "bpython/test/test_args.py")
14173 #t))
14174 (add-after 'wrap 'add-aliases
14175 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
14176 (lambda* (#:key outputs #:allow-other-keys)
14177 (let ((out (assoc-ref outputs "out")))
14178 (for-each
14179 (lambda (old new)
14180 (symlink old (string-append out "/bin/" new)))
14181 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
14182 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
14183 #t)))))
14184 (propagated-inputs
14185 `(("python-pygments" ,python-pygments)
14186 ("python-requests" ,python-requests)
14187 ("python-babel" ,python-babel) ; optional, for internationalization
14188 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
14189 ("python-greenlet" ,python-greenlet)
14190 ("python-urwid" ,python-urwid) ; for bpython-urwid only
14191 ("python-six" ,python-six)))
14192 (native-inputs
14193 `(("python-sphinx" ,python-sphinx)
14194 ("python-mock" ,python-mock)))
14195 (home-page "https://bpython-interpreter.org/")
14196 (synopsis "Fancy interface to the Python interpreter")
14197 (description "Bpython is a fancy interface to the Python
14198interpreter. bpython's main features are
14199
14200@enumerate
14201@item in-line syntax highlighting,
14202@item readline-like autocomplete with suggestions displayed as you type,
14203@item expected parameter list for any Python function,
14204@item \"rewind\" function to pop the last line of code from memory and
14205 re-evaluate,
14206@item send the code you've entered off to a pastebin,
14207@item save the code you've entered to a file, and
14208@item auto-indentation.
14209@end enumerate")
14210 (license license:expat)))
14211
14212(define-public bpython2
14213 (let ((base (package-with-python2
14214 (strip-python2-variant bpython))))
14215 (package (inherit base)
14216 (name "bpython2")
14217 (arguments
14218 `(#:python ,python-2
14219 #:phases
14220 (modify-phases %standard-phases
14221 (add-after 'unpack 'remove-failing-test
14222 (lambda _
14223 ;; Remove failing test. FIXME: make it pass
14224 (delete-file "bpython/test/test_args.py")
14225 ;; Disable failing test-cases (renaming inhibits they are
14226 ;; discovered)
14227 (substitute* "bpython/test/test_curtsies_repl.py"
14228 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
14229 (string-append a "xxx_off_" b))
14230 (("^(\\s*def )(test_complex\\W)" _ a b)
14231 (string-append a "xxx_off_" b)))
14232 #t))
14233 (add-before 'build 'rename-scripts
14234 ;; rename the scripts to bypthon2, bpdb2, etc.
14235 (lambda _
14236 (substitute* "setup.py"
14237 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
14238 (string-append name "2" rest "\n"))
14239 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
14240 (string-append name "2" (or sub "") rest "\n")))
14241 #t))))))))
14242
14243(define-public python-pyinotify
14244 (package
14245 (name "python-pyinotify")
14246 (version "0.9.6")
14247 (source (origin
14248 (method url-fetch)
14249 (uri (pypi-uri "pyinotify" version))
14250 (sha256
14251 (base32
14252 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
14253 (build-system python-build-system)
14254 (arguments `(#:tests? #f)) ;no tests
14255 (home-page "https://github.com/seb-m/pyinotify")
14256 (synopsis "Python library for monitoring inotify events")
14257 (description
14258 "@code{pyinotify} provides a Python interface for monitoring
14259file system events on Linux.")
14260 (license license:expat)))
14261
14262(define-public python2-pyinotify
14263 (package-with-python2 python-pyinotify))
14264
14265;; Ada parser uses this version.
14266(define-public python2-quex-0.67.3
14267 (package
14268 (name "python2-quex")
14269 (version "0.67.3")
14270 (source
14271 (origin
14272 (method url-fetch)
14273 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
14274 (version-major+minor version)
14275 "/quex-" version ".zip"))
14276 (sha256
14277 (base32
14278 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
14279 (build-system python-build-system)
14280 (native-inputs
14281 `(("unzip" ,unzip)))
14282 (arguments
14283 `(#:python ,python-2
14284 #:tests? #f
14285 #:phases
14286 (modify-phases %standard-phases
14287 (delete 'configure)
14288 (delete 'build)
14289 (replace 'install
14290 (lambda* (#:key outputs #:allow-other-keys)
14291 (let* ((out (assoc-ref outputs "out"))
14292 (share/quex (string-append out "/share/quex"))
14293 (bin (string-append out "/bin")))
14294 (copy-recursively "." share/quex)
14295 (mkdir-p bin)
14296 (symlink (string-append share/quex "/quex-exe.py")
14297 (string-append bin "/quex"))
14298 #t))))))
14299 (native-search-paths
14300 (list (search-path-specification
14301 (variable "QUEX_PATH")
14302 (files '("share/quex")))))
14303 (home-page "http://quex.sourceforge.net/")
14304 (synopsis "Lexical analyzer generator in Python")
14305 (description "@code{quex} is a lexical analyzer generator in Python.")
14306 (license license:lgpl2.1+))) ; Non-military
14307
14308(define-public python2-quex
14309 (package (inherit python2-quex-0.67.3)
14310 (name "python2-quex")
14311 (version "0.68.1")
14312 (source
14313 (origin
14314 (method url-fetch)
14315 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
14316 (sha256
14317 (base32
14318 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
14319 (file-name (string-append name "-" version ".tar.gz"))))))
14320
14321(define-public python-more-itertools
14322 (package
14323 (name "python-more-itertools")
14324 (version "4.3.0")
14325 (source
14326 (origin
14327 (method url-fetch)
14328 (uri (pypi-uri "more-itertools" version))
14329 (sha256
14330 (base32
14331 "17h3na0rdh8xq30w4b9pizgkdxmm51896bxw600x84jflg9vaxn4"))))
14332 (build-system python-build-system)
14333 (arguments
14334 `(,@(if (any (cute string-prefix? <> (or (%current-system)
14335 (%current-target-system)))
14336 '("armhf" "i686"))
14337 '(#:phases
14338 (modify-phases %standard-phases
14339 ;; This is required for 32-bit hardware.
14340 ;; TODO: Try to remove this when upgrading.
14341 (add-after 'unpack 'patch-test
14342 (lambda _
14343 (substitute* "more_itertools/tests/test_more.py"
14344 (("10 \\*\\* 10") "9 ** 9"))
14345 #t))))
14346 '())))
14347 (propagated-inputs
14348 `(("python-six" ,python-six-bootstrap)))
14349 (home-page "https://github.com/erikrose/more-itertools")
14350 (synopsis "More routines for operating on iterables, beyond itertools")
14351 (description "Python's built-in @code{itertools} module implements a
14352number of iterator building blocks inspired by constructs from APL, Haskell,
14353and SML. @code{more-itertools} includes additional building blocks for
14354working with iterables.")
14355 (license license:expat)))
14356
14357(define-public python2-more-itertools
14358 (package-with-python2 python-more-itertools))
14359
14360(define-public python-latexcodec
14361 (package
14362 (name "python-latexcodec")
91b61f02 14363 (version "1.0.6")
44d10b1f
RW
14364 (source
14365 (origin
14366 (method url-fetch)
14367 (uri (pypi-uri "latexcodec" version))
14368 (sha256
91b61f02 14369 (base32 "0s4wdbg0w2l8pj3i0y4510i0s04p8nhxcsa2z41bjsv0k66npb81"))))
44d10b1f
RW
14370 (build-system python-build-system)
14371 (inputs
14372 `(("python-six" ,python-six)))
14373 (home-page "https://readthedocs.org/projects/latexcodec/")
14374 (synopsis "Work with LaTeX code in Python")
14375 (description "Lexer and codec to work with LaTeX code in Python.")
14376 (license license:expat)))
14377
14378(define-public python-pybtex
14379 (package
14380 (name "python-pybtex")
14381 (version "0.21")
14382 (source
14383 (origin
14384 (method url-fetch)
14385 (uri (pypi-uri "pybtex" version))
14386 (sha256
14387 (base32
14388 "00300j8dn5pxq4ndxmfmbmycg2znawkqs49val2x6jlmfiy6r2mg"))))
14389 (build-system python-build-system)
14390 (native-inputs
14391 `(("python-nose" ,python-nose)))
14392 (inputs
14393 `(("python-latexcodec" ,python-latexcodec)
14394 ("python-pyyaml" ,python-pyyaml)
14395 ("python-six" ,python-six)))
14396 (arguments
14397 `(#:test-target "nosetests"))
14398 (home-page "https://pybtex.org/")
14399 (synopsis "BibTeX-compatible bibliography processor")
14400 (description "Pybtex is a BibTeX-compatible bibliography processor written
14401in Python. You can simply type pybtex instead of bibtex.")
14402 (license license:expat)))
14403
14404(define-public python-onetimepass
14405 (package
14406 (name "python-onetimepass")
14407 (version "1.0.1")
14408 (source
14409 (origin
14410 (method url-fetch)
14411 (uri (pypi-uri "onetimepass" version))
14412 (sha256
14413 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
14414 (build-system python-build-system)
14415 (propagated-inputs `(("python-six" ,python-six)))
14416 (home-page "https://github.com/tadeck/onetimepass/")
14417 (synopsis "One-time password library")
14418 (description "Python one-time password library for HMAC-based (HOTP) and
14419time-based (TOTP) passwords.")
14420 (license license:expat)))
14421
14422(define-public python-parso
14423 (package
14424 (name "python-parso")
14425 (version "0.3.1")
14426 (source
14427 (origin
14428 (method url-fetch)
14429 (uri (pypi-uri "parso" version))
14430 (sha256
14431 (base32
14432 "18p89iwcm8mnf380f92g9w0bhx5km8wxp392vvjcq4y1ld1llw1m"))))
14433 (native-inputs
14434 `(("python-pytest" ,python-pytest)))
14435 (build-system python-build-system)
14436 (home-page "https://github.com/davidhalter/parso")
14437 (synopsis "Python Parser")
14438 (description "Parso is a Python parser that supports error recovery and
14439round-trip parsing for different Python versions (in multiple Python versions).
14440Parso is also able to list multiple syntax errors in your Python file.")
14441 (license license:expat)))
14442
14443(define-public python2-parso
14444 (package-with-python2 python-parso))
14445
14446(define-public python-async-generator
14447 (package
14448 (name "python-async-generator")
94fcbf8d 14449 (version "1.10")
44d10b1f
RW
14450 (source
14451 (origin
14452 (method url-fetch)
14453 (uri (pypi-uri "async_generator" version))
14454 (sha256
14455 (base32
94fcbf8d 14456 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
44d10b1f
RW
14457 (build-system python-build-system)
14458 (native-inputs
14459 `(("python-pytest" ,python-pytest)))
14460 (home-page "https://github.com/python-trio/async_generator")
14461 (synopsis "Async generators and context managers for Python 3.5+")
14462 (description "@code{async_generator} back-ports Python 3.6's native async
14463generators and Python 3.7's context managers into Python 3.5.")
14464 ;; Dual licensed.
14465 (license (list license:expat license:asl2.0))))
14466
14467(define-public python-async-timeout
14468 (package
14469 (name "python-async-timeout")
14470 (version "3.0.1")
14471 (source
14472 (origin
14473 (method url-fetch)
14474 (uri (pypi-uri "async-timeout" version))
14475 (sha256
14476 (base32
14477 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
14478 (build-system python-build-system)
14479 (home-page "https://github.com/aio-libs/async_timeout/")
14480 (synopsis "Timeout context manager for asyncio programs")
14481 (description "@code{async-timeout} provides a timeout timeout context
14482manager compatible with @code{asyncio}.")
14483 (license license:asl2.0)))
14484
14485(define-public python-glob2
14486 (package
14487 (name "python-glob2")
14488 (version "0.6")
8fa2bcc7
TGR
14489 (source
14490 (origin
14491 (method git-fetch)
14492 (uri (git-reference
14493 (url "https://github.com/miracle2k/python-glob2.git")
14494 (commit version)))
14495 (file-name (git-file-name name version))
14496 (sha256
14497 (base32 "1lm1xz3k3l0k1c5bcp9hlzmi3gp5j8dl1k3xhpiq5mnm0xq6n163"))))
44d10b1f
RW
14498 (build-system python-build-system)
14499 (home-page "https://github.com/miracle2k/python-glob2/")
14500 (synopsis "Extended Version of the python buildin glob module")
14501 (description "This is an extended version of the Python
14502@url{http://docs.python.org/library/glob.html, built-in glob module} which
14503adds:
14504
14505@itemize
14506@item The ability to capture the text matched by glob patterns, and return
14507those matches alongside the file names.
14508@item A recursive @code{**} globbing syntax, akin for example to the
14509@code{globstar} option of Bash.
14510@item The ability to replace the file system functions used, in order to glob
14511on virtual file systems.
14512@item Compatible with Python 2 and Python 3 (tested with 3.3).
14513@end itemize
14514
14515Glob2 currently based on the glob code from Python 3.3.1.")
14516 (license license:bsd-2)))
14517
14518(define-public python2-glob2
14519 (package-with-python2 python-glob2))
14520
14521(define-public python-gipc
14522 (package
14523 (name "python-gipc")
14524 (version "0.6.0")
14525 (source
14526 (origin
14527 (method url-fetch)
14528 (uri (pypi-uri "gipc" version ".zip"))
14529 (sha256
14530 (base32
14531 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
14532 (build-system python-build-system)
14533 (native-inputs
14534 `(("unzip" ,unzip)))
14535 (propagated-inputs
14536 `(("python-gevent" ,python-gevent)))
14537 (home-page "http://gehrcke.de/gipc")
14538 (synopsis "Child process management in the context of gevent")
14539 (description "Usage of Python's multiprocessing package in a
14540gevent-powered application may raise problems. With @code{gipc},
14541process-based child processes can safely be created anywhere within a
14542gevent-powered application.")
14543 (license license:expat)))
14544
14545(define-public python2-gipc
14546 (package-with-python2 python-gipc))
14547
14548(define-public python-fusepy
14549 (package
14550 (name "python-fusepy")
14551 (version "2.0.4")
14552 (source
14553 (origin
14554 (method url-fetch)
14555 (uri (pypi-uri "fusepy" version))
14556 (sha256
14557 (base32
14558 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
14559 (build-system python-build-system)
14560 (arguments
14561 `(#:phases
14562 (modify-phases %standard-phases
14563 (add-before 'build 'set-library-file-name
14564 (lambda* (#:key inputs #:allow-other-keys)
14565 (let ((fuse (assoc-ref inputs "fuse")))
14566 (substitute* "fuse.py"
14567 (("find_library\\('fuse'\\)")
14568 (string-append "'" fuse "/lib/libfuse.so'")))
14569 #t))))))
14570 (propagated-inputs
14571 `(("fuse" ,fuse)))
14572 (home-page "https://github.com/fusepy/fusepy")
14573 (synopsis "Simple ctypes bindings for FUSE")
14574 (description "Python module that provides a simple interface to FUSE and
14575MacFUSE. The binding is created using the standard @code{ctypes} library.")
14576 (license license:isc)))
14577
14578(define-public python2-fusepy
14579 (package-with-python2 python-fusepy))
14580
14581(define-public python2-gdrivefs
14582 (package
14583 (name "python2-gdrivefs")
14584 (version "0.14.9")
14585 (source
14586 (origin
14587 (method url-fetch)
14588 (uri (pypi-uri "gdrivefs" version))
14589 (sha256
14590 (base32
14591 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
14592 (build-system python-build-system)
14593 (arguments
14594 `(#:python ,python-2
14595 #:phases
14596 (modify-phases %standard-phases
14597 (add-before 'build 'patch-setup-py
14598 (lambda _
14599 ;; Update requirements from dependency==version
14600 ;; to dependency>=version
14601 (substitute* "gdrivefs/resources/requirements.txt"
14602 (("==") ">="))
14603 #t)))))
14604 (native-inputs
14605 `(("python2-gipc" ,python2-gipc)
14606 ("python2-gevent" ,python2-gevent)
14607 ("python2-greenlet" ,python2-greenlet)
14608 ("python2-httplib2" ,python2-httplib2)
14609 ("python2-uritemplate" ,python2-uritemplate)
14610 ("python2-oauth2client" ,python2-oauth2client)
14611 ("python2-six" ,python2-six)))
14612 (propagated-inputs
14613 `(("python2-dateutil" ,python2-dateutil)
14614 ("python2-fusepy" ,python2-fusepy)
14615 ("python2-google-api-client" ,python2-google-api-client)))
14616 (home-page "https://github.com/dsoprea/GDriveFS")
14617 (synopsis "Mount Google Drive as a local file system")
14618 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
14619under Python 2.7.")
14620 (license license:gpl2)))
14621
14622(define-public pybind11
14623 (package
14624 (name "pybind11")
14625 (version "2.2.4")
14626 (source (origin
14627 (method git-fetch)
14628 (uri (git-reference
14629 (url "https://github.com/pybind/pybind11.git")
14630 (commit (string-append "v" version))))
14631 (sha256
14632 (base32
14633 "0pa79ymcasv8br5ifbx7878id5py2jpjac3i20cqxr6gs9l6ivlv"))
14634 (file-name (git-file-name name version))))
14635 (build-system cmake-build-system)
14636 (native-inputs
14637 `(("python" ,python)
14638 ("python-pytest" ,python-pytest)))
14639 (arguments
14640 `(#:test-target "check"))
14641 (home-page "https://github.com/pybind/pybind11/")
14642 (synopsis "Seamless operability between C++11 and Python")
14643 (description "pybind11 is a lightweight header-only library that exposes
14644C++ types in Python and vice versa, mainly to create Python bindings of
14645existing C++ code. Its goals and syntax are similar to the excellent
14646Boost.Python library by David Abrahams: to minimize boilerplate code in
14647traditional extension modules by inferring type information using compile-time
14648introspection.")
14649 (license license:expat)))
14650
14651(define-public python-fasteners
14652 (package
14653 (name "python-fasteners")
14654 (version "0.14.1")
14655 (source
14656 (origin
14657 (method url-fetch)
14658 (uri (pypi-uri "fasteners" version))
14659 (sha256
14660 (base32
14661 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
14662 (build-system python-build-system)
14663 (propagated-inputs
14664 `(("python-monotonic" ,python-monotonic)
14665 ("python-six" ,python-six)
14666 ("python-testtools" ,python-testtools)))
14667 (home-page "https://github.com/harlowja/fasteners")
14668 (synopsis "Python package that provides useful locks")
14669 (description
14670 "This package provides a Python program that provides following locks:
14671
14672@itemize
14673@item Locking decorator
14674@item Reader-writer locks
14675@item Inter-process locks
14676@item Generic helpers
14677@end itemize\n")
14678 (properties `((python2-variant . ,(delay python2-fasteners))))
14679 (license license:asl2.0)))
14680
14681(define-public python2-fasteners
14682 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
14683 (package
14684 (inherit base)
14685 (propagated-inputs
14686 `(("python2-futures" ,python2-futures)
14687 ,@(package-propagated-inputs base))))))
14688
14689(define-public python-requests-file
14690 (package
14691 (name "python-requests-file")
14692 (version "1.4.3")
14693 (source
14694 (origin
14695 (method url-fetch)
14696 (uri (pypi-uri "requests-file" version))
14697 (sha256
14698 (base32
14699 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
14700 (build-system python-build-system)
14701 (propagated-inputs
14702 `(("python-requests" ,python-requests)
14703 ("python-six" ,python-six)))
14704 (home-page
14705 "https://github.com/dashea/requests-file")
14706 (synopsis "File transport adapter for Requests")
14707 (description
14708 "Requests-File is a transport adapter for use with the Requests Python
52beae7b 14709library to allow local file system access via @code{file://} URLs.")
44d10b1f
RW
14710 (license license:asl2.0)))
14711
14712(define-public python2-requests-file
14713 (package-with-python2 python-requests-file))
14714
14715(define-public python-tldextract
14716 (package
14717 (name "python-tldextract")
14718 (version "2.2.0")
14719 (source
14720 (origin
14721 (method url-fetch)
14722 (uri (pypi-uri "tldextract" version))
14723 (sha256
14724 (base32
14725 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
14726 (build-system python-build-system)
14727 (native-inputs
14728 `(("python-pytest" ,python-pytest)
14729 ("python-responses" ,python-responses)))
14730 (propagated-inputs
14731 `(("python-idna" ,python-idna)
14732 ("python-requests" ,python-requests)
14733 ("python-requests-file" ,python-requests-file)))
14734 (home-page
14735 "https://github.com/john-kurkowski/tldextract")
14736 (synopsis
14737 "Separate the TLD from the registered domain and subdomains of a URL")
14738 (description
14739 "TLDExtract accurately separates the TLD from the registered domain and
14740subdomains of a URL, using the Public Suffix List. By default, this includes
14741the public ICANN TLDs and their exceptions. It can optionally support the
14742Public Suffix List's private domains as well.")
14743 (license license:bsd-3)))
14744
14745(define-public python2-tldextract
14746 (package-with-python2 python-tldextract))
14747
14748(define-public python-pynamecheap
14749 (package
14750 (name "python-pynamecheap")
14751 (version "0.0.3")
14752 (source
14753 (origin
14754 (method url-fetch)
14755 (uri (pypi-uri "PyNamecheap" version))
14756 (sha256
14757 (base32
14758 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
14759 (build-system python-build-system)
14760 (propagated-inputs
14761 `(("python-requests" ,python-requests)))
14762 (home-page
14763 "https://github.com/Bemmu/PyNamecheap")
14764 (synopsis
14765 "Namecheap API client in Python")
14766 (description
14767 "PyNamecheap is a Namecheap API client in Python.")
14768 (license license:expat)))
14769
14770(define-public python2-pynamecheap
14771 (package-with-python2 python-pynamecheap))
14772
14773(define-public python-dns-lexicon
14774 (package
14775 (name "python-dns-lexicon")
14776 (version "2.4.0")
14777 (source
14778 (origin
14779 (method url-fetch)
14780 (uri (pypi-uri "dns-lexicon" version))
14781 (sha256
14782 (base32
14783 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
14784 (build-system python-build-system)
14785 (arguments
14786 `(#:tests? #f)) ;requires internet access
14787 (propagated-inputs
14788 `(("python-future" ,python-future)
14789 ("python-pynamecheap" ,python-pynamecheap)
14790 ("python-requests" ,python-requests)
14791 ("python-tldextract" ,python-tldextract)
14792 ("python-urllib3" ,python-urllib3)))
14793 (home-page "https://github.com/AnalogJ/lexicon")
14794 (synopsis
14795 "Manipulate DNS records on various DNS providers")
14796 (description
14797 "Lexicon provides a way to manipulate DNS records on multiple DNS
14798providers in a standardized way. It has a CLI but it can also be used as a
14799Python library. It was designed to be used in automation, specifically with
14800Let's Encrypt.")
14801 (license license:expat)))
14802
14803(define-public python2-dns-lexicon
14804 (package-with-python2 python-dns-lexicon))
14805
14806(define-public python-commandlines
14807 (package
14808 (name "python-commandlines")
14809 (version "0.4.1")
14810 (source
14811 (origin
14812 (method url-fetch)
14813 (uri (pypi-uri "commandlines" version))
14814 (sha256
14815 (base32
14816 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
14817 (build-system python-build-system)
14818 (home-page "https://github.com/chrissimpkins/commandlines")
14819 (synopsis "Command line argument to object parsing library")
14820 (description
14821 "@code{Commandlines} is a Python library for command line application
14822development that supports command line argument parsing, command string
14823validation testing and application logic.")
14824 (license license:expat)))
14825
14826;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
14827;; python-numba. They have a very unflexible relationship.
14828(define-public python-numba
14829 (package
14830 (name "python-numba")
7757e6d8 14831 (version "0.42.0")
44d10b1f
RW
14832 (source
14833 (origin
14834 (method url-fetch)
14835 (uri (pypi-uri "numba" version))
14836 (sha256
14837 (base32
7757e6d8 14838 "03rqdfx0512lcri2bcpngx5k3jwfbqnanqj3n19c7d6h6hqxvq9x"))))
44d10b1f
RW
14839 (build-system python-build-system)
14840 (arguments
14841 `(#:modules ((guix build utils)
14842 (guix build python-build-system)
14843 (ice-9 ftw)
14844 (srfi srfi-1)
14845 (srfi srfi-26))
14846 #:phases
14847 (modify-phases %standard-phases
14848 (add-after 'unpack 'disable-proprietary-features
14849 (lambda _
14850 (setenv "NUMBA_DISABLE_HSA" "1")
14851 (setenv "NUMBA_DISABLE_CUDA" "1")
14852 #t))
14853 (add-after 'unpack 'remove-failing-tests
14854 (lambda _
14855 ;; FIXME: these tests fail for unknown reasons:
14856 ;; test_non_writable_pycache, test_non_creatable_pycache, and
14857 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
14858 (substitute* "numba/tests/test_dispatcher.py"
14859 (("def test(_non_writable_pycache)" _ m)
14860 (string-append "def guix_skip" m))
14861 (("def test(_non_creatable_pycache)" _ m)
14862 (string-append "def guix_skip" m))
14863 (("def test(_frozen)" _ m)
14864 (string-append "def guix_skip" m)))
14865
14866 ;; These tests fail because we don't run the tests from the build
14867 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
14868 ;; They ar in numba.tests.test_pycc.TestDistutilsSupport.
14869 (substitute* "numba/tests/test_pycc.py"
14870 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
14871 (string-append "def guix_skip" m)))
14872 #t))
14873 (replace 'check
14874 (lambda _
14875 (let ((cwd (getcwd)))
14876 (setenv "PYTHONPATH"
14877 (string-append cwd "/build/"
14878 (find (cut string-prefix? "lib" <>)
14879 (scandir (string-append cwd "/build")))
14880 ":"
14881 (getenv "PYTHONPATH")))
14882 ;; Something is wrong with the PYTHONPATH when running the
14883 ;; tests from the build directory, as it complains about not being
14884 ;; able to import certain modules.
14885 (with-directory-excursion "/tmp"
14886 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
14887 #t)))))
14888 (propagated-inputs
14889 `(("python-llvmlite" ,python-llvmlite)
14890 ("python-numpy" ,python-numpy)
14891 ("python-singledispatch" ,python-singledispatch)))
14892 ;; Needed for tests.
14893 (inputs
14894 `(("python-jinja2" ,python-jinja2)
14895 ("python-pygments" ,python-pygments)))
14896 (home-page "https://numba.pydata.org")
14897 (synopsis "Compile Python code using LLVM")
14898 (description "Numba gives you the power to speed up your applications with
14899high performance functions written directly in Python. With a few
14900annotations, array-oriented and math-heavy Python code can be just-in-time
14901compiled to native machine instructions, similar in performance to C, C++ and
14902Fortran, without having to switch languages or Python interpreters.
14903
14904Numba works by generating optimized machine code using the LLVM compiler
14905infrastructure at import time, runtime, or statically (using the included pycc
14906tool).")
14907 (license license:bsd-3)))
14908
14909(define-public python-anndata
14910 (package
14911 (name "python-anndata")
8c9372c1 14912 (version "0.6.18")
44d10b1f
RW
14913 (source
14914 (origin
14915 (method url-fetch)
14916 (uri (pypi-uri "anndata" version))
14917 (sha256
14918 (base32
8c9372c1 14919 "03x83yjaccbqszj7x4fwwmpil0ai59yx64d1zmf2691za3j03w73"))))
44d10b1f
RW
14920 (build-system python-build-system)
14921 (propagated-inputs
14922 `(("python-h5py" ,python-h5py)
14923 ("python-natsort" ,python-natsort)
14924 ("python-pandas" ,python-pandas)
14925 ("python-scipy" ,python-scipy)))
14926 (home-page "https://github.com/theislab/anndata")
14927 (synopsis "Annotated data for data analysis pipelines")
14928 (description "Anndata is a package for simple (functional) high-level APIs
14929for data analysis pipelines. In this context, it provides an efficient,
14930scalable way of keeping track of data together with learned annotations and
14931reduces the code overhead typically encountered when using a mostly
14932object-oriented library such as @code{scikit-learn}.")
14933 (license license:bsd-3)))
14934
14935(define-public python-dill
14936 (package
14937 (name "python-dill")
c60b15cc 14938 (version "0.2.9")
44d10b1f
RW
14939 (source
14940 (origin
14941 (method url-fetch)
14942 (uri (pypi-uri "dill" version))
14943 (sha256
c60b15cc 14944 (base32 "0vwqyi6hyz2r29zydc78dqymkbc5y7gia16xcdh215cikxph9mpn"))))
44d10b1f 14945 (build-system python-build-system)
c60b15cc 14946 ;; FIXME: The check phase fails with "don't know how to make test from: …".
44d10b1f
RW
14947 (arguments '(#:tests? #f))
14948 (home-page "https://pypi.org/project/dill")
14949 (synopsis "Serialize all of Python")
14950 (description "Dill extends Python's @code{pickle} module for serializing
14951and de-serializing Python objects to the majority of the built-in Python
14952types. Dill provides the user the same interface as the @code{pickle} module,
14953and also includes some additional features. In addition to pickling Python
14954objects, @code{dill} provides the ability to save the state of an interpreter
61985d65 14955session in a single command. Hence, it would be feasible to save a
44d10b1f
RW
14956interpreter session, close the interpreter, ship the pickled file to another
14957computer, open a new interpreter, unpickle the session and thus continue from
14958the saved state of the original interpreter session.")
14959 (license license:bsd-3)))
14960
14961(define-public python-multiprocess
14962 (package
14963 (name "python-multiprocess")
14964 (version "0.70.6.1")
14965 (source
14966 (origin
14967 (method url-fetch)
14968 (uri (pypi-uri "multiprocess" version))
14969 (sha256
14970 (base32
14971 "1ip5caz67b3q0553mr8gm8xwsb8x500jn8ml0gihgyfy52m2ypcq"))))
14972 (build-system python-build-system)
14973 (propagated-inputs
14974 `(("python-dill" ,python-dill)))
14975 (home-page "https://pypi.org/project/multiprocess")
14976 (synopsis "Multiprocessing and multithreading in Python")
14977 (description
14978 "This package is a fork of the multiprocessing Python package, a package
14979which supports the spawning of processes using the API of the standard
14980library's @code{threading} module.")
14981 (license license:bsd-3)))
14982
14983(define-public python-toolz
14984 (package
14985 (name "python-toolz")
14986 (version "0.9.0")
14987 (source
14988 (origin
14989 (method url-fetch)
14990 (uri (pypi-uri "toolz" version))
14991 (sha256
14992 (base32
14993 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
14994 (build-system python-build-system)
14995 ;; FIXME: tests cannot be computed: "Can't perform this operation for
14996 ;; unregistered loader type"
14997 (arguments '(#:tests? #f))
14998 (home-page "https://github.com/pytoolz/toolz/")
14999 (synopsis "List processing tools and functional utilities")
15000 (description
15001 "This package provides a set of utility functions for iterators,
15002functions, and dictionaries.")
15003 (license license:bsd-3)))
15004
15005(define-public python2-toolz
15006 (package-with-python2 python-toolz))
15007
15008(define-public python-cytoolz
15009 (package
15010 (name "python-cytoolz")
15011 (version "0.9.0.1")
15012 (source
15013 (origin
15014 (method url-fetch)
15015 (uri (pypi-uri "cytoolz" version))
15016 (sha256
15017 (base32
15018 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
15019 (build-system python-build-system)
15020 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
15021 ;; 'exceptions'"
15022 (arguments '(#:tests? #f))
15023 (propagated-inputs
15024 `(("python-toolz" ,python-toolz)))
15025 (native-inputs
15026 `(("python-cython" ,python-cython)))
15027 (home-page "https://github.com/pytoolz/cytoolz")
15028 (synopsis "High performance functional utilities")
15029 (description
15030 "The cytoolz package implements the same API as provided by toolz. The
15031main differences are that @code{cytoolz} is faster and cytoolz offers a C API
15032that is accessible to other projects developed in Cython.")
15033 (license license:bsd-3)))
15034
15035(define-public python-sortedcontainers
15036 (package
15037 (name "python-sortedcontainers")
15038 (version "2.0.4")
15039 (source
15040 (origin
15041 (method url-fetch)
15042 (uri (pypi-uri "sortedcontainers" version))
15043 (sha256
15044 (base32
15045 "10hrk2k0hbf9x78vd3f0lj277m1yzfhzzxr0hja718liwb398wk0"))))
15046 (build-system python-build-system)
15047 (native-inputs
15048 `(("python-tox" ,python-tox)))
15049 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
15050 (synopsis "Sorted List, Sorted Dict, Sorted Set")
15051 (description
15052 "This package provides a sorted collections library, written in
15053pure-Python.")
15054 (license license:asl2.0)))
15055
15056(define-public python-cloudpickle
15057 (package
15058 (name "python-cloudpickle")
15059 (version "0.6.1")
15060 (source
15061 (origin
15062 (method url-fetch)
15063 (uri (pypi-uri "cloudpickle" version))
15064 (sha256
15065 (base32
15066 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
15067 (build-system python-build-system)
15068 ;; FIXME: there are 5 errors in 122 tests:
15069 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
15070 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
15071 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15072 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15073 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
15074 ;; TypeError: cannot serialize '_io.BufferedRandom' object
15075 (arguments '(#:tests? #f))
15076 (native-inputs
15077 `(("python-pytest" ,python-pytest)
15078 ("python-mock" ,python-mock)
15079 ("python-tornado" ,python-tornado)))
15080 (home-page "https://github.com/cloudpipe/cloudpickle")
15081 (synopsis "Extended pickling support for Python objects")
15082 (description
15083 "Cloudpickle makes it possible to serialize Python constructs not
15084supported by the default pickle module from the Python standard library. It
15085is especially useful for cluster computing where Python expressions are
15086shipped over the network to execute on remote hosts, possibly close to the
15087data.")
15088 (license license:bsd-3)))
15089
15090(define-public python2-cloudpickle
15091 (package-with-python2 python-cloudpickle))
15092
15093(define-public python-locket
15094 (package
15095 (name "python-locket")
15096 (version "0.2.0")
15097 (source
15098 (origin
15099 (method url-fetch)
15100 (uri (pypi-uri "locket" version))
15101 (sha256
15102 (base32
15103 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
15104 (build-system python-build-system)
15105 (home-page "https://github.com/mwilliamson/locket.py")
15106 (synopsis "File-based locks for Python")
15107 (description
15108 "Locket implements a lock that can be used by multiple processes provided
15109they use the same path.")
15110 (license license:bsd-2)))
15111
15112(define-public python2-locket
15113 (package-with-python2 python-locket))
15114
15115(define-public python-blosc
15116 (package
15117 (name "python-blosc")
15118 (version "1.5.1")
15119 (source
15120 (origin
15121 (method url-fetch)
15122 (uri (pypi-uri "blosc" version))
15123 (sha256
15124 (base32
15125 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
15126 (build-system python-build-system)
15127 ;; FIXME: all tests pass, but then this error is printed:
15128 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
15129 (arguments '(#:tests? #f))
15130 (propagated-inputs
15131 `(("python-numpy" ,python-numpy)))
15132 (home-page "https://github.com/blosc/python-blosc")
15133 (synopsis "Python wrapper for the Blosc data compressor library")
15134 (description "Blosc is a high performance compressor optimized for binary
15135data. It has been designed to transmit data to the processor cache faster
15136than the traditional, non-compressed, direct memory fetch approach via a
15137@code{memcpy()} system call.
15138
15139Blosc works well for compressing numerical arrays that contains data with
15140relatively low entropy, like sparse data, time series, grids with
15141regular-spaced values, etc.
15142
15143This Python package wraps the Blosc library.")
15144 (license license:bsd-3)))
15145
15146(define-public python2-blosc
15147 (package-with-python2 python-blosc))
15148
15149(define-public python-partd
15150 (package
15151 (name "python-partd")
15152 (version "0.3.9")
15153 (source
15154 (origin
15155 (method url-fetch)
15156 (uri (pypi-uri "partd" version))
15157 (sha256
15158 (base32
15159 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
15160 (build-system python-build-system)
15161 (propagated-inputs
15162 `(("python-blosc" ,python-blosc)
15163 ("python-locket" ,python-locket)
15164 ("python-numpy" ,python-numpy)
15165 ("python-pandas" ,python-pandas)
15166 ("python-pyzmq" ,python-pyzmq)
15167 ("python-toolz" ,python-toolz)))
15168 (home-page "https://github.com/dask/partd/")
15169 (synopsis "Appendable key-value storage")
15170 (description "Partd stores key-value pairs. Values are raw bytes. We
15171append on old values. Partd excels at shuffling operations.")
15172 (license license:bsd-3)))
15173
15174(define-public python2-partd
15175 (package-with-python2 python-partd))
15176
15177(define-public python-dask
15178 (package
15179 (name "python-dask")
75cc5359 15180 (version "1.2.0")
44d10b1f
RW
15181 (source
15182 (origin
15183 (method url-fetch)
15184 (uri (pypi-uri "dask" version))
15185 (sha256
15186 (base32
75cc5359 15187 "1y0dqcp72ixwblgway0jpvfirlxfcmwrjiivdq96firj1hw127sd"))))
44d10b1f
RW
15188 (build-system python-build-system)
15189 ;; A single test out of 5000+ fails. This test is marked as xfail when
15190 ;; pytest-xdist is used.
15191 (arguments
15192 `(#:phases
15193 (modify-phases %standard-phases
15194 (add-after 'unpack 'disable-broken-test
15195 (lambda _
15196 (substitute* "dask/tests/test_threaded.py"
15197 (("def test_interrupt\\(\\)" m)
15198 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15199 m)))
15200 (when (which "python2")
15201 ;; This test fails with recent Pandas:
15202 ;; <https://github.com/dask/dask/issues/3794>.
15203 (substitute* "dask/dataframe/tests/test_dataframe.py"
15204 (("def test_info\\(\\)" m)
15205 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15206 m))))
15207 #t))
15208 (replace 'check
15209 (lambda _ (invoke "pytest" "-vv"))))))
15210 (propagated-inputs
15211 `(("python-cloudpickle" ,python-cloudpickle)
15212 ("python-numpy" ,python-numpy)
15213 ("python-pandas" ,python-pandas)
15214 ("python-partd" ,python-partd)
15215 ("python-toolz" ,python-toolz)
15216 ("python-pyyaml" ,python-pyyaml)))
15217 (native-inputs
15218 `(("python-pytest" ,python-pytest)
15219 ("python-pytest-runner" ,python-pytest-runner)))
15220 (home-page "https://github.com/dask/dask/")
15221 (synopsis "Parallel computing with task scheduling")
15222 (description
15223 "Dask is a flexible parallel computing library for analytics. It
15224consists of two components: dynamic task scheduling optimized for computation,
15225and large data collections like parallel arrays, dataframes, and lists that
15226extend common interfaces like NumPy, Pandas, or Python iterators to
15227larger-than-memory or distributed environments. These parallel collections
15228run on top of the dynamic task schedulers. ")
15229 (license license:bsd-3)))
15230
15231(define-public python2-dask
15232 (package-with-python2 python-dask))
15233
15234(define-public python-ilinkedlist
15235 (package
15236 (name "python-ilinkedlist")
15237 (version "0.4.0")
15238 (source
15239 (origin
15240 (method url-fetch)
15241 (uri (pypi-uri "ilinkedlist" version))
15242 (sha256
15243 (base32
15244 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
15245 (build-system python-build-system)
15246 (native-inputs `(("python-pytest" ,python-pytest)))
15247 (inputs `(("python" ,python)))
15248 (home-page "https://github.com/luther9/ilinkedlist-py")
15249 (synopsis "Immutable linked list library")
15250 (description
15251 "This is a implementation of immutable linked lists for Python. It
15252contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
15253Since a linked list is treated as immutable, it is hashable, and its length
15254can be retrieved in constant time. Some of the terminology is inspired by
15255LISP. It is possible to create an improper list by creating a @code{Pair}
15256with a non-list @code{cdr}.")
15257 (license license:gpl3+)))
15258
15259(define-public python-readlike
15260 (package
15261 (name "python-readlike")
15262 (version "0.1.3")
15263 (source
15264 (origin
15265 (method url-fetch)
15266 (uri (pypi-uri "readlike" version))
15267 (sha256
15268 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
15269 (build-system python-build-system)
15270 (home-page "https://github.com/jangler/readlike")
15271 (synopsis "GNU Readline-like line editing module")
15272 (description
15273 "This Python module provides line editing functions similar to the default
15274Emacs-style ones of GNU Readline. Unlike the Python standard library's
15275@code{readline} package, this one allows access to those capabilties in settings
15276outside of a standard command-line interface. It is especially well-suited to
15277interfacing with Urwid, due to a shared syntax for describing key inputs.
15278
15279Currently, all stateless Readline commands are implemented. Yanking and history
15280are not supported.")
15281 (license license:expat)))
15282
15283(define-public python2-readlike
15284 (package-with-python2 python-readlike))
15285
15286(define-public python-reparser
15287 (package
15288 (name "python-reparser")
15289 (version "1.4.3")
15290 (source
15291 (origin
15292 (method url-fetch)
15293 (uri (pypi-uri "ReParser" version))
15294 (sha256
15295 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
15296 (build-system python-build-system)
15297 (home-page "https://github.com/xmikos/reparser")
15298 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
15299 (description
15300 "This Python library provides a simple lexer/parser for inline markup based
15301on regular expressions.")
15302 (license license:expat)))
15303
15304(define-public python2-reparser
15305 (let ((reparser (package-with-python2
15306 (strip-python2-variant python-reparser))))
15307 (package (inherit reparser)
15308 (propagated-inputs
15309 `(("python2-enum34" ,python2-enum34)
15310 ,@(package-propagated-inputs reparser))))))
15311
15312(define-public python-precis-i18n
15313 (package
15314 (name "python-precis-i18n")
15315 (version "1.0.0")
15316 (source
15317 (origin
15318 (method url-fetch)
15319 (uri (pypi-uri "precis_i18n" version))
15320 (sha256
15321 (base32
15322 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
15323 (build-system python-build-system)
15324 (home-page "https://github.com/byllyfish/precis_i18n")
15325 (synopsis "Implementation of the PRECIS framework")
15326 (description
15327 "This module implements the PRECIS Framework as described in RFC 8264,
15328RFC 8265 and RFC 8266.")
15329 (license license:expat)))
15330
d0446c4b
RW
15331(define-public python-absl-py
15332 (package
15333 (name "python-absl-py")
15334 (version "0.6.1")
15335 (source
15336 (origin
15337 (method url-fetch)
15338 (uri (pypi-uri "absl-py" version))
15339 (sha256
15340 (base32
15341 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
15342 (build-system python-build-system)
15343 (propagated-inputs
15344 `(("python-six" ,python-six)))
15345 (home-page "https://github.com/abseil/abseil-py")
15346 (synopsis "Abseil Python common libraries")
15347 (description
15348 "This package provides the Abseil Python Common Libraries, a collection
15349of Python libraries for building Python applications.")
15350 (license license:asl2.0)))
15351
81bed4e9
RW
15352(define-public python-astor
15353 (package
15354 (name "python-astor")
15355 (version "0.7.1")
15356 (source
15357 (origin
15358 (method url-fetch)
15359 (uri (pypi-uri "astor" version))
15360 (sha256
15361 (base32
15362 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
15363 (build-system python-build-system)
15364 ;; FIXME: There are two errors and two test failures.
15365 (arguments `(#:tests? #f))
15366 (home-page "https://github.com/berkerpeksag/astor")
39ee82ff 15367 (synopsis "Read and write Python ASTs")
81bed4e9 15368 (description "Astor is designed to allow easy manipulation of Python
39ee82ff 15369source via the Abstract Syntax Tree.")
81bed4e9
RW
15370 (license license:bsd-3)))
15371
39ee82ff
RW
15372(define-public python2-astor
15373 (package-with-python2 python-astor))
15374
22e623ae
RW
15375(define-public python-grpcio
15376 (package
15377 (name "python-grpcio")
15378 (version "1.17.1")
15379 (source
15380 (origin
15381 (method url-fetch)
15382 (uri (pypi-uri "grpcio" version))
15383 (sha256
15384 (base32
15385 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
15386 (build-system python-build-system)
15387 (propagated-inputs
15388 `(("python-six" ,python-six)))
15389 (home-page "https://grpc.io")
15390 (synopsis "HTTP/2-based RPC framework")
15391 (description "This package provides a Python library for communicating
15392with the HTTP/2-based RPC framework gRPC.")
15393 (license license:asl2.0)))
15394
79869f80
RW
15395(define-public python-astunparse
15396 (package
15397 (name "python-astunparse")
15398 (version "1.6.1")
15399 (source
15400 (origin
15401 (method url-fetch)
15402 (uri (pypi-uri "astunparse" version))
15403 (sha256
15404 (base32
15405 "1jhidwyrqn17avqh9xnnm3wd7q7aahaq009cba67g86y6gxicyyj"))))
15406 (build-system python-build-system)
15407 (arguments '(#:tests? #f)) ; there are none
15408 (propagated-inputs
15409 `(("python-six" ,python-six)
15410 ("python-wheel" ,python-wheel)))
15411 (home-page "https://github.com/simonpercivall/astunparse")
15412 (synopsis "AST unparser for Python")
15413 (description "This package provides an AST unparser for Python. It is a
15414factored out version of @code{unparse} found in the Python source
15415distribution.")
15416 (license license:bsd-3)))
15417
2884aac0
RW
15418(define-public python-gast
15419 (package
15420 (name "python-gast")
bd300261 15421 (version "0.2.2")
2884aac0
RW
15422 (source
15423 (origin
15424 (method url-fetch)
15425 (uri (pypi-uri "gast" version))
15426 (sha256
bd300261 15427 (base32 "1w5dzdb3gpcfmd2s0b93d8gff40a1s41rv31458z14inb3s9v4zy"))))
2884aac0
RW
15428 (build-system python-build-system)
15429 (propagated-inputs
15430 `(("python-astunparse" ,python-astunparse)))
15431 (home-page "https://pypi.org/project/gast/")
15432 (synopsis "Generic Python AST that abstracts the underlying Python version")
15433 (description
15434 "GAST provides a compatibility layer between the AST of various Python
15435versions, as produced by @code{ast.parse} from the standard @code{ast}
15436module.")
15437 (license license:bsd-3)))
15438
44d10b1f
RW
15439(define-public python-wikidata
15440 (package
15441 (name "python-wikidata")
15442 (version "0.6.1")
15443 (source
15444 (origin
15445 (method url-fetch)
15446 (uri (pypi-uri "Wikidata" version))
15447 (sha256
15448 (base32
15449 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
15450 (build-system python-build-system)
15451 (propagated-inputs
15452 `(("python-babel" ,python-babel)))
15453 (home-page "https://github.com/dahlia/wikidata")
15454 (synopsis "Wikidata client library")
15455 (description
15456 "This package provides a Python interface to
15457@url{https://www.wikidata.org/, Wikidata}.")
15458 (properties '((upstream-name . "Wikidata")))
15459 (license license:gpl3+)))
15460
15461(define-public python-doctest-ignore-unicode
15462 (package
15463 (name "python-doctest-ignore-unicode")
15464 (version "0.1.2")
15465 (source
15466 (origin
15467 (method url-fetch)
15468 (uri (pypi-uri "doctest-ignore-unicode" version))
15469 (sha256
15470 (base32
15471 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
15472 (build-system python-build-system)
15473 (native-inputs
15474 `(("python-nose" ,python-nose)))
15475 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
15476 (synopsis "Ignore Unicode literal prefixes in doctests")
15477 (description
15478 "This package adds support for a flag to ignore Unicode literal prefixes
15479in doctests.")
15480 (license license:asl2.0)))
15481
15482(define-public python-attr
15483 (package
15484 (name "python-attr")
15485 (version "0.3.1")
15486 (source
15487 (origin
15488 (method url-fetch)
15489 (uri (pypi-uri "attr" version))
15490 (sha256
15491 (base32
15492 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
15493 (build-system python-build-system)
15494 (home-page "https://github.com/denis-ryzhkov/attr")
15495 (synopsis "Decorator for attributes of target function or class")
15496 (description "Simple decorator to set attributes of target function or
15497class in a @acronym{DRY, Don't Repeat Yourself} way.")
15498 (license license:expat)))
f98232a3
VC
15499
15500(define-public python-construct
15501 (package
15502 (name "python-construct")
15503 (version "2.9.45")
15504 (source
15505 (origin
15506 (method url-fetch)
15507 (uri (pypi-uri "construct" version))
15508 (sha256
15509 (base32
15510 "130iy05awzigm2xah2yvlmb08mac5bi4gzr5m3g7k1krs3ps0w92"))))
15511 (build-system python-build-system)
15512 (arguments
15513 `(#:tests? #f)) ; No tests exist.
15514 (propagated-inputs
15515 `(("python-extras" ,python-extras)
15516 ("python-arrow" ,python-arrow)
15517 ("python-numpy" ,python-numpy)
15518 ("python-ruamel.yaml" ,python-ruamel.yaml)))
15519 (home-page "http://construct.readthedocs.io")
15520 (synopsis "Declarative and symmetrical parser and builder for binary data")
15521 (description
15522 "This package provides both simple, atomic constructs (such as
15523integers of various sizes), as well as composite ones which allow you
15524form hierarchical and sequential structures of increasing complexity.
15525It features bit and byte granularity, easy debugging and testing, an
15526easy-to-extend subclass system, and lots of primitive constructs to
15527make your work easier.")
15528 (license license:expat)))
b742c006
LF
15529
15530(define-public python-humanize
15531 (package
15532 (name "python-humanize")
15533 (version "0.5.1")
15534 (source
15535 (origin
15536 (method url-fetch)
15537 (uri (pypi-uri "humanize" version))
15538 (sha256
15539 (base32
15540 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
15541 (arguments
15542 '(#:tests? #f)) ; tests not in pypi archive
15543 (build-system python-build-system)
15544 (home-page "https://github.com/jmoiron/humanize")
15545 (synopsis "Print numerical information in a human-readable form")
15546 (description "This package provides a Python module that displays numbers
15547and dates in \"human readable\" forms. For example, it would display
15548\"12345591313\" as \"12.3 billion\".")
15549 (license license:expat)))
d5bbf66d
LF
15550
15551(define-public python-txaio
15552 (package
15553 (name "python-txaio")
15554 (version "18.8.1")
15555 (source
15556 (origin
15557 (method url-fetch)
15558 (uri (pypi-uri "txaio" version))
15559 (sha256
15560 (base32
15561 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
15562 (build-system python-build-system)
15563 (propagated-inputs
15564 `(("python-twisted" ,python-twisted)
15565 ("python-six" ,python-six)))
15566 (home-page "https://github.com/crossbario/txaio")
15567 (synopsis "Compatibility layer between Python asyncio and Twisted")
15568 (description "Txaio provides a compatibility layer between the Python
15569@code{asyncio} module and @code{Twisted}.")
15570 (license license:expat)))
963dfd3a
RW
15571
15572(define-public python-toolshed
15573 (package
15574 (name "python-toolshed")
15575 (version "0.4.6")
15576 (source
15577 (origin
15578 (method url-fetch)
15579 (uri (pypi-uri "toolshed" version))
15580 (sha256
15581 (base32
15582 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
15583 (build-system python-build-system)
15584 (native-inputs
15585 `(("python-nose" ,python-nose)))
15586 (home-page "https://github.com/brentp/toolshed/")
15587 (synopsis "Collection of modules and functions for working with data")
15588 (description "This is a collection of well-tested, simple modules and
15589functions that aim to reduce boilerplate when working with data.")
15590 (license license:bsd-2)))
c91ecf2d
RW
15591
15592(define-public python-annoy
15593 (package
15594 (name "python-annoy")
15595 (version "1.15.1")
15596 (source
15597 (origin
15598 (method url-fetch)
15599 (uri (pypi-uri "annoy" version))
15600 (sha256
15601 (base32
15602 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
15603 (build-system python-build-system)
15604 (native-inputs
15605 `(("python-nose" ,python-nose)))
15606 (home-page "https://github.com/spotify/annoy/")
15607 (synopsis "Approximate nearest neighbors library")
15608 (description
15609 "Annoy is a C++ library with Python bindings to search for points in
15610space that are close to a given query point. It also creates large read-only
15611file-based data structures that are @code{mmap}ped into memory so that many
15612processes may share the same data.")
15613 (license license:asl2.0)))
412342d1
NG
15614
15615(define-public python-sphinxcontrib-svg2pdfconverter
15616 (package
15617 (name "python-sphinxcontrib-svg2pdfconverter")
15618 (version "0.1.0")
15619 (source (origin
15620 (method url-fetch)
15621 (uri (pypi-uri "sphinxcontrib-svg2pdfconverter" version))
15622 (sha256
15623 (base32
15624 "1abvbgkkii13q8nsb10r0gc5lm0p9iq1iwhfhakn5ifn6asa0183"))))
15625 (build-system python-build-system)
15626 (propagated-inputs
15627 `(("python-sphinx" ,python-sphinx)))
15628 (home-page "https://github.com/missinglinkelectronics/sphinxcontrib-svg2pdfconverter/releases")
15629 (synopsis "Sphinx SVG to PDF converter extension")
15630 (description "A Sphinx extension to convert SVG images to PDF in case the builder does not support
15631SVG images natively (e.g. LaTeX).")
15632 (license license:bsd-3)))