gnu: Add python-soupsieve, python2-soupsieve.
[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")
2321 (version "2.10")
2322 (source
2323 (origin
2324 (method url-fetch)
2325 (uri (pypi-uri "Jinja2" version))
2326 (sha256
2327 (base32
2328 "190l36hfw3wb2n3n68yacjabxyb1pnxwn7vjx96cmjj002xy2jzq"))))
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")
2485 (version "2.2.0")
2486 (source
2487 (origin
2488 (method url-fetch)
2489 (uri (pypi-uri "Pygments" version))
2490 (sha256
2491 (base32
2492 "1k78qdvir1yb1c634nkv6rbga8wv4289xarghmsbbvzhvr311bnv"))))
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")
c6a2fd24 3266 (version "0.29.6")
44d10b1f
RW
3267 (source
3268 (origin
3269 (method url-fetch)
3270 (uri (pypi-uri "Cython" version))
3271 (sha256
3272 (base32
c6a2fd24 3273 "1bp7cn0pp5qy63k9hbp4ka34fm01kvysh478phpkhr68npqk6pbc"))))
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
ad74978a
BT
5562(define-public python-soupsieve
5563 (package
5564 (name "python-soupsieve")
5565 (version "1.9.1")
5566 (source
5567 (origin
5568 (method url-fetch)
5569 (uri (pypi-uri "soupsieve" version))
5570 (sha256
5571 (base32
5572 "1jnzkiwmjl6yvqckc9mf689g87b6yz07sv868hap2aa5arggy3mj"))))
5573 (build-system python-build-system)
5574 (arguments `(#:tests? #f))
5575 ;;XXX: 2 tests fail currently despite claming they were to be
5576 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
5577 ;;don't want to create a circular dependency.
5578 (home-page "https://github.com/facelessuser/soupsieve")
5579 (synopsis "CSS selector library")
5580 (description
5581 "Soup Sieve is a CSS selector library designed to be used with Beautiful
5582Soup 4. It aims to provide selecting, matching, and filtering using modern
5583CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
5584specifications up through the latest CSS level 4 drafts and beyond (though
5585some are not yet implemented).")
5586 (license license:expat)))
5587
5588(define-public python2-soupsieve
5589 (let ((base (package-with-python2 python-soupsieve)))
5590 (package
5591 (inherit base)
5592 (propagated-inputs
5593 `(("python2-backports-functools-lru-cache" ,python2-backports-functools-lru-cache))))))
5594
44d10b1f
RW
5595(define-public python-netifaces
5596 (package
5597 (name "python-netifaces")
5598 (version "0.10.7")
5599 (source
5600 (origin
5601 (method url-fetch)
5602 (uri (pypi-uri "netifaces" version))
5603 (sha256
5604 (base32
5605 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
5606 (build-system python-build-system)
5607 (home-page "https://github.com/al45tair/netifaces")
5608 (synopsis
5609 "Python module for portable network interface information")
5610 (description
5611 "Netifaces is a Python module providing information on network
5612interfaces in an easy and portable manner.")
5613 (license license:expat)))
5614
5615(define-public python2-netifaces
5616 (package-with-python2 python-netifaces))
5617
5618(define-public python-networkx
5619 (package
5620 (name "python-networkx")
5621 (version "2.2")
5622 (source
5623 (origin
5624 (method url-fetch)
5625 (uri (pypi-uri "networkx" version ".zip"))
5626 (sha256
5627 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
5628 (build-system python-build-system)
5629 ;; python-decorator is needed at runtime.
5630 (propagated-inputs
5631 `(("python-decorator" ,python-decorator)))
5632 (native-inputs
5633 `(("python-nose" ,python-nose)
5634 ("unzip" ,unzip)))
5635 (home-page "https://networkx.github.io/")
5636 (synopsis "Python module for creating and manipulating graphs and networks")
5637 (description
5638 "NetworkX is a Python package for the creation, manipulation, and study
5639of the structure, dynamics, and functions of complex networks.")
5640 (license license:bsd-3)))
5641
5642(define-public python2-networkx
5643 (package-with-python2 python-networkx))
5644
5645(define-public python-datrie
5646 (package
5647 (name "python-datrie")
5648 (version "0.7.1")
5649 (source
5650 (origin
5651 (method url-fetch)
5652 (uri (pypi-uri "datrie" version))
5653 (sha256
5654 (base32
5655 "08r0if7dry2q7p34gf7ffyrlnf4bdvnprxgydlfxgfnvq8f3f4bs"))))
5656 (build-system python-build-system)
5657 (arguments
5658 `(#:phases (modify-phases %standard-phases
5659 (add-before 'build 'cythonize
5660 (lambda _
5661 ;; Regenerate Cython classes to solve ABI issues with Python
5662 ;; 3.7.0. See <https://github.com/pytries/datrie/issues/52>.
5663 (invoke "cython" "src/datrie.pyx" "src/cdatrie.pxd"
5664 "src/stdio_ext.pxd" "-a"))))))
5665 (native-inputs
5666 `(("python-cython" ,python-cython)
5667 ("python-hypothesis" ,python-hypothesis)
5668 ("python-pytest" ,python-pytest)
5669 ("python-pytest-runner" ,python-pytest-runner)))
5670 (home-page "https://github.com/kmike/datrie")
5671 (synopsis "Fast, efficiently stored trie for Python")
5672 (description
5673 "This package provides a fast, efficiently stored trie implementation for
5674Python.")
5675 (license license:lgpl2.1+)))
5676
5677(define-public snakemake
5678 (package
5679 (name "snakemake")
5680 (version "5.2.4")
5681 (source
5682 (origin
5683 (method url-fetch)
5684 (uri (pypi-uri "snakemake" version))
5685 (sha256
5686 (base32 "0gj0xxgiq3mp9qyyrbfzldiaq1giliqw0in64nqiz7vx49myqj7z"))))
5687 (build-system python-build-system)
5688 (arguments
5689 ;; TODO: Package missing test dependencies.
5690 '(#:tests? #f
5691 #:phases
5692 (modify-phases %standard-phases
5693 ;; For cluster execution Snakemake will call Python. Since there is
5694 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
5695 ;; this by calling the snakemake wrapper instead.
5696 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
5697 (lambda* (#:key outputs #:allow-other-keys)
5698 (substitute* "snakemake/executors.py"
5699 (("\\{sys.executable\\} -m snakemake")
5700 (string-append (assoc-ref outputs "out")
5701 "/bin/snakemake")))
5702 #t)))))
5703 (propagated-inputs
5704 `(("python-gitpython" ,python-gitpython)
5705 ("python-wrapt" ,python-wrapt)
5706 ("python-requests" ,python-requests)
5707 ("python-appdirs" ,python-appdirs)
5708 ("python-configargparse" ,python-configargparse)
5709 ("python-datrie" ,python-datrie)
5710 ("python-docutils" ,python-docutils)
5711 ("python-jinja2" ,python-jinja2)
5712 ("python-jsonschema" ,python-jsonschema)
5713 ("python-networkx" ,python-networkx)
5714 ("python-pyyaml" ,python-pyyaml)
5715 ("python-ratelimiter" ,python-ratelimiter)))
5716 (home-page "https://snakemake.readthedocs.io")
5717 (synopsis "Python-based execution environment for make-like workflows")
5718 (description
5719 "Snakemake aims to reduce the complexity of creating workflows by
5720providing a clean and modern domain specific specification language (DSL) in
5721Python style, together with a fast and comfortable execution environment.")
5722 (license license:expat)))
5723
5724;; This is currently needed for the pigx-* packages.
5725(define-public snakemake-4
5726 (package (inherit snakemake)
5727 (version "4.4.0")
5728 (source
5729 (origin
5730 (method url-fetch)
5731 (uri (pypi-uri "snakemake" version))
5732 (sha256
5733 (base32 "0g0paia4z7w3srnqdmavq3hrb2x7qnpf81jx50njl0p7y4y0j8jv"))))
5734 (propagated-inputs
5735 `(("python-wrapt" ,python-wrapt)
5736 ("python-requests" ,python-requests)
5737 ("python-appdirs" ,python-appdirs)
5738 ("python-configargparse" ,python-configargparse)
5739 ("python-pyyaml" ,python-pyyaml)
5740 ("python-ratelimiter" ,python-ratelimiter)))))
5741
5742(define-public python-pyqrcode
5743 (package
5744 (name "python-pyqrcode")
5745 (version "1.2.1")
5746 (source
5747 (origin
5748 (method url-fetch)
5749 (uri (pypi-uri "PyQRCode" version))
5750 (sha256
5751 (base32
5752 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
5753 (build-system python-build-system)
5754 (home-page
5755 "https://github.com/mnooner256/pyqrcode")
5756 (synopsis "QR code generator")
5757 (description
5758 "Pyqrcode is a QR code generator written purely in Python with
5759SVG, EPS, PNG and terminal output.")
5760 (license license:bsd-3)))
5761
5762(define-public python-seaborn
5763 (package
5764 (name "python-seaborn")
5765 (version "0.9.0")
5766 (source
5767 (origin
5768 (method url-fetch)
5769 (uri (pypi-uri "seaborn" version))
5770 (sha256
5771 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))))
5772 (build-system python-build-system)
5773 (arguments
5774 `(#:phases
5775 (modify-phases %standard-phases
5776 (add-before 'check 'start-xserver
5777 (lambda* (#:key inputs #:allow-other-keys)
5778 (let ((xorg-server (assoc-ref inputs "xorg-server")))
5779 ;; There must be a running X server and make check doesn't
5780 ;; start one. Therefore we must do it.
5781 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
5782 (setenv "DISPLAY" ":1")
5783 #t)))
5784 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
5785 (propagated-inputs
5786 `(("python-pandas" ,python-pandas)
5787 ("python-matplotlib" ,python-matplotlib)
5788 ("python-numpy" ,python-numpy)
5789 ("python-scipy" ,python-scipy)))
5790 (native-inputs
5791 `(("python-pytest" ,python-pytest)
5792 ("xorg-server" ,xorg-server)))
5793 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5794 (synopsis "Statistical data visualization")
5795 (description
5796 "Seaborn is a library for making attractive and informative statistical
5797graphics in Python. It is built on top of matplotlib and tightly integrated
5798with the PyData stack, including support for numpy and pandas data structures
5799and statistical routines from scipy and statsmodels.")
5800 (license license:bsd-3)))
5801
5802(define-public python2-seaborn
5803 (package-with-python2 python-seaborn))
5804
5805(define-public python-mpmath
5806 (package
5807 (name "python-mpmath")
5808 (version "0.19")
5809 (source (origin
5810 (method url-fetch)
5811 (uri (string-append "http://mpmath.org/files/mpmath-"
5812 version ".tar.gz"))
5813 (sha256
5814 (base32
5815 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
5816 (build-system python-build-system)
5817 (arguments
5818 '(#:phases
5819 (modify-phases %standard-phases
5820 (replace 'check
5821 (lambda _
5d7a6f1c 5822 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
44d10b1f
RW
5823 (home-page "http://mpmath.org")
5824 (synopsis "Arbitrary-precision floating-point arithmetic in python")
5825 (description
5826 "@code{mpmath} can be used as an arbitrary-precision substitute for
5827Python's float/complex types and math/cmath modules, but also does much
5828more advanced mathematics.")
5829 (license license:bsd-3)))
5830
5831(define-public python2-mpmath
5832 (package-with-python2 python-mpmath))
5833
5834(define-public python-bigfloat
5835 (package
5836 (name "python-bigfloat")
5837 (version "0.3.0")
5838 (source
5839 (origin
5840 (method url-fetch)
5841 (uri (pypi-uri "bigfloat" version))
5842 (sha256
5843 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
5844 (build-system python-build-system)
5845 (inputs
5846 `(("mpfr" ,mpfr)))
5847 (home-page "https://github.com/mdickinson/bigfloat")
5848 (synopsis "Arbitrary precision floating-point arithmetic for Python")
5849 (description
5850 "This packages provides a Python interface to the MPFR library for
5851multiprecision arithmetic.")
5852 (license license:lgpl3+)))
5853
5854(define-public python2-bigfloat
5855 (package-with-python2 python-bigfloat))
5856
5857(define-public python-sympy
5858 (package
5859 (name "python-sympy")
5860 (version "1.1.1")
5861 (source
5862 (origin
5863 (method url-fetch)
5864 (uri (string-append
5865 "https://github.com/sympy/sympy/releases/download/sympy-"
5866 version "/sympy-" version ".tar.gz"))
5867 (sha256
5868 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
5869 (build-system python-build-system)
5870 (arguments
5871 `(#:phases
5872 (modify-phases %standard-phases
5873 ;; Run the core tests after installation. By default it would run
5874 ;; *all* tests, which take a very long time to complete and are known
5875 ;; to be flaky.
5876 (delete 'check)
5877 (add-after 'install 'check
5878 (lambda* (#:key outputs #:allow-other-keys)
5879 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
5880 #t)))))
5881 (propagated-inputs
5882 `(("python-mpmath" ,python-mpmath)))
5883 (home-page "http://www.sympy.org/")
5884 (synopsis "Python library for symbolic mathematics")
5885 (description
5886 "SymPy is a Python library for symbolic mathematics. It aims to become a
5887full-featured computer algebra system (CAS) while keeping the code as simple
5888as possible in order to be comprehensible and easily extensible.")
5889 (license license:bsd-3)))
5890
5891(define-public python2-sympy
5892 (package
5893 (inherit (package-with-python2 python-sympy))
5894 (arguments
5895 `(#:phases
5896 (modify-phases %standard-phases
5897 ;; Run the core tests after installation. By default it would run
5898 ;; *all* tests, which take a very long time to complete and are known
5899 ;; to be flaky.
5900 (delete 'check)
5901 (add-after 'install 'check
5902 (lambda* (#:key outputs #:allow-other-keys)
5903 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
5904 #t)))))))
5905
5906(define-public python-q
5907 (package
5908 (name "python-q")
5909 (version "2.6")
5910 (source
5911 (origin
5912 (method url-fetch)
5913 (uri (pypi-uri "q" version))
5914 (sha256
5915 (base32
5916 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
5917 (build-system python-build-system)
5918 (home-page "https://github.com/zestyping/q")
5919 (synopsis "Quick-and-dirty debugging output for tired programmers")
5920 (description
5921 "q is a Python module for \"print\" style of debugging Python code. It
5922provides convenient short API for print out of values, tracebacks, and
5923falling into the Python interpreter.")
5924 (license license:asl2.0)))
5925
5926(define-public python2-q
5927 (package-with-python2 python-q))
5928
5929(define-public python2-xlib
5930 (package
5931 (name "python2-xlib")
5932 (version "0.14")
5933 (source (origin
5934 (method url-fetch)
5935 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
5936 "/" version "/"
5937 "python-xlib-" version ".tar.gz"))
5938 (sha256
5939 (base32
5940 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
5941 (build-system python-build-system)
5942 (arguments
5943 `(#:python ,python-2 ;Python 2 only
5944 #:tests? #f)) ;no tests
5945 (home-page "http://python-xlib.sourceforge.net/")
5946 (synopsis "Python X11 client library")
5947 (description
5948 "The Python X Library is intended to be a fully functional X client
5949library for Python programs. It is useful to implement low-level X clients.
5950It is written entirely in Python.")
5951 (license license:gpl2+)))
5952
5953(define-public python-singledispatch
5954 (package
5955 (name "python-singledispatch")
5956 (version "3.4.0.3")
5957 (source
5958 (origin
5959 (method url-fetch)
5960 (uri (pypi-uri "singledispatch" version))
5961 (sha256
5962 (base32
5963 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
5964 (build-system python-build-system)
5965 (native-inputs
5966 `(("python-six" ,python-six))) ; required for conversion, not at run-time
5967 (home-page
5968 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
5969 (synopsis "Backport of singledispatch feature from Python 3.4")
5970 (description
5971 "This library brings functools.singledispatch from Python 3.4 to Python
59722.6-3.3.")
5973 (license license:expat)))
5974
5975(define-public python2-singledispatch
5976 (package-with-python2 python-singledispatch))
5977
5978;; the python- version can be removed with python-3.5
5979(define-public python-backports-abc
5980 (package
5981 (name "python-backports-abc")
5982 (version "0.5")
5983 (source
5984 (origin
5985 (method url-fetch)
5986 (uri (pypi-uri "backports_abc" version))
5987 (sha256
5988 (base32
5989 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
5990 (build-system python-build-system)
5991 (home-page "https://github.com/cython/backports_abc")
5992 (synopsis "Backport of additions to the 'collections.abc' module")
5993 (description
5994 "Python-backports-abc provides a backport of additions to the
36a4366d 5995@code{collections.abc} module in Python-3.5.")
44d10b1f
RW
5996 (license license:psfl)))
5997
5998(define-public python2-backports-abc
5999 (package-with-python2 python-backports-abc))
6000
6001(define-public python-backports-csv
6002 (package
6003 (name "python-backports-csv")
6004 (version "1.0.5")
6005 (source
6006 (origin
6007 (method url-fetch)
6008 (uri (pypi-uri "backports.csv" version))
6009 (sha256
6010 (base32
6011 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
6012 (build-system python-build-system)
6013 (home-page "https://github.com/ryanhiebert/backports.csv")
6014 (synopsis "Backport of Python 3's csv module for Python 2")
6015 (description
6016 "Provides a backport of Python 3's @code{csv} module for parsing
6017comma separated values. The API of the @code{csv} module in Python 2
6018is drastically different from the @code{csv} module in Python 3.
6019This is due, for the most part, to the difference between str in
6020Python 2 and Python 3.")
6021 (license license:psfl)))
6022
6023(define-public python2-backports-csv
6024 (package-with-python2 python-backports-csv))
6025
6026(define-public python2-backports-shutil-get-terminal-size
6027 (package
6028 (name "python2-backports-shutil-get-terminal-size")
6029 (version "1.0.0")
6030 (source
6031 (origin
6032 (method url-fetch)
6033 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6034 (sha256
6035 (base32
6036 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6037 (build-system python-build-system)
6038 (arguments
6039 `(#:python ,python-2
6040 #:phases
6041 (modify-phases %standard-phases
6042 (replace 'check
6043 (lambda _
4a4a7d9a 6044 (invoke "py.test" "-v"))))))
44d10b1f
RW
6045 (native-inputs
6046 `(("python2-pytest" ,python2-pytest)))
6047 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6048 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6049 (description
6050 "This package provides a backport of the @code{get_terminal_size
6051function} from Python 3.3's @code{shutil}.
6052Unlike the original version it is written in pure Python rather than C,
6053so it might be a tiny bit slower.")
6054 (license license:expat)))
6055
6056(define-public python-waf
6057 (package
6058 (name "python-waf")
6059 (version "2.0.11")
6060 (source (origin
6061 (method url-fetch)
6062 (uri (string-append "https://waf.io/"
6063 "waf-" version ".tar.bz2"))
6064 (sha256
6065 (base32
6066 "13zrniwkmfqgsgzi9v5m1367fppp9yzrz6z2ny6hy8dmpb8mj4z4"))))
6067 (build-system python-build-system)
6068 (arguments
6069 '(#:phases
6070 (modify-phases %standard-phases
6071 (replace 'build
6072 (lambda _
6073 (invoke "python" "waf-light" "configure" "build")))
6074 (replace 'check
6075 (lambda _
6076 (invoke "python" "waf" "--version")))
6077 (replace 'install
6078 (lambda* (#:key outputs #:allow-other-keys)
6079 (let ((out (assoc-ref outputs "out")))
6080 (install-file "waf" (string-append out "/bin")))
6081 #t))
6082 ;; waf breaks when it is wrapped.
6083 (delete 'wrap))))
6084 (home-page "https://waf.io/")
6085 (synopsis "Python-based build system")
6086 (description
6087 "Waf is a Python-based framework for configuring, compiling and installing
6088applications.")
6089 (license license:bsd-3)))
6090
6091(define-public python2-waf
6092 (package-with-python2 python-waf))
6093
6094(define-public python-pyzmq
6095 (package
6096 (name "python-pyzmq")
6097 (version "17.1.2")
6098 (source
6099 (origin
6100 (method url-fetch)
6101 (uri (pypi-uri "pyzmq" version))
6102 (sha256
6103 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
6104 (build-system python-build-system)
6105 (arguments
6106 `(#:configure-flags
6107 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6108 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6109 ;; --inplace' for 'python setup.py test' to work.
6110 #:tests? #f))
6111 (inputs
6112 `(("zeromq" ,zeromq)))
6113 (native-inputs
6114 `(("pkg-config" ,pkg-config)
6115 ("python-nose" ,python-nose)))
6116 (home-page "https://github.com/zeromq/pyzmq")
6117 (synopsis "Python bindings for 0MQ")
6118 (description
6119 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6120 (license license:bsd-4)))
6121
6122(define-public python2-pyzmq
6123 (package-with-python2 python-pyzmq))
6124
6125(define-public python-pep8
6126 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
6127 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
6128 ;; some dependents' test suites, and nothing more.
6129 (package
6130 (name "python-pep8")
6131 (version "1.7.0")
6132 (source
6133 (origin
6134 (method url-fetch)
6135 (uri (pypi-uri "pep8" version))
6136 (sha256
6137 (base32
6138 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
6139 (build-system python-build-system)
6140 (home-page "https://pep8.readthedocs.org/")
6141 (synopsis "Python style guide checker")
6142 (description
6143 "This tools checks Python code against some of the style conventions in
6144PEP 8.")
6145 (license license:expat)))
6146
6147(define-public python2-pep8
6148 (package-with-python2 python-pep8))
6149
6150(define-public python-pyflakes
6151 (package
6152 (name "python-pyflakes")
6153 (version "2.0.0")
6154 (source
6155 (origin
6156 (method url-fetch)
6157 (uri (pypi-uri "pyflakes" version))
6158 (sha256
6159 (base32
6160 "0jba28czyvimdc72llms3f17swp3i8jdcabf5w0j00adfbn64xls"))))
6161 (build-system python-build-system)
6162 (home-page
6163 "https://github.com/pyflakes/pyflakes")
6164 (synopsis "Passive checker of Python programs")
6165 (description
6166 "Pyflakes statically checks Python source code for common errors.")
6167 (license license:expat)))
6168
6169(define-public python2-pyflakes
6170 (package-with-python2 python-pyflakes))
6171
6172(define-public python-mccabe
6173 (package
6174 (name "python-mccabe")
6175 (version "0.6.1")
6176 (source
6177 (origin
6178 (method url-fetch)
6179 (uri (pypi-uri "mccabe" version))
6180 (sha256
6181 (base32
6182 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
6183 (build-system python-build-system)
6184 (native-inputs
6185 `(("python-pytest" ,python-pytest-bootstrap)
6186 ("python-pytest-runner" ,python-pytest-runner)))
6187 (home-page "https://github.com/flintwork/mccabe")
6188 (synopsis "McCabe checker, plugin for flake8")
6189 (description
6190 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6191complexity of Python source code.")
6192 (license license:expat)))
6193
6194(define-public python2-mccabe
6195 (package-with-python2 python-mccabe))
6196
6197(define-public python-mccabe-0.2.1
6198 (package (inherit python-mccabe)
6199 (version "0.2.1")
6200 (source
6201 (origin
6202 (method url-fetch)
6203 (uri (pypi-uri "mccabe" version))
6204 (sha256
6205 (base32
6206 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6207
6208(define-public python2-mccabe-0.2.1
6209 (package-with-python2 python-mccabe-0.2.1))
6210
6211;; Flake8 2.4.1 requires an older version of pep8.
6212;; This should be removed ASAP.
6213(define-public python-pep8-1.5.7
6214 (package (inherit python-pep8)
6215 (version "1.5.7")
6216 (source
f3576970
RW
6217 (origin
6218 (method url-fetch)
6219 (uri (pypi-uri "pep8" version))
6220 (sha256
6221 (base32
6222 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
44d10b1f
RW
6223 (arguments
6224 ;; XXX Tests not compatible with Python 3.5.
6225 '(#:tests? #f))))
6226
6227(define-public python2-pep8-1.5.7
6228 (package-with-python2 python-pep8-1.5.7))
6229
6230;; Flake8 2.4.1 requires an older version of pyflakes.
6231;; This should be removed ASAP.
6232(define-public python-pyflakes-0.8.1
6233 (package (inherit python-pyflakes)
6234 (version "0.8.1")
6235 (source
8c4dffb5
RW
6236 (origin
6237 (method url-fetch)
6238 (uri (pypi-uri "pyflakes" version))
6239 (sha256
6240 (base32
6241 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
44d10b1f
RW
6242 (arguments
6243 ;; XXX Tests not compatible with Python 3.5.
6244 '(#:tests? #f))))
6245
6246(define-public python2-pyflakes-0.8.1
6247 (package-with-python2 python-pyflakes-0.8.1))
6248
6249;; This package is used by hypothesis which has thousands of dependent packages.
6250;; FIXME: Consolidate this with "python-flake8" below in the next rebuild cycle.
6251(define-public python-flake8-3.5
6252 (package
6253 (name "python-flake8")
6254 (version "3.5.0")
6255 (source
6256 (origin
6257 (method url-fetch)
6258 (uri (pypi-uri "flake8" version))
6259 (sha256
6260 (base32
6261 "184b33grvvjmiwlv9kyd7yng9qv5ld24154j70z332xxg9gjclvj"))))
6262 (build-system python-build-system)
6263 (arguments
6264 `(#:phases
6265 (modify-phases %standard-phases
6266 ;; Two errors don't seem to have assigned codes.
6267 (add-after 'unpack 'delete-broken-test
6268 (lambda _ (delete-file "tests/unit/test_pyflakes_codes.py") #t))
6269 (add-after 'unpack 'fix-problem-with-pycodestyle
6270 (lambda _
6271 ;; See https://gitlab.com/pycqa/flake8/merge_requests/230
6272 ;; This should no longer be needed with the next release.
6273 (substitute* "setup.py"
6274 (("PEP8_PLUGIN\\('break_around_binary_operator'\\),")
6275 "PEP8_PLUGIN('break_after_binary_operator'),\
6276PEP8_PLUGIN('break_before_binary_operator'),"))
6277 #t))
6278 (delete 'check)
6279 (add-after 'install 'check
6280 (lambda* (#:key inputs outputs #:allow-other-keys)
6281 (add-installed-pythonpath inputs outputs)
6282 (invoke "pytest" "-v")
6283 #t)))))
6284 (propagated-inputs
6285 `(("python-pycodestyle" ,python-pycodestyle)
6286 ("python-pyflakes" ,python-pyflakes)
6287 ("python-mccabe" ,python-mccabe)))
6288 (native-inputs
6289 `(("python-mock" ,python-mock)
6290 ("python-pytest" ,python-pytest-bootstrap)
6291 ("python-pytest-runner" ,python-pytest-runner)))
6292 (home-page "https://gitlab.com/pycqa/flake8")
6293 (synopsis
6294 "The modular source code checker: pep8, pyflakes and co")
6295 (description
6296 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
6297 (properties `((python2-variant . ,(delay python2-flake8-3.5))))
6298 (license license:expat)))
6299
6300(define-public python2-flake8-3.5
6301 (let ((base (package-with-python2 (strip-python2-variant python-flake8-3.5))))
6302 (package (inherit base)
6303 (propagated-inputs
6304 `(("python2-configparser" ,python2-configparser)
6305 ("python2-enum34" ,python2-enum34)
6306 ,@(package-propagated-inputs base))))))
6307
6308;; Version 3.5.0 has compatibility issues with Pyflakes 2.0, so we need
6309;; this newer version. Keep it as a separate variable for now to avoid
6310;; rebuilding "python-hypothesis"; this should be removed in the next
6311;; rebuild cycle.
6312(define-public python-flake8
6313 (package
6314 (inherit python-flake8-3.5)
6315 (version "3.6.0")
6316 (source (origin
6317 (method url-fetch)
6318 (uri (pypi-uri "flake8" version))
6319 (sha256
6320 (base32
6321 "0w0nprx22rbvrrkbfx9v5jc5gskbm08g219l7r8wai8zfswgadba"))))
6322 (arguments
6323 (substitute-keyword-arguments (package-arguments python-flake8-3.5)
6324 ((#:phases phases)
6325 `(modify-phases ,phases
6326 (delete 'delete-broken-test)
6327 (delete 'fix-problem-with-pycodestyle)))))
6328 (properties `((python2-variant . ,(delay python2-flake8))))))
6329
6330(define-public python2-flake8
6331 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
6332 (package (inherit base)
6333 (propagated-inputs
6334 (package-propagated-inputs python2-flake8-3.5)))))
6335
6336;; python-hacking requires flake8 <2.6.0.
6337(define-public python-flake8-2.5
6338 (package
6339 (inherit python-flake8)
6340 (version "2.5.5")
6341 (source (origin
6342 (method url-fetch)
6343 (uri (pypi-uri "flake8" version))
6344 (sha256
6345 (base32
6346 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
6347 (propagated-inputs
6348 `(("python-pep8" ,python-pep8)
6349 ,@(package-propagated-inputs python-flake8)))
6350 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
6351
6352(define-public python2-flake8-2.5
6353 (package
6354 (inherit python2-flake8)
6355 (version (package-version python-flake8-2.5))
6356 (source (origin
6357 (inherit (package-source python-flake8-2.5))))
6358 (propagated-inputs
6359 `(("python2-pep8" ,python2-pep8)
6360 ,@(package-propagated-inputs python2-flake8)))))
6361
6362(define-public python-flake8-polyfill
6363 (package
6364 (name "python-flake8-polyfill")
6365 (version "1.0.2")
6366 (source
6367 (origin
6368 (method url-fetch)
6369 (uri (pypi-uri "flake8-polyfill" version))
6370 (sha256
6371 (base32
6372 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
6373 (build-system python-build-system)
6374 (arguments
6375 '(#:phases
6376 (modify-phases %standard-phases
6377 (replace 'check
6378 (lambda _
6379 (setenv "PYTHONPATH"
6380 (string-append (getcwd) "/build/lib:"
6381 (getenv "PYTHONPATH")))
4f0a0894 6382 (invoke "py.test" "-v"))))))
44d10b1f
RW
6383 (native-inputs
6384 `(("python-flake8" ,python-flake8)
6385 ("python-mock" ,python-mock)
6386 ("python-pep8" ,python-pep8)
6387 ("python-pycodestyle" ,python-pycodestyle)
6388 ("python-pytest" ,python-pytest)))
6389 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6390 (synopsis "Polyfill package for Flake8 plugins")
6391 (description
6392 "This package that provides some compatibility helpers for Flake8
6393plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6394 (license license:expat)))
6395
6396(define-public python2-flake8-polyfill
6397 (package-with-python2 python-flake8-polyfill))
6398
6399(define-public python-mistune
6400 (package
6401 (name "python-mistune")
6402 (version "0.8.4")
6403 (source
6404 (origin
6405 (method url-fetch)
6406 (uri (pypi-uri "mistune" version))
6407 (sha256
6408 (base32
6409 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
6410 (build-system python-build-system)
6411 (native-inputs
6412 `(("python-nose" ,python-nose)
6413 ("python-cython" ,python-cython)))
6414 (home-page "https://github.com/lepture/mistune")
6415 (synopsis "Markdown parser in pure Python")
6416 (description "This package provides a fast markdown parser in pure
6417Python.")
6418 (license license:bsd-3)))
6419
6420(define-public python2-mistune
6421 (package-with-python2 python-mistune))
6422
6423(define-public python-markdown
6424 (package
6425 (name "python-markdown")
1e3c7119 6426 (version "3.1")
44d10b1f
RW
6427 (source
6428 (origin
6429 (method url-fetch)
6430 (uri (pypi-uri "Markdown" version))
6431 (sha256
6432 (base32
1e3c7119 6433 "0l62x154r9mgdvfap06gf0nkrmjd7xixlfshsxcdif2nlrlnyjpw"))))
44d10b1f
RW
6434 (build-system python-build-system)
6435 (native-inputs
6436 `(("python-nose" ,python-nose)
6437 ("python-pyyaml" ,python-pyyaml)))
6438 (home-page "https://python-markdown.github.io/")
6439 (synopsis "Python implementation of Markdown")
6440 (description
6441 "This package provides a Python implementation of John Gruber's
6442Markdown. The library features international input, various Markdown
6443extensions, and several HTML output formats. A command line wrapper
6444markdown_py is also provided to convert Markdown files to HTML.")
6445 (license license:bsd-3)))
6446
6447(define-public python2-markdown
6448 (package-with-python2 python-markdown))
6449
6450(define-public python-ptyprocess
6451 (package
6452 (name "python-ptyprocess")
6453 (version "0.5.2")
6454 (source
6455 (origin
6456 (method url-fetch)
6457 (uri (pypi-uri "ptyprocess" version))
6458 (sha256
6459 (base32
6460 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
6461 (build-system python-build-system)
6462 (native-inputs
6463 `(("python-nose" ,python-nose)))
6464 (arguments
6465 `(#:phases
6466 (modify-phases %standard-phases
6467 (replace 'check
7904d6fa 6468 (lambda _ (invoke "nosetests"))))))
44d10b1f
RW
6469 (home-page "https://github.com/pexpect/ptyprocess")
6470 (synopsis "Run a subprocess in a pseudo terminal")
6471 (description
6472 "This package provides a Python library used to launch a subprocess in a
6473pseudo terminal (pty), and interact with both the process and its pty.")
6474 (license license:isc)))
6475
6476(define-public python2-ptyprocess
6477 (package-with-python2 python-ptyprocess))
6478
6479(define-public python-cram
6480 (package
6481 (name "python-cram")
6482 (version "0.7")
6483 (home-page "https://bitheap.org/cram/")
6484 (source (origin
6485 (method url-fetch)
6486 (uri (list (string-append home-page "cram-"
6487 version ".tar.gz")
6488 (pypi-uri "cram" version)))
6489 (sha256
6490 (base32
6491 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6492 (arguments
6493 '(#:phases
6494 (modify-phases %standard-phases
6495 (add-after 'unpack 'patch-source
6496 (lambda _
6497 (substitute* (find-files "cram" ".*\\.py$")
6498 ;; Replace default shell path.
6499 (("/bin/sh") (which "sh")))
6500 (substitute* (find-files "tests" ".*\\.t$")
6501 (("md5") "md5sum")
6502 (("/bin/bash") (which "bash"))
6503 (("/bin/sh") (which "sh")))
6504 (substitute* "cram/_test.py"
6505 ;; This hack works around a bug triggered by substituting
6506 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6507 ;; "cram -h", which breaks the output at 80 characters. This
6508 ;; causes the line showing the default shell to break into two
6509 ;; lines, but the test expects a single line...
6510 (("env\\['COLUMNS'\\] = '80'")
6511 "env['COLUMNS'] = '160'"))
6512 #t))
6513 (delete 'check)
6514 (add-after 'install 'check
6515 ;; The test phase uses the built library and executable.
6516 ;; It's easier to run it after install since the build
6517 ;; directory contains version-specific PATH.
6518 (lambda* (#:key inputs outputs #:allow-other-keys)
6519 (add-installed-pythonpath inputs outputs)
6520 (setenv "PATH" (string-append (getenv "PATH") ":"
6521 (assoc-ref outputs "out") "/bin"))
2d7db192 6522 (invoke "make" "test"))))))
44d10b1f
RW
6523 (build-system python-build-system)
6524 (native-inputs
6525 `(("python-coverage" ,python-coverage)
6526 ("which" ,which)))
6527 (synopsis "Simple testing framework for command line applications")
6528 (description
6529 "Cram is a functional testing framework for command line applications.
6530Cram tests look like snippets of interactive shell sessions. Cram runs each
6531command and compares the command output in the test with the command’s actual
6532output.")
6533 (license license:gpl2+)))
6534
6535(define-public python2-cram
6536 (package-with-python2 python-cram))
6537
6538(define-public python-straight-plugin
6539 (package
6540 (name "python-straight-plugin")
6541 (version "1.4.1")
6542 (source
6543 (origin
6544 (method url-fetch)
6545 (uri (pypi-uri "straight.plugin" version))
6546 (sha256
6547 (base32
6548 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6549 (build-system python-build-system)
6550 (home-page "https://github.com/ironfroggy/straight.plugin")
6551 (synopsis "Simple namespaced plugin facility")
6552 (description "Straight Plugin provides a type of plugin you can create from
6553almost any existing Python modules, and an easy way for outside developers to
6554add functionality and customization to your projects with their own plugins.")
6555 (license license:expat)))
6556
6557(define-public python2-straight-plugin
6558 (package-with-python2 python-straight-plugin))
6559
6560(define-public python-fonttools
6561 (package
6562 (name "python-fonttools")
6563 (version "3.28.0")
6564 (source (origin
6565 (method url-fetch)
6566 (uri (pypi-uri "fonttools" version ".zip"))
6567 (sha256
6568 (base32
6569 "0vsvjhidpb5kywpjgz1j3fywzkddxkb0afqai18qa3h6lqjyxwpb"))))
6570 (build-system python-build-system)
6571 (native-inputs
6572 `(("unzip" ,unzip)
6573 ("python-pytest" ,python-pytest)
6574 ("python-pytest-runner" ,python-pytest-runner)))
6575 (home-page "https://github.com/behdad/fonttools")
6576 (synopsis "Tools to manipulate font files")
6577 (description
6578 "FontTools/TTX is a library to manipulate font files from Python. It
6579supports reading and writing of TrueType/OpenType fonts, reading and writing
6580of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6581also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6582from an XML-based format.")
6583 (license license:expat)))
6584
6585(define-public python2-fonttools
6586 (package-with-python2 python-fonttools))
6587
6588(define-public python-ly
6589 (package
6590 (name "python-ly")
6591 (version "0.9.5")
6592 (source
6593 (origin
6594 (method url-fetch)
6595 (uri (pypi-uri name version))
6596 (sha256
6597 (base32
6598 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
6599 (build-system python-build-system)
6600 (arguments
6601 ;; FIXME: Some tests need network access.
6602 '(#:tests? #f))
6603 (synopsis "Tool and library for manipulating LilyPond files")
6604 (description "This package provides a Python library to parse, manipulate
6605or create documents in LilyPond format. A command line program ly is also
6606provided that can be used to do various manipulations with LilyPond files.")
6607 (home-page "https://pypi.python.org/pypi/python-ly")
6608 (license license:gpl2+)))
6609
6610(define-public python-appdirs
6611 (package
6612 (name "python-appdirs")
6613 (version "1.4.3")
6614 (source
6615 (origin
6616 (method url-fetch)
6617 (uri (pypi-uri "appdirs" version))
6618 (sha256
6619 (base32
6620 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
6621 (build-system python-build-system)
6622 (home-page "https://github.com/ActiveState/appdirs")
6623 (synopsis
6624 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6625 (description
6626 "This module provides a portable way of finding out where user data
6627should be stored on various operating systems.")
6628 (license license:expat)))
6629
6630(define-public python2-appdirs
6631 (package-with-python2 python-appdirs))
6632
6633(define-public python-llfuse
6634 (package
6635 (name "python-llfuse")
6636 (version "1.3.5")
6637 (source (origin
6638 (method url-fetch)
6639 (uri (pypi-uri "llfuse" version ".tar.bz2"))
6640 (sha256
6641 (base32
6642 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
6643 (build-system python-build-system)
6644 (inputs
6645 `(("fuse" ,fuse)
6646 ("attr" ,attr)))
6647 (native-inputs
6648 `(("pkg-config" ,pkg-config)))
6649 (synopsis "Python bindings for FUSE")
6650 (description
6651 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6652 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
6653 (license license:lgpl2.0+)
6654 (properties `((python2-variant . ,(delay python2-llfuse))))))
6655
6656(define-public python2-llfuse
6657 (package (inherit (package-with-python2
6658 (strip-python2-variant python-llfuse)))
6659 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6660
6661;; For attic-0.16
6662(define-public python-llfuse-0.41
6663 (package (inherit python-llfuse)
6664 (version "0.41.1")
6665 (source (origin
6666 (method url-fetch)
6667 (uri (string-append
6668 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6669 "llfuse-" version ".tar.bz2"))
6670 (sha256
6671 (base32
6672 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
6673 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6674 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
6675 (license (list license:expat license:lgpl2.0+))))
6676
6677(define-public python-msgpack
6678 (package
6679 (name "python-msgpack")
6680 (version "0.5.6")
6681 (source (origin
6682 (method url-fetch)
6683 (uri (pypi-uri "msgpack" version))
6684 (sha256
6685 (base32
6686 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
6687 (build-system python-build-system)
6688 (arguments
6689 `(#:modules ((guix build utils)
6690 (guix build python-build-system)
6691 (ice-9 ftw)
6692 (srfi srfi-1)
6693 (srfi srfi-26))
6694 #:phases
6695 (modify-phases %standard-phases
6696 (replace 'check
6697 (lambda _
6698 (let ((cwd (getcwd)))
6699 (setenv "PYTHONPATH"
6700 (string-append cwd "/build/"
6701 (find (cut string-prefix? "lib" <>)
6702 (scandir (string-append cwd "/build")))
6703 ":"
6704 (getenv "PYTHONPATH")))
6705 (invoke "pytest" "-v" "test")))))))
6706 (native-inputs
6707 `(("python-pytest" ,python-pytest)))
6708 (synopsis "MessagePack (de)serializer")
6709 (description "MessagePack is a fast, compact binary serialization format,
6710suitable for similar data to JSON. This package provides CPython bindings for
6711reading and writing MessagePack data.")
6712 (home-page "https://pypi.python.org/pypi/msgpack/")
6713 (license license:asl2.0)))
6714
6715;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
6716;; release 0.5. Some packages like borg still call it by the old name for now.
6717;; <https://bugs.gnu.org/30662>
6718(define-public python-msgpack-transitional
6719 (package
6720 (inherit python-msgpack)
6721 (name "python-msgpack-transitional")
6722 (arguments
6723 (substitute-keyword-arguments (package-arguments python-msgpack)
6724 ((#:phases phases)
6725 `(modify-phases ,phases
6726 (add-after 'unpack 'configure-transitional
6727 (lambda _
6728 ;; Keep using the old name.
6729 (substitute* "setup.py"
6730 (("TRANSITIONAL = False")
6731 "TRANSITIONAL = 1"))
6732 #t))))))))
6733
6734(define-public python2-msgpack
6735 (package-with-python2 python-msgpack))
6736
6737(define-public python-netaddr
6738 (package
6739 (name "python-netaddr")
6740 (version "0.7.19")
6741 (source
6742 (origin
6743 (method url-fetch)
6744 (uri (pypi-uri "netaddr" version))
6745 (sha256
6746 (base32
6747 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
6748 (build-system python-build-system)
6749 (arguments `(#:tests? #f)) ;; No tests.
6750 (home-page "https://github.com/drkjam/netaddr/")
6751 (synopsis "Pythonic manipulation of network addresses")
6752 (description
6753 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6754and MAC network addresses.")
6755 (license license:bsd-3)))
6756
6757(define-public python2-netaddr
6758 (package-with-python2 python-netaddr))
6759
6760(define-public python-wrapt
6761 (package
6762 (name "python-wrapt")
dddd7a75 6763 (version "1.11.1")
44d10b1f
RW
6764 (source
6765 (origin
6766 (method url-fetch)
6767 (uri (pypi-uri "wrapt" version))
6768 (sha256
6769 (base32
dddd7a75 6770 "0cqmysny1pz01jw26q48q5zasvns6507rwhgm6wcw743f0r01sja"))))
44d10b1f
RW
6771 (build-system python-build-system)
6772 (arguments
6773 ;; Tests are not included in the tarball, they are only available in the
6774 ;; git repository.
6775 `(#:tests? #f))
6776 (home-page "https://github.com/GrahamDumpleton/wrapt")
6777 (synopsis "Module for decorators, wrappers and monkey patching")
6778 (description
6779 "The aim of the wrapt module is to provide a transparent object proxy for
6780 Python, which can be used as the basis for the construction of function
6781 wrappers and decorator functions.")
6782 (license license:bsd-2)))
6783
6784(define-public python2-wrapt
6785 (package-with-python2 python-wrapt))
6786
6787(define-public python-xlrd
6788 (package
6789 (name "python-xlrd")
6790 (version "1.0.0")
6791 (source (origin
6792 (method url-fetch)
6793 (uri (pypi-uri "xlrd" version))
6794 (sha256
6795 (base32
6796 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
6797 (build-system python-build-system)
6798 (arguments
6799 `(#:phases
6800 (modify-phases %standard-phases
6801 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
6802 ;; run tests instead for now.
45fd0081 6803 (replace 'check (lambda _ (invoke "nosetests"))))))
44d10b1f
RW
6804 (native-inputs `(("python-nose" ,python-nose)))
6805 (home-page "http://www.python-excel.org/")
6806 (synopsis "Library for extracting data from Excel files")
6807 (description "This packages provides a library to extract data from
6808spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
6809@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
6810Unicode-aware. It is not intended as an end-user tool.")
6811 (license license:bsd-3)))
6812
6813(define-public python2-xlrd
6814 (package-with-python2 python-xlrd))
6815
6816(define-public python-prettytable
6817 (package
6818 (name "python-prettytable")
6819 (version "0.7.2")
6820 (source
6821 (origin
6822 (method url-fetch)
337c3a1e 6823 (uri (pypi-uri "prettytable" version ".tar.bz2"))
44d10b1f
RW
6824 (sha256
6825 (base32
6826 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
6827 (build-system python-build-system)
6828 (home-page "http://code.google.com/p/prettytable/")
6829 (synopsis "Display tabular data in an ASCII table format")
6830 (description
6831 "A library designed to represent tabular data in visually appealing ASCII
6832tables. PrettyTable allows for selection of which columns are to be printed,
6833independent alignment of columns (left or right justified or centred) and
6834printing of sub-tables by specifying a row range.")
6835 (license license:bsd-3)))
6836
6837(define-public python2-prettytable
6838 (package-with-python2 python-prettytable))
6839
6840(define-public python-tables
6841 (package
6842 (name "python-tables")
6843 (version "3.4.4")
6844 (source
6845 (origin
6846 (method url-fetch)
6847 (uri (pypi-uri "tables" version))
6848 (sha256
6849 (base32
6850 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
6851 (modules '((guix build utils)))
6852 (snippet
6853 '(begin
6854 ;; Remove pre-compiled .pyc files from source.
6855 (for-each delete-file-recursively
6856 (find-files "." "__pycache__" #:directories? #t))
6857 (for-each delete-file (find-files "." "\\.pyc$"))
6858 #t))))
6859 (build-system python-build-system)
6860 (arguments
6861 `(;; FIXME: python-build-system does not pass configure-flags to "build"
6862 ;; or "check", so we must override the build and check phases.
6863 #:phases
6864 (modify-phases %standard-phases
6865 (add-after 'unpack 'use-gcc
6866 (lambda _
6867 (substitute* "setup.py"
6868 (("compiler = new_compiler\\(\\)" line)
6869 (string-append line
6870 "\ncompiler.set_executables(compiler='gcc',"
6871 "compiler_so='gcc',"
6872 "linker_exe='gcc',"
6873 "linker_so='gcc -shared')")))
6874 #t))
6875 (replace 'build
6876 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
6877 (invoke "python" "setup.py" "build"
6878 (string-append "--hdf5="
6879 (assoc-ref inputs "hdf5")))))
44d10b1f
RW
6880 (replace 'check
6881 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
6882 (invoke "python" "setup.py" "check"
6883 (string-append "--hdf5="
6884 (assoc-ref inputs "hdf5"))))))))
44d10b1f
RW
6885 (propagated-inputs
6886 `(("python-numexpr" ,python-numexpr)
6887 ("python-numpy" ,python-numpy)))
6888 (native-inputs
6889 `(("python-cython" ,python-cython)
6890 ("pkg-config" ,pkg-config)))
6891 (inputs
6892 `(("hdf5" ,hdf5)
6893 ("bzip2" ,bzip2)
6894 ("zlib" ,zlib)))
6895 (home-page "http://www.pytables.org/")
6896 (synopsis "Hierarchical datasets for Python")
6897 (description "PyTables is a package for managing hierarchical datasets and
6898designed to efficiently cope with extremely large amounts of data.")
6899 (license license:bsd-3)))
6900
6901(define-public python2-tables
6902 (package-with-python2 python-tables))
6903
6904(define-public python-pyasn1
6905 (package
6906 (name "python-pyasn1")
6907 (version "0.4.3")
6908 (source
6909 (origin
6910 (method url-fetch)
6911 (uri (pypi-uri "pyasn1" version))
6912 (sha256
6913 (base32
6914 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
6915 (build-system python-build-system)
6916 (home-page "http://pyasn1.sourceforge.net/")
6917 (synopsis "ASN.1 types and codecs")
6918 (description
6919 "This is an implementation of ASN.1 types and codecs in Python. It is
6920suitable for a wide range of protocols based on the ASN.1 specification.")
6921 (license license:bsd-2)))
6922
6923(define-public python2-pyasn1
6924 (package-with-python2 python-pyasn1))
6925
6926(define-public python-pyasn1-modules
6927 (package
6928 (name "python-pyasn1-modules")
6929 (version "0.2.2")
6930 (source
6931 (origin
6932 (method url-fetch)
6933 (uri (pypi-uri "pyasn1-modules" version))
6934 (sha256
6935 (base32
6936 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
6937 (build-system python-build-system)
6938 (propagated-inputs
6939 `(("python-pyasn1" ,python-pyasn1)))
6940 (home-page "https://sourceforge.net/projects/pyasn1/")
6941 (synopsis "ASN.1 codec implementations")
6942 (description
6943 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
6944implementations of ASN.1-based codecs and protocols.")
6945 (license license:bsd-3)))
6946
6947(define-public python2-pyasn1-modules
6948 (package-with-python2 python-pyasn1-modules))
6949
6950(define-public python-ipaddress
6951 (package
6952 (name "python-ipaddress")
6953 (version "1.0.22")
6954 (source (origin
6955 (method url-fetch)
6956 (uri (pypi-uri "ipaddress" version))
6957 (sha256
6958 (base32
6959 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
6960 (build-system python-build-system)
6961 (home-page "https://github.com/phihag/ipaddress")
6962 (synopsis "IP address manipulation library")
6963 (description
6964 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
6965 in Python. This library is used to create, poke at, and manipulate IPv4 and
6966 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
6967 module to older versions of Python.")
6968 (license license:psfl)))
6969
6970(define-public python2-ipaddress
6971 (package-with-python2 python-ipaddress))
6972
6973(define-public python2-ipaddr
6974 (package
6975 (name "python2-ipaddr")
6976 (version "2.1.11")
6977 (source
6978 (origin
6979 (method url-fetch)
6980 (uri (pypi-uri "ipaddr" version))
6981 (sha256
6982 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
6983 (build-system python-build-system)
6984 (arguments
6985 `(#:python ,python-2 ;version 2 only
6986 #:phases
6987 (modify-phases %standard-phases
6988 (replace 'check
40b8c4e3 6989 (lambda _ (invoke "python" "ipaddr_test.py"))))))
44d10b1f
RW
6990 (home-page "https://github.com/google/ipaddr-py")
6991 (synopsis "IP address manipulation library")
6992 (description
6993 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
6994IPv6 addresses and networks.
6995
6996For new implementations you may prefer to use the standard module
6997@code{ipaddress}, which was introduced in Python 3.3 and backported to older
6998versions of Python.")
6999 (license license:asl2.0)))
7000
7001(define-public python-idna
7002 (package
7003 (name "python-idna")
e95c9837 7004 (version "2.8")
44d10b1f
RW
7005 (source
7006 (origin
7007 (method url-fetch)
7008 (uri (pypi-uri "idna" version))
7009 (sha256
7010 (base32
e95c9837 7011 "01rlkigdxg17sf9yar1jl8n18ls59367wqh59hnawlyg53vb6my3"))))
44d10b1f
RW
7012 (build-system python-build-system)
7013 (home-page "https://github.com/kjd/idna")
7014 (synopsis "Internationalized domain names in applications")
7015 (description
7016 "This is a library to support the Internationalised Domain Names in
7017Applications (IDNA) protocol as specified in RFC 5891. This version of the
7018protocol is often referred to as “IDNA2008” and can produce different results
7019from the earlier standard from 2003. The library is also intended to act as a
7020suitable drop-in replacement for the “encodings.idna” module that comes with
7021the Python standard library but currently only supports the older 2003
7022specification.")
7023 (license license:bsd-4)))
7024
7025(define-public python2-idna
7026 (package-with-python2 python-idna))
7027
7028(define-public python-idna-ssl
7029 (package
7030 (name "python-idna-ssl")
7031 (version "1.0.1")
7032 (source
7033 (origin
7034 (method url-fetch)
7035 (uri (pypi-uri "idna-ssl" version))
7036 (sha256
7037 (base32
7038 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
7039 (build-system python-build-system)
7040 (arguments
7041 `(#:tests? #f)) ;circular dependency with python-aiohttp
7042 (home-page "https://github.com/aio-libs/idna-ssl")
7043 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
7044 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
7045domains support.")
7046 (license license:expat)))
7047
7048(define-public python-pretend
7049 (package
7050 (name "python-pretend")
7051 (version "1.0.9")
7052 (source
7053 (origin
7054 (method url-fetch)
9f1f22ee 7055 (uri (pypi-uri "pretend" version))
44d10b1f
RW
7056 (sha256
7057 (base32
7058 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
7059 (build-system python-build-system)
7060 (home-page "https://github.com/alex/pretend")
7061 (synopsis "Library for stubbing in Python")
7062 (description
7063 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7064technique for writing tests. You may hear the term mixed up with mocks,
7065fakes, or doubles. Basically, a stub is an object that returns pre-canned
7066responses, rather than doing any computation.")
7067 (license license:bsd-3)))
7068
7069(define-public python2-pretend
7070 (package-with-python2 python-pretend))
7071
7072(define-public python-pip
7073 (package
7074 (name "python-pip")
7075 (version "18.1")
7076 (source
7077 (origin
7078 (method url-fetch)
7079 (uri (pypi-uri "pip" version))
7080 (sha256
7081 (base32
7082 "188fclay154s520n43s7cxxlhdaiysvxf19zk8vr1xbyjyyr58n0"))))
7083 (build-system python-build-system)
7084 (arguments
7085 '(#:tests? #f)) ; there are no tests in the pypi archive.
7086 (home-page "https://pip.pypa.io/")
7087 (synopsis "Package manager for Python software")
7088 (description
7089 "Pip is a package manager for Python software, that finds packages on the
7090Python Package Index (PyPI).")
7091 (license license:expat)))
7092
7093(define-public python2-pip
7094 (package-with-python2 python-pip))
7095
7096(define-public python-tlsh
7097 (package
7098 (name "python-tlsh")
7099 (version "3.4.5")
7100 (home-page "https://github.com/trendmicro/tlsh")
3e3ff8ad
TGR
7101 (source
7102 (origin
7103 (method git-fetch)
7104 (uri (git-reference
7105 (url "https://github.com/trendmicro/tlsh.git")
7106 (commit (string-append "v" version))))
7107 (file-name (git-file-name name version))
7108 (sha256
7109 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
44d10b1f
RW
7110 (build-system cmake-build-system)
7111 (arguments
7112 '(#:out-of-source? #f
7113 #:phases (modify-phases %standard-phases
7114 (replace
7115 'install
7116 (lambda* (#:key outputs #:allow-other-keys)
7117 ;; Build and install the Python bindings. The underlying
7118 ;; C++ library is apparently not meant to be installed.
7119 (let ((out (assoc-ref outputs "out")))
7120 (with-directory-excursion "py_ext"
7121 (and (system* "python" "setup.py" "build")
7122 (system* "python" "setup.py" "install"
7123 (string-append "--prefix=" out))))))))))
7124 (inputs `(("python" ,python-wrapper))) ;for the bindings
7125 (synopsis "Fuzzy matching library for Python")
7126 (description
7127 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7128Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7129value which can be used for similarity comparisons. Similar objects have
7130similar hash values, which allows for the detection of similar objects by
7131comparing their hash values. The byte stream should have a sufficient amount
7132of complexity; for example, a byte stream of identical bytes will not generate
7133a hash value.")
7134 (license license:asl2.0)))
7135
7136(define-public python2-tlsh
7137 (package
7138 (inherit python-tlsh)
7139 (name "python2-tlsh")
7140 (inputs `(("python" ,python-2)))))
7141
7142(define-public python-termcolor
7143 (package
7144 (name "python-termcolor")
7145 (version "1.1.0")
7146 (source
7147 (origin
7148 (method url-fetch)
7149 (uri (pypi-uri "termcolor" version))
7150 (sha256
7151 (base32
7152 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7153 (build-system python-build-system)
7154 (arguments
7155 ;; There are no tests.
7156 `(#:tests? #f))
7157 (home-page "https://pypi.python.org/pypi/termcolor")
7158 (synopsis "ANSII Color formatting for terminal output")
7159 (description
7160 "This package provides ANSII Color formatting for output in terminals.")
7161 (license license:expat)))
7162
7163(define-public python2-termcolor
7164 (package-with-python2 python-termcolor))
7165
7166(define-public python-libarchive-c
7167 (package
7168 (name "python-libarchive-c")
7169 (version "2.8")
7170 (source (origin
7171 (method url-fetch)
7172 (uri (pypi-uri "libarchive-c" version))
7173 (sha256
7174 (base32
7175 "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06"))))
7176 (build-system python-build-system)
7177 (arguments
7178 '(#:phases (modify-phases %standard-phases
7179 (add-before
7180 'build 'reference-libarchive
7181 (lambda* (#:key inputs #:allow-other-keys)
7182 ;; Retain the absolute file name of libarchive.so.
7183 (let ((libarchive (assoc-ref inputs "libarchive")))
7184 (substitute* "libarchive/ffi.py"
7185 (("find_library\\('archive'\\)")
7186 (string-append "'" libarchive
7187 "/lib/libarchive.so'"))))))
7188 (replace 'check
7189 (lambda _ (invoke "pytest" "-vv"))))))
7190 (native-inputs
7191 `(("python-mock" ,python-mock)
7192 ("python-pytest" ,python-pytest)))
7193 (inputs
7194 `(("libarchive" ,libarchive)))
7195 (home-page "https://github.com/Changaco/python-libarchive-c")
7196 (synopsis "Python interface to libarchive")
7197 (description
7198 "This package provides Python bindings to libarchive, a C library to
7199access possibly compressed archives in many different formats. It uses
7200Python's @code{ctypes} foreign function interface (FFI).")
7201 (license license:lgpl2.0+)))
7202
7203(define-public python2-libarchive-c
7204 (package-with-python2 python-libarchive-c))
7205
7206(define-public python-file
7207 (package
7208 (inherit file)
7209 (name "python-file")
7210 (build-system python-build-system)
7211 (arguments
7212 '(#:tests? #f ;no tests
7213 #:configure-flags '("--single-version-externally-managed" "--root=/")
7214 #:phases (modify-phases %standard-phases
7215 (add-before 'build 'change-directory
7216 (lambda _
7217 (chdir "python")
7218 #t))
7219 (add-before 'build 'set-library-file-name
7220 (lambda* (#:key inputs #:allow-other-keys)
7221 (let ((file (assoc-ref inputs "file")))
7222 (substitute* "magic.py"
7223 (("find_library\\('magic'\\)")
7224 (string-append "'" file "/lib/libmagic.so'")))
7225 #t))))))
7226 (inputs `(("file" ,file)))
528ea990
LC
7227 (native-inputs (if (%current-target-system)
7228 `(("self" ,this-package))
7229 '()))
44d10b1f
RW
7230 (synopsis "Python bindings to the libmagic file type guesser. Note that
7231this module and the python-magic module both provide a \"magic.py\" file;
7232these two modules, which are different and were developed separately, both
7233serve the same purpose: provide Python bindings for libmagic.")))
7234
7235(define-public python2-file
7236 (package-with-python2 python-file))
7237
7238(define-public python-debian
7239 (package
7240 (name "python-debian")
7241 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
7242 (version "0.1.28")
7243 (source
7244 (origin
7245 (method url-fetch)
7246 (uri (pypi-uri name version))
7247 (sha256
7248 (base32
7249 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
7250 (build-system python-build-system)
7251 (propagated-inputs
7252 `(("python-six" ,python-six)))
7253 (synopsis "Debian package related modules")
7254 (description
7255 ;; XXX: Use @enumerate instead of @itemize to work around
7256 ;; <http://bugs.gnu.org/21772>.
7257 "This package provides Python modules that abstract many formats of
7258Debian-related files, such as:
7259
7260@enumerate
7261@item Debtags information;
7262@item @file{debian/changelog} files;
7263@item packages files, pdiffs;
7264@item control files of single or multiple RFC822-style paragraphs---e.g.
7265 @file{debian/control}, @file{.changes}, @file{.dsc};
7266@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7267 contained files and meta-information.
7268@end enumerate\n")
7269
7270 ;; Modules are either GPLv2+ or GPLv3+.
7271 (license license:gpl3+)))
7272
7273(define-public python2-debian
7274 (package-with-python2 python-debian))
7275
7276(define-public python-nbformat
7277 (package
7278 (name "python-nbformat")
7279 (version "4.4.0")
7280 (source
7281 (origin
7282 (method url-fetch)
7283 (uri (pypi-uri "nbformat" version))
7284 (sha256
7285 (base32
7286 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
7287 (build-system python-build-system)
7288 (arguments `(#:tests? #f)) ; no test target
7289 (propagated-inputs
7290 `(("python-ipython-genutils" ,python-ipython-genutils)
7291 ("python-jsonschema" ,python-jsonschema)
7292 ("python-jupyter-core" ,python-jupyter-core)
7293 ("python-traitlets" ,python-traitlets)))
7294 (home-page "http://jupyter.org")
7295 (synopsis "Jupyter Notebook format")
7296 (description "This package provides the reference implementation of the
7297Jupyter Notebook format and Python APIs for working with notebooks.")
7298 (license license:bsd-3)))
7299
7300(define-public python2-nbformat
7301 (package-with-python2 python-nbformat))
7302
7303(define-public python-bleach
7304 (package
7305 (name "python-bleach")
7306 (version "1.4.3")
7307 (source
7308 (origin
7309 (method url-fetch)
7310 (uri (pypi-uri "bleach" version))
7311 (sha256
7312 (base32
7313 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
7314 (build-system python-build-system)
7315 (propagated-inputs
7316 `(("python-html5lib" ,python-html5lib-0.9)
7317 ("python-six" ,python-six)))
7318 (native-inputs
7319 `(("python-nose" ,python-nose)))
7320 (home-page "https://github.com/jsocol/bleach")
7321 (synopsis "Whitelist-based HTML-sanitizing tool")
7322 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7323 (license license:asl2.0)))
7324
7325(define-public python2-bleach
7326 (package-with-python2 python-bleach))
7327
7328(define-public python-entrypoints
7329 (package
7330 (name "python-entrypoints")
a7f1b718 7331 (version "0.3")
44d10b1f
RW
7332 (source
7333 (origin
7334 (method url-fetch)
a7f1b718 7335 (uri (pypi-uri "entrypoints" version))
44d10b1f
RW
7336 (sha256
7337 (base32
a7f1b718 7338 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
44d10b1f
RW
7339 (build-system python-build-system)
7340 ;; The package does not come with a setup.py file, so we have to generate
7341 ;; one ourselves.
7342 (arguments
7343 `(#:tests? #f
7344 #:phases
7345 (modify-phases %standard-phases
7346 (add-after 'unpack 'create-setup.py
7347 (lambda _
7348 (call-with-output-file "setup.py"
7349 (lambda (port)
7350 (format port "\
7351from setuptools import setup
7352setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7353" ,version))))))))
7354 (home-page "https://github.com/takluyver/entrypoints")
7355 (synopsis "Discover and load entry points from installed Python packages")
7356 (description "Entry points are a way for Python packages to advertise
7357objects with some common interface. The most common examples are
7358@code{console_scripts} entry points, which define shell commands by
7359identifying a Python function to run. The @code{entrypoints} module contains
7360functions to find and load entry points.")
7361 (license license:expat)))
7362
7363(define-public python2-entrypoints
7364 (package-with-python2 python-entrypoints))
7365
7366(define-public python-nbconvert
7367 (package
7368 (name "python-nbconvert")
7369 (version "5.0.0b1")
7370 (source
7371 (origin
7372 (method url-fetch)
7373 (uri (pypi-uri "nbconvert" version))
7374 (sha256
7375 (base32
7376 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7377 (build-system python-build-system)
7378 (arguments
7379 `(;; The "bdist_egg" target is disabled by default, causing the installation
7380 ;; to fail.
7381 #:configure-flags (list "bdist_egg")
7382 ;; FIXME: 5 failures, 40 errors.
7383 #:tests? #f))
7384 ;; #:phases
7385 ;; (modify-phases %standard-phases
7386 ;; (replace 'check
7387 ;; (lambda _
7388 ;; (zero? (system* "py.test" "-v")))))
7389 (native-inputs
7390 `(("python-pytest" ,python-pytest)))
7391 (propagated-inputs
7392 `(("python-bleach" ,python-bleach)
7393 ("python-entrypoints" ,python-entrypoints)
7394 ("python-jinja2" ,python-jinja2)
7395 ("python-jupyter-core" ,python-jupyter-core)
7396 ("python-mistune" ,python-mistune)
7397 ("python-nbformat" ,python-nbformat)
7398 ("python-pygments" ,python-pygments)
7399 ("python-traitlets" ,python-traitlets)))
7400 (home-page "http://jupyter.org")
7401 (synopsis "Converting Jupyter Notebooks")
7402 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7403notebooks to various other formats via Jinja templates. It allows you to
7404convert an @code{.ipynb} notebook file into various static formats including:
7405
7406@enumerate
7407@item HTML
7408@item LaTeX
7409@item PDF
7410@item Reveal JS
7411@item Markdown (md)
7412@item ReStructured Text (rst)
7413@item executable script
7414@end enumerate\n")
7415 (license license:bsd-3)))
7416
7417(define-public python2-nbconvert
7418 (package-with-python2 python-nbconvert))
7419
44d10b1f
RW
7420(define-public python-notebook
7421 (package
7422 (name "python-notebook")
7423 (version "5.7.4")
7424 (source (origin
7425 (method url-fetch)
7426 (uri (pypi-uri "notebook" version))
7427 (sha256
7428 (base32
7429 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
7430 (build-system python-build-system)
7431 (arguments
7432 `(#:phases
7433 (modify-phases %standard-phases
7434 (replace 'check
7435 (lambda _
7436 ;; These tests require a browser
7437 (delete-file-recursively "notebook/tests/selenium")
7438 ;; Some tests need HOME
7439 (setenv "HOME" "/tmp")
7440 ;; This file contains "warningfilters", which are not supported
7441 ;; by this version of nose.
7442 (delete-file "setup.cfg")
7443 (with-directory-excursion "/tmp"
7444 (invoke "nosetests" "-v"))
7445 #t)))))
7446 (propagated-inputs
7447 `(("python-jupyter-core" ,python-jupyter-core)
7448 ("python-nbformat" ,python-nbformat)
7449 ("python-nbconvert" ,python-nbconvert)
7450 ("python-prometheus-client" ,python-prometheus-client)
7451 ("python-send2trash" ,python-send2trash)
7452 ("python-terminado" ,python-terminado)))
7453 (native-inputs
7454 `(("python-nose" ,python-nose)
7455 ("python-sphinx" ,python-sphinx)
7456 ("python-requests" ,python-requests)))
7457 (home-page "http://jupyter.org/")
7458 (synopsis "Web-based notebook environment for interactive computing")
7459 (description
7460 "The Jupyter HTML notebook is a web-based notebook environment for
7461interactive computing.")
7462 (properties `((python2-variant . ,(delay python2-notebook))))
7463 (license license:bsd-3)))
7464
7465(define-public python2-notebook
7466 (let ((base (package-with-python2
7467 (strip-python2-variant python-notebook))))
7468 (package (inherit base)
7469 (native-inputs
7470 `(("python2-mock" ,python2-mock)
7471 ,@(package-native-inputs base)))
7472 (arguments
7473 (substitute-keyword-arguments (package-arguments base)
7474 ((#:phases phases)
7475 `(modify-phases ,phases
7476 (add-before 'check 'disable-test-case
7477 ;; The test requires network access to localhost. Curiously it
7478 ;; fails with Python 2 only. Simply make the test-case return
7479 ;; immediately.
7480 (lambda _
7481 (substitute*
7482 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7483 (("formats = self.nbconvert_api") "return #")))))))))))
7484
7485(define-public python-widgetsnbextension
7486 (package
7487 (name "python-widgetsnbextension")
7488 (version "3.4.2")
7489 (source
7490 (origin
7491 (method url-fetch)
7492 (uri (pypi-uri "widgetsnbextension" version))
7493 (sha256
7494 (base32
7495 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
7496 (build-system python-build-system)
7497 (propagated-inputs
7498 `(("python-ipykernel" ,python-ipykernel)
7499 ("python-notebook" ,python-notebook)))
7500 (native-inputs
7501 `(("python-certifi" ,python-certifi)
7502 ("python-nose" ,python-nose)))
7503 (home-page "https://ipython.org")
7504 (synopsis "IPython HTML widgets for Jupyter")
7505 (description "This package provides interactive HTML widgets for Jupyter
7506notebooks.")
7507 (license license:bsd-3)))
7508
7509(define-public python2-widgetsnbextension
7510 (package-with-python2 python-widgetsnbextension))
7511
7512(define-public python-ipywidgets
7513 (package
7514 (name "python-ipywidgets")
7515 (version "5.2.2")
7516 (source
7517 (origin
7518 (method url-fetch)
7519 (uri (pypi-uri "ipywidgets" version))
7520 (sha256
7521 (base32
7522 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7523 (build-system python-build-system)
7524 (propagated-inputs
7525 `(("python-ipython" ,python-ipython)
7526 ("python-traitlets" ,python-traitlets)
7527 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7528 (native-inputs
7529 `(("python-nose" ,python-nose)
7530 ("python-pytest" ,python-pytest)))
7531 (home-page "https://ipython.org")
7532 (synopsis "IPython HTML widgets for Jupyter")
7533 (description "Ipywidgets are interactive HTML widgets for Jupyter
7534notebooks and the IPython kernel. Notebooks come alive when interactive
7535widgets are used. Users gain control of their data and can visualize changes
7536in the data.")
7537 (license license:bsd-3)))
7538
7539(define-public python2-ipywidgets
7540 (package-with-python2 python-ipywidgets))
7541
7542(define-public python-jupyter-console
7543 (package
7544 (name "python-jupyter-console")
7545 (version "5.2.0")
7546 (source
7547 (origin
7548 (method url-fetch)
7549 (uri (pypi-uri "jupyter_console" version))
7550 (sha256
7551 (base32
7552 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
7553 (build-system python-build-system)
7554 ;; Tests only run in an TTY.
7555 (arguments `(#:tests? #f))
7556 (propagated-inputs
7557 `(("python-ipykernel" ,python-ipykernel)
7558 ("python-jupyter-client" ,python-jupyter-client)
7559 ("python-prompt-toolkit" ,python-prompt-toolkit-1)
7560 ("python-pygments" ,python-pygments)))
7561 (native-inputs
7562 `(("python-nose" ,python-nose)))
7563 (home-page "https://jupyter.org")
7564 (synopsis "Jupyter terminal console")
7565 (description "This package provides a terminal-based console frontend for
7566Jupyter kernels. It also allows for console-based interaction with non-Python
7567Jupyter kernels such as IJulia and IRKernel.")
7568 (license license:bsd-3)))
7569
7570(define-public python2-jupyter-console
7571 (package-with-python2 python-jupyter-console))
7572
7573;; The python-ipython and python-jupyter-console require each other. To get
7574;; the functionality in both packages working, strip down the
7575;; python-jupyter-console package when using it as an input to python-ipython.
7576(define python-jupyter-console-minimal
7577 (package
7578 (inherit python-jupyter-console)
7579 (name "python-jupyter-console-minimal")
7580 (arguments
7581 (substitute-keyword-arguments
7582 (package-arguments python-jupyter-console)
7583 ((#:phases phases)
7584 `(modify-phases ,phases
7585 (add-after 'install 'delete-bin
7586 (lambda* (#:key outputs #:allow-other-keys)
7587 ;; Delete the bin files, to avoid conflicts in profiles
7588 ;; where python-ipython and python-jupyter-console are
7589 ;; both present.
7590 (delete-file-recursively
7591 (string-append
7592 (assoc-ref outputs "out") "/bin"))))))))
7593 ;; Remove the python-ipython propagated input, to avoid the cycle
7594 (propagated-inputs
7595 (alist-delete
7596 "python-ipython"
7597 (package-propagated-inputs python-jupyter-console)))))
7598
7599(define-public python-qtconsole
7600 (package
7601 (name "python-qtconsole")
7602 (version "4.4.3")
7603 (source
7604 (origin
7605 (method url-fetch)
7606 (uri (pypi-uri "qtconsole" version))
7607 (sha256
7608 (base32
7609 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
7610 (build-system python-build-system)
7611 (arguments
7612 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
7613 ;; but we only have the LTS version 5.x. This means that there might be
7614 ;; runtime errors, but since this is a dependency of the Jupyter package,
7615 ;; and Jupyter can be used without the qtconsole we can overlook this for
7616 ;; now.
7617 `(#:tests? #f
7618 #:phases
7619 (modify-phases %standard-phases
7620 (add-before 'check 'pre-check
7621 (lambda _
7622 (setenv "QT_QPA_PLATFORM" "offscreen")
7623 #t)))))
7624 (propagated-inputs
7625 `(("python-ipykernel" ,python-ipykernel)
7626 ("python-ipython" ,python-ipython)))
7627 (native-inputs
7628 `(("python-pytest" ,python-pytest)))
7629 (home-page "http://jupyter.org")
7630 (synopsis "Jupyter Qt console")
7631 (description "This package provides a Qt-based console for Jupyter with
7632support for rich media output.")
7633 (license license:bsd-3)))
7634
7635(define-public jupyter
7636 (package
7637 (name "jupyter")
7638 (version "1.0.0")
7639 (source
7640 (origin
7641 (method url-fetch)
7642 (uri (pypi-uri "jupyter" version))
7643 (sha256
7644 (base32
7645 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
7646 (build-system python-build-system)
7647 (arguments '(#:tests? #f)) ; there are none.
7648 (propagated-inputs
7649 `(("python-ipykernel" ,python-ipykernel)
7650 ("python-ipywidgets" ,python-ipywidgets)
7651 ("python-jupyter-console" ,python-jupyter-console)
7652 ("python-nbconvert" ,python-nbconvert)
7653 ("python-notebook" ,python-notebook)
7654 ("python-qtconsole" ,python-qtconsole)))
7655 (native-search-paths
7656 (list (search-path-specification
7657 (variable "JUPYTER_PATH")
7658 (files '("share/jupyter")))))
7659 (home-page "https://jupyter.org")
7660 (synopsis "Web application for interactive documents")
7661 (description
7662 "The Jupyter Notebook is a web application that allows you to create and
7663share documents that contain live code, equations, visualizations and
7664explanatory text. Uses include: data cleaning and transformation, numerical
7665simulation, statistical modeling, machine learning and much more.")
7666 (license license:bsd-3)))
7667
7668(define-public python-chardet
7669 (package
7670 (name "python-chardet")
7671 (version "3.0.4")
7672 (source
7673 (origin
7674 (method url-fetch)
7675 (uri (pypi-uri "chardet" version))
7676 (sha256
7677 (base32
7678 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
7679 (native-inputs
7680 `(("python-hypothesis" ,python-hypothesis)
7681 ("python-pytest" ,python-pytest)
7682 ("python-pytest-runner" ,python-pytest-runner)))
7683 (build-system python-build-system)
7684 (home-page "https://github.com/chardet/chardet")
7685 (synopsis "Universal encoding detector for Python 2 and 3")
7686 (description
7687 "This package provides @code{chardet}, a Python module that can
7688automatically detect a wide range of file encodings.")
7689 (license license:lgpl2.1+)))
7690
7691(define-public python2-chardet
7692 (package-with-python2 python-chardet))
7693
7694(define-public python-docopt
7695 (package
7696 (name "python-docopt")
7697 (version "0.6.2")
7698 (source
7699 (origin
7700 (method url-fetch)
7701 ;; The release on PyPI does not include tests.
7702 (uri (string-append
7703 "https://github.com/docopt/docopt/archive/"
7704 version ".tar.gz"))
7705 (file-name (string-append name "-" version ".tar.gz"))
7706 (sha256
7707 (base32
7708 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
7709 (build-system python-build-system)
7710 (native-inputs
7711 `(("python-pytest" ,python-pytest)))
7712 (arguments
7713 `(#:phases
7714 (modify-phases %standard-phases
7715 (replace 'check
7716 (lambda _ (invoke "py.test"))))))
7717 (home-page "http://docopt.org")
7718 (synopsis "Command-line interface description language for Python")
7719 (description "This library allows the user to define a command-line
7720interface from a program's help message rather than specifying it
7721programatically with command-line parsers like @code{getopt} and
7722@code{argparse}.")
7723 (license license:expat)))
7724
7725(define-public python2-docopt
7726 (package-with-python2 python-docopt))
7727
7728(define-public python-pythondialog
7729 (package
7730 (name "python-pythondialog")
7731 (version "3.4.0")
7732 (source
7733 (origin
7734 (method url-fetch)
7735 (uri (pypi-uri "pythondialog" version))
7736 (sha256
7737 (base32
7738 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
7739 (build-system python-build-system)
7740 (arguments
7741 `(#:phases
7742 (modify-phases %standard-phases
7743 (add-after 'unpack 'patch-path
7744 (lambda* (#:key inputs #:allow-other-keys)
7745 (let* ((dialog (assoc-ref inputs "dialog")))
7746 ;; Since this library really wants to grovel the search path, we
7747 ;; must hardcode dialog's store path into it.
7748 (substitute* "dialog.py"
7749 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
7750 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
7751 #t))))
7752 #:tests? #f)) ; no test suite
7753 (propagated-inputs
7754 `(("dialog" ,dialog)))
7755 (home-page "http://pythondialog.sourceforge.net/")
7756 (synopsis "Python interface to the UNIX dialog utility")
7757 (description "A Python wrapper for the dialog utility. Its purpose is to
7758provide an easy to use, pythonic and comprehensive Python interface to dialog.
7759This allows one to make simple text-mode user interfaces on Unix-like systems")
7760 (license license:lgpl2.1)
7761 (properties `((python2-variant . ,(delay python2-pythondialog))))))
7762
7763(define-public python2-pythondialog
7764 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
7765 (package
7766 (inherit base)
7767 (version (package-version python-pythondialog))
7768 (source (origin
7769 (method url-fetch)
7770 (uri (pypi-uri "python2-pythondialog" version))
7771 (sha256
7772 (base32
7773 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
7774
7775(define-public python-configobj
7776 (package
7777 (name "python-configobj")
7778 (version "5.0.6")
7779 (source (origin
7780 (method url-fetch)
b0758fbb 7781 (uri (pypi-uri "configobj" version))
44d10b1f
RW
7782 (sha256
7783 (base32
7784 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
7785 ;; Patch setup.py so it looks for python-setuptools, which is
7786 ;; required to parse the keyword 'install_requires' in setup.py.
7787 (patches (search-patches "python-configobj-setuptools.patch"))))
7788 (build-system python-build-system)
7789 (propagated-inputs
7790 `(("python-six" ,python-six)))
7791 (synopsis "Config file reading, writing and validation")
7792 (description "ConfigObj is a simple but powerful config file reader and
7793writer: an ini file round tripper. Its main feature is that it is very easy to
7794use, with a straightforward programmer’s interface and a simple syntax for
7795config files.")
7796 (home-page "https://github.com/DiffSK/configobj")
7797 (license license:bsd-3)))
7798
7799(define-public python2-configobj
7800 (package-with-python2 python-configobj))
7801
7802(define-public python-configargparse
7803 (package
7804 (name "python-configargparse")
86ae491f 7805 (version "0.14.0")
44d10b1f
RW
7806 (source (origin
7807 (method url-fetch)
7808 (uri (pypi-uri "ConfigArgParse" version))
7809 (sha256
7810 (base32
86ae491f 7811 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
44d10b1f
RW
7812 (build-system python-build-system)
7813 (native-inputs
7814 `(("python-pyyaml" ,python-pyyaml)))
7815 (arguments
7816 `(#:phases
7817 (modify-phases %standard-phases
7818 (replace 'check
7819 (lambda _
7820 ;; Bypass setuptools-shim because one test relies on "setup.py"
7821 ;; being the first argument passed to the python call.
7822 ;;
7823 ;; NOTE: Many tests do not run because they rely on Python's
7824 ;; built-in test.test_argparse, but we remove the unit tests from
7825 ;; our Python installation.
7826 (invoke "python" "setup.py" "test"))))))
7827 (synopsis "Replacement for argparse")
7828 (description "A drop-in replacement for argparse that allows options to also
7829be set via config files and/or environment variables.")
7830 (home-page "https://github.com/bw2/ConfigArgParse")
7831 (license license:expat)))
7832
7833(define-public python2-configargparse
7834 (package-with-python2 python-configargparse))
7835
7836(define-public python-argparse-manpage
7837 (package
7838 (name "python-argparse-manpage")
7839 (version "1.1")
7840 (source
7841 (origin
7842 (method url-fetch)
7843 (uri (pypi-uri "argparse-manpage" version))
7844 (sha256
7845 (base32
7846 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
7847 (build-system python-build-system)
7848 (home-page "https://github.com/praiskup/argparse-manpage")
7849 (synopsis "Build manual page from Python's ArgumentParser object")
7850 (description
7851 "This package provides tools to build manual pages from Python's
7852@code{ArgumentParser} object.")
7853 (license license:asl2.0)))
7854
7855(define-public python2-contextlib2
7856 (package
7857 (name "python2-contextlib2")
7858 (version "0.5.5")
7859 (source
7860 (origin
7861 (method url-fetch)
7862 (uri (pypi-uri "contextlib2" version))
7863 (sha256
7864 (base32
7865 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
7866 (build-system python-build-system)
7867 (arguments
7868 `(#:python ,python-2
7869 #:phases
7870 (modify-phases %standard-phases
7871 (replace 'check
7872 (lambda _ (invoke "python" "test_contextlib2.py" "-v"))))))
7873 (native-inputs
7874 `(("python2-unittest2" ,python2-unittest2)))
7875 (home-page "http://contextlib2.readthedocs.org/")
7876 (synopsis "Tools for decorators and context managers")
7877 (description "This module is primarily a backport of the Python
78783.2 contextlib to earlier Python versions. Like contextlib, it
7879provides utilities for common tasks involving decorators and context
7880managers. It also contains additional features that are not part of
7881the standard library.")
7882 (license license:psfl)))
7883
7884(define-public python-texttable
7885 (package
7886 (name "python-texttable")
7887 (version "0.8.7")
7888 (source
7889 (origin
7890 (method url-fetch)
7891 (uri (pypi-uri "texttable" version))
7892 (sha256
7893 (base32
7894 "1liiiydgkg37i46a418aw19fyf6z3ds51wdwwpyjbs12x0phhf4a"))))
7895 (build-system python-build-system)
7896 (arguments '(#:tests? #f)) ; no tests
7897 (home-page "https://github.com/foutaise/texttable/")
7898 (synopsis "Python module for creating simple ASCII tables")
7899 (description "Texttable is a Python module for creating simple ASCII
7900tables.")
7901 (license license:lgpl2.1+)))
7902
7903(define-public python2-texttable
7904 (package-with-python2 python-texttable))
7905
7906(define-public python-atomicwrites
7907 (package
7908 (name "python-atomicwrites")
7909 (version "1.1.5")
7910 (source (origin
7911 (method url-fetch)
7912 (uri (pypi-uri "atomicwrites" version))
7913 (sha256
7914 (base32
7915 "11bm90fwm2avvf4f3ib8g925w7jr4m11vcsinn1bi6ns4bm32214"))))
7916 (build-system python-build-system)
7917 (synopsis "Atomic file writes in Python")
7918 (description "Library for atomic file writes using platform dependent tools
7919for atomic file system operations.")
7920 (home-page "https://github.com/untitaker/python-atomicwrites")
7921 (license license:expat)))
7922
7923(define-public python2-atomicwrites
7924 (package-with-python2 python-atomicwrites))
7925
7926(define-public python-click-threading
7927 (package
7928 (name "python-click-threading")
7929 (version "0.4.4")
7930 (source (origin
7931 (method url-fetch)
7932 (uri (pypi-uri "click-threading" version))
7933 (sha256
7934 (base32
7935 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
7936 (build-system python-build-system)
7937 (propagated-inputs
7938 `(("python-click" ,python-click)))
7939 (synopsis "Utilities for multithreading in Click")
7940 (description "This package provides utilities for multithreading in Click
7941applications.")
7942 (home-page "https://github.com/click-contrib/click-threading")
7943 (license license:expat)))
7944
7945(define-public python-click-log
7946 (package
7947 (name "python-click-log")
7948 (version "0.3.2")
7949 (source (origin
7950 (method url-fetch)
7951 (uri (pypi-uri "click-log" version))
7952 (sha256
7953 (base32
7954 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
7955 (build-system python-build-system)
7956 (propagated-inputs
7957 `(("python-click" ,python-click)))
7958 (synopsis "Logging for click applications")
7959 (description "This package provides a Python library for logging Click
7960applications.")
7961 (home-page "https://github.com/click-contrib/click-log")
7962 (license license:expat)))
7963
7964(define-public python-apipkg
7965 (package
7966 (name "python-apipkg")
7967 (version "1.4")
7968 (source (origin
7969 (method url-fetch)
7970 (uri (pypi-uri "apipkg" version))
7971 (sha256
7972 (base32
7973 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
7974 (build-system python-build-system)
7975 (native-inputs
7976 `(("python-pytest" ,python-pytest)))
7977 (synopsis "Namespace control and lazy-import mechanism")
7978 (description "With apipkg you can control the exported namespace of a Python
7979package and greatly reduce the number of imports for your users. It is a small
7980pure Python module that works on virtually all Python versions.")
7981 (home-page "https://github.com/pytest-dev/apipkg")
7982 (license license:expat)))
7983
7984(define-public python2-apipkg
7985 (package-with-python2 python-apipkg))
7986
7987(define-public python-execnet
7988 (package
7989 (name "python-execnet")
7990 (version "1.4.1")
7991 (source (origin
7992 (method url-fetch)
7993 (uri (pypi-uri "execnet" version))
7994 (sha256
7995 (base32
7996 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
7997 (build-system python-build-system)
7998 (arguments
7999 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8000 ;; The two test failures are caused by the lack of an `ssh` executable.
8001 ;; The test suite can be run with pytest after the 'install' phase.
8002 #:tests? #f))
8003 (native-inputs
8004 `(("python-pytest" ,python-pytest)
8005 ("python-setuptools-scm" ,python-setuptools-scm)))
8006 (propagated-inputs
8007 `(("python-apipkg" ,python-apipkg)))
8008 (synopsis "Rapid multi-Python deployment")
8009 (description "Execnet provides a share-nothing model with
8010channel-send/receive communication for distributing execution across many
8011Python interpreters across version, platform and network barriers. It has a
8012minimal and fast API targeting the following uses:
8013@enumerate
8014@item distribute tasks to (many) local or remote CPUs
8015@item write and deploy hybrid multi-process applications
8016@item write scripts to administer multiple environments
8017@end enumerate")
8018 (home-page "http://codespeak.net/execnet/")
8019 (license license:expat)))
8020
8021(define-public python2-execnet
8022 (package-with-python2 python-execnet))
8023
8024(define-public python-icalendar
8025 (package
8026 (name "python-icalendar")
8027 (version "4.0.3")
8028 (source (origin
8029 (method url-fetch)
8030 (uri (pypi-uri "icalendar" version))
8031 (sha256
8032 (base32
8033 "0mk3dk1dxkcm46jy48v27j2w2349iv4sbimqj1yb5js43mx49hh7"))))
8034 (build-system python-build-system)
8035 (propagated-inputs
8036 `(("python-dateutil" ,python-dateutil)
8037 ("python-pytz" ,python-pytz)))
8038 (synopsis "Python library for parsing iCalendar files")
8039 (description "The icalendar package is a parser/generator of iCalendar
8040files for use with Python.")
8041 (home-page "https://github.com/collective/icalendar")
8042 (license license:bsd-2)))
8043
8044(define-public python-sphinxcontrib-newsfeed
8045 (package
8046 (name "python-sphinxcontrib-newsfeed")
8047 (version "0.1.4")
8048 (source (origin
8049 (method url-fetch)
8050 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
8051 (sha256
8052 (base32
8053 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
8054 (arguments '(#:tests? #f)) ; No tests.
8055 (build-system python-build-system)
8056 (propagated-inputs
8057 `(("python-sphinx" ,python-sphinx)))
8058 (synopsis "News Feed extension for Sphinx")
8059 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
8060Blog, News or Announcements section to a Sphinx website.")
8061 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
8062 (license license:bsd-2)))
8063
8064(define-public python-args
8065 (package
8066 (name "python-args")
8067 (version "0.1.0")
8068 (source (origin
8069 (method url-fetch)
8070 (uri (pypi-uri "args" version))
8071 (sha256
8072 (base32
8073 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8074 (build-system python-build-system)
8075 (home-page "https://github.com/kennethreitz/args")
8076 (synopsis "Command-line argument parser")
8077 (description
8078 "This library provides a Python module to parse command-line arguments.")
8079 (license license:bsd-3)))
8080
8081(define-public python2-args
8082 (package-with-python2 python-args))
8083
8084(define-public python-clint
8085 (package
8086 (name "python-clint")
8087 (version "0.5.1")
8088 (source (origin
8089 (method url-fetch)
8090 (uri (pypi-uri "clint" version))
8091 (sha256
8092 (base32
8093 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8094 (build-system python-build-system)
8095 (arguments
8096 '(#:phases
8097 (modify-phases %standard-phases
8098 (replace 'check
8099 (lambda _ (invoke "py.test" "-v"))))))
8100 (native-inputs
8101 `(("python-pytest" ,python-pytest)))
8102 (propagated-inputs
8103 `(("python-args" ,python-args)))
8104 (home-page "https://github.com/kennethreitz/clint")
8105 (synopsis "Command-line interface tools")
8106 (description
8107 "Clint is a Python module filled with a set of tools for developing
8108command-line applications, including tools for colored and indented
8109output, progress bar display, and pipes.")
8110 (license license:isc)))
8111
8112(define-public python2-clint
8113 (package-with-python2 python-clint))
8114
44d10b1f
RW
8115(define-public python-rply
8116 (package
8117 (name "python-rply")
8118 (version "0.7.5")
8119 (source (origin
8120 (method url-fetch)
8121 (uri (pypi-uri "rply" version))
8122 (sha256
8123 (base32
8124 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
8125 (build-system python-build-system)
8126 (propagated-inputs
8127 `(("python-appdirs" ,python-appdirs)))
8128 (home-page "https://github.com/alex/rply")
8129 (synopsis "Parser generator for Python")
8130 (description
8131 "This package provides a pure Python based parser generator, that also
8132works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8133with a new public API, and RPython support.")
8134 (license license:bsd-3)))
8135
8136(define-public python2-rply
8137 (package-with-python2 python-rply))
8138
8139(define-public python-hy
8140 (package
8141 (name "python-hy")
8142 (version "0.13.0")
8143 (source (origin
8144 (method url-fetch)
8145 (uri (pypi-uri "hy" version))
8146 (sha256
8147 (base32
8148 "19sfymaksx9jhksfnb15ahid46mzrhdfzz6yy2craz2qnzvpmky8"))))
8149 (build-system python-build-system)
8150 (arguments
8151 '(#:phases
8152 (modify-phases %standard-phases
8153 (replace 'check
8154 (lambda _
8155 ;; Tests require write access to HOME.
8156 (setenv "HOME" "/tmp")
8157 (invoke "nosetests"))))))
8158 (native-inputs
8159 `(("python-coverage" ,python-coverage)
8160 ("python-nose" ,python-nose)))
8161 (propagated-inputs
8162 `(("python-astor" ,python-astor)
8163 ("python-clint" ,python-clint)
8164 ("python-rply" ,python-rply)))
8165 (home-page "http://hylang.org/")
8166 (synopsis "Lisp frontend to Python")
8167 (description
8168 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8169its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8170Python at your fingertips, in Lisp form.")
8171 (license license:expat)))
8172
8173(define-public python2-hy
8174 (package-with-python2 python-hy))
8175
8176(define-public python2-functools32
8177 (package
8178 (name "python2-functools32")
8179 (version "3.2.3-2")
8180 (source
8181 (origin
8182 (method url-fetch)
8183 (uri (pypi-uri "functools32" version))
8184 (sha256
8185 (base32
8186 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8187 (build-system python-build-system)
8188 (arguments
8189 `(#:python ,python-2
8190 #:tests? #f)) ; no test target
8191 (home-page "https://github.com/MiCHiLU/python-functools32")
8192 (synopsis
8193 "Backport of the functools module from Python 3.2.3")
8194 (description
8195 "This package is a backport of the @code{functools} module from Python
81963.2.3 for use with older versions of Python and PyPy.")
8197 (license license:expat)))
8198
8199(define-public python2-subprocess32
8200 (package
8201 (name "python2-subprocess32")
8202 (version "3.2.7")
8203 (source (origin
8204 (method url-fetch)
8205 (uri (pypi-uri "subprocess32" version))
8206 (sha256
8207 (base32
8208 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
8209 (patches
8210 (search-patches "python2-subprocess32-disable-input-test.patch"))))
8211 (build-system python-build-system)
8212 (arguments
8213 `(#:python ,python-2
8214 ;; The test suite fails with Python > 2.7.13:
8215 ;; import test.support
8216 ;; ImportError: No module named support
8217 #:tests? #f
8218 #:phases
8219 (modify-phases %standard-phases
8220 (add-after 'unpack 'patch-/bin/sh
8221 (lambda _
8222 (substitute* '("subprocess32.py"
8223 "test_subprocess32.py")
8224 (("/bin/sh") (which "sh")))
8225 #t)))))
8226 (home-page "https://github.com/google/python-subprocess32")
8227 (synopsis "Backport of the subprocess module from Python 3.2")
8228 (description
8229 "This is a backport of the @code{subprocess} standard library module
8230from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
8231new features. On POSIX systems it is guaranteed to be reliable when used
8232in threaded applications. It includes timeout support from Python 3.3 but
8233otherwise matches 3.2’s API.")
8234 (license license:psfl)))
8235
8236(define-public python2-futures
8237 (package
8238 (name "python2-futures")
8239 (version "3.2.0")
8240 (source
8241 (origin
8242 (method url-fetch)
8243 (uri (pypi-uri "futures" version))
8244 (sha256
8245 (base32
8246 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
8247 (build-system python-build-system)
8248 (arguments `(#:python ,python-2
8249 ;; FIXME: Python 2.7.14 moved the test.support library,
8250 ;; but our package has not yet been adjusted. Enable
8251 ;; tests when the python2 package has been fixed.
8252 #:tests? #f))
8253 (home-page "https://github.com/agronholm/pythonfutures")
8254 (synopsis
8255 "Backport of the concurrent.futures package from Python 3.2")
8256 (description
8257 "The concurrent.futures module provides a high-level interface for
8258asynchronously executing callables. This package backports the
8259concurrent.futures package from Python 3.2")
8260 (license license:bsd-3)))
8261
8262(define-public python-promise
8263 (package
8264 (name "python-promise")
8265 (version "0.4.2")
8266 (source
8267 (origin
8268 (method url-fetch)
8269 (uri (pypi-uri "promise" version))
8270 (sha256
8271 (base32
8272 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8273 (build-system python-build-system)
8274 ;; Tests wants python-futures, which is a python2 only program, and
8275 ;; can't be found by python-promise at test time.
8276 (arguments `(#:tests? #f))
8277 (home-page "https://github.com/syrusakbary/promise")
8278 (synopsis "Promises/A+ implementation for Python")
8279 (description
8280 "Promises/A+ implementation for Python")
8281 (properties `((python2-variant . ,(delay python2-promise))))
8282 (license license:expat)))
8283
8284(define-public python2-promise
8285 (let ((promise (package-with-python2
8286 (strip-python2-variant python-promise))))
8287 (package (inherit promise)
8288 (arguments (substitute-keyword-arguments (package-arguments promise)
8289 ((#:tests? _) #t)))
8290 (native-inputs
8291 `(("python2-futures" ,python2-futures)
8292 ("python2-pytest" ,python2-pytest)
8293 ,@(package-native-inputs promise))))))
8294
8295(define-public python-colorama
8296 (package
8297 (name "python-colorama")
8298 (version "0.3.9")
8299 (source
8300 (origin
8301 (method url-fetch)
8302 (uri (pypi-uri "colorama" version))
8303 (sha256
8304 (base32
8305 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
8306 (build-system python-build-system)
8307 (synopsis "Colored terminal text rendering for Python")
8308 (description "Colorama is a Python library for rendering colored terminal
8309text.")
8310 (home-page "https://pypi.python.org/pypi/colorama")
8311 (license license:bsd-3)))
8312
8313(define-public python2-colorama
8314 (package-with-python2 python-colorama))
8315
8316(define-public python-rsa
8317 (package
8318 (name "python-rsa")
8319 (version "3.4.2")
8320 (source
8321 (origin
8322 (method url-fetch)
8323 (uri (pypi-uri "rsa" version))
8324 (sha256
8325 (base32
8326 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
8327 (build-system python-build-system)
8328 (propagated-inputs
8329 `(("python-pyasn1" ,python-pyasn1)))
8330 (synopsis "Pure-Python RSA implementation")
8331 (description "Python-RSA is a pure-Python RSA implementation. It supports
8332encryption and decryption, signing and verifying signatures, and key
8333generation according to PKCS#1 version 1.5. It can be used as a Python
8334library as well as on the command line.")
8335 (home-page "https://stuvel.eu/rsa")
8336 (license license:asl2.0)))
8337
8338(define-public python2-rsa
8339 (package-with-python2 python-rsa))
8340
8341(define-public python-pluggy
8342 (package
8343 (name "python-pluggy")
8344 (version "0.7.1")
8345 (source
8346 (origin
8347 (method url-fetch)
8348 (uri (pypi-uri "pluggy" version))
8349 (sha256
8350 (base32
8351 "1qbn70mksmr03hac6jgp6fiqc4l7859z8dchx2x950vhlij87swm"))))
8352 (build-system python-build-system)
8353 (native-inputs
8354 `(("python-setuptools-scm" ,python-setuptools-scm)))
8355 (synopsis "Plugin and hook calling mechanism for Python")
8356 (description "Pluggy is an extraction of the plugin manager as used by
8357Pytest but stripped of Pytest specific details.")
8358 (home-page "https://pypi.python.org/pypi/pluggy")
8359 (license license:expat)))
8360
8361(define-public python2-pluggy
8362 (package-with-python2 python-pluggy))
8363
8364(define-public python-tox
8365 (package
8366 (name "python-tox")
8367 (version "2.8.1")
8368 (source
8369 (origin
8370 (method url-fetch)
8371 (uri (pypi-uri "tox" version))
8372 (sha256
8373 (base32
8374 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
8375 (build-system python-build-system)
8376 (arguments
8377 ;; FIXME: Tests require pytest-timeout, which itself requires
8378 ;; pytest>=2.8.0 for installation.
8379 '(#:tests? #f))
8380 (propagated-inputs
8381 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
8382 ("python-py" ,python-py)
8383 ("python-virtualenv" ,python-virtualenv)))
8384 (native-inputs
8385 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
8386 ("python-pytest" ,python-pytest) ; >= 2.3.5
8387 ("python-setuptools-scm" ,python-setuptools-scm)))
8388 (home-page "http://tox.testrun.org/")
8389 (synopsis "Virtualenv-based automation of test activities")
8390 (description "Tox is a generic virtualenv management and test command line
8391tool. It can be used to check that a package installs correctly with
8392different Python versions and interpreters, or run tests in each type of
8393supported environment, or act as a frontend to continuous integration
8394servers.")
8395 (license license:expat)))
8396
8397(define-public python2-tox
8398 (package-with-python2 python-tox))
8399
8400(define-public python-jmespath
8401 (package
8402 (name "python-jmespath")
8403 (version "0.9.3")
8404 (source
8405 (origin
8406 (method url-fetch)
8407 (uri (pypi-uri "jmespath" version))
8408 (sha256
8409 (base32
8410 "0r7wc7fsxmlwzxx9j1j7rms06c6xs6d4sysirdhz1jk2mb4x90ba"))))
8411 (build-system python-build-system)
8412 (native-inputs
8413 `(("python-nose" ,python-nose)))
8414 (synopsis "JSON Matching Expressions")
8415 (description "JMESPath (pronounced “james path”) is a Python library that
8416allows one to declaratively specify how to extract elements from a JSON
8417document.")
8418 (home-page "https://github.com/jmespath/jmespath.py")
8419 (license license:expat)))
8420
8421(define-public python2-jmespath
8422 (package-with-python2 python-jmespath))
8423
8424(define-public python-botocore
8425 (package
8426 (name "python-botocore")
8427 (version "1.8.43")
8428 (source
8429 (origin
8430 (method url-fetch)
8431 (uri (pypi-uri "botocore" version))
8432 (sha256
8433 (base32
8434 "12cqpbnz3vfv41mp9admvciw7bc7hz57sjpqs2bxaw9wnfmbw5lg"))))
8435 (build-system python-build-system)
8436 (arguments
8437 ;; FIXME: Many tests are failing.
8438 '(#:tests? #f))
8439 (propagated-inputs
8440 `(("python-dateutil" ,python-dateutil)
8441 ("python-docutils" ,python-docutils)
8442 ("python-jmespath" ,python-jmespath)))
8443 (native-inputs
8444 `(("python-mock" ,python-mock)
8445 ("python-nose" ,python-nose)
8446 ("behave" ,behave)
8447 ("python-tox" ,python-tox)
8448 ("python-wheel" ,python-wheel)))
8449 (home-page "https://github.com/boto/botocore")
8450 (synopsis "Low-level interface to AWS")
8451 (description "Botocore is a Python library that provides a low-level
8452interface to the Amazon Web Services (AWS) API.")
8453 (license license:asl2.0)))
8454
8455(define-public python2-botocore
8456 (package-with-python2 python-botocore))
8457
8458(define-public python-xdo
8459 (package
8460 (name "python-xdo")
8461 (version "0.3")
8462 (source (origin
8463 (method url-fetch)
8464 (uri (string-append
8465 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8466 "python-xdo_" version ".orig.tar.gz"))
8467 (sha256
8468 (base32
8469 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
8470 (build-system python-build-system)
8471 (arguments
8472 '(#:phases
8473 (modify-phases %standard-phases
8474 (add-before 'install 'patch-libxdo-path
8475 ;; Hardcode the path of dynamically loaded libxdo library.
8476 (lambda* (#:key inputs #:allow-other-keys)
8477 (let ((libxdo (string-append
8478 (assoc-ref inputs "xdotool")
8479 "/lib/libxdo.so")))
8480 (substitute* "xdo/_xdo.py"
8481 (("find_library\\(\"xdo\"\\)")
8482 (simple-format #f "\"~a\"" libxdo)))
8483 #t))))
8484 #:tests? #f)) ; no tests provided
8485 (propagated-inputs
8486 `(("python-six" ,python-six)))
8487 (inputs
8488 `(("xdotool" ,xdotool)
8489 ("libX11" ,libx11)))
8490 (home-page "https://tracker.debian.org/pkg/python-xdo")
8491 (synopsis "Python library for simulating X11 keyboard/mouse input")
8492 (description "Provides bindings to libxdo for manipulating X11 via simulated
8493input. (Note that this is mostly a legacy library; you may wish to look at
8494python-xdo for newer bindings.)")
8495 (license license:bsd-3)))
8496
8497(define-public python2-xdo
8498 (package-with-python2 python-xdo))
8499
8500(define-public python-mako
8501 (package
8502 (name "python-mako")
8503 (version "1.0.7")
8504 (source
8505 (origin
8506 (method url-fetch)
8507 (uri (pypi-uri "Mako" version))
8508 (sha256
8509 (base32
8510 "1bi5gnr8r8dva06qpyx4kgjc6spm2k1y908183nbbaylggjzs0jf"))))
8511 (build-system python-build-system)
8512 (propagated-inputs
8513 `(("python-markupsafe" ,python-markupsafe)))
8514 (native-inputs
8515 `(("python-mock" ,python-mock)
8516 ("python-nose" ,python-nose)
8517 ("python-pytest" ,python-pytest)))
7016e620 8518 (home-page "https://www.makotemplates.org/")
44d10b1f
RW
8519 (synopsis "Templating language for Python")
8520 (description "Mako is a templating language for Python that compiles
8521templates into Python modules.")
8522 (license license:expat)))
8523
8524(define-public python2-mako
8525 (package-with-python2 python-mako))
8526
8527(define-public python-waitress
8528 (package
8529 (name "python-waitress")
8530 (version "1.1.0")
8531 (source
8532 (origin
8533 (method url-fetch)
8534 (uri (pypi-uri "waitress" version))
8535 (patches (search-patches "python-waitress-fix-tests.patch"))
8536 (sha256
8537 (base32
8538 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
8539 (build-system python-build-system)
8540 (home-page "https://github.com/Pylons/waitress")
8541 (synopsis "Waitress WSGI server")
8542 (description "Waitress is meant to be a production-quality pure-Python WSGI
8543server with very acceptable performance.")
8544 (license license:zpl2.1)))
8545
8546(define-public python2-waitress
8547 (package-with-python2 python-waitress))
8548
8549(define-public python-pyquery
8550 (package
8551 (name "python-pyquery")
8552 (version "1.2.17")
8553 (source
8554 (origin
8555 (method url-fetch)
8556 (uri (pypi-uri "pyquery" version))
8557 (sha256
8558 (base32
8559 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
8560 (build-system python-build-system)
8561 (native-inputs
8562 `(("python-webob" ,python-webob)
8563 ("python-webtest" ,python-webtest)))
8564 (propagated-inputs
8565 `(("python-lxml" ,python-lxml)
8566 ("python-cssselect" ,python-cssselect)))
8567 (home-page "https://github.com/gawel/pyquery")
8568 (synopsis "Make jQuery-like queries on xml documents")
8569 (description "pyquery allows you to make jQuery queries on xml documents.
8570The API is as much as possible the similar to jQuery. pyquery uses lxml for
8571fast xml and html manipulation.")
8572 (license license:bsd-3)))
8573
44d10b1f
RW
8574(define-public python-anyjson
8575 (package
8576 (name "python-anyjson")
8577 (version "0.3.3")
8578 (source
8579 (origin
8580 (method url-fetch)
8581 (uri (pypi-uri "anyjson" version))
8582 (sha256
8583 (base32
8584 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
8585 (build-system python-build-system)
8586 (arguments
8587 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
8588 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
8589 ;; whatever) so this transformation needs to be done before the tests
8590 ;; can be run. Maybe we could add a build step to transform beforehand
8591 ;; but it could be annoying/difficult.
8592 ;; We can enable tests for the Python 2 version, though, and do below.
8593 #:tests? #f))
8594 (home-page "https://bitbucket.org/runeh/anyjson/")
8595 (synopsis
8596 "Wraps best available JSON implementation in a common interface")
8597 (description
8598 "Anyjson loads whichever is the fastest JSON module installed
8599and provides a uniform API regardless of which JSON implementation is used.")
8600 (license license:bsd-3)
8601 (properties `((python2-variant . ,(delay python2-anyjson))))))
8602
8603(define-public python2-anyjson
8604 (let ((anyjson (package-with-python2
8605 (strip-python2-variant python-anyjson))))
8606 (package
8607 (inherit anyjson)
8608 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
8609 #:tests? #t
8610 ,@(package-arguments anyjson)))
8611 (native-inputs `(("python2-nose" ,python2-nose))))))
8612
8613(define-public python-amqp
8614 (package
8615 (name "python-amqp")
8616 (version "2.3.2")
8617 (source
8618 (origin
8619 (method url-fetch)
8620 (uri (pypi-uri "amqp" version))
8621 (sha256
8622 (base32
8623 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
8624 (build-system python-build-system)
8625 (native-inputs
8626 `(("python-case" ,python-case)
8627 ("python-pytest-sugar" ,python-pytest-sugar)
8628 ("python-mock" ,python-mock)))
8629 (propagated-inputs
8630 `(("python-vine" ,python-vine)))
8631 (home-page "https://github.com/celery/py-amqp")
8632 (synopsis
8633 "Low-level AMQP client for Python (fork of amqplib)")
8634 (description
8635 "This is a fork of amqplib which was originally written by Barry Pederson.
8636It is maintained by the Celery project, and used by kombu as a pure python
8637alternative when librabbitmq is not available.")
8638 (license license:lgpl2.1+)
8639 (properties `((python2-variant . ,(delay python2-amqp))))))
8640
8641(define-public python2-amqp
8642 (let ((amqp (package-with-python2
8643 (strip-python2-variant python-amqp))))
8644 (package
8645 (inherit amqp)
8646 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
8647 ;; unmaintained. Weirdly, does not do this on the python 3
8648 ;; version?
8649 #:tests? #f
8650 ,@(package-arguments amqp))))))
8651
8652(define-public python-txamqp
8653 (package
8654 (name "python-txamqp")
8655 (version "0.8.2")
8656 (source
8657 (origin
8658 (method url-fetch)
8659 (uri (pypi-uri "txAMQP" version))
8660 (sha256
8661 (base32
8662 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
8663 (build-system python-build-system)
8664 (propagated-inputs
8665 `(("python-six" ,python-six)
8666 ("python-twisted" ,python-twisted)))
8667 (home-page "https://github.com/txamqp/txamqp")
8668 (synopsis "Communicate with AMQP peers and brokers using Twisted")
8669 (description
8670 "This package provides a Python library for communicating with AMQP peers
8671and brokers using the asynchronous networking framework Twisted. It contains
8672all the necessary code to connect, send and receive messages to/from an
8673AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
8674also includes support for using Thrift RPC over AMQP in Twisted
8675applications.")
8676 (license license:asl2.0)))
8677
8678(define-public python2-txamqp
8679 (package-with-python2 python-txamqp))
8680
8681(define-public python-kombu
8682 (package
8683 (name "python-kombu")
8684 (version "4.2.2")
8685 (source
8686 (origin
8687 (method url-fetch)
8688 (uri (pypi-uri "kombu" version))
8689 (sha256
8690 (base32
8691 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
8692 (build-system python-build-system)
8693 (native-inputs
8694 `(("python-mock" ,python-mock)
8695 ("python-case" ,python-case)
8696 ("python-pyro4" ,python-pyro4)
8697 ("python-pytest-sugar" ,python-pytest-sugar)
8698 ("python-pytz" ,python-pytz)))
8699 (propagated-inputs
8700 `(("python-anyjson" ,python-anyjson)
8701 ("python-amqp" ,python-amqp)
8702 ("python-redis" ,python-redis)))
8703 (home-page "https://kombu.readthedocs.io")
8704 (synopsis "Message passing library for Python")
8705 (description "The aim of Kombu is to make messaging in Python as easy as
8706possible by providing an idiomatic high-level interface for the AMQ protocol,
8707and also provide proven and tested solutions to common messaging problems.
8708AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
8709message orientation, queuing, routing, reliability and security, for which the
8710RabbitMQ messaging server is the most popular implementation.")
8711 (license license:bsd-3)
8712 (properties `((python2-variant . ,(delay python2-kombu))))))
8713
8714(define-public python2-kombu
8715 (let ((kombu (package-with-python2
8716 (strip-python2-variant python-kombu))))
8717 (package
8718 (inherit kombu)
8719 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
8720 ;; It works fine on the python3 variant.
8721 #:tests? #f
8722 ,@(package-arguments kombu)))
8723 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8724 ,@(package-native-inputs kombu))))))
8725
8726(define-public python-billiard
8727 (package
8728 (name "python-billiard")
8729 (version "3.5.0.5")
8730 (source
8731 (origin
8732 (method url-fetch)
8733 (uri (pypi-uri "billiard" version))
8734 (sha256
8735 (base32
8736 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
8737 (build-system python-build-system)
8738 (native-inputs
8739 `(("python-case" ,python-case)
8740 ("python-pytest" ,python-pytest)))
8741 (home-page "https://github.com/celery/billiard")
8742 (synopsis
8743 "Python multiprocessing fork with improvements and bugfixes")
8744 (description
8745 "Billiard is a fork of the Python 2.7 multiprocessing package. The
8746multiprocessing package itself is a renamed and updated version of R Oudkerk's
8747pyprocessing package. This standalone variant is intended to be compatible with
8748Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
8749 (license license:bsd-3)
8750 (properties `((python2-variant . ,(delay python2-billiard))))))
8751
8752(define-public python2-billiard
8753 (let ((billiard (package-with-python2
8754 (strip-python2-variant python-billiard))))
8755 (package
8756 (inherit billiard)
8757 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8758 ("python2-mock" ,python2-mock)
8759 ,@(package-native-inputs billiard))))))
8760
8761(define-public python-celery
8762 (package
8763 (name "python-celery")
8764 (version "4.2.1")
8765 (source
8766 (origin
8767 (method url-fetch)
8768 (uri (pypi-uri "celery" version))
8769 (sha256
8770 (base32
8771 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
8772 (build-system python-build-system)
8773 (arguments
8774 '(;; TODO The tests fail with Python 3.7
8775 ;; https://github.com/celery/celery/issues/4849
8776 #:tests? #f
8777 #:phases
8778 (modify-phases %standard-phases
8779 (add-after 'unpack 'patch-requirements
8780 (lambda _
8781 (substitute* "requirements/test.txt"
8782 (("pytest>=3\\.0,<3\\.3")
8783 "pytest>=3.0"))
8784 #t)))))
8785 (native-inputs
8786 `(("python-case" ,python-case)
8787 ("python-pytest" ,python-pytest)))
8788 (propagated-inputs
8789 `(("python-pytz" ,python-pytz)
8790 ("python-billiard" ,python-billiard)
8791 ("python-kombu" ,python-kombu)))
8792 (home-page "https://celeryproject.org")
8793 (synopsis "Distributed Task Queue")
8794 (description "Celery is an asynchronous task queue/job queue based on
8795distributed message passing. It is focused on real-time operation, but
8796supports scheduling as well. The execution units, called tasks, are executed
8797concurrently on a single or more worker servers using multiprocessing,
8798Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
8799synchronously (wait until ready).")
8800 (license license:bsd-3)
8801 (properties `((python2-variant . ,(delay python2-celery))))))
8802
8803(define-public python2-celery
8804 (let ((celery (package-with-python2
8805 (strip-python2-variant python-celery))))
8806 (package
8807 (inherit celery)
8808 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8809 ("python2-mock" ,python2-mock)
8810 ,@(package-native-inputs celery))))))
8811
8812(define-public python-translitcodec
8813 (package
8814 (name "python-translitcodec")
8815 (version "0.4.0")
8816 (source
8817 (origin
8818 (method url-fetch)
8819 (uri (pypi-uri "translitcodec" version))
8820 (sha256
8821 (base32
8822 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
8823 (build-system python-build-system)
8824 (arguments
8825 `(#:tests? #f)) ; no tests provided
8826 (home-page
8827 "https://github.com/claudep/translitcodec")
8828 (synopsis
8829 "Unicode to 8-bit charset transliteration codec")
8830 (description
8831 "This package contains codecs for transliterating ISO 10646 texts into
8832best-effort representations using smaller coded character sets (ASCII,
8833ISO 8859, etc.).")
8834 (license license:expat)))
8835
8836(define-public python2-translitcodec
8837 (package-with-python2 python-translitcodec))
8838
8839(define-public python-editor
8840 (package
8841 (name "python-editor")
8842 (version "0.5")
8843 (source
8844 (origin
8845 (method url-fetch)
8846 (uri (pypi-uri "python-editor" version))
8847 (sha256
8848 (base32
8849 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
8850 (build-system python-build-system)
8851 (home-page
8852 "https://github.com/fmoo/python-editor")
8853 (synopsis
8854 "Programmatically open an editor, capture the result")
8855 (description
8856 "python-editor is a library that provides the editor module for
8857programmatically interfacing with your system's $EDITOR.")
8858 (license license:asl2.0)))
8859
8860(define-public python2-editor
8861 (package-with-python2 python-editor))
8862
8863(define-public python-sphinxcontrib-programoutput
8864 (package
8865 (name "python-sphinxcontrib-programoutput")
8866 (version "0.10")
8867 (source (origin
8868 (method url-fetch)
8869 (uri (pypi-uri "sphinxcontrib-programoutput" version))
8870 (sha256
8871 (base32
8872 "153hhnlbx4688zj9wd64819ps5znc2jlyp5crkgzvn5hxgy99vpx"))))
8873 (build-system python-build-system)
8874 (arguments
8875 ;; FIXME: Many tests are failing and the upstream is gone.
8876 '(#:tests? #f))
8877 (propagated-inputs
8878 `(("python-sphinx" ,python-sphinx)))
8879 (synopsis "Sphinx extension to include program output")
8880 (description "A Sphinx extension to literally insert the output of arbitrary
8881commands into documents, helping you to keep your command examples up to date.")
8882 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
8883 (license license:bsd-2)))
8884
8885(define-public python2-sphinxcontrib-programoutput
8886 (package-with-python2 python-sphinxcontrib-programoutput))
8887
8888(define-public python-sphinx-repoze-autointerface
8889 (package
8890 (name "python-sphinx-repoze-autointerface")
8891 (version "0.8")
8892 (source (origin
8893 (method url-fetch)
8894 (uri (pypi-uri "repoze.sphinx.autointerface" version))
8895 (sha256
8896 (base32
8897 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
8898 (build-system python-build-system)
8899 (arguments '(#:tests? #f)) ; No tests.
8900 (propagated-inputs
8901 `(("python-sphinx" ,python-sphinx)
8902 ("python-zope-interface" ,python-zope-interface)))
8903 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
8904 (description "This package defines an extension for the Sphinx documentation
8905system. The extension allows generation of API documentation by
8906introspection of @code{zope.interface} instances in code.")
8907 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
8908 (license license:repoze)))
8909
8910(define-public python2-sphinx-repoze-autointerface
8911 (package-with-python2 python-sphinx-repoze-autointerface))
8912
8913(define-public python-vobject
8914 (package
8915 (name "python-vobject")
8916 (version "0.9.5")
8917 (source (origin
8918 (method url-fetch)
8919 (uri (pypi-uri "vobject" version))
8920 (sha256
8921 (base32
8922 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
8923 (build-system python-build-system)
8924 (arguments
8925 '(;; The test suite relies on some non-portable Windows interfaces.
8926 #:tests? #f))
8927 (propagated-inputs
8928 `(("python-dateutil" ,python-dateutil)
8929 ("python-pyicu" ,python-pyicu)))
8930 (synopsis "Parse and generate vCard and vCalendar files")
8931 (description "Vobject is intended to be a full featured Python package for
8932parsing and generating vCard and vCalendar files. Currently, iCalendar files
8933are supported and well tested. vCard 3.0 files are supported, and all data
8934should be imported, but only a few components are understood in a sophisticated
8935way.")
8936 (home-page "http://eventable.github.io/vobject/")
8937 (license license:asl2.0)))
8938
8939(define-public python2-vobject
8940 (package-with-python2 python-vobject))
8941
8942(define-public python-munkres
8943 (package
8944 (name "python-munkres")
8945 (version "1.0.8")
8946 (source (origin
8947 (method url-fetch)
8948 (uri (pypi-uri "munkres" version))
8949 (sha256
8950 (base32
8951 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
8952 (build-system python-build-system)
8953 (arguments
8954 '(#:tests? #f)) ; no test suite
8955 (home-page "http://software.clapper.org/munkres/")
8956 (synopsis "Implementation of the Munkres algorithm")
8957 (description "The Munkres module provides an implementation of the Munkres
8958algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
8959useful for solving the Assignment Problem.")
8960 (license license:bsd-3)))
8961
8962(define-public python2-munkres
8963 (package-with-python2 python-munkres))
8964
8965(define-public python-whoosh
8966 (package
8967 (name "python-whoosh")
8968 (version "2.7.4")
8969 (source
8970 (origin
8971 (method url-fetch)
8972 (uri (pypi-uri "Whoosh" version))
8973 (sha256
8974 (base32
8975 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
8976 (build-system python-build-system)
8977 (native-inputs
8978 `(("python-pytest" ,python-pytest)))
8979 (home-page "https://bitbucket.org/mchaput/whoosh")
8980 (synopsis "Full text indexing, search, and spell checking library")
8981 (description
8982 "Whoosh is a fast, pure-Python full text indexing, search, and spell
8983checking library.")
8984 (license license:bsd-2)))
8985
8986(define-public python2-whoosh
8987 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
8988 (package (inherit whoosh)
8989 (propagated-inputs
8990 `(("python2-backport-ssl-match-hostname"
8991 ,python2-backport-ssl-match-hostname)
8992 ,@(package-propagated-inputs whoosh))))))
8993
8994(define-public python-pathlib
8995 (package
8996 (name "python-pathlib")
8997 (version "1.0.1")
8998 (source (origin
8999 (method url-fetch)
9000 (uri (pypi-uri "pathlib" version))
9001 (sha256
9002 (base32
9003 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9004 (build-system python-build-system)
9005 ;; The tests depend on the internal "test" module, which does not provide
9006 ;; a stable interface.
9007 (arguments `(#:tests? #f))
9008 (home-page "https://pathlib.readthedocs.org/")
9009 (synopsis "Object-oriented file system paths")
9010 (description "Pathlib offers a set of classes to handle file system paths.
9011It offers the following advantages over using string objects:
9012
9013@enumerate
9014@item No more cumbersome use of os and os.path functions. Everything can
9015be done easily through operators, attribute accesses, and method calls.
9016@item Embodies the semantics of different path types. For example,
9017comparing Windows paths ignores casing.
9018@item Well-defined semantics, eliminating any inconsistencies or
9019ambiguities (forward vs. backward slashes, etc.).
9020@end enumerate
9021
9022Note: In Python 3.4, pathlib is now part of the standard library. For other
9023Python versions please consider python-pathlib2 instead, which tracks the
9024standard library module. This module (python-pathlib) isn't maintained
9025anymore.")
9026 (license license:expat)))
9027
9028(define-public python2-pathlib
9029 (package-with-python2 python-pathlib))
9030
9031(define-public python2-pathlib2
9032 (package
9033 (name "python2-pathlib2")
9034 (version "2.3.2")
9035 (source (origin
9036 (method url-fetch)
9037 (uri (pypi-uri "pathlib2" version))
9038 (sha256
9039 (base32
9040 "10yb0iv5x2hs631rcppkhbddx799d3h8pcwmkbh2a66ns3w71ccf"))))
9041 (build-system python-build-system)
9042 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9043 ;; version is 3.4 which already includes this package as part of the
9044 ;; standard library.
9045 (arguments
9046 `(#:python ,python-2))
9047 (propagated-inputs
9048 `(("python2-scandir" ,python2-scandir)
9049 ("python2-six" ,python2-six)))
9050 (home-page "https://pypi.python.org/pypi/pathlib2/")
9051 (synopsis "Object-oriented file system paths - backport of standard
9052pathlib module")
9053 (description "The goal of pathlib2 is to provide a backport of standard
9054pathlib module which tracks the standard library module, so all the newest
9055features of the standard pathlib can be used also on older Python versions.
9056
9057Pathlib offers a set of classes to handle file system paths. It offers the
9058following advantages over using string objects:
9059
9060@enumerate
9061@item No more cumbersome use of os and os.path functions. Everything can
9062be done easily through operators, attribute accesses, and method calls.
9063@item Embodies the semantics of different path types. For example,
9064comparing Windows paths ignores casing.
9065@item Well-defined semantics, eliminating any inconsistencies or
9066ambiguities (forward vs. backward slashes, etc.).
9067@end enumerate")
9068 (license license:expat)))
9069
9070(define-public python2-pathlib2-bootstrap
9071 (hidden-package
9072 (package
9073 (inherit python2-pathlib2)
9074 (name "python2-pathlib2-bootstrap")
9075 (propagated-inputs
9076 `(("python2-scandir" ,python2-scandir)
9077 ("python2-six" ,python2-six-bootstrap))))))
9078
9079(define-public python-jellyfish
9080 (package
9081 (name "python-jellyfish")
9082 (version "0.5.6")
9083 (source (origin
9084 (method url-fetch)
9085 (uri (pypi-uri "jellyfish" version))
9086 (sha256
9087 (base32
9088 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
9089 (build-system python-build-system)
9090 (native-inputs
9091 `(("python-pytest" ,python-pytest)))
9092 (home-page "https://github.com/jamesturk/jellyfish")
9093 (synopsis "Approximate and phonetic matching of strings")
9094 (description "Jellyfish uses a variety of string comparison and phonetic
9095encoding algorithms to do fuzzy string matching.")
9096 (license license:bsd-2)
9097 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9098
9099(define-public python2-jellyfish
9100 (let ((jellyfish (package-with-python2
9101 (strip-python2-variant python-jellyfish))))
9102 (package (inherit jellyfish)
9103 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
9104 ,@(package-native-inputs jellyfish))))))
9105
9106(define-public python2-unicodecsv
9107 (package
9108 (name "python2-unicodecsv")
9109 (version "0.14.1")
9110 (source (origin
9111 (method url-fetch)
9112 ;; The test suite is not included in the PyPi release.
9113 ;; https://github.com/jdunck/python-unicodecsv/issues/19
9114 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
9115 "archive/" version ".tar.gz"))
9116 (file-name (string-append name "-" version ".tar.gz"))
9117 (sha256
9118 (base32
9119 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
9120 (build-system python-build-system)
9121 (arguments
9122 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9123 #:python ,python-2))
9124 (native-inputs
9125 `(("python2-unittest2" ,python2-unittest2)))
9126 (home-page "https://github.com/jdunck/python-unicodecsv")
9127 (synopsis "Unicode CSV module for Python 2")
9128 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9129module, adding support for Unicode strings.")
9130 (license license:bsd-2)))
9131
9132(define-public python-rarfile
9133 (package
9134 (name "python-rarfile")
9135 (version "2.8")
9136 (source (origin
9137 (method url-fetch)
9138 (uri (pypi-uri "rarfile" version))
9139 (sha256
9140 (base32
9141 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
9142 (build-system python-build-system)
9143 (arguments
9144 '(#:phases
9145 (modify-phases %standard-phases
9146 (replace 'check
9147 ;; Many tests fail, but the installation proceeds.
e59dd341 9148 (lambda _ (invoke "make" "-C" "test" "test"))))))
44d10b1f
RW
9149 (native-inputs
9150 `(("which" ,which))) ; required for tests
9151 (propagated-inputs
9152 `(("libarchive" ,libarchive)))
9153 (home-page "https://github.com/markokr/rarfile")
9154 (synopsis "RAR archive reader for Python")
9155 (description "This is Python module for RAR archive reading. The interface
9156is made as zipfile like as possible.")
9157 (license license:isc)))
9158
9159(define-public python2-rarfile
9160 (package-with-python2 python-rarfile))
9161
9162(define-public python-magic
9163 (package
9164 (name "python-magic")
9165 (version "0.4.15")
9166 (source
9167 (origin
9168 (method url-fetch)
9169 (uri (pypi-uri "python-magic" version))
9170 (sha256
9171 (base32
9172 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
9173 (file-name (string-append name "-" version "-checkout"))))
9174 (build-system python-build-system)
9175 (arguments
9176 ;; The tests are unreliable, so don't run them. The tests fail
9177 ;; under Python3 because they were written for Python2 and
9178 ;; contain import statements that do not work in Python3. One of
9179 ;; the tests fails under Python2 because its assertions are
9180 ;; overly stringent; it relies on comparing output strings which
9181 ;; are brittle and can change depending on the version of
9182 ;; libmagic being used and the system on which the test is
9183 ;; running. In my case, under GuixSD 0.10.0, only one test
9184 ;; failed, and it seems to have failed only because the version
9185 ;; of libmagic that is packaged in Guix outputs a slightly
9186 ;; different (but not wrong) string than the one that the test
9187 ;; expected.
9188 '(#:tests? #f
9189 #:phases (modify-phases %standard-phases
9190 ;; Replace a specific method call with a hard-coded
9191 ;; path to the necessary libmagic.so file in the
9192 ;; store. If we don't do this, then the method call
9193 ;; will fail to find the libmagic.so file, which in
9194 ;; turn will cause any application using
9195 ;; python-magic to fail.
9196 (add-before 'build 'hard-code-path-to-libmagic
9197 (lambda* (#:key inputs #:allow-other-keys)
9198 (let ((file (assoc-ref inputs "file")))
9199 (substitute* "magic.py"
9200 (("ctypes.util.find_library\\('magic'\\)")
9201 (string-append "'" file "/lib/libmagic.so'")))
9202 #t)))
9203 (add-before 'install 'disable-egg-compression
9204 (lambda _
9205 (let ((port (open-file "setup.cfg" "a")))
9206 (display "\n[easy_install]\nzip_ok = 0\n"
9207 port)
9208 (close-port port)
9209 #t))))))
9210 (inputs
9211 ;; python-magic needs to be able to find libmagic.so.
9212 `(("file" ,file)))
9213 (home-page
9214 "https://github.com/ahupp/python-magic")
9215 (synopsis
9216 "File type identification using libmagic")
9217 (description
9218 "This module uses ctypes to access the libmagic file type
9219identification library. It makes use of the local magic database and
9220supports both textual and MIME-type output. Note that this module and
9221the python-file module both provide a \"magic.py\" file; these two
9222modules, which are different and were developed separately, both serve
9223the same purpose: to provide Python bindings for libmagic.")
9224 (license license:expat)))
9225
9226(define-public python2-magic
9227 (package-with-python2 python-magic))
9228
9229(define-public python2-s3cmd
9230 (package
9231 (name "python2-s3cmd")
9232 (version "1.6.1")
9233 (source
9234 (origin
9235 (method url-fetch)
9236 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
9237 "s3cmd-" version ".tar.gz"))
9238 (sha256
9239 (base32
9240 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9241 (build-system python-build-system)
9242 (arguments
9243 ;; s3cmd is written for python2 only and contains no tests.
9244 `(#:python ,python-2
9245 #:tests? #f))
9246 (propagated-inputs
9247 `(("python2-dateutil" ,python2-dateutil)
9248 ;; The python-file package also provides a magic.py module.
9249 ;; This is an unfortunate state of affairs; however, s3cmd
9250 ;; fails to install if it cannot find specifically the
9251 ;; python-magic package. Thus we include it, instead of using
9252 ;; python-file. Ironically, s3cmd sometimes works better
9253 ;; without libmagic bindings at all:
9254 ;; https://github.com/s3tools/s3cmd/issues/198
9255 ("python2-magic" ,python2-magic)))
9256 (home-page "http://s3tools.org/s3cmd")
9257 (synopsis "Command line tool for S3-compatible storage services")
9258 (description
9259 "S3cmd is a command line tool for uploading, retrieving and managing data
9260in storage services that are compatible with the Amazon Simple Storage
9261Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9262GnuPG encryption, and more. It also supports management of Amazon's
9263CloudFront content delivery network.")
9264 (license license:gpl2+)))
9265
9266(define-public python-pkgconfig
9267 (package
9268 (name "python-pkgconfig")
9269 (version "1.3.1")
9270 (source
9271 (origin
9272 (method url-fetch)
9273 (uri (pypi-uri "pkgconfig" version))
9274 (sha256
9275 (base32
9276 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
9277 (build-system python-build-system)
9278 (native-inputs
9279 `(("python-nose" ,python-nose)))
9280 (inputs
9281 `(("pkg-config" ,pkg-config)))
9282 (arguments
9283 `(#:phases
9284 (modify-phases %standard-phases
9285 (add-before 'build 'patch
9286 ;; Hard-code the path to pkg-config.
9287 (lambda _
9288 (substitute* "pkgconfig/pkgconfig.py"
9289 (("cmd = 'pkg-config")
9290 (string-append "cmd = '" (which "pkg-config"))))
9291 #t))
9292 (replace 'check
9293 (lambda _
9294 (invoke "nosetests" "test.py"))))))
9295 (home-page "https://github.com/matze/pkgconfig")
9296 (synopsis "Python interface for pkg-config")
9297 (description "This module provides a Python interface to pkg-config. It
9298can be used to find all pkg-config packages, check if a package exists,
9299check if a package meets certain version requirements, query CFLAGS and
9300LDFLAGS and parse the output to build extensions with setup.py.")
9301 (license license:expat)))
9302
9303(define-public python2-pkgconfig
9304 (package-with-python2 python-pkgconfig))
9305
9306(define-public python-bz2file
9307 (package
9308 (name "python-bz2file")
9309 (version "0.98")
9310 (source
9311 (origin
9312 (method url-fetch)
9313 (uri (pypi-uri "bz2file" version))
9314 (sha256
9315 (base32
9316 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9317 (build-system python-build-system)
9318 (arguments
9319 `(#:tests? #f)) ; Tests use deprecated python modules.
9320 (home-page "https://github.com/nvawda/bz2file")
9321 (synopsis "Read and write bzip2-compressed files")
9322 (description
9323 "Bz2file is a Python library for reading and writing bzip2-compressed
9324files. It contains a drop-in replacement for the I/O interface in the
9325standard library's @code{bz2} module, including features from the latest
9326development version of CPython that are not available in older releases.")
9327 (license license:asl2.0)))
9328
9329(define-public python2-bz2file
9330 (package-with-python2 python-bz2file))
9331
9332(define-public python-future
9333 (package
9334 (name "python-future")
9335 (version "0.16.0")
9336 (source
9337 (origin
9338 (method url-fetch)
9339 (uri (pypi-uri "future" version))
9340 (sha256
9341 (base32
9342 "1nzy1k4m9966sikp0qka7lirh8sqrsyainyf8rk97db7nwdfv773"))))
9343 (build-system python-build-system)
9344 ;; Many tests connect to the network or are otherwise flawed.
9345 ;; https://github.com/PythonCharmers/python-future/issues/210
9346 (arguments
9347 `(#:tests? #f))
9348 (home-page "http://python-future.org")
9349 (synopsis "Single-source support for Python 3 and 2")
9350 (description
9351 "@code{python-future} is the missing compatibility layer between Python 2 and
9352Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9353to support both Python 2 and Python 3 with minimal overhead.")
9354 (license license:expat)))
9355
9356(define-public python2-future
9357 (package-with-python2 python-future))
9358
9359(define-public python-cysignals
9360 (package
9361 (name "python-cysignals")
8e3e51df 9362 (version "1.9.0")
44d10b1f
RW
9363 (source
9364 (origin
9365 (method url-fetch)
8e3e51df 9366 (uri (pypi-uri "cysignals" version))
44d10b1f
RW
9367 (sha256
9368 (base32
8e3e51df 9369 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
44d10b1f
RW
9370 (build-system python-build-system)
9371 (native-inputs
9372 `(("python-cython" ,python-cython)
9373 ("python-sphinx" ,python-sphinx)))
9374 (inputs
9375 `(("pari-gp" ,pari-gp)))
9376 (arguments
9377 `(#:modules ((guix build python-build-system)
9378 ((guix build gnu-build-system) #:prefix gnu:)
9379 (guix build utils))
9380 ;; FIXME: Tests are executed after installation and currently fail
9381 ;; when not installing into standard locations; the author is working
9382 ;; on a fix.
9383 #:tests? #f
9384 #:phases
9385 (modify-phases %standard-phases
9386 (add-before
9387 'build 'configure
9388 (assoc-ref gnu:%standard-phases 'configure)))))
9389 (home-page
9390 "https://github.com/sagemath/cysignals")
9391 (synopsis
9392 "Handling of interrupts and signals for Cython")
9393 (description
9394 "The cysignals package provides mechanisms to handle interrupts (and
9395other signals and errors) in Cython code, using two related approaches,
9396for mixed Cython/Python code or external C libraries and pure Cython code,
9397respectively.")
9398 (license license:lgpl3+)))
9399
9400(define-public python2-cysignals
9401 (package-with-python2 python-cysignals))
9402
9403(define-public python2-shedskin
9404 (package
9405 (name "python2-shedskin")
9406 (version "0.9.4")
9407 (source
9408 (origin
9409 (method url-fetch)
9410 (uri (string-append "https://github.com/shedskin/shedskin/"
9411 "releases/download/v" version
9412 "/shedskin-" version ".tgz"))
9413 (sha256
9414 (base32
9415 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9416 (build-system python-build-system)
9417 (arguments
9418 `(#:python ,python-2
9419 #:phases (modify-phases %standard-phases
9420 (add-after 'unpack 'fix-resulting-include-libs
9421 (lambda* (#:key inputs #:allow-other-keys)
9422 (let ((libgc (assoc-ref inputs "libgc"))
9423 (pcre (assoc-ref inputs "pcre")))
9424 (substitute* "shedskin/makefile.py"
9425 (("variable == 'CCFLAGS':[ ]*")
9426 (string-append "variable == 'CCFLAGS':\n"
9427 " line += ' -I " pcre "/include"
9428 " -I " libgc "/include'"))
9429 (("variable == 'LFLAGS':[ ]*")
9430 (string-append "variable == 'LFLAGS':\n"
9431 " line += ' -L" pcre "/lib"
9432 " -L " libgc "/lib'")))
9433 #t))))))
9434 (inputs `(("pcre" ,pcre)
9435 ("libgc" ,libgc)))
9436 (home-page "https://shedskin.github.io/")
9437 (synopsis "Experimental Python-2 to C++ Compiler")
9438 (description (string-append "This is an experimental compiler for a subset of
9439Python. It generates C++ code and a Makefile."))
9440 (license (list license:gpl3 license:bsd-3 license:expat))))
9441
9442(define-public python2-rope
9443 (package
9444 (name "python2-rope")
a9ba0a31 9445 (version "0.11.0")
44d10b1f
RW
9446 (source
9447 (origin
9448 (method url-fetch)
9449 (uri (pypi-uri "rope" version))
9450 (sha256
9451 (base32
a9ba0a31 9452 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
44d10b1f 9453 (arguments
afb29715 9454 ;; Rope has only partial python3 support, see `python-rope'
44d10b1f
RW
9455 `(#:python ,python-2))
9456 (build-system python-build-system)
9457 (native-inputs
9458 `(("python2-unittest2" ,python2-unittest2)))
9459 (home-page "https://github.com/python-rope/rope")
9460 (synopsis "Refactoring library for Python")
9461 (description "Rope is a refactoring library for Python. It facilitates
9462the renaming, moving and extracting of attributes, functions, modules, fields
9463and parameters in Python 2 source code. These refactorings can also be applied
9464to occurrences in strings and comments.")
9465 (license license:gpl2)))
9466
2c880ef4
LC
9467(define-public python-rope
9468 (package
9469 (inherit python2-rope)
9470 (name "python-rope")
9471 (arguments `(#:python ,python-wrapper
9472 ;; XXX: Only partial python3 support, results in some failing
9473 ;; tests: <https://github.com/python-rope/rope/issues/247>.
9474 #:tests? #f))
9475 (properties `((python2-variant . ,(delay python2-rope))))))
9476
44d10b1f
RW
9477(define-public python-py3status
9478 (package
9479 (name "python-py3status")
77f3d303 9480 (version "3.16")
44d10b1f
RW
9481 (source
9482 (origin
9483 (method url-fetch)
9484 (uri (pypi-uri "py3status" version))
9485 (sha256
9486 (base32
77f3d303 9487 "1xrfph277bgjln3jbpzpgkhxad04fjvj7s3xfil42q1sxi4s3q3g"))))
44d10b1f
RW
9488 (build-system python-build-system)
9489 (inputs
9490 `(("file" ,file)))
9491 (arguments
9492 '(#:phases
9493 (modify-phases %standard-phases
9494 ;; 'file' is used for detection of configuration file encoding
9495 ;; let's make link the dependency to particular input
9496 (add-before 'build 'patch-file-path
9497 (lambda* (#:key inputs #:allow-other-keys)
9498 (let ((file-path (assoc-ref inputs "file")))
9499 (substitute* "py3status/parse_config.py"
9500 (("\\['file', '-b'")
9501 (string-append "['" file-path "/bin/file', '-b'")))
9502 #t))))
9503 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
9504 (home-page "https://github.com/ultrabug/py3status")
9505 (synopsis "Extensible i3status wrapper written in Python")
9506 (description "py3status is an i3status wrapper which extends i3status
9507functionality in a modular way, allowing you to extend your panel with your
9508own code, responding to click events and updating clock every second.")
9509 (license license:bsd-3)))
9510
9511(define-public python-tblib
9512 (package
9513 (name "python-tblib")
9514 (version "1.3.2")
9515 (source (origin
9516 (method url-fetch)
9517 (uri (pypi-uri "tblib" version))
9518 (sha256 (base32
9519 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
9520 (build-system python-build-system)
9521 (arguments
9522 `(#:phases
9523 (modify-phases %standard-phases
9524 (add-before 'check 'adjust-tests
9525 (lambda _
9526 (when (which "python3")
9527 ;; Adjust the example output to match that of Python 3.7:
9528 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
9529 (substitute* "README.rst"
9530 (("Exception\\('fail',") "Exception('fail'"))
9531 #t)))
9532 (replace 'check
9533 (lambda _
9534 ;; Upstream runs tests after installation and the package itself
9535 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
9536 ;; found.
9537 (setenv "PYTHONPATH"
9538 (string-append (getcwd) "/build/lib:"
9539 (getenv "PYTHONPATH")))
9540 (invoke "py.test" "-vv" "tests" "README.rst"))))))
9541 (native-inputs
9542 `(("python-pytest" ,python-pytest)
9543 ("python-six" ,python-six)))
9544 (home-page "https://github.com/ionelmc/python-tblib")
9545 (synopsis "Traceback serialization library")
9546 (description
9547 "Traceback serialization allows you to:
9548
9549@enumerate
9550@item Pickle tracebacks and raise exceptions with pickled tracebacks in
9551different processes. This allows better error handling when running code over
9552multiple processes (imagine multiprocessing, billiard, futures, celery etc).
9553
9554@item Parse traceback strings and raise with the parsed tracebacks.
9555@end enumerate\n")
9556 (license license:bsd-3)))
9557
9558(define-public python2-tblib
9559 (package-with-python2 python-tblib))
9560
9561(define-public python-greenlet
9562 (package
9563 (name "python-greenlet")
9564 (version "0.4.15")
9565 (source (origin
9566 (method url-fetch)
9567 (uri (pypi-uri "greenlet" version))
9568 (sha256
9569 (base32
9570 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
9571 (build-system python-build-system)
9572 (home-page "https://greenlet.readthedocs.io/")
9573 (synopsis "Lightweight in-process concurrent programming")
9574 (description
9575 "Greenlet package is a spin-off of Stackless, a version of CPython
9576that supports micro-threads called \"tasklets\". Tasklets run
9577pseudo-concurrently (typically in a single or a few OS-level threads) and
9578are synchronized with data exchanges on \"channels\".")
9579 (license (list license:psfl license:expat))))
9580
9581(define-public python2-greenlet
9582 (package-with-python2 python-greenlet))
9583
9584(define-public python-objgraph
9585 (package
9586 (name "python-objgraph")
9587 (version "3.4.0")
9588 (source
9589 (origin
9590 (method url-fetch)
9591 (uri (pypi-uri "objgraph" version))
9592 (sha256
9593 (base32
9594 "184m09am5gpbqfaiy7l0hwh476mczbrly1dffs0rw2p1d1i2q32a"))))
9595 (build-system python-build-system)
9596 (propagated-inputs
9597 `(("python-graphviz" ,python-graphviz)))
9598 (native-inputs
9599 `(("python-mock" ,python-mock)
9600 ("graphviz" ,graphviz)))
9601 (home-page "https://mg.pov.lt/objgraph/")
9602 (synopsis "Draw Python object reference graphs with graphviz")
9603 (description
9604 "This package provides tools to draw Python object reference graphs with
9605graphviz.")
9606 (license license:expat)))
9607
9608(define-public python-gevent
9609 (package
9610 (name "python-gevent")
9611 (version "1.3.7")
9612 (source (origin
9613 (method url-fetch)
9614 (uri (pypi-uri "gevent" version))
9615 (sha256
9616 (base32
9617 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
9618 (modules '((guix build utils)))
9619 (snippet
9620 '(begin
9621 ;; unbunding libev and c-ares
9622 (delete-file-recursively "deps")
9623 #t))))
9624 (build-system python-build-system)
9625 (arguments
9626 `(#:modules ((ice-9 ftw)
9627 (ice-9 match)
9628 (srfi srfi-26)
9629 (guix build utils)
9630 (guix build python-build-system))
9631 #:phases (modify-phases %standard-phases
9632 (add-after 'unpack 'unpack-libev
9633 (lambda* (#:key inputs #:allow-other-keys)
9634 (mkdir-p "deps/libev")
9635 ;; FIXME: gevent requires building libev, even though
9636 ;; it only links against the proper one.
9637 (invoke "tar" "-xf" (assoc-ref inputs "libev-source")
9638 "--strip-components=1" "-C" "deps/libev")))
9639 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
9640 (lambda _
9641 (substitute* "src/gevent/subprocess.py"
9642 (("/bin/sh") (which "sh")))
9643 (for-each (lambda (file)
9644 (substitute* file
9645 (("/bin/sh") (which "sh"))
9646 (("/bin/true") (which "true"))))
9647 (find-files "src/greentest" "\\.py$"))
9648 #t))
9649 (add-before 'build 'do-not-use-bundled-sources
9650 (lambda* (#:key inputs #:allow-other-keys)
9651 (setenv "CONFIG_SHELL" (which "bash"))
9652 (setenv "LIBEV_EMBED" "false")
9653 (setenv "CARES_EMBED" "false")
9654 (setenv "EMBED" "false")
9655
9656 (let ((greenlet (string-append
9657 (assoc-ref inputs "python-greenlet")
9658 "/include")))
9659 (match (scandir greenlet
9660 (lambda (item)
9661 (string-prefix? "python" item)))
9662 ((python)
9663 (setenv "CPATH"
9664 (string-append greenlet "/" python)))))
9665 #t))
9666 (add-before 'check 'skip-timer-test
9667 (lambda _
9668 ;; XXX: Skip 'TestTimerResolution', which appears to be
9669 ;; unreliable.
9670 (substitute* "src/greentest/test__core_timer.py"
9671 (("not greentest.RUNNING_ON_CI") "False"))
9672 #t))
9673 (replace 'check
9674 (lambda _
9675 ;; Make sure the build directory is on PYTHONPATH.
9676 (setenv "PYTHONPATH"
9677 (string-append
9678 (getenv "PYTHONPATH") ":"
9679 (getcwd) "/build/"
9680 (car (scandir "build" (cut string-prefix? "lib." <>)))))
9681 (with-directory-excursion "src/greentest"
9682 ;; XXX: Many tests require network access. Instead we only
9683 ;; run known-good tests. Unfortunately we cannot use
9684 ;; recursion here since this directory also contains
9685 ;; Python-version-specific subfolders.
9686 (apply invoke "python" "testrunner.py" "--config"
9687 "known_failures.py"
9688 (scandir "." (cut regexp-exec
9689 (make-regexp "test_+(subprocess|core)")
9690 <>)))))))))
9691 (propagated-inputs
9692 `(("python-greenlet" ,python-greenlet)
9693 ("python-objgraph" ,python-objgraph)))
9694 (native-inputs
9695 `(("libev-source" ,(package-source libev))
9696 ("python-six" ,python-six)))
9697 (inputs
9698 `(("c-ares" ,c-ares)
9699 ("libev" ,libev)))
9700 (home-page "http://www.gevent.org/")
9701 (synopsis "Coroutine-based network library")
9702 (description
9703 "gevent is a coroutine-based Python networking library that uses greenlet
9704to provide a high-level synchronous API on top of the libev event loop.")
9705 (license license:expat)
9706 (properties `((python2-variant . ,(delay python2-gevent))))))
9707
9708(define-public python2-gevent
9709 (let ((base (package-with-python2
9710 (strip-python2-variant python-gevent))))
9711 (package
9712 (inherit base)
9713 (native-inputs `(,@(package-native-inputs python-gevent)
9714 ("python-mock" ,python2-mock))))))
9715
9716(define-public python-fastimport
9717 (package
9718 (name "python-fastimport")
9719 (version "0.9.6")
9720 (source
9721 (origin
9722 (method url-fetch)
9723 (uri (pypi-uri "fastimport" version))
9724 (sha256
9725 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
9726 (build-system python-build-system)
9727 (home-page "https://github.com/jelmer/python-fastimport")
9728 (synopsis "VCS fastimport parser and generator in Python")
9729 (description "This package provides a parser for and generator of the Git
9730@url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
9731format.")
9732 (license license:gpl2+)))
9733
9734(define-public python2-fastimport
9735 (package-with-python2 python-fastimport))
9736
9737(define-public python-twisted
9738 (package
9739 (name "python-twisted")
52ca1c4a 9740 (version "19.2.0")
44d10b1f
RW
9741 (source (origin
9742 (method url-fetch)
9743 (uri (pypi-uri "Twisted" version ".tar.bz2"))
9744 (sha256
9745 (base32
52ca1c4a 9746 "1gmb8d57s13d8znvqnxi47vqzqz141z443dbxg9wjkp8ia9f220p"))))
44d10b1f
RW
9747 (build-system python-build-system)
9748 (arguments
9749 '(#:tests? #f)) ; FIXME: Some tests are failing.
44d10b1f
RW
9750 (propagated-inputs
9751 `(("python-zope-interface" ,python-zope-interface)
52ca1c4a 9752 ("python-pyhamcrest" ,python-pyhamcrest)
44d10b1f 9753 ("python-incremental" ,python-incremental)
e5ba2fe3 9754 ("python-hyperlink" ,python-hyperlink)
44d10b1f
RW
9755 ("python-constantly" ,python-constantly)
9756 ("python-automat" ,python-automat)))
9757 (home-page "https://twistedmatrix.com/")
9758 (synopsis "Asynchronous networking framework written in Python")
9759 (description
9760 "Twisted is an extensible framework for Python programming, with special
9761focus on event-based network programming and multiprotocol integration.")
9762 (license license:expat)))
9763
9764(define-public python2-twisted
9765 (package-with-python2 python-twisted))
9766
9767(define-public python-pika
9768 (package
9769 (name "python-pika")
9770 (version "0.12.0")
9771 (source
9772 (origin
9773 (method url-fetch)
9774 (uri (pypi-uri "pika" version))
9775 (sha256
9776 (base32
9777 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
9778 (build-system python-build-system)
9779 (native-inputs
9780 `(("python-pyev" ,python-pyev)
9781 ("python-tornado" ,python-tornado)
9782 ("python-twisted" ,python-twisted)))
9783 (home-page "https://pika.readthedocs.org")
9784 (synopsis "Pure Python AMQP Client Library")
9785 (description
9786 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
9787Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
9788network support library.")
9789 (license license:bsd-3)))
9790
9791(define-public python2-pika
9792 (package-with-python2 python-pika))
9793
9794(define-public python-ply
9795 (package
9796 (name "python-ply")
9797 (version "3.10")
9798 (source
9799 (origin
9800 (method url-fetch)
9801 (uri (pypi-uri "ply" version))
9802 (sha256
9803 (base32
9804 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
9805 (build-system python-build-system)
9806 (home-page "http://www.dabeaz.com/ply/")
9807 (synopsis "Python Lex & Yacc")
9808 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
9809It uses LR parsing and does extensive error checking.")
9810 (license license:bsd-3)))
9811
9812(define-public python2-ply
9813 (package-with-python2 python-ply))
9814
9815(define-public python-tabulate
9816 (package
9817 (name "python-tabulate")
9818 (version "0.7.7")
9819 (source (origin
9820 (method url-fetch)
9821 (uri (pypi-uri "tabulate" version))
9822 (sha256
9823 (base32
9824 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
9825 (build-system python-build-system)
9826 (arguments
9827 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
9828 ;; and the latest release is not tagged in the upstream repository.
9829 '(#:tests? #f))
9830 (home-page "https://bitbucket.org/astanin/python-tabulate")
9831 (synopsis "Pretty-print tabular data")
9832 (description
9833 "Tabulate is a library and command-line utility to pretty-print tabular
9834data in Python.")
9835 (license license:expat)))
9836
9837(define-public python2-tabulate
9838 (package-with-python2 python-tabulate))
9839
9840(define-public python-kazoo
9841 (package
9842 (name "python-kazoo")
9843 (version "2.4.0")
9844 (source
9845 (origin
9846 (method url-fetch)
9847 (uri (pypi-uri "kazoo" version))
9848 (sha256
9849 (base32
9850 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
9851 (build-system python-build-system)
9852 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
9853 (propagated-inputs
9854 `(("python-six" ,python-six)))
9855 (home-page "https://kazoo.readthedocs.org")
9856 (synopsis "High-level Zookeeper client library")
9857 (description
9858 "Kazoo is a Python client library for the Apache Zookeeper distributed
9859application service. It is designed to be easy to use and to avoid common
9860programming errors.")
9861 (license license:asl2.0)))
9862
9863(define-public python2-kazoo
9864 (package-with-python2 python-kazoo))
9865
9866(define-public python-pykafka
9867 (package
9868 (name "python-pykafka")
9869 (version "2.4.0")
9870 (source (origin
9871 (method url-fetch)
0ca1d040 9872 (uri (pypi-uri "pykafka" version))
44d10b1f
RW
9873 (sha256
9874 (base32
9875 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
9876 (build-system python-build-system)
9877 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
9878 (propagated-inputs
9879 `(("python-gevent" ,python-gevent)
9880 ("python-kazoo" ,python-kazoo)
9881 ("python-tabulate" ,python-tabulate)))
9882 (inputs
9883 `(("librdkafka" ,librdkafka)))
9884 (home-page "https://pykafka.readthedocs.io/")
9885 (synopsis "Apache Kafka client for Python")
9886 (description
9887 "PyKafka is a client for the Apache Kafka distributed messaging system.
9888It includes Python implementations of Kafka producers and consumers, which
9889are optionally backed by a C extension built on librdkafka.")
9890 (license license:asl2.0)))
9891
9892(define-public python2-pykafka
9893 (package-with-python2 python-pykafka))
9894
9895(define-public python-wcwidth
9896 (package
9897 (name "python-wcwidth")
9898 (version "0.1.7")
9899 (source
9900 (origin
9901 (method url-fetch)
9902 (uri (pypi-uri "wcwidth" version))
9903 (sha256
9904 (base32
9905 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
9906 (build-system python-build-system)
9907 (home-page "https://github.com/jquast/wcwidth")
9908 (synopsis "Measure number of terminal column cells of wide-character codes")
9909 (description "Wcwidth measures the number of terminal column cells of
9910wide-character codes. It is useful for those implementing a terminal emulator,
9911or programs that carefully produce output to be interpreted by one. It is a
9912Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
9913specified in POSIX.1-2001 and POSIX.1-2008.")
9914 (license license:expat)))
9915
9916(define-public python2-wcwidth
9917 (package-with-python2 python-wcwidth))
9918
9919(define-public python2-jsonrpclib
9920 (package
9921 (name "python2-jsonrpclib")
9922 (version "0.1.7")
9923 (source (origin
9924 (method url-fetch)
6571bba0 9925 (uri (pypi-uri "jsonrpclib" version))
44d10b1f
RW
9926 (sha256
9927 (base32
9928 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
9929 (build-system python-build-system)
9930 (arguments
9931 `(#:tests? #f
9932 #:python ,python-2))
9933 (home-page "https://github.com/joshmarshall/jsonrpclib/")
9934 (synopsis "Implementation of JSON-RPC specification for Python")
9935 (description
9936 "This library is an implementation of the JSON-RPC specification.
9937It supports both the original 1.0 specification, as well as the
9938new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
9939etc.")
9940 (license license:asl2.0)))
9941
9942(define-public python-chai
9943 (package
9944 (name "python-chai")
9945 (version "1.1.2")
9946 (source (origin
9947 (method url-fetch)
9948 (uri (pypi-uri "chai" version))
9949 (sha256
9950 (base32
9951 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
9952 (build-system python-build-system)
9953 (home-page "https://github.com/agoragames/chai")
9954 (synopsis "Mocking framework for Python")
9955 (description
9956 "Chai provides an api for mocking, stubbing and spying your python
9957objects, patterned after the Mocha library for Ruby.")
9958 (license license:bsd-3)))
9959
9960(define-public python2-chai
9961 (package-with-python2 python-chai))
9962
9963(define-public python-inflection
9964 (package
9965 (name "python-inflection")
9966 (version "0.3.1")
9967 (source
9968 (origin (method url-fetch)
9969 (uri (pypi-uri "inflection" version))
9970 (sha256
9971 (base32
9972 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
9973 (build-system python-build-system)
9974 (native-inputs
9975 `(("python-pytest" ,python-pytest)))
9976 (home-page "https://github.com/jpvanhal/inflection")
9977 (synopsis "Python string transformation library")
9978 (description
9979 "Inflection is a string transformation library. It singularizes
9980and pluralizes English words, and transforms strings from CamelCase to
9981underscored string.")
9982 (license license:expat)))
9983
9984(define-public python2-inflection
9985 (package-with-python2 python-inflection))
9986
9987(define-public python-pylev
9988 (package
9989 (name "python-pylev")
9990 (version "1.3.0")
9991 (source (origin
9992 (method url-fetch)
9993 (uri (pypi-uri "pylev" version))
9994 (sha256
9995 (base32
9996 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
9997 (build-system python-build-system)
9998 (home-page "https://github.com/toastdriven/pylev")
9999 (synopsis "Levenshtein distance implementation in Python")
10000 (description "Pure Python Levenshtein implementation, based off the
10001Wikipedia code samples at
10002@url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
10003 (license license:bsd-3)))
10004
10005(define-public python2-pylev
10006 (package-with-python2 python-pylev))
10007
10008(define-public python-cleo
10009 (package
10010 (name "python-cleo")
10011 (version "0.6.1")
10012 (source (origin
10013 (method url-fetch)
10014 (uri (pypi-uri "cleo" version))
10015 (sha256
10016 (base32
10017 "0q1cf0szr0d54am4pypzwdnm74zpladdsinad94c2fz5i06fdpf7"))))
10018 (build-system python-build-system)
10019 (native-inputs
10020 `(;; For testing
10021 ("python-mock" ,python-mock)
10022 ("python-pytest-mock" ,python-pytest-mock)
10023 ("python-pytest" ,python-pytest)))
10024 (propagated-inputs
10025 `(("python-backpack" ,python-backpack)
10026 ("python-pastel" ,python-pastel)
10027 ("python-pylev" ,python-pylev)))
10028 (home-page "https://github.com/sdispater/cleo")
10029 (synopsis "Command-line arguments library for Python")
10030 (description
10031 "Cleo allows you to create command-line commands with signature in
10032docstring and colored output.")
10033 (license license:expat)))
10034
10035(define-public python2-cleo
10036 (package-with-python2 python-cleo))
10037
10038(define-public python-lazy-object-proxy
10039 (package
10040 (name "python-lazy-object-proxy")
10041 (version "1.3.1")
10042 (source (origin
10043 (method url-fetch)
10044 (uri (pypi-uri "lazy-object-proxy" version))
10045 (sha256
10046 (base32
10047 "0yha7q9bhw857fwaby785d63mffhngl9npwzlk9i0pwlkwvbx4gb"))))
10048 (build-system python-build-system)
10049 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10050 (synopsis "Lazy object proxy for python")
10051 (description
10052 "Lazy object proxy is an object that wraps a callable but defers the call
10053until the object is actually required, and caches the result of said call.")
10054 (license license:bsd-2)))
10055
10056(define-public python2-lazy-object-proxy
10057 (package-with-python2 python-lazy-object-proxy))
10058
10059(define-public python-dnspython
10060 (package
10061 (name "python-dnspython")
10062 (version "1.15.0")
10063 (source (origin
10064 (method url-fetch)
10065 (uri (string-append "http://www.dnspython.org/kits/"
10066 version "/dnspython-" version ".tar.gz"))
10067 (sha256
10068 (base32
10069 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
10070 (build-system python-build-system)
10071 (arguments '(#:tests? #f)) ; XXX: requires internet access
10072 (home-page "http://www.dnspython.org")
10073 (synopsis "DNS toolkit for Python")
10074 (description
10075 "dnspython is a DNS toolkit for Python. It supports almost all record
10076types. It can be used for queries, zone transfers, and dynamic updates.
10077It supports TSIG authenticated messages and EDNS0.")
10078 (license license:expat)))
10079
10080(define-public python2-dnspython
10081 (package-with-python2 python-dnspython))
10082
10083(define-public python-email-validator
10084 (package
10085 (name "python-email-validator")
10086 (version "1.0.2")
10087 (source
10088 (origin (method url-fetch)
10089 (uri (pypi-uri "email_validator" version))
10090 (sha256
10091 (base32
10092 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
10093 (build-system python-build-system)
10094 (arguments
10095 '(#:phases
10096 (modify-phases %standard-phases
10097 (add-before 'build 'use-dnspython
10098 (lambda _
10099 (substitute* "setup.py"
10100 (("dnspython3") "dnspython"))
10101 #t)))))
10102 (propagated-inputs
10103 `(("python-dnspython" ,python-dnspython)
10104 ("python-idna" ,python-idna)))
10105 (home-page "https://github.com/JoshData/python-email-validator")
10106 (synopsis "Email address validation library for Python")
10107 (description
10108 "This library validates email address syntax and deliverability.")
10109 (license license:cc0)))
10110
10111(define-public python2-email-validator
10112 (package-with-python2 python-email-validator))
10113
10114(define-public python-ukpostcodeparser
10115 (package
10116 (name "python-ukpostcodeparser")
10117 (version "1.0.3")
10118 (source (origin
10119 (method url-fetch)
10120 (uri (pypi-uri "UkPostcodeParser" version))
10121 (sha256
10122 (base32
10123 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10124 (build-system python-build-system)
10125 (home-page "https://github.com/hamstah/ukpostcodeparser")
10126 (synopsis "UK Postcode parser for Python")
10127 (description
10128 "This library provides the @code{parse_uk_postcode} function for
10129parsing UK postcodes.")
10130 (license license:expat)))
10131
10132(define-public python2-ukpostcodeparser
10133 (package-with-python2 python-ukpostcodeparser))
10134
10135(define-public python-faker
10136 (package
10137 (name "python-faker")
10138 (version "0.7.9")
10139 (source (origin
10140 (method url-fetch)
10141 (uri (pypi-uri "Faker" version))
10142 (sha256
10143 (base32
10144 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
10145 (patches
10146 (search-patches "python-faker-fix-build-32bit.patch"))
10147 (modules '((guix build utils)))
10148 (snippet
10149 '(begin
10150 (for-each delete-file (find-files "." "\\.pyc$"))
10151 #t))))
10152 (build-system python-build-system)
10153 (arguments
10154 '(#:phases
10155 (modify-phases %standard-phases
10156 (replace 'check
49ff8827 10157 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
44d10b1f
RW
10158 (native-inputs
10159 `(;; For testing
10160 ("python-email-validator" ,python-email-validator)
10161 ("python-mock" ,python-mock)
10162 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
10163 (propagated-inputs
10164 `(("python-dateutil" ,python-dateutil)
10165 ("python-six" ,python-six)))
10166 (home-page "https://github.com/joke2k/faker")
10167 (synopsis "Python package that generates fake data")
10168 (description
10169 "Faker is a Python package that generates fake data such as names,
10170addresses, and phone numbers.")
10171 (license license:expat)
10172 (properties `((python2-variant . ,(delay python2-faker))))))
10173
10174(define-public python2-faker
10175 (let ((base (package-with-python2 (strip-python2-variant
10176 python-faker))))
10177 (package
10178 (inherit base)
10179 (propagated-inputs
10180 `(("python2-ipaddress" ,python2-ipaddress)
10181 ,@(package-propagated-inputs base))))))
10182
10183(define-public python-pyaml
10184 (package
10185 (name "python-pyaml")
10186 (version "18.11.0")
10187 (source (origin
10188 (method url-fetch)
10189 (uri (pypi-uri "pyaml" version))
10190 (sha256
10191 (base32
10192 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
10193 (build-system python-build-system)
10194 (native-inputs
10195 `(("python-unidecode" ,python-unidecode)))
10196 (propagated-inputs
10197 `(("python-pyyaml" ,python-pyyaml)))
10198 (home-page "https://github.com/mk-fg/pretty-yaml")
10199 (synopsis "YAML pretty-print library for Python")
10200 (description
10201 "pyaml is a PyYAML based python module to produce pretty and readable
10202YAML-serialized data.")
10203 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
10204
10205(define-public python2-pyaml
10206 (package-with-python2 python-pyaml))
10207
10208(define-public python-backpack
10209 (package
10210 (name "python-backpack")
10211 (version "0.1")
10212 (source
10213 (origin
10214 (method url-fetch)
10215 (uri (pypi-uri "backpack" version))
10216 (sha256
10217 (base32
10218 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
10219 (build-system python-build-system)
10220 (native-inputs
10221 `(("python-pytest" ,python-pytest)
10222 ("python-nose" ,python-nose)))
10223 (propagated-inputs
10224 `(("python-simplejson" ,python-simplejson)))
10225 (home-page "https://github.com/sdispater/backpack")
10226 (synopsis "Utilities for working with Python collections")
10227 (description "Backpack provides some useful utilities for working with
10228collections of data.")
10229 (license license:expat)))
10230
10231(define-public python2-backpack
10232 (package-with-python2 python-backpack))
10233
10234(define-public python-prompt-toolkit
10235 (package
10236 (name "python-prompt-toolkit")
10237 (version "2.0.7")
10238 (source
10239 (origin
10240 (method url-fetch)
10241 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10242 (sha256
10243 (base32
10244 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
10245 (build-system python-build-system)
10246 (arguments
10247 `(#:phases
10248 (modify-phases %standard-phases
10249 (delete 'check)
10250 (add-after 'install 'post-install-check
10251 (lambda* (#:key inputs outputs #:allow-other-keys)
10252 ;; HOME is needed for the test
10253 ;; "test_pathcompleter_can_expanduser".
10254 (setenv "HOME" "/tmp")
10255 (add-installed-pythonpath inputs outputs)
10256 (invoke "py.test"))))))
10257 (propagated-inputs
10258 `(("python-wcwidth" ,python-wcwidth)
10259 ("python-six" ,python-six)
10260 ("python-pygments" ,python-pygments)))
10261 (native-inputs
10262 `(("python-pytest" ,python-pytest)))
10263 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10264 (synopsis "Library for building command line interfaces in Python")
10265 (description
10266 "Prompt-Toolkit is a library for building interactive command line
10267interfaces in Python. It's like GNU Readline but it also features syntax
10268highlighting while typing, out-of-the-box multi-line input editing, advanced
10269code completion, incremental search, support for Chinese double-width
10270characters, mouse support, and auto suggestions.")
10271 (license license:bsd-3)))
10272
10273(define-public python2-prompt-toolkit
10274 (package-with-python2 python-prompt-toolkit))
10275
10276(define-public python-prompt-toolkit-1
10277 (package (inherit python-prompt-toolkit)
10278 (version "1.0.15")
10279 (source
10280 (origin
10281 (method url-fetch)
10282 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10283 (sha256
10284 (base32
10285 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
10286
10287(define-public python2-prompt-toolkit-1
10288 (package-with-python2 python-prompt-toolkit-1))
10289
10290(define-public python-jedi
10291 (package
10292 (name "python-jedi")
40bd0aa3 10293 (version "0.13.2")
44d10b1f
RW
10294 (source
10295 (origin
10296 (method url-fetch)
10297 (uri (pypi-uri "jedi" version))
10298 (sha256
10299 (base32
40bd0aa3 10300 "1za944msp0f8x36qa8l309jhv0kzlsdh7r9nj3z12y8npnsh45sp"))))
44d10b1f
RW
10301 (build-system python-build-system)
10302 (arguments
40bd0aa3 10303 `( ;; Many tests are failing with Python 3.7.x as of version 0.13.2 (see:
44d10b1f
RW
10304 ;; https://github.com/davidhalter/jedi/issues/1263)
10305 #:tests? #f
10306 #:phases
10307 (modify-phases %standard-phases
10308 (replace 'check
10309 (lambda* (#:key tests? #:allow-other-keys)
10310 (when tests?
10311 (invoke "py.test" "-vv")))))))
10312 (native-inputs
10313 `(("python-pytest" ,python-pytest)
10314 ("python-docopt" ,python-docopt)))
10315 (propagated-inputs
10316 `(("python-parso" ,python-parso)))
10317 (home-page "https://github.com/davidhalter/jedi")
10318 (synopsis "Autocompletion and static analysis library for Python")
10319 (description
10320 "Jedi is a static analysis tool for Python that can be used in Integrated
10321Development Environments (@dfn{IDE}s) and text editors. It understands Python
10322on a deeper level than many other static analysis frameworks for Python.
10323
10324Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
10325well.")
10326 (license license:expat)))
10327
10328(define-public python2-jedi
10329 (package-with-python2 python-jedi))
10330
10331(define-public ptpython
10332 (package
10333 (name "ptpython")
10334 (version "0.34")
10335 (source (origin
10336 (method url-fetch)
10337 (uri (pypi-uri "ptpython" version))
10338 (sha256
10339 (base32
10340 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10341 (build-system python-build-system)
10342 (arguments
10343 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
10344 (propagated-inputs
10345 `(("python-docopt" ,python-docopt)
10346 ("python-jedi" ,python-jedi)
10347 ("python-prompt-toolkit" ,python-prompt-toolkit)
10348 ("python-pygments" ,python-pygments)))
10349 (home-page "https://github.com/jonathanslenders/ptpython")
10350 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10351 (description
10352 "ptpython is a Python read-eval-print loop with IDE-like features.
10353It supports syntax highlighting, multiline editing, autocompletion, mouse,
10354color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10355etc.")
10356 (license license:bsd-3)
10357 (properties `((python2-variant . ,(delay ptpython-2))))))
10358
10359(define-public ptpython-2
10360 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10361 (package
10362 (inherit base)
10363 (name "ptpython2"))))
10364
10365(define-public python-stem
10366 (package
10367 (name "python-stem")
10368 (version "1.7.0")
10369 (source
10370 (origin
10371 (method url-fetch)
10372 (uri (pypi-uri "stem" version))
10373 (sha256
10374 (base32
10375 "1awiglfiajnx2hva9aqpj3fmdvdb4qg7cwnlfyih827m68y3cq8v"))))
10376 (build-system python-build-system)
10377 (arguments
10378 `(#:phases
10379 (modify-phases %standard-phases
10380 (replace 'check
10381 (lambda _
10382 (invoke "./run_tests.py" "--unit")
10383 #t)))))
10384 (native-inputs
10385 `(("python-mock" ,python-mock)
10386 ("python-pycodestyle" ,python-pycodestyle)
10387 ("python-pyflakes" ,python-pyflakes)))
10388 (home-page "https://stem.torproject.org/")
10389 (synopsis
10390 "Python controller library that allows applications to interact with Tor")
10391 (description
10392 "Stem is a Python controller library for Tor. With it you can use Tor's
10393control protocol to script against the Tor process and read descriptor data
10394relays publish about themselves.")
10395 (license license:lgpl3)))
10396
10397(define-public python2-stem
10398 (package-with-python2 python-stem))
10399
10400(define-public python-pyserial
10401 (package
10402 (name "python-pyserial")
10403 (version "3.1.1")
10404 (source
10405 (origin
10406 (method url-fetch)
10407 (uri (pypi-uri "pyserial" version))
10408 (sha256
10409 (base32
10410 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
10411 (build-system python-build-system)
10412 (arguments
10413 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
10414 ;; #:phases
10415 ;; (modify-phases %standard-phases
10416 ;; (replace 'check
10417 ;; (lambda _
10418 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
10419 (home-page
10420 "https://github.com/pyserial/pyserial")
10421 (synopsis "Python Serial Port Bindings")
10422 (description "@code{pyserial} provide serial port bindings for Python. It
10423supports different byte sizes, stop bits, parity and flow control with RTS/CTS
10424and/or Xon/Xoff. The port is accessed in RAW mode.")
10425 (license license:bsd-3)))
10426
10427(define-public python2-pyserial
10428 (package-with-python2 python-pyserial))
10429
10430(define-public python-kivy
10431 (package
10432 (name "python-kivy")
10433 (version "1.10.1")
10434 (source
10435 (origin
10436 (method url-fetch)
10437 (uri (pypi-uri "Kivy" version))
10438 (file-name (string-append name "-" version ".tar.gz"))
10439 (sha256
10440 (base32
10441 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
10442 (build-system python-build-system)
10443 (arguments
10444 `(#:tests? #f ; Tests require many optional packages
10445 #:phases
10446 (modify-phases %standard-phases
10447 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
10448 (lambda* (#:key inputs #:allow-other-keys)
10449 (setenv "KIVY_SDL2_PATH"
10450 (string-append (assoc-ref inputs "sdl-union")
10451 "/include/SDL2"))
10452 #t)))))
10453 (native-inputs
10454 `(("git" ,git)
10455 ("pkg-config" ,pkg-config)
10456 ("python-cython" ,python-cython)))
10457 (inputs
10458 `(("gstreamer" ,gstreamer)
10459 ("mesa" ,mesa)
10460 ("sdl-union"
10461 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
10462 (home-page "http://kivy.org")
10463 (synopsis
10464 "Multitouch application framework")
10465 (description
10466 "A software library for rapid development of
10467hardware-accelerated multitouch applications.")
10468 (license license:expat)))
10469
10470(define-public python2-kivy
10471 (package-with-python2 python-kivy))
10472
10473(define-public python-kivy-next
10474 (deprecated-package "python-kivy-next" python-kivy))
10475
10476(define-public python2-kivy-next
10477 (deprecated-package "python2-kivy-next" python2-kivy))
10478
10479(define-public python-binaryornot
10480 (package
10481 (name "python-binaryornot")
10482 (version "0.4.4")
10483 (source (origin
10484 (method url-fetch)
10485 (uri (pypi-uri "binaryornot" version))
10486 (sha256
10487 (base32
10488 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
10489 (build-system python-build-system)
10490 (propagated-inputs
10491 `(("python-chardet" ,python-chardet)
10492 ("python-hypothesis" ,python-hypothesis)))
10493 (home-page "https://github.com/audreyr/binaryornot")
10494 (synopsis "Package to check if a file is binary or text")
10495 (description "Ultra-lightweight pure Python package to check if a file is
10496binary or text.")
10497 (license license:bsd-3)
10498 (properties `((python2-variant . ,(delay python2-binaryornot))))))
10499
10500(define-public python2-binaryornot
10501 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
10502 (package (inherit base)
10503 (propagated-inputs
10504 `(("python2-enum34" ,python2-enum34)
10505 ,@(package-propagated-inputs base))))))
10506
10507(define-public python-nltk
10508 (package
10509 (name "python-nltk")
10510 (version "3.2.1")
10511 (source (origin
10512 (method url-fetch)
10513 (uri (pypi-uri "nltk" version))
10514 (sha256
10515 (base32
10516 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
10517 (build-system python-build-system)
10518 (arguments
10519 '(;; The tests require some extra resources to be downloaded.
10520 ;; TODO Try packaging these resources.
10521 #:tests? #f))
10522 (home-page "http://nltk.org/")
10523 (synopsis "Natural Language Toolkit")
10524 (description "It provides interfaces to over 50 corpora and lexical
10525resources such as WordNet, along with a suite of text processing libraries
10526for classification, tokenization, stemming, tagging, parsing, and semantic
10527reasoning, wrappers for natural language processing libraries.")
10528 (license license:asl2.0)))
10529
10530(define-public python2-nltk
10531 (package-with-python2 python-nltk))
10532
10533(define-public python-pymongo
10534 (package
10535 (name "python-pymongo")
10536 (version "3.7.2")
10537 (source (origin
10538 (method url-fetch)
10539 (uri (pypi-uri "pymongo" version))
10540 (sha256
10541 (base32
10542 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
10543 (build-system python-build-system)
10544 (propagated-inputs
10545 `(("python-certifi" ,python-certifi)))
10546 (home-page "https://github.com/mongodb/mongo-python-driver")
10547 (synopsis "Python driver for MongoDB")
10548 (description "Python driver for MongoDB.")
10549 (license license:asl2.0)))
10550
10551(define-public python2-pymongo
10552 (package-with-python2 python-pymongo))
10553
44d10b1f
RW
10554(define-public python-consul
10555 (package
10556 (name "python-consul")
10557 (version "0.6.1")
10558 (source
10559 (origin
10560 (method url-fetch)
10561 (uri (pypi-uri "python-consul" version))
10562 (sha256
10563 (base32
10564 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
10565 (build-system python-build-system)
10566 (arguments
10567 '(#:tests? #f)) ; The tests are not distributed
10568 (propagated-inputs
10569 `(("python-requests" ,python-requests)
10570 ("python-six" ,python-six)))
10571 (home-page "https://github.com/cablehead/python-consul")
10572 (synopsis "Python client for Consul")
10573 (description
10574 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
10575discovery, monitoring and configuration.")
10576 (license license:expat)))
10577
10578(define-public python2-consul
10579 (package-with-python2 python-consul))
10580
10581(define-public python-schematics
10582 (package
10583 (name "python-schematics")
10584 (version "1.1.1")
10585 (source
1961d187
TGR
10586 (origin
10587 (method git-fetch)
10588 (uri (git-reference
10589 (url "https://github.com/schematics/schematics.git")
10590 (commit (string-append "v" version))))
10591 (file-name (git-file-name name version))
10592 (sha256
10593 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
44d10b1f
RW
10594 (build-system python-build-system)
10595 (propagated-inputs
10596 `(("python-six" ,python-six)))
10597 (arguments
1961d187
TGR
10598 ;; The tests require a bunch of not very nice packages with fixed
10599 ;; version requirements (e.g. python-coveralls).
10600 `(#:tests? #f))
44d10b1f
RW
10601 (home-page "https://github.com/schematics/schematics")
10602 (synopsis "Python Data Structures for Humans")
10603 (description "Python Data Structures for Humans.")
10604 (license license:bsd-3)))
10605
10606(define-public python2-schematics
10607 (package-with-python2 python-schematics))
10608
10609(define-public python-odfpy
10610 (package
10611 (name "python-odfpy")
10612 (version "1.3.3")
10613 (source (origin
10614 (method url-fetch)
10615 (uri (pypi-uri "odfpy" version))
10616 (sha256
10617 (base32
10618 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
10619 (arguments
10620 `(#:modules ((srfi srfi-1)
10621 (guix build python-build-system)
10622 (guix build utils))
10623 #:phases
10624 (modify-phases %standard-phases
10625 (replace 'check
10626 ;; The test runner invokes python2 and python3 for test*.py.
10627 ;; To avoid having both in inputs, we replicate it here.
10628 (lambda _
21ccc01d
RW
10629 (for-each (lambda (test-file) (invoke "python" test-file))
10630 (find-files "tests" "^test.*\\.py$"))
10631 #t)))))
44d10b1f
RW
10632 (build-system python-build-system)
10633 (home-page "https://github.com/eea/odfpy")
10634 (synopsis "Python API and tools to manipulate OpenDocument files")
10635 (description "Collection of libraries and utility programs written in
10636Python to manipulate OpenDocument 1.2 files.")
10637 (license
10638 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
10639 ;; number of files with other licenses.
10640 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
10641
10642(define-public python2-odfpy
10643 (package-with-python2 python-odfpy))
10644
10645(define-public python-natsort
10646 (package
10647 (name "python-natsort")
10648 (version "5.4.1")
10649 (source (origin
10650 (method url-fetch)
10651 (uri (pypi-uri "natsort" version))
10652 (sha256
10653 (base32
10654 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
10655 (build-system python-build-system)
10656 (arguments
10657 `(#:modules ((guix build utils)
10658 (guix build python-build-system)
10659 (srfi srfi-1)
10660 (srfi srfi-26)
10661 (ice-9 ftw))
10662 #:phases
10663 (modify-phases %standard-phases
10664 (add-before 'check 'set-cachedir
10665 ;; Tests require write access to $HOME by default
10666 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
10667 (replace 'check
10668 (lambda _
10669 (let ((cwd (getcwd)))
10670 (setenv "PYTHONPATH"
10671 (string-append
10672 cwd "/build/"
10673 (find (cut string-prefix? "lib" <>)
10674 (scandir (string-append cwd "/build")))
10675 ":"
10676 (getenv "PYTHONPATH")))
10677 (invoke "pytest" "-v")))))))
10678 (native-inputs
10679 `(("python-hypothesis" ,python-hypothesis)
10680 ("python-pytest-cov" ,python-pytest-cov)
10681 ("python-pytest-mock" ,python-pytest-mock)
10682 ("python-pytest" ,python-pytest)))
10683 (propagated-inputs ; TODO: Add python-fastnumbers.
10684 `(("python-pyicu" ,python-pyicu)))
10685 (home-page "https://github.com/SethMMorton/natsort")
10686 (synopsis "Natural sorting for python and shell")
10687 (description
10688 "Natsort lets you apply natural sorting on lists instead of
10689lexicographical. If you use the built-in @code{sorted} method in python
36a4366d
EF
10690on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
10691@code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
10692@code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
10693identifies numbers and sorts them separately from strings. It can also sort
10694version numbers, real numbers, mixed types and more, and comes with a shell
10695command @command{natsort} that exposes this functionality in the command line.")
44d10b1f
RW
10696 (license license:expat)
10697 (properties `((python2-variant . ,(delay python2-natsort))))))
10698
10699(define-public python2-natsort
10700 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
10701 (package (inherit base)
10702 (native-inputs
10703 `(("python2-pathlib" ,python2-pathlib)
10704 ,@(package-native-inputs base))))))
10705
10706(define-public python-glances
10707 (package
10708 (name "python-glances")
10709 (version "3.0.2")
10710 (source
10711 (origin
10712 (method url-fetch)
10713 (uri (pypi-uri "Glances" version))
10714 (sha256
10715 (base32
10716 "09fxysfp1n16csqvzvawy74qm6a94nvwjf3vcf5gkqp4i6k4vjjy"))))
10717 (build-system python-build-system)
10718 (propagated-inputs
10719 `(("python-psutil" ,python-psutil)))
10720 (home-page
10721 "https://github.com/nicolargo/glances")
10722 (synopsis
10723 "A cross-platform curses-based monitoring tool")
10724 (description
10725 "Glances is a curses-based monitoring tool for a wide variety of platforms.
10726Glances uses the PsUtil library to get information from your system. It monitors
10727CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
10728 (license license:lgpl3+)))
10729
10730(define-public python2-glances
10731 (package-with-python2 python-glances))
10732
10733(define-public python-graphql-core
10734 (package
10735 (name "python-graphql-core")
10736 (version "0.5.3")
10737 (source
10738 (origin
10739 (method url-fetch)
10740 (uri (pypi-uri "graphql-core" version))
10741 (sha256
10742 (base32
10743 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
10744 (build-system python-build-system)
10745 (arguments
10746 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
10747 #:phases
10748 (modify-phases %standard-phases
10749 (add-after 'unpack 'patch-hardcoded-version
10750 (lambda _ (substitute*
10751 "setup.py"
10752 (("'gevent==1.1rc1'") "'gevent'"))
10753 #t)))))
10754 (native-inputs
10755 `(("python-gevent" ,python-gevent)
10756 ("python-mock" ,python-mock)
10757 ("python-pytest-mock" ,python-pytest-mock)))
10758 (propagated-inputs
10759 `(("python-promise" ,python-promise)
10760 ("python-six" ,python-six)))
10761 (home-page "https://github.com/graphql-python/graphql-core")
10762 (synopsis "GraphQL implementation for Python")
10763 (description
10764 "GraphQL implementation for Python. GraphQL is a data query language and
10765runtime designed and used to request and deliver data to mobile and web apps.
10766This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
10767to Python.")
10768 (license license:expat)))
10769
10770(define-public python2-graphql-core
10771 (package-with-python2 python-graphql-core))
10772
10773(define-public python-graphql-relay
10774 (package
10775 (name "python-graphql-relay")
10776 (version "0.4.5")
10777 (source
10778 (origin
10779 (method url-fetch)
10780 (uri (pypi-uri "graphql-relay" version))
10781 (sha256
10782 (base32
10783 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
10784 (build-system python-build-system)
10785 (arguments
10786 '(#:tests? #f)) ; The tests are not distributed
10787 (propagated-inputs
10788 `(("python-graphql-core" ,python-graphql-core)
10789 ("python-promise" ,python-promise)
10790 ("python-six" ,python-six)))
10791 (home-page "https://github.com/graphql-python/graphql-relay-py")
10792 (synopsis "Relay implementation for Python")
10793 (description
10794 "This is a library to allow the easy creation of Relay-compliant servers
10795using the GraphQL Python reference implementation of a GraphQL server. It
10796should be noted that the code is a exact port of the original
10797@url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
10798from Facebook.")
10799 (license license:expat)))
10800
10801(define-public python2-graphql-relay
10802 (package-with-python2 python-graphql-relay))
10803
10804(define-public python-graphene
10805 (package
10806 (name "python-graphene")
10807 (version "0.10.2")
10808 (source
10809 (origin
10810 (method url-fetch)
10811 (uri (pypi-uri "graphene" version))
10812 (sha256
10813 (base32
10814 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
10815 (build-system python-build-system)
10816 (propagated-inputs
10817 `(("python-graphql-core" ,python-graphql-core)
10818 ("python-graphql-relay" ,python-graphql-relay)
10819 ("python-iso8601" ,python-iso8601)
10820 ("python-promise" ,python-promise)
10821 ("python-six" ,python-six)))
10822 (arguments
10823 `(#:tests? #f)) ; no tests/ in the PyPI tarball
10824 (home-page "http://graphene-python.org/")
10825 (synopsis "GraphQL Framework for Python")
10826 (description
10827 "Graphene is a Python library for building GraphQL schemas/types.
10828A GraphQL schema describes your data model, and provides a GraphQL server
10829with an associated set of resolve methods that know how to fetch data.")
10830 (properties `((python2-variant . ,(delay python2-graphene))))
10831 (license license:expat)))
10832
10833(define-public python2-graphene
10834 (let ((base (package-with-python2
10835 (strip-python2-variant python-graphene))))
10836 (package (inherit base)
10837 (native-inputs
10838 `(("python2-sqlalchemy" ,python2-sqlalchemy)
10839 ,@(package-native-inputs base))))))
10840
10841(define-public python-nautilus
10842 (package
10843 (name "python-nautilus")
10844 (version "0.4.9")
10845 (source
10846 (origin
10847 (method url-fetch)
10848 (uri (pypi-uri "nautilus" version))
10849 (sha256
10850 (base32
10851 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
10852 (build-system python-build-system)
10853 (arguments `(#:tests? #f)) ; fails to import test modules
10854 (propagated-inputs
10855 `(("python-bcrypt" ,python-bcrypt)
10856 ("python-click" ,python-click)
10857 ("python-consul" ,python-consul)
10858 ("python-graphene" ,python-graphene)
10859 ("python-jinja2" ,python-jinja2)
10860 ("python-peewee" ,python-peewee)
10861 ("python-pika" ,python-pika)
10862 ("python-tornado" ,python-tornado)
10863 ("python-wtforms" ,python-wtforms)))
10864 (native-inputs
10865 `(("python-nose2" ,python-nose2)))
10866 (home-page "https://github.com/AlecAivazis/nautilus")
10867 (synopsis "Library for creating microservice applications")
10868 (description
10869 "Nautilus is a framework for flux based microservices that looks to
10870provide extendible implementations of common aspects of a cloud so that you can
10871focus on building massively scalable web applications.")
10872 (license license:expat)))
10873
10874(define-public python-snowballstemmer
10875 (package
10876 (name "python-snowballstemmer")
10877 (version "1.2.1")
10878 (source (origin
10879 (method url-fetch)
10880 (uri (pypi-uri "snowballstemmer" version))
10881 (sha256
10882 (base32
10883 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
10884 (build-system python-build-system)
10885 (arguments
10886 `(;; No tests exist
10887 #:tests? #f))
10888 (home-page "https://github.com/shibukawa/snowball_py")
10889 (synopsis "Snowball stemming library collection for Python")
10890 (description "This package provides 16 word stemmer algorithms generated
10891from Snowball algorithms. It includes the 15 original ones plus the Poerter
10892English stemmer.")
10893 (license license:bsd-3)))
10894
10895(define-public python2-snowballstemmer
10896 (package-with-python2 python-snowballstemmer))
10897
10898(define-public python-sphinx-cloud-sptheme
10899 (package
10900 (name "python-sphinx-cloud-sptheme")
10901 (version "1.8.0")
10902 (source (origin
10903 (method url-fetch)
10904 (uri (pypi-uri "cloud_sptheme" version))
10905 (sha256
10906 (base32
10907 "1dniqb6a39yh786f86c4jn666rwnyi1jvzn4616zhcchb7sfdshd"))))
10908 (build-system python-build-system)
10909 ;; FIXME: The 'pypi' release archive does not contain tests.
10910 (arguments '(#:tests? #f))
10911 (native-inputs
10912 `(("python-sphinx" ,python-sphinx)))
10913 (home-page "https://bitbucket.org/ecollins/cloud_sptheme")
10914 (synopsis "'Cloud' theme for Sphinx documenter")
10915 (description "This package contains the \"Cloud\" theme for Sphinx and some
10916related extensions.")
10917 (license license:bsd-3)))
10918
10919(define-public python2-sphinx-cloud-sptheme
10920 (package-with-python2 python-sphinx-cloud-sptheme))
10921
10922(define-public python-sphinx-alabaster-theme
10923 (package
10924 (name "python-sphinx-alabaster-theme")
10925 (version "0.7.12")
10926 (source (origin
10927 (method url-fetch)
10928 (uri (pypi-uri "alabaster" version))
10929 (sha256
10930 (base32
10931 "00nwwjj2d2ym4s2kk217x7jkx1hnczc3fvm8yxbqmsp6b0nxfqd6"))))
10932 (build-system python-build-system)
10933 (propagated-inputs
10934 `(("python-pygments" ,python-pygments)))
10935 (home-page "https://alabaster.readthedocs.io/")
10936 (synopsis "Configurable sidebar-enabled Sphinx theme")
10937 (description "Alabaster is a visually (c)lean, responsive, configurable
10938theme for the Sphinx documentation system. It's the default theme of Sphinx.")
10939 (license license:bsd-3)))
10940
10941(define-public python2-sphinx-alabaster-theme
10942 (package-with-python2 python-sphinx-alabaster-theme))
10943
10944(define-public python-setproctitle
10945(package
10946 (name "python-setproctitle")
10947 (version "1.1.10")
10948 (source
10949 (origin
10950 (method url-fetch)
10951 (uri (pypi-uri "setproctitle" version))
10952 (sha256
10953 (base32
10954 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
10955 (build-system python-build-system)
10956 (arguments
10957 '(#:phases
10958 (modify-phases %standard-phases
10959 (add-before 'check 'patch-Makefile
10960 ;; Stricly this is only required for the python2 variant.
10961 ;; But adding a phase in an inherited package seems to be
10962 ;; cumbersum. So we patch even for python3.
10963 (lambda _
10964 (let ((nose (assoc-ref %build-inputs "python2-nose")))
10965 (when nose
10966 (substitute* "Makefile"
10967 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
10968 (string-append nose "/bin/nosetests "))))
10969 #t)))
10970 (replace 'check
10971 (lambda _
10972 (setenv "PYTHON" (or (which "python3") (which "python")))
10973 (setenv "PYCONFIG" (or (which "python3-config")
10974 (which "python-config")))
10975 (setenv "CC" "gcc")
10976 ;; No need to extend PYTHONPATH to find the built package, since
10977 ;; the Makefile will build anyway
10978 (invoke "make" "check"))))))
10979 (native-inputs
10980 `(("procps" ,procps))) ; required for tests
10981 (home-page
10982 "https://github.com/dvarrazzo/py-setproctitle")
10983 (synopsis
10984 "Setproctitle implementation for Python to customize the process title")
10985 (description "The library allows a process to change its title (as displayed
10986by system tools such as ps and top).
10987
10988Changing the title is mostly useful in multi-process systems, for
10989example when a master process is forked: changing the children's title
10990allows to identify the task each process is busy with. The technique
10991is used by PostgreSQL and the OpenSSH Server for example.")
10992 (license license:bsd-3)
10993 (properties `((python2-variant . ,(delay python2-setproctitle))))))
10994
10995(define-public python2-setproctitle
10996 (let ((base (package-with-python2
10997 (strip-python2-variant python-setproctitle))))
10998 (package
10999 (inherit base)
11000 (native-inputs `(("python2-nose" ,python2-nose)
11001 ,@(package-native-inputs base))))))
11002
11003(define-public python-validictory
11004 (package
11005 (name "python-validictory")
11006 (version "1.0.1")
11007 (source
11008 (origin
11009 (method url-fetch)
11010 (uri (pypi-uri "validictory" version))
11011 (sha256
11012 (base32
11013 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11014 (build-system python-build-system)
11015 (arguments
11016 '(#:phases
11017 (modify-phases %standard-phases
11018 (add-after 'unpack 'bootstrap
11019 ;; Move the tests out of the package directory to avoid
11020 ;; packaging them.
11021 (lambda* _
11022 (rename-file "validictory/tests" "tests")
11023 (delete-file "tests/__init__.py")))
11024 (replace 'check
11025 (lambda _
11026 ;; Extend PYTHONPATH so the built package will be found.
11027 (setenv "PYTHONPATH"
11028 (string-append (getcwd) "/build/lib:"
11029 (getenv "PYTHONPATH")))
6568bd5d 11030 (invoke "py.test" "-vv" ))))))
44d10b1f
RW
11031 (native-inputs
11032 `(("python-pytest" ,python-pytest)))
11033 (home-page
11034 "https://github.com/jamesturk/validictory")
11035 (synopsis "General purpose Python data validator")
11036 (description "It allows validation of arbitrary Python data structures.
11037
11038The schema format is based on the JSON Schema
11039proposal (http://json-schema.org), so combined with json the library is also
11040useful as a validator for JSON data.")
11041 (license license:expat)))
11042
11043(define-public python2-validictory
11044 (package-with-python2 python-validictory))
11045
11046(define-public python-pyelftools
11047 (package
11048 (name "python-pyelftools")
11049 (version "0.25")
11050 (source
11051 (origin
11052 (method url-fetch)
11053 (uri (pypi-uri "pyelftools" version))
11054 (sha256
11055 (base32
11056 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
11057 (build-system python-build-system)
11058 (arguments
11059 `(#:phases
11060 (modify-phases %standard-phases
11061 (add-before 'check 'set-pythonpath
11062 (lambda _
11063 (setenv "PYTHONPATH"
11064 (string-append
11065 (getcwd) "/test/"
11066 ":" (getenv "PYTHONPATH")))
11067 #t)))))
11068 (home-page
11069 "https://github.com/eliben/pyelftools")
11070 (synopsis
11071 "Analyze binary and library file information")
11072 (description "This Python library provides interfaces for parsing and
11073analyzing two binary and library file formats; the Executable and Linking
11074Format (ELF), and debugging information in the Debugging With Attributed
11075Record Format (DWARF).")
11076 (license license:public-domain)))
11077
11078(define-public python-pyev
11079 (package
11080 (name "python-pyev")
11081 (version "0.9.0")
11082 (source
11083 (origin
11084 (method url-fetch)
11085 (uri (pypi-uri "pyev" version))
11086 (sha256
11087 (base32
11088 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11089 (build-system python-build-system)
11090 (arguments
11091 `(#:tests? #f ; no test suite
11092 #:phases
11093 (modify-phases %standard-phases
11094 (add-after 'unpack 'patch
11095 (lambda* (#:key inputs #:allow-other-keys)
11096 (let ((libev (string-append (assoc-ref inputs "libev")
11097 "/lib/libev.so.4")))
11098 (substitute* "setup.py"
11099 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
11100 (string-append "libev_dll_name = \"" libev "\"")))))))))
11101 (inputs
11102 `(("libev" ,libev)))
11103 (home-page "http://pythonhosted.org/pyev/")
11104 (synopsis "Python libev interface")
11105 (description "Pyev provides a Python interface to libev.")
11106 (license license:gpl3)))
11107
11108(define-public python2-pyev
11109 (package-with-python2 python-pyev))
11110
11111(define-public python-imagesize
11112 (package
11113 (name "python-imagesize")
11114 (version "1.1.0")
11115 (source
11116 (origin
11117 (method url-fetch)
11118 (uri (pypi-uri "imagesize" version))
11119 (sha256
11120 (base32
11121 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
11122 (build-system python-build-system)
11123 (home-page "https://github.com/shibukawa/imagesize_py")
11124 (synopsis "Gets image size of files in various formats in Python")
11125 (description
11126 "This package allows determination of image size from
11127PNG, JPEG, JPEG2000 and GIF files in pure Python.")
11128 (license license:expat)))
11129
11130(define-public python2-imagesize
11131 (package-with-python2 python-imagesize))
11132
11133(define-public python-termstyle
11134 (package
11135 (name "python-termstyle")
11136 (version "0.1.11")
11137 (source
11138 (origin
11139 (method url-fetch)
11140 (uri (pypi-uri "termstyle" version))
11141 (sha256
11142 (base32
11143 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
11144 (build-system python-build-system)
11145 (arguments
11146 '(#:phases
11147 (modify-phases %standard-phases
11148 (replace 'check
11149 (lambda _
831080a6 11150 (invoke "python" "test3.py"))))))
44d10b1f
RW
11151 (home-page "https://github.com/gfxmonk/termstyle")
11152 (synopsis "Console text coloring for Python")
11153 (description "This package provides console text coloring for Python.")
11154 (license license:bsd-3)))
11155
11156(define-public python-argcomplete
11157 (package
11158 (name "python-argcomplete")
11159 (version "1.7.0")
11160 (source
11161 (origin
11162 (method url-fetch)
11163 (uri (pypi-uri "argcomplete" version))
11164 (sha256
11165 (base32
11166 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
11167 (build-system python-build-system)
11168 (native-inputs
11169 `(("python-pexpect" ,python-pexpect)
11170 ("tcsh" ,tcsh)
11171 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
11172 (home-page "https://github.com/kislyuk/argcomplete")
11173 (synopsis "Shell tab completion for Python argparse")
11174 (description "argcomplete provides extensible command line tab completion
11175of arguments and options for Python scripts using @code{argparse}. It's
11176particularly useful for programs with many options or sub-parsers that can
11177dynamically suggest completions; for example, when browsing resources over the
11178network.")
11179 (license license:asl2.0)))
11180
11181(define-public python2-argcomplete
11182 (package-with-python2 python-argcomplete))
11183
11184(define-public python-xopen
11185 (package
11186 (name "python-xopen")
24d64989 11187 (version "0.5.0")
44d10b1f
RW
11188 (source
11189 (origin
11190 (method url-fetch)
11191 (uri (pypi-uri "xopen" version))
11192 (sha256
11193 (base32
24d64989 11194 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
44d10b1f 11195 (build-system python-build-system)
24d64989
RW
11196 (propagated-inputs
11197 `(("python-setuptools-scm" ,python-setuptools-scm)))
44d10b1f
RW
11198 (home-page "https://github.com/marcelm/xopen/")
11199 (synopsis "Open compressed files transparently")
11200 (description "This module provides an @code{xopen} function that works like
11201Python's built-in @code{open} function, but can also deal with compressed files.
11202Supported compression formats are gzip, bzip2 and, xz, and are automatically
11203recognized by their file extensions. The focus is on being as efficient as
11204possible on all supported Python versions.")
11205 (license license:expat)))
11206
11207(define-public python2-xopen
11208 (let ((base (package-with-python2
11209 (strip-python2-variant python-xopen))))
11210 (package
11211 (inherit base)
11212 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
11213 ,@(package-propagated-inputs base))))))
11214
11215(define-public python-cheetah
11216 (package
11217 (name "python-cheetah")
11218 (version "3.1.0")
11219 (source
11220 (origin
11221 (method url-fetch)
11222 (uri (pypi-uri "Cheetah3" version))
11223 (sha256
11224 (base32
11225 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
11226 (build-system python-build-system)
11227 (arguments
11228 `(#:modules ((guix build utils)
11229 (guix build python-build-system)
11230 (ice-9 ftw)
11231 (srfi srfi-1)
11232 (srfi srfi-26))
11233 #:phases (modify-phases %standard-phases
11234 (add-after 'unpack 'use-absolute-python
11235 (lambda _
11236 (substitute* "Cheetah/CheetahWrapper.py"
11237 (("#!/usr/bin/env python")
11238 (string-append "#!" (which "python"))))
11239 #t))
11240 (replace 'check
11241 (lambda _
11242 (let ((cwd (getcwd)))
11243 (setenv "PYTHONPATH"
11244 (string-append
11245 cwd "/build/"
11246 (find (cut string-prefix? "lib" <>)
11247 (scandir (string-append cwd "/build")))
11248 ":" (getenv "PYTHONPATH")))
11249 (setenv "PATH"
11250 (string-append (getenv "PATH")
11251 ":" cwd "/bin"))
11252 (setenv "TMPDIR" "/tmp")
11253
11254 (substitute* "Cheetah/Tests/Test.py"
11255 (("unittest.TextTestRunner\\(\\)")
11256 "unittest.TextTestRunner(verbosity=2)"))
11257
11258 (invoke "python" "Cheetah/Tests/Test.py")))))))
11259 (propagated-inputs
11260 `(("python-markdown" ,python-markdown))) ;optional
11261 (home-page "http://cheetahtemplate.org/")
11262 (synopsis "Template engine")
11263 (description "Cheetah is a text-based template engine and Python code
11264generator.
11265
11266Cheetah can be used as a standalone templating utility or referenced as
11267a library from other Python applications. It has many potential uses,
11268but web developers looking for a viable alternative to ASP, JSP, PHP and
11269PSP are expected to be its principle user group.
11270
11271Features:
11272@enumerate
11273@item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
11274 text-based format.
11275@item Cleanly separates content, graphic design, and program code.
11276@item Blends the power and flexibility of Python with a simple template language
11277 that non-programmers can understand.
11278@item Gives template writers full access to any Python data structure, module,
11279 function, object, or method in their templates.
11280@item Makes code reuse easy by providing an object-orientated interface to
11281 templates that is accessible from Python code or other Cheetah templates.
11282 One template can subclass another and selectively reimplement sections of it.
11283@item Provides a simple, yet powerful, caching mechanism that can dramatically
11284 improve the performance of a dynamic website.
11285@item Compiles templates into optimized, yet readable, Python code.
11286@end enumerate")
11287 (license (license:x11-style "file://LICENSE"))))
11288
11289(define-public python2-cheetah
11290 (package-with-python2 python-cheetah))
11291
11292(define-public python-dulwich
11293 (package
11294 (name "python-dulwich")
11295 (version "0.18.6")
11296 (source
11297 (origin
11298 (method url-fetch)
11299 (uri (list (string-append "https://www.dulwich.io/releases/"
11300 "dulwich-" version ".tar.gz")
11301 (pypi-uri "dulwich" version)))
11302 (sha256
11303 (base32
11304 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
11305 (build-system python-build-system)
11306 (arguments
11307 `(#:phases
11308 (modify-phases %standard-phases
11309 (add-before 'check 'fix-tests
11310 (lambda* (#:key inputs #:allow-other-keys)
11311 ;; The tests use Popen with a custom environment which doesn't
11312 ;; include PATH.
11313 (substitute* "dulwich/tests/compat/utils.py"
11314 (("'git'") (string-append "'"
11315 (which "git")
11316 "'")))
11317 (substitute* '("dulwich/tests/test_repository.py"
11318 "dulwich/tests/test_hooks.py")
11319 (("#!/bin/sh") (string-append "#!" (which "sh"))))
11320 (setenv "TEST_RUNNER" "unittest")
11321 (setenv "PYTHONHASHSEED" "random")
11322 #t)))))
11323 (propagated-inputs
11324 `(("python-fastimport" ,python-fastimport)))
11325 (native-inputs
11326 `(("python-mock" ,python-mock)
11327 ("python-geventhttpclient" ,python-geventhttpclient)
11328 ("git" ,git)))
11329 (home-page "https://www.dulwich.io/")
11330 (synopsis "Git implementation in Python")
11331 (description "Dulwich is an implementation of the Git file formats and
11332protocols written in pure Python.")
11333 ;; Can be used with either license.
11334 (license (list license:asl2.0 license:gpl2+))))
11335
11336(define-public python2-dulwich
11337 (package-with-python2 python-dulwich))
11338
11339(define-public python-pbkdf2
11340 (package
11341 (name "python-pbkdf2")
11342 (version "1.3")
11343 (source
11344 (origin
11345 (method url-fetch)
11346 (uri (pypi-uri "pbkdf2" version))
11347 (sha256
11348 (base32
11349 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
11350 (build-system python-build-system)
11351 (arguments
11352 '(#:phases
11353 (modify-phases %standard-phases
11354 (replace 'check
11355 (lambda _
11356 (setenv "PYTHONPATH"
11357 (string-append (getcwd) "/build/lib:"
11358 (getenv "PYTHONPATH")))
ee2bb944 11359 (invoke "python" "test/test_pbkdf2.py"))))))
44d10b1f
RW
11360 (propagated-inputs
11361 `(("python-pycrypto" ,python-pycrypto))) ; optional
11362 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
11363 (synopsis "Password-based key derivation")
11364 (description "This module implements the password-based key derivation
11365function, PBKDF2, specified in RSA PKCS#5 v2.0.
11366
11367PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
11368is part of the RSA Public Key Cryptography Standards series. The provided
11369implementation takes a password or a passphrase and a salt value (and
11370optionally a iteration count, a digest module, and a MAC module) and provides
11371a file-like object from which an arbitrarly-sized key can be read.")
11372 (license license:expat)))
11373
11374(define-public python2-pbkdf2
11375 (package-with-python2 python-pbkdf2))
11376
11377(define-public python-qrcode
11378 (package
11379 (name "python-qrcode")
217ea1a1 11380 (version "6.1")
44d10b1f
RW
11381 (source
11382 (origin
11383 (method url-fetch)
11384 (uri (pypi-uri "qrcode" version))
11385 (sha256
217ea1a1 11386 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
44d10b1f
RW
11387 (build-system python-build-system)
11388 (arguments
11389 ;; FIXME: Tests require packaging 'pymaging'.
11390 '(#:tests? #f))
11391 (propagated-inputs
11392 `(("python-lxml" ,python-lxml) ; for SVG output
11393 ("python-pillow" ,python-pillow) ; for PNG output
11394 ("python-six" ,python-six)))
44d10b1f
RW
11395 (home-page "https://github.com/lincolnloop/python-qrcode")
11396 (synopsis "QR Code image generator")
11397 (description "This package provides a pure Python QR Code generator
11398module. It uses the Python Imaging Library (PIL) to allow for the generation
11399of QR Codes.
11400
11401In addition this package provides a command line tool to generate QR codes and
11402either write these QR codes to a file or do the output as ascii art at the
11403console.")
11404 (license license:bsd-3)))
11405
11406(define-public python2-qrcode
11407 (package-with-python2 python-qrcode))
11408
11409(define-public python-rst2ansi
11410 (package
11411 (name "python-rst2ansi")
11412 (version "0.1.5")
11413 (source
11414 (origin
11415 (method url-fetch)
11416 (uri (pypi-uri "rst2ansi" version))
11417 (sha256
11418 (base32
11419 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
11420 (build-system python-build-system)
11421 (propagated-inputs
11422 `(("python-docutils" ,python-docutils)))
11423 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
11424 (synopsis "Convert RST to ANSI-decorated console output")
11425 (description
11426 "Python module dedicated to rendering RST (reStructuredText) documents
11427to ansi-escaped strings suitable for display in a terminal.")
11428 (license license:expat)))
11429
11430(define-public python-ansi2html
11431 (package
11432 (name "python-ansi2html")
11433 (version "1.2.0")
11434 (source
11435 (origin
11436 (method url-fetch)
11437 (uri (pypi-uri "ansi2html" version))
11438 (sha256
11439 (base32
11440 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
11441 (build-system python-build-system)
11442 (native-inputs
11443 `(("python-mock" ,python-mock)
11444 ("python-nose" ,python-nose)))
11445 (propagated-inputs
11446 `(("python-six" ,python-six)))
11447 (home-page "https://github.com/ralphbean/ansi2html")
11448 (synopsis "Convert ANSI-decorated console output to HTML")
11449 (description
11450 "@command{ansi2html} is a Python library and command line utility for
11451convering text with ANSI color codes to HTML or LaTeX.")
11452 (license license:gpl3+)))
11453
11454(define-public python2-ansi2html
11455 (package-with-python2 python-ansi2html))
11456
11457(define-public python-ddt
11458 (package
11459 (name "python-ddt")
11460 (version "1.1.3")
11461 (source
11462 (origin
11463 (method url-fetch)
11464 (uri (pypi-uri "ddt" version))
11465 (sha256
11466 (base32
11467 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
11468 (build-system python-build-system)
11469 (native-inputs
11470 `(("python-mock" ,python-mock)
11471 ("python-nose" ,python-nose)))
11472 (propagated-inputs
11473 `(("python-six" ,python-six)
11474 ("python-pyyaml" ,python-pyyaml)))
11475 (home-page "https://github.com/txels/ddt")
11476 (synopsis "Data-Driven Tests")
11477 (description
11478 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
11479running it with different test data, and make it appear as multiple test
11480cases.")
11481 (license license:expat)))
11482
11483(define-public python2-ddt
11484 (package-with-python2 python-ddt))
11485
11486(define-public python-pycountry
11487 (package
11488 (name "python-pycountry")
11489 (version "18.5.26")
11490 (source
11491 (origin
11492 (method url-fetch)
11493 (uri (pypi-uri "pycountry" version))
11494 (sha256
11495 (base32
11496 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
11497 (build-system python-build-system)
11498 (home-page "https://bitbucket.org/flyingcircus/pycountry")
11499 (synopsis "ISO databases for languages, countries, currencies, etc.")
11500 (description
11501 "@code{pycountry} provides the ISO databases for the standards:
11502@enumerate
11503@item 639-3 (Languages)
11504@item 3166 (Countries)
11505@item 3166-3 (Deleted Countries)
11506@item 3166-2 (Subdivisions of countries)
11507@item 4217 (Currencies)
11508@item 15924 (Scripts)
11509@end enumerate
11510It includes a copy from Debian’s pkg-isocodes and makes the data accessible
11511through a Python API.")
11512 (license license:lgpl2.1+)))
11513
11514(define-public python2-pycountry
11515 (package-with-python2 python-pycountry))
11516
11517(define-public python-pycosat
11518 (package
11519 (name "python-pycosat")
11520 (version "0.6.1")
11521 (source
11522 (origin
11523 (method url-fetch)
11524 (uri (pypi-uri "pycosat" version))
11525 (sha256
11526 (base32
11527 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
11528 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
11529 (build-system python-build-system)
11530 (home-page "https://github.com/ContinuumIO/pycosat")
11531 (synopsis "Bindings to picosat (a SAT solver)")
11532 (description
11533 "This package provides efficient Python bindings to @code{picosat} on
11534the C level. When importing pycosat, the @code{picosat} solver becomes part
11535of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
11536Problem} (SAT) solver.")
11537 (license license:expat)))
11538
11539(define-public python2-pycosat
11540 (package-with-python2 python-pycosat))
11541
11542(define-public python2-ruamel.ordereddict
11543 (package
11544 (name "python2-ruamel.ordereddict")
11545 (version "0.4.9")
11546 (source
11547 (origin
11548 (method url-fetch)
11549 (uri (pypi-uri "ruamel.ordereddict" version))
11550 (sha256
11551 (base32
11552 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
11553 (build-system python-build-system)
11554 (arguments
11555 `(#:python ,python-2
11556 #:phases
11557 (modify-phases %standard-phases
11558 (delete 'check)
11559 (add-after 'install 'check
11560 (lambda* (#:key inputs outputs #:allow-other-keys)
11561 (add-installed-pythonpath inputs outputs)
f987ac30 11562 (invoke "python" "test/testordereddict.py"))))))
44d10b1f
RW
11563 (home-page "https://bitbucket.org/ruamel/ordereddict")
11564 (synopsis "Version of dict that keeps keys in insertion order")
11565 (description
11566 "This is an implementation of an ordered dictionary with @dfn{Key
11567Insertion Order} (KIO: updates of values do not affect the position of the
11568key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
11569removed and put at the back). The standard library module @code{OrderedDict},
11570implemented later, implements a subset of @code{ordereddict} functionality.
11571Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
11572Order} (KSO, no sorting function can be specified, but a transform can be
11573specified to apply on the key before comparison (e.g. @code{string.lower})).")
11574 (license license:expat)))
11575
11576(define-public python-pypeg2
11577 (package
11578 (name "python-pypeg2")
11579 (version "2.15.2")
11580 (source
11581 (origin
11582 (method url-fetch)
11583 (uri (pypi-uri "pyPEG2" version))
11584 (sha256
11585 (base32
11586 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
11587 (build-system python-build-system)
11588 (propagated-inputs `(("python-lxml" ,python-lxml)))
11589 (arguments
11590 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
11591 '(#:tests? #f))
11592 (home-page "https://fdik.org/pyPEG/")
11593 (synopsis "Parsering Expression Grammars in Python")
11594 (description "PyPEG is an intrinsic parser interpreter framework for
11595Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
11596parse many formal languages.")
11597 (license license:gpl2)))
11598
11599(define-public python-incremental
11600 (package
11601 (name "python-incremental")
11602 (version "17.5.0")
11603 (source
11604 (origin
11605 (method url-fetch)
11606 (uri (pypi-uri "incremental" version))
11607 (sha256
11608 (base32
11609 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
11610 (build-system python-build-system)
11611 (home-page "https://github.com/hawkowl/incremental")
11612 (synopsis "Library for versioning Python projects")
11613 (description "Incremental is a small library that versions your Python
11614projects.")
11615 (license license:expat)))
11616
11617(define-public python2-incremental
11618 (package-with-python2 python-incremental))
11619
11620(define-public python-invoke
11621 (package
11622 (name "python-invoke")
11623 (home-page "http://www.pyinvoke.org/")
11624 (version "1.1.0")
11625 (source (origin
11626 (method url-fetch)
11627 (uri (pypi-uri "invoke" version))
11628 (sha256
11629 (base32
11630 "0aiy1xvk1f91246zxd1zqrm679vdvd10h843a2na41cqr3cflpi6"))))
11631 (build-system python-build-system)
11632 (arguments
11633 ;; XXX: Requires many dependencies that are not yet in Guix.
11634 `(#:tests? #f))
11635 (synopsis "Pythonic task execution")
11636 (description
11637 "Invoke is a Python task execution tool and library, drawing inspiration
11638from various sources to arrive at a powerful and clean feature set. It is
11639evolved from the Fabric project, but focuses on local and abstract concerns
11640instead of servers and network commands.")
11641 (license license:bsd-3)))
11642
11643(define-public python2-invoke
11644 (package-with-python2 python-invoke))
11645
11646(define-public python-automat
11647 (package
11648 (name "python-automat")
919d80a0 11649 (version "0.7.0")
44d10b1f
RW
11650 (source (origin
11651 (method url-fetch)
11652 (uri (pypi-uri "Automat" version))
11653 (sha256
11654 (base32
919d80a0 11655 "03ivg70n3b1cbcd2zvjhk8y4kmqxcvhmili39lmgx09dza1qpmyb"))))
44d10b1f
RW
11656 (build-system python-build-system)
11657 ;; We disable the tests because they require python-twisted, while
11658 ;; python-twisted depends on python-automat. Twisted is optional, but the
11659 ;; tests fail if it is not available. Also see
11660 ;; <https://github.com/glyph/automat/issues/71>.
11661 (arguments '(#:tests? #f))
11662 (native-inputs
11663 `(("python-m2r" ,python-m2r)
11664 ("python-setuptools-scm" ,python-setuptools-scm)
11665 ("python-graphviz" ,python-graphviz)))
11666 (propagated-inputs
11667 `(("python-six" ,python-six)
11668 ("python-attrs" ,python-attrs)))
11669 (home-page "https://github.com/glyph/Automat")
11670 (synopsis "Self-service finite-state machines")
11671 (description "Automat is a library for concise, idiomatic Python
11672expression of finite-state automata (particularly deterministic finite-state
11673transducers).")
11674 (license license:expat)))
11675
11676(define-public python2-automat
11677 (package-with-python2 python-automat))
11678
11679(define-public python-m2r
11680 (package
11681 (name "python-m2r")
bcfb8fac 11682 (version "0.2.1")
44d10b1f
RW
11683 (source (origin
11684 (method url-fetch)
11685 (uri (pypi-uri "m2r" version))
11686 (sha256
11687 (base32
bcfb8fac 11688 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
44d10b1f
RW
11689 (build-system python-build-system)
11690 (propagated-inputs
11691 `(("python-docutils" ,python-docutils)
11692 ("python-mistune" ,python-mistune)))
11693 (native-inputs
11694 `(("python-pygments" ,python-pygments)
11695 ("python-mock" ,python-mock)))
11696 (home-page "https://github.com/miyakogi/m2r")
11697 (synopsis "Markdown to reStructuredText converter")
11698 (description "M2R converts a markdown file including reST markups to valid
11699reST format.")
11700 (license license:expat)))
11701
11702(define-public python2-m2r
11703 (package-with-python2 python-m2r))
11704
11705(define-public python-constantly
11706 (package
11707 (name "python-constantly")
11708 (version "15.1.0")
11709 (source (origin
11710 (method url-fetch)
11711 (uri (pypi-uri "constantly" version))
11712 (sha256
11713 (base32
11714 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
11715 (build-system python-build-system)
11716 (home-page "https://github.com/twisted/constantly")
11717 (synopsis "Symbolic constants in Python")
11718 (description "Constantly is a Python library that provides symbolic
11719constant support. It includes collections and constants with text, numeric,
11720and bit flag values.")
11721 (license license:expat)))
11722
11723(define-public python2-constantly
11724 (package-with-python2 python-constantly))
11725
11726(define-public python-attrs
11727 (package
11728 (name "python-attrs")
11729 (version "18.2.0")
11730 (source (origin
11731 (method url-fetch)
11732 (uri (pypi-uri "attrs" version))
11733 (sha256
11734 (base32
11735 "0s9ydh058wmmf5v391pym877x4ahxg45dw6a0w4c7s5wgpigdjqh"))))
11736 (build-system python-build-system)
11737 (arguments
11738 `(#:modules ((guix build utils)
11739 (guix build python-build-system)
11740 (ice-9 ftw)
11741 (srfi srfi-1)
11742 (srfi srfi-26))
11743 #:phases (modify-phases %standard-phases
11744 (replace 'check
11745 (lambda _
11746 (let ((cwd (getcwd)))
11747 (setenv "PYTHONPATH"
11748 (string-append
11749 cwd "/build/"
11750 (find (cut string-prefix? "lib" <>)
11751 (scandir (string-append cwd "/build")))
11752 ":"
11753 (getenv "PYTHONPATH")))
11754 (invoke "python" "-m" "pytest")))))))
11755 (native-inputs
11756 `(("python-coverage" ,python-coverage)
11757 ("python-hypothesis" ,python-hypothesis)
11758 ("python-pympler" ,python-pympler)
11759 ("python-pytest" ,python-pytest)
11760 ("python-six" ,python-six)
11761 ("python-sphinx" ,python-sphinx)
11762 ("python-zope-interface" ,python-zope-interface)))
11763 (home-page "https://github.com/python-attrs/attrs/")
11764 (synopsis "Attributes without boilerplate")
11765 (description "@code{attrs} is a Python package with class decorators that
11766ease the chores of implementing the most common attribute-related object
11767protocols.")
11768 (license license:expat)))
11769
11770(define-public python2-attrs
11771 (package-with-python2 python-attrs))
11772
11773(define-public python-attrs-bootstrap
11774 (package
11775 (inherit python-attrs)
11776 (name "python-attrs-bootstrap")
11777 ;; Keep this on a fixed version so python-attrs can be updated without
11778 ;; triggering a mass-rebuild. FIXME: Update this in the next rebuild cycle.
11779 (version "17.4.0")
11780 (source (origin
11781 (method url-fetch)
11782 (uri (pypi-uri "attrs" version))
11783 (sha256
11784 (base32
11785 "1jafnn1kzd6qhxgprhx6y6ik1r5m2rilx25syzcmq03azp660y8w"))))
11786 (native-inputs `())
11787 (arguments `(#:tests? #f))))
11788
11789(define-public python2-attrs-bootstrap
11790 (package-with-python2 python-attrs-bootstrap))
11791
11792(define-public python2-cliapp
11793 (package
11794 (name "python2-cliapp")
9064b84e 11795 (version "1.20180812.1")
44d10b1f
RW
11796 (source
11797 (origin
11798 (method url-fetch)
11799 (uri (string-append
11800 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
11801 version ".tar.gz"))
11802 (sha256
11803 (base32
9064b84e 11804 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
44d10b1f
RW
11805 (build-system python-build-system)
11806 (arguments
11807 `(#:python ,python-2
11808 #:phases
11809 (modify-phases %standard-phases
11810 ;; check phase needs to be run before the build phase. If not,
11811 ;; coverage-test-runner looks for tests for the built source files,
11812 ;; and fails.
11813 (delete 'check)
11814 (add-before 'build 'check
11815 (lambda _
11816 ;; Disable python3 tests
11817 (substitute* "check"
11818 (("python3") "# python3"))
6c826d32 11819 (invoke "./check"))))))
44d10b1f
RW
11820 (native-inputs
11821 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
11822 ("python2-pep8" ,python2-pep8)))
11823 (propagated-inputs
11824 `(("python2-pyaml" ,python2-pyaml)))
11825 (home-page "https://liw.fi/cliapp/")
11826 (synopsis "Python framework for command line programs")
11827 (description "@code{python2-cliapp} is a python framework for
11828command line programs. It contains the typical stuff such programs
11829need to do, such as parsing the command line for options, and
11830iterating over input files.")
11831 (license license:gpl2+)))
11832
11833(define-public python2-ttystatus
11834 (package
11835 (name "python2-ttystatus")
e516a9c2 11836 (version "0.36")
44d10b1f
RW
11837 (source
11838 (origin
11839 (method url-fetch)
11840 (uri (string-append
11841 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
11842 version ".tar.gz"))
11843 (sha256
11844 (base32
e516a9c2 11845 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
44d10b1f
RW
11846 (build-system python-build-system)
11847 (native-inputs
11848 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
11849 ("python2-pep8" ,python2-pep8)))
11850 (arguments
11851 `(#:python ,python-2
11852 #:phases
11853 (modify-phases %standard-phases
11854 ;; check phase needs to be run before the build phase. If not,
11855 ;; coverage-test-runner looks for tests for the built source files,
11856 ;; and fails.
11857 (delete 'check)
11858 (add-before 'build 'check
cbeee881 11859 (lambda _ (invoke "make" "check"))))))
44d10b1f
RW
11860 (home-page "https://liw.fi/ttystatus/")
11861 (synopsis "Python library for showing progress reporting and
11862status updates on terminals")
11863 (description "@code{python2-ttystatus} is a python library for
11864showing progress reporting and status updates on terminals, for
11865command line programs. Output is automatically adapted to the width
11866of the terminal: truncated if it does not fit, and resized if the
11867terminal size changes.")
11868 (license license:gpl3+)))
11869
11870(define-public python2-tracing
11871 (package
11872 (name "python2-tracing")
11873 (version "0.10")
11874 (source
11875 (origin
11876 (method url-fetch)
11877 (uri (string-append
11878 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
11879 version ".tar.gz"))
11880 (sha256
11881 (base32
11882 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
11883 (build-system python-build-system)
11884 (arguments
11885 `(#:python ,python-2))
11886 (home-page "https://liw.fi/tracing/")
11887 (synopsis "Python debug logging helper")
11888 (description "@code{python2-tracing} is a python library for
11889logging debug messages. It provides a way to turn debugging messages
11890on and off, based on the filename they occur in. It is much faster
11891than using @code{logging.Filter} to accomplish the same thing, which
11892matters when code is run in production mode. The actual logging still
11893happens using the @code{logging} library.")
11894 (license license:gpl3+)))
11895
11896(define-public python2-larch
11897 (package
11898 (name "python2-larch")
11899 (version "1.20151025")
11900 (source
11901 (origin
11902 (method url-fetch)
11903 (uri (string-append
11904 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
11905 version ".tar.gz"))
11906 (patches (search-patches
11907 "python2-larch-coverage-4.0a6-compatibility.patch"))
11908 (sha256
11909 (base32
11910 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
11911 (build-system python-build-system)
11912 (arguments
11913 `(#:python ,python-2
11914 #:phases
11915 (modify-phases %standard-phases
11916 ;; check phase needs to be run before the build phase. If not,
11917 ;; coverage-test-runner looks for tests for the built source files,
11918 ;; and fails.
11919 (delete 'check)
11920 (add-before 'build 'check
204ad455 11921 (lambda _ (invoke "make" "check"))))))
44d10b1f
RW
11922 (native-inputs
11923 `(("cmdtest" ,cmdtest)
11924 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
11925 (propagated-inputs
11926 `(("python2-tracing" ,python2-tracing)))
11927 (home-page "https://liw.fi/larch/")
11928 (synopsis "Python copy-on-write B-tree library")
11929 (description "@code{python2-larch} is an implementation of
11930particular kind of B-tree, based on research by Ohad Rodeh. See
11931@url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
11932on the data structure.
11933
11934The distinctive feature of this B-tree is that a node is never
11935(conceptually) modified. Instead, all updates are done by
11936copy-on-write. This makes it easy to clone a tree, and modify only the
11937clone, while other processes access the original tree.")
11938 (license license:gpl3+)))
11939
11940(define-public python-astroid
11941 (package
11942 (name "python-astroid")
11943 (version "2.1.0")
11944 (source
11945 (origin
11946 (method url-fetch)
11947 (uri (pypi-uri "astroid" version))
11948 (sha256
11949 (base32
11950 "08hz675knh4294bancdapql392fmbjyimhbyrmfkz1ka7l035c1m"))))
11951 (build-system python-build-system)
11952 (propagated-inputs
11953 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
11954 ("python-six" ,python-six)
11955 ("python-wrapt" ,python-wrapt)))
11956 (native-inputs
11957 `(("python-dateutil" ,python-dateutil)
11958 ("python-nose" ,python-nose)
11959 ("python-pytest" ,python-pytest)
11960 ("python-pytest-runner" ,python-pytest-runner)))
11961 (arguments
11962 `(#:phases
11963 (modify-phases %standard-phases
11964 (add-after 'unpack 'remove-spurious-test
11965 (lambda _
11966 ;; This can be removed after upgrading from python-3.7
11967 ;; https://github.com/PyCQA/astroid/issues/593
11968 ;; https://bugs.python.org/issue34056
11969 (delete-file "astroid/tests/unittest_modutils.py")
11970 #t))
11971 (replace 'check
11972 (lambda _
11973 (invoke "pytest" "astroid"))))))
11974 (home-page "https://github.com/PyCQA/astroid")
11975 (synopsis "Common base representation of python source code for pylint and
11976other projects")
11977 (description "@code{python-astroid} provides a common base representation
11978of python source code for projects such as pychecker, pyreverse, pylint, etc.
11979
11980It provides a compatible representation which comes from the _ast module. It
11981rebuilds the tree generated by the builtin _ast module by recursively walking
11982down the AST and building an extended ast. The new node classes have
11983additional methods and attributes for different usages. They include some
11984support for static inference and local name scopes. Furthermore, astroid
11985builds partial trees by inspecting living objects.")
11986 (license license:lgpl2.1+)
11987 (properties `((python2-variant . ,(delay python2-astroid))))))
11988
11989(define-public python2-astroid
11990 (let ((base (package-with-python2
11991 (strip-python2-variant python-astroid))))
11992 (package (inherit base)
11993 ;; Version 2.x removes python2 support.
11994 (version "1.6.5")
11995 (source
11996 (origin
11997 (method url-fetch)
11998 (uri (pypi-uri "astroid" version))
11999 (sha256
12000 (base32
12001 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
12002 (arguments
12003 (substitute-keyword-arguments (package-arguments base)
12004 ((#:phases phases)
12005 `(modify-phases ,phases
12006 (add-after 'unpack 'remove-spurious-test
12007 (lambda _
12008 ;; https://github.com/PyCQA/astroid/issues/276
12009 (delete-file "astroid/tests/unittest_brain.py")
12010 #t))
12011 (replace 'check
12012 (lambda _
12013 (invoke"python" "-m" "unittest" "discover"
12014 "-p" "unittest*.py")))))))
12015 (native-inputs `())
12016 (propagated-inputs
12017 `(("python2-backports-functools-lru-cache"
12018 ,python2-backports-functools-lru-cache)
12019 ("python2-enum34" ,python2-enum34)
12020 ("python2-singledispatch" ,python2-singledispatch)
12021 ,@(package-propagated-inputs base))))))
12022
12023(define-public python-isort
12024 (package
12025 (name "python-isort")
e2227b6a 12026 (version "4.3.4")
44d10b1f
RW
12027 (source
12028 (origin
e2227b6a
EF
12029 (method git-fetch)
12030 (uri (git-reference
12031 ;; Tests pass only from the Github sources
12032 (url "https://github.com/timothycrosley/isort")
12033 (commit version)))
12034 (file-name (git-file-name name version))
44d10b1f
RW
12035 (sha256
12036 (base32
e2227b6a 12037 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
44d10b1f
RW
12038 (build-system python-build-system)
12039 (native-inputs
12040 `(("python-mock" ,python-mock)
12041 ("python-pytest" ,python-pytest)))
12042 (home-page "https://github.com/timothycrosley/isort")
12043 (synopsis "Python utility/library to sort python imports")
12044 (description "@code{python-isort} is a python utility/library to sort
12045imports alphabetically, and automatically separated into sections. It
12046provides a command line utility, a python library and plugins for various
12047editors.")
e2227b6a
EF
12048 (license license:expat)
12049 (properties `((python2-variant . ,(delay python2-isort))))))
44d10b1f
RW
12050
12051(define-public python2-isort
e2227b6a
EF
12052 (let ((base (package-with-python2
12053 (strip-python2-variant python-isort))))
12054 (package (inherit base)
12055 (native-inputs
12056 `(("python2-futures" ,python2-futures)
12057 ,@(package-native-inputs base))))))
44d10b1f
RW
12058
12059(define-public python2-backports-functools-lru-cache
12060 (package
12061 (name "python2-backports-functools-lru-cache")
12062 (version "1.5")
12063 (source
12064 (origin
12065 (method url-fetch)
12066 ;; only the pypi tarballs contain the necessary metadata
12067 (uri (pypi-uri "backports.functools_lru_cache" version))
12068 (sha256
12069 (base32
12070 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
12071 (build-system python-build-system)
12072 (native-inputs
12073 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
12074 (arguments
12075 `(#:python ,python-2))
12076 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
12077 (synopsis "Backport of functools.lru_cache from Python 3.3")
12078 (description "@code{python2-backports-functools-lru-cache} is a backport
12079of @code{functools.lru_cache} from python 3.3.")
12080 (license license:expat)))
12081
12082(define-public python-configparser
12083 (package
12084 (name "python-configparser")
12085 (version "3.5.0")
12086 (source
12087 (origin
12088 (method url-fetch)
12089 (uri (string-append
12090 "https://bitbucket.org/ambv/configparser/get/"
12091 version ".tar.bz2"))
12092 (file-name (string-append name "-" version ".tar.gz"))
12093 (sha256
12094 (base32
12095 "0waq40as14abwzbb321hfz4vr1fi363nscy32ga14qvfygrg96wa"))))
12096 (build-system python-build-system)
809f003f 12097 (home-page "https://github.com/jaraco/configparser/")
44d10b1f
RW
12098 (synopsis "Backport of configparser from python 3.5")
12099 (description "@code{python-configparser} is a backport of
12100@code{configparser} from Python 3.5 so that it can be used directly
12101in other versions.")
12102 (license license:expat)))
12103
12104(define-public python2-configparser
12105 (package-with-python2 python-configparser))
12106
12107(define-public python-mando
12108 (package
12109 (name "python-mando")
12110 (version "0.6.4")
12111 (source (origin
12112 (method url-fetch)
12113 (uri (pypi-uri "mando" version))
12114 (sha256
12115 (base32
12116 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
12117 (build-system python-build-system)
12118 (propagated-inputs
12119 `(("python-rst2ansi" ,python-rst2ansi)
12120 ("python-six" ,python-six)))
12121 (native-inputs
12122 `(("python-pytest" ,python-pytest)))
12123 (home-page "https://mando.readthedocs.org/")
12124 (synopsis
12125 "Wrapper around argparse, allowing creation of complete CLI applications")
12126 (description
12127 "This package is a wrapper around argparse, allowing you to write complete CLI
12128applications in seconds while maintaining all the flexibility.")
12129 (license license:expat)))
12130
12131(define-public python2-mando
12132 (package-with-python2 python-mando))
12133
70daf82f
RW
12134(define-public python2-argparse
12135 (package
12136 (name "python2-argparse")
12137 (version "1.4.0")
12138 (source
12139 (origin
12140 (method url-fetch)
12141 (uri (pypi-uri "argparse" version))
12142 (sha256
12143 (base32
12144 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
12145 (build-system python-build-system)
12146 (arguments
12147 `(#:python ,python-2))
12148 (home-page "https://github.com/ThomasWaldmann/argparse/")
12149 (synopsis "Python command-line parsing library")
12150 (description
12151 "This package is mostly for people who want to have @code{argparse} on
12152older Pythons because it was not part of the standard library back then.")
12153 (license license:psfl)))
12154
44d10b1f
RW
12155(define-public python-fudge
12156 (package
12157 (name "python-fudge")
12158 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
12159 ;; package, which is currently the only use of this package.
12160 (version "0.9.6")
12161 (source
12162 (origin
12163 (method url-fetch)
12164 (uri (pypi-uri "fudge" version))
12165 (sha256
12166 (base32
12167 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
12168 (build-system python-build-system)
12169 (arguments
12170 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
12171 (home-page "https://github.com/fudge-py/fudge")
12172 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
12173 (description
12174 "Fudge is a Python module for using fake objects (mocks and stubs) to
12175test real ones.
12176
12177In readable Python code, you declare the methods available on your fake object
12178and how they should be called. Then you inject that into your application and
12179start testing. This declarative approach means you don’t have to record and
12180playback actions and you don’t have to inspect your fakes after running code.
12181If the fake object was used incorrectly then you’ll see an informative
12182exception message with a traceback that points to the culprit.")
12183 (license license:expat)))
12184
12185(define-public python2-fudge
12186 (package-with-python2 python-fudge))
12187
12188(define-public python-mwclient
12189 (package
12190 (name "python-mwclient")
12191 (version "0.8.4")
12192 (source
12193 (origin
12194 (method url-fetch)
12195 ;; The PyPI version wouldn't contain tests.
12196 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
12197 "v" version ".tar.gz"))
12198 (file-name (string-append name "-" version ".tar.gz"))
12199 (sha256
12200 (base32
12201 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
12202 (build-system python-build-system)
12203 (propagated-inputs
12204 `(("python-requests" ,python-requests)
12205 ("python-requests-oauthlib"
12206 ,python-requests-oauthlib)
12207 ("python-six" ,python-six)))
12208 (native-inputs
12209 `(("python-mock" ,python-mock)
12210 ("python-pytest" ,python-pytest)
12211 ("python-pytest-pep8" ,python-pytest-pep8)
12212 ("python-pytest-cache" ,python-pytest-cache)
12213 ("python-pytest-cov" ,python-pytest-cov)
12214 ("python-responses" ,python-responses)))
12215 (home-page "https://github.com/btongminh/mwclient")
12216 (synopsis "MediaWiki API client")
12217 (description "This package provides a MediaWiki API client.")
12218 (license license:expat)))
12219
12220(define-public python2-mwclient
12221 (package-with-python2 python-mwclient))
12222
12223(define-public python-utils
12224 (package
12225 (name "python-utils")
12226 (version "2.1.0")
12227 (source (origin
12228 (method url-fetch)
12229 (uri (pypi-uri "python-utils" version))
12230 (sha256
12231 (base32
12232 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
12233 (build-system python-build-system)
12234 (native-inputs
12235 `(("pytest-runner" ,python-pytest-runner)
12236 ("pytest" ,python-pytest)
12237 ("six" ,python-six)))
12238 (home-page "https://github.com/WoLpH/python-utils")
12239 (synopsis "Convenient utilities not included with the standard Python install")
12240 (description
12241 "Python Utils is a collection of small Python functions and classes which
12242make common patterns shorter and easier.")
12243 (license license:bsd-2)))
12244
12245(define-public python2-utils
12246 (package-with-python2 python-utils))
12247
12248(define-public python-sphinx-me
12249 (package
12250 (name "python-sphinx-me")
12251 (version "0.3")
12252 (source
12253 (origin
12254 (method url-fetch)
12255 (uri (pypi-uri "sphinx-me" version))
12256 (sha256
12257 (base32
12258 "06jzgp213zihnvpcy2y5jy3ykid3apc2ncp2pg6a2g05lhiziglq"))))
12259 (build-system python-build-system)
12260 (home-page "https://github.com/stephenmcd/sphinx-me")
12261 (synopsis "Create a Sphinx documentation shell")
12262 (description
12263 "Create a Sphinx documentation shell for your project and include the
12264README file as the documentation index. It handles extracting the required
12265meta data such as the project name, author and version from your project for
12266use in your Sphinx docs.")
12267 (license license:bsd-2)))
12268
12269(define-public python2-sphinx-me
12270 (package-with-python2 python-sphinx-me))
12271
12272(define-public python-diff-match-patch
12273 (package
12274 (name "python-diff-match-patch")
12275 (version "20121119")
12276 (source
12277 (origin
12278 (method url-fetch)
12279 (uri (pypi-uri "diff-match-patch" version))
12280 (sha256
12281 (base32
12282 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
12283 (build-system python-build-system)
12284 (home-page "https://code.google.com/p/google-diff-match-patch")
12285 (synopsis "Synchronize plain text")
12286 (description "Diff Match and Patch libraries offer robust algorithms to
12287perform the operations required for synchronizing plain text.")
12288 (license license:asl2.0)))
12289
12290(define-public python2-diff-match-patch
12291 (package-with-python2 python-diff-match-patch))
12292
12293(define-public python-dirsync
12294 (package
12295 (name "python-dirsync")
12296 (version "2.2.3")
12297 (source
12298 (origin
12299 (method url-fetch)
12300 (uri (pypi-uri "dirsync" version))
12301 (sha256
12302 (base32
12303 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
12304 (build-system python-build-system)
12305 (propagated-inputs
12306 `(("six" ,python-six)))
12307 (home-page "https://bitbucket.org/tkhyn/dirsync")
12308 (synopsis "Advanced directory tree synchronisation tool")
12309 (description "Advanced directory tree synchronisation tool.")
12310 (license license:expat)))
12311
12312(define-public python2-dirsync
12313 (package-with-python2 python-dirsync))
12314
12315(define-public python-levenshtein
12316 (package
12317 (name "python-levenshtein")
12318 (version "0.12.0")
12319 (source
12320 (origin
12321 (method url-fetch)
12322 (uri (pypi-uri "python-Levenshtein" version))
12323 (sha256
12324 (base32
12325 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
12326 (build-system python-build-system)
12327 (home-page "https://github.com/ztane/python-Levenshtein")
12328 (synopsis "Fast computation of Levenshtein distance and string similarity")
12329 (description
12330 "The Levenshtein Python C extension module contains functions for fast computation of
12331@enumerate
12332@item Levenshtein (edit) distance, and edit operations
12333@item string similarity
12334@item approximate median strings, and generally string averaging
12335@item string sequence and set similarity
12336@end enumerate
12337It supports both normal and Unicode strings.")
12338 (license license:gpl2+)))
12339
12340(define-public python2-levenshtein
12341 (package-with-python2 python-levenshtein))
12342
12343(define-public python-scandir
12344 (package
12345 (name "python-scandir")
12346 (version "1.9.0")
12347 (source
12348 (origin
12349 (method url-fetch)
12350 (uri (pypi-uri "scandir" version))
12351 (sha256
12352 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
12353 (build-system python-build-system)
12354 (arguments
12355 `(#:phases (modify-phases %standard-phases
12356 (replace 'check
12357 (lambda _
12358 (invoke "python" "test/run_tests.py"))))))
12359 (home-page "https://github.com/benhoyt/scandir")
12360 (synopsis "Directory iteration function")
12361 (description
12362 "Directory iteration function like os.listdir(), except that instead of
12363returning a list of bare filenames, it yields DirEntry objects that include
12364file type and stat information along with the name. Using scandir() increases
12365the speed of os.walk() by 2-20 times (depending on the platform and file
12366system) by avoiding unnecessary calls to os.stat() in most cases.
12367
12368This package is part of the Python standard library since version 3.5.")
12369 (license license:bsd-3)))
12370
12371(define-public python2-scandir
12372 (package-with-python2 python-scandir))
12373
12374(define-public python2-stemming
12375 (package
12376 (name "python2-stemming")
12377 (version "1.0.1")
12378 (source
12379 (origin
12380 (method url-fetch)
12381 (uri (pypi-uri "stemming" version))
12382 (sha256
12383 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
12384 (build-system python-build-system)
12385 (arguments
12386 `(#:python ,python-2))
12387 (home-page "https://bitbucket.org/mchaput/stemming/overview")
12388 (synopsis "Python implementations of various stemming algorithms")
12389 (description
12390 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
12391stemming algorithms for English. These implementations are straightforward and
12392efficient, unlike some Python versions of the same algorithms available on the
12393Web. This package is an extraction of the stemming code included in the Whoosh
12394search engine.")
12395 (license license:public-domain)))
12396
12397(define-public python-factory-boy
12398 (package
12399 (name "python-factory-boy")
12400 (version "2.8.1")
12401 (source
12402 (origin
12403 (method url-fetch)
12404 (uri (pypi-uri "factory_boy" version))
12405 (sha256
12406 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
12407 (build-system python-build-system)
12408 (arguments
12409 ;; Tests are not included in the tarball.
12410 `(#:tests? #f))
12411 (propagated-inputs
12412 `(("faker" ,python-faker)))
12413 (home-page "https://github.com/benhoyt/scandir")
12414 (synopsis "Versatile test fixtures replacement")
12415 (description
12416 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
12417
12418As a fixtures replacement tool, it aims to replace static, hard to maintain
12419fixtures with easy-to-use factories for complex object.
12420
12421Instead of building an exhaustive test setup with every possible combination
12422of corner cases, factory_boy allows you to use objects customized for the
12423current test, while only declaring the test-specific fields")
12424 (license license:expat)))
12425
12426(define-public python2-factory-boy
12427 (package-with-python2 python-factory-boy))
12428
12429(define-public python-translate-toolkit
12430 (package
12431 (name "python-translate-toolkit")
12432 (version "2.1.0")
12433 (source
12434 (origin
12435 (method url-fetch)
12436 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
12437 (sha256
12438 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
12439 (build-system python-build-system)
12440 (native-inputs
12441 `(("python-pytest" ,python-pytest)
12442 ("python-sphinx" ,python-sphinx)))
12443 (propagated-inputs
12444 `(("python-babel" ,python-babel)
12445 ("python-beautifulsoup4" ,python-beautifulsoup4)
12446 ("python-chardet" ,python-chardet)
12447 ("python-diff-match-patch" ,python-diff-match-patch)
12448 ("python-levenshtein" ,python-levenshtein)
12449 ("python-lxml" ,python-lxml)
12450 ("python-six" ,python-six)
12451 ("python-vobject" ,python-vobject)
12452 ("python-pyyaml" ,python-pyyaml)))
12453 (arguments
12454 ;; TODO: tests are not run, because they end with
12455 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
12456 ;; 'parse_funcs'
12457 ;; during test setup.
12458 `(#:tests? #f))
12459 (home-page "http://toolkit.translatehouse.org")
12460 (synopsis "Tools and API for translation and localization engineering")
12461 (description
12462 "Tools and API for translation and localization engineering. It contains
12463several utilities, as well as an API for building localization tools.")
12464 (license license:gpl2+)))
12465
12466(define-public python2-translate-toolkit
12467 (package-with-python2 python-translate-toolkit))
12468
12469(define-public python-packaging
12470 (package
12471 (name "python-packaging")
12472 (version "18.0")
12473 (source
12474 (origin
12475 (method url-fetch)
12476 (uri (pypi-uri "packaging" version))
12477 (sha256
12478 (base32
12479 "01wq9c53ix5rz6qg2c98gy8n4ff768rmanifm8m5jpjiaizj51h8"))))
12480 (build-system python-build-system)
12481 (arguments
12482 `(#:phases (modify-phases %standard-phases
12483 (replace 'check
12484 (lambda _ (invoke "py.test" "-vv"))))))
12485 (native-inputs
12486 `(("python-pretend" ,python-pretend)
12487 ("python-pytest" ,python-pytest)))
12488 (propagated-inputs
12489 `(("python-pyparsing" ,python-pyparsing)
12490 ("python-six" ,python-six)))
12491 (home-page "https://github.com/pypa/packaging")
12492 (synopsis "Core utilities for Python packages")
12493 (description "Packaging is a Python module for dealing with Python packages.
12494It offers an interface for working with package versions, names, and dependency
12495information.")
12496 ;; From 'LICENSE': This software is made available under the terms of
12497 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
12498 ;; Contributions to this software is made under the terms of *both* these
12499 ;; licenses.
12500 (license (list license:asl2.0 license:bsd-2))))
12501
12502(define-public python2-packaging
12503 (package-with-python2 python-packaging))
12504
12505(define-public python-relatorio
12506 (package
12507 (name "python-relatorio")
12508 (version "0.8.0")
12509 (source
12510 (origin
12511 (method url-fetch)
12512 (uri (pypi-uri "relatorio" version))
12513 (sha256
12514 (base32
12515 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
12516 (build-system python-build-system)
12517 (propagated-inputs
12518 `(("python-lxml" ,python-lxml)
12519 ("python-genshi" ,python-genshi)))
12520 (native-inputs
12521 `(("python-magic" ,python-magic)))
12522 (home-page "https://relatorio.tryton.org/")
12523 (synopsis "Templating library able to output ODT and PDF files")
12524 (description "Relatorio is a templating library which provides a way to
12525easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
12526for more filetypes can be easily added by creating plugins for them.")
12527 (license license:gpl3+)))
12528
12529(define-public python2-relatorio
12530 (package-with-python2 python-relatorio))
12531
12532(define-public python-radon
12533 (package
12534 (name "python-radon")
12535 (version "2.2.0")
12536 (source
12537 (origin
12538 (method url-fetch)
12539 (uri (pypi-uri "radon" version))
12540 (sha256
12541 (base32
12542 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
12543 (build-system python-build-system)
12544 (arguments
12545 `(#:phases (modify-phases %standard-phases
12546 (replace 'check
12547 (lambda _
12548 (invoke "python" "radon/tests/run.py"))))))
12549 (propagated-inputs
12550 `(("python-colorama" ,python-colorama)
12551 ("python-flake8-polyfill" ,python-flake8-polyfill)
12552 ("python-mando" ,python-mando)))
12553 (native-inputs
12554 `(("python-pytest" ,python-pytest)
12555 ("python-pytest-mock" ,python-pytest-mock)))
12556 (home-page "https://radon.readthedocs.org/")
12557 (synopsis "Code Metrics in Python")
12558 (description "Radon is a Python tool which computes various code metrics.
12559Supported metrics are:
12560@itemize @bullet
12561@item raw metrics: SLOC, comment lines, blank lines, &c.
12562@item Cyclomatic Complexity (i.e. McCabe’s Complexity)
12563@item Halstead metrics (all of them)
12564@item the Maintainability Index (a Visual Studio metric)
12565@end itemize")
12566 (license license:expat)))
12567
12568(define-public python2-radon
12569 (package-with-python2 python-radon))
12570
12571(define-public python-sure
12572 (package
12573 (name "python-sure")
12574 (version "1.4.11")
12575 (source
12576 (origin
12577 (method url-fetch)
12578 (uri (pypi-uri "sure" version))
12579 (sha256
12580 (base32
12581 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
12582 (build-system python-build-system)
12583 (propagated-inputs
12584 `(("python-mock" ,python-mock)
12585 ("python-six" ,python-six)))
12586 (native-inputs
12587 `(("python-nose" ,python-nose)))
12588 (home-page "https://github.com/gabrielfalcao/sure")
12589 (synopsis "Automated testing library in python for python")
12590 (description
12591 "Sure is a python library that leverages a DSL for writing assertions.
12592Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
12593 (license license:gpl3+)))
12594
12595(define-public python2-sure
12596 (package-with-python2 python-sure))
12597
12598(define-public python2-couleur
12599 ;; This package does not seem to support python3 at all, hence,
12600 ;; only the python2 variant definition is provided.
12601 (package
12602 (name "python2-couleur")
12603 (version "0.6.2")
12604 (source
12605 (origin
12606 (method url-fetch)
12607 (uri (pypi-uri "couleur" version))
12608 (sha256
12609 (base32
12610 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
12611 (build-system python-build-system)
12612 (arguments
12613 `(#:python ,python-2))
12614 (home-page "https://github.com/gabrielfalcao/couleur")
12615 (synopsis
12616 "ANSI terminal tool for python, colored shell and other handy fancy features")
12617 (description
12618 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
12619terminal such as coloured output in the shell, overwriting output, indentation, etc.")
12620 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
12621 ;; https://github.com/gabrielfalcao/couleur/issues/11
12622 (license license:lgpl3+)))
12623
12624(define-public python-misaka
12625 (package
12626 (name "python-misaka")
0dcb3412 12627 (version "2.1.1")
44d10b1f
RW
12628 (source
12629 (origin
12630 (method url-fetch)
12631 (uri (pypi-uri "misaka" version))
12632 (sha256
12633 (base32
0dcb3412 12634 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
44d10b1f
RW
12635 (build-system python-build-system)
12636 (arguments
12637 `(;; Line 37 of setup.py calls self.run_command('develop')
12638 ;; in the 'check' phase. This command seems to be trying
12639 ;; to write to
12640 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
12641 ;; for which it does not have the permission to write.
12642 #:tests? #f))
12643 (propagated-inputs
12644 `(("python-cffi" ,python-cffi)))
12645 (home-page "https://github.com/FSX/misaka")
12646 (synopsis "Python binding for Hoedown")
12647 (description
12648 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
12649library written in C. It features a fast HTML renderer and functionality to make custom
12650renderers (e.g. man pages or LaTeX).")
12651 (license license:expat)))
12652
12653(define-public python2-misaka
12654 (package-with-python2 python-misaka))
12655
12656(define-public python2-steadymark
12657 ;; This is forced into being a python2 only variant
12658 ;; due to its dependence on couleur that has no support
12659 ;; for python3
12660 (package
12661 (name "python2-steadymark")
12662 (version "0.7.3")
12663 (source
12664 (origin
12665 (method url-fetch)
12666 (uri (pypi-uri "steadymark" version))
12667 (sha256
12668 (base32
12669 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
12670 (build-system python-build-system)
12671 (native-inputs
12672 `(("python-couleur" ,python2-couleur)
12673 ("python-sure" ,python2-sure)
12674 ("python-misaka" ,python2-misaka)))
12675 (arguments
12676 `(#:python ,python-2
12677 #:phases
12678 (modify-phases %standard-phases
12679 (add-before 'build 'patch-setup-py
12680 (lambda _
12681 ;; Update requirements from dependency==version
12682 ;; to dependency>=version
12683 (substitute* "setup.py"
12684 (("==") ">="))
12685 #t)))))
12686 (home-page "https://github.com/gabrielfalcao/steadymark")
12687 (synopsis "Markdown-based test runner for python")
12688 (description
12689 "@code{Steadymark} allows documentation to be written in github-flavoured
12690markdown. The documentation may contain snippets of code surrounded by python
12691code blocks and @code{Steadymark} will find these snippets and run them, making
12692sure that there are no old malfunctional examples in the documentation examples.")
12693 (license license:expat)))
12694
12695(define-public python-jsonpointer
12696 (package
12697 (name "python-jsonpointer")
12698 (version "1.10")
12699 (source
12700 (origin
12701 (method url-fetch)
12702 (uri (pypi-uri "jsonpointer" version))
12703 (sha256
12704 (base32
12705 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
12706 (build-system python-build-system)
12707 (home-page "https://github.com/stefankoegl/python-json-pointer")
12708 (synopsis "Identify specific nodes in a JSON document")
12709 (description "@code{jsonpointer} allows you to access specific nodes
12710by path in a JSON document (see RFC 6901).")
12711 (license license:bsd-3)))
12712
12713(define-public python2-jsonpointer
12714 (package-with-python2 python-jsonpointer))
12715
12716(define-public python-jsonpatch
12717 (package
12718 (name "python-jsonpatch")
12719 (version "1.16")
12720 (source
12721 (origin
12722 (method url-fetch)
12723 ;; pypi version lacks tests.js
12724 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12725 "archive/v" version ".tar.gz"))
12726 (file-name (string-append name "-" version ".tar.gz"))
12727 (sha256
12728 (base32
12729 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
12730 (build-system python-build-system)
12731 (native-inputs
12732 `(("python-jsonpointer" ,python-jsonpointer)))
12733 (home-page "https://github.com/stefankoegl/python-json-patch")
12734 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
12735 (description "@code{jsonpatch} is a library and program that allows
12736applying JSON Patches according to RFC 6902.")
12737 (license license:bsd-3)))
12738
12739(define-public python2-jsonpatch
12740 (package-with-python2 python-jsonpatch))
12741
12742(define-public python-jsonpatch-0.4
12743 (package (inherit python-jsonpatch)
12744 (name "python-jsonpatch")
12745 (version "0.4")
12746 (source
12747 (origin
12748 (method url-fetch)
12749 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12750 "archive/v" version ".tar.gz"))
12751 (file-name (string-append name "-" version ".tar.gz"))
12752 (sha256
12753 (base32
12754 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
12755
12756(define-public python2-jsonpatch-0.4
12757 (package-with-python2 python-jsonpatch-0.4))
12758
12759(define-public python-rfc3986
12760 (package
12761 (name "python-rfc3986")
12762 (version "1.1.0")
12763 (source (origin
12764 (method url-fetch)
12765 (uri (pypi-uri "rfc3986" version))
12766 (sha256
12767 (base32
12768 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
12769 (build-system python-build-system)
12770 (arguments
12771 `(#:modules ((guix build utils)
12772 (guix build python-build-system)
12773 (ice-9 ftw)
12774 (srfi srfi-1)
12775 (srfi srfi-26))
12776 #:phases
12777 (modify-phases %standard-phases
12778 (replace 'check
12779 (lambda _
12780 (let ((cwd (getcwd)))
12781 (setenv "PYTHONPATH"
12782 (string-append cwd "/build/"
12783 (find (cut string-prefix? "lib" <>)
12784 (scandir (string-append cwd "/build")))
12785 ":"
12786 (getenv "PYTHONPATH")))
12787 (invoke "pytest" "-v")))))))
12788 (native-inputs
12789 `(("python-pytest" ,python-pytest)))
12790 (home-page "https://rfc3986.readthedocs.io/")
12791 (synopsis "Parse and validate URI references")
12792 (description
12793 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
12794validation and authority parsing. This module also supports RFC@tie{}6874
12795which adds support for zone identifiers to IPv6 addresses.")
12796 (license license:asl2.0)))
12797
12798(define-public python2-rfc3986
12799 (package-with-python2 python-rfc3986))
12800
12801(define-public python-rfc3987
12802 (package
12803 (name "python-rfc3987")
12804 (version "1.3.7")
12805 (source
12806 (origin
12807 (method url-fetch)
12808 (uri (pypi-uri "rfc3987" version))
12809 (sha256
12810 (base32
12811 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
12812 (build-system python-build-system)
12813 (home-page "https://pypi.python.org/pypi/rfc3987")
12814 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
12815 (description "@code{rfc3987} provides routines for parsing and
12816validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
12817 (license license:gpl3+)))
12818
12819(define-public python2-rfc3987
12820 (package-with-python2 python-rfc3987))
12821
12822(define-public python-validate-email
12823 (package
12824 (name "python-validate-email")
12825 (version "1.3")
12826 (source
12827 (origin
12828 (method url-fetch)
12829 (uri (pypi-uri "validate_email" version))
12830 (sha256
12831 (base32
12832 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
12833 (build-system python-build-system)
12834 (home-page "https://github.com/syrusakbary/validate_email")
12835 (synopsis "Verifies if an email address is valid and really exists")
12836 (description "@code{validate_email} can be used to verify if an email
12837address is valid and really exists.")
12838 (license license:lgpl3+)))
12839
12840(define-public python2-validate-email
12841 (package-with-python2 python-validate-email))
12842
12843(define-public python-flex
12844 (package
12845 (name "python-flex")
12846 (version "6.10.0")
12847 (source
12848 (origin
12849 (method url-fetch)
12850 (uri (pypi-uri "flex" version))
12851 (sha256
12852 (base32
12853 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
12854 (build-system python-build-system)
12855 (propagated-inputs
12856 `(("python-click" ,python-click)
12857 ("python-iso8601" ,python-iso8601)
12858 ("python-jsonpointer" ,python-jsonpointer)
12859 ("python-pyyaml" ,python-pyyaml)
12860 ("python-requests" ,python-requests)
12861 ("python-rfc3987" ,python-rfc3987)
12862 ("python-six" ,python-six)
12863 ("python-validate-email" ,python-validate-email)))
12864 (home-page "https://github.com/pipermerriam/flex")
12865 (synopsis "Validates Swagger schemata")
12866 (description "@code{flex} can be used to validate Swagger schemata.")
12867 (license license:bsd-3)))
12868
12869(define-public python2-flex
12870 (package-with-python2 python-flex))
12871
12872(define-public python-marshmallow
12873 (package
12874 (name "python-marshmallow")
12875 (version "3.0.0b14")
12876 (source
12877 (origin
12878 (method url-fetch)
12879 (uri (pypi-uri "marshmallow" version))
12880 (sha256
12881 (base32
12882 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
12883 (build-system python-build-system)
12884 (propagated-inputs
12885 `(("python-dateutil" ,python-dateutil)
12886 ("python-simplejson" ,python-simplejson)))
12887 (native-inputs
12888 `(("python-pytest" ,python-pytest)
12889 ("python-pytz" ,python-pytz)))
12890 (home-page "https://github.com/marshmallow-code/marshmallow")
12891 (synopsis "Convert complex datatypes to and from native
12892Python datatypes.")
12893 (description "@code{marshmallow} provides a library for converting
12894complex datatypes to and from native Python datatypes.")
12895 (license license:expat)))
12896
12897(define-public python2-marshmallow
12898 (package-with-python2 python-marshmallow))
12899
12900(define-public python-apispec
12901 (package
12902 (name "python-apispec")
12903 (version "0.25.3")
12904 (source
12905 (origin
12906 (method url-fetch)
12907 (uri (pypi-uri "apispec" version))
12908 (sha256
12909 (base32
12910 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
12911 (build-system python-build-system)
12912 (propagated-inputs
12913 `(("python-pyyaml" ,python-pyyaml)))
12914 (native-inputs
12915 `(("python-pytest" ,python-pytest)
12916 ("python-flask" ,python-flask)
12917 ("python-marshmallow" ,python-marshmallow)
12918 ("python-tornado" ,python-tornado)
12919 ("python-bottle" ,python-bottle)
12920 ("python-mock" ,python-mock)))
12921 (home-page "https://github.com/marshmallow-code/apispec")
12922 (synopsis "Swagger 2.0 API specification generator")
12923 (description "@code{python-apispec} is a pluggable API specification
12924generator. Currently supports the OpenAPI specification (f.k.a.
12925Swagger 2.0).")
12926 (license license:expat)))
12927
12928(define-public python2-apispec
12929 (package-with-python2 python-apispec))
12930
12931(define-public python-flasgger
12932 (package
12933 (name "python-flasgger")
12934 (version "0.6.3")
12935 (source
12936 (origin
1a04d421
TGR
12937 (method git-fetch)
12938 (uri (git-reference
12939 (url "https://github.com/rochacbruno/flasgger.git")
12940 (commit version)))
12941 (file-name (git-file-name name version))
44d10b1f 12942 (sha256
1a04d421 12943 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
44d10b1f
RW
12944 (build-system python-build-system)
12945 (arguments
12946 `(#:phases
12947 (modify-phases %standard-phases
12948 (replace 'check
12949 (lambda* (#:key inputs outputs #:allow-other-keys)
12950 (substitute* "Makefile"
12951 (("flake8 flasgger --ignore=F403")
12952 "flake8 flasgger --ignore=E731,F403"))
12953 (setenv "PYTHONPATH" (string-append (getcwd)
12954 ":"
12955 (getenv "PYTHONPATH")))
ac599a09 12956 (invoke "py.test"))))))
44d10b1f
RW
12957 (propagated-inputs
12958 `(("python-flask" ,python-flask)
12959 ("python-pyyaml" ,python-pyyaml)
12960 ("python-jsonschema" ,python-jsonschema)
12961 ("python-mistune" ,python-mistune)
12962 ("python-six" ,python-six)))
12963 (native-inputs
12964 `(("python-decorator" ,python-decorator)
12965 ("python-flake8" ,python-flake8)
12966 ("python-flask-restful" ,python-flask-restful)
12967 ("python-flex" ,python-flex)
12968 ("python-pytest" ,python-pytest)
12969 ("python-pytest-cov" ,python-pytest-cov)
12970 ("python-marshmallow" ,python-marshmallow)
12971 ("python-apispec" ,python-apispec)))
12972 (home-page "https://github.com/rochacbruno/flasgger/")
12973 (synopsis "Extract Swagger specs from your Flask project")
12974 (description "@code{python-flasgger} allows extracting Swagger specs
12975from your Flask project. It is a fork of Flask-Swagger.")
12976 (license license:expat)))
12977
12978(define-public python2-flasgger
12979 (package-with-python2 python-flasgger))
12980
12981(define-public python-swagger-spec-validator
12982 (package
12983 (name "python-swagger-spec-validator")
12984 (version "2.1.0")
12985 (source
12986 (origin
12987 (method url-fetch)
12988 (uri (pypi-uri "swagger-spec-validator" version))
12989 (sha256
12990 (base32
12991 "13hkpn2lycwr0468yqhjb3kwszqf7hjwlq61w7vdxq1caz31k4nw"))))
12992 (build-system python-build-system)
12993 (propagated-inputs
12994 `(("python-jsonschema" ,python-jsonschema)
12995 ("python-six" ,python-six)))
12996 (home-page
12997 "https://github.com/Yelp/swagger_spec_validator")
12998 (synopsis "Validation of Swagger specifications")
12999 (description "@code{swagger_spec_validator} provides a library for
13000validating Swagger API specifications.")
13001 (license license:asl2.0)))
13002
13003(define-public python2-swagger-spec-validator
13004 (package-with-python2 python-swagger-spec-validator))
13005
13006(define-public python-apache-libcloud
13007 (package
13008 (name "python-apache-libcloud")
13009 (version "2.4.0")
13010 (source
13011 (origin
13012 (method url-fetch)
13013 (uri (pypi-uri "apache-libcloud" version))
13014 (sha256
13015 (base32
13016 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
13017 (build-system python-build-system)
13018 (arguments
13019 `(#:phases
13020 (modify-phases %standard-phases
13021 (add-after 'unpack 'patch-ssh
13022 (lambda* (#:key inputs #:allow-other-keys)
13023 (substitute* "libcloud/compute/ssh.py"
13024 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
13025 "/bin/ssh" "'")))
13026 #t))
13027 (add-after 'unpack 'patch-tests
13028 (lambda _
13029 (substitute* "./libcloud/test/test_file_fixtures.py"
13030 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
13031 (("def _ascii") "def _raw_data(self, method, url, body, headers):
13032 return (httplib.OK,
13033 \"1234abcd\",
13034 {\"test\": \"value\"},
13035 httplib.responses[httplib.OK])
13036 def _ascii"))
13037 (substitute* "libcloud/test/compute/test_ssh_client.py"
13038 (("class ShellOutSSHClientTests")
13039 "@unittest.skip(\"Guix container doesn't have ssh service\")
13040class ShellOutSSHClientTests")
13041 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
13042 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
13043 (("'.xF0', '.x90', '.x8D', '.x88'")
13044 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
13045 #t))
13046 (add-before 'check 'copy-secret
13047 (lambda _
13048 (copy-file "libcloud/test/secrets.py-dist"
13049 "libcloud/test/secrets.py")
13050 #t)))))
13051 (inputs
13052 `(("openssh" ,openssh)))
13053 (propagated-inputs
13054 `(("python-paramiko" ,python-paramiko)
13055 ("python-requests" ,python-requests)))
13056 (native-inputs
13057 `(("python-lockfile" ,python-lockfile)
13058 ("python-mock" ,python-mock)
13059 ("python-pytest" ,python-pytest)
13060 ("python-pytest-runner" ,python-pytest-runner)
13061 ("python-requests-mock" ,python-requests-mock)))
13062 (home-page "https://libcloud.apache.org/")
13063 (synopsis "Unified Cloud API")
13064 (description "@code{libcloud} is a Python library for interacting with
13065many of the popular cloud service providers using a unified API.")
13066 (license license:asl2.0)))
13067
13068(define-public python2-apache-libcloud
13069 (package-with-python2 python-apache-libcloud))
13070
13071(define-public python-smmap2
13072 (package
13073 (name "python-smmap2")
13074 (version "2.0.3")
13075 (source
13076 (origin
13077 (method url-fetch)
13078 (uri (pypi-uri "smmap2" version))
13079 (sha256
13080 (base32
13081 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
13082 (build-system python-build-system)
13083 (native-inputs
13084 `(("python-nosexcover" ,python-nosexcover)))
13085 (home-page "https://github.com/Byron/smmap")
13086 (synopsis "Python sliding window memory map manager")
13087 (description "@code{smmap2} is a pure Python implementation of a sliding
13088window memory map manager.")
13089 (license license:bsd-3)))
13090
13091(define-public python2-smmap2
13092 (package-with-python2 python-smmap2))
13093
13094(define-public python-regex
13095 (package
13096 (name "python-regex")
c187c9d7 13097 (version "2019.04.14")
44d10b1f
RW
13098 (source (origin
13099 (method url-fetch)
13100 (uri (pypi-uri "regex" version))
13101 (sha256
13102 (base32
c187c9d7
BT
13103 "1a6hhfs6l6snr1z654ay6wzbmwdkmv282fzfkd5hk2d1n73y8v6m"))))
13104 ;; TODO: Fix and enable regex_test.py tests that complain about the
13105 ;; test.support module not existing.
44d10b1f
RW
13106 (build-system python-build-system)
13107 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
13108 (synopsis "Alternative regular expression module")
13109 (description "This regular expression implementation is backwards-
13110compatible with the standard @code{re} module, but offers additional
13111functionality like full case-folding for case-insensitive matches in Unicode.")
13112 (license license:psfl)))
13113
13114(define-public python2-regex
13115 (package-with-python2 python-regex))
13116
13117(define-public python2-pyopengl
13118 (package
13119 (name "python2-pyopengl")
13120 (version "3.1.0")
13121 (source
13122 (origin
13123 (method url-fetch)
13124 (uri (pypi-uri "PyOpenGL" version))
13125 (sha256
13126 (base32
13127 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
13128 (arguments
13129 `(#:python ,python-2))
13130 (build-system python-build-system)
13131 (home-page "http://pyopengl.sourceforge.net")
13132 (synopsis "Standard OpenGL bindings for Python")
13133 (description
13134 "PyOpenGL is the most common cross platform Python binding to OpenGL and
13135related APIs. The binding is created using the standard @code{ctypes}
13136library.")
13137 (license license:bsd-3)))
13138
13139(define-public python2-pyopengl-accelerate
13140 (package
13141 (inherit python2-pyopengl)
13142 (name "python2-pyopengl-accelerate")
13143 (version "3.1.0")
13144 (source
13145 (origin
13146 (method url-fetch)
13147 (uri (pypi-uri "PyOpenGL-accelerate" version))
13148 (sha256
13149 (base32
13150 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
13151 (synopsis "Acceleration code for PyOpenGL")
13152 (description
13153 "This is the Cython-coded accelerator module for PyOpenGL.")))
13154
13155(define-public python-rencode
13156 (package
13157 (name "python-rencode")
13158 (version "1.0.5")
13159 (source
13160 (origin
13161 (method url-fetch)
13162 (uri (pypi-uri "rencode" version))
13163 (sha256
13164 (base32
13165 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
13166 (build-system python-build-system)
13167 (arguments
13168 `(#:phases
13169 (modify-phases %standard-phases
13170 (add-before 'check 'delete-bogus-test
13171 ;; This test requires /home/aresch/Downloads, which is not provided by
13172 ;; the build environment.
13173 (lambda _
13174 (delete-file "rencode/t.py")
13175 #t)))))
13176 (native-inputs `(("pkg-config" ,pkg-config)
13177 ("python-cython" ,python-cython)))
13178 (home-page "https://github.com/aresch/rencode")
13179 (synopsis "Serialization of heterogeneous data structures")
13180 (description
13181 "The @code{rencode} module is a data structure serialization library,
13182similar to @code{bencode} from the BitTorrent project. For complex,
13183heterogeneous data structures with many small elements, r-encoding stake up
13184significantly less space than b-encodings. This version of rencode is a
13185complete rewrite in Cython to attempt to increase the performance over the
13186pure Python module.")
13187 (license license:bsd-3)))
13188
13189(define-public python2-rencode
13190 (package-with-python2 python-rencode))
13191
13192(define-public python-xenon
13193 (package
13194 (name "python-xenon")
13195 (version "0.5.4")
13196 (source
13197 (origin
13198 (method url-fetch)
13199 (uri (pypi-uri "xenon" version))
13200 (sha256
13201 (base32
13202 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
13203 (build-system python-build-system)
13204 (native-inputs
13205 `(("python-pyyaml" ,python-pyyaml)
13206 ("python-radon" ,python-radon)
13207 ("python-requests" ,python-requests)
13208 ("python-flake8" ,python-flake8)
13209 ("python-tox" ,python-tox)))
13210 (arguments
13211 `(#:phases
13212 (modify-phases %standard-phases
13213 (add-before 'build 'patch-test-requirements
13214 (lambda _
13215 ;; Remove httpretty dependency for tests.
13216 (substitute* "setup.py"
13217 (("httpretty") ""))
13218 #t)))))
13219 (home-page "https://xenon.readthedocs.org/")
13220 (synopsis "Monitor code metrics for Python on your CI server")
13221 (description
13222 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
13223Ideally, @code{xenon} is run every time code is committed. Through command
13224line options, various thresholds can be set for the complexity of code. It
13225will fail (i.e. it will exit with a non-zero exit code) when any of these
13226requirements is not met.")
13227 (license license:expat)))
13228
13229(define-public python2-xenon
13230 (package-with-python2 python-xenon))
13231
13232(define-public python-pysocks
13233 (package
13234 (name "python-pysocks")
13235 (version "1.6.8")
13236 (source
13237 (origin
13238 (method url-fetch)
13239 (uri (pypi-uri "PySocks" version))
13240 (sha256
13241 (base32
13242 "0wn6xafwy9c1gamwljw3fyvih5w19qy9xp39zmv8c90ai5ajrr9z"))))
13243 (build-system python-build-system)
13244 (arguments `(#:tests? #f))
13245 (home-page "https://github.com/Anorov/PySocks")
13246 (synopsis "SOCKS client module")
13247 (description "@code{pysocks} is an updated and semi-actively maintained
13248version of @code{SocksiPy} with bug fixes and extra features.")
13249 (license license:bsd-3)))
13250
13251(define-public python2-pysocks
13252 (package-with-python2 python-pysocks))
13253
13254(define-public python-pydiff
13255 (package
13256 (name "python-pydiff")
13257 (version "0.2")
13258 (source
13259 (origin
13260 (method url-fetch)
13261 (uri (pypi-uri "pydiff" version))
13262 (sha256
13263 (base32
13264 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
13265 (build-system python-build-system)
13266 (home-page "https://github.com/myint/pydiff")
13267 (synopsis "Library to diff two Python files at the bytecode level")
13268 (description
13269 "@code{pydiff} makes it easy to look for actual code changes while
13270ignoring formatting changes.")
13271 (license license:expat)))
13272
13273(define-public python2-pydiff
13274 (package-with-python2 python-pydiff))
13275
13276(define-public python-tqdm
13277 (package
13278 (name "python-tqdm")
13279 (version "4.19.6")
13280 (source
13281 (origin
13282 (method url-fetch)
13283 (uri (pypi-uri "tqdm" version))
13284 (sha256
13285 (base32
13286 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
13287 (build-system python-build-system)
13288 (native-inputs
13289 `(("python-flake8" ,python-flake8)
13290 ("python-nose" ,python-nose)
13291 ("python-coverage" ,python-coverage)))
13292 (home-page "https://github.com/tqdm/tqdm")
13293 (synopsis "Fast, extensible progress meter")
13294 (description
13295 "Make loops show a progress bar on the console by just wrapping any
13296iterable with @code{|tqdm(iterable)|}. Offers many options to define
13297design and layout.")
13298 (license (list license:mpl2.0 license:expat))))
13299
13300(define-public python2-tqdm
13301 (package-with-python2 python-tqdm))
13302
13303(define-public python-pkginfo
13304 (package
13305 (name "python-pkginfo")
13306 (version "1.4.2")
13307 (source
13308 (origin
13309 (method url-fetch)
13310 (uri (pypi-uri "pkginfo" version))
13311 (sha256
13312 (base32
13313 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
13314 (build-system python-build-system)
13315 (arguments
13316 ;; The tests are broken upstream.
13317 '(#:tests? #f))
13318 (home-page
13319 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
13320 (synopsis
13321 "Query metadatdata from sdists, bdists, and installed packages")
13322 (description
13323 "API to query the distutils metadata written in @file{PKG-INFO} inside a
13324source distriubtion (an sdist) or a binary distribution (e.g., created by
13325running bdist_egg). It can also query the EGG-INFO directory of an installed
13326distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
13327created by running @code{python setup.py develop}).")
13328 (license license:expat)))
13329
13330(define-public python2-pkginfo
13331 (package-with-python2 python-pkginfo))
13332
13333(define-public python-twine
13334 (package
13335 (name "python-twine")
13336 (version "1.9.1")
13337 (source
13338 (origin
13339 (method url-fetch)
13340 (uri (pypi-uri "twine" version))
13341 (sha256
13342 (base32
13343 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
13344 (build-system python-build-system)
13345 (propagated-inputs
13346 `(("python-tqdm" ,python-tqdm)
13347 ("python-pkginfo" ,python-pkginfo)
13348 ("python-requests" ,python-requests)
13349 ("python-requests-toolbelt" ,python-requests-toolbelt)))
13350 (home-page "https://github.com/pypa/twine")
13351 (synopsis "Collection of utilities for interacting with PyPI")
13352 (description
13353 "@code{twine} currently supports registering projects and uploading
13354distributions. It authenticates the user over HTTPS, allows them to pre-sign
13355their files and supports any packaging format (including wheels).")
13356 (license license:asl2.0)))
13357
13358(define-public python2-twine
13359 (package-with-python2 python-twine))
13360
13361(define-public python-linecache2
13362 (package
13363 (name "python-linecache2")
13364 (version "1.0.0")
13365 (source
13366 (origin
13367 (method url-fetch)
13368 (uri (pypi-uri "linecache2" version))
13369 (sha256
13370 (base32
13371 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
13372 (build-system python-build-system)
13373 (arguments
13374 `(;; The tests depend on unittest2, and our version is a bit too old.
13375 #:tests? #f))
13376 (native-inputs
13377 `(("python-pbr" ,python-pbr-minimal)))
13378 (home-page
13379 "https://github.com/testing-cabal/linecache2")
13380 (synopsis "Backports of the linecache module")
13381 (description
13382 "The linecache module allows one to get any line from any file, while
13383attempting to optimize internally, using a cache, the common case where many
13384lines are read from a single file.")
13385 (license license:psfl)))
13386
13387(define-public python2-linecache2
13388 (package-with-python2 python-linecache2))
13389
13390(define-public python-traceback2
13391 (package
13392 (name "python-traceback2")
13393 (version "1.4.0")
13394 (source
13395 (origin
13396 (method url-fetch)
13397 (uri (pypi-uri "traceback2" version))
13398 (sha256
13399 (base32
13400 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
13401 (build-system python-build-system)
13402 (arguments
13403 `(;; python-traceback2 and python-unittest2 depend on one another.
13404 #:tests? #f))
13405 (native-inputs
13406 `(("python-pbr" ,python-pbr-minimal)))
13407 (propagated-inputs
13408 `(("python-linecache2" ,python-linecache2)))
13409 (home-page
13410 "https://github.com/testing-cabal/traceback2")
13411 (synopsis "Backports of the traceback module")
13412 (description
13413 "This module provides a standard interface to extract, format and print
13414stack traces of Python programs. It exactly mimics the behavior of the Python
13415interpreter when it prints a stack trace.")
13416 (license license:psfl)))
13417
13418(define-public python2-traceback2
13419 (package-with-python2 python-traceback2))
13420
13421(define-public python-ratelimiter
13422 (package
13423 (name "python-ratelimiter")
13424 (version "1.2.0")
13425 (source
13426 (origin
13427 (method url-fetch)
13428 (uri (pypi-uri "ratelimiter" version))
13429 (sha256
13430 (base32
13431 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
13432 (build-system python-build-system)
13433 (arguments
13434 '(#:tests? #f)) ; There are no tests in the pypi archive.
13435 (home-page "https://github.com/RazerM/ratelimiter")
13436 (synopsis "Simple rate limiting object")
13437 (description
13438 "The @code{ratelimiter} module ensures that an operation will not be
13439executed more than a given number of times during a given period.")
13440 (license license:asl2.0)))
13441
13442(define-public python2-ratelimiter
13443 (package-with-python2 python-ratelimiter))
13444
13445(define-public python-dukpy
13446 (package
13447 (name "python-dukpy")
13448 (version "0.3")
13449 (source
13450 (origin
5b77ebe1
TGR
13451 (method git-fetch)
13452 (uri (git-reference
13453 (url "https://github.com/kovidgoyal/dukpy.git")
13454 (commit (string-append "v" version))))
13455 (file-name (git-file-name name version))
44d10b1f 13456 (sha256
5b77ebe1 13457 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
44d10b1f
RW
13458 (build-system python-build-system)
13459 (home-page "https://github.com/kovidgoyal/dukpy")
13460 (synopsis "Run JavaScript in python")
13461 (description
13462 "dukpy is a JavaScript runtime environment for Python using the duktape
13463embeddable JavaScript engine.")
13464 ;; Dukpy is licensed under MIT like the embedded duktape library,
13465 ;; with 'errors.c' as GPL3.
13466 (license (list license:expat license:gpl3))))
13467
13468(define-public python2-dukpy
13469 (package-with-python2 python-dukpy))
13470
13471(define-public python-jsonrpclib-pelix
13472 (package
13473 (name "python-jsonrpclib-pelix")
13474 (version "0.3.2")
13475 (source
13476 (origin
13477 (method url-fetch)
13478 (uri (pypi-uri "jsonrpclib-pelix" version))
13479 (sha256
13480 (base32
13481 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
13482 (build-system python-build-system)
13483 (arguments
13484 `(#:tests? #f)) ; no tests in PyPI tarball
13485 (home-page "https://github.com/tcalmant/jsonrpclib/")
13486 (synopsis "JSON-RPC 2.0 client library for Python")
13487 (description
13488 "This library implements the JSON-RPC v2.0
13489specification (backwards-compatible) as a client library for Python. This
13490version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
13491services.")
13492 (license license:asl2.0)))
13493
13494(define-public python2-jsonrpclib-pelix
13495 (package-with-python2 python-jsonrpclib-pelix))
13496
13497(define-public python-setuptools-scm-git-archive
13498 (package
13499 (name "python-setuptools-scm-git-archive")
13500 (version "1.0")
13501 (source
13502 (origin
13503 (method url-fetch)
13504 (uri (pypi-uri "setuptools_scm_git_archive" version))
13505 (sha256
13506 (base32
13507 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
13508 (build-system python-build-system)
13509 (native-inputs
13510 `(("python-pytest" ,python-pytest)))
13511 (propagated-inputs
13512 `(("python-setuptools-scm" ,python-setuptools-scm)))
13513 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
13514 (synopsis "Setuptools_scm plugin for git archives")
13515 (description
13516 "The setuptools_scm_git_archive package is a plugin to
13517setuptools_scm, which supports obtaining versions from git archives that
13518belong to tagged versions.")
13519 (license license:expat)))
13520
13521(define-public python2-setuptools-scm-git-archive
13522 (package-with-python2 python-setuptools-scm-git-archive))
13523
13524(define-public python-pyclipper
13525 (package
13526 (name "python-pyclipper")
13527 (version "1.1.0.post1")
13528 (source
13529 (origin
13530 (method url-fetch)
13531 (uri (pypi-uri "pyclipper" version ".zip"))
13532 (sha256
13533 (base32
13534 "0ldbkbnx94an4zzrwb1sxmg6k0jgk4cwmvcdyy8y5k1zslc612wa"))
13535 (modules '((guix build utils)))
13536 (snippet
13537 '(begin
13538 ;; This file is generated by Cython.
13539 (delete-file "pyclipper/pyclipper.cpp") #t))))
13540 (build-system python-build-system)
13541 (arguments
13542 `(#:phases
13543 (modify-phases %standard-phases
13544 (add-before 'build 'cythonize-sources
13545 (lambda _
13546 (with-directory-excursion "pyclipper"
13547 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
13548 (propagated-inputs
13549 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
13550 (native-inputs
13551 `(("python-cython" ,python-cython)
13552 ("python-pytest" ,python-pytest)
13553 ("python-pytest-runner" ,python-pytest-runner)
13554 ("python-unittest2" ,python-unittest2)
13555 ("unzip" ,unzip)))
13556 (home-page "https://github.com/greginvm/pyclipper")
13557 (synopsis "Wrapper for Angus Johnson's Clipper library")
13558 (description
13559 "Pyclipper is a Cython wrapper for the C++ translation of the
13560Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
13561 (license license:expat)))
13562
13563(define-public python2-pyclipper
13564 (package-with-python2 python-pyclipper))
13565
13566(define-public python2-booleanoperations
13567 (package
13568 (name "python2-booleanoperations")
13569 (version "0.7.1")
13570 (source
13571 (origin
13572 (method url-fetch)
13573 (uri (pypi-uri "booleanOperations" version ".zip"))
13574 (sha256
13575 (base32
13576 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
13577 (build-system python-build-system)
13578 (arguments
13579 `(#:python ,python-2))
13580 (native-inputs
13581 `(("unzip" ,unzip)
13582 ("python2-pytest" ,python2-pytest)
13583 ("python2-pytest-runner" ,python2-pytest-runner)))
13584 (propagated-inputs
13585 `(("python-fonttools" ,python2-fonttools)
13586 ("python-pyclipper" ,python2-pyclipper)
13587 ("python-ufolib" ,python2-ufolib)))
13588 (home-page "https://github.com/typemytype/booleanOperations")
13589 (synopsis "Boolean operations on paths")
13590 (description
13591 "BooleanOperations provides a Python library that enables
13592boolean operations on paths.")
13593 (license license:expat)))
13594
13595(define-public python-tempdir
13596 (package
13597 (name "python-tempdir")
13598 (version "0.7.1")
13599 (source
13600 (origin
13601 (method url-fetch)
13602 (uri (pypi-uri "tempdir" version))
13603 (sha256
13604 (base32
13605 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
13606 (build-system python-build-system)
13607 (home-page "https://pypi.org/project/tempdir/")
13608 (arguments
13609 ;; the package has no tests
13610 '(#:tests? #f))
13611 (synopsis "Python library for managing temporary directories")
13612 (description
13613 "This library manages temporary directories that are automatically
13614deleted with all their contents when they are no longer needed. It is
13615particularly convenient for use in tests.")
13616 (license license:expat)))
13617
13618(define-public python2-tempdir
13619 (package-with-python2 python-tempdir))
13620
13621(define-public python-activepapers
13622 (package
13623 (name "python-activepapers")
13624 (version "0.2.2")
13625 (source
13626 (origin
13627 (method url-fetch)
13628 (uri (pypi-uri "ActivePapers.Py" version))
13629 (sha256
13630 (base32
13631 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
13632 (build-system python-build-system)
13633 (arguments
13634 `(#:modules ((ice-9 ftw)
13635 (srfi srfi-1)
13636 (guix build utils)
13637 (guix build python-build-system))
13638
13639 #:phases
13640 (modify-phases %standard-phases
13641 (add-after 'unpack 'delete-python2-code
13642 (lambda _
13643 (for-each delete-file
13644 '("lib/activepapers/builtins2.py"
13645 "lib/activepapers/standardlib2.py"
13646 "lib/activepapers/utility2.py"))))
13647 (replace 'check
13648 (lambda _
13649 ;; Deactivate the test cases that download files
13650 (setenv "NO_NETWORK_ACCESS" "1")
13651 ;; For some strange reason, some tests fail if nosetests runs all
13652 ;; test modules in a single execution. They pass if each test
13653 ;; module is run individually.
13654 (for-each (lambda (filename)
13655 (invoke "nosetests"
13656 (string-append "tests/" filename)))
13657 (scandir "tests"
13658 (lambda (filename)
13659 (string-suffix? ".py" filename)))))))))
13660 (native-inputs
13661 `(("python-tempdir" ,python-tempdir)
13662 ("python-nose" ,python-nose)))
13663 (propagated-inputs
13664 `(("python-h5py" ,python-h5py)))
13665 (home-page "http://www.activepapers.org/")
13666 (synopsis "Executable papers for scientific computing")
13667 (description
13668 "ActivePapers is a tool for working with executable papers, which
13669combine data, code, and documentation in single-file packages,
13670suitable for publication as supplementary material or on repositories
13671such as figshare or Zenodo.")
13672 (properties `((python2-variant . ,(delay python2-activepapers))))
13673 (license license:bsd-3)))
13674
13675(define-public python2-activepapers
13676 (let ((base (package-with-python2
13677 (strip-python2-variant python-activepapers))))
13678 (package
13679 (inherit base)
13680 (arguments
13681 (substitute-keyword-arguments (package-arguments base)
13682 ((#:phases phases)
13683 `(modify-phases ,phases
13684 (delete 'delete-python2-code)
13685 (add-after 'unpack 'delete-python3-code
13686 (lambda _
13687 (for-each delete-file
13688 '("lib/activepapers/builtins3.py"
13689 "lib/activepapers/standardlib3.py"
13690 "lib/activepapers/utility3.py")))))))))))
13691
13692(define-public python-semver
13693 (package
13694 (name "python-semver")
13695 (version "2.7.9")
13696 (source
13697 (origin
13698 (method url-fetch)
13699 (uri (pypi-uri "semver" version))
13700 (sha256
13701 (base32
13702 "0hhgqppchv59rqj0yzi1prdg2nfsywqmjsqy2rycyxm0hvxmbyqz"))))
13703 (build-system python-build-system)
13704 (arguments
13705 `(#:phases
13706 (modify-phases %standard-phases
13707 (add-after 'unpack 'patch-test-requirements
13708 (lambda _
13709 (substitute* "setup.py"
13710 ;; Our Python is new enough.
13711 (("'virtualenv<14\\.0\\.0'") "'virtualenv'"))
13712 #t)))))
13713 (native-inputs
13714 `(("python-tox" ,python-tox)
13715 ("python-virtualenv" ,python-virtualenv)))
13716 (home-page "https://github.com/k-bx/python-semver")
13717 (synopsis "Python helper for Semantic Versioning")
13718 (description "This package provides a Python library for
13719@url{Semantic Versioning, http://semver.org/}.")
13720 (license license:bsd-3)))
13721
13722(define-public python2-semver
13723 (package-with-python2 python-semver))
13724
13725(define-public python-pyro4
13726 (package
13727 (name "python-pyro4")
ad1acb81 13728 (version "4.75")
44d10b1f
RW
13729 (source
13730 (origin
13731 (method url-fetch)
13732 (uri (pypi-uri "Pyro4" version))
13733 (sha256
ad1acb81 13734 (base32 "1dfpp36imddx19yv0kd28gk1l71ckhpqy6jd590wpm2680jw15rq"))))
44d10b1f
RW
13735 (build-system python-build-system)
13736 (propagated-inputs
13737 `(("python-serpent" ,python-serpent)))
13738 (home-page "https://pyro4.readthedocs.io")
13739 (synopsis "Distributed object middleware for Python")
13740 (description
13741 "Pyro enables you to build applications in which objects can talk to each
13742other over the network. You can just use normal Python method calls to call
13743objects on other machines, also known as remote procedure calls (RPC).")
13744 (license license:expat)))
13745
13746(define-public python2-pyro
13747 (package
13748 (name "python2-pyro")
13749 (version "3.16")
13750 (source
13751 (origin
13752 (method url-fetch)
13753 (uri (pypi-uri "Pyro" version))
13754 (file-name (string-append "Pyro-" version ".tar.gz"))
13755 (sha256
13756 (base32
13757 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
13758 (build-system python-build-system)
13759 (arguments
13760 ;; Pyro is not compatible with Python 3
13761 `(#:python ,python-2
13762 ;; Pyro has no test cases for automatic execution
13763 #:tests? #f))
13764 (home-page "http://pythonhosted.org/Pyro/")
13765 (synopsis "Distributed object manager for Python")
13766 (description "Pyro is a Distributed Object Technology system
13767written in Python that is designed to be easy to use. It resembles
13768Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
13769which is a system and language independent Distributed Object Technology
13770and has much more to offer than Pyro or RMI. Pyro 3.x is no
13771longer maintained. New projects should use Pyro4 instead, which
13772is the new Pyro version that is actively developed.")
13773 (license license:expat)))
13774
13775(define-public python2-scientific
13776 (package
13777 (name "python2-scientific")
13778 (version "2.9.4")
13779 (source
13780 (origin
13781 (method url-fetch)
13782 (uri (string-append "https://bitbucket.org/khinsen/"
13783 "scientificpython/downloads/ScientificPython-"
13784 version ".tar.gz"))
13785 (file-name (string-append "ScientificPython-" version ".tar.gz"))
13786 (sha256
13787 (base32
13788 "0fc69zhlsn9d2jvbzyjl9ah53vj598h84nkq230c83ahfvgzx5y3"))))
13789 (build-system python-build-system)
13790 (inputs
13791 `(("netcdf" ,netcdf)))
13792 (propagated-inputs
13793 `(("python-numpy" ,python2-numpy-1.8)
13794 ("python-pyro" ,python2-pyro)))
13795 (arguments
13796 ;; ScientificPython is not compatible with Python 3
13797 `(#:python ,python-2
13798 #:tests? #f ; No test suite
13799 #:phases
13800 (modify-phases %standard-phases
13801 (replace 'build
13802 (lambda* (#:key inputs #:allow-other-keys)
77e61e25
RW
13803 (invoke "python" "setup.py" "build"
13804 (string-append "--netcdf_prefix="
13805 (assoc-ref inputs "netcdf"))))))))
44d10b1f
RW
13806 (home-page "https://bitbucket.org/khinsen/scientificpython")
13807 (synopsis "Python modules for scientific computing")
13808 (description "ScientificPython is a collection of Python modules that are
13809useful for scientific computing. Most modules are rather general (Geometry,
13810physical units, automatic derivatives, ...) whereas others are more
13811domain-specific (e.g. netCDF and PDB support). The library is currently
13812not actively maintained and works only with Python 2 and NumPy < 1.9.")
13813 (license license:cecill-c)))
13814
13815(define-public python2-mmtk
13816 (package
13817 (name "python2-mmtk")
13818 (version "2.7.11")
13819 (source
13820 (origin
13821 (method url-fetch)
13822 (uri (string-append "https://bitbucket.org/khinsen/"
13823 "mmtk/downloads/MMTK-" version ".tar.gz"))
13824 (file-name (string-append "MMTK-" version ".tar.gz"))
13825 (sha256
13826 (base32
13827 "1d0nnjx4lwsvh8f99vv1r6gi50d93yba0adkz8b4zgv4za4c5862"))))
13828 (build-system python-build-system)
13829 (native-inputs
13830 `(("netcdf" ,netcdf)))
13831 (propagated-inputs
13832 `(("python-scientific" ,python2-scientific)
13833 ("python-tkinter" ,python-2 "tk")))
13834 (arguments
13835 `(#:python ,python-2
13836 #:tests? #f
13837 #:phases
13838 (modify-phases %standard-phases
13839 (add-before 'build 'includes-from-scientific
13840 (lambda* (#:key inputs #:allow-other-keys)
13841 (mkdir-p "Include/Scientific")
13842 (copy-recursively
13843 (string-append
13844 (assoc-ref inputs "python-scientific")
13845 "/include/python2.7/Scientific")
13846 "Include/Scientific"))))))
13847 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
13848 (synopsis "Python library for molecular simulation")
13849 (description "MMTK is a library for molecular simulations with an emphasis
13850on biomolecules. It provides widely used methods such as Molecular Dynamics
13851and normal mode analysis, but also basic routines for implementing new methods
13852for simulation and analysis. The library is currently not actively maintained
13853and works only with Python 2 and NumPy < 1.9.")
13854 (license license:cecill-c)))
13855
13856(define-public python-phonenumbers
13857 (package
13858 (name "python-phonenumbers")
13859 (version "8.9.1")
13860 (source
13861 (origin
13862 (method url-fetch)
13863 (uri (pypi-uri "phonenumbers" version))
13864 (sha256
13865 (base32
13866 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
13867 (build-system python-build-system)
13868 (home-page
13869 "https://github.com/daviddrysdale/python-phonenumbers")
13870 (synopsis
13871 "Python library for dealing with international phone numbers")
13872 (description
13873 "This package provides a Python port of Google's libphonenumber library.")
13874 (license license:asl2.0)))
13875
13876(define-public python2-phonenumbers
13877 (package-with-python2 python-phonenumbers))
13878
13879(define-public python-send2trash
13880 (package
13881 (name "python-send2trash")
d9b0216b 13882 (version "1.5.0")
44d10b1f 13883 (source
d9b0216b 13884 (origin (method git-fetch)
44d10b1f 13885 ;; Source tarball on PyPI doesn't include tests.
d9b0216b
RW
13886 (uri (git-reference
13887 (url "https://github.com/hsoft/send2trash.git")
13888 (commit version)))
13889 (file-name (git-file-name name version))
44d10b1f
RW
13890 (sha256
13891 (base32
d9b0216b 13892 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
44d10b1f
RW
13893 (build-system python-build-system)
13894 (arguments
13895 '(#:phases
13896 (modify-phases %standard-phases
13897 (add-before 'check 'pre-check
13898 (lambda _
13899 (mkdir-p "/tmp/foo")
13900 (setenv "HOME" "/tmp/foo")
13901 #t)))))
13902 (home-page "https://github.com/hsoft/send2trash")
13903 (synopsis "Send files to the user's @file{~/Trash} directory")
13904 (description "This package provides a Python library to send files to the
13905user's @file{~/Trash} directory.")
20b3fde7 13906 (properties `((python2-variant . ,(delay python2-send2trash))))
44d10b1f
RW
13907 (license license:bsd-3)))
13908
13909(define-public python2-send2trash
13910 (package
f32164ab 13911 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
44d10b1f
RW
13912 (arguments
13913 (substitute-keyword-arguments (package-arguments python-send2trash)
13914 ((#:phases phases)
13915 `(modify-phases ,phases
13916 (add-before 'check 'setenv
13917 (lambda _
13918 (setenv "PYTHONPATH"
13919 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
4782a06f 13920 #t))))))))
44d10b1f
RW
13921
13922(define-public python-yapf
13923 (package
13924 (name "python-yapf")
13925 (version "0.24.0")
13926 (source
13927 (origin
13928 (method url-fetch)
13929 (uri (pypi-uri "yapf" version))
13930 (sha256
13931 (base32
13932 "0anwby0ydmyzcsgjc5dn1ryddwvii4dq61vck447q0n96npnzfyf"))))
13933 (build-system python-build-system)
13934 (home-page "https://github.com/google/yapf")
13935 (synopsis "Formatter for Python code")
13936 (description "YAPF is a formatter for Python code. It's based off of
13937@dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
13938takes the code and reformats it to the best formatting that conforms to the
13939style guide, even if the original code didn't violate the style guide.")
13940 (license license:asl2.0)))
13941
13942(define-public python2-yapf
13943 (package-with-python2 python-yapf))
13944
13945(define-public python-gyp
13946 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
13947 (revision "0"))
13948 (package
13949 (name "python-gyp")
13950 ;; Google does not release versions,
13951 ;; based on second most recent commit date.
13952 (version (git-version "0.0.0" revision commit))
13953 (source
13954 (origin
13955 ;; Google does not release tarballs,
13956 ;; git checkout is needed.
13957 (method git-fetch)
13958 (uri (git-reference
13959 (url "https://chromium.googlesource.com/external/gyp")
13960 (commit commit)))
13961 (file-name (git-file-name name version))
13962 (sha256
13963 (base32
13964 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
13965 (build-system python-build-system)
13966 (home-page "https://gyp.gsrc.io/")
13967 (synopsis "GYP is a Meta-Build system")
13968 (description
13969 "GYP builds build systems for large, cross platform applications.
13970It can be used to generate XCode projects, Visual Studio projects, Ninja build
13971files, and Makefiles.")
13972 (license license:bsd-3))))
13973
13974(define-public python2-gyp
13975 (package-with-python2 python-gyp))
13976
13977(define-public python-whatever
13978 (package
13979 (name "python-whatever")
13980 (version "0.5")
13981 (source
13982 (origin
13983 (method url-fetch)
13984 (uri (string-append "https://github.com/Suor/whatever/archive/" version
13985 ".tar.gz"))
13986 (sha256
13987 (base32
13988 "1iqvnaf0zpc6b4rvbqq4xy45mszcscyzpzknv8wg6j84pbp22sap"))
13989 (file-name (string-append name "-" version ".tar.gz"))))
13990 (build-system python-build-system)
13991 (arguments
13992 `(#:phases
13993 (modify-phases %standard-phases
13994 (replace 'check
13995 (lambda _
13996 (invoke "py.test"))))))
13997 (native-inputs
13998 `(("python-pytest" ,python-pytest)))
13999 (home-page "http://github.com/Suor/whatever")
14000 (synopsis "Make anonymous functions by partial application of operators")
14001 (description "@code{whatever} provides an easy way to make anonymous
14002functions by partial application of operators.")
14003 (license license:bsd-3)))
14004
14005(define-public python2-whatever
14006 (package-with-python2 python-whatever))
14007
14008(define-public python-funcy
14009 (package
14010 (name "python-funcy")
9e396ab8 14011 (version "1.11")
44d10b1f
RW
14012 (source
14013 (origin
a85c6027
TGR
14014 (method git-fetch)
14015 (uri (git-reference
14016 (url "https://github.com/Suor/funcy.git")
14017 (commit version)))
44d10b1f 14018 (sha256
a85c6027
TGR
14019 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
14020 (file-name (git-file-name name version))))
44d10b1f
RW
14021 (build-system python-build-system)
14022 (arguments
14023 `(#:phases
14024 (modify-phases %standard-phases
14025 (replace 'check
14026 (lambda _
14027 (invoke "py.test"))))))
14028 (native-inputs
14029 `(("python-pytest" ,python-pytest)
14030 ("python-whatever" ,python-whatever)))
14031 (home-page "http://github.com/Suor/funcy")
14032 (synopsis "Functional tools")
14033 (description "@code{funcy} is a library that provides functional tools.
14034Examples are:
14035@enumerate
14036@item merge - Merges collections of the same type
14037@item walk - Type-preserving map
14038@item select - Selects a part of a collection
14039@item take - Takes the first n items of a collection
14040@item first - Takes the first item of a collection
14041@item remove - Predicated-removes items of a collection
14042@item concat - Concatenates two collections
14043@item flatten - Flattens a collection with subcollections
14044@item distinct - Returns only distinct items
14045@item split - Predicated-splits a collection
14046@item split_at - Splits a collection at a given item
14047@item group_by - Groups items by group
14048@item pairwise - Pairs off adjacent items
14049@item partial - Partially-applies a function
14050@item curry - Curries a function
14051@item compose - Composes functions
14052@item complement - Complements a predicate
14053@item all_fn - \"all\" with predicate
14054@end enumerate")
14055 (license license:bsd-3)))
14056
14057(define-public python2-funcy
14058 (package-with-python2 python-funcy))
14059
14060(define-public python-isoweek
14061 (package
14062 (name "python-isoweek")
14063 (version "1.3.3")
14064 (source
14065 (origin
14066 (method url-fetch)
14067 (uri (pypi-uri "isoweek" version))
14068 (sha256
14069 (base32
14070 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
14071 (build-system python-build-system)
14072 (home-page "https://github.com/gisle/isoweek")
14073 (synopsis "Objects representing a week")
14074 (description "The @code{isoweek} module provide the class Week that
14075implements the week definition of ISO 8601. This standard also defines
14076a notation for identifying weeks; yyyyWww (where the W is a literal).
14077Week instances stringify to this form.")
14078 (license license:bsd-3)))
14079
14080(define-public python2-isoweek
14081 (package-with-python2 python-isoweek))
14082
14083(define-public python-tokenize-rt
14084 (package
14085 (name "python-tokenize-rt")
14086 (version "2.0.1")
14087 (source
14088 (origin
14089 (method url-fetch)
14090 (uri (pypi-uri "tokenize-rt" version))
14091 (sha256
14092 (base32
14093 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
14094 (build-system python-build-system)
14095 (home-page "https://github.com/asottile/tokenize-rt")
14096 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
14097 (description
14098 "This Python library is a wrapper around @code{tokenize} from the Python
14099standard library. It provides two additional tokens @code{ESCAPED_NL} and
14100@code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
14101and @code{tokens_to_src} to roundtrip.")
14102 (license license:expat)))
14103
14104(define-public python-future-fstrings
14105 (package
14106 (name "python-future-fstrings")
14107 (version "0.4.1")
14108 (source
14109 (origin
14110 (method url-fetch)
14111 (uri (pypi-uri "future_fstrings" version))
14112 (sha256
14113 (base32
14114 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
14115 (build-system python-build-system)
14116 (propagated-inputs
14117 `(("python-tokenize-rt" ,python-tokenize-rt)))
14118 (home-page "https://github.com/asottile/future-fstrings")
14119 (synopsis "Backport of fstrings to Python < 3.6")
14120 (description
14121 "This package provides a UTF-8 compatible encoding
14122@code{future_fstrings}, which performs source manipulation. It decodes the
14123source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
14124@code{f} strings.")
14125 (license license:expat)))
14126
14127(define-public python-typing
14128 (package
14129 (name "python-typing")
14130 (version "3.6.6")
14131 (source
14132 (origin
14133 (method url-fetch)
14134 (uri (pypi-uri "typing" version))
14135 (sha256
14136 (base32
14137 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
14138 (build-system python-build-system)
14139 (home-page "https://docs.python.org/3/library/typing.html")
14140 (synopsis "Type hints for Python")
14141 (description "This is a backport of the standard library @code{typing}
14142module to Python versions older than 3.5. Typing defines a standard notation
14143for Python function and variable type annotations. The notation can be used
14144for documenting code in a concise, standard format, and it has been designed
14145to also be used by static and runtime type checkers, static analyzers, IDEs
14146and other tools.")
14147 (license license:psfl)))
14148
14149(define-public python2-typing
14150 (package-with-python2 python-typing))
14151
f89d443b
VC
14152(define-public python-typing-extensions
14153 (package
14154 (name "python-typing-extensions")
14155 (version "3.7.2")
14156 (source
14157 (origin
14158 (method url-fetch)
14159 (uri (pypi-uri "typing_extensions" version))
14160 (sha256
14161 (base32
14162 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
14163 (build-system python-build-system)
14164 (home-page
14165 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
14166 (synopsis "Experimental type hints for Python")
14167 (description
14168 "The typing_extensions module contains additional @code{typing} hints not
14169yet present in the of the @code{typing} standard library.
14170Included are implementations of:
14171@enumerate
14172@item ClassVar
14173@item ContextManager
14174@item Counter
14175@item DefaultDict
14176@item Deque
14177@item NewType
14178@item NoReturn
14179@item overload
14180@item Protocol
14181@item runtime
14182@item Text
14183@item Type
14184@item TYPE_CHECKING
14185@item AsyncGenerator
14186@end enumerate\n")
14187 (license license:psfl)))
14188
44d10b1f
RW
14189(define-public bpython
14190 (package
14191 (name "bpython")
14192 (version "0.17.1")
14193 (source
14194 (origin
14195 (method url-fetch)
14196 (uri (pypi-uri "bpython" version))
14197 (sha256
14198 (base32
14199 "0bxhxi5zxdkrf8b4gwn0d363kdz3qnypjwhm1aydki53ph8ca1w9"))))
14200 (build-system python-build-system)
14201 (arguments
14202 `(#:phases
14203 (modify-phases %standard-phases
14204 (add-after 'unpack 'remove-failing-test
14205 (lambda _
14206 ;; Remove failing test. FIXME: make it pass
14207 (delete-file "bpython/test/test_args.py")
14208 #t))
14209 (add-after 'wrap 'add-aliases
14210 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
14211 (lambda* (#:key outputs #:allow-other-keys)
14212 (let ((out (assoc-ref outputs "out")))
14213 (for-each
14214 (lambda (old new)
14215 (symlink old (string-append out "/bin/" new)))
14216 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
14217 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
14218 #t)))))
14219 (propagated-inputs
14220 `(("python-pygments" ,python-pygments)
14221 ("python-requests" ,python-requests)
14222 ("python-babel" ,python-babel) ; optional, for internationalization
14223 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
14224 ("python-greenlet" ,python-greenlet)
14225 ("python-urwid" ,python-urwid) ; for bpython-urwid only
14226 ("python-six" ,python-six)))
14227 (native-inputs
14228 `(("python-sphinx" ,python-sphinx)
14229 ("python-mock" ,python-mock)))
14230 (home-page "https://bpython-interpreter.org/")
14231 (synopsis "Fancy interface to the Python interpreter")
14232 (description "Bpython is a fancy interface to the Python
14233interpreter. bpython's main features are
14234
14235@enumerate
14236@item in-line syntax highlighting,
14237@item readline-like autocomplete with suggestions displayed as you type,
14238@item expected parameter list for any Python function,
14239@item \"rewind\" function to pop the last line of code from memory and
14240 re-evaluate,
14241@item send the code you've entered off to a pastebin,
14242@item save the code you've entered to a file, and
14243@item auto-indentation.
14244@end enumerate")
14245 (license license:expat)))
14246
14247(define-public bpython2
14248 (let ((base (package-with-python2
14249 (strip-python2-variant bpython))))
14250 (package (inherit base)
14251 (name "bpython2")
14252 (arguments
14253 `(#:python ,python-2
14254 #:phases
14255 (modify-phases %standard-phases
14256 (add-after 'unpack 'remove-failing-test
14257 (lambda _
14258 ;; Remove failing test. FIXME: make it pass
14259 (delete-file "bpython/test/test_args.py")
14260 ;; Disable failing test-cases (renaming inhibits they are
14261 ;; discovered)
14262 (substitute* "bpython/test/test_curtsies_repl.py"
14263 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
14264 (string-append a "xxx_off_" b))
14265 (("^(\\s*def )(test_complex\\W)" _ a b)
14266 (string-append a "xxx_off_" b)))
14267 #t))
14268 (add-before 'build 'rename-scripts
14269 ;; rename the scripts to bypthon2, bpdb2, etc.
14270 (lambda _
14271 (substitute* "setup.py"
14272 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
14273 (string-append name "2" rest "\n"))
14274 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
14275 (string-append name "2" (or sub "") rest "\n")))
14276 #t))))))))
14277
14278(define-public python-pyinotify
14279 (package
14280 (name "python-pyinotify")
14281 (version "0.9.6")
14282 (source (origin
14283 (method url-fetch)
14284 (uri (pypi-uri "pyinotify" version))
14285 (sha256
14286 (base32
14287 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
14288 (build-system python-build-system)
14289 (arguments `(#:tests? #f)) ;no tests
14290 (home-page "https://github.com/seb-m/pyinotify")
14291 (synopsis "Python library for monitoring inotify events")
14292 (description
14293 "@code{pyinotify} provides a Python interface for monitoring
14294file system events on Linux.")
14295 (license license:expat)))
14296
14297(define-public python2-pyinotify
14298 (package-with-python2 python-pyinotify))
14299
14300;; Ada parser uses this version.
14301(define-public python2-quex-0.67.3
14302 (package
14303 (name "python2-quex")
14304 (version "0.67.3")
14305 (source
14306 (origin
14307 (method url-fetch)
14308 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
14309 (version-major+minor version)
14310 "/quex-" version ".zip"))
14311 (sha256
14312 (base32
14313 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
14314 (build-system python-build-system)
14315 (native-inputs
14316 `(("unzip" ,unzip)))
14317 (arguments
14318 `(#:python ,python-2
14319 #:tests? #f
14320 #:phases
14321 (modify-phases %standard-phases
14322 (delete 'configure)
14323 (delete 'build)
14324 (replace 'install
14325 (lambda* (#:key outputs #:allow-other-keys)
14326 (let* ((out (assoc-ref outputs "out"))
14327 (share/quex (string-append out "/share/quex"))
14328 (bin (string-append out "/bin")))
14329 (copy-recursively "." share/quex)
14330 (mkdir-p bin)
14331 (symlink (string-append share/quex "/quex-exe.py")
14332 (string-append bin "/quex"))
14333 #t))))))
14334 (native-search-paths
14335 (list (search-path-specification
14336 (variable "QUEX_PATH")
14337 (files '("share/quex")))))
14338 (home-page "http://quex.sourceforge.net/")
14339 (synopsis "Lexical analyzer generator in Python")
14340 (description "@code{quex} is a lexical analyzer generator in Python.")
14341 (license license:lgpl2.1+))) ; Non-military
14342
14343(define-public python2-quex
14344 (package (inherit python2-quex-0.67.3)
14345 (name "python2-quex")
14346 (version "0.68.1")
14347 (source
14348 (origin
14349 (method url-fetch)
14350 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
14351 (sha256
14352 (base32
14353 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
14354 (file-name (string-append name "-" version ".tar.gz"))))))
14355
14356(define-public python-more-itertools
14357 (package
14358 (name "python-more-itertools")
14359 (version "4.3.0")
14360 (source
14361 (origin
14362 (method url-fetch)
14363 (uri (pypi-uri "more-itertools" version))
14364 (sha256
14365 (base32
14366 "17h3na0rdh8xq30w4b9pizgkdxmm51896bxw600x84jflg9vaxn4"))))
14367 (build-system python-build-system)
14368 (arguments
14369 `(,@(if (any (cute string-prefix? <> (or (%current-system)
14370 (%current-target-system)))
14371 '("armhf" "i686"))
14372 '(#:phases
14373 (modify-phases %standard-phases
14374 ;; This is required for 32-bit hardware.
14375 ;; TODO: Try to remove this when upgrading.
14376 (add-after 'unpack 'patch-test
14377 (lambda _
14378 (substitute* "more_itertools/tests/test_more.py"
14379 (("10 \\*\\* 10") "9 ** 9"))
14380 #t))))
14381 '())))
14382 (propagated-inputs
14383 `(("python-six" ,python-six-bootstrap)))
14384 (home-page "https://github.com/erikrose/more-itertools")
14385 (synopsis "More routines for operating on iterables, beyond itertools")
14386 (description "Python's built-in @code{itertools} module implements a
14387number of iterator building blocks inspired by constructs from APL, Haskell,
14388and SML. @code{more-itertools} includes additional building blocks for
14389working with iterables.")
14390 (license license:expat)))
14391
14392(define-public python2-more-itertools
14393 (package-with-python2 python-more-itertools))
14394
14395(define-public python-latexcodec
14396 (package
14397 (name "python-latexcodec")
91b61f02 14398 (version "1.0.6")
44d10b1f
RW
14399 (source
14400 (origin
14401 (method url-fetch)
14402 (uri (pypi-uri "latexcodec" version))
14403 (sha256
91b61f02 14404 (base32 "0s4wdbg0w2l8pj3i0y4510i0s04p8nhxcsa2z41bjsv0k66npb81"))))
44d10b1f
RW
14405 (build-system python-build-system)
14406 (inputs
14407 `(("python-six" ,python-six)))
14408 (home-page "https://readthedocs.org/projects/latexcodec/")
14409 (synopsis "Work with LaTeX code in Python")
14410 (description "Lexer and codec to work with LaTeX code in Python.")
14411 (license license:expat)))
14412
14413(define-public python-pybtex
14414 (package
14415 (name "python-pybtex")
14416 (version "0.21")
14417 (source
14418 (origin
14419 (method url-fetch)
14420 (uri (pypi-uri "pybtex" version))
14421 (sha256
14422 (base32
14423 "00300j8dn5pxq4ndxmfmbmycg2znawkqs49val2x6jlmfiy6r2mg"))))
14424 (build-system python-build-system)
14425 (native-inputs
14426 `(("python-nose" ,python-nose)))
14427 (inputs
14428 `(("python-latexcodec" ,python-latexcodec)
14429 ("python-pyyaml" ,python-pyyaml)
14430 ("python-six" ,python-six)))
14431 (arguments
14432 `(#:test-target "nosetests"))
14433 (home-page "https://pybtex.org/")
14434 (synopsis "BibTeX-compatible bibliography processor")
14435 (description "Pybtex is a BibTeX-compatible bibliography processor written
14436in Python. You can simply type pybtex instead of bibtex.")
14437 (license license:expat)))
14438
14439(define-public python-onetimepass
14440 (package
14441 (name "python-onetimepass")
14442 (version "1.0.1")
14443 (source
14444 (origin
14445 (method url-fetch)
14446 (uri (pypi-uri "onetimepass" version))
14447 (sha256
14448 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
14449 (build-system python-build-system)
14450 (propagated-inputs `(("python-six" ,python-six)))
14451 (home-page "https://github.com/tadeck/onetimepass/")
14452 (synopsis "One-time password library")
14453 (description "Python one-time password library for HMAC-based (HOTP) and
14454time-based (TOTP) passwords.")
14455 (license license:expat)))
14456
14457(define-public python-parso
14458 (package
14459 (name "python-parso")
14460 (version "0.3.1")
14461 (source
14462 (origin
14463 (method url-fetch)
14464 (uri (pypi-uri "parso" version))
14465 (sha256
14466 (base32
14467 "18p89iwcm8mnf380f92g9w0bhx5km8wxp392vvjcq4y1ld1llw1m"))))
14468 (native-inputs
14469 `(("python-pytest" ,python-pytest)))
14470 (build-system python-build-system)
14471 (home-page "https://github.com/davidhalter/parso")
14472 (synopsis "Python Parser")
14473 (description "Parso is a Python parser that supports error recovery and
14474round-trip parsing for different Python versions (in multiple Python versions).
14475Parso is also able to list multiple syntax errors in your Python file.")
14476 (license license:expat)))
14477
14478(define-public python2-parso
14479 (package-with-python2 python-parso))
14480
14481(define-public python-async-generator
14482 (package
14483 (name "python-async-generator")
94fcbf8d 14484 (version "1.10")
44d10b1f
RW
14485 (source
14486 (origin
14487 (method url-fetch)
14488 (uri (pypi-uri "async_generator" version))
14489 (sha256
14490 (base32
94fcbf8d 14491 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
44d10b1f
RW
14492 (build-system python-build-system)
14493 (native-inputs
14494 `(("python-pytest" ,python-pytest)))
14495 (home-page "https://github.com/python-trio/async_generator")
14496 (synopsis "Async generators and context managers for Python 3.5+")
14497 (description "@code{async_generator} back-ports Python 3.6's native async
14498generators and Python 3.7's context managers into Python 3.5.")
14499 ;; Dual licensed.
14500 (license (list license:expat license:asl2.0))))
14501
14502(define-public python-async-timeout
14503 (package
14504 (name "python-async-timeout")
14505 (version "3.0.1")
14506 (source
14507 (origin
14508 (method url-fetch)
14509 (uri (pypi-uri "async-timeout" version))
14510 (sha256
14511 (base32
14512 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
14513 (build-system python-build-system)
14514 (home-page "https://github.com/aio-libs/async_timeout/")
14515 (synopsis "Timeout context manager for asyncio programs")
14516 (description "@code{async-timeout} provides a timeout timeout context
14517manager compatible with @code{asyncio}.")
14518 (license license:asl2.0)))
14519
14520(define-public python-glob2
14521 (package
14522 (name "python-glob2")
14523 (version "0.6")
8fa2bcc7
TGR
14524 (source
14525 (origin
14526 (method git-fetch)
14527 (uri (git-reference
14528 (url "https://github.com/miracle2k/python-glob2.git")
14529 (commit version)))
14530 (file-name (git-file-name name version))
14531 (sha256
14532 (base32 "1lm1xz3k3l0k1c5bcp9hlzmi3gp5j8dl1k3xhpiq5mnm0xq6n163"))))
44d10b1f
RW
14533 (build-system python-build-system)
14534 (home-page "https://github.com/miracle2k/python-glob2/")
14535 (synopsis "Extended Version of the python buildin glob module")
14536 (description "This is an extended version of the Python
14537@url{http://docs.python.org/library/glob.html, built-in glob module} which
14538adds:
14539
14540@itemize
14541@item The ability to capture the text matched by glob patterns, and return
14542those matches alongside the file names.
14543@item A recursive @code{**} globbing syntax, akin for example to the
14544@code{globstar} option of Bash.
14545@item The ability to replace the file system functions used, in order to glob
14546on virtual file systems.
14547@item Compatible with Python 2 and Python 3 (tested with 3.3).
14548@end itemize
14549
14550Glob2 currently based on the glob code from Python 3.3.1.")
14551 (license license:bsd-2)))
14552
14553(define-public python2-glob2
14554 (package-with-python2 python-glob2))
14555
14556(define-public python-gipc
14557 (package
14558 (name "python-gipc")
14559 (version "0.6.0")
14560 (source
14561 (origin
14562 (method url-fetch)
14563 (uri (pypi-uri "gipc" version ".zip"))
14564 (sha256
14565 (base32
14566 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
14567 (build-system python-build-system)
14568 (native-inputs
14569 `(("unzip" ,unzip)))
14570 (propagated-inputs
14571 `(("python-gevent" ,python-gevent)))
14572 (home-page "http://gehrcke.de/gipc")
14573 (synopsis "Child process management in the context of gevent")
14574 (description "Usage of Python's multiprocessing package in a
14575gevent-powered application may raise problems. With @code{gipc},
14576process-based child processes can safely be created anywhere within a
14577gevent-powered application.")
14578 (license license:expat)))
14579
14580(define-public python2-gipc
14581 (package-with-python2 python-gipc))
14582
14583(define-public python-fusepy
14584 (package
14585 (name "python-fusepy")
14586 (version "2.0.4")
14587 (source
14588 (origin
14589 (method url-fetch)
14590 (uri (pypi-uri "fusepy" version))
14591 (sha256
14592 (base32
14593 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
14594 (build-system python-build-system)
14595 (arguments
14596 `(#:phases
14597 (modify-phases %standard-phases
14598 (add-before 'build 'set-library-file-name
14599 (lambda* (#:key inputs #:allow-other-keys)
14600 (let ((fuse (assoc-ref inputs "fuse")))
14601 (substitute* "fuse.py"
14602 (("find_library\\('fuse'\\)")
14603 (string-append "'" fuse "/lib/libfuse.so'")))
14604 #t))))))
14605 (propagated-inputs
14606 `(("fuse" ,fuse)))
14607 (home-page "https://github.com/fusepy/fusepy")
14608 (synopsis "Simple ctypes bindings for FUSE")
14609 (description "Python module that provides a simple interface to FUSE and
14610MacFUSE. The binding is created using the standard @code{ctypes} library.")
14611 (license license:isc)))
14612
14613(define-public python2-fusepy
14614 (package-with-python2 python-fusepy))
14615
14616(define-public python2-gdrivefs
14617 (package
14618 (name "python2-gdrivefs")
14619 (version "0.14.9")
14620 (source
14621 (origin
14622 (method url-fetch)
14623 (uri (pypi-uri "gdrivefs" version))
14624 (sha256
14625 (base32
14626 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
14627 (build-system python-build-system)
14628 (arguments
14629 `(#:python ,python-2
14630 #:phases
14631 (modify-phases %standard-phases
14632 (add-before 'build 'patch-setup-py
14633 (lambda _
14634 ;; Update requirements from dependency==version
14635 ;; to dependency>=version
14636 (substitute* "gdrivefs/resources/requirements.txt"
14637 (("==") ">="))
14638 #t)))))
14639 (native-inputs
14640 `(("python2-gipc" ,python2-gipc)
14641 ("python2-gevent" ,python2-gevent)
14642 ("python2-greenlet" ,python2-greenlet)
14643 ("python2-httplib2" ,python2-httplib2)
14644 ("python2-uritemplate" ,python2-uritemplate)
14645 ("python2-oauth2client" ,python2-oauth2client)
14646 ("python2-six" ,python2-six)))
14647 (propagated-inputs
14648 `(("python2-dateutil" ,python2-dateutil)
14649 ("python2-fusepy" ,python2-fusepy)
14650 ("python2-google-api-client" ,python2-google-api-client)))
14651 (home-page "https://github.com/dsoprea/GDriveFS")
14652 (synopsis "Mount Google Drive as a local file system")
14653 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
14654under Python 2.7.")
14655 (license license:gpl2)))
14656
14657(define-public pybind11
14658 (package
14659 (name "pybind11")
14660 (version "2.2.4")
14661 (source (origin
14662 (method git-fetch)
14663 (uri (git-reference
14664 (url "https://github.com/pybind/pybind11.git")
14665 (commit (string-append "v" version))))
14666 (sha256
14667 (base32
14668 "0pa79ymcasv8br5ifbx7878id5py2jpjac3i20cqxr6gs9l6ivlv"))
14669 (file-name (git-file-name name version))))
14670 (build-system cmake-build-system)
14671 (native-inputs
14672 `(("python" ,python)
14673 ("python-pytest" ,python-pytest)))
14674 (arguments
14675 `(#:test-target "check"))
14676 (home-page "https://github.com/pybind/pybind11/")
14677 (synopsis "Seamless operability between C++11 and Python")
14678 (description "pybind11 is a lightweight header-only library that exposes
14679C++ types in Python and vice versa, mainly to create Python bindings of
14680existing C++ code. Its goals and syntax are similar to the excellent
14681Boost.Python library by David Abrahams: to minimize boilerplate code in
14682traditional extension modules by inferring type information using compile-time
14683introspection.")
14684 (license license:expat)))
14685
14686(define-public python-fasteners
14687 (package
14688 (name "python-fasteners")
14689 (version "0.14.1")
14690 (source
14691 (origin
14692 (method url-fetch)
14693 (uri (pypi-uri "fasteners" version))
14694 (sha256
14695 (base32
14696 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
14697 (build-system python-build-system)
14698 (propagated-inputs
14699 `(("python-monotonic" ,python-monotonic)
14700 ("python-six" ,python-six)
14701 ("python-testtools" ,python-testtools)))
14702 (home-page "https://github.com/harlowja/fasteners")
14703 (synopsis "Python package that provides useful locks")
14704 (description
14705 "This package provides a Python program that provides following locks:
14706
14707@itemize
14708@item Locking decorator
14709@item Reader-writer locks
14710@item Inter-process locks
14711@item Generic helpers
14712@end itemize\n")
14713 (properties `((python2-variant . ,(delay python2-fasteners))))
14714 (license license:asl2.0)))
14715
14716(define-public python2-fasteners
14717 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
14718 (package
14719 (inherit base)
14720 (propagated-inputs
14721 `(("python2-futures" ,python2-futures)
14722 ,@(package-propagated-inputs base))))))
14723
14724(define-public python-requests-file
14725 (package
14726 (name "python-requests-file")
14727 (version "1.4.3")
14728 (source
14729 (origin
14730 (method url-fetch)
14731 (uri (pypi-uri "requests-file" version))
14732 (sha256
14733 (base32
14734 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
14735 (build-system python-build-system)
14736 (propagated-inputs
14737 `(("python-requests" ,python-requests)
14738 ("python-six" ,python-six)))
14739 (home-page
14740 "https://github.com/dashea/requests-file")
14741 (synopsis "File transport adapter for Requests")
14742 (description
14743 "Requests-File is a transport adapter for use with the Requests Python
52beae7b 14744library to allow local file system access via @code{file://} URLs.")
44d10b1f
RW
14745 (license license:asl2.0)))
14746
14747(define-public python2-requests-file
14748 (package-with-python2 python-requests-file))
14749
14750(define-public python-tldextract
14751 (package
14752 (name "python-tldextract")
14753 (version "2.2.0")
14754 (source
14755 (origin
14756 (method url-fetch)
14757 (uri (pypi-uri "tldextract" version))
14758 (sha256
14759 (base32
14760 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
14761 (build-system python-build-system)
14762 (native-inputs
14763 `(("python-pytest" ,python-pytest)
14764 ("python-responses" ,python-responses)))
14765 (propagated-inputs
14766 `(("python-idna" ,python-idna)
14767 ("python-requests" ,python-requests)
14768 ("python-requests-file" ,python-requests-file)))
14769 (home-page
14770 "https://github.com/john-kurkowski/tldextract")
14771 (synopsis
14772 "Separate the TLD from the registered domain and subdomains of a URL")
14773 (description
14774 "TLDExtract accurately separates the TLD from the registered domain and
14775subdomains of a URL, using the Public Suffix List. By default, this includes
14776the public ICANN TLDs and their exceptions. It can optionally support the
14777Public Suffix List's private domains as well.")
14778 (license license:bsd-3)))
14779
14780(define-public python2-tldextract
14781 (package-with-python2 python-tldextract))
14782
14783(define-public python-pynamecheap
14784 (package
14785 (name "python-pynamecheap")
14786 (version "0.0.3")
14787 (source
14788 (origin
14789 (method url-fetch)
14790 (uri (pypi-uri "PyNamecheap" version))
14791 (sha256
14792 (base32
14793 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
14794 (build-system python-build-system)
14795 (propagated-inputs
14796 `(("python-requests" ,python-requests)))
14797 (home-page
14798 "https://github.com/Bemmu/PyNamecheap")
14799 (synopsis
14800 "Namecheap API client in Python")
14801 (description
14802 "PyNamecheap is a Namecheap API client in Python.")
14803 (license license:expat)))
14804
14805(define-public python2-pynamecheap
14806 (package-with-python2 python-pynamecheap))
14807
14808(define-public python-dns-lexicon
14809 (package
14810 (name "python-dns-lexicon")
14811 (version "2.4.0")
14812 (source
14813 (origin
14814 (method url-fetch)
14815 (uri (pypi-uri "dns-lexicon" version))
14816 (sha256
14817 (base32
14818 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
14819 (build-system python-build-system)
14820 (arguments
14821 `(#:tests? #f)) ;requires internet access
14822 (propagated-inputs
14823 `(("python-future" ,python-future)
14824 ("python-pynamecheap" ,python-pynamecheap)
14825 ("python-requests" ,python-requests)
14826 ("python-tldextract" ,python-tldextract)
14827 ("python-urllib3" ,python-urllib3)))
14828 (home-page "https://github.com/AnalogJ/lexicon")
14829 (synopsis
14830 "Manipulate DNS records on various DNS providers")
14831 (description
14832 "Lexicon provides a way to manipulate DNS records on multiple DNS
14833providers in a standardized way. It has a CLI but it can also be used as a
14834Python library. It was designed to be used in automation, specifically with
14835Let's Encrypt.")
14836 (license license:expat)))
14837
14838(define-public python2-dns-lexicon
14839 (package-with-python2 python-dns-lexicon))
14840
14841(define-public python-commandlines
14842 (package
14843 (name "python-commandlines")
14844 (version "0.4.1")
14845 (source
14846 (origin
14847 (method url-fetch)
14848 (uri (pypi-uri "commandlines" version))
14849 (sha256
14850 (base32
14851 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
14852 (build-system python-build-system)
14853 (home-page "https://github.com/chrissimpkins/commandlines")
14854 (synopsis "Command line argument to object parsing library")
14855 (description
14856 "@code{Commandlines} is a Python library for command line application
14857development that supports command line argument parsing, command string
14858validation testing and application logic.")
14859 (license license:expat)))
14860
14861;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
14862;; python-numba. They have a very unflexible relationship.
14863(define-public python-numba
14864 (package
14865 (name "python-numba")
7757e6d8 14866 (version "0.42.0")
44d10b1f
RW
14867 (source
14868 (origin
14869 (method url-fetch)
14870 (uri (pypi-uri "numba" version))
14871 (sha256
14872 (base32
7757e6d8 14873 "03rqdfx0512lcri2bcpngx5k3jwfbqnanqj3n19c7d6h6hqxvq9x"))))
44d10b1f
RW
14874 (build-system python-build-system)
14875 (arguments
14876 `(#:modules ((guix build utils)
14877 (guix build python-build-system)
14878 (ice-9 ftw)
14879 (srfi srfi-1)
14880 (srfi srfi-26))
14881 #:phases
14882 (modify-phases %standard-phases
14883 (add-after 'unpack 'disable-proprietary-features
14884 (lambda _
14885 (setenv "NUMBA_DISABLE_HSA" "1")
14886 (setenv "NUMBA_DISABLE_CUDA" "1")
14887 #t))
14888 (add-after 'unpack 'remove-failing-tests
14889 (lambda _
14890 ;; FIXME: these tests fail for unknown reasons:
14891 ;; test_non_writable_pycache, test_non_creatable_pycache, and
14892 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
14893 (substitute* "numba/tests/test_dispatcher.py"
14894 (("def test(_non_writable_pycache)" _ m)
14895 (string-append "def guix_skip" m))
14896 (("def test(_non_creatable_pycache)" _ m)
14897 (string-append "def guix_skip" m))
14898 (("def test(_frozen)" _ m)
14899 (string-append "def guix_skip" m)))
14900
14901 ;; These tests fail because we don't run the tests from the build
14902 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
14903 ;; They ar in numba.tests.test_pycc.TestDistutilsSupport.
14904 (substitute* "numba/tests/test_pycc.py"
14905 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
14906 (string-append "def guix_skip" m)))
14907 #t))
14908 (replace 'check
14909 (lambda _
14910 (let ((cwd (getcwd)))
14911 (setenv "PYTHONPATH"
14912 (string-append cwd "/build/"
14913 (find (cut string-prefix? "lib" <>)
14914 (scandir (string-append cwd "/build")))
14915 ":"
14916 (getenv "PYTHONPATH")))
14917 ;; Something is wrong with the PYTHONPATH when running the
14918 ;; tests from the build directory, as it complains about not being
14919 ;; able to import certain modules.
14920 (with-directory-excursion "/tmp"
14921 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
14922 #t)))))
14923 (propagated-inputs
14924 `(("python-llvmlite" ,python-llvmlite)
14925 ("python-numpy" ,python-numpy)
14926 ("python-singledispatch" ,python-singledispatch)))
14927 ;; Needed for tests.
14928 (inputs
14929 `(("python-jinja2" ,python-jinja2)
14930 ("python-pygments" ,python-pygments)))
14931 (home-page "https://numba.pydata.org")
14932 (synopsis "Compile Python code using LLVM")
14933 (description "Numba gives you the power to speed up your applications with
14934high performance functions written directly in Python. With a few
14935annotations, array-oriented and math-heavy Python code can be just-in-time
14936compiled to native machine instructions, similar in performance to C, C++ and
14937Fortran, without having to switch languages or Python interpreters.
14938
14939Numba works by generating optimized machine code using the LLVM compiler
14940infrastructure at import time, runtime, or statically (using the included pycc
14941tool).")
14942 (license license:bsd-3)))
14943
14944(define-public python-anndata
14945 (package
14946 (name "python-anndata")
8c9372c1 14947 (version "0.6.18")
44d10b1f
RW
14948 (source
14949 (origin
14950 (method url-fetch)
14951 (uri (pypi-uri "anndata" version))
14952 (sha256
14953 (base32
8c9372c1 14954 "03x83yjaccbqszj7x4fwwmpil0ai59yx64d1zmf2691za3j03w73"))))
44d10b1f
RW
14955 (build-system python-build-system)
14956 (propagated-inputs
14957 `(("python-h5py" ,python-h5py)
14958 ("python-natsort" ,python-natsort)
14959 ("python-pandas" ,python-pandas)
14960 ("python-scipy" ,python-scipy)))
14961 (home-page "https://github.com/theislab/anndata")
14962 (synopsis "Annotated data for data analysis pipelines")
14963 (description "Anndata is a package for simple (functional) high-level APIs
14964for data analysis pipelines. In this context, it provides an efficient,
14965scalable way of keeping track of data together with learned annotations and
14966reduces the code overhead typically encountered when using a mostly
14967object-oriented library such as @code{scikit-learn}.")
14968 (license license:bsd-3)))
14969
14970(define-public python-dill
14971 (package
14972 (name "python-dill")
c60b15cc 14973 (version "0.2.9")
44d10b1f
RW
14974 (source
14975 (origin
14976 (method url-fetch)
14977 (uri (pypi-uri "dill" version))
14978 (sha256
c60b15cc 14979 (base32 "0vwqyi6hyz2r29zydc78dqymkbc5y7gia16xcdh215cikxph9mpn"))))
44d10b1f 14980 (build-system python-build-system)
c60b15cc 14981 ;; FIXME: The check phase fails with "don't know how to make test from: …".
44d10b1f
RW
14982 (arguments '(#:tests? #f))
14983 (home-page "https://pypi.org/project/dill")
14984 (synopsis "Serialize all of Python")
14985 (description "Dill extends Python's @code{pickle} module for serializing
14986and de-serializing Python objects to the majority of the built-in Python
14987types. Dill provides the user the same interface as the @code{pickle} module,
14988and also includes some additional features. In addition to pickling Python
14989objects, @code{dill} provides the ability to save the state of an interpreter
61985d65 14990session in a single command. Hence, it would be feasible to save a
44d10b1f
RW
14991interpreter session, close the interpreter, ship the pickled file to another
14992computer, open a new interpreter, unpickle the session and thus continue from
14993the saved state of the original interpreter session.")
14994 (license license:bsd-3)))
14995
14996(define-public python-multiprocess
14997 (package
14998 (name "python-multiprocess")
14999 (version "0.70.6.1")
15000 (source
15001 (origin
15002 (method url-fetch)
15003 (uri (pypi-uri "multiprocess" version))
15004 (sha256
15005 (base32
15006 "1ip5caz67b3q0553mr8gm8xwsb8x500jn8ml0gihgyfy52m2ypcq"))))
15007 (build-system python-build-system)
15008 (propagated-inputs
15009 `(("python-dill" ,python-dill)))
15010 (home-page "https://pypi.org/project/multiprocess")
15011 (synopsis "Multiprocessing and multithreading in Python")
15012 (description
15013 "This package is a fork of the multiprocessing Python package, a package
15014which supports the spawning of processes using the API of the standard
15015library's @code{threading} module.")
15016 (license license:bsd-3)))
15017
15018(define-public python-toolz
15019 (package
15020 (name "python-toolz")
15021 (version "0.9.0")
15022 (source
15023 (origin
15024 (method url-fetch)
15025 (uri (pypi-uri "toolz" version))
15026 (sha256
15027 (base32
15028 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
15029 (build-system python-build-system)
15030 ;; FIXME: tests cannot be computed: "Can't perform this operation for
15031 ;; unregistered loader type"
15032 (arguments '(#:tests? #f))
15033 (home-page "https://github.com/pytoolz/toolz/")
15034 (synopsis "List processing tools and functional utilities")
15035 (description
15036 "This package provides a set of utility functions for iterators,
15037functions, and dictionaries.")
15038 (license license:bsd-3)))
15039
15040(define-public python2-toolz
15041 (package-with-python2 python-toolz))
15042
15043(define-public python-cytoolz
15044 (package
15045 (name "python-cytoolz")
15046 (version "0.9.0.1")
15047 (source
15048 (origin
15049 (method url-fetch)
15050 (uri (pypi-uri "cytoolz" version))
15051 (sha256
15052 (base32
15053 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
15054 (build-system python-build-system)
15055 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
15056 ;; 'exceptions'"
15057 (arguments '(#:tests? #f))
15058 (propagated-inputs
15059 `(("python-toolz" ,python-toolz)))
15060 (native-inputs
15061 `(("python-cython" ,python-cython)))
15062 (home-page "https://github.com/pytoolz/cytoolz")
15063 (synopsis "High performance functional utilities")
15064 (description
15065 "The cytoolz package implements the same API as provided by toolz. The
15066main differences are that @code{cytoolz} is faster and cytoolz offers a C API
15067that is accessible to other projects developed in Cython.")
15068 (license license:bsd-3)))
15069
15070(define-public python-sortedcontainers
15071 (package
15072 (name "python-sortedcontainers")
15073 (version "2.0.4")
15074 (source
15075 (origin
15076 (method url-fetch)
15077 (uri (pypi-uri "sortedcontainers" version))
15078 (sha256
15079 (base32
15080 "10hrk2k0hbf9x78vd3f0lj277m1yzfhzzxr0hja718liwb398wk0"))))
15081 (build-system python-build-system)
15082 (native-inputs
15083 `(("python-tox" ,python-tox)))
15084 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
15085 (synopsis "Sorted List, Sorted Dict, Sorted Set")
15086 (description
15087 "This package provides a sorted collections library, written in
15088pure-Python.")
15089 (license license:asl2.0)))
15090
15091(define-public python-cloudpickle
15092 (package
15093 (name "python-cloudpickle")
15094 (version "0.6.1")
15095 (source
15096 (origin
15097 (method url-fetch)
15098 (uri (pypi-uri "cloudpickle" version))
15099 (sha256
15100 (base32
15101 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
15102 (build-system python-build-system)
15103 ;; FIXME: there are 5 errors in 122 tests:
15104 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
15105 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
15106 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15107 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15108 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
15109 ;; TypeError: cannot serialize '_io.BufferedRandom' object
15110 (arguments '(#:tests? #f))
15111 (native-inputs
15112 `(("python-pytest" ,python-pytest)
15113 ("python-mock" ,python-mock)
15114 ("python-tornado" ,python-tornado)))
15115 (home-page "https://github.com/cloudpipe/cloudpickle")
15116 (synopsis "Extended pickling support for Python objects")
15117 (description
15118 "Cloudpickle makes it possible to serialize Python constructs not
15119supported by the default pickle module from the Python standard library. It
15120is especially useful for cluster computing where Python expressions are
15121shipped over the network to execute on remote hosts, possibly close to the
15122data.")
15123 (license license:bsd-3)))
15124
15125(define-public python2-cloudpickle
15126 (package-with-python2 python-cloudpickle))
15127
15128(define-public python-locket
15129 (package
15130 (name "python-locket")
15131 (version "0.2.0")
15132 (source
15133 (origin
15134 (method url-fetch)
15135 (uri (pypi-uri "locket" version))
15136 (sha256
15137 (base32
15138 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
15139 (build-system python-build-system)
15140 (home-page "https://github.com/mwilliamson/locket.py")
15141 (synopsis "File-based locks for Python")
15142 (description
15143 "Locket implements a lock that can be used by multiple processes provided
15144they use the same path.")
15145 (license license:bsd-2)))
15146
15147(define-public python2-locket
15148 (package-with-python2 python-locket))
15149
15150(define-public python-blosc
15151 (package
15152 (name "python-blosc")
15153 (version "1.5.1")
15154 (source
15155 (origin
15156 (method url-fetch)
15157 (uri (pypi-uri "blosc" version))
15158 (sha256
15159 (base32
15160 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
15161 (build-system python-build-system)
15162 ;; FIXME: all tests pass, but then this error is printed:
15163 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
15164 (arguments '(#:tests? #f))
15165 (propagated-inputs
15166 `(("python-numpy" ,python-numpy)))
15167 (home-page "https://github.com/blosc/python-blosc")
15168 (synopsis "Python wrapper for the Blosc data compressor library")
15169 (description "Blosc is a high performance compressor optimized for binary
15170data. It has been designed to transmit data to the processor cache faster
15171than the traditional, non-compressed, direct memory fetch approach via a
15172@code{memcpy()} system call.
15173
15174Blosc works well for compressing numerical arrays that contains data with
15175relatively low entropy, like sparse data, time series, grids with
15176regular-spaced values, etc.
15177
15178This Python package wraps the Blosc library.")
15179 (license license:bsd-3)))
15180
15181(define-public python2-blosc
15182 (package-with-python2 python-blosc))
15183
15184(define-public python-partd
15185 (package
15186 (name "python-partd")
15187 (version "0.3.9")
15188 (source
15189 (origin
15190 (method url-fetch)
15191 (uri (pypi-uri "partd" version))
15192 (sha256
15193 (base32
15194 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
15195 (build-system python-build-system)
15196 (propagated-inputs
15197 `(("python-blosc" ,python-blosc)
15198 ("python-locket" ,python-locket)
15199 ("python-numpy" ,python-numpy)
15200 ("python-pandas" ,python-pandas)
15201 ("python-pyzmq" ,python-pyzmq)
15202 ("python-toolz" ,python-toolz)))
15203 (home-page "https://github.com/dask/partd/")
15204 (synopsis "Appendable key-value storage")
15205 (description "Partd stores key-value pairs. Values are raw bytes. We
15206append on old values. Partd excels at shuffling operations.")
15207 (license license:bsd-3)))
15208
15209(define-public python2-partd
15210 (package-with-python2 python-partd))
15211
15212(define-public python-dask
15213 (package
15214 (name "python-dask")
75cc5359 15215 (version "1.2.0")
44d10b1f
RW
15216 (source
15217 (origin
15218 (method url-fetch)
15219 (uri (pypi-uri "dask" version))
15220 (sha256
15221 (base32
75cc5359 15222 "1y0dqcp72ixwblgway0jpvfirlxfcmwrjiivdq96firj1hw127sd"))))
44d10b1f
RW
15223 (build-system python-build-system)
15224 ;; A single test out of 5000+ fails. This test is marked as xfail when
15225 ;; pytest-xdist is used.
15226 (arguments
15227 `(#:phases
15228 (modify-phases %standard-phases
15229 (add-after 'unpack 'disable-broken-test
15230 (lambda _
15231 (substitute* "dask/tests/test_threaded.py"
15232 (("def test_interrupt\\(\\)" m)
15233 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15234 m)))
15235 (when (which "python2")
15236 ;; This test fails with recent Pandas:
15237 ;; <https://github.com/dask/dask/issues/3794>.
15238 (substitute* "dask/dataframe/tests/test_dataframe.py"
15239 (("def test_info\\(\\)" m)
15240 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15241 m))))
15242 #t))
15243 (replace 'check
15244 (lambda _ (invoke "pytest" "-vv"))))))
15245 (propagated-inputs
15246 `(("python-cloudpickle" ,python-cloudpickle)
15247 ("python-numpy" ,python-numpy)
15248 ("python-pandas" ,python-pandas)
15249 ("python-partd" ,python-partd)
15250 ("python-toolz" ,python-toolz)
15251 ("python-pyyaml" ,python-pyyaml)))
15252 (native-inputs
15253 `(("python-pytest" ,python-pytest)
15254 ("python-pytest-runner" ,python-pytest-runner)))
15255 (home-page "https://github.com/dask/dask/")
15256 (synopsis "Parallel computing with task scheduling")
15257 (description
15258 "Dask is a flexible parallel computing library for analytics. It
15259consists of two components: dynamic task scheduling optimized for computation,
15260and large data collections like parallel arrays, dataframes, and lists that
15261extend common interfaces like NumPy, Pandas, or Python iterators to
15262larger-than-memory or distributed environments. These parallel collections
15263run on top of the dynamic task schedulers. ")
15264 (license license:bsd-3)))
15265
15266(define-public python2-dask
15267 (package-with-python2 python-dask))
15268
15269(define-public python-ilinkedlist
15270 (package
15271 (name "python-ilinkedlist")
15272 (version "0.4.0")
15273 (source
15274 (origin
15275 (method url-fetch)
15276 (uri (pypi-uri "ilinkedlist" version))
15277 (sha256
15278 (base32
15279 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
15280 (build-system python-build-system)
15281 (native-inputs `(("python-pytest" ,python-pytest)))
15282 (inputs `(("python" ,python)))
15283 (home-page "https://github.com/luther9/ilinkedlist-py")
15284 (synopsis "Immutable linked list library")
15285 (description
15286 "This is a implementation of immutable linked lists for Python. It
15287contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
15288Since a linked list is treated as immutable, it is hashable, and its length
15289can be retrieved in constant time. Some of the terminology is inspired by
15290LISP. It is possible to create an improper list by creating a @code{Pair}
15291with a non-list @code{cdr}.")
15292 (license license:gpl3+)))
15293
15294(define-public python-readlike
15295 (package
15296 (name "python-readlike")
15297 (version "0.1.3")
15298 (source
15299 (origin
15300 (method url-fetch)
15301 (uri (pypi-uri "readlike" version))
15302 (sha256
15303 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
15304 (build-system python-build-system)
15305 (home-page "https://github.com/jangler/readlike")
15306 (synopsis "GNU Readline-like line editing module")
15307 (description
15308 "This Python module provides line editing functions similar to the default
15309Emacs-style ones of GNU Readline. Unlike the Python standard library's
15310@code{readline} package, this one allows access to those capabilties in settings
15311outside of a standard command-line interface. It is especially well-suited to
15312interfacing with Urwid, due to a shared syntax for describing key inputs.
15313
15314Currently, all stateless Readline commands are implemented. Yanking and history
15315are not supported.")
15316 (license license:expat)))
15317
15318(define-public python2-readlike
15319 (package-with-python2 python-readlike))
15320
15321(define-public python-reparser
15322 (package
15323 (name "python-reparser")
15324 (version "1.4.3")
15325 (source
15326 (origin
15327 (method url-fetch)
15328 (uri (pypi-uri "ReParser" version))
15329 (sha256
15330 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
15331 (build-system python-build-system)
15332 (home-page "https://github.com/xmikos/reparser")
15333 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
15334 (description
15335 "This Python library provides a simple lexer/parser for inline markup based
15336on regular expressions.")
15337 (license license:expat)))
15338
15339(define-public python2-reparser
15340 (let ((reparser (package-with-python2
15341 (strip-python2-variant python-reparser))))
15342 (package (inherit reparser)
15343 (propagated-inputs
15344 `(("python2-enum34" ,python2-enum34)
15345 ,@(package-propagated-inputs reparser))))))
15346
15347(define-public python-precis-i18n
15348 (package
15349 (name "python-precis-i18n")
15350 (version "1.0.0")
15351 (source
15352 (origin
15353 (method url-fetch)
15354 (uri (pypi-uri "precis_i18n" version))
15355 (sha256
15356 (base32
15357 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
15358 (build-system python-build-system)
15359 (home-page "https://github.com/byllyfish/precis_i18n")
15360 (synopsis "Implementation of the PRECIS framework")
15361 (description
15362 "This module implements the PRECIS Framework as described in RFC 8264,
15363RFC 8265 and RFC 8266.")
15364 (license license:expat)))
15365
d0446c4b
RW
15366(define-public python-absl-py
15367 (package
15368 (name "python-absl-py")
15369 (version "0.6.1")
15370 (source
15371 (origin
15372 (method url-fetch)
15373 (uri (pypi-uri "absl-py" version))
15374 (sha256
15375 (base32
15376 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
15377 (build-system python-build-system)
15378 (propagated-inputs
15379 `(("python-six" ,python-six)))
15380 (home-page "https://github.com/abseil/abseil-py")
15381 (synopsis "Abseil Python common libraries")
15382 (description
15383 "This package provides the Abseil Python Common Libraries, a collection
15384of Python libraries for building Python applications.")
15385 (license license:asl2.0)))
15386
81bed4e9
RW
15387(define-public python-astor
15388 (package
15389 (name "python-astor")
15390 (version "0.7.1")
15391 (source
15392 (origin
15393 (method url-fetch)
15394 (uri (pypi-uri "astor" version))
15395 (sha256
15396 (base32
15397 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
15398 (build-system python-build-system)
15399 ;; FIXME: There are two errors and two test failures.
15400 (arguments `(#:tests? #f))
15401 (home-page "https://github.com/berkerpeksag/astor")
39ee82ff 15402 (synopsis "Read and write Python ASTs")
81bed4e9 15403 (description "Astor is designed to allow easy manipulation of Python
39ee82ff 15404source via the Abstract Syntax Tree.")
81bed4e9
RW
15405 (license license:bsd-3)))
15406
39ee82ff
RW
15407(define-public python2-astor
15408 (package-with-python2 python-astor))
15409
22e623ae
RW
15410(define-public python-grpcio
15411 (package
15412 (name "python-grpcio")
15413 (version "1.17.1")
15414 (source
15415 (origin
15416 (method url-fetch)
15417 (uri (pypi-uri "grpcio" version))
15418 (sha256
15419 (base32
15420 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
15421 (build-system python-build-system)
15422 (propagated-inputs
15423 `(("python-six" ,python-six)))
15424 (home-page "https://grpc.io")
15425 (synopsis "HTTP/2-based RPC framework")
15426 (description "This package provides a Python library for communicating
15427with the HTTP/2-based RPC framework gRPC.")
15428 (license license:asl2.0)))
15429
79869f80
RW
15430(define-public python-astunparse
15431 (package
15432 (name "python-astunparse")
15433 (version "1.6.1")
15434 (source
15435 (origin
15436 (method url-fetch)
15437 (uri (pypi-uri "astunparse" version))
15438 (sha256
15439 (base32
15440 "1jhidwyrqn17avqh9xnnm3wd7q7aahaq009cba67g86y6gxicyyj"))))
15441 (build-system python-build-system)
15442 (arguments '(#:tests? #f)) ; there are none
15443 (propagated-inputs
15444 `(("python-six" ,python-six)
15445 ("python-wheel" ,python-wheel)))
15446 (home-page "https://github.com/simonpercivall/astunparse")
15447 (synopsis "AST unparser for Python")
15448 (description "This package provides an AST unparser for Python. It is a
15449factored out version of @code{unparse} found in the Python source
15450distribution.")
15451 (license license:bsd-3)))
15452
2884aac0
RW
15453(define-public python-gast
15454 (package
15455 (name "python-gast")
bd300261 15456 (version "0.2.2")
2884aac0
RW
15457 (source
15458 (origin
15459 (method url-fetch)
15460 (uri (pypi-uri "gast" version))
15461 (sha256
bd300261 15462 (base32 "1w5dzdb3gpcfmd2s0b93d8gff40a1s41rv31458z14inb3s9v4zy"))))
2884aac0
RW
15463 (build-system python-build-system)
15464 (propagated-inputs
15465 `(("python-astunparse" ,python-astunparse)))
15466 (home-page "https://pypi.org/project/gast/")
15467 (synopsis "Generic Python AST that abstracts the underlying Python version")
15468 (description
15469 "GAST provides a compatibility layer between the AST of various Python
15470versions, as produced by @code{ast.parse} from the standard @code{ast}
15471module.")
15472 (license license:bsd-3)))
15473
44d10b1f
RW
15474(define-public python-wikidata
15475 (package
15476 (name "python-wikidata")
15477 (version "0.6.1")
15478 (source
15479 (origin
15480 (method url-fetch)
15481 (uri (pypi-uri "Wikidata" version))
15482 (sha256
15483 (base32
15484 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
15485 (build-system python-build-system)
15486 (propagated-inputs
15487 `(("python-babel" ,python-babel)))
15488 (home-page "https://github.com/dahlia/wikidata")
15489 (synopsis "Wikidata client library")
15490 (description
15491 "This package provides a Python interface to
15492@url{https://www.wikidata.org/, Wikidata}.")
15493 (properties '((upstream-name . "Wikidata")))
15494 (license license:gpl3+)))
15495
15496(define-public python-doctest-ignore-unicode
15497 (package
15498 (name "python-doctest-ignore-unicode")
15499 (version "0.1.2")
15500 (source
15501 (origin
15502 (method url-fetch)
15503 (uri (pypi-uri "doctest-ignore-unicode" version))
15504 (sha256
15505 (base32
15506 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
15507 (build-system python-build-system)
15508 (native-inputs
15509 `(("python-nose" ,python-nose)))
15510 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
15511 (synopsis "Ignore Unicode literal prefixes in doctests")
15512 (description
15513 "This package adds support for a flag to ignore Unicode literal prefixes
15514in doctests.")
15515 (license license:asl2.0)))
15516
15517(define-public python-attr
15518 (package
15519 (name "python-attr")
15520 (version "0.3.1")
15521 (source
15522 (origin
15523 (method url-fetch)
15524 (uri (pypi-uri "attr" version))
15525 (sha256
15526 (base32
15527 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
15528 (build-system python-build-system)
15529 (home-page "https://github.com/denis-ryzhkov/attr")
15530 (synopsis "Decorator for attributes of target function or class")
15531 (description "Simple decorator to set attributes of target function or
15532class in a @acronym{DRY, Don't Repeat Yourself} way.")
15533 (license license:expat)))
f98232a3
VC
15534
15535(define-public python-construct
15536 (package
15537 (name "python-construct")
15538 (version "2.9.45")
15539 (source
15540 (origin
15541 (method url-fetch)
15542 (uri (pypi-uri "construct" version))
15543 (sha256
15544 (base32
15545 "130iy05awzigm2xah2yvlmb08mac5bi4gzr5m3g7k1krs3ps0w92"))))
15546 (build-system python-build-system)
15547 (arguments
15548 `(#:tests? #f)) ; No tests exist.
15549 (propagated-inputs
15550 `(("python-extras" ,python-extras)
15551 ("python-arrow" ,python-arrow)
15552 ("python-numpy" ,python-numpy)
15553 ("python-ruamel.yaml" ,python-ruamel.yaml)))
15554 (home-page "http://construct.readthedocs.io")
15555 (synopsis "Declarative and symmetrical parser and builder for binary data")
15556 (description
15557 "This package provides both simple, atomic constructs (such as
15558integers of various sizes), as well as composite ones which allow you
15559form hierarchical and sequential structures of increasing complexity.
15560It features bit and byte granularity, easy debugging and testing, an
15561easy-to-extend subclass system, and lots of primitive constructs to
15562make your work easier.")
15563 (license license:expat)))
b742c006
LF
15564
15565(define-public python-humanize
15566 (package
15567 (name "python-humanize")
15568 (version "0.5.1")
15569 (source
15570 (origin
15571 (method url-fetch)
15572 (uri (pypi-uri "humanize" version))
15573 (sha256
15574 (base32
15575 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
15576 (arguments
15577 '(#:tests? #f)) ; tests not in pypi archive
15578 (build-system python-build-system)
15579 (home-page "https://github.com/jmoiron/humanize")
15580 (synopsis "Print numerical information in a human-readable form")
15581 (description "This package provides a Python module that displays numbers
15582and dates in \"human readable\" forms. For example, it would display
15583\"12345591313\" as \"12.3 billion\".")
15584 (license license:expat)))
d5bbf66d
LF
15585
15586(define-public python-txaio
15587 (package
15588 (name "python-txaio")
15589 (version "18.8.1")
15590 (source
15591 (origin
15592 (method url-fetch)
15593 (uri (pypi-uri "txaio" version))
15594 (sha256
15595 (base32
15596 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
15597 (build-system python-build-system)
15598 (propagated-inputs
15599 `(("python-twisted" ,python-twisted)
15600 ("python-six" ,python-six)))
15601 (home-page "https://github.com/crossbario/txaio")
15602 (synopsis "Compatibility layer between Python asyncio and Twisted")
15603 (description "Txaio provides a compatibility layer between the Python
15604@code{asyncio} module and @code{Twisted}.")
15605 (license license:expat)))
963dfd3a
RW
15606
15607(define-public python-toolshed
15608 (package
15609 (name "python-toolshed")
15610 (version "0.4.6")
15611 (source
15612 (origin
15613 (method url-fetch)
15614 (uri (pypi-uri "toolshed" version))
15615 (sha256
15616 (base32
15617 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
15618 (build-system python-build-system)
15619 (native-inputs
15620 `(("python-nose" ,python-nose)))
15621 (home-page "https://github.com/brentp/toolshed/")
15622 (synopsis "Collection of modules and functions for working with data")
15623 (description "This is a collection of well-tested, simple modules and
15624functions that aim to reduce boilerplate when working with data.")
15625 (license license:bsd-2)))
c91ecf2d
RW
15626
15627(define-public python-annoy
15628 (package
15629 (name "python-annoy")
15630 (version "1.15.1")
15631 (source
15632 (origin
15633 (method url-fetch)
15634 (uri (pypi-uri "annoy" version))
15635 (sha256
15636 (base32
15637 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
15638 (build-system python-build-system)
15639 (native-inputs
15640 `(("python-nose" ,python-nose)))
15641 (home-page "https://github.com/spotify/annoy/")
15642 (synopsis "Approximate nearest neighbors library")
15643 (description
15644 "Annoy is a C++ library with Python bindings to search for points in
15645space that are close to a given query point. It also creates large read-only
15646file-based data structures that are @code{mmap}ped into memory so that many
15647processes may share the same data.")
15648 (license license:asl2.0)))
412342d1
NG
15649
15650(define-public python-sphinxcontrib-svg2pdfconverter
15651 (package
15652 (name "python-sphinxcontrib-svg2pdfconverter")
15653 (version "0.1.0")
15654 (source (origin
15655 (method url-fetch)
15656 (uri (pypi-uri "sphinxcontrib-svg2pdfconverter" version))
15657 (sha256
15658 (base32
15659 "1abvbgkkii13q8nsb10r0gc5lm0p9iq1iwhfhakn5ifn6asa0183"))))
15660 (build-system python-build-system)
15661 (propagated-inputs
15662 `(("python-sphinx" ,python-sphinx)))
15663 (home-page "https://github.com/missinglinkelectronics/sphinxcontrib-svg2pdfconverter/releases")
15664 (synopsis "Sphinx SVG to PDF converter extension")
15665 (description "A Sphinx extension to convert SVG images to PDF in case the builder does not support
15666SVG images natively (e.g. LaTeX).")
15667 (license license:bsd-3)))