gnu: python-schematics: Don't use unstable tarball.
[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
2634(define-public python-rst.linker
2635 (package
2636 (name "python-rst.linker")
2637 (version "1.10")
2638 (source
2639 (origin
2640 (method url-fetch)
2641 (uri (pypi-uri "rst.linker" version))
2642 (sha256
2643 (base32
2644 "0iqaacp7pj1s8avs4kc0qg0r7dscywaq37y6l9j14glqdikk0wdj"))))
2645 (build-system python-build-system)
2646 (propagated-inputs
2647 `(("python-dateutil" ,python-dateutil)
2648 ("python-six" ,python-six)))
2649 (native-inputs
2650 `(("python-setuptools-scm" ,python-setuptools-scm)))
2651 ;; Test would require path.py, which would introduce a cyclic dependence.
2652 (arguments `(#:tests? #f))
2653 ;; Note: As of version 1.7 the documentation is not worth building.
2654 (home-page "https://github.com/jaraco/rst.linker")
2655 (synopsis "Sphinx plugin to add links and timestamps")
2656 (description "rst.linker allows to automatically replace text by a
2657reStructuredText external reference or timestamps. It's primary purpose is to
2658augment the changelog, but it can be used for other documents, too.")
2659 (license license:expat)))
2660
2661(define-public python2-rst.linker
2662 (package-with-python2 python-rst.linker))
2663
2664(define-public python-feedgenerator
2665 (package
2666 (name "python-feedgenerator")
2667 (version "1.9")
2668 (source
2669 (origin
2670 (method url-fetch)
2671 (uri (pypi-uri "feedgenerator" version))
2672 (sha256
2673 (base32
2674 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
2675 (modules '((guix build utils)))
2676 (snippet
2677 '(begin
2678 ;; Remove pre-compiled .pyc files from source.
2679 (for-each delete-file-recursively
2680 (find-files "." "__pycache__" #:directories? #t))
2681 (for-each delete-file (find-files "." "\\.pyc$"))
2682 #t))))
2683 (build-system python-build-system)
2684 (propagated-inputs
2685 `(("python-pytz" ,python-pytz)
2686 ("python-six" ,python-six)))
2687 (home-page "https://github.com/getpelican/feedgenerator")
2688 (synopsis
2689 "Standalone version of Django's Atom/RSS feed generator")
2690 (description
2691 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2692which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
2693 (license license:bsd-3)))
2694
2695(define-public python2-feedgenerator
2696 (package-with-python2 python-feedgenerator))
2697
2698(define-public python-toml
2699 (package
2700 (name "python-toml")
2701 (version "0.9.4")
2702 (source
2703 (origin
2704 (method url-fetch)
2705 (uri (pypi-uri "toml" version))
2706 (sha256
2707 (base32
2708 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
2709 (build-system python-build-system)
2710 (arguments
2711 `(#:tests? #f)) ;no tests suite in release
2712 (home-page "https://github.com/uiri/toml")
2713 (synopsis "Library for TOML")
2714 (description
2715 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
2716Language (TOML) configuration files.")
2717 (license license:expat)))
2718
346c8752
BG
2719(define-public python-jsonrpc-server
2720 (package
2721 (name "python-jsonrpc-server")
2722 (version "0.1.2")
2723 (source
2724 (origin
2725 (method url-fetch)
2726 (uri (pypi-uri "python-jsonrpc-server" version))
2727 (sha256
2728 (base32
2729 "0m4ykpcdy52x37n1ikysp07j7p8ialcdvvvsrjp3545sn7iiid09"))))
2730 (build-system python-build-system)
2731 (propagated-inputs
2732 `(("python-future" ,python-future)
2733 ("python-mock" ,python-mock)
2734 ("python-pytest" ,python-pytest)))
2735 (home-page
2736 "https://github.com/palantir/python-jsonrpc-server")
2737 (synopsis "JSON RPC 2.0 server library")
2738 (description
2739 "This packages provides a JSON RPC 2.0 server library for Python.")
2740 (license license:expat)))
2741
56f4ad47
BG
2742(define-public python-pydocstyle
2743 (package
2744 (name "python-pydocstyle")
2745 (version "3.0.0")
2746 (source
2747 (origin
2748 (method url-fetch)
2749 (uri (pypi-uri "pydocstyle" version))
2750 (sha256
2751 (base32
2752 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
2753 (build-system python-build-system)
2754 (propagated-inputs
2755 `(("python-six" ,python-six)
2756 ("python-snowballstemmer" ,python-snowballstemmer)))
2757 (home-page
2758 "https://github.com/PyCQA/pydocstyle/")
2759 (synopsis "Python docstring style checker")
2760 (description
2761 "This package provides a style checker for the Python Language
2762Server (PLS).")
2763 (license license:expat)))
2764
be4d840c
BG
2765(define-public python-language-server
2766 (package
2767 (name "python-language-server")
ccbaeba3 2768 (version "0.26.1")
be4d840c
BG
2769 (source
2770 (origin
2771 (method url-fetch)
2772 (uri (pypi-uri "python-language-server" version))
2773 (sha256
2774 (base32
ccbaeba3 2775 "1vs9ckfmm534n1hq3m871916wsjvi5h4gyj6wlzg13ck6506lx0s"))))
be4d840c
BG
2776 (build-system python-build-system)
2777 (propagated-inputs
2778 `(("python-pluggy" ,python-pluggy)
2779 ("python-jsonrpc-server" ,python-jsonrpc-server)
2780 ("python-jedi" ,python-jedi)
2781 ("python-yapf" ,python-yapf)
2782 ("python-pyflakes" ,python-pyflakes)
2783 ("python-pydocstyle" ,python-pydocstyle)
2784 ("python-pycodestyle" ,python-pycodestyle)
2785 ("python-mccabe" ,python-mccabe)
2786 ("python-rope" ,python-rope)
fe4a4bd2
BG
2787 ("python-autopep8" ,python-autopep8)
2788 ("python-pylint" ,python-pylint)))
be4d840c
BG
2789 (home-page "https://github.com/palantir/python-language-server")
2790 (synopsis "Python implementation of the Language Server Protocol")
2791 (description
2792 "The Python Language Server (pyls) is an implementation of the Python 3
2793language specification for the Language Server Protocol (LSP). This tool is
2794used in text editing environments to provide a complete and integrated
2795feature-set for programming Python effectively.")
2796 (license license:expat)))
2797
44d10b1f
RW
2798(define-public python-black
2799 (package
2800 (name "python-black")
2801 (version "18.6b4")
2802 (source
2803 (origin
2804 (method url-fetch)
2805 (uri (pypi-uri "black" version))
2806 (sha256
2807 (base32
2808 "0i4sfqgz6w15vd50kbhi7g7rifgqlf8yfr8y78rypd56q64qn592"))))
2809 (build-system python-build-system)
2810 (arguments
2811 `(#:phases
2812 (modify-phases %standard-phases
2813 (add-after 'patch-source-shebangs 'patch-extra-shebangs
2814 (lambda _
2815 (let ((python3 (which "python3")))
2816 (substitute* '("tests/data/fmtonoff.py"
2817 "tests/data/string_prefixes.py"
2818 "tests/data/function.py")
2819 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
2820 (string-append "#!" python3 (if (string? minor-version)
2821 minor-version
2822 ""))))))))))
2823 (propagated-inputs
2824 `(("python-click" ,python-click)
2825 ("python-attrs" ,python-attrs)
2826 ("python-appdirs" ,python-appdirs)
2827 ("python-toml" ,python-toml)))
2828 (home-page "https://github.com/ambv/black")
2829 (synopsis "The uncompromising code formatter")
2830 (description "Black is the uncompromising Python code formatter.")
2831 (license license:expat)))
2832
2833(define-public python-blinker
2834 (package
2835 (name "python-blinker")
2836 (version "1.4")
2837 (source
2838 (origin
2839 (method url-fetch)
2840 (uri (pypi-uri "blinker" version))
2841 (sha256
2842 (base32
2843 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
2844 (build-system python-build-system)
2845 (home-page "http://pythonhosted.org/blinker/")
2846 (synopsis "Fast, simple object-to-object and broadcast signaling")
2847 (description
2848 "Blinker provides a fast dispatching system that allows any number of
2849interested parties to subscribe to events, or \"signals\".")
2850 (license license:expat)))
2851
2852(define-public python2-blinker
2853 (package-with-python2 python-blinker))
2854
2855(define-public pelican
2856 (package
2857 (name "pelican")
aa71b690 2858 (version "4.0.1")
44d10b1f
RW
2859 (source
2860 (origin
2861 (method url-fetch)
2862 (uri (pypi-uri "pelican" version))
2863 (sha256
2864 (base32
aa71b690 2865 "05yda7n6r0ll18fpdjzkzyr0ls8hbb86fnjyb33k9jvv5avah2lr"))))
44d10b1f
RW
2866 (build-system python-build-system)
2867 (propagated-inputs
2868 `(("python-feedgenerator" ,python-feedgenerator)
2869 ("python-jinja2" ,python-jinja2)
2870 ("python-pygments" ,python-pygments)
2871 ("python-docutils" ,python-docutils)
2872 ("python-pytz" ,python-pytz)
2873 ("python-blinker" ,python-blinker)
2874 ("python-unidecode" ,python-unidecode)
2875 ("python-six" ,python-six)
2876 ("python-dateutil" ,python-dateutil)
2877 ("python-markdown" ,python-markdown)))
2878 (home-page "https://getpelican.com/")
2879 (arguments
2880 `(;; XXX Requires a lot more packages to do unit tests :P
2881 #:tests? #f
2882 #:phases (modify-phases %standard-phases
2883 (add-before
2884 'install 'adjust-requires
2885 ;; Since feedgenerator is installed from git, it doesn't
2886 ;; conform to the version requirements.
2887 ;;
2888 ;; We *do have* "feedgenerator >= 1.6", but strip off the
2889 ;; version requirement so setuptools doesn't get confused.
2890 (lambda _
2891 (substitute* "setup.py"
2892 (("['\"]feedgenerator.*?['\"]")
2893 "'feedgenerator'")))))))
2894 (synopsis "Python-based static site publishing system")
2895 (description
2896 "Pelican is a tool to generate a static blog from reStructuredText,
2897Markdown input files, and more. Pelican uses Jinja2 for templating
2898and is very extensible.")
2899 (license license:agpl3+)))
2900
2901(define-public python-scikit-image
2902 (package
2903 (name "python-scikit-image")
9ff04084 2904 (version "0.14.2")
44d10b1f
RW
2905 (source
2906 (origin
2907 (method url-fetch)
2908 (uri (pypi-uri "scikit-image" version))
2909 (sha256
9ff04084 2910 (base32 "07qchljkyxvg5nrm12fvszi7pmjk4m01qp0w0z8syxzxxs20pz8s"))))
44d10b1f
RW
2911 (build-system python-build-system)
2912 (arguments
2913 ;; TODO: Some tests require running X11 server. Disable them?
2914 '(#:tests? #f))
2915 ;; See DEPENDS.txt for the list of build and run time requiremnts
2916 (propagated-inputs
2917 `(("python-cloudpickle" ,python-cloudpickle)
2918 ("python-dask" ,python-dask)
2919 ("python-matplotlib" ,python-matplotlib)
2920 ("python-networkx" ,python-networkx)
2921 ("python-numpy" ,python-numpy)
2922 ("python-pillow" ,python-pillow)
2923 ("python-pywavelets" ,python-pywavelets)
2924 ("python-scipy" ,python-scipy)
2925 ("python-six" ,python-six)))
2926 (native-inputs
2927 `(("python-cython" ,python-cython)))
2928 (home-page "http://scikit-image.org/")
2929 (synopsis "Image processing in Python")
2930 (description
2931 "Scikit-image is a collection of algorithms for image processing.")
2932 (license license:bsd-3)))
2933
2934(define-public python2-scikit-image
2935 (package-with-python2 python-scikit-image))
2936
2937(define-public python-cython
2938 (package
2939 (name "python-cython")
fa8ffaa0 2940 (version "0.29.5")
44d10b1f
RW
2941 (source
2942 (origin
2943 (method url-fetch)
2944 (uri (pypi-uri "Cython" version))
2945 (sha256
2946 (base32
fa8ffaa0 2947 "1wfb68g115gmf3mv23w0hh972b0ll85gpb92ci28x6h997br0llx"))))
44d10b1f
RW
2948 (build-system python-build-system)
2949 ;; we need the full python package and not just the python-wrapper
2950 ;; because we need libpython3.3m.so
2951 (inputs
2952 `(("python" ,python)))
2953 (arguments
2954 `(#:phases
2955 (modify-phases %standard-phases
2956 (add-before 'check 'set-HOME
2957 ;; some tests require access to "$HOME/.cython"
2958 (lambda _ (setenv "HOME" "/tmp") #t))
2959
2960 ;; FIXME: These tests started failing on armhf after the 0.28 update
2961 ;; (commit c69d11c5930), both with an error such as this:
2962 ;; compiling (cpp) and running dictcomp ...
2963 ;; === C/C++ compiler error output: ===
2964 ;; ‘
2965 ;; dictcomp.cpp:5221: confused by earlier errors, bailing out
2966 ;; See <https://hydra.gnu.org/build/2948724> for logs.
2967 ,@(if (target-arm32?)
2968 `((add-before 'check 'disable-failing-tests
2969 (lambda _
2970 (let ((disabled-tests (open-file "tests/bugs.txt" "a")))
2971 (for-each (lambda (test)
2972 (format disabled-tests "~a\n" test))
2973 '("memslice" "dictcomp"))
2974 (close-port disabled-tests)))))
2975 '())
2976
2977 (replace 'check
2978 (lambda _
2979 ;; The "with_outer_raising" test fails with Python 3.7. See
2980 ;; https://github.com/cython/cython/issues/2454
2981 (delete-file "tests/run/generators_py.py")
2982 (invoke "python" "runtests.py" "-vv"))))))
2983 (home-page "http://cython.org/")
2984 (synopsis "C extensions for Python")
2985 (description "Cython is an optimising static compiler for both the Python
2986programming language and the extended Cython programming language. It makes
2987writing C extensions for Python as easy as Python itself.")
2988 (license license:asl2.0)
2989 (properties `((python2-variant . ,(delay python2-cython))))))
2990
2991(define-public python2-cython
2992 (package (inherit (package-with-python2
2993 (strip-python2-variant python-cython)))
2994 (name "python2-cython")
2995 (inputs
2996 `(("python-2" ,python-2))))) ; this is not automatically changed
2997
2998;; The RPython toolchain currently does not support Python 3.
2999(define-public python2-rpython
3000 (package
3001 (name "python2-rpython")
3002 (version "0.2.1")
3003 (source
3004 (origin
3005 (method url-fetch)
3006 (uri (pypi-uri "rpython" version))
3007 (sha256
3008 (base32
3009 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
3010 (build-system python-build-system)
3011 (arguments `(#:python ,python-2))
3012 (native-inputs
3013 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3014 (home-page "https://rpython.readthedocs.org")
3015 (synopsis "Framework for implementing interpreters and virtual machines")
3016 (description "RPython is a translation and support framework for
3017producing implementations of dynamic languages, emphasizing a clean separation
3018between language specification and implementation aspects.")
3019 (license license:expat)))
3020
3021;; NOTE: when upgrading numpy please make sure that python-pandas and
3022;; python-scipy still build, as these three packages are often used together.
3023(define-public python-numpy
3024 (package
3025 (name "python-numpy")
3026 (version "1.15.4")
3027 (source
3028 (origin
3029 (method url-fetch)
3030 (uri (string-append
3031 "https://github.com/numpy/numpy/releases/download/v"
3032 version "/numpy-" version ".tar.gz"))
3033 (sha256
3034 (base32
3035 "102vcl2qq4pjbm7a3d67vkkvn4466ngia1d8wi5avqwqh8j0jvkn"))))
3036 (build-system python-build-system)
3037 (inputs
3038 `(("openblas" ,openblas)
3039 ("lapack" ,lapack)))
3040 (native-inputs
3041 `(("python-cython" ,python-cython)
3042 ("python-pytest" ,python-pytest)
3043 ("gfortran" ,gfortran)))
3044 (arguments
3045 `(#:phases
3046 (modify-phases %standard-phases
3047 (add-before 'build 'configure-blas-lapack
3048 (lambda* (#:key inputs #:allow-other-keys)
3049 (call-with-output-file "site.cfg"
3050 (lambda (port)
3051 (format port
3052 "[openblas]
3053libraries = openblas
3054library_dirs = ~a/lib
3055include_dirs = ~a/include
3056
3057# backslash-n to make emacs happy
3058\n[lapack]
3059lapack_libs = lapack
3060library_dirs = ~a/lib
3061include_dirs = ~a/include
3062"
3063 (assoc-ref inputs "openblas")
3064 (assoc-ref inputs "openblas")
3065 (assoc-ref inputs "lapack")
3066 (assoc-ref inputs "lapack"))))
3067 #t))
3068 (add-before 'build 'fix-executable-paths
3069 (lambda* (#:key inputs #:allow-other-keys)
3070 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
3071 ;; instead of /bin/sh.
3072 (substitute* "numpy/distutils/exec_command.py"
3073 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
3074 (string-append match-start (assoc-ref inputs "bash") match-end)))
3075 ;; Use "gcc" executable, not "cc".
3076 (substitute* "numpy/distutils/system_info.py"
3077 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3078 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3079 #t))
3080 ;; Tests can only be run after the library has been installed and not
3081 ;; within the source directory.
3082 (delete 'check)
3083 (add-after 'install 'check
3084 (lambda* (#:key outputs inputs #:allow-other-keys)
3085 ;; Make installed package available for running the tests
3086 (add-installed-pythonpath inputs outputs)
3087 ;; Make sure "f2py" etc is found.
3088 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
3089 ":" (getenv "PATH")))
3090 (with-directory-excursion "/tmp"
3091 (invoke "python" "-c"
3092 "import numpy; numpy.test(verbose=2)")))))))
3093 (home-page "http://www.numpy.org/")
3094 (synopsis "Fundamental package for scientific computing with Python")
3095 (description "NumPy is the fundamental package for scientific computing
3096with Python. It contains among other things: a powerful N-dimensional array
3097object, sophisticated (broadcasting) functions, tools for integrating C/C++
3098and Fortran code, useful linear algebra, Fourier transform, and random number
3099capabilities.")
3100 (license license:bsd-3)))
3101
3102(define-public python2-numpy
3103 (package-with-python2 python-numpy))
3104
3105;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
3106;; interest only for legacy code going back to NumPy's predecessor
3107;; Numeric.
3108(define-public python2-numpy-1.8
3109 (package (inherit python2-numpy)
3110 (version "1.8.2")
3111 (source
3112 (origin
3113 (method url-fetch)
3114 (uri (string-append
3115 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
3116 (file-name (string-append "python2-numpy-" version ".tar.gz"))
3117 (sha256
3118 (base32
3119 "0sc20gz1b17xnyrkp5frca3ql5qfalpv916hfg2kqxpwr6jg0f1g"))))
3120 (arguments
3121 (substitute-keyword-arguments (package-arguments python2-numpy)
3122 ((#:phases phases)
3123 `(modify-phases ,phases
3124 (replace 'configure-blas-lapack
3125 (lambda* (#:key inputs #:allow-other-keys)
3126 (call-with-output-file "site.cfg"
3127 (lambda (port)
3128 (format port
3129 "[openblas]
3130libraries = openblas,lapack
3131library_dirs = ~a/lib:~a/lib
3132include_dirs = ~a/include:~a/include
3133"
3134 (assoc-ref inputs "openblas")
3135 (assoc-ref inputs "lapack")
3136 (assoc-ref inputs "openblas")
3137 (assoc-ref inputs "lapack"))))
3138 #t))))))
3139 (native-inputs
3140 `(("python2-nose" ,python2-nose)))
3141 (description "NumPy is the fundamental package for scientific computing
3142with Python. It contains among other things: a powerful N-dimensional array
3143object, sophisticated (broadcasting) functions, tools for integrating C/C++
3144and Fortran code, useful linear algebra, Fourier transform, and random number
3145capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
3146that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
3147Numeric.")
3148 (license license:bsd-3)))
3149
3150(define-public python-munch
3151 (package
3152 (name "python-munch")
3153 (version "2.0.4")
3154 (source
3155 (origin
3156 (method url-fetch)
3157 (uri (pypi-uri "munch" version))
3158 (sha256
3159 (base32
3160 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3161 (build-system python-build-system)
3162 (home-page "https://github.com/Infinidat/munch")
3163 (synopsis "Dot-accessible dictionary")
3164 (description "Munch is a dot-accessible dictionary similar to JavaScript
3165objects.")
3166 (license license:expat)))
3167
3168(define-public python2-munch
3169 (package-with-python2 python-munch))
3170
3171(define-public python-colormath
3172 (package
3173 (name "python-colormath")
3174 (version "3.0.0")
3175 (source
3176 (origin
3177 (method url-fetch)
3178 (uri (pypi-uri "colormath" version))
3179 (sha256
3180 (base32
3181 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3182 (build-system python-build-system)
3183 (propagated-inputs
3184 `(("python-networkx" ,python-networkx)
3185 ("python-numpy" ,python-numpy)))
3186 (home-page "https://github.com/gtaylor/python-colormath")
3187 (synopsis "Color math and conversion library")
3188 (description
3189 "This is a Python library for color math and conversions.")
3190 (license license:bsd-3)))
3191
3192(define-public python2-colormath
3193 (package-with-python2 python-colormath))
3194
3195(define-public python-spectra
3196 (package
3197 (name "python-spectra")
3198 (version "0.0.11")
3199 (source
3200 (origin
3201 (method url-fetch)
3202 (uri (pypi-uri "spectra" version))
3203 (sha256
3204 (base32
3205 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3206 (build-system python-build-system)
3207 (arguments
3208 `(#:phases
3209 (modify-phases %standard-phases
3210 (replace 'check
38ec0f6a 3211 (lambda _ (invoke "nosetests" "-v"))))))
44d10b1f
RW
3212 (propagated-inputs
3213 `(("python-colormath" ,python-colormath)))
3214 (native-inputs
3215 `(("python-nose" ,python-nose)))
3216 (home-page "https://github.com/jsvine/spectra")
3217 (synopsis "Color scales and color conversion")
3218 (description
3219 "This package provides a Python library intended to make color math,
3220color scales, and color space conversion easy. It has support for:
3221
3222@enumerate
3223@item Color scales
3224@item Color ranges
3225@item Color blending
3226@item Brightening/darkening colors
3227@item Saturating/desaturating colors
3228@item Conversion to/from multiple color spaces.
3229@end enumerate\n")
3230 (license license:expat)))
3231
3232(define-public python2-spectra
3233 (package-with-python2 python-spectra))
3234
3235(define-public python-numpy-documentation
3236 (package
3237 (name "python-numpy-documentation")
3238 (version (package-version python-numpy))
3239 (source (package-source python-numpy))
3240 (build-system python-build-system)
3241 (native-inputs
3242 `(("python-matplotlib" ,python-matplotlib)
3243 ("python-numpy" ,python-numpy)
3244 ("pkg-config" ,pkg-config)
3245 ("python-sphinx" ,python-sphinx)
3246 ("python-numpydoc" ,python-numpydoc)
3247 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
3248 texlive-fonts-cm-super
3249 texlive-fonts-ec
3250 texlive-generic-ifxetex
3251 texlive-generic-pdftex
3252 texlive-latex-amsfonts
3253 texlive-latex-capt-of
3254 texlive-latex-cmap
3255 texlive-latex-environ
3256 texlive-latex-eqparbox
3257 texlive-latex-etoolbox
3258 texlive-latex-expdlist
3259 texlive-latex-fancyhdr
3260 texlive-latex-fancyvrb
3261 texlive-latex-fncychap
3262 texlive-latex-float
3263 texlive-latex-framed
3264 texlive-latex-geometry
3265 texlive-latex-graphics
3266 texlive-latex-hyperref
3267 texlive-latex-mdwtools
3268 texlive-latex-multirow
3269 texlive-latex-needspace
3270 texlive-latex-oberdiek
3271 texlive-latex-parskip
3272 texlive-latex-preview
3273 texlive-latex-tabulary
3274 texlive-latex-threeparttable
3275 texlive-latex-titlesec
3276 texlive-latex-trimspaces
3277 texlive-latex-ucs
3278 texlive-latex-upquote
3279 texlive-latex-url
3280 texlive-latex-varwidth
3281 texlive-latex-wrapfig)))
3282 ("texinfo" ,texinfo)
3283 ("perl" ,perl)
3284 ("scipy-sphinx-theme"
3285 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3286 (method git-fetch)
3287 (uri (git-reference
3288 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3289 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3290 (sha256
3291 (base32
3292 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3293 ,@(package-native-inputs python-numpy)))
3294 (arguments
3295 `(#:tests? #f ; we're only generating the documentation
3296 #:phases
3297 (modify-phases %standard-phases
3298 (delete 'build)
3299 (replace 'install
3300 (lambda* (#:key inputs outputs #:allow-other-keys)
3301 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3302 (doc (string-append
3303 data "/doc/" ,name "-"
3304 ,(package-version python-numpy)))
3305 (info-reader (string-append data "/info"))
3306 (html (string-append doc "/html"))
3307 (scipy-sphinx-theme "scipy-sphinx-theme")
3308 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3309 (pyver ,(string-append "PYVER=")))
3310
3311 ;; FIXME: this is needed to for texlive-union to generate
3312 ;; fonts, which are not found.
3313 (setenv "HOME" "/tmp")
3314
3315 (with-directory-excursion "doc"
3316 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3317 (mkdir-p html)
4fc898da
RW
3318 (invoke "make" "html" pyver)
3319 (invoke "make" "latex" "PAPER=a4" pyver)
3320 (invoke "make" "-C" "build/latex"
44d10b1f
RW
3321 "all-pdf" "PAPER=a4" pyver)
3322 ;; FIXME: Generation of the info file fails.
4fc898da 3323 ;; (invoke "make" "info" pyver)
44d10b1f
RW
3324 ;; (mkdir-p info)
3325 ;; (copy-file "build/texinfo/numpy.info"
3326 ;; (string-append info "/numpy.info"))
3327 (for-each (lambda (file)
3328 (copy-file (string-append "build/latex" file)
3329 (string-append doc file)))
3330 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3331 (with-directory-excursion "build/html"
3332 (for-each (lambda (file)
3333 (let* ((dir (dirname file))
3334 (tgt-dir (string-append html "/" dir)))
3335 (unless (equal? "." dir)
3336 (mkdir-p tgt-dir))
3337 (install-file file html)))
3338 (find-files "." ".*")))))
3339 #t)))))
3340 (home-page (package-home-page python-numpy))
3341 (synopsis "Documentation for the python-numpy package")
3342 (description (package-description python-numpy))
3343 (license (package-license python-numpy))))
3344
3345(define-public python2-numpy-documentation
3346 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3347 (package
3348 (inherit numpy-documentation)
3349 (native-inputs `(("python2-functools32" ,python2-functools32)
3350 ,@(package-native-inputs numpy-documentation))))))
3351
3352(define-public python-pygit2
3353 (package
3354 (name "python-pygit2")
2ffec22e 3355 (version "0.27.4")
44d10b1f
RW
3356 (source
3357 (origin
3358 (method url-fetch)
3359 (uri (pypi-uri "pygit2" version))
3360 (sha256
3361 (base32
2ffec22e 3362 "15c1mhwwjc7nr8hn5gm21hcfhw61jmwb0vngpjhlm3y5565wg2pz"))))
44d10b1f
RW
3363 (build-system python-build-system)
3364 (arguments
2ffec22e
JL
3365 '(#:tests? #f; tests don't run correctly in our environment
3366 #:phases
44d10b1f 3367 (modify-phases %standard-phases
44d10b1f
RW
3368 (add-after 'unpack 'fix-dependency-versioning
3369 (lambda _
3370 (substitute* "setup.py"
3371 (("<") "<="))
3372 #t)))))
3373 (propagated-inputs
3374 `(("python-six" ,python-six)
3375 ("python-cffi" ,python-cffi)
3376 ("libgit2" ,libgit2)
3377 ("python-tox" ,python-tox)))
3378 (native-inputs
3379 `(("python-pytest" ,python-pytest)))
3380 (home-page "https://github.com/libgit2/pygit2")
3381 (synopsis "Python bindings for libgit2")
3382 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3383library, libgit2 implements Git plumbing.")
3384 ;; GPL2.0 only, with linking exception.
3385 (license license:gpl2)))
3386
3387(define-public python2-pygit2
3388 (package-with-python2 python-pygit2))
3389
3390(define-public python-pyparsing
3391 (package
3392 (name "python-pyparsing")
3393 (version "2.2.1")
3394 (source
3395 (origin
3396 (method url-fetch)
3397 (uri (pypi-uri "pyparsing" version))
3398 (sha256
3399 (base32 "06dgd0iilvf8m0ssmfpcbh8l6jf0zkp8adbb84llksg17crfx4zl"))))
3400 (build-system python-build-system)
3401 (outputs '("out" "doc"))
3402 (arguments
3403 `(#:tests? #f ; no test target
3404 #:phases
3405 (modify-phases %standard-phases
3406 (add-after 'install 'install-doc
3407 (lambda* (#:key outputs #:allow-other-keys)
3408 (let* ((doc (string-append (assoc-ref outputs "doc")
3409 "/share/doc/" ,name "-" ,version))
3410 (html-doc (string-append doc "/html"))
3411 (examples (string-append doc "/examples")))
3412 (mkdir-p html-doc)
3413 (mkdir-p examples)
3414 (for-each
3415 (lambda (dir tgt)
3416 (map (lambda (file)
3417 (install-file file tgt))
3418 (find-files dir ".*")))
3419 (list "docs" "htmldoc" "examples")
3420 (list doc html-doc examples))
3421 #t))))))
3422 (home-page "https://github.com/pyparsing/pyparsing")
3423 (synopsis "Python parsing class library")
3424 (description
3425 "The pyparsing module is an alternative approach to creating and
3426executing simple grammars, vs. the traditional lex/yacc approach, or the use
3427of regular expressions. The pyparsing module provides a library of classes
3428that client code uses to construct the grammar directly in Python code.")
3429 (license license:expat)))
3430
3431(define-public python2-pyparsing
3432 (package-with-python2 python-pyparsing))
3433
3434(define-public python-numpydoc
3435 (package
3436 (name "python-numpydoc")
3437 (version "0.8.0")
3438 (source
3439 (origin
3440 (method url-fetch)
3441 (uri (pypi-uri "numpydoc" version))
3442 (sha256
3443 (base32
3444 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
3445 (build-system python-build-system)
3446 (propagated-inputs
3447 `(("python-sphinx" ,python-sphinx)))
3448 (native-inputs
3449 `(("python-nose" ,python-nose)))
3450 (home-page "https://pypi.python.org/pypi/numpydoc")
3451 (synopsis
3452 "Numpy's Sphinx extensions")
3453 (description
3454 "Sphinx extension to support docstrings in Numpy format.")
3455 (license license:bsd-2)))
3456
3457(define-public python2-numpydoc
3458 (package-with-python2 python-numpydoc))
3459
3460(define-public python-numexpr
3461 (package
3462 (name "python-numexpr")
3463 (version "2.6.5")
3464 (source
3465 (origin
3466 (method url-fetch)
3467 (uri (pypi-uri "numexpr" version))
3468 (sha256
3469 (base32
3470 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3471 (build-system python-build-system)
3472 (arguments `(#:tests? #f)) ; no tests included
3473 (propagated-inputs
3474 `(("python-numpy" ,python-numpy)))
3475 (home-page "https://github.com/pydata/numexpr")
3476 (synopsis "Fast numerical expression evaluator for NumPy")
3477 (description
3478 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3479expressions that operate on arrays are accelerated and use less memory than
3480doing the same calculation in Python. In addition, its multi-threaded
3481capabilities can make use of all your cores, which may accelerate
3482computations, most specially if they are not memory-bounded (e.g. those using
3483transcendental functions).")
3484 (license license:expat)))
3485
3486(define-public python2-numexpr
3487 (package-with-python2 python-numexpr))
3488
3489(define-public python-cycler
3490 (package
3491 (name "python-cycler")
3492 (version "0.10.0")
3493 (source (origin
3494 (method url-fetch)
3495 (uri (pypi-uri "cycler" version))
3496 (sha256
3497 (base32
3498 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3499 (build-system python-build-system)
3500 (arguments
3501 ;; XXX: The current version requires 'coveralls' which we don't have.
3502 ;; Enable this for the next release which uses 'python-pytest'.
3503 '(#:tests? #f))
3504 (propagated-inputs
3505 `(("python-six" ,python-six)))
3506 (home-page "http://matplotlib.org/cycler/")
3507 (synopsis "Composable keyword argument iterator")
3508 (description
3509 "When using @code{matplotlib} and plotting more than one line, it is
3510common to want to be able to want to be able to cycle over one or more artist
3511styles; but the plotting logic can quickly become involved.
3512To address this and enable easy cycling over arbitrary @code{kwargs}, the
3513@code{Cycler} class was developed.")
3514 (license license:bsd-3)))
3515
3516(define-public python2-cycler
3517 (package-with-python2 python-cycler))
3518
3519(define-public python-colorspacious
3520 (package
3521 (name "python-colorspacious")
3522 (version "1.1.0")
3523 (source
dee92e65
TGR
3524 (origin
3525 (method git-fetch)
3526 (uri (git-reference
3527 (url "https://github.com/njsmith/colorspacious.git")
3528 (commit (string-append "v" version))))
3529 (file-name (git-file-name name version))
3530 (sha256
3531 (base32 "0g0lxqiscy5g5rq9421vv7abg0c90jzy0zmas2z3hya6k2dr5aid"))))
44d10b1f
RW
3532 (build-system python-build-system)
3533 (propagated-inputs
3534 `(("python-numpy" ,python-numpy)))
3535 (native-inputs
3536 `(("python-nose" ,python-nose)))
3537 (arguments
3538 `(#:phases
3539 (modify-phases %standard-phases
3540 (replace 'check
3541 (lambda _
c988afda 3542 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
44d10b1f
RW
3543 (home-page "https://github.com/njsmith/colorspacious")
3544 (synopsis "Python library for colorspace conversions")
3545 (description "@code{colorspacious} is a Python library that lets you
3546convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3547 (license license:expat)))
3548
3549(define-public python2-colorspacious
3550 (package-with-python2 python-colorspacious))
3551
3552(define-public python-matplotlib
3553 (package
3554 (name "python-matplotlib")
3555 (version "2.2.3")
3556 (source
3557 (origin
3558 (method url-fetch)
3559 (uri (pypi-uri "matplotlib" version))
3560 (sha256
3561 (base32
3562 "1rcc7x9ig3hpchkc4cwdvym3y451w74275fxr455zkfagrsvymbk"))))
3563 (build-system python-build-system)
3564 (propagated-inputs ; the following packages are all needed at run time
3565 `(("python-cycler" ,python-cycler)
3566 ("python-kiwisolver" ,python-kiwisolver)
3567 ("python-pyparsing" ,python-pyparsing)
3568 ("python-pygobject" ,python-pygobject)
3569 ("gobject-introspection" ,gobject-introspection)
3570 ("python-tkinter" ,python "tk")
3571 ("python-dateutil" ,python-dateutil)
3572 ("python-numpy" ,python-numpy)
3573 ("python-pillow" ,python-pillow)
3574 ("python-pytz" ,python-pytz)
3575 ("python-six" ,python-six)
3576 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3577 ;; from 'gtk+') provides the required 'typelib' files used by
3578 ;; 'gobject-introspection'. The location of these files is set with the
3579 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3580 ;; is done automatically by a 'native-search-path' procedure. However,
3581 ;; at run-time the user must set this variable as follows:
3582 ;;
3583 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
3584 ("gtk+" ,gtk+)
3585 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3586 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3587 ;; object. For this reason we need to import both libraries.
3588 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3589 ("python-pycairo" ,python-pycairo)
3590 ;; XXX: qtwebkit cannot be built reliably.
3591 ("python-pyqt" ,python-pyqt-without-qtwebkit)
3592 ("python-cairocffi" ,python-cairocffi)))
3593 (inputs
3594 `(("libpng" ,libpng)
3595 ("imagemagick" ,imagemagick)
3596 ("freetype" ,freetype)
3597 ("cairo" ,cairo)
3598 ("glib" ,glib)
3599 ;; FIXME: Add backends when available.
3600 ;("python-wxpython" ,python-wxpython)
3601 ("tcl" ,tcl)
3602 ("tk" ,tk)))
3603 (native-inputs
3604 `(("pkg-config" ,pkg-config)
3605 ("python-nose" ,python-nose)
3606 ("python-mock" ,python-mock)))
3607 (arguments
3608 `(#:phases
3609 (modify-phases %standard-phases
3610 (add-before 'build 'configure-environment
3611 (lambda* (#:key outputs inputs #:allow-other-keys)
3612 (let ((cairo (assoc-ref inputs "cairo"))
3613 (gtk+ (assoc-ref inputs "gtk+")))
3614 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3615 ;; has not effect.
3616 (setenv "LD_LIBRARY_PATH"
3617 (string-append cairo "/lib:" gtk+ "/lib"))
3618 (setenv "HOME" (getcwd))
3619 (call-with-output-file "setup.cfg"
3620 (lambda (port)
3621 (format port "[directories]~%
3622basedirlist = ~a,~a~%
3623 [rc_options]~%
3624backend = TkAgg~%"
3625 (assoc-ref inputs "tcl")
3626 (assoc-ref inputs "tk")))))
3627 #t)))))
3628 (home-page "http://matplotlib.org")
3629 (synopsis "2D plotting library for Python")
3630 (description
3631 "Matplotlib is a Python 2D plotting library which produces publication
3632quality figures in a variety of hardcopy formats and interactive environments
3633across platforms. Matplotlib can be used in Python scripts, the python and
3634ipython shell, web application servers, and six graphical user interface
3635toolkits.")
3636 (license license:psfl)
3637 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3638
3639(define-public python2-matplotlib
3640 (let ((matplotlib (package-with-python2
3641 (strip-python2-variant python-matplotlib))))
3642 (package (inherit matplotlib)
3643 ;; Make sure to use special packages for Python 2 instead
3644 ;; of those automatically rewritten by package-with-python2.
3645 (propagated-inputs
3646 `(("python2-pycairo" ,python2-pycairo)
3647 ("python2-backports-functools-lru-cache"
3648 ,python2-backports-functools-lru-cache)
3649 ("python2-functools32" ,python2-functools32)
3650 ("python2-pygobject-2" ,python2-pygobject-2)
3651 ("python2-subprocess32" ,python2-subprocess32)
3652 ("python2-tkinter" ,python-2 "tk")
3653 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3654 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
3655
3656(define-public python-matplotlib-documentation
3657 (package
3658 (name "python-matplotlib-documentation")
3659 (version (package-version python-matplotlib))
3660 (source (package-source python-matplotlib))
3661 (build-system python-build-system)
3662 (native-inputs
3663 `(("python-matplotlib" ,python-matplotlib)
3664 ("python-colorspacious" ,python-colorspacious)
3665 ("python-sphinx" ,python-sphinx)
3666 ("python-sphinx-gallery" ,python-sphinx-gallery)
3667 ("python-numpydoc" ,python-numpydoc)
3668 ("python-ipython" ,python-ipython)
e7a53914 3669 ("python-ipykernel" ,python-ipykernel)
44d10b1f
RW
3670 ("python-mock" ,python-mock)
3671 ("graphviz" ,graphviz)
e7a53914
RW
3672 ("texlive" ,(texlive-union (list texlive-latex-amsfonts
3673 texlive-latex-amsmath
3674 texlive-latex-enumitem
3675 texlive-latex-expdlist
3676 texlive-latex-geometry
3677 texlive-latex-preview
3678 texlive-latex-type1cm
3679 texlive-latex-ucs
3680
3681 texlive-generic-pdftex
3682
3683 texlive-fonts-amsfonts
3684 texlive-fonts-ec
3685 texlive-fonts-adobe-times
3686 texlive-fonts-txfonts)))
44d10b1f
RW
3687 ("texinfo" ,texinfo)
3688 ,@(package-native-inputs python-matplotlib)))
3689 (arguments
3690 `(#:tests? #f ; we're only generating documentation
3691 #:phases
3692 (modify-phases %standard-phases
3693 (replace 'build
3694 (lambda _
3695 (chdir "doc")
e7a53914
RW
3696 (setenv "PYTHONPATH"
3697 (string-append (getenv "PYTHONPATH")
3698 ":" (getcwd) "/../examples/units"))
44d10b1f 3699 (substitute* "conf.py"
e7a53914
RW
3700 ;; Don't use git.
3701 (("^SHA = check_output.*")
3702 (string-append "SHA = \"" ,version "\"\n"))
3703 ;; Don't fetch intersphinx files from the Internet
3704 (("^explicit_order_folders" m)
3705 (string-append "intersphinx_mapping = {}\n" m))
3706 (("'sphinx.ext.intersphinx',") "")
3707 ;; Disable URL embedding which requires internet access.
3708 (("'https://docs.scipy.org/doc/numpy'") "None")
3709 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
3710 (invoke "make"
3711 "SPHINXBUILD=sphinx-build"
3712 "SPHINXOPTS=" ; don't abort on warnings
3713 "html" "texinfo")))
44d10b1f
RW
3714 (replace 'install
3715 (lambda* (#:key inputs outputs #:allow-other-keys)
3716 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3717 (doc (string-append data "/doc/python-matplotlib-" ,version))
3718 (info (string-append data "/info"))
3719 (html (string-append doc "/html")))
3720 (mkdir-p html)
3721 (mkdir-p info)
3722 (copy-recursively "build/html" html)
3723 (symlink (string-append html "/_images")
3724 (string-append info "/matplotlib-figures"))
3725 (with-directory-excursion "build/texinfo"
3726 (substitute* "matplotlib.texi"
3727 (("@image\\{([^,]*)" all file)
3728 (string-append "@image{matplotlib-figures/" file)))
3729 (symlink (string-append html "/_images")
3730 "./matplotlib-figures")
e7a53914
RW
3731 (invoke "makeinfo" "--no-split"
3732 "-o" "matplotlib.info" "matplotlib.texi"))
3733 (install-file "build/texinfo/matplotlib.info" info))
44d10b1f
RW
3734 #t)))))
3735 (home-page (package-home-page python-matplotlib))
3736 (synopsis "Documentation for the python-matplotlib package")
3737 (description (package-description python-matplotlib))
3738 (license (package-license python-matplotlib))))
3739
3740(define-public python2-matplotlib-documentation
3741 (package-with-python2 python-matplotlib-documentation))
3742
3743(define-public python2-pysnptools
3744 (package
3745 (name "python2-pysnptools")
5d1ade85 3746 (version "0.3.13")
44d10b1f
RW
3747 (source
3748 (origin
3749 (method url-fetch)
5d1ade85 3750 (uri (pypi-uri "pysnptools" version))
44d10b1f
RW
3751 (sha256
3752 (base32
5d1ade85 3753 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
44d10b1f
RW
3754 (build-system python-build-system)
3755 (arguments
5d1ade85
RW
3756 `(#:python ,python-2 ; only Python 2.7 is supported
3757 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
44d10b1f
RW
3758 (propagated-inputs
3759 `(("python2-numpy" ,python2-numpy)
3760 ("python2-scipy" ,python2-scipy)
3761 ("python2-pandas" ,python2-pandas)))
44d10b1f 3762 (native-inputs
5d1ade85 3763 `(("python2-cython" ,python2-cython)))
1b66989b 3764 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
44d10b1f
RW
3765 (synopsis "Library for reading and manipulating genetic data")
3766 (description
3767 "PySnpTools is a library for reading and manipulating genetic data. It
3768can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
3769those files. It can also efficiently manipulate ranges of integers using set
3770operators such as union, intersection, and difference.")
3771 (license license:asl2.0)))
3772
3773(define-public python-scipy
3774 (package
3775 (name "python-scipy")
3776 (version "1.1.0")
3777 (source
3778 (origin
3779 (method url-fetch)
3780 (uri (pypi-uri "scipy" version))
3781 (sha256
3782 (base32
3783 "1lfg686w6vv2m2dfs8v9d0bf2i18z7wz5vgzjnkgmpr4hi0550w7"))))
3784 (build-system python-build-system)
3785 (propagated-inputs
3786 `(("python-numpy" ,python-numpy)
3787 ("python-matplotlib" ,python-matplotlib)
3788 ("python-pyparsing" ,python-pyparsing)))
3789 (inputs
3790 `(("lapack" ,lapack)
3791 ("openblas" ,openblas)))
3792 (native-inputs
3793 `(("python-cython" ,python-cython)
3794 ("python-pytest" ,python-pytest)
3795 ("python-sphinx" ,python-sphinx)
3796 ("python-numpydoc" ,python-numpydoc)
3797 ("gfortran" ,gfortran)
3798 ("perl" ,perl)
3799 ("which" ,which)))
3800 (outputs '("out" "doc"))
3801 (arguments
3802 `(#:phases
3803 (modify-phases %standard-phases
3804 (add-after 'unpack 'disable-broken-tests
3805 (lambda _
3806 (substitute* "scipy/sparse/linalg/dsolve/tests/test_linsolve.py"
3807 (("^( +)def test_threads_parallel\\(self\\):" m indent)
3808 (string-append indent
3809 "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
3810 m)))
3811 (substitute* "scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py"
3812 (("^def test_parallel_threads\\(\\):" m)
3813 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
3814 m)))
3815 #t))
3816 (add-before 'build 'configure-openblas
3817 (lambda* (#:key inputs #:allow-other-keys)
3818 (call-with-output-file "site.cfg"
3819 (lambda (port)
3820 (format port
3821 "[blas]
3822libraries = openblas
3823library_dirs = ~a/lib
3824include_dirs = ~a/include
3825
3826# backslash-n to make emacs happy
3827\n[atlas]
3828library_dirs = ~a/lib
3829atlas_libs = openblas
3830"
3831 (assoc-ref inputs "openblas")
3832 (assoc-ref inputs "openblas")
3833 (assoc-ref inputs "openblas"))))
3834 #t))
3835 (add-after 'install 'install-doc
3836 (lambda* (#:key inputs outputs #:allow-other-keys)
3837 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3838 (doc (string-append data "/doc/" ,name "-" ,version))
3839 (html (string-append doc "/html"))
3840 (pyver ,(string-append "PYVER=" (version-major+minor
3841 (package-version python))))
3842 ;; By default it tries to run sphinx-build through the Python
3843 ;; interpreter which won't work with our shell wrapper.
3844 (sphinxbuild "SPHINXBUILD=LANG=C sphinx-build"))
3845 ;; Make installed package available for building the
3846 ;; documentation
3847 (add-installed-pythonpath inputs outputs)
3848 (with-directory-excursion "doc"
3849 ;; Fix generation of images for mathematical expressions.
3850 (substitute* (find-files "source" "conf\\.py")
3851 (("pngmath_use_preview = True")
3852 "pngmath_use_preview = False"))
3853 (mkdir-p html)
3854 (invoke "make" "html" pyver sphinxbuild)
3855 (with-directory-excursion "build/html"
3856 (for-each (lambda (file)
3857 (let* ((dir (dirname file))
3858 (tgt-dir (string-append html "/" dir)))
3859 (install-file file html)))
3860 (find-files "." ".*")))))
3861 #t))
3862 ;; Tests can only be run after the library has been installed and not
3863 ;; within the source directory.
3864 (delete 'check)
3865 (add-after 'install 'check
3866 (lambda* (#:key inputs outputs #:allow-other-keys)
3867 (add-installed-pythonpath inputs outputs)
3868 (with-directory-excursion "/tmp"
3869 (invoke "python" "-c"
3870 "import scipy; scipy.test(verbose=2)")))))))
3871 (home-page "https://www.scipy.org/")
3872 (synopsis "The Scipy library provides efficient numerical routines")
3873 (description "The SciPy library is one of the core packages that make up
3874the SciPy stack. It provides many user-friendly and efficient numerical
3875routines such as routines for numerical integration and optimization.")
3876 (properties `((python2-variant . ,(delay python2-scipy))))
3877 (license license:bsd-3)))
3878
3879(define-public python2-scipy
3880 (package-with-python2
3881 (strip-python2-variant python-scipy)))
3882
3883(define-public python-socksipy-branch
3884 (package
3885 (name "python-socksipy-branch")
3886 (version "1.01")
3887 (source
3888 (origin
3889 (method url-fetch)
3890 (uri (pypi-uri "SocksiPy-branch" version))
3891 (sha256
3892 (base32
3893 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
3894 (build-system python-build-system)
3895 (arguments
3896 `(#:tests? #f)) ; There are no tests
3897 (home-page "https://code.google.com/archive/p/socksipy-branch/")
3898 (synopsis "Python SOCKS module")
3899 (description
3900 "SocksiPy - A Python SOCKS client module. It provides a
3901socket-like interface that supports connections to any TCP
3902service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
3903The original version was developed by Dan Haim, this is a
3904branch created by Mario Vilas to address some open issues,
3905as the original project seems to have been abandoned circa 2007.")
3906 (license license:bsd-3)))
3907
3908(define-public python2-socksipy-branch
3909 (package-with-python2 python-socksipy-branch))
3910
3911(define-public python-pycodestyle
3912 (package
3913 (name "python-pycodestyle")
3914 (version "2.4.0")
3915 (source
3916 (origin
3917 (method url-fetch)
3918 (uri (pypi-uri "pycodestyle" version))
3919 (sha256
3920 (base32
3921 "0fhy4vnlgpjq4qd1wdnl6pvdw7rah0ypmn8c9mkhz8clsndskz6b"))))
3922 (build-system python-build-system)
3923 (home-page "https://pycodestyle.readthedocs.io/")
3924 (synopsis "Python style guide checker")
3925 (description "@code{pycodestyle} (formerly pep8) is a tool to check
3926Python code against some of the style conventions in
3927@url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
3928 (license license:expat)))
3929
3930(define-public python2-pycodestyle
3931 (package-with-python2 python-pycodestyle))
3932
3933(define-public python-multidict
3934 (package
3935 (name "python-multidict")
3936 (version "4.2.0")
3937 (source
3938 (origin
3939 (method url-fetch)
3940 (uri (pypi-uri "multidict" version))
3941 (sha256
3942 (base32
3943 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
3944 (build-system python-build-system)
3945 (native-inputs
3946 `(("python-pytest" ,python-pytest)
3947 ("python-pytest-runner" ,python-pytest-runner)))
3948 (home-page "https://github.com/aio-libs/multidict/")
3949 (synopsis "Multidict implementation")
3950 (description "Multidict is dict-like collection of key-value pairs
3951where key might be occurred more than once in the container.")
3952 (license license:asl2.0)))
3953
3954(define-public python-orderedmultidict
3955 (package
3956 (name "python-orderedmultidict")
3957 (version "0.7.11")
3958 (source
3959 (origin
3960 (method url-fetch)
3961 (uri (pypi-uri "orderedmultidict" version))
3962 (sha256
3963 (base32
3964 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
3965 (build-system python-build-system)
3966 (arguments
3967 `(#:phases
3968 (modify-phases %standard-phases
3969 (add-after 'unpack 'fix-tests
3970 (lambda _
3971 ;; The package uses nosetest for running the tests.
3972 ;; Adding this initfile allows to run the test suite
3973 ;; without requiring nosetest.
d1c4f329
RW
3974 (with-output-to-file "tests/__init__.py" newline)
3975 #t)))))
44d10b1f
RW
3976 (propagated-inputs
3977 `(("python-six" ,python-six)))
3978 (native-inputs
3979 `(("python-pycodestyle" ,python-pycodestyle)))
3980 (home-page "https://github.com/gruns/orderedmultidict")
3981 (synopsis "Python Ordered Multivalue Dictionary - omdict")
3982 (description "This package contains a library for ordered multivalue
3983dictionaries. A multivalue dictionary is a dictionary that can store
3984multiple values for the same key. An ordered multivalue dictionary is a
3985multivalue dictionary that retains the order of insertions and deletions.")
3986 (license license:unlicense)))
3987
3988(define-public python2-orderedmultidict
3989 (package-with-python2 python-orderedmultidict))
3990
3991(define-public python-autopep8
3992 (package
3993 (name "python-autopep8")
3994 (version "1.3.5")
3995 (source
3996 (origin
3997 (method url-fetch)
3998 (uri (pypi-uri "autopep8" version))
3999 (sha256
4000 (base32
4001 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
4002 (build-system python-build-system)
4003 (propagated-inputs
4004 `(("python-pycodestyle" ,python-pycodestyle)))
4005 (home-page "https://github.com/hhatto/autopep8")
4006 (synopsis "Format Python code according to the PEP 8 style guide")
4007 (description
4008 "@code{autopep8} automatically formats Python code to conform to
4009the PEP 8 style guide. It uses the pycodestyle utility to determine
4010what parts of the code needs to be formatted. @code{autopep8} is
4011capable of fixing most of the formatting issues that can be reported
4012by pycodestyle.")
4013 (license (license:non-copyleft
4014 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4015
4016(define-public python2-autopep8
4017 (package-with-python2 python-autopep8))
4018
4019(define-public python-distutils-extra
4020 (package
4021 (name "python-distutils-extra")
4022 (version "2.38")
4023 (source
4024 (origin
4025 (method url-fetch)
4026 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4027 version "/+download/python-distutils-extra-"
4028 version ".tar.gz"))
4029 (sha256
4030 (base32
4031 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4032 (build-system python-build-system)
4033 (home-page "https://launchpad.net/python-distutils-extra/")
4034 (synopsis "Enhancements to Python's distutils")
4035 (description
4036 "The python-distutils-extra module enables you to easily integrate
4037gettext support, themed icons, and scrollkeeper-based documentation into
4038Python's distutils.")
4039 (license license:gpl2)))
4040
4041(define-public python2-distutils-extra
4042 (package-with-python2 python-distutils-extra))
4043
4044(define-public python2-elib.intl
4045 (package
4046 (name "python2-elib.intl")
4047 (version "0.0.3")
4048 (source
4049 (origin
4050 ;; This project doesn't tag releases or publish tarballs, so we take
4051 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4052 (method git-fetch)
4053 (uri (git-reference
4054 (url "https://github.com/dieterv/elib.intl.git")
4055 (commit "d09997cfef")))
4056 (file-name (string-append name "-" version "-checkout"))
4057 (sha256
4058 (base32
4059 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4060 (build-system python-build-system)
4061 (arguments
4062 ;; incompatible with Python 3 (exception syntax)
4063 `(#:python ,python-2
4064 #:tests? #f))
4065 (home-page "https://github.com/dieterv/elib.intl")
4066 (synopsis "Enhanced internationalization for Python")
4067 (description
4068 "The elib.intl module provides enhanced internationalization (I18N)
4069services for your Python modules and applications.")
4070 (license license:lgpl3+)))
4071
4072(define-public python-olefile
4073 (package
4074 (name "python-olefile")
4075 (version "0.45.1")
4076 (source
4077 (origin
4078 (method url-fetch)
4079 (uri (string-append "https://github.com/decalage2/olefile/archive/v"
4080 version ".tar.gz"))
4081 (file-name (string-append name "-" version ".tar.gz"))
4082 (sha256
4083 (base32
4084 "18ai19zwagm6nli14k8bii31ipbab2rp7plrvsm6gmfql551a8ai"))))
4085 (build-system python-build-system)
4086 (home-page
4087 "https://www.decalage.info/python/olefileio")
4088 (synopsis "Read and write Microsoft OLE2 files.")
4089 (description
4090 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
4091Storage or Compound Document, Microsoft Office). It is an improved version of
4092the OleFileIO module from PIL, the Python Image Library.")
4093 (license license:bsd-3)))
4094
4095(define-public python2-olefile
4096 (package-with-python2 python-olefile))
4097
4098(define-public python-pillow
4099 (package
4100 (name "python-pillow")
4101 (version "5.4.1")
4102 (source
4103 (origin
4104 (method url-fetch)
4105 (uri (pypi-uri "Pillow" version))
4106 (sha256
4107 (base32
4108 "17waygkhhzjd75kajlfw9v57mbb41lcpg6cvkdijqd7smm76ccsj"))))
4109 (build-system python-build-system)
4110 (native-inputs
4111 `(("python-pytest" ,python-pytest)))
4112 (inputs
4113 `(("freetype" ,freetype)
4114 ("lcms" ,lcms)
4115 ("zlib" ,zlib)
4116 ("libjpeg" ,libjpeg)
4117 ("openjpeg" ,openjpeg)
4118 ("libtiff" ,libtiff)
4119 ("libwebp" ,libwebp)))
4120 (propagated-inputs
4121 `(("python-olefile" ,python-olefile)))
4122 (arguments
4123 `(#:phases
4124 (modify-phases %standard-phases
4125 (add-after 'unpack 'patch-ldconfig
4126 (lambda _
4127 (substitute* "setup.py"
4128 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
4129 (delete 'check) ; We must run checks after python-pillow is installed.
4130 (add-after 'install 'check-installed
4131 (lambda* (#:key outputs inputs #:allow-other-keys)
4132 (begin
4133 (setenv "HOME" (getcwd))
4134 ;; Make installed package available for running the tests.
4135 (add-installed-pythonpath inputs outputs)
4136 (invoke "python" "selftest.py" "--installed")
4137 (invoke "python" "-m" "pytest" "-vv")))))))
4138 (home-page "https://python-pillow.org")
4139 (synopsis "Fork of the Python Imaging Library")
4140 (description
4141 "The Python Imaging Library adds image processing capabilities to your
4142Python interpreter. This library provides extensive file format support, an
4143efficient internal representation, and fairly powerful image processing
4144capabilities. The core image library is designed for fast access to data
4145stored in a few basic pixel formats. It should provide a solid foundation for
4146a general image processing tool.")
4147 (license (license:x11-style
4148 "http://www.pythonware.com/products/pil/license.htm"
4149 "The PIL Software License"))))
4150
4151(define-public python2-pillow
4152 (package-with-python2 python-pillow))
4153
4154(define-public python-pycparser
4155 (package
4156 (name "python-pycparser")
4157 (version "2.18")
4158 (source
4159 (origin
4160 (method url-fetch)
4161 (uri (pypi-uri "pycparser" version))
4162 (sha256
4163 (base32
4164 "09mjyw82ibqzl449g7swy8bfxnfpmas0815d2rkdjlcqw81wma4r"))))
4165 (outputs '("out" "doc"))
4166 (build-system python-build-system)
4167 (native-inputs
4168 `(("pkg-config" ,pkg-config)))
4169 (arguments
4170 `(#:phases
4171 (modify-phases %standard-phases
4172 (replace 'check
4173 (lambda _
4174 (with-directory-excursion "tests"
acb75c03
RW
4175 (invoke "python" "all_tests.py"))
4176 #t))
44d10b1f
RW
4177 (add-after 'install 'install-doc
4178 (lambda* (#:key outputs #:allow-other-keys)
4179 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4180 (doc (string-append data "/doc/" ,name "-" ,version))
4181 (examples (string-append doc "/examples")))
4182 (mkdir-p examples)
4183 (for-each (lambda (file)
4184 (copy-file (string-append "." file)
4185 (string-append doc file)))
4186 '("/README.rst" "/CHANGES" "/LICENSE"))
4187 (copy-recursively "examples" examples)))))))
4188 (home-page "https://github.com/eliben/pycparser")
4189 (synopsis "C parser in Python")
4190 (description
4191 "Pycparser is a complete parser of the C language, written in pure Python
4192using the PLY parsing library. It parses C code into an AST and can serve as
4193a front-end for C compilers or analysis tools.")
4194 (license license:bsd-3)))
4195
4196(define-public python2-pycparser
4197 (package-with-python2 python-pycparser))
4198
4199(define-public python-pywavelets
4200 (package
4201 (name "python-pywavelets")
4202 (version "1.0.1")
4203 (home-page "https://github.com/PyWavelets/pywt")
4204 (source (origin
4205 (method url-fetch)
4206 (uri (pypi-uri "PyWavelets" version))
4207 (sha256
4208 (base32
4209 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
4210 (build-system python-build-system)
4211 (arguments
4212 '(#:modules ((ice-9 ftw)
4213 (srfi srfi-1)
4214 (srfi srfi-26)
4215 (guix build utils)
4216 (guix build python-build-system))
4217 #:phases (modify-phases %standard-phases
4218 (replace 'check
4219 (lambda _
4220 (let ((cwd (getcwd))
4221 (libdir (find (cut string-prefix? "lib." <>)
4222 (scandir "build"))))
4223 (with-directory-excursion (string-append cwd "/build/" libdir)
4224 (invoke "nosetests" "-v" "."))))))))
4225 (native-inputs
4226 `(("python-matplotlib" ,python-matplotlib) ;for tests
4227 ("python-nose" ,python-nose)))
4228 (propagated-inputs
4229 `(("python-numpy" ,python-numpy)))
4230 (synopsis "Wavelet transforms in Python")
4231 (description
4232 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
4233mathematical basis functions that are localized in both time and frequency.
4234Wavelet transforms are time-frequency transforms employing wavelets. They are
4235similar to Fourier transforms, the difference being that Fourier transforms are
4236localized only in frequency instead of in time and frequency.")
4237 (license license:expat)))
4238
4239(define-public python2-pywavelets
4240 (package-with-python2 python-pywavelets))
4241
4242(define-public python-xcffib
4243 (package
4244 (name "python-xcffib")
4245 (version "0.6.0")
4246 (source
4247 (origin
4248 (method url-fetch)
4249 (uri (pypi-uri "xcffib" version))
4250 (sha256
4251 (base32
4252 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
4253 (build-system python-build-system)
4254 (inputs
4255 `(("libxcb" ,libxcb)))
4256 (propagated-inputs
4257 `(("python-cffi" ,python-cffi) ; used at run time
4258 ("python-six" ,python-six)))
4259 (arguments
4260 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4261 #:tests? #f
4262 #:phases
4263 (modify-phases %standard-phases
4264 (add-after 'unpack 'fix-libxcb-path
4265 (lambda* (#:key inputs #:allow-other-keys)
4266 (let ((libxcb (assoc-ref inputs "libxcb")))
4267 (substitute* '("xcffib/__init__.py")
4268 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4269 #t)))
4270 (add-after 'install 'install-doc
4271 (lambda* (#:key outputs #:allow-other-keys)
4272 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4273 "/doc/" ,name "-" ,version)))
4274 (mkdir-p doc)
4275 (copy-file "README.md"
4276 (string-append doc "/README.md"))
4277 #t))))))
4278 (home-page "https://github.com/tych0/xcffib")
4279 (synopsis "XCB Python bindings")
4280 (description
4281 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4282support for Python 3 and PyPy. It is based on cffi.")
4283 (license license:expat)))
4284
4285(define-public python2-xcffib
4286 (package-with-python2 python-xcffib))
4287
4288(define-public python-cairocffi
4289 (package
4290 (name "python-cairocffi")
4291 (version "0.9.0")
4292 (source
4293 (origin
4294 (method url-fetch)
4295 (uri (pypi-uri "cairocffi" version))
4296 (sha256
4297 (base32
4298 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
4299 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
4300 (build-system python-build-system)
4301 (outputs '("out" "doc"))
4302 (inputs
4303 `(("glib" ,glib)
4304 ("gtk+" ,gtk+)
4305 ("gdk-pixbuf" ,gdk-pixbuf)
4306 ("cairo" ,cairo)
4307 ("pango" ,pango)))
4308 (native-inputs
4309 `(("pkg-config" ,pkg-config)
4310 ("python-pytest" ,python-pytest)
4311 ("python-pytest-cov" ,python-pytest-cov)
4312 ("python-pytest-runner" ,python-pytest-runner)
4313 ("python-sphinx" ,python-sphinx)
4314 ("python-docutils" ,python-docutils)))
4315 (propagated-inputs
4316 `(("python-xcffib" ,python-xcffib))) ; used at run time
4317 (arguments
4318 `(#:phases
4319 (modify-phases %standard-phases
4320 (add-after 'unpack 'patch-paths
4321 (lambda* (#:key inputs outputs #:allow-other-keys)
4322 (substitute* (find-files "." "\\.py$")
4323 (("dlopen\\(ffi, 'cairo'")
4324 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
4325 "/lib/libcairo.so.2'"))
4326 (("dlopen\\(ffi, 'gdk-3'")
4327 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
4328 "/lib/libgtk-3.so.0'"))
4329 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
4330 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
4331 "/lib/libgdk_pixbuf-2.0.so.0'"))
4332 (("dlopen\\(ffi, 'glib-2.0'")
4333 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4334 "/lib/libglib-2.0.so.0'"))
4335 (("dlopen\\(ffi, 'gobject-2.0'")
4336 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4337 "/lib/libgobject-2.0.so.0'"))
4338 (("dlopen\\(ffi, 'pangocairo-1.0'")
4339 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4340 "/lib/libpangocairo-1.0.so.0'"))
4341 (("dlopen\\(ffi, 'pango-1.0'")
4342 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4343 "/lib/libpango-1.0.so.0'")))
4344 #t))
4345 (add-after 'install 'install-doc
4346 (lambda* (#:key inputs outputs #:allow-other-keys)
4347 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4348 (doc (string-append data "/doc/" ,name "-" ,version))
4349 (html (string-append doc "/html")))
4350 (setenv "LD_LIBRARY_PATH"
4351 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4352 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4353 (setenv "LANG" "en_US.UTF-8")
4354 (mkdir-p html)
4355 (for-each (lambda (file)
4356 (copy-file (string-append "." file)
4357 (string-append doc file)))
4358 '("/README.rst" "/CHANGES" "/LICENSE"))
4359 (system* "python" "setup.py" "build_sphinx")
4360 (copy-recursively "docs/_build/html" html)
4361 #t))))))
4362 (home-page "https://github.com/Kozea/cairocffi")
4363 (synopsis "Python bindings and object-oriented API for Cairo")
4364 (description
4365 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4366Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4367graphics library with support for multiple backends including image buffers,
4368PNG, PostScript, PDF, and SVG file output.")
4369 (license license:bsd-3)))
4370
4371(define-public python2-cairocffi
4372 (package-with-python2 python-cairocffi))
4373
4374(define-public python-decorator
4375 (package
4376 (name "python-decorator")
4377 (version "4.3.0")
4378 (source
4379 (origin
4380 (method url-fetch)
4381 (uri (pypi-uri "decorator" version))
4382 (sha256
4383 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4384 (build-system python-build-system)
4385 (home-page "https://pypi.python.org/pypi/decorator/")
4386 (synopsis "Python module to simplify usage of decorators")
4387 (description
4388 "The aim of the decorator module is to simplify the usage of decorators
4389for the average programmer, and to popularize decorators usage giving examples
4390of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4391etc. The core of this module is a decorator factory.")
4392 (license license:expat)))
4393
4394(define-public python2-decorator
4395 (package-with-python2 python-decorator))
4396
4397(define-public python-drmaa
4398 (package
4399 (name "python-drmaa")
4400 (version "0.7.7")
4401 (source
4402 (origin
4403 (method url-fetch)
4404 (uri (pypi-uri "drmaa" version))
4405 (sha256
4406 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4407 (build-system python-build-system)
4408 ;; The test suite requires libdrmaa which is provided by the cluster
4409 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4410 ;; should be set to the path of the libdrmaa library.
4411 (arguments '(#:tests? #f))
4412 (native-inputs
4413 `(("python-nose" ,python-nose)))
4414 (home-page "https://pypi.python.org/pypi/drmaa")
4415 (synopsis "Python bindings for the DRMAA library")
4416 (description
4417 "A Python package for Distributed Resource Management (DRM) job
4418submission and control. This package is an implementation of the DRMAA 1.0
4419Python language binding specification.")
4420 (license license:bsd-3)))
4421
4422(define-public python2-drmaa
4423 (package-with-python2 python-drmaa))
4424
4425(define-public python-grako
4426 (package
4427 (name "python-grako")
4428 (version "3.99.9")
4429 (source
4430 (origin
4431 (method url-fetch)
4432 (uri
4433 (pypi-uri "grako" version ".zip"))
4434 (sha256
4435 (base32
4436 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4437 (build-system python-build-system)
4438 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4439 (native-inputs
4440 `(("unzip" ,unzip)
4441 ("python-pytest" ,python-pytest)
4442 ("python-pytest-runner" ,python-pytest-runner)))
4443 (home-page "https://bitbucket.org/neogeny/grako")
4444 (synopsis "EBNF parser generator")
4445 (description
4446 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4447memoizing PEG/Packrat parser in Python.")
4448 (license license:bsd-3)))
4449
4450(define-public python2-grako
4451 (package-with-python2 python-grako))
4452
4453(define-public python-gridmap
4454 (package
4455 (name "python-gridmap")
4456 (version "0.13.0")
4457 (source
4458 (origin
768fea0f
TGR
4459 (method git-fetch)
4460 (uri (git-reference
4461 (url "https://github.com/pygridtools/gridmap.git")
4462 (commit (string-append "v" version))))
4463 (file-name (git-file-name name version))
44d10b1f 4464 (sha256
768fea0f 4465 (base32 "1478lbwsr1w24cii2x01m2910fvh8r43ghnb78nc972a96hqiknm"))))
44d10b1f
RW
4466 (build-system python-build-system)
4467 (arguments
4468 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4469 (propagated-inputs
4470 `(("python-psutil" ,python-psutil)
4471 ("python-drmaa" ,python-drmaa)
4472 ("python-pyzmq" ,python-pyzmq)))
4473 (home-page "https://github.com/pygridtools/gridmap")
4474 (synopsis "Create jobs on a cluster directly from Python")
4475 (description
4476 "Gridmap is a Python package to allow you to easily create jobs on the
4477cluster directly from Python. You can directly map Python functions onto the
4478cluster without needing to write any wrapper code yourself.")
4479 (license license:gpl3+)))
4480
4481(define-public python2-gridmap
4482 (package-with-python2 python-gridmap))
4483
4484(define-public python-honcho
4485 (package
4486 (name "python-honcho")
4487 (version "1.0.1")
4488 (source
4489 (origin
8524d130
TGR
4490 (method git-fetch)
4491 (uri (git-reference
4492 (url "https://github.com/nickstenning/honcho.git")
4493 (commit (string-append "v" version))))
4494 (file-name (git-file-name name version))
44d10b1f 4495 (sha256
8524d130 4496 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
44d10b1f
RW
4497 (build-system python-build-system)
4498 (native-inputs
4499 `(("python-pytest" ,python-pytest)
4500 ("python-mock" ,python-mock)
4501 ("python-tox" ,python-tox)
4502 ("which" ,which))) ;for tests
4503 (propagated-inputs
4504 `(("python-jinja2" ,python-jinja2)))
4505 (arguments
4506 `(#:phases
4507 (modify-phases %standard-phases
4508 (delete 'check)
4509 (add-after 'install 'check
4510 (lambda* (#:key outputs inputs #:allow-other-keys)
4511 ;; fix honcho path in testsuite
4512 (substitute* "tests/conftest.py"
4513 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4514 "/bin/honcho" "'")))
4515 ;; It's easier to run tests after install.
4516 ;; Make installed package available for running the tests
4517 (add-installed-pythonpath inputs outputs)
95b707fb 4518 (invoke "py.test" "-v"))))))
44d10b1f
RW
4519 (home-page "https://github.com/nickstenning/honcho")
4520 (synopsis "Manage Procfile-based applications")
4521 (description
4522 "A Procfile is a file which describes how to run an application
4523consisting of serveral processes. honcho starts all listed processes.
4524The output of all running processes is collected by honcho and
4525displayed.")
4526 (license license:expat)))
4527
4528(define-public python2-honcho
4529 (package-with-python2 python-honcho))
4530
4531(define-public python-pexpect
4532 (package
4533 (name "python-pexpect")
4534 (version "4.6.0")
4535 (source
4536 (origin
4537 (method url-fetch)
4538 (uri (pypi-uri "pexpect" version))
4539 (sha256
4540 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
4541 (build-system python-build-system)
4542 (arguments
4543 `(#:phases
4544 (modify-phases %standard-phases
4545 (add-before 'check 'prepare-tests
4546 (lambda _
4547 (substitute* (find-files "tests")
4548 (("/bin/ls") (which "ls"))
4549 (("/bin/echo") (which "echo"))
4550 (("/bin/which") (which "which"))
4551 ;; Many tests try to use the /bin directory which
4552 ;; is not present in the build environment.
4553 ;; Use one that's non-empty and unlikely to change.
4554 (("/bin'") "/dev'"))
4555 ;; XXX: Socket connection test gets "Connection reset by peer".
4556 ;; Why does it not work? Delete for now.
4557 (delete-file "tests/test_socket.py")
4558 #t))
4559 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
4560 (native-inputs
4561 `(("python-nose" ,python-nose)
4562 ("python-pytest" ,python-pytest)
4563 ("man-db" ,man-db)
4564 ("which" ,which)
4565 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
4566 (propagated-inputs
4567 `(("python-ptyprocess" ,python-ptyprocess)))
4568 (home-page "http://pexpect.readthedocs.org/")
4569 (synopsis "Controlling interactive console applications")
4570 (description
4571 "Pexpect is a pure Python module for spawning child applications;
4572controlling them; and responding to expected patterns in their output.
4573Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4574child application and control it as if a human were typing commands.")
4575 (license license:isc)))
4576
4577(define-public python2-pexpect
4578 (package-with-python2 python-pexpect))
4579
4580(define-public python-setuptools-scm
4581 (package
4582 (name "python-setuptools-scm")
4583 (version "3.1.0")
4584 (source (origin
4585 (method url-fetch)
4586 (uri (pypi-uri "setuptools_scm" version))
4587 (sha256
4588 (base32
4589 "0h4bglwfz8b9prqljv8z3w9rgydfyxzaj05bm1y6zs5m6shz548i"))))
4590 (build-system python-build-system)
4591 (home-page "https://github.com/pypa/setuptools_scm/")
4592 (synopsis "Manage Python package versions in SCM metadata")
4593 (description
4594 "Setuptools_scm handles managing your Python package versions in
4595@dfn{software configuration management} (SCM) metadata instead of declaring
4596them as the version argument or in a SCM managed file.")
4597 (license license:expat)))
4598
4599(define-public python2-setuptools-scm
4600 (package-with-python2 python-setuptools-scm))
4601
4602(define-public python-pathpy
4603 (package
4604 (name "python-pathpy")
4605 (version "11.0.1")
4606 (source
4607 (origin
4608 (method url-fetch)
4609 (uri (pypi-uri "path.py" version))
4610 (sha256
4611 (base32 "07x15v8c7ry9bvycw294c9yq6ky9v2b0dalvgi6rn38ilh69vsz7"))))
4612 ;; (outputs '("out" "doc"))
4613 (build-system python-build-system)
4614 (propagated-inputs
4615 `(("python-appdirs" ,python-appdirs)))
4616 (native-inputs
4617 `(("python-setuptools-scm" ,python-setuptools-scm)
4618 ("python-sphinx" ,python-sphinx)
4619 ("python-rst.linker" ,python-rst.linker)
4620 ("python-pytest" ,python-pytest)
4621 ("python-pytest-runner" ,python-pytest-runner)))
4622 (arguments
4623 ;; FIXME: Documentation and tests require "jaraco.packaging".
4624 `(#:tests? #f))
4625 ;; #:phases
4626 ;; (modify-phases %standard-phases
4627 ;; (add-after 'build 'build-doc
4628 ;; (lambda _
4629 ;; (setenv "LANG" "en_US.UTF-8")
4630 ;; (zero? (system* "python" "setup.py" "build_sphinx"))))
4631 ;; (add-after 'install 'install-doc
4632 ;; (lambda* (#:key outputs #:allow-other-keys)
4633 ;; (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4634 ;; (doc (string-append data "/doc/" ,name "-" ,version))
4635 ;; (html (string-append doc "/html")))
4636 ;; (mkdir-p html)
4637 ;; (for-each (lambda (file)
4638 ;; (copy-file file (string-append doc "/" file)))
4639 ;; '("README.rst" "CHANGES.rst"))
4640 ;; (copy-recursively "build/sphinx/html" html)))))))
4641 (home-page "https://github.com/jaraco/path.py")
4642 (synopsis "Python module wrapper for built-in os.path")
4643 (description
4644 "@code{path.py} implements path objects as first-class entities, allowing
4645common operations on files to be invoked on those path objects directly.")
4646 (license license:expat)))
4647
4648(define-public python2-pathpy
4649 (package-with-python2 python-pathpy))
4650
4651(define-public python-simplegeneric
4652 (package
4653 (name "python-simplegeneric")
4654 (version "0.8.1")
4655 (source
4656 (origin
4657 (method url-fetch)
6c8c3980 4658 (uri (pypi-uri "simplegeneric" version ".zip"))
44d10b1f
RW
4659 (sha256
4660 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4661 (build-system python-build-system)
4662 (native-inputs
4663 `(("unzip" ,unzip)))
4664 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
4665 (synopsis "Python module for simple generic functions")
4666 (description
4667 "The simplegeneric module lets you define simple single-dispatch generic
4668functions, akin to Python’s built-in generic functions like @code{len()},
4669@code{iter()} and so on. However, instead of using specially-named methods,
4670these generic functions use simple lookup tables, akin to those used by
4671e.g. @code{pickle.dump()} and other generic functions found in the Python
4672standard library.")
4673 (license license:zpl2.1)))
4674
4675(define-public python2-simplegeneric
4676 (package-with-python2 python-simplegeneric))
4677
4678(define-public python-ipython-genutils
4679 ;; TODO: This package is retired, check if can be removed, see description.
4680 (package
4681 (name "python-ipython-genutils")
4682 (version "0.1.0")
4683 (source
4684 (origin
4685 (method url-fetch)
c9671d4b 4686 (uri (pypi-uri "ipython_genutils" version))
44d10b1f
RW
4687 (sha256
4688 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
4689 (build-system python-build-system)
4690 (arguments `(#:tests? #f)) ; no tests
4691 (home-page "https://ipython.org")
4692 (synopsis "Vestigial utilities from IPython")
4693 (description
4694 "This package provides retired utilities from IPython. No packages
4695outside IPython/Jupyter should depend on it.
4696
4697This package shouldn't exist. It contains some common utilities shared by
4698Jupyter and IPython projects during The Big Split. As soon as possible, those
4699packages will remove their dependency on this, and this package will go
4700away.")
4701 (license license:bsd-3)))
4702
4703(define-public python2-ipython-genutils
4704 (package-with-python2 python-ipython-genutils))
4705
4706(define-public python-traitlets
4707 (package
4708 (name "python-traitlets")
4709 (version "4.3.2")
4710 (source
4711 (origin
4712 (method url-fetch)
4713 (uri (pypi-uri "traitlets" version))
4714 (sha256
4715 (base32
4716 "0dbq7sx26xqz5ixs711k5nc88p8a0nqyz6162pwks5dpcz9d4jww"))))
4717 (build-system python-build-system)
4718 (arguments
4719 `(#:phases
4720 (modify-phases %standard-phases
4721 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
4722 (propagated-inputs
4723 `(("python-ipython-genutils" ,python-ipython-genutils)
4724 ("python-decorator" ,python-decorator))) ;not needed for >4.3.2
4725 (native-inputs
4726 `(("python-pytest" ,python-pytest)))
4727 (properties `((python2-variant . ,(delay python2-traitlets))))
4728 (home-page "https://ipython.org")
4729 (synopsis "Configuration system for Python applications")
4730 (description
4731 "Traitlets is a framework that lets Python classes have attributes with
4732type checking, dynamically calculated default values, and ‘on change’
4733callbacks. The package also includes a mechanism to use traitlets for
4734configuration, loading values from files or from command line arguments. This
4735is a distinct layer on top of traitlets, so you can use traitlets in your code
4736without using the configuration machinery.")
4737 (license license:bsd-3)))
4738
4739(define-public python2-traitlets
4740 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
4741 (package
4742 (inherit traitlets)
4743 (propagated-inputs
4744 `(("python2-enum34" ,python2-enum34)
4745 ,@(package-propagated-inputs traitlets))))))
4746
4747(define-public python-jupyter-core
4748 (package
4749 (name "python-jupyter-core")
4750 (version "4.4.0")
4751 (source
4752 (origin
4753 (method url-fetch)
4754 (uri (string-append (pypi-uri "jupyter_core" version)))
4755 (sha256
4756 (base32
4757 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
4758 (build-system python-build-system)
4759 ;; FIXME: not sure how to run the tests
4760 (arguments `(#:tests? #f))
4761 (propagated-inputs
4762 `(("python-traitlets" ,python-traitlets)))
4763 (home-page "http://jupyter.org/")
4764 (synopsis "Jupyter base package")
4765 (description
4766 "Jupyter core is the base package on which Jupyter projects rely.")
4767 (license license:bsd-3)))
4768
4769(define-public python2-jupyter-core
4770 (package-with-python2 python-jupyter-core))
4771
4772(define-public python-jupyter-client
4773 (package
4774 (name "python-jupyter-client")
4775 (version "5.2.4")
4776 (source
4777 (origin
4778 (method url-fetch)
4779 (uri (pypi-uri "jupyter_client" version))
4780 (sha256
4781 (base32
4782 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
4783 (build-system python-build-system)
4784 ;; Tests fail because of missing native python kernel which I assume is
4785 ;; provided by the ipython package, which we cannot use because it would
4786 ;; cause a dependency cycle.
4787 (arguments `(#:tests? #f))
4788 (propagated-inputs
4789 `(("python-pyzmq" ,python-pyzmq)
4790 ("python-traitlets" ,python-traitlets)
4791 ("python-jupyter-core" ,python-jupyter-core)))
4792 (home-page "http://jupyter.org/")
4793 (synopsis "Jupyter protocol implementation and client libraries")
4794 (description
4795 "The @code{jupyter_client} package contains the reference implementation
4796of the Jupyter protocol. It also provides client and kernel management APIs
4797for working with kernels, and the @code{jupyter kernelspec} entrypoint for
4798installing @code{kernelspec}s for use with Jupyter frontends.")
4799 (license license:bsd-3)))
4800
4801(define-public python2-jupyter-client
4802 (package-with-python2 python-jupyter-client))
4803
4804(define-public python-ipykernel
4805 (package
4806 (name "python-ipykernel")
4807 (version "5.1.0")
4808 (source
4809 (origin
4810 (method url-fetch)
4811 (uri (pypi-uri "ipykernel" version))
4812 (sha256
4813 (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g"))))
4814 (build-system python-build-system)
4815 (arguments
4816 `(#:phases
4817 (modify-phases %standard-phases
4818 (replace 'check
4819 (lambda _
4820 (setenv "HOME" "/tmp")
4821 (invoke "pytest" "-v")
4822 #t)))))
4823 (propagated-inputs
4824 `(("python-ipython" ,python-ipython)
4825 ;; imported at runtime during connect
4826 ("python-jupyter-client" ,python-jupyter-client)))
4827 (native-inputs
4828 `(("python-pytest" ,python-pytest)
4829 ("python-nose" ,python-nose)))
4830 (home-page "https://ipython.org")
4831 (synopsis "IPython Kernel for Jupyter")
4832 (description
4833 "This package provides the IPython kernel for Jupyter.")
4834 (license license:bsd-3)))
4835
4836(define-public python2-ipykernel
4837 (package-with-python2 python-ipykernel))
4838
966aa714
AE
4839(define-public python-pari-jupyter
4840 (package
4841 (name "python-pari-jupyter")
4842 (version "1.3.2")
4843 (source
4844 (origin
4845 (method url-fetch)
4846 (uri (pypi-uri "pari_jupyter" version))
4847 (sha256
4848 (base32
4849 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
4850 (build-system python-build-system)
4851 (propagated-inputs
4852 `(("python-ipykernel" ,python-ipykernel)))
4853 (inputs
4854 `(("pari-gp" ,pari-gp)
4855 ("readline" ,readline)))
4856 (arguments
4857 `(#:tests? #f)) ; no test suite
4858 (home-page
4859 "https://github.com/jdemeyer/pari_jupyter")
4860 (synopsis "A Jupyter kernel for PARI/GP")
4861 (description "The package provides a PARI/GP kernel for Jupyter.")
4862 (license license:gpl3+)))
4863
44d10b1f
RW
4864;; This is the latest release of the LTS version of ipython with support for
4865;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
4866;; dropped support for Python 2.7. We may want to rename this package.
4867(define-public python-ipython
4868 (package
4869 (name "python-ipython")
4870 (version "5.8.0")
4871 (source
4872 (origin
4873 (method url-fetch)
4874 (uri (pypi-uri "ipython" version ".tar.gz"))
4875 (sha256
4876 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
4877 (build-system python-build-system)
4878 (outputs '("out" "doc"))
4879 (propagated-inputs
4880 `(("python-pyzmq" ,python-pyzmq)
4881 ("python-prompt-toolkit" ,python-prompt-toolkit-1)
4882 ("python-terminado" ,python-terminado)
4883 ("python-matplotlib" ,python-matplotlib)
4884 ("python-numpy" ,python-numpy)
4885 ("python-numpydoc" ,python-numpydoc)
4886 ("python-jinja2" ,python-jinja2)
4887 ("python-mistune" ,python-mistune)
4888 ("python-pexpect" ,python-pexpect)
4889 ("python-pickleshare" ,python-pickleshare)
4890 ("python-simplegeneric" ,python-simplegeneric)
4891 ("python-jsonschema" ,python-jsonschema)
4892 ("python-traitlets" ,python-traitlets)
4893 ("python-nbformat" ,python-nbformat)
4894 ("python-pygments" ,python-pygments)))
4895 (inputs
4896 `(("readline" ,readline)
4897 ("which" ,which)))
4898 (native-inputs
4899 `(("graphviz" ,graphviz)
4900 ("pkg-config" ,pkg-config)
4901 ("python-requests" ,python-requests) ;; for tests
4902 ("python-testpath" ,python-testpath)
4903 ("python-nose" ,python-nose)
4904 ("python-sphinx" ,python-sphinx)
4905 ("python-shpinx-rtd-theme" ,python-sphinx-rtd-theme)
4906 ;; FIXME: It's possible that a smaller union would work just as well.
4907 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
4908 texlive-fonts-ec
4909 texlive-generic-ifxetex
4910 texlive-generic-pdftex
4911 texlive-latex-amsfonts
4912 texlive-latex-capt-of
4913 texlive-latex-cmap
4914 texlive-latex-environ
4915 texlive-latex-eqparbox
4916 texlive-latex-etoolbox
4917 texlive-latex-expdlist
4918 texlive-latex-fancyhdr
4919 texlive-latex-fancyvrb
4920 texlive-latex-fncychap
4921 texlive-latex-float
4922 texlive-latex-framed
4923 texlive-latex-geometry
4924 texlive-latex-graphics
4925 texlive-latex-hyperref
4926 texlive-latex-mdwtools
4927 texlive-latex-multirow
4928 texlive-latex-oberdiek
4929 texlive-latex-parskip
4930 texlive-latex-preview
4931 texlive-latex-tabulary
4932 texlive-latex-threeparttable
4933 texlive-latex-titlesec
4934 texlive-latex-trimspaces
4935 texlive-latex-ucs
4936 texlive-latex-upquote
4937 texlive-latex-url
4938 texlive-latex-varwidth
4939 texlive-latex-wrapfig)))
4940 ("texinfo" ,texinfo)))
4941 (arguments
4942 `(#:phases
4943 (modify-phases %standard-phases
4944 (add-after 'install 'install-doc
4945 (lambda* (#:key inputs outputs #:allow-other-keys)
4946 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4947 (doc (string-append data "/doc/" ,name "-" ,version))
4948 (html (string-append doc "/html"))
4949 (man1 (string-append data "/man/man1"))
4950 (info (string-append data "/info"))
4951 (examples (string-append doc "/examples"))
4952 (python-arg (string-append "PYTHON=" (which "python"))))
4953 (setenv "LANG" "en_US.utf8")
4954 ;; Make installed package available for running the tests
4955 (add-installed-pythonpath inputs outputs)
4956 (with-directory-excursion "docs"
4957 ;; FIXME: pdf fails to build
4958 ;;(system* "make" "pdf" "PAPER=a4")
4959 (system* "make" python-arg "html")
4960 (system* "make" python-arg "info"))
4961 (copy-recursively "docs/man" man1)
4962 (copy-recursively "examples" examples)
4963 (copy-recursively "docs/build/html" html)
4964 ;; (copy-file "docs/build/latex/ipython.pdf"
4965 ;; (string-append doc "/ipython.pdf"))
4966 (mkdir-p info)
4967 (copy-file "docs/build/texinfo/ipython.info"
4968 (string-append info "/ipython.info"))
4969 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
4970 #t))
4971 ;; Tests can only be run after the library has been installed and not
4972 ;; within the source directory.
4973 (delete 'check)
4974 (add-after 'install 'check
4975 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
4976 (if tests?
4977 (begin
4978 ;; Make installed package available for running the tests
4979 (add-installed-pythonpath inputs outputs)
4980 (setenv "HOME" "/tmp/") ;; required by a test
4981 ;; We only test the core because one of the other tests
4982 ;; tries to import ipykernel.
4983 (invoke "python" "IPython/testing/iptest.py"
4984 "-v" "IPython/core/tests"))
4985 #t)))
4986 (add-before 'check 'fix-tests
4987 (lambda* (#:key inputs #:allow-other-keys)
4988 (substitute* "./IPython/utils/_process_posix.py"
4989 (("/usr/bin/env', 'which") (which "which")))
4990 (substitute* "./IPython/core/tests/test_inputtransformer.py"
4991 (("#!/usr/bin/env python")
4992 (string-append "#!" (which "python"))))
4993 ;; Disable 1 failing test
4994 (substitute* "./IPython/core/tests/test_magic.py"
4995 (("def test_dirops\\(\\):" all)
4996 (string-append "@dec.skipif(True)\n" all)))
4997 ;; This test introduces a circular dependency on ipykernel
4998 ;; (which depends on ipython).
4999 (delete-file "IPython/core/tests/test_display.py")
5000 ;; These tests throw errors for unknown reasons.
5001 (delete-file "IPython/extensions/tests/test_storemagic.py")
5002 (delete-file "IPython/core/tests/test_displayhook.py")
5003 (delete-file "IPython/core/tests/test_interactiveshell.py")
5004 (delete-file "IPython/core/tests/test_pylabtools.py")
5005 (delete-file "IPython/core/tests/test_paths.py")
5006 #t)))))
5007 (home-page "https://ipython.org")
5008 (synopsis "IPython is a tool for interactive computing in Python")
5009 (description
5010 "IPython provides a rich architecture for interactive computing with:
5011Powerful interactive shells, a browser-based notebook, support for interactive
5012data visualization, embeddable interpreters and tools for parallel
5013computing.")
5014 (license license:bsd-3)
5015 (properties `((python2-variant . ,(delay python2-ipython))))))
5016
5017(define-public python2-ipython
5018 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
5019 (package
5020 (inherit ipython)
5021 ;; FIXME: add pyreadline once available.
5022 (propagated-inputs
5023 `(("python2-backports-shutil-get-terminal-size"
5024 ,python2-backports-shutil-get-terminal-size)
5025 ("python2-pathlib2" ,python2-pathlib2)
5026 ,@(package-propagated-inputs ipython)))
5027 (native-inputs
5028 `(("python2-mock" ,python2-mock)
5029 ,@(package-native-inputs ipython))))))
5030
5031(define-public python-urwid
5032 (package
5033 (name "python-urwid")
5034 (version "2.0.1")
5035 (source
5036 (origin
5037 (method url-fetch)
5038 (uri (pypi-uri "urwid" version))
5039 (sha256
5040 (base32
5041 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
5042 (build-system python-build-system)
5043 (home-page "http://urwid.org")
5044 (synopsis "Console user interface library for Python")
5045 (description
5046 "Urwid is a curses-based UI/widget library for Python. It includes many
5047features useful for text console applications.")
5048 (license license:lgpl2.1+)))
5049
5050(define-public python2-urwid
5051 (package-with-python2 python-urwid))
5052
5053(define-public python-urwidtrees
5054 (package
5055 (name "python-urwidtrees")
5056 (version "1.0.2")
5057 (source
5058 (origin
5059 (method url-fetch)
5060 ;; package author intends on distributing via github rather than pypi:
5061 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5062 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5063 version ".tar.gz"))
5064 (file-name (string-append name "-" version ".tar.gz"))
5065 (sha256
5066 (base32
5067 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
5068 (build-system python-build-system)
5069 (arguments
5070 '(#:tests? #f)) ; no tests
5071 (propagated-inputs `(("python-urwid" ,python-urwid)))
5072 (home-page "https://github.com/pazz/urwidtrees")
5073 (synopsis "Tree widgets for urwid")
5074 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5075toolkit. Use it to build trees of widgets.")
5076 (license license:gpl3+)))
5077
5078(define-public python2-urwidtrees
5079 (package-with-python2 python-urwidtrees))
5080
5081(define-public python-ua-parser
5082 (package
5083 (name "python-ua-parser")
5084 (version "0.8.0")
5085 (source
5086 (origin
5087 (method url-fetch)
5088 (uri (pypi-uri "ua-parser" version))
5089 (sha256
5090 (base32
5091 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
5092 (build-system python-build-system)
5093 (arguments
5094 `(#:tests? #f)) ;no test suite in release
5095 (native-inputs
5096 `(("python-pyyaml" ,python-pyyaml)))
5097 (home-page "https://github.com/ua-parser/uap-python")
5098 (synopsis "User agent parser")
5099 (description
5100 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
5101 (license license:asl2.0)))
5102
5103(define-public python2-ua-parser
5104 (package-with-python2 python-ua-parser))
5105
5106(define-public python-user-agents
5107 (package
5108 (name "python-user-agents")
5109 (version "1.1.0")
5110 (source
5111 (origin
5112 (method url-fetch)
5113 (uri (pypi-uri "user-agents" version))
5114 (sha256
5115 (base32
5116 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
5117 (build-system python-build-system)
5118 (arguments
5119 `(#:tests? #f)) ;missing devices.json test file in release
5120 (propagated-inputs
5121 `(("python-ua-parser" ,python-ua-parser)))
5122 (home-page "https://github.com/selwin/python-user-agents")
5123 (synopsis "User Agent strings parsing library")
5124 (description
5125 "A library to identify devices (phones, tablets) and their capabilities by
5126parsing (browser/HTTP) user agent strings.")
5127 (license license:expat)))
5128
5129(define-public python2-user-agents
5130 (package-with-python2 python-user-agents))
5131
5132(define-public python-dbus
5133 (package
5134 (name "python-dbus")
5135 (version "1.2.8")
5136 (source
5137 (origin
5138 (method url-fetch)
5139 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
5140 "dbus-python-" version ".tar.gz"))
5141 (sha256
5142 (base32
5143 "0vvvjmiwnc9cjlks3gcdk43ap7llhlpz7cm1wbw0nc2yfsxjpwdb"))))
5144 (build-system gnu-build-system)
5145 (arguments
5146 '(#:phases
5147 (modify-phases %standard-phases
5148 (add-before
5149 'check 'pre-check
5150 (lambda _
5151 ;; XXX: For the missing '/etc/machine-id'.
5152 (substitute* "test/run-test.sh"
5153 (("DBUS_FATAL_WARNINGS=1")
5154 "DBUS_FATAL_WARNINGS=0"))
5155 #t)))))
5156 (native-inputs
5157 `(("pkg-config" ,pkg-config)))
5158 (inputs
5159 `(("python" ,python-wrapper)
5160 ("dbus-glib" ,dbus-glib)))
5161 (synopsis "Python bindings for D-bus")
5162 (description "python-dbus provides bindings for libdbus, the reference
5163implementation of D-Bus.")
5164 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
5165 (license license:expat)))
5166
5167(define-public python2-dbus
5168 (package (inherit python-dbus)
5169 (name "python2-dbus")
5170 (inputs `(("python" ,python-2)
5171 ,@(alist-delete "python"
5172 (package-inputs python-dbus)
5173 equal?)))
5174 ;; FIXME: on Python 2, the test_utf8 fails with:
5175 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5176 (arguments `(#:tests? #f))))
5177
5178(define-public python-lxml
5179 (package
5180 (name "python-lxml")
5181 (version "4.2.5")
5182 (source
5183 (origin
5184 (method url-fetch)
5185 (uri (pypi-uri "lxml" version))
5186 (sha256
5187 (base32
5188 "0zw0y9hs0nflxhl9cs6ipwwh53szi3w2x06wl0k9cylyqac0cwin"))))
5189 (build-system python-build-system)
5190 (inputs
5191 `(("libxml2" ,libxml2)
5192 ("libxslt" ,libxslt)))
5193 (home-page "http://lxml.de/")
5194 (synopsis
5195 "Python XML processing library")
5196 (description
5197 "The lxml XML toolkit is a Pythonic binding for the C libraries
5198libxml2 and libxslt.")
5199 (license license:bsd-3))) ; and a few more, see LICENSES.txt
5200
5201(define-public python2-lxml
5202 (package-with-python2 python-lxml))
5203
5204;; beautifulsoup4 has a totally different namespace than 3.x,
5205;; and pypi seems to put it under its own name, so I guess we should too
5206(define-public python-beautifulsoup4
5207 (package
5208 (name "python-beautifulsoup4")
5209 (version "4.6.3")
5210 (source
5211 (origin
5212 (method url-fetch)
5213 (uri (pypi-uri "beautifulsoup4" version))
5214 (sha256
5215 (base32
5216 "041dhalzjciw6qyzzq7a2k4h1yvyk76xigp35hv5ibnn448ydy4h"))))
5217 (build-system python-build-system)
5218 (arguments
5219 `(#:phases
5220 (modify-phases %standard-phases
5221 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5222 ;; must use this conversion script when building with Python 3. The
5223 ;; conversion script also runs the tests.
5224 ;; For more information, see the file 'convert-py3k' in the source
5225 ;; distribution.
5226 (replace 'check
dff0197e 5227 (lambda _ (invoke "./convert-py3k"))))))
44d10b1f
RW
5228 (home-page
5229 "https://www.crummy.com/software/BeautifulSoup/bs4/")
5230 (synopsis
5231 "Python screen-scraping library")
5232 (description
5233 "Beautiful Soup is a Python library designed for rapidly setting up
5234screen-scraping projects. It offers Pythonic idioms for navigating,
5235searching, and modifying a parse tree, providing a toolkit for
5236dissecting a document and extracting what you need. It automatically
5237converts incoming documents to Unicode and outgoing documents to UTF-8.")
5238 (license license:expat)
5239 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5240
5241(define-public python2-beautifulsoup4
5242 (package
5243 (inherit (package-with-python2
5244 (strip-python2-variant python-beautifulsoup4)))
5245 (arguments `(#:python ,python-2))))
5246
5247(define-public python-netifaces
5248 (package
5249 (name "python-netifaces")
5250 (version "0.10.7")
5251 (source
5252 (origin
5253 (method url-fetch)
5254 (uri (pypi-uri "netifaces" version))
5255 (sha256
5256 (base32
5257 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
5258 (build-system python-build-system)
5259 (home-page "https://github.com/al45tair/netifaces")
5260 (synopsis
5261 "Python module for portable network interface information")
5262 (description
5263 "Netifaces is a Python module providing information on network
5264interfaces in an easy and portable manner.")
5265 (license license:expat)))
5266
5267(define-public python2-netifaces
5268 (package-with-python2 python-netifaces))
5269
5270(define-public python-networkx
5271 (package
5272 (name "python-networkx")
5273 (version "2.2")
5274 (source
5275 (origin
5276 (method url-fetch)
5277 (uri (pypi-uri "networkx" version ".zip"))
5278 (sha256
5279 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
5280 (build-system python-build-system)
5281 ;; python-decorator is needed at runtime.
5282 (propagated-inputs
5283 `(("python-decorator" ,python-decorator)))
5284 (native-inputs
5285 `(("python-nose" ,python-nose)
5286 ("unzip" ,unzip)))
5287 (home-page "https://networkx.github.io/")
5288 (synopsis "Python module for creating and manipulating graphs and networks")
5289 (description
5290 "NetworkX is a Python package for the creation, manipulation, and study
5291of the structure, dynamics, and functions of complex networks.")
5292 (license license:bsd-3)))
5293
5294(define-public python2-networkx
5295 (package-with-python2 python-networkx))
5296
5297(define-public python-datrie
5298 (package
5299 (name "python-datrie")
5300 (version "0.7.1")
5301 (source
5302 (origin
5303 (method url-fetch)
5304 (uri (pypi-uri "datrie" version))
5305 (sha256
5306 (base32
5307 "08r0if7dry2q7p34gf7ffyrlnf4bdvnprxgydlfxgfnvq8f3f4bs"))))
5308 (build-system python-build-system)
5309 (arguments
5310 `(#:phases (modify-phases %standard-phases
5311 (add-before 'build 'cythonize
5312 (lambda _
5313 ;; Regenerate Cython classes to solve ABI issues with Python
5314 ;; 3.7.0. See <https://github.com/pytries/datrie/issues/52>.
5315 (invoke "cython" "src/datrie.pyx" "src/cdatrie.pxd"
5316 "src/stdio_ext.pxd" "-a"))))))
5317 (native-inputs
5318 `(("python-cython" ,python-cython)
5319 ("python-hypothesis" ,python-hypothesis)
5320 ("python-pytest" ,python-pytest)
5321 ("python-pytest-runner" ,python-pytest-runner)))
5322 (home-page "https://github.com/kmike/datrie")
5323 (synopsis "Fast, efficiently stored trie for Python")
5324 (description
5325 "This package provides a fast, efficiently stored trie implementation for
5326Python.")
5327 (license license:lgpl2.1+)))
5328
5329(define-public snakemake
5330 (package
5331 (name "snakemake")
5332 (version "5.2.4")
5333 (source
5334 (origin
5335 (method url-fetch)
5336 (uri (pypi-uri "snakemake" version))
5337 (sha256
5338 (base32 "0gj0xxgiq3mp9qyyrbfzldiaq1giliqw0in64nqiz7vx49myqj7z"))))
5339 (build-system python-build-system)
5340 (arguments
5341 ;; TODO: Package missing test dependencies.
5342 '(#:tests? #f
5343 #:phases
5344 (modify-phases %standard-phases
5345 ;; For cluster execution Snakemake will call Python. Since there is
5346 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
5347 ;; this by calling the snakemake wrapper instead.
5348 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
5349 (lambda* (#:key outputs #:allow-other-keys)
5350 (substitute* "snakemake/executors.py"
5351 (("\\{sys.executable\\} -m snakemake")
5352 (string-append (assoc-ref outputs "out")
5353 "/bin/snakemake")))
5354 #t)))))
5355 (propagated-inputs
5356 `(("python-gitpython" ,python-gitpython)
5357 ("python-wrapt" ,python-wrapt)
5358 ("python-requests" ,python-requests)
5359 ("python-appdirs" ,python-appdirs)
5360 ("python-configargparse" ,python-configargparse)
5361 ("python-datrie" ,python-datrie)
5362 ("python-docutils" ,python-docutils)
5363 ("python-jinja2" ,python-jinja2)
5364 ("python-jsonschema" ,python-jsonschema)
5365 ("python-networkx" ,python-networkx)
5366 ("python-pyyaml" ,python-pyyaml)
5367 ("python-ratelimiter" ,python-ratelimiter)))
5368 (home-page "https://snakemake.readthedocs.io")
5369 (synopsis "Python-based execution environment for make-like workflows")
5370 (description
5371 "Snakemake aims to reduce the complexity of creating workflows by
5372providing a clean and modern domain specific specification language (DSL) in
5373Python style, together with a fast and comfortable execution environment.")
5374 (license license:expat)))
5375
5376;; This is currently needed for the pigx-* packages.
5377(define-public snakemake-4
5378 (package (inherit snakemake)
5379 (version "4.4.0")
5380 (source
5381 (origin
5382 (method url-fetch)
5383 (uri (pypi-uri "snakemake" version))
5384 (sha256
5385 (base32 "0g0paia4z7w3srnqdmavq3hrb2x7qnpf81jx50njl0p7y4y0j8jv"))))
5386 (propagated-inputs
5387 `(("python-wrapt" ,python-wrapt)
5388 ("python-requests" ,python-requests)
5389 ("python-appdirs" ,python-appdirs)
5390 ("python-configargparse" ,python-configargparse)
5391 ("python-pyyaml" ,python-pyyaml)
5392 ("python-ratelimiter" ,python-ratelimiter)))))
5393
5394(define-public python-pyqrcode
5395 (package
5396 (name "python-pyqrcode")
5397 (version "1.2.1")
5398 (source
5399 (origin
5400 (method url-fetch)
5401 (uri (pypi-uri "PyQRCode" version))
5402 (sha256
5403 (base32
5404 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
5405 (build-system python-build-system)
5406 (home-page
5407 "https://github.com/mnooner256/pyqrcode")
5408 (synopsis "QR code generator")
5409 (description
5410 "Pyqrcode is a QR code generator written purely in Python with
5411SVG, EPS, PNG and terminal output.")
5412 (license license:bsd-3)))
5413
5414(define-public python-seaborn
5415 (package
5416 (name "python-seaborn")
5417 (version "0.9.0")
5418 (source
5419 (origin
5420 (method url-fetch)
5421 (uri (pypi-uri "seaborn" version))
5422 (sha256
5423 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))))
5424 (build-system python-build-system)
5425 (arguments
5426 `(#:phases
5427 (modify-phases %standard-phases
5428 (add-before 'check 'start-xserver
5429 (lambda* (#:key inputs #:allow-other-keys)
5430 (let ((xorg-server (assoc-ref inputs "xorg-server")))
5431 ;; There must be a running X server and make check doesn't
5432 ;; start one. Therefore we must do it.
5433 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
5434 (setenv "DISPLAY" ":1")
5435 #t)))
5436 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
5437 (propagated-inputs
5438 `(("python-pandas" ,python-pandas)
5439 ("python-matplotlib" ,python-matplotlib)
5440 ("python-numpy" ,python-numpy)
5441 ("python-scipy" ,python-scipy)))
5442 (native-inputs
5443 `(("python-pytest" ,python-pytest)
5444 ("xorg-server" ,xorg-server)))
5445 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5446 (synopsis "Statistical data visualization")
5447 (description
5448 "Seaborn is a library for making attractive and informative statistical
5449graphics in Python. It is built on top of matplotlib and tightly integrated
5450with the PyData stack, including support for numpy and pandas data structures
5451and statistical routines from scipy and statsmodels.")
5452 (license license:bsd-3)))
5453
5454(define-public python2-seaborn
5455 (package-with-python2 python-seaborn))
5456
5457(define-public python-mpmath
5458 (package
5459 (name "python-mpmath")
5460 (version "0.19")
5461 (source (origin
5462 (method url-fetch)
5463 (uri (string-append "http://mpmath.org/files/mpmath-"
5464 version ".tar.gz"))
5465 (sha256
5466 (base32
5467 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
5468 (build-system python-build-system)
5469 (arguments
5470 '(#:phases
5471 (modify-phases %standard-phases
5472 (replace 'check
5473 (lambda _
5d7a6f1c 5474 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
44d10b1f
RW
5475 (home-page "http://mpmath.org")
5476 (synopsis "Arbitrary-precision floating-point arithmetic in python")
5477 (description
5478 "@code{mpmath} can be used as an arbitrary-precision substitute for
5479Python's float/complex types and math/cmath modules, but also does much
5480more advanced mathematics.")
5481 (license license:bsd-3)))
5482
5483(define-public python2-mpmath
5484 (package-with-python2 python-mpmath))
5485
5486(define-public python-bigfloat
5487 (package
5488 (name "python-bigfloat")
5489 (version "0.3.0")
5490 (source
5491 (origin
5492 (method url-fetch)
5493 (uri (pypi-uri "bigfloat" version))
5494 (sha256
5495 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
5496 (build-system python-build-system)
5497 (inputs
5498 `(("mpfr" ,mpfr)))
5499 (home-page "https://github.com/mdickinson/bigfloat")
5500 (synopsis "Arbitrary precision floating-point arithmetic for Python")
5501 (description
5502 "This packages provides a Python interface to the MPFR library for
5503multiprecision arithmetic.")
5504 (license license:lgpl3+)))
5505
5506(define-public python2-bigfloat
5507 (package-with-python2 python-bigfloat))
5508
5509(define-public python-sympy
5510 (package
5511 (name "python-sympy")
5512 (version "1.1.1")
5513 (source
5514 (origin
5515 (method url-fetch)
5516 (uri (string-append
5517 "https://github.com/sympy/sympy/releases/download/sympy-"
5518 version "/sympy-" version ".tar.gz"))
5519 (sha256
5520 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
5521 (build-system python-build-system)
5522 (arguments
5523 `(#:phases
5524 (modify-phases %standard-phases
5525 ;; Run the core tests after installation. By default it would run
5526 ;; *all* tests, which take a very long time to complete and are known
5527 ;; to be flaky.
5528 (delete 'check)
5529 (add-after 'install 'check
5530 (lambda* (#:key outputs #:allow-other-keys)
5531 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
5532 #t)))))
5533 (propagated-inputs
5534 `(("python-mpmath" ,python-mpmath)))
5535 (home-page "http://www.sympy.org/")
5536 (synopsis "Python library for symbolic mathematics")
5537 (description
5538 "SymPy is a Python library for symbolic mathematics. It aims to become a
5539full-featured computer algebra system (CAS) while keeping the code as simple
5540as possible in order to be comprehensible and easily extensible.")
5541 (license license:bsd-3)))
5542
5543(define-public python2-sympy
5544 (package
5545 (inherit (package-with-python2 python-sympy))
5546 (arguments
5547 `(#:phases
5548 (modify-phases %standard-phases
5549 ;; Run the core tests after installation. By default it would run
5550 ;; *all* tests, which take a very long time to complete and are known
5551 ;; to be flaky.
5552 (delete 'check)
5553 (add-after 'install 'check
5554 (lambda* (#:key outputs #:allow-other-keys)
5555 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
5556 #t)))))))
5557
5558(define-public python-q
5559 (package
5560 (name "python-q")
5561 (version "2.6")
5562 (source
5563 (origin
5564 (method url-fetch)
5565 (uri (pypi-uri "q" version))
5566 (sha256
5567 (base32
5568 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
5569 (build-system python-build-system)
5570 (home-page "https://github.com/zestyping/q")
5571 (synopsis "Quick-and-dirty debugging output for tired programmers")
5572 (description
5573 "q is a Python module for \"print\" style of debugging Python code. It
5574provides convenient short API for print out of values, tracebacks, and
5575falling into the Python interpreter.")
5576 (license license:asl2.0)))
5577
5578(define-public python2-q
5579 (package-with-python2 python-q))
5580
5581(define-public python2-xlib
5582 (package
5583 (name "python2-xlib")
5584 (version "0.14")
5585 (source (origin
5586 (method url-fetch)
5587 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
5588 "/" version "/"
5589 "python-xlib-" version ".tar.gz"))
5590 (sha256
5591 (base32
5592 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
5593 (build-system python-build-system)
5594 (arguments
5595 `(#:python ,python-2 ;Python 2 only
5596 #:tests? #f)) ;no tests
5597 (home-page "http://python-xlib.sourceforge.net/")
5598 (synopsis "Python X11 client library")
5599 (description
5600 "The Python X Library is intended to be a fully functional X client
5601library for Python programs. It is useful to implement low-level X clients.
5602It is written entirely in Python.")
5603 (license license:gpl2+)))
5604
5605(define-public python-singledispatch
5606 (package
5607 (name "python-singledispatch")
5608 (version "3.4.0.3")
5609 (source
5610 (origin
5611 (method url-fetch)
5612 (uri (pypi-uri "singledispatch" version))
5613 (sha256
5614 (base32
5615 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
5616 (build-system python-build-system)
5617 (native-inputs
5618 `(("python-six" ,python-six))) ; required for conversion, not at run-time
5619 (home-page
5620 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
5621 (synopsis "Backport of singledispatch feature from Python 3.4")
5622 (description
5623 "This library brings functools.singledispatch from Python 3.4 to Python
56242.6-3.3.")
5625 (license license:expat)))
5626
5627(define-public python2-singledispatch
5628 (package-with-python2 python-singledispatch))
5629
5630;; the python- version can be removed with python-3.5
5631(define-public python-backports-abc
5632 (package
5633 (name "python-backports-abc")
5634 (version "0.5")
5635 (source
5636 (origin
5637 (method url-fetch)
5638 (uri (pypi-uri "backports_abc" version))
5639 (sha256
5640 (base32
5641 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
5642 (build-system python-build-system)
5643 (home-page "https://github.com/cython/backports_abc")
5644 (synopsis "Backport of additions to the 'collections.abc' module")
5645 (description
5646 "Python-backports-abc provides a backport of additions to the
36a4366d 5647@code{collections.abc} module in Python-3.5.")
44d10b1f
RW
5648 (license license:psfl)))
5649
5650(define-public python2-backports-abc
5651 (package-with-python2 python-backports-abc))
5652
5653(define-public python-backports-csv
5654 (package
5655 (name "python-backports-csv")
5656 (version "1.0.5")
5657 (source
5658 (origin
5659 (method url-fetch)
5660 (uri (pypi-uri "backports.csv" version))
5661 (sha256
5662 (base32
5663 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
5664 (build-system python-build-system)
5665 (home-page "https://github.com/ryanhiebert/backports.csv")
5666 (synopsis "Backport of Python 3's csv module for Python 2")
5667 (description
5668 "Provides a backport of Python 3's @code{csv} module for parsing
5669comma separated values. The API of the @code{csv} module in Python 2
5670is drastically different from the @code{csv} module in Python 3.
5671This is due, for the most part, to the difference between str in
5672Python 2 and Python 3.")
5673 (license license:psfl)))
5674
5675(define-public python2-backports-csv
5676 (package-with-python2 python-backports-csv))
5677
5678(define-public python2-backports-shutil-get-terminal-size
5679 (package
5680 (name "python2-backports-shutil-get-terminal-size")
5681 (version "1.0.0")
5682 (source
5683 (origin
5684 (method url-fetch)
5685 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
5686 (sha256
5687 (base32
5688 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
5689 (build-system python-build-system)
5690 (arguments
5691 `(#:python ,python-2
5692 #:phases
5693 (modify-phases %standard-phases
5694 (replace 'check
5695 (lambda _
4a4a7d9a 5696 (invoke "py.test" "-v"))))))
44d10b1f
RW
5697 (native-inputs
5698 `(("python2-pytest" ,python2-pytest)))
5699 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
5700 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
5701 (description
5702 "This package provides a backport of the @code{get_terminal_size
5703function} from Python 3.3's @code{shutil}.
5704Unlike the original version it is written in pure Python rather than C,
5705so it might be a tiny bit slower.")
5706 (license license:expat)))
5707
5708(define-public python-waf
5709 (package
5710 (name "python-waf")
5711 (version "2.0.11")
5712 (source (origin
5713 (method url-fetch)
5714 (uri (string-append "https://waf.io/"
5715 "waf-" version ".tar.bz2"))
5716 (sha256
5717 (base32
5718 "13zrniwkmfqgsgzi9v5m1367fppp9yzrz6z2ny6hy8dmpb8mj4z4"))))
5719 (build-system python-build-system)
5720 (arguments
5721 '(#:phases
5722 (modify-phases %standard-phases
5723 (replace 'build
5724 (lambda _
5725 (invoke "python" "waf-light" "configure" "build")))
5726 (replace 'check
5727 (lambda _
5728 (invoke "python" "waf" "--version")))
5729 (replace 'install
5730 (lambda* (#:key outputs #:allow-other-keys)
5731 (let ((out (assoc-ref outputs "out")))
5732 (install-file "waf" (string-append out "/bin")))
5733 #t))
5734 ;; waf breaks when it is wrapped.
5735 (delete 'wrap))))
5736 (home-page "https://waf.io/")
5737 (synopsis "Python-based build system")
5738 (description
5739 "Waf is a Python-based framework for configuring, compiling and installing
5740applications.")
5741 (license license:bsd-3)))
5742
5743(define-public python2-waf
5744 (package-with-python2 python-waf))
5745
5746(define-public python-pyzmq
5747 (package
5748 (name "python-pyzmq")
5749 (version "17.1.2")
5750 (source
5751 (origin
5752 (method url-fetch)
5753 (uri (pypi-uri "pyzmq" version))
5754 (sha256
5755 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
5756 (build-system python-build-system)
5757 (arguments
5758 `(#:configure-flags
5759 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
5760 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
5761 ;; --inplace' for 'python setup.py test' to work.
5762 #:tests? #f))
5763 (inputs
5764 `(("zeromq" ,zeromq)))
5765 (native-inputs
5766 `(("pkg-config" ,pkg-config)
5767 ("python-nose" ,python-nose)))
5768 (home-page "https://github.com/zeromq/pyzmq")
5769 (synopsis "Python bindings for 0MQ")
5770 (description
5771 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
5772 (license license:bsd-4)))
5773
5774(define-public python2-pyzmq
5775 (package-with-python2 python-pyzmq))
5776
5777(define-public python-pep8
5778 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
5779 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
5780 ;; some dependents' test suites, and nothing more.
5781 (package
5782 (name "python-pep8")
5783 (version "1.7.0")
5784 (source
5785 (origin
5786 (method url-fetch)
5787 (uri (pypi-uri "pep8" version))
5788 (sha256
5789 (base32
5790 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
5791 (build-system python-build-system)
5792 (home-page "https://pep8.readthedocs.org/")
5793 (synopsis "Python style guide checker")
5794 (description
5795 "This tools checks Python code against some of the style conventions in
5796PEP 8.")
5797 (license license:expat)))
5798
5799(define-public python2-pep8
5800 (package-with-python2 python-pep8))
5801
5802(define-public python-pyflakes
5803 (package
5804 (name "python-pyflakes")
5805 (version "2.0.0")
5806 (source
5807 (origin
5808 (method url-fetch)
5809 (uri (pypi-uri "pyflakes" version))
5810 (sha256
5811 (base32
5812 "0jba28czyvimdc72llms3f17swp3i8jdcabf5w0j00adfbn64xls"))))
5813 (build-system python-build-system)
5814 (home-page
5815 "https://github.com/pyflakes/pyflakes")
5816 (synopsis "Passive checker of Python programs")
5817 (description
5818 "Pyflakes statically checks Python source code for common errors.")
5819 (license license:expat)))
5820
5821(define-public python2-pyflakes
5822 (package-with-python2 python-pyflakes))
5823
5824(define-public python-mccabe
5825 (package
5826 (name "python-mccabe")
5827 (version "0.6.1")
5828 (source
5829 (origin
5830 (method url-fetch)
5831 (uri (pypi-uri "mccabe" version))
5832 (sha256
5833 (base32
5834 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
5835 (build-system python-build-system)
5836 (native-inputs
5837 `(("python-pytest" ,python-pytest-bootstrap)
5838 ("python-pytest-runner" ,python-pytest-runner)))
5839 (home-page "https://github.com/flintwork/mccabe")
5840 (synopsis "McCabe checker, plugin for flake8")
5841 (description
5842 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
5843complexity of Python source code.")
5844 (license license:expat)))
5845
5846(define-public python2-mccabe
5847 (package-with-python2 python-mccabe))
5848
5849(define-public python-mccabe-0.2.1
5850 (package (inherit python-mccabe)
5851 (version "0.2.1")
5852 (source
5853 (origin
5854 (method url-fetch)
5855 (uri (pypi-uri "mccabe" version))
5856 (sha256
5857 (base32
5858 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
5859
5860(define-public python2-mccabe-0.2.1
5861 (package-with-python2 python-mccabe-0.2.1))
5862
5863;; Flake8 2.4.1 requires an older version of pep8.
5864;; This should be removed ASAP.
5865(define-public python-pep8-1.5.7
5866 (package (inherit python-pep8)
5867 (version "1.5.7")
5868 (source
f3576970
RW
5869 (origin
5870 (method url-fetch)
5871 (uri (pypi-uri "pep8" version))
5872 (sha256
5873 (base32
5874 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
44d10b1f
RW
5875 (arguments
5876 ;; XXX Tests not compatible with Python 3.5.
5877 '(#:tests? #f))))
5878
5879(define-public python2-pep8-1.5.7
5880 (package-with-python2 python-pep8-1.5.7))
5881
5882;; Flake8 2.4.1 requires an older version of pyflakes.
5883;; This should be removed ASAP.
5884(define-public python-pyflakes-0.8.1
5885 (package (inherit python-pyflakes)
5886 (version "0.8.1")
5887 (source
8c4dffb5
RW
5888 (origin
5889 (method url-fetch)
5890 (uri (pypi-uri "pyflakes" version))
5891 (sha256
5892 (base32
5893 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
44d10b1f
RW
5894 (arguments
5895 ;; XXX Tests not compatible with Python 3.5.
5896 '(#:tests? #f))))
5897
5898(define-public python2-pyflakes-0.8.1
5899 (package-with-python2 python-pyflakes-0.8.1))
5900
5901;; This package is used by hypothesis which has thousands of dependent packages.
5902;; FIXME: Consolidate this with "python-flake8" below in the next rebuild cycle.
5903(define-public python-flake8-3.5
5904 (package
5905 (name "python-flake8")
5906 (version "3.5.0")
5907 (source
5908 (origin
5909 (method url-fetch)
5910 (uri (pypi-uri "flake8" version))
5911 (sha256
5912 (base32
5913 "184b33grvvjmiwlv9kyd7yng9qv5ld24154j70z332xxg9gjclvj"))))
5914 (build-system python-build-system)
5915 (arguments
5916 `(#:phases
5917 (modify-phases %standard-phases
5918 ;; Two errors don't seem to have assigned codes.
5919 (add-after 'unpack 'delete-broken-test
5920 (lambda _ (delete-file "tests/unit/test_pyflakes_codes.py") #t))
5921 (add-after 'unpack 'fix-problem-with-pycodestyle
5922 (lambda _
5923 ;; See https://gitlab.com/pycqa/flake8/merge_requests/230
5924 ;; This should no longer be needed with the next release.
5925 (substitute* "setup.py"
5926 (("PEP8_PLUGIN\\('break_around_binary_operator'\\),")
5927 "PEP8_PLUGIN('break_after_binary_operator'),\
5928PEP8_PLUGIN('break_before_binary_operator'),"))
5929 #t))
5930 (delete 'check)
5931 (add-after 'install 'check
5932 (lambda* (#:key inputs outputs #:allow-other-keys)
5933 (add-installed-pythonpath inputs outputs)
5934 (invoke "pytest" "-v")
5935 #t)))))
5936 (propagated-inputs
5937 `(("python-pycodestyle" ,python-pycodestyle)
5938 ("python-pyflakes" ,python-pyflakes)
5939 ("python-mccabe" ,python-mccabe)))
5940 (native-inputs
5941 `(("python-mock" ,python-mock)
5942 ("python-pytest" ,python-pytest-bootstrap)
5943 ("python-pytest-runner" ,python-pytest-runner)))
5944 (home-page "https://gitlab.com/pycqa/flake8")
5945 (synopsis
5946 "The modular source code checker: pep8, pyflakes and co")
5947 (description
5948 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
5949 (properties `((python2-variant . ,(delay python2-flake8-3.5))))
5950 (license license:expat)))
5951
5952(define-public python2-flake8-3.5
5953 (let ((base (package-with-python2 (strip-python2-variant python-flake8-3.5))))
5954 (package (inherit base)
5955 (propagated-inputs
5956 `(("python2-configparser" ,python2-configparser)
5957 ("python2-enum34" ,python2-enum34)
5958 ,@(package-propagated-inputs base))))))
5959
5960;; Version 3.5.0 has compatibility issues with Pyflakes 2.0, so we need
5961;; this newer version. Keep it as a separate variable for now to avoid
5962;; rebuilding "python-hypothesis"; this should be removed in the next
5963;; rebuild cycle.
5964(define-public python-flake8
5965 (package
5966 (inherit python-flake8-3.5)
5967 (version "3.6.0")
5968 (source (origin
5969 (method url-fetch)
5970 (uri (pypi-uri "flake8" version))
5971 (sha256
5972 (base32
5973 "0w0nprx22rbvrrkbfx9v5jc5gskbm08g219l7r8wai8zfswgadba"))))
5974 (arguments
5975 (substitute-keyword-arguments (package-arguments python-flake8-3.5)
5976 ((#:phases phases)
5977 `(modify-phases ,phases
5978 (delete 'delete-broken-test)
5979 (delete 'fix-problem-with-pycodestyle)))))
5980 (properties `((python2-variant . ,(delay python2-flake8))))))
5981
5982(define-public python2-flake8
5983 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
5984 (package (inherit base)
5985 (propagated-inputs
5986 (package-propagated-inputs python2-flake8-3.5)))))
5987
5988;; python-hacking requires flake8 <2.6.0.
5989(define-public python-flake8-2.5
5990 (package
5991 (inherit python-flake8)
5992 (version "2.5.5")
5993 (source (origin
5994 (method url-fetch)
5995 (uri (pypi-uri "flake8" version))
5996 (sha256
5997 (base32
5998 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
5999 (propagated-inputs
6000 `(("python-pep8" ,python-pep8)
6001 ,@(package-propagated-inputs python-flake8)))
6002 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
6003
6004(define-public python2-flake8-2.5
6005 (package
6006 (inherit python2-flake8)
6007 (version (package-version python-flake8-2.5))
6008 (source (origin
6009 (inherit (package-source python-flake8-2.5))))
6010 (propagated-inputs
6011 `(("python2-pep8" ,python2-pep8)
6012 ,@(package-propagated-inputs python2-flake8)))))
6013
6014(define-public python-flake8-polyfill
6015 (package
6016 (name "python-flake8-polyfill")
6017 (version "1.0.2")
6018 (source
6019 (origin
6020 (method url-fetch)
6021 (uri (pypi-uri "flake8-polyfill" version))
6022 (sha256
6023 (base32
6024 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
6025 (build-system python-build-system)
6026 (arguments
6027 '(#:phases
6028 (modify-phases %standard-phases
6029 (replace 'check
6030 (lambda _
6031 (setenv "PYTHONPATH"
6032 (string-append (getcwd) "/build/lib:"
6033 (getenv "PYTHONPATH")))
4f0a0894 6034 (invoke "py.test" "-v"))))))
44d10b1f
RW
6035 (native-inputs
6036 `(("python-flake8" ,python-flake8)
6037 ("python-mock" ,python-mock)
6038 ("python-pep8" ,python-pep8)
6039 ("python-pycodestyle" ,python-pycodestyle)
6040 ("python-pytest" ,python-pytest)))
6041 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6042 (synopsis "Polyfill package for Flake8 plugins")
6043 (description
6044 "This package that provides some compatibility helpers for Flake8
6045plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6046 (license license:expat)))
6047
6048(define-public python2-flake8-polyfill
6049 (package-with-python2 python-flake8-polyfill))
6050
6051(define-public python-mistune
6052 (package
6053 (name "python-mistune")
6054 (version "0.8.4")
6055 (source
6056 (origin
6057 (method url-fetch)
6058 (uri (pypi-uri "mistune" version))
6059 (sha256
6060 (base32
6061 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
6062 (build-system python-build-system)
6063 (native-inputs
6064 `(("python-nose" ,python-nose)
6065 ("python-cython" ,python-cython)))
6066 (home-page "https://github.com/lepture/mistune")
6067 (synopsis "Markdown parser in pure Python")
6068 (description "This package provides a fast markdown parser in pure
6069Python.")
6070 (license license:bsd-3)))
6071
6072(define-public python2-mistune
6073 (package-with-python2 python-mistune))
6074
6075(define-public python-markdown
6076 (package
6077 (name "python-markdown")
1e3c7119 6078 (version "3.1")
44d10b1f
RW
6079 (source
6080 (origin
6081 (method url-fetch)
6082 (uri (pypi-uri "Markdown" version))
6083 (sha256
6084 (base32
1e3c7119 6085 "0l62x154r9mgdvfap06gf0nkrmjd7xixlfshsxcdif2nlrlnyjpw"))))
44d10b1f
RW
6086 (build-system python-build-system)
6087 (native-inputs
6088 `(("python-nose" ,python-nose)
6089 ("python-pyyaml" ,python-pyyaml)))
6090 (home-page "https://python-markdown.github.io/")
6091 (synopsis "Python implementation of Markdown")
6092 (description
6093 "This package provides a Python implementation of John Gruber's
6094Markdown. The library features international input, various Markdown
6095extensions, and several HTML output formats. A command line wrapper
6096markdown_py is also provided to convert Markdown files to HTML.")
6097 (license license:bsd-3)))
6098
6099(define-public python2-markdown
6100 (package-with-python2 python-markdown))
6101
6102(define-public python-ptyprocess
6103 (package
6104 (name "python-ptyprocess")
6105 (version "0.5.2")
6106 (source
6107 (origin
6108 (method url-fetch)
6109 (uri (pypi-uri "ptyprocess" version))
6110 (sha256
6111 (base32
6112 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
6113 (build-system python-build-system)
6114 (native-inputs
6115 `(("python-nose" ,python-nose)))
6116 (arguments
6117 `(#:phases
6118 (modify-phases %standard-phases
6119 (replace 'check
7904d6fa 6120 (lambda _ (invoke "nosetests"))))))
44d10b1f
RW
6121 (home-page "https://github.com/pexpect/ptyprocess")
6122 (synopsis "Run a subprocess in a pseudo terminal")
6123 (description
6124 "This package provides a Python library used to launch a subprocess in a
6125pseudo terminal (pty), and interact with both the process and its pty.")
6126 (license license:isc)))
6127
6128(define-public python2-ptyprocess
6129 (package-with-python2 python-ptyprocess))
6130
6131(define-public python-cram
6132 (package
6133 (name "python-cram")
6134 (version "0.7")
6135 (home-page "https://bitheap.org/cram/")
6136 (source (origin
6137 (method url-fetch)
6138 (uri (list (string-append home-page "cram-"
6139 version ".tar.gz")
6140 (pypi-uri "cram" version)))
6141 (sha256
6142 (base32
6143 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6144 (arguments
6145 '(#:phases
6146 (modify-phases %standard-phases
6147 (add-after 'unpack 'patch-source
6148 (lambda _
6149 (substitute* (find-files "cram" ".*\\.py$")
6150 ;; Replace default shell path.
6151 (("/bin/sh") (which "sh")))
6152 (substitute* (find-files "tests" ".*\\.t$")
6153 (("md5") "md5sum")
6154 (("/bin/bash") (which "bash"))
6155 (("/bin/sh") (which "sh")))
6156 (substitute* "cram/_test.py"
6157 ;; This hack works around a bug triggered by substituting
6158 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6159 ;; "cram -h", which breaks the output at 80 characters. This
6160 ;; causes the line showing the default shell to break into two
6161 ;; lines, but the test expects a single line...
6162 (("env\\['COLUMNS'\\] = '80'")
6163 "env['COLUMNS'] = '160'"))
6164 #t))
6165 (delete 'check)
6166 (add-after 'install 'check
6167 ;; The test phase uses the built library and executable.
6168 ;; It's easier to run it after install since the build
6169 ;; directory contains version-specific PATH.
6170 (lambda* (#:key inputs outputs #:allow-other-keys)
6171 (add-installed-pythonpath inputs outputs)
6172 (setenv "PATH" (string-append (getenv "PATH") ":"
6173 (assoc-ref outputs "out") "/bin"))
2d7db192 6174 (invoke "make" "test"))))))
44d10b1f
RW
6175 (build-system python-build-system)
6176 (native-inputs
6177 `(("python-coverage" ,python-coverage)
6178 ("which" ,which)))
6179 (synopsis "Simple testing framework for command line applications")
6180 (description
6181 "Cram is a functional testing framework for command line applications.
6182Cram tests look like snippets of interactive shell sessions. Cram runs each
6183command and compares the command output in the test with the command’s actual
6184output.")
6185 (license license:gpl2+)))
6186
6187(define-public python2-cram
6188 (package-with-python2 python-cram))
6189
6190(define-public python-straight-plugin
6191 (package
6192 (name "python-straight-plugin")
6193 (version "1.4.1")
6194 (source
6195 (origin
6196 (method url-fetch)
6197 (uri (pypi-uri "straight.plugin" version))
6198 (sha256
6199 (base32
6200 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6201 (build-system python-build-system)
6202 (home-page "https://github.com/ironfroggy/straight.plugin")
6203 (synopsis "Simple namespaced plugin facility")
6204 (description "Straight Plugin provides a type of plugin you can create from
6205almost any existing Python modules, and an easy way for outside developers to
6206add functionality and customization to your projects with their own plugins.")
6207 (license license:expat)))
6208
6209(define-public python2-straight-plugin
6210 (package-with-python2 python-straight-plugin))
6211
6212(define-public python-fonttools
6213 (package
6214 (name "python-fonttools")
6215 (version "3.28.0")
6216 (source (origin
6217 (method url-fetch)
6218 (uri (pypi-uri "fonttools" version ".zip"))
6219 (sha256
6220 (base32
6221 "0vsvjhidpb5kywpjgz1j3fywzkddxkb0afqai18qa3h6lqjyxwpb"))))
6222 (build-system python-build-system)
6223 (native-inputs
6224 `(("unzip" ,unzip)
6225 ("python-pytest" ,python-pytest)
6226 ("python-pytest-runner" ,python-pytest-runner)))
6227 (home-page "https://github.com/behdad/fonttools")
6228 (synopsis "Tools to manipulate font files")
6229 (description
6230 "FontTools/TTX is a library to manipulate font files from Python. It
6231supports reading and writing of TrueType/OpenType fonts, reading and writing
6232of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6233also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6234from an XML-based format.")
6235 (license license:expat)))
6236
6237(define-public python2-fonttools
6238 (package-with-python2 python-fonttools))
6239
6240(define-public python-ly
6241 (package
6242 (name "python-ly")
6243 (version "0.9.5")
6244 (source
6245 (origin
6246 (method url-fetch)
6247 (uri (pypi-uri name version))
6248 (sha256
6249 (base32
6250 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
6251 (build-system python-build-system)
6252 (arguments
6253 ;; FIXME: Some tests need network access.
6254 '(#:tests? #f))
6255 (synopsis "Tool and library for manipulating LilyPond files")
6256 (description "This package provides a Python library to parse, manipulate
6257or create documents in LilyPond format. A command line program ly is also
6258provided that can be used to do various manipulations with LilyPond files.")
6259 (home-page "https://pypi.python.org/pypi/python-ly")
6260 (license license:gpl2+)))
6261
6262(define-public python-appdirs
6263 (package
6264 (name "python-appdirs")
6265 (version "1.4.3")
6266 (source
6267 (origin
6268 (method url-fetch)
6269 (uri (pypi-uri "appdirs" version))
6270 (sha256
6271 (base32
6272 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
6273 (build-system python-build-system)
6274 (home-page "https://github.com/ActiveState/appdirs")
6275 (synopsis
6276 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6277 (description
6278 "This module provides a portable way of finding out where user data
6279should be stored on various operating systems.")
6280 (license license:expat)))
6281
6282(define-public python2-appdirs
6283 (package-with-python2 python-appdirs))
6284
6285(define-public python-llfuse
6286 (package
6287 (name "python-llfuse")
6288 (version "1.3.5")
6289 (source (origin
6290 (method url-fetch)
6291 (uri (pypi-uri "llfuse" version ".tar.bz2"))
6292 (sha256
6293 (base32
6294 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
6295 (build-system python-build-system)
6296 (inputs
6297 `(("fuse" ,fuse)
6298 ("attr" ,attr)))
6299 (native-inputs
6300 `(("pkg-config" ,pkg-config)))
6301 (synopsis "Python bindings for FUSE")
6302 (description
6303 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6304 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
6305 (license license:lgpl2.0+)
6306 (properties `((python2-variant . ,(delay python2-llfuse))))))
6307
6308(define-public python2-llfuse
6309 (package (inherit (package-with-python2
6310 (strip-python2-variant python-llfuse)))
6311 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6312
6313;; For attic-0.16
6314(define-public python-llfuse-0.41
6315 (package (inherit python-llfuse)
6316 (version "0.41.1")
6317 (source (origin
6318 (method url-fetch)
6319 (uri (string-append
6320 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6321 "llfuse-" version ".tar.bz2"))
6322 (sha256
6323 (base32
6324 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
6325 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6326 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
6327 (license (list license:expat license:lgpl2.0+))))
6328
6329(define-public python-msgpack
6330 (package
6331 (name "python-msgpack")
6332 (version "0.5.6")
6333 (source (origin
6334 (method url-fetch)
6335 (uri (pypi-uri "msgpack" version))
6336 (sha256
6337 (base32
6338 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
6339 (build-system python-build-system)
6340 (arguments
6341 `(#:modules ((guix build utils)
6342 (guix build python-build-system)
6343 (ice-9 ftw)
6344 (srfi srfi-1)
6345 (srfi srfi-26))
6346 #:phases
6347 (modify-phases %standard-phases
6348 (replace 'check
6349 (lambda _
6350 (let ((cwd (getcwd)))
6351 (setenv "PYTHONPATH"
6352 (string-append cwd "/build/"
6353 (find (cut string-prefix? "lib" <>)
6354 (scandir (string-append cwd "/build")))
6355 ":"
6356 (getenv "PYTHONPATH")))
6357 (invoke "pytest" "-v" "test")))))))
6358 (native-inputs
6359 `(("python-pytest" ,python-pytest)))
6360 (synopsis "MessagePack (de)serializer")
6361 (description "MessagePack is a fast, compact binary serialization format,
6362suitable for similar data to JSON. This package provides CPython bindings for
6363reading and writing MessagePack data.")
6364 (home-page "https://pypi.python.org/pypi/msgpack/")
6365 (license license:asl2.0)))
6366
6367;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
6368;; release 0.5. Some packages like borg still call it by the old name for now.
6369;; <https://bugs.gnu.org/30662>
6370(define-public python-msgpack-transitional
6371 (package
6372 (inherit python-msgpack)
6373 (name "python-msgpack-transitional")
6374 (arguments
6375 (substitute-keyword-arguments (package-arguments python-msgpack)
6376 ((#:phases phases)
6377 `(modify-phases ,phases
6378 (add-after 'unpack 'configure-transitional
6379 (lambda _
6380 ;; Keep using the old name.
6381 (substitute* "setup.py"
6382 (("TRANSITIONAL = False")
6383 "TRANSITIONAL = 1"))
6384 #t))))))))
6385
6386(define-public python2-msgpack
6387 (package-with-python2 python-msgpack))
6388
6389(define-public python-netaddr
6390 (package
6391 (name "python-netaddr")
6392 (version "0.7.19")
6393 (source
6394 (origin
6395 (method url-fetch)
6396 (uri (pypi-uri "netaddr" version))
6397 (sha256
6398 (base32
6399 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
6400 (build-system python-build-system)
6401 (arguments `(#:tests? #f)) ;; No tests.
6402 (home-page "https://github.com/drkjam/netaddr/")
6403 (synopsis "Pythonic manipulation of network addresses")
6404 (description
6405 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6406and MAC network addresses.")
6407 (license license:bsd-3)))
6408
6409(define-public python2-netaddr
6410 (package-with-python2 python-netaddr))
6411
6412(define-public python-wrapt
6413 (package
6414 (name "python-wrapt")
dddd7a75 6415 (version "1.11.1")
44d10b1f
RW
6416 (source
6417 (origin
6418 (method url-fetch)
6419 (uri (pypi-uri "wrapt" version))
6420 (sha256
6421 (base32
dddd7a75 6422 "0cqmysny1pz01jw26q48q5zasvns6507rwhgm6wcw743f0r01sja"))))
44d10b1f
RW
6423 (build-system python-build-system)
6424 (arguments
6425 ;; Tests are not included in the tarball, they are only available in the
6426 ;; git repository.
6427 `(#:tests? #f))
6428 (home-page "https://github.com/GrahamDumpleton/wrapt")
6429 (synopsis "Module for decorators, wrappers and monkey patching")
6430 (description
6431 "The aim of the wrapt module is to provide a transparent object proxy for
6432 Python, which can be used as the basis for the construction of function
6433 wrappers and decorator functions.")
6434 (license license:bsd-2)))
6435
6436(define-public python2-wrapt
6437 (package-with-python2 python-wrapt))
6438
6439(define-public python-xlrd
6440 (package
6441 (name "python-xlrd")
6442 (version "1.0.0")
6443 (source (origin
6444 (method url-fetch)
6445 (uri (pypi-uri "xlrd" version))
6446 (sha256
6447 (base32
6448 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
6449 (build-system python-build-system)
6450 (arguments
6451 `(#:phases
6452 (modify-phases %standard-phases
6453 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
6454 ;; run tests instead for now.
45fd0081 6455 (replace 'check (lambda _ (invoke "nosetests"))))))
44d10b1f
RW
6456 (native-inputs `(("python-nose" ,python-nose)))
6457 (home-page "http://www.python-excel.org/")
6458 (synopsis "Library for extracting data from Excel files")
6459 (description "This packages provides a library to extract data from
6460spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
6461@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
6462Unicode-aware. It is not intended as an end-user tool.")
6463 (license license:bsd-3)))
6464
6465(define-public python2-xlrd
6466 (package-with-python2 python-xlrd))
6467
6468(define-public python-prettytable
6469 (package
6470 (name "python-prettytable")
6471 (version "0.7.2")
6472 (source
6473 (origin
6474 (method url-fetch)
337c3a1e 6475 (uri (pypi-uri "prettytable" version ".tar.bz2"))
44d10b1f
RW
6476 (sha256
6477 (base32
6478 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
6479 (build-system python-build-system)
6480 (home-page "http://code.google.com/p/prettytable/")
6481 (synopsis "Display tabular data in an ASCII table format")
6482 (description
6483 "A library designed to represent tabular data in visually appealing ASCII
6484tables. PrettyTable allows for selection of which columns are to be printed,
6485independent alignment of columns (left or right justified or centred) and
6486printing of sub-tables by specifying a row range.")
6487 (license license:bsd-3)))
6488
6489(define-public python2-prettytable
6490 (package-with-python2 python-prettytable))
6491
6492(define-public python-tables
6493 (package
6494 (name "python-tables")
6495 (version "3.4.4")
6496 (source
6497 (origin
6498 (method url-fetch)
6499 (uri (pypi-uri "tables" version))
6500 (sha256
6501 (base32
6502 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
6503 (modules '((guix build utils)))
6504 (snippet
6505 '(begin
6506 ;; Remove pre-compiled .pyc files from source.
6507 (for-each delete-file-recursively
6508 (find-files "." "__pycache__" #:directories? #t))
6509 (for-each delete-file (find-files "." "\\.pyc$"))
6510 #t))))
6511 (build-system python-build-system)
6512 (arguments
6513 `(;; FIXME: python-build-system does not pass configure-flags to "build"
6514 ;; or "check", so we must override the build and check phases.
6515 #:phases
6516 (modify-phases %standard-phases
6517 (add-after 'unpack 'use-gcc
6518 (lambda _
6519 (substitute* "setup.py"
6520 (("compiler = new_compiler\\(\\)" line)
6521 (string-append line
6522 "\ncompiler.set_executables(compiler='gcc',"
6523 "compiler_so='gcc',"
6524 "linker_exe='gcc',"
6525 "linker_so='gcc -shared')")))
6526 #t))
6527 (replace 'build
6528 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
6529 (invoke "python" "setup.py" "build"
6530 (string-append "--hdf5="
6531 (assoc-ref inputs "hdf5")))))
44d10b1f
RW
6532 (replace 'check
6533 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
6534 (invoke "python" "setup.py" "check"
6535 (string-append "--hdf5="
6536 (assoc-ref inputs "hdf5"))))))))
44d10b1f
RW
6537 (propagated-inputs
6538 `(("python-numexpr" ,python-numexpr)
6539 ("python-numpy" ,python-numpy)))
6540 (native-inputs
6541 `(("python-cython" ,python-cython)
6542 ("pkg-config" ,pkg-config)))
6543 (inputs
6544 `(("hdf5" ,hdf5)
6545 ("bzip2" ,bzip2)
6546 ("zlib" ,zlib)))
6547 (home-page "http://www.pytables.org/")
6548 (synopsis "Hierarchical datasets for Python")
6549 (description "PyTables is a package for managing hierarchical datasets and
6550designed to efficiently cope with extremely large amounts of data.")
6551 (license license:bsd-3)))
6552
6553(define-public python2-tables
6554 (package-with-python2 python-tables))
6555
6556(define-public python-pyasn1
6557 (package
6558 (name "python-pyasn1")
6559 (version "0.4.3")
6560 (source
6561 (origin
6562 (method url-fetch)
6563 (uri (pypi-uri "pyasn1" version))
6564 (sha256
6565 (base32
6566 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
6567 (build-system python-build-system)
6568 (home-page "http://pyasn1.sourceforge.net/")
6569 (synopsis "ASN.1 types and codecs")
6570 (description
6571 "This is an implementation of ASN.1 types and codecs in Python. It is
6572suitable for a wide range of protocols based on the ASN.1 specification.")
6573 (license license:bsd-2)))
6574
6575(define-public python2-pyasn1
6576 (package-with-python2 python-pyasn1))
6577
6578(define-public python-pyasn1-modules
6579 (package
6580 (name "python-pyasn1-modules")
6581 (version "0.2.2")
6582 (source
6583 (origin
6584 (method url-fetch)
6585 (uri (pypi-uri "pyasn1-modules" version))
6586 (sha256
6587 (base32
6588 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
6589 (build-system python-build-system)
6590 (propagated-inputs
6591 `(("python-pyasn1" ,python-pyasn1)))
6592 (home-page "https://sourceforge.net/projects/pyasn1/")
6593 (synopsis "ASN.1 codec implementations")
6594 (description
6595 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
6596implementations of ASN.1-based codecs and protocols.")
6597 (license license:bsd-3)))
6598
6599(define-public python2-pyasn1-modules
6600 (package-with-python2 python-pyasn1-modules))
6601
6602(define-public python-ipaddress
6603 (package
6604 (name "python-ipaddress")
6605 (version "1.0.22")
6606 (source (origin
6607 (method url-fetch)
6608 (uri (pypi-uri "ipaddress" version))
6609 (sha256
6610 (base32
6611 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
6612 (build-system python-build-system)
6613 (home-page "https://github.com/phihag/ipaddress")
6614 (synopsis "IP address manipulation library")
6615 (description
6616 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
6617 in Python. This library is used to create, poke at, and manipulate IPv4 and
6618 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
6619 module to older versions of Python.")
6620 (license license:psfl)))
6621
6622(define-public python2-ipaddress
6623 (package-with-python2 python-ipaddress))
6624
6625(define-public python2-ipaddr
6626 (package
6627 (name "python2-ipaddr")
6628 (version "2.1.11")
6629 (source
6630 (origin
6631 (method url-fetch)
6632 (uri (pypi-uri "ipaddr" version))
6633 (sha256
6634 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
6635 (build-system python-build-system)
6636 (arguments
6637 `(#:python ,python-2 ;version 2 only
6638 #:phases
6639 (modify-phases %standard-phases
6640 (replace 'check
40b8c4e3 6641 (lambda _ (invoke "python" "ipaddr_test.py"))))))
44d10b1f
RW
6642 (home-page "https://github.com/google/ipaddr-py")
6643 (synopsis "IP address manipulation library")
6644 (description
6645 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
6646IPv6 addresses and networks.
6647
6648For new implementations you may prefer to use the standard module
6649@code{ipaddress}, which was introduced in Python 3.3 and backported to older
6650versions of Python.")
6651 (license license:asl2.0)))
6652
6653(define-public python-idna
6654 (package
6655 (name "python-idna")
6656 (version "2.7")
6657 (source
6658 (origin
6659 (method url-fetch)
6660 (uri (pypi-uri "idna" version))
6661 (sha256
6662 (base32
6663 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))
6664 (build-system python-build-system)
6665 (home-page "https://github.com/kjd/idna")
6666 (synopsis "Internationalized domain names in applications")
6667 (description
6668 "This is a library to support the Internationalised Domain Names in
6669Applications (IDNA) protocol as specified in RFC 5891. This version of the
6670protocol is often referred to as “IDNA2008” and can produce different results
6671from the earlier standard from 2003. The library is also intended to act as a
6672suitable drop-in replacement for the “encodings.idna” module that comes with
6673the Python standard library but currently only supports the older 2003
6674specification.")
6675 (license license:bsd-4)))
6676
6677(define-public python2-idna
6678 (package-with-python2 python-idna))
6679
6680(define-public python-idna-ssl
6681 (package
6682 (name "python-idna-ssl")
6683 (version "1.0.1")
6684 (source
6685 (origin
6686 (method url-fetch)
6687 (uri (pypi-uri "idna-ssl" version))
6688 (sha256
6689 (base32
6690 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
6691 (build-system python-build-system)
6692 (arguments
6693 `(#:tests? #f)) ;circular dependency with python-aiohttp
6694 (home-page "https://github.com/aio-libs/idna-ssl")
6695 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
6696 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
6697domains support.")
6698 (license license:expat)))
6699
6700(define-public python-pretend
6701 (package
6702 (name "python-pretend")
6703 (version "1.0.9")
6704 (source
6705 (origin
6706 (method url-fetch)
9f1f22ee 6707 (uri (pypi-uri "pretend" version))
44d10b1f
RW
6708 (sha256
6709 (base32
6710 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
6711 (build-system python-build-system)
6712 (home-page "https://github.com/alex/pretend")
6713 (synopsis "Library for stubbing in Python")
6714 (description
6715 "Pretend is a library to make stubbing with Python easier. Stubbing is a
6716technique for writing tests. You may hear the term mixed up with mocks,
6717fakes, or doubles. Basically, a stub is an object that returns pre-canned
6718responses, rather than doing any computation.")
6719 (license license:bsd-3)))
6720
6721(define-public python2-pretend
6722 (package-with-python2 python-pretend))
6723
6724(define-public python-pip
6725 (package
6726 (name "python-pip")
6727 (version "18.1")
6728 (source
6729 (origin
6730 (method url-fetch)
6731 (uri (pypi-uri "pip" version))
6732 (sha256
6733 (base32
6734 "188fclay154s520n43s7cxxlhdaiysvxf19zk8vr1xbyjyyr58n0"))))
6735 (build-system python-build-system)
6736 (arguments
6737 '(#:tests? #f)) ; there are no tests in the pypi archive.
6738 (home-page "https://pip.pypa.io/")
6739 (synopsis "Package manager for Python software")
6740 (description
6741 "Pip is a package manager for Python software, that finds packages on the
6742Python Package Index (PyPI).")
6743 (license license:expat)))
6744
6745(define-public python2-pip
6746 (package-with-python2 python-pip))
6747
6748(define-public python-tlsh
6749 (package
6750 (name "python-tlsh")
6751 (version "3.4.5")
6752 (home-page "https://github.com/trendmicro/tlsh")
3e3ff8ad
TGR
6753 (source
6754 (origin
6755 (method git-fetch)
6756 (uri (git-reference
6757 (url "https://github.com/trendmicro/tlsh.git")
6758 (commit (string-append "v" version))))
6759 (file-name (git-file-name name version))
6760 (sha256
6761 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
44d10b1f
RW
6762 (build-system cmake-build-system)
6763 (arguments
6764 '(#:out-of-source? #f
6765 #:phases (modify-phases %standard-phases
6766 (replace
6767 'install
6768 (lambda* (#:key outputs #:allow-other-keys)
6769 ;; Build and install the Python bindings. The underlying
6770 ;; C++ library is apparently not meant to be installed.
6771 (let ((out (assoc-ref outputs "out")))
6772 (with-directory-excursion "py_ext"
6773 (and (system* "python" "setup.py" "build")
6774 (system* "python" "setup.py" "install"
6775 (string-append "--prefix=" out))))))))))
6776 (inputs `(("python" ,python-wrapper))) ;for the bindings
6777 (synopsis "Fuzzy matching library for Python")
6778 (description
6779 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
6780Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
6781value which can be used for similarity comparisons. Similar objects have
6782similar hash values, which allows for the detection of similar objects by
6783comparing their hash values. The byte stream should have a sufficient amount
6784of complexity; for example, a byte stream of identical bytes will not generate
6785a hash value.")
6786 (license license:asl2.0)))
6787
6788(define-public python2-tlsh
6789 (package
6790 (inherit python-tlsh)
6791 (name "python2-tlsh")
6792 (inputs `(("python" ,python-2)))))
6793
6794(define-public python-termcolor
6795 (package
6796 (name "python-termcolor")
6797 (version "1.1.0")
6798 (source
6799 (origin
6800 (method url-fetch)
6801 (uri (pypi-uri "termcolor" version))
6802 (sha256
6803 (base32
6804 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
6805 (build-system python-build-system)
6806 (arguments
6807 ;; There are no tests.
6808 `(#:tests? #f))
6809 (home-page "https://pypi.python.org/pypi/termcolor")
6810 (synopsis "ANSII Color formatting for terminal output")
6811 (description
6812 "This package provides ANSII Color formatting for output in terminals.")
6813 (license license:expat)))
6814
6815(define-public python2-termcolor
6816 (package-with-python2 python-termcolor))
6817
6818(define-public python-libarchive-c
6819 (package
6820 (name "python-libarchive-c")
6821 (version "2.8")
6822 (source (origin
6823 (method url-fetch)
6824 (uri (pypi-uri "libarchive-c" version))
6825 (sha256
6826 (base32
6827 "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06"))))
6828 (build-system python-build-system)
6829 (arguments
6830 '(#:phases (modify-phases %standard-phases
6831 (add-before
6832 'build 'reference-libarchive
6833 (lambda* (#:key inputs #:allow-other-keys)
6834 ;; Retain the absolute file name of libarchive.so.
6835 (let ((libarchive (assoc-ref inputs "libarchive")))
6836 (substitute* "libarchive/ffi.py"
6837 (("find_library\\('archive'\\)")
6838 (string-append "'" libarchive
6839 "/lib/libarchive.so'"))))))
6840 (replace 'check
6841 (lambda _ (invoke "pytest" "-vv"))))))
6842 (native-inputs
6843 `(("python-mock" ,python-mock)
6844 ("python-pytest" ,python-pytest)))
6845 (inputs
6846 `(("libarchive" ,libarchive)))
6847 (home-page "https://github.com/Changaco/python-libarchive-c")
6848 (synopsis "Python interface to libarchive")
6849 (description
6850 "This package provides Python bindings to libarchive, a C library to
6851access possibly compressed archives in many different formats. It uses
6852Python's @code{ctypes} foreign function interface (FFI).")
6853 (license license:lgpl2.0+)))
6854
6855(define-public python2-libarchive-c
6856 (package-with-python2 python-libarchive-c))
6857
6858(define-public python-file
6859 (package
6860 (inherit file)
6861 (name "python-file")
6862 (build-system python-build-system)
6863 (arguments
6864 '(#:tests? #f ;no tests
6865 #:configure-flags '("--single-version-externally-managed" "--root=/")
6866 #:phases (modify-phases %standard-phases
6867 (add-before 'build 'change-directory
6868 (lambda _
6869 (chdir "python")
6870 #t))
6871 (add-before 'build 'set-library-file-name
6872 (lambda* (#:key inputs #:allow-other-keys)
6873 (let ((file (assoc-ref inputs "file")))
6874 (substitute* "magic.py"
6875 (("find_library\\('magic'\\)")
6876 (string-append "'" file "/lib/libmagic.so'")))
6877 #t))))))
6878 (inputs `(("file" ,file)))
528ea990
LC
6879 (native-inputs (if (%current-target-system)
6880 `(("self" ,this-package))
6881 '()))
44d10b1f
RW
6882 (synopsis "Python bindings to the libmagic file type guesser. Note that
6883this module and the python-magic module both provide a \"magic.py\" file;
6884these two modules, which are different and were developed separately, both
6885serve the same purpose: provide Python bindings for libmagic.")))
6886
6887(define-public python2-file
6888 (package-with-python2 python-file))
6889
6890(define-public python-debian
6891 (package
6892 (name "python-debian")
6893 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
6894 (version "0.1.28")
6895 (source
6896 (origin
6897 (method url-fetch)
6898 (uri (pypi-uri name version))
6899 (sha256
6900 (base32
6901 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
6902 (build-system python-build-system)
6903 (propagated-inputs
6904 `(("python-six" ,python-six)))
6905 (synopsis "Debian package related modules")
6906 (description
6907 ;; XXX: Use @enumerate instead of @itemize to work around
6908 ;; <http://bugs.gnu.org/21772>.
6909 "This package provides Python modules that abstract many formats of
6910Debian-related files, such as:
6911
6912@enumerate
6913@item Debtags information;
6914@item @file{debian/changelog} files;
6915@item packages files, pdiffs;
6916@item control files of single or multiple RFC822-style paragraphs---e.g.
6917 @file{debian/control}, @file{.changes}, @file{.dsc};
6918@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
6919 contained files and meta-information.
6920@end enumerate\n")
6921
6922 ;; Modules are either GPLv2+ or GPLv3+.
6923 (license license:gpl3+)))
6924
6925(define-public python2-debian
6926 (package-with-python2 python-debian))
6927
6928(define-public python-nbformat
6929 (package
6930 (name "python-nbformat")
6931 (version "4.4.0")
6932 (source
6933 (origin
6934 (method url-fetch)
6935 (uri (pypi-uri "nbformat" version))
6936 (sha256
6937 (base32
6938 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
6939 (build-system python-build-system)
6940 (arguments `(#:tests? #f)) ; no test target
6941 (propagated-inputs
6942 `(("python-ipython-genutils" ,python-ipython-genutils)
6943 ("python-jsonschema" ,python-jsonschema)
6944 ("python-jupyter-core" ,python-jupyter-core)
6945 ("python-traitlets" ,python-traitlets)))
6946 (home-page "http://jupyter.org")
6947 (synopsis "Jupyter Notebook format")
6948 (description "This package provides the reference implementation of the
6949Jupyter Notebook format and Python APIs for working with notebooks.")
6950 (license license:bsd-3)))
6951
6952(define-public python2-nbformat
6953 (package-with-python2 python-nbformat))
6954
6955(define-public python-bleach
6956 (package
6957 (name "python-bleach")
6958 (version "1.4.3")
6959 (source
6960 (origin
6961 (method url-fetch)
6962 (uri (pypi-uri "bleach" version))
6963 (sha256
6964 (base32
6965 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
6966 (build-system python-build-system)
6967 (propagated-inputs
6968 `(("python-html5lib" ,python-html5lib-0.9)
6969 ("python-six" ,python-six)))
6970 (native-inputs
6971 `(("python-nose" ,python-nose)))
6972 (home-page "https://github.com/jsocol/bleach")
6973 (synopsis "Whitelist-based HTML-sanitizing tool")
6974 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
6975 (license license:asl2.0)))
6976
6977(define-public python2-bleach
6978 (package-with-python2 python-bleach))
6979
6980(define-public python-entrypoints
6981 (package
6982 (name "python-entrypoints")
a7f1b718 6983 (version "0.3")
44d10b1f
RW
6984 (source
6985 (origin
6986 (method url-fetch)
a7f1b718 6987 (uri (pypi-uri "entrypoints" version))
44d10b1f
RW
6988 (sha256
6989 (base32
a7f1b718 6990 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
44d10b1f
RW
6991 (build-system python-build-system)
6992 ;; The package does not come with a setup.py file, so we have to generate
6993 ;; one ourselves.
6994 (arguments
6995 `(#:tests? #f
6996 #:phases
6997 (modify-phases %standard-phases
6998 (add-after 'unpack 'create-setup.py
6999 (lambda _
7000 (call-with-output-file "setup.py"
7001 (lambda (port)
7002 (format port "\
7003from setuptools import setup
7004setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7005" ,version))))))))
7006 (home-page "https://github.com/takluyver/entrypoints")
7007 (synopsis "Discover and load entry points from installed Python packages")
7008 (description "Entry points are a way for Python packages to advertise
7009objects with some common interface. The most common examples are
7010@code{console_scripts} entry points, which define shell commands by
7011identifying a Python function to run. The @code{entrypoints} module contains
7012functions to find and load entry points.")
7013 (license license:expat)))
7014
7015(define-public python2-entrypoints
7016 (package-with-python2 python-entrypoints))
7017
7018(define-public python-nbconvert
7019 (package
7020 (name "python-nbconvert")
7021 (version "5.0.0b1")
7022 (source
7023 (origin
7024 (method url-fetch)
7025 (uri (pypi-uri "nbconvert" version))
7026 (sha256
7027 (base32
7028 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7029 (build-system python-build-system)
7030 (arguments
7031 `(;; The "bdist_egg" target is disabled by default, causing the installation
7032 ;; to fail.
7033 #:configure-flags (list "bdist_egg")
7034 ;; FIXME: 5 failures, 40 errors.
7035 #:tests? #f))
7036 ;; #:phases
7037 ;; (modify-phases %standard-phases
7038 ;; (replace 'check
7039 ;; (lambda _
7040 ;; (zero? (system* "py.test" "-v")))))
7041 (native-inputs
7042 `(("python-pytest" ,python-pytest)))
7043 (propagated-inputs
7044 `(("python-bleach" ,python-bleach)
7045 ("python-entrypoints" ,python-entrypoints)
7046 ("python-jinja2" ,python-jinja2)
7047 ("python-jupyter-core" ,python-jupyter-core)
7048 ("python-mistune" ,python-mistune)
7049 ("python-nbformat" ,python-nbformat)
7050 ("python-pygments" ,python-pygments)
7051 ("python-traitlets" ,python-traitlets)))
7052 (home-page "http://jupyter.org")
7053 (synopsis "Converting Jupyter Notebooks")
7054 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7055notebooks to various other formats via Jinja templates. It allows you to
7056convert an @code{.ipynb} notebook file into various static formats including:
7057
7058@enumerate
7059@item HTML
7060@item LaTeX
7061@item PDF
7062@item Reveal JS
7063@item Markdown (md)
7064@item ReStructured Text (rst)
7065@item executable script
7066@end enumerate\n")
7067 (license license:bsd-3)))
7068
7069(define-public python2-nbconvert
7070 (package-with-python2 python-nbconvert))
7071
44d10b1f
RW
7072(define-public python-notebook
7073 (package
7074 (name "python-notebook")
7075 (version "5.7.4")
7076 (source (origin
7077 (method url-fetch)
7078 (uri (pypi-uri "notebook" version))
7079 (sha256
7080 (base32
7081 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
7082 (build-system python-build-system)
7083 (arguments
7084 `(#:phases
7085 (modify-phases %standard-phases
7086 (replace 'check
7087 (lambda _
7088 ;; These tests require a browser
7089 (delete-file-recursively "notebook/tests/selenium")
7090 ;; Some tests need HOME
7091 (setenv "HOME" "/tmp")
7092 ;; This file contains "warningfilters", which are not supported
7093 ;; by this version of nose.
7094 (delete-file "setup.cfg")
7095 (with-directory-excursion "/tmp"
7096 (invoke "nosetests" "-v"))
7097 #t)))))
7098 (propagated-inputs
7099 `(("python-jupyter-core" ,python-jupyter-core)
7100 ("python-nbformat" ,python-nbformat)
7101 ("python-nbconvert" ,python-nbconvert)
7102 ("python-prometheus-client" ,python-prometheus-client)
7103 ("python-send2trash" ,python-send2trash)
7104 ("python-terminado" ,python-terminado)))
7105 (native-inputs
7106 `(("python-nose" ,python-nose)
7107 ("python-sphinx" ,python-sphinx)
7108 ("python-requests" ,python-requests)))
7109 (home-page "http://jupyter.org/")
7110 (synopsis "Web-based notebook environment for interactive computing")
7111 (description
7112 "The Jupyter HTML notebook is a web-based notebook environment for
7113interactive computing.")
7114 (properties `((python2-variant . ,(delay python2-notebook))))
7115 (license license:bsd-3)))
7116
7117(define-public python2-notebook
7118 (let ((base (package-with-python2
7119 (strip-python2-variant python-notebook))))
7120 (package (inherit base)
7121 (native-inputs
7122 `(("python2-mock" ,python2-mock)
7123 ,@(package-native-inputs base)))
7124 (arguments
7125 (substitute-keyword-arguments (package-arguments base)
7126 ((#:phases phases)
7127 `(modify-phases ,phases
7128 (add-before 'check 'disable-test-case
7129 ;; The test requires network access to localhost. Curiously it
7130 ;; fails with Python 2 only. Simply make the test-case return
7131 ;; immediately.
7132 (lambda _
7133 (substitute*
7134 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7135 (("formats = self.nbconvert_api") "return #")))))))))))
7136
7137(define-public python-widgetsnbextension
7138 (package
7139 (name "python-widgetsnbextension")
7140 (version "3.4.2")
7141 (source
7142 (origin
7143 (method url-fetch)
7144 (uri (pypi-uri "widgetsnbextension" version))
7145 (sha256
7146 (base32
7147 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
7148 (build-system python-build-system)
7149 (propagated-inputs
7150 `(("python-ipykernel" ,python-ipykernel)
7151 ("python-notebook" ,python-notebook)))
7152 (native-inputs
7153 `(("python-certifi" ,python-certifi)
7154 ("python-nose" ,python-nose)))
7155 (home-page "https://ipython.org")
7156 (synopsis "IPython HTML widgets for Jupyter")
7157 (description "This package provides interactive HTML widgets for Jupyter
7158notebooks.")
7159 (license license:bsd-3)))
7160
7161(define-public python2-widgetsnbextension
7162 (package-with-python2 python-widgetsnbextension))
7163
7164(define-public python-ipywidgets
7165 (package
7166 (name "python-ipywidgets")
7167 (version "5.2.2")
7168 (source
7169 (origin
7170 (method url-fetch)
7171 (uri (pypi-uri "ipywidgets" version))
7172 (sha256
7173 (base32
7174 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7175 (build-system python-build-system)
7176 (propagated-inputs
7177 `(("python-ipython" ,python-ipython)
7178 ("python-traitlets" ,python-traitlets)
7179 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7180 (native-inputs
7181 `(("python-nose" ,python-nose)
7182 ("python-pytest" ,python-pytest)))
7183 (home-page "https://ipython.org")
7184 (synopsis "IPython HTML widgets for Jupyter")
7185 (description "Ipywidgets are interactive HTML widgets for Jupyter
7186notebooks and the IPython kernel. Notebooks come alive when interactive
7187widgets are used. Users gain control of their data and can visualize changes
7188in the data.")
7189 (license license:bsd-3)))
7190
7191(define-public python2-ipywidgets
7192 (package-with-python2 python-ipywidgets))
7193
7194(define-public python-jupyter-console
7195 (package
7196 (name "python-jupyter-console")
7197 (version "5.2.0")
7198 (source
7199 (origin
7200 (method url-fetch)
7201 (uri (pypi-uri "jupyter_console" version))
7202 (sha256
7203 (base32
7204 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
7205 (build-system python-build-system)
7206 ;; Tests only run in an TTY.
7207 (arguments `(#:tests? #f))
7208 (propagated-inputs
7209 `(("python-ipykernel" ,python-ipykernel)
7210 ("python-jupyter-client" ,python-jupyter-client)
7211 ("python-prompt-toolkit" ,python-prompt-toolkit-1)
7212 ("python-pygments" ,python-pygments)))
7213 (native-inputs
7214 `(("python-nose" ,python-nose)))
7215 (home-page "https://jupyter.org")
7216 (synopsis "Jupyter terminal console")
7217 (description "This package provides a terminal-based console frontend for
7218Jupyter kernels. It also allows for console-based interaction with non-Python
7219Jupyter kernels such as IJulia and IRKernel.")
7220 (license license:bsd-3)))
7221
7222(define-public python2-jupyter-console
7223 (package-with-python2 python-jupyter-console))
7224
7225;; The python-ipython and python-jupyter-console require each other. To get
7226;; the functionality in both packages working, strip down the
7227;; python-jupyter-console package when using it as an input to python-ipython.
7228(define python-jupyter-console-minimal
7229 (package
7230 (inherit python-jupyter-console)
7231 (name "python-jupyter-console-minimal")
7232 (arguments
7233 (substitute-keyword-arguments
7234 (package-arguments python-jupyter-console)
7235 ((#:phases phases)
7236 `(modify-phases ,phases
7237 (add-after 'install 'delete-bin
7238 (lambda* (#:key outputs #:allow-other-keys)
7239 ;; Delete the bin files, to avoid conflicts in profiles
7240 ;; where python-ipython and python-jupyter-console are
7241 ;; both present.
7242 (delete-file-recursively
7243 (string-append
7244 (assoc-ref outputs "out") "/bin"))))))))
7245 ;; Remove the python-ipython propagated input, to avoid the cycle
7246 (propagated-inputs
7247 (alist-delete
7248 "python-ipython"
7249 (package-propagated-inputs python-jupyter-console)))))
7250
7251(define-public python-qtconsole
7252 (package
7253 (name "python-qtconsole")
7254 (version "4.4.3")
7255 (source
7256 (origin
7257 (method url-fetch)
7258 (uri (pypi-uri "qtconsole" version))
7259 (sha256
7260 (base32
7261 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
7262 (build-system python-build-system)
7263 (arguments
7264 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
7265 ;; but we only have the LTS version 5.x. This means that there might be
7266 ;; runtime errors, but since this is a dependency of the Jupyter package,
7267 ;; and Jupyter can be used without the qtconsole we can overlook this for
7268 ;; now.
7269 `(#:tests? #f
7270 #:phases
7271 (modify-phases %standard-phases
7272 (add-before 'check 'pre-check
7273 (lambda _
7274 (setenv "QT_QPA_PLATFORM" "offscreen")
7275 #t)))))
7276 (propagated-inputs
7277 `(("python-ipykernel" ,python-ipykernel)
7278 ("python-ipython" ,python-ipython)))
7279 (native-inputs
7280 `(("python-pytest" ,python-pytest)))
7281 (home-page "http://jupyter.org")
7282 (synopsis "Jupyter Qt console")
7283 (description "This package provides a Qt-based console for Jupyter with
7284support for rich media output.")
7285 (license license:bsd-3)))
7286
7287(define-public jupyter
7288 (package
7289 (name "jupyter")
7290 (version "1.0.0")
7291 (source
7292 (origin
7293 (method url-fetch)
7294 (uri (pypi-uri "jupyter" version))
7295 (sha256
7296 (base32
7297 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
7298 (build-system python-build-system)
7299 (arguments '(#:tests? #f)) ; there are none.
7300 (propagated-inputs
7301 `(("python-ipykernel" ,python-ipykernel)
7302 ("python-ipywidgets" ,python-ipywidgets)
7303 ("python-jupyter-console" ,python-jupyter-console)
7304 ("python-nbconvert" ,python-nbconvert)
7305 ("python-notebook" ,python-notebook)
7306 ("python-qtconsole" ,python-qtconsole)))
7307 (native-search-paths
7308 (list (search-path-specification
7309 (variable "JUPYTER_PATH")
7310 (files '("share/jupyter")))))
7311 (home-page "https://jupyter.org")
7312 (synopsis "Web application for interactive documents")
7313 (description
7314 "The Jupyter Notebook is a web application that allows you to create and
7315share documents that contain live code, equations, visualizations and
7316explanatory text. Uses include: data cleaning and transformation, numerical
7317simulation, statistical modeling, machine learning and much more.")
7318 (license license:bsd-3)))
7319
7320(define-public python-chardet
7321 (package
7322 (name "python-chardet")
7323 (version "3.0.4")
7324 (source
7325 (origin
7326 (method url-fetch)
7327 (uri (pypi-uri "chardet" version))
7328 (sha256
7329 (base32
7330 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
7331 (native-inputs
7332 `(("python-hypothesis" ,python-hypothesis)
7333 ("python-pytest" ,python-pytest)
7334 ("python-pytest-runner" ,python-pytest-runner)))
7335 (build-system python-build-system)
7336 (home-page "https://github.com/chardet/chardet")
7337 (synopsis "Universal encoding detector for Python 2 and 3")
7338 (description
7339 "This package provides @code{chardet}, a Python module that can
7340automatically detect a wide range of file encodings.")
7341 (license license:lgpl2.1+)))
7342
7343(define-public python2-chardet
7344 (package-with-python2 python-chardet))
7345
7346(define-public python-docopt
7347 (package
7348 (name "python-docopt")
7349 (version "0.6.2")
7350 (source
7351 (origin
7352 (method url-fetch)
7353 ;; The release on PyPI does not include tests.
7354 (uri (string-append
7355 "https://github.com/docopt/docopt/archive/"
7356 version ".tar.gz"))
7357 (file-name (string-append name "-" version ".tar.gz"))
7358 (sha256
7359 (base32
7360 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
7361 (build-system python-build-system)
7362 (native-inputs
7363 `(("python-pytest" ,python-pytest)))
7364 (arguments
7365 `(#:phases
7366 (modify-phases %standard-phases
7367 (replace 'check
7368 (lambda _ (invoke "py.test"))))))
7369 (home-page "http://docopt.org")
7370 (synopsis "Command-line interface description language for Python")
7371 (description "This library allows the user to define a command-line
7372interface from a program's help message rather than specifying it
7373programatically with command-line parsers like @code{getopt} and
7374@code{argparse}.")
7375 (license license:expat)))
7376
7377(define-public python2-docopt
7378 (package-with-python2 python-docopt))
7379
7380(define-public python-pythondialog
7381 (package
7382 (name "python-pythondialog")
7383 (version "3.4.0")
7384 (source
7385 (origin
7386 (method url-fetch)
7387 (uri (pypi-uri "pythondialog" version))
7388 (sha256
7389 (base32
7390 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
7391 (build-system python-build-system)
7392 (arguments
7393 `(#:phases
7394 (modify-phases %standard-phases
7395 (add-after 'unpack 'patch-path
7396 (lambda* (#:key inputs #:allow-other-keys)
7397 (let* ((dialog (assoc-ref inputs "dialog")))
7398 ;; Since this library really wants to grovel the search path, we
7399 ;; must hardcode dialog's store path into it.
7400 (substitute* "dialog.py"
7401 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
7402 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
7403 #t))))
7404 #:tests? #f)) ; no test suite
7405 (propagated-inputs
7406 `(("dialog" ,dialog)))
7407 (home-page "http://pythondialog.sourceforge.net/")
7408 (synopsis "Python interface to the UNIX dialog utility")
7409 (description "A Python wrapper for the dialog utility. Its purpose is to
7410provide an easy to use, pythonic and comprehensive Python interface to dialog.
7411This allows one to make simple text-mode user interfaces on Unix-like systems")
7412 (license license:lgpl2.1)
7413 (properties `((python2-variant . ,(delay python2-pythondialog))))))
7414
7415(define-public python2-pythondialog
7416 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
7417 (package
7418 (inherit base)
7419 (version (package-version python-pythondialog))
7420 (source (origin
7421 (method url-fetch)
7422 (uri (pypi-uri "python2-pythondialog" version))
7423 (sha256
7424 (base32
7425 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
7426
7427(define-public python-configobj
7428 (package
7429 (name "python-configobj")
7430 (version "5.0.6")
7431 (source (origin
7432 (method url-fetch)
b0758fbb 7433 (uri (pypi-uri "configobj" version))
44d10b1f
RW
7434 (sha256
7435 (base32
7436 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
7437 ;; Patch setup.py so it looks for python-setuptools, which is
7438 ;; required to parse the keyword 'install_requires' in setup.py.
7439 (patches (search-patches "python-configobj-setuptools.patch"))))
7440 (build-system python-build-system)
7441 (propagated-inputs
7442 `(("python-six" ,python-six)))
7443 (synopsis "Config file reading, writing and validation")
7444 (description "ConfigObj is a simple but powerful config file reader and
7445writer: an ini file round tripper. Its main feature is that it is very easy to
7446use, with a straightforward programmer’s interface and a simple syntax for
7447config files.")
7448 (home-page "https://github.com/DiffSK/configobj")
7449 (license license:bsd-3)))
7450
7451(define-public python2-configobj
7452 (package-with-python2 python-configobj))
7453
7454(define-public python-configargparse
7455 (package
7456 (name "python-configargparse")
86ae491f 7457 (version "0.14.0")
44d10b1f
RW
7458 (source (origin
7459 (method url-fetch)
7460 (uri (pypi-uri "ConfigArgParse" version))
7461 (sha256
7462 (base32
86ae491f 7463 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
44d10b1f
RW
7464 (build-system python-build-system)
7465 (native-inputs
7466 `(("python-pyyaml" ,python-pyyaml)))
7467 (arguments
7468 `(#:phases
7469 (modify-phases %standard-phases
7470 (replace 'check
7471 (lambda _
7472 ;; Bypass setuptools-shim because one test relies on "setup.py"
7473 ;; being the first argument passed to the python call.
7474 ;;
7475 ;; NOTE: Many tests do not run because they rely on Python's
7476 ;; built-in test.test_argparse, but we remove the unit tests from
7477 ;; our Python installation.
7478 (invoke "python" "setup.py" "test"))))))
7479 (synopsis "Replacement for argparse")
7480 (description "A drop-in replacement for argparse that allows options to also
7481be set via config files and/or environment variables.")
7482 (home-page "https://github.com/bw2/ConfigArgParse")
7483 (license license:expat)))
7484
7485(define-public python2-configargparse
7486 (package-with-python2 python-configargparse))
7487
7488(define-public python-argparse-manpage
7489 (package
7490 (name "python-argparse-manpage")
7491 (version "1.1")
7492 (source
7493 (origin
7494 (method url-fetch)
7495 (uri (pypi-uri "argparse-manpage" version))
7496 (sha256
7497 (base32
7498 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
7499 (build-system python-build-system)
7500 (home-page "https://github.com/praiskup/argparse-manpage")
7501 (synopsis "Build manual page from Python's ArgumentParser object")
7502 (description
7503 "This package provides tools to build manual pages from Python's
7504@code{ArgumentParser} object.")
7505 (license license:asl2.0)))
7506
7507(define-public python2-contextlib2
7508 (package
7509 (name "python2-contextlib2")
7510 (version "0.5.5")
7511 (source
7512 (origin
7513 (method url-fetch)
7514 (uri (pypi-uri "contextlib2" version))
7515 (sha256
7516 (base32
7517 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
7518 (build-system python-build-system)
7519 (arguments
7520 `(#:python ,python-2
7521 #:phases
7522 (modify-phases %standard-phases
7523 (replace 'check
7524 (lambda _ (invoke "python" "test_contextlib2.py" "-v"))))))
7525 (native-inputs
7526 `(("python2-unittest2" ,python2-unittest2)))
7527 (home-page "http://contextlib2.readthedocs.org/")
7528 (synopsis "Tools for decorators and context managers")
7529 (description "This module is primarily a backport of the Python
75303.2 contextlib to earlier Python versions. Like contextlib, it
7531provides utilities for common tasks involving decorators and context
7532managers. It also contains additional features that are not part of
7533the standard library.")
7534 (license license:psfl)))
7535
7536(define-public python-texttable
7537 (package
7538 (name "python-texttable")
7539 (version "0.8.7")
7540 (source
7541 (origin
7542 (method url-fetch)
7543 (uri (pypi-uri "texttable" version))
7544 (sha256
7545 (base32
7546 "1liiiydgkg37i46a418aw19fyf6z3ds51wdwwpyjbs12x0phhf4a"))))
7547 (build-system python-build-system)
7548 (arguments '(#:tests? #f)) ; no tests
7549 (home-page "https://github.com/foutaise/texttable/")
7550 (synopsis "Python module for creating simple ASCII tables")
7551 (description "Texttable is a Python module for creating simple ASCII
7552tables.")
7553 (license license:lgpl2.1+)))
7554
7555(define-public python2-texttable
7556 (package-with-python2 python-texttable))
7557
7558(define-public python-atomicwrites
7559 (package
7560 (name "python-atomicwrites")
7561 (version "1.1.5")
7562 (source (origin
7563 (method url-fetch)
7564 (uri (pypi-uri "atomicwrites" version))
7565 (sha256
7566 (base32
7567 "11bm90fwm2avvf4f3ib8g925w7jr4m11vcsinn1bi6ns4bm32214"))))
7568 (build-system python-build-system)
7569 (synopsis "Atomic file writes in Python")
7570 (description "Library for atomic file writes using platform dependent tools
7571for atomic file system operations.")
7572 (home-page "https://github.com/untitaker/python-atomicwrites")
7573 (license license:expat)))
7574
7575(define-public python2-atomicwrites
7576 (package-with-python2 python-atomicwrites))
7577
7578(define-public python-click-threading
7579 (package
7580 (name "python-click-threading")
7581 (version "0.4.4")
7582 (source (origin
7583 (method url-fetch)
7584 (uri (pypi-uri "click-threading" version))
7585 (sha256
7586 (base32
7587 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
7588 (build-system python-build-system)
7589 (propagated-inputs
7590 `(("python-click" ,python-click)))
7591 (synopsis "Utilities for multithreading in Click")
7592 (description "This package provides utilities for multithreading in Click
7593applications.")
7594 (home-page "https://github.com/click-contrib/click-threading")
7595 (license license:expat)))
7596
7597(define-public python-click-log
7598 (package
7599 (name "python-click-log")
7600 (version "0.3.2")
7601 (source (origin
7602 (method url-fetch)
7603 (uri (pypi-uri "click-log" version))
7604 (sha256
7605 (base32
7606 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
7607 (build-system python-build-system)
7608 (propagated-inputs
7609 `(("python-click" ,python-click)))
7610 (synopsis "Logging for click applications")
7611 (description "This package provides a Python library for logging Click
7612applications.")
7613 (home-page "https://github.com/click-contrib/click-log")
7614 (license license:expat)))
7615
7616(define-public python-apipkg
7617 (package
7618 (name "python-apipkg")
7619 (version "1.4")
7620 (source (origin
7621 (method url-fetch)
7622 (uri (pypi-uri "apipkg" version))
7623 (sha256
7624 (base32
7625 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
7626 (build-system python-build-system)
7627 (native-inputs
7628 `(("python-pytest" ,python-pytest)))
7629 (synopsis "Namespace control and lazy-import mechanism")
7630 (description "With apipkg you can control the exported namespace of a Python
7631package and greatly reduce the number of imports for your users. It is a small
7632pure Python module that works on virtually all Python versions.")
7633 (home-page "https://github.com/pytest-dev/apipkg")
7634 (license license:expat)))
7635
7636(define-public python2-apipkg
7637 (package-with-python2 python-apipkg))
7638
7639(define-public python-execnet
7640 (package
7641 (name "python-execnet")
7642 (version "1.4.1")
7643 (source (origin
7644 (method url-fetch)
7645 (uri (pypi-uri "execnet" version))
7646 (sha256
7647 (base32
7648 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
7649 (build-system python-build-system)
7650 (arguments
7651 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
7652 ;; The two test failures are caused by the lack of an `ssh` executable.
7653 ;; The test suite can be run with pytest after the 'install' phase.
7654 #:tests? #f))
7655 (native-inputs
7656 `(("python-pytest" ,python-pytest)
7657 ("python-setuptools-scm" ,python-setuptools-scm)))
7658 (propagated-inputs
7659 `(("python-apipkg" ,python-apipkg)))
7660 (synopsis "Rapid multi-Python deployment")
7661 (description "Execnet provides a share-nothing model with
7662channel-send/receive communication for distributing execution across many
7663Python interpreters across version, platform and network barriers. It has a
7664minimal and fast API targeting the following uses:
7665@enumerate
7666@item distribute tasks to (many) local or remote CPUs
7667@item write and deploy hybrid multi-process applications
7668@item write scripts to administer multiple environments
7669@end enumerate")
7670 (home-page "http://codespeak.net/execnet/")
7671 (license license:expat)))
7672
7673(define-public python2-execnet
7674 (package-with-python2 python-execnet))
7675
7676(define-public python-icalendar
7677 (package
7678 (name "python-icalendar")
7679 (version "4.0.3")
7680 (source (origin
7681 (method url-fetch)
7682 (uri (pypi-uri "icalendar" version))
7683 (sha256
7684 (base32
7685 "0mk3dk1dxkcm46jy48v27j2w2349iv4sbimqj1yb5js43mx49hh7"))))
7686 (build-system python-build-system)
7687 (propagated-inputs
7688 `(("python-dateutil" ,python-dateutil)
7689 ("python-pytz" ,python-pytz)))
7690 (synopsis "Python library for parsing iCalendar files")
7691 (description "The icalendar package is a parser/generator of iCalendar
7692files for use with Python.")
7693 (home-page "https://github.com/collective/icalendar")
7694 (license license:bsd-2)))
7695
7696(define-public python-sphinxcontrib-newsfeed
7697 (package
7698 (name "python-sphinxcontrib-newsfeed")
7699 (version "0.1.4")
7700 (source (origin
7701 (method url-fetch)
7702 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
7703 (sha256
7704 (base32
7705 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
7706 (arguments '(#:tests? #f)) ; No tests.
7707 (build-system python-build-system)
7708 (propagated-inputs
7709 `(("python-sphinx" ,python-sphinx)))
7710 (synopsis "News Feed extension for Sphinx")
7711 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
7712Blog, News or Announcements section to a Sphinx website.")
7713 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
7714 (license license:bsd-2)))
7715
7716(define-public python-args
7717 (package
7718 (name "python-args")
7719 (version "0.1.0")
7720 (source (origin
7721 (method url-fetch)
7722 (uri (pypi-uri "args" version))
7723 (sha256
7724 (base32
7725 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
7726 (build-system python-build-system)
7727 (home-page "https://github.com/kennethreitz/args")
7728 (synopsis "Command-line argument parser")
7729 (description
7730 "This library provides a Python module to parse command-line arguments.")
7731 (license license:bsd-3)))
7732
7733(define-public python2-args
7734 (package-with-python2 python-args))
7735
7736(define-public python-clint
7737 (package
7738 (name "python-clint")
7739 (version "0.5.1")
7740 (source (origin
7741 (method url-fetch)
7742 (uri (pypi-uri "clint" version))
7743 (sha256
7744 (base32
7745 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
7746 (build-system python-build-system)
7747 (arguments
7748 '(#:phases
7749 (modify-phases %standard-phases
7750 (replace 'check
7751 (lambda _ (invoke "py.test" "-v"))))))
7752 (native-inputs
7753 `(("python-pytest" ,python-pytest)))
7754 (propagated-inputs
7755 `(("python-args" ,python-args)))
7756 (home-page "https://github.com/kennethreitz/clint")
7757 (synopsis "Command-line interface tools")
7758 (description
7759 "Clint is a Python module filled with a set of tools for developing
7760command-line applications, including tools for colored and indented
7761output, progress bar display, and pipes.")
7762 (license license:isc)))
7763
7764(define-public python2-clint
7765 (package-with-python2 python-clint))
7766
44d10b1f
RW
7767(define-public python-rply
7768 (package
7769 (name "python-rply")
7770 (version "0.7.5")
7771 (source (origin
7772 (method url-fetch)
7773 (uri (pypi-uri "rply" version))
7774 (sha256
7775 (base32
7776 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
7777 (build-system python-build-system)
7778 (propagated-inputs
7779 `(("python-appdirs" ,python-appdirs)))
7780 (home-page "https://github.com/alex/rply")
7781 (synopsis "Parser generator for Python")
7782 (description
7783 "This package provides a pure Python based parser generator, that also
7784works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
7785with a new public API, and RPython support.")
7786 (license license:bsd-3)))
7787
7788(define-public python2-rply
7789 (package-with-python2 python-rply))
7790
7791(define-public python-hy
7792 (package
7793 (name "python-hy")
7794 (version "0.13.0")
7795 (source (origin
7796 (method url-fetch)
7797 (uri (pypi-uri "hy" version))
7798 (sha256
7799 (base32
7800 "19sfymaksx9jhksfnb15ahid46mzrhdfzz6yy2craz2qnzvpmky8"))))
7801 (build-system python-build-system)
7802 (arguments
7803 '(#:phases
7804 (modify-phases %standard-phases
7805 (replace 'check
7806 (lambda _
7807 ;; Tests require write access to HOME.
7808 (setenv "HOME" "/tmp")
7809 (invoke "nosetests"))))))
7810 (native-inputs
7811 `(("python-coverage" ,python-coverage)
7812 ("python-nose" ,python-nose)))
7813 (propagated-inputs
7814 `(("python-astor" ,python-astor)
7815 ("python-clint" ,python-clint)
7816 ("python-rply" ,python-rply)))
7817 (home-page "http://hylang.org/")
7818 (synopsis "Lisp frontend to Python")
7819 (description
7820 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
7821its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
7822Python at your fingertips, in Lisp form.")
7823 (license license:expat)))
7824
7825(define-public python2-hy
7826 (package-with-python2 python-hy))
7827
7828(define-public python2-functools32
7829 (package
7830 (name "python2-functools32")
7831 (version "3.2.3-2")
7832 (source
7833 (origin
7834 (method url-fetch)
7835 (uri (pypi-uri "functools32" version))
7836 (sha256
7837 (base32
7838 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
7839 (build-system python-build-system)
7840 (arguments
7841 `(#:python ,python-2
7842 #:tests? #f)) ; no test target
7843 (home-page "https://github.com/MiCHiLU/python-functools32")
7844 (synopsis
7845 "Backport of the functools module from Python 3.2.3")
7846 (description
7847 "This package is a backport of the @code{functools} module from Python
78483.2.3 for use with older versions of Python and PyPy.")
7849 (license license:expat)))
7850
7851(define-public python2-subprocess32
7852 (package
7853 (name "python2-subprocess32")
7854 (version "3.2.7")
7855 (source (origin
7856 (method url-fetch)
7857 (uri (pypi-uri "subprocess32" version))
7858 (sha256
7859 (base32
7860 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
7861 (patches
7862 (search-patches "python2-subprocess32-disable-input-test.patch"))))
7863 (build-system python-build-system)
7864 (arguments
7865 `(#:python ,python-2
7866 ;; The test suite fails with Python > 2.7.13:
7867 ;; import test.support
7868 ;; ImportError: No module named support
7869 #:tests? #f
7870 #:phases
7871 (modify-phases %standard-phases
7872 (add-after 'unpack 'patch-/bin/sh
7873 (lambda _
7874 (substitute* '("subprocess32.py"
7875 "test_subprocess32.py")
7876 (("/bin/sh") (which "sh")))
7877 #t)))))
7878 (home-page "https://github.com/google/python-subprocess32")
7879 (synopsis "Backport of the subprocess module from Python 3.2")
7880 (description
7881 "This is a backport of the @code{subprocess} standard library module
7882from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
7883new features. On POSIX systems it is guaranteed to be reliable when used
7884in threaded applications. It includes timeout support from Python 3.3 but
7885otherwise matches 3.2’s API.")
7886 (license license:psfl)))
7887
7888(define-public python2-futures
7889 (package
7890 (name "python2-futures")
7891 (version "3.2.0")
7892 (source
7893 (origin
7894 (method url-fetch)
7895 (uri (pypi-uri "futures" version))
7896 (sha256
7897 (base32
7898 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
7899 (build-system python-build-system)
7900 (arguments `(#:python ,python-2
7901 ;; FIXME: Python 2.7.14 moved the test.support library,
7902 ;; but our package has not yet been adjusted. Enable
7903 ;; tests when the python2 package has been fixed.
7904 #:tests? #f))
7905 (home-page "https://github.com/agronholm/pythonfutures")
7906 (synopsis
7907 "Backport of the concurrent.futures package from Python 3.2")
7908 (description
7909 "The concurrent.futures module provides a high-level interface for
7910asynchronously executing callables. This package backports the
7911concurrent.futures package from Python 3.2")
7912 (license license:bsd-3)))
7913
7914(define-public python-promise
7915 (package
7916 (name "python-promise")
7917 (version "0.4.2")
7918 (source
7919 (origin
7920 (method url-fetch)
7921 (uri (pypi-uri "promise" version))
7922 (sha256
7923 (base32
7924 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
7925 (build-system python-build-system)
7926 ;; Tests wants python-futures, which is a python2 only program, and
7927 ;; can't be found by python-promise at test time.
7928 (arguments `(#:tests? #f))
7929 (home-page "https://github.com/syrusakbary/promise")
7930 (synopsis "Promises/A+ implementation for Python")
7931 (description
7932 "Promises/A+ implementation for Python")
7933 (properties `((python2-variant . ,(delay python2-promise))))
7934 (license license:expat)))
7935
7936(define-public python2-promise
7937 (let ((promise (package-with-python2
7938 (strip-python2-variant python-promise))))
7939 (package (inherit promise)
7940 (arguments (substitute-keyword-arguments (package-arguments promise)
7941 ((#:tests? _) #t)))
7942 (native-inputs
7943 `(("python2-futures" ,python2-futures)
7944 ("python2-pytest" ,python2-pytest)
7945 ,@(package-native-inputs promise))))))
7946
7947(define-public python-colorama
7948 (package
7949 (name "python-colorama")
7950 (version "0.3.9")
7951 (source
7952 (origin
7953 (method url-fetch)
7954 (uri (pypi-uri "colorama" version))
7955 (sha256
7956 (base32
7957 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
7958 (build-system python-build-system)
7959 (synopsis "Colored terminal text rendering for Python")
7960 (description "Colorama is a Python library for rendering colored terminal
7961text.")
7962 (home-page "https://pypi.python.org/pypi/colorama")
7963 (license license:bsd-3)))
7964
7965(define-public python2-colorama
7966 (package-with-python2 python-colorama))
7967
7968(define-public python-rsa
7969 (package
7970 (name "python-rsa")
7971 (version "3.4.2")
7972 (source
7973 (origin
7974 (method url-fetch)
7975 (uri (pypi-uri "rsa" version))
7976 (sha256
7977 (base32
7978 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
7979 (build-system python-build-system)
7980 (propagated-inputs
7981 `(("python-pyasn1" ,python-pyasn1)))
7982 (synopsis "Pure-Python RSA implementation")
7983 (description "Python-RSA is a pure-Python RSA implementation. It supports
7984encryption and decryption, signing and verifying signatures, and key
7985generation according to PKCS#1 version 1.5. It can be used as a Python
7986library as well as on the command line.")
7987 (home-page "https://stuvel.eu/rsa")
7988 (license license:asl2.0)))
7989
7990(define-public python2-rsa
7991 (package-with-python2 python-rsa))
7992
7993(define-public python-pluggy
7994 (package
7995 (name "python-pluggy")
7996 (version "0.7.1")
7997 (source
7998 (origin
7999 (method url-fetch)
8000 (uri (pypi-uri "pluggy" version))
8001 (sha256
8002 (base32
8003 "1qbn70mksmr03hac6jgp6fiqc4l7859z8dchx2x950vhlij87swm"))))
8004 (build-system python-build-system)
8005 (native-inputs
8006 `(("python-setuptools-scm" ,python-setuptools-scm)))
8007 (synopsis "Plugin and hook calling mechanism for Python")
8008 (description "Pluggy is an extraction of the plugin manager as used by
8009Pytest but stripped of Pytest specific details.")
8010 (home-page "https://pypi.python.org/pypi/pluggy")
8011 (license license:expat)))
8012
8013(define-public python2-pluggy
8014 (package-with-python2 python-pluggy))
8015
8016(define-public python-tox
8017 (package
8018 (name "python-tox")
8019 (version "2.8.1")
8020 (source
8021 (origin
8022 (method url-fetch)
8023 (uri (pypi-uri "tox" version))
8024 (sha256
8025 (base32
8026 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
8027 (build-system python-build-system)
8028 (arguments
8029 ;; FIXME: Tests require pytest-timeout, which itself requires
8030 ;; pytest>=2.8.0 for installation.
8031 '(#:tests? #f))
8032 (propagated-inputs
8033 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
8034 ("python-py" ,python-py)
8035 ("python-virtualenv" ,python-virtualenv)))
8036 (native-inputs
8037 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
8038 ("python-pytest" ,python-pytest) ; >= 2.3.5
8039 ("python-setuptools-scm" ,python-setuptools-scm)))
8040 (home-page "http://tox.testrun.org/")
8041 (synopsis "Virtualenv-based automation of test activities")
8042 (description "Tox is a generic virtualenv management and test command line
8043tool. It can be used to check that a package installs correctly with
8044different Python versions and interpreters, or run tests in each type of
8045supported environment, or act as a frontend to continuous integration
8046servers.")
8047 (license license:expat)))
8048
8049(define-public python2-tox
8050 (package-with-python2 python-tox))
8051
8052(define-public python-jmespath
8053 (package
8054 (name "python-jmespath")
8055 (version "0.9.3")
8056 (source
8057 (origin
8058 (method url-fetch)
8059 (uri (pypi-uri "jmespath" version))
8060 (sha256
8061 (base32
8062 "0r7wc7fsxmlwzxx9j1j7rms06c6xs6d4sysirdhz1jk2mb4x90ba"))))
8063 (build-system python-build-system)
8064 (native-inputs
8065 `(("python-nose" ,python-nose)))
8066 (synopsis "JSON Matching Expressions")
8067 (description "JMESPath (pronounced “james path”) is a Python library that
8068allows one to declaratively specify how to extract elements from a JSON
8069document.")
8070 (home-page "https://github.com/jmespath/jmespath.py")
8071 (license license:expat)))
8072
8073(define-public python2-jmespath
8074 (package-with-python2 python-jmespath))
8075
8076(define-public python-botocore
8077 (package
8078 (name "python-botocore")
8079 (version "1.8.43")
8080 (source
8081 (origin
8082 (method url-fetch)
8083 (uri (pypi-uri "botocore" version))
8084 (sha256
8085 (base32
8086 "12cqpbnz3vfv41mp9admvciw7bc7hz57sjpqs2bxaw9wnfmbw5lg"))))
8087 (build-system python-build-system)
8088 (arguments
8089 ;; FIXME: Many tests are failing.
8090 '(#:tests? #f))
8091 (propagated-inputs
8092 `(("python-dateutil" ,python-dateutil)
8093 ("python-docutils" ,python-docutils)
8094 ("python-jmespath" ,python-jmespath)))
8095 (native-inputs
8096 `(("python-mock" ,python-mock)
8097 ("python-nose" ,python-nose)
8098 ("behave" ,behave)
8099 ("python-tox" ,python-tox)
8100 ("python-wheel" ,python-wheel)))
8101 (home-page "https://github.com/boto/botocore")
8102 (synopsis "Low-level interface to AWS")
8103 (description "Botocore is a Python library that provides a low-level
8104interface to the Amazon Web Services (AWS) API.")
8105 (license license:asl2.0)))
8106
8107(define-public python2-botocore
8108 (package-with-python2 python-botocore))
8109
8110(define-public python-xdo
8111 (package
8112 (name "python-xdo")
8113 (version "0.3")
8114 (source (origin
8115 (method url-fetch)
8116 (uri (string-append
8117 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8118 "python-xdo_" version ".orig.tar.gz"))
8119 (sha256
8120 (base32
8121 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
8122 (build-system python-build-system)
8123 (arguments
8124 '(#:phases
8125 (modify-phases %standard-phases
8126 (add-before 'install 'patch-libxdo-path
8127 ;; Hardcode the path of dynamically loaded libxdo library.
8128 (lambda* (#:key inputs #:allow-other-keys)
8129 (let ((libxdo (string-append
8130 (assoc-ref inputs "xdotool")
8131 "/lib/libxdo.so")))
8132 (substitute* "xdo/_xdo.py"
8133 (("find_library\\(\"xdo\"\\)")
8134 (simple-format #f "\"~a\"" libxdo)))
8135 #t))))
8136 #:tests? #f)) ; no tests provided
8137 (propagated-inputs
8138 `(("python-six" ,python-six)))
8139 (inputs
8140 `(("xdotool" ,xdotool)
8141 ("libX11" ,libx11)))
8142 (home-page "https://tracker.debian.org/pkg/python-xdo")
8143 (synopsis "Python library for simulating X11 keyboard/mouse input")
8144 (description "Provides bindings to libxdo for manipulating X11 via simulated
8145input. (Note that this is mostly a legacy library; you may wish to look at
8146python-xdo for newer bindings.)")
8147 (license license:bsd-3)))
8148
8149(define-public python2-xdo
8150 (package-with-python2 python-xdo))
8151
8152(define-public python-mako
8153 (package
8154 (name "python-mako")
8155 (version "1.0.7")
8156 (source
8157 (origin
8158 (method url-fetch)
8159 (uri (pypi-uri "Mako" version))
8160 (sha256
8161 (base32
8162 "1bi5gnr8r8dva06qpyx4kgjc6spm2k1y908183nbbaylggjzs0jf"))))
8163 (build-system python-build-system)
8164 (propagated-inputs
8165 `(("python-markupsafe" ,python-markupsafe)))
8166 (native-inputs
8167 `(("python-mock" ,python-mock)
8168 ("python-nose" ,python-nose)
8169 ("python-pytest" ,python-pytest)))
7016e620 8170 (home-page "https://www.makotemplates.org/")
44d10b1f
RW
8171 (synopsis "Templating language for Python")
8172 (description "Mako is a templating language for Python that compiles
8173templates into Python modules.")
8174 (license license:expat)))
8175
8176(define-public python2-mako
8177 (package-with-python2 python-mako))
8178
8179(define-public python-waitress
8180 (package
8181 (name "python-waitress")
8182 (version "1.1.0")
8183 (source
8184 (origin
8185 (method url-fetch)
8186 (uri (pypi-uri "waitress" version))
8187 (patches (search-patches "python-waitress-fix-tests.patch"))
8188 (sha256
8189 (base32
8190 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
8191 (build-system python-build-system)
8192 (home-page "https://github.com/Pylons/waitress")
8193 (synopsis "Waitress WSGI server")
8194 (description "Waitress is meant to be a production-quality pure-Python WSGI
8195server with very acceptable performance.")
8196 (license license:zpl2.1)))
8197
8198(define-public python2-waitress
8199 (package-with-python2 python-waitress))
8200
8201(define-public python-pyquery
8202 (package
8203 (name "python-pyquery")
8204 (version "1.2.17")
8205 (source
8206 (origin
8207 (method url-fetch)
8208 (uri (pypi-uri "pyquery" version))
8209 (sha256
8210 (base32
8211 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
8212 (build-system python-build-system)
8213 (native-inputs
8214 `(("python-webob" ,python-webob)
8215 ("python-webtest" ,python-webtest)))
8216 (propagated-inputs
8217 `(("python-lxml" ,python-lxml)
8218 ("python-cssselect" ,python-cssselect)))
8219 (home-page "https://github.com/gawel/pyquery")
8220 (synopsis "Make jQuery-like queries on xml documents")
8221 (description "pyquery allows you to make jQuery queries on xml documents.
8222The API is as much as possible the similar to jQuery. pyquery uses lxml for
8223fast xml and html manipulation.")
8224 (license license:bsd-3)))
8225
44d10b1f
RW
8226(define-public python-anyjson
8227 (package
8228 (name "python-anyjson")
8229 (version "0.3.3")
8230 (source
8231 (origin
8232 (method url-fetch)
8233 (uri (pypi-uri "anyjson" version))
8234 (sha256
8235 (base32
8236 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
8237 (build-system python-build-system)
8238 (arguments
8239 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
8240 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
8241 ;; whatever) so this transformation needs to be done before the tests
8242 ;; can be run. Maybe we could add a build step to transform beforehand
8243 ;; but it could be annoying/difficult.
8244 ;; We can enable tests for the Python 2 version, though, and do below.
8245 #:tests? #f))
8246 (home-page "https://bitbucket.org/runeh/anyjson/")
8247 (synopsis
8248 "Wraps best available JSON implementation in a common interface")
8249 (description
8250 "Anyjson loads whichever is the fastest JSON module installed
8251and provides a uniform API regardless of which JSON implementation is used.")
8252 (license license:bsd-3)
8253 (properties `((python2-variant . ,(delay python2-anyjson))))))
8254
8255(define-public python2-anyjson
8256 (let ((anyjson (package-with-python2
8257 (strip-python2-variant python-anyjson))))
8258 (package
8259 (inherit anyjson)
8260 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
8261 #:tests? #t
8262 ,@(package-arguments anyjson)))
8263 (native-inputs `(("python2-nose" ,python2-nose))))))
8264
8265(define-public python-amqp
8266 (package
8267 (name "python-amqp")
8268 (version "2.3.2")
8269 (source
8270 (origin
8271 (method url-fetch)
8272 (uri (pypi-uri "amqp" version))
8273 (sha256
8274 (base32
8275 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
8276 (build-system python-build-system)
8277 (native-inputs
8278 `(("python-case" ,python-case)
8279 ("python-pytest-sugar" ,python-pytest-sugar)
8280 ("python-mock" ,python-mock)))
8281 (propagated-inputs
8282 `(("python-vine" ,python-vine)))
8283 (home-page "https://github.com/celery/py-amqp")
8284 (synopsis
8285 "Low-level AMQP client for Python (fork of amqplib)")
8286 (description
8287 "This is a fork of amqplib which was originally written by Barry Pederson.
8288It is maintained by the Celery project, and used by kombu as a pure python
8289alternative when librabbitmq is not available.")
8290 (license license:lgpl2.1+)
8291 (properties `((python2-variant . ,(delay python2-amqp))))))
8292
8293(define-public python2-amqp
8294 (let ((amqp (package-with-python2
8295 (strip-python2-variant python-amqp))))
8296 (package
8297 (inherit amqp)
8298 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
8299 ;; unmaintained. Weirdly, does not do this on the python 3
8300 ;; version?
8301 #:tests? #f
8302 ,@(package-arguments amqp))))))
8303
8304(define-public python-txamqp
8305 (package
8306 (name "python-txamqp")
8307 (version "0.8.2")
8308 (source
8309 (origin
8310 (method url-fetch)
8311 (uri (pypi-uri "txAMQP" version))
8312 (sha256
8313 (base32
8314 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
8315 (build-system python-build-system)
8316 (propagated-inputs
8317 `(("python-six" ,python-six)
8318 ("python-twisted" ,python-twisted)))
8319 (home-page "https://github.com/txamqp/txamqp")
8320 (synopsis "Communicate with AMQP peers and brokers using Twisted")
8321 (description
8322 "This package provides a Python library for communicating with AMQP peers
8323and brokers using the asynchronous networking framework Twisted. It contains
8324all the necessary code to connect, send and receive messages to/from an
8325AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
8326also includes support for using Thrift RPC over AMQP in Twisted
8327applications.")
8328 (license license:asl2.0)))
8329
8330(define-public python2-txamqp
8331 (package-with-python2 python-txamqp))
8332
8333(define-public python-kombu
8334 (package
8335 (name "python-kombu")
8336 (version "4.2.2")
8337 (source
8338 (origin
8339 (method url-fetch)
8340 (uri (pypi-uri "kombu" version))
8341 (sha256
8342 (base32
8343 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
8344 (build-system python-build-system)
8345 (native-inputs
8346 `(("python-mock" ,python-mock)
8347 ("python-case" ,python-case)
8348 ("python-pyro4" ,python-pyro4)
8349 ("python-pytest-sugar" ,python-pytest-sugar)
8350 ("python-pytz" ,python-pytz)))
8351 (propagated-inputs
8352 `(("python-anyjson" ,python-anyjson)
8353 ("python-amqp" ,python-amqp)
8354 ("python-redis" ,python-redis)))
8355 (home-page "https://kombu.readthedocs.io")
8356 (synopsis "Message passing library for Python")
8357 (description "The aim of Kombu is to make messaging in Python as easy as
8358possible by providing an idiomatic high-level interface for the AMQ protocol,
8359and also provide proven and tested solutions to common messaging problems.
8360AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
8361message orientation, queuing, routing, reliability and security, for which the
8362RabbitMQ messaging server is the most popular implementation.")
8363 (license license:bsd-3)
8364 (properties `((python2-variant . ,(delay python2-kombu))))))
8365
8366(define-public python2-kombu
8367 (let ((kombu (package-with-python2
8368 (strip-python2-variant python-kombu))))
8369 (package
8370 (inherit kombu)
8371 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
8372 ;; It works fine on the python3 variant.
8373 #:tests? #f
8374 ,@(package-arguments kombu)))
8375 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8376 ,@(package-native-inputs kombu))))))
8377
8378(define-public python-billiard
8379 (package
8380 (name "python-billiard")
8381 (version "3.5.0.5")
8382 (source
8383 (origin
8384 (method url-fetch)
8385 (uri (pypi-uri "billiard" version))
8386 (sha256
8387 (base32
8388 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
8389 (build-system python-build-system)
8390 (native-inputs
8391 `(("python-case" ,python-case)
8392 ("python-pytest" ,python-pytest)))
8393 (home-page "https://github.com/celery/billiard")
8394 (synopsis
8395 "Python multiprocessing fork with improvements and bugfixes")
8396 (description
8397 "Billiard is a fork of the Python 2.7 multiprocessing package. The
8398multiprocessing package itself is a renamed and updated version of R Oudkerk's
8399pyprocessing package. This standalone variant is intended to be compatible with
8400Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
8401 (license license:bsd-3)
8402 (properties `((python2-variant . ,(delay python2-billiard))))))
8403
8404(define-public python2-billiard
8405 (let ((billiard (package-with-python2
8406 (strip-python2-variant python-billiard))))
8407 (package
8408 (inherit billiard)
8409 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8410 ("python2-mock" ,python2-mock)
8411 ,@(package-native-inputs billiard))))))
8412
8413(define-public python-celery
8414 (package
8415 (name "python-celery")
8416 (version "4.2.1")
8417 (source
8418 (origin
8419 (method url-fetch)
8420 (uri (pypi-uri "celery" version))
8421 (sha256
8422 (base32
8423 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
8424 (build-system python-build-system)
8425 (arguments
8426 '(;; TODO The tests fail with Python 3.7
8427 ;; https://github.com/celery/celery/issues/4849
8428 #:tests? #f
8429 #:phases
8430 (modify-phases %standard-phases
8431 (add-after 'unpack 'patch-requirements
8432 (lambda _
8433 (substitute* "requirements/test.txt"
8434 (("pytest>=3\\.0,<3\\.3")
8435 "pytest>=3.0"))
8436 #t)))))
8437 (native-inputs
8438 `(("python-case" ,python-case)
8439 ("python-pytest" ,python-pytest)))
8440 (propagated-inputs
8441 `(("python-pytz" ,python-pytz)
8442 ("python-billiard" ,python-billiard)
8443 ("python-kombu" ,python-kombu)))
8444 (home-page "https://celeryproject.org")
8445 (synopsis "Distributed Task Queue")
8446 (description "Celery is an asynchronous task queue/job queue based on
8447distributed message passing. It is focused on real-time operation, but
8448supports scheduling as well. The execution units, called tasks, are executed
8449concurrently on a single or more worker servers using multiprocessing,
8450Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
8451synchronously (wait until ready).")
8452 (license license:bsd-3)
8453 (properties `((python2-variant . ,(delay python2-celery))))))
8454
8455(define-public python2-celery
8456 (let ((celery (package-with-python2
8457 (strip-python2-variant python-celery))))
8458 (package
8459 (inherit celery)
8460 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8461 ("python2-mock" ,python2-mock)
8462 ,@(package-native-inputs celery))))))
8463
8464(define-public python-translitcodec
8465 (package
8466 (name "python-translitcodec")
8467 (version "0.4.0")
8468 (source
8469 (origin
8470 (method url-fetch)
8471 (uri (pypi-uri "translitcodec" version))
8472 (sha256
8473 (base32
8474 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
8475 (build-system python-build-system)
8476 (arguments
8477 `(#:tests? #f)) ; no tests provided
8478 (home-page
8479 "https://github.com/claudep/translitcodec")
8480 (synopsis
8481 "Unicode to 8-bit charset transliteration codec")
8482 (description
8483 "This package contains codecs for transliterating ISO 10646 texts into
8484best-effort representations using smaller coded character sets (ASCII,
8485ISO 8859, etc.).")
8486 (license license:expat)))
8487
8488(define-public python2-translitcodec
8489 (package-with-python2 python-translitcodec))
8490
8491(define-public python-editor
8492 (package
8493 (name "python-editor")
8494 (version "0.5")
8495 (source
8496 (origin
8497 (method url-fetch)
8498 (uri (pypi-uri "python-editor" version))
8499 (sha256
8500 (base32
8501 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
8502 (build-system python-build-system)
8503 (home-page
8504 "https://github.com/fmoo/python-editor")
8505 (synopsis
8506 "Programmatically open an editor, capture the result")
8507 (description
8508 "python-editor is a library that provides the editor module for
8509programmatically interfacing with your system's $EDITOR.")
8510 (license license:asl2.0)))
8511
8512(define-public python2-editor
8513 (package-with-python2 python-editor))
8514
8515(define-public python-sphinxcontrib-programoutput
8516 (package
8517 (name "python-sphinxcontrib-programoutput")
8518 (version "0.10")
8519 (source (origin
8520 (method url-fetch)
8521 (uri (pypi-uri "sphinxcontrib-programoutput" version))
8522 (sha256
8523 (base32
8524 "153hhnlbx4688zj9wd64819ps5znc2jlyp5crkgzvn5hxgy99vpx"))))
8525 (build-system python-build-system)
8526 (arguments
8527 ;; FIXME: Many tests are failing and the upstream is gone.
8528 '(#:tests? #f))
8529 (propagated-inputs
8530 `(("python-sphinx" ,python-sphinx)))
8531 (synopsis "Sphinx extension to include program output")
8532 (description "A Sphinx extension to literally insert the output of arbitrary
8533commands into documents, helping you to keep your command examples up to date.")
8534 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
8535 (license license:bsd-2)))
8536
8537(define-public python2-sphinxcontrib-programoutput
8538 (package-with-python2 python-sphinxcontrib-programoutput))
8539
8540(define-public python-sphinx-repoze-autointerface
8541 (package
8542 (name "python-sphinx-repoze-autointerface")
8543 (version "0.8")
8544 (source (origin
8545 (method url-fetch)
8546 (uri (pypi-uri "repoze.sphinx.autointerface" version))
8547 (sha256
8548 (base32
8549 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
8550 (build-system python-build-system)
8551 (arguments '(#:tests? #f)) ; No tests.
8552 (propagated-inputs
8553 `(("python-sphinx" ,python-sphinx)
8554 ("python-zope-interface" ,python-zope-interface)))
8555 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
8556 (description "This package defines an extension for the Sphinx documentation
8557system. The extension allows generation of API documentation by
8558introspection of @code{zope.interface} instances in code.")
8559 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
8560 (license license:repoze)))
8561
8562(define-public python2-sphinx-repoze-autointerface
8563 (package-with-python2 python-sphinx-repoze-autointerface))
8564
8565(define-public python-vobject
8566 (package
8567 (name "python-vobject")
8568 (version "0.9.5")
8569 (source (origin
8570 (method url-fetch)
8571 (uri (pypi-uri "vobject" version))
8572 (sha256
8573 (base32
8574 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
8575 (build-system python-build-system)
8576 (arguments
8577 '(;; The test suite relies on some non-portable Windows interfaces.
8578 #:tests? #f))
8579 (propagated-inputs
8580 `(("python-dateutil" ,python-dateutil)
8581 ("python-pyicu" ,python-pyicu)))
8582 (synopsis "Parse and generate vCard and vCalendar files")
8583 (description "Vobject is intended to be a full featured Python package for
8584parsing and generating vCard and vCalendar files. Currently, iCalendar files
8585are supported and well tested. vCard 3.0 files are supported, and all data
8586should be imported, but only a few components are understood in a sophisticated
8587way.")
8588 (home-page "http://eventable.github.io/vobject/")
8589 (license license:asl2.0)))
8590
8591(define-public python2-vobject
8592 (package-with-python2 python-vobject))
8593
8594(define-public python-munkres
8595 (package
8596 (name "python-munkres")
8597 (version "1.0.8")
8598 (source (origin
8599 (method url-fetch)
8600 (uri (pypi-uri "munkres" version))
8601 (sha256
8602 (base32
8603 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
8604 (build-system python-build-system)
8605 (arguments
8606 '(#:tests? #f)) ; no test suite
8607 (home-page "http://software.clapper.org/munkres/")
8608 (synopsis "Implementation of the Munkres algorithm")
8609 (description "The Munkres module provides an implementation of the Munkres
8610algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
8611useful for solving the Assignment Problem.")
8612 (license license:bsd-3)))
8613
8614(define-public python2-munkres
8615 (package-with-python2 python-munkres))
8616
8617(define-public python-whoosh
8618 (package
8619 (name "python-whoosh")
8620 (version "2.7.4")
8621 (source
8622 (origin
8623 (method url-fetch)
8624 (uri (pypi-uri "Whoosh" version))
8625 (sha256
8626 (base32
8627 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
8628 (build-system python-build-system)
8629 (native-inputs
8630 `(("python-pytest" ,python-pytest)))
8631 (home-page "https://bitbucket.org/mchaput/whoosh")
8632 (synopsis "Full text indexing, search, and spell checking library")
8633 (description
8634 "Whoosh is a fast, pure-Python full text indexing, search, and spell
8635checking library.")
8636 (license license:bsd-2)))
8637
8638(define-public python2-whoosh
8639 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
8640 (package (inherit whoosh)
8641 (propagated-inputs
8642 `(("python2-backport-ssl-match-hostname"
8643 ,python2-backport-ssl-match-hostname)
8644 ,@(package-propagated-inputs whoosh))))))
8645
8646(define-public python-pathlib
8647 (package
8648 (name "python-pathlib")
8649 (version "1.0.1")
8650 (source (origin
8651 (method url-fetch)
8652 (uri (pypi-uri "pathlib" version))
8653 (sha256
8654 (base32
8655 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
8656 (build-system python-build-system)
8657 ;; The tests depend on the internal "test" module, which does not provide
8658 ;; a stable interface.
8659 (arguments `(#:tests? #f))
8660 (home-page "https://pathlib.readthedocs.org/")
8661 (synopsis "Object-oriented file system paths")
8662 (description "Pathlib offers a set of classes to handle file system paths.
8663It offers the following advantages over using string objects:
8664
8665@enumerate
8666@item No more cumbersome use of os and os.path functions. Everything can
8667be done easily through operators, attribute accesses, and method calls.
8668@item Embodies the semantics of different path types. For example,
8669comparing Windows paths ignores casing.
8670@item Well-defined semantics, eliminating any inconsistencies or
8671ambiguities (forward vs. backward slashes, etc.).
8672@end enumerate
8673
8674Note: In Python 3.4, pathlib is now part of the standard library. For other
8675Python versions please consider python-pathlib2 instead, which tracks the
8676standard library module. This module (python-pathlib) isn't maintained
8677anymore.")
8678 (license license:expat)))
8679
8680(define-public python2-pathlib
8681 (package-with-python2 python-pathlib))
8682
8683(define-public python2-pathlib2
8684 (package
8685 (name "python2-pathlib2")
8686 (version "2.3.2")
8687 (source (origin
8688 (method url-fetch)
8689 (uri (pypi-uri "pathlib2" version))
8690 (sha256
8691 (base32
8692 "10yb0iv5x2hs631rcppkhbddx799d3h8pcwmkbh2a66ns3w71ccf"))))
8693 (build-system python-build-system)
8694 ;; We only need the the Python 2 variant, since for Python 3 our minimum
8695 ;; version is 3.4 which already includes this package as part of the
8696 ;; standard library.
8697 (arguments
8698 `(#:python ,python-2))
8699 (propagated-inputs
8700 `(("python2-scandir" ,python2-scandir)
8701 ("python2-six" ,python2-six)))
8702 (home-page "https://pypi.python.org/pypi/pathlib2/")
8703 (synopsis "Object-oriented file system paths - backport of standard
8704pathlib module")
8705 (description "The goal of pathlib2 is to provide a backport of standard
8706pathlib module which tracks the standard library module, so all the newest
8707features of the standard pathlib can be used also on older Python versions.
8708
8709Pathlib offers a set of classes to handle file system paths. It offers the
8710following advantages over using string objects:
8711
8712@enumerate
8713@item No more cumbersome use of os and os.path functions. Everything can
8714be done easily through operators, attribute accesses, and method calls.
8715@item Embodies the semantics of different path types. For example,
8716comparing Windows paths ignores casing.
8717@item Well-defined semantics, eliminating any inconsistencies or
8718ambiguities (forward vs. backward slashes, etc.).
8719@end enumerate")
8720 (license license:expat)))
8721
8722(define-public python2-pathlib2-bootstrap
8723 (hidden-package
8724 (package
8725 (inherit python2-pathlib2)
8726 (name "python2-pathlib2-bootstrap")
8727 (propagated-inputs
8728 `(("python2-scandir" ,python2-scandir)
8729 ("python2-six" ,python2-six-bootstrap))))))
8730
8731(define-public python-jellyfish
8732 (package
8733 (name "python-jellyfish")
8734 (version "0.5.6")
8735 (source (origin
8736 (method url-fetch)
8737 (uri (pypi-uri "jellyfish" version))
8738 (sha256
8739 (base32
8740 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
8741 (build-system python-build-system)
8742 (native-inputs
8743 `(("python-pytest" ,python-pytest)))
8744 (home-page "https://github.com/jamesturk/jellyfish")
8745 (synopsis "Approximate and phonetic matching of strings")
8746 (description "Jellyfish uses a variety of string comparison and phonetic
8747encoding algorithms to do fuzzy string matching.")
8748 (license license:bsd-2)
8749 (properties `((python2-variant . ,(delay python2-jellyfish))))))
8750
8751(define-public python2-jellyfish
8752 (let ((jellyfish (package-with-python2
8753 (strip-python2-variant python-jellyfish))))
8754 (package (inherit jellyfish)
8755 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
8756 ,@(package-native-inputs jellyfish))))))
8757
8758(define-public python2-unicodecsv
8759 (package
8760 (name "python2-unicodecsv")
8761 (version "0.14.1")
8762 (source (origin
8763 (method url-fetch)
8764 ;; The test suite is not included in the PyPi release.
8765 ;; https://github.com/jdunck/python-unicodecsv/issues/19
8766 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
8767 "archive/" version ".tar.gz"))
8768 (file-name (string-append name "-" version ".tar.gz"))
8769 (sha256
8770 (base32
8771 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
8772 (build-system python-build-system)
8773 (arguments
8774 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
8775 #:python ,python-2))
8776 (native-inputs
8777 `(("python2-unittest2" ,python2-unittest2)))
8778 (home-page "https://github.com/jdunck/python-unicodecsv")
8779 (synopsis "Unicode CSV module for Python 2")
8780 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
8781module, adding support for Unicode strings.")
8782 (license license:bsd-2)))
8783
8784(define-public python-rarfile
8785 (package
8786 (name "python-rarfile")
8787 (version "2.8")
8788 (source (origin
8789 (method url-fetch)
8790 (uri (pypi-uri "rarfile" version))
8791 (sha256
8792 (base32
8793 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
8794 (build-system python-build-system)
8795 (arguments
8796 '(#:phases
8797 (modify-phases %standard-phases
8798 (replace 'check
8799 ;; Many tests fail, but the installation proceeds.
e59dd341 8800 (lambda _ (invoke "make" "-C" "test" "test"))))))
44d10b1f
RW
8801 (native-inputs
8802 `(("which" ,which))) ; required for tests
8803 (propagated-inputs
8804 `(("libarchive" ,libarchive)))
8805 (home-page "https://github.com/markokr/rarfile")
8806 (synopsis "RAR archive reader for Python")
8807 (description "This is Python module for RAR archive reading. The interface
8808is made as zipfile like as possible.")
8809 (license license:isc)))
8810
8811(define-public python2-rarfile
8812 (package-with-python2 python-rarfile))
8813
8814(define-public python-magic
8815 (package
8816 (name "python-magic")
8817 (version "0.4.15")
8818 (source
8819 (origin
8820 (method url-fetch)
8821 (uri (pypi-uri "python-magic" version))
8822 (sha256
8823 (base32
8824 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
8825 (file-name (string-append name "-" version "-checkout"))))
8826 (build-system python-build-system)
8827 (arguments
8828 ;; The tests are unreliable, so don't run them. The tests fail
8829 ;; under Python3 because they were written for Python2 and
8830 ;; contain import statements that do not work in Python3. One of
8831 ;; the tests fails under Python2 because its assertions are
8832 ;; overly stringent; it relies on comparing output strings which
8833 ;; are brittle and can change depending on the version of
8834 ;; libmagic being used and the system on which the test is
8835 ;; running. In my case, under GuixSD 0.10.0, only one test
8836 ;; failed, and it seems to have failed only because the version
8837 ;; of libmagic that is packaged in Guix outputs a slightly
8838 ;; different (but not wrong) string than the one that the test
8839 ;; expected.
8840 '(#:tests? #f
8841 #:phases (modify-phases %standard-phases
8842 ;; Replace a specific method call with a hard-coded
8843 ;; path to the necessary libmagic.so file in the
8844 ;; store. If we don't do this, then the method call
8845 ;; will fail to find the libmagic.so file, which in
8846 ;; turn will cause any application using
8847 ;; python-magic to fail.
8848 (add-before 'build 'hard-code-path-to-libmagic
8849 (lambda* (#:key inputs #:allow-other-keys)
8850 (let ((file (assoc-ref inputs "file")))
8851 (substitute* "magic.py"
8852 (("ctypes.util.find_library\\('magic'\\)")
8853 (string-append "'" file "/lib/libmagic.so'")))
8854 #t)))
8855 (add-before 'install 'disable-egg-compression
8856 (lambda _
8857 (let ((port (open-file "setup.cfg" "a")))
8858 (display "\n[easy_install]\nzip_ok = 0\n"
8859 port)
8860 (close-port port)
8861 #t))))))
8862 (inputs
8863 ;; python-magic needs to be able to find libmagic.so.
8864 `(("file" ,file)))
8865 (home-page
8866 "https://github.com/ahupp/python-magic")
8867 (synopsis
8868 "File type identification using libmagic")
8869 (description
8870 "This module uses ctypes to access the libmagic file type
8871identification library. It makes use of the local magic database and
8872supports both textual and MIME-type output. Note that this module and
8873the python-file module both provide a \"magic.py\" file; these two
8874modules, which are different and were developed separately, both serve
8875the same purpose: to provide Python bindings for libmagic.")
8876 (license license:expat)))
8877
8878(define-public python2-magic
8879 (package-with-python2 python-magic))
8880
8881(define-public python2-s3cmd
8882 (package
8883 (name "python2-s3cmd")
8884 (version "1.6.1")
8885 (source
8886 (origin
8887 (method url-fetch)
8888 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
8889 "s3cmd-" version ".tar.gz"))
8890 (sha256
8891 (base32
8892 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
8893 (build-system python-build-system)
8894 (arguments
8895 ;; s3cmd is written for python2 only and contains no tests.
8896 `(#:python ,python-2
8897 #:tests? #f))
8898 (propagated-inputs
8899 `(("python2-dateutil" ,python2-dateutil)
8900 ;; The python-file package also provides a magic.py module.
8901 ;; This is an unfortunate state of affairs; however, s3cmd
8902 ;; fails to install if it cannot find specifically the
8903 ;; python-magic package. Thus we include it, instead of using
8904 ;; python-file. Ironically, s3cmd sometimes works better
8905 ;; without libmagic bindings at all:
8906 ;; https://github.com/s3tools/s3cmd/issues/198
8907 ("python2-magic" ,python2-magic)))
8908 (home-page "http://s3tools.org/s3cmd")
8909 (synopsis "Command line tool for S3-compatible storage services")
8910 (description
8911 "S3cmd is a command line tool for uploading, retrieving and managing data
8912in storage services that are compatible with the Amazon Simple Storage
8913Service (S3) protocol, including S3 itself. It supports rsync-like backup,
8914GnuPG encryption, and more. It also supports management of Amazon's
8915CloudFront content delivery network.")
8916 (license license:gpl2+)))
8917
8918(define-public python-pkgconfig
8919 (package
8920 (name "python-pkgconfig")
8921 (version "1.3.1")
8922 (source
8923 (origin
8924 (method url-fetch)
8925 (uri (pypi-uri "pkgconfig" version))
8926 (sha256
8927 (base32
8928 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
8929 (build-system python-build-system)
8930 (native-inputs
8931 `(("python-nose" ,python-nose)))
8932 (inputs
8933 `(("pkg-config" ,pkg-config)))
8934 (arguments
8935 `(#:phases
8936 (modify-phases %standard-phases
8937 (add-before 'build 'patch
8938 ;; Hard-code the path to pkg-config.
8939 (lambda _
8940 (substitute* "pkgconfig/pkgconfig.py"
8941 (("cmd = 'pkg-config")
8942 (string-append "cmd = '" (which "pkg-config"))))
8943 #t))
8944 (replace 'check
8945 (lambda _
8946 (invoke "nosetests" "test.py"))))))
8947 (home-page "https://github.com/matze/pkgconfig")
8948 (synopsis "Python interface for pkg-config")
8949 (description "This module provides a Python interface to pkg-config. It
8950can be used to find all pkg-config packages, check if a package exists,
8951check if a package meets certain version requirements, query CFLAGS and
8952LDFLAGS and parse the output to build extensions with setup.py.")
8953 (license license:expat)))
8954
8955(define-public python2-pkgconfig
8956 (package-with-python2 python-pkgconfig))
8957
8958(define-public python-bz2file
8959 (package
8960 (name "python-bz2file")
8961 (version "0.98")
8962 (source
8963 (origin
8964 (method url-fetch)
8965 (uri (pypi-uri "bz2file" version))
8966 (sha256
8967 (base32
8968 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
8969 (build-system python-build-system)
8970 (arguments
8971 `(#:tests? #f)) ; Tests use deprecated python modules.
8972 (home-page "https://github.com/nvawda/bz2file")
8973 (synopsis "Read and write bzip2-compressed files")
8974 (description
8975 "Bz2file is a Python library for reading and writing bzip2-compressed
8976files. It contains a drop-in replacement for the I/O interface in the
8977standard library's @code{bz2} module, including features from the latest
8978development version of CPython that are not available in older releases.")
8979 (license license:asl2.0)))
8980
8981(define-public python2-bz2file
8982 (package-with-python2 python-bz2file))
8983
8984(define-public python-future
8985 (package
8986 (name "python-future")
8987 (version "0.16.0")
8988 (source
8989 (origin
8990 (method url-fetch)
8991 (uri (pypi-uri "future" version))
8992 (sha256
8993 (base32
8994 "1nzy1k4m9966sikp0qka7lirh8sqrsyainyf8rk97db7nwdfv773"))))
8995 (build-system python-build-system)
8996 ;; Many tests connect to the network or are otherwise flawed.
8997 ;; https://github.com/PythonCharmers/python-future/issues/210
8998 (arguments
8999 `(#:tests? #f))
9000 (home-page "http://python-future.org")
9001 (synopsis "Single-source support for Python 3 and 2")
9002 (description
9003 "@code{python-future} is the missing compatibility layer between Python 2 and
9004Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9005to support both Python 2 and Python 3 with minimal overhead.")
9006 (license license:expat)))
9007
9008(define-public python2-future
9009 (package-with-python2 python-future))
9010
9011(define-public python-cysignals
9012 (package
9013 (name "python-cysignals")
8e3e51df 9014 (version "1.9.0")
44d10b1f
RW
9015 (source
9016 (origin
9017 (method url-fetch)
8e3e51df 9018 (uri (pypi-uri "cysignals" version))
44d10b1f
RW
9019 (sha256
9020 (base32
8e3e51df 9021 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
44d10b1f
RW
9022 (build-system python-build-system)
9023 (native-inputs
9024 `(("python-cython" ,python-cython)
9025 ("python-sphinx" ,python-sphinx)))
9026 (inputs
9027 `(("pari-gp" ,pari-gp)))
9028 (arguments
9029 `(#:modules ((guix build python-build-system)
9030 ((guix build gnu-build-system) #:prefix gnu:)
9031 (guix build utils))
9032 ;; FIXME: Tests are executed after installation and currently fail
9033 ;; when not installing into standard locations; the author is working
9034 ;; on a fix.
9035 #:tests? #f
9036 #:phases
9037 (modify-phases %standard-phases
9038 (add-before
9039 'build 'configure
9040 (assoc-ref gnu:%standard-phases 'configure)))))
9041 (home-page
9042 "https://github.com/sagemath/cysignals")
9043 (synopsis
9044 "Handling of interrupts and signals for Cython")
9045 (description
9046 "The cysignals package provides mechanisms to handle interrupts (and
9047other signals and errors) in Cython code, using two related approaches,
9048for mixed Cython/Python code or external C libraries and pure Cython code,
9049respectively.")
9050 (license license:lgpl3+)))
9051
9052(define-public python2-cysignals
9053 (package-with-python2 python-cysignals))
9054
9055(define-public python2-shedskin
9056 (package
9057 (name "python2-shedskin")
9058 (version "0.9.4")
9059 (source
9060 (origin
9061 (method url-fetch)
9062 (uri (string-append "https://github.com/shedskin/shedskin/"
9063 "releases/download/v" version
9064 "/shedskin-" version ".tgz"))
9065 (sha256
9066 (base32
9067 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9068 (build-system python-build-system)
9069 (arguments
9070 `(#:python ,python-2
9071 #:phases (modify-phases %standard-phases
9072 (add-after 'unpack 'fix-resulting-include-libs
9073 (lambda* (#:key inputs #:allow-other-keys)
9074 (let ((libgc (assoc-ref inputs "libgc"))
9075 (pcre (assoc-ref inputs "pcre")))
9076 (substitute* "shedskin/makefile.py"
9077 (("variable == 'CCFLAGS':[ ]*")
9078 (string-append "variable == 'CCFLAGS':\n"
9079 " line += ' -I " pcre "/include"
9080 " -I " libgc "/include'"))
9081 (("variable == 'LFLAGS':[ ]*")
9082 (string-append "variable == 'LFLAGS':\n"
9083 " line += ' -L" pcre "/lib"
9084 " -L " libgc "/lib'")))
9085 #t))))))
9086 (inputs `(("pcre" ,pcre)
9087 ("libgc" ,libgc)))
9088 (home-page "https://shedskin.github.io/")
9089 (synopsis "Experimental Python-2 to C++ Compiler")
9090 (description (string-append "This is an experimental compiler for a subset of
9091Python. It generates C++ code and a Makefile."))
9092 (license (list license:gpl3 license:bsd-3 license:expat))))
9093
9094(define-public python2-rope
9095 (package
9096 (name "python2-rope")
a9ba0a31 9097 (version "0.11.0")
44d10b1f
RW
9098 (source
9099 (origin
9100 (method url-fetch)
9101 (uri (pypi-uri "rope" version))
9102 (sha256
9103 (base32
a9ba0a31 9104 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
44d10b1f 9105 (arguments
afb29715 9106 ;; Rope has only partial python3 support, see `python-rope'
44d10b1f
RW
9107 `(#:python ,python-2))
9108 (build-system python-build-system)
9109 (native-inputs
9110 `(("python2-unittest2" ,python2-unittest2)))
9111 (home-page "https://github.com/python-rope/rope")
9112 (synopsis "Refactoring library for Python")
9113 (description "Rope is a refactoring library for Python. It facilitates
9114the renaming, moving and extracting of attributes, functions, modules, fields
9115and parameters in Python 2 source code. These refactorings can also be applied
9116to occurrences in strings and comments.")
9117 (license license:gpl2)))
9118
2c880ef4
LC
9119(define-public python-rope
9120 (package
9121 (inherit python2-rope)
9122 (name "python-rope")
9123 (arguments `(#:python ,python-wrapper
9124 ;; XXX: Only partial python3 support, results in some failing
9125 ;; tests: <https://github.com/python-rope/rope/issues/247>.
9126 #:tests? #f))
9127 (properties `((python2-variant . ,(delay python2-rope))))))
9128
44d10b1f
RW
9129(define-public python-py3status
9130 (package
9131 (name "python-py3status")
77f3d303 9132 (version "3.16")
44d10b1f
RW
9133 (source
9134 (origin
9135 (method url-fetch)
9136 (uri (pypi-uri "py3status" version))
9137 (sha256
9138 (base32
77f3d303 9139 "1xrfph277bgjln3jbpzpgkhxad04fjvj7s3xfil42q1sxi4s3q3g"))))
44d10b1f
RW
9140 (build-system python-build-system)
9141 (inputs
9142 `(("file" ,file)))
9143 (arguments
9144 '(#:phases
9145 (modify-phases %standard-phases
9146 ;; 'file' is used for detection of configuration file encoding
9147 ;; let's make link the dependency to particular input
9148 (add-before 'build 'patch-file-path
9149 (lambda* (#:key inputs #:allow-other-keys)
9150 (let ((file-path (assoc-ref inputs "file")))
9151 (substitute* "py3status/parse_config.py"
9152 (("\\['file', '-b'")
9153 (string-append "['" file-path "/bin/file', '-b'")))
9154 #t))))
9155 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
9156 (home-page "https://github.com/ultrabug/py3status")
9157 (synopsis "Extensible i3status wrapper written in Python")
9158 (description "py3status is an i3status wrapper which extends i3status
9159functionality in a modular way, allowing you to extend your panel with your
9160own code, responding to click events and updating clock every second.")
9161 (license license:bsd-3)))
9162
9163(define-public python-tblib
9164 (package
9165 (name "python-tblib")
9166 (version "1.3.2")
9167 (source (origin
9168 (method url-fetch)
9169 (uri (pypi-uri "tblib" version))
9170 (sha256 (base32
9171 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
9172 (build-system python-build-system)
9173 (arguments
9174 `(#:phases
9175 (modify-phases %standard-phases
9176 (add-before 'check 'adjust-tests
9177 (lambda _
9178 (when (which "python3")
9179 ;; Adjust the example output to match that of Python 3.7:
9180 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
9181 (substitute* "README.rst"
9182 (("Exception\\('fail',") "Exception('fail'"))
9183 #t)))
9184 (replace 'check
9185 (lambda _
9186 ;; Upstream runs tests after installation and the package itself
9187 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
9188 ;; found.
9189 (setenv "PYTHONPATH"
9190 (string-append (getcwd) "/build/lib:"
9191 (getenv "PYTHONPATH")))
9192 (invoke "py.test" "-vv" "tests" "README.rst"))))))
9193 (native-inputs
9194 `(("python-pytest" ,python-pytest)
9195 ("python-six" ,python-six)))
9196 (home-page "https://github.com/ionelmc/python-tblib")
9197 (synopsis "Traceback serialization library")
9198 (description
9199 "Traceback serialization allows you to:
9200
9201@enumerate
9202@item Pickle tracebacks and raise exceptions with pickled tracebacks in
9203different processes. This allows better error handling when running code over
9204multiple processes (imagine multiprocessing, billiard, futures, celery etc).
9205
9206@item Parse traceback strings and raise with the parsed tracebacks.
9207@end enumerate\n")
9208 (license license:bsd-3)))
9209
9210(define-public python2-tblib
9211 (package-with-python2 python-tblib))
9212
9213(define-public python-greenlet
9214 (package
9215 (name "python-greenlet")
9216 (version "0.4.15")
9217 (source (origin
9218 (method url-fetch)
9219 (uri (pypi-uri "greenlet" version))
9220 (sha256
9221 (base32
9222 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
9223 (build-system python-build-system)
9224 (home-page "https://greenlet.readthedocs.io/")
9225 (synopsis "Lightweight in-process concurrent programming")
9226 (description
9227 "Greenlet package is a spin-off of Stackless, a version of CPython
9228that supports micro-threads called \"tasklets\". Tasklets run
9229pseudo-concurrently (typically in a single or a few OS-level threads) and
9230are synchronized with data exchanges on \"channels\".")
9231 (license (list license:psfl license:expat))))
9232
9233(define-public python2-greenlet
9234 (package-with-python2 python-greenlet))
9235
9236(define-public python-objgraph
9237 (package
9238 (name "python-objgraph")
9239 (version "3.4.0")
9240 (source
9241 (origin
9242 (method url-fetch)
9243 (uri (pypi-uri "objgraph" version))
9244 (sha256
9245 (base32
9246 "184m09am5gpbqfaiy7l0hwh476mczbrly1dffs0rw2p1d1i2q32a"))))
9247 (build-system python-build-system)
9248 (propagated-inputs
9249 `(("python-graphviz" ,python-graphviz)))
9250 (native-inputs
9251 `(("python-mock" ,python-mock)
9252 ("graphviz" ,graphviz)))
9253 (home-page "https://mg.pov.lt/objgraph/")
9254 (synopsis "Draw Python object reference graphs with graphviz")
9255 (description
9256 "This package provides tools to draw Python object reference graphs with
9257graphviz.")
9258 (license license:expat)))
9259
9260(define-public python-gevent
9261 (package
9262 (name "python-gevent")
9263 (version "1.3.7")
9264 (source (origin
9265 (method url-fetch)
9266 (uri (pypi-uri "gevent" version))
9267 (sha256
9268 (base32
9269 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
9270 (modules '((guix build utils)))
9271 (snippet
9272 '(begin
9273 ;; unbunding libev and c-ares
9274 (delete-file-recursively "deps")
9275 #t))))
9276 (build-system python-build-system)
9277 (arguments
9278 `(#:modules ((ice-9 ftw)
9279 (ice-9 match)
9280 (srfi srfi-26)
9281 (guix build utils)
9282 (guix build python-build-system))
9283 #:phases (modify-phases %standard-phases
9284 (add-after 'unpack 'unpack-libev
9285 (lambda* (#:key inputs #:allow-other-keys)
9286 (mkdir-p "deps/libev")
9287 ;; FIXME: gevent requires building libev, even though
9288 ;; it only links against the proper one.
9289 (invoke "tar" "-xf" (assoc-ref inputs "libev-source")
9290 "--strip-components=1" "-C" "deps/libev")))
9291 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
9292 (lambda _
9293 (substitute* "src/gevent/subprocess.py"
9294 (("/bin/sh") (which "sh")))
9295 (for-each (lambda (file)
9296 (substitute* file
9297 (("/bin/sh") (which "sh"))
9298 (("/bin/true") (which "true"))))
9299 (find-files "src/greentest" "\\.py$"))
9300 #t))
9301 (add-before 'build 'do-not-use-bundled-sources
9302 (lambda* (#:key inputs #:allow-other-keys)
9303 (setenv "CONFIG_SHELL" (which "bash"))
9304 (setenv "LIBEV_EMBED" "false")
9305 (setenv "CARES_EMBED" "false")
9306 (setenv "EMBED" "false")
9307
9308 (let ((greenlet (string-append
9309 (assoc-ref inputs "python-greenlet")
9310 "/include")))
9311 (match (scandir greenlet
9312 (lambda (item)
9313 (string-prefix? "python" item)))
9314 ((python)
9315 (setenv "CPATH"
9316 (string-append greenlet "/" python)))))
9317 #t))
9318 (add-before 'check 'skip-timer-test
9319 (lambda _
9320 ;; XXX: Skip 'TestTimerResolution', which appears to be
9321 ;; unreliable.
9322 (substitute* "src/greentest/test__core_timer.py"
9323 (("not greentest.RUNNING_ON_CI") "False"))
9324 #t))
9325 (replace 'check
9326 (lambda _
9327 ;; Make sure the build directory is on PYTHONPATH.
9328 (setenv "PYTHONPATH"
9329 (string-append
9330 (getenv "PYTHONPATH") ":"
9331 (getcwd) "/build/"
9332 (car (scandir "build" (cut string-prefix? "lib." <>)))))
9333 (with-directory-excursion "src/greentest"
9334 ;; XXX: Many tests require network access. Instead we only
9335 ;; run known-good tests. Unfortunately we cannot use
9336 ;; recursion here since this directory also contains
9337 ;; Python-version-specific subfolders.
9338 (apply invoke "python" "testrunner.py" "--config"
9339 "known_failures.py"
9340 (scandir "." (cut regexp-exec
9341 (make-regexp "test_+(subprocess|core)")
9342 <>)))))))))
9343 (propagated-inputs
9344 `(("python-greenlet" ,python-greenlet)
9345 ("python-objgraph" ,python-objgraph)))
9346 (native-inputs
9347 `(("libev-source" ,(package-source libev))
9348 ("python-six" ,python-six)))
9349 (inputs
9350 `(("c-ares" ,c-ares)
9351 ("libev" ,libev)))
9352 (home-page "http://www.gevent.org/")
9353 (synopsis "Coroutine-based network library")
9354 (description
9355 "gevent is a coroutine-based Python networking library that uses greenlet
9356to provide a high-level synchronous API on top of the libev event loop.")
9357 (license license:expat)
9358 (properties `((python2-variant . ,(delay python2-gevent))))))
9359
9360(define-public python2-gevent
9361 (let ((base (package-with-python2
9362 (strip-python2-variant python-gevent))))
9363 (package
9364 (inherit base)
9365 (native-inputs `(,@(package-native-inputs python-gevent)
9366 ("python-mock" ,python2-mock))))))
9367
9368(define-public python-fastimport
9369 (package
9370 (name "python-fastimport")
9371 (version "0.9.6")
9372 (source
9373 (origin
9374 (method url-fetch)
9375 (uri (pypi-uri "fastimport" version))
9376 (sha256
9377 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
9378 (build-system python-build-system)
9379 (home-page "https://github.com/jelmer/python-fastimport")
9380 (synopsis "VCS fastimport parser and generator in Python")
9381 (description "This package provides a parser for and generator of the Git
9382@url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
9383format.")
9384 (license license:gpl2+)))
9385
9386(define-public python2-fastimport
9387 (package-with-python2 python-fastimport))
9388
9389(define-public python-twisted
9390 (package
9391 (name "python-twisted")
e5ba2fe3 9392 (version "17.5.0")
44d10b1f
RW
9393 (source (origin
9394 (method url-fetch)
9395 (uri (pypi-uri "Twisted" version ".tar.bz2"))
9396 (sha256
9397 (base32
e5ba2fe3 9398 "1sh2h23nnizcdyrl2rn7zxijglikxwz7z7grqpvq496zy2aa967i"))))
44d10b1f
RW
9399 (build-system python-build-system)
9400 (arguments
9401 '(#:tests? #f)) ; FIXME: Some tests are failing.
9402 ;; #:phases
9403 ;; (modify-phases %standard-phases
9404 ;; (replace 'check
9405 ;; (lambda _
9406 ;; (zero? (system* "./bin/trial" "twisted")))))
9407 (propagated-inputs
9408 `(("python-zope-interface" ,python-zope-interface)
9409 ("python-incremental" ,python-incremental)
e5ba2fe3 9410 ("python-hyperlink" ,python-hyperlink)
44d10b1f
RW
9411 ("python-constantly" ,python-constantly)
9412 ("python-automat" ,python-automat)))
9413 (home-page "https://twistedmatrix.com/")
9414 (synopsis "Asynchronous networking framework written in Python")
9415 (description
9416 "Twisted is an extensible framework for Python programming, with special
9417focus on event-based network programming and multiprotocol integration.")
9418 (license license:expat)))
9419
9420(define-public python2-twisted
9421 (package-with-python2 python-twisted))
9422
9423(define-public python-pika
9424 (package
9425 (name "python-pika")
9426 (version "0.12.0")
9427 (source
9428 (origin
9429 (method url-fetch)
9430 (uri (pypi-uri "pika" version))
9431 (sha256
9432 (base32
9433 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
9434 (build-system python-build-system)
9435 (native-inputs
9436 `(("python-pyev" ,python-pyev)
9437 ("python-tornado" ,python-tornado)
9438 ("python-twisted" ,python-twisted)))
9439 (home-page "https://pika.readthedocs.org")
9440 (synopsis "Pure Python AMQP Client Library")
9441 (description
9442 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
9443Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
9444network support library.")
9445 (license license:bsd-3)))
9446
9447(define-public python2-pika
9448 (package-with-python2 python-pika))
9449
9450(define-public python-ply
9451 (package
9452 (name "python-ply")
9453 (version "3.10")
9454 (source
9455 (origin
9456 (method url-fetch)
9457 (uri (pypi-uri "ply" version))
9458 (sha256
9459 (base32
9460 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
9461 (build-system python-build-system)
9462 (home-page "http://www.dabeaz.com/ply/")
9463 (synopsis "Python Lex & Yacc")
9464 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
9465It uses LR parsing and does extensive error checking.")
9466 (license license:bsd-3)))
9467
9468(define-public python2-ply
9469 (package-with-python2 python-ply))
9470
9471(define-public python-tabulate
9472 (package
9473 (name "python-tabulate")
9474 (version "0.7.7")
9475 (source (origin
9476 (method url-fetch)
9477 (uri (pypi-uri "tabulate" version))
9478 (sha256
9479 (base32
9480 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
9481 (build-system python-build-system)
9482 (arguments
9483 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
9484 ;; and the latest release is not tagged in the upstream repository.
9485 '(#:tests? #f))
9486 (home-page "https://bitbucket.org/astanin/python-tabulate")
9487 (synopsis "Pretty-print tabular data")
9488 (description
9489 "Tabulate is a library and command-line utility to pretty-print tabular
9490data in Python.")
9491 (license license:expat)))
9492
9493(define-public python2-tabulate
9494 (package-with-python2 python-tabulate))
9495
9496(define-public python-kazoo
9497 (package
9498 (name "python-kazoo")
9499 (version "2.4.0")
9500 (source
9501 (origin
9502 (method url-fetch)
9503 (uri (pypi-uri "kazoo" version))
9504 (sha256
9505 (base32
9506 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
9507 (build-system python-build-system)
9508 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
9509 (propagated-inputs
9510 `(("python-six" ,python-six)))
9511 (home-page "https://kazoo.readthedocs.org")
9512 (synopsis "High-level Zookeeper client library")
9513 (description
9514 "Kazoo is a Python client library for the Apache Zookeeper distributed
9515application service. It is designed to be easy to use and to avoid common
9516programming errors.")
9517 (license license:asl2.0)))
9518
9519(define-public python2-kazoo
9520 (package-with-python2 python-kazoo))
9521
9522(define-public python-pykafka
9523 (package
9524 (name "python-pykafka")
9525 (version "2.4.0")
9526 (source (origin
9527 (method url-fetch)
0ca1d040 9528 (uri (pypi-uri "pykafka" version))
44d10b1f
RW
9529 (sha256
9530 (base32
9531 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
9532 (build-system python-build-system)
9533 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
9534 (propagated-inputs
9535 `(("python-gevent" ,python-gevent)
9536 ("python-kazoo" ,python-kazoo)
9537 ("python-tabulate" ,python-tabulate)))
9538 (inputs
9539 `(("librdkafka" ,librdkafka)))
9540 (home-page "https://pykafka.readthedocs.io/")
9541 (synopsis "Apache Kafka client for Python")
9542 (description
9543 "PyKafka is a client for the Apache Kafka distributed messaging system.
9544It includes Python implementations of Kafka producers and consumers, which
9545are optionally backed by a C extension built on librdkafka.")
9546 (license license:asl2.0)))
9547
9548(define-public python2-pykafka
9549 (package-with-python2 python-pykafka))
9550
9551(define-public python-wcwidth
9552 (package
9553 (name "python-wcwidth")
9554 (version "0.1.7")
9555 (source
9556 (origin
9557 (method url-fetch)
9558 (uri (pypi-uri "wcwidth" version))
9559 (sha256
9560 (base32
9561 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
9562 (build-system python-build-system)
9563 (home-page "https://github.com/jquast/wcwidth")
9564 (synopsis "Measure number of terminal column cells of wide-character codes")
9565 (description "Wcwidth measures the number of terminal column cells of
9566wide-character codes. It is useful for those implementing a terminal emulator,
9567or programs that carefully produce output to be interpreted by one. It is a
9568Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
9569specified in POSIX.1-2001 and POSIX.1-2008.")
9570 (license license:expat)))
9571
9572(define-public python2-wcwidth
9573 (package-with-python2 python-wcwidth))
9574
9575(define-public python2-jsonrpclib
9576 (package
9577 (name "python2-jsonrpclib")
9578 (version "0.1.7")
9579 (source (origin
9580 (method url-fetch)
6571bba0 9581 (uri (pypi-uri "jsonrpclib" version))
44d10b1f
RW
9582 (sha256
9583 (base32
9584 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
9585 (build-system python-build-system)
9586 (arguments
9587 `(#:tests? #f
9588 #:python ,python-2))
9589 (home-page "https://github.com/joshmarshall/jsonrpclib/")
9590 (synopsis "Implementation of JSON-RPC specification for Python")
9591 (description
9592 "This library is an implementation of the JSON-RPC specification.
9593It supports both the original 1.0 specification, as well as the
9594new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
9595etc.")
9596 (license license:asl2.0)))
9597
9598(define-public python-chai
9599 (package
9600 (name "python-chai")
9601 (version "1.1.2")
9602 (source (origin
9603 (method url-fetch)
9604 (uri (pypi-uri "chai" version))
9605 (sha256
9606 (base32
9607 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
9608 (build-system python-build-system)
9609 (home-page "https://github.com/agoragames/chai")
9610 (synopsis "Mocking framework for Python")
9611 (description
9612 "Chai provides an api for mocking, stubbing and spying your python
9613objects, patterned after the Mocha library for Ruby.")
9614 (license license:bsd-3)))
9615
9616(define-public python2-chai
9617 (package-with-python2 python-chai))
9618
9619(define-public python-inflection
9620 (package
9621 (name "python-inflection")
9622 (version "0.3.1")
9623 (source
9624 (origin (method url-fetch)
9625 (uri (pypi-uri "inflection" version))
9626 (sha256
9627 (base32
9628 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
9629 (build-system python-build-system)
9630 (native-inputs
9631 `(("python-pytest" ,python-pytest)))
9632 (home-page "https://github.com/jpvanhal/inflection")
9633 (synopsis "Python string transformation library")
9634 (description
9635 "Inflection is a string transformation library. It singularizes
9636and pluralizes English words, and transforms strings from CamelCase to
9637underscored string.")
9638 (license license:expat)))
9639
9640(define-public python2-inflection
9641 (package-with-python2 python-inflection))
9642
9643(define-public python-pylev
9644 (package
9645 (name "python-pylev")
9646 (version "1.3.0")
9647 (source (origin
9648 (method url-fetch)
9649 (uri (pypi-uri "pylev" version))
9650 (sha256
9651 (base32
9652 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
9653 (build-system python-build-system)
9654 (home-page "https://github.com/toastdriven/pylev")
9655 (synopsis "Levenshtein distance implementation in Python")
9656 (description "Pure Python Levenshtein implementation, based off the
9657Wikipedia code samples at
9658@url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
9659 (license license:bsd-3)))
9660
9661(define-public python2-pylev
9662 (package-with-python2 python-pylev))
9663
9664(define-public python-cleo
9665 (package
9666 (name "python-cleo")
9667 (version "0.6.1")
9668 (source (origin
9669 (method url-fetch)
9670 (uri (pypi-uri "cleo" version))
9671 (sha256
9672 (base32
9673 "0q1cf0szr0d54am4pypzwdnm74zpladdsinad94c2fz5i06fdpf7"))))
9674 (build-system python-build-system)
9675 (native-inputs
9676 `(;; For testing
9677 ("python-mock" ,python-mock)
9678 ("python-pytest-mock" ,python-pytest-mock)
9679 ("python-pytest" ,python-pytest)))
9680 (propagated-inputs
9681 `(("python-backpack" ,python-backpack)
9682 ("python-pastel" ,python-pastel)
9683 ("python-pylev" ,python-pylev)))
9684 (home-page "https://github.com/sdispater/cleo")
9685 (synopsis "Command-line arguments library for Python")
9686 (description
9687 "Cleo allows you to create command-line commands with signature in
9688docstring and colored output.")
9689 (license license:expat)))
9690
9691(define-public python2-cleo
9692 (package-with-python2 python-cleo))
9693
9694(define-public python-lazy-object-proxy
9695 (package
9696 (name "python-lazy-object-proxy")
9697 (version "1.3.1")
9698 (source (origin
9699 (method url-fetch)
9700 (uri (pypi-uri "lazy-object-proxy" version))
9701 (sha256
9702 (base32
9703 "0yha7q9bhw857fwaby785d63mffhngl9npwzlk9i0pwlkwvbx4gb"))))
9704 (build-system python-build-system)
9705 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
9706 (synopsis "Lazy object proxy for python")
9707 (description
9708 "Lazy object proxy is an object that wraps a callable but defers the call
9709until the object is actually required, and caches the result of said call.")
9710 (license license:bsd-2)))
9711
9712(define-public python2-lazy-object-proxy
9713 (package-with-python2 python-lazy-object-proxy))
9714
9715(define-public python-dnspython
9716 (package
9717 (name "python-dnspython")
9718 (version "1.15.0")
9719 (source (origin
9720 (method url-fetch)
9721 (uri (string-append "http://www.dnspython.org/kits/"
9722 version "/dnspython-" version ".tar.gz"))
9723 (sha256
9724 (base32
9725 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
9726 (build-system python-build-system)
9727 (arguments '(#:tests? #f)) ; XXX: requires internet access
9728 (home-page "http://www.dnspython.org")
9729 (synopsis "DNS toolkit for Python")
9730 (description
9731 "dnspython is a DNS toolkit for Python. It supports almost all record
9732types. It can be used for queries, zone transfers, and dynamic updates.
9733It supports TSIG authenticated messages and EDNS0.")
9734 (license license:expat)))
9735
9736(define-public python2-dnspython
9737 (package-with-python2 python-dnspython))
9738
9739(define-public python-email-validator
9740 (package
9741 (name "python-email-validator")
9742 (version "1.0.2")
9743 (source
9744 (origin (method url-fetch)
9745 (uri (pypi-uri "email_validator" version))
9746 (sha256
9747 (base32
9748 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
9749 (build-system python-build-system)
9750 (arguments
9751 '(#:phases
9752 (modify-phases %standard-phases
9753 (add-before 'build 'use-dnspython
9754 (lambda _
9755 (substitute* "setup.py"
9756 (("dnspython3") "dnspython"))
9757 #t)))))
9758 (propagated-inputs
9759 `(("python-dnspython" ,python-dnspython)
9760 ("python-idna" ,python-idna)))
9761 (home-page "https://github.com/JoshData/python-email-validator")
9762 (synopsis "Email address validation library for Python")
9763 (description
9764 "This library validates email address syntax and deliverability.")
9765 (license license:cc0)))
9766
9767(define-public python2-email-validator
9768 (package-with-python2 python-email-validator))
9769
9770(define-public python-ukpostcodeparser
9771 (package
9772 (name "python-ukpostcodeparser")
9773 (version "1.0.3")
9774 (source (origin
9775 (method url-fetch)
9776 (uri (pypi-uri "UkPostcodeParser" version))
9777 (sha256
9778 (base32
9779 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
9780 (build-system python-build-system)
9781 (home-page "https://github.com/hamstah/ukpostcodeparser")
9782 (synopsis "UK Postcode parser for Python")
9783 (description
9784 "This library provides the @code{parse_uk_postcode} function for
9785parsing UK postcodes.")
9786 (license license:expat)))
9787
9788(define-public python2-ukpostcodeparser
9789 (package-with-python2 python-ukpostcodeparser))
9790
9791(define-public python-faker
9792 (package
9793 (name "python-faker")
9794 (version "0.7.9")
9795 (source (origin
9796 (method url-fetch)
9797 (uri (pypi-uri "Faker" version))
9798 (sha256
9799 (base32
9800 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
9801 (patches
9802 (search-patches "python-faker-fix-build-32bit.patch"))
9803 (modules '((guix build utils)))
9804 (snippet
9805 '(begin
9806 (for-each delete-file (find-files "." "\\.pyc$"))
9807 #t))))
9808 (build-system python-build-system)
9809 (arguments
9810 '(#:phases
9811 (modify-phases %standard-phases
9812 (replace 'check
49ff8827 9813 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
44d10b1f
RW
9814 (native-inputs
9815 `(;; For testing
9816 ("python-email-validator" ,python-email-validator)
9817 ("python-mock" ,python-mock)
9818 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
9819 (propagated-inputs
9820 `(("python-dateutil" ,python-dateutil)
9821 ("python-six" ,python-six)))
9822 (home-page "https://github.com/joke2k/faker")
9823 (synopsis "Python package that generates fake data")
9824 (description
9825 "Faker is a Python package that generates fake data such as names,
9826addresses, and phone numbers.")
9827 (license license:expat)
9828 (properties `((python2-variant . ,(delay python2-faker))))))
9829
9830(define-public python2-faker
9831 (let ((base (package-with-python2 (strip-python2-variant
9832 python-faker))))
9833 (package
9834 (inherit base)
9835 (propagated-inputs
9836 `(("python2-ipaddress" ,python2-ipaddress)
9837 ,@(package-propagated-inputs base))))))
9838
9839(define-public python-pyaml
9840 (package
9841 (name "python-pyaml")
9842 (version "18.11.0")
9843 (source (origin
9844 (method url-fetch)
9845 (uri (pypi-uri "pyaml" version))
9846 (sha256
9847 (base32
9848 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
9849 (build-system python-build-system)
9850 (native-inputs
9851 `(("python-unidecode" ,python-unidecode)))
9852 (propagated-inputs
9853 `(("python-pyyaml" ,python-pyyaml)))
9854 (home-page "https://github.com/mk-fg/pretty-yaml")
9855 (synopsis "YAML pretty-print library for Python")
9856 (description
9857 "pyaml is a PyYAML based python module to produce pretty and readable
9858YAML-serialized data.")
9859 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
9860
9861(define-public python2-pyaml
9862 (package-with-python2 python-pyaml))
9863
9864(define-public python-backpack
9865 (package
9866 (name "python-backpack")
9867 (version "0.1")
9868 (source
9869 (origin
9870 (method url-fetch)
9871 (uri (pypi-uri "backpack" version))
9872 (sha256
9873 (base32
9874 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
9875 (build-system python-build-system)
9876 (native-inputs
9877 `(("python-pytest" ,python-pytest)
9878 ("python-nose" ,python-nose)))
9879 (propagated-inputs
9880 `(("python-simplejson" ,python-simplejson)))
9881 (home-page "https://github.com/sdispater/backpack")
9882 (synopsis "Utilities for working with Python collections")
9883 (description "Backpack provides some useful utilities for working with
9884collections of data.")
9885 (license license:expat)))
9886
9887(define-public python2-backpack
9888 (package-with-python2 python-backpack))
9889
9890(define-public python-prompt-toolkit
9891 (package
9892 (name "python-prompt-toolkit")
9893 (version "2.0.7")
9894 (source
9895 (origin
9896 (method url-fetch)
9897 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
9898 (sha256
9899 (base32
9900 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
9901 (build-system python-build-system)
9902 (arguments
9903 `(#:phases
9904 (modify-phases %standard-phases
9905 (delete 'check)
9906 (add-after 'install 'post-install-check
9907 (lambda* (#:key inputs outputs #:allow-other-keys)
9908 ;; HOME is needed for the test
9909 ;; "test_pathcompleter_can_expanduser".
9910 (setenv "HOME" "/tmp")
9911 (add-installed-pythonpath inputs outputs)
9912 (invoke "py.test"))))))
9913 (propagated-inputs
9914 `(("python-wcwidth" ,python-wcwidth)
9915 ("python-six" ,python-six)
9916 ("python-pygments" ,python-pygments)))
9917 (native-inputs
9918 `(("python-pytest" ,python-pytest)))
9919 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
9920 (synopsis "Library for building command line interfaces in Python")
9921 (description
9922 "Prompt-Toolkit is a library for building interactive command line
9923interfaces in Python. It's like GNU Readline but it also features syntax
9924highlighting while typing, out-of-the-box multi-line input editing, advanced
9925code completion, incremental search, support for Chinese double-width
9926characters, mouse support, and auto suggestions.")
9927 (license license:bsd-3)))
9928
9929(define-public python2-prompt-toolkit
9930 (package-with-python2 python-prompt-toolkit))
9931
9932(define-public python-prompt-toolkit-1
9933 (package (inherit python-prompt-toolkit)
9934 (version "1.0.15")
9935 (source
9936 (origin
9937 (method url-fetch)
9938 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
9939 (sha256
9940 (base32
9941 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
9942
9943(define-public python2-prompt-toolkit-1
9944 (package-with-python2 python-prompt-toolkit-1))
9945
9946(define-public python-jedi
9947 (package
9948 (name "python-jedi")
40bd0aa3 9949 (version "0.13.2")
44d10b1f
RW
9950 (source
9951 (origin
9952 (method url-fetch)
9953 (uri (pypi-uri "jedi" version))
9954 (sha256
9955 (base32
40bd0aa3 9956 "1za944msp0f8x36qa8l309jhv0kzlsdh7r9nj3z12y8npnsh45sp"))))
44d10b1f
RW
9957 (build-system python-build-system)
9958 (arguments
40bd0aa3 9959 `( ;; Many tests are failing with Python 3.7.x as of version 0.13.2 (see:
44d10b1f
RW
9960 ;; https://github.com/davidhalter/jedi/issues/1263)
9961 #:tests? #f
9962 #:phases
9963 (modify-phases %standard-phases
9964 (replace 'check
9965 (lambda* (#:key tests? #:allow-other-keys)
9966 (when tests?
9967 (invoke "py.test" "-vv")))))))
9968 (native-inputs
9969 `(("python-pytest" ,python-pytest)
9970 ("python-docopt" ,python-docopt)))
9971 (propagated-inputs
9972 `(("python-parso" ,python-parso)))
9973 (home-page "https://github.com/davidhalter/jedi")
9974 (synopsis "Autocompletion and static analysis library for Python")
9975 (description
9976 "Jedi is a static analysis tool for Python that can be used in Integrated
9977Development Environments (@dfn{IDE}s) and text editors. It understands Python
9978on a deeper level than many other static analysis frameworks for Python.
9979
9980Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
9981well.")
9982 (license license:expat)))
9983
9984(define-public python2-jedi
9985 (package-with-python2 python-jedi))
9986
9987(define-public ptpython
9988 (package
9989 (name "ptpython")
9990 (version "0.34")
9991 (source (origin
9992 (method url-fetch)
9993 (uri (pypi-uri "ptpython" version))
9994 (sha256
9995 (base32
9996 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
9997 (build-system python-build-system)
9998 (arguments
9999 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
10000 (propagated-inputs
10001 `(("python-docopt" ,python-docopt)
10002 ("python-jedi" ,python-jedi)
10003 ("python-prompt-toolkit" ,python-prompt-toolkit)
10004 ("python-pygments" ,python-pygments)))
10005 (home-page "https://github.com/jonathanslenders/ptpython")
10006 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10007 (description
10008 "ptpython is a Python read-eval-print loop with IDE-like features.
10009It supports syntax highlighting, multiline editing, autocompletion, mouse,
10010color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10011etc.")
10012 (license license:bsd-3)
10013 (properties `((python2-variant . ,(delay ptpython-2))))))
10014
10015(define-public ptpython-2
10016 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10017 (package
10018 (inherit base)
10019 (name "ptpython2"))))
10020
10021(define-public python-stem
10022 (package
10023 (name "python-stem")
10024 (version "1.7.0")
10025 (source
10026 (origin
10027 (method url-fetch)
10028 (uri (pypi-uri "stem" version))
10029 (sha256
10030 (base32
10031 "1awiglfiajnx2hva9aqpj3fmdvdb4qg7cwnlfyih827m68y3cq8v"))))
10032 (build-system python-build-system)
10033 (arguments
10034 `(#:phases
10035 (modify-phases %standard-phases
10036 (replace 'check
10037 (lambda _
10038 (invoke "./run_tests.py" "--unit")
10039 #t)))))
10040 (native-inputs
10041 `(("python-mock" ,python-mock)
10042 ("python-pycodestyle" ,python-pycodestyle)
10043 ("python-pyflakes" ,python-pyflakes)))
10044 (home-page "https://stem.torproject.org/")
10045 (synopsis
10046 "Python controller library that allows applications to interact with Tor")
10047 (description
10048 "Stem is a Python controller library for Tor. With it you can use Tor's
10049control protocol to script against the Tor process and read descriptor data
10050relays publish about themselves.")
10051 (license license:lgpl3)))
10052
10053(define-public python2-stem
10054 (package-with-python2 python-stem))
10055
10056(define-public python-pyserial
10057 (package
10058 (name "python-pyserial")
10059 (version "3.1.1")
10060 (source
10061 (origin
10062 (method url-fetch)
10063 (uri (pypi-uri "pyserial" version))
10064 (sha256
10065 (base32
10066 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
10067 (build-system python-build-system)
10068 (arguments
10069 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
10070 ;; #:phases
10071 ;; (modify-phases %standard-phases
10072 ;; (replace 'check
10073 ;; (lambda _
10074 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
10075 (home-page
10076 "https://github.com/pyserial/pyserial")
10077 (synopsis "Python Serial Port Bindings")
10078 (description "@code{pyserial} provide serial port bindings for Python. It
10079supports different byte sizes, stop bits, parity and flow control with RTS/CTS
10080and/or Xon/Xoff. The port is accessed in RAW mode.")
10081 (license license:bsd-3)))
10082
10083(define-public python2-pyserial
10084 (package-with-python2 python-pyserial))
10085
10086(define-public python-kivy
10087 (package
10088 (name "python-kivy")
10089 (version "1.10.1")
10090 (source
10091 (origin
10092 (method url-fetch)
10093 (uri (pypi-uri "Kivy" version))
10094 (file-name (string-append name "-" version ".tar.gz"))
10095 (sha256
10096 (base32
10097 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
10098 (build-system python-build-system)
10099 (arguments
10100 `(#:tests? #f ; Tests require many optional packages
10101 #:phases
10102 (modify-phases %standard-phases
10103 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
10104 (lambda* (#:key inputs #:allow-other-keys)
10105 (setenv "KIVY_SDL2_PATH"
10106 (string-append (assoc-ref inputs "sdl-union")
10107 "/include/SDL2"))
10108 #t)))))
10109 (native-inputs
10110 `(("git" ,git)
10111 ("pkg-config" ,pkg-config)
10112 ("python-cython" ,python-cython)))
10113 (inputs
10114 `(("gstreamer" ,gstreamer)
10115 ("mesa" ,mesa)
10116 ("sdl-union"
10117 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
10118 (home-page "http://kivy.org")
10119 (synopsis
10120 "Multitouch application framework")
10121 (description
10122 "A software library for rapid development of
10123hardware-accelerated multitouch applications.")
10124 (license license:expat)))
10125
10126(define-public python2-kivy
10127 (package-with-python2 python-kivy))
10128
10129(define-public python-kivy-next
10130 (deprecated-package "python-kivy-next" python-kivy))
10131
10132(define-public python2-kivy-next
10133 (deprecated-package "python2-kivy-next" python2-kivy))
10134
10135(define-public python-binaryornot
10136 (package
10137 (name "python-binaryornot")
10138 (version "0.4.4")
10139 (source (origin
10140 (method url-fetch)
10141 (uri (pypi-uri "binaryornot" version))
10142 (sha256
10143 (base32
10144 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
10145 (build-system python-build-system)
10146 (propagated-inputs
10147 `(("python-chardet" ,python-chardet)
10148 ("python-hypothesis" ,python-hypothesis)))
10149 (home-page "https://github.com/audreyr/binaryornot")
10150 (synopsis "Package to check if a file is binary or text")
10151 (description "Ultra-lightweight pure Python package to check if a file is
10152binary or text.")
10153 (license license:bsd-3)
10154 (properties `((python2-variant . ,(delay python2-binaryornot))))))
10155
10156(define-public python2-binaryornot
10157 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
10158 (package (inherit base)
10159 (propagated-inputs
10160 `(("python2-enum34" ,python2-enum34)
10161 ,@(package-propagated-inputs base))))))
10162
10163(define-public python-nltk
10164 (package
10165 (name "python-nltk")
10166 (version "3.2.1")
10167 (source (origin
10168 (method url-fetch)
10169 (uri (pypi-uri "nltk" version))
10170 (sha256
10171 (base32
10172 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
10173 (build-system python-build-system)
10174 (arguments
10175 '(;; The tests require some extra resources to be downloaded.
10176 ;; TODO Try packaging these resources.
10177 #:tests? #f))
10178 (home-page "http://nltk.org/")
10179 (synopsis "Natural Language Toolkit")
10180 (description "It provides interfaces to over 50 corpora and lexical
10181resources such as WordNet, along with a suite of text processing libraries
10182for classification, tokenization, stemming, tagging, parsing, and semantic
10183reasoning, wrappers for natural language processing libraries.")
10184 (license license:asl2.0)))
10185
10186(define-public python2-nltk
10187 (package-with-python2 python-nltk))
10188
10189(define-public python-pymongo
10190 (package
10191 (name "python-pymongo")
10192 (version "3.7.2")
10193 (source (origin
10194 (method url-fetch)
10195 (uri (pypi-uri "pymongo" version))
10196 (sha256
10197 (base32
10198 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
10199 (build-system python-build-system)
10200 (propagated-inputs
10201 `(("python-certifi" ,python-certifi)))
10202 (home-page "https://github.com/mongodb/mongo-python-driver")
10203 (synopsis "Python driver for MongoDB")
10204 (description "Python driver for MongoDB.")
10205 (license license:asl2.0)))
10206
10207(define-public python2-pymongo
10208 (package-with-python2 python-pymongo))
10209
44d10b1f
RW
10210(define-public python-consul
10211 (package
10212 (name "python-consul")
10213 (version "0.6.1")
10214 (source
10215 (origin
10216 (method url-fetch)
10217 (uri (pypi-uri "python-consul" version))
10218 (sha256
10219 (base32
10220 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
10221 (build-system python-build-system)
10222 (arguments
10223 '(#:tests? #f)) ; The tests are not distributed
10224 (propagated-inputs
10225 `(("python-requests" ,python-requests)
10226 ("python-six" ,python-six)))
10227 (home-page "https://github.com/cablehead/python-consul")
10228 (synopsis "Python client for Consul")
10229 (description
10230 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
10231discovery, monitoring and configuration.")
10232 (license license:expat)))
10233
10234(define-public python2-consul
10235 (package-with-python2 python-consul))
10236
10237(define-public python-schematics
10238 (package
10239 (name "python-schematics")
10240 (version "1.1.1")
10241 (source
1961d187
TGR
10242 (origin
10243 (method git-fetch)
10244 (uri (git-reference
10245 (url "https://github.com/schematics/schematics.git")
10246 (commit (string-append "v" version))))
10247 (file-name (git-file-name name version))
10248 (sha256
10249 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
44d10b1f
RW
10250 (build-system python-build-system)
10251 (propagated-inputs
10252 `(("python-six" ,python-six)))
10253 (arguments
1961d187
TGR
10254 ;; The tests require a bunch of not very nice packages with fixed
10255 ;; version requirements (e.g. python-coveralls).
10256 `(#:tests? #f))
44d10b1f
RW
10257 (home-page "https://github.com/schematics/schematics")
10258 (synopsis "Python Data Structures for Humans")
10259 (description "Python Data Structures for Humans.")
10260 (license license:bsd-3)))
10261
10262(define-public python2-schematics
10263 (package-with-python2 python-schematics))
10264
10265(define-public python-odfpy
10266 (package
10267 (name "python-odfpy")
10268 (version "1.3.3")
10269 (source (origin
10270 (method url-fetch)
10271 (uri (pypi-uri "odfpy" version))
10272 (sha256
10273 (base32
10274 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
10275 (arguments
10276 `(#:modules ((srfi srfi-1)
10277 (guix build python-build-system)
10278 (guix build utils))
10279 #:phases
10280 (modify-phases %standard-phases
10281 (replace 'check
10282 ;; The test runner invokes python2 and python3 for test*.py.
10283 ;; To avoid having both in inputs, we replicate it here.
10284 (lambda _
21ccc01d
RW
10285 (for-each (lambda (test-file) (invoke "python" test-file))
10286 (find-files "tests" "^test.*\\.py$"))
10287 #t)))))
44d10b1f
RW
10288 (build-system python-build-system)
10289 (home-page "https://github.com/eea/odfpy")
10290 (synopsis "Python API and tools to manipulate OpenDocument files")
10291 (description "Collection of libraries and utility programs written in
10292Python to manipulate OpenDocument 1.2 files.")
10293 (license
10294 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
10295 ;; number of files with other licenses.
10296 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
10297
10298(define-public python2-odfpy
10299 (package-with-python2 python-odfpy))
10300
10301(define-public python-natsort
10302 (package
10303 (name "python-natsort")
10304 (version "5.4.1")
10305 (source (origin
10306 (method url-fetch)
10307 (uri (pypi-uri "natsort" version))
10308 (sha256
10309 (base32
10310 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
10311 (build-system python-build-system)
10312 (arguments
10313 `(#:modules ((guix build utils)
10314 (guix build python-build-system)
10315 (srfi srfi-1)
10316 (srfi srfi-26)
10317 (ice-9 ftw))
10318 #:phases
10319 (modify-phases %standard-phases
10320 (add-before 'check 'set-cachedir
10321 ;; Tests require write access to $HOME by default
10322 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
10323 (replace 'check
10324 (lambda _
10325 (let ((cwd (getcwd)))
10326 (setenv "PYTHONPATH"
10327 (string-append
10328 cwd "/build/"
10329 (find (cut string-prefix? "lib" <>)
10330 (scandir (string-append cwd "/build")))
10331 ":"
10332 (getenv "PYTHONPATH")))
10333 (invoke "pytest" "-v")))))))
10334 (native-inputs
10335 `(("python-hypothesis" ,python-hypothesis)
10336 ("python-pytest-cov" ,python-pytest-cov)
10337 ("python-pytest-mock" ,python-pytest-mock)
10338 ("python-pytest" ,python-pytest)))
10339 (propagated-inputs ; TODO: Add python-fastnumbers.
10340 `(("python-pyicu" ,python-pyicu)))
10341 (home-page "https://github.com/SethMMorton/natsort")
10342 (synopsis "Natural sorting for python and shell")
10343 (description
10344 "Natsort lets you apply natural sorting on lists instead of
10345lexicographical. If you use the built-in @code{sorted} method in python
36a4366d
EF
10346on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
10347@code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
10348@code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
10349identifies numbers and sorts them separately from strings. It can also sort
10350version numbers, real numbers, mixed types and more, and comes with a shell
10351command @command{natsort} that exposes this functionality in the command line.")
44d10b1f
RW
10352 (license license:expat)
10353 (properties `((python2-variant . ,(delay python2-natsort))))))
10354
10355(define-public python2-natsort
10356 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
10357 (package (inherit base)
10358 (native-inputs
10359 `(("python2-pathlib" ,python2-pathlib)
10360 ,@(package-native-inputs base))))))
10361
10362(define-public python-glances
10363 (package
10364 (name "python-glances")
10365 (version "3.0.2")
10366 (source
10367 (origin
10368 (method url-fetch)
10369 (uri (pypi-uri "Glances" version))
10370 (sha256
10371 (base32
10372 "09fxysfp1n16csqvzvawy74qm6a94nvwjf3vcf5gkqp4i6k4vjjy"))))
10373 (build-system python-build-system)
10374 (propagated-inputs
10375 `(("python-psutil" ,python-psutil)))
10376 (home-page
10377 "https://github.com/nicolargo/glances")
10378 (synopsis
10379 "A cross-platform curses-based monitoring tool")
10380 (description
10381 "Glances is a curses-based monitoring tool for a wide variety of platforms.
10382Glances uses the PsUtil library to get information from your system. It monitors
10383CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
10384 (license license:lgpl3+)))
10385
10386(define-public python2-glances
10387 (package-with-python2 python-glances))
10388
10389(define-public python-graphql-core
10390 (package
10391 (name "python-graphql-core")
10392 (version "0.5.3")
10393 (source
10394 (origin
10395 (method url-fetch)
10396 (uri (pypi-uri "graphql-core" version))
10397 (sha256
10398 (base32
10399 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
10400 (build-system python-build-system)
10401 (arguments
10402 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
10403 #:phases
10404 (modify-phases %standard-phases
10405 (add-after 'unpack 'patch-hardcoded-version
10406 (lambda _ (substitute*
10407 "setup.py"
10408 (("'gevent==1.1rc1'") "'gevent'"))
10409 #t)))))
10410 (native-inputs
10411 `(("python-gevent" ,python-gevent)
10412 ("python-mock" ,python-mock)
10413 ("python-pytest-mock" ,python-pytest-mock)))
10414 (propagated-inputs
10415 `(("python-promise" ,python-promise)
10416 ("python-six" ,python-six)))
10417 (home-page "https://github.com/graphql-python/graphql-core")
10418 (synopsis "GraphQL implementation for Python")
10419 (description
10420 "GraphQL implementation for Python. GraphQL is a data query language and
10421runtime designed and used to request and deliver data to mobile and web apps.
10422This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
10423to Python.")
10424 (license license:expat)))
10425
10426(define-public python2-graphql-core
10427 (package-with-python2 python-graphql-core))
10428
10429(define-public python-graphql-relay
10430 (package
10431 (name "python-graphql-relay")
10432 (version "0.4.5")
10433 (source
10434 (origin
10435 (method url-fetch)
10436 (uri (pypi-uri "graphql-relay" version))
10437 (sha256
10438 (base32
10439 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
10440 (build-system python-build-system)
10441 (arguments
10442 '(#:tests? #f)) ; The tests are not distributed
10443 (propagated-inputs
10444 `(("python-graphql-core" ,python-graphql-core)
10445 ("python-promise" ,python-promise)
10446 ("python-six" ,python-six)))
10447 (home-page "https://github.com/graphql-python/graphql-relay-py")
10448 (synopsis "Relay implementation for Python")
10449 (description
10450 "This is a library to allow the easy creation of Relay-compliant servers
10451using the GraphQL Python reference implementation of a GraphQL server. It
10452should be noted that the code is a exact port of the original
10453@url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
10454from Facebook.")
10455 (license license:expat)))
10456
10457(define-public python2-graphql-relay
10458 (package-with-python2 python-graphql-relay))
10459
10460(define-public python-graphene
10461 (package
10462 (name "python-graphene")
10463 (version "0.10.2")
10464 (source
10465 (origin
10466 (method url-fetch)
10467 (uri (pypi-uri "graphene" version))
10468 (sha256
10469 (base32
10470 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
10471 (build-system python-build-system)
10472 (propagated-inputs
10473 `(("python-graphql-core" ,python-graphql-core)
10474 ("python-graphql-relay" ,python-graphql-relay)
10475 ("python-iso8601" ,python-iso8601)
10476 ("python-promise" ,python-promise)
10477 ("python-six" ,python-six)))
10478 (arguments
10479 `(#:tests? #f)) ; no tests/ in the PyPI tarball
10480 (home-page "http://graphene-python.org/")
10481 (synopsis "GraphQL Framework for Python")
10482 (description
10483 "Graphene is a Python library for building GraphQL schemas/types.
10484A GraphQL schema describes your data model, and provides a GraphQL server
10485with an associated set of resolve methods that know how to fetch data.")
10486 (properties `((python2-variant . ,(delay python2-graphene))))
10487 (license license:expat)))
10488
10489(define-public python2-graphene
10490 (let ((base (package-with-python2
10491 (strip-python2-variant python-graphene))))
10492 (package (inherit base)
10493 (native-inputs
10494 `(("python2-sqlalchemy" ,python2-sqlalchemy)
10495 ,@(package-native-inputs base))))))
10496
10497(define-public python-nautilus
10498 (package
10499 (name "python-nautilus")
10500 (version "0.4.9")
10501 (source
10502 (origin
10503 (method url-fetch)
10504 (uri (pypi-uri "nautilus" version))
10505 (sha256
10506 (base32
10507 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
10508 (build-system python-build-system)
10509 (arguments `(#:tests? #f)) ; fails to import test modules
10510 (propagated-inputs
10511 `(("python-bcrypt" ,python-bcrypt)
10512 ("python-click" ,python-click)
10513 ("python-consul" ,python-consul)
10514 ("python-graphene" ,python-graphene)
10515 ("python-jinja2" ,python-jinja2)
10516 ("python-peewee" ,python-peewee)
10517 ("python-pika" ,python-pika)
10518 ("python-tornado" ,python-tornado)
10519 ("python-wtforms" ,python-wtforms)))
10520 (native-inputs
10521 `(("python-nose2" ,python-nose2)))
10522 (home-page "https://github.com/AlecAivazis/nautilus")
10523 (synopsis "Library for creating microservice applications")
10524 (description
10525 "Nautilus is a framework for flux based microservices that looks to
10526provide extendible implementations of common aspects of a cloud so that you can
10527focus on building massively scalable web applications.")
10528 (license license:expat)))
10529
10530(define-public python-snowballstemmer
10531 (package
10532 (name "python-snowballstemmer")
10533 (version "1.2.1")
10534 (source (origin
10535 (method url-fetch)
10536 (uri (pypi-uri "snowballstemmer" version))
10537 (sha256
10538 (base32
10539 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
10540 (build-system python-build-system)
10541 (arguments
10542 `(;; No tests exist
10543 #:tests? #f))
10544 (home-page "https://github.com/shibukawa/snowball_py")
10545 (synopsis "Snowball stemming library collection for Python")
10546 (description "This package provides 16 word stemmer algorithms generated
10547from Snowball algorithms. It includes the 15 original ones plus the Poerter
10548English stemmer.")
10549 (license license:bsd-3)))
10550
10551(define-public python2-snowballstemmer
10552 (package-with-python2 python-snowballstemmer))
10553
10554(define-public python-sphinx-cloud-sptheme
10555 (package
10556 (name "python-sphinx-cloud-sptheme")
10557 (version "1.8.0")
10558 (source (origin
10559 (method url-fetch)
10560 (uri (pypi-uri "cloud_sptheme" version))
10561 (sha256
10562 (base32
10563 "1dniqb6a39yh786f86c4jn666rwnyi1jvzn4616zhcchb7sfdshd"))))
10564 (build-system python-build-system)
10565 ;; FIXME: The 'pypi' release archive does not contain tests.
10566 (arguments '(#:tests? #f))
10567 (native-inputs
10568 `(("python-sphinx" ,python-sphinx)))
10569 (home-page "https://bitbucket.org/ecollins/cloud_sptheme")
10570 (synopsis "'Cloud' theme for Sphinx documenter")
10571 (description "This package contains the \"Cloud\" theme for Sphinx and some
10572related extensions.")
10573 (license license:bsd-3)))
10574
10575(define-public python2-sphinx-cloud-sptheme
10576 (package-with-python2 python-sphinx-cloud-sptheme))
10577
10578(define-public python-sphinx-alabaster-theme
10579 (package
10580 (name "python-sphinx-alabaster-theme")
10581 (version "0.7.12")
10582 (source (origin
10583 (method url-fetch)
10584 (uri (pypi-uri "alabaster" version))
10585 (sha256
10586 (base32
10587 "00nwwjj2d2ym4s2kk217x7jkx1hnczc3fvm8yxbqmsp6b0nxfqd6"))))
10588 (build-system python-build-system)
10589 (propagated-inputs
10590 `(("python-pygments" ,python-pygments)))
10591 (home-page "https://alabaster.readthedocs.io/")
10592 (synopsis "Configurable sidebar-enabled Sphinx theme")
10593 (description "Alabaster is a visually (c)lean, responsive, configurable
10594theme for the Sphinx documentation system. It's the default theme of Sphinx.")
10595 (license license:bsd-3)))
10596
10597(define-public python2-sphinx-alabaster-theme
10598 (package-with-python2 python-sphinx-alabaster-theme))
10599
10600(define-public python-setproctitle
10601(package
10602 (name "python-setproctitle")
10603 (version "1.1.10")
10604 (source
10605 (origin
10606 (method url-fetch)
10607 (uri (pypi-uri "setproctitle" version))
10608 (sha256
10609 (base32
10610 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
10611 (build-system python-build-system)
10612 (arguments
10613 '(#:phases
10614 (modify-phases %standard-phases
10615 (add-before 'check 'patch-Makefile
10616 ;; Stricly this is only required for the python2 variant.
10617 ;; But adding a phase in an inherited package seems to be
10618 ;; cumbersum. So we patch even for python3.
10619 (lambda _
10620 (let ((nose (assoc-ref %build-inputs "python2-nose")))
10621 (when nose
10622 (substitute* "Makefile"
10623 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
10624 (string-append nose "/bin/nosetests "))))
10625 #t)))
10626 (replace 'check
10627 (lambda _
10628 (setenv "PYTHON" (or (which "python3") (which "python")))
10629 (setenv "PYCONFIG" (or (which "python3-config")
10630 (which "python-config")))
10631 (setenv "CC" "gcc")
10632 ;; No need to extend PYTHONPATH to find the built package, since
10633 ;; the Makefile will build anyway
10634 (invoke "make" "check"))))))
10635 (native-inputs
10636 `(("procps" ,procps))) ; required for tests
10637 (home-page
10638 "https://github.com/dvarrazzo/py-setproctitle")
10639 (synopsis
10640 "Setproctitle implementation for Python to customize the process title")
10641 (description "The library allows a process to change its title (as displayed
10642by system tools such as ps and top).
10643
10644Changing the title is mostly useful in multi-process systems, for
10645example when a master process is forked: changing the children's title
10646allows to identify the task each process is busy with. The technique
10647is used by PostgreSQL and the OpenSSH Server for example.")
10648 (license license:bsd-3)
10649 (properties `((python2-variant . ,(delay python2-setproctitle))))))
10650
10651(define-public python2-setproctitle
10652 (let ((base (package-with-python2
10653 (strip-python2-variant python-setproctitle))))
10654 (package
10655 (inherit base)
10656 (native-inputs `(("python2-nose" ,python2-nose)
10657 ,@(package-native-inputs base))))))
10658
10659(define-public python-validictory
10660 (package
10661 (name "python-validictory")
10662 (version "1.0.1")
10663 (source
10664 (origin
10665 (method url-fetch)
10666 (uri (pypi-uri "validictory" version))
10667 (sha256
10668 (base32
10669 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
10670 (build-system python-build-system)
10671 (arguments
10672 '(#:phases
10673 (modify-phases %standard-phases
10674 (add-after 'unpack 'bootstrap
10675 ;; Move the tests out of the package directory to avoid
10676 ;; packaging them.
10677 (lambda* _
10678 (rename-file "validictory/tests" "tests")
10679 (delete-file "tests/__init__.py")))
10680 (replace 'check
10681 (lambda _
10682 ;; Extend PYTHONPATH so the built package will be found.
10683 (setenv "PYTHONPATH"
10684 (string-append (getcwd) "/build/lib:"
10685 (getenv "PYTHONPATH")))
6568bd5d 10686 (invoke "py.test" "-vv" ))))))
44d10b1f
RW
10687 (native-inputs
10688 `(("python-pytest" ,python-pytest)))
10689 (home-page
10690 "https://github.com/jamesturk/validictory")
10691 (synopsis "General purpose Python data validator")
10692 (description "It allows validation of arbitrary Python data structures.
10693
10694The schema format is based on the JSON Schema
10695proposal (http://json-schema.org), so combined with json the library is also
10696useful as a validator for JSON data.")
10697 (license license:expat)))
10698
10699(define-public python2-validictory
10700 (package-with-python2 python-validictory))
10701
10702(define-public python-pyelftools
10703 (package
10704 (name "python-pyelftools")
10705 (version "0.25")
10706 (source
10707 (origin
10708 (method url-fetch)
10709 (uri (pypi-uri "pyelftools" version))
10710 (sha256
10711 (base32
10712 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
10713 (build-system python-build-system)
10714 (arguments
10715 `(#:phases
10716 (modify-phases %standard-phases
10717 (add-before 'check 'set-pythonpath
10718 (lambda _
10719 (setenv "PYTHONPATH"
10720 (string-append
10721 (getcwd) "/test/"
10722 ":" (getenv "PYTHONPATH")))
10723 #t)))))
10724 (home-page
10725 "https://github.com/eliben/pyelftools")
10726 (synopsis
10727 "Analyze binary and library file information")
10728 (description "This Python library provides interfaces for parsing and
10729analyzing two binary and library file formats; the Executable and Linking
10730Format (ELF), and debugging information in the Debugging With Attributed
10731Record Format (DWARF).")
10732 (license license:public-domain)))
10733
10734(define-public python-pyev
10735 (package
10736 (name "python-pyev")
10737 (version "0.9.0")
10738 (source
10739 (origin
10740 (method url-fetch)
10741 (uri (pypi-uri "pyev" version))
10742 (sha256
10743 (base32
10744 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
10745 (build-system python-build-system)
10746 (arguments
10747 `(#:tests? #f ; no test suite
10748 #:phases
10749 (modify-phases %standard-phases
10750 (add-after 'unpack 'patch
10751 (lambda* (#:key inputs #:allow-other-keys)
10752 (let ((libev (string-append (assoc-ref inputs "libev")
10753 "/lib/libev.so.4")))
10754 (substitute* "setup.py"
10755 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
10756 (string-append "libev_dll_name = \"" libev "\"")))))))))
10757 (inputs
10758 `(("libev" ,libev)))
10759 (home-page "http://pythonhosted.org/pyev/")
10760 (synopsis "Python libev interface")
10761 (description "Pyev provides a Python interface to libev.")
10762 (license license:gpl3)))
10763
10764(define-public python2-pyev
10765 (package-with-python2 python-pyev))
10766
10767(define-public python-imagesize
10768 (package
10769 (name "python-imagesize")
10770 (version "1.1.0")
10771 (source
10772 (origin
10773 (method url-fetch)
10774 (uri (pypi-uri "imagesize" version))
10775 (sha256
10776 (base32
10777 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
10778 (build-system python-build-system)
10779 (home-page "https://github.com/shibukawa/imagesize_py")
10780 (synopsis "Gets image size of files in various formats in Python")
10781 (description
10782 "This package allows determination of image size from
10783PNG, JPEG, JPEG2000 and GIF files in pure Python.")
10784 (license license:expat)))
10785
10786(define-public python2-imagesize
10787 (package-with-python2 python-imagesize))
10788
10789(define-public python-termstyle
10790 (package
10791 (name "python-termstyle")
10792 (version "0.1.11")
10793 (source
10794 (origin
10795 (method url-fetch)
10796 (uri (pypi-uri "termstyle" version))
10797 (sha256
10798 (base32
10799 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
10800 (build-system python-build-system)
10801 (arguments
10802 '(#:phases
10803 (modify-phases %standard-phases
10804 (replace 'check
10805 (lambda _
831080a6 10806 (invoke "python" "test3.py"))))))
44d10b1f
RW
10807 (home-page "https://github.com/gfxmonk/termstyle")
10808 (synopsis "Console text coloring for Python")
10809 (description "This package provides console text coloring for Python.")
10810 (license license:bsd-3)))
10811
10812(define-public python-argcomplete
10813 (package
10814 (name "python-argcomplete")
10815 (version "1.7.0")
10816 (source
10817 (origin
10818 (method url-fetch)
10819 (uri (pypi-uri "argcomplete" version))
10820 (sha256
10821 (base32
10822 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
10823 (build-system python-build-system)
10824 (native-inputs
10825 `(("python-pexpect" ,python-pexpect)
10826 ("tcsh" ,tcsh)
10827 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
10828 (home-page "https://github.com/kislyuk/argcomplete")
10829 (synopsis "Shell tab completion for Python argparse")
10830 (description "argcomplete provides extensible command line tab completion
10831of arguments and options for Python scripts using @code{argparse}. It's
10832particularly useful for programs with many options or sub-parsers that can
10833dynamically suggest completions; for example, when browsing resources over the
10834network.")
10835 (license license:asl2.0)))
10836
10837(define-public python2-argcomplete
10838 (package-with-python2 python-argcomplete))
10839
10840(define-public python-xopen
10841 (package
10842 (name "python-xopen")
24d64989 10843 (version "0.5.0")
44d10b1f
RW
10844 (source
10845 (origin
10846 (method url-fetch)
10847 (uri (pypi-uri "xopen" version))
10848 (sha256
10849 (base32
24d64989 10850 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
44d10b1f 10851 (build-system python-build-system)
24d64989
RW
10852 (propagated-inputs
10853 `(("python-setuptools-scm" ,python-setuptools-scm)))
44d10b1f
RW
10854 (home-page "https://github.com/marcelm/xopen/")
10855 (synopsis "Open compressed files transparently")
10856 (description "This module provides an @code{xopen} function that works like
10857Python's built-in @code{open} function, but can also deal with compressed files.
10858Supported compression formats are gzip, bzip2 and, xz, and are automatically
10859recognized by their file extensions. The focus is on being as efficient as
10860possible on all supported Python versions.")
10861 (license license:expat)))
10862
10863(define-public python2-xopen
10864 (let ((base (package-with-python2
10865 (strip-python2-variant python-xopen))))
10866 (package
10867 (inherit base)
10868 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
10869 ,@(package-propagated-inputs base))))))
10870
10871(define-public python-cheetah
10872 (package
10873 (name "python-cheetah")
10874 (version "3.1.0")
10875 (source
10876 (origin
10877 (method url-fetch)
10878 (uri (pypi-uri "Cheetah3" version))
10879 (sha256
10880 (base32
10881 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
10882 (build-system python-build-system)
10883 (arguments
10884 `(#:modules ((guix build utils)
10885 (guix build python-build-system)
10886 (ice-9 ftw)
10887 (srfi srfi-1)
10888 (srfi srfi-26))
10889 #:phases (modify-phases %standard-phases
10890 (add-after 'unpack 'use-absolute-python
10891 (lambda _
10892 (substitute* "Cheetah/CheetahWrapper.py"
10893 (("#!/usr/bin/env python")
10894 (string-append "#!" (which "python"))))
10895 #t))
10896 (replace 'check
10897 (lambda _
10898 (let ((cwd (getcwd)))
10899 (setenv "PYTHONPATH"
10900 (string-append
10901 cwd "/build/"
10902 (find (cut string-prefix? "lib" <>)
10903 (scandir (string-append cwd "/build")))
10904 ":" (getenv "PYTHONPATH")))
10905 (setenv "PATH"
10906 (string-append (getenv "PATH")
10907 ":" cwd "/bin"))
10908 (setenv "TMPDIR" "/tmp")
10909
10910 (substitute* "Cheetah/Tests/Test.py"
10911 (("unittest.TextTestRunner\\(\\)")
10912 "unittest.TextTestRunner(verbosity=2)"))
10913
10914 (invoke "python" "Cheetah/Tests/Test.py")))))))
10915 (propagated-inputs
10916 `(("python-markdown" ,python-markdown))) ;optional
10917 (home-page "http://cheetahtemplate.org/")
10918 (synopsis "Template engine")
10919 (description "Cheetah is a text-based template engine and Python code
10920generator.
10921
10922Cheetah can be used as a standalone templating utility or referenced as
10923a library from other Python applications. It has many potential uses,
10924but web developers looking for a viable alternative to ASP, JSP, PHP and
10925PSP are expected to be its principle user group.
10926
10927Features:
10928@enumerate
10929@item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
10930 text-based format.
10931@item Cleanly separates content, graphic design, and program code.
10932@item Blends the power and flexibility of Python with a simple template language
10933 that non-programmers can understand.
10934@item Gives template writers full access to any Python data structure, module,
10935 function, object, or method in their templates.
10936@item Makes code reuse easy by providing an object-orientated interface to
10937 templates that is accessible from Python code or other Cheetah templates.
10938 One template can subclass another and selectively reimplement sections of it.
10939@item Provides a simple, yet powerful, caching mechanism that can dramatically
10940 improve the performance of a dynamic website.
10941@item Compiles templates into optimized, yet readable, Python code.
10942@end enumerate")
10943 (license (license:x11-style "file://LICENSE"))))
10944
10945(define-public python2-cheetah
10946 (package-with-python2 python-cheetah))
10947
10948(define-public python-dulwich
10949 (package
10950 (name "python-dulwich")
10951 (version "0.18.6")
10952 (source
10953 (origin
10954 (method url-fetch)
10955 (uri (list (string-append "https://www.dulwich.io/releases/"
10956 "dulwich-" version ".tar.gz")
10957 (pypi-uri "dulwich" version)))
10958 (sha256
10959 (base32
10960 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
10961 (build-system python-build-system)
10962 (arguments
10963 `(#:phases
10964 (modify-phases %standard-phases
10965 (add-before 'check 'fix-tests
10966 (lambda* (#:key inputs #:allow-other-keys)
10967 ;; The tests use Popen with a custom environment which doesn't
10968 ;; include PATH.
10969 (substitute* "dulwich/tests/compat/utils.py"
10970 (("'git'") (string-append "'"
10971 (which "git")
10972 "'")))
10973 (substitute* '("dulwich/tests/test_repository.py"
10974 "dulwich/tests/test_hooks.py")
10975 (("#!/bin/sh") (string-append "#!" (which "sh"))))
10976 (setenv "TEST_RUNNER" "unittest")
10977 (setenv "PYTHONHASHSEED" "random")
10978 #t)))))
10979 (propagated-inputs
10980 `(("python-fastimport" ,python-fastimport)))
10981 (native-inputs
10982 `(("python-mock" ,python-mock)
10983 ("python-geventhttpclient" ,python-geventhttpclient)
10984 ("git" ,git)))
10985 (home-page "https://www.dulwich.io/")
10986 (synopsis "Git implementation in Python")
10987 (description "Dulwich is an implementation of the Git file formats and
10988protocols written in pure Python.")
10989 ;; Can be used with either license.
10990 (license (list license:asl2.0 license:gpl2+))))
10991
10992(define-public python2-dulwich
10993 (package-with-python2 python-dulwich))
10994
10995(define-public python-pbkdf2
10996 (package
10997 (name "python-pbkdf2")
10998 (version "1.3")
10999 (source
11000 (origin
11001 (method url-fetch)
11002 (uri (pypi-uri "pbkdf2" version))
11003 (sha256
11004 (base32
11005 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
11006 (build-system python-build-system)
11007 (arguments
11008 '(#:phases
11009 (modify-phases %standard-phases
11010 (replace 'check
11011 (lambda _
11012 (setenv "PYTHONPATH"
11013 (string-append (getcwd) "/build/lib:"
11014 (getenv "PYTHONPATH")))
ee2bb944 11015 (invoke "python" "test/test_pbkdf2.py"))))))
44d10b1f
RW
11016 (propagated-inputs
11017 `(("python-pycrypto" ,python-pycrypto))) ; optional
11018 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
11019 (synopsis "Password-based key derivation")
11020 (description "This module implements the password-based key derivation
11021function, PBKDF2, specified in RSA PKCS#5 v2.0.
11022
11023PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
11024is part of the RSA Public Key Cryptography Standards series. The provided
11025implementation takes a password or a passphrase and a salt value (and
11026optionally a iteration count, a digest module, and a MAC module) and provides
11027a file-like object from which an arbitrarly-sized key can be read.")
11028 (license license:expat)))
11029
11030(define-public python2-pbkdf2
11031 (package-with-python2 python-pbkdf2))
11032
11033(define-public python-qrcode
11034 (package
11035 (name "python-qrcode")
217ea1a1 11036 (version "6.1")
44d10b1f
RW
11037 (source
11038 (origin
11039 (method url-fetch)
11040 (uri (pypi-uri "qrcode" version))
11041 (sha256
217ea1a1 11042 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
44d10b1f
RW
11043 (build-system python-build-system)
11044 (arguments
11045 ;; FIXME: Tests require packaging 'pymaging'.
11046 '(#:tests? #f))
11047 (propagated-inputs
11048 `(("python-lxml" ,python-lxml) ; for SVG output
11049 ("python-pillow" ,python-pillow) ; for PNG output
11050 ("python-six" ,python-six)))
44d10b1f
RW
11051 (home-page "https://github.com/lincolnloop/python-qrcode")
11052 (synopsis "QR Code image generator")
11053 (description "This package provides a pure Python QR Code generator
11054module. It uses the Python Imaging Library (PIL) to allow for the generation
11055of QR Codes.
11056
11057In addition this package provides a command line tool to generate QR codes and
11058either write these QR codes to a file or do the output as ascii art at the
11059console.")
11060 (license license:bsd-3)))
11061
11062(define-public python2-qrcode
11063 (package-with-python2 python-qrcode))
11064
11065(define-public python-rst2ansi
11066 (package
11067 (name "python-rst2ansi")
11068 (version "0.1.5")
11069 (source
11070 (origin
11071 (method url-fetch)
11072 (uri (pypi-uri "rst2ansi" version))
11073 (sha256
11074 (base32
11075 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
11076 (build-system python-build-system)
11077 (propagated-inputs
11078 `(("python-docutils" ,python-docutils)))
11079 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
11080 (synopsis "Convert RST to ANSI-decorated console output")
11081 (description
11082 "Python module dedicated to rendering RST (reStructuredText) documents
11083to ansi-escaped strings suitable for display in a terminal.")
11084 (license license:expat)))
11085
11086(define-public python-ansi2html
11087 (package
11088 (name "python-ansi2html")
11089 (version "1.2.0")
11090 (source
11091 (origin
11092 (method url-fetch)
11093 (uri (pypi-uri "ansi2html" version))
11094 (sha256
11095 (base32
11096 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
11097 (build-system python-build-system)
11098 (native-inputs
11099 `(("python-mock" ,python-mock)
11100 ("python-nose" ,python-nose)))
11101 (propagated-inputs
11102 `(("python-six" ,python-six)))
11103 (home-page "https://github.com/ralphbean/ansi2html")
11104 (synopsis "Convert ANSI-decorated console output to HTML")
11105 (description
11106 "@command{ansi2html} is a Python library and command line utility for
11107convering text with ANSI color codes to HTML or LaTeX.")
11108 (license license:gpl3+)))
11109
11110(define-public python2-ansi2html
11111 (package-with-python2 python-ansi2html))
11112
11113(define-public python-ddt
11114 (package
11115 (name "python-ddt")
11116 (version "1.1.3")
11117 (source
11118 (origin
11119 (method url-fetch)
11120 (uri (pypi-uri "ddt" version))
11121 (sha256
11122 (base32
11123 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
11124 (build-system python-build-system)
11125 (native-inputs
11126 `(("python-mock" ,python-mock)
11127 ("python-nose" ,python-nose)))
11128 (propagated-inputs
11129 `(("python-six" ,python-six)
11130 ("python-pyyaml" ,python-pyyaml)))
11131 (home-page "https://github.com/txels/ddt")
11132 (synopsis "Data-Driven Tests")
11133 (description
11134 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
11135running it with different test data, and make it appear as multiple test
11136cases.")
11137 (license license:expat)))
11138
11139(define-public python2-ddt
11140 (package-with-python2 python-ddt))
11141
11142(define-public python-pycountry
11143 (package
11144 (name "python-pycountry")
11145 (version "18.5.26")
11146 (source
11147 (origin
11148 (method url-fetch)
11149 (uri (pypi-uri "pycountry" version))
11150 (sha256
11151 (base32
11152 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
11153 (build-system python-build-system)
11154 (home-page "https://bitbucket.org/flyingcircus/pycountry")
11155 (synopsis "ISO databases for languages, countries, currencies, etc.")
11156 (description
11157 "@code{pycountry} provides the ISO databases for the standards:
11158@enumerate
11159@item 639-3 (Languages)
11160@item 3166 (Countries)
11161@item 3166-3 (Deleted Countries)
11162@item 3166-2 (Subdivisions of countries)
11163@item 4217 (Currencies)
11164@item 15924 (Scripts)
11165@end enumerate
11166It includes a copy from Debian’s pkg-isocodes and makes the data accessible
11167through a Python API.")
11168 (license license:lgpl2.1+)))
11169
11170(define-public python2-pycountry
11171 (package-with-python2 python-pycountry))
11172
11173(define-public python-pycosat
11174 (package
11175 (name "python-pycosat")
11176 (version "0.6.1")
11177 (source
11178 (origin
11179 (method url-fetch)
11180 (uri (pypi-uri "pycosat" version))
11181 (sha256
11182 (base32
11183 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
11184 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
11185 (build-system python-build-system)
11186 (home-page "https://github.com/ContinuumIO/pycosat")
11187 (synopsis "Bindings to picosat (a SAT solver)")
11188 (description
11189 "This package provides efficient Python bindings to @code{picosat} on
11190the C level. When importing pycosat, the @code{picosat} solver becomes part
11191of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
11192Problem} (SAT) solver.")
11193 (license license:expat)))
11194
11195(define-public python2-pycosat
11196 (package-with-python2 python-pycosat))
11197
11198(define-public python2-ruamel.ordereddict
11199 (package
11200 (name "python2-ruamel.ordereddict")
11201 (version "0.4.9")
11202 (source
11203 (origin
11204 (method url-fetch)
11205 (uri (pypi-uri "ruamel.ordereddict" version))
11206 (sha256
11207 (base32
11208 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
11209 (build-system python-build-system)
11210 (arguments
11211 `(#:python ,python-2
11212 #:phases
11213 (modify-phases %standard-phases
11214 (delete 'check)
11215 (add-after 'install 'check
11216 (lambda* (#:key inputs outputs #:allow-other-keys)
11217 (add-installed-pythonpath inputs outputs)
f987ac30 11218 (invoke "python" "test/testordereddict.py"))))))
44d10b1f
RW
11219 (home-page "https://bitbucket.org/ruamel/ordereddict")
11220 (synopsis "Version of dict that keeps keys in insertion order")
11221 (description
11222 "This is an implementation of an ordered dictionary with @dfn{Key
11223Insertion Order} (KIO: updates of values do not affect the position of the
11224key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
11225removed and put at the back). The standard library module @code{OrderedDict},
11226implemented later, implements a subset of @code{ordereddict} functionality.
11227Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
11228Order} (KSO, no sorting function can be specified, but a transform can be
11229specified to apply on the key before comparison (e.g. @code{string.lower})).")
11230 (license license:expat)))
11231
11232(define-public python-pypeg2
11233 (package
11234 (name "python-pypeg2")
11235 (version "2.15.2")
11236 (source
11237 (origin
11238 (method url-fetch)
11239 (uri (pypi-uri "pyPEG2" version))
11240 (sha256
11241 (base32
11242 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
11243 (build-system python-build-system)
11244 (propagated-inputs `(("python-lxml" ,python-lxml)))
11245 (arguments
11246 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
11247 '(#:tests? #f))
11248 (home-page "https://fdik.org/pyPEG/")
11249 (synopsis "Parsering Expression Grammars in Python")
11250 (description "PyPEG is an intrinsic parser interpreter framework for
11251Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
11252parse many formal languages.")
11253 (license license:gpl2)))
11254
11255(define-public python-incremental
11256 (package
11257 (name "python-incremental")
11258 (version "17.5.0")
11259 (source
11260 (origin
11261 (method url-fetch)
11262 (uri (pypi-uri "incremental" version))
11263 (sha256
11264 (base32
11265 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
11266 (build-system python-build-system)
11267 (home-page "https://github.com/hawkowl/incremental")
11268 (synopsis "Library for versioning Python projects")
11269 (description "Incremental is a small library that versions your Python
11270projects.")
11271 (license license:expat)))
11272
11273(define-public python2-incremental
11274 (package-with-python2 python-incremental))
11275
11276(define-public python-invoke
11277 (package
11278 (name "python-invoke")
11279 (home-page "http://www.pyinvoke.org/")
11280 (version "1.1.0")
11281 (source (origin
11282 (method url-fetch)
11283 (uri (pypi-uri "invoke" version))
11284 (sha256
11285 (base32
11286 "0aiy1xvk1f91246zxd1zqrm679vdvd10h843a2na41cqr3cflpi6"))))
11287 (build-system python-build-system)
11288 (arguments
11289 ;; XXX: Requires many dependencies that are not yet in Guix.
11290 `(#:tests? #f))
11291 (synopsis "Pythonic task execution")
11292 (description
11293 "Invoke is a Python task execution tool and library, drawing inspiration
11294from various sources to arrive at a powerful and clean feature set. It is
11295evolved from the Fabric project, but focuses on local and abstract concerns
11296instead of servers and network commands.")
11297 (license license:bsd-3)))
11298
11299(define-public python2-invoke
11300 (package-with-python2 python-invoke))
11301
11302(define-public python-automat
11303 (package
11304 (name "python-automat")
11305 (version "0.6.0")
11306 (source (origin
11307 (method url-fetch)
11308 (uri (pypi-uri "Automat" version))
11309 (sha256
11310 (base32
11311 "1a7nsrljysfmdqmpn2apfa1gg6rfah4y9sizvns8gb08rx7d07rw"))))
11312 (build-system python-build-system)
11313 ;; We disable the tests because they require python-twisted, while
11314 ;; python-twisted depends on python-automat. Twisted is optional, but the
11315 ;; tests fail if it is not available. Also see
11316 ;; <https://github.com/glyph/automat/issues/71>.
11317 (arguments '(#:tests? #f))
11318 (native-inputs
11319 `(("python-m2r" ,python-m2r)
11320 ("python-setuptools-scm" ,python-setuptools-scm)
11321 ("python-graphviz" ,python-graphviz)))
11322 (propagated-inputs
11323 `(("python-six" ,python-six)
11324 ("python-attrs" ,python-attrs)))
11325 (home-page "https://github.com/glyph/Automat")
11326 (synopsis "Self-service finite-state machines")
11327 (description "Automat is a library for concise, idiomatic Python
11328expression of finite-state automata (particularly deterministic finite-state
11329transducers).")
11330 (license license:expat)))
11331
11332(define-public python2-automat
11333 (package-with-python2 python-automat))
11334
11335(define-public python-m2r
11336 (package
11337 (name "python-m2r")
11338 (version "0.1.12")
11339 (source (origin
11340 (method url-fetch)
11341 (uri (pypi-uri "m2r" version))
11342 (sha256
11343 (base32
11344 "1axrwnf425sz4qz3c0qc7yhhki4myzb8rki7pczcsgzznzmqdyxd"))))
11345 (build-system python-build-system)
11346 (propagated-inputs
11347 `(("python-docutils" ,python-docutils)
11348 ("python-mistune" ,python-mistune)))
11349 (native-inputs
11350 `(("python-pygments" ,python-pygments)
11351 ("python-mock" ,python-mock)))
11352 (home-page "https://github.com/miyakogi/m2r")
11353 (synopsis "Markdown to reStructuredText converter")
11354 (description "M2R converts a markdown file including reST markups to valid
11355reST format.")
11356 (license license:expat)))
11357
11358(define-public python2-m2r
11359 (package-with-python2 python-m2r))
11360
11361(define-public python-constantly
11362 (package
11363 (name "python-constantly")
11364 (version "15.1.0")
11365 (source (origin
11366 (method url-fetch)
11367 (uri (pypi-uri "constantly" version))
11368 (sha256
11369 (base32
11370 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
11371 (build-system python-build-system)
11372 (home-page "https://github.com/twisted/constantly")
11373 (synopsis "Symbolic constants in Python")
11374 (description "Constantly is a Python library that provides symbolic
11375constant support. It includes collections and constants with text, numeric,
11376and bit flag values.")
11377 (license license:expat)))
11378
11379(define-public python2-constantly
11380 (package-with-python2 python-constantly))
11381
11382(define-public python-attrs
11383 (package
11384 (name "python-attrs")
11385 (version "18.2.0")
11386 (source (origin
11387 (method url-fetch)
11388 (uri (pypi-uri "attrs" version))
11389 (sha256
11390 (base32
11391 "0s9ydh058wmmf5v391pym877x4ahxg45dw6a0w4c7s5wgpigdjqh"))))
11392 (build-system python-build-system)
11393 (arguments
11394 `(#:modules ((guix build utils)
11395 (guix build python-build-system)
11396 (ice-9 ftw)
11397 (srfi srfi-1)
11398 (srfi srfi-26))
11399 #:phases (modify-phases %standard-phases
11400 (replace 'check
11401 (lambda _
11402 (let ((cwd (getcwd)))
11403 (setenv "PYTHONPATH"
11404 (string-append
11405 cwd "/build/"
11406 (find (cut string-prefix? "lib" <>)
11407 (scandir (string-append cwd "/build")))
11408 ":"
11409 (getenv "PYTHONPATH")))
11410 (invoke "python" "-m" "pytest")))))))
11411 (native-inputs
11412 `(("python-coverage" ,python-coverage)
11413 ("python-hypothesis" ,python-hypothesis)
11414 ("python-pympler" ,python-pympler)
11415 ("python-pytest" ,python-pytest)
11416 ("python-six" ,python-six)
11417 ("python-sphinx" ,python-sphinx)
11418 ("python-zope-interface" ,python-zope-interface)))
11419 (home-page "https://github.com/python-attrs/attrs/")
11420 (synopsis "Attributes without boilerplate")
11421 (description "@code{attrs} is a Python package with class decorators that
11422ease the chores of implementing the most common attribute-related object
11423protocols.")
11424 (license license:expat)))
11425
11426(define-public python2-attrs
11427 (package-with-python2 python-attrs))
11428
11429(define-public python-attrs-bootstrap
11430 (package
11431 (inherit python-attrs)
11432 (name "python-attrs-bootstrap")
11433 ;; Keep this on a fixed version so python-attrs can be updated without
11434 ;; triggering a mass-rebuild. FIXME: Update this in the next rebuild cycle.
11435 (version "17.4.0")
11436 (source (origin
11437 (method url-fetch)
11438 (uri (pypi-uri "attrs" version))
11439 (sha256
11440 (base32
11441 "1jafnn1kzd6qhxgprhx6y6ik1r5m2rilx25syzcmq03azp660y8w"))))
11442 (native-inputs `())
11443 (arguments `(#:tests? #f))))
11444
11445(define-public python2-attrs-bootstrap
11446 (package-with-python2 python-attrs-bootstrap))
11447
11448(define-public python2-cliapp
11449 (package
11450 (name "python2-cliapp")
9064b84e 11451 (version "1.20180812.1")
44d10b1f
RW
11452 (source
11453 (origin
11454 (method url-fetch)
11455 (uri (string-append
11456 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
11457 version ".tar.gz"))
11458 (sha256
11459 (base32
9064b84e 11460 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
44d10b1f
RW
11461 (build-system python-build-system)
11462 (arguments
11463 `(#:python ,python-2
11464 #:phases
11465 (modify-phases %standard-phases
11466 ;; check phase needs to be run before the build phase. If not,
11467 ;; coverage-test-runner looks for tests for the built source files,
11468 ;; and fails.
11469 (delete 'check)
11470 (add-before 'build 'check
11471 (lambda _
11472 ;; Disable python3 tests
11473 (substitute* "check"
11474 (("python3") "# python3"))
6c826d32 11475 (invoke "./check"))))))
44d10b1f
RW
11476 (native-inputs
11477 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
11478 ("python2-pep8" ,python2-pep8)))
11479 (propagated-inputs
11480 `(("python2-pyaml" ,python2-pyaml)))
11481 (home-page "https://liw.fi/cliapp/")
11482 (synopsis "Python framework for command line programs")
11483 (description "@code{python2-cliapp} is a python framework for
11484command line programs. It contains the typical stuff such programs
11485need to do, such as parsing the command line for options, and
11486iterating over input files.")
11487 (license license:gpl2+)))
11488
11489(define-public python2-ttystatus
11490 (package
11491 (name "python2-ttystatus")
e516a9c2 11492 (version "0.36")
44d10b1f
RW
11493 (source
11494 (origin
11495 (method url-fetch)
11496 (uri (string-append
11497 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
11498 version ".tar.gz"))
11499 (sha256
11500 (base32
e516a9c2 11501 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
44d10b1f
RW
11502 (build-system python-build-system)
11503 (native-inputs
11504 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
11505 ("python2-pep8" ,python2-pep8)))
11506 (arguments
11507 `(#:python ,python-2
11508 #:phases
11509 (modify-phases %standard-phases
11510 ;; check phase needs to be run before the build phase. If not,
11511 ;; coverage-test-runner looks for tests for the built source files,
11512 ;; and fails.
11513 (delete 'check)
11514 (add-before 'build 'check
cbeee881 11515 (lambda _ (invoke "make" "check"))))))
44d10b1f
RW
11516 (home-page "https://liw.fi/ttystatus/")
11517 (synopsis "Python library for showing progress reporting and
11518status updates on terminals")
11519 (description "@code{python2-ttystatus} is a python library for
11520showing progress reporting and status updates on terminals, for
11521command line programs. Output is automatically adapted to the width
11522of the terminal: truncated if it does not fit, and resized if the
11523terminal size changes.")
11524 (license license:gpl3+)))
11525
11526(define-public python2-tracing
11527 (package
11528 (name "python2-tracing")
11529 (version "0.10")
11530 (source
11531 (origin
11532 (method url-fetch)
11533 (uri (string-append
11534 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
11535 version ".tar.gz"))
11536 (sha256
11537 (base32
11538 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
11539 (build-system python-build-system)
11540 (arguments
11541 `(#:python ,python-2))
11542 (home-page "https://liw.fi/tracing/")
11543 (synopsis "Python debug logging helper")
11544 (description "@code{python2-tracing} is a python library for
11545logging debug messages. It provides a way to turn debugging messages
11546on and off, based on the filename they occur in. It is much faster
11547than using @code{logging.Filter} to accomplish the same thing, which
11548matters when code is run in production mode. The actual logging still
11549happens using the @code{logging} library.")
11550 (license license:gpl3+)))
11551
11552(define-public python2-larch
11553 (package
11554 (name "python2-larch")
11555 (version "1.20151025")
11556 (source
11557 (origin
11558 (method url-fetch)
11559 (uri (string-append
11560 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
11561 version ".tar.gz"))
11562 (patches (search-patches
11563 "python2-larch-coverage-4.0a6-compatibility.patch"))
11564 (sha256
11565 (base32
11566 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
11567 (build-system python-build-system)
11568 (arguments
11569 `(#:python ,python-2
11570 #:phases
11571 (modify-phases %standard-phases
11572 ;; check phase needs to be run before the build phase. If not,
11573 ;; coverage-test-runner looks for tests for the built source files,
11574 ;; and fails.
11575 (delete 'check)
11576 (add-before 'build 'check
204ad455 11577 (lambda _ (invoke "make" "check"))))))
44d10b1f
RW
11578 (native-inputs
11579 `(("cmdtest" ,cmdtest)
11580 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
11581 (propagated-inputs
11582 `(("python2-tracing" ,python2-tracing)))
11583 (home-page "https://liw.fi/larch/")
11584 (synopsis "Python copy-on-write B-tree library")
11585 (description "@code{python2-larch} is an implementation of
11586particular kind of B-tree, based on research by Ohad Rodeh. See
11587@url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
11588on the data structure.
11589
11590The distinctive feature of this B-tree is that a node is never
11591(conceptually) modified. Instead, all updates are done by
11592copy-on-write. This makes it easy to clone a tree, and modify only the
11593clone, while other processes access the original tree.")
11594 (license license:gpl3+)))
11595
11596(define-public python-astroid
11597 (package
11598 (name "python-astroid")
11599 (version "2.1.0")
11600 (source
11601 (origin
11602 (method url-fetch)
11603 (uri (pypi-uri "astroid" version))
11604 (sha256
11605 (base32
11606 "08hz675knh4294bancdapql392fmbjyimhbyrmfkz1ka7l035c1m"))))
11607 (build-system python-build-system)
11608 (propagated-inputs
11609 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
11610 ("python-six" ,python-six)
11611 ("python-wrapt" ,python-wrapt)))
11612 (native-inputs
11613 `(("python-dateutil" ,python-dateutil)
11614 ("python-nose" ,python-nose)
11615 ("python-pytest" ,python-pytest)
11616 ("python-pytest-runner" ,python-pytest-runner)))
11617 (arguments
11618 `(#:phases
11619 (modify-phases %standard-phases
11620 (add-after 'unpack 'remove-spurious-test
11621 (lambda _
11622 ;; This can be removed after upgrading from python-3.7
11623 ;; https://github.com/PyCQA/astroid/issues/593
11624 ;; https://bugs.python.org/issue34056
11625 (delete-file "astroid/tests/unittest_modutils.py")
11626 #t))
11627 (replace 'check
11628 (lambda _
11629 (invoke "pytest" "astroid"))))))
11630 (home-page "https://github.com/PyCQA/astroid")
11631 (synopsis "Common base representation of python source code for pylint and
11632other projects")
11633 (description "@code{python-astroid} provides a common base representation
11634of python source code for projects such as pychecker, pyreverse, pylint, etc.
11635
11636It provides a compatible representation which comes from the _ast module. It
11637rebuilds the tree generated by the builtin _ast module by recursively walking
11638down the AST and building an extended ast. The new node classes have
11639additional methods and attributes for different usages. They include some
11640support for static inference and local name scopes. Furthermore, astroid
11641builds partial trees by inspecting living objects.")
11642 (license license:lgpl2.1+)
11643 (properties `((python2-variant . ,(delay python2-astroid))))))
11644
11645(define-public python2-astroid
11646 (let ((base (package-with-python2
11647 (strip-python2-variant python-astroid))))
11648 (package (inherit base)
11649 ;; Version 2.x removes python2 support.
11650 (version "1.6.5")
11651 (source
11652 (origin
11653 (method url-fetch)
11654 (uri (pypi-uri "astroid" version))
11655 (sha256
11656 (base32
11657 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
11658 (arguments
11659 (substitute-keyword-arguments (package-arguments base)
11660 ((#:phases phases)
11661 `(modify-phases ,phases
11662 (add-after 'unpack 'remove-spurious-test
11663 (lambda _
11664 ;; https://github.com/PyCQA/astroid/issues/276
11665 (delete-file "astroid/tests/unittest_brain.py")
11666 #t))
11667 (replace 'check
11668 (lambda _
11669 (invoke"python" "-m" "unittest" "discover"
11670 "-p" "unittest*.py")))))))
11671 (native-inputs `())
11672 (propagated-inputs
11673 `(("python2-backports-functools-lru-cache"
11674 ,python2-backports-functools-lru-cache)
11675 ("python2-enum34" ,python2-enum34)
11676 ("python2-singledispatch" ,python2-singledispatch)
11677 ,@(package-propagated-inputs base))))))
11678
11679(define-public python-isort
11680 (package
11681 (name "python-isort")
e2227b6a 11682 (version "4.3.4")
44d10b1f
RW
11683 (source
11684 (origin
e2227b6a
EF
11685 (method git-fetch)
11686 (uri (git-reference
11687 ;; Tests pass only from the Github sources
11688 (url "https://github.com/timothycrosley/isort")
11689 (commit version)))
11690 (file-name (git-file-name name version))
44d10b1f
RW
11691 (sha256
11692 (base32
e2227b6a 11693 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
44d10b1f
RW
11694 (build-system python-build-system)
11695 (native-inputs
11696 `(("python-mock" ,python-mock)
11697 ("python-pytest" ,python-pytest)))
11698 (home-page "https://github.com/timothycrosley/isort")
11699 (synopsis "Python utility/library to sort python imports")
11700 (description "@code{python-isort} is a python utility/library to sort
11701imports alphabetically, and automatically separated into sections. It
11702provides a command line utility, a python library and plugins for various
11703editors.")
e2227b6a
EF
11704 (license license:expat)
11705 (properties `((python2-variant . ,(delay python2-isort))))))
44d10b1f
RW
11706
11707(define-public python2-isort
e2227b6a
EF
11708 (let ((base (package-with-python2
11709 (strip-python2-variant python-isort))))
11710 (package (inherit base)
11711 (native-inputs
11712 `(("python2-futures" ,python2-futures)
11713 ,@(package-native-inputs base))))))
44d10b1f
RW
11714
11715(define-public python2-backports-functools-lru-cache
11716 (package
11717 (name "python2-backports-functools-lru-cache")
11718 (version "1.5")
11719 (source
11720 (origin
11721 (method url-fetch)
11722 ;; only the pypi tarballs contain the necessary metadata
11723 (uri (pypi-uri "backports.functools_lru_cache" version))
11724 (sha256
11725 (base32
11726 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
11727 (build-system python-build-system)
11728 (native-inputs
11729 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
11730 (arguments
11731 `(#:python ,python-2))
11732 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
11733 (synopsis "Backport of functools.lru_cache from Python 3.3")
11734 (description "@code{python2-backports-functools-lru-cache} is a backport
11735of @code{functools.lru_cache} from python 3.3.")
11736 (license license:expat)))
11737
11738(define-public python-configparser
11739 (package
11740 (name "python-configparser")
11741 (version "3.5.0")
11742 (source
11743 (origin
11744 (method url-fetch)
11745 (uri (string-append
11746 "https://bitbucket.org/ambv/configparser/get/"
11747 version ".tar.bz2"))
11748 (file-name (string-append name "-" version ".tar.gz"))
11749 (sha256
11750 (base32
11751 "0waq40as14abwzbb321hfz4vr1fi363nscy32ga14qvfygrg96wa"))))
11752 (build-system python-build-system)
809f003f 11753 (home-page "https://github.com/jaraco/configparser/")
44d10b1f
RW
11754 (synopsis "Backport of configparser from python 3.5")
11755 (description "@code{python-configparser} is a backport of
11756@code{configparser} from Python 3.5 so that it can be used directly
11757in other versions.")
11758 (license license:expat)))
11759
11760(define-public python2-configparser
11761 (package-with-python2 python-configparser))
11762
11763(define-public python-mando
11764 (package
11765 (name "python-mando")
11766 (version "0.6.4")
11767 (source (origin
11768 (method url-fetch)
11769 (uri (pypi-uri "mando" version))
11770 (sha256
11771 (base32
11772 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
11773 (build-system python-build-system)
11774 (propagated-inputs
11775 `(("python-rst2ansi" ,python-rst2ansi)
11776 ("python-six" ,python-six)))
11777 (native-inputs
11778 `(("python-pytest" ,python-pytest)))
11779 (home-page "https://mando.readthedocs.org/")
11780 (synopsis
11781 "Wrapper around argparse, allowing creation of complete CLI applications")
11782 (description
11783 "This package is a wrapper around argparse, allowing you to write complete CLI
11784applications in seconds while maintaining all the flexibility.")
11785 (license license:expat)))
11786
11787(define-public python2-mando
11788 (package-with-python2 python-mando))
11789
70daf82f
RW
11790(define-public python2-argparse
11791 (package
11792 (name "python2-argparse")
11793 (version "1.4.0")
11794 (source
11795 (origin
11796 (method url-fetch)
11797 (uri (pypi-uri "argparse" version))
11798 (sha256
11799 (base32
11800 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
11801 (build-system python-build-system)
11802 (arguments
11803 `(#:python ,python-2))
11804 (home-page "https://github.com/ThomasWaldmann/argparse/")
11805 (synopsis "Python command-line parsing library")
11806 (description
11807 "This package is mostly for people who want to have @code{argparse} on
11808older Pythons because it was not part of the standard library back then.")
11809 (license license:psfl)))
11810
44d10b1f
RW
11811(define-public python-fudge
11812 (package
11813 (name "python-fudge")
11814 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
11815 ;; package, which is currently the only use of this package.
11816 (version "0.9.6")
11817 (source
11818 (origin
11819 (method url-fetch)
11820 (uri (pypi-uri "fudge" version))
11821 (sha256
11822 (base32
11823 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
11824 (build-system python-build-system)
11825 (arguments
11826 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
11827 (home-page "https://github.com/fudge-py/fudge")
11828 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
11829 (description
11830 "Fudge is a Python module for using fake objects (mocks and stubs) to
11831test real ones.
11832
11833In readable Python code, you declare the methods available on your fake object
11834and how they should be called. Then you inject that into your application and
11835start testing. This declarative approach means you don’t have to record and
11836playback actions and you don’t have to inspect your fakes after running code.
11837If the fake object was used incorrectly then you’ll see an informative
11838exception message with a traceback that points to the culprit.")
11839 (license license:expat)))
11840
11841(define-public python2-fudge
11842 (package-with-python2 python-fudge))
11843
11844(define-public python-mwclient
11845 (package
11846 (name "python-mwclient")
11847 (version "0.8.4")
11848 (source
11849 (origin
11850 (method url-fetch)
11851 ;; The PyPI version wouldn't contain tests.
11852 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
11853 "v" version ".tar.gz"))
11854 (file-name (string-append name "-" version ".tar.gz"))
11855 (sha256
11856 (base32
11857 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
11858 (build-system python-build-system)
11859 (propagated-inputs
11860 `(("python-requests" ,python-requests)
11861 ("python-requests-oauthlib"
11862 ,python-requests-oauthlib)
11863 ("python-six" ,python-six)))
11864 (native-inputs
11865 `(("python-mock" ,python-mock)
11866 ("python-pytest" ,python-pytest)
11867 ("python-pytest-pep8" ,python-pytest-pep8)
11868 ("python-pytest-cache" ,python-pytest-cache)
11869 ("python-pytest-cov" ,python-pytest-cov)
11870 ("python-responses" ,python-responses)))
11871 (home-page "https://github.com/btongminh/mwclient")
11872 (synopsis "MediaWiki API client")
11873 (description "This package provides a MediaWiki API client.")
11874 (license license:expat)))
11875
11876(define-public python2-mwclient
11877 (package-with-python2 python-mwclient))
11878
11879(define-public python-utils
11880 (package
11881 (name "python-utils")
11882 (version "2.1.0")
11883 (source (origin
11884 (method url-fetch)
11885 (uri (pypi-uri "python-utils" version))
11886 (sha256
11887 (base32
11888 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
11889 (build-system python-build-system)
11890 (native-inputs
11891 `(("pytest-runner" ,python-pytest-runner)
11892 ("pytest" ,python-pytest)
11893 ("six" ,python-six)))
11894 (home-page "https://github.com/WoLpH/python-utils")
11895 (synopsis "Convenient utilities not included with the standard Python install")
11896 (description
11897 "Python Utils is a collection of small Python functions and classes which
11898make common patterns shorter and easier.")
11899 (license license:bsd-2)))
11900
11901(define-public python2-utils
11902 (package-with-python2 python-utils))
11903
11904(define-public python-sphinx-me
11905 (package
11906 (name "python-sphinx-me")
11907 (version "0.3")
11908 (source
11909 (origin
11910 (method url-fetch)
11911 (uri (pypi-uri "sphinx-me" version))
11912 (sha256
11913 (base32
11914 "06jzgp213zihnvpcy2y5jy3ykid3apc2ncp2pg6a2g05lhiziglq"))))
11915 (build-system python-build-system)
11916 (home-page "https://github.com/stephenmcd/sphinx-me")
11917 (synopsis "Create a Sphinx documentation shell")
11918 (description
11919 "Create a Sphinx documentation shell for your project and include the
11920README file as the documentation index. It handles extracting the required
11921meta data such as the project name, author and version from your project for
11922use in your Sphinx docs.")
11923 (license license:bsd-2)))
11924
11925(define-public python2-sphinx-me
11926 (package-with-python2 python-sphinx-me))
11927
11928(define-public python-diff-match-patch
11929 (package
11930 (name "python-diff-match-patch")
11931 (version "20121119")
11932 (source
11933 (origin
11934 (method url-fetch)
11935 (uri (pypi-uri "diff-match-patch" version))
11936 (sha256
11937 (base32
11938 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
11939 (build-system python-build-system)
11940 (home-page "https://code.google.com/p/google-diff-match-patch")
11941 (synopsis "Synchronize plain text")
11942 (description "Diff Match and Patch libraries offer robust algorithms to
11943perform the operations required for synchronizing plain text.")
11944 (license license:asl2.0)))
11945
11946(define-public python2-diff-match-patch
11947 (package-with-python2 python-diff-match-patch))
11948
11949(define-public python-dirsync
11950 (package
11951 (name "python-dirsync")
11952 (version "2.2.3")
11953 (source
11954 (origin
11955 (method url-fetch)
11956 (uri (pypi-uri "dirsync" version))
11957 (sha256
11958 (base32
11959 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
11960 (build-system python-build-system)
11961 (propagated-inputs
11962 `(("six" ,python-six)))
11963 (home-page "https://bitbucket.org/tkhyn/dirsync")
11964 (synopsis "Advanced directory tree synchronisation tool")
11965 (description "Advanced directory tree synchronisation tool.")
11966 (license license:expat)))
11967
11968(define-public python2-dirsync
11969 (package-with-python2 python-dirsync))
11970
11971(define-public python-levenshtein
11972 (package
11973 (name "python-levenshtein")
11974 (version "0.12.0")
11975 (source
11976 (origin
11977 (method url-fetch)
11978 (uri (pypi-uri "python-Levenshtein" version))
11979 (sha256
11980 (base32
11981 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
11982 (build-system python-build-system)
11983 (home-page "https://github.com/ztane/python-Levenshtein")
11984 (synopsis "Fast computation of Levenshtein distance and string similarity")
11985 (description
11986 "The Levenshtein Python C extension module contains functions for fast computation of
11987@enumerate
11988@item Levenshtein (edit) distance, and edit operations
11989@item string similarity
11990@item approximate median strings, and generally string averaging
11991@item string sequence and set similarity
11992@end enumerate
11993It supports both normal and Unicode strings.")
11994 (license license:gpl2+)))
11995
11996(define-public python2-levenshtein
11997 (package-with-python2 python-levenshtein))
11998
11999(define-public python-scandir
12000 (package
12001 (name "python-scandir")
12002 (version "1.9.0")
12003 (source
12004 (origin
12005 (method url-fetch)
12006 (uri (pypi-uri "scandir" version))
12007 (sha256
12008 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
12009 (build-system python-build-system)
12010 (arguments
12011 `(#:phases (modify-phases %standard-phases
12012 (replace 'check
12013 (lambda _
12014 (invoke "python" "test/run_tests.py"))))))
12015 (home-page "https://github.com/benhoyt/scandir")
12016 (synopsis "Directory iteration function")
12017 (description
12018 "Directory iteration function like os.listdir(), except that instead of
12019returning a list of bare filenames, it yields DirEntry objects that include
12020file type and stat information along with the name. Using scandir() increases
12021the speed of os.walk() by 2-20 times (depending on the platform and file
12022system) by avoiding unnecessary calls to os.stat() in most cases.
12023
12024This package is part of the Python standard library since version 3.5.")
12025 (license license:bsd-3)))
12026
12027(define-public python2-scandir
12028 (package-with-python2 python-scandir))
12029
12030(define-public python2-stemming
12031 (package
12032 (name "python2-stemming")
12033 (version "1.0.1")
12034 (source
12035 (origin
12036 (method url-fetch)
12037 (uri (pypi-uri "stemming" version))
12038 (sha256
12039 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
12040 (build-system python-build-system)
12041 (arguments
12042 `(#:python ,python-2))
12043 (home-page "https://bitbucket.org/mchaput/stemming/overview")
12044 (synopsis "Python implementations of various stemming algorithms")
12045 (description
12046 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
12047stemming algorithms for English. These implementations are straightforward and
12048efficient, unlike some Python versions of the same algorithms available on the
12049Web. This package is an extraction of the stemming code included in the Whoosh
12050search engine.")
12051 (license license:public-domain)))
12052
12053(define-public python-factory-boy
12054 (package
12055 (name "python-factory-boy")
12056 (version "2.8.1")
12057 (source
12058 (origin
12059 (method url-fetch)
12060 (uri (pypi-uri "factory_boy" version))
12061 (sha256
12062 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
12063 (build-system python-build-system)
12064 (arguments
12065 ;; Tests are not included in the tarball.
12066 `(#:tests? #f))
12067 (propagated-inputs
12068 `(("faker" ,python-faker)))
12069 (home-page "https://github.com/benhoyt/scandir")
12070 (synopsis "Versatile test fixtures replacement")
12071 (description
12072 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
12073
12074As a fixtures replacement tool, it aims to replace static, hard to maintain
12075fixtures with easy-to-use factories for complex object.
12076
12077Instead of building an exhaustive test setup with every possible combination
12078of corner cases, factory_boy allows you to use objects customized for the
12079current test, while only declaring the test-specific fields")
12080 (license license:expat)))
12081
12082(define-public python2-factory-boy
12083 (package-with-python2 python-factory-boy))
12084
12085(define-public python-translate-toolkit
12086 (package
12087 (name "python-translate-toolkit")
12088 (version "2.1.0")
12089 (source
12090 (origin
12091 (method url-fetch)
12092 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
12093 (sha256
12094 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
12095 (build-system python-build-system)
12096 (native-inputs
12097 `(("python-pytest" ,python-pytest)
12098 ("python-sphinx" ,python-sphinx)))
12099 (propagated-inputs
12100 `(("python-babel" ,python-babel)
12101 ("python-beautifulsoup4" ,python-beautifulsoup4)
12102 ("python-chardet" ,python-chardet)
12103 ("python-diff-match-patch" ,python-diff-match-patch)
12104 ("python-levenshtein" ,python-levenshtein)
12105 ("python-lxml" ,python-lxml)
12106 ("python-six" ,python-six)
12107 ("python-vobject" ,python-vobject)
12108 ("python-pyyaml" ,python-pyyaml)))
12109 (arguments
12110 ;; TODO: tests are not run, because they end with
12111 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
12112 ;; 'parse_funcs'
12113 ;; during test setup.
12114 `(#:tests? #f))
12115 (home-page "http://toolkit.translatehouse.org")
12116 (synopsis "Tools and API for translation and localization engineering")
12117 (description
12118 "Tools and API for translation and localization engineering. It contains
12119several utilities, as well as an API for building localization tools.")
12120 (license license:gpl2+)))
12121
12122(define-public python2-translate-toolkit
12123 (package-with-python2 python-translate-toolkit))
12124
12125(define-public python-packaging
12126 (package
12127 (name "python-packaging")
12128 (version "18.0")
12129 (source
12130 (origin
12131 (method url-fetch)
12132 (uri (pypi-uri "packaging" version))
12133 (sha256
12134 (base32
12135 "01wq9c53ix5rz6qg2c98gy8n4ff768rmanifm8m5jpjiaizj51h8"))))
12136 (build-system python-build-system)
12137 (arguments
12138 `(#:phases (modify-phases %standard-phases
12139 (replace 'check
12140 (lambda _ (invoke "py.test" "-vv"))))))
12141 (native-inputs
12142 `(("python-pretend" ,python-pretend)
12143 ("python-pytest" ,python-pytest)))
12144 (propagated-inputs
12145 `(("python-pyparsing" ,python-pyparsing)
12146 ("python-six" ,python-six)))
12147 (home-page "https://github.com/pypa/packaging")
12148 (synopsis "Core utilities for Python packages")
12149 (description "Packaging is a Python module for dealing with Python packages.
12150It offers an interface for working with package versions, names, and dependency
12151information.")
12152 ;; From 'LICENSE': This software is made available under the terms of
12153 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
12154 ;; Contributions to this software is made under the terms of *both* these
12155 ;; licenses.
12156 (license (list license:asl2.0 license:bsd-2))))
12157
12158(define-public python2-packaging
12159 (package-with-python2 python-packaging))
12160
12161(define-public python-relatorio
12162 (package
12163 (name "python-relatorio")
12164 (version "0.8.0")
12165 (source
12166 (origin
12167 (method url-fetch)
12168 (uri (pypi-uri "relatorio" version))
12169 (sha256
12170 (base32
12171 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
12172 (build-system python-build-system)
12173 (propagated-inputs
12174 `(("python-lxml" ,python-lxml)
12175 ("python-genshi" ,python-genshi)))
12176 (native-inputs
12177 `(("python-magic" ,python-magic)))
12178 (home-page "https://relatorio.tryton.org/")
12179 (synopsis "Templating library able to output ODT and PDF files")
12180 (description "Relatorio is a templating library which provides a way to
12181easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
12182for more filetypes can be easily added by creating plugins for them.")
12183 (license license:gpl3+)))
12184
12185(define-public python2-relatorio
12186 (package-with-python2 python-relatorio))
12187
12188(define-public python-radon
12189 (package
12190 (name "python-radon")
12191 (version "2.2.0")
12192 (source
12193 (origin
12194 (method url-fetch)
12195 (uri (pypi-uri "radon" version))
12196 (sha256
12197 (base32
12198 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
12199 (build-system python-build-system)
12200 (arguments
12201 `(#:phases (modify-phases %standard-phases
12202 (replace 'check
12203 (lambda _
12204 (invoke "python" "radon/tests/run.py"))))))
12205 (propagated-inputs
12206 `(("python-colorama" ,python-colorama)
12207 ("python-flake8-polyfill" ,python-flake8-polyfill)
12208 ("python-mando" ,python-mando)))
12209 (native-inputs
12210 `(("python-pytest" ,python-pytest)
12211 ("python-pytest-mock" ,python-pytest-mock)))
12212 (home-page "https://radon.readthedocs.org/")
12213 (synopsis "Code Metrics in Python")
12214 (description "Radon is a Python tool which computes various code metrics.
12215Supported metrics are:
12216@itemize @bullet
12217@item raw metrics: SLOC, comment lines, blank lines, &c.
12218@item Cyclomatic Complexity (i.e. McCabe’s Complexity)
12219@item Halstead metrics (all of them)
12220@item the Maintainability Index (a Visual Studio metric)
12221@end itemize")
12222 (license license:expat)))
12223
12224(define-public python2-radon
12225 (package-with-python2 python-radon))
12226
12227(define-public python-sure
12228 (package
12229 (name "python-sure")
12230 (version "1.4.11")
12231 (source
12232 (origin
12233 (method url-fetch)
12234 (uri (pypi-uri "sure" version))
12235 (sha256
12236 (base32
12237 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
12238 (build-system python-build-system)
12239 (propagated-inputs
12240 `(("python-mock" ,python-mock)
12241 ("python-six" ,python-six)))
12242 (native-inputs
12243 `(("python-nose" ,python-nose)))
12244 (home-page "https://github.com/gabrielfalcao/sure")
12245 (synopsis "Automated testing library in python for python")
12246 (description
12247 "Sure is a python library that leverages a DSL for writing assertions.
12248Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
12249 (license license:gpl3+)))
12250
12251(define-public python2-sure
12252 (package-with-python2 python-sure))
12253
12254(define-public python2-couleur
12255 ;; This package does not seem to support python3 at all, hence,
12256 ;; only the python2 variant definition is provided.
12257 (package
12258 (name "python2-couleur")
12259 (version "0.6.2")
12260 (source
12261 (origin
12262 (method url-fetch)
12263 (uri (pypi-uri "couleur" version))
12264 (sha256
12265 (base32
12266 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
12267 (build-system python-build-system)
12268 (arguments
12269 `(#:python ,python-2))
12270 (home-page "https://github.com/gabrielfalcao/couleur")
12271 (synopsis
12272 "ANSI terminal tool for python, colored shell and other handy fancy features")
12273 (description
12274 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
12275terminal such as coloured output in the shell, overwriting output, indentation, etc.")
12276 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
12277 ;; https://github.com/gabrielfalcao/couleur/issues/11
12278 (license license:lgpl3+)))
12279
12280(define-public python-misaka
12281 (package
12282 (name "python-misaka")
0dcb3412 12283 (version "2.1.1")
44d10b1f
RW
12284 (source
12285 (origin
12286 (method url-fetch)
12287 (uri (pypi-uri "misaka" version))
12288 (sha256
12289 (base32
0dcb3412 12290 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
44d10b1f
RW
12291 (build-system python-build-system)
12292 (arguments
12293 `(;; Line 37 of setup.py calls self.run_command('develop')
12294 ;; in the 'check' phase. This command seems to be trying
12295 ;; to write to
12296 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
12297 ;; for which it does not have the permission to write.
12298 #:tests? #f))
12299 (propagated-inputs
12300 `(("python-cffi" ,python-cffi)))
12301 (home-page "https://github.com/FSX/misaka")
12302 (synopsis "Python binding for Hoedown")
12303 (description
12304 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
12305library written in C. It features a fast HTML renderer and functionality to make custom
12306renderers (e.g. man pages or LaTeX).")
12307 (license license:expat)))
12308
12309(define-public python2-misaka
12310 (package-with-python2 python-misaka))
12311
12312(define-public python2-steadymark
12313 ;; This is forced into being a python2 only variant
12314 ;; due to its dependence on couleur that has no support
12315 ;; for python3
12316 (package
12317 (name "python2-steadymark")
12318 (version "0.7.3")
12319 (source
12320 (origin
12321 (method url-fetch)
12322 (uri (pypi-uri "steadymark" version))
12323 (sha256
12324 (base32
12325 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
12326 (build-system python-build-system)
12327 (native-inputs
12328 `(("python-couleur" ,python2-couleur)
12329 ("python-sure" ,python2-sure)
12330 ("python-misaka" ,python2-misaka)))
12331 (arguments
12332 `(#:python ,python-2
12333 #:phases
12334 (modify-phases %standard-phases
12335 (add-before 'build 'patch-setup-py
12336 (lambda _
12337 ;; Update requirements from dependency==version
12338 ;; to dependency>=version
12339 (substitute* "setup.py"
12340 (("==") ">="))
12341 #t)))))
12342 (home-page "https://github.com/gabrielfalcao/steadymark")
12343 (synopsis "Markdown-based test runner for python")
12344 (description
12345 "@code{Steadymark} allows documentation to be written in github-flavoured
12346markdown. The documentation may contain snippets of code surrounded by python
12347code blocks and @code{Steadymark} will find these snippets and run them, making
12348sure that there are no old malfunctional examples in the documentation examples.")
12349 (license license:expat)))
12350
12351(define-public python-jsonpointer
12352 (package
12353 (name "python-jsonpointer")
12354 (version "1.10")
12355 (source
12356 (origin
12357 (method url-fetch)
12358 (uri (pypi-uri "jsonpointer" version))
12359 (sha256
12360 (base32
12361 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
12362 (build-system python-build-system)
12363 (home-page "https://github.com/stefankoegl/python-json-pointer")
12364 (synopsis "Identify specific nodes in a JSON document")
12365 (description "@code{jsonpointer} allows you to access specific nodes
12366by path in a JSON document (see RFC 6901).")
12367 (license license:bsd-3)))
12368
12369(define-public python2-jsonpointer
12370 (package-with-python2 python-jsonpointer))
12371
12372(define-public python-jsonpatch
12373 (package
12374 (name "python-jsonpatch")
12375 (version "1.16")
12376 (source
12377 (origin
12378 (method url-fetch)
12379 ;; pypi version lacks tests.js
12380 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12381 "archive/v" version ".tar.gz"))
12382 (file-name (string-append name "-" version ".tar.gz"))
12383 (sha256
12384 (base32
12385 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
12386 (build-system python-build-system)
12387 (native-inputs
12388 `(("python-jsonpointer" ,python-jsonpointer)))
12389 (home-page "https://github.com/stefankoegl/python-json-patch")
12390 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
12391 (description "@code{jsonpatch} is a library and program that allows
12392applying JSON Patches according to RFC 6902.")
12393 (license license:bsd-3)))
12394
12395(define-public python2-jsonpatch
12396 (package-with-python2 python-jsonpatch))
12397
12398(define-public python-jsonpatch-0.4
12399 (package (inherit python-jsonpatch)
12400 (name "python-jsonpatch")
12401 (version "0.4")
12402 (source
12403 (origin
12404 (method url-fetch)
12405 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12406 "archive/v" version ".tar.gz"))
12407 (file-name (string-append name "-" version ".tar.gz"))
12408 (sha256
12409 (base32
12410 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
12411
12412(define-public python2-jsonpatch-0.4
12413 (package-with-python2 python-jsonpatch-0.4))
12414
12415(define-public python-rfc3986
12416 (package
12417 (name "python-rfc3986")
12418 (version "1.1.0")
12419 (source (origin
12420 (method url-fetch)
12421 (uri (pypi-uri "rfc3986" version))
12422 (sha256
12423 (base32
12424 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
12425 (build-system python-build-system)
12426 (arguments
12427 `(#:modules ((guix build utils)
12428 (guix build python-build-system)
12429 (ice-9 ftw)
12430 (srfi srfi-1)
12431 (srfi srfi-26))
12432 #:phases
12433 (modify-phases %standard-phases
12434 (replace 'check
12435 (lambda _
12436 (let ((cwd (getcwd)))
12437 (setenv "PYTHONPATH"
12438 (string-append cwd "/build/"
12439 (find (cut string-prefix? "lib" <>)
12440 (scandir (string-append cwd "/build")))
12441 ":"
12442 (getenv "PYTHONPATH")))
12443 (invoke "pytest" "-v")))))))
12444 (native-inputs
12445 `(("python-pytest" ,python-pytest)))
12446 (home-page "https://rfc3986.readthedocs.io/")
12447 (synopsis "Parse and validate URI references")
12448 (description
12449 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
12450validation and authority parsing. This module also supports RFC@tie{}6874
12451which adds support for zone identifiers to IPv6 addresses.")
12452 (license license:asl2.0)))
12453
12454(define-public python2-rfc3986
12455 (package-with-python2 python-rfc3986))
12456
12457(define-public python-rfc3987
12458 (package
12459 (name "python-rfc3987")
12460 (version "1.3.7")
12461 (source
12462 (origin
12463 (method url-fetch)
12464 (uri (pypi-uri "rfc3987" version))
12465 (sha256
12466 (base32
12467 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
12468 (build-system python-build-system)
12469 (home-page "https://pypi.python.org/pypi/rfc3987")
12470 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
12471 (description "@code{rfc3987} provides routines for parsing and
12472validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
12473 (license license:gpl3+)))
12474
12475(define-public python2-rfc3987
12476 (package-with-python2 python-rfc3987))
12477
12478(define-public python-validate-email
12479 (package
12480 (name "python-validate-email")
12481 (version "1.3")
12482 (source
12483 (origin
12484 (method url-fetch)
12485 (uri (pypi-uri "validate_email" version))
12486 (sha256
12487 (base32
12488 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
12489 (build-system python-build-system)
12490 (home-page "https://github.com/syrusakbary/validate_email")
12491 (synopsis "Verifies if an email address is valid and really exists")
12492 (description "@code{validate_email} can be used to verify if an email
12493address is valid and really exists.")
12494 (license license:lgpl3+)))
12495
12496(define-public python2-validate-email
12497 (package-with-python2 python-validate-email))
12498
12499(define-public python-flex
12500 (package
12501 (name "python-flex")
12502 (version "6.10.0")
12503 (source
12504 (origin
12505 (method url-fetch)
12506 (uri (pypi-uri "flex" version))
12507 (sha256
12508 (base32
12509 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
12510 (build-system python-build-system)
12511 (propagated-inputs
12512 `(("python-click" ,python-click)
12513 ("python-iso8601" ,python-iso8601)
12514 ("python-jsonpointer" ,python-jsonpointer)
12515 ("python-pyyaml" ,python-pyyaml)
12516 ("python-requests" ,python-requests)
12517 ("python-rfc3987" ,python-rfc3987)
12518 ("python-six" ,python-six)
12519 ("python-validate-email" ,python-validate-email)))
12520 (home-page "https://github.com/pipermerriam/flex")
12521 (synopsis "Validates Swagger schemata")
12522 (description "@code{flex} can be used to validate Swagger schemata.")
12523 (license license:bsd-3)))
12524
12525(define-public python2-flex
12526 (package-with-python2 python-flex))
12527
12528(define-public python-marshmallow
12529 (package
12530 (name "python-marshmallow")
12531 (version "3.0.0b14")
12532 (source
12533 (origin
12534 (method url-fetch)
12535 (uri (pypi-uri "marshmallow" version))
12536 (sha256
12537 (base32
12538 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
12539 (build-system python-build-system)
12540 (propagated-inputs
12541 `(("python-dateutil" ,python-dateutil)
12542 ("python-simplejson" ,python-simplejson)))
12543 (native-inputs
12544 `(("python-pytest" ,python-pytest)
12545 ("python-pytz" ,python-pytz)))
12546 (home-page "https://github.com/marshmallow-code/marshmallow")
12547 (synopsis "Convert complex datatypes to and from native
12548Python datatypes.")
12549 (description "@code{marshmallow} provides a library for converting
12550complex datatypes to and from native Python datatypes.")
12551 (license license:expat)))
12552
12553(define-public python2-marshmallow
12554 (package-with-python2 python-marshmallow))
12555
12556(define-public python-apispec
12557 (package
12558 (name "python-apispec")
12559 (version "0.25.3")
12560 (source
12561 (origin
12562 (method url-fetch)
12563 (uri (pypi-uri "apispec" version))
12564 (sha256
12565 (base32
12566 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
12567 (build-system python-build-system)
12568 (propagated-inputs
12569 `(("python-pyyaml" ,python-pyyaml)))
12570 (native-inputs
12571 `(("python-pytest" ,python-pytest)
12572 ("python-flask" ,python-flask)
12573 ("python-marshmallow" ,python-marshmallow)
12574 ("python-tornado" ,python-tornado)
12575 ("python-bottle" ,python-bottle)
12576 ("python-mock" ,python-mock)))
12577 (home-page "https://github.com/marshmallow-code/apispec")
12578 (synopsis "Swagger 2.0 API specification generator")
12579 (description "@code{python-apispec} is a pluggable API specification
12580generator. Currently supports the OpenAPI specification (f.k.a.
12581Swagger 2.0).")
12582 (license license:expat)))
12583
12584(define-public python2-apispec
12585 (package-with-python2 python-apispec))
12586
12587(define-public python-flasgger
12588 (package
12589 (name "python-flasgger")
12590 (version "0.6.3")
12591 (source
12592 (origin
12593 (method url-fetch)
12594 (uri (string-append "https://github.com/rochacbruno/flasgger/archive/"
12595 version ".tar.gz"))
12596 (file-name (string-append name "-" version ".tar.gz"))
12597 (sha256
12598 (base32
12599 "1gqzlm0rb55fdpsy5ipkganlx9cnpi454fqyycr03jm22zql14ay"))))
12600 (build-system python-build-system)
12601 (arguments
12602 `(#:phases
12603 (modify-phases %standard-phases
12604 (replace 'check
12605 (lambda* (#:key inputs outputs #:allow-other-keys)
12606 (substitute* "Makefile"
12607 (("flake8 flasgger --ignore=F403")
12608 "flake8 flasgger --ignore=E731,F403"))
12609 (setenv "PYTHONPATH" (string-append (getcwd)
12610 ":"
12611 (getenv "PYTHONPATH")))
ac599a09 12612 (invoke "py.test"))))))
44d10b1f
RW
12613 (propagated-inputs
12614 `(("python-flask" ,python-flask)
12615 ("python-pyyaml" ,python-pyyaml)
12616 ("python-jsonschema" ,python-jsonschema)
12617 ("python-mistune" ,python-mistune)
12618 ("python-six" ,python-six)))
12619 (native-inputs
12620 `(("python-decorator" ,python-decorator)
12621 ("python-flake8" ,python-flake8)
12622 ("python-flask-restful" ,python-flask-restful)
12623 ("python-flex" ,python-flex)
12624 ("python-pytest" ,python-pytest)
12625 ("python-pytest-cov" ,python-pytest-cov)
12626 ("python-marshmallow" ,python-marshmallow)
12627 ("python-apispec" ,python-apispec)))
12628 (home-page "https://github.com/rochacbruno/flasgger/")
12629 (synopsis "Extract Swagger specs from your Flask project")
12630 (description "@code{python-flasgger} allows extracting Swagger specs
12631from your Flask project. It is a fork of Flask-Swagger.")
12632 (license license:expat)))
12633
12634(define-public python2-flasgger
12635 (package-with-python2 python-flasgger))
12636
12637(define-public python-swagger-spec-validator
12638 (package
12639 (name "python-swagger-spec-validator")
12640 (version "2.1.0")
12641 (source
12642 (origin
12643 (method url-fetch)
12644 (uri (pypi-uri "swagger-spec-validator" version))
12645 (sha256
12646 (base32
12647 "13hkpn2lycwr0468yqhjb3kwszqf7hjwlq61w7vdxq1caz31k4nw"))))
12648 (build-system python-build-system)
12649 (propagated-inputs
12650 `(("python-jsonschema" ,python-jsonschema)
12651 ("python-six" ,python-six)))
12652 (home-page
12653 "https://github.com/Yelp/swagger_spec_validator")
12654 (synopsis "Validation of Swagger specifications")
12655 (description "@code{swagger_spec_validator} provides a library for
12656validating Swagger API specifications.")
12657 (license license:asl2.0)))
12658
12659(define-public python2-swagger-spec-validator
12660 (package-with-python2 python-swagger-spec-validator))
12661
12662(define-public python-apache-libcloud
12663 (package
12664 (name "python-apache-libcloud")
12665 (version "2.4.0")
12666 (source
12667 (origin
12668 (method url-fetch)
12669 (uri (pypi-uri "apache-libcloud" version))
12670 (sha256
12671 (base32
12672 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
12673 (build-system python-build-system)
12674 (arguments
12675 `(#:phases
12676 (modify-phases %standard-phases
12677 (add-after 'unpack 'patch-ssh
12678 (lambda* (#:key inputs #:allow-other-keys)
12679 (substitute* "libcloud/compute/ssh.py"
12680 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
12681 "/bin/ssh" "'")))
12682 #t))
12683 (add-after 'unpack 'patch-tests
12684 (lambda _
12685 (substitute* "./libcloud/test/test_file_fixtures.py"
12686 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
12687 (("def _ascii") "def _raw_data(self, method, url, body, headers):
12688 return (httplib.OK,
12689 \"1234abcd\",
12690 {\"test\": \"value\"},
12691 httplib.responses[httplib.OK])
12692 def _ascii"))
12693 (substitute* "libcloud/test/compute/test_ssh_client.py"
12694 (("class ShellOutSSHClientTests")
12695 "@unittest.skip(\"Guix container doesn't have ssh service\")
12696class ShellOutSSHClientTests")
12697 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
12698 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
12699 (("'.xF0', '.x90', '.x8D', '.x88'")
12700 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
12701 #t))
12702 (add-before 'check 'copy-secret
12703 (lambda _
12704 (copy-file "libcloud/test/secrets.py-dist"
12705 "libcloud/test/secrets.py")
12706 #t)))))
12707 (inputs
12708 `(("openssh" ,openssh)))
12709 (propagated-inputs
12710 `(("python-paramiko" ,python-paramiko)
12711 ("python-requests" ,python-requests)))
12712 (native-inputs
12713 `(("python-lockfile" ,python-lockfile)
12714 ("python-mock" ,python-mock)
12715 ("python-pytest" ,python-pytest)
12716 ("python-pytest-runner" ,python-pytest-runner)
12717 ("python-requests-mock" ,python-requests-mock)))
12718 (home-page "https://libcloud.apache.org/")
12719 (synopsis "Unified Cloud API")
12720 (description "@code{libcloud} is a Python library for interacting with
12721many of the popular cloud service providers using a unified API.")
12722 (license license:asl2.0)))
12723
12724(define-public python2-apache-libcloud
12725 (package-with-python2 python-apache-libcloud))
12726
12727(define-public python-smmap2
12728 (package
12729 (name "python-smmap2")
12730 (version "2.0.3")
12731 (source
12732 (origin
12733 (method url-fetch)
12734 (uri (pypi-uri "smmap2" version))
12735 (sha256
12736 (base32
12737 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
12738 (build-system python-build-system)
12739 (native-inputs
12740 `(("python-nosexcover" ,python-nosexcover)))
12741 (home-page "https://github.com/Byron/smmap")
12742 (synopsis "Python sliding window memory map manager")
12743 (description "@code{smmap2} is a pure Python implementation of a sliding
12744window memory map manager.")
12745 (license license:bsd-3)))
12746
12747(define-public python2-smmap2
12748 (package-with-python2 python-smmap2))
12749
12750(define-public python-regex
12751 (package
12752 (name "python-regex")
12753 (version "2017.06.07")
12754 (source (origin
12755 (method url-fetch)
12756 (uri (pypi-uri "regex" version))
12757 (sha256
12758 (base32
12759 "06r6b7yigikbj3a72whl85r2b64pj1r0ypmw9yalmkm0wnxq8mz4"))))
12760 (build-system python-build-system)
12761 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
12762 (synopsis "Alternative regular expression module")
12763 (description "This regular expression implementation is backwards-
12764compatible with the standard @code{re} module, but offers additional
12765functionality like full case-folding for case-insensitive matches in Unicode.")
12766 (license license:psfl)))
12767
12768(define-public python2-regex
12769 (package-with-python2 python-regex))
12770
12771(define-public python2-pyopengl
12772 (package
12773 (name "python2-pyopengl")
12774 (version "3.1.0")
12775 (source
12776 (origin
12777 (method url-fetch)
12778 (uri (pypi-uri "PyOpenGL" version))
12779 (sha256
12780 (base32
12781 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
12782 (arguments
12783 `(#:python ,python-2))
12784 (build-system python-build-system)
12785 (home-page "http://pyopengl.sourceforge.net")
12786 (synopsis "Standard OpenGL bindings for Python")
12787 (description
12788 "PyOpenGL is the most common cross platform Python binding to OpenGL and
12789related APIs. The binding is created using the standard @code{ctypes}
12790library.")
12791 (license license:bsd-3)))
12792
12793(define-public python2-pyopengl-accelerate
12794 (package
12795 (inherit python2-pyopengl)
12796 (name "python2-pyopengl-accelerate")
12797 (version "3.1.0")
12798 (source
12799 (origin
12800 (method url-fetch)
12801 (uri (pypi-uri "PyOpenGL-accelerate" version))
12802 (sha256
12803 (base32
12804 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
12805 (synopsis "Acceleration code for PyOpenGL")
12806 (description
12807 "This is the Cython-coded accelerator module for PyOpenGL.")))
12808
12809(define-public python-rencode
12810 (package
12811 (name "python-rencode")
12812 (version "1.0.5")
12813 (source
12814 (origin
12815 (method url-fetch)
12816 (uri (pypi-uri "rencode" version))
12817 (sha256
12818 (base32
12819 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
12820 (build-system python-build-system)
12821 (arguments
12822 `(#:phases
12823 (modify-phases %standard-phases
12824 (add-before 'check 'delete-bogus-test
12825 ;; This test requires /home/aresch/Downloads, which is not provided by
12826 ;; the build environment.
12827 (lambda _
12828 (delete-file "rencode/t.py")
12829 #t)))))
12830 (native-inputs `(("pkg-config" ,pkg-config)
12831 ("python-cython" ,python-cython)))
12832 (home-page "https://github.com/aresch/rencode")
12833 (synopsis "Serialization of heterogeneous data structures")
12834 (description
12835 "The @code{rencode} module is a data structure serialization library,
12836similar to @code{bencode} from the BitTorrent project. For complex,
12837heterogeneous data structures with many small elements, r-encoding stake up
12838significantly less space than b-encodings. This version of rencode is a
12839complete rewrite in Cython to attempt to increase the performance over the
12840pure Python module.")
12841 (license license:bsd-3)))
12842
12843(define-public python2-rencode
12844 (package-with-python2 python-rencode))
12845
12846(define-public python-xenon
12847 (package
12848 (name "python-xenon")
12849 (version "0.5.4")
12850 (source
12851 (origin
12852 (method url-fetch)
12853 (uri (pypi-uri "xenon" version))
12854 (sha256
12855 (base32
12856 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
12857 (build-system python-build-system)
12858 (native-inputs
12859 `(("python-pyyaml" ,python-pyyaml)
12860 ("python-radon" ,python-radon)
12861 ("python-requests" ,python-requests)
12862 ("python-flake8" ,python-flake8)
12863 ("python-tox" ,python-tox)))
12864 (arguments
12865 `(#:phases
12866 (modify-phases %standard-phases
12867 (add-before 'build 'patch-test-requirements
12868 (lambda _
12869 ;; Remove httpretty dependency for tests.
12870 (substitute* "setup.py"
12871 (("httpretty") ""))
12872 #t)))))
12873 (home-page "https://xenon.readthedocs.org/")
12874 (synopsis "Monitor code metrics for Python on your CI server")
12875 (description
12876 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
12877Ideally, @code{xenon} is run every time code is committed. Through command
12878line options, various thresholds can be set for the complexity of code. It
12879will fail (i.e. it will exit with a non-zero exit code) when any of these
12880requirements is not met.")
12881 (license license:expat)))
12882
12883(define-public python2-xenon
12884 (package-with-python2 python-xenon))
12885
12886(define-public python-pysocks
12887 (package
12888 (name "python-pysocks")
12889 (version "1.6.8")
12890 (source
12891 (origin
12892 (method url-fetch)
12893 (uri (pypi-uri "PySocks" version))
12894 (sha256
12895 (base32
12896 "0wn6xafwy9c1gamwljw3fyvih5w19qy9xp39zmv8c90ai5ajrr9z"))))
12897 (build-system python-build-system)
12898 (arguments `(#:tests? #f))
12899 (home-page "https://github.com/Anorov/PySocks")
12900 (synopsis "SOCKS client module")
12901 (description "@code{pysocks} is an updated and semi-actively maintained
12902version of @code{SocksiPy} with bug fixes and extra features.")
12903 (license license:bsd-3)))
12904
12905(define-public python2-pysocks
12906 (package-with-python2 python-pysocks))
12907
12908(define-public python-pydiff
12909 (package
12910 (name "python-pydiff")
12911 (version "0.2")
12912 (source
12913 (origin
12914 (method url-fetch)
12915 (uri (pypi-uri "pydiff" version))
12916 (sha256
12917 (base32
12918 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
12919 (build-system python-build-system)
12920 (home-page "https://github.com/myint/pydiff")
12921 (synopsis "Library to diff two Python files at the bytecode level")
12922 (description
12923 "@code{pydiff} makes it easy to look for actual code changes while
12924ignoring formatting changes.")
12925 (license license:expat)))
12926
12927(define-public python2-pydiff
12928 (package-with-python2 python-pydiff))
12929
12930(define-public python-tqdm
12931 (package
12932 (name "python-tqdm")
12933 (version "4.19.6")
12934 (source
12935 (origin
12936 (method url-fetch)
12937 (uri (pypi-uri "tqdm" version))
12938 (sha256
12939 (base32
12940 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
12941 (build-system python-build-system)
12942 (native-inputs
12943 `(("python-flake8" ,python-flake8)
12944 ("python-nose" ,python-nose)
12945 ("python-coverage" ,python-coverage)))
12946 (home-page "https://github.com/tqdm/tqdm")
12947 (synopsis "Fast, extensible progress meter")
12948 (description
12949 "Make loops show a progress bar on the console by just wrapping any
12950iterable with @code{|tqdm(iterable)|}. Offers many options to define
12951design and layout.")
12952 (license (list license:mpl2.0 license:expat))))
12953
12954(define-public python2-tqdm
12955 (package-with-python2 python-tqdm))
12956
12957(define-public python-pkginfo
12958 (package
12959 (name "python-pkginfo")
12960 (version "1.4.2")
12961 (source
12962 (origin
12963 (method url-fetch)
12964 (uri (pypi-uri "pkginfo" version))
12965 (sha256
12966 (base32
12967 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
12968 (build-system python-build-system)
12969 (arguments
12970 ;; The tests are broken upstream.
12971 '(#:tests? #f))
12972 (home-page
12973 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
12974 (synopsis
12975 "Query metadatdata from sdists, bdists, and installed packages")
12976 (description
12977 "API to query the distutils metadata written in @file{PKG-INFO} inside a
12978source distriubtion (an sdist) or a binary distribution (e.g., created by
12979running bdist_egg). It can also query the EGG-INFO directory of an installed
12980distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
12981created by running @code{python setup.py develop}).")
12982 (license license:expat)))
12983
12984(define-public python2-pkginfo
12985 (package-with-python2 python-pkginfo))
12986
12987(define-public python-twine
12988 (package
12989 (name "python-twine")
12990 (version "1.9.1")
12991 (source
12992 (origin
12993 (method url-fetch)
12994 (uri (pypi-uri "twine" version))
12995 (sha256
12996 (base32
12997 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
12998 (build-system python-build-system)
12999 (propagated-inputs
13000 `(("python-tqdm" ,python-tqdm)
13001 ("python-pkginfo" ,python-pkginfo)
13002 ("python-requests" ,python-requests)
13003 ("python-requests-toolbelt" ,python-requests-toolbelt)))
13004 (home-page "https://github.com/pypa/twine")
13005 (synopsis "Collection of utilities for interacting with PyPI")
13006 (description
13007 "@code{twine} currently supports registering projects and uploading
13008distributions. It authenticates the user over HTTPS, allows them to pre-sign
13009their files and supports any packaging format (including wheels).")
13010 (license license:asl2.0)))
13011
13012(define-public python2-twine
13013 (package-with-python2 python-twine))
13014
13015(define-public python-linecache2
13016 (package
13017 (name "python-linecache2")
13018 (version "1.0.0")
13019 (source
13020 (origin
13021 (method url-fetch)
13022 (uri (pypi-uri "linecache2" version))
13023 (sha256
13024 (base32
13025 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
13026 (build-system python-build-system)
13027 (arguments
13028 `(;; The tests depend on unittest2, and our version is a bit too old.
13029 #:tests? #f))
13030 (native-inputs
13031 `(("python-pbr" ,python-pbr-minimal)))
13032 (home-page
13033 "https://github.com/testing-cabal/linecache2")
13034 (synopsis "Backports of the linecache module")
13035 (description
13036 "The linecache module allows one to get any line from any file, while
13037attempting to optimize internally, using a cache, the common case where many
13038lines are read from a single file.")
13039 (license license:psfl)))
13040
13041(define-public python2-linecache2
13042 (package-with-python2 python-linecache2))
13043
13044(define-public python-traceback2
13045 (package
13046 (name "python-traceback2")
13047 (version "1.4.0")
13048 (source
13049 (origin
13050 (method url-fetch)
13051 (uri (pypi-uri "traceback2" version))
13052 (sha256
13053 (base32
13054 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
13055 (build-system python-build-system)
13056 (arguments
13057 `(;; python-traceback2 and python-unittest2 depend on one another.
13058 #:tests? #f))
13059 (native-inputs
13060 `(("python-pbr" ,python-pbr-minimal)))
13061 (propagated-inputs
13062 `(("python-linecache2" ,python-linecache2)))
13063 (home-page
13064 "https://github.com/testing-cabal/traceback2")
13065 (synopsis "Backports of the traceback module")
13066 (description
13067 "This module provides a standard interface to extract, format and print
13068stack traces of Python programs. It exactly mimics the behavior of the Python
13069interpreter when it prints a stack trace.")
13070 (license license:psfl)))
13071
13072(define-public python2-traceback2
13073 (package-with-python2 python-traceback2))
13074
13075(define-public python-ratelimiter
13076 (package
13077 (name "python-ratelimiter")
13078 (version "1.2.0")
13079 (source
13080 (origin
13081 (method url-fetch)
13082 (uri (pypi-uri "ratelimiter" version))
13083 (sha256
13084 (base32
13085 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
13086 (build-system python-build-system)
13087 (arguments
13088 '(#:tests? #f)) ; There are no tests in the pypi archive.
13089 (home-page "https://github.com/RazerM/ratelimiter")
13090 (synopsis "Simple rate limiting object")
13091 (description
13092 "The @code{ratelimiter} module ensures that an operation will not be
13093executed more than a given number of times during a given period.")
13094 (license license:asl2.0)))
13095
13096(define-public python2-ratelimiter
13097 (package-with-python2 python-ratelimiter))
13098
13099(define-public python-dukpy
13100 (package
13101 (name "python-dukpy")
13102 (version "0.3")
13103 (source
13104 (origin
13105 (method url-fetch)
13106 (uri (string-append "https://github.com/kovidgoyal/dukpy/archive/v"
13107 version ".tar.gz"))
13108 (file-name (string-append name "-" version ".tar.gz"))
13109 (sha256
13110 (base32
13111 "0pj39rfwlzivqm5hkrsza7gssg6ggpxlq5ivc8f3h7x5pfgc6y6c"))))
13112 (build-system python-build-system)
13113 (home-page "https://github.com/kovidgoyal/dukpy")
13114 (synopsis "Run JavaScript in python")
13115 (description
13116 "dukpy is a JavaScript runtime environment for Python using the duktape
13117embeddable JavaScript engine.")
13118 ;; Dukpy is licensed under MIT like the embedded duktape library,
13119 ;; with 'errors.c' as GPL3.
13120 (license (list license:expat license:gpl3))))
13121
13122(define-public python2-dukpy
13123 (package-with-python2 python-dukpy))
13124
13125(define-public python-jsonrpclib-pelix
13126 (package
13127 (name "python-jsonrpclib-pelix")
13128 (version "0.3.2")
13129 (source
13130 (origin
13131 (method url-fetch)
13132 (uri (pypi-uri "jsonrpclib-pelix" version))
13133 (sha256
13134 (base32
13135 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
13136 (build-system python-build-system)
13137 (arguments
13138 `(#:tests? #f)) ; no tests in PyPI tarball
13139 (home-page "https://github.com/tcalmant/jsonrpclib/")
13140 (synopsis "JSON-RPC 2.0 client library for Python")
13141 (description
13142 "This library implements the JSON-RPC v2.0
13143specification (backwards-compatible) as a client library for Python. This
13144version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
13145services.")
13146 (license license:asl2.0)))
13147
13148(define-public python2-jsonrpclib-pelix
13149 (package-with-python2 python-jsonrpclib-pelix))
13150
13151(define-public python-setuptools-scm-git-archive
13152 (package
13153 (name "python-setuptools-scm-git-archive")
13154 (version "1.0")
13155 (source
13156 (origin
13157 (method url-fetch)
13158 (uri (pypi-uri "setuptools_scm_git_archive" version))
13159 (sha256
13160 (base32
13161 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
13162 (build-system python-build-system)
13163 (native-inputs
13164 `(("python-pytest" ,python-pytest)))
13165 (propagated-inputs
13166 `(("python-setuptools-scm" ,python-setuptools-scm)))
13167 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
13168 (synopsis "Setuptools_scm plugin for git archives")
13169 (description
13170 "The setuptools_scm_git_archive package is a plugin to
13171setuptools_scm, which supports obtaining versions from git archives that
13172belong to tagged versions.")
13173 (license license:expat)))
13174
13175(define-public python2-setuptools-scm-git-archive
13176 (package-with-python2 python-setuptools-scm-git-archive))
13177
13178(define-public python-pyclipper
13179 (package
13180 (name "python-pyclipper")
13181 (version "1.1.0.post1")
13182 (source
13183 (origin
13184 (method url-fetch)
13185 (uri (pypi-uri "pyclipper" version ".zip"))
13186 (sha256
13187 (base32
13188 "0ldbkbnx94an4zzrwb1sxmg6k0jgk4cwmvcdyy8y5k1zslc612wa"))
13189 (modules '((guix build utils)))
13190 (snippet
13191 '(begin
13192 ;; This file is generated by Cython.
13193 (delete-file "pyclipper/pyclipper.cpp") #t))))
13194 (build-system python-build-system)
13195 (arguments
13196 `(#:phases
13197 (modify-phases %standard-phases
13198 (add-before 'build 'cythonize-sources
13199 (lambda _
13200 (with-directory-excursion "pyclipper"
13201 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
13202 (propagated-inputs
13203 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
13204 (native-inputs
13205 `(("python-cython" ,python-cython)
13206 ("python-pytest" ,python-pytest)
13207 ("python-pytest-runner" ,python-pytest-runner)
13208 ("python-unittest2" ,python-unittest2)
13209 ("unzip" ,unzip)))
13210 (home-page "https://github.com/greginvm/pyclipper")
13211 (synopsis "Wrapper for Angus Johnson's Clipper library")
13212 (description
13213 "Pyclipper is a Cython wrapper for the C++ translation of the
13214Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
13215 (license license:expat)))
13216
13217(define-public python2-pyclipper
13218 (package-with-python2 python-pyclipper))
13219
13220(define-public python2-booleanoperations
13221 (package
13222 (name "python2-booleanoperations")
13223 (version "0.7.1")
13224 (source
13225 (origin
13226 (method url-fetch)
13227 (uri (pypi-uri "booleanOperations" version ".zip"))
13228 (sha256
13229 (base32
13230 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
13231 (build-system python-build-system)
13232 (arguments
13233 `(#:python ,python-2))
13234 (native-inputs
13235 `(("unzip" ,unzip)
13236 ("python2-pytest" ,python2-pytest)
13237 ("python2-pytest-runner" ,python2-pytest-runner)))
13238 (propagated-inputs
13239 `(("python-fonttools" ,python2-fonttools)
13240 ("python-pyclipper" ,python2-pyclipper)
13241 ("python-ufolib" ,python2-ufolib)))
13242 (home-page "https://github.com/typemytype/booleanOperations")
13243 (synopsis "Boolean operations on paths")
13244 (description
13245 "BooleanOperations provides a Python library that enables
13246boolean operations on paths.")
13247 (license license:expat)))
13248
13249(define-public python-tempdir
13250 (package
13251 (name "python-tempdir")
13252 (version "0.7.1")
13253 (source
13254 (origin
13255 (method url-fetch)
13256 (uri (pypi-uri "tempdir" version))
13257 (sha256
13258 (base32
13259 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
13260 (build-system python-build-system)
13261 (home-page "https://pypi.org/project/tempdir/")
13262 (arguments
13263 ;; the package has no tests
13264 '(#:tests? #f))
13265 (synopsis "Python library for managing temporary directories")
13266 (description
13267 "This library manages temporary directories that are automatically
13268deleted with all their contents when they are no longer needed. It is
13269particularly convenient for use in tests.")
13270 (license license:expat)))
13271
13272(define-public python2-tempdir
13273 (package-with-python2 python-tempdir))
13274
13275(define-public python-activepapers
13276 (package
13277 (name "python-activepapers")
13278 (version "0.2.2")
13279 (source
13280 (origin
13281 (method url-fetch)
13282 (uri (pypi-uri "ActivePapers.Py" version))
13283 (sha256
13284 (base32
13285 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
13286 (build-system python-build-system)
13287 (arguments
13288 `(#:modules ((ice-9 ftw)
13289 (srfi srfi-1)
13290 (guix build utils)
13291 (guix build python-build-system))
13292
13293 #:phases
13294 (modify-phases %standard-phases
13295 (add-after 'unpack 'delete-python2-code
13296 (lambda _
13297 (for-each delete-file
13298 '("lib/activepapers/builtins2.py"
13299 "lib/activepapers/standardlib2.py"
13300 "lib/activepapers/utility2.py"))))
13301 (replace 'check
13302 (lambda _
13303 ;; Deactivate the test cases that download files
13304 (setenv "NO_NETWORK_ACCESS" "1")
13305 ;; For some strange reason, some tests fail if nosetests runs all
13306 ;; test modules in a single execution. They pass if each test
13307 ;; module is run individually.
13308 (for-each (lambda (filename)
13309 (invoke "nosetests"
13310 (string-append "tests/" filename)))
13311 (scandir "tests"
13312 (lambda (filename)
13313 (string-suffix? ".py" filename)))))))))
13314 (native-inputs
13315 `(("python-tempdir" ,python-tempdir)
13316 ("python-nose" ,python-nose)))
13317 (propagated-inputs
13318 `(("python-h5py" ,python-h5py)))
13319 (home-page "http://www.activepapers.org/")
13320 (synopsis "Executable papers for scientific computing")
13321 (description
13322 "ActivePapers is a tool for working with executable papers, which
13323combine data, code, and documentation in single-file packages,
13324suitable for publication as supplementary material or on repositories
13325such as figshare or Zenodo.")
13326 (properties `((python2-variant . ,(delay python2-activepapers))))
13327 (license license:bsd-3)))
13328
13329(define-public python2-activepapers
13330 (let ((base (package-with-python2
13331 (strip-python2-variant python-activepapers))))
13332 (package
13333 (inherit base)
13334 (arguments
13335 (substitute-keyword-arguments (package-arguments base)
13336 ((#:phases phases)
13337 `(modify-phases ,phases
13338 (delete 'delete-python2-code)
13339 (add-after 'unpack 'delete-python3-code
13340 (lambda _
13341 (for-each delete-file
13342 '("lib/activepapers/builtins3.py"
13343 "lib/activepapers/standardlib3.py"
13344 "lib/activepapers/utility3.py")))))))))))
13345
13346(define-public python-semver
13347 (package
13348 (name "python-semver")
13349 (version "2.7.9")
13350 (source
13351 (origin
13352 (method url-fetch)
13353 (uri (pypi-uri "semver" version))
13354 (sha256
13355 (base32
13356 "0hhgqppchv59rqj0yzi1prdg2nfsywqmjsqy2rycyxm0hvxmbyqz"))))
13357 (build-system python-build-system)
13358 (arguments
13359 `(#:phases
13360 (modify-phases %standard-phases
13361 (add-after 'unpack 'patch-test-requirements
13362 (lambda _
13363 (substitute* "setup.py"
13364 ;; Our Python is new enough.
13365 (("'virtualenv<14\\.0\\.0'") "'virtualenv'"))
13366 #t)))))
13367 (native-inputs
13368 `(("python-tox" ,python-tox)
13369 ("python-virtualenv" ,python-virtualenv)))
13370 (home-page "https://github.com/k-bx/python-semver")
13371 (synopsis "Python helper for Semantic Versioning")
13372 (description "This package provides a Python library for
13373@url{Semantic Versioning, http://semver.org/}.")
13374 (license license:bsd-3)))
13375
13376(define-public python2-semver
13377 (package-with-python2 python-semver))
13378
13379(define-public python-pyro4
13380 (package
13381 (name "python-pyro4")
ad1acb81 13382 (version "4.75")
44d10b1f
RW
13383 (source
13384 (origin
13385 (method url-fetch)
13386 (uri (pypi-uri "Pyro4" version))
13387 (sha256
ad1acb81 13388 (base32 "1dfpp36imddx19yv0kd28gk1l71ckhpqy6jd590wpm2680jw15rq"))))
44d10b1f
RW
13389 (build-system python-build-system)
13390 (propagated-inputs
13391 `(("python-serpent" ,python-serpent)))
13392 (home-page "https://pyro4.readthedocs.io")
13393 (synopsis "Distributed object middleware for Python")
13394 (description
13395 "Pyro enables you to build applications in which objects can talk to each
13396other over the network. You can just use normal Python method calls to call
13397objects on other machines, also known as remote procedure calls (RPC).")
13398 (license license:expat)))
13399
13400(define-public python2-pyro
13401 (package
13402 (name "python2-pyro")
13403 (version "3.16")
13404 (source
13405 (origin
13406 (method url-fetch)
13407 (uri (pypi-uri "Pyro" version))
13408 (file-name (string-append "Pyro-" version ".tar.gz"))
13409 (sha256
13410 (base32
13411 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
13412 (build-system python-build-system)
13413 (arguments
13414 ;; Pyro is not compatible with Python 3
13415 `(#:python ,python-2
13416 ;; Pyro has no test cases for automatic execution
13417 #:tests? #f))
13418 (home-page "http://pythonhosted.org/Pyro/")
13419 (synopsis "Distributed object manager for Python")
13420 (description "Pyro is a Distributed Object Technology system
13421written in Python that is designed to be easy to use. It resembles
13422Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
13423which is a system and language independent Distributed Object Technology
13424and has much more to offer than Pyro or RMI. Pyro 3.x is no
13425longer maintained. New projects should use Pyro4 instead, which
13426is the new Pyro version that is actively developed.")
13427 (license license:expat)))
13428
13429(define-public python2-scientific
13430 (package
13431 (name "python2-scientific")
13432 (version "2.9.4")
13433 (source
13434 (origin
13435 (method url-fetch)
13436 (uri (string-append "https://bitbucket.org/khinsen/"
13437 "scientificpython/downloads/ScientificPython-"
13438 version ".tar.gz"))
13439 (file-name (string-append "ScientificPython-" version ".tar.gz"))
13440 (sha256
13441 (base32
13442 "0fc69zhlsn9d2jvbzyjl9ah53vj598h84nkq230c83ahfvgzx5y3"))))
13443 (build-system python-build-system)
13444 (inputs
13445 `(("netcdf" ,netcdf)))
13446 (propagated-inputs
13447 `(("python-numpy" ,python2-numpy-1.8)
13448 ("python-pyro" ,python2-pyro)))
13449 (arguments
13450 ;; ScientificPython is not compatible with Python 3
13451 `(#:python ,python-2
13452 #:tests? #f ; No test suite
13453 #:phases
13454 (modify-phases %standard-phases
13455 (replace 'build
13456 (lambda* (#:key inputs #:allow-other-keys)
77e61e25
RW
13457 (invoke "python" "setup.py" "build"
13458 (string-append "--netcdf_prefix="
13459 (assoc-ref inputs "netcdf"))))))))
44d10b1f
RW
13460 (home-page "https://bitbucket.org/khinsen/scientificpython")
13461 (synopsis "Python modules for scientific computing")
13462 (description "ScientificPython is a collection of Python modules that are
13463useful for scientific computing. Most modules are rather general (Geometry,
13464physical units, automatic derivatives, ...) whereas others are more
13465domain-specific (e.g. netCDF and PDB support). The library is currently
13466not actively maintained and works only with Python 2 and NumPy < 1.9.")
13467 (license license:cecill-c)))
13468
13469(define-public python2-mmtk
13470 (package
13471 (name "python2-mmtk")
13472 (version "2.7.11")
13473 (source
13474 (origin
13475 (method url-fetch)
13476 (uri (string-append "https://bitbucket.org/khinsen/"
13477 "mmtk/downloads/MMTK-" version ".tar.gz"))
13478 (file-name (string-append "MMTK-" version ".tar.gz"))
13479 (sha256
13480 (base32
13481 "1d0nnjx4lwsvh8f99vv1r6gi50d93yba0adkz8b4zgv4za4c5862"))))
13482 (build-system python-build-system)
13483 (native-inputs
13484 `(("netcdf" ,netcdf)))
13485 (propagated-inputs
13486 `(("python-scientific" ,python2-scientific)
13487 ("python-tkinter" ,python-2 "tk")))
13488 (arguments
13489 `(#:python ,python-2
13490 #:tests? #f
13491 #:phases
13492 (modify-phases %standard-phases
13493 (add-before 'build 'includes-from-scientific
13494 (lambda* (#:key inputs #:allow-other-keys)
13495 (mkdir-p "Include/Scientific")
13496 (copy-recursively
13497 (string-append
13498 (assoc-ref inputs "python-scientific")
13499 "/include/python2.7/Scientific")
13500 "Include/Scientific"))))))
13501 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
13502 (synopsis "Python library for molecular simulation")
13503 (description "MMTK is a library for molecular simulations with an emphasis
13504on biomolecules. It provides widely used methods such as Molecular Dynamics
13505and normal mode analysis, but also basic routines for implementing new methods
13506for simulation and analysis. The library is currently not actively maintained
13507and works only with Python 2 and NumPy < 1.9.")
13508 (license license:cecill-c)))
13509
13510(define-public python-phonenumbers
13511 (package
13512 (name "python-phonenumbers")
13513 (version "8.9.1")
13514 (source
13515 (origin
13516 (method url-fetch)
13517 (uri (pypi-uri "phonenumbers" version))
13518 (sha256
13519 (base32
13520 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
13521 (build-system python-build-system)
13522 (home-page
13523 "https://github.com/daviddrysdale/python-phonenumbers")
13524 (synopsis
13525 "Python library for dealing with international phone numbers")
13526 (description
13527 "This package provides a Python port of Google's libphonenumber library.")
13528 (license license:asl2.0)))
13529
13530(define-public python2-phonenumbers
13531 (package-with-python2 python-phonenumbers))
13532
13533(define-public python-send2trash
13534 (package
13535 (name "python-send2trash")
d9b0216b 13536 (version "1.5.0")
44d10b1f 13537 (source
d9b0216b 13538 (origin (method git-fetch)
44d10b1f 13539 ;; Source tarball on PyPI doesn't include tests.
d9b0216b
RW
13540 (uri (git-reference
13541 (url "https://github.com/hsoft/send2trash.git")
13542 (commit version)))
13543 (file-name (git-file-name name version))
44d10b1f
RW
13544 (sha256
13545 (base32
d9b0216b 13546 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
44d10b1f
RW
13547 (build-system python-build-system)
13548 (arguments
13549 '(#:phases
13550 (modify-phases %standard-phases
13551 (add-before 'check 'pre-check
13552 (lambda _
13553 (mkdir-p "/tmp/foo")
13554 (setenv "HOME" "/tmp/foo")
13555 #t)))))
13556 (home-page "https://github.com/hsoft/send2trash")
13557 (synopsis "Send files to the user's @file{~/Trash} directory")
13558 (description "This package provides a Python library to send files to the
13559user's @file{~/Trash} directory.")
13560 (license license:bsd-3)))
13561
13562(define-public python2-send2trash
13563 (package
13564 (inherit (package-with-python2 python-send2trash))
13565 (arguments
13566 (substitute-keyword-arguments (package-arguments python-send2trash)
13567 ((#:phases phases)
13568 `(modify-phases ,phases
13569 (add-before 'check 'setenv
13570 (lambda _
13571 (setenv "PYTHONPATH"
13572 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
13573 #t))))))
13574 (properties `((python2-variant . ,(delay python-send2trash))))))
13575
13576(define-public python-yapf
13577 (package
13578 (name "python-yapf")
13579 (version "0.24.0")
13580 (source
13581 (origin
13582 (method url-fetch)
13583 (uri (pypi-uri "yapf" version))
13584 (sha256
13585 (base32
13586 "0anwby0ydmyzcsgjc5dn1ryddwvii4dq61vck447q0n96npnzfyf"))))
13587 (build-system python-build-system)
13588 (home-page "https://github.com/google/yapf")
13589 (synopsis "Formatter for Python code")
13590 (description "YAPF is a formatter for Python code. It's based off of
13591@dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
13592takes the code and reformats it to the best formatting that conforms to the
13593style guide, even if the original code didn't violate the style guide.")
13594 (license license:asl2.0)))
13595
13596(define-public python2-yapf
13597 (package-with-python2 python-yapf))
13598
13599(define-public python-gyp
13600 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
13601 (revision "0"))
13602 (package
13603 (name "python-gyp")
13604 ;; Google does not release versions,
13605 ;; based on second most recent commit date.
13606 (version (git-version "0.0.0" revision commit))
13607 (source
13608 (origin
13609 ;; Google does not release tarballs,
13610 ;; git checkout is needed.
13611 (method git-fetch)
13612 (uri (git-reference
13613 (url "https://chromium.googlesource.com/external/gyp")
13614 (commit commit)))
13615 (file-name (git-file-name name version))
13616 (sha256
13617 (base32
13618 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
13619 (build-system python-build-system)
13620 (home-page "https://gyp.gsrc.io/")
13621 (synopsis "GYP is a Meta-Build system")
13622 (description
13623 "GYP builds build systems for large, cross platform applications.
13624It can be used to generate XCode projects, Visual Studio projects, Ninja build
13625files, and Makefiles.")
13626 (license license:bsd-3))))
13627
13628(define-public python2-gyp
13629 (package-with-python2 python-gyp))
13630
13631(define-public python-whatever
13632 (package
13633 (name "python-whatever")
13634 (version "0.5")
13635 (source
13636 (origin
13637 (method url-fetch)
13638 (uri (string-append "https://github.com/Suor/whatever/archive/" version
13639 ".tar.gz"))
13640 (sha256
13641 (base32
13642 "1iqvnaf0zpc6b4rvbqq4xy45mszcscyzpzknv8wg6j84pbp22sap"))
13643 (file-name (string-append name "-" version ".tar.gz"))))
13644 (build-system python-build-system)
13645 (arguments
13646 `(#:phases
13647 (modify-phases %standard-phases
13648 (replace 'check
13649 (lambda _
13650 (invoke "py.test"))))))
13651 (native-inputs
13652 `(("python-pytest" ,python-pytest)))
13653 (home-page "http://github.com/Suor/whatever")
13654 (synopsis "Make anonymous functions by partial application of operators")
13655 (description "@code{whatever} provides an easy way to make anonymous
13656functions by partial application of operators.")
13657 (license license:bsd-3)))
13658
13659(define-public python2-whatever
13660 (package-with-python2 python-whatever))
13661
13662(define-public python-funcy
13663 (package
13664 (name "python-funcy")
9e396ab8 13665 (version "1.11")
44d10b1f
RW
13666 (source
13667 (origin
a85c6027
TGR
13668 (method git-fetch)
13669 (uri (git-reference
13670 (url "https://github.com/Suor/funcy.git")
13671 (commit version)))
44d10b1f 13672 (sha256
a85c6027
TGR
13673 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
13674 (file-name (git-file-name name version))))
44d10b1f
RW
13675 (build-system python-build-system)
13676 (arguments
13677 `(#:phases
13678 (modify-phases %standard-phases
13679 (replace 'check
13680 (lambda _
13681 (invoke "py.test"))))))
13682 (native-inputs
13683 `(("python-pytest" ,python-pytest)
13684 ("python-whatever" ,python-whatever)))
13685 (home-page "http://github.com/Suor/funcy")
13686 (synopsis "Functional tools")
13687 (description "@code{funcy} is a library that provides functional tools.
13688Examples are:
13689@enumerate
13690@item merge - Merges collections of the same type
13691@item walk - Type-preserving map
13692@item select - Selects a part of a collection
13693@item take - Takes the first n items of a collection
13694@item first - Takes the first item of a collection
13695@item remove - Predicated-removes items of a collection
13696@item concat - Concatenates two collections
13697@item flatten - Flattens a collection with subcollections
13698@item distinct - Returns only distinct items
13699@item split - Predicated-splits a collection
13700@item split_at - Splits a collection at a given item
13701@item group_by - Groups items by group
13702@item pairwise - Pairs off adjacent items
13703@item partial - Partially-applies a function
13704@item curry - Curries a function
13705@item compose - Composes functions
13706@item complement - Complements a predicate
13707@item all_fn - \"all\" with predicate
13708@end enumerate")
13709 (license license:bsd-3)))
13710
13711(define-public python2-funcy
13712 (package-with-python2 python-funcy))
13713
13714(define-public python-isoweek
13715 (package
13716 (name "python-isoweek")
13717 (version "1.3.3")
13718 (source
13719 (origin
13720 (method url-fetch)
13721 (uri (pypi-uri "isoweek" version))
13722 (sha256
13723 (base32
13724 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
13725 (build-system python-build-system)
13726 (home-page "https://github.com/gisle/isoweek")
13727 (synopsis "Objects representing a week")
13728 (description "The @code{isoweek} module provide the class Week that
13729implements the week definition of ISO 8601. This standard also defines
13730a notation for identifying weeks; yyyyWww (where the W is a literal).
13731Week instances stringify to this form.")
13732 (license license:bsd-3)))
13733
13734(define-public python2-isoweek
13735 (package-with-python2 python-isoweek))
13736
13737(define-public python-tokenize-rt
13738 (package
13739 (name "python-tokenize-rt")
13740 (version "2.0.1")
13741 (source
13742 (origin
13743 (method url-fetch)
13744 (uri (pypi-uri "tokenize-rt" version))
13745 (sha256
13746 (base32
13747 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
13748 (build-system python-build-system)
13749 (home-page "https://github.com/asottile/tokenize-rt")
13750 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
13751 (description
13752 "This Python library is a wrapper around @code{tokenize} from the Python
13753standard library. It provides two additional tokens @code{ESCAPED_NL} and
13754@code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
13755and @code{tokens_to_src} to roundtrip.")
13756 (license license:expat)))
13757
13758(define-public python-future-fstrings
13759 (package
13760 (name "python-future-fstrings")
13761 (version "0.4.1")
13762 (source
13763 (origin
13764 (method url-fetch)
13765 (uri (pypi-uri "future_fstrings" version))
13766 (sha256
13767 (base32
13768 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
13769 (build-system python-build-system)
13770 (propagated-inputs
13771 `(("python-tokenize-rt" ,python-tokenize-rt)))
13772 (home-page "https://github.com/asottile/future-fstrings")
13773 (synopsis "Backport of fstrings to Python < 3.6")
13774 (description
13775 "This package provides a UTF-8 compatible encoding
13776@code{future_fstrings}, which performs source manipulation. It decodes the
13777source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
13778@code{f} strings.")
13779 (license license:expat)))
13780
13781(define-public python-typing
13782 (package
13783 (name "python-typing")
13784 (version "3.6.6")
13785 (source
13786 (origin
13787 (method url-fetch)
13788 (uri (pypi-uri "typing" version))
13789 (sha256
13790 (base32
13791 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
13792 (build-system python-build-system)
13793 (home-page "https://docs.python.org/3/library/typing.html")
13794 (synopsis "Type hints for Python")
13795 (description "This is a backport of the standard library @code{typing}
13796module to Python versions older than 3.5. Typing defines a standard notation
13797for Python function and variable type annotations. The notation can be used
13798for documenting code in a concise, standard format, and it has been designed
13799to also be used by static and runtime type checkers, static analyzers, IDEs
13800and other tools.")
13801 (license license:psfl)))
13802
13803(define-public python2-typing
13804 (package-with-python2 python-typing))
13805
f89d443b
VC
13806(define-public python-typing-extensions
13807 (package
13808 (name "python-typing-extensions")
13809 (version "3.7.2")
13810 (source
13811 (origin
13812 (method url-fetch)
13813 (uri (pypi-uri "typing_extensions" version))
13814 (sha256
13815 (base32
13816 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
13817 (build-system python-build-system)
13818 (home-page
13819 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
13820 (synopsis "Experimental type hints for Python")
13821 (description
13822 "The typing_extensions module contains additional @code{typing} hints not
13823yet present in the of the @code{typing} standard library.
13824Included are implementations of:
13825@enumerate
13826@item ClassVar
13827@item ContextManager
13828@item Counter
13829@item DefaultDict
13830@item Deque
13831@item NewType
13832@item NoReturn
13833@item overload
13834@item Protocol
13835@item runtime
13836@item Text
13837@item Type
13838@item TYPE_CHECKING
13839@item AsyncGenerator
13840@end enumerate\n")
13841 (license license:psfl)))
13842
44d10b1f
RW
13843(define-public bpython
13844 (package
13845 (name "bpython")
13846 (version "0.17.1")
13847 (source
13848 (origin
13849 (method url-fetch)
13850 (uri (pypi-uri "bpython" version))
13851 (sha256
13852 (base32
13853 "0bxhxi5zxdkrf8b4gwn0d363kdz3qnypjwhm1aydki53ph8ca1w9"))))
13854 (build-system python-build-system)
13855 (arguments
13856 `(#:phases
13857 (modify-phases %standard-phases
13858 (add-after 'unpack 'remove-failing-test
13859 (lambda _
13860 ;; Remove failing test. FIXME: make it pass
13861 (delete-file "bpython/test/test_args.py")
13862 #t))
13863 (add-after 'wrap 'add-aliases
13864 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
13865 (lambda* (#:key outputs #:allow-other-keys)
13866 (let ((out (assoc-ref outputs "out")))
13867 (for-each
13868 (lambda (old new)
13869 (symlink old (string-append out "/bin/" new)))
13870 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
13871 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
13872 #t)))))
13873 (propagated-inputs
13874 `(("python-pygments" ,python-pygments)
13875 ("python-requests" ,python-requests)
13876 ("python-babel" ,python-babel) ; optional, for internationalization
13877 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
13878 ("python-greenlet" ,python-greenlet)
13879 ("python-urwid" ,python-urwid) ; for bpython-urwid only
13880 ("python-six" ,python-six)))
13881 (native-inputs
13882 `(("python-sphinx" ,python-sphinx)
13883 ("python-mock" ,python-mock)))
13884 (home-page "https://bpython-interpreter.org/")
13885 (synopsis "Fancy interface to the Python interpreter")
13886 (description "Bpython is a fancy interface to the Python
13887interpreter. bpython's main features are
13888
13889@enumerate
13890@item in-line syntax highlighting,
13891@item readline-like autocomplete with suggestions displayed as you type,
13892@item expected parameter list for any Python function,
13893@item \"rewind\" function to pop the last line of code from memory and
13894 re-evaluate,
13895@item send the code you've entered off to a pastebin,
13896@item save the code you've entered to a file, and
13897@item auto-indentation.
13898@end enumerate")
13899 (license license:expat)))
13900
13901(define-public bpython2
13902 (let ((base (package-with-python2
13903 (strip-python2-variant bpython))))
13904 (package (inherit base)
13905 (name "bpython2")
13906 (arguments
13907 `(#:python ,python-2
13908 #:phases
13909 (modify-phases %standard-phases
13910 (add-after 'unpack 'remove-failing-test
13911 (lambda _
13912 ;; Remove failing test. FIXME: make it pass
13913 (delete-file "bpython/test/test_args.py")
13914 ;; Disable failing test-cases (renaming inhibits they are
13915 ;; discovered)
13916 (substitute* "bpython/test/test_curtsies_repl.py"
13917 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
13918 (string-append a "xxx_off_" b))
13919 (("^(\\s*def )(test_complex\\W)" _ a b)
13920 (string-append a "xxx_off_" b)))
13921 #t))
13922 (add-before 'build 'rename-scripts
13923 ;; rename the scripts to bypthon2, bpdb2, etc.
13924 (lambda _
13925 (substitute* "setup.py"
13926 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
13927 (string-append name "2" rest "\n"))
13928 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
13929 (string-append name "2" (or sub "") rest "\n")))
13930 #t))))))))
13931
13932(define-public python-pyinotify
13933 (package
13934 (name "python-pyinotify")
13935 (version "0.9.6")
13936 (source (origin
13937 (method url-fetch)
13938 (uri (pypi-uri "pyinotify" version))
13939 (sha256
13940 (base32
13941 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
13942 (build-system python-build-system)
13943 (arguments `(#:tests? #f)) ;no tests
13944 (home-page "https://github.com/seb-m/pyinotify")
13945 (synopsis "Python library for monitoring inotify events")
13946 (description
13947 "@code{pyinotify} provides a Python interface for monitoring
13948file system events on Linux.")
13949 (license license:expat)))
13950
13951(define-public python2-pyinotify
13952 (package-with-python2 python-pyinotify))
13953
13954;; Ada parser uses this version.
13955(define-public python2-quex-0.67.3
13956 (package
13957 (name "python2-quex")
13958 (version "0.67.3")
13959 (source
13960 (origin
13961 (method url-fetch)
13962 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
13963 (version-major+minor version)
13964 "/quex-" version ".zip"))
13965 (sha256
13966 (base32
13967 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
13968 (build-system python-build-system)
13969 (native-inputs
13970 `(("unzip" ,unzip)))
13971 (arguments
13972 `(#:python ,python-2
13973 #:tests? #f
13974 #:phases
13975 (modify-phases %standard-phases
13976 (delete 'configure)
13977 (delete 'build)
13978 (replace 'install
13979 (lambda* (#:key outputs #:allow-other-keys)
13980 (let* ((out (assoc-ref outputs "out"))
13981 (share/quex (string-append out "/share/quex"))
13982 (bin (string-append out "/bin")))
13983 (copy-recursively "." share/quex)
13984 (mkdir-p bin)
13985 (symlink (string-append share/quex "/quex-exe.py")
13986 (string-append bin "/quex"))
13987 #t))))))
13988 (native-search-paths
13989 (list (search-path-specification
13990 (variable "QUEX_PATH")
13991 (files '("share/quex")))))
13992 (home-page "http://quex.sourceforge.net/")
13993 (synopsis "Lexical analyzer generator in Python")
13994 (description "@code{quex} is a lexical analyzer generator in Python.")
13995 (license license:lgpl2.1+))) ; Non-military
13996
13997(define-public python2-quex
13998 (package (inherit python2-quex-0.67.3)
13999 (name "python2-quex")
14000 (version "0.68.1")
14001 (source
14002 (origin
14003 (method url-fetch)
14004 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
14005 (sha256
14006 (base32
14007 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
14008 (file-name (string-append name "-" version ".tar.gz"))))))
14009
14010(define-public python-more-itertools
14011 (package
14012 (name "python-more-itertools")
14013 (version "4.3.0")
14014 (source
14015 (origin
14016 (method url-fetch)
14017 (uri (pypi-uri "more-itertools" version))
14018 (sha256
14019 (base32
14020 "17h3na0rdh8xq30w4b9pizgkdxmm51896bxw600x84jflg9vaxn4"))))
14021 (build-system python-build-system)
14022 (arguments
14023 `(,@(if (any (cute string-prefix? <> (or (%current-system)
14024 (%current-target-system)))
14025 '("armhf" "i686"))
14026 '(#:phases
14027 (modify-phases %standard-phases
14028 ;; This is required for 32-bit hardware.
14029 ;; TODO: Try to remove this when upgrading.
14030 (add-after 'unpack 'patch-test
14031 (lambda _
14032 (substitute* "more_itertools/tests/test_more.py"
14033 (("10 \\*\\* 10") "9 ** 9"))
14034 #t))))
14035 '())))
14036 (propagated-inputs
14037 `(("python-six" ,python-six-bootstrap)))
14038 (home-page "https://github.com/erikrose/more-itertools")
14039 (synopsis "More routines for operating on iterables, beyond itertools")
14040 (description "Python's built-in @code{itertools} module implements a
14041number of iterator building blocks inspired by constructs from APL, Haskell,
14042and SML. @code{more-itertools} includes additional building blocks for
14043working with iterables.")
14044 (license license:expat)))
14045
14046(define-public python2-more-itertools
14047 (package-with-python2 python-more-itertools))
14048
14049(define-public python-latexcodec
14050 (package
14051 (name "python-latexcodec")
91b61f02 14052 (version "1.0.6")
44d10b1f
RW
14053 (source
14054 (origin
14055 (method url-fetch)
14056 (uri (pypi-uri "latexcodec" version))
14057 (sha256
91b61f02 14058 (base32 "0s4wdbg0w2l8pj3i0y4510i0s04p8nhxcsa2z41bjsv0k66npb81"))))
44d10b1f
RW
14059 (build-system python-build-system)
14060 (inputs
14061 `(("python-six" ,python-six)))
14062 (home-page "https://readthedocs.org/projects/latexcodec/")
14063 (synopsis "Work with LaTeX code in Python")
14064 (description "Lexer and codec to work with LaTeX code in Python.")
14065 (license license:expat)))
14066
14067(define-public python-pybtex
14068 (package
14069 (name "python-pybtex")
14070 (version "0.21")
14071 (source
14072 (origin
14073 (method url-fetch)
14074 (uri (pypi-uri "pybtex" version))
14075 (sha256
14076 (base32
14077 "00300j8dn5pxq4ndxmfmbmycg2znawkqs49val2x6jlmfiy6r2mg"))))
14078 (build-system python-build-system)
14079 (native-inputs
14080 `(("python-nose" ,python-nose)))
14081 (inputs
14082 `(("python-latexcodec" ,python-latexcodec)
14083 ("python-pyyaml" ,python-pyyaml)
14084 ("python-six" ,python-six)))
14085 (arguments
14086 `(#:test-target "nosetests"))
14087 (home-page "https://pybtex.org/")
14088 (synopsis "BibTeX-compatible bibliography processor")
14089 (description "Pybtex is a BibTeX-compatible bibliography processor written
14090in Python. You can simply type pybtex instead of bibtex.")
14091 (license license:expat)))
14092
14093(define-public python-onetimepass
14094 (package
14095 (name "python-onetimepass")
14096 (version "1.0.1")
14097 (source
14098 (origin
14099 (method url-fetch)
14100 (uri (pypi-uri "onetimepass" version))
14101 (sha256
14102 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
14103 (build-system python-build-system)
14104 (propagated-inputs `(("python-six" ,python-six)))
14105 (home-page "https://github.com/tadeck/onetimepass/")
14106 (synopsis "One-time password library")
14107 (description "Python one-time password library for HMAC-based (HOTP) and
14108time-based (TOTP) passwords.")
14109 (license license:expat)))
14110
14111(define-public python-parso
14112 (package
14113 (name "python-parso")
14114 (version "0.3.1")
14115 (source
14116 (origin
14117 (method url-fetch)
14118 (uri (pypi-uri "parso" version))
14119 (sha256
14120 (base32
14121 "18p89iwcm8mnf380f92g9w0bhx5km8wxp392vvjcq4y1ld1llw1m"))))
14122 (native-inputs
14123 `(("python-pytest" ,python-pytest)))
14124 (build-system python-build-system)
14125 (home-page "https://github.com/davidhalter/parso")
14126 (synopsis "Python Parser")
14127 (description "Parso is a Python parser that supports error recovery and
14128round-trip parsing for different Python versions (in multiple Python versions).
14129Parso is also able to list multiple syntax errors in your Python file.")
14130 (license license:expat)))
14131
14132(define-public python2-parso
14133 (package-with-python2 python-parso))
14134
14135(define-public python-async-generator
14136 (package
14137 (name "python-async-generator")
94fcbf8d 14138 (version "1.10")
44d10b1f
RW
14139 (source
14140 (origin
14141 (method url-fetch)
14142 (uri (pypi-uri "async_generator" version))
14143 (sha256
14144 (base32
94fcbf8d 14145 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
44d10b1f
RW
14146 (build-system python-build-system)
14147 (native-inputs
14148 `(("python-pytest" ,python-pytest)))
14149 (home-page "https://github.com/python-trio/async_generator")
14150 (synopsis "Async generators and context managers for Python 3.5+")
14151 (description "@code{async_generator} back-ports Python 3.6's native async
14152generators and Python 3.7's context managers into Python 3.5.")
14153 ;; Dual licensed.
14154 (license (list license:expat license:asl2.0))))
14155
14156(define-public python-async-timeout
14157 (package
14158 (name "python-async-timeout")
14159 (version "3.0.1")
14160 (source
14161 (origin
14162 (method url-fetch)
14163 (uri (pypi-uri "async-timeout" version))
14164 (sha256
14165 (base32
14166 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
14167 (build-system python-build-system)
14168 (home-page "https://github.com/aio-libs/async_timeout/")
14169 (synopsis "Timeout context manager for asyncio programs")
14170 (description "@code{async-timeout} provides a timeout timeout context
14171manager compatible with @code{asyncio}.")
14172 (license license:asl2.0)))
14173
14174(define-public python-glob2
14175 (package
14176 (name "python-glob2")
14177 (version "0.6")
14178 (source (origin
14179 (method url-fetch)
14180 (uri (string-append
14181 "https://github.com/miracle2k/python-glob2/archive/"
14182 version
14183 ".tar.gz"))
14184 (sha256
14185 (base32
14186 "0ja168f0dz4kbz4m06dm0rd3acaypk6hjx2km541pw22y9s40mag"))
14187 (file-name (string-append name "-" version ".tar.gz"))))
14188 (build-system python-build-system)
14189 (home-page "https://github.com/miracle2k/python-glob2/")
14190 (synopsis "Extended Version of the python buildin glob module")
14191 (description "This is an extended version of the Python
14192@url{http://docs.python.org/library/glob.html, built-in glob module} which
14193adds:
14194
14195@itemize
14196@item The ability to capture the text matched by glob patterns, and return
14197those matches alongside the file names.
14198@item A recursive @code{**} globbing syntax, akin for example to the
14199@code{globstar} option of Bash.
14200@item The ability to replace the file system functions used, in order to glob
14201on virtual file systems.
14202@item Compatible with Python 2 and Python 3 (tested with 3.3).
14203@end itemize
14204
14205Glob2 currently based on the glob code from Python 3.3.1.")
14206 (license license:bsd-2)))
14207
14208(define-public python2-glob2
14209 (package-with-python2 python-glob2))
14210
14211(define-public python-gipc
14212 (package
14213 (name "python-gipc")
14214 (version "0.6.0")
14215 (source
14216 (origin
14217 (method url-fetch)
14218 (uri (pypi-uri "gipc" version ".zip"))
14219 (sha256
14220 (base32
14221 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
14222 (build-system python-build-system)
14223 (native-inputs
14224 `(("unzip" ,unzip)))
14225 (propagated-inputs
14226 `(("python-gevent" ,python-gevent)))
14227 (home-page "http://gehrcke.de/gipc")
14228 (synopsis "Child process management in the context of gevent")
14229 (description "Usage of Python's multiprocessing package in a
14230gevent-powered application may raise problems. With @code{gipc},
14231process-based child processes can safely be created anywhere within a
14232gevent-powered application.")
14233 (license license:expat)))
14234
14235(define-public python2-gipc
14236 (package-with-python2 python-gipc))
14237
14238(define-public python-fusepy
14239 (package
14240 (name "python-fusepy")
14241 (version "2.0.4")
14242 (source
14243 (origin
14244 (method url-fetch)
14245 (uri (pypi-uri "fusepy" version))
14246 (sha256
14247 (base32
14248 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
14249 (build-system python-build-system)
14250 (arguments
14251 `(#:phases
14252 (modify-phases %standard-phases
14253 (add-before 'build 'set-library-file-name
14254 (lambda* (#:key inputs #:allow-other-keys)
14255 (let ((fuse (assoc-ref inputs "fuse")))
14256 (substitute* "fuse.py"
14257 (("find_library\\('fuse'\\)")
14258 (string-append "'" fuse "/lib/libfuse.so'")))
14259 #t))))))
14260 (propagated-inputs
14261 `(("fuse" ,fuse)))
14262 (home-page "https://github.com/fusepy/fusepy")
14263 (synopsis "Simple ctypes bindings for FUSE")
14264 (description "Python module that provides a simple interface to FUSE and
14265MacFUSE. The binding is created using the standard @code{ctypes} library.")
14266 (license license:isc)))
14267
14268(define-public python2-fusepy
14269 (package-with-python2 python-fusepy))
14270
14271(define-public python2-gdrivefs
14272 (package
14273 (name "python2-gdrivefs")
14274 (version "0.14.9")
14275 (source
14276 (origin
14277 (method url-fetch)
14278 (uri (pypi-uri "gdrivefs" version))
14279 (sha256
14280 (base32
14281 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
14282 (build-system python-build-system)
14283 (arguments
14284 `(#:python ,python-2
14285 #:phases
14286 (modify-phases %standard-phases
14287 (add-before 'build 'patch-setup-py
14288 (lambda _
14289 ;; Update requirements from dependency==version
14290 ;; to dependency>=version
14291 (substitute* "gdrivefs/resources/requirements.txt"
14292 (("==") ">="))
14293 #t)))))
14294 (native-inputs
14295 `(("python2-gipc" ,python2-gipc)
14296 ("python2-gevent" ,python2-gevent)
14297 ("python2-greenlet" ,python2-greenlet)
14298 ("python2-httplib2" ,python2-httplib2)
14299 ("python2-uritemplate" ,python2-uritemplate)
14300 ("python2-oauth2client" ,python2-oauth2client)
14301 ("python2-six" ,python2-six)))
14302 (propagated-inputs
14303 `(("python2-dateutil" ,python2-dateutil)
14304 ("python2-fusepy" ,python2-fusepy)
14305 ("python2-google-api-client" ,python2-google-api-client)))
14306 (home-page "https://github.com/dsoprea/GDriveFS")
14307 (synopsis "Mount Google Drive as a local file system")
14308 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
14309under Python 2.7.")
14310 (license license:gpl2)))
14311
14312(define-public pybind11
14313 (package
14314 (name "pybind11")
14315 (version "2.2.4")
14316 (source (origin
14317 (method git-fetch)
14318 (uri (git-reference
14319 (url "https://github.com/pybind/pybind11.git")
14320 (commit (string-append "v" version))))
14321 (sha256
14322 (base32
14323 "0pa79ymcasv8br5ifbx7878id5py2jpjac3i20cqxr6gs9l6ivlv"))
14324 (file-name (git-file-name name version))))
14325 (build-system cmake-build-system)
14326 (native-inputs
14327 `(("python" ,python)
14328 ("python-pytest" ,python-pytest)))
14329 (arguments
14330 `(#:test-target "check"))
14331 (home-page "https://github.com/pybind/pybind11/")
14332 (synopsis "Seamless operability between C++11 and Python")
14333 (description "pybind11 is a lightweight header-only library that exposes
14334C++ types in Python and vice versa, mainly to create Python bindings of
14335existing C++ code. Its goals and syntax are similar to the excellent
14336Boost.Python library by David Abrahams: to minimize boilerplate code in
14337traditional extension modules by inferring type information using compile-time
14338introspection.")
14339 (license license:expat)))
14340
14341(define-public python-fasteners
14342 (package
14343 (name "python-fasteners")
14344 (version "0.14.1")
14345 (source
14346 (origin
14347 (method url-fetch)
14348 (uri (pypi-uri "fasteners" version))
14349 (sha256
14350 (base32
14351 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
14352 (build-system python-build-system)
14353 (propagated-inputs
14354 `(("python-monotonic" ,python-monotonic)
14355 ("python-six" ,python-six)
14356 ("python-testtools" ,python-testtools)))
14357 (home-page "https://github.com/harlowja/fasteners")
14358 (synopsis "Python package that provides useful locks")
14359 (description
14360 "This package provides a Python program that provides following locks:
14361
14362@itemize
14363@item Locking decorator
14364@item Reader-writer locks
14365@item Inter-process locks
14366@item Generic helpers
14367@end itemize\n")
14368 (properties `((python2-variant . ,(delay python2-fasteners))))
14369 (license license:asl2.0)))
14370
14371(define-public python2-fasteners
14372 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
14373 (package
14374 (inherit base)
14375 (propagated-inputs
14376 `(("python2-futures" ,python2-futures)
14377 ,@(package-propagated-inputs base))))))
14378
14379(define-public python-requests-file
14380 (package
14381 (name "python-requests-file")
14382 (version "1.4.3")
14383 (source
14384 (origin
14385 (method url-fetch)
14386 (uri (pypi-uri "requests-file" version))
14387 (sha256
14388 (base32
14389 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
14390 (build-system python-build-system)
14391 (propagated-inputs
14392 `(("python-requests" ,python-requests)
14393 ("python-six" ,python-six)))
14394 (home-page
14395 "https://github.com/dashea/requests-file")
14396 (synopsis "File transport adapter for Requests")
14397 (description
14398 "Requests-File is a transport adapter for use with the Requests Python
14399library to allow local filesystem access via file:// URLs.")
14400 (license license:asl2.0)))
14401
14402(define-public python2-requests-file
14403 (package-with-python2 python-requests-file))
14404
14405(define-public python-tldextract
14406 (package
14407 (name "python-tldextract")
14408 (version "2.2.0")
14409 (source
14410 (origin
14411 (method url-fetch)
14412 (uri (pypi-uri "tldextract" version))
14413 (sha256
14414 (base32
14415 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
14416 (build-system python-build-system)
14417 (native-inputs
14418 `(("python-pytest" ,python-pytest)
14419 ("python-responses" ,python-responses)))
14420 (propagated-inputs
14421 `(("python-idna" ,python-idna)
14422 ("python-requests" ,python-requests)
14423 ("python-requests-file" ,python-requests-file)))
14424 (home-page
14425 "https://github.com/john-kurkowski/tldextract")
14426 (synopsis
14427 "Separate the TLD from the registered domain and subdomains of a URL")
14428 (description
14429 "TLDExtract accurately separates the TLD from the registered domain and
14430subdomains of a URL, using the Public Suffix List. By default, this includes
14431the public ICANN TLDs and their exceptions. It can optionally support the
14432Public Suffix List's private domains as well.")
14433 (license license:bsd-3)))
14434
14435(define-public python2-tldextract
14436 (package-with-python2 python-tldextract))
14437
14438(define-public python-pynamecheap
14439 (package
14440 (name "python-pynamecheap")
14441 (version "0.0.3")
14442 (source
14443 (origin
14444 (method url-fetch)
14445 (uri (pypi-uri "PyNamecheap" version))
14446 (sha256
14447 (base32
14448 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
14449 (build-system python-build-system)
14450 (propagated-inputs
14451 `(("python-requests" ,python-requests)))
14452 (home-page
14453 "https://github.com/Bemmu/PyNamecheap")
14454 (synopsis
14455 "Namecheap API client in Python")
14456 (description
14457 "PyNamecheap is a Namecheap API client in Python.")
14458 (license license:expat)))
14459
14460(define-public python2-pynamecheap
14461 (package-with-python2 python-pynamecheap))
14462
14463(define-public python-dns-lexicon
14464 (package
14465 (name "python-dns-lexicon")
14466 (version "2.4.0")
14467 (source
14468 (origin
14469 (method url-fetch)
14470 (uri (pypi-uri "dns-lexicon" version))
14471 (sha256
14472 (base32
14473 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
14474 (build-system python-build-system)
14475 (arguments
14476 `(#:tests? #f)) ;requires internet access
14477 (propagated-inputs
14478 `(("python-future" ,python-future)
14479 ("python-pynamecheap" ,python-pynamecheap)
14480 ("python-requests" ,python-requests)
14481 ("python-tldextract" ,python-tldextract)
14482 ("python-urllib3" ,python-urllib3)))
14483 (home-page "https://github.com/AnalogJ/lexicon")
14484 (synopsis
14485 "Manipulate DNS records on various DNS providers")
14486 (description
14487 "Lexicon provides a way to manipulate DNS records on multiple DNS
14488providers in a standardized way. It has a CLI but it can also be used as a
14489Python library. It was designed to be used in automation, specifically with
14490Let's Encrypt.")
14491 (license license:expat)))
14492
14493(define-public python2-dns-lexicon
14494 (package-with-python2 python-dns-lexicon))
14495
14496(define-public python-commandlines
14497 (package
14498 (name "python-commandlines")
14499 (version "0.4.1")
14500 (source
14501 (origin
14502 (method url-fetch)
14503 (uri (pypi-uri "commandlines" version))
14504 (sha256
14505 (base32
14506 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
14507 (build-system python-build-system)
14508 (home-page "https://github.com/chrissimpkins/commandlines")
14509 (synopsis "Command line argument to object parsing library")
14510 (description
14511 "@code{Commandlines} is a Python library for command line application
14512development that supports command line argument parsing, command string
14513validation testing and application logic.")
14514 (license license:expat)))
14515
14516;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
14517;; python-numba. They have a very unflexible relationship.
14518(define-public python-numba
14519 (package
14520 (name "python-numba")
7757e6d8 14521 (version "0.42.0")
44d10b1f
RW
14522 (source
14523 (origin
14524 (method url-fetch)
14525 (uri (pypi-uri "numba" version))
14526 (sha256
14527 (base32
7757e6d8 14528 "03rqdfx0512lcri2bcpngx5k3jwfbqnanqj3n19c7d6h6hqxvq9x"))))
44d10b1f
RW
14529 (build-system python-build-system)
14530 (arguments
14531 `(#:modules ((guix build utils)
14532 (guix build python-build-system)
14533 (ice-9 ftw)
14534 (srfi srfi-1)
14535 (srfi srfi-26))
14536 #:phases
14537 (modify-phases %standard-phases
14538 (add-after 'unpack 'disable-proprietary-features
14539 (lambda _
14540 (setenv "NUMBA_DISABLE_HSA" "1")
14541 (setenv "NUMBA_DISABLE_CUDA" "1")
14542 #t))
14543 (add-after 'unpack 'remove-failing-tests
14544 (lambda _
14545 ;; FIXME: these tests fail for unknown reasons:
14546 ;; test_non_writable_pycache, test_non_creatable_pycache, and
14547 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
14548 (substitute* "numba/tests/test_dispatcher.py"
14549 (("def test(_non_writable_pycache)" _ m)
14550 (string-append "def guix_skip" m))
14551 (("def test(_non_creatable_pycache)" _ m)
14552 (string-append "def guix_skip" m))
14553 (("def test(_frozen)" _ m)
14554 (string-append "def guix_skip" m)))
14555
14556 ;; These tests fail because we don't run the tests from the build
14557 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
14558 ;; They ar in numba.tests.test_pycc.TestDistutilsSupport.
14559 (substitute* "numba/tests/test_pycc.py"
14560 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
14561 (string-append "def guix_skip" m)))
14562 #t))
14563 (replace 'check
14564 (lambda _
14565 (let ((cwd (getcwd)))
14566 (setenv "PYTHONPATH"
14567 (string-append cwd "/build/"
14568 (find (cut string-prefix? "lib" <>)
14569 (scandir (string-append cwd "/build")))
14570 ":"
14571 (getenv "PYTHONPATH")))
14572 ;; Something is wrong with the PYTHONPATH when running the
14573 ;; tests from the build directory, as it complains about not being
14574 ;; able to import certain modules.
14575 (with-directory-excursion "/tmp"
14576 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
14577 #t)))))
14578 (propagated-inputs
14579 `(("python-llvmlite" ,python-llvmlite)
14580 ("python-numpy" ,python-numpy)
14581 ("python-singledispatch" ,python-singledispatch)))
14582 ;; Needed for tests.
14583 (inputs
14584 `(("python-jinja2" ,python-jinja2)
14585 ("python-pygments" ,python-pygments)))
14586 (home-page "https://numba.pydata.org")
14587 (synopsis "Compile Python code using LLVM")
14588 (description "Numba gives you the power to speed up your applications with
14589high performance functions written directly in Python. With a few
14590annotations, array-oriented and math-heavy Python code can be just-in-time
14591compiled to native machine instructions, similar in performance to C, C++ and
14592Fortran, without having to switch languages or Python interpreters.
14593
14594Numba works by generating optimized machine code using the LLVM compiler
14595infrastructure at import time, runtime, or statically (using the included pycc
14596tool).")
14597 (license license:bsd-3)))
14598
14599(define-public python-anndata
14600 (package
14601 (name "python-anndata")
8c9372c1 14602 (version "0.6.18")
44d10b1f
RW
14603 (source
14604 (origin
14605 (method url-fetch)
14606 (uri (pypi-uri "anndata" version))
14607 (sha256
14608 (base32
8c9372c1 14609 "03x83yjaccbqszj7x4fwwmpil0ai59yx64d1zmf2691za3j03w73"))))
44d10b1f
RW
14610 (build-system python-build-system)
14611 (propagated-inputs
14612 `(("python-h5py" ,python-h5py)
14613 ("python-natsort" ,python-natsort)
14614 ("python-pandas" ,python-pandas)
14615 ("python-scipy" ,python-scipy)))
14616 (home-page "https://github.com/theislab/anndata")
14617 (synopsis "Annotated data for data analysis pipelines")
14618 (description "Anndata is a package for simple (functional) high-level APIs
14619for data analysis pipelines. In this context, it provides an efficient,
14620scalable way of keeping track of data together with learned annotations and
14621reduces the code overhead typically encountered when using a mostly
14622object-oriented library such as @code{scikit-learn}.")
14623 (license license:bsd-3)))
14624
14625(define-public python-dill
14626 (package
14627 (name "python-dill")
14628 (version "0.2.8.2")
14629 (source
14630 (origin
14631 (method url-fetch)
14632 (uri (pypi-uri "dill" version))
14633 (sha256
14634 (base32
14635 "1cymzn9fxwdy33h21zkk4gqgzvd25110hh3zdqnvnwa3p52c4kb2"))))
14636 (build-system python-build-system)
14637 ;; FIXME: The check phase fails with "don't know how to make test".
14638 (arguments '(#:tests? #f))
14639 (home-page "https://pypi.org/project/dill")
14640 (synopsis "Serialize all of Python")
14641 (description "Dill extends Python's @code{pickle} module for serializing
14642and de-serializing Python objects to the majority of the built-in Python
14643types. Dill provides the user the same interface as the @code{pickle} module,
14644and also includes some additional features. In addition to pickling Python
14645objects, @code{dill} provides the ability to save the state of an interpreter
14646session in a single command. Hence, it would be feasable to save a
14647interpreter session, close the interpreter, ship the pickled file to another
14648computer, open a new interpreter, unpickle the session and thus continue from
14649the saved state of the original interpreter session.")
14650 (license license:bsd-3)))
14651
14652(define-public python-multiprocess
14653 (package
14654 (name "python-multiprocess")
14655 (version "0.70.6.1")
14656 (source
14657 (origin
14658 (method url-fetch)
14659 (uri (pypi-uri "multiprocess" version))
14660 (sha256
14661 (base32
14662 "1ip5caz67b3q0553mr8gm8xwsb8x500jn8ml0gihgyfy52m2ypcq"))))
14663 (build-system python-build-system)
14664 (propagated-inputs
14665 `(("python-dill" ,python-dill)))
14666 (home-page "https://pypi.org/project/multiprocess")
14667 (synopsis "Multiprocessing and multithreading in Python")
14668 (description
14669 "This package is a fork of the multiprocessing Python package, a package
14670which supports the spawning of processes using the API of the standard
14671library's @code{threading} module.")
14672 (license license:bsd-3)))
14673
14674(define-public python-toolz
14675 (package
14676 (name "python-toolz")
14677 (version "0.9.0")
14678 (source
14679 (origin
14680 (method url-fetch)
14681 (uri (pypi-uri "toolz" version))
14682 (sha256
14683 (base32
14684 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
14685 (build-system python-build-system)
14686 ;; FIXME: tests cannot be computed: "Can't perform this operation for
14687 ;; unregistered loader type"
14688 (arguments '(#:tests? #f))
14689 (home-page "https://github.com/pytoolz/toolz/")
14690 (synopsis "List processing tools and functional utilities")
14691 (description
14692 "This package provides a set of utility functions for iterators,
14693functions, and dictionaries.")
14694 (license license:bsd-3)))
14695
14696(define-public python2-toolz
14697 (package-with-python2 python-toolz))
14698
14699(define-public python-cytoolz
14700 (package
14701 (name "python-cytoolz")
14702 (version "0.9.0.1")
14703 (source
14704 (origin
14705 (method url-fetch)
14706 (uri (pypi-uri "cytoolz" version))
14707 (sha256
14708 (base32
14709 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
14710 (build-system python-build-system)
14711 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
14712 ;; 'exceptions'"
14713 (arguments '(#:tests? #f))
14714 (propagated-inputs
14715 `(("python-toolz" ,python-toolz)))
14716 (native-inputs
14717 `(("python-cython" ,python-cython)))
14718 (home-page "https://github.com/pytoolz/cytoolz")
14719 (synopsis "High performance functional utilities")
14720 (description
14721 "The cytoolz package implements the same API as provided by toolz. The
14722main differences are that @code{cytoolz} is faster and cytoolz offers a C API
14723that is accessible to other projects developed in Cython.")
14724 (license license:bsd-3)))
14725
14726(define-public python-sortedcontainers
14727 (package
14728 (name "python-sortedcontainers")
14729 (version "2.0.4")
14730 (source
14731 (origin
14732 (method url-fetch)
14733 (uri (pypi-uri "sortedcontainers" version))
14734 (sha256
14735 (base32
14736 "10hrk2k0hbf9x78vd3f0lj277m1yzfhzzxr0hja718liwb398wk0"))))
14737 (build-system python-build-system)
14738 (native-inputs
14739 `(("python-tox" ,python-tox)))
14740 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
14741 (synopsis "Sorted List, Sorted Dict, Sorted Set")
14742 (description
14743 "This package provides a sorted collections library, written in
14744pure-Python.")
14745 (license license:asl2.0)))
14746
14747(define-public python-cloudpickle
14748 (package
14749 (name "python-cloudpickle")
14750 (version "0.6.1")
14751 (source
14752 (origin
14753 (method url-fetch)
14754 (uri (pypi-uri "cloudpickle" version))
14755 (sha256
14756 (base32
14757 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
14758 (build-system python-build-system)
14759 ;; FIXME: there are 5 errors in 122 tests:
14760 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
14761 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
14762 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
14763 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
14764 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
14765 ;; TypeError: cannot serialize '_io.BufferedRandom' object
14766 (arguments '(#:tests? #f))
14767 (native-inputs
14768 `(("python-pytest" ,python-pytest)
14769 ("python-mock" ,python-mock)
14770 ("python-tornado" ,python-tornado)))
14771 (home-page "https://github.com/cloudpipe/cloudpickle")
14772 (synopsis "Extended pickling support for Python objects")
14773 (description
14774 "Cloudpickle makes it possible to serialize Python constructs not
14775supported by the default pickle module from the Python standard library. It
14776is especially useful for cluster computing where Python expressions are
14777shipped over the network to execute on remote hosts, possibly close to the
14778data.")
14779 (license license:bsd-3)))
14780
14781(define-public python2-cloudpickle
14782 (package-with-python2 python-cloudpickle))
14783
14784(define-public python-locket
14785 (package
14786 (name "python-locket")
14787 (version "0.2.0")
14788 (source
14789 (origin
14790 (method url-fetch)
14791 (uri (pypi-uri "locket" version))
14792 (sha256
14793 (base32
14794 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
14795 (build-system python-build-system)
14796 (home-page "https://github.com/mwilliamson/locket.py")
14797 (synopsis "File-based locks for Python")
14798 (description
14799 "Locket implements a lock that can be used by multiple processes provided
14800they use the same path.")
14801 (license license:bsd-2)))
14802
14803(define-public python2-locket
14804 (package-with-python2 python-locket))
14805
14806(define-public python-blosc
14807 (package
14808 (name "python-blosc")
14809 (version "1.5.1")
14810 (source
14811 (origin
14812 (method url-fetch)
14813 (uri (pypi-uri "blosc" version))
14814 (sha256
14815 (base32
14816 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
14817 (build-system python-build-system)
14818 ;; FIXME: all tests pass, but then this error is printed:
14819 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
14820 (arguments '(#:tests? #f))
14821 (propagated-inputs
14822 `(("python-numpy" ,python-numpy)))
14823 (home-page "https://github.com/blosc/python-blosc")
14824 (synopsis "Python wrapper for the Blosc data compressor library")
14825 (description "Blosc is a high performance compressor optimized for binary
14826data. It has been designed to transmit data to the processor cache faster
14827than the traditional, non-compressed, direct memory fetch approach via a
14828@code{memcpy()} system call.
14829
14830Blosc works well for compressing numerical arrays that contains data with
14831relatively low entropy, like sparse data, time series, grids with
14832regular-spaced values, etc.
14833
14834This Python package wraps the Blosc library.")
14835 (license license:bsd-3)))
14836
14837(define-public python2-blosc
14838 (package-with-python2 python-blosc))
14839
14840(define-public python-partd
14841 (package
14842 (name "python-partd")
14843 (version "0.3.9")
14844 (source
14845 (origin
14846 (method url-fetch)
14847 (uri (pypi-uri "partd" version))
14848 (sha256
14849 (base32
14850 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
14851 (build-system python-build-system)
14852 (propagated-inputs
14853 `(("python-blosc" ,python-blosc)
14854 ("python-locket" ,python-locket)
14855 ("python-numpy" ,python-numpy)
14856 ("python-pandas" ,python-pandas)
14857 ("python-pyzmq" ,python-pyzmq)
14858 ("python-toolz" ,python-toolz)))
14859 (home-page "https://github.com/dask/partd/")
14860 (synopsis "Appendable key-value storage")
14861 (description "Partd stores key-value pairs. Values are raw bytes. We
14862append on old values. Partd excels at shuffling operations.")
14863 (license license:bsd-3)))
14864
14865(define-public python2-partd
14866 (package-with-python2 python-partd))
14867
14868(define-public python-dask
14869 (package
14870 (name "python-dask")
755226e9 14871 (version "1.1.4")
44d10b1f
RW
14872 (source
14873 (origin
14874 (method url-fetch)
14875 (uri (pypi-uri "dask" version))
14876 (sha256
14877 (base32
755226e9 14878 "1hrnfz4pzawikz9b622vjz2500n7hs25nz9msy1k8l4g7l2kr6ky"))))
44d10b1f
RW
14879 (build-system python-build-system)
14880 ;; A single test out of 5000+ fails. This test is marked as xfail when
14881 ;; pytest-xdist is used.
14882 (arguments
14883 `(#:phases
14884 (modify-phases %standard-phases
14885 (add-after 'unpack 'disable-broken-test
14886 (lambda _
14887 (substitute* "dask/tests/test_threaded.py"
14888 (("def test_interrupt\\(\\)" m)
14889 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
14890 m)))
14891 (when (which "python2")
14892 ;; This test fails with recent Pandas:
14893 ;; <https://github.com/dask/dask/issues/3794>.
14894 (substitute* "dask/dataframe/tests/test_dataframe.py"
14895 (("def test_info\\(\\)" m)
14896 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
14897 m))))
14898 #t))
14899 (replace 'check
14900 (lambda _ (invoke "pytest" "-vv"))))))
14901 (propagated-inputs
14902 `(("python-cloudpickle" ,python-cloudpickle)
14903 ("python-numpy" ,python-numpy)
14904 ("python-pandas" ,python-pandas)
14905 ("python-partd" ,python-partd)
14906 ("python-toolz" ,python-toolz)
14907 ("python-pyyaml" ,python-pyyaml)))
14908 (native-inputs
14909 `(("python-pytest" ,python-pytest)
14910 ("python-pytest-runner" ,python-pytest-runner)))
14911 (home-page "https://github.com/dask/dask/")
14912 (synopsis "Parallel computing with task scheduling")
14913 (description
14914 "Dask is a flexible parallel computing library for analytics. It
14915consists of two components: dynamic task scheduling optimized for computation,
14916and large data collections like parallel arrays, dataframes, and lists that
14917extend common interfaces like NumPy, Pandas, or Python iterators to
14918larger-than-memory or distributed environments. These parallel collections
14919run on top of the dynamic task schedulers. ")
14920 (license license:bsd-3)))
14921
14922(define-public python2-dask
14923 (package-with-python2 python-dask))
14924
14925(define-public python-ilinkedlist
14926 (package
14927 (name "python-ilinkedlist")
14928 (version "0.4.0")
14929 (source
14930 (origin
14931 (method url-fetch)
14932 (uri (pypi-uri "ilinkedlist" version))
14933 (sha256
14934 (base32
14935 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
14936 (build-system python-build-system)
14937 (native-inputs `(("python-pytest" ,python-pytest)))
14938 (inputs `(("python" ,python)))
14939 (home-page "https://github.com/luther9/ilinkedlist-py")
14940 (synopsis "Immutable linked list library")
14941 (description
14942 "This is a implementation of immutable linked lists for Python. It
14943contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
14944Since a linked list is treated as immutable, it is hashable, and its length
14945can be retrieved in constant time. Some of the terminology is inspired by
14946LISP. It is possible to create an improper list by creating a @code{Pair}
14947with a non-list @code{cdr}.")
14948 (license license:gpl3+)))
14949
14950(define-public python-readlike
14951 (package
14952 (name "python-readlike")
14953 (version "0.1.3")
14954 (source
14955 (origin
14956 (method url-fetch)
14957 (uri (pypi-uri "readlike" version))
14958 (sha256
14959 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
14960 (build-system python-build-system)
14961 (home-page "https://github.com/jangler/readlike")
14962 (synopsis "GNU Readline-like line editing module")
14963 (description
14964 "This Python module provides line editing functions similar to the default
14965Emacs-style ones of GNU Readline. Unlike the Python standard library's
14966@code{readline} package, this one allows access to those capabilties in settings
14967outside of a standard command-line interface. It is especially well-suited to
14968interfacing with Urwid, due to a shared syntax for describing key inputs.
14969
14970Currently, all stateless Readline commands are implemented. Yanking and history
14971are not supported.")
14972 (license license:expat)))
14973
14974(define-public python2-readlike
14975 (package-with-python2 python-readlike))
14976
14977(define-public python-reparser
14978 (package
14979 (name "python-reparser")
14980 (version "1.4.3")
14981 (source
14982 (origin
14983 (method url-fetch)
14984 (uri (pypi-uri "ReParser" version))
14985 (sha256
14986 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
14987 (build-system python-build-system)
14988 (home-page "https://github.com/xmikos/reparser")
14989 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
14990 (description
14991 "This Python library provides a simple lexer/parser for inline markup based
14992on regular expressions.")
14993 (license license:expat)))
14994
14995(define-public python2-reparser
14996 (let ((reparser (package-with-python2
14997 (strip-python2-variant python-reparser))))
14998 (package (inherit reparser)
14999 (propagated-inputs
15000 `(("python2-enum34" ,python2-enum34)
15001 ,@(package-propagated-inputs reparser))))))
15002
15003(define-public python-precis-i18n
15004 (package
15005 (name "python-precis-i18n")
15006 (version "1.0.0")
15007 (source
15008 (origin
15009 (method url-fetch)
15010 (uri (pypi-uri "precis_i18n" version))
15011 (sha256
15012 (base32
15013 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
15014 (build-system python-build-system)
15015 (home-page "https://github.com/byllyfish/precis_i18n")
15016 (synopsis "Implementation of the PRECIS framework")
15017 (description
15018 "This module implements the PRECIS Framework as described in RFC 8264,
15019RFC 8265 and RFC 8266.")
15020 (license license:expat)))
15021
d0446c4b
RW
15022(define-public python-absl-py
15023 (package
15024 (name "python-absl-py")
15025 (version "0.6.1")
15026 (source
15027 (origin
15028 (method url-fetch)
15029 (uri (pypi-uri "absl-py" version))
15030 (sha256
15031 (base32
15032 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
15033 (build-system python-build-system)
15034 (propagated-inputs
15035 `(("python-six" ,python-six)))
15036 (home-page "https://github.com/abseil/abseil-py")
15037 (synopsis "Abseil Python common libraries")
15038 (description
15039 "This package provides the Abseil Python Common Libraries, a collection
15040of Python libraries for building Python applications.")
15041 (license license:asl2.0)))
15042
81bed4e9
RW
15043(define-public python-astor
15044 (package
15045 (name "python-astor")
15046 (version "0.7.1")
15047 (source
15048 (origin
15049 (method url-fetch)
15050 (uri (pypi-uri "astor" version))
15051 (sha256
15052 (base32
15053 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
15054 (build-system python-build-system)
15055 ;; FIXME: There are two errors and two test failures.
15056 (arguments `(#:tests? #f))
15057 (home-page "https://github.com/berkerpeksag/astor")
39ee82ff 15058 (synopsis "Read and write Python ASTs")
81bed4e9 15059 (description "Astor is designed to allow easy manipulation of Python
39ee82ff 15060source via the Abstract Syntax Tree.")
81bed4e9
RW
15061 (license license:bsd-3)))
15062
39ee82ff
RW
15063(define-public python2-astor
15064 (package-with-python2 python-astor))
15065
22e623ae
RW
15066(define-public python-grpcio
15067 (package
15068 (name "python-grpcio")
15069 (version "1.17.1")
15070 (source
15071 (origin
15072 (method url-fetch)
15073 (uri (pypi-uri "grpcio" version))
15074 (sha256
15075 (base32
15076 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
15077 (build-system python-build-system)
15078 (propagated-inputs
15079 `(("python-six" ,python-six)))
15080 (home-page "https://grpc.io")
15081 (synopsis "HTTP/2-based RPC framework")
15082 (description "This package provides a Python library for communicating
15083with the HTTP/2-based RPC framework gRPC.")
15084 (license license:asl2.0)))
15085
79869f80
RW
15086(define-public python-astunparse
15087 (package
15088 (name "python-astunparse")
15089 (version "1.6.1")
15090 (source
15091 (origin
15092 (method url-fetch)
15093 (uri (pypi-uri "astunparse" version))
15094 (sha256
15095 (base32
15096 "1jhidwyrqn17avqh9xnnm3wd7q7aahaq009cba67g86y6gxicyyj"))))
15097 (build-system python-build-system)
15098 (arguments '(#:tests? #f)) ; there are none
15099 (propagated-inputs
15100 `(("python-six" ,python-six)
15101 ("python-wheel" ,python-wheel)))
15102 (home-page "https://github.com/simonpercivall/astunparse")
15103 (synopsis "AST unparser for Python")
15104 (description "This package provides an AST unparser for Python. It is a
15105factored out version of @code{unparse} found in the Python source
15106distribution.")
15107 (license license:bsd-3)))
15108
2884aac0
RW
15109(define-public python-gast
15110 (package
15111 (name "python-gast")
bd300261 15112 (version "0.2.2")
2884aac0
RW
15113 (source
15114 (origin
15115 (method url-fetch)
15116 (uri (pypi-uri "gast" version))
15117 (sha256
bd300261 15118 (base32 "1w5dzdb3gpcfmd2s0b93d8gff40a1s41rv31458z14inb3s9v4zy"))))
2884aac0
RW
15119 (build-system python-build-system)
15120 (propagated-inputs
15121 `(("python-astunparse" ,python-astunparse)))
15122 (home-page "https://pypi.org/project/gast/")
15123 (synopsis "Generic Python AST that abstracts the underlying Python version")
15124 (description
15125 "GAST provides a compatibility layer between the AST of various Python
15126versions, as produced by @code{ast.parse} from the standard @code{ast}
15127module.")
15128 (license license:bsd-3)))
15129
44d10b1f
RW
15130(define-public python-wikidata
15131 (package
15132 (name "python-wikidata")
15133 (version "0.6.1")
15134 (source
15135 (origin
15136 (method url-fetch)
15137 (uri (pypi-uri "Wikidata" version))
15138 (sha256
15139 (base32
15140 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
15141 (build-system python-build-system)
15142 (propagated-inputs
15143 `(("python-babel" ,python-babel)))
15144 (home-page "https://github.com/dahlia/wikidata")
15145 (synopsis "Wikidata client library")
15146 (description
15147 "This package provides a Python interface to
15148@url{https://www.wikidata.org/, Wikidata}.")
15149 (properties '((upstream-name . "Wikidata")))
15150 (license license:gpl3+)))
15151
15152(define-public python-doctest-ignore-unicode
15153 (package
15154 (name "python-doctest-ignore-unicode")
15155 (version "0.1.2")
15156 (source
15157 (origin
15158 (method url-fetch)
15159 (uri (pypi-uri "doctest-ignore-unicode" version))
15160 (sha256
15161 (base32
15162 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
15163 (build-system python-build-system)
15164 (native-inputs
15165 `(("python-nose" ,python-nose)))
15166 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
15167 (synopsis "Ignore Unicode literal prefixes in doctests")
15168 (description
15169 "This package adds support for a flag to ignore Unicode literal prefixes
15170in doctests.")
15171 (license license:asl2.0)))
15172
15173(define-public python-attr
15174 (package
15175 (name "python-attr")
15176 (version "0.3.1")
15177 (source
15178 (origin
15179 (method url-fetch)
15180 (uri (pypi-uri "attr" version))
15181 (sha256
15182 (base32
15183 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
15184 (build-system python-build-system)
15185 (home-page "https://github.com/denis-ryzhkov/attr")
15186 (synopsis "Decorator for attributes of target function or class")
15187 (description "Simple decorator to set attributes of target function or
15188class in a @acronym{DRY, Don't Repeat Yourself} way.")
15189 (license license:expat)))
f98232a3
VC
15190
15191(define-public python-construct
15192 (package
15193 (name "python-construct")
15194 (version "2.9.45")
15195 (source
15196 (origin
15197 (method url-fetch)
15198 (uri (pypi-uri "construct" version))
15199 (sha256
15200 (base32
15201 "130iy05awzigm2xah2yvlmb08mac5bi4gzr5m3g7k1krs3ps0w92"))))
15202 (build-system python-build-system)
15203 (arguments
15204 `(#:tests? #f)) ; No tests exist.
15205 (propagated-inputs
15206 `(("python-extras" ,python-extras)
15207 ("python-arrow" ,python-arrow)
15208 ("python-numpy" ,python-numpy)
15209 ("python-ruamel.yaml" ,python-ruamel.yaml)))
15210 (home-page "http://construct.readthedocs.io")
15211 (synopsis "Declarative and symmetrical parser and builder for binary data")
15212 (description
15213 "This package provides both simple, atomic constructs (such as
15214integers of various sizes), as well as composite ones which allow you
15215form hierarchical and sequential structures of increasing complexity.
15216It features bit and byte granularity, easy debugging and testing, an
15217easy-to-extend subclass system, and lots of primitive constructs to
15218make your work easier.")
15219 (license license:expat)))
b742c006
LF
15220
15221(define-public python-humanize
15222 (package
15223 (name "python-humanize")
15224 (version "0.5.1")
15225 (source
15226 (origin
15227 (method url-fetch)
15228 (uri (pypi-uri "humanize" version))
15229 (sha256
15230 (base32
15231 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
15232 (arguments
15233 '(#:tests? #f)) ; tests not in pypi archive
15234 (build-system python-build-system)
15235 (home-page "https://github.com/jmoiron/humanize")
15236 (synopsis "Print numerical information in a human-readable form")
15237 (description "This package provides a Python module that displays numbers
15238and dates in \"human readable\" forms. For example, it would display
15239\"12345591313\" as \"12.3 billion\".")
15240 (license license:expat)))
d5bbf66d
LF
15241
15242(define-public python-txaio
15243 (package
15244 (name "python-txaio")
15245 (version "18.8.1")
15246 (source
15247 (origin
15248 (method url-fetch)
15249 (uri (pypi-uri "txaio" version))
15250 (sha256
15251 (base32
15252 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
15253 (build-system python-build-system)
15254 (propagated-inputs
15255 `(("python-twisted" ,python-twisted)
15256 ("python-six" ,python-six)))
15257 (home-page "https://github.com/crossbario/txaio")
15258 (synopsis "Compatibility layer between Python asyncio and Twisted")
15259 (description "Txaio provides a compatibility layer between the Python
15260@code{asyncio} module and @code{Twisted}.")
15261 (license license:expat)))
963dfd3a
RW
15262
15263(define-public python-toolshed
15264 (package
15265 (name "python-toolshed")
15266 (version "0.4.6")
15267 (source
15268 (origin
15269 (method url-fetch)
15270 (uri (pypi-uri "toolshed" version))
15271 (sha256
15272 (base32
15273 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
15274 (build-system python-build-system)
15275 (native-inputs
15276 `(("python-nose" ,python-nose)))
15277 (home-page "https://github.com/brentp/toolshed/")
15278 (synopsis "Collection of modules and functions for working with data")
15279 (description "This is a collection of well-tested, simple modules and
15280functions that aim to reduce boilerplate when working with data.")
15281 (license license:bsd-2)))
c91ecf2d
RW
15282
15283(define-public python-annoy
15284 (package
15285 (name "python-annoy")
15286 (version "1.15.1")
15287 (source
15288 (origin
15289 (method url-fetch)
15290 (uri (pypi-uri "annoy" version))
15291 (sha256
15292 (base32
15293 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
15294 (build-system python-build-system)
15295 (native-inputs
15296 `(("python-nose" ,python-nose)))
15297 (home-page "https://github.com/spotify/annoy/")
15298 (synopsis "Approximate nearest neighbors library")
15299 (description
15300 "Annoy is a C++ library with Python bindings to search for points in
15301space that are close to a given query point. It also creates large read-only
15302file-based data structures that are @code{mmap}ped into memory so that many
15303processes may share the same data.")
15304 (license license:asl2.0)))
412342d1
NG
15305
15306(define-public python-sphinxcontrib-svg2pdfconverter
15307 (package
15308 (name "python-sphinxcontrib-svg2pdfconverter")
15309 (version "0.1.0")
15310 (source (origin
15311 (method url-fetch)
15312 (uri (pypi-uri "sphinxcontrib-svg2pdfconverter" version))
15313 (sha256
15314 (base32
15315 "1abvbgkkii13q8nsb10r0gc5lm0p9iq1iwhfhakn5ifn6asa0183"))))
15316 (build-system python-build-system)
15317 (propagated-inputs
15318 `(("python-sphinx" ,python-sphinx)))
15319 (home-page "https://github.com/missinglinkelectronics/sphinxcontrib-svg2pdfconverter/releases")
15320 (synopsis "Sphinx SVG to PDF converter extension")
15321 (description "A Sphinx extension to convert SVG images to PDF in case the builder does not support
15322SVG images natively (e.g. LaTeX).")
15323 (license license:bsd-3)))