gnu: Add python-bumpversion.
[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>
29;;; Copyright © 2016, 2017, 2018 Marius Bakke <mbakke@fastmail.com>
30;;; Copyright © 2016, 2017 Stefan Reichör <stefan@xsteve.at>
31;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
32;;; Copyright © 2016, 2017 Alex Vong <alexvong1995@gmail.com>
33;;; Copyright © 2016, 2017, 2018 Arun Isaac <arunisaac@systemreboot.net>
34;;; Copyright © 2016, 2017, 2018 Julien Lepiller <julien@lepiller.eu>
217ea1a1 35;;; Copyright © 2016, 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
44d10b1f
RW
36;;; Copyright © 2016, 2017 Thomas Danckaert <post@thomasdanckaert.be>
37;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
38;;; Copyright © 2017 Frederick M. Muriithi <fredmanglis@gmail.com>
39;;; Copyright © 2017, 2018 Adriano Peluso <catonano@gmail.com>
40;;; Copyright © 2017 Ben Sturmfels <ben@sturm.com.au>
41;;; Copyright © 2017, 2018 Mathieu Othacehe <m.othacehe@gmail.com>
42;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.org>
43;;; Copyright © 2017 Roel Janssen <roel@gnu.org>
44;;; Copyright © 2017, 2018 Kei Kebreau <kkebreau@posteo.net>
45;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
46;;; Copyright © 2017 Muriithi Frederick Muriuki <fredmanglis@gmail.com>
47;;; Copyright © 2017 Brendan Tildesley <brendan.tildesley@openmailbox.org>
48;;; Copyright © 2018 Ethan R. Jones <ethanrjones97@gmail.com
49;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
50;;; Copyright © 2018 Vijayalakshmi Vedantham <vijimay12@gmail.com>
51;;; Copyright © 2018 Mathieu Lirzin <mthl@gnu.org>
52;;; Copyright © 2018 Adam Massmann <massmannak@gmail.com>
53;;; Copyright © 2016, 2018 Tomáš Čech <sleep_walker@gnu.org>
412342d1 54;;; Copyright © 2018, 2019 Nicolas Goaziou <mail@nicolasgoaziou.fr>
44d10b1f
RW
55;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
56;;; Copyright © 2018 Clément Lassieur <clement@lassieur.org>
4caf37b0 57;;; Copyright © 2018, 2019 Maxim Cournoyer <maxim.cournoyer@gmail.com>
44d10b1f
RW
58;;; Copyright © 2018 Luther Thompson <lutheroto@gmail.com>
59;;; Copyright © 2018 Vagrant Cascadian <vagrant@debian.org>
a9ba0a31 60;;; Copyright © 2019 Brett Gilio <brettg@posteo.net>
a91f4eba 61;;; Copyright © 2019 Sam <smbaines8@gmail.com>
44d10b1f
RW
62;;;
63;;; This file is part of GNU Guix.
64;;;
65;;; GNU Guix is free software; you can redistribute it and/or modify it
66;;; under the terms of the GNU General Public License as published by
67;;; the Free Software Foundation; either version 3 of the License, or (at
68;;; your option) any later version.
69;;;
70;;; GNU Guix is distributed in the hope that it will be useful, but
71;;; WITHOUT ANY WARRANTY; without even the implied warranty of
72;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
73;;; GNU General Public License for more details.
74;;;
75;;; You should have received a copy of the GNU General Public License
76;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
77
78(define-module (gnu packages python-xyz)
79 #:use-module ((guix licenses) #:prefix license:)
80 #:use-module (gnu packages)
81 #:use-module (gnu packages algebra)
82 #:use-module (gnu packages adns)
83 #:use-module (gnu packages attr)
84 #:use-module (gnu packages backup)
85 #:use-module (gnu packages bash)
86 #:use-module (gnu packages check)
87 #:use-module (gnu packages compression)
88 #:use-module (gnu packages crypto)
89 #:use-module (gnu packages databases)
90 #:use-module (gnu packages file)
91 #:use-module (gnu packages fontutils)
92 #:use-module (gnu packages gcc)
93 #:use-module (gnu packages geo)
94 #:use-module (gnu packages ghostscript)
95 #:use-module (gnu packages gl)
96 #:use-module (gnu packages glib)
97 #:use-module (gnu packages graphviz)
98 #:use-module (gnu packages graphics)
99 #:use-module (gnu packages gstreamer)
100 #:use-module (gnu packages gtk)
101 #:use-module (gnu packages icu4c)
102 #:use-module (gnu packages image)
103 #:use-module (gnu packages imagemagick)
104 #:use-module (gnu packages libevent)
105 #:use-module (gnu packages libffi)
106 #:use-module (gnu packages linux)
107 #:use-module (gnu packages llvm)
108 #:use-module (gnu packages man)
109 #:use-module (gnu packages maths)
42f0b0c2 110 #:use-module (gnu packages monitoring)
44d10b1f
RW
111 #:use-module (gnu packages multiprecision)
112 #:use-module (gnu packages networking)
113 #:use-module (gnu packages ncurses)
114 #:use-module (gnu packages openstack)
115 #:use-module (gnu packages pcre)
116 #:use-module (gnu packages perl)
117 #:use-module (gnu packages pkg-config)
118 #:use-module (gnu packages python)
d362b11d 119 #:use-module (gnu packages python-check)
44d10b1f
RW
120 #:use-module (gnu packages python-crypto)
121 #:use-module (gnu packages python-web)
122 #:use-module (gnu packages qt)
123 #:use-module (gnu packages readline)
124 #:use-module (gnu packages sdl)
125 #:use-module (gnu packages search)
126 #:use-module (gnu packages shells)
127 #:use-module (gnu packages ssh)
128 #:use-module (gnu packages terminals)
129 #:use-module (gnu packages tex)
130 #:use-module (gnu packages texinfo)
131 #:use-module (gnu packages time)
132 #:use-module (gnu packages tls)
133 #:use-module (gnu packages version-control)
134 #:use-module (gnu packages video)
135 #:use-module (gnu packages web)
136 #:use-module (gnu packages base)
137 #:use-module (gnu packages xml)
138 #:use-module (gnu packages xorg)
139 #:use-module (gnu packages xdisorg)
140 #:use-module (gnu packages tcl)
141 #:use-module (gnu packages bdw-gc)
f98232a3 142 #:use-module (gnu packages serialization)
44d10b1f
RW
143 #:use-module (guix packages)
144 #:use-module (guix download)
145 #:use-module (guix git-download)
a042d348 146 #:use-module (guix hg-download)
44d10b1f
RW
147 #:use-module (guix utils)
148 #:use-module (guix build-system gnu)
149 #:use-module (guix build-system cmake)
150 #:use-module (guix build-system python)
151 #:use-module (guix build-system trivial)
152 #:use-module (srfi srfi-1)
153 #:use-module (srfi srfi-26))
154
155(define-public python-psutil
156 (package
157 (name "python-psutil")
158 (version "5.4.3")
159 (source
160 (origin
161 (method url-fetch)
162 (uri (pypi-uri "psutil" version))
163 (sha256
164 (base32
165 "063v69x7spyclyaxrd3gmzj3p16q5ayg97xqhwb1kyn22a9pwip2"))))
166 (build-system python-build-system)
167 (arguments
168 ;; FIXME: some tests does not return and times out.
169 '(#:tests? #f))
170 (home-page "https://www.github.com/giampaolo/psutil")
171 (synopsis "Library for retrieving information on running processes")
172 (description
173 "psutil (Python system and process utilities) is a library for retrieving
174information on running processes and system utilization (CPU, memory, disks,
175network) in Python. It is useful mainly for system monitoring, profiling and
176limiting process resources and management of running processes. It implements
177many functionalities offered by command line tools such as: ps, top, lsof,
178netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
179pidof, tty, taskset, pmap.")
180 (properties `((python2-variant . ,(delay python2-psutil))))
181 (license license:bsd-3)))
182
183(define-public python2-psutil
184 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
185 (package
186 (inherit base)
187 (propagated-inputs
188 `(("python2-enum34" ,python2-enum34) ;optional
189 ,@(package-propagated-inputs base))))))
190
191(define-public python-shapely
192 (package
193 (name "python-shapely")
194 (version "1.6.3")
195 (source
196 (origin
197 (method url-fetch)
198 (uri (pypi-uri "Shapely" version))
199 (sha256
200 (base32
201 "0svc58dzcw9gj92b4sgq35sdxkf85z0qwlzxarkzq4bp3h8jy58l"))))
202 (build-system python-build-system)
203 (native-inputs
204 `(("python-cython" ,python-cython)
205 ("python-matplotlib" ,python-matplotlib)
206 ("python-pytest" ,python-pytest)
207 ("python-pytest-cov" ,python-pytest-cov)))
208 (inputs
209 `(("geos" ,geos)))
210 (propagated-inputs
211 `(("python-numpy" ,python-numpy)))
212 (arguments
213 `(#:phases
214 (modify-phases %standard-phases
215 (add-after 'unpack 'patch-geos-path
216 (lambda* (#:key inputs #:allow-other-keys)
217 (let ((geos (assoc-ref inputs "geos"))
218 (glibc (assoc-ref inputs ,(if (%current-target-system)
219 "cross-libc" "libc"))))
220 (substitute* "shapely/geos.py"
221 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
222 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
223 geos "/lib/libgeos_c.so'])"))
224 (("free = load_dll\\('c'\\)\\.free")
225 (string-append "free = load_dll('c', fallbacks=['"
226 glibc "/lib/libc.so.6']).free"))))
227 #t)))))
228 (home-page "https://github.com/Toblerity/Shapely")
229 (synopsis "Library for the manipulation and analysis of geometric objects")
230 (description "Shapely is a Python package for manipulation and analysis of
231planar geometric objects. It is based on the @code{GEOS} library.")
232 (license license:bsd-3)))
233
a91f4eba
S
234(define-public python-shortuuid
235 (package
236 (name "python-shortuuid")
237 (version "0.5.0")
238 (source
239 (origin
240 (method url-fetch)
241 (uri (pypi-uri "shortuuid" version))
242 (sha256
243 (base32
244 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
245 (build-system python-build-system)
246 (native-inputs
247 `(("python-pep8" ,python-pep8)))
248 (home-page "https://github.com/skorokithakis/shortuuid")
249 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
250 (description
251 "@code{shortuuid} is a Python library for generating concise, unambiguous
252and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
253module and then similar looking characters are removed.")
254 (license license:bsd-3)))
255
44d10b1f
RW
256(define-public python-logwrap
257 (package
258 (name "python-logwrap")
259 (version "3.2.1")
260 (source
261 (origin
262 (method url-fetch)
263 (uri (pypi-uri "logwrap" version ".zip"))
264 (sha256
265 (base32
266 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
267 (build-system python-build-system)
268 (propagated-inputs
269 `(("python-six" ,python-six)
270 ("python-typing" ,python-typing)))
271 (native-inputs
272 `(("unzip" ,unzip)
273 ("python-cython" ,python-cython)
274 ("python-pytest" ,python-pytest)
275 ("python-pytest-cov" ,python-pytest-cov)
276 ("python-pytest-runner" ,python-pytest-runner)))
277 (home-page "https://github.com/penguinolog/logwrap")
278 (synopsis "Decorator for logging function arguments")
279 (description "This package provides a decorator to log function arguments
280and function call return values in a human-readable way.")
281 (license license:asl2.0)))
282
283(define-public python2-shapely
284 (package-with-python2 python-shapely))
285
286(define-public python-clyent
287 (package
288 (name "python-clyent")
289 (version "1.2.1")
290 (source
291 (origin
292 (method url-fetch)
293 (uri (pypi-uri "clyent" version))
294 (sha256
295 (base32
296 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
297 (build-system python-build-system)
298 (native-inputs
299 `(("python-mock" ,python-mock)))
300 (home-page "https://github.com/binstar/clyent")
301 (synopsis "Command line client library")
302 (description "Clyent is a Python command line utiliy library. It is used
303by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
304 (license license:bsd-3)))
305
306(define-public python2-clyent
307 (package-with-python2 python-clyent))
308
309(define-public python-babel
310 (package
311 (name "python-babel")
312 (version "2.6.0")
313 (source
314 (origin
315 (method url-fetch)
316 (uri (pypi-uri "Babel" version))
317 (sha256
318 (base32
319 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))
320 (build-system python-build-system)
321 (native-inputs
322 `(("python-freezegun" ,python-freezegun)
323 ("python-pytest" ,python-pytest)))
324 (propagated-inputs
325 `(("python-pytz" ,python-pytz)))
326 (arguments
327 `(#:phases (modify-phases %standard-phases
328 (replace 'check
329 (lambda _ (invoke "pytest" "-vv"))))))
330 (home-page "http://babel.pocoo.org/")
331 (synopsis
332 "Tools for internationalizing Python applications")
333 (description
334 "Babel is composed of two major parts:
335- tools to build and work with gettext message catalogs
336- a Python interface to the CLDR (Common Locale Data Repository), providing
337access to various locale display names, localized number and date formatting,
338etc. ")
339 (license license:bsd-3)))
340
341(define-public python2-babel
342 (package-with-python2 python-babel))
343
344(define-public python2-backport-ssl-match-hostname
345 (package
346 (name "python2-backport-ssl-match-hostname")
347 (version "3.5.0.1")
348 (source
349 (origin
350 (method url-fetch)
2c1f0d09 351 (uri (pypi-uri "backports.ssl_match_hostname" version))
44d10b1f
RW
352 (sha256
353 (base32
354 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
355 (build-system python-build-system)
356 (arguments
357 `(#:python ,python-2
358 #:tests? #f)) ; no test target
359 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
360 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
361 (description
362 "This backport brings the ssl.match_hostname() function to users of
363earlier versions of Python. The function checks the hostname in the
364certificate returned by the server to which a connection has been established,
365and verifies that it matches the intended target hostname.")
366 (license license:psfl)))
367
368(define-public python-hdf4
369 (package
370 (name "python-hdf4")
371 (version "0.9")
372 (source
373 (origin
374 (method url-fetch)
375 (uri (pypi-uri name version))
376 (sha256
377 (base32
378 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
379 (build-system python-build-system)
380 (native-inputs `(("nose" ,python-nose)))
381 (propagated-inputs `(("numpy" ,python-numpy)))
382 (inputs
383 `(("hdf4" ,hdf4)
384 ("libjpeg" ,libjpeg)
385 ("zlib" ,zlib)))
386 (arguments
387 `(#:phases
388 (modify-phases %standard-phases
389 (replace 'check
390 (lambda _
391 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
392 ;; on to import numpy. Somehow this works on their CI system.
393 ;; Let's just manage PYTHONPATH here instead.
394 (substitute* "runexamples.sh"
395 (("export PYTHONPATH=.*") ""))
396 (setenv "PYTHONPATH"
397 (string-append (getcwd) ":"
398 (getenv "PYTHONPATH")))
399 (invoke "./runexamples.sh")
400 (invoke "nosetests" "-v"))))))
401 (home-page "https://github.com/fhs/python-hdf4")
402 (synopsis "Python interface to the NCSA HDF4 library")
403 (description
404 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
405which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
406NetCDF files can also be read and modified. Python-HDF4 is a fork of
407@url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
408 (license license:expat)))
409
410(define-public python2-hdf4
411 (package-with-python2 python-hdf4))
412
413(define-public python-h5py
414 (package
415 (name "python-h5py")
416 (version "2.8.0")
417 (source
418 (origin
419 (method url-fetch)
420 (uri (pypi-uri "h5py" version))
421 (sha256
422 (base32
423 "0mdr6wrq02ac93m1aqx9kad0ppfzmm4imlxqgyy1x4l7hmdcc9p6"))))
424 (build-system python-build-system)
425 (arguments
426 `(#:tests? #f ; no test target
427 #:phases
428 (modify-phases %standard-phases
429 (add-after 'unpack 'fix-hdf5-paths
430 (lambda* (#:key inputs #:allow-other-keys)
431 (let ((prefix (assoc-ref inputs "hdf5")))
432 (substitute* "setup_build.py"
433 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
434 (string-append "['" prefix "/lib" "']"))
435 (("'/opt/local/include', '/usr/local/include'")
436 (string-append "'" prefix "/include" "'")))
437 (substitute* "setup_configure.py"
438 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
439 (string-append "['" prefix "/lib" "']")))
440 #t))))))
441 (propagated-inputs
442 `(("python-six" ,python-six)
443 ("python-numpy" ,python-numpy)))
444 (inputs
445 `(("hdf5" ,hdf5)))
446 (native-inputs
447 `(("python-cython" ,python-cython)
448 ("python-pkgconfig" ,python-pkgconfig)))
449 (home-page "http://www.h5py.org/")
450 (synopsis "Read and write HDF5 files from Python")
451 (description
452 "The h5py package provides both a high- and low-level interface to the
453HDF5 library from Python. The low-level interface is intended to be a
454complete wrapping of the HDF5 API, while the high-level component supports
455access to HDF5 files, datasets and groups using established Python and NumPy
456concepts.")
457 (license license:bsd-3)))
458
459(define-public python2-h5py
460 (package-with-python2 python-h5py))
461
8b89dedc
RW
462(define-public python-sh
463 (package
464 (name "python-sh")
465 (version "1.12.14")
466 (source
467 (origin
468 (method url-fetch)
469 (uri (pypi-uri "sh" version))
470 (sha256
471 (base32
472 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
473 (build-system python-build-system)
fd3638d8
EF
474 (arguments
475 '(#:phases
476 (modify-phases %standard-phases
477 (replace 'check
478 (lambda _
479 (invoke "python" "sh.py" "test"))))))
480 (native-inputs
481 `(("python-coverage" ,python-coverage)))
8b89dedc
RW
482 (home-page "https://github.com/amoffat/sh")
483 (synopsis "Python subprocess replacement")
484 (description "This package provides a replacement for Python's
485@code{subprocess} feature.")
486 (license license:expat)))
487
3869effd
RW
488(define-public python2-sh
489 (package-with-python2 python-sh))
490
d362b11d
RW
491(define-public python-cftime
492 (package
493 (name "python-cftime")
494 (version "1.0.3.4")
495 (source
496 (origin
497 (method url-fetch)
498 (uri (pypi-uri "cftime" version))
499 (sha256
500 (base32
501 "0362dhxbzk593walyjz30dll6y2y79wialik647cbwdsf3ad0x6x"))))
502 (build-system python-build-system)
503 (propagated-inputs
504 `(("python-numpy" ,python-numpy)))
505 (native-inputs
506 `(("python-coveralls" ,python-coveralls)
507 ("python-cython" ,python-cython)
508 ("python-pytest-cov" ,python-pytest-cov)))
509 (home-page "https://github.com/Unidata/cftime")
510 (synopsis "Library for time handling")
511 (description
512 "This package provides time-handling functionality that used to be part
513of the netcdf4 package before.")
514 ;; This package claims to include code under the GPLv3 but is released
515 ;; under ISC.
516 (license (list license:isc license:gpl3+))))
517
44d10b1f
RW
518(define-public python-netcdf4
519 (package
520 (name "python-netcdf4")
93e7b209 521 (version "1.4.2")
44d10b1f
RW
522 (source
523 (origin
524 (method url-fetch)
525 (uri (pypi-uri "netCDF4" version))
526 (sha256
527 (base32
93e7b209 528 "0c0sklgrmv15ygliin8qq0hp7vanmbi74m6zpi0r1ksr0hssyd5r"))))
44d10b1f 529 (build-system python-build-system)
93e7b209
RW
530 (arguments
531 '(#:phases
532 (modify-phases %standard-phases
533 (add-after 'unpack 'configure-locations
534 (lambda* (#:key inputs #:allow-other-keys)
535 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
536 #t)))))
44d10b1f
RW
537 (native-inputs
538 `(("python-cython" ,python-cython)))
539 (propagated-inputs
93e7b209
RW
540 `(("python-numpy" ,python-numpy)
541 ("python-cftime" ,python-cftime)))
44d10b1f
RW
542 (inputs
543 `(("netcdf" ,netcdf)
544 ("hdf4" ,hdf4)
545 ("hdf5" ,hdf5)))
93e7b209 546 (home-page "https://github.com/Unidata/netcdf4-python")
44d10b1f
RW
547 (synopsis "Python/numpy interface to the netCDF library")
548 (description "Netcdf4-python is a Python interface to the netCDF C
549library. netCDF version 4 has many features not found in earlier
550versions of the library and is implemented on top of HDF5. This module
551can read and write files in both the new netCDF 4 and the old netCDF 3
552format, and can create files that are readable by HDF5 clients. The
553API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
554to users of that module.")
555 ;; The software is mainly ISC, but includes some files covered
556 ;; by the Expat license.
557 (license (list license:isc license:expat))))
558
559(define-public python2-netcdf4
560 (package-with-python2 python-netcdf4))
561
562(define-public python-lockfile
563 (package
564 (name "python-lockfile")
565 (version "0.12.2")
566 (source
567 (origin
568 (method url-fetch)
8318bf07 569 (uri (pypi-uri "lockfile" version))
44d10b1f
RW
570 (sha256
571 (base32
572 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
573 (build-system python-build-system)
574 (arguments '(#:test-target "check"))
575 (native-inputs
576 `(("python-pbr" ,python-pbr)))
577 (home-page "https://launchpad.net/pylockfile")
578 (synopsis "Platform-independent file locking module")
579 (description
580 "The lockfile package exports a LockFile class which provides a simple
581API for locking files.")
582 (license license:expat)))
583
584(define-public python2-lockfile
585 (package-with-python2 python-lockfile))
586
587(define-public python-semantic-version
588 (package
589 (name "python-semantic-version")
590 (version "2.6.0")
591 (source
592 (origin
593 (method url-fetch)
594 (uri (pypi-uri "semantic_version" version))
595 (sha256
596 (base32
597 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
598 (build-system python-build-system)
599 (arguments
600 `(#:tests? #f)) ; PyPI tarball lacks tests
601 (home-page "https://github.com/rbarrois/python-semanticversion")
602 (synopsis "Semantic versioning module for Python")
603 (description
604 "The @code{semantic_version} class is a small library for handling
605@uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
606
607It can compare versions, generate a new version that represents a bump in one of
608the version levels, and check whether any given string is a proper semantic
609version identifier.")
610 (license license:bsd-3)))
611
612(define-public python2-semantic-version
613 (package-with-python2 python-semantic-version))
614
615(define-public python-serpent
616 (package
617 (name "python-serpent")
618 (version "1.27")
619 (source
620 (origin
621 (method url-fetch)
622 (uri (pypi-uri "serpent" version))
623 (sha256
624 (base32
625 "04p9dsrm5pv8vhk3flvih55kgvlzpi38hlaykdiakddmgwqw93bg"))))
626 (build-system python-build-system)
627 (home-page "https://github.com/irmen/Serpent")
628 (synopsis "Serializer for literal Python expressions")
629 (description
630 "Serpent provides ast.literal_eval() compatible object tree
631serialization. It serializes an object tree into bytes (utf-8 encoded string)
632that can be decoded and then passed as-is to ast.literal_eval() to rebuild it
633as the original object tree. As such it is safe to send serpent data to other
634machines over the network for instance (because only safe literals are
635encoded).")
636 (license license:expat)))
637
638(define-public python-setuptools
639 (package
640 (name "python-setuptools")
641 (version "40.0.0")
642 (source
643 (origin
644 (method url-fetch)
645 (uri (pypi-uri "setuptools" version ".zip"))
646 (sha256
647 (base32
648 "0pq116lr14gnc62v76nk0npkm6krb2mpp7p9ab369zgv4n7dnah1"))
649 (modules '((guix build utils)))
650 (snippet
651 '(begin
652 ;; Remove included binaries which are used to build self-extracting
653 ;; installers for Windows.
654 ;; TODO: Find some way to build them ourself so we can include them.
655 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
656 #t))))
657 (build-system python-build-system)
658 ;; FIXME: Tests require pytest, which itself relies on setuptools.
659 ;; One could bootstrap with an internal untested setuptools.
660 (arguments
661 `(#:tests? #f))
662 (home-page "https://pypi.python.org/pypi/setuptools")
663 (synopsis
664 "Library designed to facilitate packaging Python projects")
665 (description
666 "Setuptools is a fully-featured, stable library designed to facilitate
667packaging Python projects, where packaging includes:
668Python package and module definitions,
669distribution package metadata,
670test hooks,
671project installation,
672platform-specific details,
673Python 3 support.")
674 ;; TODO: setuptools now bundles the following libraries:
675 ;; packaging, pyparsing, six and appdirs. How to unbundle?
676 (license (list license:psfl ; setuptools itself
677 license:expat ; six, appdirs, pyparsing
678 license:asl2.0 ; packaging is dual ASL2/BSD-2
679 license:bsd-2))))
680
681(define-public python2-setuptools
682 (package-with-python2 python-setuptools))
683
684(define-public python-uniseg
685 (package
686 (name "python-uniseg")
687 (version "0.7.1")
688 (source
689 (origin
690 (method url-fetch)
691 (uri (pypi-uri "uniseg" version ".zip"))
692 (sha256
693 (base32
694 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
695 (build-system python-build-system)
696 (arguments
697 '(#:tests? #f)) ; The test suite requires network access.
698 (native-inputs
699 `(("unzip" ,unzip)))
700 (home-page
701 "https://bitbucket.org/emptypage/uniseg-python")
702 (synopsis
703 "Python library to determine Unicode text segmentations")
704 (description
705 "Uniseg is a Python package used to determine Unicode text segmentations.
706Supported segmentations include:
707@enumerate
708@item @dfn{Code point} (any value in the Unicode codespace)
709@item @dfn{Grapheme cluster} (user-perceived character made of a single or
710multiple Unicode code points, e.g. \"G\" + acute-accent)
711@item Word break
712@item Sentence break
713@item Line break
714@end enumerate")
715 (license license:expat)))
716
717(define-public python2-uniseg
718 (package-with-python2 python-uniseg))
719
720(define-public python-humanfriendly
721 (package
722 (name "python-humanfriendly")
723 (version "4.4.1")
724 (source
725 (origin
726 (method url-fetch)
727 (uri (pypi-uri "humanfriendly" version))
728 (sha256
729 (base32
730 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
731 (build-system python-build-system)
732 (arguments
733 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
734 #:tests? #f))
735 (propagated-inputs
736 `(("python-monotonic" ,python-monotonic)))
737 (home-page "https://humanfriendly.readthedocs.io")
738 (synopsis "Human-friendly input and output in Python")
739 (description
740 "The functions and classes in @code{humanfriendly} can be used to make
741text interfaces more user-friendly. It includes tools to parse and format
742numbers, file sizes, and timespans, timers for long-running operations, menus
743to allow the user to choose from a list of options, and terminal interaction
744helpers.")
745 (license license:expat)))
746
747(define-public python2-humanfriendly
748 (package-with-python2 python-humanfriendly))
749
750(define-public python-capturer
751 (package
752 (name "python-capturer")
753 (version "2.4")
754 (source
755 (origin
756 (method url-fetch)
757 (uri (pypi-uri "capturer" version))
758 (sha256
759 (base32
760 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
761 (build-system python-build-system)
762 (arguments
763 `(#:tests? #f))
764 (propagated-inputs
765 `(("python-humanfriendly" ,python-humanfriendly)))
766 (home-page "https://capturer.readthedocs.io")
767 (synopsis "Capture stdout and stderr streams of the current process")
768 (description
769 "The capturer package makes it easy to capture the stdout and stderr
770streams of the current process and subprocesses. Output can be relayed
771to the terminal in real time but is also available to the Python program
772for additional processing.")
773 (license license:expat)))
774
775(define-public python2-capturer
776 (package-with-python2 python-capturer))
777
778(define-public python-case
779 (package
780 (name "python-case")
781 (version "1.5.3")
782 (source
783 (origin
784 (method url-fetch)
785 (uri (pypi-uri "case" version))
786 (sha256
787 (base32
788 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
789 (build-system python-build-system)
790 (propagated-inputs
791 `(("python-mock" ,python-mock)
792 ("python-nose" ,python-nose)
793 ("python-six" ,python-six)
794 ("python-unittest2" ,python-unittest2)))
795 (native-inputs
796 `(("python-coverage" ,python-coverage)))
797 (home-page "https://github.com/celery/case")
798 (synopsis "Unittest utilities and convenience methods")
799 (description
800 "The @code{case} package provides utilities on top of unittest, including
801some helpful Python 2 compatibility convenience methods.")
802 (license license:bsd-3)))
803
804(define-public python-verboselogs
805 (package
806 (name "python-verboselogs")
807 (version "1.7")
808 (source
809 (origin
810 (method url-fetch)
811 (uri (pypi-uri "verboselogs" version))
812 (sha256
813 (base32
814 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
815 (build-system python-build-system)
816 (native-inputs
817 `(("python-mock" ,python-mock)
818 ("python-astroid" ,python-astroid)
819 ("python-pylint" ,python-pylint)))
820 (home-page "https://verboselogs.readthedocs.io")
821 (synopsis "Verbose logging level for Python's logging module")
822 (description
823 "The @code{verboselogs} package extends Python's @code{logging} module to
824add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
825 (license license:expat)))
826
827(define-public python2-verboselogs
828 (package-with-python2 python-verboselogs))
829
830(define-public python-coloredlogs
831 (package
832 (name "python-coloredlogs")
833 (version "7.3")
834 (source
835 (origin
836 (method url-fetch)
837 (uri (pypi-uri "coloredlogs" version))
838 (sha256
839 (base32
840 "1blcann6dyg5dhps9pg12rn0q0rjrlajpmmil0gy0j4cbvnl2il9"))))
841 (build-system python-build-system)
842 (arguments
843 `(;Tests require some updated modules
844 #:tests? #f))
845 (propagated-inputs
846 `(("python-capturer" ,python-capturer)))
847 (home-page "https://coloredlogs.readthedocs.io")
848 (synopsis "Colored stream handler for Python's logging module")
849 (description
850 "The @code{coloredlogs} package enables colored terminal output for
851Python's logging module. The @code{ColoredFormatter} class inherits from
852@code{logging.Formatter} and uses ANSI escape sequences to render your logging
853messages in color.")
854 (license license:expat)))
855
856(define-public python2-coloredlogs
857 (package-with-python2 python-coloredlogs))
858
4caf37b0
MC
859(define-public python-et-xmlfile
860 (package
861 (name "python-et-xmlfile")
862 (version "1.0.1")
863 (source
864 (origin
865 (method url-fetch)
866 (uri (pypi-uri "et_xmlfile" version))
867 (sha256
868 (base32
869 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
870 (build-system python-build-system)
871 (arguments
872 `(#:phases (modify-phases %standard-phases
873 (replace 'check
874 (lambda _
875 (invoke "pytest"))))))
876 (native-inputs
877 `(("python-pytest" ,python-pytest)
878 ("python-lxml" ,python-lxml))) ;used for the tests
879 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
880 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
881 (description "This Python library is based upon the @code{xmlfile} module
882from @code{lxml}. It aims to provide a low memory, compatible implementation
883of @code{xmlfile}.")
884 (license license:expat)))
885
886(define-public python2-et-xmlfile
887 (package-with-python2 python-et-xmlfile))
888
a042d348
MC
889(define-public python-openpyxl
890 (package
891 (name "python-openpyxl")
892 (version "2.6.0")
893 (source
894 (origin
895 ;; We use the upstream repository, as the tests are not included in the
896 ;; PyPI releases.
897 (method hg-fetch)
898 (uri (hg-reference
899 (url "https://bitbucket.org/openpyxl/openpyxl")
900 (changeset version)))
901 (file-name (string-append name "-" version "-checkout"))
902 (sha256
903 (base32
904 "1x47ngn7ybaqdbvg90c8h2x0j6yfdfj25gjfinp2w5rf62gsany7"))))
905 (build-system python-build-system)
906 (arguments
907 `(#:phases (modify-phases %standard-phases
908 (replace 'check
909 (lambda _
910 (invoke "pytest"))))))
911 (native-inputs
912 ;; For the test suite.
913 `(("python-lxml" ,python-lxml)
914 ("python-pillow" ,python-pillow)
915 ("python-pytest" ,python-pytest)))
916 (propagated-inputs
917 `(("python-et-xmlfile" ,python-et-xmlfile)
918 ("python-jdcal" ,python-jdcal)))
919 (home-page "https://openpyxl.readthedocs.io")
920 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
921 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
922XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
923standard.")
924 (license license:expat)))
925
44d10b1f
RW
926(define-public python-eventlet
927 (package
928 (name "python-eventlet")
929 (version "0.20.1")
930 (source
931 (origin
932 (method url-fetch)
933 (uri (pypi-uri "eventlet" version))
934 (sha256
935 (base32
936 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
937 (build-system python-build-system)
938 (propagated-inputs
939 `(("python-greenlet" ,python-greenlet)))
940 (arguments
941 ;; TODO: Requires unpackaged 'enum-compat'.
942 '(#:tests? #f))
943 (home-page "http://eventlet.net")
944 (synopsis "Concurrent networking library for Python")
945 (description
946 "Eventlet is a concurrent networking library for Python that
947allows you to change how you run your code, not how you write it.
948It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
949Coroutines ensure that the developer uses a blocking style of programming
950that is similar to threading, but provide the benefits of non-blocking I/O.
951The event dispatch is implicit, which means you can easily use @code{Eventlet}
952from the Python interpreter, or as a small part of a larger application.")
953 (license license:expat)))
954
955(define-public python2-eventlet
956 (let ((base (package-with-python2
957 (strip-python2-variant python-eventlet))))
958 (package (inherit base)
959 (propagated-inputs
960 `(("python2-enum34" ,python2-enum34)
961 ,@(package-propagated-inputs base))))))
962
963(define-public python-six
964 (package
965 (name "python-six")
966 (version "1.11.0")
967 (source
968 (origin
969 (method url-fetch)
970 (uri (pypi-uri "six" version))
971 (sha256
972 (base32
973 "1scqzwc51c875z23phj48gircqjgnn3af8zy2izjwmnlxrxsgs3h"))))
974 (build-system python-build-system)
975 (arguments
976 `(#:phases
977 (modify-phases %standard-phases
978 (replace 'check
979 (lambda _
980 (invoke "py.test" "-v"))))))
981 (native-inputs
982 `(("python-py" ,python-py)
983 ("python-pytest" ,python-pytest-bootstrap)))
984 (home-page "https://pypi.python.org/pypi/six/")
985 (synopsis "Python 2 and 3 compatibility utilities")
986 (description
987 "Six is a Python 2 and 3 compatibility library. It provides utility
988functions for smoothing over the differences between the Python versions with
989the goal of writing Python code that is compatible on both Python versions.
990Six supports every Python version since 2.5. It is contained in only one
991Python file, so it can be easily copied into your project.")
992 (license license:x11)))
993
994(define-public python2-six
995 (package-with-python2 python-six))
996
997(define-public python-six-bootstrap
998 (package
999 (inherit python-six)
1000 (name "python-six-bootstrap")
1001 (native-inputs `())
1002 (arguments `(#:tests? #f))))
1003
1004(define-public python2-six-bootstrap
1005 (package-with-python2 python-six-bootstrap))
1006
1007(define-public python-schedule
1008 (package
1009 (name "python-schedule")
1010 (version "0.4.3")
1011 (source
1012 (origin
1013 (method url-fetch)
1014 (uri (pypi-uri "schedule" version))
1015 (sha256
1016 (base32
1017 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1018 (build-system python-build-system)
1019 (native-inputs
1020 `(("python-pytest" ,python-pytest)
1021 ("python-mock" ,python-mock)))
1022 (home-page "https://github.com/dbader/schedule")
1023 (synopsis "Schedule periodic function calls in Python")
1024 (description
1025 "Schedule is an in-process scheduler for periodic jobs that uses the
1026builder pattern for configuration. Schedule lets you run Python functions (or
1027any other callable) periodically at pre-determined intervals using a simple,
1028human-friendly syntax.")
1029 (license license:expat)))
1030
1031(define-public python2-schedule
1032 (package-with-python2 python-schedule))
1033
1034(define-public python-pandas
1035 (package
1036 (name "python-pandas")
c0d43f62 1037 (version "0.24.2")
44d10b1f
RW
1038 (source
1039 (origin
1040 (method url-fetch)
1041 (uri (pypi-uri "pandas" version))
1042 (sha256
c0d43f62 1043 (base32 "18imlm8xbhcbwy4wa957a1fkamrcb0z988z006jpfda3ki09z4ag"))))
44d10b1f
RW
1044 (build-system python-build-system)
1045 (arguments
1046 `(#:modules ((guix build utils)
1047 (guix build python-build-system)
1048 (ice-9 ftw)
1049 (srfi srfi-26))
1050 #:phases (modify-phases %standard-phases
c0d43f62
MC
1051 (add-after 'unpack 'patch-which
1052 (lambda* (#:key inputs #:allow-other-keys)
1053 (let ((which (assoc-ref inputs "which")))
1054 (substitute* "pandas/io/clipboard/__init__.py"
1055 (("^CHECK_CMD = .*")
1056 (string-append "CHECK_CMD = \"" which "\"\n"))))
1057 #t))
44d10b1f
RW
1058 (replace 'check
1059 (lambda _
1060 (let ((build-directory
1061 (string-append
1062 (getcwd) "/build/"
1063 (car (scandir "build"
1064 (cut string-prefix? "lib." <>))))))
1065 ;; Disable the "strict data files" option which causes
c0d43f62
MC
1066 ;; the build to error out if required data files are
1067 ;; not available (as is the case with PyPI archives).
44d10b1f
RW
1068 (substitute* "setup.cfg"
1069 (("addopts = --strict-data-files") "addopts = "))
1070 (with-directory-excursion build-directory
c0d43f62
MC
1071 ;; Delete tests that require "moto" which is not yet
1072 ;; in Guix.
44d10b1f
RW
1073 (for-each delete-file
1074 '("pandas/tests/io/conftest.py"
1075 "pandas/tests/io/json/test_compression.py"
1076 "pandas/tests/io/parser/test_network.py"
44d10b1f
RW
1077 "pandas/tests/io/test_parquet.py"))
1078 (invoke "pytest" "-vv" "pandas" "--skip-slow"
1079 "--skip-network" "-k"
1080 ;; XXX: Due to the deleted tests above.
1081 "not test_read_s3_jsonl"))))))))
1082 (propagated-inputs
1083 `(("python-numpy" ,python-numpy)
667c6ef5 1084 ("python-openpyxl" ,python-openpyxl)
44d10b1f 1085 ("python-pytz" ,python-pytz)
667c6ef5
MC
1086 ("python-dateutil" ,python-dateutil)
1087 ("python-xlrd" ,python-xlrd)))
c0d43f62
MC
1088 (inputs
1089 `(("which" ,which)))
44d10b1f
RW
1090 (native-inputs
1091 `(("python-cython" ,python-cython)
1092 ("python-beautifulsoup4" ,python-beautifulsoup4)
1093 ("python-lxml" ,python-lxml)
1094 ("python-html5lib" ,python-html5lib)
1095 ("python-nose" ,python-nose)
c0d43f62
MC
1096 ("python-pytest" ,python-pytest)
1097 ("python-pytest-mock" ,python-pytest-mock)))
44d10b1f
RW
1098 (home-page "https://pandas.pydata.org")
1099 (synopsis "Data structures for data analysis, time series, and statistics")
1100 (description
1101 "Pandas is a Python package providing fast, flexible, and expressive data
1102structures designed to make working with structured (tabular,
1103multidimensional, potentially heterogeneous) and time series data both easy
1104and intuitive. It aims to be the fundamental high-level building block for
1105doing practical, real world data analysis in Python.")
1106 (license license:bsd-3)))
1107
1108(define-public python2-pandas
1109 (package-with-python2 python-pandas))
1110
1111(define-public python2-mechanize
1112 (package
1113 (name "python2-mechanize")
1114 (version "0.2.5")
1115 (source
1116 (origin
1117 (method url-fetch)
1cc184e6 1118 (uri (pypi-uri "mechanize" version))
44d10b1f
RW
1119 (sha256
1120 (base32
1121 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1122 (build-system python-build-system)
1123 (arguments
1124 `(#:python ,python-2 ; apparently incompatible with Python 3
1125 #:tests? #f))
1126 ;; test fails with message
1127 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1128 ;; (python-3.3.2) or
1129 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1130 ;; (python-2.7.5).
1131 ;; The source code is from March 2011 and probably not up-to-date
1132 ;; with respect to python unit tests.
1133 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1134 (synopsis
1135 "Stateful programmatic web browsing in Python")
1136 (description
1137 "Mechanize implements stateful programmatic web browsing in Python,
1138after Andy Lester’s Perl module WWW::Mechanize.")
1139 (license (license:non-copyleft
1140 "file://COPYING"
1141 "See COPYING in the distribution."))))
1142
1143
1144(define-public python-simplejson
1145 (package
1146 (name "python-simplejson")
1147 (version "3.14.0")
1148 (source
1149 (origin
1150 (method url-fetch)
1151 (uri (pypi-uri "simplejson" version))
1152 (sha256
1153 (base32
1154 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1155 (build-system python-build-system)
1156 (home-page "http://simplejson.readthedocs.org/en/latest/")
1157 (synopsis
1158 "Json library for Python")
1159 (description
1160 "JSON (JavaScript Object Notation) is a subset of JavaScript
1161syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1162format.
1163
1164Simplejson exposes an API familiar to users of the standard library marshal
1165and pickle modules. It is the externally maintained version of the json
1166library contained in Python 2.6, but maintains compatibility with Python 2.5
1167and (currently) has significant performance advantages, even without using
1168the optional C extension for speedups. Simplejson is also supported on
1169Python 3.3+.")
1170 (license license:x11)))
1171
1172(define-public python2-simplejson
1173 (package-with-python2 python-simplejson))
1174
1175
1176(define-public python-pyicu
1177 (package
1178 (name "python-pyicu")
1179 (version "2.2")
1180 (source
1181 (origin
1182 (method url-fetch)
1183 (uri (pypi-uri "PyICU" version))
1184 (sha256
1185 (base32
1186 "0wq9y5fi1ighgf5aws9nr87vi1w44p7q1k83rx2y3qj5d2xyhspa"))))
1187 (build-system python-build-system)
1188 (inputs
1189 `(("icu4c" ,icu4c)))
1190 (native-inputs
1191 `(("python-pytest" ,python-pytest)
1192 ("python-six" ,python-six)))
1193 (home-page "https://github.com/ovalhub/pyicu")
1194 (synopsis "Python extension wrapping the ICU C++ API")
1195 (description
1196 "PyICU is a python extension wrapping the ICU C++ API.")
1197 (properties `((python2-variant . ,(delay python2-pyicu))))
1198 (license license:x11)))
1199
1200(define-public python2-pyicu
1201 (let ((base (package-with-python2
1202 (strip-python2-variant python-pyicu))))
1203 (package
1204 (inherit base)
1205 (arguments
1206 `(,@(package-arguments base)
1207 #:phases
1208 (modify-phases %standard-phases
1209 (add-before 'check 'delete-failing-test
1210 (λ _
1211 ;; XXX: This fails due to Unicode issues unique to Python 2,
1212 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1213 (delete-file "test/test_Script.py")
1214 #t))))))))
1215
1216(define-public python2-dogtail
1217 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1218 ;; spaces in indentation" with Python 3.
1219 (package
1220 (name "python2-dogtail")
1221 (version "0.9.9")
1222 (source (origin
1223 (method url-fetch)
1224 (uri (pypi-uri "dogtail" version))
1225 (sha256
1226 (base32
1227 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1228 (build-system python-build-system)
1229 (arguments `(#:python ,python-2
1230 #:tests? #f)) ; invalid command "test"
1231 ;; Currently no offical homepage.
1232 (home-page "https://pypi.python.org/pypi/dogtail/")
1233 (synopsis "GUI test tool and automation framework written in Python")
1234 (description
1235 "Dogtail is a GUI test tool and automation framework written in Python.
1236It uses Accessibility (a11y) technologies to communicate with desktop
1237applications. dogtail scripts are written in Python and executed like any
1238other Python program.")
1239 (license license:gpl2+)))
1240
1241(define-public python-empy
1242 (package
1243 (name "python-empy")
0f6d5115 1244 (version "3.3.3")
44d10b1f
RW
1245 (source (origin
1246 (method url-fetch)
1247 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1248 version ".tar.gz"))
1249 (sha256
1250 (base32
0f6d5115 1251 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
44d10b1f
RW
1252 (build-system python-build-system)
1253 (arguments
0f6d5115 1254 `(#:tests? #f)) ; python2 only
44d10b1f
RW
1255 (home-page "http://www.alcyone.com/software/empy/")
1256 (synopsis "Templating system for Python")
1257 (description
1258 "EmPy is a system for embedding Python expressions and statements in
1259template text; it takes an EmPy source file, processes it, and produces
1260output. This is accomplished via expansions, which are special signals to the
1261EmPy system and are set off by a special prefix (by default the at sign, @@).
1262EmPy can expand arbitrary Python expressions and statements in this way, as
1263well as a variety of special forms. Textual data not explicitly delimited in
1264this way is sent unaffected to the output, allowing Python to be used in
1265effect as a markup language. Also supported are callbacks via hooks,
1266recording and playback via diversions, and dynamic, chainable filters. The
1267system is highly configurable via command line options and embedded
1268commands.")
1269 (license license:lgpl2.1+)))
1270
1271(define-public python2-empy
0f064242
TGR
1272 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
1273 (package
1274 (inherit base)
1275 (arguments `(,@(package-arguments base)
1276 #:tests? #t)))))
44d10b1f
RW
1277
1278(define-public python2-element-tree
1279 (package
1280 (name "python2-element-tree")
1281 (version "1.2.6")
1282 (source (origin
1283 (method url-fetch)
1284 (uri (string-append
1285 "http://effbot.org/media/downloads/elementtree-"
1286 version "-20050316.tar.gz"))
1287 (sha256
1288 (base32
1289 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1290 (build-system python-build-system)
1291 (arguments
1292 `(#:python ,python-2 ; seems to be part of Python 3
1293 #:tests? #f)) ; no 'test' sub-command
1294 (synopsis "Toolkit for XML processing in Python")
1295 (description
1296 "ElementTree is a Python library supporting lightweight XML processing.")
1297 (home-page "http://effbot.org/zone/element-index.htm")
1298 (license (license:x11-style
1299 "http://docs.python.org/2/license.html"
1300 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1301
1302(define-public python2-pybugz
1303 (package
1304 (name "python2-pybugz")
1305 (version "0.6.11")
1306 (source (origin
1307 (method url-fetch)
1308 (uri (string-append
1309 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1310 version ".tar.gz"))
1311 (sha256
1312 (base32
1313 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1314 (patches (search-patches "pybugz-stty.patch"
1315 "pybugz-encode-error.patch"))))
1316 (build-system python-build-system)
1317 (arguments
1318 `(#:python ,python-2 ; SyntaxError with Python 3
1319 #:tests? #f)) ; no 'test' sub-command
1320 (propagated-inputs
1321 `(("element-tree" ,python2-element-tree)))
1322 (synopsis "Python and command-line interface to Bugzilla")
1323 (description
1324 "PyBugz is a Python library and command-line tool to query the Bugzilla
1325bug tracking system. It is meant as an aid to speed up interaction with the
1326bug tracker.")
1327 (home-page "http://www.liquidx.net/pybugz/")
1328 (license license:gpl2)))
1329
1330(define-public python2-enum
1331 (package
1332 (name "python2-enum")
1333 (version "0.4.6")
1334 (source (origin
1335 (method url-fetch)
1336 (uri (pypi-uri "enum" version))
1337 (sha256
1338 (base32
1339 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1340 (build-system python-build-system)
1341 (arguments
1342 `(#:python ,python-2))
1343 (home-page "http://pypi.python.org/pypi/enum/")
1344 (synopsis "Robust enumerated type support in Python")
1345 (description
1346 "This provides a module for robust enumerations in Python. It has
1347been superseded by the Python standard library and is provided only for
1348compatibility.")
1349 ;; Choice of either license.
1350 (license (list license:gpl3+ license:psfl))))
1351
1352(define-public python-enum34
1353 (package
1354 (name "python-enum34")
1355 (version "1.1.6")
1356 (source
1357 (origin
1358 (method url-fetch)
1359 (uri (pypi-uri "enum34" version))
1360 (sha256
1361 (base32
1362 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1363 (build-system python-build-system)
1364 (home-page "https://pypi.python.org/pypi/enum34")
1365 (synopsis "Backported Python 3.4 Enum")
1366 (description
1367 "Enum34 is the new Python stdlib enum module available in Python 3.4
1368backported for previous versions of Python from 2.4 to 3.3.")
1369 (license license:bsd-3)))
1370
1371(define-public python2-enum34
1372 (package-with-python2 python-enum34))
1373
1374(define-public python-parse-type
1375 (package
1376 (name "python-parse-type")
1377 (version "0.4.2")
1378 (source
1379 (origin
1380 (method url-fetch)
1381 (uri (pypi-uri "parse_type" version))
1382 (sha256
1383 (base32
1384 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1385 (build-system python-build-system)
1386 (propagated-inputs
1387 `(("python-six" ,python-six)
1388 ("python-parse" ,python-parse)))
1389 (native-inputs
1390 `(("python-pytest" ,python-pytest)
1391 ("python-pytest-runner" ,python-pytest-runner)))
1392 (home-page "https://github.com/jenisys/parse_type")
1393 (synopsis "Extended parse module")
1394 (description
1395 "Parse_type extends the python parse module.")
1396 (properties
1397 `((python2-variant . ,(delay python2-parse-type))))
1398 (license license:bsd-3)))
1399
1400(define-public python2-parse-type
1401 (let ((base (package-with-python2
1402 (strip-python2-variant python-parse-type))))
1403 (package (inherit base)
1404 (propagated-inputs
1405 `(("python2-enum34" ,python2-enum34)
1406 ,@(package-propagated-inputs base))))))
1407
1408(define-public python-parse
1409 (package
1410 (name "python-parse")
1411 (version "1.8.4")
1412 (source
1413 (origin
1414 (method url-fetch)
1415 (uri (pypi-uri "parse" version))
1416 (sha256
1417 (base32
1418 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
1419 (build-system python-build-system)
1420 (arguments
1421 `(#:phases
1422 (modify-phases %standard-phases
1423 (replace 'check
1424 (lambda _ (invoke "python" "test_parse.py"))))))
1425 (home-page "https://github.com/r1chardj0n3s/parse")
1426 (synopsis "Parse strings")
1427 (description
1428 "Parse strings using a specification based on the Python @code{format()}
1429syntax.")
1430 (license license:x11)))
1431
1432(define-public python-polib
1433 (package
1434 (name "python-polib")
1435 (version "1.0.8")
1436 (source (origin
1437 (method url-fetch)
1438 (uri (pypi-uri "polib" version))
1439 (sha256
1440 (base32
1441 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1442 (build-system python-build-system)
1443 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1444 (synopsis "Manipulate, create and modify gettext files")
1445 (description "Polib can manipulate any gettext format (po, pot and mo)
1446files. It can be used to create po files from scratch or to modify
1447existing ones.")
1448 (license license:expat)))
1449
1450(define-public python2-polib
1451 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1452 (package
1453 (inherit base)
1454 (arguments `(,@(package-arguments base)
1455 ;; Tests don't work with python2.
1456 #:tests? #f)))))
1457
1458(define-public scons
1459 (package
1460 (name "scons")
05487ed8 1461 (version "3.0.4")
44d10b1f 1462 (source (origin
ad34338d
RW
1463 (method git-fetch)
1464 (uri (git-reference
1465 (url "https://github.com/SCons/scons.git")
1466 (commit version)))
1467 (file-name (git-file-name name version))
44d10b1f
RW
1468 (sha256
1469 (base32
05487ed8 1470 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
44d10b1f
RW
1471 (build-system python-build-system)
1472 (arguments
1473 `(#:use-setuptools? #f ; still relies on distutils
ad34338d
RW
1474 #:tests? #f ; no 'python setup.py test' command
1475 #:phases
1476 (modify-phases %standard-phases
1477 (add-before 'build 'bootstrap
1478 (lambda _
1479 (substitute* "src/engine/SCons/compat/__init__.py"
1480 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
1481 "sys.modules[new] = __import__(old)"))
05487ed8
RW
1482 (substitute* "src/engine/SCons/Platform/__init__.py"
1483 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
1484 "mod = __import__(full_name)"))
ad34338d
RW
1485 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
1486 (chdir "build/scons")
1487 #t)))))
44d10b1f
RW
1488 (home-page "http://scons.org/")
1489 (synopsis "Software construction tool written in Python")
1490 (description
1491 "SCons is a software construction tool. Think of SCons as an improved,
1492cross-platform substitute for the classic Make utility with integrated
1493functionality similar to autoconf/automake and compiler caches such as ccache.
1494In short, SCons is an easier, more reliable and faster way to build
1495software.")
1496 (license license:x11)))
1497
1498(define-public scons-python2
1499 (package
1500 (inherit (package-with-python2 scons))
1501 (name "scons-python2")))
1502
1503(define-public python-extras
1504 (package
1505 (name "python-extras")
1506 (version "1.0.0")
1507 (source
1508 (origin
1509 (method url-fetch)
1510 (uri (pypi-uri "extras" version))
1511 (sha256
1512 (base32
1513 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1514 (build-system python-build-system)
1515 (arguments
1516 ;; FIXME: Circular dependency on testtools.
1517 '(#:tests? #f))
1518 (home-page "https://github.com/testing-cabal/extras")
1519 (synopsis "Useful extensions to the Python standard library")
1520 (description
1521 "Extras is a set of extensions to the Python standard library.")
1522 (license license:expat)))
1523
1524(define-public python2-extras
1525 (package-with-python2 python-extras))
1526
1527(define-public python-mimeparse
1528 (package
1529 (name "python-mimeparse")
1530 (version "1.6.0")
1531 (source
1532 (origin
1533 (method url-fetch)
89bf667c 1534 (uri (pypi-uri "python-mimeparse" version))
44d10b1f
RW
1535 (sha256
1536 (base32
1537 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
1538 (build-system python-build-system)
1539 (arguments
1540 '(#:phases
1541 (modify-phases %standard-phases
1542 (replace 'check
1543 (lambda _
1544 (invoke "./mimeparse_test.py"))))))
1545 (home-page
1546 "https://github.com/dbtsai/python-mimeparse")
1547 (synopsis "Python library for parsing MIME types")
1548 (description
1549 "Mimeparse provides basic functions for parsing MIME type names and
1550matching them against a list of media-ranges.")
1551 (license license:expat)))
1552
1553(define-public python2-mimeparse
1554 (package-with-python2 python-mimeparse))
1555
1556(define-public python-miniboa
1557 (package
1558 (name "python-miniboa")
1559 (version "1.0.7")
1560 (source
1561 (origin
1562 (method url-fetch)
1563 (uri (pypi-uri "miniboa" version))
1564 (sha256
1565 (base32
1566 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
1567 (build-system python-build-system)
1568 (home-page "https://github.com/shmup/miniboa")
1569 (synopsis "Simple, single-threaded Telnet server")
1570 (description
1571 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
1572server.")
1573 (license license:asl2.0)))
1574
1575(define-public python2-miniboa
1576 (package-with-python2 python-miniboa))
1577
1578(define-public python-pafy
1579 (package
1580 (name "python-pafy")
1581 (version "0.5.3.1")
1582 (source
1583 (origin
1584 (method url-fetch)
1585 (uri (pypi-uri "pafy" version))
1586 (sha256
1587 (base32
1588 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1589 (build-system python-build-system)
1590 (arguments
1591 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1592 (propagated-inputs
1593 ;; Youtube-dl is a python package which is imported in the file
1594 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1595 `(("youtube-dl" ,youtube-dl)))
1596 (home-page "https://np1.github.io/pafy/")
1597 (synopsis "Retrieve YouTube content and metadata")
1598 (description
1599 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1600 (license license:lgpl3+)))
1601
1602(define-public python2-funcsigs
1603 (package
1604 (name "python2-funcsigs")
1605 (version "1.0.2")
1606 (source (origin
1607 (method url-fetch)
1608 (uri (pypi-uri "funcsigs" version))
1609 (sha256
1610 (base32
1611 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1612 (build-system python-build-system)
1613 (arguments
1614 `(#:python ,python-2))
1615 (native-inputs
1616 `(("python2-unittest2" ,python2-unittest2)))
1617 (home-page "http://funcsigs.readthedocs.org")
1618 (synopsis "Python function signatures from PEP362")
1619 (description
1620 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1621 (license license:asl2.0)))
1622
1623(define-public python2-funcsigs-bootstrap
1624 (package
1625 (inherit python2-funcsigs)
1626 (name "python2-funcsigs-bootstrap")
1627 (native-inputs `())
1628 (arguments
1629 `(#:tests? #f
1630 ,@(package-arguments python2-funcsigs)))))
1631
1632(define-public python-py
1633 (package
1634 (name "python-py")
1635 (version "1.5.4")
1636 (source
1637 (origin
1638 (method url-fetch)
1639 (uri (pypi-uri "py" version))
1640 (sha256
1641 (base32
1642 "1xxvwfn82457djf55f5n2c94699rfqnk43br8fif2r2q8gvrmm9z"))))
1643 (build-system python-build-system)
1644 (arguments
1645 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1646 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1647 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1648 ;; Is this module globally installed?"
1649 '(#:tests? #f))
1650 (native-inputs
1651 `(("python-setuptools-scm" ,python-setuptools-scm)))
1652 (home-page "https://github.com/pytest-dev/py")
1653 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1654 (description
1655 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1656code introspection, and logging.")
1657 (license license:expat)))
1658
1659(define-public python2-py
1660 (package-with-python2 python-py))
1661
1662;; Recent versions of python-fixtures and python-testrepository need
1663;; python-pbr for packaging, which itself needs these two packages for
1664;; testing.
1665;; To fix this circular dependency, we use a build of python-pbr, based on the
1666;; same source, just without any test dependencies and with tests disabled.
1667;; python-pbr-minmal is then used to package python-fixtures and
1668;; python-testrepository.
1669;; Strictly speaking we currently could remove the test-requirements from the
1670;; normal python-pbr package (and save this package) since test are disabled
1671;; there anyway. But this may change in future.
1672(define-public python-pbr-minimal
1673 (package
1674 (name "python-pbr-minimal")
1675 (version "3.0.1")
1676 (source
1677 (origin
1678 (method url-fetch)
1679 (uri (pypi-uri "pbr" version))
1680 (sha256
1681 (base32
1682 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1683 (build-system python-build-system)
1684 (arguments
1685 `(#:tests? #f))
1686 (home-page "http://docs.openstack.org/developer/pbr/")
1687 (synopsis "Minimal build of python-pbr used for bootstrapping")
1688 (description
1689 "Used only for bootstrapping python2-pbr, you should not need this.")
1690 (license license:asl2.0)))
1691
1692(define-public python2-pbr-minimal
1693 (package-with-python2 python-pbr-minimal))
1694
1695(define-public python-pbr
1696 (package
1697 (inherit python-pbr-minimal)
1698 (name "python-pbr")
1699 (arguments
1700 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1701 (propagated-inputs
1702 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1703 (native-inputs
1704 `(("python-fixtures" ,python-fixtures-bootstrap)
1705 ;; discover, coverage, hacking, subunit
1706 ("python-mock" ,python-mock)
1707 ("python-six" ,python-six)
1708 ("python-sphinx" ,python-sphinx)
1709 ("python-testrepository" ,python-testrepository-bootstrap)
1710 ("python-testresources" ,python-testresources-bootstrap)
1711 ("python-testscenarios" ,python-testscenarios-bootstrap)
1712 ("python-testtools" ,python-testtools-bootstrap)
1713 ("python-virtualenv" ,python-virtualenv)))
1714 (synopsis "Enhance the default behavior of Python’s setuptools")
1715 (description
1716 "Python Build Reasonableness (PBR) is a library that injects some useful
1717and sensible default behaviors into your setuptools run. It will set
1718versions, process requirements files and generate AUTHORS and ChangeLog file
1719from git information.
1720")))
1721
1722(define-public python2-pbr
1723 (package-with-python2 python-pbr))
1724
1725(define-public python-exif-read
1726 (package
1727 (name "python-exif-read")
1728 (version "2.1.2")
1729 (source (origin
1730 (method url-fetch)
1731 (uri (pypi-uri "ExifRead" version))
1732 (sha256
1733 (base32
1734 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
1735 (build-system python-build-system)
1736 (arguments `(#:tests? #f)) ; no tests
1737 (home-page "https://github.com/ianare/exif-py")
1738 (synopsis "Python library to extract EXIF data from image files")
1739 (description
1740 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1741files.")
1742 (license license:bsd-3)))
1743
1744(define-public python2-exif-read
1745 (package-with-python2 python-exif-read))
1746
1747(define-public python-pyld
1748 (package
1749 (name "python-pyld")
1750 (version "1.0.3")
1751 (source (origin
1752 (method url-fetch)
1753 (uri (pypi-uri "PyLD" version))
1754 (sha256
1755 (base32
1756 "12i2g6xdj30k7xxcibg3sc5y76snwq8l6n8fy9lyi577kgy0h2pm"))))
1757 (build-system python-build-system)
1758 (home-page "https://github.com/digitalbazaar/pyld")
1759 (synopsis "Python implementation of the JSON-LD specification")
1760 (description
1761 "PyLD is an implementation of the JSON-LD specification.")
1762 (license license:bsd-3)))
1763
1764(define-public python2-pyld
1765 (package-with-python2 python-pyld))
1766
1767(define-public python-click
1768 (package
1769 (name "python-click")
61984855 1770 (version "7.0")
44d10b1f
RW
1771 (source
1772 (origin
1773 (method url-fetch)
1774 (uri (pypi-uri "click" version))
1775 (sha256
1776 (base32
61984855 1777 "1mzjixd4vjbjvzb6vylki9w1556a9qmdh35kzmq6cign46av952v"))))
44d10b1f
RW
1778 (build-system python-build-system)
1779 (arguments
8d7e7ca6 1780 `(#:phases
44d10b1f
RW
1781 (modify-phases %standard-phases
1782 (add-after 'unpack 'fix-paths
1783 (lambda* (#:key inputs #:allow-other-keys)
1784 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
1785 "cross-libc" "libc"))))
1786 (substitute* "click/_unicodefun.py"
1787 (("'locale'")
1788 (string-append "'" glibc "/bin/locale'"))))
8d7e7ca6
EF
1789 #t))
1790 (replace 'check
1791 (lambda _
1792 (invoke "python" "-m" "pytest"))))))
44d10b1f
RW
1793 (native-inputs
1794 `(("python-pytest" ,python-pytest)))
61984855 1795 (home-page "https://palletsprojects.com/p/click/")
44d10b1f
RW
1796 (synopsis "Command line library for Python")
1797 (description
1798 "Click is a Python package for creating command line interfaces in a
1799composable way with as little code as necessary. Its name stands for
1800\"Command Line Interface Creation Kit\". It's highly configurable but comes
1801with sensible defaults out of the box.")
1802 (license license:bsd-3)))
1803
1804(define-public python2-click
1805 (package-with-python2 python-click))
1806
1807(define-public python-wheel
1808 (package
1809 (name "python-wheel")
746c074b 1810 (version "0.32.3")
44d10b1f
RW
1811 (source
1812 (origin
1813 (method url-fetch)
1814 (uri (pypi-uri "wheel" version))
1815 (sha256
1816 (base32
746c074b 1817 "1dhxl1bf18bx9szmqcnxbg6204hp3im8089q3hkwh5jfa6zh75q2"))))
44d10b1f
RW
1818 (build-system python-build-system)
1819 (native-inputs
1820 `(("python-jsonschema" ,python-jsonschema)
1821 ("python-pytest-cov" ,python-pytest-cov)))
1822 (home-page "https://bitbucket.org/pypa/wheel/")
1823 (synopsis "Format for built Python packages")
1824 (description
1825 "A wheel is a ZIP-format archive with a specially formatted filename and
1826the @code{.whl} extension. It is designed to contain all the files for a PEP
1827376 compatible install in a way that is very close to the on-disk format. Many
1828packages will be properly installed with only the @code{Unpack} step and the
1829unpacked archive preserves enough information to @code{Spread} (copy data and
1830scripts to their final locations) at any later time. Wheel files can be
1831installed with a newer @code{pip} or with wheel's own command line utility.")
1832 (license license:expat)
1833 (properties `((python2-variant . ,(delay python2-wheel))))))
1834
1835(define-public python2-wheel
1836 (let ((wheel (package-with-python2
1837 (strip-python2-variant python-wheel))))
1838 (package (inherit wheel)
1839 (native-inputs `(("python2-functools32" ,python2-functools32)
1840 ,@(package-native-inputs wheel))))))
1841
1842(define-public python-vcversioner
1843 (package
1844 (name "python-vcversioner")
1845 (version "2.16.0.0")
1846 (source
1847 (origin
1848 (method url-fetch)
1849 (uri (pypi-uri "vcversioner" version))
1850 (sha256
1851 (base32
1852 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
1853 (build-system python-build-system)
1854 (synopsis "Python library for version number discovery")
1855 (description "Vcversioner is a Python library that inspects tagging
1856information in a variety of version control systems in order to discover
1857version numbers.")
1858 (home-page "https://github.com/habnabit/vcversioner")
1859 (license license:isc)))
1860
1861(define-public python2-vcversioner
1862 (package-with-python2 python-vcversioner))
1863
5591fc4f
MC
1864(define-public python-jdcal
1865 (package
1866 (name "python-jdcal")
1867 (version "1.4")
1868 (source
1869 (origin
1870 (method url-fetch)
1871 (uri (pypi-uri "jdcal" version))
1872 (sha256
1873 (base32
1874 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
1875 (build-system python-build-system)
1876 (arguments
1877 `(#:phases (modify-phases %standard-phases
1878 (replace 'check
1879 (lambda _
1880 (invoke "pytest"))))))
1881 (native-inputs
1882 `(("python-pytest" ,python-pytest)))
1883 (home-page "https://github.com/phn/jdcal")
1884 (synopsis "Functions to convert between Julian dates Gregorian dates")
1885 (description "This Python library provides functions for converting
1886between Julian dates and Gregorian dates.")
1887 (license license:bsd-2)))
1888
1889(define-public python2-jdcal
1890 (package-with-python2 python-jdcal))
1891
44d10b1f
RW
1892(define-public python-jsonschema
1893 (package
1894 (name "python-jsonschema")
1895 (version "2.6.0")
1896 (source (origin
1897 (method url-fetch)
786ccb87 1898 (uri (pypi-uri "jsonschema" version))
44d10b1f
RW
1899 (sha256
1900 (base32
1901 "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg"))))
1902 (build-system python-build-system)
1903 (arguments
1904 '(#:phases
1905 (modify-phases %standard-phases
8d466799 1906 (replace 'check (lambda _ (invoke "nosetests"))))))
44d10b1f
RW
1907 (native-inputs
1908 `(("python-nose" ,python-nose)
1909 ("python-vcversioner" ,python-vcversioner)))
1910 (home-page "https://github.com/Julian/jsonschema")
1911 (synopsis "Implementation of JSON Schema for Python")
1912 (description
1913 "Jsonschema is an implementation of JSON Schema for Python.")
1914 (license license:expat)
1915 (properties `((python2-variant . ,(delay python2-jsonschema))))))
1916
1917(define-public python2-jsonschema
1918 (let ((jsonschema (package-with-python2
1919 (strip-python2-variant python-jsonschema))))
1920 (package (inherit jsonschema)
1921 (native-inputs
1922 `(("python2-mock" ,python2-mock)
1923 ,@(package-native-inputs jsonschema)))
1924 (propagated-inputs
1925 `(("python2-functools32" ,python2-functools32))))))
1926
1927(define-public python-schema
1928 (package
1929 (name "python-schema")
1930 (version "0.6.6")
1931 (source
1932 (origin
1933 (method url-fetch)
1934 (uri (pypi-uri "schema" version))
1935 (sha256
1936 (base32
1937 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
1938 (build-system python-build-system)
1939 (native-inputs
1940 `(("python-pytest" ,python-pytest)))
1941 (home-page "https://github.com/keleshev/schema")
1942 (synopsis "Simple data validation library")
1943 (description
1944 "@code{python-schema} is a library for validating Python data
1945structures, such as those obtained from config-files, forms, external
1946services or command-line parsing, converted from JSON/YAML (or
1947something else) to Python data-types.")
1948 (license license:psfl)))
1949
1950(define-public python2-schema
1951 (package-with-python2 python-schema))
1952
1953(define-public python-schema-0.5
1954 (package (inherit python-schema)
1955 (version "0.5.0")
1956 (source
1957 (origin
1958 (method url-fetch)
1959 (uri (pypi-uri "schema" version))
1960 (sha256
1961 (base32
1962 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
1963
1964(define-public python2-schema-0.5
1965 (package-with-python2 python-schema-0.5))
1966
1967(define-public python-kitchen
1968 (package
1969 (name "python-kitchen")
1970 (version "1.2.5")
1971 (source
1972 (origin
1973 (method url-fetch)
1974 (uri (pypi-uri "kitchen" version))
1975 (sha256
1976 (base32
1977 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
1978 (build-system python-build-system)
1979 (propagated-inputs
1980 `(("python-chardet" ,python-chardet)))
1981 (home-page "https://github.com/fedora-infra/kitchen")
1982 (synopsis "Python API for snippets")
1983 (description "@code{kitchen} module provides a python API for all sorts of
1984little useful snippets of code that everybody ends up writing for their projects
1985but never seem big enough to build an independent release. Use kitchen and stop
1986cutting and pasting that code over and over.")
1987 (license (list license:lgpl2.1+
1988 ;; subprocess.py, test_subprocess.py,
1989 ;; kitchen/pycompat25/defaultdict.py:
1990 license:psfl))))
1991
1992(define-public python2-kitchen
1993 (package-with-python2 python-kitchen))
1994
1995(define-public python-unidecode
1996 (package
1997 (name "python-unidecode")
1998 (version "1.0.23")
1999 (source (origin
2000 (method url-fetch)
2001 (uri (pypi-uri "Unidecode" version))
2002 (sha256
2003 (base32
2004 "1ysjbr3nqfqj97h8zyj3v9pya413vkv7a1mzml80w37xx15kb1cb"))))
2005 (build-system python-build-system)
2006 (home-page "https://pypi.python.org/pypi/Unidecode")
2007 (synopsis "ASCII transliterations of Unicode text")
2008 (description
2009 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2010useful when integrating with legacy code that doesn't support Unicode, or for
2011ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2012machine identifiers from human-readable Unicode strings that should still be
2013somewhat intelligible.")
2014 (license license:gpl2+)))
2015
2016(define-public python2-unidecode
2017 (package-with-python2 python-unidecode))
2018
2019(define-public python-pyjwt
2020 (package
2021 (name "python-pyjwt")
2022 (version "1.5.3")
2023 (source
2024 (origin
2025 (method url-fetch)
2026 (uri (pypi-uri "PyJWT" version))
2027 (sha256
2028 (base32
2029 "1rxsg14i33vm2i6lz0my628108c81k43v10n4h3p0gx62xdyf2sh"))
2030 (modules '((guix build utils)))
2031 (snippet
2032 '(begin
2033 (for-each delete-file-recursively
2034 (find-files "." "\\.pyc$"))
2035 #t))))
2036 (build-system python-build-system)
2037 (native-inputs
2038 `(("python-pytest" ,python-pytest)
2039 ("python-pytest-cov" ,python-pytest-cov)
2040 ("python-pytest-runner" ,python-pytest-runner)))
2041 (home-page "https://github.com/progrium/pyjwt")
2042 (synopsis "JSON Web Token implementation in Python")
2043 (description
2044 "PyJWT is a JSON Web Token implementation written in Python.")
2045 (license license:expat)))
2046
2047(define-public python2-pyjwt
2048 (package-with-python2 python-pyjwt))
2049
2050(define-public python-pykka
2051 (package
2052 (name "python-pykka")
2053 (version "1.2.1")
2054 (source
2055 (origin
2056 (method url-fetch)
2057 (uri (pypi-uri "Pykka" version))
2058 (sha256
2059 (base32
2060 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2061 (build-system python-build-system)
2062 (native-inputs
2063 `(("python-mock" ,python-mock)
2064 ("python-nose" ,python-nose)
2065 ("python-gevent" ,python-gevent)
2066 ("python-eventlet" ,python-eventlet)))
2067 (home-page "https://www.pykka.org/")
2068 (synopsis "Pykka is a Python implementation of the actor model")
2069 (description
2070 "Pykka is a Python implementation of the actor model.
2071The actor model introduces some simple rules to control the sharing
2072of state and cooperation between execution units, which makes it
2073easier to build concurrent applications.")
2074 (license license:asl2.0)))
2075
2076(define-public python2-pykka
2077 (package-with-python2 python-pykka))
2078
8d22f7e3
VC
2079(define-public python-pymsgbox
2080 (package
2081 (name "python-pymsgbox")
2082 (version "1.0.6")
2083 (source
2084 (origin
2085 (method git-fetch)
2086 (uri (git-reference
2087 ;; LICENSE.txt is not present on pypi
2088 (url "https://github.com/asweigart/PyMsgBox")
2089 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
2090 (file-name (git-file-name name version))
2091 (sha256
2092 (base32
2093 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
2094 (arguments
2095 ;; Circular dependency to run tests:
2096 ;; Tests need pyautogui, which depends on pymsgbox.
2097 '(#:tests? #f))
2098 (build-system python-build-system)
2099 (home-page "https://github.com/asweigart/PyMsgBox")
2100 (synopsis "Python module for JavaScript-like message boxes")
2101 (description
2102 "PyMsgBox is a simple, cross-platform, pure Python module for
2103JavaScript-like message boxes. Types of dialog boxes include:
2104@enumerate
2105@item alert
2106@item confirm
2107@item prompt
2108@item password
2109@end enumerate
2110")
2111 (license license:bsd-3)))
2112
44d10b1f
RW
2113(define-public python-pympler
2114 (package
2115 (name "python-pympler")
2116 (home-page "https://pythonhosted.org/Pympler/")
2117 (version "0.5")
2118 (source (origin
2119 (method url-fetch)
2120 (uri (pypi-uri "Pympler" version))
2121 (sha256
2122 (base32
2123 "03qwsbilqgvnbl3a1jmpgixbr2kq6m3fvdlzyr3wdp01bwlc85kx"))))
2124 (build-system python-build-system)
2125 (arguments
2126 `(#:phases (modify-phases %standard-phases
2127 (delete 'check)
2128 (add-after 'install 'check
2129 (lambda* (#:key inputs outputs #:allow-other-keys)
2130 (add-installed-pythonpath inputs outputs)
2131 (invoke "python" "setup.py" "test"))))))
2132 (synopsis "Measure, monitor and analyze memory behavior")
2133 (description
2134 "Pympler is a development tool to measure, monitor and analyze
2135the memory behavior of Python objects in a running Python application.
2136
2137By pympling a Python application, detailed insight in the size and the
2138lifetime of Python objects can be obtained. Undesirable or unexpected
2139runtime behavior like memory bloat and other @samp{pymples} can easily
2140be identified.
2141
2142A web profiling frontend exposes process statistics, garbage
2143visualisation and class tracker statistics.")
2144 (license license:asl2.0)))
2145
2146(define-public python2-pympler
2147 (package-with-python2 python-pympler))
2148
2149(define-public python-itsdangerous
2150 (package
2151 (name "python-itsdangerous")
acfcf2ed 2152 (version "1.1.0")
44d10b1f
RW
2153 (source
2154 (origin
2155 (method url-fetch)
acfcf2ed 2156 (uri (pypi-uri "itsdangerous" version))
44d10b1f
RW
2157 (sha256
2158 (base32
acfcf2ed 2159 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
44d10b1f 2160 (build-system python-build-system)
acfcf2ed 2161 (home-page "https://palletsprojects.com/p/itsdangerous/")
44d10b1f
RW
2162 (synopsis "Python library for passing data to/from untrusted environments")
2163 (description
2164 "Itsdangerous provides various helpers to pass trusted data to untrusted
2165environments and back.")
2166 (license license:bsd-3)))
2167
2168(define-public python2-itsdangerous
2169 (package-with-python2 python-itsdangerous))
2170
2171(define-public python-pyyaml
2172 (package
2173 (name "python-pyyaml")
2174 (version "3.13")
2175 (source
2176 (origin
2177 (method url-fetch)
2178 (uri (pypi-uri "PyYAML" version))
2179 (sha256
2180 (base32
2181 "1gx603g484z46cb74j9rzr6sjlh2vndxayicvlyhxdz98lhhkwry"))))
2182 (build-system python-build-system)
2183 (inputs
2184 `(("libyaml" ,libyaml)))
2185 (home-page "http://pyyaml.org/wiki/PyYAML")
2186 (synopsis "YAML parser and emitter for Python")
2187 (description
2188 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2189complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2190API, and sensible error messages. PyYAML supports standard YAML tags and
2191provides Python-specific tags that allow to represent an arbitrary Python
2192object.")
2193 (license license:expat)))
2194
2195(define-public python2-pyyaml
2196 (package-with-python2 python-pyyaml))
2197
2198(define-public python-vine
2199 (package
2200 (name "python-vine")
2201 (version "1.1.4")
2202 (source
2203 (origin
2204 (method url-fetch)
2205 (uri (pypi-uri "vine" version))
2206 (sha256
2207 (base32
2208 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
2209 (build-system python-build-system)
2210 (native-inputs
2211 `(("python-pytest" ,python-pytest)
2212 ("python-case" ,python-case)))
2213 (home-page "https://github.com/celery/vine")
2214 (synopsis "Promises for Python")
2215 (description
2216 "@code{vine} provides a special implementation of promises in that it can
2217be used both for \"promise of a value\" and lazy evaluation. The biggest
2218upside for this is that everything in a promise can also be a promise,
2219e.g. filters, callbacks and errbacks can all be promises.")
2220 (license license:bsd-3)))
2221
2222(define-public python-virtualenv
2223 (package
2224 (name "python-virtualenv")
2782bd51 2225 (version "16.1.0")
44d10b1f
RW
2226 (source
2227 (origin
2228 (method url-fetch)
2229 (uri (pypi-uri "virtualenv" version))
2230 (sha256
2231 (base32
2782bd51 2232 "0242cg3hdq3qdvx5flyrki8lpwlgwf5k45c21ks5049fv7ygm6gq"))))
44d10b1f
RW
2233 (build-system python-build-system)
2234 (arguments
2235 `(#:phases
2236 (modify-phases %standard-phases
2782bd51 2237 (add-before 'check 'disable-failing-test
44d10b1f
RW
2238 (lambda _
2239 ;; Disable failing test. See upstream bug report
2240 ;; https://github.com/pypa/virtualenv/issues/957
2241 (substitute* "tests/test_virtualenv.py"
2242 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2782bd51 2243 #t)))))
44d10b1f
RW
2244 (native-inputs
2245 `(("python-mock" ,python-mock)
2246 ("python-pytest" ,python-pytest)))
2247 (home-page "https://virtualenv.pypa.io/")
2248 (synopsis "Virtual Python environment builder")
2249 (description
2250 "Virtualenv is a tool to create isolated Python environments.")
2251 (license license:expat)))
2252
2253(define-public python2-virtualenv
2254 (package-with-python2 python-virtualenv))
2255
2256(define-public python-markupsafe
2257 (package
2258 (name "python-markupsafe")
2259 (version "1.0")
2260 (source
2261 (origin
2262 (method url-fetch)
5182927c 2263 (uri (pypi-uri "MarkupSafe" version))
44d10b1f
RW
2264 (sha256
2265 (base32
2266 "0rdn1s8x9ni7ss8rfiacj7x1085lx8mh2zdwqslnw8xc3l4nkgm6"))))
2267 (build-system python-build-system)
2268 (home-page "https://github.com/mitsuhiko/markupsafe")
2269 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2270 (description
2271 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2272for Python.")
2273 (license license:bsd-3)))
2274
2275(define-public python2-markupsafe
2276 (package-with-python2 python-markupsafe))
2277
2278(define-public python-jinja2
2279 (package
2280 (name "python-jinja2")
2281 (version "2.10")
2282 (source
2283 (origin
2284 (method url-fetch)
2285 (uri (pypi-uri "Jinja2" version))
2286 (sha256
2287 (base32
2288 "190l36hfw3wb2n3n68yacjabxyb1pnxwn7vjx96cmjj002xy2jzq"))))
2289 (build-system python-build-system)
2290 (propagated-inputs
2291 `(("python-markupsafe" ,python-markupsafe)))
2292 (home-page "http://jinja.pocoo.org/")
2293 (synopsis "Python template engine")
2294 (description
2295 "Jinja2 is a small but fast and easy to use stand-alone template engine
2296written in pure Python.")
2297 (license license:bsd-3)))
2298
2299(define-public python2-jinja2
2300 (package-with-python2 python-jinja2))
2301
2302(define-public python-pystache
2303 (package
2304 (name "python-pystache")
2305 (version "0.5.4")
2306 (source (origin
2307 (method url-fetch)
2308 (uri (pypi-uri "pystache" version))
2309 (sha256
2310 (base32
2311 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2312 (build-system python-build-system)
2313 (arguments
2314 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2315 (home-page "http://defunkt.io/pystache/")
2316 (synopsis "Python logic-less template engine")
2317 (description
2318 "Pystache is a Python implementation of the framework agnostic,
2319logic-free templating system Mustache.")
2320 (license license:expat)
2321 (properties `((python2-variant . ,(delay python2-pystache))))))
2322
2323(define-public python2-pystache
2324 (package (inherit (package-with-python2
2325 (strip-python2-variant python-pystache)))
2326 (arguments
2327 `(#:python ,python-2
2328 #:phases
2329 (modify-phases %standard-phases
2330 (replace 'check
2331 (lambda _
dfafc29b 2332 (invoke "python" "test_pystache.py"))))))))
44d10b1f
RW
2333
2334(define-public python-joblib
2335 (package
2336 (name "python-joblib")
2337 (version "0.13.0")
2338 (source (origin
2339 (method url-fetch)
2340 (uri (pypi-uri "joblib" version))
2341 (sha256
2342 (base32
2343 "0612nazad8dxmn3xghfrmjax6456l4xy6hn9cngs7vydi14ds7v5"))))
2344 (build-system python-build-system)
2345 (arguments
2346 `(#:phases
2347 (modify-phases %standard-phases
2348 (replace 'check
2349 (lambda _ (invoke "pytest" "-v" "joblib"))))))
2350 (native-inputs
2351 `(("python-pytest" ,python-pytest)))
2352 (home-page "https://joblib.readthedocs.io/")
2353 (synopsis "Using Python functions as pipeline jobs")
2354 (description
2355 "Joblib is a set of tools to provide lightweight pipelining in Python.
2356In particular, joblib offers: transparent disk-caching of the output values
2357and lazy re-evaluation (memoize pattern), easy simple parallel computing
2358logging and tracing of the execution.")
2359 (license license:bsd-3)))
2360
2361(define-public python2-joblib
2362 (package-with-python2 python-joblib))
2363
a3363341
VC
2364(define-public python-daemon
2365 (package
2366 (name "python-daemon")
2367 (version "2.2.3")
2368 (source
2369 (origin
2370 (method url-fetch)
2371 (uri (pypi-uri "python-daemon" version))
2372 (sha256
2373 (base32
2374 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
2375 (build-system python-build-system)
2376 (arguments
2377 `(#:phases
2378 (modify-phases %standard-phases
2379 (add-before 'check 'disable-tests
2380 (lambda _
2381 ;; FIXME: Determine why test fails
2382 (substitute* "test/test_daemon.py"
2383 (("test_detaches_process_context")
2384 "skip_test_detaches_process_context"))
2385 #t)))))
2386 (propagated-inputs
2387 `(("python-lockfile" ,python-lockfile)))
2388 (native-inputs
2389 `(("python-unittest2" ,python-unittest2)
2390 ("python-testtools" ,python-testtools)
2391 ("python-testscenarios" ,python-testscenarios)
2392 ("python-mock" ,python-mock)
2393 ("python-docutils" ,python-docutils)))
2394 (home-page "https://pagure.io/python-daemon/")
2395 (synopsis "Python library for making a Unix daemon process")
2396 (description "Python-daemon is a library that assists a Python program to
2397turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
2398
2399This library provides a @code{DaemonContext} class that manages the following
2400important tasks for becoming a daemon process:
2401@enumerate
2402@item Detach the process into its own process group.
2403@item Set process environment appropriate for running inside a chroot.
2404@item Renounce suid and sgid privileges.
2405@item Close all open file descriptors.
2406@item Change the working directory, uid, gid, and umask.
2407@item Set appropriate signal handlers.
2408@item Open new file descriptors for stdin, stdout, and stderr.
2409@item Manage a specified PID lock file.
2410@item Register cleanup functions for at-exit processing.
2411@end enumerate")
2412 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
2413 (license (list license:asl2.0 license:gpl3+))))
2414
44d10b1f
RW
2415(define-public python-docutils
2416 (package
2417 (name "python-docutils")
2418 (version "0.14")
2419 (source
2420 (origin
2421 (method url-fetch)
2422 (uri (pypi-uri "docutils" version))
2423 (sha256
2424 (base32
2425 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2426 (build-system python-build-system)
2427 (arguments
2428 '(#:tests? #f)) ; no setup.py test command
2429 (home-page "http://docutils.sourceforge.net/")
2430 (synopsis "Python Documentation Utilities")
2431 (description
2432 "Docutils is a modular system for processing documentation into useful
2433formats, such as HTML, XML, and LaTeX. For input Docutils supports
2434reStructuredText.")
2435 ;; Most of the source code is public domain, but some source files are
2436 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2437 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2438
2439(define-public python2-docutils
2440 (package-with-python2 python-docutils))
2441
2442(define-public python-pygments
2443 (package
2444 (name "python-pygments")
2445 (version "2.2.0")
2446 (source
2447 (origin
2448 (method url-fetch)
2449 (uri (pypi-uri "Pygments" version))
2450 (sha256
2451 (base32
2452 "1k78qdvir1yb1c634nkv6rbga8wv4289xarghmsbbvzhvr311bnv"))))
2453 (build-system python-build-system)
2454 (arguments
2455 ;; FIXME: Tests require sphinx, which depends on this.
2456 '(#:tests? #f))
2457 (home-page "http://pygments.org/")
2458 (synopsis "Syntax highlighting")
2459 (description
2460 "Pygments is a syntax highlighting package written in Python.")
2461 (license license:bsd-2)))
2462
2463(define-public python2-pygments
2464 (package-with-python2 python-pygments))
2465
2466(define-public python-sphinxcontrib-websupport
2467 (package
2468 (name "python-sphinxcontrib-websupport")
2469 (version "1.1.0")
2470 (source (origin
2471 (method url-fetch)
2472 (uri (pypi-uri "sphinxcontrib-websupport" version))
2473 (sha256
2474 (base32
2475 "1ff3ix76xi1y6m99qxhaq5161ix9swwzydilvdya07mgbcvpzr4x"))))
2476 (build-system python-build-system)
2477 (arguments
2478 ;; FIXME: Tests depend on Sphinx, which depends on this.
2479 `(#:tests? #f))
2480 (home-page "http://sphinx-doc.org/")
2481 (synopsis "Sphinx API for web applications")
2482 (description "This package provides a Python API to easily integrate
2483Sphinx documentation into your web application. It provides tools to
2484integrate Sphinx documents in web templates and to handle searches.")
2485 (license license:bsd-3)))
2486
2487(define-public python2-sphinxcontrib-websupport
2488 (package-with-python2 python-sphinxcontrib-websupport))
2489
2490(define-public python-sphinx
2491 (package
2492 (name "python-sphinx")
2493 (version "1.7.7")
2494 (source
2495 (origin
2496 (method url-fetch)
2497 (uri (pypi-uri "Sphinx" version))
2498 (sha256
2499 (base32
2500 "0pkkbfj7cl157q550gcs45am5y78ps0h7q6455d64s1zmw01jlvi"))))
2501 (build-system python-build-system)
2502 (arguments
2503 `(#:phases
2504 (modify-phases %standard-phases
2505 (replace 'check
2506 (lambda _
2507 ;; Requires Internet access.
2508 (delete-file "tests/test_build_linkcheck.py")
2509 (substitute* "tests/test_build_latex.py"
2510 (("@pytest.mark.sphinx\\('latex', testroot='images'\\)")
2511 "@pytest.mark.skip()"))
2512 (when (which "python")
2513 ;; XXX: These tests are broken when using Python2:
2514 ;; <https://github.com/sphinx-doc/sphinx/issues/4710>.
2515 (delete-file "tests/test_api_translator.py")
2516 (delete-file "tests/test_setup_command.py"))
2517 (invoke "make" "test"))))))
2518 (propagated-inputs
2519 `(("python-imagesize" ,python-imagesize)
2520 ("python-sphinx-alabaster-theme"
2521 ,python-sphinx-alabaster-theme)
2522 ("python-babel" ,python-babel)
2523 ("python-snowballstemmer" ,python-snowballstemmer)
2524 ("python-docutils" ,python-docutils)
2525 ("python-jinja2" ,python-jinja2)
2526 ("python-packaging" ,python-packaging)
2527 ("python-pygments" ,python-pygments)
2528 ("python-requests" ,python-requests)
2529 ("python-six" ,python-six)
2530 ("python-sphinxcontrib-websupport" ,python-sphinxcontrib-websupport)))
2531 (native-inputs
2532 `(("graphviz" ,graphviz)
2533 ("imagemagick" ,imagemagick) ;for "convert"
2534 ("python-html5lib" ,python-html5lib)
2535 ("python-mock" ,python-mock)
2536 ("python-nose" ,python-nose)
2537 ("python-pytest" ,python-pytest)))
2538 (home-page "http://sphinx-doc.org/")
2539 (synopsis "Python documentation generator")
2540 (description "Sphinx is a tool that makes it easy to create documentation
2541for Python projects or other documents consisting of multiple reStructuredText
2542sources.")
2543 (license license:bsd-3)
2544 (properties `((python2-variant . ,(delay python2-sphinx))))))
2545
2546(define-public python2-sphinx
2547 (let ((base (package-with-python2 (strip-python2-variant python-sphinx))))
2548 (package
2549 (inherit base)
2550 (native-inputs `(("python2-mock" ,python2-mock)
2551 ("python2-enum34" ,python2-enum34)
2552 ,@(package-native-inputs base)))
2553 (propagated-inputs `(("python2-pytz" ,python2-pytz)
2554 ("python2-typing" ,python2-typing)
2555 ,@(package-propagated-inputs base))))))
2556
2557(define-public python-sphinx-gallery
2558 (package
2559 (name "python-sphinx-gallery")
2560 (version "0.1.13")
2561 (source (origin
2562 (method url-fetch)
2563 (uri (string-append "https://github.com/sphinx-gallery/sphinx-gallery"
2564 "/archive/v" version ".tar.gz"))
2565 (file-name (string-append name "-" version ".tar.gz"))
2566 (sha256
2567 (base32
2568 "03fs99mcb1r7qp0xixqv07vcz98sk21yq19ffdysi0infdcpzfkd"))))
2569 (build-system python-build-system)
2570 (arguments
2571 ;; FIXME: Tests attempt to download <https://docs.python.org/3/objects.inv>,
2572 ;; <https://docs.scipy.org/doc/numpy/objects.inv>, and
2573 ;; <https://matplotlib.org/objects.inv>.
2574 `(#:tests? #f))
2575 (native-inputs
2576 `(("python-pytest-runner" ,python-pytest-runner)))
2577 (home-page "https://sphinx-gallery.github.io/")
2578 (synopsis "Generate an examples gallery automatically")
2579 (description
2580 "@code{sphinx_gallery} is a Sphinx extension that builds an HTML version
2581from any set of Python scripts and puts it into an examples gallery.")
2582 (license license:bsd-3)))
2583
2584(define-public python2-sphinx-gallery
2585 (package-with-python2 python-sphinx-gallery))
2586
2587(define-public python-sphinx-rtd-theme
2588 (package
2589 (name "python-sphinx-rtd-theme")
2590 (version "0.2.4")
2591 (source
2592 (origin
2593 (method url-fetch)
2594 (uri (pypi-uri "sphinx_rtd_theme" version))
2595 (sha256
2596 (base32
2597 "05rlhjzdyapr2w74jjs7mrm8hi69qskcr5vya9f9drpsys7lpxrd"))))
2598 (build-system python-build-system)
2599 (arguments '(#:tests? #f)) ; No tests.
2600 (propagated-inputs
2601 `(("python-sphinx" ,python-sphinx)))
2602 (home-page "https://github.com/snide/sphinx_rtd_theme/")
2603 (synopsis "ReadTheDocs.org theme for Sphinx")
2604 (description "A theme for Sphinx used by ReadTheDocs.org.")
2605 (license license:expat)))
2606
2607(define-public python2-sphinx-rtd-theme
2608 (package-with-python2 python-sphinx-rtd-theme))
2609
2610(define-public python-guzzle-sphinx-theme
2611 (package
2612 (name "python-guzzle-sphinx-theme")
2613 (version "0.7.11")
2614 (source
2615 (origin
2616 (method url-fetch)
2617 (uri (pypi-uri "guzzle_sphinx_theme" version))
2618 (sha256
2619 (base32
2620 "1rnkzrrsbnifn3vsb4pfaia3nlvgvw6ndpxp7lzjrh23qcwid34v"))))
2621 (build-system python-build-system)
2622 (propagated-inputs
2623 `(("python-sphinx" ,python-sphinx)))
2624 (home-page "https://github.com/guzzle/guzzle_sphinx_theme")
2625 (synopsis "Sphinx theme used by Guzzle")
2626 (description "This package provides guzzle_sphinx_theme, a theme for the
2627Sphinx documentation system, used by @uref{http://docs.guzzlephp.org, Guzzle}
2628and several other projects.")
2629 (license license:expat)))
2630
2631(define-public python2-guzzle-sphinx-theme
2632 (package-with-python2 python-guzzle-sphinx-theme))
2633
0f0a5ef9
MC
2634(define-public python-bumpversion
2635 (package
2636 (name "python-bumpversion")
2637 (version "0.5.3")
2638 (source
2639 (origin
2640 (method url-fetch)
2641 (uri (pypi-uri "bumpversion" version))
2642 (sha256
2643 (base32
2644 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
2645 (build-system python-build-system)
2646 (home-page "https://github.com/peritus/bumpversion")
2647 (synopsis "Tool to bump software version")
2648 (description "This tool provides a command-line interface (CLI) to bump a
2649software version simply.")
2650 (license license:expat)))
2651
44d10b1f
RW
2652(define-public python-rst.linker
2653 (package
2654 (name "python-rst.linker")
2655 (version "1.10")
2656 (source
2657 (origin
2658 (method url-fetch)
2659 (uri (pypi-uri "rst.linker" version))
2660 (sha256
2661 (base32
2662 "0iqaacp7pj1s8avs4kc0qg0r7dscywaq37y6l9j14glqdikk0wdj"))))
2663 (build-system python-build-system)
2664 (propagated-inputs
2665 `(("python-dateutil" ,python-dateutil)
2666 ("python-six" ,python-six)))
2667 (native-inputs
2668 `(("python-setuptools-scm" ,python-setuptools-scm)))
2669 ;; Test would require path.py, which would introduce a cyclic dependence.
2670 (arguments `(#:tests? #f))
2671 ;; Note: As of version 1.7 the documentation is not worth building.
2672 (home-page "https://github.com/jaraco/rst.linker")
2673 (synopsis "Sphinx plugin to add links and timestamps")
2674 (description "rst.linker allows to automatically replace text by a
2675reStructuredText external reference or timestamps. It's primary purpose is to
2676augment the changelog, but it can be used for other documents, too.")
2677 (license license:expat)))
2678
2679(define-public python2-rst.linker
2680 (package-with-python2 python-rst.linker))
2681
2682(define-public python-feedgenerator
2683 (package
2684 (name "python-feedgenerator")
2685 (version "1.9")
2686 (source
2687 (origin
2688 (method url-fetch)
2689 (uri (pypi-uri "feedgenerator" version))
2690 (sha256
2691 (base32
2692 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
2693 (modules '((guix build utils)))
2694 (snippet
2695 '(begin
2696 ;; Remove pre-compiled .pyc files from source.
2697 (for-each delete-file-recursively
2698 (find-files "." "__pycache__" #:directories? #t))
2699 (for-each delete-file (find-files "." "\\.pyc$"))
2700 #t))))
2701 (build-system python-build-system)
2702 (propagated-inputs
2703 `(("python-pytz" ,python-pytz)
2704 ("python-six" ,python-six)))
2705 (home-page "https://github.com/getpelican/feedgenerator")
2706 (synopsis
2707 "Standalone version of Django's Atom/RSS feed generator")
2708 (description
2709 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2710which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
2711 (license license:bsd-3)))
2712
2713(define-public python2-feedgenerator
2714 (package-with-python2 python-feedgenerator))
2715
2716(define-public python-toml
2717 (package
2718 (name "python-toml")
2719 (version "0.9.4")
2720 (source
2721 (origin
2722 (method url-fetch)
2723 (uri (pypi-uri "toml" version))
2724 (sha256
2725 (base32
2726 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
2727 (build-system python-build-system)
2728 (arguments
2729 `(#:tests? #f)) ;no tests suite in release
2730 (home-page "https://github.com/uiri/toml")
2731 (synopsis "Library for TOML")
2732 (description
2733 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
2734Language (TOML) configuration files.")
2735 (license license:expat)))
2736
346c8752
BG
2737(define-public python-jsonrpc-server
2738 (package
2739 (name "python-jsonrpc-server")
2740 (version "0.1.2")
2741 (source
2742 (origin
2743 (method url-fetch)
2744 (uri (pypi-uri "python-jsonrpc-server" version))
2745 (sha256
2746 (base32
2747 "0m4ykpcdy52x37n1ikysp07j7p8ialcdvvvsrjp3545sn7iiid09"))))
2748 (build-system python-build-system)
2749 (propagated-inputs
2750 `(("python-future" ,python-future)
2751 ("python-mock" ,python-mock)
2752 ("python-pytest" ,python-pytest)))
2753 (home-page
2754 "https://github.com/palantir/python-jsonrpc-server")
2755 (synopsis "JSON RPC 2.0 server library")
2756 (description
2757 "This packages provides a JSON RPC 2.0 server library for Python.")
2758 (license license:expat)))
2759
56f4ad47
BG
2760(define-public python-pydocstyle
2761 (package
2762 (name "python-pydocstyle")
2763 (version "3.0.0")
2764 (source
2765 (origin
2766 (method url-fetch)
2767 (uri (pypi-uri "pydocstyle" version))
2768 (sha256
2769 (base32
2770 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
2771 (build-system python-build-system)
2772 (propagated-inputs
2773 `(("python-six" ,python-six)
2774 ("python-snowballstemmer" ,python-snowballstemmer)))
2775 (home-page
2776 "https://github.com/PyCQA/pydocstyle/")
2777 (synopsis "Python docstring style checker")
2778 (description
2779 "This package provides a style checker for the Python Language
2780Server (PLS).")
2781 (license license:expat)))
2782
be4d840c
BG
2783(define-public python-language-server
2784 (package
2785 (name "python-language-server")
ccbaeba3 2786 (version "0.26.1")
be4d840c
BG
2787 (source
2788 (origin
2789 (method url-fetch)
2790 (uri (pypi-uri "python-language-server" version))
2791 (sha256
2792 (base32
ccbaeba3 2793 "1vs9ckfmm534n1hq3m871916wsjvi5h4gyj6wlzg13ck6506lx0s"))))
be4d840c
BG
2794 (build-system python-build-system)
2795 (propagated-inputs
2796 `(("python-pluggy" ,python-pluggy)
2797 ("python-jsonrpc-server" ,python-jsonrpc-server)
2798 ("python-jedi" ,python-jedi)
2799 ("python-yapf" ,python-yapf)
2800 ("python-pyflakes" ,python-pyflakes)
2801 ("python-pydocstyle" ,python-pydocstyle)
2802 ("python-pycodestyle" ,python-pycodestyle)
2803 ("python-mccabe" ,python-mccabe)
2804 ("python-rope" ,python-rope)
fe4a4bd2
BG
2805 ("python-autopep8" ,python-autopep8)
2806 ("python-pylint" ,python-pylint)))
be4d840c
BG
2807 (home-page "https://github.com/palantir/python-language-server")
2808 (synopsis "Python implementation of the Language Server Protocol")
2809 (description
2810 "The Python Language Server (pyls) is an implementation of the Python 3
2811language specification for the Language Server Protocol (LSP). This tool is
2812used in text editing environments to provide a complete and integrated
2813feature-set for programming Python effectively.")
2814 (license license:expat)))
2815
44d10b1f
RW
2816(define-public python-black
2817 (package
2818 (name "python-black")
2819 (version "18.6b4")
2820 (source
2821 (origin
2822 (method url-fetch)
2823 (uri (pypi-uri "black" version))
2824 (sha256
2825 (base32
2826 "0i4sfqgz6w15vd50kbhi7g7rifgqlf8yfr8y78rypd56q64qn592"))))
2827 (build-system python-build-system)
2828 (arguments
2829 `(#:phases
2830 (modify-phases %standard-phases
2831 (add-after 'patch-source-shebangs 'patch-extra-shebangs
2832 (lambda _
2833 (let ((python3 (which "python3")))
2834 (substitute* '("tests/data/fmtonoff.py"
2835 "tests/data/string_prefixes.py"
2836 "tests/data/function.py")
2837 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
2838 (string-append "#!" python3 (if (string? minor-version)
2839 minor-version
2840 ""))))))))))
2841 (propagated-inputs
2842 `(("python-click" ,python-click)
2843 ("python-attrs" ,python-attrs)
2844 ("python-appdirs" ,python-appdirs)
2845 ("python-toml" ,python-toml)))
2846 (home-page "https://github.com/ambv/black")
2847 (synopsis "The uncompromising code formatter")
2848 (description "Black is the uncompromising Python code formatter.")
2849 (license license:expat)))
2850
2851(define-public python-blinker
2852 (package
2853 (name "python-blinker")
2854 (version "1.4")
2855 (source
2856 (origin
2857 (method url-fetch)
2858 (uri (pypi-uri "blinker" version))
2859 (sha256
2860 (base32
2861 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
2862 (build-system python-build-system)
2863 (home-page "http://pythonhosted.org/blinker/")
2864 (synopsis "Fast, simple object-to-object and broadcast signaling")
2865 (description
2866 "Blinker provides a fast dispatching system that allows any number of
2867interested parties to subscribe to events, or \"signals\".")
2868 (license license:expat)))
2869
2870(define-public python2-blinker
2871 (package-with-python2 python-blinker))
2872
2873(define-public pelican
2874 (package
2875 (name "pelican")
aa71b690 2876 (version "4.0.1")
44d10b1f
RW
2877 (source
2878 (origin
2879 (method url-fetch)
2880 (uri (pypi-uri "pelican" version))
2881 (sha256
2882 (base32
aa71b690 2883 "05yda7n6r0ll18fpdjzkzyr0ls8hbb86fnjyb33k9jvv5avah2lr"))))
44d10b1f
RW
2884 (build-system python-build-system)
2885 (propagated-inputs
2886 `(("python-feedgenerator" ,python-feedgenerator)
2887 ("python-jinja2" ,python-jinja2)
2888 ("python-pygments" ,python-pygments)
2889 ("python-docutils" ,python-docutils)
2890 ("python-pytz" ,python-pytz)
2891 ("python-blinker" ,python-blinker)
2892 ("python-unidecode" ,python-unidecode)
2893 ("python-six" ,python-six)
2894 ("python-dateutil" ,python-dateutil)
2895 ("python-markdown" ,python-markdown)))
2896 (home-page "https://getpelican.com/")
2897 (arguments
2898 `(;; XXX Requires a lot more packages to do unit tests :P
2899 #:tests? #f
2900 #:phases (modify-phases %standard-phases
2901 (add-before
2902 'install 'adjust-requires
2903 ;; Since feedgenerator is installed from git, it doesn't
2904 ;; conform to the version requirements.
2905 ;;
2906 ;; We *do have* "feedgenerator >= 1.6", but strip off the
2907 ;; version requirement so setuptools doesn't get confused.
2908 (lambda _
2909 (substitute* "setup.py"
2910 (("['\"]feedgenerator.*?['\"]")
2911 "'feedgenerator'")))))))
2912 (synopsis "Python-based static site publishing system")
2913 (description
2914 "Pelican is a tool to generate a static blog from reStructuredText,
2915Markdown input files, and more. Pelican uses Jinja2 for templating
2916and is very extensible.")
2917 (license license:agpl3+)))
2918
2919(define-public python-scikit-image
2920 (package
2921 (name "python-scikit-image")
9ff04084 2922 (version "0.14.2")
44d10b1f
RW
2923 (source
2924 (origin
2925 (method url-fetch)
2926 (uri (pypi-uri "scikit-image" version))
2927 (sha256
9ff04084 2928 (base32 "07qchljkyxvg5nrm12fvszi7pmjk4m01qp0w0z8syxzxxs20pz8s"))))
44d10b1f
RW
2929 (build-system python-build-system)
2930 (arguments
2931 ;; TODO: Some tests require running X11 server. Disable them?
2932 '(#:tests? #f))
2933 ;; See DEPENDS.txt for the list of build and run time requiremnts
2934 (propagated-inputs
2935 `(("python-cloudpickle" ,python-cloudpickle)
2936 ("python-dask" ,python-dask)
2937 ("python-matplotlib" ,python-matplotlib)
2938 ("python-networkx" ,python-networkx)
2939 ("python-numpy" ,python-numpy)
2940 ("python-pillow" ,python-pillow)
2941 ("python-pywavelets" ,python-pywavelets)
2942 ("python-scipy" ,python-scipy)
2943 ("python-six" ,python-six)))
2944 (native-inputs
2945 `(("python-cython" ,python-cython)))
2946 (home-page "http://scikit-image.org/")
2947 (synopsis "Image processing in Python")
2948 (description
2949 "Scikit-image is a collection of algorithms for image processing.")
2950 (license license:bsd-3)))
2951
2952(define-public python2-scikit-image
2953 (package-with-python2 python-scikit-image))
2954
2955(define-public python-cython
2956 (package
2957 (name "python-cython")
c6a2fd24 2958 (version "0.29.6")
44d10b1f
RW
2959 (source
2960 (origin
2961 (method url-fetch)
2962 (uri (pypi-uri "Cython" version))
2963 (sha256
2964 (base32
c6a2fd24 2965 "1bp7cn0pp5qy63k9hbp4ka34fm01kvysh478phpkhr68npqk6pbc"))))
44d10b1f
RW
2966 (build-system python-build-system)
2967 ;; we need the full python package and not just the python-wrapper
2968 ;; because we need libpython3.3m.so
2969 (inputs
2970 `(("python" ,python)))
2971 (arguments
2972 `(#:phases
2973 (modify-phases %standard-phases
2974 (add-before 'check 'set-HOME
2975 ;; some tests require access to "$HOME/.cython"
2976 (lambda _ (setenv "HOME" "/tmp") #t))
2977
2978 ;; FIXME: These tests started failing on armhf after the 0.28 update
2979 ;; (commit c69d11c5930), both with an error such as this:
2980 ;; compiling (cpp) and running dictcomp ...
2981 ;; === C/C++ compiler error output: ===
2982 ;; ‘
2983 ;; dictcomp.cpp:5221: confused by earlier errors, bailing out
2984 ;; See <https://hydra.gnu.org/build/2948724> for logs.
2985 ,@(if (target-arm32?)
2986 `((add-before 'check 'disable-failing-tests
2987 (lambda _
2988 (let ((disabled-tests (open-file "tests/bugs.txt" "a")))
2989 (for-each (lambda (test)
2990 (format disabled-tests "~a\n" test))
2991 '("memslice" "dictcomp"))
2992 (close-port disabled-tests)))))
2993 '())
2994
2995 (replace 'check
2996 (lambda _
44d10b1f
RW
2997 (invoke "python" "runtests.py" "-vv"))))))
2998 (home-page "http://cython.org/")
2999 (synopsis "C extensions for Python")
3000 (description "Cython is an optimising static compiler for both the Python
3001programming language and the extended Cython programming language. It makes
3002writing C extensions for Python as easy as Python itself.")
3003 (license license:asl2.0)
3004 (properties `((python2-variant . ,(delay python2-cython))))))
3005
3006(define-public python2-cython
3007 (package (inherit (package-with-python2
3008 (strip-python2-variant python-cython)))
3009 (name "python2-cython")
3010 (inputs
3011 `(("python-2" ,python-2))))) ; this is not automatically changed
3012
3013;; The RPython toolchain currently does not support Python 3.
3014(define-public python2-rpython
3015 (package
3016 (name "python2-rpython")
3017 (version "0.2.1")
3018 (source
3019 (origin
3020 (method url-fetch)
3021 (uri (pypi-uri "rpython" version))
3022 (sha256
3023 (base32
3024 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
3025 (build-system python-build-system)
3026 (arguments `(#:python ,python-2))
3027 (native-inputs
3028 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3029 (home-page "https://rpython.readthedocs.org")
3030 (synopsis "Framework for implementing interpreters and virtual machines")
3031 (description "RPython is a translation and support framework for
3032producing implementations of dynamic languages, emphasizing a clean separation
3033between language specification and implementation aspects.")
3034 (license license:expat)))
3035
3036;; NOTE: when upgrading numpy please make sure that python-pandas and
3037;; python-scipy still build, as these three packages are often used together.
3038(define-public python-numpy
3039 (package
3040 (name "python-numpy")
3041 (version "1.15.4")
3042 (source
3043 (origin
3044 (method url-fetch)
3045 (uri (string-append
3046 "https://github.com/numpy/numpy/releases/download/v"
3047 version "/numpy-" version ".tar.gz"))
3048 (sha256
3049 (base32
3050 "102vcl2qq4pjbm7a3d67vkkvn4466ngia1d8wi5avqwqh8j0jvkn"))))
3051 (build-system python-build-system)
3052 (inputs
3053 `(("openblas" ,openblas)
3054 ("lapack" ,lapack)))
3055 (native-inputs
3056 `(("python-cython" ,python-cython)
3057 ("python-pytest" ,python-pytest)
3058 ("gfortran" ,gfortran)))
3059 (arguments
3060 `(#:phases
3061 (modify-phases %standard-phases
3062 (add-before 'build 'configure-blas-lapack
3063 (lambda* (#:key inputs #:allow-other-keys)
3064 (call-with-output-file "site.cfg"
3065 (lambda (port)
3066 (format port
3067 "[openblas]
3068libraries = openblas
3069library_dirs = ~a/lib
3070include_dirs = ~a/include
3071
3072# backslash-n to make emacs happy
3073\n[lapack]
3074lapack_libs = lapack
3075library_dirs = ~a/lib
3076include_dirs = ~a/include
3077"
3078 (assoc-ref inputs "openblas")
3079 (assoc-ref inputs "openblas")
3080 (assoc-ref inputs "lapack")
3081 (assoc-ref inputs "lapack"))))
3082 #t))
3083 (add-before 'build 'fix-executable-paths
3084 (lambda* (#:key inputs #:allow-other-keys)
3085 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
3086 ;; instead of /bin/sh.
3087 (substitute* "numpy/distutils/exec_command.py"
3088 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
3089 (string-append match-start (assoc-ref inputs "bash") match-end)))
3090 ;; Use "gcc" executable, not "cc".
3091 (substitute* "numpy/distutils/system_info.py"
3092 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3093 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3094 #t))
3095 ;; Tests can only be run after the library has been installed and not
3096 ;; within the source directory.
3097 (delete 'check)
3098 (add-after 'install 'check
3099 (lambda* (#:key outputs inputs #:allow-other-keys)
3100 ;; Make installed package available for running the tests
3101 (add-installed-pythonpath inputs outputs)
3102 ;; Make sure "f2py" etc is found.
3103 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
3104 ":" (getenv "PATH")))
3105 (with-directory-excursion "/tmp"
3106 (invoke "python" "-c"
3107 "import numpy; numpy.test(verbose=2)")))))))
3108 (home-page "http://www.numpy.org/")
3109 (synopsis "Fundamental package for scientific computing with Python")
3110 (description "NumPy is the fundamental package for scientific computing
3111with Python. It contains among other things: a powerful N-dimensional array
3112object, sophisticated (broadcasting) functions, tools for integrating C/C++
3113and Fortran code, useful linear algebra, Fourier transform, and random number
3114capabilities.")
3115 (license license:bsd-3)))
3116
3117(define-public python2-numpy
3118 (package-with-python2 python-numpy))
3119
3120;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
3121;; interest only for legacy code going back to NumPy's predecessor
3122;; Numeric.
3123(define-public python2-numpy-1.8
3124 (package (inherit python2-numpy)
3125 (version "1.8.2")
3126 (source
3127 (origin
3128 (method url-fetch)
3129 (uri (string-append
3130 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
3131 (file-name (string-append "python2-numpy-" version ".tar.gz"))
3132 (sha256
3133 (base32
3134 "0sc20gz1b17xnyrkp5frca3ql5qfalpv916hfg2kqxpwr6jg0f1g"))))
3135 (arguments
3136 (substitute-keyword-arguments (package-arguments python2-numpy)
3137 ((#:phases phases)
3138 `(modify-phases ,phases
3139 (replace 'configure-blas-lapack
3140 (lambda* (#:key inputs #:allow-other-keys)
3141 (call-with-output-file "site.cfg"
3142 (lambda (port)
3143 (format port
3144 "[openblas]
3145libraries = openblas,lapack
3146library_dirs = ~a/lib:~a/lib
3147include_dirs = ~a/include:~a/include
3148"
3149 (assoc-ref inputs "openblas")
3150 (assoc-ref inputs "lapack")
3151 (assoc-ref inputs "openblas")
3152 (assoc-ref inputs "lapack"))))
3153 #t))))))
3154 (native-inputs
3155 `(("python2-nose" ,python2-nose)))
3156 (description "NumPy is the fundamental package for scientific computing
3157with Python. It contains among other things: a powerful N-dimensional array
3158object, sophisticated (broadcasting) functions, tools for integrating C/C++
3159and Fortran code, useful linear algebra, Fourier transform, and random number
3160capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
3161that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
3162Numeric.")
3163 (license license:bsd-3)))
3164
3165(define-public python-munch
3166 (package
3167 (name "python-munch")
3168 (version "2.0.4")
3169 (source
3170 (origin
3171 (method url-fetch)
3172 (uri (pypi-uri "munch" version))
3173 (sha256
3174 (base32
3175 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3176 (build-system python-build-system)
3177 (home-page "https://github.com/Infinidat/munch")
3178 (synopsis "Dot-accessible dictionary")
3179 (description "Munch is a dot-accessible dictionary similar to JavaScript
3180objects.")
3181 (license license:expat)))
3182
3183(define-public python2-munch
3184 (package-with-python2 python-munch))
3185
3186(define-public python-colormath
3187 (package
3188 (name "python-colormath")
3189 (version "3.0.0")
3190 (source
3191 (origin
3192 (method url-fetch)
3193 (uri (pypi-uri "colormath" version))
3194 (sha256
3195 (base32
3196 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3197 (build-system python-build-system)
3198 (propagated-inputs
3199 `(("python-networkx" ,python-networkx)
3200 ("python-numpy" ,python-numpy)))
3201 (home-page "https://github.com/gtaylor/python-colormath")
3202 (synopsis "Color math and conversion library")
3203 (description
3204 "This is a Python library for color math and conversions.")
3205 (license license:bsd-3)))
3206
3207(define-public python2-colormath
3208 (package-with-python2 python-colormath))
3209
3210(define-public python-spectra
3211 (package
3212 (name "python-spectra")
3213 (version "0.0.11")
3214 (source
3215 (origin
3216 (method url-fetch)
3217 (uri (pypi-uri "spectra" version))
3218 (sha256
3219 (base32
3220 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3221 (build-system python-build-system)
3222 (arguments
3223 `(#:phases
3224 (modify-phases %standard-phases
3225 (replace 'check
38ec0f6a 3226 (lambda _ (invoke "nosetests" "-v"))))))
44d10b1f
RW
3227 (propagated-inputs
3228 `(("python-colormath" ,python-colormath)))
3229 (native-inputs
3230 `(("python-nose" ,python-nose)))
3231 (home-page "https://github.com/jsvine/spectra")
3232 (synopsis "Color scales and color conversion")
3233 (description
3234 "This package provides a Python library intended to make color math,
3235color scales, and color space conversion easy. It has support for:
3236
3237@enumerate
3238@item Color scales
3239@item Color ranges
3240@item Color blending
3241@item Brightening/darkening colors
3242@item Saturating/desaturating colors
3243@item Conversion to/from multiple color spaces.
3244@end enumerate\n")
3245 (license license:expat)))
3246
3247(define-public python2-spectra
3248 (package-with-python2 python-spectra))
3249
3250(define-public python-numpy-documentation
3251 (package
3252 (name "python-numpy-documentation")
3253 (version (package-version python-numpy))
3254 (source (package-source python-numpy))
3255 (build-system python-build-system)
3256 (native-inputs
3257 `(("python-matplotlib" ,python-matplotlib)
3258 ("python-numpy" ,python-numpy)
3259 ("pkg-config" ,pkg-config)
3260 ("python-sphinx" ,python-sphinx)
3261 ("python-numpydoc" ,python-numpydoc)
3262 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
3263 texlive-fonts-cm-super
3264 texlive-fonts-ec
3265 texlive-generic-ifxetex
3266 texlive-generic-pdftex
3267 texlive-latex-amsfonts
3268 texlive-latex-capt-of
3269 texlive-latex-cmap
3270 texlive-latex-environ
3271 texlive-latex-eqparbox
3272 texlive-latex-etoolbox
3273 texlive-latex-expdlist
3274 texlive-latex-fancyhdr
3275 texlive-latex-fancyvrb
3276 texlive-latex-fncychap
3277 texlive-latex-float
3278 texlive-latex-framed
3279 texlive-latex-geometry
3280 texlive-latex-graphics
3281 texlive-latex-hyperref
3282 texlive-latex-mdwtools
3283 texlive-latex-multirow
3284 texlive-latex-needspace
3285 texlive-latex-oberdiek
3286 texlive-latex-parskip
3287 texlive-latex-preview
3288 texlive-latex-tabulary
3289 texlive-latex-threeparttable
3290 texlive-latex-titlesec
3291 texlive-latex-trimspaces
3292 texlive-latex-ucs
3293 texlive-latex-upquote
3294 texlive-latex-url
3295 texlive-latex-varwidth
3296 texlive-latex-wrapfig)))
3297 ("texinfo" ,texinfo)
3298 ("perl" ,perl)
3299 ("scipy-sphinx-theme"
3300 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3301 (method git-fetch)
3302 (uri (git-reference
3303 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3304 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3305 (sha256
3306 (base32
3307 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3308 ,@(package-native-inputs python-numpy)))
3309 (arguments
3310 `(#:tests? #f ; we're only generating the documentation
3311 #:phases
3312 (modify-phases %standard-phases
3313 (delete 'build)
3314 (replace 'install
3315 (lambda* (#:key inputs outputs #:allow-other-keys)
3316 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3317 (doc (string-append
3318 data "/doc/" ,name "-"
3319 ,(package-version python-numpy)))
3320 (info-reader (string-append data "/info"))
3321 (html (string-append doc "/html"))
3322 (scipy-sphinx-theme "scipy-sphinx-theme")
3323 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3324 (pyver ,(string-append "PYVER=")))
3325
3326 ;; FIXME: this is needed to for texlive-union to generate
3327 ;; fonts, which are not found.
3328 (setenv "HOME" "/tmp")
3329
3330 (with-directory-excursion "doc"
3331 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3332 (mkdir-p html)
4fc898da
RW
3333 (invoke "make" "html" pyver)
3334 (invoke "make" "latex" "PAPER=a4" pyver)
3335 (invoke "make" "-C" "build/latex"
44d10b1f
RW
3336 "all-pdf" "PAPER=a4" pyver)
3337 ;; FIXME: Generation of the info file fails.
4fc898da 3338 ;; (invoke "make" "info" pyver)
44d10b1f
RW
3339 ;; (mkdir-p info)
3340 ;; (copy-file "build/texinfo/numpy.info"
3341 ;; (string-append info "/numpy.info"))
3342 (for-each (lambda (file)
3343 (copy-file (string-append "build/latex" file)
3344 (string-append doc file)))
3345 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3346 (with-directory-excursion "build/html"
3347 (for-each (lambda (file)
3348 (let* ((dir (dirname file))
3349 (tgt-dir (string-append html "/" dir)))
3350 (unless (equal? "." dir)
3351 (mkdir-p tgt-dir))
3352 (install-file file html)))
3353 (find-files "." ".*")))))
3354 #t)))))
3355 (home-page (package-home-page python-numpy))
3356 (synopsis "Documentation for the python-numpy package")
3357 (description (package-description python-numpy))
3358 (license (package-license python-numpy))))
3359
3360(define-public python2-numpy-documentation
3361 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3362 (package
3363 (inherit numpy-documentation)
3364 (native-inputs `(("python2-functools32" ,python2-functools32)
3365 ,@(package-native-inputs numpy-documentation))))))
3366
3367(define-public python-pygit2
3368 (package
3369 (name "python-pygit2")
c3ecab0d 3370 (version "0.28.0")
44d10b1f
RW
3371 (source
3372 (origin
3373 (method url-fetch)
3374 (uri (pypi-uri "pygit2" version))
3375 (sha256
c3ecab0d 3376 (base32 "0lngsaz029d4fjcwhl17pr59nh9gwl6hwfin36nph60fgsmfdg3d"))))
44d10b1f
RW
3377 (build-system python-build-system)
3378 (arguments
c3ecab0d 3379 '(#:tests? #f)) ; tests don't run correctly in our environment
44d10b1f
RW
3380 (propagated-inputs
3381 `(("python-six" ,python-six)
3382 ("python-cffi" ,python-cffi)
3383 ("libgit2" ,libgit2)
3384 ("python-tox" ,python-tox)))
3385 (native-inputs
3386 `(("python-pytest" ,python-pytest)))
3387 (home-page "https://github.com/libgit2/pygit2")
3388 (synopsis "Python bindings for libgit2")
3389 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3390library, libgit2 implements Git plumbing.")
3391 ;; GPL2.0 only, with linking exception.
3392 (license license:gpl2)))
3393
3394(define-public python2-pygit2
3395 (package-with-python2 python-pygit2))
3396
3397(define-public python-pyparsing
3398 (package
3399 (name "python-pyparsing")
6d3cff5a 3400 (version "2.3.1")
44d10b1f
RW
3401 (source
3402 (origin
3403 (method url-fetch)
3404 (uri (pypi-uri "pyparsing" version))
3405 (sha256
6d3cff5a 3406 (base32 "0yk6xl885b91dmlhlsap7x78hk2rdr879fln9anbq6k4ca42djb6"))))
44d10b1f
RW
3407 (build-system python-build-system)
3408 (outputs '("out" "doc"))
3409 (arguments
3410 `(#:tests? #f ; no test target
3411 #:phases
3412 (modify-phases %standard-phases
3413 (add-after 'install 'install-doc
3414 (lambda* (#:key outputs #:allow-other-keys)
3415 (let* ((doc (string-append (assoc-ref outputs "doc")
3416 "/share/doc/" ,name "-" ,version))
3417 (html-doc (string-append doc "/html"))
3418 (examples (string-append doc "/examples")))
3419 (mkdir-p html-doc)
3420 (mkdir-p examples)
3421 (for-each
3422 (lambda (dir tgt)
3423 (map (lambda (file)
3424 (install-file file tgt))
3425 (find-files dir ".*")))
3426 (list "docs" "htmldoc" "examples")
3427 (list doc html-doc examples))
3428 #t))))))
3429 (home-page "https://github.com/pyparsing/pyparsing")
3430 (synopsis "Python parsing class library")
3431 (description
3432 "The pyparsing module is an alternative approach to creating and
3433executing simple grammars, vs. the traditional lex/yacc approach, or the use
3434of regular expressions. The pyparsing module provides a library of classes
3435that client code uses to construct the grammar directly in Python code.")
3436 (license license:expat)))
3437
3438(define-public python2-pyparsing
3439 (package-with-python2 python-pyparsing))
3440
3441(define-public python-numpydoc
3442 (package
3443 (name "python-numpydoc")
3444 (version "0.8.0")
3445 (source
3446 (origin
3447 (method url-fetch)
3448 (uri (pypi-uri "numpydoc" version))
3449 (sha256
3450 (base32
3451 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
3452 (build-system python-build-system)
3453 (propagated-inputs
3454 `(("python-sphinx" ,python-sphinx)))
3455 (native-inputs
3456 `(("python-nose" ,python-nose)))
3457 (home-page "https://pypi.python.org/pypi/numpydoc")
3458 (synopsis
3459 "Numpy's Sphinx extensions")
3460 (description
3461 "Sphinx extension to support docstrings in Numpy format.")
3462 (license license:bsd-2)))
3463
3464(define-public python2-numpydoc
3465 (package-with-python2 python-numpydoc))
3466
3467(define-public python-numexpr
3468 (package
3469 (name "python-numexpr")
3470 (version "2.6.5")
3471 (source
3472 (origin
3473 (method url-fetch)
3474 (uri (pypi-uri "numexpr" version))
3475 (sha256
3476 (base32
3477 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3478 (build-system python-build-system)
3479 (arguments `(#:tests? #f)) ; no tests included
3480 (propagated-inputs
3481 `(("python-numpy" ,python-numpy)))
3482 (home-page "https://github.com/pydata/numexpr")
3483 (synopsis "Fast numerical expression evaluator for NumPy")
3484 (description
3485 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3486expressions that operate on arrays are accelerated and use less memory than
3487doing the same calculation in Python. In addition, its multi-threaded
3488capabilities can make use of all your cores, which may accelerate
3489computations, most specially if they are not memory-bounded (e.g. those using
3490transcendental functions).")
3491 (license license:expat)))
3492
3493(define-public python2-numexpr
3494 (package-with-python2 python-numexpr))
3495
3496(define-public python-cycler
3497 (package
3498 (name "python-cycler")
3499 (version "0.10.0")
3500 (source (origin
3501 (method url-fetch)
3502 (uri (pypi-uri "cycler" version))
3503 (sha256
3504 (base32
3505 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3506 (build-system python-build-system)
3507 (arguments
3508 ;; XXX: The current version requires 'coveralls' which we don't have.
3509 ;; Enable this for the next release which uses 'python-pytest'.
3510 '(#:tests? #f))
3511 (propagated-inputs
3512 `(("python-six" ,python-six)))
3513 (home-page "http://matplotlib.org/cycler/")
3514 (synopsis "Composable keyword argument iterator")
3515 (description
3516 "When using @code{matplotlib} and plotting more than one line, it is
3517common to want to be able to want to be able to cycle over one or more artist
3518styles; but the plotting logic can quickly become involved.
3519To address this and enable easy cycling over arbitrary @code{kwargs}, the
3520@code{Cycler} class was developed.")
3521 (license license:bsd-3)))
3522
3523(define-public python2-cycler
3524 (package-with-python2 python-cycler))
3525
3526(define-public python-colorspacious
3527 (package
3528 (name "python-colorspacious")
3529 (version "1.1.0")
3530 (source
dee92e65
TGR
3531 (origin
3532 (method git-fetch)
3533 (uri (git-reference
3534 (url "https://github.com/njsmith/colorspacious.git")
3535 (commit (string-append "v" version))))
3536 (file-name (git-file-name name version))
3537 (sha256
3538 (base32 "0g0lxqiscy5g5rq9421vv7abg0c90jzy0zmas2z3hya6k2dr5aid"))))
44d10b1f
RW
3539 (build-system python-build-system)
3540 (propagated-inputs
3541 `(("python-numpy" ,python-numpy)))
3542 (native-inputs
3543 `(("python-nose" ,python-nose)))
3544 (arguments
3545 `(#:phases
3546 (modify-phases %standard-phases
3547 (replace 'check
3548 (lambda _
c988afda 3549 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
44d10b1f
RW
3550 (home-page "https://github.com/njsmith/colorspacious")
3551 (synopsis "Python library for colorspace conversions")
3552 (description "@code{colorspacious} is a Python library that lets you
3553convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3554 (license license:expat)))
3555
3556(define-public python2-colorspacious
3557 (package-with-python2 python-colorspacious))
3558
3559(define-public python-matplotlib
3560 (package
3561 (name "python-matplotlib")
3562 (version "2.2.3")
3563 (source
3564 (origin
3565 (method url-fetch)
3566 (uri (pypi-uri "matplotlib" version))
3567 (sha256
3568 (base32
3569 "1rcc7x9ig3hpchkc4cwdvym3y451w74275fxr455zkfagrsvymbk"))))
3570 (build-system python-build-system)
3571 (propagated-inputs ; the following packages are all needed at run time
3572 `(("python-cycler" ,python-cycler)
3573 ("python-kiwisolver" ,python-kiwisolver)
3574 ("python-pyparsing" ,python-pyparsing)
3575 ("python-pygobject" ,python-pygobject)
3576 ("gobject-introspection" ,gobject-introspection)
3577 ("python-tkinter" ,python "tk")
3578 ("python-dateutil" ,python-dateutil)
3579 ("python-numpy" ,python-numpy)
3580 ("python-pillow" ,python-pillow)
3581 ("python-pytz" ,python-pytz)
3582 ("python-six" ,python-six)
3583 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3584 ;; from 'gtk+') provides the required 'typelib' files used by
3585 ;; 'gobject-introspection'. The location of these files is set with the
3586 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3587 ;; is done automatically by a 'native-search-path' procedure. However,
3588 ;; at run-time the user must set this variable as follows:
3589 ;;
3590 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
3591 ("gtk+" ,gtk+)
3592 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3593 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3594 ;; object. For this reason we need to import both libraries.
3595 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3596 ("python-pycairo" ,python-pycairo)
3597 ;; XXX: qtwebkit cannot be built reliably.
3598 ("python-pyqt" ,python-pyqt-without-qtwebkit)
3599 ("python-cairocffi" ,python-cairocffi)))
3600 (inputs
3601 `(("libpng" ,libpng)
3602 ("imagemagick" ,imagemagick)
3603 ("freetype" ,freetype)
3604 ("cairo" ,cairo)
3605 ("glib" ,glib)
3606 ;; FIXME: Add backends when available.
3607 ;("python-wxpython" ,python-wxpython)
3608 ("tcl" ,tcl)
3609 ("tk" ,tk)))
3610 (native-inputs
3611 `(("pkg-config" ,pkg-config)
3612 ("python-nose" ,python-nose)
3613 ("python-mock" ,python-mock)))
3614 (arguments
3615 `(#:phases
3616 (modify-phases %standard-phases
3617 (add-before 'build 'configure-environment
3618 (lambda* (#:key outputs inputs #:allow-other-keys)
3619 (let ((cairo (assoc-ref inputs "cairo"))
3620 (gtk+ (assoc-ref inputs "gtk+")))
3621 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3622 ;; has not effect.
3623 (setenv "LD_LIBRARY_PATH"
3624 (string-append cairo "/lib:" gtk+ "/lib"))
3625 (setenv "HOME" (getcwd))
3626 (call-with-output-file "setup.cfg"
3627 (lambda (port)
3628 (format port "[directories]~%
3629basedirlist = ~a,~a~%
3630 [rc_options]~%
3631backend = TkAgg~%"
3632 (assoc-ref inputs "tcl")
3633 (assoc-ref inputs "tk")))))
3634 #t)))))
3635 (home-page "http://matplotlib.org")
3636 (synopsis "2D plotting library for Python")
3637 (description
3638 "Matplotlib is a Python 2D plotting library which produces publication
3639quality figures in a variety of hardcopy formats and interactive environments
3640across platforms. Matplotlib can be used in Python scripts, the python and
3641ipython shell, web application servers, and six graphical user interface
3642toolkits.")
3643 (license license:psfl)
3644 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3645
3646(define-public python2-matplotlib
3647 (let ((matplotlib (package-with-python2
3648 (strip-python2-variant python-matplotlib))))
3649 (package (inherit matplotlib)
3650 ;; Make sure to use special packages for Python 2 instead
3651 ;; of those automatically rewritten by package-with-python2.
3652 (propagated-inputs
3653 `(("python2-pycairo" ,python2-pycairo)
3654 ("python2-backports-functools-lru-cache"
3655 ,python2-backports-functools-lru-cache)
3656 ("python2-functools32" ,python2-functools32)
3657 ("python2-pygobject-2" ,python2-pygobject-2)
3658 ("python2-subprocess32" ,python2-subprocess32)
3659 ("python2-tkinter" ,python-2 "tk")
3660 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3661 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
3662
3663(define-public python-matplotlib-documentation
3664 (package
3665 (name "python-matplotlib-documentation")
3666 (version (package-version python-matplotlib))
3667 (source (package-source python-matplotlib))
3668 (build-system python-build-system)
3669 (native-inputs
3670 `(("python-matplotlib" ,python-matplotlib)
3671 ("python-colorspacious" ,python-colorspacious)
3672 ("python-sphinx" ,python-sphinx)
3673 ("python-sphinx-gallery" ,python-sphinx-gallery)
3674 ("python-numpydoc" ,python-numpydoc)
3675 ("python-ipython" ,python-ipython)
e7a53914 3676 ("python-ipykernel" ,python-ipykernel)
44d10b1f
RW
3677 ("python-mock" ,python-mock)
3678 ("graphviz" ,graphviz)
e7a53914
RW
3679 ("texlive" ,(texlive-union (list texlive-latex-amsfonts
3680 texlive-latex-amsmath
3681 texlive-latex-enumitem
3682 texlive-latex-expdlist
3683 texlive-latex-geometry
3684 texlive-latex-preview
3685 texlive-latex-type1cm
3686 texlive-latex-ucs
3687
3688 texlive-generic-pdftex
3689
3690 texlive-fonts-amsfonts
3691 texlive-fonts-ec
3692 texlive-fonts-adobe-times
3693 texlive-fonts-txfonts)))
44d10b1f
RW
3694 ("texinfo" ,texinfo)
3695 ,@(package-native-inputs python-matplotlib)))
3696 (arguments
3697 `(#:tests? #f ; we're only generating documentation
3698 #:phases
3699 (modify-phases %standard-phases
3700 (replace 'build
3701 (lambda _
3702 (chdir "doc")
e7a53914
RW
3703 (setenv "PYTHONPATH"
3704 (string-append (getenv "PYTHONPATH")
3705 ":" (getcwd) "/../examples/units"))
44d10b1f 3706 (substitute* "conf.py"
e7a53914
RW
3707 ;; Don't use git.
3708 (("^SHA = check_output.*")
3709 (string-append "SHA = \"" ,version "\"\n"))
3710 ;; Don't fetch intersphinx files from the Internet
3711 (("^explicit_order_folders" m)
3712 (string-append "intersphinx_mapping = {}\n" m))
3713 (("'sphinx.ext.intersphinx',") "")
3714 ;; Disable URL embedding which requires internet access.
3715 (("'https://docs.scipy.org/doc/numpy'") "None")
3716 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
3717 (invoke "make"
3718 "SPHINXBUILD=sphinx-build"
3719 "SPHINXOPTS=" ; don't abort on warnings
3720 "html" "texinfo")))
44d10b1f
RW
3721 (replace 'install
3722 (lambda* (#:key inputs outputs #:allow-other-keys)
3723 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3724 (doc (string-append data "/doc/python-matplotlib-" ,version))
3725 (info (string-append data "/info"))
3726 (html (string-append doc "/html")))
3727 (mkdir-p html)
3728 (mkdir-p info)
3729 (copy-recursively "build/html" html)
3730 (symlink (string-append html "/_images")
3731 (string-append info "/matplotlib-figures"))
3732 (with-directory-excursion "build/texinfo"
3733 (substitute* "matplotlib.texi"
3734 (("@image\\{([^,]*)" all file)
3735 (string-append "@image{matplotlib-figures/" file)))
3736 (symlink (string-append html "/_images")
3737 "./matplotlib-figures")
e7a53914
RW
3738 (invoke "makeinfo" "--no-split"
3739 "-o" "matplotlib.info" "matplotlib.texi"))
3740 (install-file "build/texinfo/matplotlib.info" info))
44d10b1f
RW
3741 #t)))))
3742 (home-page (package-home-page python-matplotlib))
3743 (synopsis "Documentation for the python-matplotlib package")
3744 (description (package-description python-matplotlib))
3745 (license (package-license python-matplotlib))))
3746
3747(define-public python2-matplotlib-documentation
3748 (package-with-python2 python-matplotlib-documentation))
3749
3750(define-public python2-pysnptools
3751 (package
3752 (name "python2-pysnptools")
5d1ade85 3753 (version "0.3.13")
44d10b1f
RW
3754 (source
3755 (origin
3756 (method url-fetch)
5d1ade85 3757 (uri (pypi-uri "pysnptools" version))
44d10b1f
RW
3758 (sha256
3759 (base32
5d1ade85 3760 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
44d10b1f
RW
3761 (build-system python-build-system)
3762 (arguments
5d1ade85
RW
3763 `(#:python ,python-2 ; only Python 2.7 is supported
3764 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
44d10b1f
RW
3765 (propagated-inputs
3766 `(("python2-numpy" ,python2-numpy)
3767 ("python2-scipy" ,python2-scipy)
3768 ("python2-pandas" ,python2-pandas)))
44d10b1f 3769 (native-inputs
5d1ade85 3770 `(("python2-cython" ,python2-cython)))
1b66989b 3771 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
44d10b1f
RW
3772 (synopsis "Library for reading and manipulating genetic data")
3773 (description
3774 "PySnpTools is a library for reading and manipulating genetic data. It
3775can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
3776those files. It can also efficiently manipulate ranges of integers using set
3777operators such as union, intersection, and difference.")
3778 (license license:asl2.0)))
3779
3780(define-public python-scipy
3781 (package
3782 (name "python-scipy")
3783 (version "1.1.0")
3784 (source
3785 (origin
3786 (method url-fetch)
3787 (uri (pypi-uri "scipy" version))
3788 (sha256
3789 (base32
3790 "1lfg686w6vv2m2dfs8v9d0bf2i18z7wz5vgzjnkgmpr4hi0550w7"))))
3791 (build-system python-build-system)
3792 (propagated-inputs
3793 `(("python-numpy" ,python-numpy)
3794 ("python-matplotlib" ,python-matplotlib)
3795 ("python-pyparsing" ,python-pyparsing)))
3796 (inputs
3797 `(("lapack" ,lapack)
3798 ("openblas" ,openblas)))
3799 (native-inputs
3800 `(("python-cython" ,python-cython)
3801 ("python-pytest" ,python-pytest)
3802 ("python-sphinx" ,python-sphinx)
3803 ("python-numpydoc" ,python-numpydoc)
3804 ("gfortran" ,gfortran)
3805 ("perl" ,perl)
3806 ("which" ,which)))
3807 (outputs '("out" "doc"))
3808 (arguments
3809 `(#:phases
3810 (modify-phases %standard-phases
3811 (add-after 'unpack 'disable-broken-tests
3812 (lambda _
3813 (substitute* "scipy/sparse/linalg/dsolve/tests/test_linsolve.py"
3814 (("^( +)def test_threads_parallel\\(self\\):" m indent)
3815 (string-append indent
3816 "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
3817 m)))
3818 (substitute* "scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py"
3819 (("^def test_parallel_threads\\(\\):" m)
3820 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
3821 m)))
3822 #t))
3823 (add-before 'build 'configure-openblas
3824 (lambda* (#:key inputs #:allow-other-keys)
3825 (call-with-output-file "site.cfg"
3826 (lambda (port)
3827 (format port
3828 "[blas]
3829libraries = openblas
3830library_dirs = ~a/lib
3831include_dirs = ~a/include
3832
3833# backslash-n to make emacs happy
3834\n[atlas]
3835library_dirs = ~a/lib
3836atlas_libs = openblas
3837"
3838 (assoc-ref inputs "openblas")
3839 (assoc-ref inputs "openblas")
3840 (assoc-ref inputs "openblas"))))
3841 #t))
3842 (add-after 'install 'install-doc
3843 (lambda* (#:key inputs outputs #:allow-other-keys)
3844 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3845 (doc (string-append data "/doc/" ,name "-" ,version))
3846 (html (string-append doc "/html"))
3847 (pyver ,(string-append "PYVER=" (version-major+minor
3848 (package-version python))))
3849 ;; By default it tries to run sphinx-build through the Python
3850 ;; interpreter which won't work with our shell wrapper.
3851 (sphinxbuild "SPHINXBUILD=LANG=C sphinx-build"))
3852 ;; Make installed package available for building the
3853 ;; documentation
3854 (add-installed-pythonpath inputs outputs)
3855 (with-directory-excursion "doc"
3856 ;; Fix generation of images for mathematical expressions.
3857 (substitute* (find-files "source" "conf\\.py")
3858 (("pngmath_use_preview = True")
3859 "pngmath_use_preview = False"))
3860 (mkdir-p html)
3861 (invoke "make" "html" pyver sphinxbuild)
3862 (with-directory-excursion "build/html"
3863 (for-each (lambda (file)
3864 (let* ((dir (dirname file))
3865 (tgt-dir (string-append html "/" dir)))
3866 (install-file file html)))
3867 (find-files "." ".*")))))
3868 #t))
3869 ;; Tests can only be run after the library has been installed and not
3870 ;; within the source directory.
3871 (delete 'check)
3872 (add-after 'install 'check
3873 (lambda* (#:key inputs outputs #:allow-other-keys)
3874 (add-installed-pythonpath inputs outputs)
3875 (with-directory-excursion "/tmp"
3876 (invoke "python" "-c"
3877 "import scipy; scipy.test(verbose=2)")))))))
3878 (home-page "https://www.scipy.org/")
3879 (synopsis "The Scipy library provides efficient numerical routines")
3880 (description "The SciPy library is one of the core packages that make up
3881the SciPy stack. It provides many user-friendly and efficient numerical
3882routines such as routines for numerical integration and optimization.")
3883 (properties `((python2-variant . ,(delay python2-scipy))))
3884 (license license:bsd-3)))
3885
3886(define-public python2-scipy
3887 (package-with-python2
3888 (strip-python2-variant python-scipy)))
3889
3890(define-public python-socksipy-branch
3891 (package
3892 (name "python-socksipy-branch")
3893 (version "1.01")
3894 (source
3895 (origin
3896 (method url-fetch)
3897 (uri (pypi-uri "SocksiPy-branch" version))
3898 (sha256
3899 (base32
3900 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
3901 (build-system python-build-system)
3902 (arguments
3903 `(#:tests? #f)) ; There are no tests
3904 (home-page "https://code.google.com/archive/p/socksipy-branch/")
3905 (synopsis "Python SOCKS module")
3906 (description
3907 "SocksiPy - A Python SOCKS client module. It provides a
3908socket-like interface that supports connections to any TCP
3909service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
3910The original version was developed by Dan Haim, this is a
3911branch created by Mario Vilas to address some open issues,
3912as the original project seems to have been abandoned circa 2007.")
3913 (license license:bsd-3)))
3914
3915(define-public python2-socksipy-branch
3916 (package-with-python2 python-socksipy-branch))
3917
3918(define-public python-pycodestyle
3919 (package
3920 (name "python-pycodestyle")
3921 (version "2.4.0")
3922 (source
3923 (origin
3924 (method url-fetch)
3925 (uri (pypi-uri "pycodestyle" version))
3926 (sha256
3927 (base32
3928 "0fhy4vnlgpjq4qd1wdnl6pvdw7rah0ypmn8c9mkhz8clsndskz6b"))))
3929 (build-system python-build-system)
3930 (home-page "https://pycodestyle.readthedocs.io/")
3931 (synopsis "Python style guide checker")
3932 (description "@code{pycodestyle} (formerly pep8) is a tool to check
3933Python code against some of the style conventions in
3934@url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
3935 (license license:expat)))
3936
3937(define-public python2-pycodestyle
3938 (package-with-python2 python-pycodestyle))
3939
3940(define-public python-multidict
3941 (package
3942 (name "python-multidict")
3943 (version "4.2.0")
3944 (source
3945 (origin
3946 (method url-fetch)
3947 (uri (pypi-uri "multidict" version))
3948 (sha256
3949 (base32
3950 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
3951 (build-system python-build-system)
3952 (native-inputs
3953 `(("python-pytest" ,python-pytest)
3954 ("python-pytest-runner" ,python-pytest-runner)))
3955 (home-page "https://github.com/aio-libs/multidict/")
3956 (synopsis "Multidict implementation")
3957 (description "Multidict is dict-like collection of key-value pairs
3958where key might be occurred more than once in the container.")
3959 (license license:asl2.0)))
3960
3961(define-public python-orderedmultidict
3962 (package
3963 (name "python-orderedmultidict")
3964 (version "0.7.11")
3965 (source
3966 (origin
3967 (method url-fetch)
3968 (uri (pypi-uri "orderedmultidict" version))
3969 (sha256
3970 (base32
3971 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
3972 (build-system python-build-system)
3973 (arguments
3974 `(#:phases
3975 (modify-phases %standard-phases
3976 (add-after 'unpack 'fix-tests
3977 (lambda _
3978 ;; The package uses nosetest for running the tests.
3979 ;; Adding this initfile allows to run the test suite
3980 ;; without requiring nosetest.
d1c4f329
RW
3981 (with-output-to-file "tests/__init__.py" newline)
3982 #t)))))
44d10b1f
RW
3983 (propagated-inputs
3984 `(("python-six" ,python-six)))
3985 (native-inputs
3986 `(("python-pycodestyle" ,python-pycodestyle)))
3987 (home-page "https://github.com/gruns/orderedmultidict")
3988 (synopsis "Python Ordered Multivalue Dictionary - omdict")
3989 (description "This package contains a library for ordered multivalue
3990dictionaries. A multivalue dictionary is a dictionary that can store
3991multiple values for the same key. An ordered multivalue dictionary is a
3992multivalue dictionary that retains the order of insertions and deletions.")
3993 (license license:unlicense)))
3994
3995(define-public python2-orderedmultidict
3996 (package-with-python2 python-orderedmultidict))
3997
3998(define-public python-autopep8
3999 (package
4000 (name "python-autopep8")
4001 (version "1.3.5")
4002 (source
4003 (origin
4004 (method url-fetch)
4005 (uri (pypi-uri "autopep8" version))
4006 (sha256
4007 (base32
4008 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
4009 (build-system python-build-system)
4010 (propagated-inputs
4011 `(("python-pycodestyle" ,python-pycodestyle)))
4012 (home-page "https://github.com/hhatto/autopep8")
4013 (synopsis "Format Python code according to the PEP 8 style guide")
4014 (description
4015 "@code{autopep8} automatically formats Python code to conform to
4016the PEP 8 style guide. It uses the pycodestyle utility to determine
4017what parts of the code needs to be formatted. @code{autopep8} is
4018capable of fixing most of the formatting issues that can be reported
4019by pycodestyle.")
4020 (license (license:non-copyleft
4021 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4022
4023(define-public python2-autopep8
4024 (package-with-python2 python-autopep8))
4025
4026(define-public python-distutils-extra
4027 (package
4028 (name "python-distutils-extra")
4029 (version "2.38")
4030 (source
4031 (origin
4032 (method url-fetch)
4033 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4034 version "/+download/python-distutils-extra-"
4035 version ".tar.gz"))
4036 (sha256
4037 (base32
4038 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4039 (build-system python-build-system)
4040 (home-page "https://launchpad.net/python-distutils-extra/")
4041 (synopsis "Enhancements to Python's distutils")
4042 (description
4043 "The python-distutils-extra module enables you to easily integrate
4044gettext support, themed icons, and scrollkeeper-based documentation into
4045Python's distutils.")
4046 (license license:gpl2)))
4047
4048(define-public python2-distutils-extra
4049 (package-with-python2 python-distutils-extra))
4050
4051(define-public python2-elib.intl
4052 (package
4053 (name "python2-elib.intl")
4054 (version "0.0.3")
4055 (source
4056 (origin
4057 ;; This project doesn't tag releases or publish tarballs, so we take
4058 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4059 (method git-fetch)
4060 (uri (git-reference
4061 (url "https://github.com/dieterv/elib.intl.git")
4062 (commit "d09997cfef")))
4063 (file-name (string-append name "-" version "-checkout"))
4064 (sha256
4065 (base32
4066 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4067 (build-system python-build-system)
4068 (arguments
4069 ;; incompatible with Python 3 (exception syntax)
4070 `(#:python ,python-2
4071 #:tests? #f))
4072 (home-page "https://github.com/dieterv/elib.intl")
4073 (synopsis "Enhanced internationalization for Python")
4074 (description
4075 "The elib.intl module provides enhanced internationalization (I18N)
4076services for your Python modules and applications.")
4077 (license license:lgpl3+)))
4078
4079(define-public python-olefile
4080 (package
4081 (name "python-olefile")
4082 (version "0.45.1")
4083 (source
4084 (origin
4085 (method url-fetch)
4086 (uri (string-append "https://github.com/decalage2/olefile/archive/v"
4087 version ".tar.gz"))
4088 (file-name (string-append name "-" version ".tar.gz"))
4089 (sha256
4090 (base32
4091 "18ai19zwagm6nli14k8bii31ipbab2rp7plrvsm6gmfql551a8ai"))))
4092 (build-system python-build-system)
4093 (home-page
4094 "https://www.decalage.info/python/olefileio")
4095 (synopsis "Read and write Microsoft OLE2 files.")
4096 (description
4097 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
4098Storage or Compound Document, Microsoft Office). It is an improved version of
4099the OleFileIO module from PIL, the Python Image Library.")
4100 (license license:bsd-3)))
4101
4102(define-public python2-olefile
4103 (package-with-python2 python-olefile))
4104
4105(define-public python-pillow
4106 (package
4107 (name "python-pillow")
4108 (version "5.4.1")
4109 (source
4110 (origin
4111 (method url-fetch)
4112 (uri (pypi-uri "Pillow" version))
4113 (sha256
4114 (base32
4115 "17waygkhhzjd75kajlfw9v57mbb41lcpg6cvkdijqd7smm76ccsj"))))
4116 (build-system python-build-system)
4117 (native-inputs
4118 `(("python-pytest" ,python-pytest)))
4119 (inputs
4120 `(("freetype" ,freetype)
4121 ("lcms" ,lcms)
4122 ("zlib" ,zlib)
4123 ("libjpeg" ,libjpeg)
4124 ("openjpeg" ,openjpeg)
4125 ("libtiff" ,libtiff)
4126 ("libwebp" ,libwebp)))
4127 (propagated-inputs
4128 `(("python-olefile" ,python-olefile)))
4129 (arguments
4130 `(#:phases
4131 (modify-phases %standard-phases
4132 (add-after 'unpack 'patch-ldconfig
4133 (lambda _
4134 (substitute* "setup.py"
4135 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
4136 (delete 'check) ; We must run checks after python-pillow is installed.
4137 (add-after 'install 'check-installed
4138 (lambda* (#:key outputs inputs #:allow-other-keys)
4139 (begin
4140 (setenv "HOME" (getcwd))
4141 ;; Make installed package available for running the tests.
4142 (add-installed-pythonpath inputs outputs)
4143 (invoke "python" "selftest.py" "--installed")
4144 (invoke "python" "-m" "pytest" "-vv")))))))
4145 (home-page "https://python-pillow.org")
4146 (synopsis "Fork of the Python Imaging Library")
4147 (description
4148 "The Python Imaging Library adds image processing capabilities to your
4149Python interpreter. This library provides extensive file format support, an
4150efficient internal representation, and fairly powerful image processing
4151capabilities. The core image library is designed for fast access to data
4152stored in a few basic pixel formats. It should provide a solid foundation for
4153a general image processing tool.")
4154 (license (license:x11-style
4155 "http://www.pythonware.com/products/pil/license.htm"
4156 "The PIL Software License"))))
4157
4158(define-public python2-pillow
4159 (package-with-python2 python-pillow))
4160
4161(define-public python-pycparser
4162 (package
4163 (name "python-pycparser")
4164 (version "2.18")
4165 (source
4166 (origin
4167 (method url-fetch)
4168 (uri (pypi-uri "pycparser" version))
4169 (sha256
4170 (base32
4171 "09mjyw82ibqzl449g7swy8bfxnfpmas0815d2rkdjlcqw81wma4r"))))
4172 (outputs '("out" "doc"))
4173 (build-system python-build-system)
4174 (native-inputs
4175 `(("pkg-config" ,pkg-config)))
4176 (arguments
4177 `(#:phases
4178 (modify-phases %standard-phases
4179 (replace 'check
4180 (lambda _
4181 (with-directory-excursion "tests"
acb75c03
RW
4182 (invoke "python" "all_tests.py"))
4183 #t))
44d10b1f
RW
4184 (add-after 'install 'install-doc
4185 (lambda* (#:key outputs #:allow-other-keys)
4186 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4187 (doc (string-append data "/doc/" ,name "-" ,version))
4188 (examples (string-append doc "/examples")))
4189 (mkdir-p examples)
4190 (for-each (lambda (file)
4191 (copy-file (string-append "." file)
4192 (string-append doc file)))
4193 '("/README.rst" "/CHANGES" "/LICENSE"))
4194 (copy-recursively "examples" examples)))))))
4195 (home-page "https://github.com/eliben/pycparser")
4196 (synopsis "C parser in Python")
4197 (description
4198 "Pycparser is a complete parser of the C language, written in pure Python
4199using the PLY parsing library. It parses C code into an AST and can serve as
4200a front-end for C compilers or analysis tools.")
4201 (license license:bsd-3)))
4202
4203(define-public python2-pycparser
4204 (package-with-python2 python-pycparser))
4205
4206(define-public python-pywavelets
4207 (package
4208 (name "python-pywavelets")
4209 (version "1.0.1")
4210 (home-page "https://github.com/PyWavelets/pywt")
4211 (source (origin
4212 (method url-fetch)
4213 (uri (pypi-uri "PyWavelets" version))
4214 (sha256
4215 (base32
4216 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
4217 (build-system python-build-system)
4218 (arguments
4219 '(#:modules ((ice-9 ftw)
4220 (srfi srfi-1)
4221 (srfi srfi-26)
4222 (guix build utils)
4223 (guix build python-build-system))
4224 #:phases (modify-phases %standard-phases
4225 (replace 'check
4226 (lambda _
4227 (let ((cwd (getcwd))
4228 (libdir (find (cut string-prefix? "lib." <>)
4229 (scandir "build"))))
4230 (with-directory-excursion (string-append cwd "/build/" libdir)
4231 (invoke "nosetests" "-v" "."))))))))
4232 (native-inputs
4233 `(("python-matplotlib" ,python-matplotlib) ;for tests
4234 ("python-nose" ,python-nose)))
4235 (propagated-inputs
4236 `(("python-numpy" ,python-numpy)))
4237 (synopsis "Wavelet transforms in Python")
4238 (description
4239 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
4240mathematical basis functions that are localized in both time and frequency.
4241Wavelet transforms are time-frequency transforms employing wavelets. They are
4242similar to Fourier transforms, the difference being that Fourier transforms are
4243localized only in frequency instead of in time and frequency.")
4244 (license license:expat)))
4245
4246(define-public python2-pywavelets
4247 (package-with-python2 python-pywavelets))
4248
4249(define-public python-xcffib
4250 (package
4251 (name "python-xcffib")
4252 (version "0.6.0")
4253 (source
4254 (origin
4255 (method url-fetch)
4256 (uri (pypi-uri "xcffib" version))
4257 (sha256
4258 (base32
4259 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
4260 (build-system python-build-system)
4261 (inputs
4262 `(("libxcb" ,libxcb)))
4263 (propagated-inputs
4264 `(("python-cffi" ,python-cffi) ; used at run time
4265 ("python-six" ,python-six)))
4266 (arguments
4267 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4268 #:tests? #f
4269 #:phases
4270 (modify-phases %standard-phases
4271 (add-after 'unpack 'fix-libxcb-path
4272 (lambda* (#:key inputs #:allow-other-keys)
4273 (let ((libxcb (assoc-ref inputs "libxcb")))
4274 (substitute* '("xcffib/__init__.py")
4275 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4276 #t)))
4277 (add-after 'install 'install-doc
4278 (lambda* (#:key outputs #:allow-other-keys)
4279 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4280 "/doc/" ,name "-" ,version)))
4281 (mkdir-p doc)
4282 (copy-file "README.md"
4283 (string-append doc "/README.md"))
4284 #t))))))
4285 (home-page "https://github.com/tych0/xcffib")
4286 (synopsis "XCB Python bindings")
4287 (description
4288 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4289support for Python 3 and PyPy. It is based on cffi.")
4290 (license license:expat)))
4291
4292(define-public python2-xcffib
4293 (package-with-python2 python-xcffib))
4294
4295(define-public python-cairocffi
4296 (package
4297 (name "python-cairocffi")
4298 (version "0.9.0")
4299 (source
4300 (origin
4301 (method url-fetch)
4302 (uri (pypi-uri "cairocffi" version))
4303 (sha256
4304 (base32
4305 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
4306 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
4307 (build-system python-build-system)
4308 (outputs '("out" "doc"))
4309 (inputs
4310 `(("glib" ,glib)
4311 ("gtk+" ,gtk+)
4312 ("gdk-pixbuf" ,gdk-pixbuf)
4313 ("cairo" ,cairo)
4314 ("pango" ,pango)))
4315 (native-inputs
4316 `(("pkg-config" ,pkg-config)
4317 ("python-pytest" ,python-pytest)
4318 ("python-pytest-cov" ,python-pytest-cov)
4319 ("python-pytest-runner" ,python-pytest-runner)
4320 ("python-sphinx" ,python-sphinx)
4321 ("python-docutils" ,python-docutils)))
4322 (propagated-inputs
4323 `(("python-xcffib" ,python-xcffib))) ; used at run time
4324 (arguments
4325 `(#:phases
4326 (modify-phases %standard-phases
4327 (add-after 'unpack 'patch-paths
4328 (lambda* (#:key inputs outputs #:allow-other-keys)
4329 (substitute* (find-files "." "\\.py$")
4330 (("dlopen\\(ffi, 'cairo'")
4331 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
4332 "/lib/libcairo.so.2'"))
4333 (("dlopen\\(ffi, 'gdk-3'")
4334 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
4335 "/lib/libgtk-3.so.0'"))
4336 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
4337 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
4338 "/lib/libgdk_pixbuf-2.0.so.0'"))
4339 (("dlopen\\(ffi, 'glib-2.0'")
4340 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4341 "/lib/libglib-2.0.so.0'"))
4342 (("dlopen\\(ffi, 'gobject-2.0'")
4343 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4344 "/lib/libgobject-2.0.so.0'"))
4345 (("dlopen\\(ffi, 'pangocairo-1.0'")
4346 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4347 "/lib/libpangocairo-1.0.so.0'"))
4348 (("dlopen\\(ffi, 'pango-1.0'")
4349 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4350 "/lib/libpango-1.0.so.0'")))
4351 #t))
4352 (add-after 'install 'install-doc
4353 (lambda* (#:key inputs outputs #:allow-other-keys)
4354 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4355 (doc (string-append data "/doc/" ,name "-" ,version))
4356 (html (string-append doc "/html")))
4357 (setenv "LD_LIBRARY_PATH"
4358 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4359 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4360 (setenv "LANG" "en_US.UTF-8")
4361 (mkdir-p html)
4362 (for-each (lambda (file)
4363 (copy-file (string-append "." file)
4364 (string-append doc file)))
4365 '("/README.rst" "/CHANGES" "/LICENSE"))
4366 (system* "python" "setup.py" "build_sphinx")
4367 (copy-recursively "docs/_build/html" html)
4368 #t))))))
4369 (home-page "https://github.com/Kozea/cairocffi")
4370 (synopsis "Python bindings and object-oriented API for Cairo")
4371 (description
4372 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4373Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4374graphics library with support for multiple backends including image buffers,
4375PNG, PostScript, PDF, and SVG file output.")
4376 (license license:bsd-3)))
4377
4378(define-public python2-cairocffi
4379 (package-with-python2 python-cairocffi))
4380
4381(define-public python-decorator
4382 (package
4383 (name "python-decorator")
4384 (version "4.3.0")
4385 (source
4386 (origin
4387 (method url-fetch)
4388 (uri (pypi-uri "decorator" version))
4389 (sha256
4390 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4391 (build-system python-build-system)
4392 (home-page "https://pypi.python.org/pypi/decorator/")
4393 (synopsis "Python module to simplify usage of decorators")
4394 (description
4395 "The aim of the decorator module is to simplify the usage of decorators
4396for the average programmer, and to popularize decorators usage giving examples
4397of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4398etc. The core of this module is a decorator factory.")
4399 (license license:expat)))
4400
4401(define-public python2-decorator
4402 (package-with-python2 python-decorator))
4403
4404(define-public python-drmaa
4405 (package
4406 (name "python-drmaa")
4407 (version "0.7.7")
4408 (source
4409 (origin
4410 (method url-fetch)
4411 (uri (pypi-uri "drmaa" version))
4412 (sha256
4413 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4414 (build-system python-build-system)
4415 ;; The test suite requires libdrmaa which is provided by the cluster
4416 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4417 ;; should be set to the path of the libdrmaa library.
4418 (arguments '(#:tests? #f))
4419 (native-inputs
4420 `(("python-nose" ,python-nose)))
4421 (home-page "https://pypi.python.org/pypi/drmaa")
4422 (synopsis "Python bindings for the DRMAA library")
4423 (description
4424 "A Python package for Distributed Resource Management (DRM) job
4425submission and control. This package is an implementation of the DRMAA 1.0
4426Python language binding specification.")
4427 (license license:bsd-3)))
4428
4429(define-public python2-drmaa
4430 (package-with-python2 python-drmaa))
4431
4432(define-public python-grako
4433 (package
4434 (name "python-grako")
4435 (version "3.99.9")
4436 (source
4437 (origin
4438 (method url-fetch)
4439 (uri
4440 (pypi-uri "grako" version ".zip"))
4441 (sha256
4442 (base32
4443 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4444 (build-system python-build-system)
4445 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4446 (native-inputs
4447 `(("unzip" ,unzip)
4448 ("python-pytest" ,python-pytest)
4449 ("python-pytest-runner" ,python-pytest-runner)))
4450 (home-page "https://bitbucket.org/neogeny/grako")
4451 (synopsis "EBNF parser generator")
4452 (description
4453 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4454memoizing PEG/Packrat parser in Python.")
4455 (license license:bsd-3)))
4456
4457(define-public python2-grako
4458 (package-with-python2 python-grako))
4459
4460(define-public python-gridmap
4461 (package
4462 (name "python-gridmap")
4463 (version "0.13.0")
4464 (source
4465 (origin
768fea0f
TGR
4466 (method git-fetch)
4467 (uri (git-reference
4468 (url "https://github.com/pygridtools/gridmap.git")
4469 (commit (string-append "v" version))))
4470 (file-name (git-file-name name version))
44d10b1f 4471 (sha256
768fea0f 4472 (base32 "1478lbwsr1w24cii2x01m2910fvh8r43ghnb78nc972a96hqiknm"))))
44d10b1f
RW
4473 (build-system python-build-system)
4474 (arguments
4475 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4476 (propagated-inputs
4477 `(("python-psutil" ,python-psutil)
4478 ("python-drmaa" ,python-drmaa)
4479 ("python-pyzmq" ,python-pyzmq)))
4480 (home-page "https://github.com/pygridtools/gridmap")
4481 (synopsis "Create jobs on a cluster directly from Python")
4482 (description
4483 "Gridmap is a Python package to allow you to easily create jobs on the
4484cluster directly from Python. You can directly map Python functions onto the
4485cluster without needing to write any wrapper code yourself.")
4486 (license license:gpl3+)))
4487
4488(define-public python2-gridmap
4489 (package-with-python2 python-gridmap))
4490
4491(define-public python-honcho
4492 (package
4493 (name "python-honcho")
4494 (version "1.0.1")
4495 (source
4496 (origin
8524d130
TGR
4497 (method git-fetch)
4498 (uri (git-reference
4499 (url "https://github.com/nickstenning/honcho.git")
4500 (commit (string-append "v" version))))
4501 (file-name (git-file-name name version))
44d10b1f 4502 (sha256
8524d130 4503 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
44d10b1f
RW
4504 (build-system python-build-system)
4505 (native-inputs
4506 `(("python-pytest" ,python-pytest)
4507 ("python-mock" ,python-mock)
4508 ("python-tox" ,python-tox)
4509 ("which" ,which))) ;for tests
4510 (propagated-inputs
4511 `(("python-jinja2" ,python-jinja2)))
4512 (arguments
4513 `(#:phases
4514 (modify-phases %standard-phases
4515 (delete 'check)
4516 (add-after 'install 'check
4517 (lambda* (#:key outputs inputs #:allow-other-keys)
4518 ;; fix honcho path in testsuite
4519 (substitute* "tests/conftest.py"
4520 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4521 "/bin/honcho" "'")))
4522 ;; It's easier to run tests after install.
4523 ;; Make installed package available for running the tests
4524 (add-installed-pythonpath inputs outputs)
95b707fb 4525 (invoke "py.test" "-v"))))))
44d10b1f
RW
4526 (home-page "https://github.com/nickstenning/honcho")
4527 (synopsis "Manage Procfile-based applications")
4528 (description
4529 "A Procfile is a file which describes how to run an application
4530consisting of serveral processes. honcho starts all listed processes.
4531The output of all running processes is collected by honcho and
4532displayed.")
4533 (license license:expat)))
4534
4535(define-public python2-honcho
4536 (package-with-python2 python-honcho))
4537
4538(define-public python-pexpect
4539 (package
4540 (name "python-pexpect")
4541 (version "4.6.0")
4542 (source
4543 (origin
4544 (method url-fetch)
4545 (uri (pypi-uri "pexpect" version))
4546 (sha256
4547 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
4548 (build-system python-build-system)
4549 (arguments
4550 `(#:phases
4551 (modify-phases %standard-phases
4552 (add-before 'check 'prepare-tests
4553 (lambda _
4554 (substitute* (find-files "tests")
4555 (("/bin/ls") (which "ls"))
4556 (("/bin/echo") (which "echo"))
4557 (("/bin/which") (which "which"))
4558 ;; Many tests try to use the /bin directory which
4559 ;; is not present in the build environment.
4560 ;; Use one that's non-empty and unlikely to change.
4561 (("/bin'") "/dev'"))
4562 ;; XXX: Socket connection test gets "Connection reset by peer".
4563 ;; Why does it not work? Delete for now.
4564 (delete-file "tests/test_socket.py")
4565 #t))
4566 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
4567 (native-inputs
4568 `(("python-nose" ,python-nose)
4569 ("python-pytest" ,python-pytest)
4570 ("man-db" ,man-db)
4571 ("which" ,which)
4572 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
4573 (propagated-inputs
4574 `(("python-ptyprocess" ,python-ptyprocess)))
4575 (home-page "http://pexpect.readthedocs.org/")
4576 (synopsis "Controlling interactive console applications")
4577 (description
4578 "Pexpect is a pure Python module for spawning child applications;
4579controlling them; and responding to expected patterns in their output.
4580Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4581child application and control it as if a human were typing commands.")
4582 (license license:isc)))
4583
4584(define-public python2-pexpect
4585 (package-with-python2 python-pexpect))
4586
4587(define-public python-setuptools-scm
4588 (package
4589 (name "python-setuptools-scm")
4590 (version "3.1.0")
4591 (source (origin
4592 (method url-fetch)
4593 (uri (pypi-uri "setuptools_scm" version))
4594 (sha256
4595 (base32
4596 "0h4bglwfz8b9prqljv8z3w9rgydfyxzaj05bm1y6zs5m6shz548i"))))
4597 (build-system python-build-system)
4598 (home-page "https://github.com/pypa/setuptools_scm/")
4599 (synopsis "Manage Python package versions in SCM metadata")
4600 (description
4601 "Setuptools_scm handles managing your Python package versions in
4602@dfn{software configuration management} (SCM) metadata instead of declaring
4603them as the version argument or in a SCM managed file.")
4604 (license license:expat)))
4605
4606(define-public python2-setuptools-scm
4607 (package-with-python2 python-setuptools-scm))
4608
4609(define-public python-pathpy
4610 (package
4611 (name "python-pathpy")
4612 (version "11.0.1")
4613 (source
4614 (origin
4615 (method url-fetch)
4616 (uri (pypi-uri "path.py" version))
4617 (sha256
4618 (base32 "07x15v8c7ry9bvycw294c9yq6ky9v2b0dalvgi6rn38ilh69vsz7"))))
4619 ;; (outputs '("out" "doc"))
4620 (build-system python-build-system)
4621 (propagated-inputs
4622 `(("python-appdirs" ,python-appdirs)))
4623 (native-inputs
4624 `(("python-setuptools-scm" ,python-setuptools-scm)
4625 ("python-sphinx" ,python-sphinx)
4626 ("python-rst.linker" ,python-rst.linker)
4627 ("python-pytest" ,python-pytest)
4628 ("python-pytest-runner" ,python-pytest-runner)))
4629 (arguments
4630 ;; FIXME: Documentation and tests require "jaraco.packaging".
4631 `(#:tests? #f))
4632 ;; #:phases
4633 ;; (modify-phases %standard-phases
4634 ;; (add-after 'build 'build-doc
4635 ;; (lambda _
4636 ;; (setenv "LANG" "en_US.UTF-8")
4637 ;; (zero? (system* "python" "setup.py" "build_sphinx"))))
4638 ;; (add-after 'install 'install-doc
4639 ;; (lambda* (#:key outputs #:allow-other-keys)
4640 ;; (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4641 ;; (doc (string-append data "/doc/" ,name "-" ,version))
4642 ;; (html (string-append doc "/html")))
4643 ;; (mkdir-p html)
4644 ;; (for-each (lambda (file)
4645 ;; (copy-file file (string-append doc "/" file)))
4646 ;; '("README.rst" "CHANGES.rst"))
4647 ;; (copy-recursively "build/sphinx/html" html)))))))
4648 (home-page "https://github.com/jaraco/path.py")
4649 (synopsis "Python module wrapper for built-in os.path")
4650 (description
4651 "@code{path.py} implements path objects as first-class entities, allowing
4652common operations on files to be invoked on those path objects directly.")
4653 (license license:expat)))
4654
4655(define-public python2-pathpy
4656 (package-with-python2 python-pathpy))
4657
4658(define-public python-simplegeneric
4659 (package
4660 (name "python-simplegeneric")
4661 (version "0.8.1")
4662 (source
4663 (origin
4664 (method url-fetch)
6c8c3980 4665 (uri (pypi-uri "simplegeneric" version ".zip"))
44d10b1f
RW
4666 (sha256
4667 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4668 (build-system python-build-system)
4669 (native-inputs
4670 `(("unzip" ,unzip)))
4671 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
4672 (synopsis "Python module for simple generic functions")
4673 (description
4674 "The simplegeneric module lets you define simple single-dispatch generic
4675functions, akin to Python’s built-in generic functions like @code{len()},
4676@code{iter()} and so on. However, instead of using specially-named methods,
4677these generic functions use simple lookup tables, akin to those used by
4678e.g. @code{pickle.dump()} and other generic functions found in the Python
4679standard library.")
4680 (license license:zpl2.1)))
4681
4682(define-public python2-simplegeneric
4683 (package-with-python2 python-simplegeneric))
4684
4685(define-public python-ipython-genutils
4686 ;; TODO: This package is retired, check if can be removed, see description.
4687 (package
4688 (name "python-ipython-genutils")
4689 (version "0.1.0")
4690 (source
4691 (origin
4692 (method url-fetch)
c9671d4b 4693 (uri (pypi-uri "ipython_genutils" version))
44d10b1f
RW
4694 (sha256
4695 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
4696 (build-system python-build-system)
4697 (arguments `(#:tests? #f)) ; no tests
4698 (home-page "https://ipython.org")
4699 (synopsis "Vestigial utilities from IPython")
4700 (description
4701 "This package provides retired utilities from IPython. No packages
4702outside IPython/Jupyter should depend on it.
4703
4704This package shouldn't exist. It contains some common utilities shared by
4705Jupyter and IPython projects during The Big Split. As soon as possible, those
4706packages will remove their dependency on this, and this package will go
4707away.")
4708 (license license:bsd-3)))
4709
4710(define-public python2-ipython-genutils
4711 (package-with-python2 python-ipython-genutils))
4712
4713(define-public python-traitlets
4714 (package
4715 (name "python-traitlets")
4716 (version "4.3.2")
4717 (source
4718 (origin
4719 (method url-fetch)
4720 (uri (pypi-uri "traitlets" version))
4721 (sha256
4722 (base32
4723 "0dbq7sx26xqz5ixs711k5nc88p8a0nqyz6162pwks5dpcz9d4jww"))))
4724 (build-system python-build-system)
4725 (arguments
4726 `(#:phases
4727 (modify-phases %standard-phases
4728 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
4729 (propagated-inputs
4730 `(("python-ipython-genutils" ,python-ipython-genutils)
4731 ("python-decorator" ,python-decorator))) ;not needed for >4.3.2
4732 (native-inputs
4733 `(("python-pytest" ,python-pytest)))
4734 (properties `((python2-variant . ,(delay python2-traitlets))))
4735 (home-page "https://ipython.org")
4736 (synopsis "Configuration system for Python applications")
4737 (description
4738 "Traitlets is a framework that lets Python classes have attributes with
4739type checking, dynamically calculated default values, and ‘on change’
4740callbacks. The package also includes a mechanism to use traitlets for
4741configuration, loading values from files or from command line arguments. This
4742is a distinct layer on top of traitlets, so you can use traitlets in your code
4743without using the configuration machinery.")
4744 (license license:bsd-3)))
4745
4746(define-public python2-traitlets
4747 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
4748 (package
4749 (inherit traitlets)
4750 (propagated-inputs
4751 `(("python2-enum34" ,python2-enum34)
4752 ,@(package-propagated-inputs traitlets))))))
4753
4754(define-public python-jupyter-core
4755 (package
4756 (name "python-jupyter-core")
4757 (version "4.4.0")
4758 (source
4759 (origin
4760 (method url-fetch)
4761 (uri (string-append (pypi-uri "jupyter_core" version)))
4762 (sha256
4763 (base32
4764 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
4765 (build-system python-build-system)
4766 ;; FIXME: not sure how to run the tests
4767 (arguments `(#:tests? #f))
4768 (propagated-inputs
4769 `(("python-traitlets" ,python-traitlets)))
4770 (home-page "http://jupyter.org/")
4771 (synopsis "Jupyter base package")
4772 (description
4773 "Jupyter core is the base package on which Jupyter projects rely.")
4774 (license license:bsd-3)))
4775
4776(define-public python2-jupyter-core
4777 (package-with-python2 python-jupyter-core))
4778
4779(define-public python-jupyter-client
4780 (package
4781 (name "python-jupyter-client")
4782 (version "5.2.4")
4783 (source
4784 (origin
4785 (method url-fetch)
4786 (uri (pypi-uri "jupyter_client" version))
4787 (sha256
4788 (base32
4789 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
4790 (build-system python-build-system)
4791 ;; Tests fail because of missing native python kernel which I assume is
4792 ;; provided by the ipython package, which we cannot use because it would
4793 ;; cause a dependency cycle.
4794 (arguments `(#:tests? #f))
4795 (propagated-inputs
4796 `(("python-pyzmq" ,python-pyzmq)
4797 ("python-traitlets" ,python-traitlets)
4798 ("python-jupyter-core" ,python-jupyter-core)))
4799 (home-page "http://jupyter.org/")
4800 (synopsis "Jupyter protocol implementation and client libraries")
4801 (description
4802 "The @code{jupyter_client} package contains the reference implementation
4803of the Jupyter protocol. It also provides client and kernel management APIs
4804for working with kernels, and the @code{jupyter kernelspec} entrypoint for
4805installing @code{kernelspec}s for use with Jupyter frontends.")
4806 (license license:bsd-3)))
4807
4808(define-public python2-jupyter-client
4809 (package-with-python2 python-jupyter-client))
4810
4811(define-public python-ipykernel
4812 (package
4813 (name "python-ipykernel")
4814 (version "5.1.0")
4815 (source
4816 (origin
4817 (method url-fetch)
4818 (uri (pypi-uri "ipykernel" version))
4819 (sha256
4820 (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g"))))
4821 (build-system python-build-system)
4822 (arguments
4823 `(#:phases
4824 (modify-phases %standard-phases
4825 (replace 'check
4826 (lambda _
4827 (setenv "HOME" "/tmp")
4828 (invoke "pytest" "-v")
4829 #t)))))
4830 (propagated-inputs
4831 `(("python-ipython" ,python-ipython)
4832 ;; imported at runtime during connect
4833 ("python-jupyter-client" ,python-jupyter-client)))
4834 (native-inputs
4835 `(("python-pytest" ,python-pytest)
4836 ("python-nose" ,python-nose)))
4837 (home-page "https://ipython.org")
4838 (synopsis "IPython Kernel for Jupyter")
4839 (description
4840 "This package provides the IPython kernel for Jupyter.")
4841 (license license:bsd-3)))
4842
4843(define-public python2-ipykernel
4844 (package-with-python2 python-ipykernel))
4845
966aa714
AE
4846(define-public python-pari-jupyter
4847 (package
4848 (name "python-pari-jupyter")
4849 (version "1.3.2")
4850 (source
4851 (origin
4852 (method url-fetch)
4853 (uri (pypi-uri "pari_jupyter" version))
4854 (sha256
4855 (base32
4856 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
4857 (build-system python-build-system)
4858 (propagated-inputs
4859 `(("python-ipykernel" ,python-ipykernel)))
4860 (inputs
4861 `(("pari-gp" ,pari-gp)
4862 ("readline" ,readline)))
4863 (arguments
4864 `(#:tests? #f)) ; no test suite
4865 (home-page
4866 "https://github.com/jdemeyer/pari_jupyter")
4867 (synopsis "A Jupyter kernel for PARI/GP")
4868 (description "The package provides a PARI/GP kernel for Jupyter.")
4869 (license license:gpl3+)))
4870
44d10b1f
RW
4871;; This is the latest release of the LTS version of ipython with support for
4872;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
4873;; dropped support for Python 2.7. We may want to rename this package.
4874(define-public python-ipython
4875 (package
4876 (name "python-ipython")
4877 (version "5.8.0")
4878 (source
4879 (origin
4880 (method url-fetch)
4881 (uri (pypi-uri "ipython" version ".tar.gz"))
4882 (sha256
4883 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
4884 (build-system python-build-system)
4885 (outputs '("out" "doc"))
4886 (propagated-inputs
4887 `(("python-pyzmq" ,python-pyzmq)
4888 ("python-prompt-toolkit" ,python-prompt-toolkit-1)
4889 ("python-terminado" ,python-terminado)
4890 ("python-matplotlib" ,python-matplotlib)
4891 ("python-numpy" ,python-numpy)
4892 ("python-numpydoc" ,python-numpydoc)
4893 ("python-jinja2" ,python-jinja2)
4894 ("python-mistune" ,python-mistune)
4895 ("python-pexpect" ,python-pexpect)
4896 ("python-pickleshare" ,python-pickleshare)
4897 ("python-simplegeneric" ,python-simplegeneric)
4898 ("python-jsonschema" ,python-jsonschema)
4899 ("python-traitlets" ,python-traitlets)
4900 ("python-nbformat" ,python-nbformat)
4901 ("python-pygments" ,python-pygments)))
4902 (inputs
4903 `(("readline" ,readline)
4904 ("which" ,which)))
4905 (native-inputs
4906 `(("graphviz" ,graphviz)
4907 ("pkg-config" ,pkg-config)
4908 ("python-requests" ,python-requests) ;; for tests
4909 ("python-testpath" ,python-testpath)
4910 ("python-nose" ,python-nose)
4911 ("python-sphinx" ,python-sphinx)
4912 ("python-shpinx-rtd-theme" ,python-sphinx-rtd-theme)
4913 ;; FIXME: It's possible that a smaller union would work just as well.
4914 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
4915 texlive-fonts-ec
4916 texlive-generic-ifxetex
4917 texlive-generic-pdftex
4918 texlive-latex-amsfonts
4919 texlive-latex-capt-of
4920 texlive-latex-cmap
4921 texlive-latex-environ
4922 texlive-latex-eqparbox
4923 texlive-latex-etoolbox
4924 texlive-latex-expdlist
4925 texlive-latex-fancyhdr
4926 texlive-latex-fancyvrb
4927 texlive-latex-fncychap
4928 texlive-latex-float
4929 texlive-latex-framed
4930 texlive-latex-geometry
4931 texlive-latex-graphics
4932 texlive-latex-hyperref
4933 texlive-latex-mdwtools
4934 texlive-latex-multirow
4935 texlive-latex-oberdiek
4936 texlive-latex-parskip
4937 texlive-latex-preview
4938 texlive-latex-tabulary
4939 texlive-latex-threeparttable
4940 texlive-latex-titlesec
4941 texlive-latex-trimspaces
4942 texlive-latex-ucs
4943 texlive-latex-upquote
4944 texlive-latex-url
4945 texlive-latex-varwidth
4946 texlive-latex-wrapfig)))
4947 ("texinfo" ,texinfo)))
4948 (arguments
4949 `(#:phases
4950 (modify-phases %standard-phases
4951 (add-after 'install 'install-doc
4952 (lambda* (#:key inputs outputs #:allow-other-keys)
4953 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4954 (doc (string-append data "/doc/" ,name "-" ,version))
4955 (html (string-append doc "/html"))
4956 (man1 (string-append data "/man/man1"))
4957 (info (string-append data "/info"))
4958 (examples (string-append doc "/examples"))
4959 (python-arg (string-append "PYTHON=" (which "python"))))
4960 (setenv "LANG" "en_US.utf8")
4961 ;; Make installed package available for running the tests
4962 (add-installed-pythonpath inputs outputs)
4963 (with-directory-excursion "docs"
4964 ;; FIXME: pdf fails to build
4965 ;;(system* "make" "pdf" "PAPER=a4")
4966 (system* "make" python-arg "html")
4967 (system* "make" python-arg "info"))
4968 (copy-recursively "docs/man" man1)
4969 (copy-recursively "examples" examples)
4970 (copy-recursively "docs/build/html" html)
4971 ;; (copy-file "docs/build/latex/ipython.pdf"
4972 ;; (string-append doc "/ipython.pdf"))
4973 (mkdir-p info)
4974 (copy-file "docs/build/texinfo/ipython.info"
4975 (string-append info "/ipython.info"))
4976 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
4977 #t))
4978 ;; Tests can only be run after the library has been installed and not
4979 ;; within the source directory.
4980 (delete 'check)
4981 (add-after 'install 'check
4982 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
4983 (if tests?
4984 (begin
4985 ;; Make installed package available for running the tests
4986 (add-installed-pythonpath inputs outputs)
4987 (setenv "HOME" "/tmp/") ;; required by a test
4988 ;; We only test the core because one of the other tests
4989 ;; tries to import ipykernel.
4990 (invoke "python" "IPython/testing/iptest.py"
4991 "-v" "IPython/core/tests"))
4992 #t)))
4993 (add-before 'check 'fix-tests
4994 (lambda* (#:key inputs #:allow-other-keys)
4995 (substitute* "./IPython/utils/_process_posix.py"
4996 (("/usr/bin/env', 'which") (which "which")))
4997 (substitute* "./IPython/core/tests/test_inputtransformer.py"
4998 (("#!/usr/bin/env python")
4999 (string-append "#!" (which "python"))))
5000 ;; Disable 1 failing test
5001 (substitute* "./IPython/core/tests/test_magic.py"
5002 (("def test_dirops\\(\\):" all)
5003 (string-append "@dec.skipif(True)\n" all)))
5004 ;; This test introduces a circular dependency on ipykernel
5005 ;; (which depends on ipython).
5006 (delete-file "IPython/core/tests/test_display.py")
5007 ;; These tests throw errors for unknown reasons.
5008 (delete-file "IPython/extensions/tests/test_storemagic.py")
5009 (delete-file "IPython/core/tests/test_displayhook.py")
5010 (delete-file "IPython/core/tests/test_interactiveshell.py")
5011 (delete-file "IPython/core/tests/test_pylabtools.py")
5012 (delete-file "IPython/core/tests/test_paths.py")
5013 #t)))))
5014 (home-page "https://ipython.org")
5015 (synopsis "IPython is a tool for interactive computing in Python")
5016 (description
5017 "IPython provides a rich architecture for interactive computing with:
5018Powerful interactive shells, a browser-based notebook, support for interactive
5019data visualization, embeddable interpreters and tools for parallel
5020computing.")
5021 (license license:bsd-3)
5022 (properties `((python2-variant . ,(delay python2-ipython))))))
5023
5024(define-public python2-ipython
5025 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
5026 (package
5027 (inherit ipython)
5028 ;; FIXME: add pyreadline once available.
5029 (propagated-inputs
5030 `(("python2-backports-shutil-get-terminal-size"
5031 ,python2-backports-shutil-get-terminal-size)
5032 ("python2-pathlib2" ,python2-pathlib2)
5033 ,@(package-propagated-inputs ipython)))
5034 (native-inputs
5035 `(("python2-mock" ,python2-mock)
5036 ,@(package-native-inputs ipython))))))
5037
5038(define-public python-urwid
5039 (package
5040 (name "python-urwid")
5041 (version "2.0.1")
5042 (source
5043 (origin
5044 (method url-fetch)
5045 (uri (pypi-uri "urwid" version))
5046 (sha256
5047 (base32
5048 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
5049 (build-system python-build-system)
5050 (home-page "http://urwid.org")
5051 (synopsis "Console user interface library for Python")
5052 (description
5053 "Urwid is a curses-based UI/widget library for Python. It includes many
5054features useful for text console applications.")
5055 (license license:lgpl2.1+)))
5056
5057(define-public python2-urwid
5058 (package-with-python2 python-urwid))
5059
5060(define-public python-urwidtrees
5061 (package
5062 (name "python-urwidtrees")
5063 (version "1.0.2")
5064 (source
5065 (origin
5066 (method url-fetch)
5067 ;; package author intends on distributing via github rather than pypi:
5068 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5069 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5070 version ".tar.gz"))
5071 (file-name (string-append name "-" version ".tar.gz"))
5072 (sha256
5073 (base32
5074 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
5075 (build-system python-build-system)
5076 (arguments
5077 '(#:tests? #f)) ; no tests
5078 (propagated-inputs `(("python-urwid" ,python-urwid)))
5079 (home-page "https://github.com/pazz/urwidtrees")
5080 (synopsis "Tree widgets for urwid")
5081 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5082toolkit. Use it to build trees of widgets.")
5083 (license license:gpl3+)))
5084
5085(define-public python2-urwidtrees
5086 (package-with-python2 python-urwidtrees))
5087
5088(define-public python-ua-parser
5089 (package
5090 (name "python-ua-parser")
5091 (version "0.8.0")
5092 (source
5093 (origin
5094 (method url-fetch)
5095 (uri (pypi-uri "ua-parser" version))
5096 (sha256
5097 (base32
5098 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
5099 (build-system python-build-system)
5100 (arguments
5101 `(#:tests? #f)) ;no test suite in release
5102 (native-inputs
5103 `(("python-pyyaml" ,python-pyyaml)))
5104 (home-page "https://github.com/ua-parser/uap-python")
5105 (synopsis "User agent parser")
5106 (description
5107 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
5108 (license license:asl2.0)))
5109
5110(define-public python2-ua-parser
5111 (package-with-python2 python-ua-parser))
5112
5113(define-public python-user-agents
5114 (package
5115 (name "python-user-agents")
5116 (version "1.1.0")
5117 (source
5118 (origin
5119 (method url-fetch)
5120 (uri (pypi-uri "user-agents" version))
5121 (sha256
5122 (base32
5123 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
5124 (build-system python-build-system)
5125 (arguments
5126 `(#:tests? #f)) ;missing devices.json test file in release
5127 (propagated-inputs
5128 `(("python-ua-parser" ,python-ua-parser)))
5129 (home-page "https://github.com/selwin/python-user-agents")
5130 (synopsis "User Agent strings parsing library")
5131 (description
5132 "A library to identify devices (phones, tablets) and their capabilities by
5133parsing (browser/HTTP) user agent strings.")
5134 (license license:expat)))
5135
5136(define-public python2-user-agents
5137 (package-with-python2 python-user-agents))
5138
5139(define-public python-dbus
5140 (package
5141 (name "python-dbus")
5142 (version "1.2.8")
5143 (source
5144 (origin
5145 (method url-fetch)
5146 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
5147 "dbus-python-" version ".tar.gz"))
5148 (sha256
5149 (base32
5150 "0vvvjmiwnc9cjlks3gcdk43ap7llhlpz7cm1wbw0nc2yfsxjpwdb"))))
5151 (build-system gnu-build-system)
5152 (arguments
5153 '(#:phases
5154 (modify-phases %standard-phases
5155 (add-before
5156 'check 'pre-check
5157 (lambda _
5158 ;; XXX: For the missing '/etc/machine-id'.
5159 (substitute* "test/run-test.sh"
5160 (("DBUS_FATAL_WARNINGS=1")
5161 "DBUS_FATAL_WARNINGS=0"))
5162 #t)))))
5163 (native-inputs
5164 `(("pkg-config" ,pkg-config)))
5165 (inputs
5166 `(("python" ,python-wrapper)
5167 ("dbus-glib" ,dbus-glib)))
5168 (synopsis "Python bindings for D-bus")
5169 (description "python-dbus provides bindings for libdbus, the reference
5170implementation of D-Bus.")
5171 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
5172 (license license:expat)))
5173
5174(define-public python2-dbus
5175 (package (inherit python-dbus)
5176 (name "python2-dbus")
5177 (inputs `(("python" ,python-2)
5178 ,@(alist-delete "python"
5179 (package-inputs python-dbus)
5180 equal?)))
5181 ;; FIXME: on Python 2, the test_utf8 fails with:
5182 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5183 (arguments `(#:tests? #f))))
5184
5185(define-public python-lxml
5186 (package
5187 (name "python-lxml")
5188 (version "4.2.5")
5189 (source
5190 (origin
5191 (method url-fetch)
5192 (uri (pypi-uri "lxml" version))
5193 (sha256
5194 (base32
5195 "0zw0y9hs0nflxhl9cs6ipwwh53szi3w2x06wl0k9cylyqac0cwin"))))
5196 (build-system python-build-system)
5197 (inputs
5198 `(("libxml2" ,libxml2)
5199 ("libxslt" ,libxslt)))
5200 (home-page "http://lxml.de/")
5201 (synopsis
5202 "Python XML processing library")
5203 (description
5204 "The lxml XML toolkit is a Pythonic binding for the C libraries
5205libxml2 and libxslt.")
5206 (license license:bsd-3))) ; and a few more, see LICENSES.txt
5207
5208(define-public python2-lxml
5209 (package-with-python2 python-lxml))
5210
5211;; beautifulsoup4 has a totally different namespace than 3.x,
5212;; and pypi seems to put it under its own name, so I guess we should too
5213(define-public python-beautifulsoup4
5214 (package
5215 (name "python-beautifulsoup4")
5216 (version "4.6.3")
5217 (source
5218 (origin
5219 (method url-fetch)
5220 (uri (pypi-uri "beautifulsoup4" version))
5221 (sha256
5222 (base32
5223 "041dhalzjciw6qyzzq7a2k4h1yvyk76xigp35hv5ibnn448ydy4h"))))
5224 (build-system python-build-system)
5225 (arguments
5226 `(#:phases
5227 (modify-phases %standard-phases
5228 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5229 ;; must use this conversion script when building with Python 3. The
5230 ;; conversion script also runs the tests.
5231 ;; For more information, see the file 'convert-py3k' in the source
5232 ;; distribution.
5233 (replace 'check
dff0197e 5234 (lambda _ (invoke "./convert-py3k"))))))
44d10b1f
RW
5235 (home-page
5236 "https://www.crummy.com/software/BeautifulSoup/bs4/")
5237 (synopsis
5238 "Python screen-scraping library")
5239 (description
5240 "Beautiful Soup is a Python library designed for rapidly setting up
5241screen-scraping projects. It offers Pythonic idioms for navigating,
5242searching, and modifying a parse tree, providing a toolkit for
5243dissecting a document and extracting what you need. It automatically
5244converts incoming documents to Unicode and outgoing documents to UTF-8.")
5245 (license license:expat)
5246 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5247
5248(define-public python2-beautifulsoup4
5249 (package
5250 (inherit (package-with-python2
5251 (strip-python2-variant python-beautifulsoup4)))
5252 (arguments `(#:python ,python-2))))
5253
5254(define-public python-netifaces
5255 (package
5256 (name "python-netifaces")
5257 (version "0.10.7")
5258 (source
5259 (origin
5260 (method url-fetch)
5261 (uri (pypi-uri "netifaces" version))
5262 (sha256
5263 (base32
5264 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
5265 (build-system python-build-system)
5266 (home-page "https://github.com/al45tair/netifaces")
5267 (synopsis
5268 "Python module for portable network interface information")
5269 (description
5270 "Netifaces is a Python module providing information on network
5271interfaces in an easy and portable manner.")
5272 (license license:expat)))
5273
5274(define-public python2-netifaces
5275 (package-with-python2 python-netifaces))
5276
5277(define-public python-networkx
5278 (package
5279 (name "python-networkx")
5280 (version "2.2")
5281 (source
5282 (origin
5283 (method url-fetch)
5284 (uri (pypi-uri "networkx" version ".zip"))
5285 (sha256
5286 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
5287 (build-system python-build-system)
5288 ;; python-decorator is needed at runtime.
5289 (propagated-inputs
5290 `(("python-decorator" ,python-decorator)))
5291 (native-inputs
5292 `(("python-nose" ,python-nose)
5293 ("unzip" ,unzip)))
5294 (home-page "https://networkx.github.io/")
5295 (synopsis "Python module for creating and manipulating graphs and networks")
5296 (description
5297 "NetworkX is a Python package for the creation, manipulation, and study
5298of the structure, dynamics, and functions of complex networks.")
5299 (license license:bsd-3)))
5300
5301(define-public python2-networkx
5302 (package-with-python2 python-networkx))
5303
5304(define-public python-datrie
5305 (package
5306 (name "python-datrie")
5307 (version "0.7.1")
5308 (source
5309 (origin
5310 (method url-fetch)
5311 (uri (pypi-uri "datrie" version))
5312 (sha256
5313 (base32
5314 "08r0if7dry2q7p34gf7ffyrlnf4bdvnprxgydlfxgfnvq8f3f4bs"))))
5315 (build-system python-build-system)
5316 (arguments
5317 `(#:phases (modify-phases %standard-phases
5318 (add-before 'build 'cythonize
5319 (lambda _
5320 ;; Regenerate Cython classes to solve ABI issues with Python
5321 ;; 3.7.0. See <https://github.com/pytries/datrie/issues/52>.
5322 (invoke "cython" "src/datrie.pyx" "src/cdatrie.pxd"
5323 "src/stdio_ext.pxd" "-a"))))))
5324 (native-inputs
5325 `(("python-cython" ,python-cython)
5326 ("python-hypothesis" ,python-hypothesis)
5327 ("python-pytest" ,python-pytest)
5328 ("python-pytest-runner" ,python-pytest-runner)))
5329 (home-page "https://github.com/kmike/datrie")
5330 (synopsis "Fast, efficiently stored trie for Python")
5331 (description
5332 "This package provides a fast, efficiently stored trie implementation for
5333Python.")
5334 (license license:lgpl2.1+)))
5335
5336(define-public snakemake
5337 (package
5338 (name "snakemake")
5339 (version "5.2.4")
5340 (source
5341 (origin
5342 (method url-fetch)
5343 (uri (pypi-uri "snakemake" version))
5344 (sha256
5345 (base32 "0gj0xxgiq3mp9qyyrbfzldiaq1giliqw0in64nqiz7vx49myqj7z"))))
5346 (build-system python-build-system)
5347 (arguments
5348 ;; TODO: Package missing test dependencies.
5349 '(#:tests? #f
5350 #:phases
5351 (modify-phases %standard-phases
5352 ;; For cluster execution Snakemake will call Python. Since there is
5353 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
5354 ;; this by calling the snakemake wrapper instead.
5355 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
5356 (lambda* (#:key outputs #:allow-other-keys)
5357 (substitute* "snakemake/executors.py"
5358 (("\\{sys.executable\\} -m snakemake")
5359 (string-append (assoc-ref outputs "out")
5360 "/bin/snakemake")))
5361 #t)))))
5362 (propagated-inputs
5363 `(("python-gitpython" ,python-gitpython)
5364 ("python-wrapt" ,python-wrapt)
5365 ("python-requests" ,python-requests)
5366 ("python-appdirs" ,python-appdirs)
5367 ("python-configargparse" ,python-configargparse)
5368 ("python-datrie" ,python-datrie)
5369 ("python-docutils" ,python-docutils)
5370 ("python-jinja2" ,python-jinja2)
5371 ("python-jsonschema" ,python-jsonschema)
5372 ("python-networkx" ,python-networkx)
5373 ("python-pyyaml" ,python-pyyaml)
5374 ("python-ratelimiter" ,python-ratelimiter)))
5375 (home-page "https://snakemake.readthedocs.io")
5376 (synopsis "Python-based execution environment for make-like workflows")
5377 (description
5378 "Snakemake aims to reduce the complexity of creating workflows by
5379providing a clean and modern domain specific specification language (DSL) in
5380Python style, together with a fast and comfortable execution environment.")
5381 (license license:expat)))
5382
5383;; This is currently needed for the pigx-* packages.
5384(define-public snakemake-4
5385 (package (inherit snakemake)
5386 (version "4.4.0")
5387 (source
5388 (origin
5389 (method url-fetch)
5390 (uri (pypi-uri "snakemake" version))
5391 (sha256
5392 (base32 "0g0paia4z7w3srnqdmavq3hrb2x7qnpf81jx50njl0p7y4y0j8jv"))))
5393 (propagated-inputs
5394 `(("python-wrapt" ,python-wrapt)
5395 ("python-requests" ,python-requests)
5396 ("python-appdirs" ,python-appdirs)
5397 ("python-configargparse" ,python-configargparse)
5398 ("python-pyyaml" ,python-pyyaml)
5399 ("python-ratelimiter" ,python-ratelimiter)))))
5400
5401(define-public python-pyqrcode
5402 (package
5403 (name "python-pyqrcode")
5404 (version "1.2.1")
5405 (source
5406 (origin
5407 (method url-fetch)
5408 (uri (pypi-uri "PyQRCode" version))
5409 (sha256
5410 (base32
5411 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
5412 (build-system python-build-system)
5413 (home-page
5414 "https://github.com/mnooner256/pyqrcode")
5415 (synopsis "QR code generator")
5416 (description
5417 "Pyqrcode is a QR code generator written purely in Python with
5418SVG, EPS, PNG and terminal output.")
5419 (license license:bsd-3)))
5420
5421(define-public python-seaborn
5422 (package
5423 (name "python-seaborn")
5424 (version "0.9.0")
5425 (source
5426 (origin
5427 (method url-fetch)
5428 (uri (pypi-uri "seaborn" version))
5429 (sha256
5430 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))))
5431 (build-system python-build-system)
5432 (arguments
5433 `(#:phases
5434 (modify-phases %standard-phases
5435 (add-before 'check 'start-xserver
5436 (lambda* (#:key inputs #:allow-other-keys)
5437 (let ((xorg-server (assoc-ref inputs "xorg-server")))
5438 ;; There must be a running X server and make check doesn't
5439 ;; start one. Therefore we must do it.
5440 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
5441 (setenv "DISPLAY" ":1")
5442 #t)))
5443 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
5444 (propagated-inputs
5445 `(("python-pandas" ,python-pandas)
5446 ("python-matplotlib" ,python-matplotlib)
5447 ("python-numpy" ,python-numpy)
5448 ("python-scipy" ,python-scipy)))
5449 (native-inputs
5450 `(("python-pytest" ,python-pytest)
5451 ("xorg-server" ,xorg-server)))
5452 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5453 (synopsis "Statistical data visualization")
5454 (description
5455 "Seaborn is a library for making attractive and informative statistical
5456graphics in Python. It is built on top of matplotlib and tightly integrated
5457with the PyData stack, including support for numpy and pandas data structures
5458and statistical routines from scipy and statsmodels.")
5459 (license license:bsd-3)))
5460
5461(define-public python2-seaborn
5462 (package-with-python2 python-seaborn))
5463
5464(define-public python-mpmath
5465 (package
5466 (name "python-mpmath")
5467 (version "0.19")
5468 (source (origin
5469 (method url-fetch)
5470 (uri (string-append "http://mpmath.org/files/mpmath-"
5471 version ".tar.gz"))
5472 (sha256
5473 (base32
5474 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
5475 (build-system python-build-system)
5476 (arguments
5477 '(#:phases
5478 (modify-phases %standard-phases
5479 (replace 'check
5480 (lambda _
5d7a6f1c 5481 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
44d10b1f
RW
5482 (home-page "http://mpmath.org")
5483 (synopsis "Arbitrary-precision floating-point arithmetic in python")
5484 (description
5485 "@code{mpmath} can be used as an arbitrary-precision substitute for
5486Python's float/complex types and math/cmath modules, but also does much
5487more advanced mathematics.")
5488 (license license:bsd-3)))
5489
5490(define-public python2-mpmath
5491 (package-with-python2 python-mpmath))
5492
5493(define-public python-bigfloat
5494 (package
5495 (name "python-bigfloat")
5496 (version "0.3.0")
5497 (source
5498 (origin
5499 (method url-fetch)
5500 (uri (pypi-uri "bigfloat" version))
5501 (sha256
5502 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
5503 (build-system python-build-system)
5504 (inputs
5505 `(("mpfr" ,mpfr)))
5506 (home-page "https://github.com/mdickinson/bigfloat")
5507 (synopsis "Arbitrary precision floating-point arithmetic for Python")
5508 (description
5509 "This packages provides a Python interface to the MPFR library for
5510multiprecision arithmetic.")
5511 (license license:lgpl3+)))
5512
5513(define-public python2-bigfloat
5514 (package-with-python2 python-bigfloat))
5515
5516(define-public python-sympy
5517 (package
5518 (name "python-sympy")
5519 (version "1.1.1")
5520 (source
5521 (origin
5522 (method url-fetch)
5523 (uri (string-append
5524 "https://github.com/sympy/sympy/releases/download/sympy-"
5525 version "/sympy-" version ".tar.gz"))
5526 (sha256
5527 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
5528 (build-system python-build-system)
5529 (arguments
5530 `(#:phases
5531 (modify-phases %standard-phases
5532 ;; Run the core tests after installation. By default it would run
5533 ;; *all* tests, which take a very long time to complete and are known
5534 ;; to be flaky.
5535 (delete 'check)
5536 (add-after 'install 'check
5537 (lambda* (#:key outputs #:allow-other-keys)
5538 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
5539 #t)))))
5540 (propagated-inputs
5541 `(("python-mpmath" ,python-mpmath)))
5542 (home-page "http://www.sympy.org/")
5543 (synopsis "Python library for symbolic mathematics")
5544 (description
5545 "SymPy is a Python library for symbolic mathematics. It aims to become a
5546full-featured computer algebra system (CAS) while keeping the code as simple
5547as possible in order to be comprehensible and easily extensible.")
5548 (license license:bsd-3)))
5549
5550(define-public python2-sympy
5551 (package
5552 (inherit (package-with-python2 python-sympy))
5553 (arguments
5554 `(#:phases
5555 (modify-phases %standard-phases
5556 ;; Run the core tests after installation. By default it would run
5557 ;; *all* tests, which take a very long time to complete and are known
5558 ;; to be flaky.
5559 (delete 'check)
5560 (add-after 'install 'check
5561 (lambda* (#:key outputs #:allow-other-keys)
5562 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
5563 #t)))))))
5564
5565(define-public python-q
5566 (package
5567 (name "python-q")
5568 (version "2.6")
5569 (source
5570 (origin
5571 (method url-fetch)
5572 (uri (pypi-uri "q" version))
5573 (sha256
5574 (base32
5575 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
5576 (build-system python-build-system)
5577 (home-page "https://github.com/zestyping/q")
5578 (synopsis "Quick-and-dirty debugging output for tired programmers")
5579 (description
5580 "q is a Python module for \"print\" style of debugging Python code. It
5581provides convenient short API for print out of values, tracebacks, and
5582falling into the Python interpreter.")
5583 (license license:asl2.0)))
5584
5585(define-public python2-q
5586 (package-with-python2 python-q))
5587
5588(define-public python2-xlib
5589 (package
5590 (name "python2-xlib")
5591 (version "0.14")
5592 (source (origin
5593 (method url-fetch)
5594 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
5595 "/" version "/"
5596 "python-xlib-" version ".tar.gz"))
5597 (sha256
5598 (base32
5599 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
5600 (build-system python-build-system)
5601 (arguments
5602 `(#:python ,python-2 ;Python 2 only
5603 #:tests? #f)) ;no tests
5604 (home-page "http://python-xlib.sourceforge.net/")
5605 (synopsis "Python X11 client library")
5606 (description
5607 "The Python X Library is intended to be a fully functional X client
5608library for Python programs. It is useful to implement low-level X clients.
5609It is written entirely in Python.")
5610 (license license:gpl2+)))
5611
5612(define-public python-singledispatch
5613 (package
5614 (name "python-singledispatch")
5615 (version "3.4.0.3")
5616 (source
5617 (origin
5618 (method url-fetch)
5619 (uri (pypi-uri "singledispatch" version))
5620 (sha256
5621 (base32
5622 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
5623 (build-system python-build-system)
5624 (native-inputs
5625 `(("python-six" ,python-six))) ; required for conversion, not at run-time
5626 (home-page
5627 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
5628 (synopsis "Backport of singledispatch feature from Python 3.4")
5629 (description
5630 "This library brings functools.singledispatch from Python 3.4 to Python
56312.6-3.3.")
5632 (license license:expat)))
5633
5634(define-public python2-singledispatch
5635 (package-with-python2 python-singledispatch))
5636
5637;; the python- version can be removed with python-3.5
5638(define-public python-backports-abc
5639 (package
5640 (name "python-backports-abc")
5641 (version "0.5")
5642 (source
5643 (origin
5644 (method url-fetch)
5645 (uri (pypi-uri "backports_abc" version))
5646 (sha256
5647 (base32
5648 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
5649 (build-system python-build-system)
5650 (home-page "https://github.com/cython/backports_abc")
5651 (synopsis "Backport of additions to the 'collections.abc' module")
5652 (description
5653 "Python-backports-abc provides a backport of additions to the
36a4366d 5654@code{collections.abc} module in Python-3.5.")
44d10b1f
RW
5655 (license license:psfl)))
5656
5657(define-public python2-backports-abc
5658 (package-with-python2 python-backports-abc))
5659
5660(define-public python-backports-csv
5661 (package
5662 (name "python-backports-csv")
5663 (version "1.0.5")
5664 (source
5665 (origin
5666 (method url-fetch)
5667 (uri (pypi-uri "backports.csv" version))
5668 (sha256
5669 (base32
5670 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
5671 (build-system python-build-system)
5672 (home-page "https://github.com/ryanhiebert/backports.csv")
5673 (synopsis "Backport of Python 3's csv module for Python 2")
5674 (description
5675 "Provides a backport of Python 3's @code{csv} module for parsing
5676comma separated values. The API of the @code{csv} module in Python 2
5677is drastically different from the @code{csv} module in Python 3.
5678This is due, for the most part, to the difference between str in
5679Python 2 and Python 3.")
5680 (license license:psfl)))
5681
5682(define-public python2-backports-csv
5683 (package-with-python2 python-backports-csv))
5684
5685(define-public python2-backports-shutil-get-terminal-size
5686 (package
5687 (name "python2-backports-shutil-get-terminal-size")
5688 (version "1.0.0")
5689 (source
5690 (origin
5691 (method url-fetch)
5692 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
5693 (sha256
5694 (base32
5695 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
5696 (build-system python-build-system)
5697 (arguments
5698 `(#:python ,python-2
5699 #:phases
5700 (modify-phases %standard-phases
5701 (replace 'check
5702 (lambda _
4a4a7d9a 5703 (invoke "py.test" "-v"))))))
44d10b1f
RW
5704 (native-inputs
5705 `(("python2-pytest" ,python2-pytest)))
5706 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
5707 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
5708 (description
5709 "This package provides a backport of the @code{get_terminal_size
5710function} from Python 3.3's @code{shutil}.
5711Unlike the original version it is written in pure Python rather than C,
5712so it might be a tiny bit slower.")
5713 (license license:expat)))
5714
5715(define-public python-waf
5716 (package
5717 (name "python-waf")
5718 (version "2.0.11")
5719 (source (origin
5720 (method url-fetch)
5721 (uri (string-append "https://waf.io/"
5722 "waf-" version ".tar.bz2"))
5723 (sha256
5724 (base32
5725 "13zrniwkmfqgsgzi9v5m1367fppp9yzrz6z2ny6hy8dmpb8mj4z4"))))
5726 (build-system python-build-system)
5727 (arguments
5728 '(#:phases
5729 (modify-phases %standard-phases
5730 (replace 'build
5731 (lambda _
5732 (invoke "python" "waf-light" "configure" "build")))
5733 (replace 'check
5734 (lambda _
5735 (invoke "python" "waf" "--version")))
5736 (replace 'install
5737 (lambda* (#:key outputs #:allow-other-keys)
5738 (let ((out (assoc-ref outputs "out")))
5739 (install-file "waf" (string-append out "/bin")))
5740 #t))
5741 ;; waf breaks when it is wrapped.
5742 (delete 'wrap))))
5743 (home-page "https://waf.io/")
5744 (synopsis "Python-based build system")
5745 (description
5746 "Waf is a Python-based framework for configuring, compiling and installing
5747applications.")
5748 (license license:bsd-3)))
5749
5750(define-public python2-waf
5751 (package-with-python2 python-waf))
5752
5753(define-public python-pyzmq
5754 (package
5755 (name "python-pyzmq")
5756 (version "17.1.2")
5757 (source
5758 (origin
5759 (method url-fetch)
5760 (uri (pypi-uri "pyzmq" version))
5761 (sha256
5762 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
5763 (build-system python-build-system)
5764 (arguments
5765 `(#:configure-flags
5766 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
5767 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
5768 ;; --inplace' for 'python setup.py test' to work.
5769 #:tests? #f))
5770 (inputs
5771 `(("zeromq" ,zeromq)))
5772 (native-inputs
5773 `(("pkg-config" ,pkg-config)
5774 ("python-nose" ,python-nose)))
5775 (home-page "https://github.com/zeromq/pyzmq")
5776 (synopsis "Python bindings for 0MQ")
5777 (description
5778 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
5779 (license license:bsd-4)))
5780
5781(define-public python2-pyzmq
5782 (package-with-python2 python-pyzmq))
5783
5784(define-public python-pep8
5785 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
5786 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
5787 ;; some dependents' test suites, and nothing more.
5788 (package
5789 (name "python-pep8")
5790 (version "1.7.0")
5791 (source
5792 (origin
5793 (method url-fetch)
5794 (uri (pypi-uri "pep8" version))
5795 (sha256
5796 (base32
5797 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
5798 (build-system python-build-system)
5799 (home-page "https://pep8.readthedocs.org/")
5800 (synopsis "Python style guide checker")
5801 (description
5802 "This tools checks Python code against some of the style conventions in
5803PEP 8.")
5804 (license license:expat)))
5805
5806(define-public python2-pep8
5807 (package-with-python2 python-pep8))
5808
5809(define-public python-pyflakes
5810 (package
5811 (name "python-pyflakes")
5812 (version "2.0.0")
5813 (source
5814 (origin
5815 (method url-fetch)
5816 (uri (pypi-uri "pyflakes" version))
5817 (sha256
5818 (base32
5819 "0jba28czyvimdc72llms3f17swp3i8jdcabf5w0j00adfbn64xls"))))
5820 (build-system python-build-system)
5821 (home-page
5822 "https://github.com/pyflakes/pyflakes")
5823 (synopsis "Passive checker of Python programs")
5824 (description
5825 "Pyflakes statically checks Python source code for common errors.")
5826 (license license:expat)))
5827
5828(define-public python2-pyflakes
5829 (package-with-python2 python-pyflakes))
5830
5831(define-public python-mccabe
5832 (package
5833 (name "python-mccabe")
5834 (version "0.6.1")
5835 (source
5836 (origin
5837 (method url-fetch)
5838 (uri (pypi-uri "mccabe" version))
5839 (sha256
5840 (base32
5841 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
5842 (build-system python-build-system)
5843 (native-inputs
5844 `(("python-pytest" ,python-pytest-bootstrap)
5845 ("python-pytest-runner" ,python-pytest-runner)))
5846 (home-page "https://github.com/flintwork/mccabe")
5847 (synopsis "McCabe checker, plugin for flake8")
5848 (description
5849 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
5850complexity of Python source code.")
5851 (license license:expat)))
5852
5853(define-public python2-mccabe
5854 (package-with-python2 python-mccabe))
5855
5856(define-public python-mccabe-0.2.1
5857 (package (inherit python-mccabe)
5858 (version "0.2.1")
5859 (source
5860 (origin
5861 (method url-fetch)
5862 (uri (pypi-uri "mccabe" version))
5863 (sha256
5864 (base32
5865 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
5866
5867(define-public python2-mccabe-0.2.1
5868 (package-with-python2 python-mccabe-0.2.1))
5869
5870;; Flake8 2.4.1 requires an older version of pep8.
5871;; This should be removed ASAP.
5872(define-public python-pep8-1.5.7
5873 (package (inherit python-pep8)
5874 (version "1.5.7")
5875 (source
f3576970
RW
5876 (origin
5877 (method url-fetch)
5878 (uri (pypi-uri "pep8" version))
5879 (sha256
5880 (base32
5881 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
44d10b1f
RW
5882 (arguments
5883 ;; XXX Tests not compatible with Python 3.5.
5884 '(#:tests? #f))))
5885
5886(define-public python2-pep8-1.5.7
5887 (package-with-python2 python-pep8-1.5.7))
5888
5889;; Flake8 2.4.1 requires an older version of pyflakes.
5890;; This should be removed ASAP.
5891(define-public python-pyflakes-0.8.1
5892 (package (inherit python-pyflakes)
5893 (version "0.8.1")
5894 (source
8c4dffb5
RW
5895 (origin
5896 (method url-fetch)
5897 (uri (pypi-uri "pyflakes" version))
5898 (sha256
5899 (base32
5900 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
44d10b1f
RW
5901 (arguments
5902 ;; XXX Tests not compatible with Python 3.5.
5903 '(#:tests? #f))))
5904
5905(define-public python2-pyflakes-0.8.1
5906 (package-with-python2 python-pyflakes-0.8.1))
5907
5908;; This package is used by hypothesis which has thousands of dependent packages.
5909;; FIXME: Consolidate this with "python-flake8" below in the next rebuild cycle.
5910(define-public python-flake8-3.5
5911 (package
5912 (name "python-flake8")
5913 (version "3.5.0")
5914 (source
5915 (origin
5916 (method url-fetch)
5917 (uri (pypi-uri "flake8" version))
5918 (sha256
5919 (base32
5920 "184b33grvvjmiwlv9kyd7yng9qv5ld24154j70z332xxg9gjclvj"))))
5921 (build-system python-build-system)
5922 (arguments
5923 `(#:phases
5924 (modify-phases %standard-phases
5925 ;; Two errors don't seem to have assigned codes.
5926 (add-after 'unpack 'delete-broken-test
5927 (lambda _ (delete-file "tests/unit/test_pyflakes_codes.py") #t))
5928 (add-after 'unpack 'fix-problem-with-pycodestyle
5929 (lambda _
5930 ;; See https://gitlab.com/pycqa/flake8/merge_requests/230
5931 ;; This should no longer be needed with the next release.
5932 (substitute* "setup.py"
5933 (("PEP8_PLUGIN\\('break_around_binary_operator'\\),")
5934 "PEP8_PLUGIN('break_after_binary_operator'),\
5935PEP8_PLUGIN('break_before_binary_operator'),"))
5936 #t))
5937 (delete 'check)
5938 (add-after 'install 'check
5939 (lambda* (#:key inputs outputs #:allow-other-keys)
5940 (add-installed-pythonpath inputs outputs)
5941 (invoke "pytest" "-v")
5942 #t)))))
5943 (propagated-inputs
5944 `(("python-pycodestyle" ,python-pycodestyle)
5945 ("python-pyflakes" ,python-pyflakes)
5946 ("python-mccabe" ,python-mccabe)))
5947 (native-inputs
5948 `(("python-mock" ,python-mock)
5949 ("python-pytest" ,python-pytest-bootstrap)
5950 ("python-pytest-runner" ,python-pytest-runner)))
5951 (home-page "https://gitlab.com/pycqa/flake8")
5952 (synopsis
5953 "The modular source code checker: pep8, pyflakes and co")
5954 (description
5955 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
5956 (properties `((python2-variant . ,(delay python2-flake8-3.5))))
5957 (license license:expat)))
5958
5959(define-public python2-flake8-3.5
5960 (let ((base (package-with-python2 (strip-python2-variant python-flake8-3.5))))
5961 (package (inherit base)
5962 (propagated-inputs
5963 `(("python2-configparser" ,python2-configparser)
5964 ("python2-enum34" ,python2-enum34)
5965 ,@(package-propagated-inputs base))))))
5966
5967;; Version 3.5.0 has compatibility issues with Pyflakes 2.0, so we need
5968;; this newer version. Keep it as a separate variable for now to avoid
5969;; rebuilding "python-hypothesis"; this should be removed in the next
5970;; rebuild cycle.
5971(define-public python-flake8
5972 (package
5973 (inherit python-flake8-3.5)
5974 (version "3.6.0")
5975 (source (origin
5976 (method url-fetch)
5977 (uri (pypi-uri "flake8" version))
5978 (sha256
5979 (base32
5980 "0w0nprx22rbvrrkbfx9v5jc5gskbm08g219l7r8wai8zfswgadba"))))
5981 (arguments
5982 (substitute-keyword-arguments (package-arguments python-flake8-3.5)
5983 ((#:phases phases)
5984 `(modify-phases ,phases
5985 (delete 'delete-broken-test)
5986 (delete 'fix-problem-with-pycodestyle)))))
5987 (properties `((python2-variant . ,(delay python2-flake8))))))
5988
5989(define-public python2-flake8
5990 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
5991 (package (inherit base)
5992 (propagated-inputs
5993 (package-propagated-inputs python2-flake8-3.5)))))
5994
5995;; python-hacking requires flake8 <2.6.0.
5996(define-public python-flake8-2.5
5997 (package
5998 (inherit python-flake8)
5999 (version "2.5.5")
6000 (source (origin
6001 (method url-fetch)
6002 (uri (pypi-uri "flake8" version))
6003 (sha256
6004 (base32
6005 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
6006 (propagated-inputs
6007 `(("python-pep8" ,python-pep8)
6008 ,@(package-propagated-inputs python-flake8)))
6009 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
6010
6011(define-public python2-flake8-2.5
6012 (package
6013 (inherit python2-flake8)
6014 (version (package-version python-flake8-2.5))
6015 (source (origin
6016 (inherit (package-source python-flake8-2.5))))
6017 (propagated-inputs
6018 `(("python2-pep8" ,python2-pep8)
6019 ,@(package-propagated-inputs python2-flake8)))))
6020
6021(define-public python-flake8-polyfill
6022 (package
6023 (name "python-flake8-polyfill")
6024 (version "1.0.2")
6025 (source
6026 (origin
6027 (method url-fetch)
6028 (uri (pypi-uri "flake8-polyfill" version))
6029 (sha256
6030 (base32
6031 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
6032 (build-system python-build-system)
6033 (arguments
6034 '(#:phases
6035 (modify-phases %standard-phases
6036 (replace 'check
6037 (lambda _
6038 (setenv "PYTHONPATH"
6039 (string-append (getcwd) "/build/lib:"
6040 (getenv "PYTHONPATH")))
4f0a0894 6041 (invoke "py.test" "-v"))))))
44d10b1f
RW
6042 (native-inputs
6043 `(("python-flake8" ,python-flake8)
6044 ("python-mock" ,python-mock)
6045 ("python-pep8" ,python-pep8)
6046 ("python-pycodestyle" ,python-pycodestyle)
6047 ("python-pytest" ,python-pytest)))
6048 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6049 (synopsis "Polyfill package for Flake8 plugins")
6050 (description
6051 "This package that provides some compatibility helpers for Flake8
6052plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6053 (license license:expat)))
6054
6055(define-public python2-flake8-polyfill
6056 (package-with-python2 python-flake8-polyfill))
6057
6058(define-public python-mistune
6059 (package
6060 (name "python-mistune")
6061 (version "0.8.4")
6062 (source
6063 (origin
6064 (method url-fetch)
6065 (uri (pypi-uri "mistune" version))
6066 (sha256
6067 (base32
6068 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
6069 (build-system python-build-system)
6070 (native-inputs
6071 `(("python-nose" ,python-nose)
6072 ("python-cython" ,python-cython)))
6073 (home-page "https://github.com/lepture/mistune")
6074 (synopsis "Markdown parser in pure Python")
6075 (description "This package provides a fast markdown parser in pure
6076Python.")
6077 (license license:bsd-3)))
6078
6079(define-public python2-mistune
6080 (package-with-python2 python-mistune))
6081
6082(define-public python-markdown
6083 (package
6084 (name "python-markdown")
1e3c7119 6085 (version "3.1")
44d10b1f
RW
6086 (source
6087 (origin
6088 (method url-fetch)
6089 (uri (pypi-uri "Markdown" version))
6090 (sha256
6091 (base32
1e3c7119 6092 "0l62x154r9mgdvfap06gf0nkrmjd7xixlfshsxcdif2nlrlnyjpw"))))
44d10b1f
RW
6093 (build-system python-build-system)
6094 (native-inputs
6095 `(("python-nose" ,python-nose)
6096 ("python-pyyaml" ,python-pyyaml)))
6097 (home-page "https://python-markdown.github.io/")
6098 (synopsis "Python implementation of Markdown")
6099 (description
6100 "This package provides a Python implementation of John Gruber's
6101Markdown. The library features international input, various Markdown
6102extensions, and several HTML output formats. A command line wrapper
6103markdown_py is also provided to convert Markdown files to HTML.")
6104 (license license:bsd-3)))
6105
6106(define-public python2-markdown
6107 (package-with-python2 python-markdown))
6108
6109(define-public python-ptyprocess
6110 (package
6111 (name "python-ptyprocess")
6112 (version "0.5.2")
6113 (source
6114 (origin
6115 (method url-fetch)
6116 (uri (pypi-uri "ptyprocess" version))
6117 (sha256
6118 (base32
6119 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
6120 (build-system python-build-system)
6121 (native-inputs
6122 `(("python-nose" ,python-nose)))
6123 (arguments
6124 `(#:phases
6125 (modify-phases %standard-phases
6126 (replace 'check
7904d6fa 6127 (lambda _ (invoke "nosetests"))))))
44d10b1f
RW
6128 (home-page "https://github.com/pexpect/ptyprocess")
6129 (synopsis "Run a subprocess in a pseudo terminal")
6130 (description
6131 "This package provides a Python library used to launch a subprocess in a
6132pseudo terminal (pty), and interact with both the process and its pty.")
6133 (license license:isc)))
6134
6135(define-public python2-ptyprocess
6136 (package-with-python2 python-ptyprocess))
6137
6138(define-public python-cram
6139 (package
6140 (name "python-cram")
6141 (version "0.7")
6142 (home-page "https://bitheap.org/cram/")
6143 (source (origin
6144 (method url-fetch)
6145 (uri (list (string-append home-page "cram-"
6146 version ".tar.gz")
6147 (pypi-uri "cram" version)))
6148 (sha256
6149 (base32
6150 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6151 (arguments
6152 '(#:phases
6153 (modify-phases %standard-phases
6154 (add-after 'unpack 'patch-source
6155 (lambda _
6156 (substitute* (find-files "cram" ".*\\.py$")
6157 ;; Replace default shell path.
6158 (("/bin/sh") (which "sh")))
6159 (substitute* (find-files "tests" ".*\\.t$")
6160 (("md5") "md5sum")
6161 (("/bin/bash") (which "bash"))
6162 (("/bin/sh") (which "sh")))
6163 (substitute* "cram/_test.py"
6164 ;; This hack works around a bug triggered by substituting
6165 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6166 ;; "cram -h", which breaks the output at 80 characters. This
6167 ;; causes the line showing the default shell to break into two
6168 ;; lines, but the test expects a single line...
6169 (("env\\['COLUMNS'\\] = '80'")
6170 "env['COLUMNS'] = '160'"))
6171 #t))
6172 (delete 'check)
6173 (add-after 'install 'check
6174 ;; The test phase uses the built library and executable.
6175 ;; It's easier to run it after install since the build
6176 ;; directory contains version-specific PATH.
6177 (lambda* (#:key inputs outputs #:allow-other-keys)
6178 (add-installed-pythonpath inputs outputs)
6179 (setenv "PATH" (string-append (getenv "PATH") ":"
6180 (assoc-ref outputs "out") "/bin"))
2d7db192 6181 (invoke "make" "test"))))))
44d10b1f
RW
6182 (build-system python-build-system)
6183 (native-inputs
6184 `(("python-coverage" ,python-coverage)
6185 ("which" ,which)))
6186 (synopsis "Simple testing framework for command line applications")
6187 (description
6188 "Cram is a functional testing framework for command line applications.
6189Cram tests look like snippets of interactive shell sessions. Cram runs each
6190command and compares the command output in the test with the command’s actual
6191output.")
6192 (license license:gpl2+)))
6193
6194(define-public python2-cram
6195 (package-with-python2 python-cram))
6196
6197(define-public python-straight-plugin
6198 (package
6199 (name "python-straight-plugin")
6200 (version "1.4.1")
6201 (source
6202 (origin
6203 (method url-fetch)
6204 (uri (pypi-uri "straight.plugin" version))
6205 (sha256
6206 (base32
6207 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6208 (build-system python-build-system)
6209 (home-page "https://github.com/ironfroggy/straight.plugin")
6210 (synopsis "Simple namespaced plugin facility")
6211 (description "Straight Plugin provides a type of plugin you can create from
6212almost any existing Python modules, and an easy way for outside developers to
6213add functionality and customization to your projects with their own plugins.")
6214 (license license:expat)))
6215
6216(define-public python2-straight-plugin
6217 (package-with-python2 python-straight-plugin))
6218
6219(define-public python-fonttools
6220 (package
6221 (name "python-fonttools")
6222 (version "3.28.0")
6223 (source (origin
6224 (method url-fetch)
6225 (uri (pypi-uri "fonttools" version ".zip"))
6226 (sha256
6227 (base32
6228 "0vsvjhidpb5kywpjgz1j3fywzkddxkb0afqai18qa3h6lqjyxwpb"))))
6229 (build-system python-build-system)
6230 (native-inputs
6231 `(("unzip" ,unzip)
6232 ("python-pytest" ,python-pytest)
6233 ("python-pytest-runner" ,python-pytest-runner)))
6234 (home-page "https://github.com/behdad/fonttools")
6235 (synopsis "Tools to manipulate font files")
6236 (description
6237 "FontTools/TTX is a library to manipulate font files from Python. It
6238supports reading and writing of TrueType/OpenType fonts, reading and writing
6239of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6240also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6241from an XML-based format.")
6242 (license license:expat)))
6243
6244(define-public python2-fonttools
6245 (package-with-python2 python-fonttools))
6246
6247(define-public python-ly
6248 (package
6249 (name "python-ly")
6250 (version "0.9.5")
6251 (source
6252 (origin
6253 (method url-fetch)
6254 (uri (pypi-uri name version))
6255 (sha256
6256 (base32
6257 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
6258 (build-system python-build-system)
6259 (arguments
6260 ;; FIXME: Some tests need network access.
6261 '(#:tests? #f))
6262 (synopsis "Tool and library for manipulating LilyPond files")
6263 (description "This package provides a Python library to parse, manipulate
6264or create documents in LilyPond format. A command line program ly is also
6265provided that can be used to do various manipulations with LilyPond files.")
6266 (home-page "https://pypi.python.org/pypi/python-ly")
6267 (license license:gpl2+)))
6268
6269(define-public python-appdirs
6270 (package
6271 (name "python-appdirs")
6272 (version "1.4.3")
6273 (source
6274 (origin
6275 (method url-fetch)
6276 (uri (pypi-uri "appdirs" version))
6277 (sha256
6278 (base32
6279 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
6280 (build-system python-build-system)
6281 (home-page "https://github.com/ActiveState/appdirs")
6282 (synopsis
6283 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6284 (description
6285 "This module provides a portable way of finding out where user data
6286should be stored on various operating systems.")
6287 (license license:expat)))
6288
6289(define-public python2-appdirs
6290 (package-with-python2 python-appdirs))
6291
6292(define-public python-llfuse
6293 (package
6294 (name "python-llfuse")
6295 (version "1.3.5")
6296 (source (origin
6297 (method url-fetch)
6298 (uri (pypi-uri "llfuse" version ".tar.bz2"))
6299 (sha256
6300 (base32
6301 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
6302 (build-system python-build-system)
6303 (inputs
6304 `(("fuse" ,fuse)
6305 ("attr" ,attr)))
6306 (native-inputs
6307 `(("pkg-config" ,pkg-config)))
6308 (synopsis "Python bindings for FUSE")
6309 (description
6310 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6311 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
6312 (license license:lgpl2.0+)
6313 (properties `((python2-variant . ,(delay python2-llfuse))))))
6314
6315(define-public python2-llfuse
6316 (package (inherit (package-with-python2
6317 (strip-python2-variant python-llfuse)))
6318 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6319
6320;; For attic-0.16
6321(define-public python-llfuse-0.41
6322 (package (inherit python-llfuse)
6323 (version "0.41.1")
6324 (source (origin
6325 (method url-fetch)
6326 (uri (string-append
6327 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6328 "llfuse-" version ".tar.bz2"))
6329 (sha256
6330 (base32
6331 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
6332 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6333 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
6334 (license (list license:expat license:lgpl2.0+))))
6335
6336(define-public python-msgpack
6337 (package
6338 (name "python-msgpack")
6339 (version "0.5.6")
6340 (source (origin
6341 (method url-fetch)
6342 (uri (pypi-uri "msgpack" version))
6343 (sha256
6344 (base32
6345 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
6346 (build-system python-build-system)
6347 (arguments
6348 `(#:modules ((guix build utils)
6349 (guix build python-build-system)
6350 (ice-9 ftw)
6351 (srfi srfi-1)
6352 (srfi srfi-26))
6353 #:phases
6354 (modify-phases %standard-phases
6355 (replace 'check
6356 (lambda _
6357 (let ((cwd (getcwd)))
6358 (setenv "PYTHONPATH"
6359 (string-append cwd "/build/"
6360 (find (cut string-prefix? "lib" <>)
6361 (scandir (string-append cwd "/build")))
6362 ":"
6363 (getenv "PYTHONPATH")))
6364 (invoke "pytest" "-v" "test")))))))
6365 (native-inputs
6366 `(("python-pytest" ,python-pytest)))
6367 (synopsis "MessagePack (de)serializer")
6368 (description "MessagePack is a fast, compact binary serialization format,
6369suitable for similar data to JSON. This package provides CPython bindings for
6370reading and writing MessagePack data.")
6371 (home-page "https://pypi.python.org/pypi/msgpack/")
6372 (license license:asl2.0)))
6373
6374;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
6375;; release 0.5. Some packages like borg still call it by the old name for now.
6376;; <https://bugs.gnu.org/30662>
6377(define-public python-msgpack-transitional
6378 (package
6379 (inherit python-msgpack)
6380 (name "python-msgpack-transitional")
6381 (arguments
6382 (substitute-keyword-arguments (package-arguments python-msgpack)
6383 ((#:phases phases)
6384 `(modify-phases ,phases
6385 (add-after 'unpack 'configure-transitional
6386 (lambda _
6387 ;; Keep using the old name.
6388 (substitute* "setup.py"
6389 (("TRANSITIONAL = False")
6390 "TRANSITIONAL = 1"))
6391 #t))))))))
6392
6393(define-public python2-msgpack
6394 (package-with-python2 python-msgpack))
6395
6396(define-public python-netaddr
6397 (package
6398 (name "python-netaddr")
6399 (version "0.7.19")
6400 (source
6401 (origin
6402 (method url-fetch)
6403 (uri (pypi-uri "netaddr" version))
6404 (sha256
6405 (base32
6406 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
6407 (build-system python-build-system)
6408 (arguments `(#:tests? #f)) ;; No tests.
6409 (home-page "https://github.com/drkjam/netaddr/")
6410 (synopsis "Pythonic manipulation of network addresses")
6411 (description
6412 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6413and MAC network addresses.")
6414 (license license:bsd-3)))
6415
6416(define-public python2-netaddr
6417 (package-with-python2 python-netaddr))
6418
6419(define-public python-wrapt
6420 (package
6421 (name "python-wrapt")
dddd7a75 6422 (version "1.11.1")
44d10b1f
RW
6423 (source
6424 (origin
6425 (method url-fetch)
6426 (uri (pypi-uri "wrapt" version))
6427 (sha256
6428 (base32
dddd7a75 6429 "0cqmysny1pz01jw26q48q5zasvns6507rwhgm6wcw743f0r01sja"))))
44d10b1f
RW
6430 (build-system python-build-system)
6431 (arguments
6432 ;; Tests are not included in the tarball, they are only available in the
6433 ;; git repository.
6434 `(#:tests? #f))
6435 (home-page "https://github.com/GrahamDumpleton/wrapt")
6436 (synopsis "Module for decorators, wrappers and monkey patching")
6437 (description
6438 "The aim of the wrapt module is to provide a transparent object proxy for
6439 Python, which can be used as the basis for the construction of function
6440 wrappers and decorator functions.")
6441 (license license:bsd-2)))
6442
6443(define-public python2-wrapt
6444 (package-with-python2 python-wrapt))
6445
6446(define-public python-xlrd
6447 (package
6448 (name "python-xlrd")
6449 (version "1.0.0")
6450 (source (origin
6451 (method url-fetch)
6452 (uri (pypi-uri "xlrd" version))
6453 (sha256
6454 (base32
6455 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
6456 (build-system python-build-system)
6457 (arguments
6458 `(#:phases
6459 (modify-phases %standard-phases
6460 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
6461 ;; run tests instead for now.
45fd0081 6462 (replace 'check (lambda _ (invoke "nosetests"))))))
44d10b1f
RW
6463 (native-inputs `(("python-nose" ,python-nose)))
6464 (home-page "http://www.python-excel.org/")
6465 (synopsis "Library for extracting data from Excel files")
6466 (description "This packages provides a library to extract data from
6467spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
6468@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
6469Unicode-aware. It is not intended as an end-user tool.")
6470 (license license:bsd-3)))
6471
6472(define-public python2-xlrd
6473 (package-with-python2 python-xlrd))
6474
6475(define-public python-prettytable
6476 (package
6477 (name "python-prettytable")
6478 (version "0.7.2")
6479 (source
6480 (origin
6481 (method url-fetch)
337c3a1e 6482 (uri (pypi-uri "prettytable" version ".tar.bz2"))
44d10b1f
RW
6483 (sha256
6484 (base32
6485 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
6486 (build-system python-build-system)
6487 (home-page "http://code.google.com/p/prettytable/")
6488 (synopsis "Display tabular data in an ASCII table format")
6489 (description
6490 "A library designed to represent tabular data in visually appealing ASCII
6491tables. PrettyTable allows for selection of which columns are to be printed,
6492independent alignment of columns (left or right justified or centred) and
6493printing of sub-tables by specifying a row range.")
6494 (license license:bsd-3)))
6495
6496(define-public python2-prettytable
6497 (package-with-python2 python-prettytable))
6498
6499(define-public python-tables
6500 (package
6501 (name "python-tables")
6502 (version "3.4.4")
6503 (source
6504 (origin
6505 (method url-fetch)
6506 (uri (pypi-uri "tables" version))
6507 (sha256
6508 (base32
6509 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
6510 (modules '((guix build utils)))
6511 (snippet
6512 '(begin
6513 ;; Remove pre-compiled .pyc files from source.
6514 (for-each delete-file-recursively
6515 (find-files "." "__pycache__" #:directories? #t))
6516 (for-each delete-file (find-files "." "\\.pyc$"))
6517 #t))))
6518 (build-system python-build-system)
6519 (arguments
6520 `(;; FIXME: python-build-system does not pass configure-flags to "build"
6521 ;; or "check", so we must override the build and check phases.
6522 #:phases
6523 (modify-phases %standard-phases
6524 (add-after 'unpack 'use-gcc
6525 (lambda _
6526 (substitute* "setup.py"
6527 (("compiler = new_compiler\\(\\)" line)
6528 (string-append line
6529 "\ncompiler.set_executables(compiler='gcc',"
6530 "compiler_so='gcc',"
6531 "linker_exe='gcc',"
6532 "linker_so='gcc -shared')")))
6533 #t))
6534 (replace 'build
6535 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
6536 (invoke "python" "setup.py" "build"
6537 (string-append "--hdf5="
6538 (assoc-ref inputs "hdf5")))))
44d10b1f
RW
6539 (replace 'check
6540 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
6541 (invoke "python" "setup.py" "check"
6542 (string-append "--hdf5="
6543 (assoc-ref inputs "hdf5"))))))))
44d10b1f
RW
6544 (propagated-inputs
6545 `(("python-numexpr" ,python-numexpr)
6546 ("python-numpy" ,python-numpy)))
6547 (native-inputs
6548 `(("python-cython" ,python-cython)
6549 ("pkg-config" ,pkg-config)))
6550 (inputs
6551 `(("hdf5" ,hdf5)
6552 ("bzip2" ,bzip2)
6553 ("zlib" ,zlib)))
6554 (home-page "http://www.pytables.org/")
6555 (synopsis "Hierarchical datasets for Python")
6556 (description "PyTables is a package for managing hierarchical datasets and
6557designed to efficiently cope with extremely large amounts of data.")
6558 (license license:bsd-3)))
6559
6560(define-public python2-tables
6561 (package-with-python2 python-tables))
6562
6563(define-public python-pyasn1
6564 (package
6565 (name "python-pyasn1")
6566 (version "0.4.3")
6567 (source
6568 (origin
6569 (method url-fetch)
6570 (uri (pypi-uri "pyasn1" version))
6571 (sha256
6572 (base32
6573 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
6574 (build-system python-build-system)
6575 (home-page "http://pyasn1.sourceforge.net/")
6576 (synopsis "ASN.1 types and codecs")
6577 (description
6578 "This is an implementation of ASN.1 types and codecs in Python. It is
6579suitable for a wide range of protocols based on the ASN.1 specification.")
6580 (license license:bsd-2)))
6581
6582(define-public python2-pyasn1
6583 (package-with-python2 python-pyasn1))
6584
6585(define-public python-pyasn1-modules
6586 (package
6587 (name "python-pyasn1-modules")
6588 (version "0.2.2")
6589 (source
6590 (origin
6591 (method url-fetch)
6592 (uri (pypi-uri "pyasn1-modules" version))
6593 (sha256
6594 (base32
6595 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
6596 (build-system python-build-system)
6597 (propagated-inputs
6598 `(("python-pyasn1" ,python-pyasn1)))
6599 (home-page "https://sourceforge.net/projects/pyasn1/")
6600 (synopsis "ASN.1 codec implementations")
6601 (description
6602 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
6603implementations of ASN.1-based codecs and protocols.")
6604 (license license:bsd-3)))
6605
6606(define-public python2-pyasn1-modules
6607 (package-with-python2 python-pyasn1-modules))
6608
6609(define-public python-ipaddress
6610 (package
6611 (name "python-ipaddress")
6612 (version "1.0.22")
6613 (source (origin
6614 (method url-fetch)
6615 (uri (pypi-uri "ipaddress" version))
6616 (sha256
6617 (base32
6618 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
6619 (build-system python-build-system)
6620 (home-page "https://github.com/phihag/ipaddress")
6621 (synopsis "IP address manipulation library")
6622 (description
6623 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
6624 in Python. This library is used to create, poke at, and manipulate IPv4 and
6625 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
6626 module to older versions of Python.")
6627 (license license:psfl)))
6628
6629(define-public python2-ipaddress
6630 (package-with-python2 python-ipaddress))
6631
6632(define-public python2-ipaddr
6633 (package
6634 (name "python2-ipaddr")
6635 (version "2.1.11")
6636 (source
6637 (origin
6638 (method url-fetch)
6639 (uri (pypi-uri "ipaddr" version))
6640 (sha256
6641 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
6642 (build-system python-build-system)
6643 (arguments
6644 `(#:python ,python-2 ;version 2 only
6645 #:phases
6646 (modify-phases %standard-phases
6647 (replace 'check
40b8c4e3 6648 (lambda _ (invoke "python" "ipaddr_test.py"))))))
44d10b1f
RW
6649 (home-page "https://github.com/google/ipaddr-py")
6650 (synopsis "IP address manipulation library")
6651 (description
6652 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
6653IPv6 addresses and networks.
6654
6655For new implementations you may prefer to use the standard module
6656@code{ipaddress}, which was introduced in Python 3.3 and backported to older
6657versions of Python.")
6658 (license license:asl2.0)))
6659
6660(define-public python-idna
6661 (package
6662 (name "python-idna")
6663 (version "2.7")
6664 (source
6665 (origin
6666 (method url-fetch)
6667 (uri (pypi-uri "idna" version))
6668 (sha256
6669 (base32
6670 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))
6671 (build-system python-build-system)
6672 (home-page "https://github.com/kjd/idna")
6673 (synopsis "Internationalized domain names in applications")
6674 (description
6675 "This is a library to support the Internationalised Domain Names in
6676Applications (IDNA) protocol as specified in RFC 5891. This version of the
6677protocol is often referred to as “IDNA2008” and can produce different results
6678from the earlier standard from 2003. The library is also intended to act as a
6679suitable drop-in replacement for the “encodings.idna” module that comes with
6680the Python standard library but currently only supports the older 2003
6681specification.")
6682 (license license:bsd-4)))
6683
6684(define-public python2-idna
6685 (package-with-python2 python-idna))
6686
6687(define-public python-idna-ssl
6688 (package
6689 (name "python-idna-ssl")
6690 (version "1.0.1")
6691 (source
6692 (origin
6693 (method url-fetch)
6694 (uri (pypi-uri "idna-ssl" version))
6695 (sha256
6696 (base32
6697 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
6698 (build-system python-build-system)
6699 (arguments
6700 `(#:tests? #f)) ;circular dependency with python-aiohttp
6701 (home-page "https://github.com/aio-libs/idna-ssl")
6702 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
6703 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
6704domains support.")
6705 (license license:expat)))
6706
6707(define-public python-pretend
6708 (package
6709 (name "python-pretend")
6710 (version "1.0.9")
6711 (source
6712 (origin
6713 (method url-fetch)
9f1f22ee 6714 (uri (pypi-uri "pretend" version))
44d10b1f
RW
6715 (sha256
6716 (base32
6717 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
6718 (build-system python-build-system)
6719 (home-page "https://github.com/alex/pretend")
6720 (synopsis "Library for stubbing in Python")
6721 (description
6722 "Pretend is a library to make stubbing with Python easier. Stubbing is a
6723technique for writing tests. You may hear the term mixed up with mocks,
6724fakes, or doubles. Basically, a stub is an object that returns pre-canned
6725responses, rather than doing any computation.")
6726 (license license:bsd-3)))
6727
6728(define-public python2-pretend
6729 (package-with-python2 python-pretend))
6730
6731(define-public python-pip
6732 (package
6733 (name "python-pip")
6734 (version "18.1")
6735 (source
6736 (origin
6737 (method url-fetch)
6738 (uri (pypi-uri "pip" version))
6739 (sha256
6740 (base32
6741 "188fclay154s520n43s7cxxlhdaiysvxf19zk8vr1xbyjyyr58n0"))))
6742 (build-system python-build-system)
6743 (arguments
6744 '(#:tests? #f)) ; there are no tests in the pypi archive.
6745 (home-page "https://pip.pypa.io/")
6746 (synopsis "Package manager for Python software")
6747 (description
6748 "Pip is a package manager for Python software, that finds packages on the
6749Python Package Index (PyPI).")
6750 (license license:expat)))
6751
6752(define-public python2-pip
6753 (package-with-python2 python-pip))
6754
6755(define-public python-tlsh
6756 (package
6757 (name "python-tlsh")
6758 (version "3.4.5")
6759 (home-page "https://github.com/trendmicro/tlsh")
3e3ff8ad
TGR
6760 (source
6761 (origin
6762 (method git-fetch)
6763 (uri (git-reference
6764 (url "https://github.com/trendmicro/tlsh.git")
6765 (commit (string-append "v" version))))
6766 (file-name (git-file-name name version))
6767 (sha256
6768 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
44d10b1f
RW
6769 (build-system cmake-build-system)
6770 (arguments
6771 '(#:out-of-source? #f
6772 #:phases (modify-phases %standard-phases
6773 (replace
6774 'install
6775 (lambda* (#:key outputs #:allow-other-keys)
6776 ;; Build and install the Python bindings. The underlying
6777 ;; C++ library is apparently not meant to be installed.
6778 (let ((out (assoc-ref outputs "out")))
6779 (with-directory-excursion "py_ext"
6780 (and (system* "python" "setup.py" "build")
6781 (system* "python" "setup.py" "install"
6782 (string-append "--prefix=" out))))))))))
6783 (inputs `(("python" ,python-wrapper))) ;for the bindings
6784 (synopsis "Fuzzy matching library for Python")
6785 (description
6786 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
6787Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
6788value which can be used for similarity comparisons. Similar objects have
6789similar hash values, which allows for the detection of similar objects by
6790comparing their hash values. The byte stream should have a sufficient amount
6791of complexity; for example, a byte stream of identical bytes will not generate
6792a hash value.")
6793 (license license:asl2.0)))
6794
6795(define-public python2-tlsh
6796 (package
6797 (inherit python-tlsh)
6798 (name "python2-tlsh")
6799 (inputs `(("python" ,python-2)))))
6800
6801(define-public python-termcolor
6802 (package
6803 (name "python-termcolor")
6804 (version "1.1.0")
6805 (source
6806 (origin
6807 (method url-fetch)
6808 (uri (pypi-uri "termcolor" version))
6809 (sha256
6810 (base32
6811 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
6812 (build-system python-build-system)
6813 (arguments
6814 ;; There are no tests.
6815 `(#:tests? #f))
6816 (home-page "https://pypi.python.org/pypi/termcolor")
6817 (synopsis "ANSII Color formatting for terminal output")
6818 (description
6819 "This package provides ANSII Color formatting for output in terminals.")
6820 (license license:expat)))
6821
6822(define-public python2-termcolor
6823 (package-with-python2 python-termcolor))
6824
6825(define-public python-libarchive-c
6826 (package
6827 (name "python-libarchive-c")
6828 (version "2.8")
6829 (source (origin
6830 (method url-fetch)
6831 (uri (pypi-uri "libarchive-c" version))
6832 (sha256
6833 (base32
6834 "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06"))))
6835 (build-system python-build-system)
6836 (arguments
6837 '(#:phases (modify-phases %standard-phases
6838 (add-before
6839 'build 'reference-libarchive
6840 (lambda* (#:key inputs #:allow-other-keys)
6841 ;; Retain the absolute file name of libarchive.so.
6842 (let ((libarchive (assoc-ref inputs "libarchive")))
6843 (substitute* "libarchive/ffi.py"
6844 (("find_library\\('archive'\\)")
6845 (string-append "'" libarchive
6846 "/lib/libarchive.so'"))))))
6847 (replace 'check
6848 (lambda _ (invoke "pytest" "-vv"))))))
6849 (native-inputs
6850 `(("python-mock" ,python-mock)
6851 ("python-pytest" ,python-pytest)))
6852 (inputs
6853 `(("libarchive" ,libarchive)))
6854 (home-page "https://github.com/Changaco/python-libarchive-c")
6855 (synopsis "Python interface to libarchive")
6856 (description
6857 "This package provides Python bindings to libarchive, a C library to
6858access possibly compressed archives in many different formats. It uses
6859Python's @code{ctypes} foreign function interface (FFI).")
6860 (license license:lgpl2.0+)))
6861
6862(define-public python2-libarchive-c
6863 (package-with-python2 python-libarchive-c))
6864
6865(define-public python-file
6866 (package
6867 (inherit file)
6868 (name "python-file")
6869 (build-system python-build-system)
6870 (arguments
6871 '(#:tests? #f ;no tests
6872 #:configure-flags '("--single-version-externally-managed" "--root=/")
6873 #:phases (modify-phases %standard-phases
6874 (add-before 'build 'change-directory
6875 (lambda _
6876 (chdir "python")
6877 #t))
6878 (add-before 'build 'set-library-file-name
6879 (lambda* (#:key inputs #:allow-other-keys)
6880 (let ((file (assoc-ref inputs "file")))
6881 (substitute* "magic.py"
6882 (("find_library\\('magic'\\)")
6883 (string-append "'" file "/lib/libmagic.so'")))
6884 #t))))))
6885 (inputs `(("file" ,file)))
528ea990
LC
6886 (native-inputs (if (%current-target-system)
6887 `(("self" ,this-package))
6888 '()))
44d10b1f
RW
6889 (synopsis "Python bindings to the libmagic file type guesser. Note that
6890this module and the python-magic module both provide a \"magic.py\" file;
6891these two modules, which are different and were developed separately, both
6892serve the same purpose: provide Python bindings for libmagic.")))
6893
6894(define-public python2-file
6895 (package-with-python2 python-file))
6896
6897(define-public python-debian
6898 (package
6899 (name "python-debian")
6900 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
6901 (version "0.1.28")
6902 (source
6903 (origin
6904 (method url-fetch)
6905 (uri (pypi-uri name version))
6906 (sha256
6907 (base32
6908 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
6909 (build-system python-build-system)
6910 (propagated-inputs
6911 `(("python-six" ,python-six)))
6912 (synopsis "Debian package related modules")
6913 (description
6914 ;; XXX: Use @enumerate instead of @itemize to work around
6915 ;; <http://bugs.gnu.org/21772>.
6916 "This package provides Python modules that abstract many formats of
6917Debian-related files, such as:
6918
6919@enumerate
6920@item Debtags information;
6921@item @file{debian/changelog} files;
6922@item packages files, pdiffs;
6923@item control files of single or multiple RFC822-style paragraphs---e.g.
6924 @file{debian/control}, @file{.changes}, @file{.dsc};
6925@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
6926 contained files and meta-information.
6927@end enumerate\n")
6928
6929 ;; Modules are either GPLv2+ or GPLv3+.
6930 (license license:gpl3+)))
6931
6932(define-public python2-debian
6933 (package-with-python2 python-debian))
6934
6935(define-public python-nbformat
6936 (package
6937 (name "python-nbformat")
6938 (version "4.4.0")
6939 (source
6940 (origin
6941 (method url-fetch)
6942 (uri (pypi-uri "nbformat" version))
6943 (sha256
6944 (base32
6945 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
6946 (build-system python-build-system)
6947 (arguments `(#:tests? #f)) ; no test target
6948 (propagated-inputs
6949 `(("python-ipython-genutils" ,python-ipython-genutils)
6950 ("python-jsonschema" ,python-jsonschema)
6951 ("python-jupyter-core" ,python-jupyter-core)
6952 ("python-traitlets" ,python-traitlets)))
6953 (home-page "http://jupyter.org")
6954 (synopsis "Jupyter Notebook format")
6955 (description "This package provides the reference implementation of the
6956Jupyter Notebook format and Python APIs for working with notebooks.")
6957 (license license:bsd-3)))
6958
6959(define-public python2-nbformat
6960 (package-with-python2 python-nbformat))
6961
6962(define-public python-bleach
6963 (package
6964 (name "python-bleach")
6965 (version "1.4.3")
6966 (source
6967 (origin
6968 (method url-fetch)
6969 (uri (pypi-uri "bleach" version))
6970 (sha256
6971 (base32
6972 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
6973 (build-system python-build-system)
6974 (propagated-inputs
6975 `(("python-html5lib" ,python-html5lib-0.9)
6976 ("python-six" ,python-six)))
6977 (native-inputs
6978 `(("python-nose" ,python-nose)))
6979 (home-page "https://github.com/jsocol/bleach")
6980 (synopsis "Whitelist-based HTML-sanitizing tool")
6981 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
6982 (license license:asl2.0)))
6983
6984(define-public python2-bleach
6985 (package-with-python2 python-bleach))
6986
6987(define-public python-entrypoints
6988 (package
6989 (name "python-entrypoints")
a7f1b718 6990 (version "0.3")
44d10b1f
RW
6991 (source
6992 (origin
6993 (method url-fetch)
a7f1b718 6994 (uri (pypi-uri "entrypoints" version))
44d10b1f
RW
6995 (sha256
6996 (base32
a7f1b718 6997 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
44d10b1f
RW
6998 (build-system python-build-system)
6999 ;; The package does not come with a setup.py file, so we have to generate
7000 ;; one ourselves.
7001 (arguments
7002 `(#:tests? #f
7003 #:phases
7004 (modify-phases %standard-phases
7005 (add-after 'unpack 'create-setup.py
7006 (lambda _
7007 (call-with-output-file "setup.py"
7008 (lambda (port)
7009 (format port "\
7010from setuptools import setup
7011setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7012" ,version))))))))
7013 (home-page "https://github.com/takluyver/entrypoints")
7014 (synopsis "Discover and load entry points from installed Python packages")
7015 (description "Entry points are a way for Python packages to advertise
7016objects with some common interface. The most common examples are
7017@code{console_scripts} entry points, which define shell commands by
7018identifying a Python function to run. The @code{entrypoints} module contains
7019functions to find and load entry points.")
7020 (license license:expat)))
7021
7022(define-public python2-entrypoints
7023 (package-with-python2 python-entrypoints))
7024
7025(define-public python-nbconvert
7026 (package
7027 (name "python-nbconvert")
7028 (version "5.0.0b1")
7029 (source
7030 (origin
7031 (method url-fetch)
7032 (uri (pypi-uri "nbconvert" version))
7033 (sha256
7034 (base32
7035 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7036 (build-system python-build-system)
7037 (arguments
7038 `(;; The "bdist_egg" target is disabled by default, causing the installation
7039 ;; to fail.
7040 #:configure-flags (list "bdist_egg")
7041 ;; FIXME: 5 failures, 40 errors.
7042 #:tests? #f))
7043 ;; #:phases
7044 ;; (modify-phases %standard-phases
7045 ;; (replace 'check
7046 ;; (lambda _
7047 ;; (zero? (system* "py.test" "-v")))))
7048 (native-inputs
7049 `(("python-pytest" ,python-pytest)))
7050 (propagated-inputs
7051 `(("python-bleach" ,python-bleach)
7052 ("python-entrypoints" ,python-entrypoints)
7053 ("python-jinja2" ,python-jinja2)
7054 ("python-jupyter-core" ,python-jupyter-core)
7055 ("python-mistune" ,python-mistune)
7056 ("python-nbformat" ,python-nbformat)
7057 ("python-pygments" ,python-pygments)
7058 ("python-traitlets" ,python-traitlets)))
7059 (home-page "http://jupyter.org")
7060 (synopsis "Converting Jupyter Notebooks")
7061 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7062notebooks to various other formats via Jinja templates. It allows you to
7063convert an @code{.ipynb} notebook file into various static formats including:
7064
7065@enumerate
7066@item HTML
7067@item LaTeX
7068@item PDF
7069@item Reveal JS
7070@item Markdown (md)
7071@item ReStructured Text (rst)
7072@item executable script
7073@end enumerate\n")
7074 (license license:bsd-3)))
7075
7076(define-public python2-nbconvert
7077 (package-with-python2 python-nbconvert))
7078
44d10b1f
RW
7079(define-public python-notebook
7080 (package
7081 (name "python-notebook")
7082 (version "5.7.4")
7083 (source (origin
7084 (method url-fetch)
7085 (uri (pypi-uri "notebook" version))
7086 (sha256
7087 (base32
7088 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
7089 (build-system python-build-system)
7090 (arguments
7091 `(#:phases
7092 (modify-phases %standard-phases
7093 (replace 'check
7094 (lambda _
7095 ;; These tests require a browser
7096 (delete-file-recursively "notebook/tests/selenium")
7097 ;; Some tests need HOME
7098 (setenv "HOME" "/tmp")
7099 ;; This file contains "warningfilters", which are not supported
7100 ;; by this version of nose.
7101 (delete-file "setup.cfg")
7102 (with-directory-excursion "/tmp"
7103 (invoke "nosetests" "-v"))
7104 #t)))))
7105 (propagated-inputs
7106 `(("python-jupyter-core" ,python-jupyter-core)
7107 ("python-nbformat" ,python-nbformat)
7108 ("python-nbconvert" ,python-nbconvert)
7109 ("python-prometheus-client" ,python-prometheus-client)
7110 ("python-send2trash" ,python-send2trash)
7111 ("python-terminado" ,python-terminado)))
7112 (native-inputs
7113 `(("python-nose" ,python-nose)
7114 ("python-sphinx" ,python-sphinx)
7115 ("python-requests" ,python-requests)))
7116 (home-page "http://jupyter.org/")
7117 (synopsis "Web-based notebook environment for interactive computing")
7118 (description
7119 "The Jupyter HTML notebook is a web-based notebook environment for
7120interactive computing.")
7121 (properties `((python2-variant . ,(delay python2-notebook))))
7122 (license license:bsd-3)))
7123
7124(define-public python2-notebook
7125 (let ((base (package-with-python2
7126 (strip-python2-variant python-notebook))))
7127 (package (inherit base)
7128 (native-inputs
7129 `(("python2-mock" ,python2-mock)
7130 ,@(package-native-inputs base)))
7131 (arguments
7132 (substitute-keyword-arguments (package-arguments base)
7133 ((#:phases phases)
7134 `(modify-phases ,phases
7135 (add-before 'check 'disable-test-case
7136 ;; The test requires network access to localhost. Curiously it
7137 ;; fails with Python 2 only. Simply make the test-case return
7138 ;; immediately.
7139 (lambda _
7140 (substitute*
7141 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7142 (("formats = self.nbconvert_api") "return #")))))))))))
7143
7144(define-public python-widgetsnbextension
7145 (package
7146 (name "python-widgetsnbextension")
7147 (version "3.4.2")
7148 (source
7149 (origin
7150 (method url-fetch)
7151 (uri (pypi-uri "widgetsnbextension" version))
7152 (sha256
7153 (base32
7154 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
7155 (build-system python-build-system)
7156 (propagated-inputs
7157 `(("python-ipykernel" ,python-ipykernel)
7158 ("python-notebook" ,python-notebook)))
7159 (native-inputs
7160 `(("python-certifi" ,python-certifi)
7161 ("python-nose" ,python-nose)))
7162 (home-page "https://ipython.org")
7163 (synopsis "IPython HTML widgets for Jupyter")
7164 (description "This package provides interactive HTML widgets for Jupyter
7165notebooks.")
7166 (license license:bsd-3)))
7167
7168(define-public python2-widgetsnbextension
7169 (package-with-python2 python-widgetsnbextension))
7170
7171(define-public python-ipywidgets
7172 (package
7173 (name "python-ipywidgets")
7174 (version "5.2.2")
7175 (source
7176 (origin
7177 (method url-fetch)
7178 (uri (pypi-uri "ipywidgets" version))
7179 (sha256
7180 (base32
7181 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7182 (build-system python-build-system)
7183 (propagated-inputs
7184 `(("python-ipython" ,python-ipython)
7185 ("python-traitlets" ,python-traitlets)
7186 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7187 (native-inputs
7188 `(("python-nose" ,python-nose)
7189 ("python-pytest" ,python-pytest)))
7190 (home-page "https://ipython.org")
7191 (synopsis "IPython HTML widgets for Jupyter")
7192 (description "Ipywidgets are interactive HTML widgets for Jupyter
7193notebooks and the IPython kernel. Notebooks come alive when interactive
7194widgets are used. Users gain control of their data and can visualize changes
7195in the data.")
7196 (license license:bsd-3)))
7197
7198(define-public python2-ipywidgets
7199 (package-with-python2 python-ipywidgets))
7200
7201(define-public python-jupyter-console
7202 (package
7203 (name "python-jupyter-console")
7204 (version "5.2.0")
7205 (source
7206 (origin
7207 (method url-fetch)
7208 (uri (pypi-uri "jupyter_console" version))
7209 (sha256
7210 (base32
7211 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
7212 (build-system python-build-system)
7213 ;; Tests only run in an TTY.
7214 (arguments `(#:tests? #f))
7215 (propagated-inputs
7216 `(("python-ipykernel" ,python-ipykernel)
7217 ("python-jupyter-client" ,python-jupyter-client)
7218 ("python-prompt-toolkit" ,python-prompt-toolkit-1)
7219 ("python-pygments" ,python-pygments)))
7220 (native-inputs
7221 `(("python-nose" ,python-nose)))
7222 (home-page "https://jupyter.org")
7223 (synopsis "Jupyter terminal console")
7224 (description "This package provides a terminal-based console frontend for
7225Jupyter kernels. It also allows for console-based interaction with non-Python
7226Jupyter kernels such as IJulia and IRKernel.")
7227 (license license:bsd-3)))
7228
7229(define-public python2-jupyter-console
7230 (package-with-python2 python-jupyter-console))
7231
7232;; The python-ipython and python-jupyter-console require each other. To get
7233;; the functionality in both packages working, strip down the
7234;; python-jupyter-console package when using it as an input to python-ipython.
7235(define python-jupyter-console-minimal
7236 (package
7237 (inherit python-jupyter-console)
7238 (name "python-jupyter-console-minimal")
7239 (arguments
7240 (substitute-keyword-arguments
7241 (package-arguments python-jupyter-console)
7242 ((#:phases phases)
7243 `(modify-phases ,phases
7244 (add-after 'install 'delete-bin
7245 (lambda* (#:key outputs #:allow-other-keys)
7246 ;; Delete the bin files, to avoid conflicts in profiles
7247 ;; where python-ipython and python-jupyter-console are
7248 ;; both present.
7249 (delete-file-recursively
7250 (string-append
7251 (assoc-ref outputs "out") "/bin"))))))))
7252 ;; Remove the python-ipython propagated input, to avoid the cycle
7253 (propagated-inputs
7254 (alist-delete
7255 "python-ipython"
7256 (package-propagated-inputs python-jupyter-console)))))
7257
7258(define-public python-qtconsole
7259 (package
7260 (name "python-qtconsole")
7261 (version "4.4.3")
7262 (source
7263 (origin
7264 (method url-fetch)
7265 (uri (pypi-uri "qtconsole" version))
7266 (sha256
7267 (base32
7268 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
7269 (build-system python-build-system)
7270 (arguments
7271 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
7272 ;; but we only have the LTS version 5.x. This means that there might be
7273 ;; runtime errors, but since this is a dependency of the Jupyter package,
7274 ;; and Jupyter can be used without the qtconsole we can overlook this for
7275 ;; now.
7276 `(#:tests? #f
7277 #:phases
7278 (modify-phases %standard-phases
7279 (add-before 'check 'pre-check
7280 (lambda _
7281 (setenv "QT_QPA_PLATFORM" "offscreen")
7282 #t)))))
7283 (propagated-inputs
7284 `(("python-ipykernel" ,python-ipykernel)
7285 ("python-ipython" ,python-ipython)))
7286 (native-inputs
7287 `(("python-pytest" ,python-pytest)))
7288 (home-page "http://jupyter.org")
7289 (synopsis "Jupyter Qt console")
7290 (description "This package provides a Qt-based console for Jupyter with
7291support for rich media output.")
7292 (license license:bsd-3)))
7293
7294(define-public jupyter
7295 (package
7296 (name "jupyter")
7297 (version "1.0.0")
7298 (source
7299 (origin
7300 (method url-fetch)
7301 (uri (pypi-uri "jupyter" version))
7302 (sha256
7303 (base32
7304 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
7305 (build-system python-build-system)
7306 (arguments '(#:tests? #f)) ; there are none.
7307 (propagated-inputs
7308 `(("python-ipykernel" ,python-ipykernel)
7309 ("python-ipywidgets" ,python-ipywidgets)
7310 ("python-jupyter-console" ,python-jupyter-console)
7311 ("python-nbconvert" ,python-nbconvert)
7312 ("python-notebook" ,python-notebook)
7313 ("python-qtconsole" ,python-qtconsole)))
7314 (native-search-paths
7315 (list (search-path-specification
7316 (variable "JUPYTER_PATH")
7317 (files '("share/jupyter")))))
7318 (home-page "https://jupyter.org")
7319 (synopsis "Web application for interactive documents")
7320 (description
7321 "The Jupyter Notebook is a web application that allows you to create and
7322share documents that contain live code, equations, visualizations and
7323explanatory text. Uses include: data cleaning and transformation, numerical
7324simulation, statistical modeling, machine learning and much more.")
7325 (license license:bsd-3)))
7326
7327(define-public python-chardet
7328 (package
7329 (name "python-chardet")
7330 (version "3.0.4")
7331 (source
7332 (origin
7333 (method url-fetch)
7334 (uri (pypi-uri "chardet" version))
7335 (sha256
7336 (base32
7337 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
7338 (native-inputs
7339 `(("python-hypothesis" ,python-hypothesis)
7340 ("python-pytest" ,python-pytest)
7341 ("python-pytest-runner" ,python-pytest-runner)))
7342 (build-system python-build-system)
7343 (home-page "https://github.com/chardet/chardet")
7344 (synopsis "Universal encoding detector for Python 2 and 3")
7345 (description
7346 "This package provides @code{chardet}, a Python module that can
7347automatically detect a wide range of file encodings.")
7348 (license license:lgpl2.1+)))
7349
7350(define-public python2-chardet
7351 (package-with-python2 python-chardet))
7352
7353(define-public python-docopt
7354 (package
7355 (name "python-docopt")
7356 (version "0.6.2")
7357 (source
7358 (origin
7359 (method url-fetch)
7360 ;; The release on PyPI does not include tests.
7361 (uri (string-append
7362 "https://github.com/docopt/docopt/archive/"
7363 version ".tar.gz"))
7364 (file-name (string-append name "-" version ".tar.gz"))
7365 (sha256
7366 (base32
7367 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
7368 (build-system python-build-system)
7369 (native-inputs
7370 `(("python-pytest" ,python-pytest)))
7371 (arguments
7372 `(#:phases
7373 (modify-phases %standard-phases
7374 (replace 'check
7375 (lambda _ (invoke "py.test"))))))
7376 (home-page "http://docopt.org")
7377 (synopsis "Command-line interface description language for Python")
7378 (description "This library allows the user to define a command-line
7379interface from a program's help message rather than specifying it
7380programatically with command-line parsers like @code{getopt} and
7381@code{argparse}.")
7382 (license license:expat)))
7383
7384(define-public python2-docopt
7385 (package-with-python2 python-docopt))
7386
7387(define-public python-pythondialog
7388 (package
7389 (name "python-pythondialog")
7390 (version "3.4.0")
7391 (source
7392 (origin
7393 (method url-fetch)
7394 (uri (pypi-uri "pythondialog" version))
7395 (sha256
7396 (base32
7397 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
7398 (build-system python-build-system)
7399 (arguments
7400 `(#:phases
7401 (modify-phases %standard-phases
7402 (add-after 'unpack 'patch-path
7403 (lambda* (#:key inputs #:allow-other-keys)
7404 (let* ((dialog (assoc-ref inputs "dialog")))
7405 ;; Since this library really wants to grovel the search path, we
7406 ;; must hardcode dialog's store path into it.
7407 (substitute* "dialog.py"
7408 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
7409 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
7410 #t))))
7411 #:tests? #f)) ; no test suite
7412 (propagated-inputs
7413 `(("dialog" ,dialog)))
7414 (home-page "http://pythondialog.sourceforge.net/")
7415 (synopsis "Python interface to the UNIX dialog utility")
7416 (description "A Python wrapper for the dialog utility. Its purpose is to
7417provide an easy to use, pythonic and comprehensive Python interface to dialog.
7418This allows one to make simple text-mode user interfaces on Unix-like systems")
7419 (license license:lgpl2.1)
7420 (properties `((python2-variant . ,(delay python2-pythondialog))))))
7421
7422(define-public python2-pythondialog
7423 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
7424 (package
7425 (inherit base)
7426 (version (package-version python-pythondialog))
7427 (source (origin
7428 (method url-fetch)
7429 (uri (pypi-uri "python2-pythondialog" version))
7430 (sha256
7431 (base32
7432 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
7433
7434(define-public python-configobj
7435 (package
7436 (name "python-configobj")
7437 (version "5.0.6")
7438 (source (origin
7439 (method url-fetch)
b0758fbb 7440 (uri (pypi-uri "configobj" version))
44d10b1f
RW
7441 (sha256
7442 (base32
7443 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
7444 ;; Patch setup.py so it looks for python-setuptools, which is
7445 ;; required to parse the keyword 'install_requires' in setup.py.
7446 (patches (search-patches "python-configobj-setuptools.patch"))))
7447 (build-system python-build-system)
7448 (propagated-inputs
7449 `(("python-six" ,python-six)))
7450 (synopsis "Config file reading, writing and validation")
7451 (description "ConfigObj is a simple but powerful config file reader and
7452writer: an ini file round tripper. Its main feature is that it is very easy to
7453use, with a straightforward programmer’s interface and a simple syntax for
7454config files.")
7455 (home-page "https://github.com/DiffSK/configobj")
7456 (license license:bsd-3)))
7457
7458(define-public python2-configobj
7459 (package-with-python2 python-configobj))
7460
7461(define-public python-configargparse
7462 (package
7463 (name "python-configargparse")
86ae491f 7464 (version "0.14.0")
44d10b1f
RW
7465 (source (origin
7466 (method url-fetch)
7467 (uri (pypi-uri "ConfigArgParse" version))
7468 (sha256
7469 (base32
86ae491f 7470 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
44d10b1f
RW
7471 (build-system python-build-system)
7472 (native-inputs
7473 `(("python-pyyaml" ,python-pyyaml)))
7474 (arguments
7475 `(#:phases
7476 (modify-phases %standard-phases
7477 (replace 'check
7478 (lambda _
7479 ;; Bypass setuptools-shim because one test relies on "setup.py"
7480 ;; being the first argument passed to the python call.
7481 ;;
7482 ;; NOTE: Many tests do not run because they rely on Python's
7483 ;; built-in test.test_argparse, but we remove the unit tests from
7484 ;; our Python installation.
7485 (invoke "python" "setup.py" "test"))))))
7486 (synopsis "Replacement for argparse")
7487 (description "A drop-in replacement for argparse that allows options to also
7488be set via config files and/or environment variables.")
7489 (home-page "https://github.com/bw2/ConfigArgParse")
7490 (license license:expat)))
7491
7492(define-public python2-configargparse
7493 (package-with-python2 python-configargparse))
7494
7495(define-public python-argparse-manpage
7496 (package
7497 (name "python-argparse-manpage")
7498 (version "1.1")
7499 (source
7500 (origin
7501 (method url-fetch)
7502 (uri (pypi-uri "argparse-manpage" version))
7503 (sha256
7504 (base32
7505 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
7506 (build-system python-build-system)
7507 (home-page "https://github.com/praiskup/argparse-manpage")
7508 (synopsis "Build manual page from Python's ArgumentParser object")
7509 (description
7510 "This package provides tools to build manual pages from Python's
7511@code{ArgumentParser} object.")
7512 (license license:asl2.0)))
7513
7514(define-public python2-contextlib2
7515 (package
7516 (name "python2-contextlib2")
7517 (version "0.5.5")
7518 (source
7519 (origin
7520 (method url-fetch)
7521 (uri (pypi-uri "contextlib2" version))
7522 (sha256
7523 (base32
7524 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
7525 (build-system python-build-system)
7526 (arguments
7527 `(#:python ,python-2
7528 #:phases
7529 (modify-phases %standard-phases
7530 (replace 'check
7531 (lambda _ (invoke "python" "test_contextlib2.py" "-v"))))))
7532 (native-inputs
7533 `(("python2-unittest2" ,python2-unittest2)))
7534 (home-page "http://contextlib2.readthedocs.org/")
7535 (synopsis "Tools for decorators and context managers")
7536 (description "This module is primarily a backport of the Python
75373.2 contextlib to earlier Python versions. Like contextlib, it
7538provides utilities for common tasks involving decorators and context
7539managers. It also contains additional features that are not part of
7540the standard library.")
7541 (license license:psfl)))
7542
7543(define-public python-texttable
7544 (package
7545 (name "python-texttable")
7546 (version "0.8.7")
7547 (source
7548 (origin
7549 (method url-fetch)
7550 (uri (pypi-uri "texttable" version))
7551 (sha256
7552 (base32
7553 "1liiiydgkg37i46a418aw19fyf6z3ds51wdwwpyjbs12x0phhf4a"))))
7554 (build-system python-build-system)
7555 (arguments '(#:tests? #f)) ; no tests
7556 (home-page "https://github.com/foutaise/texttable/")
7557 (synopsis "Python module for creating simple ASCII tables")
7558 (description "Texttable is a Python module for creating simple ASCII
7559tables.")
7560 (license license:lgpl2.1+)))
7561
7562(define-public python2-texttable
7563 (package-with-python2 python-texttable))
7564
7565(define-public python-atomicwrites
7566 (package
7567 (name "python-atomicwrites")
7568 (version "1.1.5")
7569 (source (origin
7570 (method url-fetch)
7571 (uri (pypi-uri "atomicwrites" version))
7572 (sha256
7573 (base32
7574 "11bm90fwm2avvf4f3ib8g925w7jr4m11vcsinn1bi6ns4bm32214"))))
7575 (build-system python-build-system)
7576 (synopsis "Atomic file writes in Python")
7577 (description "Library for atomic file writes using platform dependent tools
7578for atomic file system operations.")
7579 (home-page "https://github.com/untitaker/python-atomicwrites")
7580 (license license:expat)))
7581
7582(define-public python2-atomicwrites
7583 (package-with-python2 python-atomicwrites))
7584
7585(define-public python-click-threading
7586 (package
7587 (name "python-click-threading")
7588 (version "0.4.4")
7589 (source (origin
7590 (method url-fetch)
7591 (uri (pypi-uri "click-threading" version))
7592 (sha256
7593 (base32
7594 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
7595 (build-system python-build-system)
7596 (propagated-inputs
7597 `(("python-click" ,python-click)))
7598 (synopsis "Utilities for multithreading in Click")
7599 (description "This package provides utilities for multithreading in Click
7600applications.")
7601 (home-page "https://github.com/click-contrib/click-threading")
7602 (license license:expat)))
7603
7604(define-public python-click-log
7605 (package
7606 (name "python-click-log")
7607 (version "0.3.2")
7608 (source (origin
7609 (method url-fetch)
7610 (uri (pypi-uri "click-log" version))
7611 (sha256
7612 (base32
7613 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
7614 (build-system python-build-system)
7615 (propagated-inputs
7616 `(("python-click" ,python-click)))
7617 (synopsis "Logging for click applications")
7618 (description "This package provides a Python library for logging Click
7619applications.")
7620 (home-page "https://github.com/click-contrib/click-log")
7621 (license license:expat)))
7622
7623(define-public python-apipkg
7624 (package
7625 (name "python-apipkg")
7626 (version "1.4")
7627 (source (origin
7628 (method url-fetch)
7629 (uri (pypi-uri "apipkg" version))
7630 (sha256
7631 (base32
7632 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
7633 (build-system python-build-system)
7634 (native-inputs
7635 `(("python-pytest" ,python-pytest)))
7636 (synopsis "Namespace control and lazy-import mechanism")
7637 (description "With apipkg you can control the exported namespace of a Python
7638package and greatly reduce the number of imports for your users. It is a small
7639pure Python module that works on virtually all Python versions.")
7640 (home-page "https://github.com/pytest-dev/apipkg")
7641 (license license:expat)))
7642
7643(define-public python2-apipkg
7644 (package-with-python2 python-apipkg))
7645
7646(define-public python-execnet
7647 (package
7648 (name "python-execnet")
7649 (version "1.4.1")
7650 (source (origin
7651 (method url-fetch)
7652 (uri (pypi-uri "execnet" version))
7653 (sha256
7654 (base32
7655 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
7656 (build-system python-build-system)
7657 (arguments
7658 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
7659 ;; The two test failures are caused by the lack of an `ssh` executable.
7660 ;; The test suite can be run with pytest after the 'install' phase.
7661 #:tests? #f))
7662 (native-inputs
7663 `(("python-pytest" ,python-pytest)
7664 ("python-setuptools-scm" ,python-setuptools-scm)))
7665 (propagated-inputs
7666 `(("python-apipkg" ,python-apipkg)))
7667 (synopsis "Rapid multi-Python deployment")
7668 (description "Execnet provides a share-nothing model with
7669channel-send/receive communication for distributing execution across many
7670Python interpreters across version, platform and network barriers. It has a
7671minimal and fast API targeting the following uses:
7672@enumerate
7673@item distribute tasks to (many) local or remote CPUs
7674@item write and deploy hybrid multi-process applications
7675@item write scripts to administer multiple environments
7676@end enumerate")
7677 (home-page "http://codespeak.net/execnet/")
7678 (license license:expat)))
7679
7680(define-public python2-execnet
7681 (package-with-python2 python-execnet))
7682
7683(define-public python-icalendar
7684 (package
7685 (name "python-icalendar")
7686 (version "4.0.3")
7687 (source (origin
7688 (method url-fetch)
7689 (uri (pypi-uri "icalendar" version))
7690 (sha256
7691 (base32
7692 "0mk3dk1dxkcm46jy48v27j2w2349iv4sbimqj1yb5js43mx49hh7"))))
7693 (build-system python-build-system)
7694 (propagated-inputs
7695 `(("python-dateutil" ,python-dateutil)
7696 ("python-pytz" ,python-pytz)))
7697 (synopsis "Python library for parsing iCalendar files")
7698 (description "The icalendar package is a parser/generator of iCalendar
7699files for use with Python.")
7700 (home-page "https://github.com/collective/icalendar")
7701 (license license:bsd-2)))
7702
7703(define-public python-sphinxcontrib-newsfeed
7704 (package
7705 (name "python-sphinxcontrib-newsfeed")
7706 (version "0.1.4")
7707 (source (origin
7708 (method url-fetch)
7709 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
7710 (sha256
7711 (base32
7712 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
7713 (arguments '(#:tests? #f)) ; No tests.
7714 (build-system python-build-system)
7715 (propagated-inputs
7716 `(("python-sphinx" ,python-sphinx)))
7717 (synopsis "News Feed extension for Sphinx")
7718 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
7719Blog, News or Announcements section to a Sphinx website.")
7720 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
7721 (license license:bsd-2)))
7722
7723(define-public python-args
7724 (package
7725 (name "python-args")
7726 (version "0.1.0")
7727 (source (origin
7728 (method url-fetch)
7729 (uri (pypi-uri "args" version))
7730 (sha256
7731 (base32
7732 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
7733 (build-system python-build-system)
7734 (home-page "https://github.com/kennethreitz/args")
7735 (synopsis "Command-line argument parser")
7736 (description
7737 "This library provides a Python module to parse command-line arguments.")
7738 (license license:bsd-3)))
7739
7740(define-public python2-args
7741 (package-with-python2 python-args))
7742
7743(define-public python-clint
7744 (package
7745 (name "python-clint")
7746 (version "0.5.1")
7747 (source (origin
7748 (method url-fetch)
7749 (uri (pypi-uri "clint" version))
7750 (sha256
7751 (base32
7752 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
7753 (build-system python-build-system)
7754 (arguments
7755 '(#:phases
7756 (modify-phases %standard-phases
7757 (replace 'check
7758 (lambda _ (invoke "py.test" "-v"))))))
7759 (native-inputs
7760 `(("python-pytest" ,python-pytest)))
7761 (propagated-inputs
7762 `(("python-args" ,python-args)))
7763 (home-page "https://github.com/kennethreitz/clint")
7764 (synopsis "Command-line interface tools")
7765 (description
7766 "Clint is a Python module filled with a set of tools for developing
7767command-line applications, including tools for colored and indented
7768output, progress bar display, and pipes.")
7769 (license license:isc)))
7770
7771(define-public python2-clint
7772 (package-with-python2 python-clint))
7773
44d10b1f
RW
7774(define-public python-rply
7775 (package
7776 (name "python-rply")
7777 (version "0.7.5")
7778 (source (origin
7779 (method url-fetch)
7780 (uri (pypi-uri "rply" version))
7781 (sha256
7782 (base32
7783 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
7784 (build-system python-build-system)
7785 (propagated-inputs
7786 `(("python-appdirs" ,python-appdirs)))
7787 (home-page "https://github.com/alex/rply")
7788 (synopsis "Parser generator for Python")
7789 (description
7790 "This package provides a pure Python based parser generator, that also
7791works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
7792with a new public API, and RPython support.")
7793 (license license:bsd-3)))
7794
7795(define-public python2-rply
7796 (package-with-python2 python-rply))
7797
7798(define-public python-hy
7799 (package
7800 (name "python-hy")
7801 (version "0.13.0")
7802 (source (origin
7803 (method url-fetch)
7804 (uri (pypi-uri "hy" version))
7805 (sha256
7806 (base32
7807 "19sfymaksx9jhksfnb15ahid46mzrhdfzz6yy2craz2qnzvpmky8"))))
7808 (build-system python-build-system)
7809 (arguments
7810 '(#:phases
7811 (modify-phases %standard-phases
7812 (replace 'check
7813 (lambda _
7814 ;; Tests require write access to HOME.
7815 (setenv "HOME" "/tmp")
7816 (invoke "nosetests"))))))
7817 (native-inputs
7818 `(("python-coverage" ,python-coverage)
7819 ("python-nose" ,python-nose)))
7820 (propagated-inputs
7821 `(("python-astor" ,python-astor)
7822 ("python-clint" ,python-clint)
7823 ("python-rply" ,python-rply)))
7824 (home-page "http://hylang.org/")
7825 (synopsis "Lisp frontend to Python")
7826 (description
7827 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
7828its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
7829Python at your fingertips, in Lisp form.")
7830 (license license:expat)))
7831
7832(define-public python2-hy
7833 (package-with-python2 python-hy))
7834
7835(define-public python2-functools32
7836 (package
7837 (name "python2-functools32")
7838 (version "3.2.3-2")
7839 (source
7840 (origin
7841 (method url-fetch)
7842 (uri (pypi-uri "functools32" version))
7843 (sha256
7844 (base32
7845 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
7846 (build-system python-build-system)
7847 (arguments
7848 `(#:python ,python-2
7849 #:tests? #f)) ; no test target
7850 (home-page "https://github.com/MiCHiLU/python-functools32")
7851 (synopsis
7852 "Backport of the functools module from Python 3.2.3")
7853 (description
7854 "This package is a backport of the @code{functools} module from Python
78553.2.3 for use with older versions of Python and PyPy.")
7856 (license license:expat)))
7857
7858(define-public python2-subprocess32
7859 (package
7860 (name "python2-subprocess32")
7861 (version "3.2.7")
7862 (source (origin
7863 (method url-fetch)
7864 (uri (pypi-uri "subprocess32" version))
7865 (sha256
7866 (base32
7867 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
7868 (patches
7869 (search-patches "python2-subprocess32-disable-input-test.patch"))))
7870 (build-system python-build-system)
7871 (arguments
7872 `(#:python ,python-2
7873 ;; The test suite fails with Python > 2.7.13:
7874 ;; import test.support
7875 ;; ImportError: No module named support
7876 #:tests? #f
7877 #:phases
7878 (modify-phases %standard-phases
7879 (add-after 'unpack 'patch-/bin/sh
7880 (lambda _
7881 (substitute* '("subprocess32.py"
7882 "test_subprocess32.py")
7883 (("/bin/sh") (which "sh")))
7884 #t)))))
7885 (home-page "https://github.com/google/python-subprocess32")
7886 (synopsis "Backport of the subprocess module from Python 3.2")
7887 (description
7888 "This is a backport of the @code{subprocess} standard library module
7889from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
7890new features. On POSIX systems it is guaranteed to be reliable when used
7891in threaded applications. It includes timeout support from Python 3.3 but
7892otherwise matches 3.2’s API.")
7893 (license license:psfl)))
7894
7895(define-public python2-futures
7896 (package
7897 (name "python2-futures")
7898 (version "3.2.0")
7899 (source
7900 (origin
7901 (method url-fetch)
7902 (uri (pypi-uri "futures" version))
7903 (sha256
7904 (base32
7905 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
7906 (build-system python-build-system)
7907 (arguments `(#:python ,python-2
7908 ;; FIXME: Python 2.7.14 moved the test.support library,
7909 ;; but our package has not yet been adjusted. Enable
7910 ;; tests when the python2 package has been fixed.
7911 #:tests? #f))
7912 (home-page "https://github.com/agronholm/pythonfutures")
7913 (synopsis
7914 "Backport of the concurrent.futures package from Python 3.2")
7915 (description
7916 "The concurrent.futures module provides a high-level interface for
7917asynchronously executing callables. This package backports the
7918concurrent.futures package from Python 3.2")
7919 (license license:bsd-3)))
7920
7921(define-public python-promise
7922 (package
7923 (name "python-promise")
7924 (version "0.4.2")
7925 (source
7926 (origin
7927 (method url-fetch)
7928 (uri (pypi-uri "promise" version))
7929 (sha256
7930 (base32
7931 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
7932 (build-system python-build-system)
7933 ;; Tests wants python-futures, which is a python2 only program, and
7934 ;; can't be found by python-promise at test time.
7935 (arguments `(#:tests? #f))
7936 (home-page "https://github.com/syrusakbary/promise")
7937 (synopsis "Promises/A+ implementation for Python")
7938 (description
7939 "Promises/A+ implementation for Python")
7940 (properties `((python2-variant . ,(delay python2-promise))))
7941 (license license:expat)))
7942
7943(define-public python2-promise
7944 (let ((promise (package-with-python2
7945 (strip-python2-variant python-promise))))
7946 (package (inherit promise)
7947 (arguments (substitute-keyword-arguments (package-arguments promise)
7948 ((#:tests? _) #t)))
7949 (native-inputs
7950 `(("python2-futures" ,python2-futures)
7951 ("python2-pytest" ,python2-pytest)
7952 ,@(package-native-inputs promise))))))
7953
7954(define-public python-colorama
7955 (package
7956 (name "python-colorama")
7957 (version "0.3.9")
7958 (source
7959 (origin
7960 (method url-fetch)
7961 (uri (pypi-uri "colorama" version))
7962 (sha256
7963 (base32
7964 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
7965 (build-system python-build-system)
7966 (synopsis "Colored terminal text rendering for Python")
7967 (description "Colorama is a Python library for rendering colored terminal
7968text.")
7969 (home-page "https://pypi.python.org/pypi/colorama")
7970 (license license:bsd-3)))
7971
7972(define-public python2-colorama
7973 (package-with-python2 python-colorama))
7974
7975(define-public python-rsa
7976 (package
7977 (name "python-rsa")
7978 (version "3.4.2")
7979 (source
7980 (origin
7981 (method url-fetch)
7982 (uri (pypi-uri "rsa" version))
7983 (sha256
7984 (base32
7985 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
7986 (build-system python-build-system)
7987 (propagated-inputs
7988 `(("python-pyasn1" ,python-pyasn1)))
7989 (synopsis "Pure-Python RSA implementation")
7990 (description "Python-RSA is a pure-Python RSA implementation. It supports
7991encryption and decryption, signing and verifying signatures, and key
7992generation according to PKCS#1 version 1.5. It can be used as a Python
7993library as well as on the command line.")
7994 (home-page "https://stuvel.eu/rsa")
7995 (license license:asl2.0)))
7996
7997(define-public python2-rsa
7998 (package-with-python2 python-rsa))
7999
8000(define-public python-pluggy
8001 (package
8002 (name "python-pluggy")
8003 (version "0.7.1")
8004 (source
8005 (origin
8006 (method url-fetch)
8007 (uri (pypi-uri "pluggy" version))
8008 (sha256
8009 (base32
8010 "1qbn70mksmr03hac6jgp6fiqc4l7859z8dchx2x950vhlij87swm"))))
8011 (build-system python-build-system)
8012 (native-inputs
8013 `(("python-setuptools-scm" ,python-setuptools-scm)))
8014 (synopsis "Plugin and hook calling mechanism for Python")
8015 (description "Pluggy is an extraction of the plugin manager as used by
8016Pytest but stripped of Pytest specific details.")
8017 (home-page "https://pypi.python.org/pypi/pluggy")
8018 (license license:expat)))
8019
8020(define-public python2-pluggy
8021 (package-with-python2 python-pluggy))
8022
8023(define-public python-tox
8024 (package
8025 (name "python-tox")
8026 (version "2.8.1")
8027 (source
8028 (origin
8029 (method url-fetch)
8030 (uri (pypi-uri "tox" version))
8031 (sha256
8032 (base32
8033 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
8034 (build-system python-build-system)
8035 (arguments
8036 ;; FIXME: Tests require pytest-timeout, which itself requires
8037 ;; pytest>=2.8.0 for installation.
8038 '(#:tests? #f))
8039 (propagated-inputs
8040 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
8041 ("python-py" ,python-py)
8042 ("python-virtualenv" ,python-virtualenv)))
8043 (native-inputs
8044 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
8045 ("python-pytest" ,python-pytest) ; >= 2.3.5
8046 ("python-setuptools-scm" ,python-setuptools-scm)))
8047 (home-page "http://tox.testrun.org/")
8048 (synopsis "Virtualenv-based automation of test activities")
8049 (description "Tox is a generic virtualenv management and test command line
8050tool. It can be used to check that a package installs correctly with
8051different Python versions and interpreters, or run tests in each type of
8052supported environment, or act as a frontend to continuous integration
8053servers.")
8054 (license license:expat)))
8055
8056(define-public python2-tox
8057 (package-with-python2 python-tox))
8058
8059(define-public python-jmespath
8060 (package
8061 (name "python-jmespath")
8062 (version "0.9.3")
8063 (source
8064 (origin
8065 (method url-fetch)
8066 (uri (pypi-uri "jmespath" version))
8067 (sha256
8068 (base32
8069 "0r7wc7fsxmlwzxx9j1j7rms06c6xs6d4sysirdhz1jk2mb4x90ba"))))
8070 (build-system python-build-system)
8071 (native-inputs
8072 `(("python-nose" ,python-nose)))
8073 (synopsis "JSON Matching Expressions")
8074 (description "JMESPath (pronounced “james path”) is a Python library that
8075allows one to declaratively specify how to extract elements from a JSON
8076document.")
8077 (home-page "https://github.com/jmespath/jmespath.py")
8078 (license license:expat)))
8079
8080(define-public python2-jmespath
8081 (package-with-python2 python-jmespath))
8082
8083(define-public python-botocore
8084 (package
8085 (name "python-botocore")
8086 (version "1.8.43")
8087 (source
8088 (origin
8089 (method url-fetch)
8090 (uri (pypi-uri "botocore" version))
8091 (sha256
8092 (base32
8093 "12cqpbnz3vfv41mp9admvciw7bc7hz57sjpqs2bxaw9wnfmbw5lg"))))
8094 (build-system python-build-system)
8095 (arguments
8096 ;; FIXME: Many tests are failing.
8097 '(#:tests? #f))
8098 (propagated-inputs
8099 `(("python-dateutil" ,python-dateutil)
8100 ("python-docutils" ,python-docutils)
8101 ("python-jmespath" ,python-jmespath)))
8102 (native-inputs
8103 `(("python-mock" ,python-mock)
8104 ("python-nose" ,python-nose)
8105 ("behave" ,behave)
8106 ("python-tox" ,python-tox)
8107 ("python-wheel" ,python-wheel)))
8108 (home-page "https://github.com/boto/botocore")
8109 (synopsis "Low-level interface to AWS")
8110 (description "Botocore is a Python library that provides a low-level
8111interface to the Amazon Web Services (AWS) API.")
8112 (license license:asl2.0)))
8113
8114(define-public python2-botocore
8115 (package-with-python2 python-botocore))
8116
8117(define-public python-xdo
8118 (package
8119 (name "python-xdo")
8120 (version "0.3")
8121 (source (origin
8122 (method url-fetch)
8123 (uri (string-append
8124 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8125 "python-xdo_" version ".orig.tar.gz"))
8126 (sha256
8127 (base32
8128 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
8129 (build-system python-build-system)
8130 (arguments
8131 '(#:phases
8132 (modify-phases %standard-phases
8133 (add-before 'install 'patch-libxdo-path
8134 ;; Hardcode the path of dynamically loaded libxdo library.
8135 (lambda* (#:key inputs #:allow-other-keys)
8136 (let ((libxdo (string-append
8137 (assoc-ref inputs "xdotool")
8138 "/lib/libxdo.so")))
8139 (substitute* "xdo/_xdo.py"
8140 (("find_library\\(\"xdo\"\\)")
8141 (simple-format #f "\"~a\"" libxdo)))
8142 #t))))
8143 #:tests? #f)) ; no tests provided
8144 (propagated-inputs
8145 `(("python-six" ,python-six)))
8146 (inputs
8147 `(("xdotool" ,xdotool)
8148 ("libX11" ,libx11)))
8149 (home-page "https://tracker.debian.org/pkg/python-xdo")
8150 (synopsis "Python library for simulating X11 keyboard/mouse input")
8151 (description "Provides bindings to libxdo for manipulating X11 via simulated
8152input. (Note that this is mostly a legacy library; you may wish to look at
8153python-xdo for newer bindings.)")
8154 (license license:bsd-3)))
8155
8156(define-public python2-xdo
8157 (package-with-python2 python-xdo))
8158
8159(define-public python-mako
8160 (package
8161 (name "python-mako")
8162 (version "1.0.7")
8163 (source
8164 (origin
8165 (method url-fetch)
8166 (uri (pypi-uri "Mako" version))
8167 (sha256
8168 (base32
8169 "1bi5gnr8r8dva06qpyx4kgjc6spm2k1y908183nbbaylggjzs0jf"))))
8170 (build-system python-build-system)
8171 (propagated-inputs
8172 `(("python-markupsafe" ,python-markupsafe)))
8173 (native-inputs
8174 `(("python-mock" ,python-mock)
8175 ("python-nose" ,python-nose)
8176 ("python-pytest" ,python-pytest)))
7016e620 8177 (home-page "https://www.makotemplates.org/")
44d10b1f
RW
8178 (synopsis "Templating language for Python")
8179 (description "Mako is a templating language for Python that compiles
8180templates into Python modules.")
8181 (license license:expat)))
8182
8183(define-public python2-mako
8184 (package-with-python2 python-mako))
8185
8186(define-public python-waitress
8187 (package
8188 (name "python-waitress")
8189 (version "1.1.0")
8190 (source
8191 (origin
8192 (method url-fetch)
8193 (uri (pypi-uri "waitress" version))
8194 (patches (search-patches "python-waitress-fix-tests.patch"))
8195 (sha256
8196 (base32
8197 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
8198 (build-system python-build-system)
8199 (home-page "https://github.com/Pylons/waitress")
8200 (synopsis "Waitress WSGI server")
8201 (description "Waitress is meant to be a production-quality pure-Python WSGI
8202server with very acceptable performance.")
8203 (license license:zpl2.1)))
8204
8205(define-public python2-waitress
8206 (package-with-python2 python-waitress))
8207
8208(define-public python-pyquery
8209 (package
8210 (name "python-pyquery")
8211 (version "1.2.17")
8212 (source
8213 (origin
8214 (method url-fetch)
8215 (uri (pypi-uri "pyquery" version))
8216 (sha256
8217 (base32
8218 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
8219 (build-system python-build-system)
8220 (native-inputs
8221 `(("python-webob" ,python-webob)
8222 ("python-webtest" ,python-webtest)))
8223 (propagated-inputs
8224 `(("python-lxml" ,python-lxml)
8225 ("python-cssselect" ,python-cssselect)))
8226 (home-page "https://github.com/gawel/pyquery")
8227 (synopsis "Make jQuery-like queries on xml documents")
8228 (description "pyquery allows you to make jQuery queries on xml documents.
8229The API is as much as possible the similar to jQuery. pyquery uses lxml for
8230fast xml and html manipulation.")
8231 (license license:bsd-3)))
8232
44d10b1f
RW
8233(define-public python-anyjson
8234 (package
8235 (name "python-anyjson")
8236 (version "0.3.3")
8237 (source
8238 (origin
8239 (method url-fetch)
8240 (uri (pypi-uri "anyjson" version))
8241 (sha256
8242 (base32
8243 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
8244 (build-system python-build-system)
8245 (arguments
8246 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
8247 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
8248 ;; whatever) so this transformation needs to be done before the tests
8249 ;; can be run. Maybe we could add a build step to transform beforehand
8250 ;; but it could be annoying/difficult.
8251 ;; We can enable tests for the Python 2 version, though, and do below.
8252 #:tests? #f))
8253 (home-page "https://bitbucket.org/runeh/anyjson/")
8254 (synopsis
8255 "Wraps best available JSON implementation in a common interface")
8256 (description
8257 "Anyjson loads whichever is the fastest JSON module installed
8258and provides a uniform API regardless of which JSON implementation is used.")
8259 (license license:bsd-3)
8260 (properties `((python2-variant . ,(delay python2-anyjson))))))
8261
8262(define-public python2-anyjson
8263 (let ((anyjson (package-with-python2
8264 (strip-python2-variant python-anyjson))))
8265 (package
8266 (inherit anyjson)
8267 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
8268 #:tests? #t
8269 ,@(package-arguments anyjson)))
8270 (native-inputs `(("python2-nose" ,python2-nose))))))
8271
8272(define-public python-amqp
8273 (package
8274 (name "python-amqp")
8275 (version "2.3.2")
8276 (source
8277 (origin
8278 (method url-fetch)
8279 (uri (pypi-uri "amqp" version))
8280 (sha256
8281 (base32
8282 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
8283 (build-system python-build-system)
8284 (native-inputs
8285 `(("python-case" ,python-case)
8286 ("python-pytest-sugar" ,python-pytest-sugar)
8287 ("python-mock" ,python-mock)))
8288 (propagated-inputs
8289 `(("python-vine" ,python-vine)))
8290 (home-page "https://github.com/celery/py-amqp")
8291 (synopsis
8292 "Low-level AMQP client for Python (fork of amqplib)")
8293 (description
8294 "This is a fork of amqplib which was originally written by Barry Pederson.
8295It is maintained by the Celery project, and used by kombu as a pure python
8296alternative when librabbitmq is not available.")
8297 (license license:lgpl2.1+)
8298 (properties `((python2-variant . ,(delay python2-amqp))))))
8299
8300(define-public python2-amqp
8301 (let ((amqp (package-with-python2
8302 (strip-python2-variant python-amqp))))
8303 (package
8304 (inherit amqp)
8305 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
8306 ;; unmaintained. Weirdly, does not do this on the python 3
8307 ;; version?
8308 #:tests? #f
8309 ,@(package-arguments amqp))))))
8310
8311(define-public python-txamqp
8312 (package
8313 (name "python-txamqp")
8314 (version "0.8.2")
8315 (source
8316 (origin
8317 (method url-fetch)
8318 (uri (pypi-uri "txAMQP" version))
8319 (sha256
8320 (base32
8321 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
8322 (build-system python-build-system)
8323 (propagated-inputs
8324 `(("python-six" ,python-six)
8325 ("python-twisted" ,python-twisted)))
8326 (home-page "https://github.com/txamqp/txamqp")
8327 (synopsis "Communicate with AMQP peers and brokers using Twisted")
8328 (description
8329 "This package provides a Python library for communicating with AMQP peers
8330and brokers using the asynchronous networking framework Twisted. It contains
8331all the necessary code to connect, send and receive messages to/from an
8332AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
8333also includes support for using Thrift RPC over AMQP in Twisted
8334applications.")
8335 (license license:asl2.0)))
8336
8337(define-public python2-txamqp
8338 (package-with-python2 python-txamqp))
8339
8340(define-public python-kombu
8341 (package
8342 (name "python-kombu")
8343 (version "4.2.2")
8344 (source
8345 (origin
8346 (method url-fetch)
8347 (uri (pypi-uri "kombu" version))
8348 (sha256
8349 (base32
8350 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
8351 (build-system python-build-system)
8352 (native-inputs
8353 `(("python-mock" ,python-mock)
8354 ("python-case" ,python-case)
8355 ("python-pyro4" ,python-pyro4)
8356 ("python-pytest-sugar" ,python-pytest-sugar)
8357 ("python-pytz" ,python-pytz)))
8358 (propagated-inputs
8359 `(("python-anyjson" ,python-anyjson)
8360 ("python-amqp" ,python-amqp)
8361 ("python-redis" ,python-redis)))
8362 (home-page "https://kombu.readthedocs.io")
8363 (synopsis "Message passing library for Python")
8364 (description "The aim of Kombu is to make messaging in Python as easy as
8365possible by providing an idiomatic high-level interface for the AMQ protocol,
8366and also provide proven and tested solutions to common messaging problems.
8367AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
8368message orientation, queuing, routing, reliability and security, for which the
8369RabbitMQ messaging server is the most popular implementation.")
8370 (license license:bsd-3)
8371 (properties `((python2-variant . ,(delay python2-kombu))))))
8372
8373(define-public python2-kombu
8374 (let ((kombu (package-with-python2
8375 (strip-python2-variant python-kombu))))
8376 (package
8377 (inherit kombu)
8378 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
8379 ;; It works fine on the python3 variant.
8380 #:tests? #f
8381 ,@(package-arguments kombu)))
8382 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8383 ,@(package-native-inputs kombu))))))
8384
8385(define-public python-billiard
8386 (package
8387 (name "python-billiard")
8388 (version "3.5.0.5")
8389 (source
8390 (origin
8391 (method url-fetch)
8392 (uri (pypi-uri "billiard" version))
8393 (sha256
8394 (base32
8395 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
8396 (build-system python-build-system)
8397 (native-inputs
8398 `(("python-case" ,python-case)
8399 ("python-pytest" ,python-pytest)))
8400 (home-page "https://github.com/celery/billiard")
8401 (synopsis
8402 "Python multiprocessing fork with improvements and bugfixes")
8403 (description
8404 "Billiard is a fork of the Python 2.7 multiprocessing package. The
8405multiprocessing package itself is a renamed and updated version of R Oudkerk's
8406pyprocessing package. This standalone variant is intended to be compatible with
8407Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
8408 (license license:bsd-3)
8409 (properties `((python2-variant . ,(delay python2-billiard))))))
8410
8411(define-public python2-billiard
8412 (let ((billiard (package-with-python2
8413 (strip-python2-variant python-billiard))))
8414 (package
8415 (inherit billiard)
8416 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8417 ("python2-mock" ,python2-mock)
8418 ,@(package-native-inputs billiard))))))
8419
8420(define-public python-celery
8421 (package
8422 (name "python-celery")
8423 (version "4.2.1")
8424 (source
8425 (origin
8426 (method url-fetch)
8427 (uri (pypi-uri "celery" version))
8428 (sha256
8429 (base32
8430 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
8431 (build-system python-build-system)
8432 (arguments
8433 '(;; TODO The tests fail with Python 3.7
8434 ;; https://github.com/celery/celery/issues/4849
8435 #:tests? #f
8436 #:phases
8437 (modify-phases %standard-phases
8438 (add-after 'unpack 'patch-requirements
8439 (lambda _
8440 (substitute* "requirements/test.txt"
8441 (("pytest>=3\\.0,<3\\.3")
8442 "pytest>=3.0"))
8443 #t)))))
8444 (native-inputs
8445 `(("python-case" ,python-case)
8446 ("python-pytest" ,python-pytest)))
8447 (propagated-inputs
8448 `(("python-pytz" ,python-pytz)
8449 ("python-billiard" ,python-billiard)
8450 ("python-kombu" ,python-kombu)))
8451 (home-page "https://celeryproject.org")
8452 (synopsis "Distributed Task Queue")
8453 (description "Celery is an asynchronous task queue/job queue based on
8454distributed message passing. It is focused on real-time operation, but
8455supports scheduling as well. The execution units, called tasks, are executed
8456concurrently on a single or more worker servers using multiprocessing,
8457Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
8458synchronously (wait until ready).")
8459 (license license:bsd-3)
8460 (properties `((python2-variant . ,(delay python2-celery))))))
8461
8462(define-public python2-celery
8463 (let ((celery (package-with-python2
8464 (strip-python2-variant python-celery))))
8465 (package
8466 (inherit celery)
8467 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8468 ("python2-mock" ,python2-mock)
8469 ,@(package-native-inputs celery))))))
8470
8471(define-public python-translitcodec
8472 (package
8473 (name "python-translitcodec")
8474 (version "0.4.0")
8475 (source
8476 (origin
8477 (method url-fetch)
8478 (uri (pypi-uri "translitcodec" version))
8479 (sha256
8480 (base32
8481 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
8482 (build-system python-build-system)
8483 (arguments
8484 `(#:tests? #f)) ; no tests provided
8485 (home-page
8486 "https://github.com/claudep/translitcodec")
8487 (synopsis
8488 "Unicode to 8-bit charset transliteration codec")
8489 (description
8490 "This package contains codecs for transliterating ISO 10646 texts into
8491best-effort representations using smaller coded character sets (ASCII,
8492ISO 8859, etc.).")
8493 (license license:expat)))
8494
8495(define-public python2-translitcodec
8496 (package-with-python2 python-translitcodec))
8497
8498(define-public python-editor
8499 (package
8500 (name "python-editor")
8501 (version "0.5")
8502 (source
8503 (origin
8504 (method url-fetch)
8505 (uri (pypi-uri "python-editor" version))
8506 (sha256
8507 (base32
8508 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
8509 (build-system python-build-system)
8510 (home-page
8511 "https://github.com/fmoo/python-editor")
8512 (synopsis
8513 "Programmatically open an editor, capture the result")
8514 (description
8515 "python-editor is a library that provides the editor module for
8516programmatically interfacing with your system's $EDITOR.")
8517 (license license:asl2.0)))
8518
8519(define-public python2-editor
8520 (package-with-python2 python-editor))
8521
8522(define-public python-sphinxcontrib-programoutput
8523 (package
8524 (name "python-sphinxcontrib-programoutput")
8525 (version "0.10")
8526 (source (origin
8527 (method url-fetch)
8528 (uri (pypi-uri "sphinxcontrib-programoutput" version))
8529 (sha256
8530 (base32
8531 "153hhnlbx4688zj9wd64819ps5znc2jlyp5crkgzvn5hxgy99vpx"))))
8532 (build-system python-build-system)
8533 (arguments
8534 ;; FIXME: Many tests are failing and the upstream is gone.
8535 '(#:tests? #f))
8536 (propagated-inputs
8537 `(("python-sphinx" ,python-sphinx)))
8538 (synopsis "Sphinx extension to include program output")
8539 (description "A Sphinx extension to literally insert the output of arbitrary
8540commands into documents, helping you to keep your command examples up to date.")
8541 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
8542 (license license:bsd-2)))
8543
8544(define-public python2-sphinxcontrib-programoutput
8545 (package-with-python2 python-sphinxcontrib-programoutput))
8546
8547(define-public python-sphinx-repoze-autointerface
8548 (package
8549 (name "python-sphinx-repoze-autointerface")
8550 (version "0.8")
8551 (source (origin
8552 (method url-fetch)
8553 (uri (pypi-uri "repoze.sphinx.autointerface" version))
8554 (sha256
8555 (base32
8556 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
8557 (build-system python-build-system)
8558 (arguments '(#:tests? #f)) ; No tests.
8559 (propagated-inputs
8560 `(("python-sphinx" ,python-sphinx)
8561 ("python-zope-interface" ,python-zope-interface)))
8562 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
8563 (description "This package defines an extension for the Sphinx documentation
8564system. The extension allows generation of API documentation by
8565introspection of @code{zope.interface} instances in code.")
8566 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
8567 (license license:repoze)))
8568
8569(define-public python2-sphinx-repoze-autointerface
8570 (package-with-python2 python-sphinx-repoze-autointerface))
8571
8572(define-public python-vobject
8573 (package
8574 (name "python-vobject")
8575 (version "0.9.5")
8576 (source (origin
8577 (method url-fetch)
8578 (uri (pypi-uri "vobject" version))
8579 (sha256
8580 (base32
8581 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
8582 (build-system python-build-system)
8583 (arguments
8584 '(;; The test suite relies on some non-portable Windows interfaces.
8585 #:tests? #f))
8586 (propagated-inputs
8587 `(("python-dateutil" ,python-dateutil)
8588 ("python-pyicu" ,python-pyicu)))
8589 (synopsis "Parse and generate vCard and vCalendar files")
8590 (description "Vobject is intended to be a full featured Python package for
8591parsing and generating vCard and vCalendar files. Currently, iCalendar files
8592are supported and well tested. vCard 3.0 files are supported, and all data
8593should be imported, but only a few components are understood in a sophisticated
8594way.")
8595 (home-page "http://eventable.github.io/vobject/")
8596 (license license:asl2.0)))
8597
8598(define-public python2-vobject
8599 (package-with-python2 python-vobject))
8600
8601(define-public python-munkres
8602 (package
8603 (name "python-munkres")
8604 (version "1.0.8")
8605 (source (origin
8606 (method url-fetch)
8607 (uri (pypi-uri "munkres" version))
8608 (sha256
8609 (base32
8610 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
8611 (build-system python-build-system)
8612 (arguments
8613 '(#:tests? #f)) ; no test suite
8614 (home-page "http://software.clapper.org/munkres/")
8615 (synopsis "Implementation of the Munkres algorithm")
8616 (description "The Munkres module provides an implementation of the Munkres
8617algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
8618useful for solving the Assignment Problem.")
8619 (license license:bsd-3)))
8620
8621(define-public python2-munkres
8622 (package-with-python2 python-munkres))
8623
8624(define-public python-whoosh
8625 (package
8626 (name "python-whoosh")
8627 (version "2.7.4")
8628 (source
8629 (origin
8630 (method url-fetch)
8631 (uri (pypi-uri "Whoosh" version))
8632 (sha256
8633 (base32
8634 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
8635 (build-system python-build-system)
8636 (native-inputs
8637 `(("python-pytest" ,python-pytest)))
8638 (home-page "https://bitbucket.org/mchaput/whoosh")
8639 (synopsis "Full text indexing, search, and spell checking library")
8640 (description
8641 "Whoosh is a fast, pure-Python full text indexing, search, and spell
8642checking library.")
8643 (license license:bsd-2)))
8644
8645(define-public python2-whoosh
8646 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
8647 (package (inherit whoosh)
8648 (propagated-inputs
8649 `(("python2-backport-ssl-match-hostname"
8650 ,python2-backport-ssl-match-hostname)
8651 ,@(package-propagated-inputs whoosh))))))
8652
8653(define-public python-pathlib
8654 (package
8655 (name "python-pathlib")
8656 (version "1.0.1")
8657 (source (origin
8658 (method url-fetch)
8659 (uri (pypi-uri "pathlib" version))
8660 (sha256
8661 (base32
8662 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
8663 (build-system python-build-system)
8664 ;; The tests depend on the internal "test" module, which does not provide
8665 ;; a stable interface.
8666 (arguments `(#:tests? #f))
8667 (home-page "https://pathlib.readthedocs.org/")
8668 (synopsis "Object-oriented file system paths")
8669 (description "Pathlib offers a set of classes to handle file system paths.
8670It offers the following advantages over using string objects:
8671
8672@enumerate
8673@item No more cumbersome use of os and os.path functions. Everything can
8674be done easily through operators, attribute accesses, and method calls.
8675@item Embodies the semantics of different path types. For example,
8676comparing Windows paths ignores casing.
8677@item Well-defined semantics, eliminating any inconsistencies or
8678ambiguities (forward vs. backward slashes, etc.).
8679@end enumerate
8680
8681Note: In Python 3.4, pathlib is now part of the standard library. For other
8682Python versions please consider python-pathlib2 instead, which tracks the
8683standard library module. This module (python-pathlib) isn't maintained
8684anymore.")
8685 (license license:expat)))
8686
8687(define-public python2-pathlib
8688 (package-with-python2 python-pathlib))
8689
8690(define-public python2-pathlib2
8691 (package
8692 (name "python2-pathlib2")
8693 (version "2.3.2")
8694 (source (origin
8695 (method url-fetch)
8696 (uri (pypi-uri "pathlib2" version))
8697 (sha256
8698 (base32
8699 "10yb0iv5x2hs631rcppkhbddx799d3h8pcwmkbh2a66ns3w71ccf"))))
8700 (build-system python-build-system)
8701 ;; We only need the the Python 2 variant, since for Python 3 our minimum
8702 ;; version is 3.4 which already includes this package as part of the
8703 ;; standard library.
8704 (arguments
8705 `(#:python ,python-2))
8706 (propagated-inputs
8707 `(("python2-scandir" ,python2-scandir)
8708 ("python2-six" ,python2-six)))
8709 (home-page "https://pypi.python.org/pypi/pathlib2/")
8710 (synopsis "Object-oriented file system paths - backport of standard
8711pathlib module")
8712 (description "The goal of pathlib2 is to provide a backport of standard
8713pathlib module which tracks the standard library module, so all the newest
8714features of the standard pathlib can be used also on older Python versions.
8715
8716Pathlib offers a set of classes to handle file system paths. It offers the
8717following advantages over using string objects:
8718
8719@enumerate
8720@item No more cumbersome use of os and os.path functions. Everything can
8721be done easily through operators, attribute accesses, and method calls.
8722@item Embodies the semantics of different path types. For example,
8723comparing Windows paths ignores casing.
8724@item Well-defined semantics, eliminating any inconsistencies or
8725ambiguities (forward vs. backward slashes, etc.).
8726@end enumerate")
8727 (license license:expat)))
8728
8729(define-public python2-pathlib2-bootstrap
8730 (hidden-package
8731 (package
8732 (inherit python2-pathlib2)
8733 (name "python2-pathlib2-bootstrap")
8734 (propagated-inputs
8735 `(("python2-scandir" ,python2-scandir)
8736 ("python2-six" ,python2-six-bootstrap))))))
8737
8738(define-public python-jellyfish
8739 (package
8740 (name "python-jellyfish")
8741 (version "0.5.6")
8742 (source (origin
8743 (method url-fetch)
8744 (uri (pypi-uri "jellyfish" version))
8745 (sha256
8746 (base32
8747 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
8748 (build-system python-build-system)
8749 (native-inputs
8750 `(("python-pytest" ,python-pytest)))
8751 (home-page "https://github.com/jamesturk/jellyfish")
8752 (synopsis "Approximate and phonetic matching of strings")
8753 (description "Jellyfish uses a variety of string comparison and phonetic
8754encoding algorithms to do fuzzy string matching.")
8755 (license license:bsd-2)
8756 (properties `((python2-variant . ,(delay python2-jellyfish))))))
8757
8758(define-public python2-jellyfish
8759 (let ((jellyfish (package-with-python2
8760 (strip-python2-variant python-jellyfish))))
8761 (package (inherit jellyfish)
8762 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
8763 ,@(package-native-inputs jellyfish))))))
8764
8765(define-public python2-unicodecsv
8766 (package
8767 (name "python2-unicodecsv")
8768 (version "0.14.1")
8769 (source (origin
8770 (method url-fetch)
8771 ;; The test suite is not included in the PyPi release.
8772 ;; https://github.com/jdunck/python-unicodecsv/issues/19
8773 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
8774 "archive/" version ".tar.gz"))
8775 (file-name (string-append name "-" version ".tar.gz"))
8776 (sha256
8777 (base32
8778 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
8779 (build-system python-build-system)
8780 (arguments
8781 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
8782 #:python ,python-2))
8783 (native-inputs
8784 `(("python2-unittest2" ,python2-unittest2)))
8785 (home-page "https://github.com/jdunck/python-unicodecsv")
8786 (synopsis "Unicode CSV module for Python 2")
8787 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
8788module, adding support for Unicode strings.")
8789 (license license:bsd-2)))
8790
8791(define-public python-rarfile
8792 (package
8793 (name "python-rarfile")
8794 (version "2.8")
8795 (source (origin
8796 (method url-fetch)
8797 (uri (pypi-uri "rarfile" version))
8798 (sha256
8799 (base32
8800 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
8801 (build-system python-build-system)
8802 (arguments
8803 '(#:phases
8804 (modify-phases %standard-phases
8805 (replace 'check
8806 ;; Many tests fail, but the installation proceeds.
e59dd341 8807 (lambda _ (invoke "make" "-C" "test" "test"))))))
44d10b1f
RW
8808 (native-inputs
8809 `(("which" ,which))) ; required for tests
8810 (propagated-inputs
8811 `(("libarchive" ,libarchive)))
8812 (home-page "https://github.com/markokr/rarfile")
8813 (synopsis "RAR archive reader for Python")
8814 (description "This is Python module for RAR archive reading. The interface
8815is made as zipfile like as possible.")
8816 (license license:isc)))
8817
8818(define-public python2-rarfile
8819 (package-with-python2 python-rarfile))
8820
8821(define-public python-magic
8822 (package
8823 (name "python-magic")
8824 (version "0.4.15")
8825 (source
8826 (origin
8827 (method url-fetch)
8828 (uri (pypi-uri "python-magic" version))
8829 (sha256
8830 (base32
8831 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
8832 (file-name (string-append name "-" version "-checkout"))))
8833 (build-system python-build-system)
8834 (arguments
8835 ;; The tests are unreliable, so don't run them. The tests fail
8836 ;; under Python3 because they were written for Python2 and
8837 ;; contain import statements that do not work in Python3. One of
8838 ;; the tests fails under Python2 because its assertions are
8839 ;; overly stringent; it relies on comparing output strings which
8840 ;; are brittle and can change depending on the version of
8841 ;; libmagic being used and the system on which the test is
8842 ;; running. In my case, under GuixSD 0.10.0, only one test
8843 ;; failed, and it seems to have failed only because the version
8844 ;; of libmagic that is packaged in Guix outputs a slightly
8845 ;; different (but not wrong) string than the one that the test
8846 ;; expected.
8847 '(#:tests? #f
8848 #:phases (modify-phases %standard-phases
8849 ;; Replace a specific method call with a hard-coded
8850 ;; path to the necessary libmagic.so file in the
8851 ;; store. If we don't do this, then the method call
8852 ;; will fail to find the libmagic.so file, which in
8853 ;; turn will cause any application using
8854 ;; python-magic to fail.
8855 (add-before 'build 'hard-code-path-to-libmagic
8856 (lambda* (#:key inputs #:allow-other-keys)
8857 (let ((file (assoc-ref inputs "file")))
8858 (substitute* "magic.py"
8859 (("ctypes.util.find_library\\('magic'\\)")
8860 (string-append "'" file "/lib/libmagic.so'")))
8861 #t)))
8862 (add-before 'install 'disable-egg-compression
8863 (lambda _
8864 (let ((port (open-file "setup.cfg" "a")))
8865 (display "\n[easy_install]\nzip_ok = 0\n"
8866 port)
8867 (close-port port)
8868 #t))))))
8869 (inputs
8870 ;; python-magic needs to be able to find libmagic.so.
8871 `(("file" ,file)))
8872 (home-page
8873 "https://github.com/ahupp/python-magic")
8874 (synopsis
8875 "File type identification using libmagic")
8876 (description
8877 "This module uses ctypes to access the libmagic file type
8878identification library. It makes use of the local magic database and
8879supports both textual and MIME-type output. Note that this module and
8880the python-file module both provide a \"magic.py\" file; these two
8881modules, which are different and were developed separately, both serve
8882the same purpose: to provide Python bindings for libmagic.")
8883 (license license:expat)))
8884
8885(define-public python2-magic
8886 (package-with-python2 python-magic))
8887
8888(define-public python2-s3cmd
8889 (package
8890 (name "python2-s3cmd")
8891 (version "1.6.1")
8892 (source
8893 (origin
8894 (method url-fetch)
8895 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
8896 "s3cmd-" version ".tar.gz"))
8897 (sha256
8898 (base32
8899 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
8900 (build-system python-build-system)
8901 (arguments
8902 ;; s3cmd is written for python2 only and contains no tests.
8903 `(#:python ,python-2
8904 #:tests? #f))
8905 (propagated-inputs
8906 `(("python2-dateutil" ,python2-dateutil)
8907 ;; The python-file package also provides a magic.py module.
8908 ;; This is an unfortunate state of affairs; however, s3cmd
8909 ;; fails to install if it cannot find specifically the
8910 ;; python-magic package. Thus we include it, instead of using
8911 ;; python-file. Ironically, s3cmd sometimes works better
8912 ;; without libmagic bindings at all:
8913 ;; https://github.com/s3tools/s3cmd/issues/198
8914 ("python2-magic" ,python2-magic)))
8915 (home-page "http://s3tools.org/s3cmd")
8916 (synopsis "Command line tool for S3-compatible storage services")
8917 (description
8918 "S3cmd is a command line tool for uploading, retrieving and managing data
8919in storage services that are compatible with the Amazon Simple Storage
8920Service (S3) protocol, including S3 itself. It supports rsync-like backup,
8921GnuPG encryption, and more. It also supports management of Amazon's
8922CloudFront content delivery network.")
8923 (license license:gpl2+)))
8924
8925(define-public python-pkgconfig
8926 (package
8927 (name "python-pkgconfig")
8928 (version "1.3.1")
8929 (source
8930 (origin
8931 (method url-fetch)
8932 (uri (pypi-uri "pkgconfig" version))
8933 (sha256
8934 (base32
8935 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
8936 (build-system python-build-system)
8937 (native-inputs
8938 `(("python-nose" ,python-nose)))
8939 (inputs
8940 `(("pkg-config" ,pkg-config)))
8941 (arguments
8942 `(#:phases
8943 (modify-phases %standard-phases
8944 (add-before 'build 'patch
8945 ;; Hard-code the path to pkg-config.
8946 (lambda _
8947 (substitute* "pkgconfig/pkgconfig.py"
8948 (("cmd = 'pkg-config")
8949 (string-append "cmd = '" (which "pkg-config"))))
8950 #t))
8951 (replace 'check
8952 (lambda _
8953 (invoke "nosetests" "test.py"))))))
8954 (home-page "https://github.com/matze/pkgconfig")
8955 (synopsis "Python interface for pkg-config")
8956 (description "This module provides a Python interface to pkg-config. It
8957can be used to find all pkg-config packages, check if a package exists,
8958check if a package meets certain version requirements, query CFLAGS and
8959LDFLAGS and parse the output to build extensions with setup.py.")
8960 (license license:expat)))
8961
8962(define-public python2-pkgconfig
8963 (package-with-python2 python-pkgconfig))
8964
8965(define-public python-bz2file
8966 (package
8967 (name "python-bz2file")
8968 (version "0.98")
8969 (source
8970 (origin
8971 (method url-fetch)
8972 (uri (pypi-uri "bz2file" version))
8973 (sha256
8974 (base32
8975 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
8976 (build-system python-build-system)
8977 (arguments
8978 `(#:tests? #f)) ; Tests use deprecated python modules.
8979 (home-page "https://github.com/nvawda/bz2file")
8980 (synopsis "Read and write bzip2-compressed files")
8981 (description
8982 "Bz2file is a Python library for reading and writing bzip2-compressed
8983files. It contains a drop-in replacement for the I/O interface in the
8984standard library's @code{bz2} module, including features from the latest
8985development version of CPython that are not available in older releases.")
8986 (license license:asl2.0)))
8987
8988(define-public python2-bz2file
8989 (package-with-python2 python-bz2file))
8990
8991(define-public python-future
8992 (package
8993 (name "python-future")
8994 (version "0.16.0")
8995 (source
8996 (origin
8997 (method url-fetch)
8998 (uri (pypi-uri "future" version))
8999 (sha256
9000 (base32
9001 "1nzy1k4m9966sikp0qka7lirh8sqrsyainyf8rk97db7nwdfv773"))))
9002 (build-system python-build-system)
9003 ;; Many tests connect to the network or are otherwise flawed.
9004 ;; https://github.com/PythonCharmers/python-future/issues/210
9005 (arguments
9006 `(#:tests? #f))
9007 (home-page "http://python-future.org")
9008 (synopsis "Single-source support for Python 3 and 2")
9009 (description
9010 "@code{python-future} is the missing compatibility layer between Python 2 and
9011Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9012to support both Python 2 and Python 3 with minimal overhead.")
9013 (license license:expat)))
9014
9015(define-public python2-future
9016 (package-with-python2 python-future))
9017
9018(define-public python-cysignals
9019 (package
9020 (name "python-cysignals")
8e3e51df 9021 (version "1.9.0")
44d10b1f
RW
9022 (source
9023 (origin
9024 (method url-fetch)
8e3e51df 9025 (uri (pypi-uri "cysignals" version))
44d10b1f
RW
9026 (sha256
9027 (base32
8e3e51df 9028 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
44d10b1f
RW
9029 (build-system python-build-system)
9030 (native-inputs
9031 `(("python-cython" ,python-cython)
9032 ("python-sphinx" ,python-sphinx)))
9033 (inputs
9034 `(("pari-gp" ,pari-gp)))
9035 (arguments
9036 `(#:modules ((guix build python-build-system)
9037 ((guix build gnu-build-system) #:prefix gnu:)
9038 (guix build utils))
9039 ;; FIXME: Tests are executed after installation and currently fail
9040 ;; when not installing into standard locations; the author is working
9041 ;; on a fix.
9042 #:tests? #f
9043 #:phases
9044 (modify-phases %standard-phases
9045 (add-before
9046 'build 'configure
9047 (assoc-ref gnu:%standard-phases 'configure)))))
9048 (home-page
9049 "https://github.com/sagemath/cysignals")
9050 (synopsis
9051 "Handling of interrupts and signals for Cython")
9052 (description
9053 "The cysignals package provides mechanisms to handle interrupts (and
9054other signals and errors) in Cython code, using two related approaches,
9055for mixed Cython/Python code or external C libraries and pure Cython code,
9056respectively.")
9057 (license license:lgpl3+)))
9058
9059(define-public python2-cysignals
9060 (package-with-python2 python-cysignals))
9061
9062(define-public python2-shedskin
9063 (package
9064 (name "python2-shedskin")
9065 (version "0.9.4")
9066 (source
9067 (origin
9068 (method url-fetch)
9069 (uri (string-append "https://github.com/shedskin/shedskin/"
9070 "releases/download/v" version
9071 "/shedskin-" version ".tgz"))
9072 (sha256
9073 (base32
9074 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9075 (build-system python-build-system)
9076 (arguments
9077 `(#:python ,python-2
9078 #:phases (modify-phases %standard-phases
9079 (add-after 'unpack 'fix-resulting-include-libs
9080 (lambda* (#:key inputs #:allow-other-keys)
9081 (let ((libgc (assoc-ref inputs "libgc"))
9082 (pcre (assoc-ref inputs "pcre")))
9083 (substitute* "shedskin/makefile.py"
9084 (("variable == 'CCFLAGS':[ ]*")
9085 (string-append "variable == 'CCFLAGS':\n"
9086 " line += ' -I " pcre "/include"
9087 " -I " libgc "/include'"))
9088 (("variable == 'LFLAGS':[ ]*")
9089 (string-append "variable == 'LFLAGS':\n"
9090 " line += ' -L" pcre "/lib"
9091 " -L " libgc "/lib'")))
9092 #t))))))
9093 (inputs `(("pcre" ,pcre)
9094 ("libgc" ,libgc)))
9095 (home-page "https://shedskin.github.io/")
9096 (synopsis "Experimental Python-2 to C++ Compiler")
9097 (description (string-append "This is an experimental compiler for a subset of
9098Python. It generates C++ code and a Makefile."))
9099 (license (list license:gpl3 license:bsd-3 license:expat))))
9100
9101(define-public python2-rope
9102 (package
9103 (name "python2-rope")
a9ba0a31 9104 (version "0.11.0")
44d10b1f
RW
9105 (source
9106 (origin
9107 (method url-fetch)
9108 (uri (pypi-uri "rope" version))
9109 (sha256
9110 (base32
a9ba0a31 9111 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
44d10b1f 9112 (arguments
afb29715 9113 ;; Rope has only partial python3 support, see `python-rope'
44d10b1f
RW
9114 `(#:python ,python-2))
9115 (build-system python-build-system)
9116 (native-inputs
9117 `(("python2-unittest2" ,python2-unittest2)))
9118 (home-page "https://github.com/python-rope/rope")
9119 (synopsis "Refactoring library for Python")
9120 (description "Rope is a refactoring library for Python. It facilitates
9121the renaming, moving and extracting of attributes, functions, modules, fields
9122and parameters in Python 2 source code. These refactorings can also be applied
9123to occurrences in strings and comments.")
9124 (license license:gpl2)))
9125
2c880ef4
LC
9126(define-public python-rope
9127 (package
9128 (inherit python2-rope)
9129 (name "python-rope")
9130 (arguments `(#:python ,python-wrapper
9131 ;; XXX: Only partial python3 support, results in some failing
9132 ;; tests: <https://github.com/python-rope/rope/issues/247>.
9133 #:tests? #f))
9134 (properties `((python2-variant . ,(delay python2-rope))))))
9135
44d10b1f
RW
9136(define-public python-py3status
9137 (package
9138 (name "python-py3status")
77f3d303 9139 (version "3.16")
44d10b1f
RW
9140 (source
9141 (origin
9142 (method url-fetch)
9143 (uri (pypi-uri "py3status" version))
9144 (sha256
9145 (base32
77f3d303 9146 "1xrfph277bgjln3jbpzpgkhxad04fjvj7s3xfil42q1sxi4s3q3g"))))
44d10b1f
RW
9147 (build-system python-build-system)
9148 (inputs
9149 `(("file" ,file)))
9150 (arguments
9151 '(#:phases
9152 (modify-phases %standard-phases
9153 ;; 'file' is used for detection of configuration file encoding
9154 ;; let's make link the dependency to particular input
9155 (add-before 'build 'patch-file-path
9156 (lambda* (#:key inputs #:allow-other-keys)
9157 (let ((file-path (assoc-ref inputs "file")))
9158 (substitute* "py3status/parse_config.py"
9159 (("\\['file', '-b'")
9160 (string-append "['" file-path "/bin/file', '-b'")))
9161 #t))))
9162 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
9163 (home-page "https://github.com/ultrabug/py3status")
9164 (synopsis "Extensible i3status wrapper written in Python")
9165 (description "py3status is an i3status wrapper which extends i3status
9166functionality in a modular way, allowing you to extend your panel with your
9167own code, responding to click events and updating clock every second.")
9168 (license license:bsd-3)))
9169
9170(define-public python-tblib
9171 (package
9172 (name "python-tblib")
9173 (version "1.3.2")
9174 (source (origin
9175 (method url-fetch)
9176 (uri (pypi-uri "tblib" version))
9177 (sha256 (base32
9178 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
9179 (build-system python-build-system)
9180 (arguments
9181 `(#:phases
9182 (modify-phases %standard-phases
9183 (add-before 'check 'adjust-tests
9184 (lambda _
9185 (when (which "python3")
9186 ;; Adjust the example output to match that of Python 3.7:
9187 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
9188 (substitute* "README.rst"
9189 (("Exception\\('fail',") "Exception('fail'"))
9190 #t)))
9191 (replace 'check
9192 (lambda _
9193 ;; Upstream runs tests after installation and the package itself
9194 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
9195 ;; found.
9196 (setenv "PYTHONPATH"
9197 (string-append (getcwd) "/build/lib:"
9198 (getenv "PYTHONPATH")))
9199 (invoke "py.test" "-vv" "tests" "README.rst"))))))
9200 (native-inputs
9201 `(("python-pytest" ,python-pytest)
9202 ("python-six" ,python-six)))
9203 (home-page "https://github.com/ionelmc/python-tblib")
9204 (synopsis "Traceback serialization library")
9205 (description
9206 "Traceback serialization allows you to:
9207
9208@enumerate
9209@item Pickle tracebacks and raise exceptions with pickled tracebacks in
9210different processes. This allows better error handling when running code over
9211multiple processes (imagine multiprocessing, billiard, futures, celery etc).
9212
9213@item Parse traceback strings and raise with the parsed tracebacks.
9214@end enumerate\n")
9215 (license license:bsd-3)))
9216
9217(define-public python2-tblib
9218 (package-with-python2 python-tblib))
9219
9220(define-public python-greenlet
9221 (package
9222 (name "python-greenlet")
9223 (version "0.4.15")
9224 (source (origin
9225 (method url-fetch)
9226 (uri (pypi-uri "greenlet" version))
9227 (sha256
9228 (base32
9229 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
9230 (build-system python-build-system)
9231 (home-page "https://greenlet.readthedocs.io/")
9232 (synopsis "Lightweight in-process concurrent programming")
9233 (description
9234 "Greenlet package is a spin-off of Stackless, a version of CPython
9235that supports micro-threads called \"tasklets\". Tasklets run
9236pseudo-concurrently (typically in a single or a few OS-level threads) and
9237are synchronized with data exchanges on \"channels\".")
9238 (license (list license:psfl license:expat))))
9239
9240(define-public python2-greenlet
9241 (package-with-python2 python-greenlet))
9242
9243(define-public python-objgraph
9244 (package
9245 (name "python-objgraph")
9246 (version "3.4.0")
9247 (source
9248 (origin
9249 (method url-fetch)
9250 (uri (pypi-uri "objgraph" version))
9251 (sha256
9252 (base32
9253 "184m09am5gpbqfaiy7l0hwh476mczbrly1dffs0rw2p1d1i2q32a"))))
9254 (build-system python-build-system)
9255 (propagated-inputs
9256 `(("python-graphviz" ,python-graphviz)))
9257 (native-inputs
9258 `(("python-mock" ,python-mock)
9259 ("graphviz" ,graphviz)))
9260 (home-page "https://mg.pov.lt/objgraph/")
9261 (synopsis "Draw Python object reference graphs with graphviz")
9262 (description
9263 "This package provides tools to draw Python object reference graphs with
9264graphviz.")
9265 (license license:expat)))
9266
9267(define-public python-gevent
9268 (package
9269 (name "python-gevent")
9270 (version "1.3.7")
9271 (source (origin
9272 (method url-fetch)
9273 (uri (pypi-uri "gevent" version))
9274 (sha256
9275 (base32
9276 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
9277 (modules '((guix build utils)))
9278 (snippet
9279 '(begin
9280 ;; unbunding libev and c-ares
9281 (delete-file-recursively "deps")
9282 #t))))
9283 (build-system python-build-system)
9284 (arguments
9285 `(#:modules ((ice-9 ftw)
9286 (ice-9 match)
9287 (srfi srfi-26)
9288 (guix build utils)
9289 (guix build python-build-system))
9290 #:phases (modify-phases %standard-phases
9291 (add-after 'unpack 'unpack-libev
9292 (lambda* (#:key inputs #:allow-other-keys)
9293 (mkdir-p "deps/libev")
9294 ;; FIXME: gevent requires building libev, even though
9295 ;; it only links against the proper one.
9296 (invoke "tar" "-xf" (assoc-ref inputs "libev-source")
9297 "--strip-components=1" "-C" "deps/libev")))
9298 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
9299 (lambda _
9300 (substitute* "src/gevent/subprocess.py"
9301 (("/bin/sh") (which "sh")))
9302 (for-each (lambda (file)
9303 (substitute* file
9304 (("/bin/sh") (which "sh"))
9305 (("/bin/true") (which "true"))))
9306 (find-files "src/greentest" "\\.py$"))
9307 #t))
9308 (add-before 'build 'do-not-use-bundled-sources
9309 (lambda* (#:key inputs #:allow-other-keys)
9310 (setenv "CONFIG_SHELL" (which "bash"))
9311 (setenv "LIBEV_EMBED" "false")
9312 (setenv "CARES_EMBED" "false")
9313 (setenv "EMBED" "false")
9314
9315 (let ((greenlet (string-append
9316 (assoc-ref inputs "python-greenlet")
9317 "/include")))
9318 (match (scandir greenlet
9319 (lambda (item)
9320 (string-prefix? "python" item)))
9321 ((python)
9322 (setenv "CPATH"
9323 (string-append greenlet "/" python)))))
9324 #t))
9325 (add-before 'check 'skip-timer-test
9326 (lambda _
9327 ;; XXX: Skip 'TestTimerResolution', which appears to be
9328 ;; unreliable.
9329 (substitute* "src/greentest/test__core_timer.py"
9330 (("not greentest.RUNNING_ON_CI") "False"))
9331 #t))
9332 (replace 'check
9333 (lambda _
9334 ;; Make sure the build directory is on PYTHONPATH.
9335 (setenv "PYTHONPATH"
9336 (string-append
9337 (getenv "PYTHONPATH") ":"
9338 (getcwd) "/build/"
9339 (car (scandir "build" (cut string-prefix? "lib." <>)))))
9340 (with-directory-excursion "src/greentest"
9341 ;; XXX: Many tests require network access. Instead we only
9342 ;; run known-good tests. Unfortunately we cannot use
9343 ;; recursion here since this directory also contains
9344 ;; Python-version-specific subfolders.
9345 (apply invoke "python" "testrunner.py" "--config"
9346 "known_failures.py"
9347 (scandir "." (cut regexp-exec
9348 (make-regexp "test_+(subprocess|core)")
9349 <>)))))))))
9350 (propagated-inputs
9351 `(("python-greenlet" ,python-greenlet)
9352 ("python-objgraph" ,python-objgraph)))
9353 (native-inputs
9354 `(("libev-source" ,(package-source libev))
9355 ("python-six" ,python-six)))
9356 (inputs
9357 `(("c-ares" ,c-ares)
9358 ("libev" ,libev)))
9359 (home-page "http://www.gevent.org/")
9360 (synopsis "Coroutine-based network library")
9361 (description
9362 "gevent is a coroutine-based Python networking library that uses greenlet
9363to provide a high-level synchronous API on top of the libev event loop.")
9364 (license license:expat)
9365 (properties `((python2-variant . ,(delay python2-gevent))))))
9366
9367(define-public python2-gevent
9368 (let ((base (package-with-python2
9369 (strip-python2-variant python-gevent))))
9370 (package
9371 (inherit base)
9372 (native-inputs `(,@(package-native-inputs python-gevent)
9373 ("python-mock" ,python2-mock))))))
9374
9375(define-public python-fastimport
9376 (package
9377 (name "python-fastimport")
9378 (version "0.9.6")
9379 (source
9380 (origin
9381 (method url-fetch)
9382 (uri (pypi-uri "fastimport" version))
9383 (sha256
9384 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
9385 (build-system python-build-system)
9386 (home-page "https://github.com/jelmer/python-fastimport")
9387 (synopsis "VCS fastimport parser and generator in Python")
9388 (description "This package provides a parser for and generator of the Git
9389@url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
9390format.")
9391 (license license:gpl2+)))
9392
9393(define-public python2-fastimport
9394 (package-with-python2 python-fastimport))
9395
9396(define-public python-twisted
9397 (package
9398 (name "python-twisted")
e5ba2fe3 9399 (version "17.5.0")
44d10b1f
RW
9400 (source (origin
9401 (method url-fetch)
9402 (uri (pypi-uri "Twisted" version ".tar.bz2"))
9403 (sha256
9404 (base32
e5ba2fe3 9405 "1sh2h23nnizcdyrl2rn7zxijglikxwz7z7grqpvq496zy2aa967i"))))
44d10b1f
RW
9406 (build-system python-build-system)
9407 (arguments
9408 '(#:tests? #f)) ; FIXME: Some tests are failing.
9409 ;; #:phases
9410 ;; (modify-phases %standard-phases
9411 ;; (replace 'check
9412 ;; (lambda _
9413 ;; (zero? (system* "./bin/trial" "twisted")))))
9414 (propagated-inputs
9415 `(("python-zope-interface" ,python-zope-interface)
9416 ("python-incremental" ,python-incremental)
e5ba2fe3 9417 ("python-hyperlink" ,python-hyperlink)
44d10b1f
RW
9418 ("python-constantly" ,python-constantly)
9419 ("python-automat" ,python-automat)))
9420 (home-page "https://twistedmatrix.com/")
9421 (synopsis "Asynchronous networking framework written in Python")
9422 (description
9423 "Twisted is an extensible framework for Python programming, with special
9424focus on event-based network programming and multiprotocol integration.")
9425 (license license:expat)))
9426
9427(define-public python2-twisted
9428 (package-with-python2 python-twisted))
9429
9430(define-public python-pika
9431 (package
9432 (name "python-pika")
9433 (version "0.12.0")
9434 (source
9435 (origin
9436 (method url-fetch)
9437 (uri (pypi-uri "pika" version))
9438 (sha256
9439 (base32
9440 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
9441 (build-system python-build-system)
9442 (native-inputs
9443 `(("python-pyev" ,python-pyev)
9444 ("python-tornado" ,python-tornado)
9445 ("python-twisted" ,python-twisted)))
9446 (home-page "https://pika.readthedocs.org")
9447 (synopsis "Pure Python AMQP Client Library")
9448 (description
9449 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
9450Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
9451network support library.")
9452 (license license:bsd-3)))
9453
9454(define-public python2-pika
9455 (package-with-python2 python-pika))
9456
9457(define-public python-ply
9458 (package
9459 (name "python-ply")
9460 (version "3.10")
9461 (source
9462 (origin
9463 (method url-fetch)
9464 (uri (pypi-uri "ply" version))
9465 (sha256
9466 (base32
9467 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
9468 (build-system python-build-system)
9469 (home-page "http://www.dabeaz.com/ply/")
9470 (synopsis "Python Lex & Yacc")
9471 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
9472It uses LR parsing and does extensive error checking.")
9473 (license license:bsd-3)))
9474
9475(define-public python2-ply
9476 (package-with-python2 python-ply))
9477
9478(define-public python-tabulate
9479 (package
9480 (name "python-tabulate")
9481 (version "0.7.7")
9482 (source (origin
9483 (method url-fetch)
9484 (uri (pypi-uri "tabulate" version))
9485 (sha256
9486 (base32
9487 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
9488 (build-system python-build-system)
9489 (arguments
9490 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
9491 ;; and the latest release is not tagged in the upstream repository.
9492 '(#:tests? #f))
9493 (home-page "https://bitbucket.org/astanin/python-tabulate")
9494 (synopsis "Pretty-print tabular data")
9495 (description
9496 "Tabulate is a library and command-line utility to pretty-print tabular
9497data in Python.")
9498 (license license:expat)))
9499
9500(define-public python2-tabulate
9501 (package-with-python2 python-tabulate))
9502
9503(define-public python-kazoo
9504 (package
9505 (name "python-kazoo")
9506 (version "2.4.0")
9507 (source
9508 (origin
9509 (method url-fetch)
9510 (uri (pypi-uri "kazoo" version))
9511 (sha256
9512 (base32
9513 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
9514 (build-system python-build-system)
9515 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
9516 (propagated-inputs
9517 `(("python-six" ,python-six)))
9518 (home-page "https://kazoo.readthedocs.org")
9519 (synopsis "High-level Zookeeper client library")
9520 (description
9521 "Kazoo is a Python client library for the Apache Zookeeper distributed
9522application service. It is designed to be easy to use and to avoid common
9523programming errors.")
9524 (license license:asl2.0)))
9525
9526(define-public python2-kazoo
9527 (package-with-python2 python-kazoo))
9528
9529(define-public python-pykafka
9530 (package
9531 (name "python-pykafka")
9532 (version "2.4.0")
9533 (source (origin
9534 (method url-fetch)
0ca1d040 9535 (uri (pypi-uri "pykafka" version))
44d10b1f
RW
9536 (sha256
9537 (base32
9538 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
9539 (build-system python-build-system)
9540 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
9541 (propagated-inputs
9542 `(("python-gevent" ,python-gevent)
9543 ("python-kazoo" ,python-kazoo)
9544 ("python-tabulate" ,python-tabulate)))
9545 (inputs
9546 `(("librdkafka" ,librdkafka)))
9547 (home-page "https://pykafka.readthedocs.io/")
9548 (synopsis "Apache Kafka client for Python")
9549 (description
9550 "PyKafka is a client for the Apache Kafka distributed messaging system.
9551It includes Python implementations of Kafka producers and consumers, which
9552are optionally backed by a C extension built on librdkafka.")
9553 (license license:asl2.0)))
9554
9555(define-public python2-pykafka
9556 (package-with-python2 python-pykafka))
9557
9558(define-public python-wcwidth
9559 (package
9560 (name "python-wcwidth")
9561 (version "0.1.7")
9562 (source
9563 (origin
9564 (method url-fetch)
9565 (uri (pypi-uri "wcwidth" version))
9566 (sha256
9567 (base32
9568 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
9569 (build-system python-build-system)
9570 (home-page "https://github.com/jquast/wcwidth")
9571 (synopsis "Measure number of terminal column cells of wide-character codes")
9572 (description "Wcwidth measures the number of terminal column cells of
9573wide-character codes. It is useful for those implementing a terminal emulator,
9574or programs that carefully produce output to be interpreted by one. It is a
9575Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
9576specified in POSIX.1-2001 and POSIX.1-2008.")
9577 (license license:expat)))
9578
9579(define-public python2-wcwidth
9580 (package-with-python2 python-wcwidth))
9581
9582(define-public python2-jsonrpclib
9583 (package
9584 (name "python2-jsonrpclib")
9585 (version "0.1.7")
9586 (source (origin
9587 (method url-fetch)
6571bba0 9588 (uri (pypi-uri "jsonrpclib" version))
44d10b1f
RW
9589 (sha256
9590 (base32
9591 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
9592 (build-system python-build-system)
9593 (arguments
9594 `(#:tests? #f
9595 #:python ,python-2))
9596 (home-page "https://github.com/joshmarshall/jsonrpclib/")
9597 (synopsis "Implementation of JSON-RPC specification for Python")
9598 (description
9599 "This library is an implementation of the JSON-RPC specification.
9600It supports both the original 1.0 specification, as well as the
9601new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
9602etc.")
9603 (license license:asl2.0)))
9604
9605(define-public python-chai
9606 (package
9607 (name "python-chai")
9608 (version "1.1.2")
9609 (source (origin
9610 (method url-fetch)
9611 (uri (pypi-uri "chai" version))
9612 (sha256
9613 (base32
9614 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
9615 (build-system python-build-system)
9616 (home-page "https://github.com/agoragames/chai")
9617 (synopsis "Mocking framework for Python")
9618 (description
9619 "Chai provides an api for mocking, stubbing and spying your python
9620objects, patterned after the Mocha library for Ruby.")
9621 (license license:bsd-3)))
9622
9623(define-public python2-chai
9624 (package-with-python2 python-chai))
9625
9626(define-public python-inflection
9627 (package
9628 (name "python-inflection")
9629 (version "0.3.1")
9630 (source
9631 (origin (method url-fetch)
9632 (uri (pypi-uri "inflection" version))
9633 (sha256
9634 (base32
9635 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
9636 (build-system python-build-system)
9637 (native-inputs
9638 `(("python-pytest" ,python-pytest)))
9639 (home-page "https://github.com/jpvanhal/inflection")
9640 (synopsis "Python string transformation library")
9641 (description
9642 "Inflection is a string transformation library. It singularizes
9643and pluralizes English words, and transforms strings from CamelCase to
9644underscored string.")
9645 (license license:expat)))
9646
9647(define-public python2-inflection
9648 (package-with-python2 python-inflection))
9649
9650(define-public python-pylev
9651 (package
9652 (name "python-pylev")
9653 (version "1.3.0")
9654 (source (origin
9655 (method url-fetch)
9656 (uri (pypi-uri "pylev" version))
9657 (sha256
9658 (base32
9659 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
9660 (build-system python-build-system)
9661 (home-page "https://github.com/toastdriven/pylev")
9662 (synopsis "Levenshtein distance implementation in Python")
9663 (description "Pure Python Levenshtein implementation, based off the
9664Wikipedia code samples at
9665@url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
9666 (license license:bsd-3)))
9667
9668(define-public python2-pylev
9669 (package-with-python2 python-pylev))
9670
9671(define-public python-cleo
9672 (package
9673 (name "python-cleo")
9674 (version "0.6.1")
9675 (source (origin
9676 (method url-fetch)
9677 (uri (pypi-uri "cleo" version))
9678 (sha256
9679 (base32
9680 "0q1cf0szr0d54am4pypzwdnm74zpladdsinad94c2fz5i06fdpf7"))))
9681 (build-system python-build-system)
9682 (native-inputs
9683 `(;; For testing
9684 ("python-mock" ,python-mock)
9685 ("python-pytest-mock" ,python-pytest-mock)
9686 ("python-pytest" ,python-pytest)))
9687 (propagated-inputs
9688 `(("python-backpack" ,python-backpack)
9689 ("python-pastel" ,python-pastel)
9690 ("python-pylev" ,python-pylev)))
9691 (home-page "https://github.com/sdispater/cleo")
9692 (synopsis "Command-line arguments library for Python")
9693 (description
9694 "Cleo allows you to create command-line commands with signature in
9695docstring and colored output.")
9696 (license license:expat)))
9697
9698(define-public python2-cleo
9699 (package-with-python2 python-cleo))
9700
9701(define-public python-lazy-object-proxy
9702 (package
9703 (name "python-lazy-object-proxy")
9704 (version "1.3.1")
9705 (source (origin
9706 (method url-fetch)
9707 (uri (pypi-uri "lazy-object-proxy" version))
9708 (sha256
9709 (base32
9710 "0yha7q9bhw857fwaby785d63mffhngl9npwzlk9i0pwlkwvbx4gb"))))
9711 (build-system python-build-system)
9712 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
9713 (synopsis "Lazy object proxy for python")
9714 (description
9715 "Lazy object proxy is an object that wraps a callable but defers the call
9716until the object is actually required, and caches the result of said call.")
9717 (license license:bsd-2)))
9718
9719(define-public python2-lazy-object-proxy
9720 (package-with-python2 python-lazy-object-proxy))
9721
9722(define-public python-dnspython
9723 (package
9724 (name "python-dnspython")
9725 (version "1.15.0")
9726 (source (origin
9727 (method url-fetch)
9728 (uri (string-append "http://www.dnspython.org/kits/"
9729 version "/dnspython-" version ".tar.gz"))
9730 (sha256
9731 (base32
9732 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
9733 (build-system python-build-system)
9734 (arguments '(#:tests? #f)) ; XXX: requires internet access
9735 (home-page "http://www.dnspython.org")
9736 (synopsis "DNS toolkit for Python")
9737 (description
9738 "dnspython is a DNS toolkit for Python. It supports almost all record
9739types. It can be used for queries, zone transfers, and dynamic updates.
9740It supports TSIG authenticated messages and EDNS0.")
9741 (license license:expat)))
9742
9743(define-public python2-dnspython
9744 (package-with-python2 python-dnspython))
9745
9746(define-public python-email-validator
9747 (package
9748 (name "python-email-validator")
9749 (version "1.0.2")
9750 (source
9751 (origin (method url-fetch)
9752 (uri (pypi-uri "email_validator" version))
9753 (sha256
9754 (base32
9755 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
9756 (build-system python-build-system)
9757 (arguments
9758 '(#:phases
9759 (modify-phases %standard-phases
9760 (add-before 'build 'use-dnspython
9761 (lambda _
9762 (substitute* "setup.py"
9763 (("dnspython3") "dnspython"))
9764 #t)))))
9765 (propagated-inputs
9766 `(("python-dnspython" ,python-dnspython)
9767 ("python-idna" ,python-idna)))
9768 (home-page "https://github.com/JoshData/python-email-validator")
9769 (synopsis "Email address validation library for Python")
9770 (description
9771 "This library validates email address syntax and deliverability.")
9772 (license license:cc0)))
9773
9774(define-public python2-email-validator
9775 (package-with-python2 python-email-validator))
9776
9777(define-public python-ukpostcodeparser
9778 (package
9779 (name "python-ukpostcodeparser")
9780 (version "1.0.3")
9781 (source (origin
9782 (method url-fetch)
9783 (uri (pypi-uri "UkPostcodeParser" version))
9784 (sha256
9785 (base32
9786 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
9787 (build-system python-build-system)
9788 (home-page "https://github.com/hamstah/ukpostcodeparser")
9789 (synopsis "UK Postcode parser for Python")
9790 (description
9791 "This library provides the @code{parse_uk_postcode} function for
9792parsing UK postcodes.")
9793 (license license:expat)))
9794
9795(define-public python2-ukpostcodeparser
9796 (package-with-python2 python-ukpostcodeparser))
9797
9798(define-public python-faker
9799 (package
9800 (name "python-faker")
9801 (version "0.7.9")
9802 (source (origin
9803 (method url-fetch)
9804 (uri (pypi-uri "Faker" version))
9805 (sha256
9806 (base32
9807 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
9808 (patches
9809 (search-patches "python-faker-fix-build-32bit.patch"))
9810 (modules '((guix build utils)))
9811 (snippet
9812 '(begin
9813 (for-each delete-file (find-files "." "\\.pyc$"))
9814 #t))))
9815 (build-system python-build-system)
9816 (arguments
9817 '(#:phases
9818 (modify-phases %standard-phases
9819 (replace 'check
49ff8827 9820 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
44d10b1f
RW
9821 (native-inputs
9822 `(;; For testing
9823 ("python-email-validator" ,python-email-validator)
9824 ("python-mock" ,python-mock)
9825 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
9826 (propagated-inputs
9827 `(("python-dateutil" ,python-dateutil)
9828 ("python-six" ,python-six)))
9829 (home-page "https://github.com/joke2k/faker")
9830 (synopsis "Python package that generates fake data")
9831 (description
9832 "Faker is a Python package that generates fake data such as names,
9833addresses, and phone numbers.")
9834 (license license:expat)
9835 (properties `((python2-variant . ,(delay python2-faker))))))
9836
9837(define-public python2-faker
9838 (let ((base (package-with-python2 (strip-python2-variant
9839 python-faker))))
9840 (package
9841 (inherit base)
9842 (propagated-inputs
9843 `(("python2-ipaddress" ,python2-ipaddress)
9844 ,@(package-propagated-inputs base))))))
9845
9846(define-public python-pyaml
9847 (package
9848 (name "python-pyaml")
9849 (version "18.11.0")
9850 (source (origin
9851 (method url-fetch)
9852 (uri (pypi-uri "pyaml" version))
9853 (sha256
9854 (base32
9855 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
9856 (build-system python-build-system)
9857 (native-inputs
9858 `(("python-unidecode" ,python-unidecode)))
9859 (propagated-inputs
9860 `(("python-pyyaml" ,python-pyyaml)))
9861 (home-page "https://github.com/mk-fg/pretty-yaml")
9862 (synopsis "YAML pretty-print library for Python")
9863 (description
9864 "pyaml is a PyYAML based python module to produce pretty and readable
9865YAML-serialized data.")
9866 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
9867
9868(define-public python2-pyaml
9869 (package-with-python2 python-pyaml))
9870
9871(define-public python-backpack
9872 (package
9873 (name "python-backpack")
9874 (version "0.1")
9875 (source
9876 (origin
9877 (method url-fetch)
9878 (uri (pypi-uri "backpack" version))
9879 (sha256
9880 (base32
9881 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
9882 (build-system python-build-system)
9883 (native-inputs
9884 `(("python-pytest" ,python-pytest)
9885 ("python-nose" ,python-nose)))
9886 (propagated-inputs
9887 `(("python-simplejson" ,python-simplejson)))
9888 (home-page "https://github.com/sdispater/backpack")
9889 (synopsis "Utilities for working with Python collections")
9890 (description "Backpack provides some useful utilities for working with
9891collections of data.")
9892 (license license:expat)))
9893
9894(define-public python2-backpack
9895 (package-with-python2 python-backpack))
9896
9897(define-public python-prompt-toolkit
9898 (package
9899 (name "python-prompt-toolkit")
9900 (version "2.0.7")
9901 (source
9902 (origin
9903 (method url-fetch)
9904 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
9905 (sha256
9906 (base32
9907 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
9908 (build-system python-build-system)
9909 (arguments
9910 `(#:phases
9911 (modify-phases %standard-phases
9912 (delete 'check)
9913 (add-after 'install 'post-install-check
9914 (lambda* (#:key inputs outputs #:allow-other-keys)
9915 ;; HOME is needed for the test
9916 ;; "test_pathcompleter_can_expanduser".
9917 (setenv "HOME" "/tmp")
9918 (add-installed-pythonpath inputs outputs)
9919 (invoke "py.test"))))))
9920 (propagated-inputs
9921 `(("python-wcwidth" ,python-wcwidth)
9922 ("python-six" ,python-six)
9923 ("python-pygments" ,python-pygments)))
9924 (native-inputs
9925 `(("python-pytest" ,python-pytest)))
9926 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
9927 (synopsis "Library for building command line interfaces in Python")
9928 (description
9929 "Prompt-Toolkit is a library for building interactive command line
9930interfaces in Python. It's like GNU Readline but it also features syntax
9931highlighting while typing, out-of-the-box multi-line input editing, advanced
9932code completion, incremental search, support for Chinese double-width
9933characters, mouse support, and auto suggestions.")
9934 (license license:bsd-3)))
9935
9936(define-public python2-prompt-toolkit
9937 (package-with-python2 python-prompt-toolkit))
9938
9939(define-public python-prompt-toolkit-1
9940 (package (inherit python-prompt-toolkit)
9941 (version "1.0.15")
9942 (source
9943 (origin
9944 (method url-fetch)
9945 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
9946 (sha256
9947 (base32
9948 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
9949
9950(define-public python2-prompt-toolkit-1
9951 (package-with-python2 python-prompt-toolkit-1))
9952
9953(define-public python-jedi
9954 (package
9955 (name "python-jedi")
40bd0aa3 9956 (version "0.13.2")
44d10b1f
RW
9957 (source
9958 (origin
9959 (method url-fetch)
9960 (uri (pypi-uri "jedi" version))
9961 (sha256
9962 (base32
40bd0aa3 9963 "1za944msp0f8x36qa8l309jhv0kzlsdh7r9nj3z12y8npnsh45sp"))))
44d10b1f
RW
9964 (build-system python-build-system)
9965 (arguments
40bd0aa3 9966 `( ;; Many tests are failing with Python 3.7.x as of version 0.13.2 (see:
44d10b1f
RW
9967 ;; https://github.com/davidhalter/jedi/issues/1263)
9968 #:tests? #f
9969 #:phases
9970 (modify-phases %standard-phases
9971 (replace 'check
9972 (lambda* (#:key tests? #:allow-other-keys)
9973 (when tests?
9974 (invoke "py.test" "-vv")))))))
9975 (native-inputs
9976 `(("python-pytest" ,python-pytest)
9977 ("python-docopt" ,python-docopt)))
9978 (propagated-inputs
9979 `(("python-parso" ,python-parso)))
9980 (home-page "https://github.com/davidhalter/jedi")
9981 (synopsis "Autocompletion and static analysis library for Python")
9982 (description
9983 "Jedi is a static analysis tool for Python that can be used in Integrated
9984Development Environments (@dfn{IDE}s) and text editors. It understands Python
9985on a deeper level than many other static analysis frameworks for Python.
9986
9987Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
9988well.")
9989 (license license:expat)))
9990
9991(define-public python2-jedi
9992 (package-with-python2 python-jedi))
9993
9994(define-public ptpython
9995 (package
9996 (name "ptpython")
9997 (version "0.34")
9998 (source (origin
9999 (method url-fetch)
10000 (uri (pypi-uri "ptpython" version))
10001 (sha256
10002 (base32
10003 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10004 (build-system python-build-system)
10005 (arguments
10006 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
10007 (propagated-inputs
10008 `(("python-docopt" ,python-docopt)
10009 ("python-jedi" ,python-jedi)
10010 ("python-prompt-toolkit" ,python-prompt-toolkit)
10011 ("python-pygments" ,python-pygments)))
10012 (home-page "https://github.com/jonathanslenders/ptpython")
10013 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10014 (description
10015 "ptpython is a Python read-eval-print loop with IDE-like features.
10016It supports syntax highlighting, multiline editing, autocompletion, mouse,
10017color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10018etc.")
10019 (license license:bsd-3)
10020 (properties `((python2-variant . ,(delay ptpython-2))))))
10021
10022(define-public ptpython-2
10023 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10024 (package
10025 (inherit base)
10026 (name "ptpython2"))))
10027
10028(define-public python-stem
10029 (package
10030 (name "python-stem")
10031 (version "1.7.0")
10032 (source
10033 (origin
10034 (method url-fetch)
10035 (uri (pypi-uri "stem" version))
10036 (sha256
10037 (base32
10038 "1awiglfiajnx2hva9aqpj3fmdvdb4qg7cwnlfyih827m68y3cq8v"))))
10039 (build-system python-build-system)
10040 (arguments
10041 `(#:phases
10042 (modify-phases %standard-phases
10043 (replace 'check
10044 (lambda _
10045 (invoke "./run_tests.py" "--unit")
10046 #t)))))
10047 (native-inputs
10048 `(("python-mock" ,python-mock)
10049 ("python-pycodestyle" ,python-pycodestyle)
10050 ("python-pyflakes" ,python-pyflakes)))
10051 (home-page "https://stem.torproject.org/")
10052 (synopsis
10053 "Python controller library that allows applications to interact with Tor")
10054 (description
10055 "Stem is a Python controller library for Tor. With it you can use Tor's
10056control protocol to script against the Tor process and read descriptor data
10057relays publish about themselves.")
10058 (license license:lgpl3)))
10059
10060(define-public python2-stem
10061 (package-with-python2 python-stem))
10062
10063(define-public python-pyserial
10064 (package
10065 (name "python-pyserial")
10066 (version "3.1.1")
10067 (source
10068 (origin
10069 (method url-fetch)
10070 (uri (pypi-uri "pyserial" version))
10071 (sha256
10072 (base32
10073 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
10074 (build-system python-build-system)
10075 (arguments
10076 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
10077 ;; #:phases
10078 ;; (modify-phases %standard-phases
10079 ;; (replace 'check
10080 ;; (lambda _
10081 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
10082 (home-page
10083 "https://github.com/pyserial/pyserial")
10084 (synopsis "Python Serial Port Bindings")
10085 (description "@code{pyserial} provide serial port bindings for Python. It
10086supports different byte sizes, stop bits, parity and flow control with RTS/CTS
10087and/or Xon/Xoff. The port is accessed in RAW mode.")
10088 (license license:bsd-3)))
10089
10090(define-public python2-pyserial
10091 (package-with-python2 python-pyserial))
10092
10093(define-public python-kivy
10094 (package
10095 (name "python-kivy")
10096 (version "1.10.1")
10097 (source
10098 (origin
10099 (method url-fetch)
10100 (uri (pypi-uri "Kivy" version))
10101 (file-name (string-append name "-" version ".tar.gz"))
10102 (sha256
10103 (base32
10104 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
10105 (build-system python-build-system)
10106 (arguments
10107 `(#:tests? #f ; Tests require many optional packages
10108 #:phases
10109 (modify-phases %standard-phases
10110 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
10111 (lambda* (#:key inputs #:allow-other-keys)
10112 (setenv "KIVY_SDL2_PATH"
10113 (string-append (assoc-ref inputs "sdl-union")
10114 "/include/SDL2"))
10115 #t)))))
10116 (native-inputs
10117 `(("git" ,git)
10118 ("pkg-config" ,pkg-config)
10119 ("python-cython" ,python-cython)))
10120 (inputs
10121 `(("gstreamer" ,gstreamer)
10122 ("mesa" ,mesa)
10123 ("sdl-union"
10124 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
10125 (home-page "http://kivy.org")
10126 (synopsis
10127 "Multitouch application framework")
10128 (description
10129 "A software library for rapid development of
10130hardware-accelerated multitouch applications.")
10131 (license license:expat)))
10132
10133(define-public python2-kivy
10134 (package-with-python2 python-kivy))
10135
10136(define-public python-kivy-next
10137 (deprecated-package "python-kivy-next" python-kivy))
10138
10139(define-public python2-kivy-next
10140 (deprecated-package "python2-kivy-next" python2-kivy))
10141
10142(define-public python-binaryornot
10143 (package
10144 (name "python-binaryornot")
10145 (version "0.4.4")
10146 (source (origin
10147 (method url-fetch)
10148 (uri (pypi-uri "binaryornot" version))
10149 (sha256
10150 (base32
10151 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
10152 (build-system python-build-system)
10153 (propagated-inputs
10154 `(("python-chardet" ,python-chardet)
10155 ("python-hypothesis" ,python-hypothesis)))
10156 (home-page "https://github.com/audreyr/binaryornot")
10157 (synopsis "Package to check if a file is binary or text")
10158 (description "Ultra-lightweight pure Python package to check if a file is
10159binary or text.")
10160 (license license:bsd-3)
10161 (properties `((python2-variant . ,(delay python2-binaryornot))))))
10162
10163(define-public python2-binaryornot
10164 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
10165 (package (inherit base)
10166 (propagated-inputs
10167 `(("python2-enum34" ,python2-enum34)
10168 ,@(package-propagated-inputs base))))))
10169
10170(define-public python-nltk
10171 (package
10172 (name "python-nltk")
10173 (version "3.2.1")
10174 (source (origin
10175 (method url-fetch)
10176 (uri (pypi-uri "nltk" version))
10177 (sha256
10178 (base32
10179 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
10180 (build-system python-build-system)
10181 (arguments
10182 '(;; The tests require some extra resources to be downloaded.
10183 ;; TODO Try packaging these resources.
10184 #:tests? #f))
10185 (home-page "http://nltk.org/")
10186 (synopsis "Natural Language Toolkit")
10187 (description "It provides interfaces to over 50 corpora and lexical
10188resources such as WordNet, along with a suite of text processing libraries
10189for classification, tokenization, stemming, tagging, parsing, and semantic
10190reasoning, wrappers for natural language processing libraries.")
10191 (license license:asl2.0)))
10192
10193(define-public python2-nltk
10194 (package-with-python2 python-nltk))
10195
10196(define-public python-pymongo
10197 (package
10198 (name "python-pymongo")
10199 (version "3.7.2")
10200 (source (origin
10201 (method url-fetch)
10202 (uri (pypi-uri "pymongo" version))
10203 (sha256
10204 (base32
10205 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
10206 (build-system python-build-system)
10207 (propagated-inputs
10208 `(("python-certifi" ,python-certifi)))
10209 (home-page "https://github.com/mongodb/mongo-python-driver")
10210 (synopsis "Python driver for MongoDB")
10211 (description "Python driver for MongoDB.")
10212 (license license:asl2.0)))
10213
10214(define-public python2-pymongo
10215 (package-with-python2 python-pymongo))
10216
44d10b1f
RW
10217(define-public python-consul
10218 (package
10219 (name "python-consul")
10220 (version "0.6.1")
10221 (source
10222 (origin
10223 (method url-fetch)
10224 (uri (pypi-uri "python-consul" version))
10225 (sha256
10226 (base32
10227 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
10228 (build-system python-build-system)
10229 (arguments
10230 '(#:tests? #f)) ; The tests are not distributed
10231 (propagated-inputs
10232 `(("python-requests" ,python-requests)
10233 ("python-six" ,python-six)))
10234 (home-page "https://github.com/cablehead/python-consul")
10235 (synopsis "Python client for Consul")
10236 (description
10237 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
10238discovery, monitoring and configuration.")
10239 (license license:expat)))
10240
10241(define-public python2-consul
10242 (package-with-python2 python-consul))
10243
10244(define-public python-schematics
10245 (package
10246 (name "python-schematics")
10247 (version "1.1.1")
10248 (source
1961d187
TGR
10249 (origin
10250 (method git-fetch)
10251 (uri (git-reference
10252 (url "https://github.com/schematics/schematics.git")
10253 (commit (string-append "v" version))))
10254 (file-name (git-file-name name version))
10255 (sha256
10256 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
44d10b1f
RW
10257 (build-system python-build-system)
10258 (propagated-inputs
10259 `(("python-six" ,python-six)))
10260 (arguments
1961d187
TGR
10261 ;; The tests require a bunch of not very nice packages with fixed
10262 ;; version requirements (e.g. python-coveralls).
10263 `(#:tests? #f))
44d10b1f
RW
10264 (home-page "https://github.com/schematics/schematics")
10265 (synopsis "Python Data Structures for Humans")
10266 (description "Python Data Structures for Humans.")
10267 (license license:bsd-3)))
10268
10269(define-public python2-schematics
10270 (package-with-python2 python-schematics))
10271
10272(define-public python-odfpy
10273 (package
10274 (name "python-odfpy")
10275 (version "1.3.3")
10276 (source (origin
10277 (method url-fetch)
10278 (uri (pypi-uri "odfpy" version))
10279 (sha256
10280 (base32
10281 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
10282 (arguments
10283 `(#:modules ((srfi srfi-1)
10284 (guix build python-build-system)
10285 (guix build utils))
10286 #:phases
10287 (modify-phases %standard-phases
10288 (replace 'check
10289 ;; The test runner invokes python2 and python3 for test*.py.
10290 ;; To avoid having both in inputs, we replicate it here.
10291 (lambda _
21ccc01d
RW
10292 (for-each (lambda (test-file) (invoke "python" test-file))
10293 (find-files "tests" "^test.*\\.py$"))
10294 #t)))))
44d10b1f
RW
10295 (build-system python-build-system)
10296 (home-page "https://github.com/eea/odfpy")
10297 (synopsis "Python API and tools to manipulate OpenDocument files")
10298 (description "Collection of libraries and utility programs written in
10299Python to manipulate OpenDocument 1.2 files.")
10300 (license
10301 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
10302 ;; number of files with other licenses.
10303 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
10304
10305(define-public python2-odfpy
10306 (package-with-python2 python-odfpy))
10307
10308(define-public python-natsort
10309 (package
10310 (name "python-natsort")
10311 (version "5.4.1")
10312 (source (origin
10313 (method url-fetch)
10314 (uri (pypi-uri "natsort" version))
10315 (sha256
10316 (base32
10317 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
10318 (build-system python-build-system)
10319 (arguments
10320 `(#:modules ((guix build utils)
10321 (guix build python-build-system)
10322 (srfi srfi-1)
10323 (srfi srfi-26)
10324 (ice-9 ftw))
10325 #:phases
10326 (modify-phases %standard-phases
10327 (add-before 'check 'set-cachedir
10328 ;; Tests require write access to $HOME by default
10329 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
10330 (replace 'check
10331 (lambda _
10332 (let ((cwd (getcwd)))
10333 (setenv "PYTHONPATH"
10334 (string-append
10335 cwd "/build/"
10336 (find (cut string-prefix? "lib" <>)
10337 (scandir (string-append cwd "/build")))
10338 ":"
10339 (getenv "PYTHONPATH")))
10340 (invoke "pytest" "-v")))))))
10341 (native-inputs
10342 `(("python-hypothesis" ,python-hypothesis)
10343 ("python-pytest-cov" ,python-pytest-cov)
10344 ("python-pytest-mock" ,python-pytest-mock)
10345 ("python-pytest" ,python-pytest)))
10346 (propagated-inputs ; TODO: Add python-fastnumbers.
10347 `(("python-pyicu" ,python-pyicu)))
10348 (home-page "https://github.com/SethMMorton/natsort")
10349 (synopsis "Natural sorting for python and shell")
10350 (description
10351 "Natsort lets you apply natural sorting on lists instead of
10352lexicographical. If you use the built-in @code{sorted} method in python
36a4366d
EF
10353on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
10354@code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
10355@code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
10356identifies numbers and sorts them separately from strings. It can also sort
10357version numbers, real numbers, mixed types and more, and comes with a shell
10358command @command{natsort} that exposes this functionality in the command line.")
44d10b1f
RW
10359 (license license:expat)
10360 (properties `((python2-variant . ,(delay python2-natsort))))))
10361
10362(define-public python2-natsort
10363 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
10364 (package (inherit base)
10365 (native-inputs
10366 `(("python2-pathlib" ,python2-pathlib)
10367 ,@(package-native-inputs base))))))
10368
10369(define-public python-glances
10370 (package
10371 (name "python-glances")
10372 (version "3.0.2")
10373 (source
10374 (origin
10375 (method url-fetch)
10376 (uri (pypi-uri "Glances" version))
10377 (sha256
10378 (base32
10379 "09fxysfp1n16csqvzvawy74qm6a94nvwjf3vcf5gkqp4i6k4vjjy"))))
10380 (build-system python-build-system)
10381 (propagated-inputs
10382 `(("python-psutil" ,python-psutil)))
10383 (home-page
10384 "https://github.com/nicolargo/glances")
10385 (synopsis
10386 "A cross-platform curses-based monitoring tool")
10387 (description
10388 "Glances is a curses-based monitoring tool for a wide variety of platforms.
10389Glances uses the PsUtil library to get information from your system. It monitors
10390CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
10391 (license license:lgpl3+)))
10392
10393(define-public python2-glances
10394 (package-with-python2 python-glances))
10395
10396(define-public python-graphql-core
10397 (package
10398 (name "python-graphql-core")
10399 (version "0.5.3")
10400 (source
10401 (origin
10402 (method url-fetch)
10403 (uri (pypi-uri "graphql-core" version))
10404 (sha256
10405 (base32
10406 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
10407 (build-system python-build-system)
10408 (arguments
10409 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
10410 #:phases
10411 (modify-phases %standard-phases
10412 (add-after 'unpack 'patch-hardcoded-version
10413 (lambda _ (substitute*
10414 "setup.py"
10415 (("'gevent==1.1rc1'") "'gevent'"))
10416 #t)))))
10417 (native-inputs
10418 `(("python-gevent" ,python-gevent)
10419 ("python-mock" ,python-mock)
10420 ("python-pytest-mock" ,python-pytest-mock)))
10421 (propagated-inputs
10422 `(("python-promise" ,python-promise)
10423 ("python-six" ,python-six)))
10424 (home-page "https://github.com/graphql-python/graphql-core")
10425 (synopsis "GraphQL implementation for Python")
10426 (description
10427 "GraphQL implementation for Python. GraphQL is a data query language and
10428runtime designed and used to request and deliver data to mobile and web apps.
10429This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
10430to Python.")
10431 (license license:expat)))
10432
10433(define-public python2-graphql-core
10434 (package-with-python2 python-graphql-core))
10435
10436(define-public python-graphql-relay
10437 (package
10438 (name "python-graphql-relay")
10439 (version "0.4.5")
10440 (source
10441 (origin
10442 (method url-fetch)
10443 (uri (pypi-uri "graphql-relay" version))
10444 (sha256
10445 (base32
10446 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
10447 (build-system python-build-system)
10448 (arguments
10449 '(#:tests? #f)) ; The tests are not distributed
10450 (propagated-inputs
10451 `(("python-graphql-core" ,python-graphql-core)
10452 ("python-promise" ,python-promise)
10453 ("python-six" ,python-six)))
10454 (home-page "https://github.com/graphql-python/graphql-relay-py")
10455 (synopsis "Relay implementation for Python")
10456 (description
10457 "This is a library to allow the easy creation of Relay-compliant servers
10458using the GraphQL Python reference implementation of a GraphQL server. It
10459should be noted that the code is a exact port of the original
10460@url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
10461from Facebook.")
10462 (license license:expat)))
10463
10464(define-public python2-graphql-relay
10465 (package-with-python2 python-graphql-relay))
10466
10467(define-public python-graphene
10468 (package
10469 (name "python-graphene")
10470 (version "0.10.2")
10471 (source
10472 (origin
10473 (method url-fetch)
10474 (uri (pypi-uri "graphene" version))
10475 (sha256
10476 (base32
10477 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
10478 (build-system python-build-system)
10479 (propagated-inputs
10480 `(("python-graphql-core" ,python-graphql-core)
10481 ("python-graphql-relay" ,python-graphql-relay)
10482 ("python-iso8601" ,python-iso8601)
10483 ("python-promise" ,python-promise)
10484 ("python-six" ,python-six)))
10485 (arguments
10486 `(#:tests? #f)) ; no tests/ in the PyPI tarball
10487 (home-page "http://graphene-python.org/")
10488 (synopsis "GraphQL Framework for Python")
10489 (description
10490 "Graphene is a Python library for building GraphQL schemas/types.
10491A GraphQL schema describes your data model, and provides a GraphQL server
10492with an associated set of resolve methods that know how to fetch data.")
10493 (properties `((python2-variant . ,(delay python2-graphene))))
10494 (license license:expat)))
10495
10496(define-public python2-graphene
10497 (let ((base (package-with-python2
10498 (strip-python2-variant python-graphene))))
10499 (package (inherit base)
10500 (native-inputs
10501 `(("python2-sqlalchemy" ,python2-sqlalchemy)
10502 ,@(package-native-inputs base))))))
10503
10504(define-public python-nautilus
10505 (package
10506 (name "python-nautilus")
10507 (version "0.4.9")
10508 (source
10509 (origin
10510 (method url-fetch)
10511 (uri (pypi-uri "nautilus" version))
10512 (sha256
10513 (base32
10514 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
10515 (build-system python-build-system)
10516 (arguments `(#:tests? #f)) ; fails to import test modules
10517 (propagated-inputs
10518 `(("python-bcrypt" ,python-bcrypt)
10519 ("python-click" ,python-click)
10520 ("python-consul" ,python-consul)
10521 ("python-graphene" ,python-graphene)
10522 ("python-jinja2" ,python-jinja2)
10523 ("python-peewee" ,python-peewee)
10524 ("python-pika" ,python-pika)
10525 ("python-tornado" ,python-tornado)
10526 ("python-wtforms" ,python-wtforms)))
10527 (native-inputs
10528 `(("python-nose2" ,python-nose2)))
10529 (home-page "https://github.com/AlecAivazis/nautilus")
10530 (synopsis "Library for creating microservice applications")
10531 (description
10532 "Nautilus is a framework for flux based microservices that looks to
10533provide extendible implementations of common aspects of a cloud so that you can
10534focus on building massively scalable web applications.")
10535 (license license:expat)))
10536
10537(define-public python-snowballstemmer
10538 (package
10539 (name "python-snowballstemmer")
10540 (version "1.2.1")
10541 (source (origin
10542 (method url-fetch)
10543 (uri (pypi-uri "snowballstemmer" version))
10544 (sha256
10545 (base32
10546 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
10547 (build-system python-build-system)
10548 (arguments
10549 `(;; No tests exist
10550 #:tests? #f))
10551 (home-page "https://github.com/shibukawa/snowball_py")
10552 (synopsis "Snowball stemming library collection for Python")
10553 (description "This package provides 16 word stemmer algorithms generated
10554from Snowball algorithms. It includes the 15 original ones plus the Poerter
10555English stemmer.")
10556 (license license:bsd-3)))
10557
10558(define-public python2-snowballstemmer
10559 (package-with-python2 python-snowballstemmer))
10560
10561(define-public python-sphinx-cloud-sptheme
10562 (package
10563 (name "python-sphinx-cloud-sptheme")
10564 (version "1.8.0")
10565 (source (origin
10566 (method url-fetch)
10567 (uri (pypi-uri "cloud_sptheme" version))
10568 (sha256
10569 (base32
10570 "1dniqb6a39yh786f86c4jn666rwnyi1jvzn4616zhcchb7sfdshd"))))
10571 (build-system python-build-system)
10572 ;; FIXME: The 'pypi' release archive does not contain tests.
10573 (arguments '(#:tests? #f))
10574 (native-inputs
10575 `(("python-sphinx" ,python-sphinx)))
10576 (home-page "https://bitbucket.org/ecollins/cloud_sptheme")
10577 (synopsis "'Cloud' theme for Sphinx documenter")
10578 (description "This package contains the \"Cloud\" theme for Sphinx and some
10579related extensions.")
10580 (license license:bsd-3)))
10581
10582(define-public python2-sphinx-cloud-sptheme
10583 (package-with-python2 python-sphinx-cloud-sptheme))
10584
10585(define-public python-sphinx-alabaster-theme
10586 (package
10587 (name "python-sphinx-alabaster-theme")
10588 (version "0.7.12")
10589 (source (origin
10590 (method url-fetch)
10591 (uri (pypi-uri "alabaster" version))
10592 (sha256
10593 (base32
10594 "00nwwjj2d2ym4s2kk217x7jkx1hnczc3fvm8yxbqmsp6b0nxfqd6"))))
10595 (build-system python-build-system)
10596 (propagated-inputs
10597 `(("python-pygments" ,python-pygments)))
10598 (home-page "https://alabaster.readthedocs.io/")
10599 (synopsis "Configurable sidebar-enabled Sphinx theme")
10600 (description "Alabaster is a visually (c)lean, responsive, configurable
10601theme for the Sphinx documentation system. It's the default theme of Sphinx.")
10602 (license license:bsd-3)))
10603
10604(define-public python2-sphinx-alabaster-theme
10605 (package-with-python2 python-sphinx-alabaster-theme))
10606
10607(define-public python-setproctitle
10608(package
10609 (name "python-setproctitle")
10610 (version "1.1.10")
10611 (source
10612 (origin
10613 (method url-fetch)
10614 (uri (pypi-uri "setproctitle" version))
10615 (sha256
10616 (base32
10617 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
10618 (build-system python-build-system)
10619 (arguments
10620 '(#:phases
10621 (modify-phases %standard-phases
10622 (add-before 'check 'patch-Makefile
10623 ;; Stricly this is only required for the python2 variant.
10624 ;; But adding a phase in an inherited package seems to be
10625 ;; cumbersum. So we patch even for python3.
10626 (lambda _
10627 (let ((nose (assoc-ref %build-inputs "python2-nose")))
10628 (when nose
10629 (substitute* "Makefile"
10630 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
10631 (string-append nose "/bin/nosetests "))))
10632 #t)))
10633 (replace 'check
10634 (lambda _
10635 (setenv "PYTHON" (or (which "python3") (which "python")))
10636 (setenv "PYCONFIG" (or (which "python3-config")
10637 (which "python-config")))
10638 (setenv "CC" "gcc")
10639 ;; No need to extend PYTHONPATH to find the built package, since
10640 ;; the Makefile will build anyway
10641 (invoke "make" "check"))))))
10642 (native-inputs
10643 `(("procps" ,procps))) ; required for tests
10644 (home-page
10645 "https://github.com/dvarrazzo/py-setproctitle")
10646 (synopsis
10647 "Setproctitle implementation for Python to customize the process title")
10648 (description "The library allows a process to change its title (as displayed
10649by system tools such as ps and top).
10650
10651Changing the title is mostly useful in multi-process systems, for
10652example when a master process is forked: changing the children's title
10653allows to identify the task each process is busy with. The technique
10654is used by PostgreSQL and the OpenSSH Server for example.")
10655 (license license:bsd-3)
10656 (properties `((python2-variant . ,(delay python2-setproctitle))))))
10657
10658(define-public python2-setproctitle
10659 (let ((base (package-with-python2
10660 (strip-python2-variant python-setproctitle))))
10661 (package
10662 (inherit base)
10663 (native-inputs `(("python2-nose" ,python2-nose)
10664 ,@(package-native-inputs base))))))
10665
10666(define-public python-validictory
10667 (package
10668 (name "python-validictory")
10669 (version "1.0.1")
10670 (source
10671 (origin
10672 (method url-fetch)
10673 (uri (pypi-uri "validictory" version))
10674 (sha256
10675 (base32
10676 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
10677 (build-system python-build-system)
10678 (arguments
10679 '(#:phases
10680 (modify-phases %standard-phases
10681 (add-after 'unpack 'bootstrap
10682 ;; Move the tests out of the package directory to avoid
10683 ;; packaging them.
10684 (lambda* _
10685 (rename-file "validictory/tests" "tests")
10686 (delete-file "tests/__init__.py")))
10687 (replace 'check
10688 (lambda _
10689 ;; Extend PYTHONPATH so the built package will be found.
10690 (setenv "PYTHONPATH"
10691 (string-append (getcwd) "/build/lib:"
10692 (getenv "PYTHONPATH")))
6568bd5d 10693 (invoke "py.test" "-vv" ))))))
44d10b1f
RW
10694 (native-inputs
10695 `(("python-pytest" ,python-pytest)))
10696 (home-page
10697 "https://github.com/jamesturk/validictory")
10698 (synopsis "General purpose Python data validator")
10699 (description "It allows validation of arbitrary Python data structures.
10700
10701The schema format is based on the JSON Schema
10702proposal (http://json-schema.org), so combined with json the library is also
10703useful as a validator for JSON data.")
10704 (license license:expat)))
10705
10706(define-public python2-validictory
10707 (package-with-python2 python-validictory))
10708
10709(define-public python-pyelftools
10710 (package
10711 (name "python-pyelftools")
10712 (version "0.25")
10713 (source
10714 (origin
10715 (method url-fetch)
10716 (uri (pypi-uri "pyelftools" version))
10717 (sha256
10718 (base32
10719 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
10720 (build-system python-build-system)
10721 (arguments
10722 `(#:phases
10723 (modify-phases %standard-phases
10724 (add-before 'check 'set-pythonpath
10725 (lambda _
10726 (setenv "PYTHONPATH"
10727 (string-append
10728 (getcwd) "/test/"
10729 ":" (getenv "PYTHONPATH")))
10730 #t)))))
10731 (home-page
10732 "https://github.com/eliben/pyelftools")
10733 (synopsis
10734 "Analyze binary and library file information")
10735 (description "This Python library provides interfaces for parsing and
10736analyzing two binary and library file formats; the Executable and Linking
10737Format (ELF), and debugging information in the Debugging With Attributed
10738Record Format (DWARF).")
10739 (license license:public-domain)))
10740
10741(define-public python-pyev
10742 (package
10743 (name "python-pyev")
10744 (version "0.9.0")
10745 (source
10746 (origin
10747 (method url-fetch)
10748 (uri (pypi-uri "pyev" version))
10749 (sha256
10750 (base32
10751 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
10752 (build-system python-build-system)
10753 (arguments
10754 `(#:tests? #f ; no test suite
10755 #:phases
10756 (modify-phases %standard-phases
10757 (add-after 'unpack 'patch
10758 (lambda* (#:key inputs #:allow-other-keys)
10759 (let ((libev (string-append (assoc-ref inputs "libev")
10760 "/lib/libev.so.4")))
10761 (substitute* "setup.py"
10762 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
10763 (string-append "libev_dll_name = \"" libev "\"")))))))))
10764 (inputs
10765 `(("libev" ,libev)))
10766 (home-page "http://pythonhosted.org/pyev/")
10767 (synopsis "Python libev interface")
10768 (description "Pyev provides a Python interface to libev.")
10769 (license license:gpl3)))
10770
10771(define-public python2-pyev
10772 (package-with-python2 python-pyev))
10773
10774(define-public python-imagesize
10775 (package
10776 (name "python-imagesize")
10777 (version "1.1.0")
10778 (source
10779 (origin
10780 (method url-fetch)
10781 (uri (pypi-uri "imagesize" version))
10782 (sha256
10783 (base32
10784 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
10785 (build-system python-build-system)
10786 (home-page "https://github.com/shibukawa/imagesize_py")
10787 (synopsis "Gets image size of files in various formats in Python")
10788 (description
10789 "This package allows determination of image size from
10790PNG, JPEG, JPEG2000 and GIF files in pure Python.")
10791 (license license:expat)))
10792
10793(define-public python2-imagesize
10794 (package-with-python2 python-imagesize))
10795
10796(define-public python-termstyle
10797 (package
10798 (name "python-termstyle")
10799 (version "0.1.11")
10800 (source
10801 (origin
10802 (method url-fetch)
10803 (uri (pypi-uri "termstyle" version))
10804 (sha256
10805 (base32
10806 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
10807 (build-system python-build-system)
10808 (arguments
10809 '(#:phases
10810 (modify-phases %standard-phases
10811 (replace 'check
10812 (lambda _
831080a6 10813 (invoke "python" "test3.py"))))))
44d10b1f
RW
10814 (home-page "https://github.com/gfxmonk/termstyle")
10815 (synopsis "Console text coloring for Python")
10816 (description "This package provides console text coloring for Python.")
10817 (license license:bsd-3)))
10818
10819(define-public python-argcomplete
10820 (package
10821 (name "python-argcomplete")
10822 (version "1.7.0")
10823 (source
10824 (origin
10825 (method url-fetch)
10826 (uri (pypi-uri "argcomplete" version))
10827 (sha256
10828 (base32
10829 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
10830 (build-system python-build-system)
10831 (native-inputs
10832 `(("python-pexpect" ,python-pexpect)
10833 ("tcsh" ,tcsh)
10834 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
10835 (home-page "https://github.com/kislyuk/argcomplete")
10836 (synopsis "Shell tab completion for Python argparse")
10837 (description "argcomplete provides extensible command line tab completion
10838of arguments and options for Python scripts using @code{argparse}. It's
10839particularly useful for programs with many options or sub-parsers that can
10840dynamically suggest completions; for example, when browsing resources over the
10841network.")
10842 (license license:asl2.0)))
10843
10844(define-public python2-argcomplete
10845 (package-with-python2 python-argcomplete))
10846
10847(define-public python-xopen
10848 (package
10849 (name "python-xopen")
24d64989 10850 (version "0.5.0")
44d10b1f
RW
10851 (source
10852 (origin
10853 (method url-fetch)
10854 (uri (pypi-uri "xopen" version))
10855 (sha256
10856 (base32
24d64989 10857 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
44d10b1f 10858 (build-system python-build-system)
24d64989
RW
10859 (propagated-inputs
10860 `(("python-setuptools-scm" ,python-setuptools-scm)))
44d10b1f
RW
10861 (home-page "https://github.com/marcelm/xopen/")
10862 (synopsis "Open compressed files transparently")
10863 (description "This module provides an @code{xopen} function that works like
10864Python's built-in @code{open} function, but can also deal with compressed files.
10865Supported compression formats are gzip, bzip2 and, xz, and are automatically
10866recognized by their file extensions. The focus is on being as efficient as
10867possible on all supported Python versions.")
10868 (license license:expat)))
10869
10870(define-public python2-xopen
10871 (let ((base (package-with-python2
10872 (strip-python2-variant python-xopen))))
10873 (package
10874 (inherit base)
10875 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
10876 ,@(package-propagated-inputs base))))))
10877
10878(define-public python-cheetah
10879 (package
10880 (name "python-cheetah")
10881 (version "3.1.0")
10882 (source
10883 (origin
10884 (method url-fetch)
10885 (uri (pypi-uri "Cheetah3" version))
10886 (sha256
10887 (base32
10888 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
10889 (build-system python-build-system)
10890 (arguments
10891 `(#:modules ((guix build utils)
10892 (guix build python-build-system)
10893 (ice-9 ftw)
10894 (srfi srfi-1)
10895 (srfi srfi-26))
10896 #:phases (modify-phases %standard-phases
10897 (add-after 'unpack 'use-absolute-python
10898 (lambda _
10899 (substitute* "Cheetah/CheetahWrapper.py"
10900 (("#!/usr/bin/env python")
10901 (string-append "#!" (which "python"))))
10902 #t))
10903 (replace 'check
10904 (lambda _
10905 (let ((cwd (getcwd)))
10906 (setenv "PYTHONPATH"
10907 (string-append
10908 cwd "/build/"
10909 (find (cut string-prefix? "lib" <>)
10910 (scandir (string-append cwd "/build")))
10911 ":" (getenv "PYTHONPATH")))
10912 (setenv "PATH"
10913 (string-append (getenv "PATH")
10914 ":" cwd "/bin"))
10915 (setenv "TMPDIR" "/tmp")
10916
10917 (substitute* "Cheetah/Tests/Test.py"
10918 (("unittest.TextTestRunner\\(\\)")
10919 "unittest.TextTestRunner(verbosity=2)"))
10920
10921 (invoke "python" "Cheetah/Tests/Test.py")))))))
10922 (propagated-inputs
10923 `(("python-markdown" ,python-markdown))) ;optional
10924 (home-page "http://cheetahtemplate.org/")
10925 (synopsis "Template engine")
10926 (description "Cheetah is a text-based template engine and Python code
10927generator.
10928
10929Cheetah can be used as a standalone templating utility or referenced as
10930a library from other Python applications. It has many potential uses,
10931but web developers looking for a viable alternative to ASP, JSP, PHP and
10932PSP are expected to be its principle user group.
10933
10934Features:
10935@enumerate
10936@item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
10937 text-based format.
10938@item Cleanly separates content, graphic design, and program code.
10939@item Blends the power and flexibility of Python with a simple template language
10940 that non-programmers can understand.
10941@item Gives template writers full access to any Python data structure, module,
10942 function, object, or method in their templates.
10943@item Makes code reuse easy by providing an object-orientated interface to
10944 templates that is accessible from Python code or other Cheetah templates.
10945 One template can subclass another and selectively reimplement sections of it.
10946@item Provides a simple, yet powerful, caching mechanism that can dramatically
10947 improve the performance of a dynamic website.
10948@item Compiles templates into optimized, yet readable, Python code.
10949@end enumerate")
10950 (license (license:x11-style "file://LICENSE"))))
10951
10952(define-public python2-cheetah
10953 (package-with-python2 python-cheetah))
10954
10955(define-public python-dulwich
10956 (package
10957 (name "python-dulwich")
10958 (version "0.18.6")
10959 (source
10960 (origin
10961 (method url-fetch)
10962 (uri (list (string-append "https://www.dulwich.io/releases/"
10963 "dulwich-" version ".tar.gz")
10964 (pypi-uri "dulwich" version)))
10965 (sha256
10966 (base32
10967 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
10968 (build-system python-build-system)
10969 (arguments
10970 `(#:phases
10971 (modify-phases %standard-phases
10972 (add-before 'check 'fix-tests
10973 (lambda* (#:key inputs #:allow-other-keys)
10974 ;; The tests use Popen with a custom environment which doesn't
10975 ;; include PATH.
10976 (substitute* "dulwich/tests/compat/utils.py"
10977 (("'git'") (string-append "'"
10978 (which "git")
10979 "'")))
10980 (substitute* '("dulwich/tests/test_repository.py"
10981 "dulwich/tests/test_hooks.py")
10982 (("#!/bin/sh") (string-append "#!" (which "sh"))))
10983 (setenv "TEST_RUNNER" "unittest")
10984 (setenv "PYTHONHASHSEED" "random")
10985 #t)))))
10986 (propagated-inputs
10987 `(("python-fastimport" ,python-fastimport)))
10988 (native-inputs
10989 `(("python-mock" ,python-mock)
10990 ("python-geventhttpclient" ,python-geventhttpclient)
10991 ("git" ,git)))
10992 (home-page "https://www.dulwich.io/")
10993 (synopsis "Git implementation in Python")
10994 (description "Dulwich is an implementation of the Git file formats and
10995protocols written in pure Python.")
10996 ;; Can be used with either license.
10997 (license (list license:asl2.0 license:gpl2+))))
10998
10999(define-public python2-dulwich
11000 (package-with-python2 python-dulwich))
11001
11002(define-public python-pbkdf2
11003 (package
11004 (name "python-pbkdf2")
11005 (version "1.3")
11006 (source
11007 (origin
11008 (method url-fetch)
11009 (uri (pypi-uri "pbkdf2" version))
11010 (sha256
11011 (base32
11012 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
11013 (build-system python-build-system)
11014 (arguments
11015 '(#:phases
11016 (modify-phases %standard-phases
11017 (replace 'check
11018 (lambda _
11019 (setenv "PYTHONPATH"
11020 (string-append (getcwd) "/build/lib:"
11021 (getenv "PYTHONPATH")))
ee2bb944 11022 (invoke "python" "test/test_pbkdf2.py"))))))
44d10b1f
RW
11023 (propagated-inputs
11024 `(("python-pycrypto" ,python-pycrypto))) ; optional
11025 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
11026 (synopsis "Password-based key derivation")
11027 (description "This module implements the password-based key derivation
11028function, PBKDF2, specified in RSA PKCS#5 v2.0.
11029
11030PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
11031is part of the RSA Public Key Cryptography Standards series. The provided
11032implementation takes a password or a passphrase and a salt value (and
11033optionally a iteration count, a digest module, and a MAC module) and provides
11034a file-like object from which an arbitrarly-sized key can be read.")
11035 (license license:expat)))
11036
11037(define-public python2-pbkdf2
11038 (package-with-python2 python-pbkdf2))
11039
11040(define-public python-qrcode
11041 (package
11042 (name "python-qrcode")
217ea1a1 11043 (version "6.1")
44d10b1f
RW
11044 (source
11045 (origin
11046 (method url-fetch)
11047 (uri (pypi-uri "qrcode" version))
11048 (sha256
217ea1a1 11049 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
44d10b1f
RW
11050 (build-system python-build-system)
11051 (arguments
11052 ;; FIXME: Tests require packaging 'pymaging'.
11053 '(#:tests? #f))
11054 (propagated-inputs
11055 `(("python-lxml" ,python-lxml) ; for SVG output
11056 ("python-pillow" ,python-pillow) ; for PNG output
11057 ("python-six" ,python-six)))
44d10b1f
RW
11058 (home-page "https://github.com/lincolnloop/python-qrcode")
11059 (synopsis "QR Code image generator")
11060 (description "This package provides a pure Python QR Code generator
11061module. It uses the Python Imaging Library (PIL) to allow for the generation
11062of QR Codes.
11063
11064In addition this package provides a command line tool to generate QR codes and
11065either write these QR codes to a file or do the output as ascii art at the
11066console.")
11067 (license license:bsd-3)))
11068
11069(define-public python2-qrcode
11070 (package-with-python2 python-qrcode))
11071
11072(define-public python-rst2ansi
11073 (package
11074 (name "python-rst2ansi")
11075 (version "0.1.5")
11076 (source
11077 (origin
11078 (method url-fetch)
11079 (uri (pypi-uri "rst2ansi" version))
11080 (sha256
11081 (base32
11082 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
11083 (build-system python-build-system)
11084 (propagated-inputs
11085 `(("python-docutils" ,python-docutils)))
11086 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
11087 (synopsis "Convert RST to ANSI-decorated console output")
11088 (description
11089 "Python module dedicated to rendering RST (reStructuredText) documents
11090to ansi-escaped strings suitable for display in a terminal.")
11091 (license license:expat)))
11092
11093(define-public python-ansi2html
11094 (package
11095 (name "python-ansi2html")
11096 (version "1.2.0")
11097 (source
11098 (origin
11099 (method url-fetch)
11100 (uri (pypi-uri "ansi2html" version))
11101 (sha256
11102 (base32
11103 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
11104 (build-system python-build-system)
11105 (native-inputs
11106 `(("python-mock" ,python-mock)
11107 ("python-nose" ,python-nose)))
11108 (propagated-inputs
11109 `(("python-six" ,python-six)))
11110 (home-page "https://github.com/ralphbean/ansi2html")
11111 (synopsis "Convert ANSI-decorated console output to HTML")
11112 (description
11113 "@command{ansi2html} is a Python library and command line utility for
11114convering text with ANSI color codes to HTML or LaTeX.")
11115 (license license:gpl3+)))
11116
11117(define-public python2-ansi2html
11118 (package-with-python2 python-ansi2html))
11119
11120(define-public python-ddt
11121 (package
11122 (name "python-ddt")
11123 (version "1.1.3")
11124 (source
11125 (origin
11126 (method url-fetch)
11127 (uri (pypi-uri "ddt" version))
11128 (sha256
11129 (base32
11130 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
11131 (build-system python-build-system)
11132 (native-inputs
11133 `(("python-mock" ,python-mock)
11134 ("python-nose" ,python-nose)))
11135 (propagated-inputs
11136 `(("python-six" ,python-six)
11137 ("python-pyyaml" ,python-pyyaml)))
11138 (home-page "https://github.com/txels/ddt")
11139 (synopsis "Data-Driven Tests")
11140 (description
11141 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
11142running it with different test data, and make it appear as multiple test
11143cases.")
11144 (license license:expat)))
11145
11146(define-public python2-ddt
11147 (package-with-python2 python-ddt))
11148
11149(define-public python-pycountry
11150 (package
11151 (name "python-pycountry")
11152 (version "18.5.26")
11153 (source
11154 (origin
11155 (method url-fetch)
11156 (uri (pypi-uri "pycountry" version))
11157 (sha256
11158 (base32
11159 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
11160 (build-system python-build-system)
11161 (home-page "https://bitbucket.org/flyingcircus/pycountry")
11162 (synopsis "ISO databases for languages, countries, currencies, etc.")
11163 (description
11164 "@code{pycountry} provides the ISO databases for the standards:
11165@enumerate
11166@item 639-3 (Languages)
11167@item 3166 (Countries)
11168@item 3166-3 (Deleted Countries)
11169@item 3166-2 (Subdivisions of countries)
11170@item 4217 (Currencies)
11171@item 15924 (Scripts)
11172@end enumerate
11173It includes a copy from Debian’s pkg-isocodes and makes the data accessible
11174through a Python API.")
11175 (license license:lgpl2.1+)))
11176
11177(define-public python2-pycountry
11178 (package-with-python2 python-pycountry))
11179
11180(define-public python-pycosat
11181 (package
11182 (name "python-pycosat")
11183 (version "0.6.1")
11184 (source
11185 (origin
11186 (method url-fetch)
11187 (uri (pypi-uri "pycosat" version))
11188 (sha256
11189 (base32
11190 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
11191 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
11192 (build-system python-build-system)
11193 (home-page "https://github.com/ContinuumIO/pycosat")
11194 (synopsis "Bindings to picosat (a SAT solver)")
11195 (description
11196 "This package provides efficient Python bindings to @code{picosat} on
11197the C level. When importing pycosat, the @code{picosat} solver becomes part
11198of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
11199Problem} (SAT) solver.")
11200 (license license:expat)))
11201
11202(define-public python2-pycosat
11203 (package-with-python2 python-pycosat))
11204
11205(define-public python2-ruamel.ordereddict
11206 (package
11207 (name "python2-ruamel.ordereddict")
11208 (version "0.4.9")
11209 (source
11210 (origin
11211 (method url-fetch)
11212 (uri (pypi-uri "ruamel.ordereddict" version))
11213 (sha256
11214 (base32
11215 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
11216 (build-system python-build-system)
11217 (arguments
11218 `(#:python ,python-2
11219 #:phases
11220 (modify-phases %standard-phases
11221 (delete 'check)
11222 (add-after 'install 'check
11223 (lambda* (#:key inputs outputs #:allow-other-keys)
11224 (add-installed-pythonpath inputs outputs)
f987ac30 11225 (invoke "python" "test/testordereddict.py"))))))
44d10b1f
RW
11226 (home-page "https://bitbucket.org/ruamel/ordereddict")
11227 (synopsis "Version of dict that keeps keys in insertion order")
11228 (description
11229 "This is an implementation of an ordered dictionary with @dfn{Key
11230Insertion Order} (KIO: updates of values do not affect the position of the
11231key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
11232removed and put at the back). The standard library module @code{OrderedDict},
11233implemented later, implements a subset of @code{ordereddict} functionality.
11234Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
11235Order} (KSO, no sorting function can be specified, but a transform can be
11236specified to apply on the key before comparison (e.g. @code{string.lower})).")
11237 (license license:expat)))
11238
11239(define-public python-pypeg2
11240 (package
11241 (name "python-pypeg2")
11242 (version "2.15.2")
11243 (source
11244 (origin
11245 (method url-fetch)
11246 (uri (pypi-uri "pyPEG2" version))
11247 (sha256
11248 (base32
11249 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
11250 (build-system python-build-system)
11251 (propagated-inputs `(("python-lxml" ,python-lxml)))
11252 (arguments
11253 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
11254 '(#:tests? #f))
11255 (home-page "https://fdik.org/pyPEG/")
11256 (synopsis "Parsering Expression Grammars in Python")
11257 (description "PyPEG is an intrinsic parser interpreter framework for
11258Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
11259parse many formal languages.")
11260 (license license:gpl2)))
11261
11262(define-public python-incremental
11263 (package
11264 (name "python-incremental")
11265 (version "17.5.0")
11266 (source
11267 (origin
11268 (method url-fetch)
11269 (uri (pypi-uri "incremental" version))
11270 (sha256
11271 (base32
11272 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
11273 (build-system python-build-system)
11274 (home-page "https://github.com/hawkowl/incremental")
11275 (synopsis "Library for versioning Python projects")
11276 (description "Incremental is a small library that versions your Python
11277projects.")
11278 (license license:expat)))
11279
11280(define-public python2-incremental
11281 (package-with-python2 python-incremental))
11282
11283(define-public python-invoke
11284 (package
11285 (name "python-invoke")
11286 (home-page "http://www.pyinvoke.org/")
11287 (version "1.1.0")
11288 (source (origin
11289 (method url-fetch)
11290 (uri (pypi-uri "invoke" version))
11291 (sha256
11292 (base32
11293 "0aiy1xvk1f91246zxd1zqrm679vdvd10h843a2na41cqr3cflpi6"))))
11294 (build-system python-build-system)
11295 (arguments
11296 ;; XXX: Requires many dependencies that are not yet in Guix.
11297 `(#:tests? #f))
11298 (synopsis "Pythonic task execution")
11299 (description
11300 "Invoke is a Python task execution tool and library, drawing inspiration
11301from various sources to arrive at a powerful and clean feature set. It is
11302evolved from the Fabric project, but focuses on local and abstract concerns
11303instead of servers and network commands.")
11304 (license license:bsd-3)))
11305
11306(define-public python2-invoke
11307 (package-with-python2 python-invoke))
11308
11309(define-public python-automat
11310 (package
11311 (name "python-automat")
11312 (version "0.6.0")
11313 (source (origin
11314 (method url-fetch)
11315 (uri (pypi-uri "Automat" version))
11316 (sha256
11317 (base32
11318 "1a7nsrljysfmdqmpn2apfa1gg6rfah4y9sizvns8gb08rx7d07rw"))))
11319 (build-system python-build-system)
11320 ;; We disable the tests because they require python-twisted, while
11321 ;; python-twisted depends on python-automat. Twisted is optional, but the
11322 ;; tests fail if it is not available. Also see
11323 ;; <https://github.com/glyph/automat/issues/71>.
11324 (arguments '(#:tests? #f))
11325 (native-inputs
11326 `(("python-m2r" ,python-m2r)
11327 ("python-setuptools-scm" ,python-setuptools-scm)
11328 ("python-graphviz" ,python-graphviz)))
11329 (propagated-inputs
11330 `(("python-six" ,python-six)
11331 ("python-attrs" ,python-attrs)))
11332 (home-page "https://github.com/glyph/Automat")
11333 (synopsis "Self-service finite-state machines")
11334 (description "Automat is a library for concise, idiomatic Python
11335expression of finite-state automata (particularly deterministic finite-state
11336transducers).")
11337 (license license:expat)))
11338
11339(define-public python2-automat
11340 (package-with-python2 python-automat))
11341
11342(define-public python-m2r
11343 (package
11344 (name "python-m2r")
11345 (version "0.1.12")
11346 (source (origin
11347 (method url-fetch)
11348 (uri (pypi-uri "m2r" version))
11349 (sha256
11350 (base32
11351 "1axrwnf425sz4qz3c0qc7yhhki4myzb8rki7pczcsgzznzmqdyxd"))))
11352 (build-system python-build-system)
11353 (propagated-inputs
11354 `(("python-docutils" ,python-docutils)
11355 ("python-mistune" ,python-mistune)))
11356 (native-inputs
11357 `(("python-pygments" ,python-pygments)
11358 ("python-mock" ,python-mock)))
11359 (home-page "https://github.com/miyakogi/m2r")
11360 (synopsis "Markdown to reStructuredText converter")
11361 (description "M2R converts a markdown file including reST markups to valid
11362reST format.")
11363 (license license:expat)))
11364
11365(define-public python2-m2r
11366 (package-with-python2 python-m2r))
11367
11368(define-public python-constantly
11369 (package
11370 (name "python-constantly")
11371 (version "15.1.0")
11372 (source (origin
11373 (method url-fetch)
11374 (uri (pypi-uri "constantly" version))
11375 (sha256
11376 (base32
11377 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
11378 (build-system python-build-system)
11379 (home-page "https://github.com/twisted/constantly")
11380 (synopsis "Symbolic constants in Python")
11381 (description "Constantly is a Python library that provides symbolic
11382constant support. It includes collections and constants with text, numeric,
11383and bit flag values.")
11384 (license license:expat)))
11385
11386(define-public python2-constantly
11387 (package-with-python2 python-constantly))
11388
11389(define-public python-attrs
11390 (package
11391 (name "python-attrs")
11392 (version "18.2.0")
11393 (source (origin
11394 (method url-fetch)
11395 (uri (pypi-uri "attrs" version))
11396 (sha256
11397 (base32
11398 "0s9ydh058wmmf5v391pym877x4ahxg45dw6a0w4c7s5wgpigdjqh"))))
11399 (build-system python-build-system)
11400 (arguments
11401 `(#:modules ((guix build utils)
11402 (guix build python-build-system)
11403 (ice-9 ftw)
11404 (srfi srfi-1)
11405 (srfi srfi-26))
11406 #:phases (modify-phases %standard-phases
11407 (replace 'check
11408 (lambda _
11409 (let ((cwd (getcwd)))
11410 (setenv "PYTHONPATH"
11411 (string-append
11412 cwd "/build/"
11413 (find (cut string-prefix? "lib" <>)
11414 (scandir (string-append cwd "/build")))
11415 ":"
11416 (getenv "PYTHONPATH")))
11417 (invoke "python" "-m" "pytest")))))))
11418 (native-inputs
11419 `(("python-coverage" ,python-coverage)
11420 ("python-hypothesis" ,python-hypothesis)
11421 ("python-pympler" ,python-pympler)
11422 ("python-pytest" ,python-pytest)
11423 ("python-six" ,python-six)
11424 ("python-sphinx" ,python-sphinx)
11425 ("python-zope-interface" ,python-zope-interface)))
11426 (home-page "https://github.com/python-attrs/attrs/")
11427 (synopsis "Attributes without boilerplate")
11428 (description "@code{attrs} is a Python package with class decorators that
11429ease the chores of implementing the most common attribute-related object
11430protocols.")
11431 (license license:expat)))
11432
11433(define-public python2-attrs
11434 (package-with-python2 python-attrs))
11435
11436(define-public python-attrs-bootstrap
11437 (package
11438 (inherit python-attrs)
11439 (name "python-attrs-bootstrap")
11440 ;; Keep this on a fixed version so python-attrs can be updated without
11441 ;; triggering a mass-rebuild. FIXME: Update this in the next rebuild cycle.
11442 (version "17.4.0")
11443 (source (origin
11444 (method url-fetch)
11445 (uri (pypi-uri "attrs" version))
11446 (sha256
11447 (base32
11448 "1jafnn1kzd6qhxgprhx6y6ik1r5m2rilx25syzcmq03azp660y8w"))))
11449 (native-inputs `())
11450 (arguments `(#:tests? #f))))
11451
11452(define-public python2-attrs-bootstrap
11453 (package-with-python2 python-attrs-bootstrap))
11454
11455(define-public python2-cliapp
11456 (package
11457 (name "python2-cliapp")
9064b84e 11458 (version "1.20180812.1")
44d10b1f
RW
11459 (source
11460 (origin
11461 (method url-fetch)
11462 (uri (string-append
11463 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
11464 version ".tar.gz"))
11465 (sha256
11466 (base32
9064b84e 11467 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
44d10b1f
RW
11468 (build-system python-build-system)
11469 (arguments
11470 `(#:python ,python-2
11471 #:phases
11472 (modify-phases %standard-phases
11473 ;; check phase needs to be run before the build phase. If not,
11474 ;; coverage-test-runner looks for tests for the built source files,
11475 ;; and fails.
11476 (delete 'check)
11477 (add-before 'build 'check
11478 (lambda _
11479 ;; Disable python3 tests
11480 (substitute* "check"
11481 (("python3") "# python3"))
6c826d32 11482 (invoke "./check"))))))
44d10b1f
RW
11483 (native-inputs
11484 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
11485 ("python2-pep8" ,python2-pep8)))
11486 (propagated-inputs
11487 `(("python2-pyaml" ,python2-pyaml)))
11488 (home-page "https://liw.fi/cliapp/")
11489 (synopsis "Python framework for command line programs")
11490 (description "@code{python2-cliapp} is a python framework for
11491command line programs. It contains the typical stuff such programs
11492need to do, such as parsing the command line for options, and
11493iterating over input files.")
11494 (license license:gpl2+)))
11495
11496(define-public python2-ttystatus
11497 (package
11498 (name "python2-ttystatus")
e516a9c2 11499 (version "0.36")
44d10b1f
RW
11500 (source
11501 (origin
11502 (method url-fetch)
11503 (uri (string-append
11504 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
11505 version ".tar.gz"))
11506 (sha256
11507 (base32
e516a9c2 11508 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
44d10b1f
RW
11509 (build-system python-build-system)
11510 (native-inputs
11511 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
11512 ("python2-pep8" ,python2-pep8)))
11513 (arguments
11514 `(#:python ,python-2
11515 #:phases
11516 (modify-phases %standard-phases
11517 ;; check phase needs to be run before the build phase. If not,
11518 ;; coverage-test-runner looks for tests for the built source files,
11519 ;; and fails.
11520 (delete 'check)
11521 (add-before 'build 'check
cbeee881 11522 (lambda _ (invoke "make" "check"))))))
44d10b1f
RW
11523 (home-page "https://liw.fi/ttystatus/")
11524 (synopsis "Python library for showing progress reporting and
11525status updates on terminals")
11526 (description "@code{python2-ttystatus} is a python library for
11527showing progress reporting and status updates on terminals, for
11528command line programs. Output is automatically adapted to the width
11529of the terminal: truncated if it does not fit, and resized if the
11530terminal size changes.")
11531 (license license:gpl3+)))
11532
11533(define-public python2-tracing
11534 (package
11535 (name "python2-tracing")
11536 (version "0.10")
11537 (source
11538 (origin
11539 (method url-fetch)
11540 (uri (string-append
11541 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
11542 version ".tar.gz"))
11543 (sha256
11544 (base32
11545 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
11546 (build-system python-build-system)
11547 (arguments
11548 `(#:python ,python-2))
11549 (home-page "https://liw.fi/tracing/")
11550 (synopsis "Python debug logging helper")
11551 (description "@code{python2-tracing} is a python library for
11552logging debug messages. It provides a way to turn debugging messages
11553on and off, based on the filename they occur in. It is much faster
11554than using @code{logging.Filter} to accomplish the same thing, which
11555matters when code is run in production mode. The actual logging still
11556happens using the @code{logging} library.")
11557 (license license:gpl3+)))
11558
11559(define-public python2-larch
11560 (package
11561 (name "python2-larch")
11562 (version "1.20151025")
11563 (source
11564 (origin
11565 (method url-fetch)
11566 (uri (string-append
11567 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
11568 version ".tar.gz"))
11569 (patches (search-patches
11570 "python2-larch-coverage-4.0a6-compatibility.patch"))
11571 (sha256
11572 (base32
11573 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
11574 (build-system python-build-system)
11575 (arguments
11576 `(#:python ,python-2
11577 #:phases
11578 (modify-phases %standard-phases
11579 ;; check phase needs to be run before the build phase. If not,
11580 ;; coverage-test-runner looks for tests for the built source files,
11581 ;; and fails.
11582 (delete 'check)
11583 (add-before 'build 'check
204ad455 11584 (lambda _ (invoke "make" "check"))))))
44d10b1f
RW
11585 (native-inputs
11586 `(("cmdtest" ,cmdtest)
11587 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
11588 (propagated-inputs
11589 `(("python2-tracing" ,python2-tracing)))
11590 (home-page "https://liw.fi/larch/")
11591 (synopsis "Python copy-on-write B-tree library")
11592 (description "@code{python2-larch} is an implementation of
11593particular kind of B-tree, based on research by Ohad Rodeh. See
11594@url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
11595on the data structure.
11596
11597The distinctive feature of this B-tree is that a node is never
11598(conceptually) modified. Instead, all updates are done by
11599copy-on-write. This makes it easy to clone a tree, and modify only the
11600clone, while other processes access the original tree.")
11601 (license license:gpl3+)))
11602
11603(define-public python-astroid
11604 (package
11605 (name "python-astroid")
11606 (version "2.1.0")
11607 (source
11608 (origin
11609 (method url-fetch)
11610 (uri (pypi-uri "astroid" version))
11611 (sha256
11612 (base32
11613 "08hz675knh4294bancdapql392fmbjyimhbyrmfkz1ka7l035c1m"))))
11614 (build-system python-build-system)
11615 (propagated-inputs
11616 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
11617 ("python-six" ,python-six)
11618 ("python-wrapt" ,python-wrapt)))
11619 (native-inputs
11620 `(("python-dateutil" ,python-dateutil)
11621 ("python-nose" ,python-nose)
11622 ("python-pytest" ,python-pytest)
11623 ("python-pytest-runner" ,python-pytest-runner)))
11624 (arguments
11625 `(#:phases
11626 (modify-phases %standard-phases
11627 (add-after 'unpack 'remove-spurious-test
11628 (lambda _
11629 ;; This can be removed after upgrading from python-3.7
11630 ;; https://github.com/PyCQA/astroid/issues/593
11631 ;; https://bugs.python.org/issue34056
11632 (delete-file "astroid/tests/unittest_modutils.py")
11633 #t))
11634 (replace 'check
11635 (lambda _
11636 (invoke "pytest" "astroid"))))))
11637 (home-page "https://github.com/PyCQA/astroid")
11638 (synopsis "Common base representation of python source code for pylint and
11639other projects")
11640 (description "@code{python-astroid} provides a common base representation
11641of python source code for projects such as pychecker, pyreverse, pylint, etc.
11642
11643It provides a compatible representation which comes from the _ast module. It
11644rebuilds the tree generated by the builtin _ast module by recursively walking
11645down the AST and building an extended ast. The new node classes have
11646additional methods and attributes for different usages. They include some
11647support for static inference and local name scopes. Furthermore, astroid
11648builds partial trees by inspecting living objects.")
11649 (license license:lgpl2.1+)
11650 (properties `((python2-variant . ,(delay python2-astroid))))))
11651
11652(define-public python2-astroid
11653 (let ((base (package-with-python2
11654 (strip-python2-variant python-astroid))))
11655 (package (inherit base)
11656 ;; Version 2.x removes python2 support.
11657 (version "1.6.5")
11658 (source
11659 (origin
11660 (method url-fetch)
11661 (uri (pypi-uri "astroid" version))
11662 (sha256
11663 (base32
11664 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
11665 (arguments
11666 (substitute-keyword-arguments (package-arguments base)
11667 ((#:phases phases)
11668 `(modify-phases ,phases
11669 (add-after 'unpack 'remove-spurious-test
11670 (lambda _
11671 ;; https://github.com/PyCQA/astroid/issues/276
11672 (delete-file "astroid/tests/unittest_brain.py")
11673 #t))
11674 (replace 'check
11675 (lambda _
11676 (invoke"python" "-m" "unittest" "discover"
11677 "-p" "unittest*.py")))))))
11678 (native-inputs `())
11679 (propagated-inputs
11680 `(("python2-backports-functools-lru-cache"
11681 ,python2-backports-functools-lru-cache)
11682 ("python2-enum34" ,python2-enum34)
11683 ("python2-singledispatch" ,python2-singledispatch)
11684 ,@(package-propagated-inputs base))))))
11685
11686(define-public python-isort
11687 (package
11688 (name "python-isort")
e2227b6a 11689 (version "4.3.4")
44d10b1f
RW
11690 (source
11691 (origin
e2227b6a
EF
11692 (method git-fetch)
11693 (uri (git-reference
11694 ;; Tests pass only from the Github sources
11695 (url "https://github.com/timothycrosley/isort")
11696 (commit version)))
11697 (file-name (git-file-name name version))
44d10b1f
RW
11698 (sha256
11699 (base32
e2227b6a 11700 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
44d10b1f
RW
11701 (build-system python-build-system)
11702 (native-inputs
11703 `(("python-mock" ,python-mock)
11704 ("python-pytest" ,python-pytest)))
11705 (home-page "https://github.com/timothycrosley/isort")
11706 (synopsis "Python utility/library to sort python imports")
11707 (description "@code{python-isort} is a python utility/library to sort
11708imports alphabetically, and automatically separated into sections. It
11709provides a command line utility, a python library and plugins for various
11710editors.")
e2227b6a
EF
11711 (license license:expat)
11712 (properties `((python2-variant . ,(delay python2-isort))))))
44d10b1f
RW
11713
11714(define-public python2-isort
e2227b6a
EF
11715 (let ((base (package-with-python2
11716 (strip-python2-variant python-isort))))
11717 (package (inherit base)
11718 (native-inputs
11719 `(("python2-futures" ,python2-futures)
11720 ,@(package-native-inputs base))))))
44d10b1f
RW
11721
11722(define-public python2-backports-functools-lru-cache
11723 (package
11724 (name "python2-backports-functools-lru-cache")
11725 (version "1.5")
11726 (source
11727 (origin
11728 (method url-fetch)
11729 ;; only the pypi tarballs contain the necessary metadata
11730 (uri (pypi-uri "backports.functools_lru_cache" version))
11731 (sha256
11732 (base32
11733 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
11734 (build-system python-build-system)
11735 (native-inputs
11736 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
11737 (arguments
11738 `(#:python ,python-2))
11739 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
11740 (synopsis "Backport of functools.lru_cache from Python 3.3")
11741 (description "@code{python2-backports-functools-lru-cache} is a backport
11742of @code{functools.lru_cache} from python 3.3.")
11743 (license license:expat)))
11744
11745(define-public python-configparser
11746 (package
11747 (name "python-configparser")
11748 (version "3.5.0")
11749 (source
11750 (origin
11751 (method url-fetch)
11752 (uri (string-append
11753 "https://bitbucket.org/ambv/configparser/get/"
11754 version ".tar.bz2"))
11755 (file-name (string-append name "-" version ".tar.gz"))
11756 (sha256
11757 (base32
11758 "0waq40as14abwzbb321hfz4vr1fi363nscy32ga14qvfygrg96wa"))))
11759 (build-system python-build-system)
809f003f 11760 (home-page "https://github.com/jaraco/configparser/")
44d10b1f
RW
11761 (synopsis "Backport of configparser from python 3.5")
11762 (description "@code{python-configparser} is a backport of
11763@code{configparser} from Python 3.5 so that it can be used directly
11764in other versions.")
11765 (license license:expat)))
11766
11767(define-public python2-configparser
11768 (package-with-python2 python-configparser))
11769
11770(define-public python-mando
11771 (package
11772 (name "python-mando")
11773 (version "0.6.4")
11774 (source (origin
11775 (method url-fetch)
11776 (uri (pypi-uri "mando" version))
11777 (sha256
11778 (base32
11779 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
11780 (build-system python-build-system)
11781 (propagated-inputs
11782 `(("python-rst2ansi" ,python-rst2ansi)
11783 ("python-six" ,python-six)))
11784 (native-inputs
11785 `(("python-pytest" ,python-pytest)))
11786 (home-page "https://mando.readthedocs.org/")
11787 (synopsis
11788 "Wrapper around argparse, allowing creation of complete CLI applications")
11789 (description
11790 "This package is a wrapper around argparse, allowing you to write complete CLI
11791applications in seconds while maintaining all the flexibility.")
11792 (license license:expat)))
11793
11794(define-public python2-mando
11795 (package-with-python2 python-mando))
11796
70daf82f
RW
11797(define-public python2-argparse
11798 (package
11799 (name "python2-argparse")
11800 (version "1.4.0")
11801 (source
11802 (origin
11803 (method url-fetch)
11804 (uri (pypi-uri "argparse" version))
11805 (sha256
11806 (base32
11807 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
11808 (build-system python-build-system)
11809 (arguments
11810 `(#:python ,python-2))
11811 (home-page "https://github.com/ThomasWaldmann/argparse/")
11812 (synopsis "Python command-line parsing library")
11813 (description
11814 "This package is mostly for people who want to have @code{argparse} on
11815older Pythons because it was not part of the standard library back then.")
11816 (license license:psfl)))
11817
44d10b1f
RW
11818(define-public python-fudge
11819 (package
11820 (name "python-fudge")
11821 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
11822 ;; package, which is currently the only use of this package.
11823 (version "0.9.6")
11824 (source
11825 (origin
11826 (method url-fetch)
11827 (uri (pypi-uri "fudge" version))
11828 (sha256
11829 (base32
11830 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
11831 (build-system python-build-system)
11832 (arguments
11833 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
11834 (home-page "https://github.com/fudge-py/fudge")
11835 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
11836 (description
11837 "Fudge is a Python module for using fake objects (mocks and stubs) to
11838test real ones.
11839
11840In readable Python code, you declare the methods available on your fake object
11841and how they should be called. Then you inject that into your application and
11842start testing. This declarative approach means you don’t have to record and
11843playback actions and you don’t have to inspect your fakes after running code.
11844If the fake object was used incorrectly then you’ll see an informative
11845exception message with a traceback that points to the culprit.")
11846 (license license:expat)))
11847
11848(define-public python2-fudge
11849 (package-with-python2 python-fudge))
11850
11851(define-public python-mwclient
11852 (package
11853 (name "python-mwclient")
11854 (version "0.8.4")
11855 (source
11856 (origin
11857 (method url-fetch)
11858 ;; The PyPI version wouldn't contain tests.
11859 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
11860 "v" version ".tar.gz"))
11861 (file-name (string-append name "-" version ".tar.gz"))
11862 (sha256
11863 (base32
11864 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
11865 (build-system python-build-system)
11866 (propagated-inputs
11867 `(("python-requests" ,python-requests)
11868 ("python-requests-oauthlib"
11869 ,python-requests-oauthlib)
11870 ("python-six" ,python-six)))
11871 (native-inputs
11872 `(("python-mock" ,python-mock)
11873 ("python-pytest" ,python-pytest)
11874 ("python-pytest-pep8" ,python-pytest-pep8)
11875 ("python-pytest-cache" ,python-pytest-cache)
11876 ("python-pytest-cov" ,python-pytest-cov)
11877 ("python-responses" ,python-responses)))
11878 (home-page "https://github.com/btongminh/mwclient")
11879 (synopsis "MediaWiki API client")
11880 (description "This package provides a MediaWiki API client.")
11881 (license license:expat)))
11882
11883(define-public python2-mwclient
11884 (package-with-python2 python-mwclient))
11885
11886(define-public python-utils
11887 (package
11888 (name "python-utils")
11889 (version "2.1.0")
11890 (source (origin
11891 (method url-fetch)
11892 (uri (pypi-uri "python-utils" version))
11893 (sha256
11894 (base32
11895 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
11896 (build-system python-build-system)
11897 (native-inputs
11898 `(("pytest-runner" ,python-pytest-runner)
11899 ("pytest" ,python-pytest)
11900 ("six" ,python-six)))
11901 (home-page "https://github.com/WoLpH/python-utils")
11902 (synopsis "Convenient utilities not included with the standard Python install")
11903 (description
11904 "Python Utils is a collection of small Python functions and classes which
11905make common patterns shorter and easier.")
11906 (license license:bsd-2)))
11907
11908(define-public python2-utils
11909 (package-with-python2 python-utils))
11910
11911(define-public python-sphinx-me
11912 (package
11913 (name "python-sphinx-me")
11914 (version "0.3")
11915 (source
11916 (origin
11917 (method url-fetch)
11918 (uri (pypi-uri "sphinx-me" version))
11919 (sha256
11920 (base32
11921 "06jzgp213zihnvpcy2y5jy3ykid3apc2ncp2pg6a2g05lhiziglq"))))
11922 (build-system python-build-system)
11923 (home-page "https://github.com/stephenmcd/sphinx-me")
11924 (synopsis "Create a Sphinx documentation shell")
11925 (description
11926 "Create a Sphinx documentation shell for your project and include the
11927README file as the documentation index. It handles extracting the required
11928meta data such as the project name, author and version from your project for
11929use in your Sphinx docs.")
11930 (license license:bsd-2)))
11931
11932(define-public python2-sphinx-me
11933 (package-with-python2 python-sphinx-me))
11934
11935(define-public python-diff-match-patch
11936 (package
11937 (name "python-diff-match-patch")
11938 (version "20121119")
11939 (source
11940 (origin
11941 (method url-fetch)
11942 (uri (pypi-uri "diff-match-patch" version))
11943 (sha256
11944 (base32
11945 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
11946 (build-system python-build-system)
11947 (home-page "https://code.google.com/p/google-diff-match-patch")
11948 (synopsis "Synchronize plain text")
11949 (description "Diff Match and Patch libraries offer robust algorithms to
11950perform the operations required for synchronizing plain text.")
11951 (license license:asl2.0)))
11952
11953(define-public python2-diff-match-patch
11954 (package-with-python2 python-diff-match-patch))
11955
11956(define-public python-dirsync
11957 (package
11958 (name "python-dirsync")
11959 (version "2.2.3")
11960 (source
11961 (origin
11962 (method url-fetch)
11963 (uri (pypi-uri "dirsync" version))
11964 (sha256
11965 (base32
11966 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
11967 (build-system python-build-system)
11968 (propagated-inputs
11969 `(("six" ,python-six)))
11970 (home-page "https://bitbucket.org/tkhyn/dirsync")
11971 (synopsis "Advanced directory tree synchronisation tool")
11972 (description "Advanced directory tree synchronisation tool.")
11973 (license license:expat)))
11974
11975(define-public python2-dirsync
11976 (package-with-python2 python-dirsync))
11977
11978(define-public python-levenshtein
11979 (package
11980 (name "python-levenshtein")
11981 (version "0.12.0")
11982 (source
11983 (origin
11984 (method url-fetch)
11985 (uri (pypi-uri "python-Levenshtein" version))
11986 (sha256
11987 (base32
11988 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
11989 (build-system python-build-system)
11990 (home-page "https://github.com/ztane/python-Levenshtein")
11991 (synopsis "Fast computation of Levenshtein distance and string similarity")
11992 (description
11993 "The Levenshtein Python C extension module contains functions for fast computation of
11994@enumerate
11995@item Levenshtein (edit) distance, and edit operations
11996@item string similarity
11997@item approximate median strings, and generally string averaging
11998@item string sequence and set similarity
11999@end enumerate
12000It supports both normal and Unicode strings.")
12001 (license license:gpl2+)))
12002
12003(define-public python2-levenshtein
12004 (package-with-python2 python-levenshtein))
12005
12006(define-public python-scandir
12007 (package
12008 (name "python-scandir")
12009 (version "1.9.0")
12010 (source
12011 (origin
12012 (method url-fetch)
12013 (uri (pypi-uri "scandir" version))
12014 (sha256
12015 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
12016 (build-system python-build-system)
12017 (arguments
12018 `(#:phases (modify-phases %standard-phases
12019 (replace 'check
12020 (lambda _
12021 (invoke "python" "test/run_tests.py"))))))
12022 (home-page "https://github.com/benhoyt/scandir")
12023 (synopsis "Directory iteration function")
12024 (description
12025 "Directory iteration function like os.listdir(), except that instead of
12026returning a list of bare filenames, it yields DirEntry objects that include
12027file type and stat information along with the name. Using scandir() increases
12028the speed of os.walk() by 2-20 times (depending on the platform and file
12029system) by avoiding unnecessary calls to os.stat() in most cases.
12030
12031This package is part of the Python standard library since version 3.5.")
12032 (license license:bsd-3)))
12033
12034(define-public python2-scandir
12035 (package-with-python2 python-scandir))
12036
12037(define-public python2-stemming
12038 (package
12039 (name "python2-stemming")
12040 (version "1.0.1")
12041 (source
12042 (origin
12043 (method url-fetch)
12044 (uri (pypi-uri "stemming" version))
12045 (sha256
12046 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
12047 (build-system python-build-system)
12048 (arguments
12049 `(#:python ,python-2))
12050 (home-page "https://bitbucket.org/mchaput/stemming/overview")
12051 (synopsis "Python implementations of various stemming algorithms")
12052 (description
12053 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
12054stemming algorithms for English. These implementations are straightforward and
12055efficient, unlike some Python versions of the same algorithms available on the
12056Web. This package is an extraction of the stemming code included in the Whoosh
12057search engine.")
12058 (license license:public-domain)))
12059
12060(define-public python-factory-boy
12061 (package
12062 (name "python-factory-boy")
12063 (version "2.8.1")
12064 (source
12065 (origin
12066 (method url-fetch)
12067 (uri (pypi-uri "factory_boy" version))
12068 (sha256
12069 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
12070 (build-system python-build-system)
12071 (arguments
12072 ;; Tests are not included in the tarball.
12073 `(#:tests? #f))
12074 (propagated-inputs
12075 `(("faker" ,python-faker)))
12076 (home-page "https://github.com/benhoyt/scandir")
12077 (synopsis "Versatile test fixtures replacement")
12078 (description
12079 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
12080
12081As a fixtures replacement tool, it aims to replace static, hard to maintain
12082fixtures with easy-to-use factories for complex object.
12083
12084Instead of building an exhaustive test setup with every possible combination
12085of corner cases, factory_boy allows you to use objects customized for the
12086current test, while only declaring the test-specific fields")
12087 (license license:expat)))
12088
12089(define-public python2-factory-boy
12090 (package-with-python2 python-factory-boy))
12091
12092(define-public python-translate-toolkit
12093 (package
12094 (name "python-translate-toolkit")
12095 (version "2.1.0")
12096 (source
12097 (origin
12098 (method url-fetch)
12099 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
12100 (sha256
12101 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
12102 (build-system python-build-system)
12103 (native-inputs
12104 `(("python-pytest" ,python-pytest)
12105 ("python-sphinx" ,python-sphinx)))
12106 (propagated-inputs
12107 `(("python-babel" ,python-babel)
12108 ("python-beautifulsoup4" ,python-beautifulsoup4)
12109 ("python-chardet" ,python-chardet)
12110 ("python-diff-match-patch" ,python-diff-match-patch)
12111 ("python-levenshtein" ,python-levenshtein)
12112 ("python-lxml" ,python-lxml)
12113 ("python-six" ,python-six)
12114 ("python-vobject" ,python-vobject)
12115 ("python-pyyaml" ,python-pyyaml)))
12116 (arguments
12117 ;; TODO: tests are not run, because they end with
12118 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
12119 ;; 'parse_funcs'
12120 ;; during test setup.
12121 `(#:tests? #f))
12122 (home-page "http://toolkit.translatehouse.org")
12123 (synopsis "Tools and API for translation and localization engineering")
12124 (description
12125 "Tools and API for translation and localization engineering. It contains
12126several utilities, as well as an API for building localization tools.")
12127 (license license:gpl2+)))
12128
12129(define-public python2-translate-toolkit
12130 (package-with-python2 python-translate-toolkit))
12131
12132(define-public python-packaging
12133 (package
12134 (name "python-packaging")
12135 (version "18.0")
12136 (source
12137 (origin
12138 (method url-fetch)
12139 (uri (pypi-uri "packaging" version))
12140 (sha256
12141 (base32
12142 "01wq9c53ix5rz6qg2c98gy8n4ff768rmanifm8m5jpjiaizj51h8"))))
12143 (build-system python-build-system)
12144 (arguments
12145 `(#:phases (modify-phases %standard-phases
12146 (replace 'check
12147 (lambda _ (invoke "py.test" "-vv"))))))
12148 (native-inputs
12149 `(("python-pretend" ,python-pretend)
12150 ("python-pytest" ,python-pytest)))
12151 (propagated-inputs
12152 `(("python-pyparsing" ,python-pyparsing)
12153 ("python-six" ,python-six)))
12154 (home-page "https://github.com/pypa/packaging")
12155 (synopsis "Core utilities for Python packages")
12156 (description "Packaging is a Python module for dealing with Python packages.
12157It offers an interface for working with package versions, names, and dependency
12158information.")
12159 ;; From 'LICENSE': This software is made available under the terms of
12160 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
12161 ;; Contributions to this software is made under the terms of *both* these
12162 ;; licenses.
12163 (license (list license:asl2.0 license:bsd-2))))
12164
12165(define-public python2-packaging
12166 (package-with-python2 python-packaging))
12167
12168(define-public python-relatorio
12169 (package
12170 (name "python-relatorio")
12171 (version "0.8.0")
12172 (source
12173 (origin
12174 (method url-fetch)
12175 (uri (pypi-uri "relatorio" version))
12176 (sha256
12177 (base32
12178 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
12179 (build-system python-build-system)
12180 (propagated-inputs
12181 `(("python-lxml" ,python-lxml)
12182 ("python-genshi" ,python-genshi)))
12183 (native-inputs
12184 `(("python-magic" ,python-magic)))
12185 (home-page "https://relatorio.tryton.org/")
12186 (synopsis "Templating library able to output ODT and PDF files")
12187 (description "Relatorio is a templating library which provides a way to
12188easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
12189for more filetypes can be easily added by creating plugins for them.")
12190 (license license:gpl3+)))
12191
12192(define-public python2-relatorio
12193 (package-with-python2 python-relatorio))
12194
12195(define-public python-radon
12196 (package
12197 (name "python-radon")
12198 (version "2.2.0")
12199 (source
12200 (origin
12201 (method url-fetch)
12202 (uri (pypi-uri "radon" version))
12203 (sha256
12204 (base32
12205 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
12206 (build-system python-build-system)
12207 (arguments
12208 `(#:phases (modify-phases %standard-phases
12209 (replace 'check
12210 (lambda _
12211 (invoke "python" "radon/tests/run.py"))))))
12212 (propagated-inputs
12213 `(("python-colorama" ,python-colorama)
12214 ("python-flake8-polyfill" ,python-flake8-polyfill)
12215 ("python-mando" ,python-mando)))
12216 (native-inputs
12217 `(("python-pytest" ,python-pytest)
12218 ("python-pytest-mock" ,python-pytest-mock)))
12219 (home-page "https://radon.readthedocs.org/")
12220 (synopsis "Code Metrics in Python")
12221 (description "Radon is a Python tool which computes various code metrics.
12222Supported metrics are:
12223@itemize @bullet
12224@item raw metrics: SLOC, comment lines, blank lines, &c.
12225@item Cyclomatic Complexity (i.e. McCabe’s Complexity)
12226@item Halstead metrics (all of them)
12227@item the Maintainability Index (a Visual Studio metric)
12228@end itemize")
12229 (license license:expat)))
12230
12231(define-public python2-radon
12232 (package-with-python2 python-radon))
12233
12234(define-public python-sure
12235 (package
12236 (name "python-sure")
12237 (version "1.4.11")
12238 (source
12239 (origin
12240 (method url-fetch)
12241 (uri (pypi-uri "sure" version))
12242 (sha256
12243 (base32
12244 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
12245 (build-system python-build-system)
12246 (propagated-inputs
12247 `(("python-mock" ,python-mock)
12248 ("python-six" ,python-six)))
12249 (native-inputs
12250 `(("python-nose" ,python-nose)))
12251 (home-page "https://github.com/gabrielfalcao/sure")
12252 (synopsis "Automated testing library in python for python")
12253 (description
12254 "Sure is a python library that leverages a DSL for writing assertions.
12255Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
12256 (license license:gpl3+)))
12257
12258(define-public python2-sure
12259 (package-with-python2 python-sure))
12260
12261(define-public python2-couleur
12262 ;; This package does not seem to support python3 at all, hence,
12263 ;; only the python2 variant definition is provided.
12264 (package
12265 (name "python2-couleur")
12266 (version "0.6.2")
12267 (source
12268 (origin
12269 (method url-fetch)
12270 (uri (pypi-uri "couleur" version))
12271 (sha256
12272 (base32
12273 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
12274 (build-system python-build-system)
12275 (arguments
12276 `(#:python ,python-2))
12277 (home-page "https://github.com/gabrielfalcao/couleur")
12278 (synopsis
12279 "ANSI terminal tool for python, colored shell and other handy fancy features")
12280 (description
12281 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
12282terminal such as coloured output in the shell, overwriting output, indentation, etc.")
12283 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
12284 ;; https://github.com/gabrielfalcao/couleur/issues/11
12285 (license license:lgpl3+)))
12286
12287(define-public python-misaka
12288 (package
12289 (name "python-misaka")
0dcb3412 12290 (version "2.1.1")
44d10b1f
RW
12291 (source
12292 (origin
12293 (method url-fetch)
12294 (uri (pypi-uri "misaka" version))
12295 (sha256
12296 (base32
0dcb3412 12297 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
44d10b1f
RW
12298 (build-system python-build-system)
12299 (arguments
12300 `(;; Line 37 of setup.py calls self.run_command('develop')
12301 ;; in the 'check' phase. This command seems to be trying
12302 ;; to write to
12303 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
12304 ;; for which it does not have the permission to write.
12305 #:tests? #f))
12306 (propagated-inputs
12307 `(("python-cffi" ,python-cffi)))
12308 (home-page "https://github.com/FSX/misaka")
12309 (synopsis "Python binding for Hoedown")
12310 (description
12311 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
12312library written in C. It features a fast HTML renderer and functionality to make custom
12313renderers (e.g. man pages or LaTeX).")
12314 (license license:expat)))
12315
12316(define-public python2-misaka
12317 (package-with-python2 python-misaka))
12318
12319(define-public python2-steadymark
12320 ;; This is forced into being a python2 only variant
12321 ;; due to its dependence on couleur that has no support
12322 ;; for python3
12323 (package
12324 (name "python2-steadymark")
12325 (version "0.7.3")
12326 (source
12327 (origin
12328 (method url-fetch)
12329 (uri (pypi-uri "steadymark" version))
12330 (sha256
12331 (base32
12332 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
12333 (build-system python-build-system)
12334 (native-inputs
12335 `(("python-couleur" ,python2-couleur)
12336 ("python-sure" ,python2-sure)
12337 ("python-misaka" ,python2-misaka)))
12338 (arguments
12339 `(#:python ,python-2
12340 #:phases
12341 (modify-phases %standard-phases
12342 (add-before 'build 'patch-setup-py
12343 (lambda _
12344 ;; Update requirements from dependency==version
12345 ;; to dependency>=version
12346 (substitute* "setup.py"
12347 (("==") ">="))
12348 #t)))))
12349 (home-page "https://github.com/gabrielfalcao/steadymark")
12350 (synopsis "Markdown-based test runner for python")
12351 (description
12352 "@code{Steadymark} allows documentation to be written in github-flavoured
12353markdown. The documentation may contain snippets of code surrounded by python
12354code blocks and @code{Steadymark} will find these snippets and run them, making
12355sure that there are no old malfunctional examples in the documentation examples.")
12356 (license license:expat)))
12357
12358(define-public python-jsonpointer
12359 (package
12360 (name "python-jsonpointer")
12361 (version "1.10")
12362 (source
12363 (origin
12364 (method url-fetch)
12365 (uri (pypi-uri "jsonpointer" version))
12366 (sha256
12367 (base32
12368 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
12369 (build-system python-build-system)
12370 (home-page "https://github.com/stefankoegl/python-json-pointer")
12371 (synopsis "Identify specific nodes in a JSON document")
12372 (description "@code{jsonpointer} allows you to access specific nodes
12373by path in a JSON document (see RFC 6901).")
12374 (license license:bsd-3)))
12375
12376(define-public python2-jsonpointer
12377 (package-with-python2 python-jsonpointer))
12378
12379(define-public python-jsonpatch
12380 (package
12381 (name "python-jsonpatch")
12382 (version "1.16")
12383 (source
12384 (origin
12385 (method url-fetch)
12386 ;; pypi version lacks tests.js
12387 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12388 "archive/v" version ".tar.gz"))
12389 (file-name (string-append name "-" version ".tar.gz"))
12390 (sha256
12391 (base32
12392 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
12393 (build-system python-build-system)
12394 (native-inputs
12395 `(("python-jsonpointer" ,python-jsonpointer)))
12396 (home-page "https://github.com/stefankoegl/python-json-patch")
12397 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
12398 (description "@code{jsonpatch} is a library and program that allows
12399applying JSON Patches according to RFC 6902.")
12400 (license license:bsd-3)))
12401
12402(define-public python2-jsonpatch
12403 (package-with-python2 python-jsonpatch))
12404
12405(define-public python-jsonpatch-0.4
12406 (package (inherit python-jsonpatch)
12407 (name "python-jsonpatch")
12408 (version "0.4")
12409 (source
12410 (origin
12411 (method url-fetch)
12412 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12413 "archive/v" version ".tar.gz"))
12414 (file-name (string-append name "-" version ".tar.gz"))
12415 (sha256
12416 (base32
12417 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
12418
12419(define-public python2-jsonpatch-0.4
12420 (package-with-python2 python-jsonpatch-0.4))
12421
12422(define-public python-rfc3986
12423 (package
12424 (name "python-rfc3986")
12425 (version "1.1.0")
12426 (source (origin
12427 (method url-fetch)
12428 (uri (pypi-uri "rfc3986" version))
12429 (sha256
12430 (base32
12431 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
12432 (build-system python-build-system)
12433 (arguments
12434 `(#:modules ((guix build utils)
12435 (guix build python-build-system)
12436 (ice-9 ftw)
12437 (srfi srfi-1)
12438 (srfi srfi-26))
12439 #:phases
12440 (modify-phases %standard-phases
12441 (replace 'check
12442 (lambda _
12443 (let ((cwd (getcwd)))
12444 (setenv "PYTHONPATH"
12445 (string-append cwd "/build/"
12446 (find (cut string-prefix? "lib" <>)
12447 (scandir (string-append cwd "/build")))
12448 ":"
12449 (getenv "PYTHONPATH")))
12450 (invoke "pytest" "-v")))))))
12451 (native-inputs
12452 `(("python-pytest" ,python-pytest)))
12453 (home-page "https://rfc3986.readthedocs.io/")
12454 (synopsis "Parse and validate URI references")
12455 (description
12456 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
12457validation and authority parsing. This module also supports RFC@tie{}6874
12458which adds support for zone identifiers to IPv6 addresses.")
12459 (license license:asl2.0)))
12460
12461(define-public python2-rfc3986
12462 (package-with-python2 python-rfc3986))
12463
12464(define-public python-rfc3987
12465 (package
12466 (name "python-rfc3987")
12467 (version "1.3.7")
12468 (source
12469 (origin
12470 (method url-fetch)
12471 (uri (pypi-uri "rfc3987" version))
12472 (sha256
12473 (base32
12474 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
12475 (build-system python-build-system)
12476 (home-page "https://pypi.python.org/pypi/rfc3987")
12477 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
12478 (description "@code{rfc3987} provides routines for parsing and
12479validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
12480 (license license:gpl3+)))
12481
12482(define-public python2-rfc3987
12483 (package-with-python2 python-rfc3987))
12484
12485(define-public python-validate-email
12486 (package
12487 (name "python-validate-email")
12488 (version "1.3")
12489 (source
12490 (origin
12491 (method url-fetch)
12492 (uri (pypi-uri "validate_email" version))
12493 (sha256
12494 (base32
12495 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
12496 (build-system python-build-system)
12497 (home-page "https://github.com/syrusakbary/validate_email")
12498 (synopsis "Verifies if an email address is valid and really exists")
12499 (description "@code{validate_email} can be used to verify if an email
12500address is valid and really exists.")
12501 (license license:lgpl3+)))
12502
12503(define-public python2-validate-email
12504 (package-with-python2 python-validate-email))
12505
12506(define-public python-flex
12507 (package
12508 (name "python-flex")
12509 (version "6.10.0")
12510 (source
12511 (origin
12512 (method url-fetch)
12513 (uri (pypi-uri "flex" version))
12514 (sha256
12515 (base32
12516 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
12517 (build-system python-build-system)
12518 (propagated-inputs
12519 `(("python-click" ,python-click)
12520 ("python-iso8601" ,python-iso8601)
12521 ("python-jsonpointer" ,python-jsonpointer)
12522 ("python-pyyaml" ,python-pyyaml)
12523 ("python-requests" ,python-requests)
12524 ("python-rfc3987" ,python-rfc3987)
12525 ("python-six" ,python-six)
12526 ("python-validate-email" ,python-validate-email)))
12527 (home-page "https://github.com/pipermerriam/flex")
12528 (synopsis "Validates Swagger schemata")
12529 (description "@code{flex} can be used to validate Swagger schemata.")
12530 (license license:bsd-3)))
12531
12532(define-public python2-flex
12533 (package-with-python2 python-flex))
12534
12535(define-public python-marshmallow
12536 (package
12537 (name "python-marshmallow")
12538 (version "3.0.0b14")
12539 (source
12540 (origin
12541 (method url-fetch)
12542 (uri (pypi-uri "marshmallow" version))
12543 (sha256
12544 (base32
12545 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
12546 (build-system python-build-system)
12547 (propagated-inputs
12548 `(("python-dateutil" ,python-dateutil)
12549 ("python-simplejson" ,python-simplejson)))
12550 (native-inputs
12551 `(("python-pytest" ,python-pytest)
12552 ("python-pytz" ,python-pytz)))
12553 (home-page "https://github.com/marshmallow-code/marshmallow")
12554 (synopsis "Convert complex datatypes to and from native
12555Python datatypes.")
12556 (description "@code{marshmallow} provides a library for converting
12557complex datatypes to and from native Python datatypes.")
12558 (license license:expat)))
12559
12560(define-public python2-marshmallow
12561 (package-with-python2 python-marshmallow))
12562
12563(define-public python-apispec
12564 (package
12565 (name "python-apispec")
12566 (version "0.25.3")
12567 (source
12568 (origin
12569 (method url-fetch)
12570 (uri (pypi-uri "apispec" version))
12571 (sha256
12572 (base32
12573 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
12574 (build-system python-build-system)
12575 (propagated-inputs
12576 `(("python-pyyaml" ,python-pyyaml)))
12577 (native-inputs
12578 `(("python-pytest" ,python-pytest)
12579 ("python-flask" ,python-flask)
12580 ("python-marshmallow" ,python-marshmallow)
12581 ("python-tornado" ,python-tornado)
12582 ("python-bottle" ,python-bottle)
12583 ("python-mock" ,python-mock)))
12584 (home-page "https://github.com/marshmallow-code/apispec")
12585 (synopsis "Swagger 2.0 API specification generator")
12586 (description "@code{python-apispec} is a pluggable API specification
12587generator. Currently supports the OpenAPI specification (f.k.a.
12588Swagger 2.0).")
12589 (license license:expat)))
12590
12591(define-public python2-apispec
12592 (package-with-python2 python-apispec))
12593
12594(define-public python-flasgger
12595 (package
12596 (name "python-flasgger")
12597 (version "0.6.3")
12598 (source
12599 (origin
1a04d421
TGR
12600 (method git-fetch)
12601 (uri (git-reference
12602 (url "https://github.com/rochacbruno/flasgger.git")
12603 (commit version)))
12604 (file-name (git-file-name name version))
44d10b1f 12605 (sha256
1a04d421 12606 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
44d10b1f
RW
12607 (build-system python-build-system)
12608 (arguments
12609 `(#:phases
12610 (modify-phases %standard-phases
12611 (replace 'check
12612 (lambda* (#:key inputs outputs #:allow-other-keys)
12613 (substitute* "Makefile"
12614 (("flake8 flasgger --ignore=F403")
12615 "flake8 flasgger --ignore=E731,F403"))
12616 (setenv "PYTHONPATH" (string-append (getcwd)
12617 ":"
12618 (getenv "PYTHONPATH")))
ac599a09 12619 (invoke "py.test"))))))
44d10b1f
RW
12620 (propagated-inputs
12621 `(("python-flask" ,python-flask)
12622 ("python-pyyaml" ,python-pyyaml)
12623 ("python-jsonschema" ,python-jsonschema)
12624 ("python-mistune" ,python-mistune)
12625 ("python-six" ,python-six)))
12626 (native-inputs
12627 `(("python-decorator" ,python-decorator)
12628 ("python-flake8" ,python-flake8)
12629 ("python-flask-restful" ,python-flask-restful)
12630 ("python-flex" ,python-flex)
12631 ("python-pytest" ,python-pytest)
12632 ("python-pytest-cov" ,python-pytest-cov)
12633 ("python-marshmallow" ,python-marshmallow)
12634 ("python-apispec" ,python-apispec)))
12635 (home-page "https://github.com/rochacbruno/flasgger/")
12636 (synopsis "Extract Swagger specs from your Flask project")
12637 (description "@code{python-flasgger} allows extracting Swagger specs
12638from your Flask project. It is a fork of Flask-Swagger.")
12639 (license license:expat)))
12640
12641(define-public python2-flasgger
12642 (package-with-python2 python-flasgger))
12643
12644(define-public python-swagger-spec-validator
12645 (package
12646 (name "python-swagger-spec-validator")
12647 (version "2.1.0")
12648 (source
12649 (origin
12650 (method url-fetch)
12651 (uri (pypi-uri "swagger-spec-validator" version))
12652 (sha256
12653 (base32
12654 "13hkpn2lycwr0468yqhjb3kwszqf7hjwlq61w7vdxq1caz31k4nw"))))
12655 (build-system python-build-system)
12656 (propagated-inputs
12657 `(("python-jsonschema" ,python-jsonschema)
12658 ("python-six" ,python-six)))
12659 (home-page
12660 "https://github.com/Yelp/swagger_spec_validator")
12661 (synopsis "Validation of Swagger specifications")
12662 (description "@code{swagger_spec_validator} provides a library for
12663validating Swagger API specifications.")
12664 (license license:asl2.0)))
12665
12666(define-public python2-swagger-spec-validator
12667 (package-with-python2 python-swagger-spec-validator))
12668
12669(define-public python-apache-libcloud
12670 (package
12671 (name "python-apache-libcloud")
12672 (version "2.4.0")
12673 (source
12674 (origin
12675 (method url-fetch)
12676 (uri (pypi-uri "apache-libcloud" version))
12677 (sha256
12678 (base32
12679 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
12680 (build-system python-build-system)
12681 (arguments
12682 `(#:phases
12683 (modify-phases %standard-phases
12684 (add-after 'unpack 'patch-ssh
12685 (lambda* (#:key inputs #:allow-other-keys)
12686 (substitute* "libcloud/compute/ssh.py"
12687 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
12688 "/bin/ssh" "'")))
12689 #t))
12690 (add-after 'unpack 'patch-tests
12691 (lambda _
12692 (substitute* "./libcloud/test/test_file_fixtures.py"
12693 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
12694 (("def _ascii") "def _raw_data(self, method, url, body, headers):
12695 return (httplib.OK,
12696 \"1234abcd\",
12697 {\"test\": \"value\"},
12698 httplib.responses[httplib.OK])
12699 def _ascii"))
12700 (substitute* "libcloud/test/compute/test_ssh_client.py"
12701 (("class ShellOutSSHClientTests")
12702 "@unittest.skip(\"Guix container doesn't have ssh service\")
12703class ShellOutSSHClientTests")
12704 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
12705 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
12706 (("'.xF0', '.x90', '.x8D', '.x88'")
12707 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
12708 #t))
12709 (add-before 'check 'copy-secret
12710 (lambda _
12711 (copy-file "libcloud/test/secrets.py-dist"
12712 "libcloud/test/secrets.py")
12713 #t)))))
12714 (inputs
12715 `(("openssh" ,openssh)))
12716 (propagated-inputs
12717 `(("python-paramiko" ,python-paramiko)
12718 ("python-requests" ,python-requests)))
12719 (native-inputs
12720 `(("python-lockfile" ,python-lockfile)
12721 ("python-mock" ,python-mock)
12722 ("python-pytest" ,python-pytest)
12723 ("python-pytest-runner" ,python-pytest-runner)
12724 ("python-requests-mock" ,python-requests-mock)))
12725 (home-page "https://libcloud.apache.org/")
12726 (synopsis "Unified Cloud API")
12727 (description "@code{libcloud} is a Python library for interacting with
12728many of the popular cloud service providers using a unified API.")
12729 (license license:asl2.0)))
12730
12731(define-public python2-apache-libcloud
12732 (package-with-python2 python-apache-libcloud))
12733
12734(define-public python-smmap2
12735 (package
12736 (name "python-smmap2")
12737 (version "2.0.3")
12738 (source
12739 (origin
12740 (method url-fetch)
12741 (uri (pypi-uri "smmap2" version))
12742 (sha256
12743 (base32
12744 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
12745 (build-system python-build-system)
12746 (native-inputs
12747 `(("python-nosexcover" ,python-nosexcover)))
12748 (home-page "https://github.com/Byron/smmap")
12749 (synopsis "Python sliding window memory map manager")
12750 (description "@code{smmap2} is a pure Python implementation of a sliding
12751window memory map manager.")
12752 (license license:bsd-3)))
12753
12754(define-public python2-smmap2
12755 (package-with-python2 python-smmap2))
12756
12757(define-public python-regex
12758 (package
12759 (name "python-regex")
12760 (version "2017.06.07")
12761 (source (origin
12762 (method url-fetch)
12763 (uri (pypi-uri "regex" version))
12764 (sha256
12765 (base32
12766 "06r6b7yigikbj3a72whl85r2b64pj1r0ypmw9yalmkm0wnxq8mz4"))))
12767 (build-system python-build-system)
12768 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
12769 (synopsis "Alternative regular expression module")
12770 (description "This regular expression implementation is backwards-
12771compatible with the standard @code{re} module, but offers additional
12772functionality like full case-folding for case-insensitive matches in Unicode.")
12773 (license license:psfl)))
12774
12775(define-public python2-regex
12776 (package-with-python2 python-regex))
12777
12778(define-public python2-pyopengl
12779 (package
12780 (name "python2-pyopengl")
12781 (version "3.1.0")
12782 (source
12783 (origin
12784 (method url-fetch)
12785 (uri (pypi-uri "PyOpenGL" version))
12786 (sha256
12787 (base32
12788 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
12789 (arguments
12790 `(#:python ,python-2))
12791 (build-system python-build-system)
12792 (home-page "http://pyopengl.sourceforge.net")
12793 (synopsis "Standard OpenGL bindings for Python")
12794 (description
12795 "PyOpenGL is the most common cross platform Python binding to OpenGL and
12796related APIs. The binding is created using the standard @code{ctypes}
12797library.")
12798 (license license:bsd-3)))
12799
12800(define-public python2-pyopengl-accelerate
12801 (package
12802 (inherit python2-pyopengl)
12803 (name "python2-pyopengl-accelerate")
12804 (version "3.1.0")
12805 (source
12806 (origin
12807 (method url-fetch)
12808 (uri (pypi-uri "PyOpenGL-accelerate" version))
12809 (sha256
12810 (base32
12811 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
12812 (synopsis "Acceleration code for PyOpenGL")
12813 (description
12814 "This is the Cython-coded accelerator module for PyOpenGL.")))
12815
12816(define-public python-rencode
12817 (package
12818 (name "python-rencode")
12819 (version "1.0.5")
12820 (source
12821 (origin
12822 (method url-fetch)
12823 (uri (pypi-uri "rencode" version))
12824 (sha256
12825 (base32
12826 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
12827 (build-system python-build-system)
12828 (arguments
12829 `(#:phases
12830 (modify-phases %standard-phases
12831 (add-before 'check 'delete-bogus-test
12832 ;; This test requires /home/aresch/Downloads, which is not provided by
12833 ;; the build environment.
12834 (lambda _
12835 (delete-file "rencode/t.py")
12836 #t)))))
12837 (native-inputs `(("pkg-config" ,pkg-config)
12838 ("python-cython" ,python-cython)))
12839 (home-page "https://github.com/aresch/rencode")
12840 (synopsis "Serialization of heterogeneous data structures")
12841 (description
12842 "The @code{rencode} module is a data structure serialization library,
12843similar to @code{bencode} from the BitTorrent project. For complex,
12844heterogeneous data structures with many small elements, r-encoding stake up
12845significantly less space than b-encodings. This version of rencode is a
12846complete rewrite in Cython to attempt to increase the performance over the
12847pure Python module.")
12848 (license license:bsd-3)))
12849
12850(define-public python2-rencode
12851 (package-with-python2 python-rencode))
12852
12853(define-public python-xenon
12854 (package
12855 (name "python-xenon")
12856 (version "0.5.4")
12857 (source
12858 (origin
12859 (method url-fetch)
12860 (uri (pypi-uri "xenon" version))
12861 (sha256
12862 (base32
12863 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
12864 (build-system python-build-system)
12865 (native-inputs
12866 `(("python-pyyaml" ,python-pyyaml)
12867 ("python-radon" ,python-radon)
12868 ("python-requests" ,python-requests)
12869 ("python-flake8" ,python-flake8)
12870 ("python-tox" ,python-tox)))
12871 (arguments
12872 `(#:phases
12873 (modify-phases %standard-phases
12874 (add-before 'build 'patch-test-requirements
12875 (lambda _
12876 ;; Remove httpretty dependency for tests.
12877 (substitute* "setup.py"
12878 (("httpretty") ""))
12879 #t)))))
12880 (home-page "https://xenon.readthedocs.org/")
12881 (synopsis "Monitor code metrics for Python on your CI server")
12882 (description
12883 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
12884Ideally, @code{xenon} is run every time code is committed. Through command
12885line options, various thresholds can be set for the complexity of code. It
12886will fail (i.e. it will exit with a non-zero exit code) when any of these
12887requirements is not met.")
12888 (license license:expat)))
12889
12890(define-public python2-xenon
12891 (package-with-python2 python-xenon))
12892
12893(define-public python-pysocks
12894 (package
12895 (name "python-pysocks")
12896 (version "1.6.8")
12897 (source
12898 (origin
12899 (method url-fetch)
12900 (uri (pypi-uri "PySocks" version))
12901 (sha256
12902 (base32
12903 "0wn6xafwy9c1gamwljw3fyvih5w19qy9xp39zmv8c90ai5ajrr9z"))))
12904 (build-system python-build-system)
12905 (arguments `(#:tests? #f))
12906 (home-page "https://github.com/Anorov/PySocks")
12907 (synopsis "SOCKS client module")
12908 (description "@code{pysocks} is an updated and semi-actively maintained
12909version of @code{SocksiPy} with bug fixes and extra features.")
12910 (license license:bsd-3)))
12911
12912(define-public python2-pysocks
12913 (package-with-python2 python-pysocks))
12914
12915(define-public python-pydiff
12916 (package
12917 (name "python-pydiff")
12918 (version "0.2")
12919 (source
12920 (origin
12921 (method url-fetch)
12922 (uri (pypi-uri "pydiff" version))
12923 (sha256
12924 (base32
12925 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
12926 (build-system python-build-system)
12927 (home-page "https://github.com/myint/pydiff")
12928 (synopsis "Library to diff two Python files at the bytecode level")
12929 (description
12930 "@code{pydiff} makes it easy to look for actual code changes while
12931ignoring formatting changes.")
12932 (license license:expat)))
12933
12934(define-public python2-pydiff
12935 (package-with-python2 python-pydiff))
12936
12937(define-public python-tqdm
12938 (package
12939 (name "python-tqdm")
12940 (version "4.19.6")
12941 (source
12942 (origin
12943 (method url-fetch)
12944 (uri (pypi-uri "tqdm" version))
12945 (sha256
12946 (base32
12947 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
12948 (build-system python-build-system)
12949 (native-inputs
12950 `(("python-flake8" ,python-flake8)
12951 ("python-nose" ,python-nose)
12952 ("python-coverage" ,python-coverage)))
12953 (home-page "https://github.com/tqdm/tqdm")
12954 (synopsis "Fast, extensible progress meter")
12955 (description
12956 "Make loops show a progress bar on the console by just wrapping any
12957iterable with @code{|tqdm(iterable)|}. Offers many options to define
12958design and layout.")
12959 (license (list license:mpl2.0 license:expat))))
12960
12961(define-public python2-tqdm
12962 (package-with-python2 python-tqdm))
12963
12964(define-public python-pkginfo
12965 (package
12966 (name "python-pkginfo")
12967 (version "1.4.2")
12968 (source
12969 (origin
12970 (method url-fetch)
12971 (uri (pypi-uri "pkginfo" version))
12972 (sha256
12973 (base32
12974 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
12975 (build-system python-build-system)
12976 (arguments
12977 ;; The tests are broken upstream.
12978 '(#:tests? #f))
12979 (home-page
12980 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
12981 (synopsis
12982 "Query metadatdata from sdists, bdists, and installed packages")
12983 (description
12984 "API to query the distutils metadata written in @file{PKG-INFO} inside a
12985source distriubtion (an sdist) or a binary distribution (e.g., created by
12986running bdist_egg). It can also query the EGG-INFO directory of an installed
12987distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
12988created by running @code{python setup.py develop}).")
12989 (license license:expat)))
12990
12991(define-public python2-pkginfo
12992 (package-with-python2 python-pkginfo))
12993
12994(define-public python-twine
12995 (package
12996 (name "python-twine")
12997 (version "1.9.1")
12998 (source
12999 (origin
13000 (method url-fetch)
13001 (uri (pypi-uri "twine" version))
13002 (sha256
13003 (base32
13004 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
13005 (build-system python-build-system)
13006 (propagated-inputs
13007 `(("python-tqdm" ,python-tqdm)
13008 ("python-pkginfo" ,python-pkginfo)
13009 ("python-requests" ,python-requests)
13010 ("python-requests-toolbelt" ,python-requests-toolbelt)))
13011 (home-page "https://github.com/pypa/twine")
13012 (synopsis "Collection of utilities for interacting with PyPI")
13013 (description
13014 "@code{twine} currently supports registering projects and uploading
13015distributions. It authenticates the user over HTTPS, allows them to pre-sign
13016their files and supports any packaging format (including wheels).")
13017 (license license:asl2.0)))
13018
13019(define-public python2-twine
13020 (package-with-python2 python-twine))
13021
13022(define-public python-linecache2
13023 (package
13024 (name "python-linecache2")
13025 (version "1.0.0")
13026 (source
13027 (origin
13028 (method url-fetch)
13029 (uri (pypi-uri "linecache2" version))
13030 (sha256
13031 (base32
13032 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
13033 (build-system python-build-system)
13034 (arguments
13035 `(;; The tests depend on unittest2, and our version is a bit too old.
13036 #:tests? #f))
13037 (native-inputs
13038 `(("python-pbr" ,python-pbr-minimal)))
13039 (home-page
13040 "https://github.com/testing-cabal/linecache2")
13041 (synopsis "Backports of the linecache module")
13042 (description
13043 "The linecache module allows one to get any line from any file, while
13044attempting to optimize internally, using a cache, the common case where many
13045lines are read from a single file.")
13046 (license license:psfl)))
13047
13048(define-public python2-linecache2
13049 (package-with-python2 python-linecache2))
13050
13051(define-public python-traceback2
13052 (package
13053 (name "python-traceback2")
13054 (version "1.4.0")
13055 (source
13056 (origin
13057 (method url-fetch)
13058 (uri (pypi-uri "traceback2" version))
13059 (sha256
13060 (base32
13061 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
13062 (build-system python-build-system)
13063 (arguments
13064 `(;; python-traceback2 and python-unittest2 depend on one another.
13065 #:tests? #f))
13066 (native-inputs
13067 `(("python-pbr" ,python-pbr-minimal)))
13068 (propagated-inputs
13069 `(("python-linecache2" ,python-linecache2)))
13070 (home-page
13071 "https://github.com/testing-cabal/traceback2")
13072 (synopsis "Backports of the traceback module")
13073 (description
13074 "This module provides a standard interface to extract, format and print
13075stack traces of Python programs. It exactly mimics the behavior of the Python
13076interpreter when it prints a stack trace.")
13077 (license license:psfl)))
13078
13079(define-public python2-traceback2
13080 (package-with-python2 python-traceback2))
13081
13082(define-public python-ratelimiter
13083 (package
13084 (name "python-ratelimiter")
13085 (version "1.2.0")
13086 (source
13087 (origin
13088 (method url-fetch)
13089 (uri (pypi-uri "ratelimiter" version))
13090 (sha256
13091 (base32
13092 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
13093 (build-system python-build-system)
13094 (arguments
13095 '(#:tests? #f)) ; There are no tests in the pypi archive.
13096 (home-page "https://github.com/RazerM/ratelimiter")
13097 (synopsis "Simple rate limiting object")
13098 (description
13099 "The @code{ratelimiter} module ensures that an operation will not be
13100executed more than a given number of times during a given period.")
13101 (license license:asl2.0)))
13102
13103(define-public python2-ratelimiter
13104 (package-with-python2 python-ratelimiter))
13105
13106(define-public python-dukpy
13107 (package
13108 (name "python-dukpy")
13109 (version "0.3")
13110 (source
13111 (origin
5b77ebe1
TGR
13112 (method git-fetch)
13113 (uri (git-reference
13114 (url "https://github.com/kovidgoyal/dukpy.git")
13115 (commit (string-append "v" version))))
13116 (file-name (git-file-name name version))
44d10b1f 13117 (sha256
5b77ebe1 13118 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
44d10b1f
RW
13119 (build-system python-build-system)
13120 (home-page "https://github.com/kovidgoyal/dukpy")
13121 (synopsis "Run JavaScript in python")
13122 (description
13123 "dukpy is a JavaScript runtime environment for Python using the duktape
13124embeddable JavaScript engine.")
13125 ;; Dukpy is licensed under MIT like the embedded duktape library,
13126 ;; with 'errors.c' as GPL3.
13127 (license (list license:expat license:gpl3))))
13128
13129(define-public python2-dukpy
13130 (package-with-python2 python-dukpy))
13131
13132(define-public python-jsonrpclib-pelix
13133 (package
13134 (name "python-jsonrpclib-pelix")
13135 (version "0.3.2")
13136 (source
13137 (origin
13138 (method url-fetch)
13139 (uri (pypi-uri "jsonrpclib-pelix" version))
13140 (sha256
13141 (base32
13142 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
13143 (build-system python-build-system)
13144 (arguments
13145 `(#:tests? #f)) ; no tests in PyPI tarball
13146 (home-page "https://github.com/tcalmant/jsonrpclib/")
13147 (synopsis "JSON-RPC 2.0 client library for Python")
13148 (description
13149 "This library implements the JSON-RPC v2.0
13150specification (backwards-compatible) as a client library for Python. This
13151version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
13152services.")
13153 (license license:asl2.0)))
13154
13155(define-public python2-jsonrpclib-pelix
13156 (package-with-python2 python-jsonrpclib-pelix))
13157
13158(define-public python-setuptools-scm-git-archive
13159 (package
13160 (name "python-setuptools-scm-git-archive")
13161 (version "1.0")
13162 (source
13163 (origin
13164 (method url-fetch)
13165 (uri (pypi-uri "setuptools_scm_git_archive" version))
13166 (sha256
13167 (base32
13168 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
13169 (build-system python-build-system)
13170 (native-inputs
13171 `(("python-pytest" ,python-pytest)))
13172 (propagated-inputs
13173 `(("python-setuptools-scm" ,python-setuptools-scm)))
13174 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
13175 (synopsis "Setuptools_scm plugin for git archives")
13176 (description
13177 "The setuptools_scm_git_archive package is a plugin to
13178setuptools_scm, which supports obtaining versions from git archives that
13179belong to tagged versions.")
13180 (license license:expat)))
13181
13182(define-public python2-setuptools-scm-git-archive
13183 (package-with-python2 python-setuptools-scm-git-archive))
13184
13185(define-public python-pyclipper
13186 (package
13187 (name "python-pyclipper")
13188 (version "1.1.0.post1")
13189 (source
13190 (origin
13191 (method url-fetch)
13192 (uri (pypi-uri "pyclipper" version ".zip"))
13193 (sha256
13194 (base32
13195 "0ldbkbnx94an4zzrwb1sxmg6k0jgk4cwmvcdyy8y5k1zslc612wa"))
13196 (modules '((guix build utils)))
13197 (snippet
13198 '(begin
13199 ;; This file is generated by Cython.
13200 (delete-file "pyclipper/pyclipper.cpp") #t))))
13201 (build-system python-build-system)
13202 (arguments
13203 `(#:phases
13204 (modify-phases %standard-phases
13205 (add-before 'build 'cythonize-sources
13206 (lambda _
13207 (with-directory-excursion "pyclipper"
13208 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
13209 (propagated-inputs
13210 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
13211 (native-inputs
13212 `(("python-cython" ,python-cython)
13213 ("python-pytest" ,python-pytest)
13214 ("python-pytest-runner" ,python-pytest-runner)
13215 ("python-unittest2" ,python-unittest2)
13216 ("unzip" ,unzip)))
13217 (home-page "https://github.com/greginvm/pyclipper")
13218 (synopsis "Wrapper for Angus Johnson's Clipper library")
13219 (description
13220 "Pyclipper is a Cython wrapper for the C++ translation of the
13221Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
13222 (license license:expat)))
13223
13224(define-public python2-pyclipper
13225 (package-with-python2 python-pyclipper))
13226
13227(define-public python2-booleanoperations
13228 (package
13229 (name "python2-booleanoperations")
13230 (version "0.7.1")
13231 (source
13232 (origin
13233 (method url-fetch)
13234 (uri (pypi-uri "booleanOperations" version ".zip"))
13235 (sha256
13236 (base32
13237 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
13238 (build-system python-build-system)
13239 (arguments
13240 `(#:python ,python-2))
13241 (native-inputs
13242 `(("unzip" ,unzip)
13243 ("python2-pytest" ,python2-pytest)
13244 ("python2-pytest-runner" ,python2-pytest-runner)))
13245 (propagated-inputs
13246 `(("python-fonttools" ,python2-fonttools)
13247 ("python-pyclipper" ,python2-pyclipper)
13248 ("python-ufolib" ,python2-ufolib)))
13249 (home-page "https://github.com/typemytype/booleanOperations")
13250 (synopsis "Boolean operations on paths")
13251 (description
13252 "BooleanOperations provides a Python library that enables
13253boolean operations on paths.")
13254 (license license:expat)))
13255
13256(define-public python-tempdir
13257 (package
13258 (name "python-tempdir")
13259 (version "0.7.1")
13260 (source
13261 (origin
13262 (method url-fetch)
13263 (uri (pypi-uri "tempdir" version))
13264 (sha256
13265 (base32
13266 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
13267 (build-system python-build-system)
13268 (home-page "https://pypi.org/project/tempdir/")
13269 (arguments
13270 ;; the package has no tests
13271 '(#:tests? #f))
13272 (synopsis "Python library for managing temporary directories")
13273 (description
13274 "This library manages temporary directories that are automatically
13275deleted with all their contents when they are no longer needed. It is
13276particularly convenient for use in tests.")
13277 (license license:expat)))
13278
13279(define-public python2-tempdir
13280 (package-with-python2 python-tempdir))
13281
13282(define-public python-activepapers
13283 (package
13284 (name "python-activepapers")
13285 (version "0.2.2")
13286 (source
13287 (origin
13288 (method url-fetch)
13289 (uri (pypi-uri "ActivePapers.Py" version))
13290 (sha256
13291 (base32
13292 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
13293 (build-system python-build-system)
13294 (arguments
13295 `(#:modules ((ice-9 ftw)
13296 (srfi srfi-1)
13297 (guix build utils)
13298 (guix build python-build-system))
13299
13300 #:phases
13301 (modify-phases %standard-phases
13302 (add-after 'unpack 'delete-python2-code
13303 (lambda _
13304 (for-each delete-file
13305 '("lib/activepapers/builtins2.py"
13306 "lib/activepapers/standardlib2.py"
13307 "lib/activepapers/utility2.py"))))
13308 (replace 'check
13309 (lambda _
13310 ;; Deactivate the test cases that download files
13311 (setenv "NO_NETWORK_ACCESS" "1")
13312 ;; For some strange reason, some tests fail if nosetests runs all
13313 ;; test modules in a single execution. They pass if each test
13314 ;; module is run individually.
13315 (for-each (lambda (filename)
13316 (invoke "nosetests"
13317 (string-append "tests/" filename)))
13318 (scandir "tests"
13319 (lambda (filename)
13320 (string-suffix? ".py" filename)))))))))
13321 (native-inputs
13322 `(("python-tempdir" ,python-tempdir)
13323 ("python-nose" ,python-nose)))
13324 (propagated-inputs
13325 `(("python-h5py" ,python-h5py)))
13326 (home-page "http://www.activepapers.org/")
13327 (synopsis "Executable papers for scientific computing")
13328 (description
13329 "ActivePapers is a tool for working with executable papers, which
13330combine data, code, and documentation in single-file packages,
13331suitable for publication as supplementary material or on repositories
13332such as figshare or Zenodo.")
13333 (properties `((python2-variant . ,(delay python2-activepapers))))
13334 (license license:bsd-3)))
13335
13336(define-public python2-activepapers
13337 (let ((base (package-with-python2
13338 (strip-python2-variant python-activepapers))))
13339 (package
13340 (inherit base)
13341 (arguments
13342 (substitute-keyword-arguments (package-arguments base)
13343 ((#:phases phases)
13344 `(modify-phases ,phases
13345 (delete 'delete-python2-code)
13346 (add-after 'unpack 'delete-python3-code
13347 (lambda _
13348 (for-each delete-file
13349 '("lib/activepapers/builtins3.py"
13350 "lib/activepapers/standardlib3.py"
13351 "lib/activepapers/utility3.py")))))))))))
13352
13353(define-public python-semver
13354 (package
13355 (name "python-semver")
13356 (version "2.7.9")
13357 (source
13358 (origin
13359 (method url-fetch)
13360 (uri (pypi-uri "semver" version))
13361 (sha256
13362 (base32
13363 "0hhgqppchv59rqj0yzi1prdg2nfsywqmjsqy2rycyxm0hvxmbyqz"))))
13364 (build-system python-build-system)
13365 (arguments
13366 `(#:phases
13367 (modify-phases %standard-phases
13368 (add-after 'unpack 'patch-test-requirements
13369 (lambda _
13370 (substitute* "setup.py"
13371 ;; Our Python is new enough.
13372 (("'virtualenv<14\\.0\\.0'") "'virtualenv'"))
13373 #t)))))
13374 (native-inputs
13375 `(("python-tox" ,python-tox)
13376 ("python-virtualenv" ,python-virtualenv)))
13377 (home-page "https://github.com/k-bx/python-semver")
13378 (synopsis "Python helper for Semantic Versioning")
13379 (description "This package provides a Python library for
13380@url{Semantic Versioning, http://semver.org/}.")
13381 (license license:bsd-3)))
13382
13383(define-public python2-semver
13384 (package-with-python2 python-semver))
13385
13386(define-public python-pyro4
13387 (package
13388 (name "python-pyro4")
ad1acb81 13389 (version "4.75")
44d10b1f
RW
13390 (source
13391 (origin
13392 (method url-fetch)
13393 (uri (pypi-uri "Pyro4" version))
13394 (sha256
ad1acb81 13395 (base32 "1dfpp36imddx19yv0kd28gk1l71ckhpqy6jd590wpm2680jw15rq"))))
44d10b1f
RW
13396 (build-system python-build-system)
13397 (propagated-inputs
13398 `(("python-serpent" ,python-serpent)))
13399 (home-page "https://pyro4.readthedocs.io")
13400 (synopsis "Distributed object middleware for Python")
13401 (description
13402 "Pyro enables you to build applications in which objects can talk to each
13403other over the network. You can just use normal Python method calls to call
13404objects on other machines, also known as remote procedure calls (RPC).")
13405 (license license:expat)))
13406
13407(define-public python2-pyro
13408 (package
13409 (name "python2-pyro")
13410 (version "3.16")
13411 (source
13412 (origin
13413 (method url-fetch)
13414 (uri (pypi-uri "Pyro" version))
13415 (file-name (string-append "Pyro-" version ".tar.gz"))
13416 (sha256
13417 (base32
13418 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
13419 (build-system python-build-system)
13420 (arguments
13421 ;; Pyro is not compatible with Python 3
13422 `(#:python ,python-2
13423 ;; Pyro has no test cases for automatic execution
13424 #:tests? #f))
13425 (home-page "http://pythonhosted.org/Pyro/")
13426 (synopsis "Distributed object manager for Python")
13427 (description "Pyro is a Distributed Object Technology system
13428written in Python that is designed to be easy to use. It resembles
13429Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
13430which is a system and language independent Distributed Object Technology
13431and has much more to offer than Pyro or RMI. Pyro 3.x is no
13432longer maintained. New projects should use Pyro4 instead, which
13433is the new Pyro version that is actively developed.")
13434 (license license:expat)))
13435
13436(define-public python2-scientific
13437 (package
13438 (name "python2-scientific")
13439 (version "2.9.4")
13440 (source
13441 (origin
13442 (method url-fetch)
13443 (uri (string-append "https://bitbucket.org/khinsen/"
13444 "scientificpython/downloads/ScientificPython-"
13445 version ".tar.gz"))
13446 (file-name (string-append "ScientificPython-" version ".tar.gz"))
13447 (sha256
13448 (base32
13449 "0fc69zhlsn9d2jvbzyjl9ah53vj598h84nkq230c83ahfvgzx5y3"))))
13450 (build-system python-build-system)
13451 (inputs
13452 `(("netcdf" ,netcdf)))
13453 (propagated-inputs
13454 `(("python-numpy" ,python2-numpy-1.8)
13455 ("python-pyro" ,python2-pyro)))
13456 (arguments
13457 ;; ScientificPython is not compatible with Python 3
13458 `(#:python ,python-2
13459 #:tests? #f ; No test suite
13460 #:phases
13461 (modify-phases %standard-phases
13462 (replace 'build
13463 (lambda* (#:key inputs #:allow-other-keys)
77e61e25
RW
13464 (invoke "python" "setup.py" "build"
13465 (string-append "--netcdf_prefix="
13466 (assoc-ref inputs "netcdf"))))))))
44d10b1f
RW
13467 (home-page "https://bitbucket.org/khinsen/scientificpython")
13468 (synopsis "Python modules for scientific computing")
13469 (description "ScientificPython is a collection of Python modules that are
13470useful for scientific computing. Most modules are rather general (Geometry,
13471physical units, automatic derivatives, ...) whereas others are more
13472domain-specific (e.g. netCDF and PDB support). The library is currently
13473not actively maintained and works only with Python 2 and NumPy < 1.9.")
13474 (license license:cecill-c)))
13475
13476(define-public python2-mmtk
13477 (package
13478 (name "python2-mmtk")
13479 (version "2.7.11")
13480 (source
13481 (origin
13482 (method url-fetch)
13483 (uri (string-append "https://bitbucket.org/khinsen/"
13484 "mmtk/downloads/MMTK-" version ".tar.gz"))
13485 (file-name (string-append "MMTK-" version ".tar.gz"))
13486 (sha256
13487 (base32
13488 "1d0nnjx4lwsvh8f99vv1r6gi50d93yba0adkz8b4zgv4za4c5862"))))
13489 (build-system python-build-system)
13490 (native-inputs
13491 `(("netcdf" ,netcdf)))
13492 (propagated-inputs
13493 `(("python-scientific" ,python2-scientific)
13494 ("python-tkinter" ,python-2 "tk")))
13495 (arguments
13496 `(#:python ,python-2
13497 #:tests? #f
13498 #:phases
13499 (modify-phases %standard-phases
13500 (add-before 'build 'includes-from-scientific
13501 (lambda* (#:key inputs #:allow-other-keys)
13502 (mkdir-p "Include/Scientific")
13503 (copy-recursively
13504 (string-append
13505 (assoc-ref inputs "python-scientific")
13506 "/include/python2.7/Scientific")
13507 "Include/Scientific"))))))
13508 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
13509 (synopsis "Python library for molecular simulation")
13510 (description "MMTK is a library for molecular simulations with an emphasis
13511on biomolecules. It provides widely used methods such as Molecular Dynamics
13512and normal mode analysis, but also basic routines for implementing new methods
13513for simulation and analysis. The library is currently not actively maintained
13514and works only with Python 2 and NumPy < 1.9.")
13515 (license license:cecill-c)))
13516
13517(define-public python-phonenumbers
13518 (package
13519 (name "python-phonenumbers")
13520 (version "8.9.1")
13521 (source
13522 (origin
13523 (method url-fetch)
13524 (uri (pypi-uri "phonenumbers" version))
13525 (sha256
13526 (base32
13527 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
13528 (build-system python-build-system)
13529 (home-page
13530 "https://github.com/daviddrysdale/python-phonenumbers")
13531 (synopsis
13532 "Python library for dealing with international phone numbers")
13533 (description
13534 "This package provides a Python port of Google's libphonenumber library.")
13535 (license license:asl2.0)))
13536
13537(define-public python2-phonenumbers
13538 (package-with-python2 python-phonenumbers))
13539
13540(define-public python-send2trash
13541 (package
13542 (name "python-send2trash")
d9b0216b 13543 (version "1.5.0")
44d10b1f 13544 (source
d9b0216b 13545 (origin (method git-fetch)
44d10b1f 13546 ;; Source tarball on PyPI doesn't include tests.
d9b0216b
RW
13547 (uri (git-reference
13548 (url "https://github.com/hsoft/send2trash.git")
13549 (commit version)))
13550 (file-name (git-file-name name version))
44d10b1f
RW
13551 (sha256
13552 (base32
d9b0216b 13553 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
44d10b1f
RW
13554 (build-system python-build-system)
13555 (arguments
13556 '(#:phases
13557 (modify-phases %standard-phases
13558 (add-before 'check 'pre-check
13559 (lambda _
13560 (mkdir-p "/tmp/foo")
13561 (setenv "HOME" "/tmp/foo")
13562 #t)))))
13563 (home-page "https://github.com/hsoft/send2trash")
13564 (synopsis "Send files to the user's @file{~/Trash} directory")
13565 (description "This package provides a Python library to send files to the
13566user's @file{~/Trash} directory.")
13567 (license license:bsd-3)))
13568
13569(define-public python2-send2trash
13570 (package
13571 (inherit (package-with-python2 python-send2trash))
13572 (arguments
13573 (substitute-keyword-arguments (package-arguments python-send2trash)
13574 ((#:phases phases)
13575 `(modify-phases ,phases
13576 (add-before 'check 'setenv
13577 (lambda _
13578 (setenv "PYTHONPATH"
13579 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
13580 #t))))))
13581 (properties `((python2-variant . ,(delay python-send2trash))))))
13582
13583(define-public python-yapf
13584 (package
13585 (name "python-yapf")
13586 (version "0.24.0")
13587 (source
13588 (origin
13589 (method url-fetch)
13590 (uri (pypi-uri "yapf" version))
13591 (sha256
13592 (base32
13593 "0anwby0ydmyzcsgjc5dn1ryddwvii4dq61vck447q0n96npnzfyf"))))
13594 (build-system python-build-system)
13595 (home-page "https://github.com/google/yapf")
13596 (synopsis "Formatter for Python code")
13597 (description "YAPF is a formatter for Python code. It's based off of
13598@dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
13599takes the code and reformats it to the best formatting that conforms to the
13600style guide, even if the original code didn't violate the style guide.")
13601 (license license:asl2.0)))
13602
13603(define-public python2-yapf
13604 (package-with-python2 python-yapf))
13605
13606(define-public python-gyp
13607 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
13608 (revision "0"))
13609 (package
13610 (name "python-gyp")
13611 ;; Google does not release versions,
13612 ;; based on second most recent commit date.
13613 (version (git-version "0.0.0" revision commit))
13614 (source
13615 (origin
13616 ;; Google does not release tarballs,
13617 ;; git checkout is needed.
13618 (method git-fetch)
13619 (uri (git-reference
13620 (url "https://chromium.googlesource.com/external/gyp")
13621 (commit commit)))
13622 (file-name (git-file-name name version))
13623 (sha256
13624 (base32
13625 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
13626 (build-system python-build-system)
13627 (home-page "https://gyp.gsrc.io/")
13628 (synopsis "GYP is a Meta-Build system")
13629 (description
13630 "GYP builds build systems for large, cross platform applications.
13631It can be used to generate XCode projects, Visual Studio projects, Ninja build
13632files, and Makefiles.")
13633 (license license:bsd-3))))
13634
13635(define-public python2-gyp
13636 (package-with-python2 python-gyp))
13637
13638(define-public python-whatever
13639 (package
13640 (name "python-whatever")
13641 (version "0.5")
13642 (source
13643 (origin
13644 (method url-fetch)
13645 (uri (string-append "https://github.com/Suor/whatever/archive/" version
13646 ".tar.gz"))
13647 (sha256
13648 (base32
13649 "1iqvnaf0zpc6b4rvbqq4xy45mszcscyzpzknv8wg6j84pbp22sap"))
13650 (file-name (string-append name "-" version ".tar.gz"))))
13651 (build-system python-build-system)
13652 (arguments
13653 `(#:phases
13654 (modify-phases %standard-phases
13655 (replace 'check
13656 (lambda _
13657 (invoke "py.test"))))))
13658 (native-inputs
13659 `(("python-pytest" ,python-pytest)))
13660 (home-page "http://github.com/Suor/whatever")
13661 (synopsis "Make anonymous functions by partial application of operators")
13662 (description "@code{whatever} provides an easy way to make anonymous
13663functions by partial application of operators.")
13664 (license license:bsd-3)))
13665
13666(define-public python2-whatever
13667 (package-with-python2 python-whatever))
13668
13669(define-public python-funcy
13670 (package
13671 (name "python-funcy")
9e396ab8 13672 (version "1.11")
44d10b1f
RW
13673 (source
13674 (origin
a85c6027
TGR
13675 (method git-fetch)
13676 (uri (git-reference
13677 (url "https://github.com/Suor/funcy.git")
13678 (commit version)))
44d10b1f 13679 (sha256
a85c6027
TGR
13680 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
13681 (file-name (git-file-name name version))))
44d10b1f
RW
13682 (build-system python-build-system)
13683 (arguments
13684 `(#:phases
13685 (modify-phases %standard-phases
13686 (replace 'check
13687 (lambda _
13688 (invoke "py.test"))))))
13689 (native-inputs
13690 `(("python-pytest" ,python-pytest)
13691 ("python-whatever" ,python-whatever)))
13692 (home-page "http://github.com/Suor/funcy")
13693 (synopsis "Functional tools")
13694 (description "@code{funcy} is a library that provides functional tools.
13695Examples are:
13696@enumerate
13697@item merge - Merges collections of the same type
13698@item walk - Type-preserving map
13699@item select - Selects a part of a collection
13700@item take - Takes the first n items of a collection
13701@item first - Takes the first item of a collection
13702@item remove - Predicated-removes items of a collection
13703@item concat - Concatenates two collections
13704@item flatten - Flattens a collection with subcollections
13705@item distinct - Returns only distinct items
13706@item split - Predicated-splits a collection
13707@item split_at - Splits a collection at a given item
13708@item group_by - Groups items by group
13709@item pairwise - Pairs off adjacent items
13710@item partial - Partially-applies a function
13711@item curry - Curries a function
13712@item compose - Composes functions
13713@item complement - Complements a predicate
13714@item all_fn - \"all\" with predicate
13715@end enumerate")
13716 (license license:bsd-3)))
13717
13718(define-public python2-funcy
13719 (package-with-python2 python-funcy))
13720
13721(define-public python-isoweek
13722 (package
13723 (name "python-isoweek")
13724 (version "1.3.3")
13725 (source
13726 (origin
13727 (method url-fetch)
13728 (uri (pypi-uri "isoweek" version))
13729 (sha256
13730 (base32
13731 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
13732 (build-system python-build-system)
13733 (home-page "https://github.com/gisle/isoweek")
13734 (synopsis "Objects representing a week")
13735 (description "The @code{isoweek} module provide the class Week that
13736implements the week definition of ISO 8601. This standard also defines
13737a notation for identifying weeks; yyyyWww (where the W is a literal).
13738Week instances stringify to this form.")
13739 (license license:bsd-3)))
13740
13741(define-public python2-isoweek
13742 (package-with-python2 python-isoweek))
13743
13744(define-public python-tokenize-rt
13745 (package
13746 (name "python-tokenize-rt")
13747 (version "2.0.1")
13748 (source
13749 (origin
13750 (method url-fetch)
13751 (uri (pypi-uri "tokenize-rt" version))
13752 (sha256
13753 (base32
13754 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
13755 (build-system python-build-system)
13756 (home-page "https://github.com/asottile/tokenize-rt")
13757 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
13758 (description
13759 "This Python library is a wrapper around @code{tokenize} from the Python
13760standard library. It provides two additional tokens @code{ESCAPED_NL} and
13761@code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
13762and @code{tokens_to_src} to roundtrip.")
13763 (license license:expat)))
13764
13765(define-public python-future-fstrings
13766 (package
13767 (name "python-future-fstrings")
13768 (version "0.4.1")
13769 (source
13770 (origin
13771 (method url-fetch)
13772 (uri (pypi-uri "future_fstrings" version))
13773 (sha256
13774 (base32
13775 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
13776 (build-system python-build-system)
13777 (propagated-inputs
13778 `(("python-tokenize-rt" ,python-tokenize-rt)))
13779 (home-page "https://github.com/asottile/future-fstrings")
13780 (synopsis "Backport of fstrings to Python < 3.6")
13781 (description
13782 "This package provides a UTF-8 compatible encoding
13783@code{future_fstrings}, which performs source manipulation. It decodes the
13784source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
13785@code{f} strings.")
13786 (license license:expat)))
13787
13788(define-public python-typing
13789 (package
13790 (name "python-typing")
13791 (version "3.6.6")
13792 (source
13793 (origin
13794 (method url-fetch)
13795 (uri (pypi-uri "typing" version))
13796 (sha256
13797 (base32
13798 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
13799 (build-system python-build-system)
13800 (home-page "https://docs.python.org/3/library/typing.html")
13801 (synopsis "Type hints for Python")
13802 (description "This is a backport of the standard library @code{typing}
13803module to Python versions older than 3.5. Typing defines a standard notation
13804for Python function and variable type annotations. The notation can be used
13805for documenting code in a concise, standard format, and it has been designed
13806to also be used by static and runtime type checkers, static analyzers, IDEs
13807and other tools.")
13808 (license license:psfl)))
13809
13810(define-public python2-typing
13811 (package-with-python2 python-typing))
13812
f89d443b
VC
13813(define-public python-typing-extensions
13814 (package
13815 (name "python-typing-extensions")
13816 (version "3.7.2")
13817 (source
13818 (origin
13819 (method url-fetch)
13820 (uri (pypi-uri "typing_extensions" version))
13821 (sha256
13822 (base32
13823 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
13824 (build-system python-build-system)
13825 (home-page
13826 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
13827 (synopsis "Experimental type hints for Python")
13828 (description
13829 "The typing_extensions module contains additional @code{typing} hints not
13830yet present in the of the @code{typing} standard library.
13831Included are implementations of:
13832@enumerate
13833@item ClassVar
13834@item ContextManager
13835@item Counter
13836@item DefaultDict
13837@item Deque
13838@item NewType
13839@item NoReturn
13840@item overload
13841@item Protocol
13842@item runtime
13843@item Text
13844@item Type
13845@item TYPE_CHECKING
13846@item AsyncGenerator
13847@end enumerate\n")
13848 (license license:psfl)))
13849
44d10b1f
RW
13850(define-public bpython
13851 (package
13852 (name "bpython")
13853 (version "0.17.1")
13854 (source
13855 (origin
13856 (method url-fetch)
13857 (uri (pypi-uri "bpython" version))
13858 (sha256
13859 (base32
13860 "0bxhxi5zxdkrf8b4gwn0d363kdz3qnypjwhm1aydki53ph8ca1w9"))))
13861 (build-system python-build-system)
13862 (arguments
13863 `(#:phases
13864 (modify-phases %standard-phases
13865 (add-after 'unpack 'remove-failing-test
13866 (lambda _
13867 ;; Remove failing test. FIXME: make it pass
13868 (delete-file "bpython/test/test_args.py")
13869 #t))
13870 (add-after 'wrap 'add-aliases
13871 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
13872 (lambda* (#:key outputs #:allow-other-keys)
13873 (let ((out (assoc-ref outputs "out")))
13874 (for-each
13875 (lambda (old new)
13876 (symlink old (string-append out "/bin/" new)))
13877 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
13878 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
13879 #t)))))
13880 (propagated-inputs
13881 `(("python-pygments" ,python-pygments)
13882 ("python-requests" ,python-requests)
13883 ("python-babel" ,python-babel) ; optional, for internationalization
13884 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
13885 ("python-greenlet" ,python-greenlet)
13886 ("python-urwid" ,python-urwid) ; for bpython-urwid only
13887 ("python-six" ,python-six)))
13888 (native-inputs
13889 `(("python-sphinx" ,python-sphinx)
13890 ("python-mock" ,python-mock)))
13891 (home-page "https://bpython-interpreter.org/")
13892 (synopsis "Fancy interface to the Python interpreter")
13893 (description "Bpython is a fancy interface to the Python
13894interpreter. bpython's main features are
13895
13896@enumerate
13897@item in-line syntax highlighting,
13898@item readline-like autocomplete with suggestions displayed as you type,
13899@item expected parameter list for any Python function,
13900@item \"rewind\" function to pop the last line of code from memory and
13901 re-evaluate,
13902@item send the code you've entered off to a pastebin,
13903@item save the code you've entered to a file, and
13904@item auto-indentation.
13905@end enumerate")
13906 (license license:expat)))
13907
13908(define-public bpython2
13909 (let ((base (package-with-python2
13910 (strip-python2-variant bpython))))
13911 (package (inherit base)
13912 (name "bpython2")
13913 (arguments
13914 `(#:python ,python-2
13915 #:phases
13916 (modify-phases %standard-phases
13917 (add-after 'unpack 'remove-failing-test
13918 (lambda _
13919 ;; Remove failing test. FIXME: make it pass
13920 (delete-file "bpython/test/test_args.py")
13921 ;; Disable failing test-cases (renaming inhibits they are
13922 ;; discovered)
13923 (substitute* "bpython/test/test_curtsies_repl.py"
13924 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
13925 (string-append a "xxx_off_" b))
13926 (("^(\\s*def )(test_complex\\W)" _ a b)
13927 (string-append a "xxx_off_" b)))
13928 #t))
13929 (add-before 'build 'rename-scripts
13930 ;; rename the scripts to bypthon2, bpdb2, etc.
13931 (lambda _
13932 (substitute* "setup.py"
13933 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
13934 (string-append name "2" rest "\n"))
13935 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
13936 (string-append name "2" (or sub "") rest "\n")))
13937 #t))))))))
13938
13939(define-public python-pyinotify
13940 (package
13941 (name "python-pyinotify")
13942 (version "0.9.6")
13943 (source (origin
13944 (method url-fetch)
13945 (uri (pypi-uri "pyinotify" version))
13946 (sha256
13947 (base32
13948 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
13949 (build-system python-build-system)
13950 (arguments `(#:tests? #f)) ;no tests
13951 (home-page "https://github.com/seb-m/pyinotify")
13952 (synopsis "Python library for monitoring inotify events")
13953 (description
13954 "@code{pyinotify} provides a Python interface for monitoring
13955file system events on Linux.")
13956 (license license:expat)))
13957
13958(define-public python2-pyinotify
13959 (package-with-python2 python-pyinotify))
13960
13961;; Ada parser uses this version.
13962(define-public python2-quex-0.67.3
13963 (package
13964 (name "python2-quex")
13965 (version "0.67.3")
13966 (source
13967 (origin
13968 (method url-fetch)
13969 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
13970 (version-major+minor version)
13971 "/quex-" version ".zip"))
13972 (sha256
13973 (base32
13974 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
13975 (build-system python-build-system)
13976 (native-inputs
13977 `(("unzip" ,unzip)))
13978 (arguments
13979 `(#:python ,python-2
13980 #:tests? #f
13981 #:phases
13982 (modify-phases %standard-phases
13983 (delete 'configure)
13984 (delete 'build)
13985 (replace 'install
13986 (lambda* (#:key outputs #:allow-other-keys)
13987 (let* ((out (assoc-ref outputs "out"))
13988 (share/quex (string-append out "/share/quex"))
13989 (bin (string-append out "/bin")))
13990 (copy-recursively "." share/quex)
13991 (mkdir-p bin)
13992 (symlink (string-append share/quex "/quex-exe.py")
13993 (string-append bin "/quex"))
13994 #t))))))
13995 (native-search-paths
13996 (list (search-path-specification
13997 (variable "QUEX_PATH")
13998 (files '("share/quex")))))
13999 (home-page "http://quex.sourceforge.net/")
14000 (synopsis "Lexical analyzer generator in Python")
14001 (description "@code{quex} is a lexical analyzer generator in Python.")
14002 (license license:lgpl2.1+))) ; Non-military
14003
14004(define-public python2-quex
14005 (package (inherit python2-quex-0.67.3)
14006 (name "python2-quex")
14007 (version "0.68.1")
14008 (source
14009 (origin
14010 (method url-fetch)
14011 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
14012 (sha256
14013 (base32
14014 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
14015 (file-name (string-append name "-" version ".tar.gz"))))))
14016
14017(define-public python-more-itertools
14018 (package
14019 (name "python-more-itertools")
14020 (version "4.3.0")
14021 (source
14022 (origin
14023 (method url-fetch)
14024 (uri (pypi-uri "more-itertools" version))
14025 (sha256
14026 (base32
14027 "17h3na0rdh8xq30w4b9pizgkdxmm51896bxw600x84jflg9vaxn4"))))
14028 (build-system python-build-system)
14029 (arguments
14030 `(,@(if (any (cute string-prefix? <> (or (%current-system)
14031 (%current-target-system)))
14032 '("armhf" "i686"))
14033 '(#:phases
14034 (modify-phases %standard-phases
14035 ;; This is required for 32-bit hardware.
14036 ;; TODO: Try to remove this when upgrading.
14037 (add-after 'unpack 'patch-test
14038 (lambda _
14039 (substitute* "more_itertools/tests/test_more.py"
14040 (("10 \\*\\* 10") "9 ** 9"))
14041 #t))))
14042 '())))
14043 (propagated-inputs
14044 `(("python-six" ,python-six-bootstrap)))
14045 (home-page "https://github.com/erikrose/more-itertools")
14046 (synopsis "More routines for operating on iterables, beyond itertools")
14047 (description "Python's built-in @code{itertools} module implements a
14048number of iterator building blocks inspired by constructs from APL, Haskell,
14049and SML. @code{more-itertools} includes additional building blocks for
14050working with iterables.")
14051 (license license:expat)))
14052
14053(define-public python2-more-itertools
14054 (package-with-python2 python-more-itertools))
14055
14056(define-public python-latexcodec
14057 (package
14058 (name "python-latexcodec")
91b61f02 14059 (version "1.0.6")
44d10b1f
RW
14060 (source
14061 (origin
14062 (method url-fetch)
14063 (uri (pypi-uri "latexcodec" version))
14064 (sha256
91b61f02 14065 (base32 "0s4wdbg0w2l8pj3i0y4510i0s04p8nhxcsa2z41bjsv0k66npb81"))))
44d10b1f
RW
14066 (build-system python-build-system)
14067 (inputs
14068 `(("python-six" ,python-six)))
14069 (home-page "https://readthedocs.org/projects/latexcodec/")
14070 (synopsis "Work with LaTeX code in Python")
14071 (description "Lexer and codec to work with LaTeX code in Python.")
14072 (license license:expat)))
14073
14074(define-public python-pybtex
14075 (package
14076 (name "python-pybtex")
14077 (version "0.21")
14078 (source
14079 (origin
14080 (method url-fetch)
14081 (uri (pypi-uri "pybtex" version))
14082 (sha256
14083 (base32
14084 "00300j8dn5pxq4ndxmfmbmycg2znawkqs49val2x6jlmfiy6r2mg"))))
14085 (build-system python-build-system)
14086 (native-inputs
14087 `(("python-nose" ,python-nose)))
14088 (inputs
14089 `(("python-latexcodec" ,python-latexcodec)
14090 ("python-pyyaml" ,python-pyyaml)
14091 ("python-six" ,python-six)))
14092 (arguments
14093 `(#:test-target "nosetests"))
14094 (home-page "https://pybtex.org/")
14095 (synopsis "BibTeX-compatible bibliography processor")
14096 (description "Pybtex is a BibTeX-compatible bibliography processor written
14097in Python. You can simply type pybtex instead of bibtex.")
14098 (license license:expat)))
14099
14100(define-public python-onetimepass
14101 (package
14102 (name "python-onetimepass")
14103 (version "1.0.1")
14104 (source
14105 (origin
14106 (method url-fetch)
14107 (uri (pypi-uri "onetimepass" version))
14108 (sha256
14109 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
14110 (build-system python-build-system)
14111 (propagated-inputs `(("python-six" ,python-six)))
14112 (home-page "https://github.com/tadeck/onetimepass/")
14113 (synopsis "One-time password library")
14114 (description "Python one-time password library for HMAC-based (HOTP) and
14115time-based (TOTP) passwords.")
14116 (license license:expat)))
14117
14118(define-public python-parso
14119 (package
14120 (name "python-parso")
14121 (version "0.3.1")
14122 (source
14123 (origin
14124 (method url-fetch)
14125 (uri (pypi-uri "parso" version))
14126 (sha256
14127 (base32
14128 "18p89iwcm8mnf380f92g9w0bhx5km8wxp392vvjcq4y1ld1llw1m"))))
14129 (native-inputs
14130 `(("python-pytest" ,python-pytest)))
14131 (build-system python-build-system)
14132 (home-page "https://github.com/davidhalter/parso")
14133 (synopsis "Python Parser")
14134 (description "Parso is a Python parser that supports error recovery and
14135round-trip parsing for different Python versions (in multiple Python versions).
14136Parso is also able to list multiple syntax errors in your Python file.")
14137 (license license:expat)))
14138
14139(define-public python2-parso
14140 (package-with-python2 python-parso))
14141
14142(define-public python-async-generator
14143 (package
14144 (name "python-async-generator")
94fcbf8d 14145 (version "1.10")
44d10b1f
RW
14146 (source
14147 (origin
14148 (method url-fetch)
14149 (uri (pypi-uri "async_generator" version))
14150 (sha256
14151 (base32
94fcbf8d 14152 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
44d10b1f
RW
14153 (build-system python-build-system)
14154 (native-inputs
14155 `(("python-pytest" ,python-pytest)))
14156 (home-page "https://github.com/python-trio/async_generator")
14157 (synopsis "Async generators and context managers for Python 3.5+")
14158 (description "@code{async_generator} back-ports Python 3.6's native async
14159generators and Python 3.7's context managers into Python 3.5.")
14160 ;; Dual licensed.
14161 (license (list license:expat license:asl2.0))))
14162
14163(define-public python-async-timeout
14164 (package
14165 (name "python-async-timeout")
14166 (version "3.0.1")
14167 (source
14168 (origin
14169 (method url-fetch)
14170 (uri (pypi-uri "async-timeout" version))
14171 (sha256
14172 (base32
14173 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
14174 (build-system python-build-system)
14175 (home-page "https://github.com/aio-libs/async_timeout/")
14176 (synopsis "Timeout context manager for asyncio programs")
14177 (description "@code{async-timeout} provides a timeout timeout context
14178manager compatible with @code{asyncio}.")
14179 (license license:asl2.0)))
14180
14181(define-public python-glob2
14182 (package
14183 (name "python-glob2")
14184 (version "0.6")
8fa2bcc7
TGR
14185 (source
14186 (origin
14187 (method git-fetch)
14188 (uri (git-reference
14189 (url "https://github.com/miracle2k/python-glob2.git")
14190 (commit version)))
14191 (file-name (git-file-name name version))
14192 (sha256
14193 (base32 "1lm1xz3k3l0k1c5bcp9hlzmi3gp5j8dl1k3xhpiq5mnm0xq6n163"))))
44d10b1f
RW
14194 (build-system python-build-system)
14195 (home-page "https://github.com/miracle2k/python-glob2/")
14196 (synopsis "Extended Version of the python buildin glob module")
14197 (description "This is an extended version of the Python
14198@url{http://docs.python.org/library/glob.html, built-in glob module} which
14199adds:
14200
14201@itemize
14202@item The ability to capture the text matched by glob patterns, and return
14203those matches alongside the file names.
14204@item A recursive @code{**} globbing syntax, akin for example to the
14205@code{globstar} option of Bash.
14206@item The ability to replace the file system functions used, in order to glob
14207on virtual file systems.
14208@item Compatible with Python 2 and Python 3 (tested with 3.3).
14209@end itemize
14210
14211Glob2 currently based on the glob code from Python 3.3.1.")
14212 (license license:bsd-2)))
14213
14214(define-public python2-glob2
14215 (package-with-python2 python-glob2))
14216
14217(define-public python-gipc
14218 (package
14219 (name "python-gipc")
14220 (version "0.6.0")
14221 (source
14222 (origin
14223 (method url-fetch)
14224 (uri (pypi-uri "gipc" version ".zip"))
14225 (sha256
14226 (base32
14227 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
14228 (build-system python-build-system)
14229 (native-inputs
14230 `(("unzip" ,unzip)))
14231 (propagated-inputs
14232 `(("python-gevent" ,python-gevent)))
14233 (home-page "http://gehrcke.de/gipc")
14234 (synopsis "Child process management in the context of gevent")
14235 (description "Usage of Python's multiprocessing package in a
14236gevent-powered application may raise problems. With @code{gipc},
14237process-based child processes can safely be created anywhere within a
14238gevent-powered application.")
14239 (license license:expat)))
14240
14241(define-public python2-gipc
14242 (package-with-python2 python-gipc))
14243
14244(define-public python-fusepy
14245 (package
14246 (name "python-fusepy")
14247 (version "2.0.4")
14248 (source
14249 (origin
14250 (method url-fetch)
14251 (uri (pypi-uri "fusepy" version))
14252 (sha256
14253 (base32
14254 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
14255 (build-system python-build-system)
14256 (arguments
14257 `(#:phases
14258 (modify-phases %standard-phases
14259 (add-before 'build 'set-library-file-name
14260 (lambda* (#:key inputs #:allow-other-keys)
14261 (let ((fuse (assoc-ref inputs "fuse")))
14262 (substitute* "fuse.py"
14263 (("find_library\\('fuse'\\)")
14264 (string-append "'" fuse "/lib/libfuse.so'")))
14265 #t))))))
14266 (propagated-inputs
14267 `(("fuse" ,fuse)))
14268 (home-page "https://github.com/fusepy/fusepy")
14269 (synopsis "Simple ctypes bindings for FUSE")
14270 (description "Python module that provides a simple interface to FUSE and
14271MacFUSE. The binding is created using the standard @code{ctypes} library.")
14272 (license license:isc)))
14273
14274(define-public python2-fusepy
14275 (package-with-python2 python-fusepy))
14276
14277(define-public python2-gdrivefs
14278 (package
14279 (name "python2-gdrivefs")
14280 (version "0.14.9")
14281 (source
14282 (origin
14283 (method url-fetch)
14284 (uri (pypi-uri "gdrivefs" version))
14285 (sha256
14286 (base32
14287 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
14288 (build-system python-build-system)
14289 (arguments
14290 `(#:python ,python-2
14291 #:phases
14292 (modify-phases %standard-phases
14293 (add-before 'build 'patch-setup-py
14294 (lambda _
14295 ;; Update requirements from dependency==version
14296 ;; to dependency>=version
14297 (substitute* "gdrivefs/resources/requirements.txt"
14298 (("==") ">="))
14299 #t)))))
14300 (native-inputs
14301 `(("python2-gipc" ,python2-gipc)
14302 ("python2-gevent" ,python2-gevent)
14303 ("python2-greenlet" ,python2-greenlet)
14304 ("python2-httplib2" ,python2-httplib2)
14305 ("python2-uritemplate" ,python2-uritemplate)
14306 ("python2-oauth2client" ,python2-oauth2client)
14307 ("python2-six" ,python2-six)))
14308 (propagated-inputs
14309 `(("python2-dateutil" ,python2-dateutil)
14310 ("python2-fusepy" ,python2-fusepy)
14311 ("python2-google-api-client" ,python2-google-api-client)))
14312 (home-page "https://github.com/dsoprea/GDriveFS")
14313 (synopsis "Mount Google Drive as a local file system")
14314 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
14315under Python 2.7.")
14316 (license license:gpl2)))
14317
14318(define-public pybind11
14319 (package
14320 (name "pybind11")
14321 (version "2.2.4")
14322 (source (origin
14323 (method git-fetch)
14324 (uri (git-reference
14325 (url "https://github.com/pybind/pybind11.git")
14326 (commit (string-append "v" version))))
14327 (sha256
14328 (base32
14329 "0pa79ymcasv8br5ifbx7878id5py2jpjac3i20cqxr6gs9l6ivlv"))
14330 (file-name (git-file-name name version))))
14331 (build-system cmake-build-system)
14332 (native-inputs
14333 `(("python" ,python)
14334 ("python-pytest" ,python-pytest)))
14335 (arguments
14336 `(#:test-target "check"))
14337 (home-page "https://github.com/pybind/pybind11/")
14338 (synopsis "Seamless operability between C++11 and Python")
14339 (description "pybind11 is a lightweight header-only library that exposes
14340C++ types in Python and vice versa, mainly to create Python bindings of
14341existing C++ code. Its goals and syntax are similar to the excellent
14342Boost.Python library by David Abrahams: to minimize boilerplate code in
14343traditional extension modules by inferring type information using compile-time
14344introspection.")
14345 (license license:expat)))
14346
14347(define-public python-fasteners
14348 (package
14349 (name "python-fasteners")
14350 (version "0.14.1")
14351 (source
14352 (origin
14353 (method url-fetch)
14354 (uri (pypi-uri "fasteners" version))
14355 (sha256
14356 (base32
14357 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
14358 (build-system python-build-system)
14359 (propagated-inputs
14360 `(("python-monotonic" ,python-monotonic)
14361 ("python-six" ,python-six)
14362 ("python-testtools" ,python-testtools)))
14363 (home-page "https://github.com/harlowja/fasteners")
14364 (synopsis "Python package that provides useful locks")
14365 (description
14366 "This package provides a Python program that provides following locks:
14367
14368@itemize
14369@item Locking decorator
14370@item Reader-writer locks
14371@item Inter-process locks
14372@item Generic helpers
14373@end itemize\n")
14374 (properties `((python2-variant . ,(delay python2-fasteners))))
14375 (license license:asl2.0)))
14376
14377(define-public python2-fasteners
14378 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
14379 (package
14380 (inherit base)
14381 (propagated-inputs
14382 `(("python2-futures" ,python2-futures)
14383 ,@(package-propagated-inputs base))))))
14384
14385(define-public python-requests-file
14386 (package
14387 (name "python-requests-file")
14388 (version "1.4.3")
14389 (source
14390 (origin
14391 (method url-fetch)
14392 (uri (pypi-uri "requests-file" version))
14393 (sha256
14394 (base32
14395 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
14396 (build-system python-build-system)
14397 (propagated-inputs
14398 `(("python-requests" ,python-requests)
14399 ("python-six" ,python-six)))
14400 (home-page
14401 "https://github.com/dashea/requests-file")
14402 (synopsis "File transport adapter for Requests")
14403 (description
14404 "Requests-File is a transport adapter for use with the Requests Python
14405library to allow local filesystem access via file:// URLs.")
14406 (license license:asl2.0)))
14407
14408(define-public python2-requests-file
14409 (package-with-python2 python-requests-file))
14410
14411(define-public python-tldextract
14412 (package
14413 (name "python-tldextract")
14414 (version "2.2.0")
14415 (source
14416 (origin
14417 (method url-fetch)
14418 (uri (pypi-uri "tldextract" version))
14419 (sha256
14420 (base32
14421 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
14422 (build-system python-build-system)
14423 (native-inputs
14424 `(("python-pytest" ,python-pytest)
14425 ("python-responses" ,python-responses)))
14426 (propagated-inputs
14427 `(("python-idna" ,python-idna)
14428 ("python-requests" ,python-requests)
14429 ("python-requests-file" ,python-requests-file)))
14430 (home-page
14431 "https://github.com/john-kurkowski/tldextract")
14432 (synopsis
14433 "Separate the TLD from the registered domain and subdomains of a URL")
14434 (description
14435 "TLDExtract accurately separates the TLD from the registered domain and
14436subdomains of a URL, using the Public Suffix List. By default, this includes
14437the public ICANN TLDs and their exceptions. It can optionally support the
14438Public Suffix List's private domains as well.")
14439 (license license:bsd-3)))
14440
14441(define-public python2-tldextract
14442 (package-with-python2 python-tldextract))
14443
14444(define-public python-pynamecheap
14445 (package
14446 (name "python-pynamecheap")
14447 (version "0.0.3")
14448 (source
14449 (origin
14450 (method url-fetch)
14451 (uri (pypi-uri "PyNamecheap" version))
14452 (sha256
14453 (base32
14454 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
14455 (build-system python-build-system)
14456 (propagated-inputs
14457 `(("python-requests" ,python-requests)))
14458 (home-page
14459 "https://github.com/Bemmu/PyNamecheap")
14460 (synopsis
14461 "Namecheap API client in Python")
14462 (description
14463 "PyNamecheap is a Namecheap API client in Python.")
14464 (license license:expat)))
14465
14466(define-public python2-pynamecheap
14467 (package-with-python2 python-pynamecheap))
14468
14469(define-public python-dns-lexicon
14470 (package
14471 (name "python-dns-lexicon")
14472 (version "2.4.0")
14473 (source
14474 (origin
14475 (method url-fetch)
14476 (uri (pypi-uri "dns-lexicon" version))
14477 (sha256
14478 (base32
14479 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
14480 (build-system python-build-system)
14481 (arguments
14482 `(#:tests? #f)) ;requires internet access
14483 (propagated-inputs
14484 `(("python-future" ,python-future)
14485 ("python-pynamecheap" ,python-pynamecheap)
14486 ("python-requests" ,python-requests)
14487 ("python-tldextract" ,python-tldextract)
14488 ("python-urllib3" ,python-urllib3)))
14489 (home-page "https://github.com/AnalogJ/lexicon")
14490 (synopsis
14491 "Manipulate DNS records on various DNS providers")
14492 (description
14493 "Lexicon provides a way to manipulate DNS records on multiple DNS
14494providers in a standardized way. It has a CLI but it can also be used as a
14495Python library. It was designed to be used in automation, specifically with
14496Let's Encrypt.")
14497 (license license:expat)))
14498
14499(define-public python2-dns-lexicon
14500 (package-with-python2 python-dns-lexicon))
14501
14502(define-public python-commandlines
14503 (package
14504 (name "python-commandlines")
14505 (version "0.4.1")
14506 (source
14507 (origin
14508 (method url-fetch)
14509 (uri (pypi-uri "commandlines" version))
14510 (sha256
14511 (base32
14512 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
14513 (build-system python-build-system)
14514 (home-page "https://github.com/chrissimpkins/commandlines")
14515 (synopsis "Command line argument to object parsing library")
14516 (description
14517 "@code{Commandlines} is a Python library for command line application
14518development that supports command line argument parsing, command string
14519validation testing and application logic.")
14520 (license license:expat)))
14521
14522;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
14523;; python-numba. They have a very unflexible relationship.
14524(define-public python-numba
14525 (package
14526 (name "python-numba")
7757e6d8 14527 (version "0.42.0")
44d10b1f
RW
14528 (source
14529 (origin
14530 (method url-fetch)
14531 (uri (pypi-uri "numba" version))
14532 (sha256
14533 (base32
7757e6d8 14534 "03rqdfx0512lcri2bcpngx5k3jwfbqnanqj3n19c7d6h6hqxvq9x"))))
44d10b1f
RW
14535 (build-system python-build-system)
14536 (arguments
14537 `(#:modules ((guix build utils)
14538 (guix build python-build-system)
14539 (ice-9 ftw)
14540 (srfi srfi-1)
14541 (srfi srfi-26))
14542 #:phases
14543 (modify-phases %standard-phases
14544 (add-after 'unpack 'disable-proprietary-features
14545 (lambda _
14546 (setenv "NUMBA_DISABLE_HSA" "1")
14547 (setenv "NUMBA_DISABLE_CUDA" "1")
14548 #t))
14549 (add-after 'unpack 'remove-failing-tests
14550 (lambda _
14551 ;; FIXME: these tests fail for unknown reasons:
14552 ;; test_non_writable_pycache, test_non_creatable_pycache, and
14553 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
14554 (substitute* "numba/tests/test_dispatcher.py"
14555 (("def test(_non_writable_pycache)" _ m)
14556 (string-append "def guix_skip" m))
14557 (("def test(_non_creatable_pycache)" _ m)
14558 (string-append "def guix_skip" m))
14559 (("def test(_frozen)" _ m)
14560 (string-append "def guix_skip" m)))
14561
14562 ;; These tests fail because we don't run the tests from the build
14563 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
14564 ;; They ar in numba.tests.test_pycc.TestDistutilsSupport.
14565 (substitute* "numba/tests/test_pycc.py"
14566 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
14567 (string-append "def guix_skip" m)))
14568 #t))
14569 (replace 'check
14570 (lambda _
14571 (let ((cwd (getcwd)))
14572 (setenv "PYTHONPATH"
14573 (string-append cwd "/build/"
14574 (find (cut string-prefix? "lib" <>)
14575 (scandir (string-append cwd "/build")))
14576 ":"
14577 (getenv "PYTHONPATH")))
14578 ;; Something is wrong with the PYTHONPATH when running the
14579 ;; tests from the build directory, as it complains about not being
14580 ;; able to import certain modules.
14581 (with-directory-excursion "/tmp"
14582 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
14583 #t)))))
14584 (propagated-inputs
14585 `(("python-llvmlite" ,python-llvmlite)
14586 ("python-numpy" ,python-numpy)
14587 ("python-singledispatch" ,python-singledispatch)))
14588 ;; Needed for tests.
14589 (inputs
14590 `(("python-jinja2" ,python-jinja2)
14591 ("python-pygments" ,python-pygments)))
14592 (home-page "https://numba.pydata.org")
14593 (synopsis "Compile Python code using LLVM")
14594 (description "Numba gives you the power to speed up your applications with
14595high performance functions written directly in Python. With a few
14596annotations, array-oriented and math-heavy Python code can be just-in-time
14597compiled to native machine instructions, similar in performance to C, C++ and
14598Fortran, without having to switch languages or Python interpreters.
14599
14600Numba works by generating optimized machine code using the LLVM compiler
14601infrastructure at import time, runtime, or statically (using the included pycc
14602tool).")
14603 (license license:bsd-3)))
14604
14605(define-public python-anndata
14606 (package
14607 (name "python-anndata")
8c9372c1 14608 (version "0.6.18")
44d10b1f
RW
14609 (source
14610 (origin
14611 (method url-fetch)
14612 (uri (pypi-uri "anndata" version))
14613 (sha256
14614 (base32
8c9372c1 14615 "03x83yjaccbqszj7x4fwwmpil0ai59yx64d1zmf2691za3j03w73"))))
44d10b1f
RW
14616 (build-system python-build-system)
14617 (propagated-inputs
14618 `(("python-h5py" ,python-h5py)
14619 ("python-natsort" ,python-natsort)
14620 ("python-pandas" ,python-pandas)
14621 ("python-scipy" ,python-scipy)))
14622 (home-page "https://github.com/theislab/anndata")
14623 (synopsis "Annotated data for data analysis pipelines")
14624 (description "Anndata is a package for simple (functional) high-level APIs
14625for data analysis pipelines. In this context, it provides an efficient,
14626scalable way of keeping track of data together with learned annotations and
14627reduces the code overhead typically encountered when using a mostly
14628object-oriented library such as @code{scikit-learn}.")
14629 (license license:bsd-3)))
14630
14631(define-public python-dill
14632 (package
14633 (name "python-dill")
14634 (version "0.2.8.2")
14635 (source
14636 (origin
14637 (method url-fetch)
14638 (uri (pypi-uri "dill" version))
14639 (sha256
14640 (base32
14641 "1cymzn9fxwdy33h21zkk4gqgzvd25110hh3zdqnvnwa3p52c4kb2"))))
14642 (build-system python-build-system)
14643 ;; FIXME: The check phase fails with "don't know how to make test".
14644 (arguments '(#:tests? #f))
14645 (home-page "https://pypi.org/project/dill")
14646 (synopsis "Serialize all of Python")
14647 (description "Dill extends Python's @code{pickle} module for serializing
14648and de-serializing Python objects to the majority of the built-in Python
14649types. Dill provides the user the same interface as the @code{pickle} module,
14650and also includes some additional features. In addition to pickling Python
14651objects, @code{dill} provides the ability to save the state of an interpreter
14652session in a single command. Hence, it would be feasable to save a
14653interpreter session, close the interpreter, ship the pickled file to another
14654computer, open a new interpreter, unpickle the session and thus continue from
14655the saved state of the original interpreter session.")
14656 (license license:bsd-3)))
14657
14658(define-public python-multiprocess
14659 (package
14660 (name "python-multiprocess")
14661 (version "0.70.6.1")
14662 (source
14663 (origin
14664 (method url-fetch)
14665 (uri (pypi-uri "multiprocess" version))
14666 (sha256
14667 (base32
14668 "1ip5caz67b3q0553mr8gm8xwsb8x500jn8ml0gihgyfy52m2ypcq"))))
14669 (build-system python-build-system)
14670 (propagated-inputs
14671 `(("python-dill" ,python-dill)))
14672 (home-page "https://pypi.org/project/multiprocess")
14673 (synopsis "Multiprocessing and multithreading in Python")
14674 (description
14675 "This package is a fork of the multiprocessing Python package, a package
14676which supports the spawning of processes using the API of the standard
14677library's @code{threading} module.")
14678 (license license:bsd-3)))
14679
14680(define-public python-toolz
14681 (package
14682 (name "python-toolz")
14683 (version "0.9.0")
14684 (source
14685 (origin
14686 (method url-fetch)
14687 (uri (pypi-uri "toolz" version))
14688 (sha256
14689 (base32
14690 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
14691 (build-system python-build-system)
14692 ;; FIXME: tests cannot be computed: "Can't perform this operation for
14693 ;; unregistered loader type"
14694 (arguments '(#:tests? #f))
14695 (home-page "https://github.com/pytoolz/toolz/")
14696 (synopsis "List processing tools and functional utilities")
14697 (description
14698 "This package provides a set of utility functions for iterators,
14699functions, and dictionaries.")
14700 (license license:bsd-3)))
14701
14702(define-public python2-toolz
14703 (package-with-python2 python-toolz))
14704
14705(define-public python-cytoolz
14706 (package
14707 (name "python-cytoolz")
14708 (version "0.9.0.1")
14709 (source
14710 (origin
14711 (method url-fetch)
14712 (uri (pypi-uri "cytoolz" version))
14713 (sha256
14714 (base32
14715 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
14716 (build-system python-build-system)
14717 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
14718 ;; 'exceptions'"
14719 (arguments '(#:tests? #f))
14720 (propagated-inputs
14721 `(("python-toolz" ,python-toolz)))
14722 (native-inputs
14723 `(("python-cython" ,python-cython)))
14724 (home-page "https://github.com/pytoolz/cytoolz")
14725 (synopsis "High performance functional utilities")
14726 (description
14727 "The cytoolz package implements the same API as provided by toolz. The
14728main differences are that @code{cytoolz} is faster and cytoolz offers a C API
14729that is accessible to other projects developed in Cython.")
14730 (license license:bsd-3)))
14731
14732(define-public python-sortedcontainers
14733 (package
14734 (name "python-sortedcontainers")
14735 (version "2.0.4")
14736 (source
14737 (origin
14738 (method url-fetch)
14739 (uri (pypi-uri "sortedcontainers" version))
14740 (sha256
14741 (base32
14742 "10hrk2k0hbf9x78vd3f0lj277m1yzfhzzxr0hja718liwb398wk0"))))
14743 (build-system python-build-system)
14744 (native-inputs
14745 `(("python-tox" ,python-tox)))
14746 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
14747 (synopsis "Sorted List, Sorted Dict, Sorted Set")
14748 (description
14749 "This package provides a sorted collections library, written in
14750pure-Python.")
14751 (license license:asl2.0)))
14752
14753(define-public python-cloudpickle
14754 (package
14755 (name "python-cloudpickle")
14756 (version "0.6.1")
14757 (source
14758 (origin
14759 (method url-fetch)
14760 (uri (pypi-uri "cloudpickle" version))
14761 (sha256
14762 (base32
14763 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
14764 (build-system python-build-system)
14765 ;; FIXME: there are 5 errors in 122 tests:
14766 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
14767 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
14768 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
14769 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
14770 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
14771 ;; TypeError: cannot serialize '_io.BufferedRandom' object
14772 (arguments '(#:tests? #f))
14773 (native-inputs
14774 `(("python-pytest" ,python-pytest)
14775 ("python-mock" ,python-mock)
14776 ("python-tornado" ,python-tornado)))
14777 (home-page "https://github.com/cloudpipe/cloudpickle")
14778 (synopsis "Extended pickling support for Python objects")
14779 (description
14780 "Cloudpickle makes it possible to serialize Python constructs not
14781supported by the default pickle module from the Python standard library. It
14782is especially useful for cluster computing where Python expressions are
14783shipped over the network to execute on remote hosts, possibly close to the
14784data.")
14785 (license license:bsd-3)))
14786
14787(define-public python2-cloudpickle
14788 (package-with-python2 python-cloudpickle))
14789
14790(define-public python-locket
14791 (package
14792 (name "python-locket")
14793 (version "0.2.0")
14794 (source
14795 (origin
14796 (method url-fetch)
14797 (uri (pypi-uri "locket" version))
14798 (sha256
14799 (base32
14800 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
14801 (build-system python-build-system)
14802 (home-page "https://github.com/mwilliamson/locket.py")
14803 (synopsis "File-based locks for Python")
14804 (description
14805 "Locket implements a lock that can be used by multiple processes provided
14806they use the same path.")
14807 (license license:bsd-2)))
14808
14809(define-public python2-locket
14810 (package-with-python2 python-locket))
14811
14812(define-public python-blosc
14813 (package
14814 (name "python-blosc")
14815 (version "1.5.1")
14816 (source
14817 (origin
14818 (method url-fetch)
14819 (uri (pypi-uri "blosc" version))
14820 (sha256
14821 (base32
14822 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
14823 (build-system python-build-system)
14824 ;; FIXME: all tests pass, but then this error is printed:
14825 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
14826 (arguments '(#:tests? #f))
14827 (propagated-inputs
14828 `(("python-numpy" ,python-numpy)))
14829 (home-page "https://github.com/blosc/python-blosc")
14830 (synopsis "Python wrapper for the Blosc data compressor library")
14831 (description "Blosc is a high performance compressor optimized for binary
14832data. It has been designed to transmit data to the processor cache faster
14833than the traditional, non-compressed, direct memory fetch approach via a
14834@code{memcpy()} system call.
14835
14836Blosc works well for compressing numerical arrays that contains data with
14837relatively low entropy, like sparse data, time series, grids with
14838regular-spaced values, etc.
14839
14840This Python package wraps the Blosc library.")
14841 (license license:bsd-3)))
14842
14843(define-public python2-blosc
14844 (package-with-python2 python-blosc))
14845
14846(define-public python-partd
14847 (package
14848 (name "python-partd")
14849 (version "0.3.9")
14850 (source
14851 (origin
14852 (method url-fetch)
14853 (uri (pypi-uri "partd" version))
14854 (sha256
14855 (base32
14856 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
14857 (build-system python-build-system)
14858 (propagated-inputs
14859 `(("python-blosc" ,python-blosc)
14860 ("python-locket" ,python-locket)
14861 ("python-numpy" ,python-numpy)
14862 ("python-pandas" ,python-pandas)
14863 ("python-pyzmq" ,python-pyzmq)
14864 ("python-toolz" ,python-toolz)))
14865 (home-page "https://github.com/dask/partd/")
14866 (synopsis "Appendable key-value storage")
14867 (description "Partd stores key-value pairs. Values are raw bytes. We
14868append on old values. Partd excels at shuffling operations.")
14869 (license license:bsd-3)))
14870
14871(define-public python2-partd
14872 (package-with-python2 python-partd))
14873
14874(define-public python-dask
14875 (package
14876 (name "python-dask")
75cc5359 14877 (version "1.2.0")
44d10b1f
RW
14878 (source
14879 (origin
14880 (method url-fetch)
14881 (uri (pypi-uri "dask" version))
14882 (sha256
14883 (base32
75cc5359 14884 "1y0dqcp72ixwblgway0jpvfirlxfcmwrjiivdq96firj1hw127sd"))))
44d10b1f
RW
14885 (build-system python-build-system)
14886 ;; A single test out of 5000+ fails. This test is marked as xfail when
14887 ;; pytest-xdist is used.
14888 (arguments
14889 `(#:phases
14890 (modify-phases %standard-phases
14891 (add-after 'unpack 'disable-broken-test
14892 (lambda _
14893 (substitute* "dask/tests/test_threaded.py"
14894 (("def test_interrupt\\(\\)" m)
14895 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
14896 m)))
14897 (when (which "python2")
14898 ;; This test fails with recent Pandas:
14899 ;; <https://github.com/dask/dask/issues/3794>.
14900 (substitute* "dask/dataframe/tests/test_dataframe.py"
14901 (("def test_info\\(\\)" m)
14902 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
14903 m))))
14904 #t))
14905 (replace 'check
14906 (lambda _ (invoke "pytest" "-vv"))))))
14907 (propagated-inputs
14908 `(("python-cloudpickle" ,python-cloudpickle)
14909 ("python-numpy" ,python-numpy)
14910 ("python-pandas" ,python-pandas)
14911 ("python-partd" ,python-partd)
14912 ("python-toolz" ,python-toolz)
14913 ("python-pyyaml" ,python-pyyaml)))
14914 (native-inputs
14915 `(("python-pytest" ,python-pytest)
14916 ("python-pytest-runner" ,python-pytest-runner)))
14917 (home-page "https://github.com/dask/dask/")
14918 (synopsis "Parallel computing with task scheduling")
14919 (description
14920 "Dask is a flexible parallel computing library for analytics. It
14921consists of two components: dynamic task scheduling optimized for computation,
14922and large data collections like parallel arrays, dataframes, and lists that
14923extend common interfaces like NumPy, Pandas, or Python iterators to
14924larger-than-memory or distributed environments. These parallel collections
14925run on top of the dynamic task schedulers. ")
14926 (license license:bsd-3)))
14927
14928(define-public python2-dask
14929 (package-with-python2 python-dask))
14930
14931(define-public python-ilinkedlist
14932 (package
14933 (name "python-ilinkedlist")
14934 (version "0.4.0")
14935 (source
14936 (origin
14937 (method url-fetch)
14938 (uri (pypi-uri "ilinkedlist" version))
14939 (sha256
14940 (base32
14941 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
14942 (build-system python-build-system)
14943 (native-inputs `(("python-pytest" ,python-pytest)))
14944 (inputs `(("python" ,python)))
14945 (home-page "https://github.com/luther9/ilinkedlist-py")
14946 (synopsis "Immutable linked list library")
14947 (description
14948 "This is a implementation of immutable linked lists for Python. It
14949contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
14950Since a linked list is treated as immutable, it is hashable, and its length
14951can be retrieved in constant time. Some of the terminology is inspired by
14952LISP. It is possible to create an improper list by creating a @code{Pair}
14953with a non-list @code{cdr}.")
14954 (license license:gpl3+)))
14955
14956(define-public python-readlike
14957 (package
14958 (name "python-readlike")
14959 (version "0.1.3")
14960 (source
14961 (origin
14962 (method url-fetch)
14963 (uri (pypi-uri "readlike" version))
14964 (sha256
14965 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
14966 (build-system python-build-system)
14967 (home-page "https://github.com/jangler/readlike")
14968 (synopsis "GNU Readline-like line editing module")
14969 (description
14970 "This Python module provides line editing functions similar to the default
14971Emacs-style ones of GNU Readline. Unlike the Python standard library's
14972@code{readline} package, this one allows access to those capabilties in settings
14973outside of a standard command-line interface. It is especially well-suited to
14974interfacing with Urwid, due to a shared syntax for describing key inputs.
14975
14976Currently, all stateless Readline commands are implemented. Yanking and history
14977are not supported.")
14978 (license license:expat)))
14979
14980(define-public python2-readlike
14981 (package-with-python2 python-readlike))
14982
14983(define-public python-reparser
14984 (package
14985 (name "python-reparser")
14986 (version "1.4.3")
14987 (source
14988 (origin
14989 (method url-fetch)
14990 (uri (pypi-uri "ReParser" version))
14991 (sha256
14992 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
14993 (build-system python-build-system)
14994 (home-page "https://github.com/xmikos/reparser")
14995 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
14996 (description
14997 "This Python library provides a simple lexer/parser for inline markup based
14998on regular expressions.")
14999 (license license:expat)))
15000
15001(define-public python2-reparser
15002 (let ((reparser (package-with-python2
15003 (strip-python2-variant python-reparser))))
15004 (package (inherit reparser)
15005 (propagated-inputs
15006 `(("python2-enum34" ,python2-enum34)
15007 ,@(package-propagated-inputs reparser))))))
15008
15009(define-public python-precis-i18n
15010 (package
15011 (name "python-precis-i18n")
15012 (version "1.0.0")
15013 (source
15014 (origin
15015 (method url-fetch)
15016 (uri (pypi-uri "precis_i18n" version))
15017 (sha256
15018 (base32
15019 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
15020 (build-system python-build-system)
15021 (home-page "https://github.com/byllyfish/precis_i18n")
15022 (synopsis "Implementation of the PRECIS framework")
15023 (description
15024 "This module implements the PRECIS Framework as described in RFC 8264,
15025RFC 8265 and RFC 8266.")
15026 (license license:expat)))
15027
d0446c4b
RW
15028(define-public python-absl-py
15029 (package
15030 (name "python-absl-py")
15031 (version "0.6.1")
15032 (source
15033 (origin
15034 (method url-fetch)
15035 (uri (pypi-uri "absl-py" version))
15036 (sha256
15037 (base32
15038 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
15039 (build-system python-build-system)
15040 (propagated-inputs
15041 `(("python-six" ,python-six)))
15042 (home-page "https://github.com/abseil/abseil-py")
15043 (synopsis "Abseil Python common libraries")
15044 (description
15045 "This package provides the Abseil Python Common Libraries, a collection
15046of Python libraries for building Python applications.")
15047 (license license:asl2.0)))
15048
81bed4e9
RW
15049(define-public python-astor
15050 (package
15051 (name "python-astor")
15052 (version "0.7.1")
15053 (source
15054 (origin
15055 (method url-fetch)
15056 (uri (pypi-uri "astor" version))
15057 (sha256
15058 (base32
15059 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
15060 (build-system python-build-system)
15061 ;; FIXME: There are two errors and two test failures.
15062 (arguments `(#:tests? #f))
15063 (home-page "https://github.com/berkerpeksag/astor")
39ee82ff 15064 (synopsis "Read and write Python ASTs")
81bed4e9 15065 (description "Astor is designed to allow easy manipulation of Python
39ee82ff 15066source via the Abstract Syntax Tree.")
81bed4e9
RW
15067 (license license:bsd-3)))
15068
39ee82ff
RW
15069(define-public python2-astor
15070 (package-with-python2 python-astor))
15071
22e623ae
RW
15072(define-public python-grpcio
15073 (package
15074 (name "python-grpcio")
15075 (version "1.17.1")
15076 (source
15077 (origin
15078 (method url-fetch)
15079 (uri (pypi-uri "grpcio" version))
15080 (sha256
15081 (base32
15082 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
15083 (build-system python-build-system)
15084 (propagated-inputs
15085 `(("python-six" ,python-six)))
15086 (home-page "https://grpc.io")
15087 (synopsis "HTTP/2-based RPC framework")
15088 (description "This package provides a Python library for communicating
15089with the HTTP/2-based RPC framework gRPC.")
15090 (license license:asl2.0)))
15091
79869f80
RW
15092(define-public python-astunparse
15093 (package
15094 (name "python-astunparse")
15095 (version "1.6.1")
15096 (source
15097 (origin
15098 (method url-fetch)
15099 (uri (pypi-uri "astunparse" version))
15100 (sha256
15101 (base32
15102 "1jhidwyrqn17avqh9xnnm3wd7q7aahaq009cba67g86y6gxicyyj"))))
15103 (build-system python-build-system)
15104 (arguments '(#:tests? #f)) ; there are none
15105 (propagated-inputs
15106 `(("python-six" ,python-six)
15107 ("python-wheel" ,python-wheel)))
15108 (home-page "https://github.com/simonpercivall/astunparse")
15109 (synopsis "AST unparser for Python")
15110 (description "This package provides an AST unparser for Python. It is a
15111factored out version of @code{unparse} found in the Python source
15112distribution.")
15113 (license license:bsd-3)))
15114
2884aac0
RW
15115(define-public python-gast
15116 (package
15117 (name "python-gast")
bd300261 15118 (version "0.2.2")
2884aac0
RW
15119 (source
15120 (origin
15121 (method url-fetch)
15122 (uri (pypi-uri "gast" version))
15123 (sha256
bd300261 15124 (base32 "1w5dzdb3gpcfmd2s0b93d8gff40a1s41rv31458z14inb3s9v4zy"))))
2884aac0
RW
15125 (build-system python-build-system)
15126 (propagated-inputs
15127 `(("python-astunparse" ,python-astunparse)))
15128 (home-page "https://pypi.org/project/gast/")
15129 (synopsis "Generic Python AST that abstracts the underlying Python version")
15130 (description
15131 "GAST provides a compatibility layer between the AST of various Python
15132versions, as produced by @code{ast.parse} from the standard @code{ast}
15133module.")
15134 (license license:bsd-3)))
15135
44d10b1f
RW
15136(define-public python-wikidata
15137 (package
15138 (name "python-wikidata")
15139 (version "0.6.1")
15140 (source
15141 (origin
15142 (method url-fetch)
15143 (uri (pypi-uri "Wikidata" version))
15144 (sha256
15145 (base32
15146 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
15147 (build-system python-build-system)
15148 (propagated-inputs
15149 `(("python-babel" ,python-babel)))
15150 (home-page "https://github.com/dahlia/wikidata")
15151 (synopsis "Wikidata client library")
15152 (description
15153 "This package provides a Python interface to
15154@url{https://www.wikidata.org/, Wikidata}.")
15155 (properties '((upstream-name . "Wikidata")))
15156 (license license:gpl3+)))
15157
15158(define-public python-doctest-ignore-unicode
15159 (package
15160 (name "python-doctest-ignore-unicode")
15161 (version "0.1.2")
15162 (source
15163 (origin
15164 (method url-fetch)
15165 (uri (pypi-uri "doctest-ignore-unicode" version))
15166 (sha256
15167 (base32
15168 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
15169 (build-system python-build-system)
15170 (native-inputs
15171 `(("python-nose" ,python-nose)))
15172 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
15173 (synopsis "Ignore Unicode literal prefixes in doctests")
15174 (description
15175 "This package adds support for a flag to ignore Unicode literal prefixes
15176in doctests.")
15177 (license license:asl2.0)))
15178
15179(define-public python-attr
15180 (package
15181 (name "python-attr")
15182 (version "0.3.1")
15183 (source
15184 (origin
15185 (method url-fetch)
15186 (uri (pypi-uri "attr" version))
15187 (sha256
15188 (base32
15189 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
15190 (build-system python-build-system)
15191 (home-page "https://github.com/denis-ryzhkov/attr")
15192 (synopsis "Decorator for attributes of target function or class")
15193 (description "Simple decorator to set attributes of target function or
15194class in a @acronym{DRY, Don't Repeat Yourself} way.")
15195 (license license:expat)))
f98232a3
VC
15196
15197(define-public python-construct
15198 (package
15199 (name "python-construct")
15200 (version "2.9.45")
15201 (source
15202 (origin
15203 (method url-fetch)
15204 (uri (pypi-uri "construct" version))
15205 (sha256
15206 (base32
15207 "130iy05awzigm2xah2yvlmb08mac5bi4gzr5m3g7k1krs3ps0w92"))))
15208 (build-system python-build-system)
15209 (arguments
15210 `(#:tests? #f)) ; No tests exist.
15211 (propagated-inputs
15212 `(("python-extras" ,python-extras)
15213 ("python-arrow" ,python-arrow)
15214 ("python-numpy" ,python-numpy)
15215 ("python-ruamel.yaml" ,python-ruamel.yaml)))
15216 (home-page "http://construct.readthedocs.io")
15217 (synopsis "Declarative and symmetrical parser and builder for binary data")
15218 (description
15219 "This package provides both simple, atomic constructs (such as
15220integers of various sizes), as well as composite ones which allow you
15221form hierarchical and sequential structures of increasing complexity.
15222It features bit and byte granularity, easy debugging and testing, an
15223easy-to-extend subclass system, and lots of primitive constructs to
15224make your work easier.")
15225 (license license:expat)))
b742c006
LF
15226
15227(define-public python-humanize
15228 (package
15229 (name "python-humanize")
15230 (version "0.5.1")
15231 (source
15232 (origin
15233 (method url-fetch)
15234 (uri (pypi-uri "humanize" version))
15235 (sha256
15236 (base32
15237 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
15238 (arguments
15239 '(#:tests? #f)) ; tests not in pypi archive
15240 (build-system python-build-system)
15241 (home-page "https://github.com/jmoiron/humanize")
15242 (synopsis "Print numerical information in a human-readable form")
15243 (description "This package provides a Python module that displays numbers
15244and dates in \"human readable\" forms. For example, it would display
15245\"12345591313\" as \"12.3 billion\".")
15246 (license license:expat)))
d5bbf66d
LF
15247
15248(define-public python-txaio
15249 (package
15250 (name "python-txaio")
15251 (version "18.8.1")
15252 (source
15253 (origin
15254 (method url-fetch)
15255 (uri (pypi-uri "txaio" version))
15256 (sha256
15257 (base32
15258 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
15259 (build-system python-build-system)
15260 (propagated-inputs
15261 `(("python-twisted" ,python-twisted)
15262 ("python-six" ,python-six)))
15263 (home-page "https://github.com/crossbario/txaio")
15264 (synopsis "Compatibility layer between Python asyncio and Twisted")
15265 (description "Txaio provides a compatibility layer between the Python
15266@code{asyncio} module and @code{Twisted}.")
15267 (license license:expat)))
963dfd3a
RW
15268
15269(define-public python-toolshed
15270 (package
15271 (name "python-toolshed")
15272 (version "0.4.6")
15273 (source
15274 (origin
15275 (method url-fetch)
15276 (uri (pypi-uri "toolshed" version))
15277 (sha256
15278 (base32
15279 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
15280 (build-system python-build-system)
15281 (native-inputs
15282 `(("python-nose" ,python-nose)))
15283 (home-page "https://github.com/brentp/toolshed/")
15284 (synopsis "Collection of modules and functions for working with data")
15285 (description "This is a collection of well-tested, simple modules and
15286functions that aim to reduce boilerplate when working with data.")
15287 (license license:bsd-2)))
c91ecf2d
RW
15288
15289(define-public python-annoy
15290 (package
15291 (name "python-annoy")
15292 (version "1.15.1")
15293 (source
15294 (origin
15295 (method url-fetch)
15296 (uri (pypi-uri "annoy" version))
15297 (sha256
15298 (base32
15299 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
15300 (build-system python-build-system)
15301 (native-inputs
15302 `(("python-nose" ,python-nose)))
15303 (home-page "https://github.com/spotify/annoy/")
15304 (synopsis "Approximate nearest neighbors library")
15305 (description
15306 "Annoy is a C++ library with Python bindings to search for points in
15307space that are close to a given query point. It also creates large read-only
15308file-based data structures that are @code{mmap}ped into memory so that many
15309processes may share the same data.")
15310 (license license:asl2.0)))
412342d1
NG
15311
15312(define-public python-sphinxcontrib-svg2pdfconverter
15313 (package
15314 (name "python-sphinxcontrib-svg2pdfconverter")
15315 (version "0.1.0")
15316 (source (origin
15317 (method url-fetch)
15318 (uri (pypi-uri "sphinxcontrib-svg2pdfconverter" version))
15319 (sha256
15320 (base32
15321 "1abvbgkkii13q8nsb10r0gc5lm0p9iq1iwhfhakn5ifn6asa0183"))))
15322 (build-system python-build-system)
15323 (propagated-inputs
15324 `(("python-sphinx" ,python-sphinx)))
15325 (home-page "https://github.com/missinglinkelectronics/sphinxcontrib-svg2pdfconverter/releases")
15326 (synopsis "Sphinx SVG to PDF converter extension")
15327 (description "A Sphinx extension to convert SVG images to PDF in case the builder does not support
15328SVG images natively (e.g. LaTeX).")
15329 (license license:bsd-3)))