gnu: perl: Update home page.
[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>
dcfa0acd 47;;; Copyright © 2017, 2019 Brendan Tildesley <mail@brendan.scot>
44d10b1f
RW
48;;; Copyright © 2018 Ethan R. Jones <ethanrjones97@gmail.com
49;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
50;;; Copyright © 2018 Vijayalakshmi Vedantham <vijimay12@gmail.com>
51;;; Copyright © 2018 Mathieu Lirzin <mthl@gnu.org>
52;;; Copyright © 2018 Adam Massmann <massmannak@gmail.com>
53;;; Copyright © 2016, 2018 Tomáš Čech <sleep_walker@gnu.org>
412342d1 54;;; Copyright © 2018, 2019 Nicolas Goaziou <mail@nicolasgoaziou.fr>
44d10b1f
RW
55;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
56;;; Copyright © 2018 Clément Lassieur <clement@lassieur.org>
4caf37b0 57;;; Copyright © 2018, 2019 Maxim Cournoyer <maxim.cournoyer@gmail.com>
44d10b1f
RW
58;;; Copyright © 2018 Luther Thompson <lutheroto@gmail.com>
59;;; Copyright © 2018 Vagrant Cascadian <vagrant@debian.org>
a9ba0a31 60;;; Copyright © 2019 Brett Gilio <brettg@posteo.net>
a91f4eba 61;;; Copyright © 2019 Sam <smbaines8@gmail.com>
8c141421 62;;; Copyright © 2019 Jack Hill <jackhill@jackhill.us>
44d10b1f
RW
63;;;
64;;; This file is part of GNU Guix.
65;;;
66;;; GNU Guix is free software; you can redistribute it and/or modify it
67;;; under the terms of the GNU General Public License as published by
68;;; the Free Software Foundation; either version 3 of the License, or (at
69;;; your option) any later version.
70;;;
71;;; GNU Guix is distributed in the hope that it will be useful, but
72;;; WITHOUT ANY WARRANTY; without even the implied warranty of
73;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
74;;; GNU General Public License for more details.
75;;;
76;;; You should have received a copy of the GNU General Public License
77;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
78
79(define-module (gnu packages python-xyz)
80 #:use-module ((guix licenses) #:prefix license:)
81 #:use-module (gnu packages)
82 #:use-module (gnu packages algebra)
83 #:use-module (gnu packages adns)
84 #:use-module (gnu packages attr)
85 #:use-module (gnu packages backup)
86 #:use-module (gnu packages bash)
87 #:use-module (gnu packages check)
88 #:use-module (gnu packages compression)
89 #:use-module (gnu packages crypto)
90 #:use-module (gnu packages databases)
91 #:use-module (gnu packages file)
92 #:use-module (gnu packages fontutils)
93 #:use-module (gnu packages gcc)
94 #:use-module (gnu packages geo)
95 #:use-module (gnu packages ghostscript)
96 #:use-module (gnu packages gl)
97 #:use-module (gnu packages glib)
98 #:use-module (gnu packages graphviz)
99 #:use-module (gnu packages graphics)
100 #:use-module (gnu packages gstreamer)
101 #:use-module (gnu packages gtk)
102 #:use-module (gnu packages icu4c)
103 #:use-module (gnu packages image)
104 #:use-module (gnu packages imagemagick)
105 #:use-module (gnu packages libevent)
106 #:use-module (gnu packages libffi)
107 #:use-module (gnu packages linux)
108 #:use-module (gnu packages llvm)
109 #:use-module (gnu packages man)
110 #:use-module (gnu packages maths)
42f0b0c2 111 #:use-module (gnu packages monitoring)
44d10b1f
RW
112 #:use-module (gnu packages multiprecision)
113 #:use-module (gnu packages networking)
114 #:use-module (gnu packages ncurses)
115 #:use-module (gnu packages openstack)
116 #:use-module (gnu packages pcre)
117 #:use-module (gnu packages perl)
118 #:use-module (gnu packages pkg-config)
119 #:use-module (gnu packages python)
d362b11d 120 #:use-module (gnu packages python-check)
44d10b1f
RW
121 #:use-module (gnu packages python-crypto)
122 #:use-module (gnu packages python-web)
123 #:use-module (gnu packages qt)
124 #:use-module (gnu packages readline)
125 #:use-module (gnu packages sdl)
126 #:use-module (gnu packages search)
127 #:use-module (gnu packages shells)
9d0c291e 128 #:use-module (gnu packages sphinx)
44d10b1f
RW
129 #:use-module (gnu packages ssh)
130 #:use-module (gnu packages terminals)
131 #:use-module (gnu packages tex)
132 #:use-module (gnu packages texinfo)
133 #:use-module (gnu packages time)
134 #:use-module (gnu packages tls)
135 #:use-module (gnu packages version-control)
136 #:use-module (gnu packages video)
137 #:use-module (gnu packages web)
138 #:use-module (gnu packages base)
139 #:use-module (gnu packages xml)
140 #:use-module (gnu packages xorg)
141 #:use-module (gnu packages xdisorg)
142 #:use-module (gnu packages tcl)
143 #:use-module (gnu packages bdw-gc)
f98232a3 144 #:use-module (gnu packages serialization)
44d10b1f
RW
145 #:use-module (guix packages)
146 #:use-module (guix download)
147 #:use-module (guix git-download)
a042d348 148 #:use-module (guix hg-download)
44d10b1f
RW
149 #:use-module (guix utils)
150 #:use-module (guix build-system gnu)
151 #:use-module (guix build-system cmake)
152 #:use-module (guix build-system python)
153 #:use-module (guix build-system trivial)
154 #:use-module (srfi srfi-1)
155 #:use-module (srfi srfi-26))
156
157(define-public python-psutil
158 (package
159 (name "python-psutil")
160 (version "5.4.3")
161 (source
162 (origin
163 (method url-fetch)
164 (uri (pypi-uri "psutil" version))
165 (sha256
166 (base32
167 "063v69x7spyclyaxrd3gmzj3p16q5ayg97xqhwb1kyn22a9pwip2"))))
168 (build-system python-build-system)
169 (arguments
170 ;; FIXME: some tests does not return and times out.
171 '(#:tests? #f))
172 (home-page "https://www.github.com/giampaolo/psutil")
173 (synopsis "Library for retrieving information on running processes")
174 (description
175 "psutil (Python system and process utilities) is a library for retrieving
176information on running processes and system utilization (CPU, memory, disks,
177network) in Python. It is useful mainly for system monitoring, profiling and
178limiting process resources and management of running processes. It implements
179many functionalities offered by command line tools such as: ps, top, lsof,
180netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
181pidof, tty, taskset, pmap.")
182 (properties `((python2-variant . ,(delay python2-psutil))))
183 (license license:bsd-3)))
184
185(define-public python2-psutil
186 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
187 (package
188 (inherit base)
189 (propagated-inputs
190 `(("python2-enum34" ,python2-enum34) ;optional
191 ,@(package-propagated-inputs base))))))
192
193(define-public python-shapely
194 (package
195 (name "python-shapely")
196 (version "1.6.3")
197 (source
198 (origin
199 (method url-fetch)
200 (uri (pypi-uri "Shapely" version))
201 (sha256
202 (base32
203 "0svc58dzcw9gj92b4sgq35sdxkf85z0qwlzxarkzq4bp3h8jy58l"))))
204 (build-system python-build-system)
205 (native-inputs
206 `(("python-cython" ,python-cython)
207 ("python-matplotlib" ,python-matplotlib)
208 ("python-pytest" ,python-pytest)
209 ("python-pytest-cov" ,python-pytest-cov)))
210 (inputs
211 `(("geos" ,geos)))
212 (propagated-inputs
213 `(("python-numpy" ,python-numpy)))
214 (arguments
215 `(#:phases
216 (modify-phases %standard-phases
217 (add-after 'unpack 'patch-geos-path
218 (lambda* (#:key inputs #:allow-other-keys)
219 (let ((geos (assoc-ref inputs "geos"))
220 (glibc (assoc-ref inputs ,(if (%current-target-system)
221 "cross-libc" "libc"))))
222 (substitute* "shapely/geos.py"
223 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
224 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
225 geos "/lib/libgeos_c.so'])"))
226 (("free = load_dll\\('c'\\)\\.free")
227 (string-append "free = load_dll('c', fallbacks=['"
228 glibc "/lib/libc.so.6']).free"))))
229 #t)))))
230 (home-page "https://github.com/Toblerity/Shapely")
231 (synopsis "Library for the manipulation and analysis of geometric objects")
232 (description "Shapely is a Python package for manipulation and analysis of
233planar geometric objects. It is based on the @code{GEOS} library.")
234 (license license:bsd-3)))
235
a91f4eba
S
236(define-public python-shortuuid
237 (package
238 (name "python-shortuuid")
239 (version "0.5.0")
240 (source
241 (origin
242 (method url-fetch)
243 (uri (pypi-uri "shortuuid" version))
244 (sha256
245 (base32
246 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
247 (build-system python-build-system)
248 (native-inputs
249 `(("python-pep8" ,python-pep8)))
250 (home-page "https://github.com/skorokithakis/shortuuid")
251 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
252 (description
253 "@code{shortuuid} is a Python library for generating concise, unambiguous
254and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
255module and then similar looking characters are removed.")
256 (license license:bsd-3)))
257
44d10b1f
RW
258(define-public python-logwrap
259 (package
260 (name "python-logwrap")
261 (version "3.2.1")
262 (source
263 (origin
264 (method url-fetch)
265 (uri (pypi-uri "logwrap" version ".zip"))
266 (sha256
267 (base32
268 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
269 (build-system python-build-system)
270 (propagated-inputs
271 `(("python-six" ,python-six)
272 ("python-typing" ,python-typing)))
273 (native-inputs
274 `(("unzip" ,unzip)
275 ("python-cython" ,python-cython)
276 ("python-pytest" ,python-pytest)
277 ("python-pytest-cov" ,python-pytest-cov)
278 ("python-pytest-runner" ,python-pytest-runner)))
279 (home-page "https://github.com/penguinolog/logwrap")
280 (synopsis "Decorator for logging function arguments")
281 (description "This package provides a decorator to log function arguments
282and function call return values in a human-readable way.")
283 (license license:asl2.0)))
284
285(define-public python2-shapely
286 (package-with-python2 python-shapely))
287
288(define-public python-clyent
289 (package
290 (name "python-clyent")
291 (version "1.2.1")
292 (source
293 (origin
294 (method url-fetch)
295 (uri (pypi-uri "clyent" version))
296 (sha256
297 (base32
298 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
299 (build-system python-build-system)
300 (native-inputs
301 `(("python-mock" ,python-mock)))
302 (home-page "https://github.com/binstar/clyent")
303 (synopsis "Command line client library")
304 (description "Clyent is a Python command line utiliy library. It is used
305by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
306 (license license:bsd-3)))
307
308(define-public python2-clyent
309 (package-with-python2 python-clyent))
310
311(define-public python-babel
312 (package
313 (name "python-babel")
314 (version "2.6.0")
315 (source
316 (origin
317 (method url-fetch)
318 (uri (pypi-uri "Babel" version))
319 (sha256
320 (base32
321 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))
322 (build-system python-build-system)
323 (native-inputs
324 `(("python-freezegun" ,python-freezegun)
325 ("python-pytest" ,python-pytest)))
326 (propagated-inputs
327 `(("python-pytz" ,python-pytz)))
328 (arguments
329 `(#:phases (modify-phases %standard-phases
330 (replace 'check
331 (lambda _ (invoke "pytest" "-vv"))))))
332 (home-page "http://babel.pocoo.org/")
333 (synopsis
334 "Tools for internationalizing Python applications")
335 (description
336 "Babel is composed of two major parts:
337- tools to build and work with gettext message catalogs
338- a Python interface to the CLDR (Common Locale Data Repository), providing
339access to various locale display names, localized number and date formatting,
340etc. ")
341 (license license:bsd-3)))
342
343(define-public python2-babel
344 (package-with-python2 python-babel))
345
346(define-public python2-backport-ssl-match-hostname
347 (package
348 (name "python2-backport-ssl-match-hostname")
349 (version "3.5.0.1")
350 (source
351 (origin
352 (method url-fetch)
2c1f0d09 353 (uri (pypi-uri "backports.ssl_match_hostname" version))
44d10b1f
RW
354 (sha256
355 (base32
356 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
357 (build-system python-build-system)
358 (arguments
359 `(#:python ,python-2
360 #:tests? #f)) ; no test target
361 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
362 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
363 (description
364 "This backport brings the ssl.match_hostname() function to users of
365earlier versions of Python. The function checks the hostname in the
366certificate returned by the server to which a connection has been established,
367and verifies that it matches the intended target hostname.")
368 (license license:psfl)))
369
370(define-public python-hdf4
371 (package
372 (name "python-hdf4")
373 (version "0.9")
374 (source
375 (origin
376 (method url-fetch)
377 (uri (pypi-uri name version))
378 (sha256
379 (base32
380 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
381 (build-system python-build-system)
382 (native-inputs `(("nose" ,python-nose)))
383 (propagated-inputs `(("numpy" ,python-numpy)))
384 (inputs
385 `(("hdf4" ,hdf4)
386 ("libjpeg" ,libjpeg)
387 ("zlib" ,zlib)))
388 (arguments
389 `(#:phases
390 (modify-phases %standard-phases
391 (replace 'check
392 (lambda _
393 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
394 ;; on to import numpy. Somehow this works on their CI system.
395 ;; Let's just manage PYTHONPATH here instead.
396 (substitute* "runexamples.sh"
397 (("export PYTHONPATH=.*") ""))
398 (setenv "PYTHONPATH"
399 (string-append (getcwd) ":"
400 (getenv "PYTHONPATH")))
401 (invoke "./runexamples.sh")
402 (invoke "nosetests" "-v"))))))
403 (home-page "https://github.com/fhs/python-hdf4")
404 (synopsis "Python interface to the NCSA HDF4 library")
405 (description
406 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
407which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
408NetCDF files can also be read and modified. Python-HDF4 is a fork of
409@url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
410 (license license:expat)))
411
412(define-public python2-hdf4
413 (package-with-python2 python-hdf4))
414
415(define-public python-h5py
416 (package
417 (name "python-h5py")
418 (version "2.8.0")
419 (source
420 (origin
421 (method url-fetch)
422 (uri (pypi-uri "h5py" version))
423 (sha256
424 (base32
425 "0mdr6wrq02ac93m1aqx9kad0ppfzmm4imlxqgyy1x4l7hmdcc9p6"))))
426 (build-system python-build-system)
427 (arguments
428 `(#:tests? #f ; no test target
429 #:phases
430 (modify-phases %standard-phases
431 (add-after 'unpack 'fix-hdf5-paths
432 (lambda* (#:key inputs #:allow-other-keys)
433 (let ((prefix (assoc-ref inputs "hdf5")))
434 (substitute* "setup_build.py"
435 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
436 (string-append "['" prefix "/lib" "']"))
437 (("'/opt/local/include', '/usr/local/include'")
438 (string-append "'" prefix "/include" "'")))
439 (substitute* "setup_configure.py"
440 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
441 (string-append "['" prefix "/lib" "']")))
442 #t))))))
443 (propagated-inputs
444 `(("python-six" ,python-six)
445 ("python-numpy" ,python-numpy)))
446 (inputs
447 `(("hdf5" ,hdf5)))
448 (native-inputs
449 `(("python-cython" ,python-cython)
450 ("python-pkgconfig" ,python-pkgconfig)))
451 (home-page "http://www.h5py.org/")
452 (synopsis "Read and write HDF5 files from Python")
453 (description
454 "The h5py package provides both a high- and low-level interface to the
455HDF5 library from Python. The low-level interface is intended to be a
456complete wrapping of the HDF5 API, while the high-level component supports
457access to HDF5 files, datasets and groups using established Python and NumPy
458concepts.")
459 (license license:bsd-3)))
460
461(define-public python2-h5py
462 (package-with-python2 python-h5py))
463
8b89dedc
RW
464(define-public python-sh
465 (package
466 (name "python-sh")
467 (version "1.12.14")
468 (source
469 (origin
470 (method url-fetch)
471 (uri (pypi-uri "sh" version))
472 (sha256
473 (base32
474 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
475 (build-system python-build-system)
fd3638d8
EF
476 (arguments
477 '(#:phases
478 (modify-phases %standard-phases
479 (replace 'check
480 (lambda _
ca983a2f
NG
481 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
482 (setenv "HOME" "/tmp")
fd3638d8
EF
483 (invoke "python" "sh.py" "test"))))))
484 (native-inputs
485 `(("python-coverage" ,python-coverage)))
8b89dedc
RW
486 (home-page "https://github.com/amoffat/sh")
487 (synopsis "Python subprocess replacement")
488 (description "This package provides a replacement for Python's
489@code{subprocess} feature.")
490 (license license:expat)))
491
3869effd
RW
492(define-public python2-sh
493 (package-with-python2 python-sh))
494
d362b11d
RW
495(define-public python-cftime
496 (package
497 (name "python-cftime")
498 (version "1.0.3.4")
499 (source
500 (origin
501 (method url-fetch)
502 (uri (pypi-uri "cftime" version))
503 (sha256
504 (base32
505 "0362dhxbzk593walyjz30dll6y2y79wialik647cbwdsf3ad0x6x"))))
506 (build-system python-build-system)
507 (propagated-inputs
508 `(("python-numpy" ,python-numpy)))
509 (native-inputs
510 `(("python-coveralls" ,python-coveralls)
511 ("python-cython" ,python-cython)
512 ("python-pytest-cov" ,python-pytest-cov)))
513 (home-page "https://github.com/Unidata/cftime")
514 (synopsis "Library for time handling")
515 (description
516 "This package provides time-handling functionality that used to be part
517of the netcdf4 package before.")
518 ;; This package claims to include code under the GPLv3 but is released
519 ;; under ISC.
520 (license (list license:isc license:gpl3+))))
521
44d10b1f
RW
522(define-public python-netcdf4
523 (package
524 (name "python-netcdf4")
93e7b209 525 (version "1.4.2")
44d10b1f
RW
526 (source
527 (origin
528 (method url-fetch)
529 (uri (pypi-uri "netCDF4" version))
530 (sha256
531 (base32
93e7b209 532 "0c0sklgrmv15ygliin8qq0hp7vanmbi74m6zpi0r1ksr0hssyd5r"))))
44d10b1f 533 (build-system python-build-system)
93e7b209
RW
534 (arguments
535 '(#:phases
536 (modify-phases %standard-phases
537 (add-after 'unpack 'configure-locations
538 (lambda* (#:key inputs #:allow-other-keys)
539 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
540 #t)))))
44d10b1f
RW
541 (native-inputs
542 `(("python-cython" ,python-cython)))
543 (propagated-inputs
93e7b209
RW
544 `(("python-numpy" ,python-numpy)
545 ("python-cftime" ,python-cftime)))
44d10b1f
RW
546 (inputs
547 `(("netcdf" ,netcdf)
548 ("hdf4" ,hdf4)
549 ("hdf5" ,hdf5)))
93e7b209 550 (home-page "https://github.com/Unidata/netcdf4-python")
44d10b1f
RW
551 (synopsis "Python/numpy interface to the netCDF library")
552 (description "Netcdf4-python is a Python interface to the netCDF C
553library. netCDF version 4 has many features not found in earlier
554versions of the library and is implemented on top of HDF5. This module
555can read and write files in both the new netCDF 4 and the old netCDF 3
556format, and can create files that are readable by HDF5 clients. The
557API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
558to users of that module.")
559 ;; The software is mainly ISC, but includes some files covered
560 ;; by the Expat license.
561 (license (list license:isc license:expat))))
562
563(define-public python2-netcdf4
564 (package-with-python2 python-netcdf4))
565
566(define-public python-lockfile
567 (package
568 (name "python-lockfile")
569 (version "0.12.2")
570 (source
571 (origin
572 (method url-fetch)
8318bf07 573 (uri (pypi-uri "lockfile" version))
44d10b1f
RW
574 (sha256
575 (base32
576 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
577 (build-system python-build-system)
578 (arguments '(#:test-target "check"))
579 (native-inputs
580 `(("python-pbr" ,python-pbr)))
581 (home-page "https://launchpad.net/pylockfile")
582 (synopsis "Platform-independent file locking module")
583 (description
584 "The lockfile package exports a LockFile class which provides a simple
585API for locking files.")
586 (license license:expat)))
587
588(define-public python2-lockfile
589 (package-with-python2 python-lockfile))
590
591(define-public python-semantic-version
592 (package
593 (name "python-semantic-version")
594 (version "2.6.0")
595 (source
596 (origin
597 (method url-fetch)
598 (uri (pypi-uri "semantic_version" version))
599 (sha256
600 (base32
601 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
602 (build-system python-build-system)
603 (arguments
604 `(#:tests? #f)) ; PyPI tarball lacks tests
605 (home-page "https://github.com/rbarrois/python-semanticversion")
606 (synopsis "Semantic versioning module for Python")
607 (description
608 "The @code{semantic_version} class is a small library for handling
609@uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
610
611It can compare versions, generate a new version that represents a bump in one of
612the version levels, and check whether any given string is a proper semantic
613version identifier.")
614 (license license:bsd-3)))
615
616(define-public python2-semantic-version
617 (package-with-python2 python-semantic-version))
618
619(define-public python-serpent
620 (package
621 (name "python-serpent")
fa9d14ac 622 (version "1.28")
44d10b1f
RW
623 (source
624 (origin
625 (method url-fetch)
626 (uri (pypi-uri "serpent" version))
627 (sha256
fa9d14ac 628 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
44d10b1f 629 (build-system python-build-system)
fa9d14ac
TGR
630 (native-inputs
631 `(("python-attrs" ,python-attrs)
632 ("python-pytz" ,python-pytz)))
44d10b1f
RW
633 (home-page "https://github.com/irmen/Serpent")
634 (synopsis "Serializer for literal Python expressions")
635 (description
1d3c7803
TGR
636 "Serpent provides @code{ast.literal_eval()}-compatible object tree
637serialization. It serializes an object tree into bytes (an utf-8 encoded
638string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
639to rebuild the original object tree.
640
641Because only safe literals are encoded, it is safe to send serpent data to
642other machines, such as over the network.")
44d10b1f
RW
643 (license license:expat)))
644
645(define-public python-setuptools
646 (package
647 (name "python-setuptools")
648 (version "40.0.0")
649 (source
650 (origin
651 (method url-fetch)
652 (uri (pypi-uri "setuptools" version ".zip"))
653 (sha256
654 (base32
655 "0pq116lr14gnc62v76nk0npkm6krb2mpp7p9ab369zgv4n7dnah1"))
656 (modules '((guix build utils)))
657 (snippet
658 '(begin
659 ;; Remove included binaries which are used to build self-extracting
660 ;; installers for Windows.
661 ;; TODO: Find some way to build them ourself so we can include them.
662 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
663 #t))))
664 (build-system python-build-system)
665 ;; FIXME: Tests require pytest, which itself relies on setuptools.
666 ;; One could bootstrap with an internal untested setuptools.
667 (arguments
668 `(#:tests? #f))
669 (home-page "https://pypi.python.org/pypi/setuptools")
670 (synopsis
671 "Library designed to facilitate packaging Python projects")
672 (description
673 "Setuptools is a fully-featured, stable library designed to facilitate
674packaging Python projects, where packaging includes:
675Python package and module definitions,
676distribution package metadata,
677test hooks,
678project installation,
679platform-specific details,
680Python 3 support.")
681 ;; TODO: setuptools now bundles the following libraries:
682 ;; packaging, pyparsing, six and appdirs. How to unbundle?
683 (license (list license:psfl ; setuptools itself
684 license:expat ; six, appdirs, pyparsing
685 license:asl2.0 ; packaging is dual ASL2/BSD-2
686 license:bsd-2))))
687
688(define-public python2-setuptools
689 (package-with-python2 python-setuptools))
690
691(define-public python-uniseg
692 (package
693 (name "python-uniseg")
694 (version "0.7.1")
695 (source
696 (origin
697 (method url-fetch)
698 (uri (pypi-uri "uniseg" version ".zip"))
699 (sha256
700 (base32
701 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
702 (build-system python-build-system)
703 (arguments
704 '(#:tests? #f)) ; The test suite requires network access.
705 (native-inputs
706 `(("unzip" ,unzip)))
707 (home-page
708 "https://bitbucket.org/emptypage/uniseg-python")
709 (synopsis
710 "Python library to determine Unicode text segmentations")
711 (description
712 "Uniseg is a Python package used to determine Unicode text segmentations.
713Supported segmentations include:
714@enumerate
715@item @dfn{Code point} (any value in the Unicode codespace)
716@item @dfn{Grapheme cluster} (user-perceived character made of a single or
717multiple Unicode code points, e.g. \"G\" + acute-accent)
718@item Word break
719@item Sentence break
720@item Line break
721@end enumerate")
722 (license license:expat)))
723
724(define-public python2-uniseg
725 (package-with-python2 python-uniseg))
726
727(define-public python-humanfriendly
728 (package
729 (name "python-humanfriendly")
730 (version "4.4.1")
731 (source
732 (origin
733 (method url-fetch)
734 (uri (pypi-uri "humanfriendly" version))
735 (sha256
736 (base32
737 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
738 (build-system python-build-system)
739 (arguments
740 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
741 #:tests? #f))
742 (propagated-inputs
743 `(("python-monotonic" ,python-monotonic)))
744 (home-page "https://humanfriendly.readthedocs.io")
745 (synopsis "Human-friendly input and output in Python")
746 (description
747 "The functions and classes in @code{humanfriendly} can be used to make
748text interfaces more user-friendly. It includes tools to parse and format
749numbers, file sizes, and timespans, timers for long-running operations, menus
750to allow the user to choose from a list of options, and terminal interaction
751helpers.")
752 (license license:expat)))
753
754(define-public python2-humanfriendly
755 (package-with-python2 python-humanfriendly))
756
757(define-public python-capturer
758 (package
759 (name "python-capturer")
760 (version "2.4")
761 (source
762 (origin
763 (method url-fetch)
764 (uri (pypi-uri "capturer" version))
765 (sha256
766 (base32
767 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
768 (build-system python-build-system)
769 (arguments
770 `(#:tests? #f))
771 (propagated-inputs
772 `(("python-humanfriendly" ,python-humanfriendly)))
773 (home-page "https://capturer.readthedocs.io")
774 (synopsis "Capture stdout and stderr streams of the current process")
775 (description
776 "The capturer package makes it easy to capture the stdout and stderr
777streams of the current process and subprocesses. Output can be relayed
778to the terminal in real time but is also available to the Python program
779for additional processing.")
780 (license license:expat)))
781
782(define-public python2-capturer
783 (package-with-python2 python-capturer))
784
785(define-public python-case
786 (package
787 (name "python-case")
788 (version "1.5.3")
789 (source
790 (origin
791 (method url-fetch)
792 (uri (pypi-uri "case" version))
793 (sha256
794 (base32
795 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
796 (build-system python-build-system)
797 (propagated-inputs
798 `(("python-mock" ,python-mock)
799 ("python-nose" ,python-nose)
800 ("python-six" ,python-six)
801 ("python-unittest2" ,python-unittest2)))
802 (native-inputs
803 `(("python-coverage" ,python-coverage)))
804 (home-page "https://github.com/celery/case")
805 (synopsis "Unittest utilities and convenience methods")
806 (description
807 "The @code{case} package provides utilities on top of unittest, including
808some helpful Python 2 compatibility convenience methods.")
809 (license license:bsd-3)))
810
811(define-public python-verboselogs
812 (package
813 (name "python-verboselogs")
814 (version "1.7")
815 (source
816 (origin
817 (method url-fetch)
818 (uri (pypi-uri "verboselogs" version))
819 (sha256
820 (base32
821 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
822 (build-system python-build-system)
823 (native-inputs
824 `(("python-mock" ,python-mock)
825 ("python-astroid" ,python-astroid)
826 ("python-pylint" ,python-pylint)))
827 (home-page "https://verboselogs.readthedocs.io")
828 (synopsis "Verbose logging level for Python's logging module")
829 (description
830 "The @code{verboselogs} package extends Python's @code{logging} module to
831add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
832 (license license:expat)))
833
834(define-public python2-verboselogs
835 (package-with-python2 python-verboselogs))
836
837(define-public python-coloredlogs
838 (package
839 (name "python-coloredlogs")
840 (version "7.3")
841 (source
842 (origin
843 (method url-fetch)
844 (uri (pypi-uri "coloredlogs" version))
845 (sha256
846 (base32
847 "1blcann6dyg5dhps9pg12rn0q0rjrlajpmmil0gy0j4cbvnl2il9"))))
848 (build-system python-build-system)
849 (arguments
850 `(;Tests require some updated modules
851 #:tests? #f))
852 (propagated-inputs
853 `(("python-capturer" ,python-capturer)))
854 (home-page "https://coloredlogs.readthedocs.io")
855 (synopsis "Colored stream handler for Python's logging module")
856 (description
857 "The @code{coloredlogs} package enables colored terminal output for
858Python's logging module. The @code{ColoredFormatter} class inherits from
859@code{logging.Formatter} and uses ANSI escape sequences to render your logging
860messages in color.")
861 (license license:expat)))
862
863(define-public python2-coloredlogs
864 (package-with-python2 python-coloredlogs))
865
4caf37b0
MC
866(define-public python-et-xmlfile
867 (package
868 (name "python-et-xmlfile")
869 (version "1.0.1")
870 (source
871 (origin
872 (method url-fetch)
873 (uri (pypi-uri "et_xmlfile" version))
874 (sha256
875 (base32
876 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
877 (build-system python-build-system)
878 (arguments
879 `(#:phases (modify-phases %standard-phases
880 (replace 'check
881 (lambda _
882 (invoke "pytest"))))))
883 (native-inputs
884 `(("python-pytest" ,python-pytest)
885 ("python-lxml" ,python-lxml))) ;used for the tests
886 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
887 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
888 (description "This Python library is based upon the @code{xmlfile} module
889from @code{lxml}. It aims to provide a low memory, compatible implementation
890of @code{xmlfile}.")
891 (license license:expat)))
892
893(define-public python2-et-xmlfile
894 (package-with-python2 python-et-xmlfile))
895
a042d348
MC
896(define-public python-openpyxl
897 (package
898 (name "python-openpyxl")
441e6d93 899 (version "2.6.2")
a042d348
MC
900 (source
901 (origin
902 ;; We use the upstream repository, as the tests are not included in the
903 ;; PyPI releases.
904 (method hg-fetch)
905 (uri (hg-reference
906 (url "https://bitbucket.org/openpyxl/openpyxl")
907 (changeset version)))
908 (file-name (string-append name "-" version "-checkout"))
909 (sha256
441e6d93 910 (base32 "1qhij6kcvdxqjy4g6193nsv4q7fy8n4fwyd3c2z047idlm6s3j4w"))))
a042d348
MC
911 (build-system python-build-system)
912 (arguments
913 `(#:phases (modify-phases %standard-phases
914 (replace 'check
915 (lambda _
916 (invoke "pytest"))))))
917 (native-inputs
918 ;; For the test suite.
919 `(("python-lxml" ,python-lxml)
920 ("python-pillow" ,python-pillow)
921 ("python-pytest" ,python-pytest)))
922 (propagated-inputs
923 `(("python-et-xmlfile" ,python-et-xmlfile)
924 ("python-jdcal" ,python-jdcal)))
925 (home-page "https://openpyxl.readthedocs.io")
926 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
927 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
928XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
929standard.")
930 (license license:expat)))
931
44d10b1f
RW
932(define-public python-eventlet
933 (package
934 (name "python-eventlet")
935 (version "0.20.1")
936 (source
937 (origin
938 (method url-fetch)
939 (uri (pypi-uri "eventlet" version))
940 (sha256
941 (base32
942 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
943 (build-system python-build-system)
944 (propagated-inputs
945 `(("python-greenlet" ,python-greenlet)))
946 (arguments
947 ;; TODO: Requires unpackaged 'enum-compat'.
948 '(#:tests? #f))
949 (home-page "http://eventlet.net")
950 (synopsis "Concurrent networking library for Python")
951 (description
952 "Eventlet is a concurrent networking library for Python that
953allows you to change how you run your code, not how you write it.
954It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
955Coroutines ensure that the developer uses a blocking style of programming
956that is similar to threading, but provide the benefits of non-blocking I/O.
957The event dispatch is implicit, which means you can easily use @code{Eventlet}
958from the Python interpreter, or as a small part of a larger application.")
959 (license license:expat)))
960
961(define-public python2-eventlet
962 (let ((base (package-with-python2
963 (strip-python2-variant python-eventlet))))
964 (package (inherit base)
965 (propagated-inputs
966 `(("python2-enum34" ,python2-enum34)
967 ,@(package-propagated-inputs base))))))
968
969(define-public python-six
970 (package
971 (name "python-six")
972 (version "1.11.0")
973 (source
974 (origin
975 (method url-fetch)
976 (uri (pypi-uri "six" version))
977 (sha256
978 (base32
979 "1scqzwc51c875z23phj48gircqjgnn3af8zy2izjwmnlxrxsgs3h"))))
980 (build-system python-build-system)
981 (arguments
982 `(#:phases
983 (modify-phases %standard-phases
984 (replace 'check
985 (lambda _
986 (invoke "py.test" "-v"))))))
987 (native-inputs
988 `(("python-py" ,python-py)
989 ("python-pytest" ,python-pytest-bootstrap)))
990 (home-page "https://pypi.python.org/pypi/six/")
991 (synopsis "Python 2 and 3 compatibility utilities")
992 (description
993 "Six is a Python 2 and 3 compatibility library. It provides utility
994functions for smoothing over the differences between the Python versions with
995the goal of writing Python code that is compatible on both Python versions.
996Six supports every Python version since 2.5. It is contained in only one
997Python file, so it can be easily copied into your project.")
998 (license license:x11)))
999
1000(define-public python2-six
1001 (package-with-python2 python-six))
1002
1003(define-public python-six-bootstrap
1004 (package
1005 (inherit python-six)
1006 (name "python-six-bootstrap")
1007 (native-inputs `())
1008 (arguments `(#:tests? #f))))
1009
1010(define-public python2-six-bootstrap
1011 (package-with-python2 python-six-bootstrap))
1012
1013(define-public python-schedule
1014 (package
1015 (name "python-schedule")
1016 (version "0.4.3")
1017 (source
1018 (origin
1019 (method url-fetch)
1020 (uri (pypi-uri "schedule" version))
1021 (sha256
1022 (base32
1023 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1024 (build-system python-build-system)
1025 (native-inputs
1026 `(("python-pytest" ,python-pytest)
1027 ("python-mock" ,python-mock)))
1028 (home-page "https://github.com/dbader/schedule")
1029 (synopsis "Schedule periodic function calls in Python")
1030 (description
1031 "Schedule is an in-process scheduler for periodic jobs that uses the
1032builder pattern for configuration. Schedule lets you run Python functions (or
1033any other callable) periodically at pre-determined intervals using a simple,
1034human-friendly syntax.")
1035 (license license:expat)))
1036
1037(define-public python2-schedule
1038 (package-with-python2 python-schedule))
1039
1040(define-public python-pandas
1041 (package
1042 (name "python-pandas")
c0d43f62 1043 (version "0.24.2")
44d10b1f
RW
1044 (source
1045 (origin
1046 (method url-fetch)
1047 (uri (pypi-uri "pandas" version))
1048 (sha256
c0d43f62 1049 (base32 "18imlm8xbhcbwy4wa957a1fkamrcb0z988z006jpfda3ki09z4ag"))))
44d10b1f
RW
1050 (build-system python-build-system)
1051 (arguments
1052 `(#:modules ((guix build utils)
1053 (guix build python-build-system)
1054 (ice-9 ftw)
1055 (srfi srfi-26))
1056 #:phases (modify-phases %standard-phases
c0d43f62
MC
1057 (add-after 'unpack 'patch-which
1058 (lambda* (#:key inputs #:allow-other-keys)
1059 (let ((which (assoc-ref inputs "which")))
1060 (substitute* "pandas/io/clipboard/__init__.py"
1061 (("^CHECK_CMD = .*")
1062 (string-append "CHECK_CMD = \"" which "\"\n"))))
1063 #t))
44d10b1f
RW
1064 (replace 'check
1065 (lambda _
1066 (let ((build-directory
1067 (string-append
1068 (getcwd) "/build/"
1069 (car (scandir "build"
1070 (cut string-prefix? "lib." <>))))))
1071 ;; Disable the "strict data files" option which causes
c0d43f62
MC
1072 ;; the build to error out if required data files are
1073 ;; not available (as is the case with PyPI archives).
44d10b1f
RW
1074 (substitute* "setup.cfg"
1075 (("addopts = --strict-data-files") "addopts = "))
1076 (with-directory-excursion build-directory
c0d43f62
MC
1077 ;; Delete tests that require "moto" which is not yet
1078 ;; in Guix.
44d10b1f
RW
1079 (for-each delete-file
1080 '("pandas/tests/io/conftest.py"
1081 "pandas/tests/io/json/test_compression.py"
1082 "pandas/tests/io/parser/test_network.py"
44d10b1f
RW
1083 "pandas/tests/io/test_parquet.py"))
1084 (invoke "pytest" "-vv" "pandas" "--skip-slow"
1085 "--skip-network" "-k"
1086 ;; XXX: Due to the deleted tests above.
1087 "not test_read_s3_jsonl"))))))))
1088 (propagated-inputs
1089 `(("python-numpy" ,python-numpy)
667c6ef5 1090 ("python-openpyxl" ,python-openpyxl)
44d10b1f 1091 ("python-pytz" ,python-pytz)
667c6ef5
MC
1092 ("python-dateutil" ,python-dateutil)
1093 ("python-xlrd" ,python-xlrd)))
c0d43f62
MC
1094 (inputs
1095 `(("which" ,which)))
44d10b1f
RW
1096 (native-inputs
1097 `(("python-cython" ,python-cython)
1098 ("python-beautifulsoup4" ,python-beautifulsoup4)
1099 ("python-lxml" ,python-lxml)
1100 ("python-html5lib" ,python-html5lib)
1101 ("python-nose" ,python-nose)
c0d43f62
MC
1102 ("python-pytest" ,python-pytest)
1103 ("python-pytest-mock" ,python-pytest-mock)))
44d10b1f
RW
1104 (home-page "https://pandas.pydata.org")
1105 (synopsis "Data structures for data analysis, time series, and statistics")
1106 (description
1107 "Pandas is a Python package providing fast, flexible, and expressive data
1108structures designed to make working with structured (tabular,
1109multidimensional, potentially heterogeneous) and time series data both easy
1110and intuitive. It aims to be the fundamental high-level building block for
1111doing practical, real world data analysis in Python.")
1112 (license license:bsd-3)))
1113
1114(define-public python2-pandas
1115 (package-with-python2 python-pandas))
1116
1117(define-public python2-mechanize
1118 (package
1119 (name "python2-mechanize")
1120 (version "0.2.5")
1121 (source
1122 (origin
1123 (method url-fetch)
1cc184e6 1124 (uri (pypi-uri "mechanize" version))
44d10b1f
RW
1125 (sha256
1126 (base32
1127 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1128 (build-system python-build-system)
1129 (arguments
1130 `(#:python ,python-2 ; apparently incompatible with Python 3
1131 #:tests? #f))
1132 ;; test fails with message
1133 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1134 ;; (python-3.3.2) or
1135 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1136 ;; (python-2.7.5).
1137 ;; The source code is from March 2011 and probably not up-to-date
1138 ;; with respect to python unit tests.
1139 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1140 (synopsis
1141 "Stateful programmatic web browsing in Python")
1142 (description
1143 "Mechanize implements stateful programmatic web browsing in Python,
1144after Andy Lester’s Perl module WWW::Mechanize.")
1145 (license (license:non-copyleft
1146 "file://COPYING"
1147 "See COPYING in the distribution."))))
1148
1149
1150(define-public python-simplejson
1151 (package
1152 (name "python-simplejson")
1153 (version "3.14.0")
1154 (source
1155 (origin
1156 (method url-fetch)
1157 (uri (pypi-uri "simplejson" version))
1158 (sha256
1159 (base32
1160 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1161 (build-system python-build-system)
1162 (home-page "http://simplejson.readthedocs.org/en/latest/")
1163 (synopsis
1164 "Json library for Python")
1165 (description
1166 "JSON (JavaScript Object Notation) is a subset of JavaScript
1167syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1168format.
1169
1170Simplejson exposes an API familiar to users of the standard library marshal
1171and pickle modules. It is the externally maintained version of the json
1172library contained in Python 2.6, but maintains compatibility with Python 2.5
1173and (currently) has significant performance advantages, even without using
1174the optional C extension for speedups. Simplejson is also supported on
1175Python 3.3+.")
1176 (license license:x11)))
1177
1178(define-public python2-simplejson
1179 (package-with-python2 python-simplejson))
1180
1181
1182(define-public python-pyicu
1183 (package
1184 (name "python-pyicu")
1185 (version "2.2")
1186 (source
1187 (origin
1188 (method url-fetch)
1189 (uri (pypi-uri "PyICU" version))
1190 (sha256
1191 (base32
1192 "0wq9y5fi1ighgf5aws9nr87vi1w44p7q1k83rx2y3qj5d2xyhspa"))))
1193 (build-system python-build-system)
1194 (inputs
1195 `(("icu4c" ,icu4c)))
1196 (native-inputs
1197 `(("python-pytest" ,python-pytest)
1198 ("python-six" ,python-six)))
1199 (home-page "https://github.com/ovalhub/pyicu")
1200 (synopsis "Python extension wrapping the ICU C++ API")
1201 (description
1202 "PyICU is a python extension wrapping the ICU C++ API.")
1203 (properties `((python2-variant . ,(delay python2-pyicu))))
1204 (license license:x11)))
1205
1206(define-public python2-pyicu
1207 (let ((base (package-with-python2
1208 (strip-python2-variant python-pyicu))))
1209 (package
1210 (inherit base)
1211 (arguments
1212 `(,@(package-arguments base)
1213 #:phases
1214 (modify-phases %standard-phases
1215 (add-before 'check 'delete-failing-test
1216 (λ _
1217 ;; XXX: This fails due to Unicode issues unique to Python 2,
1218 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1219 (delete-file "test/test_Script.py")
1220 #t))))))))
1221
1222(define-public python2-dogtail
1223 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1224 ;; spaces in indentation" with Python 3.
1225 (package
1226 (name "python2-dogtail")
1227 (version "0.9.9")
1228 (source (origin
1229 (method url-fetch)
1230 (uri (pypi-uri "dogtail" version))
1231 (sha256
1232 (base32
1233 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1234 (build-system python-build-system)
1235 (arguments `(#:python ,python-2
1236 #:tests? #f)) ; invalid command "test"
1237 ;; Currently no offical homepage.
1238 (home-page "https://pypi.python.org/pypi/dogtail/")
1239 (synopsis "GUI test tool and automation framework written in Python")
1240 (description
1241 "Dogtail is a GUI test tool and automation framework written in Python.
1242It uses Accessibility (a11y) technologies to communicate with desktop
1243applications. dogtail scripts are written in Python and executed like any
1244other Python program.")
1245 (license license:gpl2+)))
1246
1247(define-public python-empy
1248 (package
1249 (name "python-empy")
0f6d5115 1250 (version "3.3.3")
44d10b1f
RW
1251 (source (origin
1252 (method url-fetch)
1253 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1254 version ".tar.gz"))
1255 (sha256
1256 (base32
0f6d5115 1257 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
44d10b1f
RW
1258 (build-system python-build-system)
1259 (arguments
0f6d5115 1260 `(#:tests? #f)) ; python2 only
44d10b1f
RW
1261 (home-page "http://www.alcyone.com/software/empy/")
1262 (synopsis "Templating system for Python")
1263 (description
1264 "EmPy is a system for embedding Python expressions and statements in
1265template text; it takes an EmPy source file, processes it, and produces
1266output. This is accomplished via expansions, which are special signals to the
1267EmPy system and are set off by a special prefix (by default the at sign, @@).
1268EmPy can expand arbitrary Python expressions and statements in this way, as
1269well as a variety of special forms. Textual data not explicitly delimited in
1270this way is sent unaffected to the output, allowing Python to be used in
1271effect as a markup language. Also supported are callbacks via hooks,
1272recording and playback via diversions, and dynamic, chainable filters. The
1273system is highly configurable via command line options and embedded
1274commands.")
1275 (license license:lgpl2.1+)))
1276
1277(define-public python2-empy
0f064242
TGR
1278 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
1279 (package
1280 (inherit base)
1281 (arguments `(,@(package-arguments base)
1282 #:tests? #t)))))
44d10b1f
RW
1283
1284(define-public python2-element-tree
1285 (package
1286 (name "python2-element-tree")
1287 (version "1.2.6")
1288 (source (origin
1289 (method url-fetch)
1290 (uri (string-append
1291 "http://effbot.org/media/downloads/elementtree-"
1292 version "-20050316.tar.gz"))
1293 (sha256
1294 (base32
1295 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1296 (build-system python-build-system)
1297 (arguments
1298 `(#:python ,python-2 ; seems to be part of Python 3
1299 #:tests? #f)) ; no 'test' sub-command
1300 (synopsis "Toolkit for XML processing in Python")
1301 (description
1302 "ElementTree is a Python library supporting lightweight XML processing.")
1303 (home-page "http://effbot.org/zone/element-index.htm")
1304 (license (license:x11-style
1305 "http://docs.python.org/2/license.html"
1306 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1307
1308(define-public python2-pybugz
1309 (package
1310 (name "python2-pybugz")
1311 (version "0.6.11")
1312 (source (origin
1313 (method url-fetch)
1314 (uri (string-append
1315 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1316 version ".tar.gz"))
1317 (sha256
1318 (base32
1319 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1320 (patches (search-patches "pybugz-stty.patch"
1321 "pybugz-encode-error.patch"))))
1322 (build-system python-build-system)
1323 (arguments
1324 `(#:python ,python-2 ; SyntaxError with Python 3
1325 #:tests? #f)) ; no 'test' sub-command
1326 (propagated-inputs
1327 `(("element-tree" ,python2-element-tree)))
1328 (synopsis "Python and command-line interface to Bugzilla")
1329 (description
1330 "PyBugz is a Python library and command-line tool to query the Bugzilla
1331bug tracking system. It is meant as an aid to speed up interaction with the
1332bug tracker.")
1333 (home-page "http://www.liquidx.net/pybugz/")
1334 (license license:gpl2)))
1335
1336(define-public python2-enum
1337 (package
1338 (name "python2-enum")
1339 (version "0.4.6")
1340 (source (origin
1341 (method url-fetch)
1342 (uri (pypi-uri "enum" version))
1343 (sha256
1344 (base32
1345 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1346 (build-system python-build-system)
1347 (arguments
1348 `(#:python ,python-2))
1349 (home-page "http://pypi.python.org/pypi/enum/")
1350 (synopsis "Robust enumerated type support in Python")
1351 (description
1352 "This provides a module for robust enumerations in Python. It has
1353been superseded by the Python standard library and is provided only for
1354compatibility.")
1355 ;; Choice of either license.
1356 (license (list license:gpl3+ license:psfl))))
1357
1358(define-public python-enum34
1359 (package
1360 (name "python-enum34")
1361 (version "1.1.6")
1362 (source
1363 (origin
1364 (method url-fetch)
1365 (uri (pypi-uri "enum34" version))
1366 (sha256
1367 (base32
1368 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1369 (build-system python-build-system)
1370 (home-page "https://pypi.python.org/pypi/enum34")
1371 (synopsis "Backported Python 3.4 Enum")
1372 (description
1373 "Enum34 is the new Python stdlib enum module available in Python 3.4
1374backported for previous versions of Python from 2.4 to 3.3.")
1375 (license license:bsd-3)))
1376
1377(define-public python2-enum34
1378 (package-with-python2 python-enum34))
1379
1380(define-public python-parse-type
1381 (package
1382 (name "python-parse-type")
1383 (version "0.4.2")
1384 (source
1385 (origin
1386 (method url-fetch)
1387 (uri (pypi-uri "parse_type" version))
1388 (sha256
1389 (base32
1390 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1391 (build-system python-build-system)
1392 (propagated-inputs
1393 `(("python-six" ,python-six)
1394 ("python-parse" ,python-parse)))
1395 (native-inputs
1396 `(("python-pytest" ,python-pytest)
1397 ("python-pytest-runner" ,python-pytest-runner)))
1398 (home-page "https://github.com/jenisys/parse_type")
1399 (synopsis "Extended parse module")
1400 (description
1401 "Parse_type extends the python parse module.")
1402 (properties
1403 `((python2-variant . ,(delay python2-parse-type))))
1404 (license license:bsd-3)))
1405
1406(define-public python2-parse-type
1407 (let ((base (package-with-python2
1408 (strip-python2-variant python-parse-type))))
1409 (package (inherit base)
1410 (propagated-inputs
1411 `(("python2-enum34" ,python2-enum34)
1412 ,@(package-propagated-inputs base))))))
1413
1414(define-public python-parse
1415 (package
1416 (name "python-parse")
1417 (version "1.8.4")
1418 (source
1419 (origin
1420 (method url-fetch)
1421 (uri (pypi-uri "parse" version))
1422 (sha256
1423 (base32
1424 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
1425 (build-system python-build-system)
1426 (arguments
1427 `(#:phases
1428 (modify-phases %standard-phases
1429 (replace 'check
1430 (lambda _ (invoke "python" "test_parse.py"))))))
1431 (home-page "https://github.com/r1chardj0n3s/parse")
1432 (synopsis "Parse strings")
1433 (description
1434 "Parse strings using a specification based on the Python @code{format()}
1435syntax.")
1436 (license license:x11)))
1437
1438(define-public python-polib
1439 (package
1440 (name "python-polib")
1441 (version "1.0.8")
1442 (source (origin
1443 (method url-fetch)
1444 (uri (pypi-uri "polib" version))
1445 (sha256
1446 (base32
1447 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1448 (build-system python-build-system)
1449 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1450 (synopsis "Manipulate, create and modify gettext files")
1451 (description "Polib can manipulate any gettext format (po, pot and mo)
1452files. It can be used to create po files from scratch or to modify
1453existing ones.")
1454 (license license:expat)))
1455
1456(define-public python2-polib
1457 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1458 (package
1459 (inherit base)
1460 (arguments `(,@(package-arguments base)
1461 ;; Tests don't work with python2.
1462 #:tests? #f)))))
1463
1464(define-public scons
1465 (package
1466 (name "scons")
05487ed8 1467 (version "3.0.4")
44d10b1f 1468 (source (origin
ad34338d
RW
1469 (method git-fetch)
1470 (uri (git-reference
1471 (url "https://github.com/SCons/scons.git")
1472 (commit version)))
1473 (file-name (git-file-name name version))
44d10b1f
RW
1474 (sha256
1475 (base32
05487ed8 1476 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
44d10b1f
RW
1477 (build-system python-build-system)
1478 (arguments
1479 `(#:use-setuptools? #f ; still relies on distutils
ad34338d
RW
1480 #:tests? #f ; no 'python setup.py test' command
1481 #:phases
1482 (modify-phases %standard-phases
1483 (add-before 'build 'bootstrap
1484 (lambda _
1485 (substitute* "src/engine/SCons/compat/__init__.py"
1486 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
1487 "sys.modules[new] = __import__(old)"))
05487ed8
RW
1488 (substitute* "src/engine/SCons/Platform/__init__.py"
1489 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
1490 "mod = __import__(full_name)"))
ad34338d
RW
1491 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
1492 (chdir "build/scons")
1493 #t)))))
44d10b1f
RW
1494 (home-page "http://scons.org/")
1495 (synopsis "Software construction tool written in Python")
1496 (description
1497 "SCons is a software construction tool. Think of SCons as an improved,
1498cross-platform substitute for the classic Make utility with integrated
1499functionality similar to autoconf/automake and compiler caches such as ccache.
1500In short, SCons is an easier, more reliable and faster way to build
1501software.")
1502 (license license:x11)))
1503
1504(define-public scons-python2
1505 (package
1506 (inherit (package-with-python2 scons))
1507 (name "scons-python2")))
1508
1509(define-public python-extras
1510 (package
1511 (name "python-extras")
1512 (version "1.0.0")
1513 (source
1514 (origin
1515 (method url-fetch)
1516 (uri (pypi-uri "extras" version))
1517 (sha256
1518 (base32
1519 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1520 (build-system python-build-system)
1521 (arguments
1522 ;; FIXME: Circular dependency on testtools.
1523 '(#:tests? #f))
1524 (home-page "https://github.com/testing-cabal/extras")
1525 (synopsis "Useful extensions to the Python standard library")
1526 (description
1527 "Extras is a set of extensions to the Python standard library.")
1528 (license license:expat)))
1529
1530(define-public python2-extras
1531 (package-with-python2 python-extras))
1532
1533(define-public python-mimeparse
1534 (package
1535 (name "python-mimeparse")
1536 (version "1.6.0")
1537 (source
1538 (origin
1539 (method url-fetch)
89bf667c 1540 (uri (pypi-uri "python-mimeparse" version))
44d10b1f
RW
1541 (sha256
1542 (base32
1543 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
1544 (build-system python-build-system)
1545 (arguments
1546 '(#:phases
1547 (modify-phases %standard-phases
1548 (replace 'check
1549 (lambda _
1550 (invoke "./mimeparse_test.py"))))))
1551 (home-page
1552 "https://github.com/dbtsai/python-mimeparse")
1553 (synopsis "Python library for parsing MIME types")
1554 (description
1555 "Mimeparse provides basic functions for parsing MIME type names and
1556matching them against a list of media-ranges.")
1557 (license license:expat)))
1558
1559(define-public python2-mimeparse
1560 (package-with-python2 python-mimeparse))
1561
1562(define-public python-miniboa
1563 (package
1564 (name "python-miniboa")
1565 (version "1.0.7")
1566 (source
1567 (origin
1568 (method url-fetch)
1569 (uri (pypi-uri "miniboa" version))
1570 (sha256
1571 (base32
1572 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
1573 (build-system python-build-system)
1574 (home-page "https://github.com/shmup/miniboa")
1575 (synopsis "Simple, single-threaded Telnet server")
1576 (description
1577 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
1578server.")
1579 (license license:asl2.0)))
1580
1581(define-public python2-miniboa
1582 (package-with-python2 python-miniboa))
1583
1584(define-public python-pafy
1585 (package
1586 (name "python-pafy")
1587 (version "0.5.3.1")
1588 (source
1589 (origin
1590 (method url-fetch)
1591 (uri (pypi-uri "pafy" version))
1592 (sha256
1593 (base32
1594 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1595 (build-system python-build-system)
1596 (arguments
1597 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1598 (propagated-inputs
1599 ;; Youtube-dl is a python package which is imported in the file
1600 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1601 `(("youtube-dl" ,youtube-dl)))
1602 (home-page "https://np1.github.io/pafy/")
1603 (synopsis "Retrieve YouTube content and metadata")
1604 (description
1605 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1606 (license license:lgpl3+)))
1607
1608(define-public python2-funcsigs
1609 (package
1610 (name "python2-funcsigs")
1611 (version "1.0.2")
1612 (source (origin
1613 (method url-fetch)
1614 (uri (pypi-uri "funcsigs" version))
1615 (sha256
1616 (base32
1617 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1618 (build-system python-build-system)
1619 (arguments
1620 `(#:python ,python-2))
1621 (native-inputs
1622 `(("python2-unittest2" ,python2-unittest2)))
1623 (home-page "http://funcsigs.readthedocs.org")
1624 (synopsis "Python function signatures from PEP362")
1625 (description
1626 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1627 (license license:asl2.0)))
1628
1629(define-public python2-funcsigs-bootstrap
1630 (package
1631 (inherit python2-funcsigs)
1632 (name "python2-funcsigs-bootstrap")
1633 (native-inputs `())
1634 (arguments
1635 `(#:tests? #f
1636 ,@(package-arguments python2-funcsigs)))))
1637
1638(define-public python-py
1639 (package
1640 (name "python-py")
1641 (version "1.5.4")
1642 (source
1643 (origin
1644 (method url-fetch)
1645 (uri (pypi-uri "py" version))
1646 (sha256
1647 (base32
1648 "1xxvwfn82457djf55f5n2c94699rfqnk43br8fif2r2q8gvrmm9z"))))
1649 (build-system python-build-system)
1650 (arguments
1651 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1652 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1653 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1654 ;; Is this module globally installed?"
1655 '(#:tests? #f))
1656 (native-inputs
1657 `(("python-setuptools-scm" ,python-setuptools-scm)))
1658 (home-page "https://github.com/pytest-dev/py")
1659 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1660 (description
1661 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1662code introspection, and logging.")
1663 (license license:expat)))
1664
1665(define-public python2-py
1666 (package-with-python2 python-py))
1667
1668;; Recent versions of python-fixtures and python-testrepository need
1669;; python-pbr for packaging, which itself needs these two packages for
1670;; testing.
1671;; To fix this circular dependency, we use a build of python-pbr, based on the
1672;; same source, just without any test dependencies and with tests disabled.
1673;; python-pbr-minmal is then used to package python-fixtures and
1674;; python-testrepository.
1675;; Strictly speaking we currently could remove the test-requirements from the
1676;; normal python-pbr package (and save this package) since test are disabled
1677;; there anyway. But this may change in future.
1678(define-public python-pbr-minimal
1679 (package
1680 (name "python-pbr-minimal")
1681 (version "3.0.1")
1682 (source
1683 (origin
1684 (method url-fetch)
1685 (uri (pypi-uri "pbr" version))
1686 (sha256
1687 (base32
1688 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1689 (build-system python-build-system)
1690 (arguments
1691 `(#:tests? #f))
1692 (home-page "http://docs.openstack.org/developer/pbr/")
1693 (synopsis "Minimal build of python-pbr used for bootstrapping")
1694 (description
1695 "Used only for bootstrapping python2-pbr, you should not need this.")
1696 (license license:asl2.0)))
1697
1698(define-public python2-pbr-minimal
1699 (package-with-python2 python-pbr-minimal))
1700
1701(define-public python-pbr
1702 (package
1703 (inherit python-pbr-minimal)
1704 (name "python-pbr")
1705 (arguments
1706 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1707 (propagated-inputs
1708 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1709 (native-inputs
1710 `(("python-fixtures" ,python-fixtures-bootstrap)
1711 ;; discover, coverage, hacking, subunit
1712 ("python-mock" ,python-mock)
1713 ("python-six" ,python-six)
1714 ("python-sphinx" ,python-sphinx)
1715 ("python-testrepository" ,python-testrepository-bootstrap)
1716 ("python-testresources" ,python-testresources-bootstrap)
1717 ("python-testscenarios" ,python-testscenarios-bootstrap)
1718 ("python-testtools" ,python-testtools-bootstrap)
1719 ("python-virtualenv" ,python-virtualenv)))
1720 (synopsis "Enhance the default behavior of Python’s setuptools")
1721 (description
1722 "Python Build Reasonableness (PBR) is a library that injects some useful
1723and sensible default behaviors into your setuptools run. It will set
1724versions, process requirements files and generate AUTHORS and ChangeLog file
1725from git information.
1726")))
1727
1728(define-public python2-pbr
1729 (package-with-python2 python-pbr))
1730
ea43f0d5
MB
1731(define-public python-pyrsistent
1732 (package
1733 (name "python-pyrsistent")
1734 (version "0.14.11")
1735 (home-page "https://github.com/tobgu/pyrsistent")
1736 (source (origin
1737 (method url-fetch)
1738 (uri (pypi-uri "pyrsistent" version))
1739 (sha256
1740 (base32
1741 "1qkh74bm296mp5g3r11lgsksr6bh4w1bf8pji4nmxdlfj542ga1w"))))
1742 (build-system python-build-system)
1743 (native-inputs
1744 `(("python-hypothesis" ,python-hypothesis)
1745 ("python-pytest" ,python-pytest)
1746 ("python-pytest-runner" ,python-pytest-runner)))
1747 (propagated-inputs
1748 `(("python-six" ,python-six)))
1749 (synopsis "Persistent data structures for Python")
1750 (description
1751 "Pyrsistent is a number of persistent collections (by some referred to as
1752functional data structures). Persistent in the sense that they are immutable.
1753
1754All methods on a data structure that would normally mutate it instead return a
1755new copy of the structure containing the requested updates. The original
1756structure is left untouched.")
1757 (license license:expat)))
1758
1759(define-public python2-pyrsistent
1760 (package-with-python2 python-pyrsistent))
1761
44d10b1f
RW
1762(define-public python-exif-read
1763 (package
1764 (name "python-exif-read")
1765 (version "2.1.2")
1766 (source (origin
1767 (method url-fetch)
1768 (uri (pypi-uri "ExifRead" version))
1769 (sha256
1770 (base32
1771 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
1772 (build-system python-build-system)
1773 (arguments `(#:tests? #f)) ; no tests
1774 (home-page "https://github.com/ianare/exif-py")
1775 (synopsis "Python library to extract EXIF data from image files")
1776 (description
1777 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1778files.")
1779 (license license:bsd-3)))
1780
1781(define-public python2-exif-read
1782 (package-with-python2 python-exif-read))
1783
1784(define-public python-pyld
1785 (package
1786 (name "python-pyld")
1787 (version "1.0.3")
1788 (source (origin
1789 (method url-fetch)
1790 (uri (pypi-uri "PyLD" version))
1791 (sha256
1792 (base32
1793 "12i2g6xdj30k7xxcibg3sc5y76snwq8l6n8fy9lyi577kgy0h2pm"))))
1794 (build-system python-build-system)
1795 (home-page "https://github.com/digitalbazaar/pyld")
1796 (synopsis "Python implementation of the JSON-LD specification")
1797 (description
1798 "PyLD is an implementation of the JSON-LD specification.")
1799 (license license:bsd-3)))
1800
1801(define-public python2-pyld
1802 (package-with-python2 python-pyld))
1803
1804(define-public python-click
1805 (package
1806 (name "python-click")
61984855 1807 (version "7.0")
44d10b1f
RW
1808 (source
1809 (origin
1810 (method url-fetch)
1811 (uri (pypi-uri "click" version))
1812 (sha256
1813 (base32
61984855 1814 "1mzjixd4vjbjvzb6vylki9w1556a9qmdh35kzmq6cign46av952v"))))
44d10b1f
RW
1815 (build-system python-build-system)
1816 (arguments
8d7e7ca6 1817 `(#:phases
44d10b1f
RW
1818 (modify-phases %standard-phases
1819 (add-after 'unpack 'fix-paths
1820 (lambda* (#:key inputs #:allow-other-keys)
1821 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
1822 "cross-libc" "libc"))))
1823 (substitute* "click/_unicodefun.py"
1824 (("'locale'")
1825 (string-append "'" glibc "/bin/locale'"))))
8d7e7ca6
EF
1826 #t))
1827 (replace 'check
1828 (lambda _
1829 (invoke "python" "-m" "pytest"))))))
44d10b1f
RW
1830 (native-inputs
1831 `(("python-pytest" ,python-pytest)))
61984855 1832 (home-page "https://palletsprojects.com/p/click/")
44d10b1f
RW
1833 (synopsis "Command line library for Python")
1834 (description
1835 "Click is a Python package for creating command line interfaces in a
1836composable way with as little code as necessary. Its name stands for
1837\"Command Line Interface Creation Kit\". It's highly configurable but comes
1838with sensible defaults out of the box.")
1839 (license license:bsd-3)))
1840
1841(define-public python2-click
1842 (package-with-python2 python-click))
1843
1844(define-public python-wheel
1845 (package
1846 (name "python-wheel")
746c074b 1847 (version "0.32.3")
44d10b1f
RW
1848 (source
1849 (origin
1850 (method url-fetch)
1851 (uri (pypi-uri "wheel" version))
1852 (sha256
1853 (base32
746c074b 1854 "1dhxl1bf18bx9szmqcnxbg6204hp3im8089q3hkwh5jfa6zh75q2"))))
44d10b1f
RW
1855 (build-system python-build-system)
1856 (native-inputs
1857 `(("python-jsonschema" ,python-jsonschema)
1858 ("python-pytest-cov" ,python-pytest-cov)))
1859 (home-page "https://bitbucket.org/pypa/wheel/")
1860 (synopsis "Format for built Python packages")
1861 (description
1862 "A wheel is a ZIP-format archive with a specially formatted filename and
1863the @code{.whl} extension. It is designed to contain all the files for a PEP
1864376 compatible install in a way that is very close to the on-disk format. Many
1865packages will be properly installed with only the @code{Unpack} step and the
1866unpacked archive preserves enough information to @code{Spread} (copy data and
1867scripts to their final locations) at any later time. Wheel files can be
1868installed with a newer @code{pip} or with wheel's own command line utility.")
1869 (license license:expat)
1870 (properties `((python2-variant . ,(delay python2-wheel))))))
1871
1872(define-public python2-wheel
1873 (let ((wheel (package-with-python2
1874 (strip-python2-variant python-wheel))))
1875 (package (inherit wheel)
1876 (native-inputs `(("python2-functools32" ,python2-functools32)
1877 ,@(package-native-inputs wheel))))))
1878
1879(define-public python-vcversioner
1880 (package
1881 (name "python-vcversioner")
1882 (version "2.16.0.0")
1883 (source
1884 (origin
1885 (method url-fetch)
1886 (uri (pypi-uri "vcversioner" version))
1887 (sha256
1888 (base32
1889 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
1890 (build-system python-build-system)
1891 (synopsis "Python library for version number discovery")
1892 (description "Vcversioner is a Python library that inspects tagging
1893information in a variety of version control systems in order to discover
1894version numbers.")
1895 (home-page "https://github.com/habnabit/vcversioner")
1896 (license license:isc)))
1897
1898(define-public python2-vcversioner
1899 (package-with-python2 python-vcversioner))
1900
5591fc4f
MC
1901(define-public python-jdcal
1902 (package
1903 (name "python-jdcal")
1904 (version "1.4")
1905 (source
1906 (origin
1907 (method url-fetch)
1908 (uri (pypi-uri "jdcal" version))
1909 (sha256
1910 (base32
1911 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
1912 (build-system python-build-system)
1913 (arguments
1914 `(#:phases (modify-phases %standard-phases
1915 (replace 'check
1916 (lambda _
1917 (invoke "pytest"))))))
1918 (native-inputs
1919 `(("python-pytest" ,python-pytest)))
1920 (home-page "https://github.com/phn/jdcal")
1921 (synopsis "Functions to convert between Julian dates Gregorian dates")
1922 (description "This Python library provides functions for converting
1923between Julian dates and Gregorian dates.")
1924 (license license:bsd-2)))
1925
1926(define-public python2-jdcal
1927 (package-with-python2 python-jdcal))
1928
44d10b1f
RW
1929(define-public python-jsonschema
1930 (package
1931 (name "python-jsonschema")
1adde06e 1932 (version "3.0.1")
44d10b1f
RW
1933 (source (origin
1934 (method url-fetch)
786ccb87 1935 (uri (pypi-uri "jsonschema" version))
44d10b1f
RW
1936 (sha256
1937 (base32
1adde06e 1938 "03g20i1xfg4qdlk4475pl4pp7y0h37g1fbgs5qhy678q9xb822hc"))))
44d10b1f
RW
1939 (build-system python-build-system)
1940 (arguments
1941 '(#:phases
1942 (modify-phases %standard-phases
1adde06e
MB
1943 (replace 'check
1944 (lambda _
1945 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
1946 (invoke "trial" "jsonschema"))))))
44d10b1f 1947 (native-inputs
1adde06e
MB
1948 `(("python-setuptools_scm" ,python-setuptools-scm)
1949 ("python-twisted" ,python-twisted)))
1950 (propagated-inputs
1951 `(("python-attrs" ,python-attrs)
1952 ("python-pyrsistent" ,python-pyrsistent)
1953 ("python-six" ,python-six)))
44d10b1f
RW
1954 (home-page "https://github.com/Julian/jsonschema")
1955 (synopsis "Implementation of JSON Schema for Python")
1956 (description
1957 "Jsonschema is an implementation of JSON Schema for Python.")
1958 (license license:expat)
1959 (properties `((python2-variant . ,(delay python2-jsonschema))))))
1960
1961(define-public python2-jsonschema
1962 (let ((jsonschema (package-with-python2
1963 (strip-python2-variant python-jsonschema))))
1964 (package (inherit jsonschema)
44d10b1f 1965 (propagated-inputs
1adde06e
MB
1966 `(("python2-functools32" ,python2-functools32)
1967 ,@(package-propagated-inputs jsonschema))))))
44d10b1f
RW
1968
1969(define-public python-schema
1970 (package
1971 (name "python-schema")
1972 (version "0.6.6")
1973 (source
1974 (origin
1975 (method url-fetch)
1976 (uri (pypi-uri "schema" version))
1977 (sha256
1978 (base32
1979 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
1980 (build-system python-build-system)
1981 (native-inputs
1982 `(("python-pytest" ,python-pytest)))
1983 (home-page "https://github.com/keleshev/schema")
1984 (synopsis "Simple data validation library")
1985 (description
1986 "@code{python-schema} is a library for validating Python data
1987structures, such as those obtained from config-files, forms, external
1988services or command-line parsing, converted from JSON/YAML (or
1989something else) to Python data-types.")
1990 (license license:psfl)))
1991
1992(define-public python2-schema
1993 (package-with-python2 python-schema))
1994
1995(define-public python-schema-0.5
1996 (package (inherit python-schema)
1997 (version "0.5.0")
1998 (source
1999 (origin
2000 (method url-fetch)
2001 (uri (pypi-uri "schema" version))
2002 (sha256
2003 (base32
2004 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2005
2006(define-public python2-schema-0.5
2007 (package-with-python2 python-schema-0.5))
2008
2009(define-public python-kitchen
2010 (package
2011 (name "python-kitchen")
2012 (version "1.2.5")
2013 (source
2014 (origin
2015 (method url-fetch)
2016 (uri (pypi-uri "kitchen" version))
2017 (sha256
2018 (base32
2019 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2020 (build-system python-build-system)
2021 (propagated-inputs
2022 `(("python-chardet" ,python-chardet)))
2023 (home-page "https://github.com/fedora-infra/kitchen")
2024 (synopsis "Python API for snippets")
2025 (description "@code{kitchen} module provides a python API for all sorts of
2026little useful snippets of code that everybody ends up writing for their projects
2027but never seem big enough to build an independent release. Use kitchen and stop
2028cutting and pasting that code over and over.")
2029 (license (list license:lgpl2.1+
2030 ;; subprocess.py, test_subprocess.py,
2031 ;; kitchen/pycompat25/defaultdict.py:
2032 license:psfl))))
2033
2034(define-public python2-kitchen
2035 (package-with-python2 python-kitchen))
2036
2037(define-public python-unidecode
2038 (package
2039 (name "python-unidecode")
2040 (version "1.0.23")
2041 (source (origin
2042 (method url-fetch)
2043 (uri (pypi-uri "Unidecode" version))
2044 (sha256
2045 (base32
2046 "1ysjbr3nqfqj97h8zyj3v9pya413vkv7a1mzml80w37xx15kb1cb"))))
2047 (build-system python-build-system)
2048 (home-page "https://pypi.python.org/pypi/Unidecode")
2049 (synopsis "ASCII transliterations of Unicode text")
2050 (description
2051 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2052useful when integrating with legacy code that doesn't support Unicode, or for
2053ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2054machine identifiers from human-readable Unicode strings that should still be
2055somewhat intelligible.")
2056 (license license:gpl2+)))
2057
2058(define-public python2-unidecode
2059 (package-with-python2 python-unidecode))
2060
2061(define-public python-pyjwt
2062 (package
2063 (name "python-pyjwt")
2064 (version "1.5.3")
2065 (source
2066 (origin
2067 (method url-fetch)
2068 (uri (pypi-uri "PyJWT" version))
2069 (sha256
2070 (base32
2071 "1rxsg14i33vm2i6lz0my628108c81k43v10n4h3p0gx62xdyf2sh"))
2072 (modules '((guix build utils)))
2073 (snippet
2074 '(begin
2075 (for-each delete-file-recursively
2076 (find-files "." "\\.pyc$"))
2077 #t))))
2078 (build-system python-build-system)
2079 (native-inputs
2080 `(("python-pytest" ,python-pytest)
2081 ("python-pytest-cov" ,python-pytest-cov)
2082 ("python-pytest-runner" ,python-pytest-runner)))
2083 (home-page "https://github.com/progrium/pyjwt")
2084 (synopsis "JSON Web Token implementation in Python")
2085 (description
2086 "PyJWT is a JSON Web Token implementation written in Python.")
2087 (license license:expat)))
2088
2089(define-public python2-pyjwt
2090 (package-with-python2 python-pyjwt))
2091
2092(define-public python-pykka
2093 (package
2094 (name "python-pykka")
2095 (version "1.2.1")
2096 (source
2097 (origin
2098 (method url-fetch)
2099 (uri (pypi-uri "Pykka" version))
2100 (sha256
2101 (base32
2102 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2103 (build-system python-build-system)
2104 (native-inputs
2105 `(("python-mock" ,python-mock)
2106 ("python-nose" ,python-nose)
2107 ("python-gevent" ,python-gevent)
2108 ("python-eventlet" ,python-eventlet)))
2109 (home-page "https://www.pykka.org/")
2110 (synopsis "Pykka is a Python implementation of the actor model")
2111 (description
2112 "Pykka is a Python implementation of the actor model.
2113The actor model introduces some simple rules to control the sharing
2114of state and cooperation between execution units, which makes it
2115easier to build concurrent applications.")
2116 (license license:asl2.0)))
2117
2118(define-public python2-pykka
2119 (package-with-python2 python-pykka))
2120
8d22f7e3
VC
2121(define-public python-pymsgbox
2122 (package
2123 (name "python-pymsgbox")
2124 (version "1.0.6")
2125 (source
2126 (origin
2127 (method git-fetch)
2128 (uri (git-reference
2129 ;; LICENSE.txt is not present on pypi
2130 (url "https://github.com/asweigart/PyMsgBox")
2131 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
2132 (file-name (git-file-name name version))
2133 (sha256
2134 (base32
2135 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
2136 (arguments
2137 ;; Circular dependency to run tests:
2138 ;; Tests need pyautogui, which depends on pymsgbox.
2139 '(#:tests? #f))
2140 (build-system python-build-system)
2141 (home-page "https://github.com/asweigart/PyMsgBox")
2142 (synopsis "Python module for JavaScript-like message boxes")
2143 (description
2144 "PyMsgBox is a simple, cross-platform, pure Python module for
2145JavaScript-like message boxes. Types of dialog boxes include:
2146@enumerate
2147@item alert
2148@item confirm
2149@item prompt
2150@item password
2151@end enumerate
2152")
2153 (license license:bsd-3)))
2154
44d10b1f
RW
2155(define-public python-pympler
2156 (package
2157 (name "python-pympler")
2158 (home-page "https://pythonhosted.org/Pympler/")
2159 (version "0.5")
2160 (source (origin
2161 (method url-fetch)
2162 (uri (pypi-uri "Pympler" version))
2163 (sha256
2164 (base32
2165 "03qwsbilqgvnbl3a1jmpgixbr2kq6m3fvdlzyr3wdp01bwlc85kx"))))
2166 (build-system python-build-system)
2167 (arguments
2168 `(#:phases (modify-phases %standard-phases
2169 (delete 'check)
2170 (add-after 'install 'check
2171 (lambda* (#:key inputs outputs #:allow-other-keys)
2172 (add-installed-pythonpath inputs outputs)
2173 (invoke "python" "setup.py" "test"))))))
2174 (synopsis "Measure, monitor and analyze memory behavior")
2175 (description
2176 "Pympler is a development tool to measure, monitor and analyze
2177the memory behavior of Python objects in a running Python application.
2178
2179By pympling a Python application, detailed insight in the size and the
2180lifetime of Python objects can be obtained. Undesirable or unexpected
2181runtime behavior like memory bloat and other @samp{pymples} can easily
2182be identified.
2183
2184A web profiling frontend exposes process statistics, garbage
2185visualisation and class tracker statistics.")
2186 (license license:asl2.0)))
2187
2188(define-public python2-pympler
2189 (package-with-python2 python-pympler))
2190
2191(define-public python-itsdangerous
2192 (package
2193 (name "python-itsdangerous")
acfcf2ed 2194 (version "1.1.0")
44d10b1f
RW
2195 (source
2196 (origin
2197 (method url-fetch)
acfcf2ed 2198 (uri (pypi-uri "itsdangerous" version))
44d10b1f
RW
2199 (sha256
2200 (base32
acfcf2ed 2201 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
44d10b1f 2202 (build-system python-build-system)
acfcf2ed 2203 (home-page "https://palletsprojects.com/p/itsdangerous/")
44d10b1f
RW
2204 (synopsis "Python library for passing data to/from untrusted environments")
2205 (description
2206 "Itsdangerous provides various helpers to pass trusted data to untrusted
2207environments and back.")
2208 (license license:bsd-3)))
2209
2210(define-public python2-itsdangerous
2211 (package-with-python2 python-itsdangerous))
2212
2213(define-public python-pyyaml
2214 (package
2215 (name "python-pyyaml")
2216 (version "3.13")
2217 (source
2218 (origin
2219 (method url-fetch)
2220 (uri (pypi-uri "PyYAML" version))
2221 (sha256
2222 (base32
2223 "1gx603g484z46cb74j9rzr6sjlh2vndxayicvlyhxdz98lhhkwry"))))
2224 (build-system python-build-system)
2225 (inputs
2226 `(("libyaml" ,libyaml)))
2227 (home-page "http://pyyaml.org/wiki/PyYAML")
2228 (synopsis "YAML parser and emitter for Python")
2229 (description
2230 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2231complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2232API, and sensible error messages. PyYAML supports standard YAML tags and
2233provides Python-specific tags that allow to represent an arbitrary Python
2234object.")
2235 (license license:expat)))
2236
2237(define-public python2-pyyaml
2238 (package-with-python2 python-pyyaml))
2239
2240(define-public python-vine
2241 (package
2242 (name "python-vine")
2243 (version "1.1.4")
2244 (source
2245 (origin
2246 (method url-fetch)
2247 (uri (pypi-uri "vine" version))
2248 (sha256
2249 (base32
2250 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
2251 (build-system python-build-system)
2252 (native-inputs
2253 `(("python-pytest" ,python-pytest)
2254 ("python-case" ,python-case)))
2255 (home-page "https://github.com/celery/vine")
2256 (synopsis "Promises for Python")
2257 (description
2258 "@code{vine} provides a special implementation of promises in that it can
2259be used both for \"promise of a value\" and lazy evaluation. The biggest
2260upside for this is that everything in a promise can also be a promise,
2261e.g. filters, callbacks and errbacks can all be promises.")
2262 (license license:bsd-3)))
2263
2264(define-public python-virtualenv
2265 (package
2266 (name "python-virtualenv")
2782bd51 2267 (version "16.1.0")
44d10b1f
RW
2268 (source
2269 (origin
2270 (method url-fetch)
2271 (uri (pypi-uri "virtualenv" version))
2272 (sha256
2273 (base32
2782bd51 2274 "0242cg3hdq3qdvx5flyrki8lpwlgwf5k45c21ks5049fv7ygm6gq"))))
44d10b1f
RW
2275 (build-system python-build-system)
2276 (arguments
2277 `(#:phases
2278 (modify-phases %standard-phases
2782bd51 2279 (add-before 'check 'disable-failing-test
44d10b1f
RW
2280 (lambda _
2281 ;; Disable failing test. See upstream bug report
2282 ;; https://github.com/pypa/virtualenv/issues/957
2283 (substitute* "tests/test_virtualenv.py"
2284 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2782bd51 2285 #t)))))
44d10b1f
RW
2286 (native-inputs
2287 `(("python-mock" ,python-mock)
2288 ("python-pytest" ,python-pytest)))
2289 (home-page "https://virtualenv.pypa.io/")
2290 (synopsis "Virtual Python environment builder")
2291 (description
2292 "Virtualenv is a tool to create isolated Python environments.")
2293 (license license:expat)))
2294
2295(define-public python2-virtualenv
2296 (package-with-python2 python-virtualenv))
2297
2298(define-public python-markupsafe
2299 (package
2300 (name "python-markupsafe")
2301 (version "1.0")
2302 (source
2303 (origin
2304 (method url-fetch)
5182927c 2305 (uri (pypi-uri "MarkupSafe" version))
44d10b1f
RW
2306 (sha256
2307 (base32
2308 "0rdn1s8x9ni7ss8rfiacj7x1085lx8mh2zdwqslnw8xc3l4nkgm6"))))
2309 (build-system python-build-system)
2310 (home-page "https://github.com/mitsuhiko/markupsafe")
2311 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2312 (description
2313 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2314for Python.")
2315 (license license:bsd-3)))
2316
2317(define-public python2-markupsafe
2318 (package-with-python2 python-markupsafe))
2319
2320(define-public python-jinja2
2321 (package
2322 (name "python-jinja2")
2323 (version "2.10")
2324 (source
2325 (origin
2326 (method url-fetch)
2327 (uri (pypi-uri "Jinja2" version))
2328 (sha256
2329 (base32
2330 "190l36hfw3wb2n3n68yacjabxyb1pnxwn7vjx96cmjj002xy2jzq"))))
2331 (build-system python-build-system)
2332 (propagated-inputs
2333 `(("python-markupsafe" ,python-markupsafe)))
2334 (home-page "http://jinja.pocoo.org/")
2335 (synopsis "Python template engine")
2336 (description
2337 "Jinja2 is a small but fast and easy to use stand-alone template engine
2338written in pure Python.")
2339 (license license:bsd-3)))
2340
2341(define-public python2-jinja2
2342 (package-with-python2 python-jinja2))
2343
2344(define-public python-pystache
2345 (package
2346 (name "python-pystache")
2347 (version "0.5.4")
2348 (source (origin
2349 (method url-fetch)
2350 (uri (pypi-uri "pystache" version))
2351 (sha256
2352 (base32
2353 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2354 (build-system python-build-system)
2355 (arguments
2356 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2357 (home-page "http://defunkt.io/pystache/")
2358 (synopsis "Python logic-less template engine")
2359 (description
2360 "Pystache is a Python implementation of the framework agnostic,
2361logic-free templating system Mustache.")
2362 (license license:expat)
2363 (properties `((python2-variant . ,(delay python2-pystache))))))
2364
2365(define-public python2-pystache
2366 (package (inherit (package-with-python2
2367 (strip-python2-variant python-pystache)))
2368 (arguments
2369 `(#:python ,python-2
2370 #:phases
2371 (modify-phases %standard-phases
2372 (replace 'check
2373 (lambda _
dfafc29b 2374 (invoke "python" "test_pystache.py"))))))))
44d10b1f
RW
2375
2376(define-public python-joblib
2377 (package
2378 (name "python-joblib")
2379 (version "0.13.0")
2380 (source (origin
2381 (method url-fetch)
2382 (uri (pypi-uri "joblib" version))
2383 (sha256
2384 (base32
2385 "0612nazad8dxmn3xghfrmjax6456l4xy6hn9cngs7vydi14ds7v5"))))
2386 (build-system python-build-system)
2387 (arguments
2388 `(#:phases
2389 (modify-phases %standard-phases
2390 (replace 'check
2391 (lambda _ (invoke "pytest" "-v" "joblib"))))))
2392 (native-inputs
2393 `(("python-pytest" ,python-pytest)))
2394 (home-page "https://joblib.readthedocs.io/")
2395 (synopsis "Using Python functions as pipeline jobs")
2396 (description
2397 "Joblib is a set of tools to provide lightweight pipelining in Python.
2398In particular, joblib offers: transparent disk-caching of the output values
2399and lazy re-evaluation (memoize pattern), easy simple parallel computing
2400logging and tracing of the execution.")
2401 (license license:bsd-3)))
2402
2403(define-public python2-joblib
2404 (package-with-python2 python-joblib))
2405
a3363341
VC
2406(define-public python-daemon
2407 (package
2408 (name "python-daemon")
2409 (version "2.2.3")
2410 (source
2411 (origin
2412 (method url-fetch)
2413 (uri (pypi-uri "python-daemon" version))
2414 (sha256
2415 (base32
2416 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
2417 (build-system python-build-system)
2418 (arguments
2419 `(#:phases
2420 (modify-phases %standard-phases
2421 (add-before 'check 'disable-tests
2422 (lambda _
2423 ;; FIXME: Determine why test fails
2424 (substitute* "test/test_daemon.py"
2425 (("test_detaches_process_context")
2426 "skip_test_detaches_process_context"))
2427 #t)))))
2428 (propagated-inputs
2429 `(("python-lockfile" ,python-lockfile)))
2430 (native-inputs
2431 `(("python-unittest2" ,python-unittest2)
2432 ("python-testtools" ,python-testtools)
2433 ("python-testscenarios" ,python-testscenarios)
2434 ("python-mock" ,python-mock)
2435 ("python-docutils" ,python-docutils)))
2436 (home-page "https://pagure.io/python-daemon/")
2437 (synopsis "Python library for making a Unix daemon process")
2438 (description "Python-daemon is a library that assists a Python program to
2439turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
2440
2441This library provides a @code{DaemonContext} class that manages the following
2442important tasks for becoming a daemon process:
2443@enumerate
2444@item Detach the process into its own process group.
2445@item Set process environment appropriate for running inside a chroot.
2446@item Renounce suid and sgid privileges.
2447@item Close all open file descriptors.
2448@item Change the working directory, uid, gid, and umask.
2449@item Set appropriate signal handlers.
2450@item Open new file descriptors for stdin, stdout, and stderr.
2451@item Manage a specified PID lock file.
2452@item Register cleanup functions for at-exit processing.
2453@end enumerate")
2454 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
2455 (license (list license:asl2.0 license:gpl3+))))
2456
44d10b1f
RW
2457(define-public python-docutils
2458 (package
2459 (name "python-docutils")
2460 (version "0.14")
2461 (source
2462 (origin
2463 (method url-fetch)
2464 (uri (pypi-uri "docutils" version))
2465 (sha256
2466 (base32
2467 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2468 (build-system python-build-system)
2469 (arguments
2470 '(#:tests? #f)) ; no setup.py test command
2471 (home-page "http://docutils.sourceforge.net/")
2472 (synopsis "Python Documentation Utilities")
2473 (description
2474 "Docutils is a modular system for processing documentation into useful
2475formats, such as HTML, XML, and LaTeX. For input Docutils supports
2476reStructuredText.")
2477 ;; Most of the source code is public domain, but some source files are
2478 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2479 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2480
2481(define-public python2-docutils
2482 (package-with-python2 python-docutils))
2483
2484(define-public python-pygments
2485 (package
2486 (name "python-pygments")
2487 (version "2.2.0")
2488 (source
2489 (origin
2490 (method url-fetch)
2491 (uri (pypi-uri "Pygments" version))
2492 (sha256
2493 (base32
2494 "1k78qdvir1yb1c634nkv6rbga8wv4289xarghmsbbvzhvr311bnv"))))
2495 (build-system python-build-system)
2496 (arguments
2497 ;; FIXME: Tests require sphinx, which depends on this.
2498 '(#:tests? #f))
2499 (home-page "http://pygments.org/")
2500 (synopsis "Syntax highlighting")
2501 (description
2502 "Pygments is a syntax highlighting package written in Python.")
2503 (license license:bsd-2)))
2504
2505(define-public python2-pygments
2506 (package-with-python2 python-pygments))
2507
0f0a5ef9
MC
2508(define-public python-bumpversion
2509 (package
2510 (name "python-bumpversion")
2511 (version "0.5.3")
2512 (source
2513 (origin
2514 (method url-fetch)
2515 (uri (pypi-uri "bumpversion" version))
2516 (sha256
2517 (base32
2518 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
2519 (build-system python-build-system)
2520 (home-page "https://github.com/peritus/bumpversion")
2521 (synopsis "Tool to bump software version")
2522 (description "This tool provides a command-line interface (CLI) to bump a
2523software version simply.")
2524 (license license:expat)))
2525
b24fd2c2
MC
2526(define-public python-deprecated
2527 (package
2528 (name "python-deprecated")
2529 (version "1.2.5")
2530 (source
2531 (origin
2532 (method git-fetch)
2533 (uri (git-reference
2534 (url "https://github.com/tantale/deprecated.git")
2535 (commit (string-append "v" version))))
2536 (file-name (git-file-name name version))
2537 (sha256
2538 (base32
2539 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
2540 (build-system python-build-system)
2541 (arguments
2542 `(#:phases (modify-phases %standard-phases
2543 (replace 'check
2544 (lambda _
2545 (invoke "pytest"))))))
2546 (propagated-inputs
2547 `(("python-wrapt" ,python-wrapt)))
2548 (native-inputs
2549 `(("python-bumpversion" ,python-bumpversion)
2550 ("python-pytest" ,python-pytest)
2551 ("python-pytest-cov" ,python-pytest-cov)
2552 ("python-sphinx" ,python-sphinx)
2553 ("python-tox" ,python-tox)))
2554 (home-page "https://github.com/tantale/deprecated")
2555 (synopsis "Python decorator to deprecate classes, functions or methods")
2556 (description "The @code{deprecated} decorator provides a convenient way to deprecate
2557to deprecate classes, functions or methods.")
2558 (license license:expat)))
2559
d5a998fa
MC
2560(define-public python-pygithub
2561 (package
2562 (name "python-pygithub")
2563 (version "1.43.7")
2564 (source
2565 ;; We fetch from the Git repo because there are no tests in the PyPI
2566 ;; archive.
2567 (origin
2568 (method git-fetch)
2569 (uri (git-reference
2570 (url "https://github.com/PyGithub/PyGithub.git")
2571 (commit (string-append "v" version))))
2572 (file-name (git-file-name name version))
2573 (sha256
2574 (base32
2575 "0ww92zz0ja9w6rw83vphmn8rwmcn6abg16j4q7zxjc0rrg2cfj9i"))))
2576 (build-system python-build-system)
2577 (arguments
2578 `(#:phases (modify-phases %standard-phases
2579 ;; Some tests rely on the network.
2580 (add-after 'unpack 'disable-failing-tests
2581 (lambda _
2582 (substitute* "tests/Issue142.py"
2583 (("testDecodeJson") "disabled_testDecodeJson"))
2584 #t))
2585 (add-before 'check 'prepare-for-tests
2586 (lambda _
2587 (for-each (lambda (f)
2588 (chmod f #o666))
2589 (find-files "./tests"))
2590 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
2591 (setenv "PYTHONPATH"
2592 (string-append "./tests:" (getenv "PYTHONPATH")))
2593 #t)))))
2594 (propagated-inputs
2595 `(("python-deprecated" ,python-deprecated)
2596 ("python-pyjwt" ,python-pyjwt)
2597 ("python-requests" ,python-requests)))
2598 (native-inputs `(("python-httpretty" ,python-httpretty)))
2599 (home-page "https://pygithub.readthedocs.io/en/latest/")
2600 (synopsis "Python library for the GitHub API")
2601 (description "This library allows managing GitHub resources such as
2602repositories, user profiles, and organizations in your Python applications,
2603using version 3 of the GitHub application programming interface (API).")
2604 (license license:lgpl3+)))
2605
c0c0bb38
MC
2606(define-public python-rellu
2607 (package
2608 (name "python-rellu")
2609 (version "0.7")
2610 (source
2611 (origin
2612 (method url-fetch)
2613 (uri (pypi-uri "rellu" version))
2614 (sha256
2615 (base32
2616 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
2617 (build-system python-build-system)
2618 (propagated-inputs
2619 `(("python-invoke" ,python-invoke)
2620 ("python-pygithub" ,python-pygithub)))
2621 (home-page "https://github.com/robotframework/rellu")
2622 (synopsis "Utilities to create PyPI releases")
2623 (description "This collection of utilities contains tooling and templates
2624to assist in creating releases on GitHub and publishing them on PyPI. It is
2625designed to be used by Robot Framework and tools and libraries in its
2626ecosystem, but can naturally be used also by other projects.")
2627 (license license:asl2.0)))
2628
b9790285
MC
2629(define-public python-robotframework
2630 (package
2631 (name "python-robotframework")
2632 (version "3.1.1")
2633 ;; There are no tests in the PyPI archive.
2634 (source
2635 (origin
2636 (method git-fetch)
2637 (uri (git-reference
2638 (url "https://github.com/robotframework/robotframework.git")
2639 (commit (string-append "v" version))))
2640 (file-name (git-file-name name version))
2641 (sha256
2642 (base32
2643 "1aaiamc9l35m5sf7xl2qc5q9308v7sz3p1qgzcslsjxzddphyn4v"))
2644 (patches (search-patches
2645 "python-robotframework-honor-source-date-epoch.patch"))))
2646 (build-system python-build-system)
2647 (arguments
2648 `(#:phases (modify-phases %standard-phases
2649 (add-before 'build 'build-and-install-doc
2650 (lambda* (#:key outputs #:allow-other-keys)
2651 (let* ((doc-output (assoc-ref outputs "doc"))
2652 (doc (string-append doc-output "/share/"
2653 ,name "-" ,version "/")))
2654 (invoke "invoke" "library-docs" "all")
2655 (mkdir-p doc)
2656 (copy-recursively "doc/libraries"
2657 (string-append doc "/libraries"))
2658 #t)))
2659 (replace 'check
2660 (lambda _
2661 (invoke "python" "utest/run.py"))))))
2662 (native-inputs
2663 `(("python-invoke" ,python-invoke)
2664 ("python-rellu" ,python-rellu)
2665 ("python:tk" ,python "tk"))) ;used when building the HTML doc
2666 (outputs '("out" "doc"))
2667 (home-page "https://robotframework.org")
2668 (synopsis "Generic automation framework")
2669 (description "Robot Framework is a generic automation framework for
2670acceptance testing, acceptance test driven development (ATDD), and robotic
2671process automation (RPA).")
2672 (license license:asl2.0)))
2673
5b84c120
MC
2674(define-public python-robotframework-lint
2675 ;; There is no properly tagged release; the commit below seems to correspond
2676 ;; to the 0.9 stable release available from PyPI. The tests are not
2677 ;; included in the PyPI archive, so we fetch the sources from the upstream
2678 ;; Git repo.
2679 (let ((commit "e851879bab1f63e4e53b34a4dc8a67ed95102830")
2680 (revision "1"))
2681 (package
2682 (name "python-robotframework-lint")
2683 (version (git-version "0.9.0" revision commit))
2684 (source
2685 (origin
2686 (method git-fetch)
2687 (uri (git-reference
2688 (url "https://github.com/boakley/robotframework-lint.git")
2689 (commit commit)))
2690 (file-name (git-file-name name version))
2691 (sha256
2692 (base32
2693 "1p6fknqg5sb9qz5857ji4a877657vgfjm5v3zn45994parx6ml1m"))))
2694 (build-system python-build-system)
2695 (arguments
2696 `(#:phases
2697 (modify-phases %standard-phases
2698 (replace 'check
2699 (lambda _
2700 (invoke "python" "-m" "robot" "-A"
2701 "tests/conf/default.args" "tests"))))))
2702 (propagated-inputs
2703 `(("python-robotframework" ,python-robotframework)))
2704 (home-page "https://github.com/boakley/robotframework-lint/")
2705 (synopsis "Static analysis tool (linter) for Robot Framework")
2706 (description "This package provides the @code{rflint} command-line
2707utility, a static analysis tool (linter) for Robot Framework source files.")
2708 (license license:asl2.0))))
2709
c0c64f17
MC
2710(define-public python-robotframework-sshlibrary
2711 (package
2712 (name "python-robotframework-sshlibrary")
2713 (version "3.3.0")
2714 ;; There are no tests in the PyPI archive.
2715 (source
2716 (origin
2717 (method git-fetch)
2718 (uri (git-reference
2719 (url "https://github.com/robotframework/SSHLibrary.git")
2720 (commit (string-append "v" version))))
2721 (file-name (git-file-name name version))
2722 (sha256
2723 (base32
2724 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
2725 (build-system python-build-system)
2726 (arguments
2727 `(#:phases
2728 (modify-phases %standard-phases
2729 (add-before 'build 'build-and-install-doc
2730 (lambda* (#:key outputs #:allow-other-keys)
2731 (let* ((doc-output (assoc-ref outputs "doc"))
2732 (doc (string-append doc-output "/share/"
2733 ,name "-" ,version "/")))
2734 (invoke "chmod" "-R" "+w" "docs")
2735 (invoke "invoke" "kw-docs" "project-docs")
2736 (mkdir-p doc)
2737 (for-each delete-file (find-files "docs" "\\.rst"))
2738 (copy-recursively "docs" doc)
2739 #t)))
2740 (replace 'check
2741 (lambda _
2742 ;; Some tests require an SSH server; we remove them.
2743 (delete-file "utest/test_client_api.py")
2744 (delete-file "utest/test_scp.py")
2745 (invoke "python" "utest/run.py"))))))
2746 (propagated-inputs
2747 `(("python-robotframework" ,python-robotframework)
2748 ("python-paramiko" ,python-paramiko)
2749 ("python-scp" ,python-scp)))
2750 (native-inputs
2751 `(("openssh" ,openssh)
2752 ("which" ,which)
2753 ;; To generate the documentation
2754 ("python-docutils" ,python-docutils)
2755 ("python-invoke" ,python-invoke)
2756 ("python-pygments" ,python-pygments)
2757 ("python-rellu" ,python-rellu)))
2758 (outputs '("out" "doc"))
2759 (home-page "https://github.com/robotframework/SSHLibrary")
2760 (synopsis "Robot Framework library for SSH and SFTP")
2761 (description "SSHLibrary is a Robot Framework library providing support
2762for SSH and SFTP. It has the following main usages:
2763@itemize @bullet
2764@item Executing commands on the remote machine, either blocking or non-blocking.
2765@item Writing and reading in an interactive shell.
2766@item Transferring files and directories over SFTP.
2767@item Ensuring that files and directories exist on the remote machine.
2768@end itemize")
2769 (license license:asl2.0)))
2770
13d825fc
MC
2771(define-public python-scp
2772 (package
2773 (name "python-scp")
2774 (version "0.13.2")
2775 (source
2776 (origin
2777 (method url-fetch)
2778 (uri (pypi-uri "scp" version))
2779 (sha256
2780 (base32
2781 "1crlpw9lnn58fs1c1rmh7s7s9y5gkgpgjsqlvg9qa51kq1knx7gg"))))
2782 (build-system python-build-system)
2783 (arguments
2784 '(#:tests? #f)) ;tests require an SSH server
2785 (propagated-inputs
2786 `(("python-paramiko" ,python-paramiko)))
2787 (home-page "https://github.com/jbardin/scp.py")
2788 (synopsis "SCP protocol module for Python and Paramiko")
2789 (description "The scp module extends the Paramiko library to send and
2790receive files via the SCP1 protocol, as implemented by the OpenSSH
2791@command{scp} program.")
2792 (license license:gpl2+)))
2793
44d10b1f
RW
2794(define-public python-rst.linker
2795 (package
2796 (name "python-rst.linker")
2797 (version "1.10")
2798 (source
2799 (origin
2800 (method url-fetch)
2801 (uri (pypi-uri "rst.linker" version))
2802 (sha256
2803 (base32
2804 "0iqaacp7pj1s8avs4kc0qg0r7dscywaq37y6l9j14glqdikk0wdj"))))
2805 (build-system python-build-system)
2806 (propagated-inputs
2807 `(("python-dateutil" ,python-dateutil)
2808 ("python-six" ,python-six)))
2809 (native-inputs
2810 `(("python-setuptools-scm" ,python-setuptools-scm)))
2811 ;; Test would require path.py, which would introduce a cyclic dependence.
2812 (arguments `(#:tests? #f))
2813 ;; Note: As of version 1.7 the documentation is not worth building.
2814 (home-page "https://github.com/jaraco/rst.linker")
2815 (synopsis "Sphinx plugin to add links and timestamps")
2816 (description "rst.linker allows to automatically replace text by a
2817reStructuredText external reference or timestamps. It's primary purpose is to
2818augment the changelog, but it can be used for other documents, too.")
2819 (license license:expat)))
2820
2821(define-public python2-rst.linker
2822 (package-with-python2 python-rst.linker))
2823
2824(define-public python-feedgenerator
2825 (package
2826 (name "python-feedgenerator")
2827 (version "1.9")
2828 (source
2829 (origin
2830 (method url-fetch)
2831 (uri (pypi-uri "feedgenerator" version))
2832 (sha256
2833 (base32
2834 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
2835 (modules '((guix build utils)))
2836 (snippet
2837 '(begin
2838 ;; Remove pre-compiled .pyc files from source.
2839 (for-each delete-file-recursively
2840 (find-files "." "__pycache__" #:directories? #t))
2841 (for-each delete-file (find-files "." "\\.pyc$"))
2842 #t))))
2843 (build-system python-build-system)
2844 (propagated-inputs
2845 `(("python-pytz" ,python-pytz)
2846 ("python-six" ,python-six)))
2847 (home-page "https://github.com/getpelican/feedgenerator")
2848 (synopsis
2849 "Standalone version of Django's Atom/RSS feed generator")
2850 (description
2851 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2852which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
2853 (license license:bsd-3)))
2854
2855(define-public python2-feedgenerator
2856 (package-with-python2 python-feedgenerator))
2857
2858(define-public python-toml
2859 (package
2860 (name "python-toml")
2861 (version "0.9.4")
2862 (source
2863 (origin
2864 (method url-fetch)
2865 (uri (pypi-uri "toml" version))
2866 (sha256
2867 (base32
2868 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
2869 (build-system python-build-system)
2870 (arguments
2871 `(#:tests? #f)) ;no tests suite in release
2872 (home-page "https://github.com/uiri/toml")
2873 (synopsis "Library for TOML")
2874 (description
2875 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
2876Language (TOML) configuration files.")
2877 (license license:expat)))
2878
346c8752
BG
2879(define-public python-jsonrpc-server
2880 (package
2881 (name "python-jsonrpc-server")
2882 (version "0.1.2")
2883 (source
2884 (origin
2885 (method url-fetch)
2886 (uri (pypi-uri "python-jsonrpc-server" version))
2887 (sha256
2888 (base32
2889 "0m4ykpcdy52x37n1ikysp07j7p8ialcdvvvsrjp3545sn7iiid09"))))
2890 (build-system python-build-system)
2891 (propagated-inputs
2892 `(("python-future" ,python-future)
2893 ("python-mock" ,python-mock)
2894 ("python-pytest" ,python-pytest)))
2895 (home-page
2896 "https://github.com/palantir/python-jsonrpc-server")
2897 (synopsis "JSON RPC 2.0 server library")
2898 (description
1df5407c 2899 "This package provides a JSON RPC 2.0 server library for Python.")
346c8752
BG
2900 (license license:expat)))
2901
56f4ad47
BG
2902(define-public python-pydocstyle
2903 (package
2904 (name "python-pydocstyle")
2905 (version "3.0.0")
2906 (source
2907 (origin
2908 (method url-fetch)
2909 (uri (pypi-uri "pydocstyle" version))
2910 (sha256
2911 (base32
2912 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
2913 (build-system python-build-system)
2914 (propagated-inputs
2915 `(("python-six" ,python-six)
2916 ("python-snowballstemmer" ,python-snowballstemmer)))
2917 (home-page
2918 "https://github.com/PyCQA/pydocstyle/")
2919 (synopsis "Python docstring style checker")
2920 (description
2921 "This package provides a style checker for the Python Language
2922Server (PLS).")
2923 (license license:expat)))
2924
be4d840c
BG
2925(define-public python-language-server
2926 (package
2927 (name "python-language-server")
ccbaeba3 2928 (version "0.26.1")
be4d840c
BG
2929 (source
2930 (origin
2931 (method url-fetch)
2932 (uri (pypi-uri "python-language-server" version))
2933 (sha256
2934 (base32
ccbaeba3 2935 "1vs9ckfmm534n1hq3m871916wsjvi5h4gyj6wlzg13ck6506lx0s"))))
be4d840c
BG
2936 (build-system python-build-system)
2937 (propagated-inputs
2938 `(("python-pluggy" ,python-pluggy)
2939 ("python-jsonrpc-server" ,python-jsonrpc-server)
2940 ("python-jedi" ,python-jedi)
2941 ("python-yapf" ,python-yapf)
2942 ("python-pyflakes" ,python-pyflakes)
2943 ("python-pydocstyle" ,python-pydocstyle)
2944 ("python-pycodestyle" ,python-pycodestyle)
2945 ("python-mccabe" ,python-mccabe)
2946 ("python-rope" ,python-rope)
fe4a4bd2
BG
2947 ("python-autopep8" ,python-autopep8)
2948 ("python-pylint" ,python-pylint)))
be4d840c
BG
2949 (home-page "https://github.com/palantir/python-language-server")
2950 (synopsis "Python implementation of the Language Server Protocol")
2951 (description
2952 "The Python Language Server (pyls) is an implementation of the Python 3
2953language specification for the Language Server Protocol (LSP). This tool is
2954used in text editing environments to provide a complete and integrated
2955feature-set for programming Python effectively.")
2956 (license license:expat)))
2957
44d10b1f
RW
2958(define-public python-black
2959 (package
2960 (name "python-black")
2961 (version "18.6b4")
2962 (source
2963 (origin
2964 (method url-fetch)
2965 (uri (pypi-uri "black" version))
2966 (sha256
2967 (base32
2968 "0i4sfqgz6w15vd50kbhi7g7rifgqlf8yfr8y78rypd56q64qn592"))))
2969 (build-system python-build-system)
2970 (arguments
2971 `(#:phases
2972 (modify-phases %standard-phases
2973 (add-after 'patch-source-shebangs 'patch-extra-shebangs
2974 (lambda _
2975 (let ((python3 (which "python3")))
2976 (substitute* '("tests/data/fmtonoff.py"
2977 "tests/data/string_prefixes.py"
2978 "tests/data/function.py")
2979 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
2980 (string-append "#!" python3 (if (string? minor-version)
2981 minor-version
2982 ""))))))))))
2983 (propagated-inputs
2984 `(("python-click" ,python-click)
2985 ("python-attrs" ,python-attrs)
2986 ("python-appdirs" ,python-appdirs)
2987 ("python-toml" ,python-toml)))
2988 (home-page "https://github.com/ambv/black")
2989 (synopsis "The uncompromising code formatter")
2990 (description "Black is the uncompromising Python code formatter.")
2991 (license license:expat)))
2992
2993(define-public python-blinker
2994 (package
2995 (name "python-blinker")
2996 (version "1.4")
2997 (source
2998 (origin
2999 (method url-fetch)
3000 (uri (pypi-uri "blinker" version))
3001 (sha256
3002 (base32
3003 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3004 (build-system python-build-system)
3005 (home-page "http://pythonhosted.org/blinker/")
3006 (synopsis "Fast, simple object-to-object and broadcast signaling")
3007 (description
3008 "Blinker provides a fast dispatching system that allows any number of
3009interested parties to subscribe to events, or \"signals\".")
3010 (license license:expat)))
3011
3012(define-public python2-blinker
3013 (package-with-python2 python-blinker))
3014
3015(define-public pelican
3016 (package
3017 (name "pelican")
aa71b690 3018 (version "4.0.1")
44d10b1f
RW
3019 (source
3020 (origin
3021 (method url-fetch)
3022 (uri (pypi-uri "pelican" version))
3023 (sha256
3024 (base32
aa71b690 3025 "05yda7n6r0ll18fpdjzkzyr0ls8hbb86fnjyb33k9jvv5avah2lr"))))
44d10b1f
RW
3026 (build-system python-build-system)
3027 (propagated-inputs
3028 `(("python-feedgenerator" ,python-feedgenerator)
3029 ("python-jinja2" ,python-jinja2)
3030 ("python-pygments" ,python-pygments)
3031 ("python-docutils" ,python-docutils)
3032 ("python-pytz" ,python-pytz)
3033 ("python-blinker" ,python-blinker)
3034 ("python-unidecode" ,python-unidecode)
3035 ("python-six" ,python-six)
3036 ("python-dateutil" ,python-dateutil)
3037 ("python-markdown" ,python-markdown)))
3038 (home-page "https://getpelican.com/")
3039 (arguments
3040 `(;; XXX Requires a lot more packages to do unit tests :P
3041 #:tests? #f
3042 #:phases (modify-phases %standard-phases
3043 (add-before
3044 'install 'adjust-requires
3045 ;; Since feedgenerator is installed from git, it doesn't
3046 ;; conform to the version requirements.
3047 ;;
3048 ;; We *do have* "feedgenerator >= 1.6", but strip off the
3049 ;; version requirement so setuptools doesn't get confused.
3050 (lambda _
3051 (substitute* "setup.py"
3052 (("['\"]feedgenerator.*?['\"]")
3053 "'feedgenerator'")))))))
3054 (synopsis "Python-based static site publishing system")
3055 (description
3056 "Pelican is a tool to generate a static blog from reStructuredText,
3057Markdown input files, and more. Pelican uses Jinja2 for templating
3058and is very extensible.")
3059 (license license:agpl3+)))
3060
8c141421
JH
3061(define-public mallard-ducktype
3062 (package
3063 (name "mallard-ducktype")
3064 (version "1.0.1")
3065 (source
3066 (origin
3067 (method git-fetch)
3068 ;; git-reference because a proper source tarball is not available
3069 ;; https://lists.gnu.org/archive/html/guix-devel/2019-05/msg00209.html
3070 (uri (git-reference
3071 (url "https://github.com/projectmallard/mallard-ducktype.git")
3072 (commit version)))
3073 (file-name (git-file-name name version))
3074 (sha256
3075 (base32
3076 "0crland0kmpsyjfmnflcw7gaqy5b87b6ah17cmr9d5z1kyazf54n"))))
3077 (build-system python-build-system)
3078 (home-page "http://projectmallard.org")
3079 (synopsis "Convert Ducktype to Mallard documentation markup")
3080 (description
3081 "Ducktype is a lightweight syntax that can represent all the semantics
3082of the Mallard XML documentation system. Ducktype files can be converted to
3083Mallard using the @command{ducktype} tool. The yelp-tools package
3084provides additional functionality on the produced Mallard documents.")
3085 (license license:expat)))
3086
44d10b1f
RW
3087(define-public python-scikit-image
3088 (package
3089 (name "python-scikit-image")
9ff04084 3090 (version "0.14.2")
44d10b1f
RW
3091 (source
3092 (origin
3093 (method url-fetch)
3094 (uri (pypi-uri "scikit-image" version))
3095 (sha256
9ff04084 3096 (base32 "07qchljkyxvg5nrm12fvszi7pmjk4m01qp0w0z8syxzxxs20pz8s"))))
44d10b1f
RW
3097 (build-system python-build-system)
3098 (arguments
3099 ;; TODO: Some tests require running X11 server. Disable them?
3100 '(#:tests? #f))
3101 ;; See DEPENDS.txt for the list of build and run time requiremnts
3102 (propagated-inputs
3103 `(("python-cloudpickle" ,python-cloudpickle)
3104 ("python-dask" ,python-dask)
3105 ("python-matplotlib" ,python-matplotlib)
3106 ("python-networkx" ,python-networkx)
3107 ("python-numpy" ,python-numpy)
3108 ("python-pillow" ,python-pillow)
3109 ("python-pywavelets" ,python-pywavelets)
3110 ("python-scipy" ,python-scipy)
3111 ("python-six" ,python-six)))
3112 (native-inputs
3113 `(("python-cython" ,python-cython)))
3114 (home-page "http://scikit-image.org/")
3115 (synopsis "Image processing in Python")
3116 (description
3117 "Scikit-image is a collection of algorithms for image processing.")
3118 (license license:bsd-3)))
3119
3120(define-public python2-scikit-image
3121 (package-with-python2 python-scikit-image))
3122
3123(define-public python-cython
3124 (package
3125 (name "python-cython")
c6a2fd24 3126 (version "0.29.6")
44d10b1f
RW
3127 (source
3128 (origin
3129 (method url-fetch)
3130 (uri (pypi-uri "Cython" version))
3131 (sha256
3132 (base32
c6a2fd24 3133 "1bp7cn0pp5qy63k9hbp4ka34fm01kvysh478phpkhr68npqk6pbc"))))
44d10b1f
RW
3134 (build-system python-build-system)
3135 ;; we need the full python package and not just the python-wrapper
3136 ;; because we need libpython3.3m.so
3137 (inputs
3138 `(("python" ,python)))
3139 (arguments
3140 `(#:phases
3141 (modify-phases %standard-phases
3142 (add-before 'check 'set-HOME
3143 ;; some tests require access to "$HOME/.cython"
3144 (lambda _ (setenv "HOME" "/tmp") #t))
3145
3146 ;; FIXME: These tests started failing on armhf after the 0.28 update
3147 ;; (commit c69d11c5930), both with an error such as this:
3148 ;; compiling (cpp) and running dictcomp ...
3149 ;; === C/C++ compiler error output: ===
3150 ;; ‘
3151 ;; dictcomp.cpp:5221: confused by earlier errors, bailing out
3152 ;; See <https://hydra.gnu.org/build/2948724> for logs.
3153 ,@(if (target-arm32?)
3154 `((add-before 'check 'disable-failing-tests
3155 (lambda _
3156 (let ((disabled-tests (open-file "tests/bugs.txt" "a")))
3157 (for-each (lambda (test)
3158 (format disabled-tests "~a\n" test))
3159 '("memslice" "dictcomp"))
3160 (close-port disabled-tests)))))
3161 '())
3162
3163 (replace 'check
3164 (lambda _
44d10b1f
RW
3165 (invoke "python" "runtests.py" "-vv"))))))
3166 (home-page "http://cython.org/")
3167 (synopsis "C extensions for Python")
3168 (description "Cython is an optimising static compiler for both the Python
3169programming language and the extended Cython programming language. It makes
3170writing C extensions for Python as easy as Python itself.")
3171 (license license:asl2.0)
3172 (properties `((python2-variant . ,(delay python2-cython))))))
3173
3174(define-public python2-cython
3175 (package (inherit (package-with-python2
3176 (strip-python2-variant python-cython)))
3177 (name "python2-cython")
3178 (inputs
3179 `(("python-2" ,python-2))))) ; this is not automatically changed
3180
3181;; The RPython toolchain currently does not support Python 3.
3182(define-public python2-rpython
3183 (package
3184 (name "python2-rpython")
3185 (version "0.2.1")
3186 (source
3187 (origin
3188 (method url-fetch)
3189 (uri (pypi-uri "rpython" version))
3190 (sha256
3191 (base32
3192 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
3193 (build-system python-build-system)
3194 (arguments `(#:python ,python-2))
3195 (native-inputs
3196 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3197 (home-page "https://rpython.readthedocs.org")
3198 (synopsis "Framework for implementing interpreters and virtual machines")
3199 (description "RPython is a translation and support framework for
3200producing implementations of dynamic languages, emphasizing a clean separation
3201between language specification and implementation aspects.")
3202 (license license:expat)))
3203
3204;; NOTE: when upgrading numpy please make sure that python-pandas and
3205;; python-scipy still build, as these three packages are often used together.
3206(define-public python-numpy
3207 (package
3208 (name "python-numpy")
3209 (version "1.15.4")
3210 (source
3211 (origin
3212 (method url-fetch)
3213 (uri (string-append
3214 "https://github.com/numpy/numpy/releases/download/v"
3215 version "/numpy-" version ".tar.gz"))
3216 (sha256
3217 (base32
3218 "102vcl2qq4pjbm7a3d67vkkvn4466ngia1d8wi5avqwqh8j0jvkn"))))
3219 (build-system python-build-system)
3220 (inputs
3221 `(("openblas" ,openblas)
3222 ("lapack" ,lapack)))
3223 (native-inputs
3224 `(("python-cython" ,python-cython)
3225 ("python-pytest" ,python-pytest)
3226 ("gfortran" ,gfortran)))
3227 (arguments
3228 `(#:phases
3229 (modify-phases %standard-phases
3230 (add-before 'build 'configure-blas-lapack
3231 (lambda* (#:key inputs #:allow-other-keys)
3232 (call-with-output-file "site.cfg"
3233 (lambda (port)
3234 (format port
3235 "[openblas]
3236libraries = openblas
3237library_dirs = ~a/lib
3238include_dirs = ~a/include
3239
3240# backslash-n to make emacs happy
3241\n[lapack]
3242lapack_libs = lapack
3243library_dirs = ~a/lib
3244include_dirs = ~a/include
3245"
3246 (assoc-ref inputs "openblas")
3247 (assoc-ref inputs "openblas")
3248 (assoc-ref inputs "lapack")
3249 (assoc-ref inputs "lapack"))))
3250 #t))
3251 (add-before 'build 'fix-executable-paths
3252 (lambda* (#:key inputs #:allow-other-keys)
3253 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
3254 ;; instead of /bin/sh.
3255 (substitute* "numpy/distutils/exec_command.py"
3256 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
3257 (string-append match-start (assoc-ref inputs "bash") match-end)))
3258 ;; Use "gcc" executable, not "cc".
3259 (substitute* "numpy/distutils/system_info.py"
3260 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3261 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3262 #t))
3263 ;; Tests can only be run after the library has been installed and not
3264 ;; within the source directory.
3265 (delete 'check)
3266 (add-after 'install 'check
3267 (lambda* (#:key outputs inputs #:allow-other-keys)
3268 ;; Make installed package available for running the tests
3269 (add-installed-pythonpath inputs outputs)
3270 ;; Make sure "f2py" etc is found.
3271 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
3272 ":" (getenv "PATH")))
3273 (with-directory-excursion "/tmp"
3274 (invoke "python" "-c"
3275 "import numpy; numpy.test(verbose=2)")))))))
3276 (home-page "http://www.numpy.org/")
3277 (synopsis "Fundamental package for scientific computing with Python")
3278 (description "NumPy is the fundamental package for scientific computing
3279with Python. It contains among other things: a powerful N-dimensional array
3280object, sophisticated (broadcasting) functions, tools for integrating C/C++
3281and Fortran code, useful linear algebra, Fourier transform, and random number
3282capabilities.")
3283 (license license:bsd-3)))
3284
3285(define-public python2-numpy
3286 (package-with-python2 python-numpy))
3287
3288;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
3289;; interest only for legacy code going back to NumPy's predecessor
3290;; Numeric.
3291(define-public python2-numpy-1.8
3292 (package (inherit python2-numpy)
3293 (version "1.8.2")
3294 (source
3295 (origin
3296 (method url-fetch)
3297 (uri (string-append
3298 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
3299 (file-name (string-append "python2-numpy-" version ".tar.gz"))
3300 (sha256
3301 (base32
3302 "0sc20gz1b17xnyrkp5frca3ql5qfalpv916hfg2kqxpwr6jg0f1g"))))
3303 (arguments
3304 (substitute-keyword-arguments (package-arguments python2-numpy)
3305 ((#:phases phases)
3306 `(modify-phases ,phases
3307 (replace 'configure-blas-lapack
3308 (lambda* (#:key inputs #:allow-other-keys)
3309 (call-with-output-file "site.cfg"
3310 (lambda (port)
3311 (format port
3312 "[openblas]
3313libraries = openblas,lapack
3314library_dirs = ~a/lib:~a/lib
3315include_dirs = ~a/include:~a/include
3316"
3317 (assoc-ref inputs "openblas")
3318 (assoc-ref inputs "lapack")
3319 (assoc-ref inputs "openblas")
3320 (assoc-ref inputs "lapack"))))
3321 #t))))))
3322 (native-inputs
3323 `(("python2-nose" ,python2-nose)))
3324 (description "NumPy is the fundamental package for scientific computing
3325with Python. It contains among other things: a powerful N-dimensional array
3326object, sophisticated (broadcasting) functions, tools for integrating C/C++
3327and Fortran code, useful linear algebra, Fourier transform, and random number
3328capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
3329that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
3330Numeric.")
3331 (license license:bsd-3)))
3332
3333(define-public python-munch
3334 (package
3335 (name "python-munch")
3336 (version "2.0.4")
3337 (source
3338 (origin
3339 (method url-fetch)
3340 (uri (pypi-uri "munch" version))
3341 (sha256
3342 (base32
3343 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3344 (build-system python-build-system)
3345 (home-page "https://github.com/Infinidat/munch")
3346 (synopsis "Dot-accessible dictionary")
3347 (description "Munch is a dot-accessible dictionary similar to JavaScript
3348objects.")
3349 (license license:expat)))
3350
3351(define-public python2-munch
3352 (package-with-python2 python-munch))
3353
3354(define-public python-colormath
3355 (package
3356 (name "python-colormath")
3357 (version "3.0.0")
3358 (source
3359 (origin
3360 (method url-fetch)
3361 (uri (pypi-uri "colormath" version))
3362 (sha256
3363 (base32
3364 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3365 (build-system python-build-system)
3366 (propagated-inputs
3367 `(("python-networkx" ,python-networkx)
3368 ("python-numpy" ,python-numpy)))
3369 (home-page "https://github.com/gtaylor/python-colormath")
3370 (synopsis "Color math and conversion library")
3371 (description
3372 "This is a Python library for color math and conversions.")
3373 (license license:bsd-3)))
3374
3375(define-public python2-colormath
3376 (package-with-python2 python-colormath))
3377
3378(define-public python-spectra
3379 (package
3380 (name "python-spectra")
3381 (version "0.0.11")
3382 (source
3383 (origin
3384 (method url-fetch)
3385 (uri (pypi-uri "spectra" version))
3386 (sha256
3387 (base32
3388 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3389 (build-system python-build-system)
3390 (arguments
3391 `(#:phases
3392 (modify-phases %standard-phases
3393 (replace 'check
38ec0f6a 3394 (lambda _ (invoke "nosetests" "-v"))))))
44d10b1f
RW
3395 (propagated-inputs
3396 `(("python-colormath" ,python-colormath)))
3397 (native-inputs
3398 `(("python-nose" ,python-nose)))
3399 (home-page "https://github.com/jsvine/spectra")
3400 (synopsis "Color scales and color conversion")
3401 (description
3402 "This package provides a Python library intended to make color math,
3403color scales, and color space conversion easy. It has support for:
3404
3405@enumerate
3406@item Color scales
3407@item Color ranges
3408@item Color blending
3409@item Brightening/darkening colors
3410@item Saturating/desaturating colors
3411@item Conversion to/from multiple color spaces.
3412@end enumerate\n")
3413 (license license:expat)))
3414
3415(define-public python2-spectra
3416 (package-with-python2 python-spectra))
3417
3418(define-public python-numpy-documentation
3419 (package
3420 (name "python-numpy-documentation")
3421 (version (package-version python-numpy))
3422 (source (package-source python-numpy))
3423 (build-system python-build-system)
3424 (native-inputs
3425 `(("python-matplotlib" ,python-matplotlib)
3426 ("python-numpy" ,python-numpy)
3427 ("pkg-config" ,pkg-config)
3428 ("python-sphinx" ,python-sphinx)
3429 ("python-numpydoc" ,python-numpydoc)
3430 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
3431 texlive-fonts-cm-super
3432 texlive-fonts-ec
3433 texlive-generic-ifxetex
3434 texlive-generic-pdftex
3435 texlive-latex-amsfonts
3436 texlive-latex-capt-of
3437 texlive-latex-cmap
3438 texlive-latex-environ
3439 texlive-latex-eqparbox
3440 texlive-latex-etoolbox
3441 texlive-latex-expdlist
3442 texlive-latex-fancyhdr
3443 texlive-latex-fancyvrb
3444 texlive-latex-fncychap
3445 texlive-latex-float
3446 texlive-latex-framed
3447 texlive-latex-geometry
3448 texlive-latex-graphics
3449 texlive-latex-hyperref
3450 texlive-latex-mdwtools
3451 texlive-latex-multirow
3452 texlive-latex-needspace
3453 texlive-latex-oberdiek
3454 texlive-latex-parskip
3455 texlive-latex-preview
3456 texlive-latex-tabulary
3457 texlive-latex-threeparttable
3458 texlive-latex-titlesec
3459 texlive-latex-trimspaces
3460 texlive-latex-ucs
3461 texlive-latex-upquote
3462 texlive-latex-url
3463 texlive-latex-varwidth
3464 texlive-latex-wrapfig)))
3465 ("texinfo" ,texinfo)
3466 ("perl" ,perl)
3467 ("scipy-sphinx-theme"
3468 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3469 (method git-fetch)
3470 (uri (git-reference
3471 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3472 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3473 (sha256
3474 (base32
3475 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3476 ,@(package-native-inputs python-numpy)))
3477 (arguments
3478 `(#:tests? #f ; we're only generating the documentation
3479 #:phases
3480 (modify-phases %standard-phases
3481 (delete 'build)
3482 (replace 'install
3483 (lambda* (#:key inputs outputs #:allow-other-keys)
3484 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3485 (doc (string-append
3486 data "/doc/" ,name "-"
3487 ,(package-version python-numpy)))
3488 (info-reader (string-append data "/info"))
3489 (html (string-append doc "/html"))
3490 (scipy-sphinx-theme "scipy-sphinx-theme")
3491 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3492 (pyver ,(string-append "PYVER=")))
3493
3494 ;; FIXME: this is needed to for texlive-union to generate
3495 ;; fonts, which are not found.
3496 (setenv "HOME" "/tmp")
3497
3498 (with-directory-excursion "doc"
3499 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3500 (mkdir-p html)
4fc898da
RW
3501 (invoke "make" "html" pyver)
3502 (invoke "make" "latex" "PAPER=a4" pyver)
3503 (invoke "make" "-C" "build/latex"
44d10b1f
RW
3504 "all-pdf" "PAPER=a4" pyver)
3505 ;; FIXME: Generation of the info file fails.
4fc898da 3506 ;; (invoke "make" "info" pyver)
44d10b1f
RW
3507 ;; (mkdir-p info)
3508 ;; (copy-file "build/texinfo/numpy.info"
3509 ;; (string-append info "/numpy.info"))
3510 (for-each (lambda (file)
3511 (copy-file (string-append "build/latex" file)
3512 (string-append doc file)))
3513 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3514 (with-directory-excursion "build/html"
3515 (for-each (lambda (file)
3516 (let* ((dir (dirname file))
3517 (tgt-dir (string-append html "/" dir)))
3518 (unless (equal? "." dir)
3519 (mkdir-p tgt-dir))
3520 (install-file file html)))
3521 (find-files "." ".*")))))
3522 #t)))))
3523 (home-page (package-home-page python-numpy))
3524 (synopsis "Documentation for the python-numpy package")
3525 (description (package-description python-numpy))
3526 (license (package-license python-numpy))))
3527
3528(define-public python2-numpy-documentation
3529 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3530 (package
3531 (inherit numpy-documentation)
3532 (native-inputs `(("python2-functools32" ,python2-functools32)
3533 ,@(package-native-inputs numpy-documentation))))))
3534
3535(define-public python-pygit2
3536 (package
3537 (name "python-pygit2")
c3ecab0d 3538 (version "0.28.0")
44d10b1f
RW
3539 (source
3540 (origin
3541 (method url-fetch)
3542 (uri (pypi-uri "pygit2" version))
3543 (sha256
c3ecab0d 3544 (base32 "0lngsaz029d4fjcwhl17pr59nh9gwl6hwfin36nph60fgsmfdg3d"))))
44d10b1f
RW
3545 (build-system python-build-system)
3546 (arguments
c3ecab0d 3547 '(#:tests? #f)) ; tests don't run correctly in our environment
44d10b1f
RW
3548 (propagated-inputs
3549 `(("python-six" ,python-six)
3550 ("python-cffi" ,python-cffi)
3551 ("libgit2" ,libgit2)
3552 ("python-tox" ,python-tox)))
3553 (native-inputs
3554 `(("python-pytest" ,python-pytest)))
3555 (home-page "https://github.com/libgit2/pygit2")
3556 (synopsis "Python bindings for libgit2")
3557 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3558library, libgit2 implements Git plumbing.")
3559 ;; GPL2.0 only, with linking exception.
3560 (license license:gpl2)))
3561
3562(define-public python2-pygit2
3563 (package-with-python2 python-pygit2))
3564
3565(define-public python-pyparsing
3566 (package
3567 (name "python-pyparsing")
6d3cff5a 3568 (version "2.3.1")
44d10b1f
RW
3569 (source
3570 (origin
3571 (method url-fetch)
3572 (uri (pypi-uri "pyparsing" version))
3573 (sha256
6d3cff5a 3574 (base32 "0yk6xl885b91dmlhlsap7x78hk2rdr879fln9anbq6k4ca42djb6"))))
44d10b1f
RW
3575 (build-system python-build-system)
3576 (outputs '("out" "doc"))
3577 (arguments
3578 `(#:tests? #f ; no test target
3579 #:phases
3580 (modify-phases %standard-phases
3581 (add-after 'install 'install-doc
3582 (lambda* (#:key outputs #:allow-other-keys)
3583 (let* ((doc (string-append (assoc-ref outputs "doc")
3584 "/share/doc/" ,name "-" ,version))
3585 (html-doc (string-append doc "/html"))
3586 (examples (string-append doc "/examples")))
3587 (mkdir-p html-doc)
3588 (mkdir-p examples)
3589 (for-each
3590 (lambda (dir tgt)
3591 (map (lambda (file)
3592 (install-file file tgt))
3593 (find-files dir ".*")))
3594 (list "docs" "htmldoc" "examples")
3595 (list doc html-doc examples))
3596 #t))))))
3597 (home-page "https://github.com/pyparsing/pyparsing")
3598 (synopsis "Python parsing class library")
3599 (description
3600 "The pyparsing module is an alternative approach to creating and
3601executing simple grammars, vs. the traditional lex/yacc approach, or the use
3602of regular expressions. The pyparsing module provides a library of classes
3603that client code uses to construct the grammar directly in Python code.")
3604 (license license:expat)))
3605
3606(define-public python2-pyparsing
3607 (package-with-python2 python-pyparsing))
3608
3609(define-public python-numpydoc
3610 (package
3611 (name "python-numpydoc")
3612 (version "0.8.0")
3613 (source
3614 (origin
3615 (method url-fetch)
3616 (uri (pypi-uri "numpydoc" version))
3617 (sha256
3618 (base32
3619 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
3620 (build-system python-build-system)
3621 (propagated-inputs
3622 `(("python-sphinx" ,python-sphinx)))
3623 (native-inputs
3624 `(("python-nose" ,python-nose)))
3625 (home-page "https://pypi.python.org/pypi/numpydoc")
3626 (synopsis
3627 "Numpy's Sphinx extensions")
3628 (description
3629 "Sphinx extension to support docstrings in Numpy format.")
3630 (license license:bsd-2)))
3631
3632(define-public python2-numpydoc
3633 (package-with-python2 python-numpydoc))
3634
3635(define-public python-numexpr
3636 (package
3637 (name "python-numexpr")
3638 (version "2.6.5")
3639 (source
3640 (origin
3641 (method url-fetch)
3642 (uri (pypi-uri "numexpr" version))
3643 (sha256
3644 (base32
3645 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3646 (build-system python-build-system)
3647 (arguments `(#:tests? #f)) ; no tests included
3648 (propagated-inputs
3649 `(("python-numpy" ,python-numpy)))
3650 (home-page "https://github.com/pydata/numexpr")
3651 (synopsis "Fast numerical expression evaluator for NumPy")
3652 (description
3653 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3654expressions that operate on arrays are accelerated and use less memory than
3655doing the same calculation in Python. In addition, its multi-threaded
3656capabilities can make use of all your cores, which may accelerate
3657computations, most specially if they are not memory-bounded (e.g. those using
3658transcendental functions).")
3659 (license license:expat)))
3660
3661(define-public python2-numexpr
3662 (package-with-python2 python-numexpr))
3663
3664(define-public python-cycler
3665 (package
3666 (name "python-cycler")
3667 (version "0.10.0")
3668 (source (origin
3669 (method url-fetch)
3670 (uri (pypi-uri "cycler" version))
3671 (sha256
3672 (base32
3673 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3674 (build-system python-build-system)
3675 (arguments
3676 ;; XXX: The current version requires 'coveralls' which we don't have.
3677 ;; Enable this for the next release which uses 'python-pytest'.
3678 '(#:tests? #f))
3679 (propagated-inputs
3680 `(("python-six" ,python-six)))
3681 (home-page "http://matplotlib.org/cycler/")
3682 (synopsis "Composable keyword argument iterator")
3683 (description
3684 "When using @code{matplotlib} and plotting more than one line, it is
3685common to want to be able to want to be able to cycle over one or more artist
3686styles; but the plotting logic can quickly become involved.
3687To address this and enable easy cycling over arbitrary @code{kwargs}, the
3688@code{Cycler} class was developed.")
3689 (license license:bsd-3)))
3690
3691(define-public python2-cycler
3692 (package-with-python2 python-cycler))
3693
3694(define-public python-colorspacious
3695 (package
3696 (name "python-colorspacious")
3697 (version "1.1.0")
3698 (source
dee92e65
TGR
3699 (origin
3700 (method git-fetch)
3701 (uri (git-reference
3702 (url "https://github.com/njsmith/colorspacious.git")
3703 (commit (string-append "v" version))))
3704 (file-name (git-file-name name version))
3705 (sha256
3706 (base32 "0g0lxqiscy5g5rq9421vv7abg0c90jzy0zmas2z3hya6k2dr5aid"))))
44d10b1f
RW
3707 (build-system python-build-system)
3708 (propagated-inputs
3709 `(("python-numpy" ,python-numpy)))
3710 (native-inputs
3711 `(("python-nose" ,python-nose)))
3712 (arguments
3713 `(#:phases
3714 (modify-phases %standard-phases
3715 (replace 'check
3716 (lambda _
c988afda 3717 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
44d10b1f
RW
3718 (home-page "https://github.com/njsmith/colorspacious")
3719 (synopsis "Python library for colorspace conversions")
3720 (description "@code{colorspacious} is a Python library that lets you
3721convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3722 (license license:expat)))
3723
3724(define-public python2-colorspacious
3725 (package-with-python2 python-colorspacious))
3726
3727(define-public python-matplotlib
3728 (package
3729 (name "python-matplotlib")
3730 (version "2.2.3")
3731 (source
3732 (origin
3733 (method url-fetch)
3734 (uri (pypi-uri "matplotlib" version))
3735 (sha256
3736 (base32
3737 "1rcc7x9ig3hpchkc4cwdvym3y451w74275fxr455zkfagrsvymbk"))))
3738 (build-system python-build-system)
3739 (propagated-inputs ; the following packages are all needed at run time
3740 `(("python-cycler" ,python-cycler)
3741 ("python-kiwisolver" ,python-kiwisolver)
3742 ("python-pyparsing" ,python-pyparsing)
3743 ("python-pygobject" ,python-pygobject)
3744 ("gobject-introspection" ,gobject-introspection)
3745 ("python-tkinter" ,python "tk")
3746 ("python-dateutil" ,python-dateutil)
3747 ("python-numpy" ,python-numpy)
3748 ("python-pillow" ,python-pillow)
3749 ("python-pytz" ,python-pytz)
3750 ("python-six" ,python-six)
3751 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3752 ;; from 'gtk+') provides the required 'typelib' files used by
3753 ;; 'gobject-introspection'. The location of these files is set with the
3754 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3755 ;; is done automatically by a 'native-search-path' procedure. However,
3756 ;; at run-time the user must set this variable as follows:
3757 ;;
3758 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
3759 ("gtk+" ,gtk+)
3760 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3761 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3762 ;; object. For this reason we need to import both libraries.
3763 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3764 ("python-pycairo" ,python-pycairo)
3765 ;; XXX: qtwebkit cannot be built reliably.
3766 ("python-pyqt" ,python-pyqt-without-qtwebkit)
3767 ("python-cairocffi" ,python-cairocffi)))
3768 (inputs
3769 `(("libpng" ,libpng)
3770 ("imagemagick" ,imagemagick)
3771 ("freetype" ,freetype)
3772 ("cairo" ,cairo)
3773 ("glib" ,glib)
3774 ;; FIXME: Add backends when available.
3775 ;("python-wxpython" ,python-wxpython)
3776 ("tcl" ,tcl)
3777 ("tk" ,tk)))
3778 (native-inputs
3779 `(("pkg-config" ,pkg-config)
3780 ("python-nose" ,python-nose)
3781 ("python-mock" ,python-mock)))
3782 (arguments
3783 `(#:phases
3784 (modify-phases %standard-phases
3785 (add-before 'build 'configure-environment
3786 (lambda* (#:key outputs inputs #:allow-other-keys)
3787 (let ((cairo (assoc-ref inputs "cairo"))
3788 (gtk+ (assoc-ref inputs "gtk+")))
3789 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3790 ;; has not effect.
3791 (setenv "LD_LIBRARY_PATH"
3792 (string-append cairo "/lib:" gtk+ "/lib"))
3793 (setenv "HOME" (getcwd))
3794 (call-with-output-file "setup.cfg"
3795 (lambda (port)
3796 (format port "[directories]~%
3797basedirlist = ~a,~a~%
3798 [rc_options]~%
3799backend = TkAgg~%"
3800 (assoc-ref inputs "tcl")
3801 (assoc-ref inputs "tk")))))
3802 #t)))))
3803 (home-page "http://matplotlib.org")
3804 (synopsis "2D plotting library for Python")
3805 (description
3806 "Matplotlib is a Python 2D plotting library which produces publication
3807quality figures in a variety of hardcopy formats and interactive environments
3808across platforms. Matplotlib can be used in Python scripts, the python and
3809ipython shell, web application servers, and six graphical user interface
3810toolkits.")
3811 (license license:psfl)
3812 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3813
3814(define-public python2-matplotlib
3815 (let ((matplotlib (package-with-python2
3816 (strip-python2-variant python-matplotlib))))
3817 (package (inherit matplotlib)
3818 ;; Make sure to use special packages for Python 2 instead
3819 ;; of those automatically rewritten by package-with-python2.
3820 (propagated-inputs
3821 `(("python2-pycairo" ,python2-pycairo)
3822 ("python2-backports-functools-lru-cache"
3823 ,python2-backports-functools-lru-cache)
3824 ("python2-functools32" ,python2-functools32)
3825 ("python2-pygobject-2" ,python2-pygobject-2)
3826 ("python2-subprocess32" ,python2-subprocess32)
3827 ("python2-tkinter" ,python-2 "tk")
3828 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3829 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
3830
3831(define-public python-matplotlib-documentation
3832 (package
3833 (name "python-matplotlib-documentation")
3834 (version (package-version python-matplotlib))
3835 (source (package-source python-matplotlib))
3836 (build-system python-build-system)
3837 (native-inputs
3838 `(("python-matplotlib" ,python-matplotlib)
3839 ("python-colorspacious" ,python-colorspacious)
3840 ("python-sphinx" ,python-sphinx)
3841 ("python-sphinx-gallery" ,python-sphinx-gallery)
3842 ("python-numpydoc" ,python-numpydoc)
3843 ("python-ipython" ,python-ipython)
e7a53914 3844 ("python-ipykernel" ,python-ipykernel)
44d10b1f
RW
3845 ("python-mock" ,python-mock)
3846 ("graphviz" ,graphviz)
e7a53914
RW
3847 ("texlive" ,(texlive-union (list texlive-latex-amsfonts
3848 texlive-latex-amsmath
3849 texlive-latex-enumitem
3850 texlive-latex-expdlist
3851 texlive-latex-geometry
3852 texlive-latex-preview
3853 texlive-latex-type1cm
3854 texlive-latex-ucs
3855
3856 texlive-generic-pdftex
3857
3858 texlive-fonts-amsfonts
3859 texlive-fonts-ec
3860 texlive-fonts-adobe-times
3861 texlive-fonts-txfonts)))
44d10b1f
RW
3862 ("texinfo" ,texinfo)
3863 ,@(package-native-inputs python-matplotlib)))
3864 (arguments
3865 `(#:tests? #f ; we're only generating documentation
3866 #:phases
3867 (modify-phases %standard-phases
3868 (replace 'build
3869 (lambda _
3870 (chdir "doc")
e7a53914
RW
3871 (setenv "PYTHONPATH"
3872 (string-append (getenv "PYTHONPATH")
3873 ":" (getcwd) "/../examples/units"))
44d10b1f 3874 (substitute* "conf.py"
e7a53914
RW
3875 ;; Don't use git.
3876 (("^SHA = check_output.*")
3877 (string-append "SHA = \"" ,version "\"\n"))
3878 ;; Don't fetch intersphinx files from the Internet
3879 (("^explicit_order_folders" m)
3880 (string-append "intersphinx_mapping = {}\n" m))
3881 (("'sphinx.ext.intersphinx',") "")
3882 ;; Disable URL embedding which requires internet access.
3883 (("'https://docs.scipy.org/doc/numpy'") "None")
3884 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
3885 (invoke "make"
3886 "SPHINXBUILD=sphinx-build"
3887 "SPHINXOPTS=" ; don't abort on warnings
3888 "html" "texinfo")))
44d10b1f
RW
3889 (replace 'install
3890 (lambda* (#:key inputs outputs #:allow-other-keys)
3891 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3892 (doc (string-append data "/doc/python-matplotlib-" ,version))
3893 (info (string-append data "/info"))
3894 (html (string-append doc "/html")))
3895 (mkdir-p html)
3896 (mkdir-p info)
3897 (copy-recursively "build/html" html)
3898 (symlink (string-append html "/_images")
3899 (string-append info "/matplotlib-figures"))
3900 (with-directory-excursion "build/texinfo"
3901 (substitute* "matplotlib.texi"
3902 (("@image\\{([^,]*)" all file)
3903 (string-append "@image{matplotlib-figures/" file)))
3904 (symlink (string-append html "/_images")
3905 "./matplotlib-figures")
e7a53914
RW
3906 (invoke "makeinfo" "--no-split"
3907 "-o" "matplotlib.info" "matplotlib.texi"))
3908 (install-file "build/texinfo/matplotlib.info" info))
44d10b1f
RW
3909 #t)))))
3910 (home-page (package-home-page python-matplotlib))
3911 (synopsis "Documentation for the python-matplotlib package")
3912 (description (package-description python-matplotlib))
3913 (license (package-license python-matplotlib))))
3914
3915(define-public python2-matplotlib-documentation
3916 (package-with-python2 python-matplotlib-documentation))
3917
3918(define-public python2-pysnptools
3919 (package
3920 (name "python2-pysnptools")
5d1ade85 3921 (version "0.3.13")
44d10b1f
RW
3922 (source
3923 (origin
3924 (method url-fetch)
5d1ade85 3925 (uri (pypi-uri "pysnptools" version))
44d10b1f
RW
3926 (sha256
3927 (base32
5d1ade85 3928 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
44d10b1f
RW
3929 (build-system python-build-system)
3930 (arguments
5d1ade85
RW
3931 `(#:python ,python-2 ; only Python 2.7 is supported
3932 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
44d10b1f
RW
3933 (propagated-inputs
3934 `(("python2-numpy" ,python2-numpy)
3935 ("python2-scipy" ,python2-scipy)
3936 ("python2-pandas" ,python2-pandas)))
44d10b1f 3937 (native-inputs
5d1ade85 3938 `(("python2-cython" ,python2-cython)))
1b66989b 3939 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
44d10b1f
RW
3940 (synopsis "Library for reading and manipulating genetic data")
3941 (description
3942 "PySnpTools is a library for reading and manipulating genetic data. It
3943can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
3944those files. It can also efficiently manipulate ranges of integers using set
3945operators such as union, intersection, and difference.")
3946 (license license:asl2.0)))
3947
3948(define-public python-scipy
3949 (package
3950 (name "python-scipy")
3951 (version "1.1.0")
3952 (source
3953 (origin
3954 (method url-fetch)
3955 (uri (pypi-uri "scipy" version))
3956 (sha256
3957 (base32
3958 "1lfg686w6vv2m2dfs8v9d0bf2i18z7wz5vgzjnkgmpr4hi0550w7"))))
3959 (build-system python-build-system)
3960 (propagated-inputs
3961 `(("python-numpy" ,python-numpy)
3962 ("python-matplotlib" ,python-matplotlib)
3963 ("python-pyparsing" ,python-pyparsing)))
3964 (inputs
3965 `(("lapack" ,lapack)
3966 ("openblas" ,openblas)))
3967 (native-inputs
3968 `(("python-cython" ,python-cython)
3969 ("python-pytest" ,python-pytest)
3970 ("python-sphinx" ,python-sphinx)
3971 ("python-numpydoc" ,python-numpydoc)
3972 ("gfortran" ,gfortran)
3973 ("perl" ,perl)
3974 ("which" ,which)))
3975 (outputs '("out" "doc"))
3976 (arguments
3977 `(#:phases
3978 (modify-phases %standard-phases
3979 (add-after 'unpack 'disable-broken-tests
3980 (lambda _
3981 (substitute* "scipy/sparse/linalg/dsolve/tests/test_linsolve.py"
3982 (("^( +)def test_threads_parallel\\(self\\):" m indent)
3983 (string-append indent
3984 "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
3985 m)))
3986 (substitute* "scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py"
3987 (("^def test_parallel_threads\\(\\):" m)
3988 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
3989 m)))
3990 #t))
3991 (add-before 'build 'configure-openblas
3992 (lambda* (#:key inputs #:allow-other-keys)
3993 (call-with-output-file "site.cfg"
3994 (lambda (port)
3995 (format port
3996 "[blas]
3997libraries = openblas
3998library_dirs = ~a/lib
3999include_dirs = ~a/include
4000
4001# backslash-n to make emacs happy
4002\n[atlas]
4003library_dirs = ~a/lib
4004atlas_libs = openblas
4005"
4006 (assoc-ref inputs "openblas")
4007 (assoc-ref inputs "openblas")
4008 (assoc-ref inputs "openblas"))))
4009 #t))
4010 (add-after 'install 'install-doc
4011 (lambda* (#:key inputs outputs #:allow-other-keys)
4012 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4013 (doc (string-append data "/doc/" ,name "-" ,version))
4014 (html (string-append doc "/html"))
4015 (pyver ,(string-append "PYVER=" (version-major+minor
4016 (package-version python))))
4017 ;; By default it tries to run sphinx-build through the Python
4018 ;; interpreter which won't work with our shell wrapper.
4019 (sphinxbuild "SPHINXBUILD=LANG=C sphinx-build"))
4020 ;; Make installed package available for building the
4021 ;; documentation
4022 (add-installed-pythonpath inputs outputs)
4023 (with-directory-excursion "doc"
4024 ;; Fix generation of images for mathematical expressions.
4025 (substitute* (find-files "source" "conf\\.py")
4026 (("pngmath_use_preview = True")
4027 "pngmath_use_preview = False"))
4028 (mkdir-p html)
4029 (invoke "make" "html" pyver sphinxbuild)
4030 (with-directory-excursion "build/html"
4031 (for-each (lambda (file)
4032 (let* ((dir (dirname file))
4033 (tgt-dir (string-append html "/" dir)))
4034 (install-file file html)))
4035 (find-files "." ".*")))))
4036 #t))
4037 ;; Tests can only be run after the library has been installed and not
4038 ;; within the source directory.
4039 (delete 'check)
4040 (add-after 'install 'check
4041 (lambda* (#:key inputs outputs #:allow-other-keys)
4042 (add-installed-pythonpath inputs outputs)
4043 (with-directory-excursion "/tmp"
4044 (invoke "python" "-c"
4045 "import scipy; scipy.test(verbose=2)")))))))
4046 (home-page "https://www.scipy.org/")
4047 (synopsis "The Scipy library provides efficient numerical routines")
4048 (description "The SciPy library is one of the core packages that make up
4049the SciPy stack. It provides many user-friendly and efficient numerical
4050routines such as routines for numerical integration and optimization.")
4051 (properties `((python2-variant . ,(delay python2-scipy))))
4052 (license license:bsd-3)))
4053
4054(define-public python2-scipy
4055 (package-with-python2
4056 (strip-python2-variant python-scipy)))
4057
4058(define-public python-socksipy-branch
4059 (package
4060 (name "python-socksipy-branch")
4061 (version "1.01")
4062 (source
4063 (origin
4064 (method url-fetch)
4065 (uri (pypi-uri "SocksiPy-branch" version))
4066 (sha256
4067 (base32
4068 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4069 (build-system python-build-system)
4070 (arguments
4071 `(#:tests? #f)) ; There are no tests
4072 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4073 (synopsis "Python SOCKS module")
4074 (description
4075 "SocksiPy - A Python SOCKS client module. It provides a
4076socket-like interface that supports connections to any TCP
4077service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4078The original version was developed by Dan Haim, this is a
4079branch created by Mario Vilas to address some open issues,
4080as the original project seems to have been abandoned circa 2007.")
4081 (license license:bsd-3)))
4082
4083(define-public python2-socksipy-branch
4084 (package-with-python2 python-socksipy-branch))
4085
4086(define-public python-pycodestyle
4087 (package
4088 (name "python-pycodestyle")
4089 (version "2.4.0")
4090 (source
4091 (origin
4092 (method url-fetch)
4093 (uri (pypi-uri "pycodestyle" version))
4094 (sha256
4095 (base32
4096 "0fhy4vnlgpjq4qd1wdnl6pvdw7rah0ypmn8c9mkhz8clsndskz6b"))))
4097 (build-system python-build-system)
4098 (home-page "https://pycodestyle.readthedocs.io/")
4099 (synopsis "Python style guide checker")
4100 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4101Python code against some of the style conventions in
4102@url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4103 (license license:expat)))
4104
4105(define-public python2-pycodestyle
4106 (package-with-python2 python-pycodestyle))
4107
4108(define-public python-multidict
4109 (package
4110 (name "python-multidict")
4111 (version "4.2.0")
4112 (source
4113 (origin
4114 (method url-fetch)
4115 (uri (pypi-uri "multidict" version))
4116 (sha256
4117 (base32
4118 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
4119 (build-system python-build-system)
4120 (native-inputs
4121 `(("python-pytest" ,python-pytest)
4122 ("python-pytest-runner" ,python-pytest-runner)))
4123 (home-page "https://github.com/aio-libs/multidict/")
4124 (synopsis "Multidict implementation")
4125 (description "Multidict is dict-like collection of key-value pairs
4126where key might be occurred more than once in the container.")
4127 (license license:asl2.0)))
4128
4129(define-public python-orderedmultidict
4130 (package
4131 (name "python-orderedmultidict")
4132 (version "0.7.11")
4133 (source
4134 (origin
4135 (method url-fetch)
4136 (uri (pypi-uri "orderedmultidict" version))
4137 (sha256
4138 (base32
4139 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4140 (build-system python-build-system)
4141 (arguments
4142 `(#:phases
4143 (modify-phases %standard-phases
4144 (add-after 'unpack 'fix-tests
4145 (lambda _
4146 ;; The package uses nosetest for running the tests.
4147 ;; Adding this initfile allows to run the test suite
4148 ;; without requiring nosetest.
d1c4f329
RW
4149 (with-output-to-file "tests/__init__.py" newline)
4150 #t)))))
44d10b1f
RW
4151 (propagated-inputs
4152 `(("python-six" ,python-six)))
4153 (native-inputs
4154 `(("python-pycodestyle" ,python-pycodestyle)))
4155 (home-page "https://github.com/gruns/orderedmultidict")
4156 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4157 (description "This package contains a library for ordered multivalue
4158dictionaries. A multivalue dictionary is a dictionary that can store
4159multiple values for the same key. An ordered multivalue dictionary is a
4160multivalue dictionary that retains the order of insertions and deletions.")
4161 (license license:unlicense)))
4162
4163(define-public python2-orderedmultidict
4164 (package-with-python2 python-orderedmultidict))
4165
4166(define-public python-autopep8
4167 (package
4168 (name "python-autopep8")
4169 (version "1.3.5")
4170 (source
4171 (origin
4172 (method url-fetch)
4173 (uri (pypi-uri "autopep8" version))
4174 (sha256
4175 (base32
4176 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
4177 (build-system python-build-system)
4178 (propagated-inputs
4179 `(("python-pycodestyle" ,python-pycodestyle)))
4180 (home-page "https://github.com/hhatto/autopep8")
4181 (synopsis "Format Python code according to the PEP 8 style guide")
4182 (description
4183 "@code{autopep8} automatically formats Python code to conform to
4184the PEP 8 style guide. It uses the pycodestyle utility to determine
4185what parts of the code needs to be formatted. @code{autopep8} is
4186capable of fixing most of the formatting issues that can be reported
4187by pycodestyle.")
4188 (license (license:non-copyleft
4189 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4190
4191(define-public python2-autopep8
4192 (package-with-python2 python-autopep8))
4193
4194(define-public python-distutils-extra
4195 (package
4196 (name "python-distutils-extra")
4197 (version "2.38")
4198 (source
4199 (origin
4200 (method url-fetch)
4201 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4202 version "/+download/python-distutils-extra-"
4203 version ".tar.gz"))
4204 (sha256
4205 (base32
4206 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4207 (build-system python-build-system)
4208 (home-page "https://launchpad.net/python-distutils-extra/")
4209 (synopsis "Enhancements to Python's distutils")
4210 (description
4211 "The python-distutils-extra module enables you to easily integrate
4212gettext support, themed icons, and scrollkeeper-based documentation into
4213Python's distutils.")
4214 (license license:gpl2)))
4215
4216(define-public python2-distutils-extra
4217 (package-with-python2 python-distutils-extra))
4218
4219(define-public python2-elib.intl
4220 (package
4221 (name "python2-elib.intl")
4222 (version "0.0.3")
4223 (source
4224 (origin
4225 ;; This project doesn't tag releases or publish tarballs, so we take
4226 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4227 (method git-fetch)
4228 (uri (git-reference
4229 (url "https://github.com/dieterv/elib.intl.git")
4230 (commit "d09997cfef")))
4231 (file-name (string-append name "-" version "-checkout"))
4232 (sha256
4233 (base32
4234 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4235 (build-system python-build-system)
4236 (arguments
4237 ;; incompatible with Python 3 (exception syntax)
4238 `(#:python ,python-2
4239 #:tests? #f))
4240 (home-page "https://github.com/dieterv/elib.intl")
4241 (synopsis "Enhanced internationalization for Python")
4242 (description
4243 "The elib.intl module provides enhanced internationalization (I18N)
4244services for your Python modules and applications.")
4245 (license license:lgpl3+)))
4246
4247(define-public python-olefile
4248 (package
4249 (name "python-olefile")
4250 (version "0.45.1")
4251 (source
4252 (origin
4253 (method url-fetch)
4254 (uri (string-append "https://github.com/decalage2/olefile/archive/v"
4255 version ".tar.gz"))
4256 (file-name (string-append name "-" version ".tar.gz"))
4257 (sha256
4258 (base32
4259 "18ai19zwagm6nli14k8bii31ipbab2rp7plrvsm6gmfql551a8ai"))))
4260 (build-system python-build-system)
4261 (home-page
4262 "https://www.decalage.info/python/olefileio")
4263 (synopsis "Read and write Microsoft OLE2 files.")
4264 (description
4265 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
4266Storage or Compound Document, Microsoft Office). It is an improved version of
4267the OleFileIO module from PIL, the Python Image Library.")
4268 (license license:bsd-3)))
4269
4270(define-public python2-olefile
4271 (package-with-python2 python-olefile))
4272
4273(define-public python-pillow
4274 (package
4275 (name "python-pillow")
4276 (version "5.4.1")
4277 (source
4278 (origin
4279 (method url-fetch)
4280 (uri (pypi-uri "Pillow" version))
4281 (sha256
4282 (base32
4283 "17waygkhhzjd75kajlfw9v57mbb41lcpg6cvkdijqd7smm76ccsj"))))
4284 (build-system python-build-system)
4285 (native-inputs
4286 `(("python-pytest" ,python-pytest)))
4287 (inputs
4288 `(("freetype" ,freetype)
4289 ("lcms" ,lcms)
4290 ("zlib" ,zlib)
4291 ("libjpeg" ,libjpeg)
4292 ("openjpeg" ,openjpeg)
4293 ("libtiff" ,libtiff)
4294 ("libwebp" ,libwebp)))
4295 (propagated-inputs
4296 `(("python-olefile" ,python-olefile)))
4297 (arguments
4298 `(#:phases
4299 (modify-phases %standard-phases
4300 (add-after 'unpack 'patch-ldconfig
4301 (lambda _
4302 (substitute* "setup.py"
4303 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
4304 (delete 'check) ; We must run checks after python-pillow is installed.
4305 (add-after 'install 'check-installed
4306 (lambda* (#:key outputs inputs #:allow-other-keys)
4307 (begin
4308 (setenv "HOME" (getcwd))
4309 ;; Make installed package available for running the tests.
4310 (add-installed-pythonpath inputs outputs)
4311 (invoke "python" "selftest.py" "--installed")
4312 (invoke "python" "-m" "pytest" "-vv")))))))
4313 (home-page "https://python-pillow.org")
4314 (synopsis "Fork of the Python Imaging Library")
4315 (description
4316 "The Python Imaging Library adds image processing capabilities to your
4317Python interpreter. This library provides extensive file format support, an
4318efficient internal representation, and fairly powerful image processing
4319capabilities. The core image library is designed for fast access to data
4320stored in a few basic pixel formats. It should provide a solid foundation for
4321a general image processing tool.")
4322 (license (license:x11-style
4323 "http://www.pythonware.com/products/pil/license.htm"
4324 "The PIL Software License"))))
4325
4326(define-public python2-pillow
4327 (package-with-python2 python-pillow))
4328
4329(define-public python-pycparser
4330 (package
4331 (name "python-pycparser")
4332 (version "2.18")
4333 (source
4334 (origin
4335 (method url-fetch)
4336 (uri (pypi-uri "pycparser" version))
4337 (sha256
4338 (base32
4339 "09mjyw82ibqzl449g7swy8bfxnfpmas0815d2rkdjlcqw81wma4r"))))
4340 (outputs '("out" "doc"))
4341 (build-system python-build-system)
4342 (native-inputs
4343 `(("pkg-config" ,pkg-config)))
4344 (arguments
4345 `(#:phases
4346 (modify-phases %standard-phases
4347 (replace 'check
4348 (lambda _
4349 (with-directory-excursion "tests"
acb75c03
RW
4350 (invoke "python" "all_tests.py"))
4351 #t))
44d10b1f
RW
4352 (add-after 'install 'install-doc
4353 (lambda* (#:key outputs #:allow-other-keys)
4354 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4355 (doc (string-append data "/doc/" ,name "-" ,version))
4356 (examples (string-append doc "/examples")))
4357 (mkdir-p examples)
4358 (for-each (lambda (file)
4359 (copy-file (string-append "." file)
4360 (string-append doc file)))
4361 '("/README.rst" "/CHANGES" "/LICENSE"))
4362 (copy-recursively "examples" examples)))))))
4363 (home-page "https://github.com/eliben/pycparser")
4364 (synopsis "C parser in Python")
4365 (description
4366 "Pycparser is a complete parser of the C language, written in pure Python
4367using the PLY parsing library. It parses C code into an AST and can serve as
4368a front-end for C compilers or analysis tools.")
4369 (license license:bsd-3)))
4370
4371(define-public python2-pycparser
4372 (package-with-python2 python-pycparser))
4373
4374(define-public python-pywavelets
4375 (package
4376 (name "python-pywavelets")
4377 (version "1.0.1")
4378 (home-page "https://github.com/PyWavelets/pywt")
4379 (source (origin
4380 (method url-fetch)
4381 (uri (pypi-uri "PyWavelets" version))
4382 (sha256
4383 (base32
4384 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
4385 (build-system python-build-system)
4386 (arguments
4387 '(#:modules ((ice-9 ftw)
4388 (srfi srfi-1)
4389 (srfi srfi-26)
4390 (guix build utils)
4391 (guix build python-build-system))
4392 #:phases (modify-phases %standard-phases
4393 (replace 'check
4394 (lambda _
4395 (let ((cwd (getcwd))
4396 (libdir (find (cut string-prefix? "lib." <>)
4397 (scandir "build"))))
4398 (with-directory-excursion (string-append cwd "/build/" libdir)
4399 (invoke "nosetests" "-v" "."))))))))
4400 (native-inputs
4401 `(("python-matplotlib" ,python-matplotlib) ;for tests
4402 ("python-nose" ,python-nose)))
4403 (propagated-inputs
4404 `(("python-numpy" ,python-numpy)))
4405 (synopsis "Wavelet transforms in Python")
4406 (description
4407 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
4408mathematical basis functions that are localized in both time and frequency.
4409Wavelet transforms are time-frequency transforms employing wavelets. They are
4410similar to Fourier transforms, the difference being that Fourier transforms are
4411localized only in frequency instead of in time and frequency.")
4412 (license license:expat)))
4413
4414(define-public python2-pywavelets
4415 (package-with-python2 python-pywavelets))
4416
4417(define-public python-xcffib
4418 (package
4419 (name "python-xcffib")
4420 (version "0.6.0")
4421 (source
4422 (origin
4423 (method url-fetch)
4424 (uri (pypi-uri "xcffib" version))
4425 (sha256
4426 (base32
4427 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
4428 (build-system python-build-system)
4429 (inputs
4430 `(("libxcb" ,libxcb)))
4431 (propagated-inputs
4432 `(("python-cffi" ,python-cffi) ; used at run time
4433 ("python-six" ,python-six)))
4434 (arguments
4435 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4436 #:tests? #f
4437 #:phases
4438 (modify-phases %standard-phases
4439 (add-after 'unpack 'fix-libxcb-path
4440 (lambda* (#:key inputs #:allow-other-keys)
4441 (let ((libxcb (assoc-ref inputs "libxcb")))
4442 (substitute* '("xcffib/__init__.py")
4443 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4444 #t)))
4445 (add-after 'install 'install-doc
4446 (lambda* (#:key outputs #:allow-other-keys)
4447 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4448 "/doc/" ,name "-" ,version)))
4449 (mkdir-p doc)
4450 (copy-file "README.md"
4451 (string-append doc "/README.md"))
4452 #t))))))
4453 (home-page "https://github.com/tych0/xcffib")
4454 (synopsis "XCB Python bindings")
4455 (description
4456 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4457support for Python 3 and PyPy. It is based on cffi.")
4458 (license license:expat)))
4459
4460(define-public python2-xcffib
4461 (package-with-python2 python-xcffib))
4462
4463(define-public python-cairocffi
4464 (package
4465 (name "python-cairocffi")
4466 (version "0.9.0")
4467 (source
4468 (origin
4469 (method url-fetch)
4470 (uri (pypi-uri "cairocffi" version))
4471 (sha256
4472 (base32
4473 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
4474 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
4475 (build-system python-build-system)
4476 (outputs '("out" "doc"))
4477 (inputs
4478 `(("glib" ,glib)
4479 ("gtk+" ,gtk+)
4480 ("gdk-pixbuf" ,gdk-pixbuf)
4481 ("cairo" ,cairo)
4482 ("pango" ,pango)))
4483 (native-inputs
4484 `(("pkg-config" ,pkg-config)
4485 ("python-pytest" ,python-pytest)
4486 ("python-pytest-cov" ,python-pytest-cov)
4487 ("python-pytest-runner" ,python-pytest-runner)
4488 ("python-sphinx" ,python-sphinx)
4489 ("python-docutils" ,python-docutils)))
4490 (propagated-inputs
4491 `(("python-xcffib" ,python-xcffib))) ; used at run time
4492 (arguments
4493 `(#:phases
4494 (modify-phases %standard-phases
4495 (add-after 'unpack 'patch-paths
4496 (lambda* (#:key inputs outputs #:allow-other-keys)
4497 (substitute* (find-files "." "\\.py$")
4498 (("dlopen\\(ffi, 'cairo'")
4499 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
4500 "/lib/libcairo.so.2'"))
4501 (("dlopen\\(ffi, 'gdk-3'")
4502 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
4503 "/lib/libgtk-3.so.0'"))
4504 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
4505 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
4506 "/lib/libgdk_pixbuf-2.0.so.0'"))
4507 (("dlopen\\(ffi, 'glib-2.0'")
4508 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4509 "/lib/libglib-2.0.so.0'"))
4510 (("dlopen\\(ffi, 'gobject-2.0'")
4511 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4512 "/lib/libgobject-2.0.so.0'"))
4513 (("dlopen\\(ffi, 'pangocairo-1.0'")
4514 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4515 "/lib/libpangocairo-1.0.so.0'"))
4516 (("dlopen\\(ffi, 'pango-1.0'")
4517 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4518 "/lib/libpango-1.0.so.0'")))
4519 #t))
4520 (add-after 'install 'install-doc
4521 (lambda* (#:key inputs outputs #:allow-other-keys)
4522 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4523 (doc (string-append data "/doc/" ,name "-" ,version))
4524 (html (string-append doc "/html")))
4525 (setenv "LD_LIBRARY_PATH"
4526 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4527 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4528 (setenv "LANG" "en_US.UTF-8")
4529 (mkdir-p html)
4530 (for-each (lambda (file)
4531 (copy-file (string-append "." file)
4532 (string-append doc file)))
4533 '("/README.rst" "/CHANGES" "/LICENSE"))
4534 (system* "python" "setup.py" "build_sphinx")
4535 (copy-recursively "docs/_build/html" html)
4536 #t))))))
4537 (home-page "https://github.com/Kozea/cairocffi")
4538 (synopsis "Python bindings and object-oriented API for Cairo")
4539 (description
4540 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4541Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4542graphics library with support for multiple backends including image buffers,
4543PNG, PostScript, PDF, and SVG file output.")
4544 (license license:bsd-3)))
4545
4546(define-public python2-cairocffi
4547 (package-with-python2 python-cairocffi))
4548
4549(define-public python-decorator
4550 (package
4551 (name "python-decorator")
4552 (version "4.3.0")
4553 (source
4554 (origin
4555 (method url-fetch)
4556 (uri (pypi-uri "decorator" version))
4557 (sha256
4558 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4559 (build-system python-build-system)
4560 (home-page "https://pypi.python.org/pypi/decorator/")
4561 (synopsis "Python module to simplify usage of decorators")
4562 (description
4563 "The aim of the decorator module is to simplify the usage of decorators
4564for the average programmer, and to popularize decorators usage giving examples
4565of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4566etc. The core of this module is a decorator factory.")
4567 (license license:expat)))
4568
4569(define-public python2-decorator
4570 (package-with-python2 python-decorator))
4571
4572(define-public python-drmaa
4573 (package
4574 (name "python-drmaa")
4575 (version "0.7.7")
4576 (source
4577 (origin
4578 (method url-fetch)
4579 (uri (pypi-uri "drmaa" version))
4580 (sha256
4581 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4582 (build-system python-build-system)
4583 ;; The test suite requires libdrmaa which is provided by the cluster
4584 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4585 ;; should be set to the path of the libdrmaa library.
4586 (arguments '(#:tests? #f))
4587 (native-inputs
4588 `(("python-nose" ,python-nose)))
4589 (home-page "https://pypi.python.org/pypi/drmaa")
4590 (synopsis "Python bindings for the DRMAA library")
4591 (description
4592 "A Python package for Distributed Resource Management (DRM) job
4593submission and control. This package is an implementation of the DRMAA 1.0
4594Python language binding specification.")
4595 (license license:bsd-3)))
4596
4597(define-public python2-drmaa
4598 (package-with-python2 python-drmaa))
4599
4600(define-public python-grako
4601 (package
4602 (name "python-grako")
4603 (version "3.99.9")
4604 (source
4605 (origin
4606 (method url-fetch)
4607 (uri
4608 (pypi-uri "grako" version ".zip"))
4609 (sha256
4610 (base32
4611 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4612 (build-system python-build-system)
4613 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4614 (native-inputs
4615 `(("unzip" ,unzip)
4616 ("python-pytest" ,python-pytest)
4617 ("python-pytest-runner" ,python-pytest-runner)))
4618 (home-page "https://bitbucket.org/neogeny/grako")
4619 (synopsis "EBNF parser generator")
4620 (description
4621 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4622memoizing PEG/Packrat parser in Python.")
4623 (license license:bsd-3)))
4624
4625(define-public python2-grako
4626 (package-with-python2 python-grako))
4627
4628(define-public python-gridmap
4629 (package
4630 (name "python-gridmap")
4631 (version "0.13.0")
4632 (source
4633 (origin
768fea0f
TGR
4634 (method git-fetch)
4635 (uri (git-reference
4636 (url "https://github.com/pygridtools/gridmap.git")
4637 (commit (string-append "v" version))))
4638 (file-name (git-file-name name version))
44d10b1f 4639 (sha256
768fea0f 4640 (base32 "1478lbwsr1w24cii2x01m2910fvh8r43ghnb78nc972a96hqiknm"))))
44d10b1f
RW
4641 (build-system python-build-system)
4642 (arguments
4643 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4644 (propagated-inputs
4645 `(("python-psutil" ,python-psutil)
4646 ("python-drmaa" ,python-drmaa)
4647 ("python-pyzmq" ,python-pyzmq)))
4648 (home-page "https://github.com/pygridtools/gridmap")
4649 (synopsis "Create jobs on a cluster directly from Python")
4650 (description
4651 "Gridmap is a Python package to allow you to easily create jobs on the
4652cluster directly from Python. You can directly map Python functions onto the
4653cluster without needing to write any wrapper code yourself.")
4654 (license license:gpl3+)))
4655
4656(define-public python2-gridmap
4657 (package-with-python2 python-gridmap))
4658
4659(define-public python-honcho
4660 (package
4661 (name "python-honcho")
4662 (version "1.0.1")
4663 (source
4664 (origin
8524d130
TGR
4665 (method git-fetch)
4666 (uri (git-reference
4667 (url "https://github.com/nickstenning/honcho.git")
4668 (commit (string-append "v" version))))
4669 (file-name (git-file-name name version))
44d10b1f 4670 (sha256
8524d130 4671 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
44d10b1f
RW
4672 (build-system python-build-system)
4673 (native-inputs
4674 `(("python-pytest" ,python-pytest)
4675 ("python-mock" ,python-mock)
4676 ("python-tox" ,python-tox)
4677 ("which" ,which))) ;for tests
4678 (propagated-inputs
4679 `(("python-jinja2" ,python-jinja2)))
4680 (arguments
4681 `(#:phases
4682 (modify-phases %standard-phases
4683 (delete 'check)
4684 (add-after 'install 'check
4685 (lambda* (#:key outputs inputs #:allow-other-keys)
4686 ;; fix honcho path in testsuite
4687 (substitute* "tests/conftest.py"
4688 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4689 "/bin/honcho" "'")))
4690 ;; It's easier to run tests after install.
4691 ;; Make installed package available for running the tests
4692 (add-installed-pythonpath inputs outputs)
95b707fb 4693 (invoke "py.test" "-v"))))))
44d10b1f
RW
4694 (home-page "https://github.com/nickstenning/honcho")
4695 (synopsis "Manage Procfile-based applications")
4696 (description
4697 "A Procfile is a file which describes how to run an application
50fceab0 4698consisting of several processes. honcho starts all listed processes.
44d10b1f
RW
4699The output of all running processes is collected by honcho and
4700displayed.")
4701 (license license:expat)))
4702
4703(define-public python2-honcho
4704 (package-with-python2 python-honcho))
4705
4706(define-public python-pexpect
4707 (package
4708 (name "python-pexpect")
4709 (version "4.6.0")
4710 (source
4711 (origin
4712 (method url-fetch)
4713 (uri (pypi-uri "pexpect" version))
4714 (sha256
4715 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
4716 (build-system python-build-system)
4717 (arguments
4718 `(#:phases
4719 (modify-phases %standard-phases
4720 (add-before 'check 'prepare-tests
4721 (lambda _
4722 (substitute* (find-files "tests")
4723 (("/bin/ls") (which "ls"))
4724 (("/bin/echo") (which "echo"))
4725 (("/bin/which") (which "which"))
4726 ;; Many tests try to use the /bin directory which
4727 ;; is not present in the build environment.
4728 ;; Use one that's non-empty and unlikely to change.
4729 (("/bin'") "/dev'"))
4730 ;; XXX: Socket connection test gets "Connection reset by peer".
4731 ;; Why does it not work? Delete for now.
4732 (delete-file "tests/test_socket.py")
4733 #t))
4734 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
4735 (native-inputs
4736 `(("python-nose" ,python-nose)
4737 ("python-pytest" ,python-pytest)
4738 ("man-db" ,man-db)
4739 ("which" ,which)
4740 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
4741 (propagated-inputs
4742 `(("python-ptyprocess" ,python-ptyprocess)))
4743 (home-page "http://pexpect.readthedocs.org/")
4744 (synopsis "Controlling interactive console applications")
4745 (description
4746 "Pexpect is a pure Python module for spawning child applications;
4747controlling them; and responding to expected patterns in their output.
4748Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4749child application and control it as if a human were typing commands.")
4750 (license license:isc)))
4751
4752(define-public python2-pexpect
4753 (package-with-python2 python-pexpect))
4754
4755(define-public python-setuptools-scm
4756 (package
4757 (name "python-setuptools-scm")
4758 (version "3.1.0")
4759 (source (origin
4760 (method url-fetch)
4761 (uri (pypi-uri "setuptools_scm" version))
4762 (sha256
4763 (base32
4764 "0h4bglwfz8b9prqljv8z3w9rgydfyxzaj05bm1y6zs5m6shz548i"))))
4765 (build-system python-build-system)
4766 (home-page "https://github.com/pypa/setuptools_scm/")
4767 (synopsis "Manage Python package versions in SCM metadata")
4768 (description
4769 "Setuptools_scm handles managing your Python package versions in
4770@dfn{software configuration management} (SCM) metadata instead of declaring
4771them as the version argument or in a SCM managed file.")
4772 (license license:expat)))
4773
4774(define-public python2-setuptools-scm
4775 (package-with-python2 python-setuptools-scm))
4776
4777(define-public python-pathpy
4778 (package
4779 (name "python-pathpy")
4780 (version "11.0.1")
4781 (source
4782 (origin
4783 (method url-fetch)
4784 (uri (pypi-uri "path.py" version))
4785 (sha256
4786 (base32 "07x15v8c7ry9bvycw294c9yq6ky9v2b0dalvgi6rn38ilh69vsz7"))))
4787 ;; (outputs '("out" "doc"))
4788 (build-system python-build-system)
4789 (propagated-inputs
4790 `(("python-appdirs" ,python-appdirs)))
4791 (native-inputs
4792 `(("python-setuptools-scm" ,python-setuptools-scm)
4793 ("python-sphinx" ,python-sphinx)
4794 ("python-rst.linker" ,python-rst.linker)
4795 ("python-pytest" ,python-pytest)
4796 ("python-pytest-runner" ,python-pytest-runner)))
4797 (arguments
4798 ;; FIXME: Documentation and tests require "jaraco.packaging".
4799 `(#:tests? #f))
4800 ;; #:phases
4801 ;; (modify-phases %standard-phases
4802 ;; (add-after 'build 'build-doc
4803 ;; (lambda _
4804 ;; (setenv "LANG" "en_US.UTF-8")
4805 ;; (zero? (system* "python" "setup.py" "build_sphinx"))))
4806 ;; (add-after 'install 'install-doc
4807 ;; (lambda* (#:key outputs #:allow-other-keys)
4808 ;; (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4809 ;; (doc (string-append data "/doc/" ,name "-" ,version))
4810 ;; (html (string-append doc "/html")))
4811 ;; (mkdir-p html)
4812 ;; (for-each (lambda (file)
4813 ;; (copy-file file (string-append doc "/" file)))
4814 ;; '("README.rst" "CHANGES.rst"))
4815 ;; (copy-recursively "build/sphinx/html" html)))))))
4816 (home-page "https://github.com/jaraco/path.py")
4817 (synopsis "Python module wrapper for built-in os.path")
4818 (description
4819 "@code{path.py} implements path objects as first-class entities, allowing
4820common operations on files to be invoked on those path objects directly.")
4821 (license license:expat)))
4822
4823(define-public python2-pathpy
4824 (package-with-python2 python-pathpy))
4825
4826(define-public python-simplegeneric
4827 (package
4828 (name "python-simplegeneric")
4829 (version "0.8.1")
4830 (source
4831 (origin
4832 (method url-fetch)
6c8c3980 4833 (uri (pypi-uri "simplegeneric" version ".zip"))
44d10b1f
RW
4834 (sha256
4835 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4836 (build-system python-build-system)
4837 (native-inputs
4838 `(("unzip" ,unzip)))
4839 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
4840 (synopsis "Python module for simple generic functions")
4841 (description
4842 "The simplegeneric module lets you define simple single-dispatch generic
4843functions, akin to Python’s built-in generic functions like @code{len()},
4844@code{iter()} and so on. However, instead of using specially-named methods,
4845these generic functions use simple lookup tables, akin to those used by
4846e.g. @code{pickle.dump()} and other generic functions found in the Python
4847standard library.")
4848 (license license:zpl2.1)))
4849
4850(define-public python2-simplegeneric
4851 (package-with-python2 python-simplegeneric))
4852
4853(define-public python-ipython-genutils
4854 ;; TODO: This package is retired, check if can be removed, see description.
4855 (package
4856 (name "python-ipython-genutils")
4857 (version "0.1.0")
4858 (source
4859 (origin
4860 (method url-fetch)
c9671d4b 4861 (uri (pypi-uri "ipython_genutils" version))
44d10b1f
RW
4862 (sha256
4863 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
4864 (build-system python-build-system)
4865 (arguments `(#:tests? #f)) ; no tests
4866 (home-page "https://ipython.org")
4867 (synopsis "Vestigial utilities from IPython")
4868 (description
4869 "This package provides retired utilities from IPython. No packages
4870outside IPython/Jupyter should depend on it.
4871
4872This package shouldn't exist. It contains some common utilities shared by
4873Jupyter and IPython projects during The Big Split. As soon as possible, those
4874packages will remove their dependency on this, and this package will go
4875away.")
4876 (license license:bsd-3)))
4877
4878(define-public python2-ipython-genutils
4879 (package-with-python2 python-ipython-genutils))
4880
4881(define-public python-traitlets
4882 (package
4883 (name "python-traitlets")
4884 (version "4.3.2")
4885 (source
4886 (origin
4887 (method url-fetch)
4888 (uri (pypi-uri "traitlets" version))
4889 (sha256
4890 (base32
4891 "0dbq7sx26xqz5ixs711k5nc88p8a0nqyz6162pwks5dpcz9d4jww"))))
4892 (build-system python-build-system)
4893 (arguments
4894 `(#:phases
4895 (modify-phases %standard-phases
4896 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
4897 (propagated-inputs
4898 `(("python-ipython-genutils" ,python-ipython-genutils)
4899 ("python-decorator" ,python-decorator))) ;not needed for >4.3.2
4900 (native-inputs
4901 `(("python-pytest" ,python-pytest)))
4902 (properties `((python2-variant . ,(delay python2-traitlets))))
4903 (home-page "https://ipython.org")
4904 (synopsis "Configuration system for Python applications")
4905 (description
4906 "Traitlets is a framework that lets Python classes have attributes with
4907type checking, dynamically calculated default values, and ‘on change’
4908callbacks. The package also includes a mechanism to use traitlets for
4909configuration, loading values from files or from command line arguments. This
4910is a distinct layer on top of traitlets, so you can use traitlets in your code
4911without using the configuration machinery.")
4912 (license license:bsd-3)))
4913
4914(define-public python2-traitlets
4915 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
4916 (package
4917 (inherit traitlets)
4918 (propagated-inputs
4919 `(("python2-enum34" ,python2-enum34)
4920 ,@(package-propagated-inputs traitlets))))))
4921
4922(define-public python-jupyter-core
4923 (package
4924 (name "python-jupyter-core")
4925 (version "4.4.0")
4926 (source
4927 (origin
4928 (method url-fetch)
4929 (uri (string-append (pypi-uri "jupyter_core" version)))
4930 (sha256
4931 (base32
4932 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
4933 (build-system python-build-system)
4934 ;; FIXME: not sure how to run the tests
4935 (arguments `(#:tests? #f))
4936 (propagated-inputs
4937 `(("python-traitlets" ,python-traitlets)))
4938 (home-page "http://jupyter.org/")
4939 (synopsis "Jupyter base package")
4940 (description
4941 "Jupyter core is the base package on which Jupyter projects rely.")
4942 (license license:bsd-3)))
4943
4944(define-public python2-jupyter-core
4945 (package-with-python2 python-jupyter-core))
4946
4947(define-public python-jupyter-client
4948 (package
4949 (name "python-jupyter-client")
4950 (version "5.2.4")
4951 (source
4952 (origin
4953 (method url-fetch)
4954 (uri (pypi-uri "jupyter_client" version))
4955 (sha256
4956 (base32
4957 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
4958 (build-system python-build-system)
4959 ;; Tests fail because of missing native python kernel which I assume is
4960 ;; provided by the ipython package, which we cannot use because it would
4961 ;; cause a dependency cycle.
4962 (arguments `(#:tests? #f))
4963 (propagated-inputs
4964 `(("python-pyzmq" ,python-pyzmq)
4965 ("python-traitlets" ,python-traitlets)
4966 ("python-jupyter-core" ,python-jupyter-core)))
4967 (home-page "http://jupyter.org/")
4968 (synopsis "Jupyter protocol implementation and client libraries")
4969 (description
4970 "The @code{jupyter_client} package contains the reference implementation
4971of the Jupyter protocol. It also provides client and kernel management APIs
4972for working with kernels, and the @code{jupyter kernelspec} entrypoint for
4973installing @code{kernelspec}s for use with Jupyter frontends.")
4974 (license license:bsd-3)))
4975
4976(define-public python2-jupyter-client
4977 (package-with-python2 python-jupyter-client))
4978
4979(define-public python-ipykernel
4980 (package
4981 (name "python-ipykernel")
4982 (version "5.1.0")
4983 (source
4984 (origin
4985 (method url-fetch)
4986 (uri (pypi-uri "ipykernel" version))
4987 (sha256
4988 (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g"))))
4989 (build-system python-build-system)
4990 (arguments
4991 `(#:phases
4992 (modify-phases %standard-phases
4993 (replace 'check
4994 (lambda _
4995 (setenv "HOME" "/tmp")
4996 (invoke "pytest" "-v")
4997 #t)))))
4998 (propagated-inputs
4999 `(("python-ipython" ,python-ipython)
5000 ;; imported at runtime during connect
5001 ("python-jupyter-client" ,python-jupyter-client)))
5002 (native-inputs
5003 `(("python-pytest" ,python-pytest)
5004 ("python-nose" ,python-nose)))
5005 (home-page "https://ipython.org")
5006 (synopsis "IPython Kernel for Jupyter")
5007 (description
5008 "This package provides the IPython kernel for Jupyter.")
5009 (license license:bsd-3)))
5010
5011(define-public python2-ipykernel
5012 (package-with-python2 python-ipykernel))
5013
966aa714
AE
5014(define-public python-pari-jupyter
5015 (package
5016 (name "python-pari-jupyter")
5017 (version "1.3.2")
5018 (source
5019 (origin
5020 (method url-fetch)
5021 (uri (pypi-uri "pari_jupyter" version))
5022 (sha256
5023 (base32
5024 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
5025 (build-system python-build-system)
5026 (propagated-inputs
5027 `(("python-ipykernel" ,python-ipykernel)))
5028 (inputs
5029 `(("pari-gp" ,pari-gp)
5030 ("readline" ,readline)))
5031 (arguments
5032 `(#:tests? #f)) ; no test suite
5033 (home-page
5034 "https://github.com/jdemeyer/pari_jupyter")
5035 (synopsis "A Jupyter kernel for PARI/GP")
5036 (description "The package provides a PARI/GP kernel for Jupyter.")
5037 (license license:gpl3+)))
5038
44d10b1f
RW
5039;; This is the latest release of the LTS version of ipython with support for
5040;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
5041;; dropped support for Python 2.7. We may want to rename this package.
5042(define-public python-ipython
5043 (package
5044 (name "python-ipython")
5045 (version "5.8.0")
5046 (source
5047 (origin
5048 (method url-fetch)
5049 (uri (pypi-uri "ipython" version ".tar.gz"))
5050 (sha256
5051 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
5052 (build-system python-build-system)
5053 (outputs '("out" "doc"))
5054 (propagated-inputs
5055 `(("python-pyzmq" ,python-pyzmq)
5056 ("python-prompt-toolkit" ,python-prompt-toolkit-1)
5057 ("python-terminado" ,python-terminado)
5058 ("python-matplotlib" ,python-matplotlib)
5059 ("python-numpy" ,python-numpy)
5060 ("python-numpydoc" ,python-numpydoc)
5061 ("python-jinja2" ,python-jinja2)
5062 ("python-mistune" ,python-mistune)
5063 ("python-pexpect" ,python-pexpect)
5064 ("python-pickleshare" ,python-pickleshare)
5065 ("python-simplegeneric" ,python-simplegeneric)
5066 ("python-jsonschema" ,python-jsonschema)
5067 ("python-traitlets" ,python-traitlets)
5068 ("python-nbformat" ,python-nbformat)
5069 ("python-pygments" ,python-pygments)))
5070 (inputs
5071 `(("readline" ,readline)
5072 ("which" ,which)))
5073 (native-inputs
5074 `(("graphviz" ,graphviz)
5075 ("pkg-config" ,pkg-config)
5076 ("python-requests" ,python-requests) ;; for tests
5077 ("python-testpath" ,python-testpath)
5078 ("python-nose" ,python-nose)
5079 ("python-sphinx" ,python-sphinx)
5080 ("python-shpinx-rtd-theme" ,python-sphinx-rtd-theme)
5081 ;; FIXME: It's possible that a smaller union would work just as well.
5082 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
5083 texlive-fonts-ec
5084 texlive-generic-ifxetex
5085 texlive-generic-pdftex
5086 texlive-latex-amsfonts
5087 texlive-latex-capt-of
5088 texlive-latex-cmap
5089 texlive-latex-environ
5090 texlive-latex-eqparbox
5091 texlive-latex-etoolbox
5092 texlive-latex-expdlist
5093 texlive-latex-fancyhdr
5094 texlive-latex-fancyvrb
5095 texlive-latex-fncychap
5096 texlive-latex-float
5097 texlive-latex-framed
5098 texlive-latex-geometry
5099 texlive-latex-graphics
5100 texlive-latex-hyperref
5101 texlive-latex-mdwtools
5102 texlive-latex-multirow
5103 texlive-latex-oberdiek
5104 texlive-latex-parskip
5105 texlive-latex-preview
5106 texlive-latex-tabulary
5107 texlive-latex-threeparttable
5108 texlive-latex-titlesec
5109 texlive-latex-trimspaces
5110 texlive-latex-ucs
5111 texlive-latex-upquote
5112 texlive-latex-url
5113 texlive-latex-varwidth
5114 texlive-latex-wrapfig)))
5115 ("texinfo" ,texinfo)))
5116 (arguments
5117 `(#:phases
5118 (modify-phases %standard-phases
5119 (add-after 'install 'install-doc
5120 (lambda* (#:key inputs outputs #:allow-other-keys)
5121 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5122 (doc (string-append data "/doc/" ,name "-" ,version))
5123 (html (string-append doc "/html"))
5124 (man1 (string-append data "/man/man1"))
5125 (info (string-append data "/info"))
5126 (examples (string-append doc "/examples"))
5127 (python-arg (string-append "PYTHON=" (which "python"))))
5128 (setenv "LANG" "en_US.utf8")
5129 ;; Make installed package available for running the tests
5130 (add-installed-pythonpath inputs outputs)
5131 (with-directory-excursion "docs"
5132 ;; FIXME: pdf fails to build
5133 ;;(system* "make" "pdf" "PAPER=a4")
5134 (system* "make" python-arg "html")
5135 (system* "make" python-arg "info"))
5136 (copy-recursively "docs/man" man1)
5137 (copy-recursively "examples" examples)
5138 (copy-recursively "docs/build/html" html)
5139 ;; (copy-file "docs/build/latex/ipython.pdf"
5140 ;; (string-append doc "/ipython.pdf"))
5141 (mkdir-p info)
5142 (copy-file "docs/build/texinfo/ipython.info"
5143 (string-append info "/ipython.info"))
5144 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
5145 #t))
5146 ;; Tests can only be run after the library has been installed and not
5147 ;; within the source directory.
5148 (delete 'check)
5149 (add-after 'install 'check
5150 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5151 (if tests?
5152 (begin
5153 ;; Make installed package available for running the tests
5154 (add-installed-pythonpath inputs outputs)
5155 (setenv "HOME" "/tmp/") ;; required by a test
5156 ;; We only test the core because one of the other tests
5157 ;; tries to import ipykernel.
5158 (invoke "python" "IPython/testing/iptest.py"
5159 "-v" "IPython/core/tests"))
5160 #t)))
5161 (add-before 'check 'fix-tests
5162 (lambda* (#:key inputs #:allow-other-keys)
5163 (substitute* "./IPython/utils/_process_posix.py"
5164 (("/usr/bin/env', 'which") (which "which")))
5165 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5166 (("#!/usr/bin/env python")
5167 (string-append "#!" (which "python"))))
5168 ;; Disable 1 failing test
5169 (substitute* "./IPython/core/tests/test_magic.py"
5170 (("def test_dirops\\(\\):" all)
5171 (string-append "@dec.skipif(True)\n" all)))
5172 ;; This test introduces a circular dependency on ipykernel
5173 ;; (which depends on ipython).
5174 (delete-file "IPython/core/tests/test_display.py")
5175 ;; These tests throw errors for unknown reasons.
5176 (delete-file "IPython/extensions/tests/test_storemagic.py")
5177 (delete-file "IPython/core/tests/test_displayhook.py")
5178 (delete-file "IPython/core/tests/test_interactiveshell.py")
5179 (delete-file "IPython/core/tests/test_pylabtools.py")
5180 (delete-file "IPython/core/tests/test_paths.py")
5181 #t)))))
5182 (home-page "https://ipython.org")
5183 (synopsis "IPython is a tool for interactive computing in Python")
5184 (description
5185 "IPython provides a rich architecture for interactive computing with:
5186Powerful interactive shells, a browser-based notebook, support for interactive
5187data visualization, embeddable interpreters and tools for parallel
5188computing.")
5189 (license license:bsd-3)
5190 (properties `((python2-variant . ,(delay python2-ipython))))))
5191
5192(define-public python2-ipython
5193 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
5194 (package
5195 (inherit ipython)
5196 ;; FIXME: add pyreadline once available.
5197 (propagated-inputs
5198 `(("python2-backports-shutil-get-terminal-size"
5199 ,python2-backports-shutil-get-terminal-size)
5200 ("python2-pathlib2" ,python2-pathlib2)
5201 ,@(package-propagated-inputs ipython)))
5202 (native-inputs
5203 `(("python2-mock" ,python2-mock)
5204 ,@(package-native-inputs ipython))))))
5205
5206(define-public python-urwid
5207 (package
5208 (name "python-urwid")
5209 (version "2.0.1")
5210 (source
5211 (origin
5212 (method url-fetch)
5213 (uri (pypi-uri "urwid" version))
5214 (sha256
5215 (base32
5216 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
5217 (build-system python-build-system)
5218 (home-page "http://urwid.org")
5219 (synopsis "Console user interface library for Python")
5220 (description
5221 "Urwid is a curses-based UI/widget library for Python. It includes many
5222features useful for text console applications.")
5223 (license license:lgpl2.1+)))
5224
5225(define-public python2-urwid
5226 (package-with-python2 python-urwid))
5227
5228(define-public python-urwidtrees
5229 (package
5230 (name "python-urwidtrees")
5231 (version "1.0.2")
5232 (source
5233 (origin
5234 (method url-fetch)
5235 ;; package author intends on distributing via github rather than pypi:
5236 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5237 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5238 version ".tar.gz"))
5239 (file-name (string-append name "-" version ".tar.gz"))
5240 (sha256
5241 (base32
5242 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
5243 (build-system python-build-system)
5244 (arguments
5245 '(#:tests? #f)) ; no tests
5246 (propagated-inputs `(("python-urwid" ,python-urwid)))
5247 (home-page "https://github.com/pazz/urwidtrees")
5248 (synopsis "Tree widgets for urwid")
5249 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5250toolkit. Use it to build trees of widgets.")
5251 (license license:gpl3+)))
5252
5253(define-public python2-urwidtrees
5254 (package-with-python2 python-urwidtrees))
5255
5256(define-public python-ua-parser
5257 (package
5258 (name "python-ua-parser")
5259 (version "0.8.0")
5260 (source
5261 (origin
5262 (method url-fetch)
5263 (uri (pypi-uri "ua-parser" version))
5264 (sha256
5265 (base32
5266 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
5267 (build-system python-build-system)
5268 (arguments
5269 `(#:tests? #f)) ;no test suite in release
5270 (native-inputs
5271 `(("python-pyyaml" ,python-pyyaml)))
5272 (home-page "https://github.com/ua-parser/uap-python")
5273 (synopsis "User agent parser")
5274 (description
5275 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
5276 (license license:asl2.0)))
5277
5278(define-public python2-ua-parser
5279 (package-with-python2 python-ua-parser))
5280
5281(define-public python-user-agents
5282 (package
5283 (name "python-user-agents")
5284 (version "1.1.0")
5285 (source
5286 (origin
5287 (method url-fetch)
5288 (uri (pypi-uri "user-agents" version))
5289 (sha256
5290 (base32
5291 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
5292 (build-system python-build-system)
5293 (arguments
5294 `(#:tests? #f)) ;missing devices.json test file in release
5295 (propagated-inputs
5296 `(("python-ua-parser" ,python-ua-parser)))
5297 (home-page "https://github.com/selwin/python-user-agents")
5298 (synopsis "User Agent strings parsing library")
5299 (description
5300 "A library to identify devices (phones, tablets) and their capabilities by
5301parsing (browser/HTTP) user agent strings.")
5302 (license license:expat)))
5303
5304(define-public python2-user-agents
5305 (package-with-python2 python-user-agents))
5306
5307(define-public python-dbus
5308 (package
5309 (name "python-dbus")
5310 (version "1.2.8")
5311 (source
5312 (origin
5313 (method url-fetch)
5314 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
5315 "dbus-python-" version ".tar.gz"))
5316 (sha256
5317 (base32
5318 "0vvvjmiwnc9cjlks3gcdk43ap7llhlpz7cm1wbw0nc2yfsxjpwdb"))))
5319 (build-system gnu-build-system)
5320 (arguments
5321 '(#:phases
5322 (modify-phases %standard-phases
5323 (add-before
5324 'check 'pre-check
5325 (lambda _
5326 ;; XXX: For the missing '/etc/machine-id'.
5327 (substitute* "test/run-test.sh"
5328 (("DBUS_FATAL_WARNINGS=1")
5329 "DBUS_FATAL_WARNINGS=0"))
5330 #t)))))
5331 (native-inputs
5332 `(("pkg-config" ,pkg-config)))
5333 (inputs
5334 `(("python" ,python-wrapper)
5335 ("dbus-glib" ,dbus-glib)))
5336 (synopsis "Python bindings for D-bus")
5337 (description "python-dbus provides bindings for libdbus, the reference
5338implementation of D-Bus.")
5339 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
5340 (license license:expat)))
5341
5342(define-public python2-dbus
5343 (package (inherit python-dbus)
5344 (name "python2-dbus")
5345 (inputs `(("python" ,python-2)
5346 ,@(alist-delete "python"
5347 (package-inputs python-dbus)
5348 equal?)))
5349 ;; FIXME: on Python 2, the test_utf8 fails with:
5350 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5351 (arguments `(#:tests? #f))))
5352
5353(define-public python-lxml
5354 (package
5355 (name "python-lxml")
5356 (version "4.2.5")
5357 (source
5358 (origin
5359 (method url-fetch)
5360 (uri (pypi-uri "lxml" version))
5361 (sha256
5362 (base32
5363 "0zw0y9hs0nflxhl9cs6ipwwh53szi3w2x06wl0k9cylyqac0cwin"))))
5364 (build-system python-build-system)
5365 (inputs
5366 `(("libxml2" ,libxml2)
5367 ("libxslt" ,libxslt)))
5368 (home-page "http://lxml.de/")
5369 (synopsis
5370 "Python XML processing library")
5371 (description
5372 "The lxml XML toolkit is a Pythonic binding for the C libraries
5373libxml2 and libxslt.")
5374 (license license:bsd-3))) ; and a few more, see LICENSES.txt
5375
5376(define-public python2-lxml
5377 (package-with-python2 python-lxml))
5378
5379;; beautifulsoup4 has a totally different namespace than 3.x,
5380;; and pypi seems to put it under its own name, so I guess we should too
5381(define-public python-beautifulsoup4
5382 (package
5383 (name "python-beautifulsoup4")
5384 (version "4.6.3")
5385 (source
5386 (origin
5387 (method url-fetch)
5388 (uri (pypi-uri "beautifulsoup4" version))
5389 (sha256
5390 (base32
5391 "041dhalzjciw6qyzzq7a2k4h1yvyk76xigp35hv5ibnn448ydy4h"))))
5392 (build-system python-build-system)
5393 (arguments
5394 `(#:phases
5395 (modify-phases %standard-phases
5396 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5397 ;; must use this conversion script when building with Python 3. The
5398 ;; conversion script also runs the tests.
5399 ;; For more information, see the file 'convert-py3k' in the source
5400 ;; distribution.
5401 (replace 'check
dff0197e 5402 (lambda _ (invoke "./convert-py3k"))))))
44d10b1f
RW
5403 (home-page
5404 "https://www.crummy.com/software/BeautifulSoup/bs4/")
5405 (synopsis
5406 "Python screen-scraping library")
5407 (description
5408 "Beautiful Soup is a Python library designed for rapidly setting up
5409screen-scraping projects. It offers Pythonic idioms for navigating,
5410searching, and modifying a parse tree, providing a toolkit for
5411dissecting a document and extracting what you need. It automatically
5412converts incoming documents to Unicode and outgoing documents to UTF-8.")
5413 (license license:expat)
5414 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5415
5416(define-public python2-beautifulsoup4
5417 (package
5418 (inherit (package-with-python2
5419 (strip-python2-variant python-beautifulsoup4)))
5420 (arguments `(#:python ,python-2))))
5421
ad74978a
BT
5422(define-public python-soupsieve
5423 (package
5424 (name "python-soupsieve")
5425 (version "1.9.1")
5426 (source
5427 (origin
5428 (method url-fetch)
5429 (uri (pypi-uri "soupsieve" version))
5430 (sha256
5431 (base32
5432 "1jnzkiwmjl6yvqckc9mf689g87b6yz07sv868hap2aa5arggy3mj"))))
5433 (build-system python-build-system)
5434 (arguments `(#:tests? #f))
5435 ;;XXX: 2 tests fail currently despite claming they were to be
5436 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
5437 ;;don't want to create a circular dependency.
5438 (home-page "https://github.com/facelessuser/soupsieve")
5439 (synopsis "CSS selector library")
5440 (description
5441 "Soup Sieve is a CSS selector library designed to be used with Beautiful
5442Soup 4. It aims to provide selecting, matching, and filtering using modern
5443CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
5444specifications up through the latest CSS level 4 drafts and beyond (though
5445some are not yet implemented).")
5446 (license license:expat)))
5447
5448(define-public python2-soupsieve
5449 (let ((base (package-with-python2 python-soupsieve)))
5450 (package
5451 (inherit base)
5452 (propagated-inputs
5453 `(("python2-backports-functools-lru-cache" ,python2-backports-functools-lru-cache))))))
5454
44d10b1f
RW
5455(define-public python-netifaces
5456 (package
5457 (name "python-netifaces")
5458 (version "0.10.7")
5459 (source
5460 (origin
5461 (method url-fetch)
5462 (uri (pypi-uri "netifaces" version))
5463 (sha256
5464 (base32
5465 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
5466 (build-system python-build-system)
5467 (home-page "https://github.com/al45tair/netifaces")
5468 (synopsis
5469 "Python module for portable network interface information")
5470 (description
5471 "Netifaces is a Python module providing information on network
5472interfaces in an easy and portable manner.")
5473 (license license:expat)))
5474
5475(define-public python2-netifaces
5476 (package-with-python2 python-netifaces))
5477
5478(define-public python-networkx
5479 (package
5480 (name "python-networkx")
5481 (version "2.2")
5482 (source
5483 (origin
5484 (method url-fetch)
5485 (uri (pypi-uri "networkx" version ".zip"))
5486 (sha256
5487 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
5488 (build-system python-build-system)
5489 ;; python-decorator is needed at runtime.
5490 (propagated-inputs
5491 `(("python-decorator" ,python-decorator)))
5492 (native-inputs
5493 `(("python-nose" ,python-nose)
5494 ("unzip" ,unzip)))
5495 (home-page "https://networkx.github.io/")
5496 (synopsis "Python module for creating and manipulating graphs and networks")
5497 (description
5498 "NetworkX is a Python package for the creation, manipulation, and study
5499of the structure, dynamics, and functions of complex networks.")
5500 (license license:bsd-3)))
5501
5502(define-public python2-networkx
5503 (package-with-python2 python-networkx))
5504
5505(define-public python-datrie
5506 (package
5507 (name "python-datrie")
5508 (version "0.7.1")
5509 (source
5510 (origin
5511 (method url-fetch)
5512 (uri (pypi-uri "datrie" version))
5513 (sha256
5514 (base32
5515 "08r0if7dry2q7p34gf7ffyrlnf4bdvnprxgydlfxgfnvq8f3f4bs"))))
5516 (build-system python-build-system)
5517 (arguments
5518 `(#:phases (modify-phases %standard-phases
5519 (add-before 'build 'cythonize
5520 (lambda _
5521 ;; Regenerate Cython classes to solve ABI issues with Python
5522 ;; 3.7.0. See <https://github.com/pytries/datrie/issues/52>.
5523 (invoke "cython" "src/datrie.pyx" "src/cdatrie.pxd"
5524 "src/stdio_ext.pxd" "-a"))))))
5525 (native-inputs
5526 `(("python-cython" ,python-cython)
5527 ("python-hypothesis" ,python-hypothesis)
5528 ("python-pytest" ,python-pytest)
5529 ("python-pytest-runner" ,python-pytest-runner)))
5530 (home-page "https://github.com/kmike/datrie")
5531 (synopsis "Fast, efficiently stored trie for Python")
5532 (description
5533 "This package provides a fast, efficiently stored trie implementation for
5534Python.")
5535 (license license:lgpl2.1+)))
5536
5537(define-public snakemake
5538 (package
5539 (name "snakemake")
5540 (version "5.2.4")
5541 (source
5542 (origin
5543 (method url-fetch)
5544 (uri (pypi-uri "snakemake" version))
5545 (sha256
5546 (base32 "0gj0xxgiq3mp9qyyrbfzldiaq1giliqw0in64nqiz7vx49myqj7z"))))
5547 (build-system python-build-system)
5548 (arguments
5549 ;; TODO: Package missing test dependencies.
5550 '(#:tests? #f
5551 #:phases
5552 (modify-phases %standard-phases
5553 ;; For cluster execution Snakemake will call Python. Since there is
5554 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
5555 ;; this by calling the snakemake wrapper instead.
5556 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
5557 (lambda* (#:key outputs #:allow-other-keys)
5558 (substitute* "snakemake/executors.py"
5559 (("\\{sys.executable\\} -m snakemake")
5560 (string-append (assoc-ref outputs "out")
5561 "/bin/snakemake")))
5562 #t)))))
5563 (propagated-inputs
5564 `(("python-gitpython" ,python-gitpython)
5565 ("python-wrapt" ,python-wrapt)
5566 ("python-requests" ,python-requests)
5567 ("python-appdirs" ,python-appdirs)
5568 ("python-configargparse" ,python-configargparse)
5569 ("python-datrie" ,python-datrie)
5570 ("python-docutils" ,python-docutils)
5571 ("python-jinja2" ,python-jinja2)
5572 ("python-jsonschema" ,python-jsonschema)
5573 ("python-networkx" ,python-networkx)
5574 ("python-pyyaml" ,python-pyyaml)
5575 ("python-ratelimiter" ,python-ratelimiter)))
5576 (home-page "https://snakemake.readthedocs.io")
5577 (synopsis "Python-based execution environment for make-like workflows")
5578 (description
5579 "Snakemake aims to reduce the complexity of creating workflows by
5580providing a clean and modern domain specific specification language (DSL) in
5581Python style, together with a fast and comfortable execution environment.")
5582 (license license:expat)))
5583
5584;; This is currently needed for the pigx-* packages.
5585(define-public snakemake-4
5586 (package (inherit snakemake)
5587 (version "4.4.0")
5588 (source
5589 (origin
5590 (method url-fetch)
5591 (uri (pypi-uri "snakemake" version))
5592 (sha256
5593 (base32 "0g0paia4z7w3srnqdmavq3hrb2x7qnpf81jx50njl0p7y4y0j8jv"))))
5594 (propagated-inputs
5595 `(("python-wrapt" ,python-wrapt)
5596 ("python-requests" ,python-requests)
5597 ("python-appdirs" ,python-appdirs)
5598 ("python-configargparse" ,python-configargparse)
5599 ("python-pyyaml" ,python-pyyaml)
5600 ("python-ratelimiter" ,python-ratelimiter)))))
5601
5602(define-public python-pyqrcode
5603 (package
5604 (name "python-pyqrcode")
5605 (version "1.2.1")
5606 (source
5607 (origin
5608 (method url-fetch)
5609 (uri (pypi-uri "PyQRCode" version))
5610 (sha256
5611 (base32
5612 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
5613 (build-system python-build-system)
5614 (home-page
5615 "https://github.com/mnooner256/pyqrcode")
5616 (synopsis "QR code generator")
5617 (description
5618 "Pyqrcode is a QR code generator written purely in Python with
5619SVG, EPS, PNG and terminal output.")
5620 (license license:bsd-3)))
5621
5622(define-public python-seaborn
5623 (package
5624 (name "python-seaborn")
5625 (version "0.9.0")
5626 (source
5627 (origin
5628 (method url-fetch)
5629 (uri (pypi-uri "seaborn" version))
5630 (sha256
5631 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))))
5632 (build-system python-build-system)
5633 (arguments
5634 `(#:phases
5635 (modify-phases %standard-phases
5636 (add-before 'check 'start-xserver
5637 (lambda* (#:key inputs #:allow-other-keys)
5638 (let ((xorg-server (assoc-ref inputs "xorg-server")))
5639 ;; There must be a running X server and make check doesn't
5640 ;; start one. Therefore we must do it.
5641 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
5642 (setenv "DISPLAY" ":1")
5643 #t)))
5644 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
5645 (propagated-inputs
5646 `(("python-pandas" ,python-pandas)
5647 ("python-matplotlib" ,python-matplotlib)
5648 ("python-numpy" ,python-numpy)
5649 ("python-scipy" ,python-scipy)))
5650 (native-inputs
5651 `(("python-pytest" ,python-pytest)
5652 ("xorg-server" ,xorg-server)))
5653 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5654 (synopsis "Statistical data visualization")
5655 (description
5656 "Seaborn is a library for making attractive and informative statistical
5657graphics in Python. It is built on top of matplotlib and tightly integrated
5658with the PyData stack, including support for numpy and pandas data structures
5659and statistical routines from scipy and statsmodels.")
5660 (license license:bsd-3)))
5661
5662(define-public python2-seaborn
5663 (package-with-python2 python-seaborn))
5664
5665(define-public python-mpmath
5666 (package
5667 (name "python-mpmath")
5668 (version "0.19")
5669 (source (origin
5670 (method url-fetch)
5671 (uri (string-append "http://mpmath.org/files/mpmath-"
5672 version ".tar.gz"))
5673 (sha256
5674 (base32
5675 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
5676 (build-system python-build-system)
5677 (arguments
5678 '(#:phases
5679 (modify-phases %standard-phases
5680 (replace 'check
5681 (lambda _
5d7a6f1c 5682 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
44d10b1f
RW
5683 (home-page "http://mpmath.org")
5684 (synopsis "Arbitrary-precision floating-point arithmetic in python")
5685 (description
5686 "@code{mpmath} can be used as an arbitrary-precision substitute for
5687Python's float/complex types and math/cmath modules, but also does much
5688more advanced mathematics.")
5689 (license license:bsd-3)))
5690
5691(define-public python2-mpmath
5692 (package-with-python2 python-mpmath))
5693
5694(define-public python-bigfloat
5695 (package
5696 (name "python-bigfloat")
5697 (version "0.3.0")
5698 (source
5699 (origin
5700 (method url-fetch)
5701 (uri (pypi-uri "bigfloat" version))
5702 (sha256
5703 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
5704 (build-system python-build-system)
5705 (inputs
5706 `(("mpfr" ,mpfr)))
5707 (home-page "https://github.com/mdickinson/bigfloat")
5708 (synopsis "Arbitrary precision floating-point arithmetic for Python")
5709 (description
e36de31b 5710 "This package provides a Python interface to the MPFR library for
44d10b1f
RW
5711multiprecision arithmetic.")
5712 (license license:lgpl3+)))
5713
5714(define-public python2-bigfloat
5715 (package-with-python2 python-bigfloat))
5716
5717(define-public python-sympy
5718 (package
5719 (name "python-sympy")
5720 (version "1.1.1")
5721 (source
5722 (origin
5723 (method url-fetch)
5724 (uri (string-append
5725 "https://github.com/sympy/sympy/releases/download/sympy-"
5726 version "/sympy-" version ".tar.gz"))
5727 (sha256
5728 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
5729 (build-system python-build-system)
5730 (arguments
5731 `(#:phases
5732 (modify-phases %standard-phases
5733 ;; Run the core tests after installation. By default it would run
5734 ;; *all* tests, which take a very long time to complete and are known
5735 ;; to be flaky.
5736 (delete 'check)
5737 (add-after 'install 'check
5738 (lambda* (#:key outputs #:allow-other-keys)
5739 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
5740 #t)))))
5741 (propagated-inputs
5742 `(("python-mpmath" ,python-mpmath)))
5743 (home-page "http://www.sympy.org/")
5744 (synopsis "Python library for symbolic mathematics")
5745 (description
5746 "SymPy is a Python library for symbolic mathematics. It aims to become a
5747full-featured computer algebra system (CAS) while keeping the code as simple
5748as possible in order to be comprehensible and easily extensible.")
5749 (license license:bsd-3)))
5750
5751(define-public python2-sympy
5752 (package
5753 (inherit (package-with-python2 python-sympy))
5754 (arguments
5755 `(#:phases
5756 (modify-phases %standard-phases
5757 ;; Run the core tests after installation. By default it would run
5758 ;; *all* tests, which take a very long time to complete and are known
5759 ;; to be flaky.
5760 (delete 'check)
5761 (add-after 'install 'check
5762 (lambda* (#:key outputs #:allow-other-keys)
5763 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
5764 #t)))))))
5765
5766(define-public python-q
5767 (package
5768 (name "python-q")
5769 (version "2.6")
5770 (source
5771 (origin
5772 (method url-fetch)
5773 (uri (pypi-uri "q" version))
5774 (sha256
5775 (base32
5776 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
5777 (build-system python-build-system)
5778 (home-page "https://github.com/zestyping/q")
5779 (synopsis "Quick-and-dirty debugging output for tired programmers")
5780 (description
5781 "q is a Python module for \"print\" style of debugging Python code. It
5782provides convenient short API for print out of values, tracebacks, and
5783falling into the Python interpreter.")
5784 (license license:asl2.0)))
5785
5786(define-public python2-q
5787 (package-with-python2 python-q))
5788
5789(define-public python2-xlib
5790 (package
5791 (name "python2-xlib")
5792 (version "0.14")
5793 (source (origin
5794 (method url-fetch)
5795 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
5796 "/" version "/"
5797 "python-xlib-" version ".tar.gz"))
5798 (sha256
5799 (base32
5800 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
5801 (build-system python-build-system)
5802 (arguments
5803 `(#:python ,python-2 ;Python 2 only
5804 #:tests? #f)) ;no tests
5805 (home-page "http://python-xlib.sourceforge.net/")
5806 (synopsis "Python X11 client library")
5807 (description
5808 "The Python X Library is intended to be a fully functional X client
5809library for Python programs. It is useful to implement low-level X clients.
5810It is written entirely in Python.")
5811 (license license:gpl2+)))
5812
5813(define-public python-singledispatch
5814 (package
5815 (name "python-singledispatch")
5816 (version "3.4.0.3")
5817 (source
5818 (origin
5819 (method url-fetch)
5820 (uri (pypi-uri "singledispatch" version))
5821 (sha256
5822 (base32
5823 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
5824 (build-system python-build-system)
5825 (native-inputs
5826 `(("python-six" ,python-six))) ; required for conversion, not at run-time
5827 (home-page
5828 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
5829 (synopsis "Backport of singledispatch feature from Python 3.4")
5830 (description
5831 "This library brings functools.singledispatch from Python 3.4 to Python
58322.6-3.3.")
5833 (license license:expat)))
5834
5835(define-public python2-singledispatch
5836 (package-with-python2 python-singledispatch))
5837
5838;; the python- version can be removed with python-3.5
5839(define-public python-backports-abc
5840 (package
5841 (name "python-backports-abc")
5842 (version "0.5")
5843 (source
5844 (origin
5845 (method url-fetch)
5846 (uri (pypi-uri "backports_abc" version))
5847 (sha256
5848 (base32
5849 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
5850 (build-system python-build-system)
5851 (home-page "https://github.com/cython/backports_abc")
5852 (synopsis "Backport of additions to the 'collections.abc' module")
5853 (description
5854 "Python-backports-abc provides a backport of additions to the
36a4366d 5855@code{collections.abc} module in Python-3.5.")
44d10b1f
RW
5856 (license license:psfl)))
5857
5858(define-public python2-backports-abc
5859 (package-with-python2 python-backports-abc))
5860
5861(define-public python-backports-csv
5862 (package
5863 (name "python-backports-csv")
5864 (version "1.0.5")
5865 (source
5866 (origin
5867 (method url-fetch)
5868 (uri (pypi-uri "backports.csv" version))
5869 (sha256
5870 (base32
5871 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
5872 (build-system python-build-system)
5873 (home-page "https://github.com/ryanhiebert/backports.csv")
5874 (synopsis "Backport of Python 3's csv module for Python 2")
5875 (description
5876 "Provides a backport of Python 3's @code{csv} module for parsing
5877comma separated values. The API of the @code{csv} module in Python 2
5878is drastically different from the @code{csv} module in Python 3.
5879This is due, for the most part, to the difference between str in
5880Python 2 and Python 3.")
5881 (license license:psfl)))
5882
5883(define-public python2-backports-csv
5884 (package-with-python2 python-backports-csv))
5885
5886(define-public python2-backports-shutil-get-terminal-size
5887 (package
5888 (name "python2-backports-shutil-get-terminal-size")
5889 (version "1.0.0")
5890 (source
5891 (origin
5892 (method url-fetch)
5893 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
5894 (sha256
5895 (base32
5896 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
5897 (build-system python-build-system)
5898 (arguments
5899 `(#:python ,python-2
5900 #:phases
5901 (modify-phases %standard-phases
5902 (replace 'check
5903 (lambda _
4a4a7d9a 5904 (invoke "py.test" "-v"))))))
44d10b1f
RW
5905 (native-inputs
5906 `(("python2-pytest" ,python2-pytest)))
5907 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
5908 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
5909 (description
5910 "This package provides a backport of the @code{get_terminal_size
5911function} from Python 3.3's @code{shutil}.
5912Unlike the original version it is written in pure Python rather than C,
5913so it might be a tiny bit slower.")
5914 (license license:expat)))
5915
5916(define-public python-waf
5917 (package
5918 (name "python-waf")
5919 (version "2.0.11")
5920 (source (origin
5921 (method url-fetch)
5922 (uri (string-append "https://waf.io/"
5923 "waf-" version ".tar.bz2"))
5924 (sha256
5925 (base32
5926 "13zrniwkmfqgsgzi9v5m1367fppp9yzrz6z2ny6hy8dmpb8mj4z4"))))
5927 (build-system python-build-system)
5928 (arguments
5929 '(#:phases
5930 (modify-phases %standard-phases
5931 (replace 'build
5932 (lambda _
5933 (invoke "python" "waf-light" "configure" "build")))
5934 (replace 'check
5935 (lambda _
5936 (invoke "python" "waf" "--version")))
5937 (replace 'install
5938 (lambda* (#:key outputs #:allow-other-keys)
5939 (let ((out (assoc-ref outputs "out")))
5940 (install-file "waf" (string-append out "/bin")))
5941 #t))
5942 ;; waf breaks when it is wrapped.
5943 (delete 'wrap))))
5944 (home-page "https://waf.io/")
5945 (synopsis "Python-based build system")
5946 (description
5947 "Waf is a Python-based framework for configuring, compiling and installing
5948applications.")
5949 (license license:bsd-3)))
5950
5951(define-public python2-waf
5952 (package-with-python2 python-waf))
5953
5954(define-public python-pyzmq
5955 (package
5956 (name "python-pyzmq")
5957 (version "17.1.2")
5958 (source
5959 (origin
5960 (method url-fetch)
5961 (uri (pypi-uri "pyzmq" version))
5962 (sha256
5963 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
5964 (build-system python-build-system)
5965 (arguments
5966 `(#:configure-flags
5967 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
5968 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
5969 ;; --inplace' for 'python setup.py test' to work.
5970 #:tests? #f))
5971 (inputs
5972 `(("zeromq" ,zeromq)))
5973 (native-inputs
5974 `(("pkg-config" ,pkg-config)
5975 ("python-nose" ,python-nose)))
5976 (home-page "https://github.com/zeromq/pyzmq")
5977 (synopsis "Python bindings for 0MQ")
5978 (description
5979 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
5980 (license license:bsd-4)))
5981
5982(define-public python2-pyzmq
5983 (package-with-python2 python-pyzmq))
5984
5985(define-public python-pep8
5986 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
5987 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
5988 ;; some dependents' test suites, and nothing more.
5989 (package
5990 (name "python-pep8")
5991 (version "1.7.0")
5992 (source
5993 (origin
5994 (method url-fetch)
5995 (uri (pypi-uri "pep8" version))
5996 (sha256
5997 (base32
5998 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
5999 (build-system python-build-system)
6000 (home-page "https://pep8.readthedocs.org/")
6001 (synopsis "Python style guide checker")
6002 (description
6003 "This tools checks Python code against some of the style conventions in
6004PEP 8.")
6005 (license license:expat)))
6006
6007(define-public python2-pep8
6008 (package-with-python2 python-pep8))
6009
6010(define-public python-pyflakes
6011 (package
6012 (name "python-pyflakes")
6013 (version "2.0.0")
6014 (source
6015 (origin
6016 (method url-fetch)
6017 (uri (pypi-uri "pyflakes" version))
6018 (sha256
6019 (base32
6020 "0jba28czyvimdc72llms3f17swp3i8jdcabf5w0j00adfbn64xls"))))
6021 (build-system python-build-system)
6022 (home-page
6023 "https://github.com/pyflakes/pyflakes")
6024 (synopsis "Passive checker of Python programs")
6025 (description
6026 "Pyflakes statically checks Python source code for common errors.")
6027 (license license:expat)))
6028
6029(define-public python2-pyflakes
6030 (package-with-python2 python-pyflakes))
6031
6032(define-public python-mccabe
6033 (package
6034 (name "python-mccabe")
6035 (version "0.6.1")
6036 (source
6037 (origin
6038 (method url-fetch)
6039 (uri (pypi-uri "mccabe" version))
6040 (sha256
6041 (base32
6042 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
6043 (build-system python-build-system)
6044 (native-inputs
6045 `(("python-pytest" ,python-pytest-bootstrap)
6046 ("python-pytest-runner" ,python-pytest-runner)))
6047 (home-page "https://github.com/flintwork/mccabe")
6048 (synopsis "McCabe checker, plugin for flake8")
6049 (description
6050 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6051complexity of Python source code.")
6052 (license license:expat)))
6053
6054(define-public python2-mccabe
6055 (package-with-python2 python-mccabe))
6056
6057(define-public python-mccabe-0.2.1
6058 (package (inherit python-mccabe)
6059 (version "0.2.1")
6060 (source
6061 (origin
6062 (method url-fetch)
6063 (uri (pypi-uri "mccabe" version))
6064 (sha256
6065 (base32
6066 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6067
6068(define-public python2-mccabe-0.2.1
6069 (package-with-python2 python-mccabe-0.2.1))
6070
6071;; Flake8 2.4.1 requires an older version of pep8.
6072;; This should be removed ASAP.
6073(define-public python-pep8-1.5.7
6074 (package (inherit python-pep8)
6075 (version "1.5.7")
6076 (source
f3576970
RW
6077 (origin
6078 (method url-fetch)
6079 (uri (pypi-uri "pep8" version))
6080 (sha256
6081 (base32
6082 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
44d10b1f
RW
6083 (arguments
6084 ;; XXX Tests not compatible with Python 3.5.
6085 '(#:tests? #f))))
6086
6087(define-public python2-pep8-1.5.7
6088 (package-with-python2 python-pep8-1.5.7))
6089
6090;; Flake8 2.4.1 requires an older version of pyflakes.
6091;; This should be removed ASAP.
6092(define-public python-pyflakes-0.8.1
6093 (package (inherit python-pyflakes)
6094 (version "0.8.1")
6095 (source
8c4dffb5
RW
6096 (origin
6097 (method url-fetch)
6098 (uri (pypi-uri "pyflakes" version))
6099 (sha256
6100 (base32
6101 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
44d10b1f
RW
6102 (arguments
6103 ;; XXX Tests not compatible with Python 3.5.
6104 '(#:tests? #f))))
6105
6106(define-public python2-pyflakes-0.8.1
6107 (package-with-python2 python-pyflakes-0.8.1))
6108
6109;; This package is used by hypothesis which has thousands of dependent packages.
6110;; FIXME: Consolidate this with "python-flake8" below in the next rebuild cycle.
6111(define-public python-flake8-3.5
6112 (package
6113 (name "python-flake8")
6114 (version "3.5.0")
6115 (source
6116 (origin
6117 (method url-fetch)
6118 (uri (pypi-uri "flake8" version))
6119 (sha256
6120 (base32
6121 "184b33grvvjmiwlv9kyd7yng9qv5ld24154j70z332xxg9gjclvj"))))
6122 (build-system python-build-system)
6123 (arguments
6124 `(#:phases
6125 (modify-phases %standard-phases
6126 ;; Two errors don't seem to have assigned codes.
6127 (add-after 'unpack 'delete-broken-test
6128 (lambda _ (delete-file "tests/unit/test_pyflakes_codes.py") #t))
6129 (add-after 'unpack 'fix-problem-with-pycodestyle
6130 (lambda _
6131 ;; See https://gitlab.com/pycqa/flake8/merge_requests/230
6132 ;; This should no longer be needed with the next release.
6133 (substitute* "setup.py"
6134 (("PEP8_PLUGIN\\('break_around_binary_operator'\\),")
6135 "PEP8_PLUGIN('break_after_binary_operator'),\
6136PEP8_PLUGIN('break_before_binary_operator'),"))
6137 #t))
6138 (delete 'check)
6139 (add-after 'install 'check
6140 (lambda* (#:key inputs outputs #:allow-other-keys)
6141 (add-installed-pythonpath inputs outputs)
6142 (invoke "pytest" "-v")
6143 #t)))))
6144 (propagated-inputs
6145 `(("python-pycodestyle" ,python-pycodestyle)
6146 ("python-pyflakes" ,python-pyflakes)
6147 ("python-mccabe" ,python-mccabe)))
6148 (native-inputs
6149 `(("python-mock" ,python-mock)
6150 ("python-pytest" ,python-pytest-bootstrap)
6151 ("python-pytest-runner" ,python-pytest-runner)))
6152 (home-page "https://gitlab.com/pycqa/flake8")
6153 (synopsis
6154 "The modular source code checker: pep8, pyflakes and co")
6155 (description
6156 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
6157 (properties `((python2-variant . ,(delay python2-flake8-3.5))))
6158 (license license:expat)))
6159
6160(define-public python2-flake8-3.5
6161 (let ((base (package-with-python2 (strip-python2-variant python-flake8-3.5))))
6162 (package (inherit base)
6163 (propagated-inputs
6164 `(("python2-configparser" ,python2-configparser)
6165 ("python2-enum34" ,python2-enum34)
6166 ,@(package-propagated-inputs base))))))
6167
6168;; Version 3.5.0 has compatibility issues with Pyflakes 2.0, so we need
6169;; this newer version. Keep it as a separate variable for now to avoid
6170;; rebuilding "python-hypothesis"; this should be removed in the next
6171;; rebuild cycle.
6172(define-public python-flake8
6173 (package
6174 (inherit python-flake8-3.5)
6175 (version "3.6.0")
6176 (source (origin
6177 (method url-fetch)
6178 (uri (pypi-uri "flake8" version))
6179 (sha256
6180 (base32
6181 "0w0nprx22rbvrrkbfx9v5jc5gskbm08g219l7r8wai8zfswgadba"))))
6182 (arguments
6183 (substitute-keyword-arguments (package-arguments python-flake8-3.5)
6184 ((#:phases phases)
6185 `(modify-phases ,phases
6186 (delete 'delete-broken-test)
6187 (delete 'fix-problem-with-pycodestyle)))))
6188 (properties `((python2-variant . ,(delay python2-flake8))))))
6189
6190(define-public python2-flake8
6191 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
6192 (package (inherit base)
6193 (propagated-inputs
6194 (package-propagated-inputs python2-flake8-3.5)))))
6195
6196;; python-hacking requires flake8 <2.6.0.
6197(define-public python-flake8-2.5
6198 (package
6199 (inherit python-flake8)
6200 (version "2.5.5")
6201 (source (origin
6202 (method url-fetch)
6203 (uri (pypi-uri "flake8" version))
6204 (sha256
6205 (base32
6206 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
6207 (propagated-inputs
6208 `(("python-pep8" ,python-pep8)
6209 ,@(package-propagated-inputs python-flake8)))
6210 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
6211
6212(define-public python2-flake8-2.5
6213 (package
6214 (inherit python2-flake8)
6215 (version (package-version python-flake8-2.5))
6216 (source (origin
6217 (inherit (package-source python-flake8-2.5))))
6218 (propagated-inputs
6219 `(("python2-pep8" ,python2-pep8)
6220 ,@(package-propagated-inputs python2-flake8)))))
6221
6222(define-public python-flake8-polyfill
6223 (package
6224 (name "python-flake8-polyfill")
6225 (version "1.0.2")
6226 (source
6227 (origin
6228 (method url-fetch)
6229 (uri (pypi-uri "flake8-polyfill" version))
6230 (sha256
6231 (base32
6232 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
6233 (build-system python-build-system)
6234 (arguments
6235 '(#:phases
6236 (modify-phases %standard-phases
6237 (replace 'check
6238 (lambda _
6239 (setenv "PYTHONPATH"
6240 (string-append (getcwd) "/build/lib:"
6241 (getenv "PYTHONPATH")))
4f0a0894 6242 (invoke "py.test" "-v"))))))
44d10b1f
RW
6243 (native-inputs
6244 `(("python-flake8" ,python-flake8)
6245 ("python-mock" ,python-mock)
6246 ("python-pep8" ,python-pep8)
6247 ("python-pycodestyle" ,python-pycodestyle)
6248 ("python-pytest" ,python-pytest)))
6249 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6250 (synopsis "Polyfill package for Flake8 plugins")
6251 (description
6252 "This package that provides some compatibility helpers for Flake8
6253plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6254 (license license:expat)))
6255
6256(define-public python2-flake8-polyfill
6257 (package-with-python2 python-flake8-polyfill))
6258
6259(define-public python-mistune
6260 (package
6261 (name "python-mistune")
6262 (version "0.8.4")
6263 (source
6264 (origin
6265 (method url-fetch)
6266 (uri (pypi-uri "mistune" version))
6267 (sha256
6268 (base32
6269 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
6270 (build-system python-build-system)
6271 (native-inputs
6272 `(("python-nose" ,python-nose)
6273 ("python-cython" ,python-cython)))
6274 (home-page "https://github.com/lepture/mistune")
6275 (synopsis "Markdown parser in pure Python")
6276 (description "This package provides a fast markdown parser in pure
6277Python.")
6278 (license license:bsd-3)))
6279
6280(define-public python2-mistune
6281 (package-with-python2 python-mistune))
6282
6283(define-public python-markdown
6284 (package
6285 (name "python-markdown")
1e3c7119 6286 (version "3.1")
44d10b1f
RW
6287 (source
6288 (origin
6289 (method url-fetch)
6290 (uri (pypi-uri "Markdown" version))
6291 (sha256
6292 (base32
1e3c7119 6293 "0l62x154r9mgdvfap06gf0nkrmjd7xixlfshsxcdif2nlrlnyjpw"))))
44d10b1f
RW
6294 (build-system python-build-system)
6295 (native-inputs
6296 `(("python-nose" ,python-nose)
6297 ("python-pyyaml" ,python-pyyaml)))
6298 (home-page "https://python-markdown.github.io/")
6299 (synopsis "Python implementation of Markdown")
6300 (description
6301 "This package provides a Python implementation of John Gruber's
6302Markdown. The library features international input, various Markdown
6303extensions, and several HTML output formats. A command line wrapper
6304markdown_py is also provided to convert Markdown files to HTML.")
6305 (license license:bsd-3)))
6306
6307(define-public python2-markdown
6308 (package-with-python2 python-markdown))
6309
6310(define-public python-ptyprocess
6311 (package
6312 (name "python-ptyprocess")
6313 (version "0.5.2")
6314 (source
6315 (origin
6316 (method url-fetch)
6317 (uri (pypi-uri "ptyprocess" version))
6318 (sha256
6319 (base32
6320 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
6321 (build-system python-build-system)
6322 (native-inputs
6323 `(("python-nose" ,python-nose)))
6324 (arguments
6325 `(#:phases
6326 (modify-phases %standard-phases
6327 (replace 'check
7904d6fa 6328 (lambda _ (invoke "nosetests"))))))
44d10b1f
RW
6329 (home-page "https://github.com/pexpect/ptyprocess")
6330 (synopsis "Run a subprocess in a pseudo terminal")
6331 (description
6332 "This package provides a Python library used to launch a subprocess in a
6333pseudo terminal (pty), and interact with both the process and its pty.")
6334 (license license:isc)))
6335
6336(define-public python2-ptyprocess
6337 (package-with-python2 python-ptyprocess))
6338
6339(define-public python-cram
6340 (package
6341 (name "python-cram")
6342 (version "0.7")
6343 (home-page "https://bitheap.org/cram/")
6344 (source (origin
6345 (method url-fetch)
6346 (uri (list (string-append home-page "cram-"
6347 version ".tar.gz")
6348 (pypi-uri "cram" version)))
6349 (sha256
6350 (base32
6351 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6352 (arguments
6353 '(#:phases
6354 (modify-phases %standard-phases
6355 (add-after 'unpack 'patch-source
6356 (lambda _
6357 (substitute* (find-files "cram" ".*\\.py$")
6358 ;; Replace default shell path.
6359 (("/bin/sh") (which "sh")))
6360 (substitute* (find-files "tests" ".*\\.t$")
6361 (("md5") "md5sum")
6362 (("/bin/bash") (which "bash"))
6363 (("/bin/sh") (which "sh")))
6364 (substitute* "cram/_test.py"
6365 ;; This hack works around a bug triggered by substituting
6366 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6367 ;; "cram -h", which breaks the output at 80 characters. This
6368 ;; causes the line showing the default shell to break into two
6369 ;; lines, but the test expects a single line...
6370 (("env\\['COLUMNS'\\] = '80'")
6371 "env['COLUMNS'] = '160'"))
6372 #t))
6373 (delete 'check)
6374 (add-after 'install 'check
6375 ;; The test phase uses the built library and executable.
6376 ;; It's easier to run it after install since the build
6377 ;; directory contains version-specific PATH.
6378 (lambda* (#:key inputs outputs #:allow-other-keys)
6379 (add-installed-pythonpath inputs outputs)
6380 (setenv "PATH" (string-append (getenv "PATH") ":"
6381 (assoc-ref outputs "out") "/bin"))
2d7db192 6382 (invoke "make" "test"))))))
44d10b1f
RW
6383 (build-system python-build-system)
6384 (native-inputs
6385 `(("python-coverage" ,python-coverage)
6386 ("which" ,which)))
6387 (synopsis "Simple testing framework for command line applications")
6388 (description
6389 "Cram is a functional testing framework for command line applications.
6390Cram tests look like snippets of interactive shell sessions. Cram runs each
6391command and compares the command output in the test with the command’s actual
6392output.")
6393 (license license:gpl2+)))
6394
6395(define-public python2-cram
6396 (package-with-python2 python-cram))
6397
6398(define-public python-straight-plugin
6399 (package
6400 (name "python-straight-plugin")
6401 (version "1.4.1")
6402 (source
6403 (origin
6404 (method url-fetch)
6405 (uri (pypi-uri "straight.plugin" version))
6406 (sha256
6407 (base32
6408 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6409 (build-system python-build-system)
6410 (home-page "https://github.com/ironfroggy/straight.plugin")
6411 (synopsis "Simple namespaced plugin facility")
6412 (description "Straight Plugin provides a type of plugin you can create from
6413almost any existing Python modules, and an easy way for outside developers to
6414add functionality and customization to your projects with their own plugins.")
6415 (license license:expat)))
6416
6417(define-public python2-straight-plugin
6418 (package-with-python2 python-straight-plugin))
6419
6420(define-public python-fonttools
6421 (package
6422 (name "python-fonttools")
6423 (version "3.28.0")
6424 (source (origin
6425 (method url-fetch)
6426 (uri (pypi-uri "fonttools" version ".zip"))
6427 (sha256
6428 (base32
6429 "0vsvjhidpb5kywpjgz1j3fywzkddxkb0afqai18qa3h6lqjyxwpb"))))
6430 (build-system python-build-system)
6431 (native-inputs
6432 `(("unzip" ,unzip)
6433 ("python-pytest" ,python-pytest)
6434 ("python-pytest-runner" ,python-pytest-runner)))
6435 (home-page "https://github.com/behdad/fonttools")
6436 (synopsis "Tools to manipulate font files")
6437 (description
6438 "FontTools/TTX is a library to manipulate font files from Python. It
6439supports reading and writing of TrueType/OpenType fonts, reading and writing
6440of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6441also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6442from an XML-based format.")
6443 (license license:expat)))
6444
6445(define-public python2-fonttools
6446 (package-with-python2 python-fonttools))
6447
6448(define-public python-ly
6449 (package
6450 (name "python-ly")
6451 (version "0.9.5")
6452 (source
6453 (origin
6454 (method url-fetch)
6455 (uri (pypi-uri name version))
6456 (sha256
6457 (base32
6458 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
6459 (build-system python-build-system)
6460 (arguments
6461 ;; FIXME: Some tests need network access.
6462 '(#:tests? #f))
6463 (synopsis "Tool and library for manipulating LilyPond files")
6464 (description "This package provides a Python library to parse, manipulate
6465or create documents in LilyPond format. A command line program ly is also
6466provided that can be used to do various manipulations with LilyPond files.")
6467 (home-page "https://pypi.python.org/pypi/python-ly")
6468 (license license:gpl2+)))
6469
6470(define-public python-appdirs
6471 (package
6472 (name "python-appdirs")
6473 (version "1.4.3")
6474 (source
6475 (origin
6476 (method url-fetch)
6477 (uri (pypi-uri "appdirs" version))
6478 (sha256
6479 (base32
6480 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
6481 (build-system python-build-system)
6482 (home-page "https://github.com/ActiveState/appdirs")
6483 (synopsis
6484 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6485 (description
6486 "This module provides a portable way of finding out where user data
6487should be stored on various operating systems.")
6488 (license license:expat)))
6489
6490(define-public python2-appdirs
6491 (package-with-python2 python-appdirs))
6492
6493(define-public python-llfuse
6494 (package
6495 (name "python-llfuse")
6496 (version "1.3.5")
6497 (source (origin
6498 (method url-fetch)
6499 (uri (pypi-uri "llfuse" version ".tar.bz2"))
6500 (sha256
6501 (base32
6502 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
6503 (build-system python-build-system)
6504 (inputs
6505 `(("fuse" ,fuse)
6506 ("attr" ,attr)))
6507 (native-inputs
6508 `(("pkg-config" ,pkg-config)))
6509 (synopsis "Python bindings for FUSE")
6510 (description
6511 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6512 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
6513 (license license:lgpl2.0+)
6514 (properties `((python2-variant . ,(delay python2-llfuse))))))
6515
6516(define-public python2-llfuse
6517 (package (inherit (package-with-python2
6518 (strip-python2-variant python-llfuse)))
6519 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6520
6521;; For attic-0.16
6522(define-public python-llfuse-0.41
6523 (package (inherit python-llfuse)
6524 (version "0.41.1")
6525 (source (origin
6526 (method url-fetch)
6527 (uri (string-append
6528 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6529 "llfuse-" version ".tar.bz2"))
6530 (sha256
6531 (base32
6532 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
6533 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6534 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
6535 (license (list license:expat license:lgpl2.0+))))
6536
6537(define-public python-msgpack
6538 (package
6539 (name "python-msgpack")
6540 (version "0.5.6")
6541 (source (origin
6542 (method url-fetch)
6543 (uri (pypi-uri "msgpack" version))
6544 (sha256
6545 (base32
6546 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
6547 (build-system python-build-system)
6548 (arguments
6549 `(#:modules ((guix build utils)
6550 (guix build python-build-system)
6551 (ice-9 ftw)
6552 (srfi srfi-1)
6553 (srfi srfi-26))
6554 #:phases
6555 (modify-phases %standard-phases
6556 (replace 'check
6557 (lambda _
6558 (let ((cwd (getcwd)))
6559 (setenv "PYTHONPATH"
6560 (string-append cwd "/build/"
6561 (find (cut string-prefix? "lib" <>)
6562 (scandir (string-append cwd "/build")))
6563 ":"
6564 (getenv "PYTHONPATH")))
6565 (invoke "pytest" "-v" "test")))))))
6566 (native-inputs
6567 `(("python-pytest" ,python-pytest)))
6568 (synopsis "MessagePack (de)serializer")
6569 (description "MessagePack is a fast, compact binary serialization format,
6570suitable for similar data to JSON. This package provides CPython bindings for
6571reading and writing MessagePack data.")
6572 (home-page "https://pypi.python.org/pypi/msgpack/")
6573 (license license:asl2.0)))
6574
6575;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
6576;; release 0.5. Some packages like borg still call it by the old name for now.
6577;; <https://bugs.gnu.org/30662>
6578(define-public python-msgpack-transitional
6579 (package
6580 (inherit python-msgpack)
6581 (name "python-msgpack-transitional")
6582 (arguments
6583 (substitute-keyword-arguments (package-arguments python-msgpack)
6584 ((#:phases phases)
6585 `(modify-phases ,phases
6586 (add-after 'unpack 'configure-transitional
6587 (lambda _
6588 ;; Keep using the old name.
6589 (substitute* "setup.py"
6590 (("TRANSITIONAL = False")
6591 "TRANSITIONAL = 1"))
6592 #t))))))))
6593
6594(define-public python2-msgpack
6595 (package-with-python2 python-msgpack))
6596
6597(define-public python-netaddr
6598 (package
6599 (name "python-netaddr")
6600 (version "0.7.19")
6601 (source
6602 (origin
6603 (method url-fetch)
6604 (uri (pypi-uri "netaddr" version))
6605 (sha256
6606 (base32
6607 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
6608 (build-system python-build-system)
6609 (arguments `(#:tests? #f)) ;; No tests.
6610 (home-page "https://github.com/drkjam/netaddr/")
6611 (synopsis "Pythonic manipulation of network addresses")
6612 (description
6613 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6614and MAC network addresses.")
6615 (license license:bsd-3)))
6616
6617(define-public python2-netaddr
6618 (package-with-python2 python-netaddr))
6619
6620(define-public python-wrapt
6621 (package
6622 (name "python-wrapt")
dddd7a75 6623 (version "1.11.1")
44d10b1f
RW
6624 (source
6625 (origin
6626 (method url-fetch)
6627 (uri (pypi-uri "wrapt" version))
6628 (sha256
6629 (base32
dddd7a75 6630 "0cqmysny1pz01jw26q48q5zasvns6507rwhgm6wcw743f0r01sja"))))
44d10b1f
RW
6631 (build-system python-build-system)
6632 (arguments
6633 ;; Tests are not included in the tarball, they are only available in the
6634 ;; git repository.
6635 `(#:tests? #f))
6636 (home-page "https://github.com/GrahamDumpleton/wrapt")
6637 (synopsis "Module for decorators, wrappers and monkey patching")
6638 (description
6639 "The aim of the wrapt module is to provide a transparent object proxy for
6640 Python, which can be used as the basis for the construction of function
6641 wrappers and decorator functions.")
6642 (license license:bsd-2)))
6643
6644(define-public python2-wrapt
6645 (package-with-python2 python-wrapt))
6646
6647(define-public python-xlrd
6648 (package
6649 (name "python-xlrd")
6650 (version "1.0.0")
6651 (source (origin
6652 (method url-fetch)
6653 (uri (pypi-uri "xlrd" version))
6654 (sha256
6655 (base32
6656 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
6657 (build-system python-build-system)
6658 (arguments
6659 `(#:phases
6660 (modify-phases %standard-phases
6661 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
6662 ;; run tests instead for now.
45fd0081 6663 (replace 'check (lambda _ (invoke "nosetests"))))))
44d10b1f
RW
6664 (native-inputs `(("python-nose" ,python-nose)))
6665 (home-page "http://www.python-excel.org/")
6666 (synopsis "Library for extracting data from Excel files")
a0909286 6667 (description "This package provides a library to extract data from
44d10b1f
RW
6668spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
6669@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
6670Unicode-aware. It is not intended as an end-user tool.")
6671 (license license:bsd-3)))
6672
6673(define-public python2-xlrd
6674 (package-with-python2 python-xlrd))
6675
6676(define-public python-prettytable
6677 (package
6678 (name "python-prettytable")
6679 (version "0.7.2")
6680 (source
6681 (origin
6682 (method url-fetch)
337c3a1e 6683 (uri (pypi-uri "prettytable" version ".tar.bz2"))
44d10b1f
RW
6684 (sha256
6685 (base32
6686 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
6687 (build-system python-build-system)
6688 (home-page "http://code.google.com/p/prettytable/")
6689 (synopsis "Display tabular data in an ASCII table format")
6690 (description
6691 "A library designed to represent tabular data in visually appealing ASCII
6692tables. PrettyTable allows for selection of which columns are to be printed,
6693independent alignment of columns (left or right justified or centred) and
6694printing of sub-tables by specifying a row range.")
6695 (license license:bsd-3)))
6696
6697(define-public python2-prettytable
6698 (package-with-python2 python-prettytable))
6699
6700(define-public python-tables
6701 (package
6702 (name "python-tables")
6703 (version "3.4.4")
6704 (source
6705 (origin
6706 (method url-fetch)
6707 (uri (pypi-uri "tables" version))
6708 (sha256
6709 (base32
6710 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
6711 (modules '((guix build utils)))
6712 (snippet
6713 '(begin
6714 ;; Remove pre-compiled .pyc files from source.
6715 (for-each delete-file-recursively
6716 (find-files "." "__pycache__" #:directories? #t))
6717 (for-each delete-file (find-files "." "\\.pyc$"))
6718 #t))))
6719 (build-system python-build-system)
6720 (arguments
6721 `(;; FIXME: python-build-system does not pass configure-flags to "build"
6722 ;; or "check", so we must override the build and check phases.
6723 #:phases
6724 (modify-phases %standard-phases
6725 (add-after 'unpack 'use-gcc
6726 (lambda _
6727 (substitute* "setup.py"
6728 (("compiler = new_compiler\\(\\)" line)
6729 (string-append line
6730 "\ncompiler.set_executables(compiler='gcc',"
6731 "compiler_so='gcc',"
6732 "linker_exe='gcc',"
6733 "linker_so='gcc -shared')")))
6734 #t))
6735 (replace 'build
6736 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
6737 (invoke "python" "setup.py" "build"
6738 (string-append "--hdf5="
6739 (assoc-ref inputs "hdf5")))))
44d10b1f
RW
6740 (replace 'check
6741 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
6742 (invoke "python" "setup.py" "check"
6743 (string-append "--hdf5="
6744 (assoc-ref inputs "hdf5"))))))))
44d10b1f
RW
6745 (propagated-inputs
6746 `(("python-numexpr" ,python-numexpr)
6747 ("python-numpy" ,python-numpy)))
6748 (native-inputs
6749 `(("python-cython" ,python-cython)
6750 ("pkg-config" ,pkg-config)))
6751 (inputs
6752 `(("hdf5" ,hdf5)
6753 ("bzip2" ,bzip2)
6754 ("zlib" ,zlib)))
6755 (home-page "http://www.pytables.org/")
6756 (synopsis "Hierarchical datasets for Python")
6757 (description "PyTables is a package for managing hierarchical datasets and
6758designed to efficiently cope with extremely large amounts of data.")
6759 (license license:bsd-3)))
6760
6761(define-public python2-tables
6762 (package-with-python2 python-tables))
6763
6764(define-public python-pyasn1
6765 (package
6766 (name "python-pyasn1")
6767 (version "0.4.3")
6768 (source
6769 (origin
6770 (method url-fetch)
6771 (uri (pypi-uri "pyasn1" version))
6772 (sha256
6773 (base32
6774 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
6775 (build-system python-build-system)
6776 (home-page "http://pyasn1.sourceforge.net/")
6777 (synopsis "ASN.1 types and codecs")
6778 (description
6779 "This is an implementation of ASN.1 types and codecs in Python. It is
6780suitable for a wide range of protocols based on the ASN.1 specification.")
6781 (license license:bsd-2)))
6782
6783(define-public python2-pyasn1
6784 (package-with-python2 python-pyasn1))
6785
6786(define-public python-pyasn1-modules
6787 (package
6788 (name "python-pyasn1-modules")
6789 (version "0.2.2")
6790 (source
6791 (origin
6792 (method url-fetch)
6793 (uri (pypi-uri "pyasn1-modules" version))
6794 (sha256
6795 (base32
6796 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
6797 (build-system python-build-system)
6798 (propagated-inputs
6799 `(("python-pyasn1" ,python-pyasn1)))
6800 (home-page "https://sourceforge.net/projects/pyasn1/")
6801 (synopsis "ASN.1 codec implementations")
6802 (description
6803 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
6804implementations of ASN.1-based codecs and protocols.")
6805 (license license:bsd-3)))
6806
6807(define-public python2-pyasn1-modules
6808 (package-with-python2 python-pyasn1-modules))
6809
6810(define-public python-ipaddress
6811 (package
6812 (name "python-ipaddress")
6813 (version "1.0.22")
6814 (source (origin
6815 (method url-fetch)
6816 (uri (pypi-uri "ipaddress" version))
6817 (sha256
6818 (base32
6819 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
6820 (build-system python-build-system)
6821 (home-page "https://github.com/phihag/ipaddress")
6822 (synopsis "IP address manipulation library")
6823 (description
6824 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
6825 in Python. This library is used to create, poke at, and manipulate IPv4 and
6826 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
6827 module to older versions of Python.")
6828 (license license:psfl)))
6829
6830(define-public python2-ipaddress
6831 (package-with-python2 python-ipaddress))
6832
6833(define-public python2-ipaddr
6834 (package
6835 (name "python2-ipaddr")
6836 (version "2.1.11")
6837 (source
6838 (origin
6839 (method url-fetch)
6840 (uri (pypi-uri "ipaddr" version))
6841 (sha256
6842 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
6843 (build-system python-build-system)
6844 (arguments
6845 `(#:python ,python-2 ;version 2 only
6846 #:phases
6847 (modify-phases %standard-phases
6848 (replace 'check
40b8c4e3 6849 (lambda _ (invoke "python" "ipaddr_test.py"))))))
44d10b1f
RW
6850 (home-page "https://github.com/google/ipaddr-py")
6851 (synopsis "IP address manipulation library")
6852 (description
6853 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
6854IPv6 addresses and networks.
6855
6856For new implementations you may prefer to use the standard module
6857@code{ipaddress}, which was introduced in Python 3.3 and backported to older
6858versions of Python.")
6859 (license license:asl2.0)))
6860
6861(define-public python-idna
6862 (package
6863 (name "python-idna")
e95c9837 6864 (version "2.8")
44d10b1f
RW
6865 (source
6866 (origin
6867 (method url-fetch)
6868 (uri (pypi-uri "idna" version))
6869 (sha256
6870 (base32
e95c9837 6871 "01rlkigdxg17sf9yar1jl8n18ls59367wqh59hnawlyg53vb6my3"))))
44d10b1f
RW
6872 (build-system python-build-system)
6873 (home-page "https://github.com/kjd/idna")
6874 (synopsis "Internationalized domain names in applications")
6875 (description
6876 "This is a library to support the Internationalised Domain Names in
6877Applications (IDNA) protocol as specified in RFC 5891. This version of the
6878protocol is often referred to as “IDNA2008” and can produce different results
6879from the earlier standard from 2003. The library is also intended to act as a
6880suitable drop-in replacement for the “encodings.idna” module that comes with
6881the Python standard library but currently only supports the older 2003
6882specification.")
6883 (license license:bsd-4)))
6884
6885(define-public python2-idna
6886 (package-with-python2 python-idna))
6887
6888(define-public python-idna-ssl
6889 (package
6890 (name "python-idna-ssl")
6891 (version "1.0.1")
6892 (source
6893 (origin
6894 (method url-fetch)
6895 (uri (pypi-uri "idna-ssl" version))
6896 (sha256
6897 (base32
6898 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
6899 (build-system python-build-system)
6900 (arguments
6901 `(#:tests? #f)) ;circular dependency with python-aiohttp
6902 (home-page "https://github.com/aio-libs/idna-ssl")
6903 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
6904 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
6905domains support.")
6906 (license license:expat)))
6907
6908(define-public python-pretend
6909 (package
6910 (name "python-pretend")
6911 (version "1.0.9")
6912 (source
6913 (origin
6914 (method url-fetch)
9f1f22ee 6915 (uri (pypi-uri "pretend" version))
44d10b1f
RW
6916 (sha256
6917 (base32
6918 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
6919 (build-system python-build-system)
6920 (home-page "https://github.com/alex/pretend")
6921 (synopsis "Library for stubbing in Python")
6922 (description
6923 "Pretend is a library to make stubbing with Python easier. Stubbing is a
6924technique for writing tests. You may hear the term mixed up with mocks,
6925fakes, or doubles. Basically, a stub is an object that returns pre-canned
6926responses, rather than doing any computation.")
6927 (license license:bsd-3)))
6928
6929(define-public python2-pretend
6930 (package-with-python2 python-pretend))
6931
6932(define-public python-pip
6933 (package
6934 (name "python-pip")
6935 (version "18.1")
6936 (source
6937 (origin
6938 (method url-fetch)
6939 (uri (pypi-uri "pip" version))
6940 (sha256
6941 (base32
6942 "188fclay154s520n43s7cxxlhdaiysvxf19zk8vr1xbyjyyr58n0"))))
6943 (build-system python-build-system)
6944 (arguments
6945 '(#:tests? #f)) ; there are no tests in the pypi archive.
6946 (home-page "https://pip.pypa.io/")
6947 (synopsis "Package manager for Python software")
6948 (description
6949 "Pip is a package manager for Python software, that finds packages on the
6950Python Package Index (PyPI).")
6951 (license license:expat)))
6952
6953(define-public python2-pip
6954 (package-with-python2 python-pip))
6955
6956(define-public python-tlsh
6957 (package
6958 (name "python-tlsh")
6959 (version "3.4.5")
6960 (home-page "https://github.com/trendmicro/tlsh")
3e3ff8ad
TGR
6961 (source
6962 (origin
6963 (method git-fetch)
6964 (uri (git-reference
6965 (url "https://github.com/trendmicro/tlsh.git")
6966 (commit (string-append "v" version))))
6967 (file-name (git-file-name name version))
6968 (sha256
6969 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
44d10b1f
RW
6970 (build-system cmake-build-system)
6971 (arguments
6972 '(#:out-of-source? #f
6973 #:phases (modify-phases %standard-phases
6974 (replace
6975 'install
6976 (lambda* (#:key outputs #:allow-other-keys)
6977 ;; Build and install the Python bindings. The underlying
6978 ;; C++ library is apparently not meant to be installed.
6979 (let ((out (assoc-ref outputs "out")))
6980 (with-directory-excursion "py_ext"
6981 (and (system* "python" "setup.py" "build")
6982 (system* "python" "setup.py" "install"
6983 (string-append "--prefix=" out))))))))))
6984 (inputs `(("python" ,python-wrapper))) ;for the bindings
6985 (synopsis "Fuzzy matching library for Python")
6986 (description
6987 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
6988Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
6989value which can be used for similarity comparisons. Similar objects have
6990similar hash values, which allows for the detection of similar objects by
6991comparing their hash values. The byte stream should have a sufficient amount
6992of complexity; for example, a byte stream of identical bytes will not generate
6993a hash value.")
6994 (license license:asl2.0)))
6995
6996(define-public python2-tlsh
6997 (package
6998 (inherit python-tlsh)
6999 (name "python2-tlsh")
7000 (inputs `(("python" ,python-2)))))
7001
7002(define-public python-termcolor
7003 (package
7004 (name "python-termcolor")
7005 (version "1.1.0")
7006 (source
7007 (origin
7008 (method url-fetch)
7009 (uri (pypi-uri "termcolor" version))
7010 (sha256
7011 (base32
7012 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7013 (build-system python-build-system)
7014 (arguments
7015 ;; There are no tests.
7016 `(#:tests? #f))
7017 (home-page "https://pypi.python.org/pypi/termcolor")
7018 (synopsis "ANSII Color formatting for terminal output")
7019 (description
7020 "This package provides ANSII Color formatting for output in terminals.")
7021 (license license:expat)))
7022
7023(define-public python2-termcolor
7024 (package-with-python2 python-termcolor))
7025
7026(define-public python-libarchive-c
7027 (package
7028 (name "python-libarchive-c")
7029 (version "2.8")
7030 (source (origin
7031 (method url-fetch)
7032 (uri (pypi-uri "libarchive-c" version))
7033 (sha256
7034 (base32
7035 "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06"))))
7036 (build-system python-build-system)
7037 (arguments
7038 '(#:phases (modify-phases %standard-phases
7039 (add-before
7040 'build 'reference-libarchive
7041 (lambda* (#:key inputs #:allow-other-keys)
7042 ;; Retain the absolute file name of libarchive.so.
7043 (let ((libarchive (assoc-ref inputs "libarchive")))
7044 (substitute* "libarchive/ffi.py"
7045 (("find_library\\('archive'\\)")
7046 (string-append "'" libarchive
7047 "/lib/libarchive.so'"))))))
7048 (replace 'check
7049 (lambda _ (invoke "pytest" "-vv"))))))
7050 (native-inputs
7051 `(("python-mock" ,python-mock)
7052 ("python-pytest" ,python-pytest)))
7053 (inputs
7054 `(("libarchive" ,libarchive)))
7055 (home-page "https://github.com/Changaco/python-libarchive-c")
7056 (synopsis "Python interface to libarchive")
7057 (description
7058 "This package provides Python bindings to libarchive, a C library to
7059access possibly compressed archives in many different formats. It uses
7060Python's @code{ctypes} foreign function interface (FFI).")
7061 (license license:lgpl2.0+)))
7062
7063(define-public python2-libarchive-c
7064 (package-with-python2 python-libarchive-c))
7065
7066(define-public python-file
7067 (package
7068 (inherit file)
7069 (name "python-file")
7070 (build-system python-build-system)
7071 (arguments
7072 '(#:tests? #f ;no tests
7073 #:configure-flags '("--single-version-externally-managed" "--root=/")
7074 #:phases (modify-phases %standard-phases
7075 (add-before 'build 'change-directory
7076 (lambda _
7077 (chdir "python")
7078 #t))
7079 (add-before 'build 'set-library-file-name
7080 (lambda* (#:key inputs #:allow-other-keys)
7081 (let ((file (assoc-ref inputs "file")))
7082 (substitute* "magic.py"
7083 (("find_library\\('magic'\\)")
7084 (string-append "'" file "/lib/libmagic.so'")))
7085 #t))))))
7086 (inputs `(("file" ,file)))
528ea990
LC
7087 (native-inputs (if (%current-target-system)
7088 `(("self" ,this-package))
7089 '()))
44d10b1f
RW
7090 (synopsis "Python bindings to the libmagic file type guesser. Note that
7091this module and the python-magic module both provide a \"magic.py\" file;
7092these two modules, which are different and were developed separately, both
7093serve the same purpose: provide Python bindings for libmagic.")))
7094
7095(define-public python2-file
7096 (package-with-python2 python-file))
7097
7098(define-public python-debian
7099 (package
7100 (name "python-debian")
7101 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
7102 (version "0.1.28")
7103 (source
7104 (origin
7105 (method url-fetch)
7106 (uri (pypi-uri name version))
7107 (sha256
7108 (base32
7109 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
7110 (build-system python-build-system)
7111 (propagated-inputs
7112 `(("python-six" ,python-six)))
7113 (synopsis "Debian package related modules")
7114 (description
7115 ;; XXX: Use @enumerate instead of @itemize to work around
7116 ;; <http://bugs.gnu.org/21772>.
7117 "This package provides Python modules that abstract many formats of
7118Debian-related files, such as:
7119
7120@enumerate
7121@item Debtags information;
7122@item @file{debian/changelog} files;
7123@item packages files, pdiffs;
7124@item control files of single or multiple RFC822-style paragraphs---e.g.
7125 @file{debian/control}, @file{.changes}, @file{.dsc};
7126@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7127 contained files and meta-information.
7128@end enumerate\n")
7129
7130 ;; Modules are either GPLv2+ or GPLv3+.
7131 (license license:gpl3+)))
7132
7133(define-public python2-debian
7134 (package-with-python2 python-debian))
7135
7136(define-public python-nbformat
7137 (package
7138 (name "python-nbformat")
7139 (version "4.4.0")
7140 (source
7141 (origin
7142 (method url-fetch)
7143 (uri (pypi-uri "nbformat" version))
7144 (sha256
7145 (base32
7146 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
7147 (build-system python-build-system)
7148 (arguments `(#:tests? #f)) ; no test target
7149 (propagated-inputs
7150 `(("python-ipython-genutils" ,python-ipython-genutils)
7151 ("python-jsonschema" ,python-jsonschema)
7152 ("python-jupyter-core" ,python-jupyter-core)
7153 ("python-traitlets" ,python-traitlets)))
7154 (home-page "http://jupyter.org")
7155 (synopsis "Jupyter Notebook format")
7156 (description "This package provides the reference implementation of the
7157Jupyter Notebook format and Python APIs for working with notebooks.")
7158 (license license:bsd-3)))
7159
7160(define-public python2-nbformat
7161 (package-with-python2 python-nbformat))
7162
7163(define-public python-bleach
7164 (package
7165 (name "python-bleach")
7166 (version "1.4.3")
7167 (source
7168 (origin
7169 (method url-fetch)
7170 (uri (pypi-uri "bleach" version))
7171 (sha256
7172 (base32
7173 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
7174 (build-system python-build-system)
7175 (propagated-inputs
7176 `(("python-html5lib" ,python-html5lib-0.9)
7177 ("python-six" ,python-six)))
7178 (native-inputs
7179 `(("python-nose" ,python-nose)))
7180 (home-page "https://github.com/jsocol/bleach")
7181 (synopsis "Whitelist-based HTML-sanitizing tool")
7182 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7183 (license license:asl2.0)))
7184
7185(define-public python2-bleach
7186 (package-with-python2 python-bleach))
7187
7188(define-public python-entrypoints
7189 (package
7190 (name "python-entrypoints")
a7f1b718 7191 (version "0.3")
44d10b1f
RW
7192 (source
7193 (origin
7194 (method url-fetch)
a7f1b718 7195 (uri (pypi-uri "entrypoints" version))
44d10b1f
RW
7196 (sha256
7197 (base32
a7f1b718 7198 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
44d10b1f
RW
7199 (build-system python-build-system)
7200 ;; The package does not come with a setup.py file, so we have to generate
7201 ;; one ourselves.
7202 (arguments
7203 `(#:tests? #f
7204 #:phases
7205 (modify-phases %standard-phases
7206 (add-after 'unpack 'create-setup.py
7207 (lambda _
7208 (call-with-output-file "setup.py"
7209 (lambda (port)
7210 (format port "\
7211from setuptools import setup
7212setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7213" ,version))))))))
7214 (home-page "https://github.com/takluyver/entrypoints")
7215 (synopsis "Discover and load entry points from installed Python packages")
7216 (description "Entry points are a way for Python packages to advertise
7217objects with some common interface. The most common examples are
7218@code{console_scripts} entry points, which define shell commands by
7219identifying a Python function to run. The @code{entrypoints} module contains
7220functions to find and load entry points.")
7221 (license license:expat)))
7222
7223(define-public python2-entrypoints
7224 (package-with-python2 python-entrypoints))
7225
7226(define-public python-nbconvert
7227 (package
7228 (name "python-nbconvert")
7229 (version "5.0.0b1")
7230 (source
7231 (origin
7232 (method url-fetch)
7233 (uri (pypi-uri "nbconvert" version))
7234 (sha256
7235 (base32
7236 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7237 (build-system python-build-system)
7238 (arguments
7239 `(;; The "bdist_egg" target is disabled by default, causing the installation
7240 ;; to fail.
7241 #:configure-flags (list "bdist_egg")
7242 ;; FIXME: 5 failures, 40 errors.
7243 #:tests? #f))
7244 ;; #:phases
7245 ;; (modify-phases %standard-phases
7246 ;; (replace 'check
7247 ;; (lambda _
7248 ;; (zero? (system* "py.test" "-v")))))
7249 (native-inputs
7250 `(("python-pytest" ,python-pytest)))
7251 (propagated-inputs
7252 `(("python-bleach" ,python-bleach)
7253 ("python-entrypoints" ,python-entrypoints)
7254 ("python-jinja2" ,python-jinja2)
7255 ("python-jupyter-core" ,python-jupyter-core)
7256 ("python-mistune" ,python-mistune)
7257 ("python-nbformat" ,python-nbformat)
7258 ("python-pygments" ,python-pygments)
7259 ("python-traitlets" ,python-traitlets)))
7260 (home-page "http://jupyter.org")
7261 (synopsis "Converting Jupyter Notebooks")
7262 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7263notebooks to various other formats via Jinja templates. It allows you to
7264convert an @code{.ipynb} notebook file into various static formats including:
7265
7266@enumerate
7267@item HTML
7268@item LaTeX
7269@item PDF
7270@item Reveal JS
7271@item Markdown (md)
7272@item ReStructured Text (rst)
7273@item executable script
7274@end enumerate\n")
7275 (license license:bsd-3)))
7276
7277(define-public python2-nbconvert
7278 (package-with-python2 python-nbconvert))
7279
44d10b1f
RW
7280(define-public python-notebook
7281 (package
7282 (name "python-notebook")
7283 (version "5.7.4")
7284 (source (origin
7285 (method url-fetch)
7286 (uri (pypi-uri "notebook" version))
7287 (sha256
7288 (base32
7289 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
7290 (build-system python-build-system)
7291 (arguments
7292 `(#:phases
7293 (modify-phases %standard-phases
7294 (replace 'check
7295 (lambda _
7296 ;; These tests require a browser
7297 (delete-file-recursively "notebook/tests/selenium")
7298 ;; Some tests need HOME
7299 (setenv "HOME" "/tmp")
7300 ;; This file contains "warningfilters", which are not supported
7301 ;; by this version of nose.
7302 (delete-file "setup.cfg")
7303 (with-directory-excursion "/tmp"
7304 (invoke "nosetests" "-v"))
7305 #t)))))
7306 (propagated-inputs
7307 `(("python-jupyter-core" ,python-jupyter-core)
7308 ("python-nbformat" ,python-nbformat)
7309 ("python-nbconvert" ,python-nbconvert)
7310 ("python-prometheus-client" ,python-prometheus-client)
7311 ("python-send2trash" ,python-send2trash)
7312 ("python-terminado" ,python-terminado)))
7313 (native-inputs
7314 `(("python-nose" ,python-nose)
7315 ("python-sphinx" ,python-sphinx)
7316 ("python-requests" ,python-requests)))
7317 (home-page "http://jupyter.org/")
7318 (synopsis "Web-based notebook environment for interactive computing")
7319 (description
7320 "The Jupyter HTML notebook is a web-based notebook environment for
7321interactive computing.")
7322 (properties `((python2-variant . ,(delay python2-notebook))))
7323 (license license:bsd-3)))
7324
7325(define-public python2-notebook
7326 (let ((base (package-with-python2
7327 (strip-python2-variant python-notebook))))
7328 (package (inherit base)
7329 (native-inputs
7330 `(("python2-mock" ,python2-mock)
7331 ,@(package-native-inputs base)))
7332 (arguments
7333 (substitute-keyword-arguments (package-arguments base)
7334 ((#:phases phases)
7335 `(modify-phases ,phases
7336 (add-before 'check 'disable-test-case
7337 ;; The test requires network access to localhost. Curiously it
7338 ;; fails with Python 2 only. Simply make the test-case return
7339 ;; immediately.
7340 (lambda _
7341 (substitute*
7342 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7343 (("formats = self.nbconvert_api") "return #")))))))))))
7344
7345(define-public python-widgetsnbextension
7346 (package
7347 (name "python-widgetsnbextension")
7348 (version "3.4.2")
7349 (source
7350 (origin
7351 (method url-fetch)
7352 (uri (pypi-uri "widgetsnbextension" version))
7353 (sha256
7354 (base32
7355 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
7356 (build-system python-build-system)
7357 (propagated-inputs
7358 `(("python-ipykernel" ,python-ipykernel)
7359 ("python-notebook" ,python-notebook)))
7360 (native-inputs
7361 `(("python-certifi" ,python-certifi)
7362 ("python-nose" ,python-nose)))
7363 (home-page "https://ipython.org")
7364 (synopsis "IPython HTML widgets for Jupyter")
7365 (description "This package provides interactive HTML widgets for Jupyter
7366notebooks.")
7367 (license license:bsd-3)))
7368
7369(define-public python2-widgetsnbextension
7370 (package-with-python2 python-widgetsnbextension))
7371
7372(define-public python-ipywidgets
7373 (package
7374 (name "python-ipywidgets")
7375 (version "5.2.2")
7376 (source
7377 (origin
7378 (method url-fetch)
7379 (uri (pypi-uri "ipywidgets" version))
7380 (sha256
7381 (base32
7382 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7383 (build-system python-build-system)
7384 (propagated-inputs
7385 `(("python-ipython" ,python-ipython)
7386 ("python-traitlets" ,python-traitlets)
7387 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7388 (native-inputs
7389 `(("python-nose" ,python-nose)
7390 ("python-pytest" ,python-pytest)))
7391 (home-page "https://ipython.org")
7392 (synopsis "IPython HTML widgets for Jupyter")
7393 (description "Ipywidgets are interactive HTML widgets for Jupyter
7394notebooks and the IPython kernel. Notebooks come alive when interactive
7395widgets are used. Users gain control of their data and can visualize changes
7396in the data.")
7397 (license license:bsd-3)))
7398
7399(define-public python2-ipywidgets
7400 (package-with-python2 python-ipywidgets))
7401
7402(define-public python-jupyter-console
7403 (package
7404 (name "python-jupyter-console")
7405 (version "5.2.0")
7406 (source
7407 (origin
7408 (method url-fetch)
7409 (uri (pypi-uri "jupyter_console" version))
7410 (sha256
7411 (base32
7412 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
7413 (build-system python-build-system)
7414 ;; Tests only run in an TTY.
7415 (arguments `(#:tests? #f))
7416 (propagated-inputs
7417 `(("python-ipykernel" ,python-ipykernel)
7418 ("python-jupyter-client" ,python-jupyter-client)
7419 ("python-prompt-toolkit" ,python-prompt-toolkit-1)
7420 ("python-pygments" ,python-pygments)))
7421 (native-inputs
7422 `(("python-nose" ,python-nose)))
7423 (home-page "https://jupyter.org")
7424 (synopsis "Jupyter terminal console")
7425 (description "This package provides a terminal-based console frontend for
7426Jupyter kernels. It also allows for console-based interaction with non-Python
7427Jupyter kernels such as IJulia and IRKernel.")
7428 (license license:bsd-3)))
7429
7430(define-public python2-jupyter-console
7431 (package-with-python2 python-jupyter-console))
7432
7433;; The python-ipython and python-jupyter-console require each other. To get
7434;; the functionality in both packages working, strip down the
7435;; python-jupyter-console package when using it as an input to python-ipython.
7436(define python-jupyter-console-minimal
7437 (package
7438 (inherit python-jupyter-console)
7439 (name "python-jupyter-console-minimal")
7440 (arguments
7441 (substitute-keyword-arguments
7442 (package-arguments python-jupyter-console)
7443 ((#:phases phases)
7444 `(modify-phases ,phases
7445 (add-after 'install 'delete-bin
7446 (lambda* (#:key outputs #:allow-other-keys)
7447 ;; Delete the bin files, to avoid conflicts in profiles
7448 ;; where python-ipython and python-jupyter-console are
7449 ;; both present.
7450 (delete-file-recursively
7451 (string-append
7452 (assoc-ref outputs "out") "/bin"))))))))
7453 ;; Remove the python-ipython propagated input, to avoid the cycle
7454 (propagated-inputs
7455 (alist-delete
7456 "python-ipython"
7457 (package-propagated-inputs python-jupyter-console)))))
7458
7459(define-public python-qtconsole
7460 (package
7461 (name "python-qtconsole")
7462 (version "4.4.3")
7463 (source
7464 (origin
7465 (method url-fetch)
7466 (uri (pypi-uri "qtconsole" version))
7467 (sha256
7468 (base32
7469 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
7470 (build-system python-build-system)
7471 (arguments
7472 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
7473 ;; but we only have the LTS version 5.x. This means that there might be
7474 ;; runtime errors, but since this is a dependency of the Jupyter package,
7475 ;; and Jupyter can be used without the qtconsole we can overlook this for
7476 ;; now.
7477 `(#:tests? #f
7478 #:phases
7479 (modify-phases %standard-phases
7480 (add-before 'check 'pre-check
7481 (lambda _
7482 (setenv "QT_QPA_PLATFORM" "offscreen")
7483 #t)))))
7484 (propagated-inputs
7485 `(("python-ipykernel" ,python-ipykernel)
7486 ("python-ipython" ,python-ipython)))
7487 (native-inputs
7488 `(("python-pytest" ,python-pytest)))
7489 (home-page "http://jupyter.org")
7490 (synopsis "Jupyter Qt console")
7491 (description "This package provides a Qt-based console for Jupyter with
7492support for rich media output.")
7493 (license license:bsd-3)))
7494
7495(define-public jupyter
7496 (package
7497 (name "jupyter")
7498 (version "1.0.0")
7499 (source
7500 (origin
7501 (method url-fetch)
7502 (uri (pypi-uri "jupyter" version))
7503 (sha256
7504 (base32
7505 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
7506 (build-system python-build-system)
7507 (arguments '(#:tests? #f)) ; there are none.
7508 (propagated-inputs
7509 `(("python-ipykernel" ,python-ipykernel)
7510 ("python-ipywidgets" ,python-ipywidgets)
7511 ("python-jupyter-console" ,python-jupyter-console)
7512 ("python-nbconvert" ,python-nbconvert)
7513 ("python-notebook" ,python-notebook)
7514 ("python-qtconsole" ,python-qtconsole)))
7515 (native-search-paths
7516 (list (search-path-specification
7517 (variable "JUPYTER_PATH")
7518 (files '("share/jupyter")))))
7519 (home-page "https://jupyter.org")
7520 (synopsis "Web application for interactive documents")
7521 (description
7522 "The Jupyter Notebook is a web application that allows you to create and
7523share documents that contain live code, equations, visualizations and
7524explanatory text. Uses include: data cleaning and transformation, numerical
7525simulation, statistical modeling, machine learning and much more.")
7526 (license license:bsd-3)))
7527
7528(define-public python-chardet
7529 (package
7530 (name "python-chardet")
7531 (version "3.0.4")
7532 (source
7533 (origin
7534 (method url-fetch)
7535 (uri (pypi-uri "chardet" version))
7536 (sha256
7537 (base32
7538 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
7539 (native-inputs
7540 `(("python-hypothesis" ,python-hypothesis)
7541 ("python-pytest" ,python-pytest)
7542 ("python-pytest-runner" ,python-pytest-runner)))
7543 (build-system python-build-system)
7544 (home-page "https://github.com/chardet/chardet")
7545 (synopsis "Universal encoding detector for Python 2 and 3")
7546 (description
7547 "This package provides @code{chardet}, a Python module that can
7548automatically detect a wide range of file encodings.")
7549 (license license:lgpl2.1+)))
7550
7551(define-public python2-chardet
7552 (package-with-python2 python-chardet))
7553
7554(define-public python-docopt
7555 (package
7556 (name "python-docopt")
7557 (version "0.6.2")
7558 (source
7559 (origin
7560 (method url-fetch)
7561 ;; The release on PyPI does not include tests.
7562 (uri (string-append
7563 "https://github.com/docopt/docopt/archive/"
7564 version ".tar.gz"))
7565 (file-name (string-append name "-" version ".tar.gz"))
7566 (sha256
7567 (base32
7568 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
7569 (build-system python-build-system)
7570 (native-inputs
7571 `(("python-pytest" ,python-pytest)))
7572 (arguments
7573 `(#:phases
7574 (modify-phases %standard-phases
7575 (replace 'check
7576 (lambda _ (invoke "py.test"))))))
7577 (home-page "http://docopt.org")
7578 (synopsis "Command-line interface description language for Python")
7579 (description "This library allows the user to define a command-line
7580interface from a program's help message rather than specifying it
4ca7207b 7581programmatically with command-line parsers like @code{getopt} and
44d10b1f
RW
7582@code{argparse}.")
7583 (license license:expat)))
7584
7585(define-public python2-docopt
7586 (package-with-python2 python-docopt))
7587
7588(define-public python-pythondialog
7589 (package
7590 (name "python-pythondialog")
7591 (version "3.4.0")
7592 (source
7593 (origin
7594 (method url-fetch)
7595 (uri (pypi-uri "pythondialog" version))
7596 (sha256
7597 (base32
7598 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
7599 (build-system python-build-system)
7600 (arguments
7601 `(#:phases
7602 (modify-phases %standard-phases
7603 (add-after 'unpack 'patch-path
7604 (lambda* (#:key inputs #:allow-other-keys)
7605 (let* ((dialog (assoc-ref inputs "dialog")))
7606 ;; Since this library really wants to grovel the search path, we
7607 ;; must hardcode dialog's store path into it.
7608 (substitute* "dialog.py"
7609 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
7610 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
7611 #t))))
7612 #:tests? #f)) ; no test suite
7613 (propagated-inputs
7614 `(("dialog" ,dialog)))
7615 (home-page "http://pythondialog.sourceforge.net/")
7616 (synopsis "Python interface to the UNIX dialog utility")
7617 (description "A Python wrapper for the dialog utility. Its purpose is to
7618provide an easy to use, pythonic and comprehensive Python interface to dialog.
7619This allows one to make simple text-mode user interfaces on Unix-like systems")
7620 (license license:lgpl2.1)
7621 (properties `((python2-variant . ,(delay python2-pythondialog))))))
7622
7623(define-public python2-pythondialog
7624 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
7625 (package
7626 (inherit base)
7627 (version (package-version python-pythondialog))
7628 (source (origin
7629 (method url-fetch)
7630 (uri (pypi-uri "python2-pythondialog" version))
7631 (sha256
7632 (base32
7633 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
7634
7635(define-public python-configobj
7636 (package
7637 (name "python-configobj")
7638 (version "5.0.6")
7639 (source (origin
7640 (method url-fetch)
b0758fbb 7641 (uri (pypi-uri "configobj" version))
44d10b1f
RW
7642 (sha256
7643 (base32
7644 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
7645 ;; Patch setup.py so it looks for python-setuptools, which is
7646 ;; required to parse the keyword 'install_requires' in setup.py.
7647 (patches (search-patches "python-configobj-setuptools.patch"))))
7648 (build-system python-build-system)
7649 (propagated-inputs
7650 `(("python-six" ,python-six)))
7651 (synopsis "Config file reading, writing and validation")
7652 (description "ConfigObj is a simple but powerful config file reader and
7653writer: an ini file round tripper. Its main feature is that it is very easy to
7654use, with a straightforward programmer’s interface and a simple syntax for
7655config files.")
7656 (home-page "https://github.com/DiffSK/configobj")
7657 (license license:bsd-3)))
7658
7659(define-public python2-configobj
7660 (package-with-python2 python-configobj))
7661
7662(define-public python-configargparse
7663 (package
7664 (name "python-configargparse")
86ae491f 7665 (version "0.14.0")
44d10b1f
RW
7666 (source (origin
7667 (method url-fetch)
7668 (uri (pypi-uri "ConfigArgParse" version))
7669 (sha256
7670 (base32
86ae491f 7671 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
44d10b1f
RW
7672 (build-system python-build-system)
7673 (native-inputs
7674 `(("python-pyyaml" ,python-pyyaml)))
7675 (arguments
7676 `(#:phases
7677 (modify-phases %standard-phases
7678 (replace 'check
7679 (lambda _
7680 ;; Bypass setuptools-shim because one test relies on "setup.py"
7681 ;; being the first argument passed to the python call.
7682 ;;
7683 ;; NOTE: Many tests do not run because they rely on Python's
7684 ;; built-in test.test_argparse, but we remove the unit tests from
7685 ;; our Python installation.
7686 (invoke "python" "setup.py" "test"))))))
7687 (synopsis "Replacement for argparse")
7688 (description "A drop-in replacement for argparse that allows options to also
7689be set via config files and/or environment variables.")
7690 (home-page "https://github.com/bw2/ConfigArgParse")
7691 (license license:expat)))
7692
7693(define-public python2-configargparse
7694 (package-with-python2 python-configargparse))
7695
7696(define-public python-argparse-manpage
7697 (package
7698 (name "python-argparse-manpage")
7699 (version "1.1")
7700 (source
7701 (origin
7702 (method url-fetch)
7703 (uri (pypi-uri "argparse-manpage" version))
7704 (sha256
7705 (base32
7706 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
7707 (build-system python-build-system)
7708 (home-page "https://github.com/praiskup/argparse-manpage")
7709 (synopsis "Build manual page from Python's ArgumentParser object")
7710 (description
7711 "This package provides tools to build manual pages from Python's
7712@code{ArgumentParser} object.")
7713 (license license:asl2.0)))
7714
7715(define-public python2-contextlib2
7716 (package
7717 (name "python2-contextlib2")
7718 (version "0.5.5")
7719 (source
7720 (origin
7721 (method url-fetch)
7722 (uri (pypi-uri "contextlib2" version))
7723 (sha256
7724 (base32
7725 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
7726 (build-system python-build-system)
7727 (arguments
7728 `(#:python ,python-2
7729 #:phases
7730 (modify-phases %standard-phases
7731 (replace 'check
7732 (lambda _ (invoke "python" "test_contextlib2.py" "-v"))))))
7733 (native-inputs
7734 `(("python2-unittest2" ,python2-unittest2)))
7735 (home-page "http://contextlib2.readthedocs.org/")
7736 (synopsis "Tools for decorators and context managers")
7737 (description "This module is primarily a backport of the Python
77383.2 contextlib to earlier Python versions. Like contextlib, it
7739provides utilities for common tasks involving decorators and context
7740managers. It also contains additional features that are not part of
7741the standard library.")
7742 (license license:psfl)))
7743
7744(define-public python-texttable
7745 (package
7746 (name "python-texttable")
7747 (version "0.8.7")
7748 (source
7749 (origin
7750 (method url-fetch)
7751 (uri (pypi-uri "texttable" version))
7752 (sha256
7753 (base32
7754 "1liiiydgkg37i46a418aw19fyf6z3ds51wdwwpyjbs12x0phhf4a"))))
7755 (build-system python-build-system)
7756 (arguments '(#:tests? #f)) ; no tests
7757 (home-page "https://github.com/foutaise/texttable/")
7758 (synopsis "Python module for creating simple ASCII tables")
7759 (description "Texttable is a Python module for creating simple ASCII
7760tables.")
7761 (license license:lgpl2.1+)))
7762
7763(define-public python2-texttable
7764 (package-with-python2 python-texttable))
7765
7766(define-public python-atomicwrites
7767 (package
7768 (name "python-atomicwrites")
7769 (version "1.1.5")
7770 (source (origin
7771 (method url-fetch)
7772 (uri (pypi-uri "atomicwrites" version))
7773 (sha256
7774 (base32
7775 "11bm90fwm2avvf4f3ib8g925w7jr4m11vcsinn1bi6ns4bm32214"))))
7776 (build-system python-build-system)
7777 (synopsis "Atomic file writes in Python")
7778 (description "Library for atomic file writes using platform dependent tools
7779for atomic file system operations.")
7780 (home-page "https://github.com/untitaker/python-atomicwrites")
7781 (license license:expat)))
7782
7783(define-public python2-atomicwrites
7784 (package-with-python2 python-atomicwrites))
7785
7786(define-public python-click-threading
7787 (package
7788 (name "python-click-threading")
7789 (version "0.4.4")
7790 (source (origin
7791 (method url-fetch)
7792 (uri (pypi-uri "click-threading" version))
7793 (sha256
7794 (base32
7795 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
7796 (build-system python-build-system)
7797 (propagated-inputs
7798 `(("python-click" ,python-click)))
7799 (synopsis "Utilities for multithreading in Click")
7800 (description "This package provides utilities for multithreading in Click
7801applications.")
7802 (home-page "https://github.com/click-contrib/click-threading")
7803 (license license:expat)))
7804
7805(define-public python-click-log
7806 (package
7807 (name "python-click-log")
7808 (version "0.3.2")
7809 (source (origin
7810 (method url-fetch)
7811 (uri (pypi-uri "click-log" version))
7812 (sha256
7813 (base32
7814 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
7815 (build-system python-build-system)
7816 (propagated-inputs
7817 `(("python-click" ,python-click)))
7818 (synopsis "Logging for click applications")
7819 (description "This package provides a Python library for logging Click
7820applications.")
7821 (home-page "https://github.com/click-contrib/click-log")
7822 (license license:expat)))
7823
7824(define-public python-apipkg
7825 (package
7826 (name "python-apipkg")
7827 (version "1.4")
7828 (source (origin
7829 (method url-fetch)
7830 (uri (pypi-uri "apipkg" version))
7831 (sha256
7832 (base32
7833 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
7834 (build-system python-build-system)
7835 (native-inputs
7836 `(("python-pytest" ,python-pytest)))
7837 (synopsis "Namespace control and lazy-import mechanism")
7838 (description "With apipkg you can control the exported namespace of a Python
7839package and greatly reduce the number of imports for your users. It is a small
7840pure Python module that works on virtually all Python versions.")
7841 (home-page "https://github.com/pytest-dev/apipkg")
7842 (license license:expat)))
7843
7844(define-public python2-apipkg
7845 (package-with-python2 python-apipkg))
7846
7847(define-public python-execnet
7848 (package
7849 (name "python-execnet")
7850 (version "1.4.1")
7851 (source (origin
7852 (method url-fetch)
7853 (uri (pypi-uri "execnet" version))
7854 (sha256
7855 (base32
7856 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
7857 (build-system python-build-system)
7858 (arguments
7859 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
7860 ;; The two test failures are caused by the lack of an `ssh` executable.
7861 ;; The test suite can be run with pytest after the 'install' phase.
7862 #:tests? #f))
7863 (native-inputs
7864 `(("python-pytest" ,python-pytest)
7865 ("python-setuptools-scm" ,python-setuptools-scm)))
7866 (propagated-inputs
7867 `(("python-apipkg" ,python-apipkg)))
7868 (synopsis "Rapid multi-Python deployment")
7869 (description "Execnet provides a share-nothing model with
7870channel-send/receive communication for distributing execution across many
7871Python interpreters across version, platform and network barriers. It has a
7872minimal and fast API targeting the following uses:
7873@enumerate
7874@item distribute tasks to (many) local or remote CPUs
7875@item write and deploy hybrid multi-process applications
7876@item write scripts to administer multiple environments
7877@end enumerate")
7878 (home-page "http://codespeak.net/execnet/")
7879 (license license:expat)))
7880
7881(define-public python2-execnet
7882 (package-with-python2 python-execnet))
7883
7884(define-public python-icalendar
7885 (package
7886 (name "python-icalendar")
7887 (version "4.0.3")
7888 (source (origin
7889 (method url-fetch)
7890 (uri (pypi-uri "icalendar" version))
7891 (sha256
7892 (base32
7893 "0mk3dk1dxkcm46jy48v27j2w2349iv4sbimqj1yb5js43mx49hh7"))))
7894 (build-system python-build-system)
7895 (propagated-inputs
7896 `(("python-dateutil" ,python-dateutil)
7897 ("python-pytz" ,python-pytz)))
7898 (synopsis "Python library for parsing iCalendar files")
7899 (description "The icalendar package is a parser/generator of iCalendar
7900files for use with Python.")
7901 (home-page "https://github.com/collective/icalendar")
7902 (license license:bsd-2)))
7903
44d10b1f
RW
7904(define-public python-args
7905 (package
7906 (name "python-args")
7907 (version "0.1.0")
7908 (source (origin
7909 (method url-fetch)
7910 (uri (pypi-uri "args" version))
7911 (sha256
7912 (base32
7913 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
7914 (build-system python-build-system)
7915 (home-page "https://github.com/kennethreitz/args")
7916 (synopsis "Command-line argument parser")
7917 (description
7918 "This library provides a Python module to parse command-line arguments.")
7919 (license license:bsd-3)))
7920
7921(define-public python2-args
7922 (package-with-python2 python-args))
7923
7924(define-public python-clint
7925 (package
7926 (name "python-clint")
7927 (version "0.5.1")
7928 (source (origin
7929 (method url-fetch)
7930 (uri (pypi-uri "clint" version))
7931 (sha256
7932 (base32
7933 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
7934 (build-system python-build-system)
7935 (arguments
7936 '(#:phases
7937 (modify-phases %standard-phases
7938 (replace 'check
7939 (lambda _ (invoke "py.test" "-v"))))))
7940 (native-inputs
7941 `(("python-pytest" ,python-pytest)))
7942 (propagated-inputs
7943 `(("python-args" ,python-args)))
7944 (home-page "https://github.com/kennethreitz/clint")
7945 (synopsis "Command-line interface tools")
7946 (description
7947 "Clint is a Python module filled with a set of tools for developing
7948command-line applications, including tools for colored and indented
7949output, progress bar display, and pipes.")
7950 (license license:isc)))
7951
7952(define-public python2-clint
7953 (package-with-python2 python-clint))
7954
44d10b1f
RW
7955(define-public python-rply
7956 (package
7957 (name "python-rply")
7958 (version "0.7.5")
7959 (source (origin
7960 (method url-fetch)
7961 (uri (pypi-uri "rply" version))
7962 (sha256
7963 (base32
7964 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
7965 (build-system python-build-system)
7966 (propagated-inputs
7967 `(("python-appdirs" ,python-appdirs)))
7968 (home-page "https://github.com/alex/rply")
7969 (synopsis "Parser generator for Python")
7970 (description
7971 "This package provides a pure Python based parser generator, that also
7972works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
7973with a new public API, and RPython support.")
7974 (license license:bsd-3)))
7975
7976(define-public python2-rply
7977 (package-with-python2 python-rply))
7978
7979(define-public python-hy
7980 (package
7981 (name "python-hy")
7982 (version "0.13.0")
7983 (source (origin
7984 (method url-fetch)
7985 (uri (pypi-uri "hy" version))
7986 (sha256
7987 (base32
7988 "19sfymaksx9jhksfnb15ahid46mzrhdfzz6yy2craz2qnzvpmky8"))))
7989 (build-system python-build-system)
7990 (arguments
7991 '(#:phases
7992 (modify-phases %standard-phases
7993 (replace 'check
7994 (lambda _
7995 ;; Tests require write access to HOME.
7996 (setenv "HOME" "/tmp")
7997 (invoke "nosetests"))))))
7998 (native-inputs
7999 `(("python-coverage" ,python-coverage)
8000 ("python-nose" ,python-nose)))
8001 (propagated-inputs
8002 `(("python-astor" ,python-astor)
8003 ("python-clint" ,python-clint)
8004 ("python-rply" ,python-rply)))
8005 (home-page "http://hylang.org/")
8006 (synopsis "Lisp frontend to Python")
8007 (description
8008 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8009its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8010Python at your fingertips, in Lisp form.")
8011 (license license:expat)))
8012
8013(define-public python2-hy
8014 (package-with-python2 python-hy))
8015
8016(define-public python2-functools32
8017 (package
8018 (name "python2-functools32")
8019 (version "3.2.3-2")
8020 (source
8021 (origin
8022 (method url-fetch)
8023 (uri (pypi-uri "functools32" version))
8024 (sha256
8025 (base32
8026 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8027 (build-system python-build-system)
8028 (arguments
8029 `(#:python ,python-2
8030 #:tests? #f)) ; no test target
8031 (home-page "https://github.com/MiCHiLU/python-functools32")
8032 (synopsis
8033 "Backport of the functools module from Python 3.2.3")
8034 (description
8035 "This package is a backport of the @code{functools} module from Python
80363.2.3 for use with older versions of Python and PyPy.")
8037 (license license:expat)))
8038
8039(define-public python2-subprocess32
8040 (package
8041 (name "python2-subprocess32")
8042 (version "3.2.7")
8043 (source (origin
8044 (method url-fetch)
8045 (uri (pypi-uri "subprocess32" version))
8046 (sha256
8047 (base32
8048 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
8049 (patches
8050 (search-patches "python2-subprocess32-disable-input-test.patch"))))
8051 (build-system python-build-system)
8052 (arguments
8053 `(#:python ,python-2
8054 ;; The test suite fails with Python > 2.7.13:
8055 ;; import test.support
8056 ;; ImportError: No module named support
8057 #:tests? #f
8058 #:phases
8059 (modify-phases %standard-phases
8060 (add-after 'unpack 'patch-/bin/sh
8061 (lambda _
8062 (substitute* '("subprocess32.py"
8063 "test_subprocess32.py")
8064 (("/bin/sh") (which "sh")))
8065 #t)))))
8066 (home-page "https://github.com/google/python-subprocess32")
8067 (synopsis "Backport of the subprocess module from Python 3.2")
8068 (description
8069 "This is a backport of the @code{subprocess} standard library module
8070from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
8071new features. On POSIX systems it is guaranteed to be reliable when used
8072in threaded applications. It includes timeout support from Python 3.3 but
8073otherwise matches 3.2’s API.")
8074 (license license:psfl)))
8075
8076(define-public python2-futures
8077 (package
8078 (name "python2-futures")
8079 (version "3.2.0")
8080 (source
8081 (origin
8082 (method url-fetch)
8083 (uri (pypi-uri "futures" version))
8084 (sha256
8085 (base32
8086 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
8087 (build-system python-build-system)
8088 (arguments `(#:python ,python-2
8089 ;; FIXME: Python 2.7.14 moved the test.support library,
8090 ;; but our package has not yet been adjusted. Enable
8091 ;; tests when the python2 package has been fixed.
8092 #:tests? #f))
8093 (home-page "https://github.com/agronholm/pythonfutures")
8094 (synopsis
8095 "Backport of the concurrent.futures package from Python 3.2")
8096 (description
8097 "The concurrent.futures module provides a high-level interface for
8098asynchronously executing callables. This package backports the
8099concurrent.futures package from Python 3.2")
8100 (license license:bsd-3)))
8101
8102(define-public python-promise
8103 (package
8104 (name "python-promise")
8105 (version "0.4.2")
8106 (source
8107 (origin
8108 (method url-fetch)
8109 (uri (pypi-uri "promise" version))
8110 (sha256
8111 (base32
8112 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8113 (build-system python-build-system)
8114 ;; Tests wants python-futures, which is a python2 only program, and
8115 ;; can't be found by python-promise at test time.
8116 (arguments `(#:tests? #f))
8117 (home-page "https://github.com/syrusakbary/promise")
8118 (synopsis "Promises/A+ implementation for Python")
8119 (description
8120 "Promises/A+ implementation for Python")
8121 (properties `((python2-variant . ,(delay python2-promise))))
8122 (license license:expat)))
8123
8124(define-public python2-promise
8125 (let ((promise (package-with-python2
8126 (strip-python2-variant python-promise))))
8127 (package (inherit promise)
8128 (arguments (substitute-keyword-arguments (package-arguments promise)
8129 ((#:tests? _) #t)))
8130 (native-inputs
8131 `(("python2-futures" ,python2-futures)
8132 ("python2-pytest" ,python2-pytest)
8133 ,@(package-native-inputs promise))))))
8134
8135(define-public python-colorama
8136 (package
8137 (name "python-colorama")
8138 (version "0.3.9")
8139 (source
8140 (origin
8141 (method url-fetch)
8142 (uri (pypi-uri "colorama" version))
8143 (sha256
8144 (base32
8145 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
8146 (build-system python-build-system)
8147 (synopsis "Colored terminal text rendering for Python")
8148 (description "Colorama is a Python library for rendering colored terminal
8149text.")
8150 (home-page "https://pypi.python.org/pypi/colorama")
8151 (license license:bsd-3)))
8152
8153(define-public python2-colorama
8154 (package-with-python2 python-colorama))
8155
8156(define-public python-rsa
8157 (package
8158 (name "python-rsa")
8159 (version "3.4.2")
8160 (source
8161 (origin
8162 (method url-fetch)
8163 (uri (pypi-uri "rsa" version))
8164 (sha256
8165 (base32
8166 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
8167 (build-system python-build-system)
8168 (propagated-inputs
8169 `(("python-pyasn1" ,python-pyasn1)))
8170 (synopsis "Pure-Python RSA implementation")
8171 (description "Python-RSA is a pure-Python RSA implementation. It supports
8172encryption and decryption, signing and verifying signatures, and key
8173generation according to PKCS#1 version 1.5. It can be used as a Python
8174library as well as on the command line.")
8175 (home-page "https://stuvel.eu/rsa")
8176 (license license:asl2.0)))
8177
8178(define-public python2-rsa
8179 (package-with-python2 python-rsa))
8180
8181(define-public python-pluggy
8182 (package
8183 (name "python-pluggy")
8184 (version "0.7.1")
8185 (source
8186 (origin
8187 (method url-fetch)
8188 (uri (pypi-uri "pluggy" version))
8189 (sha256
8190 (base32
8191 "1qbn70mksmr03hac6jgp6fiqc4l7859z8dchx2x950vhlij87swm"))))
8192 (build-system python-build-system)
8193 (native-inputs
8194 `(("python-setuptools-scm" ,python-setuptools-scm)))
8195 (synopsis "Plugin and hook calling mechanism for Python")
8196 (description "Pluggy is an extraction of the plugin manager as used by
8197Pytest but stripped of Pytest specific details.")
8198 (home-page "https://pypi.python.org/pypi/pluggy")
8199 (license license:expat)))
8200
8201(define-public python2-pluggy
8202 (package-with-python2 python-pluggy))
8203
8204(define-public python-tox
8205 (package
8206 (name "python-tox")
8207 (version "2.8.1")
8208 (source
8209 (origin
8210 (method url-fetch)
8211 (uri (pypi-uri "tox" version))
8212 (sha256
8213 (base32
8214 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
8215 (build-system python-build-system)
8216 (arguments
8217 ;; FIXME: Tests require pytest-timeout, which itself requires
8218 ;; pytest>=2.8.0 for installation.
8219 '(#:tests? #f))
8220 (propagated-inputs
8221 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
8222 ("python-py" ,python-py)
8223 ("python-virtualenv" ,python-virtualenv)))
8224 (native-inputs
8225 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
8226 ("python-pytest" ,python-pytest) ; >= 2.3.5
8227 ("python-setuptools-scm" ,python-setuptools-scm)))
8228 (home-page "http://tox.testrun.org/")
8229 (synopsis "Virtualenv-based automation of test activities")
8230 (description "Tox is a generic virtualenv management and test command line
8231tool. It can be used to check that a package installs correctly with
8232different Python versions and interpreters, or run tests in each type of
8233supported environment, or act as a frontend to continuous integration
8234servers.")
8235 (license license:expat)))
8236
8237(define-public python2-tox
8238 (package-with-python2 python-tox))
8239
8240(define-public python-jmespath
8241 (package
8242 (name "python-jmespath")
8243 (version "0.9.3")
8244 (source
8245 (origin
8246 (method url-fetch)
8247 (uri (pypi-uri "jmespath" version))
8248 (sha256
8249 (base32
8250 "0r7wc7fsxmlwzxx9j1j7rms06c6xs6d4sysirdhz1jk2mb4x90ba"))))
8251 (build-system python-build-system)
8252 (native-inputs
8253 `(("python-nose" ,python-nose)))
8254 (synopsis "JSON Matching Expressions")
8255 (description "JMESPath (pronounced “james path”) is a Python library that
8256allows one to declaratively specify how to extract elements from a JSON
8257document.")
8258 (home-page "https://github.com/jmespath/jmespath.py")
8259 (license license:expat)))
8260
8261(define-public python2-jmespath
8262 (package-with-python2 python-jmespath))
8263
8264(define-public python-botocore
8265 (package
8266 (name "python-botocore")
8267 (version "1.8.43")
8268 (source
8269 (origin
8270 (method url-fetch)
8271 (uri (pypi-uri "botocore" version))
8272 (sha256
8273 (base32
8274 "12cqpbnz3vfv41mp9admvciw7bc7hz57sjpqs2bxaw9wnfmbw5lg"))))
8275 (build-system python-build-system)
8276 (arguments
8277 ;; FIXME: Many tests are failing.
8278 '(#:tests? #f))
8279 (propagated-inputs
8280 `(("python-dateutil" ,python-dateutil)
8281 ("python-docutils" ,python-docutils)
8282 ("python-jmespath" ,python-jmespath)))
8283 (native-inputs
8284 `(("python-mock" ,python-mock)
8285 ("python-nose" ,python-nose)
8286 ("behave" ,behave)
8287 ("python-tox" ,python-tox)
8288 ("python-wheel" ,python-wheel)))
8289 (home-page "https://github.com/boto/botocore")
8290 (synopsis "Low-level interface to AWS")
8291 (description "Botocore is a Python library that provides a low-level
8292interface to the Amazon Web Services (AWS) API.")
8293 (license license:asl2.0)))
8294
8295(define-public python2-botocore
8296 (package-with-python2 python-botocore))
8297
8298(define-public python-xdo
8299 (package
8300 (name "python-xdo")
8301 (version "0.3")
8302 (source (origin
8303 (method url-fetch)
8304 (uri (string-append
8305 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8306 "python-xdo_" version ".orig.tar.gz"))
8307 (sha256
8308 (base32
8309 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
8310 (build-system python-build-system)
8311 (arguments
8312 '(#:phases
8313 (modify-phases %standard-phases
8314 (add-before 'install 'patch-libxdo-path
8315 ;; Hardcode the path of dynamically loaded libxdo library.
8316 (lambda* (#:key inputs #:allow-other-keys)
8317 (let ((libxdo (string-append
8318 (assoc-ref inputs "xdotool")
8319 "/lib/libxdo.so")))
8320 (substitute* "xdo/_xdo.py"
8321 (("find_library\\(\"xdo\"\\)")
8322 (simple-format #f "\"~a\"" libxdo)))
8323 #t))))
8324 #:tests? #f)) ; no tests provided
8325 (propagated-inputs
8326 `(("python-six" ,python-six)))
8327 (inputs
8328 `(("xdotool" ,xdotool)
8329 ("libX11" ,libx11)))
8330 (home-page "https://tracker.debian.org/pkg/python-xdo")
8331 (synopsis "Python library for simulating X11 keyboard/mouse input")
8332 (description "Provides bindings to libxdo for manipulating X11 via simulated
8333input. (Note that this is mostly a legacy library; you may wish to look at
8334python-xdo for newer bindings.)")
8335 (license license:bsd-3)))
8336
8337(define-public python2-xdo
8338 (package-with-python2 python-xdo))
8339
8340(define-public python-mako
8341 (package
8342 (name "python-mako")
8343 (version "1.0.7")
8344 (source
8345 (origin
8346 (method url-fetch)
8347 (uri (pypi-uri "Mako" version))
8348 (sha256
8349 (base32
8350 "1bi5gnr8r8dva06qpyx4kgjc6spm2k1y908183nbbaylggjzs0jf"))))
8351 (build-system python-build-system)
8352 (propagated-inputs
8353 `(("python-markupsafe" ,python-markupsafe)))
8354 (native-inputs
8355 `(("python-mock" ,python-mock)
8356 ("python-nose" ,python-nose)
8357 ("python-pytest" ,python-pytest)))
7016e620 8358 (home-page "https://www.makotemplates.org/")
44d10b1f
RW
8359 (synopsis "Templating language for Python")
8360 (description "Mako is a templating language for Python that compiles
8361templates into Python modules.")
8362 (license license:expat)))
8363
8364(define-public python2-mako
8365 (package-with-python2 python-mako))
8366
8367(define-public python-waitress
8368 (package
8369 (name "python-waitress")
8370 (version "1.1.0")
8371 (source
8372 (origin
8373 (method url-fetch)
8374 (uri (pypi-uri "waitress" version))
8375 (patches (search-patches "python-waitress-fix-tests.patch"))
8376 (sha256
8377 (base32
8378 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
8379 (build-system python-build-system)
8380 (home-page "https://github.com/Pylons/waitress")
8381 (synopsis "Waitress WSGI server")
8382 (description "Waitress is meant to be a production-quality pure-Python WSGI
8383server with very acceptable performance.")
8384 (license license:zpl2.1)))
8385
8386(define-public python2-waitress
8387 (package-with-python2 python-waitress))
8388
8389(define-public python-pyquery
8390 (package
8391 (name "python-pyquery")
8392 (version "1.2.17")
8393 (source
8394 (origin
8395 (method url-fetch)
8396 (uri (pypi-uri "pyquery" version))
8397 (sha256
8398 (base32
8399 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
8400 (build-system python-build-system)
8401 (native-inputs
8402 `(("python-webob" ,python-webob)
8403 ("python-webtest" ,python-webtest)))
8404 (propagated-inputs
8405 `(("python-lxml" ,python-lxml)
8406 ("python-cssselect" ,python-cssselect)))
8407 (home-page "https://github.com/gawel/pyquery")
8408 (synopsis "Make jQuery-like queries on xml documents")
8409 (description "pyquery allows you to make jQuery queries on xml documents.
8410The API is as much as possible the similar to jQuery. pyquery uses lxml for
8411fast xml and html manipulation.")
8412 (license license:bsd-3)))
8413
44d10b1f
RW
8414(define-public python-anyjson
8415 (package
8416 (name "python-anyjson")
8417 (version "0.3.3")
8418 (source
8419 (origin
8420 (method url-fetch)
8421 (uri (pypi-uri "anyjson" version))
8422 (sha256
8423 (base32
8424 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
8425 (build-system python-build-system)
8426 (arguments
8427 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
8428 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
8429 ;; whatever) so this transformation needs to be done before the tests
8430 ;; can be run. Maybe we could add a build step to transform beforehand
8431 ;; but it could be annoying/difficult.
8432 ;; We can enable tests for the Python 2 version, though, and do below.
8433 #:tests? #f))
8434 (home-page "https://bitbucket.org/runeh/anyjson/")
8435 (synopsis
8436 "Wraps best available JSON implementation in a common interface")
8437 (description
8438 "Anyjson loads whichever is the fastest JSON module installed
8439and provides a uniform API regardless of which JSON implementation is used.")
8440 (license license:bsd-3)
8441 (properties `((python2-variant . ,(delay python2-anyjson))))))
8442
8443(define-public python2-anyjson
8444 (let ((anyjson (package-with-python2
8445 (strip-python2-variant python-anyjson))))
8446 (package
8447 (inherit anyjson)
8448 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
8449 #:tests? #t
8450 ,@(package-arguments anyjson)))
8451 (native-inputs `(("python2-nose" ,python2-nose))))))
8452
8453(define-public python-amqp
8454 (package
8455 (name "python-amqp")
8456 (version "2.3.2")
8457 (source
8458 (origin
8459 (method url-fetch)
8460 (uri (pypi-uri "amqp" version))
8461 (sha256
8462 (base32
8463 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
8464 (build-system python-build-system)
8465 (native-inputs
8466 `(("python-case" ,python-case)
8467 ("python-pytest-sugar" ,python-pytest-sugar)
8468 ("python-mock" ,python-mock)))
8469 (propagated-inputs
8470 `(("python-vine" ,python-vine)))
8471 (home-page "https://github.com/celery/py-amqp")
8472 (synopsis
8473 "Low-level AMQP client for Python (fork of amqplib)")
8474 (description
8475 "This is a fork of amqplib which was originally written by Barry Pederson.
8476It is maintained by the Celery project, and used by kombu as a pure python
8477alternative when librabbitmq is not available.")
8478 (license license:lgpl2.1+)
8479 (properties `((python2-variant . ,(delay python2-amqp))))))
8480
8481(define-public python2-amqp
8482 (let ((amqp (package-with-python2
8483 (strip-python2-variant python-amqp))))
8484 (package
8485 (inherit amqp)
8486 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
8487 ;; unmaintained. Weirdly, does not do this on the python 3
8488 ;; version?
8489 #:tests? #f
8490 ,@(package-arguments amqp))))))
8491
8492(define-public python-txamqp
8493 (package
8494 (name "python-txamqp")
8495 (version "0.8.2")
8496 (source
8497 (origin
8498 (method url-fetch)
8499 (uri (pypi-uri "txAMQP" version))
8500 (sha256
8501 (base32
8502 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
8503 (build-system python-build-system)
8504 (propagated-inputs
8505 `(("python-six" ,python-six)
8506 ("python-twisted" ,python-twisted)))
8507 (home-page "https://github.com/txamqp/txamqp")
8508 (synopsis "Communicate with AMQP peers and brokers using Twisted")
8509 (description
8510 "This package provides a Python library for communicating with AMQP peers
8511and brokers using the asynchronous networking framework Twisted. It contains
8512all the necessary code to connect, send and receive messages to/from an
8513AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
8514also includes support for using Thrift RPC over AMQP in Twisted
8515applications.")
8516 (license license:asl2.0)))
8517
8518(define-public python2-txamqp
8519 (package-with-python2 python-txamqp))
8520
8521(define-public python-kombu
8522 (package
8523 (name "python-kombu")
8524 (version "4.2.2")
8525 (source
8526 (origin
8527 (method url-fetch)
8528 (uri (pypi-uri "kombu" version))
8529 (sha256
8530 (base32
8531 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
8532 (build-system python-build-system)
8533 (native-inputs
8534 `(("python-mock" ,python-mock)
8535 ("python-case" ,python-case)
8536 ("python-pyro4" ,python-pyro4)
8537 ("python-pytest-sugar" ,python-pytest-sugar)
8538 ("python-pytz" ,python-pytz)))
8539 (propagated-inputs
8540 `(("python-anyjson" ,python-anyjson)
8541 ("python-amqp" ,python-amqp)
8542 ("python-redis" ,python-redis)))
8543 (home-page "https://kombu.readthedocs.io")
8544 (synopsis "Message passing library for Python")
8545 (description "The aim of Kombu is to make messaging in Python as easy as
8546possible by providing an idiomatic high-level interface for the AMQ protocol,
8547and also provide proven and tested solutions to common messaging problems.
8548AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
8549message orientation, queuing, routing, reliability and security, for which the
8550RabbitMQ messaging server is the most popular implementation.")
8551 (license license:bsd-3)
8552 (properties `((python2-variant . ,(delay python2-kombu))))))
8553
8554(define-public python2-kombu
8555 (let ((kombu (package-with-python2
8556 (strip-python2-variant python-kombu))))
8557 (package
8558 (inherit kombu)
8559 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
8560 ;; It works fine on the python3 variant.
8561 #:tests? #f
8562 ,@(package-arguments kombu)))
8563 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8564 ,@(package-native-inputs kombu))))))
8565
8566(define-public python-billiard
8567 (package
8568 (name "python-billiard")
8569 (version "3.5.0.5")
8570 (source
8571 (origin
8572 (method url-fetch)
8573 (uri (pypi-uri "billiard" version))
8574 (sha256
8575 (base32
8576 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
8577 (build-system python-build-system)
8578 (native-inputs
8579 `(("python-case" ,python-case)
8580 ("python-pytest" ,python-pytest)))
8581 (home-page "https://github.com/celery/billiard")
8582 (synopsis
8583 "Python multiprocessing fork with improvements and bugfixes")
8584 (description
8585 "Billiard is a fork of the Python 2.7 multiprocessing package. The
8586multiprocessing package itself is a renamed and updated version of R Oudkerk's
8587pyprocessing package. This standalone variant is intended to be compatible with
8588Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
8589 (license license:bsd-3)
8590 (properties `((python2-variant . ,(delay python2-billiard))))))
8591
8592(define-public python2-billiard
8593 (let ((billiard (package-with-python2
8594 (strip-python2-variant python-billiard))))
8595 (package
8596 (inherit billiard)
8597 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8598 ("python2-mock" ,python2-mock)
8599 ,@(package-native-inputs billiard))))))
8600
8601(define-public python-celery
8602 (package
8603 (name "python-celery")
8604 (version "4.2.1")
8605 (source
8606 (origin
8607 (method url-fetch)
8608 (uri (pypi-uri "celery" version))
8609 (sha256
8610 (base32
8611 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
8612 (build-system python-build-system)
8613 (arguments
8614 '(;; TODO The tests fail with Python 3.7
8615 ;; https://github.com/celery/celery/issues/4849
8616 #:tests? #f
8617 #:phases
8618 (modify-phases %standard-phases
8619 (add-after 'unpack 'patch-requirements
8620 (lambda _
8621 (substitute* "requirements/test.txt"
8622 (("pytest>=3\\.0,<3\\.3")
8623 "pytest>=3.0"))
8624 #t)))))
8625 (native-inputs
8626 `(("python-case" ,python-case)
8627 ("python-pytest" ,python-pytest)))
8628 (propagated-inputs
8629 `(("python-pytz" ,python-pytz)
8630 ("python-billiard" ,python-billiard)
8631 ("python-kombu" ,python-kombu)))
8632 (home-page "https://celeryproject.org")
8633 (synopsis "Distributed Task Queue")
8634 (description "Celery is an asynchronous task queue/job queue based on
8635distributed message passing. It is focused on real-time operation, but
8636supports scheduling as well. The execution units, called tasks, are executed
8637concurrently on a single or more worker servers using multiprocessing,
8638Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
8639synchronously (wait until ready).")
8640 (license license:bsd-3)
8641 (properties `((python2-variant . ,(delay python2-celery))))))
8642
8643(define-public python2-celery
8644 (let ((celery (package-with-python2
8645 (strip-python2-variant python-celery))))
8646 (package
8647 (inherit celery)
8648 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8649 ("python2-mock" ,python2-mock)
8650 ,@(package-native-inputs celery))))))
8651
8652(define-public python-translitcodec
8653 (package
8654 (name "python-translitcodec")
8655 (version "0.4.0")
8656 (source
8657 (origin
8658 (method url-fetch)
8659 (uri (pypi-uri "translitcodec" version))
8660 (sha256
8661 (base32
8662 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
8663 (build-system python-build-system)
8664 (arguments
8665 `(#:tests? #f)) ; no tests provided
8666 (home-page
8667 "https://github.com/claudep/translitcodec")
8668 (synopsis
8669 "Unicode to 8-bit charset transliteration codec")
8670 (description
8671 "This package contains codecs for transliterating ISO 10646 texts into
8672best-effort representations using smaller coded character sets (ASCII,
8673ISO 8859, etc.).")
8674 (license license:expat)))
8675
8676(define-public python2-translitcodec
8677 (package-with-python2 python-translitcodec))
8678
8679(define-public python-editor
8680 (package
8681 (name "python-editor")
8682 (version "0.5")
8683 (source
8684 (origin
8685 (method url-fetch)
8686 (uri (pypi-uri "python-editor" version))
8687 (sha256
8688 (base32
8689 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
8690 (build-system python-build-system)
8691 (home-page
8692 "https://github.com/fmoo/python-editor")
8693 (synopsis
8694 "Programmatically open an editor, capture the result")
8695 (description
8696 "python-editor is a library that provides the editor module for
8697programmatically interfacing with your system's $EDITOR.")
8698 (license license:asl2.0)))
8699
8700(define-public python2-editor
8701 (package-with-python2 python-editor))
8702
44d10b1f
RW
8703(define-public python-vobject
8704 (package
8705 (name "python-vobject")
8706 (version "0.9.5")
8707 (source (origin
8708 (method url-fetch)
8709 (uri (pypi-uri "vobject" version))
8710 (sha256
8711 (base32
8712 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
8713 (build-system python-build-system)
8714 (arguments
8715 '(;; The test suite relies on some non-portable Windows interfaces.
8716 #:tests? #f))
8717 (propagated-inputs
8718 `(("python-dateutil" ,python-dateutil)
8719 ("python-pyicu" ,python-pyicu)))
8720 (synopsis "Parse and generate vCard and vCalendar files")
8721 (description "Vobject is intended to be a full featured Python package for
8722parsing and generating vCard and vCalendar files. Currently, iCalendar files
8723are supported and well tested. vCard 3.0 files are supported, and all data
8724should be imported, but only a few components are understood in a sophisticated
8725way.")
8726 (home-page "http://eventable.github.io/vobject/")
8727 (license license:asl2.0)))
8728
8729(define-public python2-vobject
8730 (package-with-python2 python-vobject))
8731
8732(define-public python-munkres
8733 (package
8734 (name "python-munkres")
8735 (version "1.0.8")
8736 (source (origin
8737 (method url-fetch)
8738 (uri (pypi-uri "munkres" version))
8739 (sha256
8740 (base32
8741 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
8742 (build-system python-build-system)
8743 (arguments
8744 '(#:tests? #f)) ; no test suite
8745 (home-page "http://software.clapper.org/munkres/")
8746 (synopsis "Implementation of the Munkres algorithm")
8747 (description "The Munkres module provides an implementation of the Munkres
8748algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
8749useful for solving the Assignment Problem.")
8750 (license license:bsd-3)))
8751
8752(define-public python2-munkres
8753 (package-with-python2 python-munkres))
8754
8755(define-public python-whoosh
8756 (package
8757 (name "python-whoosh")
8758 (version "2.7.4")
8759 (source
8760 (origin
8761 (method url-fetch)
8762 (uri (pypi-uri "Whoosh" version))
8763 (sha256
8764 (base32
8765 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
8766 (build-system python-build-system)
8767 (native-inputs
8768 `(("python-pytest" ,python-pytest)))
8769 (home-page "https://bitbucket.org/mchaput/whoosh")
8770 (synopsis "Full text indexing, search, and spell checking library")
8771 (description
8772 "Whoosh is a fast, pure-Python full text indexing, search, and spell
8773checking library.")
8774 (license license:bsd-2)))
8775
8776(define-public python2-whoosh
8777 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
8778 (package (inherit whoosh)
8779 (propagated-inputs
8780 `(("python2-backport-ssl-match-hostname"
8781 ,python2-backport-ssl-match-hostname)
8782 ,@(package-propagated-inputs whoosh))))))
8783
8784(define-public python-pathlib
8785 (package
8786 (name "python-pathlib")
8787 (version "1.0.1")
8788 (source (origin
8789 (method url-fetch)
8790 (uri (pypi-uri "pathlib" version))
8791 (sha256
8792 (base32
8793 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
8794 (build-system python-build-system)
8795 ;; The tests depend on the internal "test" module, which does not provide
8796 ;; a stable interface.
8797 (arguments `(#:tests? #f))
8798 (home-page "https://pathlib.readthedocs.org/")
8799 (synopsis "Object-oriented file system paths")
8800 (description "Pathlib offers a set of classes to handle file system paths.
8801It offers the following advantages over using string objects:
8802
8803@enumerate
8804@item No more cumbersome use of os and os.path functions. Everything can
8805be done easily through operators, attribute accesses, and method calls.
8806@item Embodies the semantics of different path types. For example,
8807comparing Windows paths ignores casing.
8808@item Well-defined semantics, eliminating any inconsistencies or
8809ambiguities (forward vs. backward slashes, etc.).
8810@end enumerate
8811
8812Note: In Python 3.4, pathlib is now part of the standard library. For other
8813Python versions please consider python-pathlib2 instead, which tracks the
8814standard library module. This module (python-pathlib) isn't maintained
8815anymore.")
8816 (license license:expat)))
8817
8818(define-public python2-pathlib
8819 (package-with-python2 python-pathlib))
8820
8821(define-public python2-pathlib2
8822 (package
8823 (name "python2-pathlib2")
8824 (version "2.3.2")
8825 (source (origin
8826 (method url-fetch)
8827 (uri (pypi-uri "pathlib2" version))
8828 (sha256
8829 (base32
8830 "10yb0iv5x2hs631rcppkhbddx799d3h8pcwmkbh2a66ns3w71ccf"))))
8831 (build-system python-build-system)
8832 ;; We only need the the Python 2 variant, since for Python 3 our minimum
8833 ;; version is 3.4 which already includes this package as part of the
8834 ;; standard library.
8835 (arguments
8836 `(#:python ,python-2))
8837 (propagated-inputs
8838 `(("python2-scandir" ,python2-scandir)
8839 ("python2-six" ,python2-six)))
8840 (home-page "https://pypi.python.org/pypi/pathlib2/")
8841 (synopsis "Object-oriented file system paths - backport of standard
8842pathlib module")
8843 (description "The goal of pathlib2 is to provide a backport of standard
8844pathlib module which tracks the standard library module, so all the newest
8845features of the standard pathlib can be used also on older Python versions.
8846
8847Pathlib offers a set of classes to handle file system paths. It offers the
8848following advantages over using string objects:
8849
8850@enumerate
8851@item No more cumbersome use of os and os.path functions. Everything can
8852be done easily through operators, attribute accesses, and method calls.
8853@item Embodies the semantics of different path types. For example,
8854comparing Windows paths ignores casing.
8855@item Well-defined semantics, eliminating any inconsistencies or
8856ambiguities (forward vs. backward slashes, etc.).
8857@end enumerate")
8858 (license license:expat)))
8859
8860(define-public python2-pathlib2-bootstrap
8861 (hidden-package
8862 (package
8863 (inherit python2-pathlib2)
8864 (name "python2-pathlib2-bootstrap")
8865 (propagated-inputs
8866 `(("python2-scandir" ,python2-scandir)
8867 ("python2-six" ,python2-six-bootstrap))))))
8868
8869(define-public python-jellyfish
8870 (package
8871 (name "python-jellyfish")
8872 (version "0.5.6")
8873 (source (origin
8874 (method url-fetch)
8875 (uri (pypi-uri "jellyfish" version))
8876 (sha256
8877 (base32
8878 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
8879 (build-system python-build-system)
8880 (native-inputs
8881 `(("python-pytest" ,python-pytest)))
8882 (home-page "https://github.com/jamesturk/jellyfish")
8883 (synopsis "Approximate and phonetic matching of strings")
8884 (description "Jellyfish uses a variety of string comparison and phonetic
8885encoding algorithms to do fuzzy string matching.")
8886 (license license:bsd-2)
8887 (properties `((python2-variant . ,(delay python2-jellyfish))))))
8888
8889(define-public python2-jellyfish
8890 (let ((jellyfish (package-with-python2
8891 (strip-python2-variant python-jellyfish))))
8892 (package (inherit jellyfish)
8893 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
8894 ,@(package-native-inputs jellyfish))))))
8895
8896(define-public python2-unicodecsv
8897 (package
8898 (name "python2-unicodecsv")
8899 (version "0.14.1")
8900 (source (origin
8901 (method url-fetch)
8902 ;; The test suite is not included in the PyPi release.
8903 ;; https://github.com/jdunck/python-unicodecsv/issues/19
8904 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
8905 "archive/" version ".tar.gz"))
8906 (file-name (string-append name "-" version ".tar.gz"))
8907 (sha256
8908 (base32
8909 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
8910 (build-system python-build-system)
8911 (arguments
8912 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
8913 #:python ,python-2))
8914 (native-inputs
8915 `(("python2-unittest2" ,python2-unittest2)))
8916 (home-page "https://github.com/jdunck/python-unicodecsv")
8917 (synopsis "Unicode CSV module for Python 2")
8918 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
8919module, adding support for Unicode strings.")
8920 (license license:bsd-2)))
8921
8922(define-public python-rarfile
8923 (package
8924 (name "python-rarfile")
8925 (version "2.8")
8926 (source (origin
8927 (method url-fetch)
8928 (uri (pypi-uri "rarfile" version))
8929 (sha256
8930 (base32
8931 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
8932 (build-system python-build-system)
8933 (arguments
8934 '(#:phases
8935 (modify-phases %standard-phases
8936 (replace 'check
8937 ;; Many tests fail, but the installation proceeds.
e59dd341 8938 (lambda _ (invoke "make" "-C" "test" "test"))))))
44d10b1f
RW
8939 (native-inputs
8940 `(("which" ,which))) ; required for tests
8941 (propagated-inputs
8942 `(("libarchive" ,libarchive)))
8943 (home-page "https://github.com/markokr/rarfile")
8944 (synopsis "RAR archive reader for Python")
8945 (description "This is Python module for RAR archive reading. The interface
8946is made as zipfile like as possible.")
8947 (license license:isc)))
8948
8949(define-public python2-rarfile
8950 (package-with-python2 python-rarfile))
8951
8952(define-public python-magic
8953 (package
8954 (name "python-magic")
8955 (version "0.4.15")
8956 (source
8957 (origin
8958 (method url-fetch)
8959 (uri (pypi-uri "python-magic" version))
8960 (sha256
8961 (base32
8962 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
8963 (file-name (string-append name "-" version "-checkout"))))
8964 (build-system python-build-system)
8965 (arguments
8966 ;; The tests are unreliable, so don't run them. The tests fail
8967 ;; under Python3 because they were written for Python2 and
8968 ;; contain import statements that do not work in Python3. One of
8969 ;; the tests fails under Python2 because its assertions are
8970 ;; overly stringent; it relies on comparing output strings which
8971 ;; are brittle and can change depending on the version of
8972 ;; libmagic being used and the system on which the test is
8973 ;; running. In my case, under GuixSD 0.10.0, only one test
8974 ;; failed, and it seems to have failed only because the version
8975 ;; of libmagic that is packaged in Guix outputs a slightly
8976 ;; different (but not wrong) string than the one that the test
8977 ;; expected.
8978 '(#:tests? #f
8979 #:phases (modify-phases %standard-phases
8980 ;; Replace a specific method call with a hard-coded
8981 ;; path to the necessary libmagic.so file in the
8982 ;; store. If we don't do this, then the method call
8983 ;; will fail to find the libmagic.so file, which in
8984 ;; turn will cause any application using
8985 ;; python-magic to fail.
8986 (add-before 'build 'hard-code-path-to-libmagic
8987 (lambda* (#:key inputs #:allow-other-keys)
8988 (let ((file (assoc-ref inputs "file")))
8989 (substitute* "magic.py"
8990 (("ctypes.util.find_library\\('magic'\\)")
8991 (string-append "'" file "/lib/libmagic.so'")))
8992 #t)))
8993 (add-before 'install 'disable-egg-compression
8994 (lambda _
8995 (let ((port (open-file "setup.cfg" "a")))
8996 (display "\n[easy_install]\nzip_ok = 0\n"
8997 port)
8998 (close-port port)
8999 #t))))))
9000 (inputs
9001 ;; python-magic needs to be able to find libmagic.so.
9002 `(("file" ,file)))
9003 (home-page
9004 "https://github.com/ahupp/python-magic")
9005 (synopsis
9006 "File type identification using libmagic")
9007 (description
9008 "This module uses ctypes to access the libmagic file type
9009identification library. It makes use of the local magic database and
9010supports both textual and MIME-type output. Note that this module and
9011the python-file module both provide a \"magic.py\" file; these two
9012modules, which are different and were developed separately, both serve
9013the same purpose: to provide Python bindings for libmagic.")
9014 (license license:expat)))
9015
9016(define-public python2-magic
9017 (package-with-python2 python-magic))
9018
9019(define-public python2-s3cmd
9020 (package
9021 (name "python2-s3cmd")
9022 (version "1.6.1")
9023 (source
9024 (origin
9025 (method url-fetch)
9026 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
9027 "s3cmd-" version ".tar.gz"))
9028 (sha256
9029 (base32
9030 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9031 (build-system python-build-system)
9032 (arguments
9033 ;; s3cmd is written for python2 only and contains no tests.
9034 `(#:python ,python-2
9035 #:tests? #f))
9036 (propagated-inputs
9037 `(("python2-dateutil" ,python2-dateutil)
9038 ;; The python-file package also provides a magic.py module.
9039 ;; This is an unfortunate state of affairs; however, s3cmd
9040 ;; fails to install if it cannot find specifically the
9041 ;; python-magic package. Thus we include it, instead of using
9042 ;; python-file. Ironically, s3cmd sometimes works better
9043 ;; without libmagic bindings at all:
9044 ;; https://github.com/s3tools/s3cmd/issues/198
9045 ("python2-magic" ,python2-magic)))
9046 (home-page "http://s3tools.org/s3cmd")
9047 (synopsis "Command line tool for S3-compatible storage services")
9048 (description
9049 "S3cmd is a command line tool for uploading, retrieving and managing data
9050in storage services that are compatible with the Amazon Simple Storage
9051Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9052GnuPG encryption, and more. It also supports management of Amazon's
9053CloudFront content delivery network.")
9054 (license license:gpl2+)))
9055
9056(define-public python-pkgconfig
9057 (package
9058 (name "python-pkgconfig")
9059 (version "1.3.1")
9060 (source
9061 (origin
9062 (method url-fetch)
9063 (uri (pypi-uri "pkgconfig" version))
9064 (sha256
9065 (base32
9066 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
9067 (build-system python-build-system)
9068 (native-inputs
9069 `(("python-nose" ,python-nose)))
9070 (inputs
9071 `(("pkg-config" ,pkg-config)))
9072 (arguments
9073 `(#:phases
9074 (modify-phases %standard-phases
9075 (add-before 'build 'patch
9076 ;; Hard-code the path to pkg-config.
9077 (lambda _
9078 (substitute* "pkgconfig/pkgconfig.py"
9079 (("cmd = 'pkg-config")
9080 (string-append "cmd = '" (which "pkg-config"))))
9081 #t))
9082 (replace 'check
9083 (lambda _
9084 (invoke "nosetests" "test.py"))))))
9085 (home-page "https://github.com/matze/pkgconfig")
9086 (synopsis "Python interface for pkg-config")
9087 (description "This module provides a Python interface to pkg-config. It
9088can be used to find all pkg-config packages, check if a package exists,
9089check if a package meets certain version requirements, query CFLAGS and
9090LDFLAGS and parse the output to build extensions with setup.py.")
9091 (license license:expat)))
9092
9093(define-public python2-pkgconfig
9094 (package-with-python2 python-pkgconfig))
9095
9096(define-public python-bz2file
9097 (package
9098 (name "python-bz2file")
9099 (version "0.98")
9100 (source
9101 (origin
9102 (method url-fetch)
9103 (uri (pypi-uri "bz2file" version))
9104 (sha256
9105 (base32
9106 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9107 (build-system python-build-system)
9108 (arguments
9109 `(#:tests? #f)) ; Tests use deprecated python modules.
9110 (home-page "https://github.com/nvawda/bz2file")
9111 (synopsis "Read and write bzip2-compressed files")
9112 (description
9113 "Bz2file is a Python library for reading and writing bzip2-compressed
9114files. It contains a drop-in replacement for the I/O interface in the
9115standard library's @code{bz2} module, including features from the latest
9116development version of CPython that are not available in older releases.")
9117 (license license:asl2.0)))
9118
9119(define-public python2-bz2file
9120 (package-with-python2 python-bz2file))
9121
9122(define-public python-future
9123 (package
9124 (name "python-future")
d5d54030 9125 (version "0.17.1")
44d10b1f
RW
9126 (source
9127 (origin
9128 (method url-fetch)
9129 (uri (pypi-uri "future" version))
9130 (sha256
9131 (base32
d5d54030 9132 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
44d10b1f
RW
9133 (build-system python-build-system)
9134 ;; Many tests connect to the network or are otherwise flawed.
9135 ;; https://github.com/PythonCharmers/python-future/issues/210
9136 (arguments
9137 `(#:tests? #f))
9138 (home-page "http://python-future.org")
9139 (synopsis "Single-source support for Python 3 and 2")
9140 (description
9141 "@code{python-future} is the missing compatibility layer between Python 2 and
9142Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9143to support both Python 2 and Python 3 with minimal overhead.")
9144 (license license:expat)))
9145
9146(define-public python2-future
9147 (package-with-python2 python-future))
9148
9149(define-public python-cysignals
9150 (package
9151 (name "python-cysignals")
8e3e51df 9152 (version "1.9.0")
44d10b1f
RW
9153 (source
9154 (origin
9155 (method url-fetch)
8e3e51df 9156 (uri (pypi-uri "cysignals" version))
44d10b1f
RW
9157 (sha256
9158 (base32
8e3e51df 9159 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
44d10b1f
RW
9160 (build-system python-build-system)
9161 (native-inputs
9162 `(("python-cython" ,python-cython)
9163 ("python-sphinx" ,python-sphinx)))
9164 (inputs
9165 `(("pari-gp" ,pari-gp)))
9166 (arguments
9167 `(#:modules ((guix build python-build-system)
9168 ((guix build gnu-build-system) #:prefix gnu:)
9169 (guix build utils))
9170 ;; FIXME: Tests are executed after installation and currently fail
9171 ;; when not installing into standard locations; the author is working
9172 ;; on a fix.
9173 #:tests? #f
9174 #:phases
9175 (modify-phases %standard-phases
9176 (add-before
9177 'build 'configure
9178 (assoc-ref gnu:%standard-phases 'configure)))))
9179 (home-page
9180 "https://github.com/sagemath/cysignals")
9181 (synopsis
9182 "Handling of interrupts and signals for Cython")
9183 (description
9184 "The cysignals package provides mechanisms to handle interrupts (and
9185other signals and errors) in Cython code, using two related approaches,
9186for mixed Cython/Python code or external C libraries and pure Cython code,
9187respectively.")
9188 (license license:lgpl3+)))
9189
9190(define-public python2-cysignals
9191 (package-with-python2 python-cysignals))
9192
9193(define-public python2-shedskin
9194 (package
9195 (name "python2-shedskin")
9196 (version "0.9.4")
9197 (source
9198 (origin
9199 (method url-fetch)
9200 (uri (string-append "https://github.com/shedskin/shedskin/"
9201 "releases/download/v" version
9202 "/shedskin-" version ".tgz"))
9203 (sha256
9204 (base32
9205 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9206 (build-system python-build-system)
9207 (arguments
9208 `(#:python ,python-2
9209 #:phases (modify-phases %standard-phases
9210 (add-after 'unpack 'fix-resulting-include-libs
9211 (lambda* (#:key inputs #:allow-other-keys)
9212 (let ((libgc (assoc-ref inputs "libgc"))
9213 (pcre (assoc-ref inputs "pcre")))
9214 (substitute* "shedskin/makefile.py"
9215 (("variable == 'CCFLAGS':[ ]*")
9216 (string-append "variable == 'CCFLAGS':\n"
9217 " line += ' -I " pcre "/include"
9218 " -I " libgc "/include'"))
9219 (("variable == 'LFLAGS':[ ]*")
9220 (string-append "variable == 'LFLAGS':\n"
9221 " line += ' -L" pcre "/lib"
9222 " -L " libgc "/lib'")))
9223 #t))))))
9224 (inputs `(("pcre" ,pcre)
9225 ("libgc" ,libgc)))
9226 (home-page "https://shedskin.github.io/")
9227 (synopsis "Experimental Python-2 to C++ Compiler")
9228 (description (string-append "This is an experimental compiler for a subset of
9229Python. It generates C++ code and a Makefile."))
9230 (license (list license:gpl3 license:bsd-3 license:expat))))
9231
9232(define-public python2-rope
9233 (package
9234 (name "python2-rope")
a9ba0a31 9235 (version "0.11.0")
44d10b1f
RW
9236 (source
9237 (origin
9238 (method url-fetch)
9239 (uri (pypi-uri "rope" version))
9240 (sha256
9241 (base32
a9ba0a31 9242 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
44d10b1f 9243 (arguments
afb29715 9244 ;; Rope has only partial python3 support, see `python-rope'
44d10b1f
RW
9245 `(#:python ,python-2))
9246 (build-system python-build-system)
9247 (native-inputs
9248 `(("python2-unittest2" ,python2-unittest2)))
9249 (home-page "https://github.com/python-rope/rope")
9250 (synopsis "Refactoring library for Python")
9251 (description "Rope is a refactoring library for Python. It facilitates
9252the renaming, moving and extracting of attributes, functions, modules, fields
9253and parameters in Python 2 source code. These refactorings can also be applied
9254to occurrences in strings and comments.")
9255 (license license:gpl2)))
9256
2c880ef4
LC
9257(define-public python-rope
9258 (package
9259 (inherit python2-rope)
9260 (name "python-rope")
9261 (arguments `(#:python ,python-wrapper
9262 ;; XXX: Only partial python3 support, results in some failing
9263 ;; tests: <https://github.com/python-rope/rope/issues/247>.
9264 #:tests? #f))
9265 (properties `((python2-variant . ,(delay python2-rope))))))
9266
44d10b1f
RW
9267(define-public python-py3status
9268 (package
9269 (name "python-py3status")
77f3d303 9270 (version "3.16")
44d10b1f
RW
9271 (source
9272 (origin
9273 (method url-fetch)
9274 (uri (pypi-uri "py3status" version))
9275 (sha256
9276 (base32
77f3d303 9277 "1xrfph277bgjln3jbpzpgkhxad04fjvj7s3xfil42q1sxi4s3q3g"))))
44d10b1f
RW
9278 (build-system python-build-system)
9279 (inputs
9280 `(("file" ,file)))
9281 (arguments
9282 '(#:phases
9283 (modify-phases %standard-phases
9284 ;; 'file' is used for detection of configuration file encoding
9285 ;; let's make link the dependency to particular input
9286 (add-before 'build 'patch-file-path
9287 (lambda* (#:key inputs #:allow-other-keys)
9288 (let ((file-path (assoc-ref inputs "file")))
9289 (substitute* "py3status/parse_config.py"
9290 (("\\['file', '-b'")
9291 (string-append "['" file-path "/bin/file', '-b'")))
9292 #t))))
9293 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
9294 (home-page "https://github.com/ultrabug/py3status")
9295 (synopsis "Extensible i3status wrapper written in Python")
9296 (description "py3status is an i3status wrapper which extends i3status
9297functionality in a modular way, allowing you to extend your panel with your
9298own code, responding to click events and updating clock every second.")
9299 (license license:bsd-3)))
9300
9301(define-public python-tblib
9302 (package
9303 (name "python-tblib")
9304 (version "1.3.2")
9305 (source (origin
9306 (method url-fetch)
9307 (uri (pypi-uri "tblib" version))
9308 (sha256 (base32
9309 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
9310 (build-system python-build-system)
9311 (arguments
9312 `(#:phases
9313 (modify-phases %standard-phases
9314 (add-before 'check 'adjust-tests
9315 (lambda _
9316 (when (which "python3")
9317 ;; Adjust the example output to match that of Python 3.7:
9318 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
9319 (substitute* "README.rst"
9320 (("Exception\\('fail',") "Exception('fail'"))
9321 #t)))
9322 (replace 'check
9323 (lambda _
9324 ;; Upstream runs tests after installation and the package itself
9325 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
9326 ;; found.
9327 (setenv "PYTHONPATH"
9328 (string-append (getcwd) "/build/lib:"
9329 (getenv "PYTHONPATH")))
9330 (invoke "py.test" "-vv" "tests" "README.rst"))))))
9331 (native-inputs
9332 `(("python-pytest" ,python-pytest)
9333 ("python-six" ,python-six)))
9334 (home-page "https://github.com/ionelmc/python-tblib")
9335 (synopsis "Traceback serialization library")
9336 (description
9337 "Traceback serialization allows you to:
9338
9339@enumerate
9340@item Pickle tracebacks and raise exceptions with pickled tracebacks in
9341different processes. This allows better error handling when running code over
9342multiple processes (imagine multiprocessing, billiard, futures, celery etc).
9343
9344@item Parse traceback strings and raise with the parsed tracebacks.
9345@end enumerate\n")
9346 (license license:bsd-3)))
9347
9348(define-public python2-tblib
9349 (package-with-python2 python-tblib))
9350
9351(define-public python-greenlet
9352 (package
9353 (name "python-greenlet")
9354 (version "0.4.15")
9355 (source (origin
9356 (method url-fetch)
9357 (uri (pypi-uri "greenlet" version))
9358 (sha256
9359 (base32
9360 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
9361 (build-system python-build-system)
9362 (home-page "https://greenlet.readthedocs.io/")
9363 (synopsis "Lightweight in-process concurrent programming")
9364 (description
9365 "Greenlet package is a spin-off of Stackless, a version of CPython
9366that supports micro-threads called \"tasklets\". Tasklets run
9367pseudo-concurrently (typically in a single or a few OS-level threads) and
9368are synchronized with data exchanges on \"channels\".")
9369 (license (list license:psfl license:expat))))
9370
9371(define-public python2-greenlet
9372 (package-with-python2 python-greenlet))
9373
9374(define-public python-objgraph
9375 (package
9376 (name "python-objgraph")
9377 (version "3.4.0")
9378 (source
9379 (origin
9380 (method url-fetch)
9381 (uri (pypi-uri "objgraph" version))
9382 (sha256
9383 (base32
9384 "184m09am5gpbqfaiy7l0hwh476mczbrly1dffs0rw2p1d1i2q32a"))))
9385 (build-system python-build-system)
9386 (propagated-inputs
9387 `(("python-graphviz" ,python-graphviz)))
9388 (native-inputs
9389 `(("python-mock" ,python-mock)
9390 ("graphviz" ,graphviz)))
9391 (home-page "https://mg.pov.lt/objgraph/")
9392 (synopsis "Draw Python object reference graphs with graphviz")
9393 (description
9394 "This package provides tools to draw Python object reference graphs with
9395graphviz.")
9396 (license license:expat)))
9397
9398(define-public python-gevent
9399 (package
9400 (name "python-gevent")
9401 (version "1.3.7")
9402 (source (origin
9403 (method url-fetch)
9404 (uri (pypi-uri "gevent" version))
9405 (sha256
9406 (base32
9407 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
9408 (modules '((guix build utils)))
9409 (snippet
9410 '(begin
9411 ;; unbunding libev and c-ares
9412 (delete-file-recursively "deps")
9413 #t))))
9414 (build-system python-build-system)
9415 (arguments
9416 `(#:modules ((ice-9 ftw)
9417 (ice-9 match)
9418 (srfi srfi-26)
9419 (guix build utils)
9420 (guix build python-build-system))
9421 #:phases (modify-phases %standard-phases
9422 (add-after 'unpack 'unpack-libev
9423 (lambda* (#:key inputs #:allow-other-keys)
9424 (mkdir-p "deps/libev")
9425 ;; FIXME: gevent requires building libev, even though
9426 ;; it only links against the proper one.
9427 (invoke "tar" "-xf" (assoc-ref inputs "libev-source")
9428 "--strip-components=1" "-C" "deps/libev")))
9429 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
9430 (lambda _
9431 (substitute* "src/gevent/subprocess.py"
9432 (("/bin/sh") (which "sh")))
9433 (for-each (lambda (file)
9434 (substitute* file
9435 (("/bin/sh") (which "sh"))
9436 (("/bin/true") (which "true"))))
9437 (find-files "src/greentest" "\\.py$"))
9438 #t))
9439 (add-before 'build 'do-not-use-bundled-sources
9440 (lambda* (#:key inputs #:allow-other-keys)
9441 (setenv "CONFIG_SHELL" (which "bash"))
9442 (setenv "LIBEV_EMBED" "false")
9443 (setenv "CARES_EMBED" "false")
9444 (setenv "EMBED" "false")
9445
9446 (let ((greenlet (string-append
9447 (assoc-ref inputs "python-greenlet")
9448 "/include")))
9449 (match (scandir greenlet
9450 (lambda (item)
9451 (string-prefix? "python" item)))
9452 ((python)
9453 (setenv "CPATH"
9454 (string-append greenlet "/" python)))))
9455 #t))
9456 (add-before 'check 'skip-timer-test
9457 (lambda _
9458 ;; XXX: Skip 'TestTimerResolution', which appears to be
9459 ;; unreliable.
9460 (substitute* "src/greentest/test__core_timer.py"
9461 (("not greentest.RUNNING_ON_CI") "False"))
9462 #t))
9463 (replace 'check
9464 (lambda _
9465 ;; Make sure the build directory is on PYTHONPATH.
9466 (setenv "PYTHONPATH"
9467 (string-append
9468 (getenv "PYTHONPATH") ":"
9469 (getcwd) "/build/"
9470 (car (scandir "build" (cut string-prefix? "lib." <>)))))
9471 (with-directory-excursion "src/greentest"
9472 ;; XXX: Many tests require network access. Instead we only
9473 ;; run known-good tests. Unfortunately we cannot use
9474 ;; recursion here since this directory also contains
9475 ;; Python-version-specific subfolders.
9476 (apply invoke "python" "testrunner.py" "--config"
9477 "known_failures.py"
9478 (scandir "." (cut regexp-exec
9479 (make-regexp "test_+(subprocess|core)")
9480 <>)))))))))
9481 (propagated-inputs
9482 `(("python-greenlet" ,python-greenlet)
9483 ("python-objgraph" ,python-objgraph)))
9484 (native-inputs
9485 `(("libev-source" ,(package-source libev))
9486 ("python-six" ,python-six)))
9487 (inputs
9488 `(("c-ares" ,c-ares)
9489 ("libev" ,libev)))
9490 (home-page "http://www.gevent.org/")
9491 (synopsis "Coroutine-based network library")
9492 (description
9493 "gevent is a coroutine-based Python networking library that uses greenlet
9494to provide a high-level synchronous API on top of the libev event loop.")
9495 (license license:expat)
9496 (properties `((python2-variant . ,(delay python2-gevent))))))
9497
9498(define-public python2-gevent
9499 (let ((base (package-with-python2
9500 (strip-python2-variant python-gevent))))
9501 (package
9502 (inherit base)
9503 (native-inputs `(,@(package-native-inputs python-gevent)
9504 ("python-mock" ,python2-mock))))))
9505
9506(define-public python-fastimport
9507 (package
9508 (name "python-fastimport")
9509 (version "0.9.6")
9510 (source
9511 (origin
9512 (method url-fetch)
9513 (uri (pypi-uri "fastimport" version))
9514 (sha256
9515 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
9516 (build-system python-build-system)
9517 (home-page "https://github.com/jelmer/python-fastimport")
9518 (synopsis "VCS fastimport parser and generator in Python")
9519 (description "This package provides a parser for and generator of the Git
9520@url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
9521format.")
9522 (license license:gpl2+)))
9523
9524(define-public python2-fastimport
9525 (package-with-python2 python-fastimport))
9526
9527(define-public python-twisted
9528 (package
9529 (name "python-twisted")
52ca1c4a 9530 (version "19.2.0")
44d10b1f
RW
9531 (source (origin
9532 (method url-fetch)
9533 (uri (pypi-uri "Twisted" version ".tar.bz2"))
9534 (sha256
9535 (base32
52ca1c4a 9536 "1gmb8d57s13d8znvqnxi47vqzqz141z443dbxg9wjkp8ia9f220p"))))
44d10b1f
RW
9537 (build-system python-build-system)
9538 (arguments
9539 '(#:tests? #f)) ; FIXME: Some tests are failing.
44d10b1f
RW
9540 (propagated-inputs
9541 `(("python-zope-interface" ,python-zope-interface)
52ca1c4a 9542 ("python-pyhamcrest" ,python-pyhamcrest)
44d10b1f 9543 ("python-incremental" ,python-incremental)
e5ba2fe3 9544 ("python-hyperlink" ,python-hyperlink)
44d10b1f
RW
9545 ("python-constantly" ,python-constantly)
9546 ("python-automat" ,python-automat)))
9547 (home-page "https://twistedmatrix.com/")
9548 (synopsis "Asynchronous networking framework written in Python")
9549 (description
9550 "Twisted is an extensible framework for Python programming, with special
9551focus on event-based network programming and multiprotocol integration.")
9552 (license license:expat)))
9553
9554(define-public python2-twisted
9555 (package-with-python2 python-twisted))
9556
9557(define-public python-pika
9558 (package
9559 (name "python-pika")
9560 (version "0.12.0")
9561 (source
9562 (origin
9563 (method url-fetch)
9564 (uri (pypi-uri "pika" version))
9565 (sha256
9566 (base32
9567 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
9568 (build-system python-build-system)
9569 (native-inputs
9570 `(("python-pyev" ,python-pyev)
9571 ("python-tornado" ,python-tornado)
9572 ("python-twisted" ,python-twisted)))
9573 (home-page "https://pika.readthedocs.org")
9574 (synopsis "Pure Python AMQP Client Library")
9575 (description
9576 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
9577Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
9578network support library.")
9579 (license license:bsd-3)))
9580
9581(define-public python2-pika
9582 (package-with-python2 python-pika))
9583
9584(define-public python-ply
9585 (package
9586 (name "python-ply")
9587 (version "3.10")
9588 (source
9589 (origin
9590 (method url-fetch)
9591 (uri (pypi-uri "ply" version))
9592 (sha256
9593 (base32
9594 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
9595 (build-system python-build-system)
9596 (home-page "http://www.dabeaz.com/ply/")
9597 (synopsis "Python Lex & Yacc")
9598 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
9599It uses LR parsing and does extensive error checking.")
9600 (license license:bsd-3)))
9601
9602(define-public python2-ply
9603 (package-with-python2 python-ply))
9604
9605(define-public python-tabulate
9606 (package
9607 (name "python-tabulate")
9608 (version "0.7.7")
9609 (source (origin
9610 (method url-fetch)
9611 (uri (pypi-uri "tabulate" version))
9612 (sha256
9613 (base32
9614 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
9615 (build-system python-build-system)
9616 (arguments
9617 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
9618 ;; and the latest release is not tagged in the upstream repository.
9619 '(#:tests? #f))
9620 (home-page "https://bitbucket.org/astanin/python-tabulate")
9621 (synopsis "Pretty-print tabular data")
9622 (description
9623 "Tabulate is a library and command-line utility to pretty-print tabular
9624data in Python.")
9625 (license license:expat)))
9626
9627(define-public python2-tabulate
9628 (package-with-python2 python-tabulate))
9629
9630(define-public python-kazoo
9631 (package
9632 (name "python-kazoo")
9633 (version "2.4.0")
9634 (source
9635 (origin
9636 (method url-fetch)
9637 (uri (pypi-uri "kazoo" version))
9638 (sha256
9639 (base32
9640 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
9641 (build-system python-build-system)
9642 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
9643 (propagated-inputs
9644 `(("python-six" ,python-six)))
9645 (home-page "https://kazoo.readthedocs.org")
9646 (synopsis "High-level Zookeeper client library")
9647 (description
9648 "Kazoo is a Python client library for the Apache Zookeeper distributed
9649application service. It is designed to be easy to use and to avoid common
9650programming errors.")
9651 (license license:asl2.0)))
9652
9653(define-public python2-kazoo
9654 (package-with-python2 python-kazoo))
9655
9656(define-public python-pykafka
9657 (package
9658 (name "python-pykafka")
9659 (version "2.4.0")
9660 (source (origin
9661 (method url-fetch)
0ca1d040 9662 (uri (pypi-uri "pykafka" version))
44d10b1f
RW
9663 (sha256
9664 (base32
9665 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
9666 (build-system python-build-system)
9667 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
9668 (propagated-inputs
9669 `(("python-gevent" ,python-gevent)
9670 ("python-kazoo" ,python-kazoo)
9671 ("python-tabulate" ,python-tabulate)))
9672 (inputs
9673 `(("librdkafka" ,librdkafka)))
9674 (home-page "https://pykafka.readthedocs.io/")
9675 (synopsis "Apache Kafka client for Python")
9676 (description
9677 "PyKafka is a client for the Apache Kafka distributed messaging system.
9678It includes Python implementations of Kafka producers and consumers, which
9679are optionally backed by a C extension built on librdkafka.")
9680 (license license:asl2.0)))
9681
9682(define-public python2-pykafka
9683 (package-with-python2 python-pykafka))
9684
9685(define-public python-wcwidth
9686 (package
9687 (name "python-wcwidth")
9688 (version "0.1.7")
9689 (source
9690 (origin
9691 (method url-fetch)
9692 (uri (pypi-uri "wcwidth" version))
9693 (sha256
9694 (base32
9695 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
9696 (build-system python-build-system)
9697 (home-page "https://github.com/jquast/wcwidth")
9698 (synopsis "Measure number of terminal column cells of wide-character codes")
9699 (description "Wcwidth measures the number of terminal column cells of
9700wide-character codes. It is useful for those implementing a terminal emulator,
9701or programs that carefully produce output to be interpreted by one. It is a
9702Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
9703specified in POSIX.1-2001 and POSIX.1-2008.")
9704 (license license:expat)))
9705
9706(define-public python2-wcwidth
9707 (package-with-python2 python-wcwidth))
9708
9709(define-public python2-jsonrpclib
9710 (package
9711 (name "python2-jsonrpclib")
9712 (version "0.1.7")
9713 (source (origin
9714 (method url-fetch)
6571bba0 9715 (uri (pypi-uri "jsonrpclib" version))
44d10b1f
RW
9716 (sha256
9717 (base32
9718 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
9719 (build-system python-build-system)
9720 (arguments
9721 `(#:tests? #f
9722 #:python ,python-2))
9723 (home-page "https://github.com/joshmarshall/jsonrpclib/")
9724 (synopsis "Implementation of JSON-RPC specification for Python")
9725 (description
9726 "This library is an implementation of the JSON-RPC specification.
9727It supports both the original 1.0 specification, as well as the
9728new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
9729etc.")
9730 (license license:asl2.0)))
9731
9732(define-public python-chai
9733 (package
9734 (name "python-chai")
9735 (version "1.1.2")
9736 (source (origin
9737 (method url-fetch)
9738 (uri (pypi-uri "chai" version))
9739 (sha256
9740 (base32
9741 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
9742 (build-system python-build-system)
9743 (home-page "https://github.com/agoragames/chai")
9744 (synopsis "Mocking framework for Python")
9745 (description
9746 "Chai provides an api for mocking, stubbing and spying your python
9747objects, patterned after the Mocha library for Ruby.")
9748 (license license:bsd-3)))
9749
9750(define-public python2-chai
9751 (package-with-python2 python-chai))
9752
9753(define-public python-inflection
9754 (package
9755 (name "python-inflection")
9756 (version "0.3.1")
9757 (source
9758 (origin (method url-fetch)
9759 (uri (pypi-uri "inflection" version))
9760 (sha256
9761 (base32
9762 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
9763 (build-system python-build-system)
9764 (native-inputs
9765 `(("python-pytest" ,python-pytest)))
9766 (home-page "https://github.com/jpvanhal/inflection")
9767 (synopsis "Python string transformation library")
9768 (description
9769 "Inflection is a string transformation library. It singularizes
9770and pluralizes English words, and transforms strings from CamelCase to
9771underscored string.")
9772 (license license:expat)))
9773
9774(define-public python2-inflection
9775 (package-with-python2 python-inflection))
9776
9777(define-public python-pylev
9778 (package
9779 (name "python-pylev")
9780 (version "1.3.0")
9781 (source (origin
9782 (method url-fetch)
9783 (uri (pypi-uri "pylev" version))
9784 (sha256
9785 (base32
9786 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
9787 (build-system python-build-system)
9788 (home-page "https://github.com/toastdriven/pylev")
9789 (synopsis "Levenshtein distance implementation in Python")
9790 (description "Pure Python Levenshtein implementation, based off the
9791Wikipedia code samples at
9792@url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
9793 (license license:bsd-3)))
9794
9795(define-public python2-pylev
9796 (package-with-python2 python-pylev))
9797
9798(define-public python-cleo
9799 (package
9800 (name "python-cleo")
9801 (version "0.6.1")
9802 (source (origin
9803 (method url-fetch)
9804 (uri (pypi-uri "cleo" version))
9805 (sha256
9806 (base32
9807 "0q1cf0szr0d54am4pypzwdnm74zpladdsinad94c2fz5i06fdpf7"))))
9808 (build-system python-build-system)
9809 (native-inputs
9810 `(;; For testing
9811 ("python-mock" ,python-mock)
9812 ("python-pytest-mock" ,python-pytest-mock)
9813 ("python-pytest" ,python-pytest)))
9814 (propagated-inputs
9815 `(("python-backpack" ,python-backpack)
9816 ("python-pastel" ,python-pastel)
9817 ("python-pylev" ,python-pylev)))
9818 (home-page "https://github.com/sdispater/cleo")
9819 (synopsis "Command-line arguments library for Python")
9820 (description
9821 "Cleo allows you to create command-line commands with signature in
9822docstring and colored output.")
9823 (license license:expat)))
9824
9825(define-public python2-cleo
9826 (package-with-python2 python-cleo))
9827
9828(define-public python-lazy-object-proxy
9829 (package
9830 (name "python-lazy-object-proxy")
9831 (version "1.3.1")
9832 (source (origin
9833 (method url-fetch)
9834 (uri (pypi-uri "lazy-object-proxy" version))
9835 (sha256
9836 (base32
9837 "0yha7q9bhw857fwaby785d63mffhngl9npwzlk9i0pwlkwvbx4gb"))))
9838 (build-system python-build-system)
9839 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
9840 (synopsis "Lazy object proxy for python")
9841 (description
9842 "Lazy object proxy is an object that wraps a callable but defers the call
9843until the object is actually required, and caches the result of said call.")
9844 (license license:bsd-2)))
9845
9846(define-public python2-lazy-object-proxy
9847 (package-with-python2 python-lazy-object-proxy))
9848
9849(define-public python-dnspython
9850 (package
9851 (name "python-dnspython")
9852 (version "1.15.0")
9853 (source (origin
9854 (method url-fetch)
9855 (uri (string-append "http://www.dnspython.org/kits/"
9856 version "/dnspython-" version ".tar.gz"))
9857 (sha256
9858 (base32
9859 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
9860 (build-system python-build-system)
9861 (arguments '(#:tests? #f)) ; XXX: requires internet access
9862 (home-page "http://www.dnspython.org")
9863 (synopsis "DNS toolkit for Python")
9864 (description
9865 "dnspython is a DNS toolkit for Python. It supports almost all record
9866types. It can be used for queries, zone transfers, and dynamic updates.
9867It supports TSIG authenticated messages and EDNS0.")
9868 (license license:expat)))
9869
9870(define-public python2-dnspython
9871 (package-with-python2 python-dnspython))
9872
9873(define-public python-email-validator
9874 (package
9875 (name "python-email-validator")
9876 (version "1.0.2")
9877 (source
9878 (origin (method url-fetch)
9879 (uri (pypi-uri "email_validator" version))
9880 (sha256
9881 (base32
9882 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
9883 (build-system python-build-system)
9884 (arguments
9885 '(#:phases
9886 (modify-phases %standard-phases
9887 (add-before 'build 'use-dnspython
9888 (lambda _
9889 (substitute* "setup.py"
9890 (("dnspython3") "dnspython"))
9891 #t)))))
9892 (propagated-inputs
9893 `(("python-dnspython" ,python-dnspython)
9894 ("python-idna" ,python-idna)))
9895 (home-page "https://github.com/JoshData/python-email-validator")
9896 (synopsis "Email address validation library for Python")
9897 (description
9898 "This library validates email address syntax and deliverability.")
9899 (license license:cc0)))
9900
9901(define-public python2-email-validator
9902 (package-with-python2 python-email-validator))
9903
9904(define-public python-ukpostcodeparser
9905 (package
9906 (name "python-ukpostcodeparser")
9907 (version "1.0.3")
9908 (source (origin
9909 (method url-fetch)
9910 (uri (pypi-uri "UkPostcodeParser" version))
9911 (sha256
9912 (base32
9913 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
9914 (build-system python-build-system)
9915 (home-page "https://github.com/hamstah/ukpostcodeparser")
9916 (synopsis "UK Postcode parser for Python")
9917 (description
9918 "This library provides the @code{parse_uk_postcode} function for
9919parsing UK postcodes.")
9920 (license license:expat)))
9921
9922(define-public python2-ukpostcodeparser
9923 (package-with-python2 python-ukpostcodeparser))
9924
9925(define-public python-faker
9926 (package
9927 (name "python-faker")
9928 (version "0.7.9")
9929 (source (origin
9930 (method url-fetch)
9931 (uri (pypi-uri "Faker" version))
9932 (sha256
9933 (base32
9934 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
9935 (patches
9936 (search-patches "python-faker-fix-build-32bit.patch"))
9937 (modules '((guix build utils)))
9938 (snippet
9939 '(begin
9940 (for-each delete-file (find-files "." "\\.pyc$"))
9941 #t))))
9942 (build-system python-build-system)
9943 (arguments
9944 '(#:phases
9945 (modify-phases %standard-phases
9946 (replace 'check
49ff8827 9947 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
44d10b1f
RW
9948 (native-inputs
9949 `(;; For testing
9950 ("python-email-validator" ,python-email-validator)
9951 ("python-mock" ,python-mock)
9952 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
9953 (propagated-inputs
9954 `(("python-dateutil" ,python-dateutil)
9955 ("python-six" ,python-six)))
9956 (home-page "https://github.com/joke2k/faker")
9957 (synopsis "Python package that generates fake data")
9958 (description
9959 "Faker is a Python package that generates fake data such as names,
9960addresses, and phone numbers.")
9961 (license license:expat)
9962 (properties `((python2-variant . ,(delay python2-faker))))))
9963
9964(define-public python2-faker
9965 (let ((base (package-with-python2 (strip-python2-variant
9966 python-faker))))
9967 (package
9968 (inherit base)
9969 (propagated-inputs
9970 `(("python2-ipaddress" ,python2-ipaddress)
9971 ,@(package-propagated-inputs base))))))
9972
9973(define-public python-pyaml
9974 (package
9975 (name "python-pyaml")
9976 (version "18.11.0")
9977 (source (origin
9978 (method url-fetch)
9979 (uri (pypi-uri "pyaml" version))
9980 (sha256
9981 (base32
9982 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
9983 (build-system python-build-system)
9984 (native-inputs
9985 `(("python-unidecode" ,python-unidecode)))
9986 (propagated-inputs
9987 `(("python-pyyaml" ,python-pyyaml)))
9988 (home-page "https://github.com/mk-fg/pretty-yaml")
9989 (synopsis "YAML pretty-print library for Python")
9990 (description
9991 "pyaml is a PyYAML based python module to produce pretty and readable
9992YAML-serialized data.")
492e3a7a 9993 (license license:wtfpl2)))
44d10b1f
RW
9994
9995(define-public python2-pyaml
9996 (package-with-python2 python-pyaml))
9997
9998(define-public python-backpack
9999 (package
10000 (name "python-backpack")
10001 (version "0.1")
10002 (source
10003 (origin
10004 (method url-fetch)
10005 (uri (pypi-uri "backpack" version))
10006 (sha256
10007 (base32
10008 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
10009 (build-system python-build-system)
10010 (native-inputs
10011 `(("python-pytest" ,python-pytest)
10012 ("python-nose" ,python-nose)))
10013 (propagated-inputs
10014 `(("python-simplejson" ,python-simplejson)))
10015 (home-page "https://github.com/sdispater/backpack")
10016 (synopsis "Utilities for working with Python collections")
10017 (description "Backpack provides some useful utilities for working with
10018collections of data.")
10019 (license license:expat)))
10020
10021(define-public python2-backpack
10022 (package-with-python2 python-backpack))
10023
10024(define-public python-prompt-toolkit
10025 (package
10026 (name "python-prompt-toolkit")
10027 (version "2.0.7")
10028 (source
10029 (origin
10030 (method url-fetch)
10031 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10032 (sha256
10033 (base32
10034 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
10035 (build-system python-build-system)
10036 (arguments
10037 `(#:phases
10038 (modify-phases %standard-phases
10039 (delete 'check)
10040 (add-after 'install 'post-install-check
10041 (lambda* (#:key inputs outputs #:allow-other-keys)
10042 ;; HOME is needed for the test
10043 ;; "test_pathcompleter_can_expanduser".
10044 (setenv "HOME" "/tmp")
10045 (add-installed-pythonpath inputs outputs)
10046 (invoke "py.test"))))))
10047 (propagated-inputs
10048 `(("python-wcwidth" ,python-wcwidth)
10049 ("python-six" ,python-six)
10050 ("python-pygments" ,python-pygments)))
10051 (native-inputs
10052 `(("python-pytest" ,python-pytest)))
10053 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10054 (synopsis "Library for building command line interfaces in Python")
10055 (description
10056 "Prompt-Toolkit is a library for building interactive command line
10057interfaces in Python. It's like GNU Readline but it also features syntax
10058highlighting while typing, out-of-the-box multi-line input editing, advanced
10059code completion, incremental search, support for Chinese double-width
10060characters, mouse support, and auto suggestions.")
10061 (license license:bsd-3)))
10062
10063(define-public python2-prompt-toolkit
10064 (package-with-python2 python-prompt-toolkit))
10065
10066(define-public python-prompt-toolkit-1
10067 (package (inherit python-prompt-toolkit)
10068 (version "1.0.15")
10069 (source
10070 (origin
10071 (method url-fetch)
10072 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10073 (sha256
10074 (base32
10075 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
10076
10077(define-public python2-prompt-toolkit-1
10078 (package-with-python2 python-prompt-toolkit-1))
10079
10080(define-public python-jedi
10081 (package
10082 (name "python-jedi")
b8e5de56 10083 (version "0.13.3")
44d10b1f
RW
10084 (source
10085 (origin
10086 (method url-fetch)
10087 (uri (pypi-uri "jedi" version))
10088 (sha256
10089 (base32
b8e5de56 10090 "0nsrjlb57njqppxmi8wjsb1dkad7qa7svx67jbkhixq66lz61c1b"))))
44d10b1f
RW
10091 (build-system python-build-system)
10092 (arguments
b8e5de56 10093 `( ;; Many tests are failing with Python 3.7.x as of version 0.13.3 (see:
44d10b1f
RW
10094 ;; https://github.com/davidhalter/jedi/issues/1263)
10095 #:tests? #f
10096 #:phases
10097 (modify-phases %standard-phases
10098 (replace 'check
10099 (lambda* (#:key tests? #:allow-other-keys)
10100 (when tests?
10101 (invoke "py.test" "-vv")))))))
10102 (native-inputs
10103 `(("python-pytest" ,python-pytest)
10104 ("python-docopt" ,python-docopt)))
10105 (propagated-inputs
10106 `(("python-parso" ,python-parso)))
10107 (home-page "https://github.com/davidhalter/jedi")
10108 (synopsis "Autocompletion and static analysis library for Python")
10109 (description
10110 "Jedi is a static analysis tool for Python that can be used in Integrated
10111Development Environments (@dfn{IDE}s) and text editors. It understands Python
10112on a deeper level than many other static analysis frameworks for Python.
10113
10114Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
10115well.")
10116 (license license:expat)))
10117
10118(define-public python2-jedi
b8e5de56
MC
10119 (let ((base (package-with-python2 (strip-python2-variant python-jedi))))
10120 (package
10121 (inherit base)
10122 (arguments (substitute-keyword-arguments (package-arguments base)
10123 ((#:tests? _) #t))))))
44d10b1f
RW
10124
10125(define-public ptpython
10126 (package
10127 (name "ptpython")
10128 (version "0.34")
10129 (source (origin
10130 (method url-fetch)
10131 (uri (pypi-uri "ptpython" version))
10132 (sha256
10133 (base32
10134 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10135 (build-system python-build-system)
10136 (arguments
10137 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
10138 (propagated-inputs
10139 `(("python-docopt" ,python-docopt)
10140 ("python-jedi" ,python-jedi)
10141 ("python-prompt-toolkit" ,python-prompt-toolkit)
10142 ("python-pygments" ,python-pygments)))
10143 (home-page "https://github.com/jonathanslenders/ptpython")
10144 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10145 (description
10146 "ptpython is a Python read-eval-print loop with IDE-like features.
10147It supports syntax highlighting, multiline editing, autocompletion, mouse,
10148color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10149etc.")
10150 (license license:bsd-3)
10151 (properties `((python2-variant . ,(delay ptpython-2))))))
10152
10153(define-public ptpython-2
10154 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10155 (package
10156 (inherit base)
10157 (name "ptpython2"))))
10158
10159(define-public python-stem
10160 (package
10161 (name "python-stem")
10162 (version "1.7.0")
10163 (source
10164 (origin
10165 (method url-fetch)
10166 (uri (pypi-uri "stem" version))
10167 (sha256
10168 (base32
10169 "1awiglfiajnx2hva9aqpj3fmdvdb4qg7cwnlfyih827m68y3cq8v"))))
10170 (build-system python-build-system)
10171 (arguments
10172 `(#:phases
10173 (modify-phases %standard-phases
10174 (replace 'check
10175 (lambda _
10176 (invoke "./run_tests.py" "--unit")
10177 #t)))))
10178 (native-inputs
10179 `(("python-mock" ,python-mock)
10180 ("python-pycodestyle" ,python-pycodestyle)
10181 ("python-pyflakes" ,python-pyflakes)))
10182 (home-page "https://stem.torproject.org/")
10183 (synopsis
10184 "Python controller library that allows applications to interact with Tor")
10185 (description
10186 "Stem is a Python controller library for Tor. With it you can use Tor's
10187control protocol to script against the Tor process and read descriptor data
10188relays publish about themselves.")
10189 (license license:lgpl3)))
10190
10191(define-public python2-stem
10192 (package-with-python2 python-stem))
10193
10194(define-public python-pyserial
10195 (package
10196 (name "python-pyserial")
10197 (version "3.1.1")
10198 (source
10199 (origin
10200 (method url-fetch)
10201 (uri (pypi-uri "pyserial" version))
10202 (sha256
10203 (base32
10204 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
10205 (build-system python-build-system)
10206 (arguments
10207 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
10208 ;; #:phases
10209 ;; (modify-phases %standard-phases
10210 ;; (replace 'check
10211 ;; (lambda _
10212 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
10213 (home-page
10214 "https://github.com/pyserial/pyserial")
10215 (synopsis "Python Serial Port Bindings")
10216 (description "@code{pyserial} provide serial port bindings for Python. It
10217supports different byte sizes, stop bits, parity and flow control with RTS/CTS
10218and/or Xon/Xoff. The port is accessed in RAW mode.")
10219 (license license:bsd-3)))
10220
10221(define-public python2-pyserial
10222 (package-with-python2 python-pyserial))
10223
10224(define-public python-kivy
10225 (package
10226 (name "python-kivy")
10227 (version "1.10.1")
10228 (source
10229 (origin
10230 (method url-fetch)
10231 (uri (pypi-uri "Kivy" version))
10232 (file-name (string-append name "-" version ".tar.gz"))
10233 (sha256
10234 (base32
10235 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
10236 (build-system python-build-system)
10237 (arguments
10238 `(#:tests? #f ; Tests require many optional packages
10239 #:phases
10240 (modify-phases %standard-phases
10241 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
10242 (lambda* (#:key inputs #:allow-other-keys)
10243 (setenv "KIVY_SDL2_PATH"
10244 (string-append (assoc-ref inputs "sdl-union")
10245 "/include/SDL2"))
10246 #t)))))
10247 (native-inputs
10248 `(("git" ,git)
10249 ("pkg-config" ,pkg-config)
10250 ("python-cython" ,python-cython)))
10251 (inputs
10252 `(("gstreamer" ,gstreamer)
10253 ("mesa" ,mesa)
10254 ("sdl-union"
10255 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
10256 (home-page "http://kivy.org")
10257 (synopsis
10258 "Multitouch application framework")
10259 (description
10260 "A software library for rapid development of
10261hardware-accelerated multitouch applications.")
10262 (license license:expat)))
10263
10264(define-public python2-kivy
10265 (package-with-python2 python-kivy))
10266
10267(define-public python-kivy-next
10268 (deprecated-package "python-kivy-next" python-kivy))
10269
10270(define-public python2-kivy-next
10271 (deprecated-package "python2-kivy-next" python2-kivy))
10272
10273(define-public python-binaryornot
10274 (package
10275 (name "python-binaryornot")
10276 (version "0.4.4")
10277 (source (origin
10278 (method url-fetch)
10279 (uri (pypi-uri "binaryornot" version))
10280 (sha256
10281 (base32
10282 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
10283 (build-system python-build-system)
10284 (propagated-inputs
10285 `(("python-chardet" ,python-chardet)
10286 ("python-hypothesis" ,python-hypothesis)))
10287 (home-page "https://github.com/audreyr/binaryornot")
10288 (synopsis "Package to check if a file is binary or text")
10289 (description "Ultra-lightweight pure Python package to check if a file is
10290binary or text.")
10291 (license license:bsd-3)
10292 (properties `((python2-variant . ,(delay python2-binaryornot))))))
10293
10294(define-public python2-binaryornot
10295 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
10296 (package (inherit base)
10297 (propagated-inputs
10298 `(("python2-enum34" ,python2-enum34)
10299 ,@(package-propagated-inputs base))))))
10300
10301(define-public python-nltk
10302 (package
10303 (name "python-nltk")
10304 (version "3.2.1")
10305 (source (origin
10306 (method url-fetch)
10307 (uri (pypi-uri "nltk" version))
10308 (sha256
10309 (base32
10310 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
10311 (build-system python-build-system)
10312 (arguments
10313 '(;; The tests require some extra resources to be downloaded.
10314 ;; TODO Try packaging these resources.
10315 #:tests? #f))
10316 (home-page "http://nltk.org/")
10317 (synopsis "Natural Language Toolkit")
10318 (description "It provides interfaces to over 50 corpora and lexical
10319resources such as WordNet, along with a suite of text processing libraries
10320for classification, tokenization, stemming, tagging, parsing, and semantic
10321reasoning, wrappers for natural language processing libraries.")
10322 (license license:asl2.0)))
10323
10324(define-public python2-nltk
10325 (package-with-python2 python-nltk))
10326
10327(define-public python-pymongo
10328 (package
10329 (name "python-pymongo")
10330 (version "3.7.2")
10331 (source (origin
10332 (method url-fetch)
10333 (uri (pypi-uri "pymongo" version))
10334 (sha256
10335 (base32
10336 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
10337 (build-system python-build-system)
10338 (propagated-inputs
10339 `(("python-certifi" ,python-certifi)))
10340 (home-page "https://github.com/mongodb/mongo-python-driver")
10341 (synopsis "Python driver for MongoDB")
10342 (description "Python driver for MongoDB.")
10343 (license license:asl2.0)))
10344
10345(define-public python2-pymongo
10346 (package-with-python2 python-pymongo))
10347
44d10b1f
RW
10348(define-public python-consul
10349 (package
10350 (name "python-consul")
10351 (version "0.6.1")
10352 (source
10353 (origin
10354 (method url-fetch)
10355 (uri (pypi-uri "python-consul" version))
10356 (sha256
10357 (base32
10358 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
10359 (build-system python-build-system)
10360 (arguments
10361 '(#:tests? #f)) ; The tests are not distributed
10362 (propagated-inputs
10363 `(("python-requests" ,python-requests)
10364 ("python-six" ,python-six)))
10365 (home-page "https://github.com/cablehead/python-consul")
10366 (synopsis "Python client for Consul")
10367 (description
10368 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
10369discovery, monitoring and configuration.")
10370 (license license:expat)))
10371
10372(define-public python2-consul
10373 (package-with-python2 python-consul))
10374
10375(define-public python-schematics
10376 (package
10377 (name "python-schematics")
10378 (version "1.1.1")
10379 (source
1961d187
TGR
10380 (origin
10381 (method git-fetch)
10382 (uri (git-reference
10383 (url "https://github.com/schematics/schematics.git")
10384 (commit (string-append "v" version))))
10385 (file-name (git-file-name name version))
10386 (sha256
10387 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
44d10b1f
RW
10388 (build-system python-build-system)
10389 (propagated-inputs
10390 `(("python-six" ,python-six)))
10391 (arguments
1961d187
TGR
10392 ;; The tests require a bunch of not very nice packages with fixed
10393 ;; version requirements (e.g. python-coveralls).
10394 `(#:tests? #f))
44d10b1f
RW
10395 (home-page "https://github.com/schematics/schematics")
10396 (synopsis "Python Data Structures for Humans")
10397 (description "Python Data Structures for Humans.")
10398 (license license:bsd-3)))
10399
10400(define-public python2-schematics
10401 (package-with-python2 python-schematics))
10402
10403(define-public python-odfpy
10404 (package
10405 (name "python-odfpy")
10406 (version "1.3.3")
10407 (source (origin
10408 (method url-fetch)
10409 (uri (pypi-uri "odfpy" version))
10410 (sha256
10411 (base32
10412 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
10413 (arguments
10414 `(#:modules ((srfi srfi-1)
10415 (guix build python-build-system)
10416 (guix build utils))
10417 #:phases
10418 (modify-phases %standard-phases
10419 (replace 'check
10420 ;; The test runner invokes python2 and python3 for test*.py.
10421 ;; To avoid having both in inputs, we replicate it here.
10422 (lambda _
21ccc01d
RW
10423 (for-each (lambda (test-file) (invoke "python" test-file))
10424 (find-files "tests" "^test.*\\.py$"))
10425 #t)))))
44d10b1f
RW
10426 (build-system python-build-system)
10427 (home-page "https://github.com/eea/odfpy")
10428 (synopsis "Python API and tools to manipulate OpenDocument files")
10429 (description "Collection of libraries and utility programs written in
10430Python to manipulate OpenDocument 1.2 files.")
10431 (license
10432 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
10433 ;; number of files with other licenses.
10434 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
10435
10436(define-public python2-odfpy
10437 (package-with-python2 python-odfpy))
10438
10439(define-public python-natsort
10440 (package
10441 (name "python-natsort")
10442 (version "5.4.1")
10443 (source (origin
10444 (method url-fetch)
10445 (uri (pypi-uri "natsort" version))
10446 (sha256
10447 (base32
10448 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
10449 (build-system python-build-system)
10450 (arguments
10451 `(#:modules ((guix build utils)
10452 (guix build python-build-system)
10453 (srfi srfi-1)
10454 (srfi srfi-26)
10455 (ice-9 ftw))
10456 #:phases
10457 (modify-phases %standard-phases
10458 (add-before 'check 'set-cachedir
10459 ;; Tests require write access to $HOME by default
10460 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
10461 (replace 'check
10462 (lambda _
10463 (let ((cwd (getcwd)))
10464 (setenv "PYTHONPATH"
10465 (string-append
10466 cwd "/build/"
10467 (find (cut string-prefix? "lib" <>)
10468 (scandir (string-append cwd "/build")))
10469 ":"
10470 (getenv "PYTHONPATH")))
10471 (invoke "pytest" "-v")))))))
10472 (native-inputs
10473 `(("python-hypothesis" ,python-hypothesis)
10474 ("python-pytest-cov" ,python-pytest-cov)
10475 ("python-pytest-mock" ,python-pytest-mock)
10476 ("python-pytest" ,python-pytest)))
10477 (propagated-inputs ; TODO: Add python-fastnumbers.
10478 `(("python-pyicu" ,python-pyicu)))
10479 (home-page "https://github.com/SethMMorton/natsort")
10480 (synopsis "Natural sorting for python and shell")
10481 (description
10482 "Natsort lets you apply natural sorting on lists instead of
10483lexicographical. If you use the built-in @code{sorted} method in python
36a4366d
EF
10484on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
10485@code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
10486@code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
10487identifies numbers and sorts them separately from strings. It can also sort
10488version numbers, real numbers, mixed types and more, and comes with a shell
10489command @command{natsort} that exposes this functionality in the command line.")
44d10b1f
RW
10490 (license license:expat)
10491 (properties `((python2-variant . ,(delay python2-natsort))))))
10492
10493(define-public python2-natsort
10494 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
10495 (package (inherit base)
10496 (native-inputs
10497 `(("python2-pathlib" ,python2-pathlib)
10498 ,@(package-native-inputs base))))))
10499
10500(define-public python-glances
10501 (package
10502 (name "python-glances")
10503 (version "3.0.2")
10504 (source
10505 (origin
10506 (method url-fetch)
10507 (uri (pypi-uri "Glances" version))
10508 (sha256
10509 (base32
10510 "09fxysfp1n16csqvzvawy74qm6a94nvwjf3vcf5gkqp4i6k4vjjy"))))
10511 (build-system python-build-system)
10512 (propagated-inputs
10513 `(("python-psutil" ,python-psutil)))
10514 (home-page
10515 "https://github.com/nicolargo/glances")
10516 (synopsis
10517 "A cross-platform curses-based monitoring tool")
10518 (description
10519 "Glances is a curses-based monitoring tool for a wide variety of platforms.
10520Glances uses the PsUtil library to get information from your system. It monitors
10521CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
10522 (license license:lgpl3+)))
10523
10524(define-public python2-glances
10525 (package-with-python2 python-glances))
10526
10527(define-public python-graphql-core
10528 (package
10529 (name "python-graphql-core")
10530 (version "0.5.3")
10531 (source
10532 (origin
10533 (method url-fetch)
10534 (uri (pypi-uri "graphql-core" version))
10535 (sha256
10536 (base32
10537 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
10538 (build-system python-build-system)
10539 (arguments
10540 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
10541 #:phases
10542 (modify-phases %standard-phases
10543 (add-after 'unpack 'patch-hardcoded-version
10544 (lambda _ (substitute*
10545 "setup.py"
10546 (("'gevent==1.1rc1'") "'gevent'"))
10547 #t)))))
10548 (native-inputs
10549 `(("python-gevent" ,python-gevent)
10550 ("python-mock" ,python-mock)
10551 ("python-pytest-mock" ,python-pytest-mock)))
10552 (propagated-inputs
10553 `(("python-promise" ,python-promise)
10554 ("python-six" ,python-six)))
10555 (home-page "https://github.com/graphql-python/graphql-core")
10556 (synopsis "GraphQL implementation for Python")
10557 (description
10558 "GraphQL implementation for Python. GraphQL is a data query language and
10559runtime designed and used to request and deliver data to mobile and web apps.
10560This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
10561to Python.")
10562 (license license:expat)))
10563
10564(define-public python2-graphql-core
10565 (package-with-python2 python-graphql-core))
10566
10567(define-public python-graphql-relay
10568 (package
10569 (name "python-graphql-relay")
10570 (version "0.4.5")
10571 (source
10572 (origin
10573 (method url-fetch)
10574 (uri (pypi-uri "graphql-relay" version))
10575 (sha256
10576 (base32
10577 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
10578 (build-system python-build-system)
10579 (arguments
10580 '(#:tests? #f)) ; The tests are not distributed
10581 (propagated-inputs
10582 `(("python-graphql-core" ,python-graphql-core)
10583 ("python-promise" ,python-promise)
10584 ("python-six" ,python-six)))
10585 (home-page "https://github.com/graphql-python/graphql-relay-py")
10586 (synopsis "Relay implementation for Python")
10587 (description
10588 "This is a library to allow the easy creation of Relay-compliant servers
10589using the GraphQL Python reference implementation of a GraphQL server. It
10590should be noted that the code is a exact port of the original
10591@url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
10592from Facebook.")
10593 (license license:expat)))
10594
10595(define-public python2-graphql-relay
10596 (package-with-python2 python-graphql-relay))
10597
10598(define-public python-graphene
10599 (package
10600 (name "python-graphene")
10601 (version "0.10.2")
10602 (source
10603 (origin
10604 (method url-fetch)
10605 (uri (pypi-uri "graphene" version))
10606 (sha256
10607 (base32
10608 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
10609 (build-system python-build-system)
10610 (propagated-inputs
10611 `(("python-graphql-core" ,python-graphql-core)
10612 ("python-graphql-relay" ,python-graphql-relay)
10613 ("python-iso8601" ,python-iso8601)
10614 ("python-promise" ,python-promise)
10615 ("python-six" ,python-six)))
10616 (arguments
10617 `(#:tests? #f)) ; no tests/ in the PyPI tarball
10618 (home-page "http://graphene-python.org/")
10619 (synopsis "GraphQL Framework for Python")
10620 (description
10621 "Graphene is a Python library for building GraphQL schemas/types.
10622A GraphQL schema describes your data model, and provides a GraphQL server
10623with an associated set of resolve methods that know how to fetch data.")
10624 (properties `((python2-variant . ,(delay python2-graphene))))
10625 (license license:expat)))
10626
10627(define-public python2-graphene
10628 (let ((base (package-with-python2
10629 (strip-python2-variant python-graphene))))
10630 (package (inherit base)
10631 (native-inputs
10632 `(("python2-sqlalchemy" ,python2-sqlalchemy)
10633 ,@(package-native-inputs base))))))
10634
10635(define-public python-nautilus
10636 (package
10637 (name "python-nautilus")
10638 (version "0.4.9")
10639 (source
10640 (origin
10641 (method url-fetch)
10642 (uri (pypi-uri "nautilus" version))
10643 (sha256
10644 (base32
10645 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
10646 (build-system python-build-system)
10647 (arguments `(#:tests? #f)) ; fails to import test modules
10648 (propagated-inputs
10649 `(("python-bcrypt" ,python-bcrypt)
10650 ("python-click" ,python-click)
10651 ("python-consul" ,python-consul)
10652 ("python-graphene" ,python-graphene)
10653 ("python-jinja2" ,python-jinja2)
10654 ("python-peewee" ,python-peewee)
10655 ("python-pika" ,python-pika)
10656 ("python-tornado" ,python-tornado)
10657 ("python-wtforms" ,python-wtforms)))
10658 (native-inputs
10659 `(("python-nose2" ,python-nose2)))
10660 (home-page "https://github.com/AlecAivazis/nautilus")
10661 (synopsis "Library for creating microservice applications")
10662 (description
10663 "Nautilus is a framework for flux based microservices that looks to
10664provide extendible implementations of common aspects of a cloud so that you can
10665focus on building massively scalable web applications.")
10666 (license license:expat)))
10667
10668(define-public python-snowballstemmer
10669 (package
10670 (name "python-snowballstemmer")
10671 (version "1.2.1")
10672 (source (origin
10673 (method url-fetch)
10674 (uri (pypi-uri "snowballstemmer" version))
10675 (sha256
10676 (base32
10677 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
10678 (build-system python-build-system)
10679 (arguments
10680 `(;; No tests exist
10681 #:tests? #f))
10682 (home-page "https://github.com/shibukawa/snowball_py")
10683 (synopsis "Snowball stemming library collection for Python")
10684 (description "This package provides 16 word stemmer algorithms generated
10685from Snowball algorithms. It includes the 15 original ones plus the Poerter
10686English stemmer.")
10687 (license license:bsd-3)))
10688
10689(define-public python2-snowballstemmer
10690 (package-with-python2 python-snowballstemmer))
10691
44d10b1f
RW
10692(define-public python-setproctitle
10693(package
10694 (name "python-setproctitle")
10695 (version "1.1.10")
10696 (source
10697 (origin
10698 (method url-fetch)
10699 (uri (pypi-uri "setproctitle" version))
10700 (sha256
10701 (base32
10702 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
10703 (build-system python-build-system)
10704 (arguments
10705 '(#:phases
10706 (modify-phases %standard-phases
10707 (add-before 'check 'patch-Makefile
10708 ;; Stricly this is only required for the python2 variant.
10709 ;; But adding a phase in an inherited package seems to be
10710 ;; cumbersum. So we patch even for python3.
10711 (lambda _
10712 (let ((nose (assoc-ref %build-inputs "python2-nose")))
10713 (when nose
10714 (substitute* "Makefile"
10715 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
10716 (string-append nose "/bin/nosetests "))))
10717 #t)))
10718 (replace 'check
10719 (lambda _
10720 (setenv "PYTHON" (or (which "python3") (which "python")))
10721 (setenv "PYCONFIG" (or (which "python3-config")
10722 (which "python-config")))
10723 (setenv "CC" "gcc")
10724 ;; No need to extend PYTHONPATH to find the built package, since
10725 ;; the Makefile will build anyway
10726 (invoke "make" "check"))))))
10727 (native-inputs
10728 `(("procps" ,procps))) ; required for tests
10729 (home-page
10730 "https://github.com/dvarrazzo/py-setproctitle")
10731 (synopsis
10732 "Setproctitle implementation for Python to customize the process title")
10733 (description "The library allows a process to change its title (as displayed
10734by system tools such as ps and top).
10735
10736Changing the title is mostly useful in multi-process systems, for
10737example when a master process is forked: changing the children's title
10738allows to identify the task each process is busy with. The technique
10739is used by PostgreSQL and the OpenSSH Server for example.")
10740 (license license:bsd-3)
10741 (properties `((python2-variant . ,(delay python2-setproctitle))))))
10742
10743(define-public python2-setproctitle
10744 (let ((base (package-with-python2
10745 (strip-python2-variant python-setproctitle))))
10746 (package
10747 (inherit base)
10748 (native-inputs `(("python2-nose" ,python2-nose)
10749 ,@(package-native-inputs base))))))
10750
10751(define-public python-validictory
10752 (package
10753 (name "python-validictory")
10754 (version "1.0.1")
10755 (source
10756 (origin
10757 (method url-fetch)
10758 (uri (pypi-uri "validictory" version))
10759 (sha256
10760 (base32
10761 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
10762 (build-system python-build-system)
10763 (arguments
10764 '(#:phases
10765 (modify-phases %standard-phases
10766 (add-after 'unpack 'bootstrap
10767 ;; Move the tests out of the package directory to avoid
10768 ;; packaging them.
10769 (lambda* _
10770 (rename-file "validictory/tests" "tests")
10771 (delete-file "tests/__init__.py")))
10772 (replace 'check
10773 (lambda _
10774 ;; Extend PYTHONPATH so the built package will be found.
10775 (setenv "PYTHONPATH"
10776 (string-append (getcwd) "/build/lib:"
10777 (getenv "PYTHONPATH")))
6568bd5d 10778 (invoke "py.test" "-vv" ))))))
44d10b1f
RW
10779 (native-inputs
10780 `(("python-pytest" ,python-pytest)))
10781 (home-page
10782 "https://github.com/jamesturk/validictory")
10783 (synopsis "General purpose Python data validator")
10784 (description "It allows validation of arbitrary Python data structures.
10785
10786The schema format is based on the JSON Schema
10787proposal (http://json-schema.org), so combined with json the library is also
10788useful as a validator for JSON data.")
10789 (license license:expat)))
10790
10791(define-public python2-validictory
10792 (package-with-python2 python-validictory))
10793
10794(define-public python-pyelftools
10795 (package
10796 (name "python-pyelftools")
10797 (version "0.25")
10798 (source
10799 (origin
10800 (method url-fetch)
10801 (uri (pypi-uri "pyelftools" version))
10802 (sha256
10803 (base32
10804 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
10805 (build-system python-build-system)
10806 (arguments
10807 `(#:phases
10808 (modify-phases %standard-phases
10809 (add-before 'check 'set-pythonpath
10810 (lambda _
10811 (setenv "PYTHONPATH"
10812 (string-append
10813 (getcwd) "/test/"
10814 ":" (getenv "PYTHONPATH")))
10815 #t)))))
10816 (home-page
10817 "https://github.com/eliben/pyelftools")
10818 (synopsis
10819 "Analyze binary and library file information")
10820 (description "This Python library provides interfaces for parsing and
10821analyzing two binary and library file formats; the Executable and Linking
10822Format (ELF), and debugging information in the Debugging With Attributed
10823Record Format (DWARF).")
10824 (license license:public-domain)))
10825
10826(define-public python-pyev
10827 (package
10828 (name "python-pyev")
10829 (version "0.9.0")
10830 (source
10831 (origin
10832 (method url-fetch)
10833 (uri (pypi-uri "pyev" version))
10834 (sha256
10835 (base32
10836 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
10837 (build-system python-build-system)
10838 (arguments
10839 `(#:tests? #f ; no test suite
10840 #:phases
10841 (modify-phases %standard-phases
10842 (add-after 'unpack 'patch
10843 (lambda* (#:key inputs #:allow-other-keys)
10844 (let ((libev (string-append (assoc-ref inputs "libev")
10845 "/lib/libev.so.4")))
10846 (substitute* "setup.py"
10847 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
10848 (string-append "libev_dll_name = \"" libev "\"")))))))))
10849 (inputs
10850 `(("libev" ,libev)))
10851 (home-page "http://pythonhosted.org/pyev/")
10852 (synopsis "Python libev interface")
10853 (description "Pyev provides a Python interface to libev.")
10854 (license license:gpl3)))
10855
10856(define-public python2-pyev
10857 (package-with-python2 python-pyev))
10858
10859(define-public python-imagesize
10860 (package
10861 (name "python-imagesize")
10862 (version "1.1.0")
10863 (source
10864 (origin
10865 (method url-fetch)
10866 (uri (pypi-uri "imagesize" version))
10867 (sha256
10868 (base32
10869 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
10870 (build-system python-build-system)
10871 (home-page "https://github.com/shibukawa/imagesize_py")
10872 (synopsis "Gets image size of files in various formats in Python")
10873 (description
10874 "This package allows determination of image size from
10875PNG, JPEG, JPEG2000 and GIF files in pure Python.")
10876 (license license:expat)))
10877
10878(define-public python2-imagesize
10879 (package-with-python2 python-imagesize))
10880
10881(define-public python-termstyle
10882 (package
10883 (name "python-termstyle")
10884 (version "0.1.11")
10885 (source
10886 (origin
10887 (method url-fetch)
10888 (uri (pypi-uri "termstyle" version))
10889 (sha256
10890 (base32
10891 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
10892 (build-system python-build-system)
10893 (arguments
10894 '(#:phases
10895 (modify-phases %standard-phases
10896 (replace 'check
10897 (lambda _
831080a6 10898 (invoke "python" "test3.py"))))))
44d10b1f
RW
10899 (home-page "https://github.com/gfxmonk/termstyle")
10900 (synopsis "Console text coloring for Python")
10901 (description "This package provides console text coloring for Python.")
10902 (license license:bsd-3)))
10903
10904(define-public python-argcomplete
10905 (package
10906 (name "python-argcomplete")
10907 (version "1.7.0")
10908 (source
10909 (origin
10910 (method url-fetch)
10911 (uri (pypi-uri "argcomplete" version))
10912 (sha256
10913 (base32
10914 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
10915 (build-system python-build-system)
10916 (native-inputs
10917 `(("python-pexpect" ,python-pexpect)
10918 ("tcsh" ,tcsh)
10919 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
10920 (home-page "https://github.com/kislyuk/argcomplete")
10921 (synopsis "Shell tab completion for Python argparse")
10922 (description "argcomplete provides extensible command line tab completion
10923of arguments and options for Python scripts using @code{argparse}. It's
10924particularly useful for programs with many options or sub-parsers that can
10925dynamically suggest completions; for example, when browsing resources over the
10926network.")
10927 (license license:asl2.0)))
10928
10929(define-public python2-argcomplete
10930 (package-with-python2 python-argcomplete))
10931
10932(define-public python-xopen
10933 (package
10934 (name "python-xopen")
24d64989 10935 (version "0.5.0")
44d10b1f
RW
10936 (source
10937 (origin
10938 (method url-fetch)
10939 (uri (pypi-uri "xopen" version))
10940 (sha256
10941 (base32
24d64989 10942 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
44d10b1f 10943 (build-system python-build-system)
24d64989
RW
10944 (propagated-inputs
10945 `(("python-setuptools-scm" ,python-setuptools-scm)))
44d10b1f
RW
10946 (home-page "https://github.com/marcelm/xopen/")
10947 (synopsis "Open compressed files transparently")
10948 (description "This module provides an @code{xopen} function that works like
10949Python's built-in @code{open} function, but can also deal with compressed files.
10950Supported compression formats are gzip, bzip2 and, xz, and are automatically
10951recognized by their file extensions. The focus is on being as efficient as
10952possible on all supported Python versions.")
10953 (license license:expat)))
10954
10955(define-public python2-xopen
10956 (let ((base (package-with-python2
10957 (strip-python2-variant python-xopen))))
10958 (package
10959 (inherit base)
10960 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
10961 ,@(package-propagated-inputs base))))))
10962
10963(define-public python-cheetah
10964 (package
10965 (name "python-cheetah")
10966 (version "3.1.0")
10967 (source
10968 (origin
10969 (method url-fetch)
10970 (uri (pypi-uri "Cheetah3" version))
10971 (sha256
10972 (base32
10973 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
10974 (build-system python-build-system)
10975 (arguments
10976 `(#:modules ((guix build utils)
10977 (guix build python-build-system)
10978 (ice-9 ftw)
10979 (srfi srfi-1)
10980 (srfi srfi-26))
10981 #:phases (modify-phases %standard-phases
10982 (add-after 'unpack 'use-absolute-python
10983 (lambda _
10984 (substitute* "Cheetah/CheetahWrapper.py"
10985 (("#!/usr/bin/env python")
10986 (string-append "#!" (which "python"))))
10987 #t))
10988 (replace 'check
10989 (lambda _
10990 (let ((cwd (getcwd)))
10991 (setenv "PYTHONPATH"
10992 (string-append
10993 cwd "/build/"
10994 (find (cut string-prefix? "lib" <>)
10995 (scandir (string-append cwd "/build")))
10996 ":" (getenv "PYTHONPATH")))
10997 (setenv "PATH"
10998 (string-append (getenv "PATH")
10999 ":" cwd "/bin"))
11000 (setenv "TMPDIR" "/tmp")
11001
11002 (substitute* "Cheetah/Tests/Test.py"
11003 (("unittest.TextTestRunner\\(\\)")
11004 "unittest.TextTestRunner(verbosity=2)"))
11005
11006 (invoke "python" "Cheetah/Tests/Test.py")))))))
11007 (propagated-inputs
11008 `(("python-markdown" ,python-markdown))) ;optional
11009 (home-page "http://cheetahtemplate.org/")
11010 (synopsis "Template engine")
11011 (description "Cheetah is a text-based template engine and Python code
11012generator.
11013
11014Cheetah can be used as a standalone templating utility or referenced as
11015a library from other Python applications. It has many potential uses,
11016but web developers looking for a viable alternative to ASP, JSP, PHP and
11017PSP are expected to be its principle user group.
11018
11019Features:
11020@enumerate
11021@item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
11022 text-based format.
11023@item Cleanly separates content, graphic design, and program code.
11024@item Blends the power and flexibility of Python with a simple template language
11025 that non-programmers can understand.
11026@item Gives template writers full access to any Python data structure, module,
11027 function, object, or method in their templates.
11028@item Makes code reuse easy by providing an object-orientated interface to
11029 templates that is accessible from Python code or other Cheetah templates.
11030 One template can subclass another and selectively reimplement sections of it.
11031@item Provides a simple, yet powerful, caching mechanism that can dramatically
11032 improve the performance of a dynamic website.
11033@item Compiles templates into optimized, yet readable, Python code.
11034@end enumerate")
11035 (license (license:x11-style "file://LICENSE"))))
11036
11037(define-public python2-cheetah
11038 (package-with-python2 python-cheetah))
11039
11040(define-public python-dulwich
11041 (package
11042 (name "python-dulwich")
11043 (version "0.18.6")
11044 (source
11045 (origin
11046 (method url-fetch)
11047 (uri (list (string-append "https://www.dulwich.io/releases/"
11048 "dulwich-" version ".tar.gz")
11049 (pypi-uri "dulwich" version)))
11050 (sha256
11051 (base32
11052 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
11053 (build-system python-build-system)
11054 (arguments
11055 `(#:phases
11056 (modify-phases %standard-phases
11057 (add-before 'check 'fix-tests
11058 (lambda* (#:key inputs #:allow-other-keys)
11059 ;; The tests use Popen with a custom environment which doesn't
11060 ;; include PATH.
11061 (substitute* "dulwich/tests/compat/utils.py"
11062 (("'git'") (string-append "'"
11063 (which "git")
11064 "'")))
11065 (substitute* '("dulwich/tests/test_repository.py"
11066 "dulwich/tests/test_hooks.py")
11067 (("#!/bin/sh") (string-append "#!" (which "sh"))))
11068 (setenv "TEST_RUNNER" "unittest")
11069 (setenv "PYTHONHASHSEED" "random")
11070 #t)))))
11071 (propagated-inputs
11072 `(("python-fastimport" ,python-fastimport)))
11073 (native-inputs
11074 `(("python-mock" ,python-mock)
11075 ("python-geventhttpclient" ,python-geventhttpclient)
11076 ("git" ,git)))
11077 (home-page "https://www.dulwich.io/")
11078 (synopsis "Git implementation in Python")
11079 (description "Dulwich is an implementation of the Git file formats and
11080protocols written in pure Python.")
11081 ;; Can be used with either license.
11082 (license (list license:asl2.0 license:gpl2+))))
11083
11084(define-public python2-dulwich
11085 (package-with-python2 python-dulwich))
11086
11087(define-public python-pbkdf2
11088 (package
11089 (name "python-pbkdf2")
11090 (version "1.3")
11091 (source
11092 (origin
11093 (method url-fetch)
11094 (uri (pypi-uri "pbkdf2" version))
11095 (sha256
11096 (base32
11097 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
11098 (build-system python-build-system)
11099 (arguments
11100 '(#:phases
11101 (modify-phases %standard-phases
11102 (replace 'check
11103 (lambda _
11104 (setenv "PYTHONPATH"
11105 (string-append (getcwd) "/build/lib:"
11106 (getenv "PYTHONPATH")))
ee2bb944 11107 (invoke "python" "test/test_pbkdf2.py"))))))
44d10b1f
RW
11108 (propagated-inputs
11109 `(("python-pycrypto" ,python-pycrypto))) ; optional
11110 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
11111 (synopsis "Password-based key derivation")
11112 (description "This module implements the password-based key derivation
11113function, PBKDF2, specified in RSA PKCS#5 v2.0.
11114
11115PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
11116is part of the RSA Public Key Cryptography Standards series. The provided
11117implementation takes a password or a passphrase and a salt value (and
11118optionally a iteration count, a digest module, and a MAC module) and provides
11119a file-like object from which an arbitrarly-sized key can be read.")
11120 (license license:expat)))
11121
11122(define-public python2-pbkdf2
11123 (package-with-python2 python-pbkdf2))
11124
11125(define-public python-qrcode
11126 (package
11127 (name "python-qrcode")
217ea1a1 11128 (version "6.1")
44d10b1f
RW
11129 (source
11130 (origin
11131 (method url-fetch)
11132 (uri (pypi-uri "qrcode" version))
11133 (sha256
217ea1a1 11134 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
44d10b1f
RW
11135 (build-system python-build-system)
11136 (arguments
11137 ;; FIXME: Tests require packaging 'pymaging'.
11138 '(#:tests? #f))
11139 (propagated-inputs
11140 `(("python-lxml" ,python-lxml) ; for SVG output
11141 ("python-pillow" ,python-pillow) ; for PNG output
11142 ("python-six" ,python-six)))
44d10b1f
RW
11143 (home-page "https://github.com/lincolnloop/python-qrcode")
11144 (synopsis "QR Code image generator")
11145 (description "This package provides a pure Python QR Code generator
11146module. It uses the Python Imaging Library (PIL) to allow for the generation
11147of QR Codes.
11148
11149In addition this package provides a command line tool to generate QR codes and
11150either write these QR codes to a file or do the output as ascii art at the
11151console.")
11152 (license license:bsd-3)))
11153
11154(define-public python2-qrcode
11155 (package-with-python2 python-qrcode))
11156
11157(define-public python-rst2ansi
11158 (package
11159 (name "python-rst2ansi")
11160 (version "0.1.5")
11161 (source
11162 (origin
11163 (method url-fetch)
11164 (uri (pypi-uri "rst2ansi" version))
11165 (sha256
11166 (base32
11167 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
11168 (build-system python-build-system)
11169 (propagated-inputs
11170 `(("python-docutils" ,python-docutils)))
11171 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
11172 (synopsis "Convert RST to ANSI-decorated console output")
11173 (description
11174 "Python module dedicated to rendering RST (reStructuredText) documents
11175to ansi-escaped strings suitable for display in a terminal.")
11176 (license license:expat)))
11177
11178(define-public python-ansi2html
11179 (package
11180 (name "python-ansi2html")
11181 (version "1.2.0")
11182 (source
11183 (origin
11184 (method url-fetch)
11185 (uri (pypi-uri "ansi2html" version))
11186 (sha256
11187 (base32
11188 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
11189 (build-system python-build-system)
11190 (native-inputs
11191 `(("python-mock" ,python-mock)
11192 ("python-nose" ,python-nose)))
11193 (propagated-inputs
11194 `(("python-six" ,python-six)))
11195 (home-page "https://github.com/ralphbean/ansi2html")
11196 (synopsis "Convert ANSI-decorated console output to HTML")
11197 (description
11198 "@command{ansi2html} is a Python library and command line utility for
11199convering text with ANSI color codes to HTML or LaTeX.")
11200 (license license:gpl3+)))
11201
11202(define-public python2-ansi2html
11203 (package-with-python2 python-ansi2html))
11204
11205(define-public python-ddt
11206 (package
11207 (name "python-ddt")
11208 (version "1.1.3")
11209 (source
11210 (origin
11211 (method url-fetch)
11212 (uri (pypi-uri "ddt" version))
11213 (sha256
11214 (base32
11215 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
11216 (build-system python-build-system)
11217 (native-inputs
11218 `(("python-mock" ,python-mock)
11219 ("python-nose" ,python-nose)))
11220 (propagated-inputs
11221 `(("python-six" ,python-six)
11222 ("python-pyyaml" ,python-pyyaml)))
11223 (home-page "https://github.com/txels/ddt")
11224 (synopsis "Data-Driven Tests")
11225 (description
11226 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
11227running it with different test data, and make it appear as multiple test
11228cases.")
11229 (license license:expat)))
11230
11231(define-public python2-ddt
11232 (package-with-python2 python-ddt))
11233
11234(define-public python-pycountry
11235 (package
11236 (name "python-pycountry")
11237 (version "18.5.26")
11238 (source
11239 (origin
11240 (method url-fetch)
11241 (uri (pypi-uri "pycountry" version))
11242 (sha256
11243 (base32
11244 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
11245 (build-system python-build-system)
11246 (home-page "https://bitbucket.org/flyingcircus/pycountry")
11247 (synopsis "ISO databases for languages, countries, currencies, etc.")
11248 (description
11249 "@code{pycountry} provides the ISO databases for the standards:
11250@enumerate
11251@item 639-3 (Languages)
11252@item 3166 (Countries)
11253@item 3166-3 (Deleted Countries)
11254@item 3166-2 (Subdivisions of countries)
11255@item 4217 (Currencies)
11256@item 15924 (Scripts)
11257@end enumerate
11258It includes a copy from Debian’s pkg-isocodes and makes the data accessible
11259through a Python API.")
11260 (license license:lgpl2.1+)))
11261
11262(define-public python2-pycountry
11263 (package-with-python2 python-pycountry))
11264
11265(define-public python-pycosat
11266 (package
11267 (name "python-pycosat")
11268 (version "0.6.1")
11269 (source
11270 (origin
11271 (method url-fetch)
11272 (uri (pypi-uri "pycosat" version))
11273 (sha256
11274 (base32
11275 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
11276 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
11277 (build-system python-build-system)
11278 (home-page "https://github.com/ContinuumIO/pycosat")
11279 (synopsis "Bindings to picosat (a SAT solver)")
11280 (description
11281 "This package provides efficient Python bindings to @code{picosat} on
11282the C level. When importing pycosat, the @code{picosat} solver becomes part
11283of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
11284Problem} (SAT) solver.")
11285 (license license:expat)))
11286
11287(define-public python2-pycosat
11288 (package-with-python2 python-pycosat))
11289
11290(define-public python2-ruamel.ordereddict
11291 (package
11292 (name "python2-ruamel.ordereddict")
11293 (version "0.4.9")
11294 (source
11295 (origin
11296 (method url-fetch)
11297 (uri (pypi-uri "ruamel.ordereddict" version))
11298 (sha256
11299 (base32
11300 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
11301 (build-system python-build-system)
11302 (arguments
11303 `(#:python ,python-2
11304 #:phases
11305 (modify-phases %standard-phases
11306 (delete 'check)
11307 (add-after 'install 'check
11308 (lambda* (#:key inputs outputs #:allow-other-keys)
11309 (add-installed-pythonpath inputs outputs)
f987ac30 11310 (invoke "python" "test/testordereddict.py"))))))
44d10b1f
RW
11311 (home-page "https://bitbucket.org/ruamel/ordereddict")
11312 (synopsis "Version of dict that keeps keys in insertion order")
11313 (description
11314 "This is an implementation of an ordered dictionary with @dfn{Key
11315Insertion Order} (KIO: updates of values do not affect the position of the
11316key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
11317removed and put at the back). The standard library module @code{OrderedDict},
11318implemented later, implements a subset of @code{ordereddict} functionality.
11319Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
11320Order} (KSO, no sorting function can be specified, but a transform can be
11321specified to apply on the key before comparison (e.g. @code{string.lower})).")
11322 (license license:expat)))
11323
11324(define-public python-pypeg2
11325 (package
11326 (name "python-pypeg2")
11327 (version "2.15.2")
11328 (source
11329 (origin
11330 (method url-fetch)
11331 (uri (pypi-uri "pyPEG2" version))
11332 (sha256
11333 (base32
11334 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
11335 (build-system python-build-system)
11336 (propagated-inputs `(("python-lxml" ,python-lxml)))
11337 (arguments
11338 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
11339 '(#:tests? #f))
11340 (home-page "https://fdik.org/pyPEG/")
11341 (synopsis "Parsering Expression Grammars in Python")
11342 (description "PyPEG is an intrinsic parser interpreter framework for
11343Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
11344parse many formal languages.")
11345 (license license:gpl2)))
11346
11347(define-public python-incremental
11348 (package
11349 (name "python-incremental")
11350 (version "17.5.0")
11351 (source
11352 (origin
11353 (method url-fetch)
11354 (uri (pypi-uri "incremental" version))
11355 (sha256
11356 (base32
11357 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
11358 (build-system python-build-system)
11359 (home-page "https://github.com/hawkowl/incremental")
11360 (synopsis "Library for versioning Python projects")
11361 (description "Incremental is a small library that versions your Python
11362projects.")
11363 (license license:expat)))
11364
11365(define-public python2-incremental
11366 (package-with-python2 python-incremental))
11367
11368(define-public python-invoke
11369 (package
11370 (name "python-invoke")
11371 (home-page "http://www.pyinvoke.org/")
11372 (version "1.1.0")
11373 (source (origin
11374 (method url-fetch)
11375 (uri (pypi-uri "invoke" version))
11376 (sha256
11377 (base32
11378 "0aiy1xvk1f91246zxd1zqrm679vdvd10h843a2na41cqr3cflpi6"))))
11379 (build-system python-build-system)
11380 (arguments
11381 ;; XXX: Requires many dependencies that are not yet in Guix.
11382 `(#:tests? #f))
11383 (synopsis "Pythonic task execution")
11384 (description
11385 "Invoke is a Python task execution tool and library, drawing inspiration
11386from various sources to arrive at a powerful and clean feature set. It is
11387evolved from the Fabric project, but focuses on local and abstract concerns
11388instead of servers and network commands.")
11389 (license license:bsd-3)))
11390
11391(define-public python2-invoke
11392 (package-with-python2 python-invoke))
11393
11394(define-public python-automat
11395 (package
11396 (name "python-automat")
919d80a0 11397 (version "0.7.0")
44d10b1f
RW
11398 (source (origin
11399 (method url-fetch)
11400 (uri (pypi-uri "Automat" version))
11401 (sha256
11402 (base32
919d80a0 11403 "03ivg70n3b1cbcd2zvjhk8y4kmqxcvhmili39lmgx09dza1qpmyb"))))
44d10b1f
RW
11404 (build-system python-build-system)
11405 ;; We disable the tests because they require python-twisted, while
11406 ;; python-twisted depends on python-automat. Twisted is optional, but the
11407 ;; tests fail if it is not available. Also see
11408 ;; <https://github.com/glyph/automat/issues/71>.
11409 (arguments '(#:tests? #f))
11410 (native-inputs
11411 `(("python-m2r" ,python-m2r)
11412 ("python-setuptools-scm" ,python-setuptools-scm)
11413 ("python-graphviz" ,python-graphviz)))
11414 (propagated-inputs
11415 `(("python-six" ,python-six)
11416 ("python-attrs" ,python-attrs)))
11417 (home-page "https://github.com/glyph/Automat")
11418 (synopsis "Self-service finite-state machines")
11419 (description "Automat is a library for concise, idiomatic Python
11420expression of finite-state automata (particularly deterministic finite-state
11421transducers).")
11422 (license license:expat)))
11423
11424(define-public python2-automat
11425 (package-with-python2 python-automat))
11426
11427(define-public python-m2r
11428 (package
11429 (name "python-m2r")
bcfb8fac 11430 (version "0.2.1")
44d10b1f
RW
11431 (source (origin
11432 (method url-fetch)
11433 (uri (pypi-uri "m2r" version))
11434 (sha256
11435 (base32
bcfb8fac 11436 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
44d10b1f
RW
11437 (build-system python-build-system)
11438 (propagated-inputs
11439 `(("python-docutils" ,python-docutils)
11440 ("python-mistune" ,python-mistune)))
11441 (native-inputs
11442 `(("python-pygments" ,python-pygments)
11443 ("python-mock" ,python-mock)))
11444 (home-page "https://github.com/miyakogi/m2r")
11445 (synopsis "Markdown to reStructuredText converter")
11446 (description "M2R converts a markdown file including reST markups to valid
11447reST format.")
11448 (license license:expat)))
11449
11450(define-public python2-m2r
11451 (package-with-python2 python-m2r))
11452
11453(define-public python-constantly
11454 (package
11455 (name "python-constantly")
11456 (version "15.1.0")
11457 (source (origin
11458 (method url-fetch)
11459 (uri (pypi-uri "constantly" version))
11460 (sha256
11461 (base32
11462 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
11463 (build-system python-build-system)
11464 (home-page "https://github.com/twisted/constantly")
11465 (synopsis "Symbolic constants in Python")
11466 (description "Constantly is a Python library that provides symbolic
11467constant support. It includes collections and constants with text, numeric,
11468and bit flag values.")
11469 (license license:expat)))
11470
11471(define-public python2-constantly
11472 (package-with-python2 python-constantly))
11473
11474(define-public python-attrs
11475 (package
11476 (name "python-attrs")
11477 (version "18.2.0")
11478 (source (origin
11479 (method url-fetch)
11480 (uri (pypi-uri "attrs" version))
11481 (sha256
11482 (base32
11483 "0s9ydh058wmmf5v391pym877x4ahxg45dw6a0w4c7s5wgpigdjqh"))))
11484 (build-system python-build-system)
11485 (arguments
11486 `(#:modules ((guix build utils)
11487 (guix build python-build-system)
11488 (ice-9 ftw)
11489 (srfi srfi-1)
11490 (srfi srfi-26))
11491 #:phases (modify-phases %standard-phases
11492 (replace 'check
11493 (lambda _
11494 (let ((cwd (getcwd)))
11495 (setenv "PYTHONPATH"
11496 (string-append
11497 cwd "/build/"
11498 (find (cut string-prefix? "lib" <>)
11499 (scandir (string-append cwd "/build")))
11500 ":"
11501 (getenv "PYTHONPATH")))
11502 (invoke "python" "-m" "pytest")))))))
11503 (native-inputs
11504 `(("python-coverage" ,python-coverage)
11505 ("python-hypothesis" ,python-hypothesis)
11506 ("python-pympler" ,python-pympler)
11507 ("python-pytest" ,python-pytest)
11508 ("python-six" ,python-six)
11509 ("python-sphinx" ,python-sphinx)
11510 ("python-zope-interface" ,python-zope-interface)))
11511 (home-page "https://github.com/python-attrs/attrs/")
11512 (synopsis "Attributes without boilerplate")
11513 (description "@code{attrs} is a Python package with class decorators that
11514ease the chores of implementing the most common attribute-related object
11515protocols.")
11516 (license license:expat)))
11517
11518(define-public python2-attrs
11519 (package-with-python2 python-attrs))
11520
11521(define-public python-attrs-bootstrap
11522 (package
11523 (inherit python-attrs)
11524 (name "python-attrs-bootstrap")
11525 ;; Keep this on a fixed version so python-attrs can be updated without
11526 ;; triggering a mass-rebuild. FIXME: Update this in the next rebuild cycle.
11527 (version "17.4.0")
11528 (source (origin
11529 (method url-fetch)
11530 (uri (pypi-uri "attrs" version))
11531 (sha256
11532 (base32
11533 "1jafnn1kzd6qhxgprhx6y6ik1r5m2rilx25syzcmq03azp660y8w"))))
11534 (native-inputs `())
11535 (arguments `(#:tests? #f))))
11536
11537(define-public python2-attrs-bootstrap
11538 (package-with-python2 python-attrs-bootstrap))
11539
11540(define-public python2-cliapp
11541 (package
11542 (name "python2-cliapp")
9064b84e 11543 (version "1.20180812.1")
44d10b1f
RW
11544 (source
11545 (origin
11546 (method url-fetch)
11547 (uri (string-append
11548 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
11549 version ".tar.gz"))
11550 (sha256
11551 (base32
9064b84e 11552 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
44d10b1f
RW
11553 (build-system python-build-system)
11554 (arguments
11555 `(#:python ,python-2
11556 #:phases
11557 (modify-phases %standard-phases
11558 ;; check phase needs to be run before the build phase. If not,
11559 ;; coverage-test-runner looks for tests for the built source files,
11560 ;; and fails.
11561 (delete 'check)
11562 (add-before 'build 'check
11563 (lambda _
11564 ;; Disable python3 tests
11565 (substitute* "check"
11566 (("python3") "# python3"))
6c826d32 11567 (invoke "./check"))))))
44d10b1f
RW
11568 (native-inputs
11569 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
11570 ("python2-pep8" ,python2-pep8)))
11571 (propagated-inputs
11572 `(("python2-pyaml" ,python2-pyaml)))
11573 (home-page "https://liw.fi/cliapp/")
11574 (synopsis "Python framework for command line programs")
11575 (description "@code{python2-cliapp} is a python framework for
11576command line programs. It contains the typical stuff such programs
11577need to do, such as parsing the command line for options, and
11578iterating over input files.")
11579 (license license:gpl2+)))
11580
11581(define-public python2-ttystatus
11582 (package
11583 (name "python2-ttystatus")
e516a9c2 11584 (version "0.36")
44d10b1f
RW
11585 (source
11586 (origin
11587 (method url-fetch)
11588 (uri (string-append
11589 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
11590 version ".tar.gz"))
11591 (sha256
11592 (base32
e516a9c2 11593 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
44d10b1f
RW
11594 (build-system python-build-system)
11595 (native-inputs
11596 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
11597 ("python2-pep8" ,python2-pep8)))
11598 (arguments
11599 `(#:python ,python-2
11600 #:phases
11601 (modify-phases %standard-phases
11602 ;; check phase needs to be run before the build phase. If not,
11603 ;; coverage-test-runner looks for tests for the built source files,
11604 ;; and fails.
11605 (delete 'check)
11606 (add-before 'build 'check
cbeee881 11607 (lambda _ (invoke "make" "check"))))))
44d10b1f
RW
11608 (home-page "https://liw.fi/ttystatus/")
11609 (synopsis "Python library for showing progress reporting and
11610status updates on terminals")
11611 (description "@code{python2-ttystatus} is a python library for
11612showing progress reporting and status updates on terminals, for
11613command line programs. Output is automatically adapted to the width
11614of the terminal: truncated if it does not fit, and resized if the
11615terminal size changes.")
11616 (license license:gpl3+)))
11617
11618(define-public python2-tracing
11619 (package
11620 (name "python2-tracing")
11621 (version "0.10")
11622 (source
11623 (origin
11624 (method url-fetch)
11625 (uri (string-append
11626 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
11627 version ".tar.gz"))
11628 (sha256
11629 (base32
11630 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
11631 (build-system python-build-system)
11632 (arguments
11633 `(#:python ,python-2))
11634 (home-page "https://liw.fi/tracing/")
11635 (synopsis "Python debug logging helper")
11636 (description "@code{python2-tracing} is a python library for
11637logging debug messages. It provides a way to turn debugging messages
11638on and off, based on the filename they occur in. It is much faster
11639than using @code{logging.Filter} to accomplish the same thing, which
11640matters when code is run in production mode. The actual logging still
11641happens using the @code{logging} library.")
11642 (license license:gpl3+)))
11643
11644(define-public python2-larch
11645 (package
11646 (name "python2-larch")
11647 (version "1.20151025")
11648 (source
11649 (origin
11650 (method url-fetch)
11651 (uri (string-append
11652 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
11653 version ".tar.gz"))
11654 (patches (search-patches
11655 "python2-larch-coverage-4.0a6-compatibility.patch"))
11656 (sha256
11657 (base32
11658 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
11659 (build-system python-build-system)
11660 (arguments
11661 `(#:python ,python-2
11662 #:phases
11663 (modify-phases %standard-phases
11664 ;; check phase needs to be run before the build phase. If not,
11665 ;; coverage-test-runner looks for tests for the built source files,
11666 ;; and fails.
11667 (delete 'check)
11668 (add-before 'build 'check
204ad455 11669 (lambda _ (invoke "make" "check"))))))
44d10b1f
RW
11670 (native-inputs
11671 `(("cmdtest" ,cmdtest)
11672 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
11673 (propagated-inputs
11674 `(("python2-tracing" ,python2-tracing)))
11675 (home-page "https://liw.fi/larch/")
11676 (synopsis "Python copy-on-write B-tree library")
11677 (description "@code{python2-larch} is an implementation of
11678particular kind of B-tree, based on research by Ohad Rodeh. See
11679@url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
11680on the data structure.
11681
11682The distinctive feature of this B-tree is that a node is never
11683(conceptually) modified. Instead, all updates are done by
11684copy-on-write. This makes it easy to clone a tree, and modify only the
11685clone, while other processes access the original tree.")
11686 (license license:gpl3+)))
11687
11688(define-public python-astroid
11689 (package
11690 (name "python-astroid")
11691 (version "2.1.0")
11692 (source
11693 (origin
11694 (method url-fetch)
11695 (uri (pypi-uri "astroid" version))
11696 (sha256
11697 (base32
11698 "08hz675knh4294bancdapql392fmbjyimhbyrmfkz1ka7l035c1m"))))
11699 (build-system python-build-system)
11700 (propagated-inputs
11701 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
11702 ("python-six" ,python-six)
11703 ("python-wrapt" ,python-wrapt)))
11704 (native-inputs
11705 `(("python-dateutil" ,python-dateutil)
11706 ("python-nose" ,python-nose)
11707 ("python-pytest" ,python-pytest)
11708 ("python-pytest-runner" ,python-pytest-runner)))
11709 (arguments
11710 `(#:phases
11711 (modify-phases %standard-phases
11712 (add-after 'unpack 'remove-spurious-test
11713 (lambda _
11714 ;; This can be removed after upgrading from python-3.7
11715 ;; https://github.com/PyCQA/astroid/issues/593
11716 ;; https://bugs.python.org/issue34056
11717 (delete-file "astroid/tests/unittest_modutils.py")
11718 #t))
11719 (replace 'check
11720 (lambda _
11721 (invoke "pytest" "astroid"))))))
11722 (home-page "https://github.com/PyCQA/astroid")
11723 (synopsis "Common base representation of python source code for pylint and
11724other projects")
11725 (description "@code{python-astroid} provides a common base representation
11726of python source code for projects such as pychecker, pyreverse, pylint, etc.
11727
11728It provides a compatible representation which comes from the _ast module. It
11729rebuilds the tree generated by the builtin _ast module by recursively walking
11730down the AST and building an extended ast. The new node classes have
11731additional methods and attributes for different usages. They include some
11732support for static inference and local name scopes. Furthermore, astroid
11733builds partial trees by inspecting living objects.")
11734 (license license:lgpl2.1+)
11735 (properties `((python2-variant . ,(delay python2-astroid))))))
11736
11737(define-public python2-astroid
11738 (let ((base (package-with-python2
11739 (strip-python2-variant python-astroid))))
11740 (package (inherit base)
11741 ;; Version 2.x removes python2 support.
11742 (version "1.6.5")
11743 (source
11744 (origin
11745 (method url-fetch)
11746 (uri (pypi-uri "astroid" version))
11747 (sha256
11748 (base32
11749 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
11750 (arguments
11751 (substitute-keyword-arguments (package-arguments base)
11752 ((#:phases phases)
11753 `(modify-phases ,phases
11754 (add-after 'unpack 'remove-spurious-test
11755 (lambda _
11756 ;; https://github.com/PyCQA/astroid/issues/276
11757 (delete-file "astroid/tests/unittest_brain.py")
11758 #t))
11759 (replace 'check
11760 (lambda _
11761 (invoke"python" "-m" "unittest" "discover"
11762 "-p" "unittest*.py")))))))
11763 (native-inputs `())
11764 (propagated-inputs
11765 `(("python2-backports-functools-lru-cache"
11766 ,python2-backports-functools-lru-cache)
11767 ("python2-enum34" ,python2-enum34)
11768 ("python2-singledispatch" ,python2-singledispatch)
11769 ,@(package-propagated-inputs base))))))
11770
11771(define-public python-isort
11772 (package
11773 (name "python-isort")
e2227b6a 11774 (version "4.3.4")
44d10b1f
RW
11775 (source
11776 (origin
e2227b6a
EF
11777 (method git-fetch)
11778 (uri (git-reference
11779 ;; Tests pass only from the Github sources
11780 (url "https://github.com/timothycrosley/isort")
11781 (commit version)))
11782 (file-name (git-file-name name version))
44d10b1f
RW
11783 (sha256
11784 (base32
e2227b6a 11785 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
44d10b1f
RW
11786 (build-system python-build-system)
11787 (native-inputs
11788 `(("python-mock" ,python-mock)
11789 ("python-pytest" ,python-pytest)))
11790 (home-page "https://github.com/timothycrosley/isort")
11791 (synopsis "Python utility/library to sort python imports")
11792 (description "@code{python-isort} is a python utility/library to sort
11793imports alphabetically, and automatically separated into sections. It
11794provides a command line utility, a python library and plugins for various
11795editors.")
e2227b6a
EF
11796 (license license:expat)
11797 (properties `((python2-variant . ,(delay python2-isort))))))
44d10b1f
RW
11798
11799(define-public python2-isort
e2227b6a
EF
11800 (let ((base (package-with-python2
11801 (strip-python2-variant python-isort))))
11802 (package (inherit base)
11803 (native-inputs
11804 `(("python2-futures" ,python2-futures)
11805 ,@(package-native-inputs base))))))
44d10b1f
RW
11806
11807(define-public python2-backports-functools-lru-cache
11808 (package
11809 (name "python2-backports-functools-lru-cache")
11810 (version "1.5")
11811 (source
11812 (origin
11813 (method url-fetch)
11814 ;; only the pypi tarballs contain the necessary metadata
11815 (uri (pypi-uri "backports.functools_lru_cache" version))
11816 (sha256
11817 (base32
11818 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
11819 (build-system python-build-system)
11820 (native-inputs
11821 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
11822 (arguments
11823 `(#:python ,python-2))
11824 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
11825 (synopsis "Backport of functools.lru_cache from Python 3.3")
11826 (description "@code{python2-backports-functools-lru-cache} is a backport
11827of @code{functools.lru_cache} from python 3.3.")
11828 (license license:expat)))
11829
11830(define-public python-configparser
11831 (package
11832 (name "python-configparser")
11833 (version "3.5.0")
11834 (source
11835 (origin
11836 (method url-fetch)
11837 (uri (string-append
11838 "https://bitbucket.org/ambv/configparser/get/"
11839 version ".tar.bz2"))
11840 (file-name (string-append name "-" version ".tar.gz"))
11841 (sha256
11842 (base32
11843 "0waq40as14abwzbb321hfz4vr1fi363nscy32ga14qvfygrg96wa"))))
11844 (build-system python-build-system)
809f003f 11845 (home-page "https://github.com/jaraco/configparser/")
44d10b1f
RW
11846 (synopsis "Backport of configparser from python 3.5")
11847 (description "@code{python-configparser} is a backport of
11848@code{configparser} from Python 3.5 so that it can be used directly
11849in other versions.")
11850 (license license:expat)))
11851
11852(define-public python2-configparser
11853 (package-with-python2 python-configparser))
11854
11855(define-public python-mando
11856 (package
11857 (name "python-mando")
11858 (version "0.6.4")
11859 (source (origin
11860 (method url-fetch)
11861 (uri (pypi-uri "mando" version))
11862 (sha256
11863 (base32
11864 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
11865 (build-system python-build-system)
11866 (propagated-inputs
11867 `(("python-rst2ansi" ,python-rst2ansi)
11868 ("python-six" ,python-six)))
11869 (native-inputs
11870 `(("python-pytest" ,python-pytest)))
11871 (home-page "https://mando.readthedocs.org/")
11872 (synopsis
11873 "Wrapper around argparse, allowing creation of complete CLI applications")
11874 (description
11875 "This package is a wrapper around argparse, allowing you to write complete CLI
11876applications in seconds while maintaining all the flexibility.")
11877 (license license:expat)))
11878
11879(define-public python2-mando
11880 (package-with-python2 python-mando))
11881
70daf82f
RW
11882(define-public python2-argparse
11883 (package
11884 (name "python2-argparse")
11885 (version "1.4.0")
11886 (source
11887 (origin
11888 (method url-fetch)
11889 (uri (pypi-uri "argparse" version))
11890 (sha256
11891 (base32
11892 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
11893 (build-system python-build-system)
11894 (arguments
11895 `(#:python ,python-2))
11896 (home-page "https://github.com/ThomasWaldmann/argparse/")
11897 (synopsis "Python command-line parsing library")
11898 (description
11899 "This package is mostly for people who want to have @code{argparse} on
11900older Pythons because it was not part of the standard library back then.")
11901 (license license:psfl)))
11902
44d10b1f
RW
11903(define-public python-fudge
11904 (package
11905 (name "python-fudge")
11906 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
11907 ;; package, which is currently the only use of this package.
11908 (version "0.9.6")
11909 (source
11910 (origin
11911 (method url-fetch)
11912 (uri (pypi-uri "fudge" version))
11913 (sha256
11914 (base32
11915 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
11916 (build-system python-build-system)
11917 (arguments
11918 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
11919 (home-page "https://github.com/fudge-py/fudge")
11920 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
11921 (description
11922 "Fudge is a Python module for using fake objects (mocks and stubs) to
11923test real ones.
11924
11925In readable Python code, you declare the methods available on your fake object
11926and how they should be called. Then you inject that into your application and
11927start testing. This declarative approach means you don’t have to record and
11928playback actions and you don’t have to inspect your fakes after running code.
11929If the fake object was used incorrectly then you’ll see an informative
11930exception message with a traceback that points to the culprit.")
11931 (license license:expat)))
11932
11933(define-public python2-fudge
11934 (package-with-python2 python-fudge))
11935
11936(define-public python-mwclient
11937 (package
11938 (name "python-mwclient")
11939 (version "0.8.4")
11940 (source
11941 (origin
11942 (method url-fetch)
11943 ;; The PyPI version wouldn't contain tests.
11944 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
11945 "v" version ".tar.gz"))
11946 (file-name (string-append name "-" version ".tar.gz"))
11947 (sha256
11948 (base32
11949 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
11950 (build-system python-build-system)
11951 (propagated-inputs
11952 `(("python-requests" ,python-requests)
11953 ("python-requests-oauthlib"
11954 ,python-requests-oauthlib)
11955 ("python-six" ,python-six)))
11956 (native-inputs
11957 `(("python-mock" ,python-mock)
11958 ("python-pytest" ,python-pytest)
11959 ("python-pytest-pep8" ,python-pytest-pep8)
11960 ("python-pytest-cache" ,python-pytest-cache)
11961 ("python-pytest-cov" ,python-pytest-cov)
11962 ("python-responses" ,python-responses)))
11963 (home-page "https://github.com/btongminh/mwclient")
11964 (synopsis "MediaWiki API client")
11965 (description "This package provides a MediaWiki API client.")
11966 (license license:expat)))
11967
11968(define-public python2-mwclient
11969 (package-with-python2 python-mwclient))
11970
11971(define-public python-utils
11972 (package
11973 (name "python-utils")
11974 (version "2.1.0")
11975 (source (origin
11976 (method url-fetch)
11977 (uri (pypi-uri "python-utils" version))
11978 (sha256
11979 (base32
11980 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
11981 (build-system python-build-system)
11982 (native-inputs
11983 `(("pytest-runner" ,python-pytest-runner)
11984 ("pytest" ,python-pytest)
11985 ("six" ,python-six)))
11986 (home-page "https://github.com/WoLpH/python-utils")
11987 (synopsis "Convenient utilities not included with the standard Python install")
11988 (description
11989 "Python Utils is a collection of small Python functions and classes which
11990make common patterns shorter and easier.")
11991 (license license:bsd-2)))
11992
11993(define-public python2-utils
11994 (package-with-python2 python-utils))
11995
44d10b1f
RW
11996(define-public python-diff-match-patch
11997 (package
11998 (name "python-diff-match-patch")
11999 (version "20121119")
12000 (source
12001 (origin
12002 (method url-fetch)
12003 (uri (pypi-uri "diff-match-patch" version))
12004 (sha256
12005 (base32
12006 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
12007 (build-system python-build-system)
12008 (home-page "https://code.google.com/p/google-diff-match-patch")
12009 (synopsis "Synchronize plain text")
12010 (description "Diff Match and Patch libraries offer robust algorithms to
12011perform the operations required for synchronizing plain text.")
12012 (license license:asl2.0)))
12013
12014(define-public python2-diff-match-patch
12015 (package-with-python2 python-diff-match-patch))
12016
12017(define-public python-dirsync
12018 (package
12019 (name "python-dirsync")
12020 (version "2.2.3")
12021 (source
12022 (origin
12023 (method url-fetch)
12024 (uri (pypi-uri "dirsync" version))
12025 (sha256
12026 (base32
12027 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
12028 (build-system python-build-system)
12029 (propagated-inputs
12030 `(("six" ,python-six)))
12031 (home-page "https://bitbucket.org/tkhyn/dirsync")
12032 (synopsis "Advanced directory tree synchronisation tool")
12033 (description "Advanced directory tree synchronisation tool.")
12034 (license license:expat)))
12035
12036(define-public python2-dirsync
12037 (package-with-python2 python-dirsync))
12038
12039(define-public python-levenshtein
12040 (package
12041 (name "python-levenshtein")
12042 (version "0.12.0")
12043 (source
12044 (origin
12045 (method url-fetch)
12046 (uri (pypi-uri "python-Levenshtein" version))
12047 (sha256
12048 (base32
12049 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
12050 (build-system python-build-system)
12051 (home-page "https://github.com/ztane/python-Levenshtein")
12052 (synopsis "Fast computation of Levenshtein distance and string similarity")
12053 (description
12054 "The Levenshtein Python C extension module contains functions for fast computation of
12055@enumerate
12056@item Levenshtein (edit) distance, and edit operations
12057@item string similarity
12058@item approximate median strings, and generally string averaging
12059@item string sequence and set similarity
12060@end enumerate
12061It supports both normal and Unicode strings.")
12062 (license license:gpl2+)))
12063
12064(define-public python2-levenshtein
12065 (package-with-python2 python-levenshtein))
12066
12067(define-public python-scandir
12068 (package
12069 (name "python-scandir")
12070 (version "1.9.0")
12071 (source
12072 (origin
12073 (method url-fetch)
12074 (uri (pypi-uri "scandir" version))
12075 (sha256
12076 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
12077 (build-system python-build-system)
12078 (arguments
12079 `(#:phases (modify-phases %standard-phases
12080 (replace 'check
12081 (lambda _
12082 (invoke "python" "test/run_tests.py"))))))
12083 (home-page "https://github.com/benhoyt/scandir")
12084 (synopsis "Directory iteration function")
12085 (description
12086 "Directory iteration function like os.listdir(), except that instead of
12087returning a list of bare filenames, it yields DirEntry objects that include
12088file type and stat information along with the name. Using scandir() increases
12089the speed of os.walk() by 2-20 times (depending on the platform and file
12090system) by avoiding unnecessary calls to os.stat() in most cases.
12091
12092This package is part of the Python standard library since version 3.5.")
12093 (license license:bsd-3)))
12094
12095(define-public python2-scandir
12096 (package-with-python2 python-scandir))
12097
12098(define-public python2-stemming
12099 (package
12100 (name "python2-stemming")
12101 (version "1.0.1")
12102 (source
12103 (origin
12104 (method url-fetch)
12105 (uri (pypi-uri "stemming" version))
12106 (sha256
12107 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
12108 (build-system python-build-system)
12109 (arguments
12110 `(#:python ,python-2))
12111 (home-page "https://bitbucket.org/mchaput/stemming/overview")
12112 (synopsis "Python implementations of various stemming algorithms")
12113 (description
12114 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
12115stemming algorithms for English. These implementations are straightforward and
12116efficient, unlike some Python versions of the same algorithms available on the
12117Web. This package is an extraction of the stemming code included in the Whoosh
12118search engine.")
12119 (license license:public-domain)))
12120
12121(define-public python-factory-boy
12122 (package
12123 (name "python-factory-boy")
12124 (version "2.8.1")
12125 (source
12126 (origin
12127 (method url-fetch)
12128 (uri (pypi-uri "factory_boy" version))
12129 (sha256
12130 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
12131 (build-system python-build-system)
12132 (arguments
12133 ;; Tests are not included in the tarball.
12134 `(#:tests? #f))
12135 (propagated-inputs
12136 `(("faker" ,python-faker)))
12137 (home-page "https://github.com/benhoyt/scandir")
12138 (synopsis "Versatile test fixtures replacement")
12139 (description
12140 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
12141
12142As a fixtures replacement tool, it aims to replace static, hard to maintain
12143fixtures with easy-to-use factories for complex object.
12144
12145Instead of building an exhaustive test setup with every possible combination
12146of corner cases, factory_boy allows you to use objects customized for the
12147current test, while only declaring the test-specific fields")
12148 (license license:expat)))
12149
12150(define-public python2-factory-boy
12151 (package-with-python2 python-factory-boy))
12152
12153(define-public python-translate-toolkit
12154 (package
12155 (name "python-translate-toolkit")
12156 (version "2.1.0")
12157 (source
12158 (origin
12159 (method url-fetch)
12160 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
12161 (sha256
12162 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
12163 (build-system python-build-system)
12164 (native-inputs
12165 `(("python-pytest" ,python-pytest)
12166 ("python-sphinx" ,python-sphinx)))
12167 (propagated-inputs
12168 `(("python-babel" ,python-babel)
12169 ("python-beautifulsoup4" ,python-beautifulsoup4)
12170 ("python-chardet" ,python-chardet)
12171 ("python-diff-match-patch" ,python-diff-match-patch)
12172 ("python-levenshtein" ,python-levenshtein)
12173 ("python-lxml" ,python-lxml)
12174 ("python-six" ,python-six)
12175 ("python-vobject" ,python-vobject)
12176 ("python-pyyaml" ,python-pyyaml)))
12177 (arguments
12178 ;; TODO: tests are not run, because they end with
12179 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
12180 ;; 'parse_funcs'
12181 ;; during test setup.
12182 `(#:tests? #f))
12183 (home-page "http://toolkit.translatehouse.org")
12184 (synopsis "Tools and API for translation and localization engineering")
12185 (description
12186 "Tools and API for translation and localization engineering. It contains
12187several utilities, as well as an API for building localization tools.")
12188 (license license:gpl2+)))
12189
12190(define-public python2-translate-toolkit
12191 (package-with-python2 python-translate-toolkit))
12192
12193(define-public python-packaging
12194 (package
12195 (name "python-packaging")
12196 (version "18.0")
12197 (source
12198 (origin
12199 (method url-fetch)
12200 (uri (pypi-uri "packaging" version))
12201 (sha256
12202 (base32
12203 "01wq9c53ix5rz6qg2c98gy8n4ff768rmanifm8m5jpjiaizj51h8"))))
12204 (build-system python-build-system)
12205 (arguments
12206 `(#:phases (modify-phases %standard-phases
12207 (replace 'check
12208 (lambda _ (invoke "py.test" "-vv"))))))
12209 (native-inputs
12210 `(("python-pretend" ,python-pretend)
12211 ("python-pytest" ,python-pytest)))
12212 (propagated-inputs
12213 `(("python-pyparsing" ,python-pyparsing)
12214 ("python-six" ,python-six)))
12215 (home-page "https://github.com/pypa/packaging")
12216 (synopsis "Core utilities for Python packages")
12217 (description "Packaging is a Python module for dealing with Python packages.
12218It offers an interface for working with package versions, names, and dependency
12219information.")
12220 ;; From 'LICENSE': This software is made available under the terms of
12221 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
12222 ;; Contributions to this software is made under the terms of *both* these
12223 ;; licenses.
12224 (license (list license:asl2.0 license:bsd-2))))
12225
12226(define-public python2-packaging
12227 (package-with-python2 python-packaging))
12228
12229(define-public python-relatorio
12230 (package
12231 (name "python-relatorio")
12232 (version "0.8.0")
12233 (source
12234 (origin
12235 (method url-fetch)
12236 (uri (pypi-uri "relatorio" version))
12237 (sha256
12238 (base32
12239 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
12240 (build-system python-build-system)
12241 (propagated-inputs
12242 `(("python-lxml" ,python-lxml)
12243 ("python-genshi" ,python-genshi)))
12244 (native-inputs
12245 `(("python-magic" ,python-magic)))
12246 (home-page "https://relatorio.tryton.org/")
12247 (synopsis "Templating library able to output ODT and PDF files")
12248 (description "Relatorio is a templating library which provides a way to
12249easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
12250for more filetypes can be easily added by creating plugins for them.")
12251 (license license:gpl3+)))
12252
12253(define-public python2-relatorio
12254 (package-with-python2 python-relatorio))
12255
12256(define-public python-radon
12257 (package
12258 (name "python-radon")
12259 (version "2.2.0")
12260 (source
12261 (origin
12262 (method url-fetch)
12263 (uri (pypi-uri "radon" version))
12264 (sha256
12265 (base32
12266 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
12267 (build-system python-build-system)
12268 (arguments
12269 `(#:phases (modify-phases %standard-phases
12270 (replace 'check
12271 (lambda _
12272 (invoke "python" "radon/tests/run.py"))))))
12273 (propagated-inputs
12274 `(("python-colorama" ,python-colorama)
12275 ("python-flake8-polyfill" ,python-flake8-polyfill)
12276 ("python-mando" ,python-mando)))
12277 (native-inputs
12278 `(("python-pytest" ,python-pytest)
12279 ("python-pytest-mock" ,python-pytest-mock)))
12280 (home-page "https://radon.readthedocs.org/")
12281 (synopsis "Code Metrics in Python")
12282 (description "Radon is a Python tool which computes various code metrics.
12283Supported metrics are:
12284@itemize @bullet
12285@item raw metrics: SLOC, comment lines, blank lines, &c.
12286@item Cyclomatic Complexity (i.e. McCabe’s Complexity)
12287@item Halstead metrics (all of them)
12288@item the Maintainability Index (a Visual Studio metric)
12289@end itemize")
12290 (license license:expat)))
12291
12292(define-public python2-radon
12293 (package-with-python2 python-radon))
12294
12295(define-public python-sure
12296 (package
12297 (name "python-sure")
12298 (version "1.4.11")
12299 (source
12300 (origin
12301 (method url-fetch)
12302 (uri (pypi-uri "sure" version))
12303 (sha256
12304 (base32
12305 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
12306 (build-system python-build-system)
12307 (propagated-inputs
12308 `(("python-mock" ,python-mock)
12309 ("python-six" ,python-six)))
12310 (native-inputs
12311 `(("python-nose" ,python-nose)))
12312 (home-page "https://github.com/gabrielfalcao/sure")
12313 (synopsis "Automated testing library in python for python")
12314 (description
12315 "Sure is a python library that leverages a DSL for writing assertions.
12316Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
12317 (license license:gpl3+)))
12318
12319(define-public python2-sure
12320 (package-with-python2 python-sure))
12321
12322(define-public python2-couleur
12323 ;; This package does not seem to support python3 at all, hence,
12324 ;; only the python2 variant definition is provided.
12325 (package
12326 (name "python2-couleur")
12327 (version "0.6.2")
12328 (source
12329 (origin
12330 (method url-fetch)
12331 (uri (pypi-uri "couleur" version))
12332 (sha256
12333 (base32
12334 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
12335 (build-system python-build-system)
12336 (arguments
12337 `(#:python ,python-2))
12338 (home-page "https://github.com/gabrielfalcao/couleur")
12339 (synopsis
12340 "ANSI terminal tool for python, colored shell and other handy fancy features")
12341 (description
12342 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
12343terminal such as coloured output in the shell, overwriting output, indentation, etc.")
12344 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
12345 ;; https://github.com/gabrielfalcao/couleur/issues/11
12346 (license license:lgpl3+)))
12347
12348(define-public python-misaka
12349 (package
12350 (name "python-misaka")
0dcb3412 12351 (version "2.1.1")
44d10b1f
RW
12352 (source
12353 (origin
12354 (method url-fetch)
12355 (uri (pypi-uri "misaka" version))
12356 (sha256
12357 (base32
0dcb3412 12358 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
44d10b1f
RW
12359 (build-system python-build-system)
12360 (arguments
12361 `(;; Line 37 of setup.py calls self.run_command('develop')
12362 ;; in the 'check' phase. This command seems to be trying
12363 ;; to write to
12364 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
12365 ;; for which it does not have the permission to write.
12366 #:tests? #f))
12367 (propagated-inputs
12368 `(("python-cffi" ,python-cffi)))
12369 (home-page "https://github.com/FSX/misaka")
12370 (synopsis "Python binding for Hoedown")
12371 (description
12372 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
12373library written in C. It features a fast HTML renderer and functionality to make custom
12374renderers (e.g. man pages or LaTeX).")
12375 (license license:expat)))
12376
12377(define-public python2-misaka
12378 (package-with-python2 python-misaka))
12379
12380(define-public python2-steadymark
12381 ;; This is forced into being a python2 only variant
12382 ;; due to its dependence on couleur that has no support
12383 ;; for python3
12384 (package
12385 (name "python2-steadymark")
12386 (version "0.7.3")
12387 (source
12388 (origin
12389 (method url-fetch)
12390 (uri (pypi-uri "steadymark" version))
12391 (sha256
12392 (base32
12393 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
12394 (build-system python-build-system)
12395 (native-inputs
12396 `(("python-couleur" ,python2-couleur)
12397 ("python-sure" ,python2-sure)
12398 ("python-misaka" ,python2-misaka)))
12399 (arguments
12400 `(#:python ,python-2
12401 #:phases
12402 (modify-phases %standard-phases
12403 (add-before 'build 'patch-setup-py
12404 (lambda _
12405 ;; Update requirements from dependency==version
12406 ;; to dependency>=version
12407 (substitute* "setup.py"
12408 (("==") ">="))
12409 #t)))))
12410 (home-page "https://github.com/gabrielfalcao/steadymark")
12411 (synopsis "Markdown-based test runner for python")
12412 (description
12413 "@code{Steadymark} allows documentation to be written in github-flavoured
12414markdown. The documentation may contain snippets of code surrounded by python
12415code blocks and @code{Steadymark} will find these snippets and run them, making
12416sure that there are no old malfunctional examples in the documentation examples.")
12417 (license license:expat)))
12418
12419(define-public python-jsonpointer
12420 (package
12421 (name "python-jsonpointer")
12422 (version "1.10")
12423 (source
12424 (origin
12425 (method url-fetch)
12426 (uri (pypi-uri "jsonpointer" version))
12427 (sha256
12428 (base32
12429 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
12430 (build-system python-build-system)
12431 (home-page "https://github.com/stefankoegl/python-json-pointer")
12432 (synopsis "Identify specific nodes in a JSON document")
12433 (description "@code{jsonpointer} allows you to access specific nodes
12434by path in a JSON document (see RFC 6901).")
12435 (license license:bsd-3)))
12436
12437(define-public python2-jsonpointer
12438 (package-with-python2 python-jsonpointer))
12439
12440(define-public python-jsonpatch
12441 (package
12442 (name "python-jsonpatch")
12443 (version "1.16")
12444 (source
12445 (origin
12446 (method url-fetch)
12447 ;; pypi version lacks tests.js
12448 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12449 "archive/v" version ".tar.gz"))
12450 (file-name (string-append name "-" version ".tar.gz"))
12451 (sha256
12452 (base32
12453 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
12454 (build-system python-build-system)
12455 (native-inputs
12456 `(("python-jsonpointer" ,python-jsonpointer)))
12457 (home-page "https://github.com/stefankoegl/python-json-patch")
12458 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
12459 (description "@code{jsonpatch} is a library and program that allows
12460applying JSON Patches according to RFC 6902.")
12461 (license license:bsd-3)))
12462
12463(define-public python2-jsonpatch
12464 (package-with-python2 python-jsonpatch))
12465
12466(define-public python-jsonpatch-0.4
12467 (package (inherit python-jsonpatch)
12468 (name "python-jsonpatch")
12469 (version "0.4")
12470 (source
12471 (origin
12472 (method url-fetch)
12473 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12474 "archive/v" version ".tar.gz"))
12475 (file-name (string-append name "-" version ".tar.gz"))
12476 (sha256
12477 (base32
12478 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
12479
12480(define-public python2-jsonpatch-0.4
12481 (package-with-python2 python-jsonpatch-0.4))
12482
12483(define-public python-rfc3986
12484 (package
12485 (name "python-rfc3986")
12486 (version "1.1.0")
12487 (source (origin
12488 (method url-fetch)
12489 (uri (pypi-uri "rfc3986" version))
12490 (sha256
12491 (base32
12492 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
12493 (build-system python-build-system)
12494 (arguments
12495 `(#:modules ((guix build utils)
12496 (guix build python-build-system)
12497 (ice-9 ftw)
12498 (srfi srfi-1)
12499 (srfi srfi-26))
12500 #:phases
12501 (modify-phases %standard-phases
12502 (replace 'check
12503 (lambda _
12504 (let ((cwd (getcwd)))
12505 (setenv "PYTHONPATH"
12506 (string-append cwd "/build/"
12507 (find (cut string-prefix? "lib" <>)
12508 (scandir (string-append cwd "/build")))
12509 ":"
12510 (getenv "PYTHONPATH")))
12511 (invoke "pytest" "-v")))))))
12512 (native-inputs
12513 `(("python-pytest" ,python-pytest)))
12514 (home-page "https://rfc3986.readthedocs.io/")
12515 (synopsis "Parse and validate URI references")
12516 (description
12517 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
12518validation and authority parsing. This module also supports RFC@tie{}6874
12519which adds support for zone identifiers to IPv6 addresses.")
12520 (license license:asl2.0)))
12521
12522(define-public python2-rfc3986
12523 (package-with-python2 python-rfc3986))
12524
12525(define-public python-rfc3987
12526 (package
12527 (name "python-rfc3987")
12528 (version "1.3.7")
12529 (source
12530 (origin
12531 (method url-fetch)
12532 (uri (pypi-uri "rfc3987" version))
12533 (sha256
12534 (base32
12535 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
12536 (build-system python-build-system)
12537 (home-page "https://pypi.python.org/pypi/rfc3987")
12538 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
12539 (description "@code{rfc3987} provides routines for parsing and
12540validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
12541 (license license:gpl3+)))
12542
12543(define-public python2-rfc3987
12544 (package-with-python2 python-rfc3987))
12545
12546(define-public python-validate-email
12547 (package
12548 (name "python-validate-email")
12549 (version "1.3")
12550 (source
12551 (origin
12552 (method url-fetch)
12553 (uri (pypi-uri "validate_email" version))
12554 (sha256
12555 (base32
12556 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
12557 (build-system python-build-system)
12558 (home-page "https://github.com/syrusakbary/validate_email")
12559 (synopsis "Verifies if an email address is valid and really exists")
12560 (description "@code{validate_email} can be used to verify if an email
12561address is valid and really exists.")
12562 (license license:lgpl3+)))
12563
12564(define-public python2-validate-email
12565 (package-with-python2 python-validate-email))
12566
12567(define-public python-flex
12568 (package
12569 (name "python-flex")
12570 (version "6.10.0")
12571 (source
12572 (origin
12573 (method url-fetch)
12574 (uri (pypi-uri "flex" version))
12575 (sha256
12576 (base32
12577 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
12578 (build-system python-build-system)
12579 (propagated-inputs
12580 `(("python-click" ,python-click)
12581 ("python-iso8601" ,python-iso8601)
12582 ("python-jsonpointer" ,python-jsonpointer)
12583 ("python-pyyaml" ,python-pyyaml)
12584 ("python-requests" ,python-requests)
12585 ("python-rfc3987" ,python-rfc3987)
12586 ("python-six" ,python-six)
12587 ("python-validate-email" ,python-validate-email)))
12588 (home-page "https://github.com/pipermerriam/flex")
12589 (synopsis "Validates Swagger schemata")
12590 (description "@code{flex} can be used to validate Swagger schemata.")
12591 (license license:bsd-3)))
12592
12593(define-public python2-flex
12594 (package-with-python2 python-flex))
12595
12596(define-public python-marshmallow
12597 (package
12598 (name "python-marshmallow")
12599 (version "3.0.0b14")
12600 (source
12601 (origin
12602 (method url-fetch)
12603 (uri (pypi-uri "marshmallow" version))
12604 (sha256
12605 (base32
12606 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
12607 (build-system python-build-system)
12608 (propagated-inputs
12609 `(("python-dateutil" ,python-dateutil)
12610 ("python-simplejson" ,python-simplejson)))
12611 (native-inputs
12612 `(("python-pytest" ,python-pytest)
12613 ("python-pytz" ,python-pytz)))
12614 (home-page "https://github.com/marshmallow-code/marshmallow")
12615 (synopsis "Convert complex datatypes to and from native
12616Python datatypes.")
12617 (description "@code{marshmallow} provides a library for converting
12618complex datatypes to and from native Python datatypes.")
12619 (license license:expat)))
12620
12621(define-public python2-marshmallow
12622 (package-with-python2 python-marshmallow))
12623
12624(define-public python-apispec
12625 (package
12626 (name "python-apispec")
12627 (version "0.25.3")
12628 (source
12629 (origin
12630 (method url-fetch)
12631 (uri (pypi-uri "apispec" version))
12632 (sha256
12633 (base32
12634 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
12635 (build-system python-build-system)
12636 (propagated-inputs
12637 `(("python-pyyaml" ,python-pyyaml)))
12638 (native-inputs
12639 `(("python-pytest" ,python-pytest)
12640 ("python-flask" ,python-flask)
12641 ("python-marshmallow" ,python-marshmallow)
12642 ("python-tornado" ,python-tornado)
12643 ("python-bottle" ,python-bottle)
12644 ("python-mock" ,python-mock)))
12645 (home-page "https://github.com/marshmallow-code/apispec")
12646 (synopsis "Swagger 2.0 API specification generator")
12647 (description "@code{python-apispec} is a pluggable API specification
12648generator. Currently supports the OpenAPI specification (f.k.a.
12649Swagger 2.0).")
12650 (license license:expat)))
12651
12652(define-public python2-apispec
12653 (package-with-python2 python-apispec))
12654
12655(define-public python-flasgger
12656 (package
12657 (name "python-flasgger")
12658 (version "0.6.3")
12659 (source
12660 (origin
1a04d421
TGR
12661 (method git-fetch)
12662 (uri (git-reference
12663 (url "https://github.com/rochacbruno/flasgger.git")
12664 (commit version)))
12665 (file-name (git-file-name name version))
44d10b1f 12666 (sha256
1a04d421 12667 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
44d10b1f
RW
12668 (build-system python-build-system)
12669 (arguments
12670 `(#:phases
12671 (modify-phases %standard-phases
12672 (replace 'check
12673 (lambda* (#:key inputs outputs #:allow-other-keys)
12674 (substitute* "Makefile"
12675 (("flake8 flasgger --ignore=F403")
12676 "flake8 flasgger --ignore=E731,F403"))
12677 (setenv "PYTHONPATH" (string-append (getcwd)
12678 ":"
12679 (getenv "PYTHONPATH")))
ac599a09 12680 (invoke "py.test"))))))
44d10b1f
RW
12681 (propagated-inputs
12682 `(("python-flask" ,python-flask)
12683 ("python-pyyaml" ,python-pyyaml)
12684 ("python-jsonschema" ,python-jsonschema)
12685 ("python-mistune" ,python-mistune)
12686 ("python-six" ,python-six)))
12687 (native-inputs
12688 `(("python-decorator" ,python-decorator)
12689 ("python-flake8" ,python-flake8)
12690 ("python-flask-restful" ,python-flask-restful)
12691 ("python-flex" ,python-flex)
12692 ("python-pytest" ,python-pytest)
12693 ("python-pytest-cov" ,python-pytest-cov)
12694 ("python-marshmallow" ,python-marshmallow)
12695 ("python-apispec" ,python-apispec)))
12696 (home-page "https://github.com/rochacbruno/flasgger/")
12697 (synopsis "Extract Swagger specs from your Flask project")
12698 (description "@code{python-flasgger} allows extracting Swagger specs
12699from your Flask project. It is a fork of Flask-Swagger.")
12700 (license license:expat)))
12701
12702(define-public python2-flasgger
12703 (package-with-python2 python-flasgger))
12704
12705(define-public python-swagger-spec-validator
12706 (package
12707 (name "python-swagger-spec-validator")
12708 (version "2.1.0")
12709 (source
12710 (origin
12711 (method url-fetch)
12712 (uri (pypi-uri "swagger-spec-validator" version))
12713 (sha256
12714 (base32
12715 "13hkpn2lycwr0468yqhjb3kwszqf7hjwlq61w7vdxq1caz31k4nw"))))
12716 (build-system python-build-system)
12717 (propagated-inputs
12718 `(("python-jsonschema" ,python-jsonschema)
12719 ("python-six" ,python-six)))
12720 (home-page
12721 "https://github.com/Yelp/swagger_spec_validator")
12722 (synopsis "Validation of Swagger specifications")
12723 (description "@code{swagger_spec_validator} provides a library for
12724validating Swagger API specifications.")
12725 (license license:asl2.0)))
12726
12727(define-public python2-swagger-spec-validator
12728 (package-with-python2 python-swagger-spec-validator))
12729
12730(define-public python-apache-libcloud
12731 (package
12732 (name "python-apache-libcloud")
12733 (version "2.4.0")
12734 (source
12735 (origin
12736 (method url-fetch)
12737 (uri (pypi-uri "apache-libcloud" version))
12738 (sha256
12739 (base32
12740 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
12741 (build-system python-build-system)
12742 (arguments
12743 `(#:phases
12744 (modify-phases %standard-phases
12745 (add-after 'unpack 'patch-ssh
12746 (lambda* (#:key inputs #:allow-other-keys)
12747 (substitute* "libcloud/compute/ssh.py"
12748 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
12749 "/bin/ssh" "'")))
12750 #t))
12751 (add-after 'unpack 'patch-tests
12752 (lambda _
12753 (substitute* "./libcloud/test/test_file_fixtures.py"
12754 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
12755 (("def _ascii") "def _raw_data(self, method, url, body, headers):
12756 return (httplib.OK,
12757 \"1234abcd\",
12758 {\"test\": \"value\"},
12759 httplib.responses[httplib.OK])
12760 def _ascii"))
12761 (substitute* "libcloud/test/compute/test_ssh_client.py"
12762 (("class ShellOutSSHClientTests")
12763 "@unittest.skip(\"Guix container doesn't have ssh service\")
12764class ShellOutSSHClientTests")
12765 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
12766 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
12767 (("'.xF0', '.x90', '.x8D', '.x88'")
12768 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
12769 #t))
12770 (add-before 'check 'copy-secret
12771 (lambda _
12772 (copy-file "libcloud/test/secrets.py-dist"
12773 "libcloud/test/secrets.py")
12774 #t)))))
12775 (inputs
12776 `(("openssh" ,openssh)))
12777 (propagated-inputs
12778 `(("python-paramiko" ,python-paramiko)
12779 ("python-requests" ,python-requests)))
12780 (native-inputs
12781 `(("python-lockfile" ,python-lockfile)
12782 ("python-mock" ,python-mock)
12783 ("python-pytest" ,python-pytest)
12784 ("python-pytest-runner" ,python-pytest-runner)
12785 ("python-requests-mock" ,python-requests-mock)))
12786 (home-page "https://libcloud.apache.org/")
12787 (synopsis "Unified Cloud API")
12788 (description "@code{libcloud} is a Python library for interacting with
12789many of the popular cloud service providers using a unified API.")
12790 (license license:asl2.0)))
12791
12792(define-public python2-apache-libcloud
12793 (package-with-python2 python-apache-libcloud))
12794
12795(define-public python-smmap2
12796 (package
12797 (name "python-smmap2")
12798 (version "2.0.3")
12799 (source
12800 (origin
12801 (method url-fetch)
12802 (uri (pypi-uri "smmap2" version))
12803 (sha256
12804 (base32
12805 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
12806 (build-system python-build-system)
12807 (native-inputs
12808 `(("python-nosexcover" ,python-nosexcover)))
12809 (home-page "https://github.com/Byron/smmap")
12810 (synopsis "Python sliding window memory map manager")
12811 (description "@code{smmap2} is a pure Python implementation of a sliding
12812window memory map manager.")
12813 (license license:bsd-3)))
12814
12815(define-public python2-smmap2
12816 (package-with-python2 python-smmap2))
12817
12818(define-public python-regex
12819 (package
12820 (name "python-regex")
c187c9d7 12821 (version "2019.04.14")
44d10b1f
RW
12822 (source (origin
12823 (method url-fetch)
12824 (uri (pypi-uri "regex" version))
12825 (sha256
12826 (base32
c187c9d7
BT
12827 "1a6hhfs6l6snr1z654ay6wzbmwdkmv282fzfkd5hk2d1n73y8v6m"))))
12828 ;; TODO: Fix and enable regex_test.py tests that complain about the
12829 ;; test.support module not existing.
44d10b1f
RW
12830 (build-system python-build-system)
12831 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
12832 (synopsis "Alternative regular expression module")
12833 (description "This regular expression implementation is backwards-
12834compatible with the standard @code{re} module, but offers additional
12835functionality like full case-folding for case-insensitive matches in Unicode.")
12836 (license license:psfl)))
12837
12838(define-public python2-regex
12839 (package-with-python2 python-regex))
12840
12841(define-public python2-pyopengl
12842 (package
12843 (name "python2-pyopengl")
12844 (version "3.1.0")
12845 (source
12846 (origin
12847 (method url-fetch)
12848 (uri (pypi-uri "PyOpenGL" version))
12849 (sha256
12850 (base32
12851 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
12852 (arguments
12853 `(#:python ,python-2))
12854 (build-system python-build-system)
12855 (home-page "http://pyopengl.sourceforge.net")
12856 (synopsis "Standard OpenGL bindings for Python")
12857 (description
12858 "PyOpenGL is the most common cross platform Python binding to OpenGL and
12859related APIs. The binding is created using the standard @code{ctypes}
12860library.")
12861 (license license:bsd-3)))
12862
12863(define-public python2-pyopengl-accelerate
12864 (package
12865 (inherit python2-pyopengl)
12866 (name "python2-pyopengl-accelerate")
12867 (version "3.1.0")
12868 (source
12869 (origin
12870 (method url-fetch)
12871 (uri (pypi-uri "PyOpenGL-accelerate" version))
12872 (sha256
12873 (base32
12874 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
12875 (synopsis "Acceleration code for PyOpenGL")
12876 (description
12877 "This is the Cython-coded accelerator module for PyOpenGL.")))
12878
12879(define-public python-rencode
12880 (package
12881 (name "python-rencode")
12882 (version "1.0.5")
12883 (source
12884 (origin
12885 (method url-fetch)
12886 (uri (pypi-uri "rencode" version))
12887 (sha256
12888 (base32
12889 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
12890 (build-system python-build-system)
12891 (arguments
12892 `(#:phases
12893 (modify-phases %standard-phases
12894 (add-before 'check 'delete-bogus-test
12895 ;; This test requires /home/aresch/Downloads, which is not provided by
12896 ;; the build environment.
12897 (lambda _
12898 (delete-file "rencode/t.py")
12899 #t)))))
12900 (native-inputs `(("pkg-config" ,pkg-config)
12901 ("python-cython" ,python-cython)))
12902 (home-page "https://github.com/aresch/rencode")
12903 (synopsis "Serialization of heterogeneous data structures")
12904 (description
12905 "The @code{rencode} module is a data structure serialization library,
12906similar to @code{bencode} from the BitTorrent project. For complex,
12907heterogeneous data structures with many small elements, r-encoding stake up
12908significantly less space than b-encodings. This version of rencode is a
12909complete rewrite in Cython to attempt to increase the performance over the
12910pure Python module.")
12911 (license license:bsd-3)))
12912
12913(define-public python2-rencode
12914 (package-with-python2 python-rencode))
12915
12916(define-public python-xenon
12917 (package
12918 (name "python-xenon")
12919 (version "0.5.4")
12920 (source
12921 (origin
12922 (method url-fetch)
12923 (uri (pypi-uri "xenon" version))
12924 (sha256
12925 (base32
12926 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
12927 (build-system python-build-system)
12928 (native-inputs
12929 `(("python-pyyaml" ,python-pyyaml)
12930 ("python-radon" ,python-radon)
12931 ("python-requests" ,python-requests)
12932 ("python-flake8" ,python-flake8)
12933 ("python-tox" ,python-tox)))
12934 (arguments
12935 `(#:phases
12936 (modify-phases %standard-phases
12937 (add-before 'build 'patch-test-requirements
12938 (lambda _
12939 ;; Remove httpretty dependency for tests.
12940 (substitute* "setup.py"
12941 (("httpretty") ""))
12942 #t)))))
12943 (home-page "https://xenon.readthedocs.org/")
12944 (synopsis "Monitor code metrics for Python on your CI server")
12945 (description
12946 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
12947Ideally, @code{xenon} is run every time code is committed. Through command
12948line options, various thresholds can be set for the complexity of code. It
12949will fail (i.e. it will exit with a non-zero exit code) when any of these
12950requirements is not met.")
12951 (license license:expat)))
12952
12953(define-public python2-xenon
12954 (package-with-python2 python-xenon))
12955
12956(define-public python-pysocks
12957 (package
12958 (name "python-pysocks")
12959 (version "1.6.8")
12960 (source
12961 (origin
12962 (method url-fetch)
12963 (uri (pypi-uri "PySocks" version))
12964 (sha256
12965 (base32
12966 "0wn6xafwy9c1gamwljw3fyvih5w19qy9xp39zmv8c90ai5ajrr9z"))))
12967 (build-system python-build-system)
12968 (arguments `(#:tests? #f))
12969 (home-page "https://github.com/Anorov/PySocks")
12970 (synopsis "SOCKS client module")
12971 (description "@code{pysocks} is an updated and semi-actively maintained
12972version of @code{SocksiPy} with bug fixes and extra features.")
12973 (license license:bsd-3)))
12974
12975(define-public python2-pysocks
12976 (package-with-python2 python-pysocks))
12977
12978(define-public python-pydiff
12979 (package
12980 (name "python-pydiff")
12981 (version "0.2")
12982 (source
12983 (origin
12984 (method url-fetch)
12985 (uri (pypi-uri "pydiff" version))
12986 (sha256
12987 (base32
12988 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
12989 (build-system python-build-system)
12990 (home-page "https://github.com/myint/pydiff")
12991 (synopsis "Library to diff two Python files at the bytecode level")
12992 (description
12993 "@code{pydiff} makes it easy to look for actual code changes while
12994ignoring formatting changes.")
12995 (license license:expat)))
12996
12997(define-public python2-pydiff
12998 (package-with-python2 python-pydiff))
12999
13000(define-public python-tqdm
13001 (package
13002 (name "python-tqdm")
13003 (version "4.19.6")
13004 (source
13005 (origin
13006 (method url-fetch)
13007 (uri (pypi-uri "tqdm" version))
13008 (sha256
13009 (base32
13010 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
13011 (build-system python-build-system)
13012 (native-inputs
13013 `(("python-flake8" ,python-flake8)
13014 ("python-nose" ,python-nose)
13015 ("python-coverage" ,python-coverage)))
13016 (home-page "https://github.com/tqdm/tqdm")
13017 (synopsis "Fast, extensible progress meter")
13018 (description
13019 "Make loops show a progress bar on the console by just wrapping any
13020iterable with @code{|tqdm(iterable)|}. Offers many options to define
13021design and layout.")
13022 (license (list license:mpl2.0 license:expat))))
13023
13024(define-public python2-tqdm
13025 (package-with-python2 python-tqdm))
13026
13027(define-public python-pkginfo
13028 (package
13029 (name "python-pkginfo")
13030 (version "1.4.2")
13031 (source
13032 (origin
13033 (method url-fetch)
13034 (uri (pypi-uri "pkginfo" version))
13035 (sha256
13036 (base32
13037 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
13038 (build-system python-build-system)
13039 (arguments
13040 ;; The tests are broken upstream.
13041 '(#:tests? #f))
13042 (home-page
13043 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
13044 (synopsis
13045 "Query metadatdata from sdists, bdists, and installed packages")
13046 (description
13047 "API to query the distutils metadata written in @file{PKG-INFO} inside a
13048source distriubtion (an sdist) or a binary distribution (e.g., created by
13049running bdist_egg). It can also query the EGG-INFO directory of an installed
13050distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
13051created by running @code{python setup.py develop}).")
13052 (license license:expat)))
13053
13054(define-public python2-pkginfo
13055 (package-with-python2 python-pkginfo))
13056
13057(define-public python-twine
13058 (package
13059 (name "python-twine")
13060 (version "1.9.1")
13061 (source
13062 (origin
13063 (method url-fetch)
13064 (uri (pypi-uri "twine" version))
13065 (sha256
13066 (base32
13067 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
13068 (build-system python-build-system)
13069 (propagated-inputs
13070 `(("python-tqdm" ,python-tqdm)
13071 ("python-pkginfo" ,python-pkginfo)
13072 ("python-requests" ,python-requests)
13073 ("python-requests-toolbelt" ,python-requests-toolbelt)))
13074 (home-page "https://github.com/pypa/twine")
13075 (synopsis "Collection of utilities for interacting with PyPI")
13076 (description
13077 "@code{twine} currently supports registering projects and uploading
13078distributions. It authenticates the user over HTTPS, allows them to pre-sign
13079their files and supports any packaging format (including wheels).")
13080 (license license:asl2.0)))
13081
13082(define-public python2-twine
13083 (package-with-python2 python-twine))
13084
13085(define-public python-linecache2
13086 (package
13087 (name "python-linecache2")
13088 (version "1.0.0")
13089 (source
13090 (origin
13091 (method url-fetch)
13092 (uri (pypi-uri "linecache2" version))
13093 (sha256
13094 (base32
13095 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
13096 (build-system python-build-system)
13097 (arguments
13098 `(;; The tests depend on unittest2, and our version is a bit too old.
13099 #:tests? #f))
13100 (native-inputs
13101 `(("python-pbr" ,python-pbr-minimal)))
13102 (home-page
13103 "https://github.com/testing-cabal/linecache2")
13104 (synopsis "Backports of the linecache module")
13105 (description
13106 "The linecache module allows one to get any line from any file, while
13107attempting to optimize internally, using a cache, the common case where many
13108lines are read from a single file.")
13109 (license license:psfl)))
13110
13111(define-public python2-linecache2
13112 (package-with-python2 python-linecache2))
13113
13114(define-public python-traceback2
13115 (package
13116 (name "python-traceback2")
13117 (version "1.4.0")
13118 (source
13119 (origin
13120 (method url-fetch)
13121 (uri (pypi-uri "traceback2" version))
13122 (sha256
13123 (base32
13124 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
13125 (build-system python-build-system)
13126 (arguments
13127 `(;; python-traceback2 and python-unittest2 depend on one another.
13128 #:tests? #f))
13129 (native-inputs
13130 `(("python-pbr" ,python-pbr-minimal)))
13131 (propagated-inputs
13132 `(("python-linecache2" ,python-linecache2)))
13133 (home-page
13134 "https://github.com/testing-cabal/traceback2")
13135 (synopsis "Backports of the traceback module")
13136 (description
13137 "This module provides a standard interface to extract, format and print
13138stack traces of Python programs. It exactly mimics the behavior of the Python
13139interpreter when it prints a stack trace.")
13140 (license license:psfl)))
13141
13142(define-public python2-traceback2
13143 (package-with-python2 python-traceback2))
13144
13145(define-public python-ratelimiter
13146 (package
13147 (name "python-ratelimiter")
13148 (version "1.2.0")
13149 (source
13150 (origin
13151 (method url-fetch)
13152 (uri (pypi-uri "ratelimiter" version))
13153 (sha256
13154 (base32
13155 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
13156 (build-system python-build-system)
13157 (arguments
13158 '(#:tests? #f)) ; There are no tests in the pypi archive.
13159 (home-page "https://github.com/RazerM/ratelimiter")
13160 (synopsis "Simple rate limiting object")
13161 (description
13162 "The @code{ratelimiter} module ensures that an operation will not be
13163executed more than a given number of times during a given period.")
13164 (license license:asl2.0)))
13165
13166(define-public python2-ratelimiter
13167 (package-with-python2 python-ratelimiter))
13168
13169(define-public python-dukpy
13170 (package
13171 (name "python-dukpy")
13172 (version "0.3")
13173 (source
13174 (origin
5b77ebe1
TGR
13175 (method git-fetch)
13176 (uri (git-reference
13177 (url "https://github.com/kovidgoyal/dukpy.git")
13178 (commit (string-append "v" version))))
13179 (file-name (git-file-name name version))
44d10b1f 13180 (sha256
5b77ebe1 13181 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
44d10b1f
RW
13182 (build-system python-build-system)
13183 (home-page "https://github.com/kovidgoyal/dukpy")
13184 (synopsis "Run JavaScript in python")
13185 (description
13186 "dukpy is a JavaScript runtime environment for Python using the duktape
13187embeddable JavaScript engine.")
13188 ;; Dukpy is licensed under MIT like the embedded duktape library,
13189 ;; with 'errors.c' as GPL3.
13190 (license (list license:expat license:gpl3))))
13191
13192(define-public python2-dukpy
13193 (package-with-python2 python-dukpy))
13194
13195(define-public python-jsonrpclib-pelix
13196 (package
13197 (name "python-jsonrpclib-pelix")
13198 (version "0.3.2")
13199 (source
13200 (origin
13201 (method url-fetch)
13202 (uri (pypi-uri "jsonrpclib-pelix" version))
13203 (sha256
13204 (base32
13205 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
13206 (build-system python-build-system)
13207 (arguments
13208 `(#:tests? #f)) ; no tests in PyPI tarball
13209 (home-page "https://github.com/tcalmant/jsonrpclib/")
13210 (synopsis "JSON-RPC 2.0 client library for Python")
13211 (description
13212 "This library implements the JSON-RPC v2.0
13213specification (backwards-compatible) as a client library for Python. This
13214version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
13215services.")
13216 (license license:asl2.0)))
13217
13218(define-public python2-jsonrpclib-pelix
13219 (package-with-python2 python-jsonrpclib-pelix))
13220
13221(define-public python-setuptools-scm-git-archive
13222 (package
13223 (name "python-setuptools-scm-git-archive")
13224 (version "1.0")
13225 (source
13226 (origin
13227 (method url-fetch)
13228 (uri (pypi-uri "setuptools_scm_git_archive" version))
13229 (sha256
13230 (base32
13231 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
13232 (build-system python-build-system)
13233 (native-inputs
13234 `(("python-pytest" ,python-pytest)))
13235 (propagated-inputs
13236 `(("python-setuptools-scm" ,python-setuptools-scm)))
13237 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
13238 (synopsis "Setuptools_scm plugin for git archives")
13239 (description
13240 "The setuptools_scm_git_archive package is a plugin to
13241setuptools_scm, which supports obtaining versions from git archives that
13242belong to tagged versions.")
13243 (license license:expat)))
13244
13245(define-public python2-setuptools-scm-git-archive
13246 (package-with-python2 python-setuptools-scm-git-archive))
13247
13248(define-public python-pyclipper
13249 (package
13250 (name "python-pyclipper")
13251 (version "1.1.0.post1")
13252 (source
13253 (origin
13254 (method url-fetch)
13255 (uri (pypi-uri "pyclipper" version ".zip"))
13256 (sha256
13257 (base32
13258 "0ldbkbnx94an4zzrwb1sxmg6k0jgk4cwmvcdyy8y5k1zslc612wa"))
13259 (modules '((guix build utils)))
13260 (snippet
13261 '(begin
13262 ;; This file is generated by Cython.
13263 (delete-file "pyclipper/pyclipper.cpp") #t))))
13264 (build-system python-build-system)
13265 (arguments
13266 `(#:phases
13267 (modify-phases %standard-phases
13268 (add-before 'build 'cythonize-sources
13269 (lambda _
13270 (with-directory-excursion "pyclipper"
13271 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
13272 (propagated-inputs
13273 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
13274 (native-inputs
13275 `(("python-cython" ,python-cython)
13276 ("python-pytest" ,python-pytest)
13277 ("python-pytest-runner" ,python-pytest-runner)
13278 ("python-unittest2" ,python-unittest2)
13279 ("unzip" ,unzip)))
13280 (home-page "https://github.com/greginvm/pyclipper")
13281 (synopsis "Wrapper for Angus Johnson's Clipper library")
13282 (description
13283 "Pyclipper is a Cython wrapper for the C++ translation of the
13284Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
13285 (license license:expat)))
13286
13287(define-public python2-pyclipper
13288 (package-with-python2 python-pyclipper))
13289
13290(define-public python2-booleanoperations
13291 (package
13292 (name "python2-booleanoperations")
13293 (version "0.7.1")
13294 (source
13295 (origin
13296 (method url-fetch)
13297 (uri (pypi-uri "booleanOperations" version ".zip"))
13298 (sha256
13299 (base32
13300 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
13301 (build-system python-build-system)
13302 (arguments
13303 `(#:python ,python-2))
13304 (native-inputs
13305 `(("unzip" ,unzip)
13306 ("python2-pytest" ,python2-pytest)
13307 ("python2-pytest-runner" ,python2-pytest-runner)))
13308 (propagated-inputs
13309 `(("python-fonttools" ,python2-fonttools)
13310 ("python-pyclipper" ,python2-pyclipper)
13311 ("python-ufolib" ,python2-ufolib)))
13312 (home-page "https://github.com/typemytype/booleanOperations")
13313 (synopsis "Boolean operations on paths")
13314 (description
13315 "BooleanOperations provides a Python library that enables
13316boolean operations on paths.")
13317 (license license:expat)))
13318
13319(define-public python-tempdir
13320 (package
13321 (name "python-tempdir")
13322 (version "0.7.1")
13323 (source
13324 (origin
13325 (method url-fetch)
13326 (uri (pypi-uri "tempdir" version))
13327 (sha256
13328 (base32
13329 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
13330 (build-system python-build-system)
13331 (home-page "https://pypi.org/project/tempdir/")
13332 (arguments
13333 ;; the package has no tests
13334 '(#:tests? #f))
13335 (synopsis "Python library for managing temporary directories")
13336 (description
13337 "This library manages temporary directories that are automatically
13338deleted with all their contents when they are no longer needed. It is
13339particularly convenient for use in tests.")
13340 (license license:expat)))
13341
13342(define-public python2-tempdir
13343 (package-with-python2 python-tempdir))
13344
13345(define-public python-activepapers
13346 (package
13347 (name "python-activepapers")
13348 (version "0.2.2")
13349 (source
13350 (origin
13351 (method url-fetch)
13352 (uri (pypi-uri "ActivePapers.Py" version))
13353 (sha256
13354 (base32
13355 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
13356 (build-system python-build-system)
13357 (arguments
13358 `(#:modules ((ice-9 ftw)
13359 (srfi srfi-1)
13360 (guix build utils)
13361 (guix build python-build-system))
13362
13363 #:phases
13364 (modify-phases %standard-phases
13365 (add-after 'unpack 'delete-python2-code
13366 (lambda _
13367 (for-each delete-file
13368 '("lib/activepapers/builtins2.py"
13369 "lib/activepapers/standardlib2.py"
13370 "lib/activepapers/utility2.py"))))
13371 (replace 'check
13372 (lambda _
13373 ;; Deactivate the test cases that download files
13374 (setenv "NO_NETWORK_ACCESS" "1")
13375 ;; For some strange reason, some tests fail if nosetests runs all
13376 ;; test modules in a single execution. They pass if each test
13377 ;; module is run individually.
13378 (for-each (lambda (filename)
13379 (invoke "nosetests"
13380 (string-append "tests/" filename)))
13381 (scandir "tests"
13382 (lambda (filename)
13383 (string-suffix? ".py" filename)))))))))
13384 (native-inputs
13385 `(("python-tempdir" ,python-tempdir)
13386 ("python-nose" ,python-nose)))
13387 (propagated-inputs
13388 `(("python-h5py" ,python-h5py)))
13389 (home-page "http://www.activepapers.org/")
13390 (synopsis "Executable papers for scientific computing")
13391 (description
13392 "ActivePapers is a tool for working with executable papers, which
13393combine data, code, and documentation in single-file packages,
13394suitable for publication as supplementary material or on repositories
13395such as figshare or Zenodo.")
13396 (properties `((python2-variant . ,(delay python2-activepapers))))
13397 (license license:bsd-3)))
13398
13399(define-public python2-activepapers
13400 (let ((base (package-with-python2
13401 (strip-python2-variant python-activepapers))))
13402 (package
13403 (inherit base)
13404 (arguments
13405 (substitute-keyword-arguments (package-arguments base)
13406 ((#:phases phases)
13407 `(modify-phases ,phases
13408 (delete 'delete-python2-code)
13409 (add-after 'unpack 'delete-python3-code
13410 (lambda _
13411 (for-each delete-file
13412 '("lib/activepapers/builtins3.py"
13413 "lib/activepapers/standardlib3.py"
13414 "lib/activepapers/utility3.py")))))))))))
13415
13416(define-public python-semver
13417 (package
13418 (name "python-semver")
13419 (version "2.7.9")
13420 (source
13421 (origin
13422 (method url-fetch)
13423 (uri (pypi-uri "semver" version))
13424 (sha256
13425 (base32
13426 "0hhgqppchv59rqj0yzi1prdg2nfsywqmjsqy2rycyxm0hvxmbyqz"))))
13427 (build-system python-build-system)
13428 (arguments
13429 `(#:phases
13430 (modify-phases %standard-phases
13431 (add-after 'unpack 'patch-test-requirements
13432 (lambda _
13433 (substitute* "setup.py"
13434 ;; Our Python is new enough.
13435 (("'virtualenv<14\\.0\\.0'") "'virtualenv'"))
13436 #t)))))
13437 (native-inputs
13438 `(("python-tox" ,python-tox)
13439 ("python-virtualenv" ,python-virtualenv)))
13440 (home-page "https://github.com/k-bx/python-semver")
13441 (synopsis "Python helper for Semantic Versioning")
13442 (description "This package provides a Python library for
13443@url{Semantic Versioning, http://semver.org/}.")
13444 (license license:bsd-3)))
13445
13446(define-public python2-semver
13447 (package-with-python2 python-semver))
13448
13449(define-public python-pyro4
13450 (package
13451 (name "python-pyro4")
ad1acb81 13452 (version "4.75")
44d10b1f
RW
13453 (source
13454 (origin
13455 (method url-fetch)
13456 (uri (pypi-uri "Pyro4" version))
13457 (sha256
ad1acb81 13458 (base32 "1dfpp36imddx19yv0kd28gk1l71ckhpqy6jd590wpm2680jw15rq"))))
44d10b1f
RW
13459 (build-system python-build-system)
13460 (propagated-inputs
13461 `(("python-serpent" ,python-serpent)))
13462 (home-page "https://pyro4.readthedocs.io")
13463 (synopsis "Distributed object middleware for Python")
13464 (description
13465 "Pyro enables you to build applications in which objects can talk to each
13466other over the network. You can just use normal Python method calls to call
13467objects on other machines, also known as remote procedure calls (RPC).")
13468 (license license:expat)))
13469
13470(define-public python2-pyro
13471 (package
13472 (name "python2-pyro")
13473 (version "3.16")
13474 (source
13475 (origin
13476 (method url-fetch)
13477 (uri (pypi-uri "Pyro" version))
13478 (file-name (string-append "Pyro-" version ".tar.gz"))
13479 (sha256
13480 (base32
13481 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
13482 (build-system python-build-system)
13483 (arguments
13484 ;; Pyro is not compatible with Python 3
13485 `(#:python ,python-2
13486 ;; Pyro has no test cases for automatic execution
13487 #:tests? #f))
13488 (home-page "http://pythonhosted.org/Pyro/")
13489 (synopsis "Distributed object manager for Python")
13490 (description "Pyro is a Distributed Object Technology system
13491written in Python that is designed to be easy to use. It resembles
13492Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
13493which is a system and language independent Distributed Object Technology
13494and has much more to offer than Pyro or RMI. Pyro 3.x is no
13495longer maintained. New projects should use Pyro4 instead, which
13496is the new Pyro version that is actively developed.")
13497 (license license:expat)))
13498
13499(define-public python2-scientific
13500 (package
13501 (name "python2-scientific")
13502 (version "2.9.4")
13503 (source
13504 (origin
13505 (method url-fetch)
13506 (uri (string-append "https://bitbucket.org/khinsen/"
13507 "scientificpython/downloads/ScientificPython-"
13508 version ".tar.gz"))
13509 (file-name (string-append "ScientificPython-" version ".tar.gz"))
13510 (sha256
13511 (base32
13512 "0fc69zhlsn9d2jvbzyjl9ah53vj598h84nkq230c83ahfvgzx5y3"))))
13513 (build-system python-build-system)
13514 (inputs
13515 `(("netcdf" ,netcdf)))
13516 (propagated-inputs
13517 `(("python-numpy" ,python2-numpy-1.8)
13518 ("python-pyro" ,python2-pyro)))
13519 (arguments
13520 ;; ScientificPython is not compatible with Python 3
13521 `(#:python ,python-2
13522 #:tests? #f ; No test suite
13523 #:phases
13524 (modify-phases %standard-phases
13525 (replace 'build
13526 (lambda* (#:key inputs #:allow-other-keys)
77e61e25
RW
13527 (invoke "python" "setup.py" "build"
13528 (string-append "--netcdf_prefix="
13529 (assoc-ref inputs "netcdf"))))))))
44d10b1f
RW
13530 (home-page "https://bitbucket.org/khinsen/scientificpython")
13531 (synopsis "Python modules for scientific computing")
13532 (description "ScientificPython is a collection of Python modules that are
13533useful for scientific computing. Most modules are rather general (Geometry,
13534physical units, automatic derivatives, ...) whereas others are more
13535domain-specific (e.g. netCDF and PDB support). The library is currently
13536not actively maintained and works only with Python 2 and NumPy < 1.9.")
13537 (license license:cecill-c)))
13538
13539(define-public python2-mmtk
13540 (package
13541 (name "python2-mmtk")
13542 (version "2.7.11")
13543 (source
13544 (origin
13545 (method url-fetch)
13546 (uri (string-append "https://bitbucket.org/khinsen/"
13547 "mmtk/downloads/MMTK-" version ".tar.gz"))
13548 (file-name (string-append "MMTK-" version ".tar.gz"))
13549 (sha256
13550 (base32
13551 "1d0nnjx4lwsvh8f99vv1r6gi50d93yba0adkz8b4zgv4za4c5862"))))
13552 (build-system python-build-system)
13553 (native-inputs
13554 `(("netcdf" ,netcdf)))
13555 (propagated-inputs
13556 `(("python-scientific" ,python2-scientific)
13557 ("python-tkinter" ,python-2 "tk")))
13558 (arguments
13559 `(#:python ,python-2
13560 #:tests? #f
13561 #:phases
13562 (modify-phases %standard-phases
13563 (add-before 'build 'includes-from-scientific
13564 (lambda* (#:key inputs #:allow-other-keys)
13565 (mkdir-p "Include/Scientific")
13566 (copy-recursively
13567 (string-append
13568 (assoc-ref inputs "python-scientific")
13569 "/include/python2.7/Scientific")
13570 "Include/Scientific"))))))
13571 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
13572 (synopsis "Python library for molecular simulation")
13573 (description "MMTK is a library for molecular simulations with an emphasis
13574on biomolecules. It provides widely used methods such as Molecular Dynamics
13575and normal mode analysis, but also basic routines for implementing new methods
13576for simulation and analysis. The library is currently not actively maintained
13577and works only with Python 2 and NumPy < 1.9.")
13578 (license license:cecill-c)))
13579
13580(define-public python-phonenumbers
13581 (package
13582 (name "python-phonenumbers")
13583 (version "8.9.1")
13584 (source
13585 (origin
13586 (method url-fetch)
13587 (uri (pypi-uri "phonenumbers" version))
13588 (sha256
13589 (base32
13590 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
13591 (build-system python-build-system)
13592 (home-page
13593 "https://github.com/daviddrysdale/python-phonenumbers")
13594 (synopsis
13595 "Python library for dealing with international phone numbers")
13596 (description
13597 "This package provides a Python port of Google's libphonenumber library.")
13598 (license license:asl2.0)))
13599
13600(define-public python2-phonenumbers
13601 (package-with-python2 python-phonenumbers))
13602
13603(define-public python-send2trash
13604 (package
13605 (name "python-send2trash")
d9b0216b 13606 (version "1.5.0")
44d10b1f 13607 (source
d9b0216b 13608 (origin (method git-fetch)
44d10b1f 13609 ;; Source tarball on PyPI doesn't include tests.
d9b0216b
RW
13610 (uri (git-reference
13611 (url "https://github.com/hsoft/send2trash.git")
13612 (commit version)))
13613 (file-name (git-file-name name version))
44d10b1f
RW
13614 (sha256
13615 (base32
d9b0216b 13616 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
44d10b1f
RW
13617 (build-system python-build-system)
13618 (arguments
13619 '(#:phases
13620 (modify-phases %standard-phases
13621 (add-before 'check 'pre-check
13622 (lambda _
13623 (mkdir-p "/tmp/foo")
13624 (setenv "HOME" "/tmp/foo")
13625 #t)))))
13626 (home-page "https://github.com/hsoft/send2trash")
13627 (synopsis "Send files to the user's @file{~/Trash} directory")
13628 (description "This package provides a Python library to send files to the
13629user's @file{~/Trash} directory.")
20b3fde7 13630 (properties `((python2-variant . ,(delay python2-send2trash))))
44d10b1f
RW
13631 (license license:bsd-3)))
13632
13633(define-public python2-send2trash
13634 (package
f32164ab 13635 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
44d10b1f
RW
13636 (arguments
13637 (substitute-keyword-arguments (package-arguments python-send2trash)
13638 ((#:phases phases)
13639 `(modify-phases ,phases
13640 (add-before 'check 'setenv
13641 (lambda _
13642 (setenv "PYTHONPATH"
13643 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
4782a06f 13644 #t))))))))
44d10b1f
RW
13645
13646(define-public python-yapf
13647 (package
13648 (name "python-yapf")
13649 (version "0.24.0")
13650 (source
13651 (origin
13652 (method url-fetch)
13653 (uri (pypi-uri "yapf" version))
13654 (sha256
13655 (base32
13656 "0anwby0ydmyzcsgjc5dn1ryddwvii4dq61vck447q0n96npnzfyf"))))
13657 (build-system python-build-system)
13658 (home-page "https://github.com/google/yapf")
13659 (synopsis "Formatter for Python code")
13660 (description "YAPF is a formatter for Python code. It's based off of
13661@dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
13662takes the code and reformats it to the best formatting that conforms to the
13663style guide, even if the original code didn't violate the style guide.")
13664 (license license:asl2.0)))
13665
13666(define-public python2-yapf
13667 (package-with-python2 python-yapf))
13668
13669(define-public python-gyp
13670 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
13671 (revision "0"))
13672 (package
13673 (name "python-gyp")
13674 ;; Google does not release versions,
13675 ;; based on second most recent commit date.
13676 (version (git-version "0.0.0" revision commit))
13677 (source
13678 (origin
13679 ;; Google does not release tarballs,
13680 ;; git checkout is needed.
13681 (method git-fetch)
13682 (uri (git-reference
13683 (url "https://chromium.googlesource.com/external/gyp")
13684 (commit commit)))
13685 (file-name (git-file-name name version))
13686 (sha256
13687 (base32
13688 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
13689 (build-system python-build-system)
13690 (home-page "https://gyp.gsrc.io/")
13691 (synopsis "GYP is a Meta-Build system")
13692 (description
13693 "GYP builds build systems for large, cross platform applications.
13694It can be used to generate XCode projects, Visual Studio projects, Ninja build
13695files, and Makefiles.")
13696 (license license:bsd-3))))
13697
13698(define-public python2-gyp
13699 (package-with-python2 python-gyp))
13700
13701(define-public python-whatever
13702 (package
13703 (name "python-whatever")
13704 (version "0.5")
13705 (source
13706 (origin
13707 (method url-fetch)
13708 (uri (string-append "https://github.com/Suor/whatever/archive/" version
13709 ".tar.gz"))
13710 (sha256
13711 (base32
13712 "1iqvnaf0zpc6b4rvbqq4xy45mszcscyzpzknv8wg6j84pbp22sap"))
13713 (file-name (string-append name "-" version ".tar.gz"))))
13714 (build-system python-build-system)
13715 (arguments
13716 `(#:phases
13717 (modify-phases %standard-phases
13718 (replace 'check
13719 (lambda _
13720 (invoke "py.test"))))))
13721 (native-inputs
13722 `(("python-pytest" ,python-pytest)))
13723 (home-page "http://github.com/Suor/whatever")
13724 (synopsis "Make anonymous functions by partial application of operators")
13725 (description "@code{whatever} provides an easy way to make anonymous
13726functions by partial application of operators.")
13727 (license license:bsd-3)))
13728
13729(define-public python2-whatever
13730 (package-with-python2 python-whatever))
13731
13732(define-public python-funcy
13733 (package
13734 (name "python-funcy")
9e396ab8 13735 (version "1.11")
44d10b1f
RW
13736 (source
13737 (origin
a85c6027
TGR
13738 (method git-fetch)
13739 (uri (git-reference
13740 (url "https://github.com/Suor/funcy.git")
13741 (commit version)))
44d10b1f 13742 (sha256
a85c6027
TGR
13743 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
13744 (file-name (git-file-name name version))))
44d10b1f
RW
13745 (build-system python-build-system)
13746 (arguments
13747 `(#:phases
13748 (modify-phases %standard-phases
13749 (replace 'check
13750 (lambda _
13751 (invoke "py.test"))))))
13752 (native-inputs
13753 `(("python-pytest" ,python-pytest)
13754 ("python-whatever" ,python-whatever)))
13755 (home-page "http://github.com/Suor/funcy")
13756 (synopsis "Functional tools")
13757 (description "@code{funcy} is a library that provides functional tools.
13758Examples are:
13759@enumerate
13760@item merge - Merges collections of the same type
13761@item walk - Type-preserving map
13762@item select - Selects a part of a collection
13763@item take - Takes the first n items of a collection
13764@item first - Takes the first item of a collection
13765@item remove - Predicated-removes items of a collection
13766@item concat - Concatenates two collections
13767@item flatten - Flattens a collection with subcollections
13768@item distinct - Returns only distinct items
13769@item split - Predicated-splits a collection
13770@item split_at - Splits a collection at a given item
13771@item group_by - Groups items by group
13772@item pairwise - Pairs off adjacent items
13773@item partial - Partially-applies a function
13774@item curry - Curries a function
13775@item compose - Composes functions
13776@item complement - Complements a predicate
13777@item all_fn - \"all\" with predicate
13778@end enumerate")
13779 (license license:bsd-3)))
13780
13781(define-public python2-funcy
13782 (package-with-python2 python-funcy))
13783
13784(define-public python-isoweek
13785 (package
13786 (name "python-isoweek")
13787 (version "1.3.3")
13788 (source
13789 (origin
13790 (method url-fetch)
13791 (uri (pypi-uri "isoweek" version))
13792 (sha256
13793 (base32
13794 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
13795 (build-system python-build-system)
13796 (home-page "https://github.com/gisle/isoweek")
13797 (synopsis "Objects representing a week")
13798 (description "The @code{isoweek} module provide the class Week that
13799implements the week definition of ISO 8601. This standard also defines
13800a notation for identifying weeks; yyyyWww (where the W is a literal).
13801Week instances stringify to this form.")
13802 (license license:bsd-3)))
13803
13804(define-public python2-isoweek
13805 (package-with-python2 python-isoweek))
13806
13807(define-public python-tokenize-rt
13808 (package
13809 (name "python-tokenize-rt")
13810 (version "2.0.1")
13811 (source
13812 (origin
13813 (method url-fetch)
13814 (uri (pypi-uri "tokenize-rt" version))
13815 (sha256
13816 (base32
13817 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
13818 (build-system python-build-system)
13819 (home-page "https://github.com/asottile/tokenize-rt")
13820 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
13821 (description
13822 "This Python library is a wrapper around @code{tokenize} from the Python
13823standard library. It provides two additional tokens @code{ESCAPED_NL} and
13824@code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
13825and @code{tokens_to_src} to roundtrip.")
13826 (license license:expat)))
13827
13828(define-public python-future-fstrings
13829 (package
13830 (name "python-future-fstrings")
13831 (version "0.4.1")
13832 (source
13833 (origin
13834 (method url-fetch)
13835 (uri (pypi-uri "future_fstrings" version))
13836 (sha256
13837 (base32
13838 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
13839 (build-system python-build-system)
13840 (propagated-inputs
13841 `(("python-tokenize-rt" ,python-tokenize-rt)))
13842 (home-page "https://github.com/asottile/future-fstrings")
13843 (synopsis "Backport of fstrings to Python < 3.6")
13844 (description
13845 "This package provides a UTF-8 compatible encoding
13846@code{future_fstrings}, which performs source manipulation. It decodes the
13847source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
13848@code{f} strings.")
13849 (license license:expat)))
13850
13851(define-public python-typing
13852 (package
13853 (name "python-typing")
13854 (version "3.6.6")
13855 (source
13856 (origin
13857 (method url-fetch)
13858 (uri (pypi-uri "typing" version))
13859 (sha256
13860 (base32
13861 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
13862 (build-system python-build-system)
13863 (home-page "https://docs.python.org/3/library/typing.html")
13864 (synopsis "Type hints for Python")
13865 (description "This is a backport of the standard library @code{typing}
13866module to Python versions older than 3.5. Typing defines a standard notation
13867for Python function and variable type annotations. The notation can be used
13868for documenting code in a concise, standard format, and it has been designed
13869to also be used by static and runtime type checkers, static analyzers, IDEs
13870and other tools.")
13871 (license license:psfl)))
13872
13873(define-public python2-typing
13874 (package-with-python2 python-typing))
13875
f89d443b
VC
13876(define-public python-typing-extensions
13877 (package
13878 (name "python-typing-extensions")
13879 (version "3.7.2")
13880 (source
13881 (origin
13882 (method url-fetch)
13883 (uri (pypi-uri "typing_extensions" version))
13884 (sha256
13885 (base32
13886 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
13887 (build-system python-build-system)
13888 (home-page
13889 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
13890 (synopsis "Experimental type hints for Python")
13891 (description
13892 "The typing_extensions module contains additional @code{typing} hints not
13893yet present in the of the @code{typing} standard library.
13894Included are implementations of:
13895@enumerate
13896@item ClassVar
13897@item ContextManager
13898@item Counter
13899@item DefaultDict
13900@item Deque
13901@item NewType
13902@item NoReturn
13903@item overload
13904@item Protocol
13905@item runtime
13906@item Text
13907@item Type
13908@item TYPE_CHECKING
13909@item AsyncGenerator
13910@end enumerate\n")
13911 (license license:psfl)))
13912
44d10b1f
RW
13913(define-public bpython
13914 (package
13915 (name "bpython")
13916 (version "0.17.1")
13917 (source
13918 (origin
13919 (method url-fetch)
13920 (uri (pypi-uri "bpython" version))
13921 (sha256
13922 (base32
13923 "0bxhxi5zxdkrf8b4gwn0d363kdz3qnypjwhm1aydki53ph8ca1w9"))))
13924 (build-system python-build-system)
13925 (arguments
13926 `(#:phases
13927 (modify-phases %standard-phases
13928 (add-after 'unpack 'remove-failing-test
13929 (lambda _
13930 ;; Remove failing test. FIXME: make it pass
13931 (delete-file "bpython/test/test_args.py")
13932 #t))
13933 (add-after 'wrap 'add-aliases
13934 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
13935 (lambda* (#:key outputs #:allow-other-keys)
13936 (let ((out (assoc-ref outputs "out")))
13937 (for-each
13938 (lambda (old new)
13939 (symlink old (string-append out "/bin/" new)))
13940 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
13941 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
13942 #t)))))
13943 (propagated-inputs
13944 `(("python-pygments" ,python-pygments)
13945 ("python-requests" ,python-requests)
13946 ("python-babel" ,python-babel) ; optional, for internationalization
13947 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
13948 ("python-greenlet" ,python-greenlet)
13949 ("python-urwid" ,python-urwid) ; for bpython-urwid only
13950 ("python-six" ,python-six)))
13951 (native-inputs
13952 `(("python-sphinx" ,python-sphinx)
13953 ("python-mock" ,python-mock)))
13954 (home-page "https://bpython-interpreter.org/")
13955 (synopsis "Fancy interface to the Python interpreter")
13956 (description "Bpython is a fancy interface to the Python
13957interpreter. bpython's main features are
13958
13959@enumerate
13960@item in-line syntax highlighting,
13961@item readline-like autocomplete with suggestions displayed as you type,
13962@item expected parameter list for any Python function,
13963@item \"rewind\" function to pop the last line of code from memory and
13964 re-evaluate,
13965@item send the code you've entered off to a pastebin,
13966@item save the code you've entered to a file, and
13967@item auto-indentation.
13968@end enumerate")
13969 (license license:expat)))
13970
13971(define-public bpython2
13972 (let ((base (package-with-python2
13973 (strip-python2-variant bpython))))
13974 (package (inherit base)
13975 (name "bpython2")
13976 (arguments
13977 `(#:python ,python-2
13978 #:phases
13979 (modify-phases %standard-phases
13980 (add-after 'unpack 'remove-failing-test
13981 (lambda _
13982 ;; Remove failing test. FIXME: make it pass
13983 (delete-file "bpython/test/test_args.py")
13984 ;; Disable failing test-cases (renaming inhibits they are
13985 ;; discovered)
13986 (substitute* "bpython/test/test_curtsies_repl.py"
13987 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
13988 (string-append a "xxx_off_" b))
13989 (("^(\\s*def )(test_complex\\W)" _ a b)
13990 (string-append a "xxx_off_" b)))
13991 #t))
13992 (add-before 'build 'rename-scripts
13993 ;; rename the scripts to bypthon2, bpdb2, etc.
13994 (lambda _
13995 (substitute* "setup.py"
13996 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
13997 (string-append name "2" rest "\n"))
13998 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
13999 (string-append name "2" (or sub "") rest "\n")))
14000 #t))))))))
14001
14002(define-public python-pyinotify
14003 (package
14004 (name "python-pyinotify")
14005 (version "0.9.6")
14006 (source (origin
14007 (method url-fetch)
14008 (uri (pypi-uri "pyinotify" version))
14009 (sha256
14010 (base32
14011 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
14012 (build-system python-build-system)
14013 (arguments `(#:tests? #f)) ;no tests
14014 (home-page "https://github.com/seb-m/pyinotify")
14015 (synopsis "Python library for monitoring inotify events")
14016 (description
14017 "@code{pyinotify} provides a Python interface for monitoring
14018file system events on Linux.")
14019 (license license:expat)))
14020
14021(define-public python2-pyinotify
14022 (package-with-python2 python-pyinotify))
14023
14024;; Ada parser uses this version.
14025(define-public python2-quex-0.67.3
14026 (package
14027 (name "python2-quex")
14028 (version "0.67.3")
14029 (source
14030 (origin
14031 (method url-fetch)
14032 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
14033 (version-major+minor version)
14034 "/quex-" version ".zip"))
14035 (sha256
14036 (base32
14037 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
14038 (build-system python-build-system)
14039 (native-inputs
14040 `(("unzip" ,unzip)))
14041 (arguments
14042 `(#:python ,python-2
14043 #:tests? #f
14044 #:phases
14045 (modify-phases %standard-phases
14046 (delete 'configure)
14047 (delete 'build)
14048 (replace 'install
14049 (lambda* (#:key outputs #:allow-other-keys)
14050 (let* ((out (assoc-ref outputs "out"))
14051 (share/quex (string-append out "/share/quex"))
14052 (bin (string-append out "/bin")))
14053 (copy-recursively "." share/quex)
14054 (mkdir-p bin)
14055 (symlink (string-append share/quex "/quex-exe.py")
14056 (string-append bin "/quex"))
14057 #t))))))
14058 (native-search-paths
14059 (list (search-path-specification
14060 (variable "QUEX_PATH")
14061 (files '("share/quex")))))
14062 (home-page "http://quex.sourceforge.net/")
14063 (synopsis "Lexical analyzer generator in Python")
14064 (description "@code{quex} is a lexical analyzer generator in Python.")
14065 (license license:lgpl2.1+))) ; Non-military
14066
14067(define-public python2-quex
14068 (package (inherit python2-quex-0.67.3)
14069 (name "python2-quex")
14070 (version "0.68.1")
14071 (source
14072 (origin
14073 (method url-fetch)
14074 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
14075 (sha256
14076 (base32
14077 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
14078 (file-name (string-append name "-" version ".tar.gz"))))))
14079
14080(define-public python-more-itertools
14081 (package
14082 (name "python-more-itertools")
14083 (version "4.3.0")
14084 (source
14085 (origin
14086 (method url-fetch)
14087 (uri (pypi-uri "more-itertools" version))
14088 (sha256
14089 (base32
14090 "17h3na0rdh8xq30w4b9pizgkdxmm51896bxw600x84jflg9vaxn4"))))
14091 (build-system python-build-system)
14092 (arguments
14093 `(,@(if (any (cute string-prefix? <> (or (%current-system)
14094 (%current-target-system)))
14095 '("armhf" "i686"))
14096 '(#:phases
14097 (modify-phases %standard-phases
14098 ;; This is required for 32-bit hardware.
14099 ;; TODO: Try to remove this when upgrading.
14100 (add-after 'unpack 'patch-test
14101 (lambda _
14102 (substitute* "more_itertools/tests/test_more.py"
14103 (("10 \\*\\* 10") "9 ** 9"))
14104 #t))))
14105 '())))
14106 (propagated-inputs
14107 `(("python-six" ,python-six-bootstrap)))
14108 (home-page "https://github.com/erikrose/more-itertools")
14109 (synopsis "More routines for operating on iterables, beyond itertools")
14110 (description "Python's built-in @code{itertools} module implements a
14111number of iterator building blocks inspired by constructs from APL, Haskell,
14112and SML. @code{more-itertools} includes additional building blocks for
14113working with iterables.")
14114 (license license:expat)))
14115
14116(define-public python2-more-itertools
14117 (package-with-python2 python-more-itertools))
14118
14119(define-public python-latexcodec
14120 (package
14121 (name "python-latexcodec")
91b61f02 14122 (version "1.0.6")
44d10b1f
RW
14123 (source
14124 (origin
14125 (method url-fetch)
14126 (uri (pypi-uri "latexcodec" version))
14127 (sha256
91b61f02 14128 (base32 "0s4wdbg0w2l8pj3i0y4510i0s04p8nhxcsa2z41bjsv0k66npb81"))))
44d10b1f
RW
14129 (build-system python-build-system)
14130 (inputs
14131 `(("python-six" ,python-six)))
14132 (home-page "https://readthedocs.org/projects/latexcodec/")
14133 (synopsis "Work with LaTeX code in Python")
14134 (description "Lexer and codec to work with LaTeX code in Python.")
14135 (license license:expat)))
14136
14137(define-public python-pybtex
14138 (package
14139 (name "python-pybtex")
14140 (version "0.21")
14141 (source
14142 (origin
14143 (method url-fetch)
14144 (uri (pypi-uri "pybtex" version))
14145 (sha256
14146 (base32
14147 "00300j8dn5pxq4ndxmfmbmycg2znawkqs49val2x6jlmfiy6r2mg"))))
14148 (build-system python-build-system)
14149 (native-inputs
14150 `(("python-nose" ,python-nose)))
14151 (inputs
14152 `(("python-latexcodec" ,python-latexcodec)
14153 ("python-pyyaml" ,python-pyyaml)
14154 ("python-six" ,python-six)))
14155 (arguments
14156 `(#:test-target "nosetests"))
14157 (home-page "https://pybtex.org/")
14158 (synopsis "BibTeX-compatible bibliography processor")
14159 (description "Pybtex is a BibTeX-compatible bibliography processor written
14160in Python. You can simply type pybtex instead of bibtex.")
14161 (license license:expat)))
14162
14163(define-public python-onetimepass
14164 (package
14165 (name "python-onetimepass")
14166 (version "1.0.1")
14167 (source
14168 (origin
14169 (method url-fetch)
14170 (uri (pypi-uri "onetimepass" version))
14171 (sha256
14172 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
14173 (build-system python-build-system)
14174 (propagated-inputs `(("python-six" ,python-six)))
14175 (home-page "https://github.com/tadeck/onetimepass/")
14176 (synopsis "One-time password library")
14177 (description "Python one-time password library for HMAC-based (HOTP) and
14178time-based (TOTP) passwords.")
14179 (license license:expat)))
14180
14181(define-public python-parso
14182 (package
14183 (name "python-parso")
14184 (version "0.3.1")
14185 (source
14186 (origin
14187 (method url-fetch)
14188 (uri (pypi-uri "parso" version))
14189 (sha256
14190 (base32
14191 "18p89iwcm8mnf380f92g9w0bhx5km8wxp392vvjcq4y1ld1llw1m"))))
14192 (native-inputs
14193 `(("python-pytest" ,python-pytest)))
14194 (build-system python-build-system)
14195 (home-page "https://github.com/davidhalter/parso")
14196 (synopsis "Python Parser")
14197 (description "Parso is a Python parser that supports error recovery and
14198round-trip parsing for different Python versions (in multiple Python versions).
14199Parso is also able to list multiple syntax errors in your Python file.")
14200 (license license:expat)))
14201
14202(define-public python2-parso
14203 (package-with-python2 python-parso))
14204
14205(define-public python-async-generator
14206 (package
14207 (name "python-async-generator")
94fcbf8d 14208 (version "1.10")
44d10b1f
RW
14209 (source
14210 (origin
14211 (method url-fetch)
14212 (uri (pypi-uri "async_generator" version))
14213 (sha256
14214 (base32
94fcbf8d 14215 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
44d10b1f
RW
14216 (build-system python-build-system)
14217 (native-inputs
14218 `(("python-pytest" ,python-pytest)))
14219 (home-page "https://github.com/python-trio/async_generator")
14220 (synopsis "Async generators and context managers for Python 3.5+")
14221 (description "@code{async_generator} back-ports Python 3.6's native async
14222generators and Python 3.7's context managers into Python 3.5.")
14223 ;; Dual licensed.
14224 (license (list license:expat license:asl2.0))))
14225
14226(define-public python-async-timeout
14227 (package
14228 (name "python-async-timeout")
14229 (version "3.0.1")
14230 (source
14231 (origin
14232 (method url-fetch)
14233 (uri (pypi-uri "async-timeout" version))
14234 (sha256
14235 (base32
14236 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
14237 (build-system python-build-system)
14238 (home-page "https://github.com/aio-libs/async_timeout/")
14239 (synopsis "Timeout context manager for asyncio programs")
14240 (description "@code{async-timeout} provides a timeout timeout context
14241manager compatible with @code{asyncio}.")
14242 (license license:asl2.0)))
14243
14244(define-public python-glob2
14245 (package
14246 (name "python-glob2")
14247 (version "0.6")
8fa2bcc7
TGR
14248 (source
14249 (origin
14250 (method git-fetch)
14251 (uri (git-reference
14252 (url "https://github.com/miracle2k/python-glob2.git")
14253 (commit version)))
14254 (file-name (git-file-name name version))
14255 (sha256
14256 (base32 "1lm1xz3k3l0k1c5bcp9hlzmi3gp5j8dl1k3xhpiq5mnm0xq6n163"))))
44d10b1f
RW
14257 (build-system python-build-system)
14258 (home-page "https://github.com/miracle2k/python-glob2/")
14259 (synopsis "Extended Version of the python buildin glob module")
14260 (description "This is an extended version of the Python
14261@url{http://docs.python.org/library/glob.html, built-in glob module} which
14262adds:
14263
14264@itemize
14265@item The ability to capture the text matched by glob patterns, and return
14266those matches alongside the file names.
14267@item A recursive @code{**} globbing syntax, akin for example to the
14268@code{globstar} option of Bash.
14269@item The ability to replace the file system functions used, in order to glob
14270on virtual file systems.
14271@item Compatible with Python 2 and Python 3 (tested with 3.3).
14272@end itemize
14273
14274Glob2 currently based on the glob code from Python 3.3.1.")
14275 (license license:bsd-2)))
14276
14277(define-public python2-glob2
14278 (package-with-python2 python-glob2))
14279
14280(define-public python-gipc
14281 (package
14282 (name "python-gipc")
14283 (version "0.6.0")
14284 (source
14285 (origin
14286 (method url-fetch)
14287 (uri (pypi-uri "gipc" version ".zip"))
14288 (sha256
14289 (base32
14290 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
14291 (build-system python-build-system)
14292 (native-inputs
14293 `(("unzip" ,unzip)))
14294 (propagated-inputs
14295 `(("python-gevent" ,python-gevent)))
14296 (home-page "http://gehrcke.de/gipc")
14297 (synopsis "Child process management in the context of gevent")
14298 (description "Usage of Python's multiprocessing package in a
14299gevent-powered application may raise problems. With @code{gipc},
14300process-based child processes can safely be created anywhere within a
14301gevent-powered application.")
14302 (license license:expat)))
14303
14304(define-public python2-gipc
14305 (package-with-python2 python-gipc))
14306
14307(define-public python-fusepy
14308 (package
14309 (name "python-fusepy")
14310 (version "2.0.4")
14311 (source
14312 (origin
14313 (method url-fetch)
14314 (uri (pypi-uri "fusepy" version))
14315 (sha256
14316 (base32
14317 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
14318 (build-system python-build-system)
14319 (arguments
14320 `(#:phases
14321 (modify-phases %standard-phases
14322 (add-before 'build 'set-library-file-name
14323 (lambda* (#:key inputs #:allow-other-keys)
14324 (let ((fuse (assoc-ref inputs "fuse")))
14325 (substitute* "fuse.py"
14326 (("find_library\\('fuse'\\)")
14327 (string-append "'" fuse "/lib/libfuse.so'")))
14328 #t))))))
14329 (propagated-inputs
14330 `(("fuse" ,fuse)))
14331 (home-page "https://github.com/fusepy/fusepy")
14332 (synopsis "Simple ctypes bindings for FUSE")
14333 (description "Python module that provides a simple interface to FUSE and
14334MacFUSE. The binding is created using the standard @code{ctypes} library.")
14335 (license license:isc)))
14336
14337(define-public python2-fusepy
14338 (package-with-python2 python-fusepy))
14339
14340(define-public python2-gdrivefs
14341 (package
14342 (name "python2-gdrivefs")
14343 (version "0.14.9")
14344 (source
14345 (origin
14346 (method url-fetch)
14347 (uri (pypi-uri "gdrivefs" version))
14348 (sha256
14349 (base32
14350 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
14351 (build-system python-build-system)
14352 (arguments
14353 `(#:python ,python-2
14354 #:phases
14355 (modify-phases %standard-phases
14356 (add-before 'build 'patch-setup-py
14357 (lambda _
14358 ;; Update requirements from dependency==version
14359 ;; to dependency>=version
14360 (substitute* "gdrivefs/resources/requirements.txt"
14361 (("==") ">="))
14362 #t)))))
14363 (native-inputs
14364 `(("python2-gipc" ,python2-gipc)
14365 ("python2-gevent" ,python2-gevent)
14366 ("python2-greenlet" ,python2-greenlet)
14367 ("python2-httplib2" ,python2-httplib2)
14368 ("python2-uritemplate" ,python2-uritemplate)
14369 ("python2-oauth2client" ,python2-oauth2client)
14370 ("python2-six" ,python2-six)))
14371 (propagated-inputs
14372 `(("python2-dateutil" ,python2-dateutil)
14373 ("python2-fusepy" ,python2-fusepy)
14374 ("python2-google-api-client" ,python2-google-api-client)))
14375 (home-page "https://github.com/dsoprea/GDriveFS")
14376 (synopsis "Mount Google Drive as a local file system")
14377 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
14378under Python 2.7.")
14379 (license license:gpl2)))
14380
14381(define-public pybind11
14382 (package
14383 (name "pybind11")
14384 (version "2.2.4")
14385 (source (origin
14386 (method git-fetch)
14387 (uri (git-reference
14388 (url "https://github.com/pybind/pybind11.git")
14389 (commit (string-append "v" version))))
14390 (sha256
14391 (base32
14392 "0pa79ymcasv8br5ifbx7878id5py2jpjac3i20cqxr6gs9l6ivlv"))
14393 (file-name (git-file-name name version))))
14394 (build-system cmake-build-system)
14395 (native-inputs
14396 `(("python" ,python)
14397 ("python-pytest" ,python-pytest)))
14398 (arguments
14399 `(#:test-target "check"))
14400 (home-page "https://github.com/pybind/pybind11/")
14401 (synopsis "Seamless operability between C++11 and Python")
14402 (description "pybind11 is a lightweight header-only library that exposes
14403C++ types in Python and vice versa, mainly to create Python bindings of
14404existing C++ code. Its goals and syntax are similar to the excellent
14405Boost.Python library by David Abrahams: to minimize boilerplate code in
14406traditional extension modules by inferring type information using compile-time
14407introspection.")
14408 (license license:expat)))
14409
14410(define-public python-fasteners
14411 (package
14412 (name "python-fasteners")
14413 (version "0.14.1")
14414 (source
14415 (origin
14416 (method url-fetch)
14417 (uri (pypi-uri "fasteners" version))
14418 (sha256
14419 (base32
14420 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
14421 (build-system python-build-system)
14422 (propagated-inputs
14423 `(("python-monotonic" ,python-monotonic)
14424 ("python-six" ,python-six)
14425 ("python-testtools" ,python-testtools)))
14426 (home-page "https://github.com/harlowja/fasteners")
14427 (synopsis "Python package that provides useful locks")
14428 (description
14429 "This package provides a Python program that provides following locks:
14430
14431@itemize
14432@item Locking decorator
14433@item Reader-writer locks
14434@item Inter-process locks
14435@item Generic helpers
14436@end itemize\n")
14437 (properties `((python2-variant . ,(delay python2-fasteners))))
14438 (license license:asl2.0)))
14439
14440(define-public python2-fasteners
14441 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
14442 (package
14443 (inherit base)
14444 (propagated-inputs
14445 `(("python2-futures" ,python2-futures)
14446 ,@(package-propagated-inputs base))))))
14447
14448(define-public python-requests-file
14449 (package
14450 (name "python-requests-file")
14451 (version "1.4.3")
14452 (source
14453 (origin
14454 (method url-fetch)
14455 (uri (pypi-uri "requests-file" version))
14456 (sha256
14457 (base32
14458 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
14459 (build-system python-build-system)
14460 (propagated-inputs
14461 `(("python-requests" ,python-requests)
14462 ("python-six" ,python-six)))
14463 (home-page
14464 "https://github.com/dashea/requests-file")
14465 (synopsis "File transport adapter for Requests")
14466 (description
14467 "Requests-File is a transport adapter for use with the Requests Python
52beae7b 14468library to allow local file system access via @code{file://} URLs.")
44d10b1f
RW
14469 (license license:asl2.0)))
14470
14471(define-public python2-requests-file
14472 (package-with-python2 python-requests-file))
14473
14474(define-public python-tldextract
14475 (package
14476 (name "python-tldextract")
14477 (version "2.2.0")
14478 (source
14479 (origin
14480 (method url-fetch)
14481 (uri (pypi-uri "tldextract" version))
14482 (sha256
14483 (base32
14484 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
14485 (build-system python-build-system)
14486 (native-inputs
14487 `(("python-pytest" ,python-pytest)
14488 ("python-responses" ,python-responses)))
14489 (propagated-inputs
14490 `(("python-idna" ,python-idna)
14491 ("python-requests" ,python-requests)
14492 ("python-requests-file" ,python-requests-file)))
14493 (home-page
14494 "https://github.com/john-kurkowski/tldextract")
14495 (synopsis
14496 "Separate the TLD from the registered domain and subdomains of a URL")
14497 (description
14498 "TLDExtract accurately separates the TLD from the registered domain and
14499subdomains of a URL, using the Public Suffix List. By default, this includes
14500the public ICANN TLDs and their exceptions. It can optionally support the
14501Public Suffix List's private domains as well.")
14502 (license license:bsd-3)))
14503
14504(define-public python2-tldextract
14505 (package-with-python2 python-tldextract))
14506
14507(define-public python-pynamecheap
14508 (package
14509 (name "python-pynamecheap")
14510 (version "0.0.3")
14511 (source
14512 (origin
14513 (method url-fetch)
14514 (uri (pypi-uri "PyNamecheap" version))
14515 (sha256
14516 (base32
14517 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
14518 (build-system python-build-system)
14519 (propagated-inputs
14520 `(("python-requests" ,python-requests)))
14521 (home-page
14522 "https://github.com/Bemmu/PyNamecheap")
14523 (synopsis
14524 "Namecheap API client in Python")
14525 (description
14526 "PyNamecheap is a Namecheap API client in Python.")
14527 (license license:expat)))
14528
14529(define-public python2-pynamecheap
14530 (package-with-python2 python-pynamecheap))
14531
14532(define-public python-dns-lexicon
14533 (package
14534 (name "python-dns-lexicon")
14535 (version "2.4.0")
14536 (source
14537 (origin
14538 (method url-fetch)
14539 (uri (pypi-uri "dns-lexicon" version))
14540 (sha256
14541 (base32
14542 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
14543 (build-system python-build-system)
14544 (arguments
14545 `(#:tests? #f)) ;requires internet access
14546 (propagated-inputs
14547 `(("python-future" ,python-future)
14548 ("python-pynamecheap" ,python-pynamecheap)
14549 ("python-requests" ,python-requests)
14550 ("python-tldextract" ,python-tldextract)
14551 ("python-urllib3" ,python-urllib3)))
14552 (home-page "https://github.com/AnalogJ/lexicon")
14553 (synopsis
14554 "Manipulate DNS records on various DNS providers")
14555 (description
14556 "Lexicon provides a way to manipulate DNS records on multiple DNS
14557providers in a standardized way. It has a CLI but it can also be used as a
14558Python library. It was designed to be used in automation, specifically with
14559Let's Encrypt.")
14560 (license license:expat)))
14561
14562(define-public python2-dns-lexicon
14563 (package-with-python2 python-dns-lexicon))
14564
14565(define-public python-commandlines
14566 (package
14567 (name "python-commandlines")
14568 (version "0.4.1")
14569 (source
14570 (origin
14571 (method url-fetch)
14572 (uri (pypi-uri "commandlines" version))
14573 (sha256
14574 (base32
14575 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
14576 (build-system python-build-system)
14577 (home-page "https://github.com/chrissimpkins/commandlines")
14578 (synopsis "Command line argument to object parsing library")
14579 (description
14580 "@code{Commandlines} is a Python library for command line application
14581development that supports command line argument parsing, command string
14582validation testing and application logic.")
14583 (license license:expat)))
14584
14585;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
14586;; python-numba. They have a very unflexible relationship.
14587(define-public python-numba
14588 (package
14589 (name "python-numba")
7757e6d8 14590 (version "0.42.0")
44d10b1f
RW
14591 (source
14592 (origin
14593 (method url-fetch)
14594 (uri (pypi-uri "numba" version))
14595 (sha256
14596 (base32
7757e6d8 14597 "03rqdfx0512lcri2bcpngx5k3jwfbqnanqj3n19c7d6h6hqxvq9x"))))
44d10b1f
RW
14598 (build-system python-build-system)
14599 (arguments
14600 `(#:modules ((guix build utils)
14601 (guix build python-build-system)
14602 (ice-9 ftw)
14603 (srfi srfi-1)
14604 (srfi srfi-26))
14605 #:phases
14606 (modify-phases %standard-phases
14607 (add-after 'unpack 'disable-proprietary-features
14608 (lambda _
14609 (setenv "NUMBA_DISABLE_HSA" "1")
14610 (setenv "NUMBA_DISABLE_CUDA" "1")
14611 #t))
14612 (add-after 'unpack 'remove-failing-tests
14613 (lambda _
14614 ;; FIXME: these tests fail for unknown reasons:
14615 ;; test_non_writable_pycache, test_non_creatable_pycache, and
14616 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
14617 (substitute* "numba/tests/test_dispatcher.py"
14618 (("def test(_non_writable_pycache)" _ m)
14619 (string-append "def guix_skip" m))
14620 (("def test(_non_creatable_pycache)" _ m)
14621 (string-append "def guix_skip" m))
14622 (("def test(_frozen)" _ m)
14623 (string-append "def guix_skip" m)))
14624
14625 ;; These tests fail because we don't run the tests from the build
14626 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
14627 ;; They ar in numba.tests.test_pycc.TestDistutilsSupport.
14628 (substitute* "numba/tests/test_pycc.py"
14629 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
14630 (string-append "def guix_skip" m)))
14631 #t))
14632 (replace 'check
14633 (lambda _
14634 (let ((cwd (getcwd)))
14635 (setenv "PYTHONPATH"
14636 (string-append cwd "/build/"
14637 (find (cut string-prefix? "lib" <>)
14638 (scandir (string-append cwd "/build")))
14639 ":"
14640 (getenv "PYTHONPATH")))
14641 ;; Something is wrong with the PYTHONPATH when running the
14642 ;; tests from the build directory, as it complains about not being
14643 ;; able to import certain modules.
14644 (with-directory-excursion "/tmp"
14645 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
14646 #t)))))
14647 (propagated-inputs
14648 `(("python-llvmlite" ,python-llvmlite)
14649 ("python-numpy" ,python-numpy)
14650 ("python-singledispatch" ,python-singledispatch)))
14651 ;; Needed for tests.
14652 (inputs
14653 `(("python-jinja2" ,python-jinja2)
14654 ("python-pygments" ,python-pygments)))
14655 (home-page "https://numba.pydata.org")
14656 (synopsis "Compile Python code using LLVM")
14657 (description "Numba gives you the power to speed up your applications with
14658high performance functions written directly in Python. With a few
14659annotations, array-oriented and math-heavy Python code can be just-in-time
14660compiled to native machine instructions, similar in performance to C, C++ and
14661Fortran, without having to switch languages or Python interpreters.
14662
14663Numba works by generating optimized machine code using the LLVM compiler
14664infrastructure at import time, runtime, or statically (using the included pycc
14665tool).")
14666 (license license:bsd-3)))
14667
14668(define-public python-anndata
14669 (package
14670 (name "python-anndata")
8c9372c1 14671 (version "0.6.18")
44d10b1f
RW
14672 (source
14673 (origin
14674 (method url-fetch)
14675 (uri (pypi-uri "anndata" version))
14676 (sha256
14677 (base32
8c9372c1 14678 "03x83yjaccbqszj7x4fwwmpil0ai59yx64d1zmf2691za3j03w73"))))
44d10b1f
RW
14679 (build-system python-build-system)
14680 (propagated-inputs
14681 `(("python-h5py" ,python-h5py)
14682 ("python-natsort" ,python-natsort)
14683 ("python-pandas" ,python-pandas)
14684 ("python-scipy" ,python-scipy)))
14685 (home-page "https://github.com/theislab/anndata")
14686 (synopsis "Annotated data for data analysis pipelines")
14687 (description "Anndata is a package for simple (functional) high-level APIs
14688for data analysis pipelines. In this context, it provides an efficient,
14689scalable way of keeping track of data together with learned annotations and
14690reduces the code overhead typically encountered when using a mostly
14691object-oriented library such as @code{scikit-learn}.")
14692 (license license:bsd-3)))
14693
14694(define-public python-dill
14695 (package
14696 (name "python-dill")
c60b15cc 14697 (version "0.2.9")
44d10b1f
RW
14698 (source
14699 (origin
14700 (method url-fetch)
14701 (uri (pypi-uri "dill" version))
14702 (sha256
c60b15cc 14703 (base32 "0vwqyi6hyz2r29zydc78dqymkbc5y7gia16xcdh215cikxph9mpn"))))
44d10b1f 14704 (build-system python-build-system)
c60b15cc 14705 ;; FIXME: The check phase fails with "don't know how to make test from: …".
44d10b1f
RW
14706 (arguments '(#:tests? #f))
14707 (home-page "https://pypi.org/project/dill")
14708 (synopsis "Serialize all of Python")
14709 (description "Dill extends Python's @code{pickle} module for serializing
14710and de-serializing Python objects to the majority of the built-in Python
14711types. Dill provides the user the same interface as the @code{pickle} module,
14712and also includes some additional features. In addition to pickling Python
14713objects, @code{dill} provides the ability to save the state of an interpreter
61985d65 14714session in a single command. Hence, it would be feasible to save a
44d10b1f
RW
14715interpreter session, close the interpreter, ship the pickled file to another
14716computer, open a new interpreter, unpickle the session and thus continue from
14717the saved state of the original interpreter session.")
14718 (license license:bsd-3)))
14719
14720(define-public python-multiprocess
14721 (package
14722 (name "python-multiprocess")
14723 (version "0.70.6.1")
14724 (source
14725 (origin
14726 (method url-fetch)
14727 (uri (pypi-uri "multiprocess" version))
14728 (sha256
14729 (base32
14730 "1ip5caz67b3q0553mr8gm8xwsb8x500jn8ml0gihgyfy52m2ypcq"))))
14731 (build-system python-build-system)
14732 (propagated-inputs
14733 `(("python-dill" ,python-dill)))
14734 (home-page "https://pypi.org/project/multiprocess")
14735 (synopsis "Multiprocessing and multithreading in Python")
14736 (description
14737 "This package is a fork of the multiprocessing Python package, a package
14738which supports the spawning of processes using the API of the standard
14739library's @code{threading} module.")
14740 (license license:bsd-3)))
14741
14742(define-public python-toolz
14743 (package
14744 (name "python-toolz")
14745 (version "0.9.0")
14746 (source
14747 (origin
14748 (method url-fetch)
14749 (uri (pypi-uri "toolz" version))
14750 (sha256
14751 (base32
14752 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
14753 (build-system python-build-system)
14754 ;; FIXME: tests cannot be computed: "Can't perform this operation for
14755 ;; unregistered loader type"
14756 (arguments '(#:tests? #f))
14757 (home-page "https://github.com/pytoolz/toolz/")
14758 (synopsis "List processing tools and functional utilities")
14759 (description
14760 "This package provides a set of utility functions for iterators,
14761functions, and dictionaries.")
14762 (license license:bsd-3)))
14763
14764(define-public python2-toolz
14765 (package-with-python2 python-toolz))
14766
14767(define-public python-cytoolz
14768 (package
14769 (name "python-cytoolz")
14770 (version "0.9.0.1")
14771 (source
14772 (origin
14773 (method url-fetch)
14774 (uri (pypi-uri "cytoolz" version))
14775 (sha256
14776 (base32
14777 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
14778 (build-system python-build-system)
14779 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
14780 ;; 'exceptions'"
14781 (arguments '(#:tests? #f))
14782 (propagated-inputs
14783 `(("python-toolz" ,python-toolz)))
14784 (native-inputs
14785 `(("python-cython" ,python-cython)))
14786 (home-page "https://github.com/pytoolz/cytoolz")
14787 (synopsis "High performance functional utilities")
14788 (description
14789 "The cytoolz package implements the same API as provided by toolz. The
14790main differences are that @code{cytoolz} is faster and cytoolz offers a C API
14791that is accessible to other projects developed in Cython.")
14792 (license license:bsd-3)))
14793
14794(define-public python-sortedcontainers
14795 (package
14796 (name "python-sortedcontainers")
14797 (version "2.0.4")
14798 (source
14799 (origin
14800 (method url-fetch)
14801 (uri (pypi-uri "sortedcontainers" version))
14802 (sha256
14803 (base32
14804 "10hrk2k0hbf9x78vd3f0lj277m1yzfhzzxr0hja718liwb398wk0"))))
14805 (build-system python-build-system)
14806 (native-inputs
14807 `(("python-tox" ,python-tox)))
14808 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
14809 (synopsis "Sorted List, Sorted Dict, Sorted Set")
14810 (description
14811 "This package provides a sorted collections library, written in
14812pure-Python.")
14813 (license license:asl2.0)))
14814
14815(define-public python-cloudpickle
14816 (package
14817 (name "python-cloudpickle")
14818 (version "0.6.1")
14819 (source
14820 (origin
14821 (method url-fetch)
14822 (uri (pypi-uri "cloudpickle" version))
14823 (sha256
14824 (base32
14825 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
14826 (build-system python-build-system)
14827 ;; FIXME: there are 5 errors in 122 tests:
14828 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
14829 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
14830 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
14831 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
14832 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
14833 ;; TypeError: cannot serialize '_io.BufferedRandom' object
14834 (arguments '(#:tests? #f))
14835 (native-inputs
14836 `(("python-pytest" ,python-pytest)
14837 ("python-mock" ,python-mock)
14838 ("python-tornado" ,python-tornado)))
14839 (home-page "https://github.com/cloudpipe/cloudpickle")
14840 (synopsis "Extended pickling support for Python objects")
14841 (description
14842 "Cloudpickle makes it possible to serialize Python constructs not
14843supported by the default pickle module from the Python standard library. It
14844is especially useful for cluster computing where Python expressions are
14845shipped over the network to execute on remote hosts, possibly close to the
14846data.")
14847 (license license:bsd-3)))
14848
14849(define-public python2-cloudpickle
14850 (package-with-python2 python-cloudpickle))
14851
14852(define-public python-locket
14853 (package
14854 (name "python-locket")
14855 (version "0.2.0")
14856 (source
14857 (origin
14858 (method url-fetch)
14859 (uri (pypi-uri "locket" version))
14860 (sha256
14861 (base32
14862 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
14863 (build-system python-build-system)
14864 (home-page "https://github.com/mwilliamson/locket.py")
14865 (synopsis "File-based locks for Python")
14866 (description
14867 "Locket implements a lock that can be used by multiple processes provided
14868they use the same path.")
14869 (license license:bsd-2)))
14870
14871(define-public python2-locket
14872 (package-with-python2 python-locket))
14873
14874(define-public python-blosc
14875 (package
14876 (name "python-blosc")
14877 (version "1.5.1")
14878 (source
14879 (origin
14880 (method url-fetch)
14881 (uri (pypi-uri "blosc" version))
14882 (sha256
14883 (base32
14884 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
14885 (build-system python-build-system)
14886 ;; FIXME: all tests pass, but then this error is printed:
14887 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
14888 (arguments '(#:tests? #f))
14889 (propagated-inputs
14890 `(("python-numpy" ,python-numpy)))
14891 (home-page "https://github.com/blosc/python-blosc")
14892 (synopsis "Python wrapper for the Blosc data compressor library")
14893 (description "Blosc is a high performance compressor optimized for binary
14894data. It has been designed to transmit data to the processor cache faster
14895than the traditional, non-compressed, direct memory fetch approach via a
14896@code{memcpy()} system call.
14897
14898Blosc works well for compressing numerical arrays that contains data with
14899relatively low entropy, like sparse data, time series, grids with
14900regular-spaced values, etc.
14901
14902This Python package wraps the Blosc library.")
14903 (license license:bsd-3)))
14904
14905(define-public python2-blosc
14906 (package-with-python2 python-blosc))
14907
14908(define-public python-partd
14909 (package
14910 (name "python-partd")
14911 (version "0.3.9")
14912 (source
14913 (origin
14914 (method url-fetch)
14915 (uri (pypi-uri "partd" version))
14916 (sha256
14917 (base32
14918 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
14919 (build-system python-build-system)
14920 (propagated-inputs
14921 `(("python-blosc" ,python-blosc)
14922 ("python-locket" ,python-locket)
14923 ("python-numpy" ,python-numpy)
14924 ("python-pandas" ,python-pandas)
14925 ("python-pyzmq" ,python-pyzmq)
14926 ("python-toolz" ,python-toolz)))
14927 (home-page "https://github.com/dask/partd/")
14928 (synopsis "Appendable key-value storage")
14929 (description "Partd stores key-value pairs. Values are raw bytes. We
14930append on old values. Partd excels at shuffling operations.")
14931 (license license:bsd-3)))
14932
14933(define-public python2-partd
14934 (package-with-python2 python-partd))
14935
14936(define-public python-dask
14937 (package
14938 (name "python-dask")
75cc5359 14939 (version "1.2.0")
44d10b1f
RW
14940 (source
14941 (origin
14942 (method url-fetch)
14943 (uri (pypi-uri "dask" version))
14944 (sha256
14945 (base32
75cc5359 14946 "1y0dqcp72ixwblgway0jpvfirlxfcmwrjiivdq96firj1hw127sd"))))
44d10b1f
RW
14947 (build-system python-build-system)
14948 ;; A single test out of 5000+ fails. This test is marked as xfail when
14949 ;; pytest-xdist is used.
14950 (arguments
14951 `(#:phases
14952 (modify-phases %standard-phases
14953 (add-after 'unpack 'disable-broken-test
14954 (lambda _
14955 (substitute* "dask/tests/test_threaded.py"
14956 (("def test_interrupt\\(\\)" m)
14957 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
14958 m)))
14959 (when (which "python2")
14960 ;; This test fails with recent Pandas:
14961 ;; <https://github.com/dask/dask/issues/3794>.
14962 (substitute* "dask/dataframe/tests/test_dataframe.py"
14963 (("def test_info\\(\\)" m)
14964 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
14965 m))))
14966 #t))
14967 (replace 'check
14968 (lambda _ (invoke "pytest" "-vv"))))))
14969 (propagated-inputs
14970 `(("python-cloudpickle" ,python-cloudpickle)
14971 ("python-numpy" ,python-numpy)
14972 ("python-pandas" ,python-pandas)
14973 ("python-partd" ,python-partd)
14974 ("python-toolz" ,python-toolz)
14975 ("python-pyyaml" ,python-pyyaml)))
14976 (native-inputs
14977 `(("python-pytest" ,python-pytest)
14978 ("python-pytest-runner" ,python-pytest-runner)))
14979 (home-page "https://github.com/dask/dask/")
14980 (synopsis "Parallel computing with task scheduling")
14981 (description
14982 "Dask is a flexible parallel computing library for analytics. It
14983consists of two components: dynamic task scheduling optimized for computation,
14984and large data collections like parallel arrays, dataframes, and lists that
14985extend common interfaces like NumPy, Pandas, or Python iterators to
14986larger-than-memory or distributed environments. These parallel collections
14987run on top of the dynamic task schedulers. ")
14988 (license license:bsd-3)))
14989
14990(define-public python2-dask
14991 (package-with-python2 python-dask))
14992
14993(define-public python-ilinkedlist
14994 (package
14995 (name "python-ilinkedlist")
14996 (version "0.4.0")
14997 (source
14998 (origin
14999 (method url-fetch)
15000 (uri (pypi-uri "ilinkedlist" version))
15001 (sha256
15002 (base32
15003 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
15004 (build-system python-build-system)
15005 (native-inputs `(("python-pytest" ,python-pytest)))
15006 (inputs `(("python" ,python)))
15007 (home-page "https://github.com/luther9/ilinkedlist-py")
15008 (synopsis "Immutable linked list library")
15009 (description
15010 "This is a implementation of immutable linked lists for Python. It
15011contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
15012Since a linked list is treated as immutable, it is hashable, and its length
15013can be retrieved in constant time. Some of the terminology is inspired by
15014LISP. It is possible to create an improper list by creating a @code{Pair}
15015with a non-list @code{cdr}.")
15016 (license license:gpl3+)))
15017
15018(define-public python-readlike
15019 (package
15020 (name "python-readlike")
15021 (version "0.1.3")
15022 (source
15023 (origin
15024 (method url-fetch)
15025 (uri (pypi-uri "readlike" version))
15026 (sha256
15027 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
15028 (build-system python-build-system)
15029 (home-page "https://github.com/jangler/readlike")
15030 (synopsis "GNU Readline-like line editing module")
15031 (description
15032 "This Python module provides line editing functions similar to the default
15033Emacs-style ones of GNU Readline. Unlike the Python standard library's
15034@code{readline} package, this one allows access to those capabilties in settings
15035outside of a standard command-line interface. It is especially well-suited to
15036interfacing with Urwid, due to a shared syntax for describing key inputs.
15037
15038Currently, all stateless Readline commands are implemented. Yanking and history
15039are not supported.")
15040 (license license:expat)))
15041
15042(define-public python2-readlike
15043 (package-with-python2 python-readlike))
15044
15045(define-public python-reparser
15046 (package
15047 (name "python-reparser")
15048 (version "1.4.3")
15049 (source
15050 (origin
15051 (method url-fetch)
15052 (uri (pypi-uri "ReParser" version))
15053 (sha256
15054 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
15055 (build-system python-build-system)
15056 (home-page "https://github.com/xmikos/reparser")
15057 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
15058 (description
15059 "This Python library provides a simple lexer/parser for inline markup based
15060on regular expressions.")
15061 (license license:expat)))
15062
15063(define-public python2-reparser
15064 (let ((reparser (package-with-python2
15065 (strip-python2-variant python-reparser))))
15066 (package (inherit reparser)
15067 (propagated-inputs
15068 `(("python2-enum34" ,python2-enum34)
15069 ,@(package-propagated-inputs reparser))))))
15070
15071(define-public python-precis-i18n
15072 (package
15073 (name "python-precis-i18n")
15074 (version "1.0.0")
15075 (source
15076 (origin
15077 (method url-fetch)
15078 (uri (pypi-uri "precis_i18n" version))
15079 (sha256
15080 (base32
15081 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
15082 (build-system python-build-system)
15083 (home-page "https://github.com/byllyfish/precis_i18n")
15084 (synopsis "Implementation of the PRECIS framework")
15085 (description
15086 "This module implements the PRECIS Framework as described in RFC 8264,
15087RFC 8265 and RFC 8266.")
15088 (license license:expat)))
15089
d0446c4b
RW
15090(define-public python-absl-py
15091 (package
15092 (name "python-absl-py")
15093 (version "0.6.1")
15094 (source
15095 (origin
15096 (method url-fetch)
15097 (uri (pypi-uri "absl-py" version))
15098 (sha256
15099 (base32
15100 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
15101 (build-system python-build-system)
15102 (propagated-inputs
15103 `(("python-six" ,python-six)))
15104 (home-page "https://github.com/abseil/abseil-py")
15105 (synopsis "Abseil Python common libraries")
15106 (description
15107 "This package provides the Abseil Python Common Libraries, a collection
15108of Python libraries for building Python applications.")
15109 (license license:asl2.0)))
15110
81bed4e9
RW
15111(define-public python-astor
15112 (package
15113 (name "python-astor")
15114 (version "0.7.1")
15115 (source
15116 (origin
15117 (method url-fetch)
15118 (uri (pypi-uri "astor" version))
15119 (sha256
15120 (base32
15121 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
15122 (build-system python-build-system)
15123 ;; FIXME: There are two errors and two test failures.
15124 (arguments `(#:tests? #f))
15125 (home-page "https://github.com/berkerpeksag/astor")
39ee82ff 15126 (synopsis "Read and write Python ASTs")
81bed4e9 15127 (description "Astor is designed to allow easy manipulation of Python
39ee82ff 15128source via the Abstract Syntax Tree.")
81bed4e9
RW
15129 (license license:bsd-3)))
15130
39ee82ff
RW
15131(define-public python2-astor
15132 (package-with-python2 python-astor))
15133
22e623ae
RW
15134(define-public python-grpcio
15135 (package
15136 (name "python-grpcio")
15137 (version "1.17.1")
15138 (source
15139 (origin
15140 (method url-fetch)
15141 (uri (pypi-uri "grpcio" version))
15142 (sha256
15143 (base32
15144 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
15145 (build-system python-build-system)
15146 (propagated-inputs
15147 `(("python-six" ,python-six)))
15148 (home-page "https://grpc.io")
15149 (synopsis "HTTP/2-based RPC framework")
15150 (description "This package provides a Python library for communicating
15151with the HTTP/2-based RPC framework gRPC.")
15152 (license license:asl2.0)))
15153
79869f80
RW
15154(define-public python-astunparse
15155 (package
15156 (name "python-astunparse")
15157 (version "1.6.1")
15158 (source
15159 (origin
15160 (method url-fetch)
15161 (uri (pypi-uri "astunparse" version))
15162 (sha256
15163 (base32
15164 "1jhidwyrqn17avqh9xnnm3wd7q7aahaq009cba67g86y6gxicyyj"))))
15165 (build-system python-build-system)
15166 (arguments '(#:tests? #f)) ; there are none
15167 (propagated-inputs
15168 `(("python-six" ,python-six)
15169 ("python-wheel" ,python-wheel)))
15170 (home-page "https://github.com/simonpercivall/astunparse")
15171 (synopsis "AST unparser for Python")
15172 (description "This package provides an AST unparser for Python. It is a
15173factored out version of @code{unparse} found in the Python source
15174distribution.")
15175 (license license:bsd-3)))
15176
2884aac0
RW
15177(define-public python-gast
15178 (package
15179 (name "python-gast")
bd300261 15180 (version "0.2.2")
2884aac0
RW
15181 (source
15182 (origin
15183 (method url-fetch)
15184 (uri (pypi-uri "gast" version))
15185 (sha256
bd300261 15186 (base32 "1w5dzdb3gpcfmd2s0b93d8gff40a1s41rv31458z14inb3s9v4zy"))))
2884aac0
RW
15187 (build-system python-build-system)
15188 (propagated-inputs
15189 `(("python-astunparse" ,python-astunparse)))
15190 (home-page "https://pypi.org/project/gast/")
15191 (synopsis "Generic Python AST that abstracts the underlying Python version")
15192 (description
15193 "GAST provides a compatibility layer between the AST of various Python
15194versions, as produced by @code{ast.parse} from the standard @code{ast}
15195module.")
15196 (license license:bsd-3)))
15197
44d10b1f
RW
15198(define-public python-wikidata
15199 (package
15200 (name "python-wikidata")
15201 (version "0.6.1")
15202 (source
15203 (origin
15204 (method url-fetch)
15205 (uri (pypi-uri "Wikidata" version))
15206 (sha256
15207 (base32
15208 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
15209 (build-system python-build-system)
15210 (propagated-inputs
15211 `(("python-babel" ,python-babel)))
15212 (home-page "https://github.com/dahlia/wikidata")
15213 (synopsis "Wikidata client library")
15214 (description
15215 "This package provides a Python interface to
15216@url{https://www.wikidata.org/, Wikidata}.")
15217 (properties '((upstream-name . "Wikidata")))
15218 (license license:gpl3+)))
15219
15220(define-public python-doctest-ignore-unicode
15221 (package
15222 (name "python-doctest-ignore-unicode")
15223 (version "0.1.2")
15224 (source
15225 (origin
15226 (method url-fetch)
15227 (uri (pypi-uri "doctest-ignore-unicode" version))
15228 (sha256
15229 (base32
15230 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
15231 (build-system python-build-system)
15232 (native-inputs
15233 `(("python-nose" ,python-nose)))
15234 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
15235 (synopsis "Ignore Unicode literal prefixes in doctests")
15236 (description
15237 "This package adds support for a flag to ignore Unicode literal prefixes
15238in doctests.")
15239 (license license:asl2.0)))
15240
15241(define-public python-attr
15242 (package
15243 (name "python-attr")
15244 (version "0.3.1")
15245 (source
15246 (origin
15247 (method url-fetch)
15248 (uri (pypi-uri "attr" version))
15249 (sha256
15250 (base32
15251 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
15252 (build-system python-build-system)
15253 (home-page "https://github.com/denis-ryzhkov/attr")
15254 (synopsis "Decorator for attributes of target function or class")
15255 (description "Simple decorator to set attributes of target function or
15256class in a @acronym{DRY, Don't Repeat Yourself} way.")
15257 (license license:expat)))
f98232a3
VC
15258
15259(define-public python-construct
15260 (package
15261 (name "python-construct")
15262 (version "2.9.45")
15263 (source
15264 (origin
15265 (method url-fetch)
15266 (uri (pypi-uri "construct" version))
15267 (sha256
15268 (base32
15269 "130iy05awzigm2xah2yvlmb08mac5bi4gzr5m3g7k1krs3ps0w92"))))
15270 (build-system python-build-system)
15271 (arguments
15272 `(#:tests? #f)) ; No tests exist.
15273 (propagated-inputs
15274 `(("python-extras" ,python-extras)
15275 ("python-arrow" ,python-arrow)
15276 ("python-numpy" ,python-numpy)
15277 ("python-ruamel.yaml" ,python-ruamel.yaml)))
15278 (home-page "http://construct.readthedocs.io")
15279 (synopsis "Declarative and symmetrical parser and builder for binary data")
15280 (description
15281 "This package provides both simple, atomic constructs (such as
15282integers of various sizes), as well as composite ones which allow you
15283form hierarchical and sequential structures of increasing complexity.
15284It features bit and byte granularity, easy debugging and testing, an
15285easy-to-extend subclass system, and lots of primitive constructs to
15286make your work easier.")
15287 (license license:expat)))
b742c006
LF
15288
15289(define-public python-humanize
15290 (package
15291 (name "python-humanize")
15292 (version "0.5.1")
15293 (source
15294 (origin
15295 (method url-fetch)
15296 (uri (pypi-uri "humanize" version))
15297 (sha256
15298 (base32
15299 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
15300 (arguments
15301 '(#:tests? #f)) ; tests not in pypi archive
15302 (build-system python-build-system)
15303 (home-page "https://github.com/jmoiron/humanize")
15304 (synopsis "Print numerical information in a human-readable form")
15305 (description "This package provides a Python module that displays numbers
15306and dates in \"human readable\" forms. For example, it would display
15307\"12345591313\" as \"12.3 billion\".")
15308 (license license:expat)))
d5bbf66d
LF
15309
15310(define-public python-txaio
15311 (package
15312 (name "python-txaio")
15313 (version "18.8.1")
15314 (source
15315 (origin
15316 (method url-fetch)
15317 (uri (pypi-uri "txaio" version))
15318 (sha256
15319 (base32
15320 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
15321 (build-system python-build-system)
15322 (propagated-inputs
15323 `(("python-twisted" ,python-twisted)
15324 ("python-six" ,python-six)))
15325 (home-page "https://github.com/crossbario/txaio")
15326 (synopsis "Compatibility layer between Python asyncio and Twisted")
15327 (description "Txaio provides a compatibility layer between the Python
15328@code{asyncio} module and @code{Twisted}.")
15329 (license license:expat)))
963dfd3a
RW
15330
15331(define-public python-toolshed
15332 (package
15333 (name "python-toolshed")
15334 (version "0.4.6")
15335 (source
15336 (origin
15337 (method url-fetch)
15338 (uri (pypi-uri "toolshed" version))
15339 (sha256
15340 (base32
15341 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
15342 (build-system python-build-system)
15343 (native-inputs
15344 `(("python-nose" ,python-nose)))
15345 (home-page "https://github.com/brentp/toolshed/")
15346 (synopsis "Collection of modules and functions for working with data")
15347 (description "This is a collection of well-tested, simple modules and
15348functions that aim to reduce boilerplate when working with data.")
15349 (license license:bsd-2)))
c91ecf2d
RW
15350
15351(define-public python-annoy
15352 (package
15353 (name "python-annoy")
15354 (version "1.15.1")
15355 (source
15356 (origin
15357 (method url-fetch)
15358 (uri (pypi-uri "annoy" version))
15359 (sha256
15360 (base32
15361 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
15362 (build-system python-build-system)
15363 (native-inputs
15364 `(("python-nose" ,python-nose)))
15365 (home-page "https://github.com/spotify/annoy/")
15366 (synopsis "Approximate nearest neighbors library")
15367 (description
15368 "Annoy is a C++ library with Python bindings to search for points in
15369space that are close to a given query point. It also creates large read-only
15370file-based data structures that are @code{mmap}ped into memory so that many
15371processes may share the same data.")
15372 (license license:asl2.0)))
412342d1 15373
79bfa422
DM
15374(define-public python-pylzma
15375 (package
15376 (name "python-pylzma")
15377 (version "0.5.0")
15378 (source
15379 (origin
15380 (method url-fetch)
15381 (uri (pypi-uri "pylzma" version))
15382 (sha256
15383 (base32
15384 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
15385 (build-system python-build-system)
15386 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
15387 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
15388 (description "This package provides Python bindings for the LZMA library
15389by Igor Pavlov.")
15390 (license license:lgpl2.1+)))
15391
15392(define-public python2-pylzma
15393 (package-with-python2 python-pylzma))