gnu: libqmi: Update to 1.22.4.
[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")
c3ecab0d 3355 (version "0.28.0")
44d10b1f
RW
3356 (source
3357 (origin
3358 (method url-fetch)
3359 (uri (pypi-uri "pygit2" version))
3360 (sha256
c3ecab0d 3361 (base32 "0lngsaz029d4fjcwhl17pr59nh9gwl6hwfin36nph60fgsmfdg3d"))))
44d10b1f
RW
3362 (build-system python-build-system)
3363 (arguments
c3ecab0d 3364 '(#:tests? #f)) ; tests don't run correctly in our environment
44d10b1f
RW
3365 (propagated-inputs
3366 `(("python-six" ,python-six)
3367 ("python-cffi" ,python-cffi)
3368 ("libgit2" ,libgit2)
3369 ("python-tox" ,python-tox)))
3370 (native-inputs
3371 `(("python-pytest" ,python-pytest)))
3372 (home-page "https://github.com/libgit2/pygit2")
3373 (synopsis "Python bindings for libgit2")
3374 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3375library, libgit2 implements Git plumbing.")
3376 ;; GPL2.0 only, with linking exception.
3377 (license license:gpl2)))
3378
3379(define-public python2-pygit2
3380 (package-with-python2 python-pygit2))
3381
3382(define-public python-pyparsing
3383 (package
3384 (name "python-pyparsing")
3385 (version "2.2.1")
3386 (source
3387 (origin
3388 (method url-fetch)
3389 (uri (pypi-uri "pyparsing" version))
3390 (sha256
3391 (base32 "06dgd0iilvf8m0ssmfpcbh8l6jf0zkp8adbb84llksg17crfx4zl"))))
3392 (build-system python-build-system)
3393 (outputs '("out" "doc"))
3394 (arguments
3395 `(#:tests? #f ; no test target
3396 #:phases
3397 (modify-phases %standard-phases
3398 (add-after 'install 'install-doc
3399 (lambda* (#:key outputs #:allow-other-keys)
3400 (let* ((doc (string-append (assoc-ref outputs "doc")
3401 "/share/doc/" ,name "-" ,version))
3402 (html-doc (string-append doc "/html"))
3403 (examples (string-append doc "/examples")))
3404 (mkdir-p html-doc)
3405 (mkdir-p examples)
3406 (for-each
3407 (lambda (dir tgt)
3408 (map (lambda (file)
3409 (install-file file tgt))
3410 (find-files dir ".*")))
3411 (list "docs" "htmldoc" "examples")
3412 (list doc html-doc examples))
3413 #t))))))
3414 (home-page "https://github.com/pyparsing/pyparsing")
3415 (synopsis "Python parsing class library")
3416 (description
3417 "The pyparsing module is an alternative approach to creating and
3418executing simple grammars, vs. the traditional lex/yacc approach, or the use
3419of regular expressions. The pyparsing module provides a library of classes
3420that client code uses to construct the grammar directly in Python code.")
3421 (license license:expat)))
3422
3423(define-public python2-pyparsing
3424 (package-with-python2 python-pyparsing))
3425
3426(define-public python-numpydoc
3427 (package
3428 (name "python-numpydoc")
3429 (version "0.8.0")
3430 (source
3431 (origin
3432 (method url-fetch)
3433 (uri (pypi-uri "numpydoc" version))
3434 (sha256
3435 (base32
3436 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
3437 (build-system python-build-system)
3438 (propagated-inputs
3439 `(("python-sphinx" ,python-sphinx)))
3440 (native-inputs
3441 `(("python-nose" ,python-nose)))
3442 (home-page "https://pypi.python.org/pypi/numpydoc")
3443 (synopsis
3444 "Numpy's Sphinx extensions")
3445 (description
3446 "Sphinx extension to support docstrings in Numpy format.")
3447 (license license:bsd-2)))
3448
3449(define-public python2-numpydoc
3450 (package-with-python2 python-numpydoc))
3451
3452(define-public python-numexpr
3453 (package
3454 (name "python-numexpr")
3455 (version "2.6.5")
3456 (source
3457 (origin
3458 (method url-fetch)
3459 (uri (pypi-uri "numexpr" version))
3460 (sha256
3461 (base32
3462 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3463 (build-system python-build-system)
3464 (arguments `(#:tests? #f)) ; no tests included
3465 (propagated-inputs
3466 `(("python-numpy" ,python-numpy)))
3467 (home-page "https://github.com/pydata/numexpr")
3468 (synopsis "Fast numerical expression evaluator for NumPy")
3469 (description
3470 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3471expressions that operate on arrays are accelerated and use less memory than
3472doing the same calculation in Python. In addition, its multi-threaded
3473capabilities can make use of all your cores, which may accelerate
3474computations, most specially if they are not memory-bounded (e.g. those using
3475transcendental functions).")
3476 (license license:expat)))
3477
3478(define-public python2-numexpr
3479 (package-with-python2 python-numexpr))
3480
3481(define-public python-cycler
3482 (package
3483 (name "python-cycler")
3484 (version "0.10.0")
3485 (source (origin
3486 (method url-fetch)
3487 (uri (pypi-uri "cycler" version))
3488 (sha256
3489 (base32
3490 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3491 (build-system python-build-system)
3492 (arguments
3493 ;; XXX: The current version requires 'coveralls' which we don't have.
3494 ;; Enable this for the next release which uses 'python-pytest'.
3495 '(#:tests? #f))
3496 (propagated-inputs
3497 `(("python-six" ,python-six)))
3498 (home-page "http://matplotlib.org/cycler/")
3499 (synopsis "Composable keyword argument iterator")
3500 (description
3501 "When using @code{matplotlib} and plotting more than one line, it is
3502common to want to be able to want to be able to cycle over one or more artist
3503styles; but the plotting logic can quickly become involved.
3504To address this and enable easy cycling over arbitrary @code{kwargs}, the
3505@code{Cycler} class was developed.")
3506 (license license:bsd-3)))
3507
3508(define-public python2-cycler
3509 (package-with-python2 python-cycler))
3510
3511(define-public python-colorspacious
3512 (package
3513 (name "python-colorspacious")
3514 (version "1.1.0")
3515 (source
dee92e65
TGR
3516 (origin
3517 (method git-fetch)
3518 (uri (git-reference
3519 (url "https://github.com/njsmith/colorspacious.git")
3520 (commit (string-append "v" version))))
3521 (file-name (git-file-name name version))
3522 (sha256
3523 (base32 "0g0lxqiscy5g5rq9421vv7abg0c90jzy0zmas2z3hya6k2dr5aid"))))
44d10b1f
RW
3524 (build-system python-build-system)
3525 (propagated-inputs
3526 `(("python-numpy" ,python-numpy)))
3527 (native-inputs
3528 `(("python-nose" ,python-nose)))
3529 (arguments
3530 `(#:phases
3531 (modify-phases %standard-phases
3532 (replace 'check
3533 (lambda _
c988afda 3534 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
44d10b1f
RW
3535 (home-page "https://github.com/njsmith/colorspacious")
3536 (synopsis "Python library for colorspace conversions")
3537 (description "@code{colorspacious} is a Python library that lets you
3538convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3539 (license license:expat)))
3540
3541(define-public python2-colorspacious
3542 (package-with-python2 python-colorspacious))
3543
3544(define-public python-matplotlib
3545 (package
3546 (name "python-matplotlib")
3547 (version "2.2.3")
3548 (source
3549 (origin
3550 (method url-fetch)
3551 (uri (pypi-uri "matplotlib" version))
3552 (sha256
3553 (base32
3554 "1rcc7x9ig3hpchkc4cwdvym3y451w74275fxr455zkfagrsvymbk"))))
3555 (build-system python-build-system)
3556 (propagated-inputs ; the following packages are all needed at run time
3557 `(("python-cycler" ,python-cycler)
3558 ("python-kiwisolver" ,python-kiwisolver)
3559 ("python-pyparsing" ,python-pyparsing)
3560 ("python-pygobject" ,python-pygobject)
3561 ("gobject-introspection" ,gobject-introspection)
3562 ("python-tkinter" ,python "tk")
3563 ("python-dateutil" ,python-dateutil)
3564 ("python-numpy" ,python-numpy)
3565 ("python-pillow" ,python-pillow)
3566 ("python-pytz" ,python-pytz)
3567 ("python-six" ,python-six)
3568 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3569 ;; from 'gtk+') provides the required 'typelib' files used by
3570 ;; 'gobject-introspection'. The location of these files is set with the
3571 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3572 ;; is done automatically by a 'native-search-path' procedure. However,
3573 ;; at run-time the user must set this variable as follows:
3574 ;;
3575 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
3576 ("gtk+" ,gtk+)
3577 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3578 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3579 ;; object. For this reason we need to import both libraries.
3580 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3581 ("python-pycairo" ,python-pycairo)
3582 ;; XXX: qtwebkit cannot be built reliably.
3583 ("python-pyqt" ,python-pyqt-without-qtwebkit)
3584 ("python-cairocffi" ,python-cairocffi)))
3585 (inputs
3586 `(("libpng" ,libpng)
3587 ("imagemagick" ,imagemagick)
3588 ("freetype" ,freetype)
3589 ("cairo" ,cairo)
3590 ("glib" ,glib)
3591 ;; FIXME: Add backends when available.
3592 ;("python-wxpython" ,python-wxpython)
3593 ("tcl" ,tcl)
3594 ("tk" ,tk)))
3595 (native-inputs
3596 `(("pkg-config" ,pkg-config)
3597 ("python-nose" ,python-nose)
3598 ("python-mock" ,python-mock)))
3599 (arguments
3600 `(#:phases
3601 (modify-phases %standard-phases
3602 (add-before 'build 'configure-environment
3603 (lambda* (#:key outputs inputs #:allow-other-keys)
3604 (let ((cairo (assoc-ref inputs "cairo"))
3605 (gtk+ (assoc-ref inputs "gtk+")))
3606 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3607 ;; has not effect.
3608 (setenv "LD_LIBRARY_PATH"
3609 (string-append cairo "/lib:" gtk+ "/lib"))
3610 (setenv "HOME" (getcwd))
3611 (call-with-output-file "setup.cfg"
3612 (lambda (port)
3613 (format port "[directories]~%
3614basedirlist = ~a,~a~%
3615 [rc_options]~%
3616backend = TkAgg~%"
3617 (assoc-ref inputs "tcl")
3618 (assoc-ref inputs "tk")))))
3619 #t)))))
3620 (home-page "http://matplotlib.org")
3621 (synopsis "2D plotting library for Python")
3622 (description
3623 "Matplotlib is a Python 2D plotting library which produces publication
3624quality figures in a variety of hardcopy formats and interactive environments
3625across platforms. Matplotlib can be used in Python scripts, the python and
3626ipython shell, web application servers, and six graphical user interface
3627toolkits.")
3628 (license license:psfl)
3629 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3630
3631(define-public python2-matplotlib
3632 (let ((matplotlib (package-with-python2
3633 (strip-python2-variant python-matplotlib))))
3634 (package (inherit matplotlib)
3635 ;; Make sure to use special packages for Python 2 instead
3636 ;; of those automatically rewritten by package-with-python2.
3637 (propagated-inputs
3638 `(("python2-pycairo" ,python2-pycairo)
3639 ("python2-backports-functools-lru-cache"
3640 ,python2-backports-functools-lru-cache)
3641 ("python2-functools32" ,python2-functools32)
3642 ("python2-pygobject-2" ,python2-pygobject-2)
3643 ("python2-subprocess32" ,python2-subprocess32)
3644 ("python2-tkinter" ,python-2 "tk")
3645 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3646 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
3647
3648(define-public python-matplotlib-documentation
3649 (package
3650 (name "python-matplotlib-documentation")
3651 (version (package-version python-matplotlib))
3652 (source (package-source python-matplotlib))
3653 (build-system python-build-system)
3654 (native-inputs
3655 `(("python-matplotlib" ,python-matplotlib)
3656 ("python-colorspacious" ,python-colorspacious)
3657 ("python-sphinx" ,python-sphinx)
3658 ("python-sphinx-gallery" ,python-sphinx-gallery)
3659 ("python-numpydoc" ,python-numpydoc)
3660 ("python-ipython" ,python-ipython)
e7a53914 3661 ("python-ipykernel" ,python-ipykernel)
44d10b1f
RW
3662 ("python-mock" ,python-mock)
3663 ("graphviz" ,graphviz)
e7a53914
RW
3664 ("texlive" ,(texlive-union (list texlive-latex-amsfonts
3665 texlive-latex-amsmath
3666 texlive-latex-enumitem
3667 texlive-latex-expdlist
3668 texlive-latex-geometry
3669 texlive-latex-preview
3670 texlive-latex-type1cm
3671 texlive-latex-ucs
3672
3673 texlive-generic-pdftex
3674
3675 texlive-fonts-amsfonts
3676 texlive-fonts-ec
3677 texlive-fonts-adobe-times
3678 texlive-fonts-txfonts)))
44d10b1f
RW
3679 ("texinfo" ,texinfo)
3680 ,@(package-native-inputs python-matplotlib)))
3681 (arguments
3682 `(#:tests? #f ; we're only generating documentation
3683 #:phases
3684 (modify-phases %standard-phases
3685 (replace 'build
3686 (lambda _
3687 (chdir "doc")
e7a53914
RW
3688 (setenv "PYTHONPATH"
3689 (string-append (getenv "PYTHONPATH")
3690 ":" (getcwd) "/../examples/units"))
44d10b1f 3691 (substitute* "conf.py"
e7a53914
RW
3692 ;; Don't use git.
3693 (("^SHA = check_output.*")
3694 (string-append "SHA = \"" ,version "\"\n"))
3695 ;; Don't fetch intersphinx files from the Internet
3696 (("^explicit_order_folders" m)
3697 (string-append "intersphinx_mapping = {}\n" m))
3698 (("'sphinx.ext.intersphinx',") "")
3699 ;; Disable URL embedding which requires internet access.
3700 (("'https://docs.scipy.org/doc/numpy'") "None")
3701 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
3702 (invoke "make"
3703 "SPHINXBUILD=sphinx-build"
3704 "SPHINXOPTS=" ; don't abort on warnings
3705 "html" "texinfo")))
44d10b1f
RW
3706 (replace 'install
3707 (lambda* (#:key inputs outputs #:allow-other-keys)
3708 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3709 (doc (string-append data "/doc/python-matplotlib-" ,version))
3710 (info (string-append data "/info"))
3711 (html (string-append doc "/html")))
3712 (mkdir-p html)
3713 (mkdir-p info)
3714 (copy-recursively "build/html" html)
3715 (symlink (string-append html "/_images")
3716 (string-append info "/matplotlib-figures"))
3717 (with-directory-excursion "build/texinfo"
3718 (substitute* "matplotlib.texi"
3719 (("@image\\{([^,]*)" all file)
3720 (string-append "@image{matplotlib-figures/" file)))
3721 (symlink (string-append html "/_images")
3722 "./matplotlib-figures")
e7a53914
RW
3723 (invoke "makeinfo" "--no-split"
3724 "-o" "matplotlib.info" "matplotlib.texi"))
3725 (install-file "build/texinfo/matplotlib.info" info))
44d10b1f
RW
3726 #t)))))
3727 (home-page (package-home-page python-matplotlib))
3728 (synopsis "Documentation for the python-matplotlib package")
3729 (description (package-description python-matplotlib))
3730 (license (package-license python-matplotlib))))
3731
3732(define-public python2-matplotlib-documentation
3733 (package-with-python2 python-matplotlib-documentation))
3734
3735(define-public python2-pysnptools
3736 (package
3737 (name "python2-pysnptools")
5d1ade85 3738 (version "0.3.13")
44d10b1f
RW
3739 (source
3740 (origin
3741 (method url-fetch)
5d1ade85 3742 (uri (pypi-uri "pysnptools" version))
44d10b1f
RW
3743 (sha256
3744 (base32
5d1ade85 3745 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
44d10b1f
RW
3746 (build-system python-build-system)
3747 (arguments
5d1ade85
RW
3748 `(#:python ,python-2 ; only Python 2.7 is supported
3749 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
44d10b1f
RW
3750 (propagated-inputs
3751 `(("python2-numpy" ,python2-numpy)
3752 ("python2-scipy" ,python2-scipy)
3753 ("python2-pandas" ,python2-pandas)))
44d10b1f 3754 (native-inputs
5d1ade85 3755 `(("python2-cython" ,python2-cython)))
1b66989b 3756 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
44d10b1f
RW
3757 (synopsis "Library for reading and manipulating genetic data")
3758 (description
3759 "PySnpTools is a library for reading and manipulating genetic data. It
3760can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
3761those files. It can also efficiently manipulate ranges of integers using set
3762operators such as union, intersection, and difference.")
3763 (license license:asl2.0)))
3764
3765(define-public python-scipy
3766 (package
3767 (name "python-scipy")
3768 (version "1.1.0")
3769 (source
3770 (origin
3771 (method url-fetch)
3772 (uri (pypi-uri "scipy" version))
3773 (sha256
3774 (base32
3775 "1lfg686w6vv2m2dfs8v9d0bf2i18z7wz5vgzjnkgmpr4hi0550w7"))))
3776 (build-system python-build-system)
3777 (propagated-inputs
3778 `(("python-numpy" ,python-numpy)
3779 ("python-matplotlib" ,python-matplotlib)
3780 ("python-pyparsing" ,python-pyparsing)))
3781 (inputs
3782 `(("lapack" ,lapack)
3783 ("openblas" ,openblas)))
3784 (native-inputs
3785 `(("python-cython" ,python-cython)
3786 ("python-pytest" ,python-pytest)
3787 ("python-sphinx" ,python-sphinx)
3788 ("python-numpydoc" ,python-numpydoc)
3789 ("gfortran" ,gfortran)
3790 ("perl" ,perl)
3791 ("which" ,which)))
3792 (outputs '("out" "doc"))
3793 (arguments
3794 `(#:phases
3795 (modify-phases %standard-phases
3796 (add-after 'unpack 'disable-broken-tests
3797 (lambda _
3798 (substitute* "scipy/sparse/linalg/dsolve/tests/test_linsolve.py"
3799 (("^( +)def test_threads_parallel\\(self\\):" m indent)
3800 (string-append indent
3801 "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
3802 m)))
3803 (substitute* "scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py"
3804 (("^def test_parallel_threads\\(\\):" m)
3805 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
3806 m)))
3807 #t))
3808 (add-before 'build 'configure-openblas
3809 (lambda* (#:key inputs #:allow-other-keys)
3810 (call-with-output-file "site.cfg"
3811 (lambda (port)
3812 (format port
3813 "[blas]
3814libraries = openblas
3815library_dirs = ~a/lib
3816include_dirs = ~a/include
3817
3818# backslash-n to make emacs happy
3819\n[atlas]
3820library_dirs = ~a/lib
3821atlas_libs = openblas
3822"
3823 (assoc-ref inputs "openblas")
3824 (assoc-ref inputs "openblas")
3825 (assoc-ref inputs "openblas"))))
3826 #t))
3827 (add-after 'install 'install-doc
3828 (lambda* (#:key inputs outputs #:allow-other-keys)
3829 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3830 (doc (string-append data "/doc/" ,name "-" ,version))
3831 (html (string-append doc "/html"))
3832 (pyver ,(string-append "PYVER=" (version-major+minor
3833 (package-version python))))
3834 ;; By default it tries to run sphinx-build through the Python
3835 ;; interpreter which won't work with our shell wrapper.
3836 (sphinxbuild "SPHINXBUILD=LANG=C sphinx-build"))
3837 ;; Make installed package available for building the
3838 ;; documentation
3839 (add-installed-pythonpath inputs outputs)
3840 (with-directory-excursion "doc"
3841 ;; Fix generation of images for mathematical expressions.
3842 (substitute* (find-files "source" "conf\\.py")
3843 (("pngmath_use_preview = True")
3844 "pngmath_use_preview = False"))
3845 (mkdir-p html)
3846 (invoke "make" "html" pyver sphinxbuild)
3847 (with-directory-excursion "build/html"
3848 (for-each (lambda (file)
3849 (let* ((dir (dirname file))
3850 (tgt-dir (string-append html "/" dir)))
3851 (install-file file html)))
3852 (find-files "." ".*")))))
3853 #t))
3854 ;; Tests can only be run after the library has been installed and not
3855 ;; within the source directory.
3856 (delete 'check)
3857 (add-after 'install 'check
3858 (lambda* (#:key inputs outputs #:allow-other-keys)
3859 (add-installed-pythonpath inputs outputs)
3860 (with-directory-excursion "/tmp"
3861 (invoke "python" "-c"
3862 "import scipy; scipy.test(verbose=2)")))))))
3863 (home-page "https://www.scipy.org/")
3864 (synopsis "The Scipy library provides efficient numerical routines")
3865 (description "The SciPy library is one of the core packages that make up
3866the SciPy stack. It provides many user-friendly and efficient numerical
3867routines such as routines for numerical integration and optimization.")
3868 (properties `((python2-variant . ,(delay python2-scipy))))
3869 (license license:bsd-3)))
3870
3871(define-public python2-scipy
3872 (package-with-python2
3873 (strip-python2-variant python-scipy)))
3874
3875(define-public python-socksipy-branch
3876 (package
3877 (name "python-socksipy-branch")
3878 (version "1.01")
3879 (source
3880 (origin
3881 (method url-fetch)
3882 (uri (pypi-uri "SocksiPy-branch" version))
3883 (sha256
3884 (base32
3885 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
3886 (build-system python-build-system)
3887 (arguments
3888 `(#:tests? #f)) ; There are no tests
3889 (home-page "https://code.google.com/archive/p/socksipy-branch/")
3890 (synopsis "Python SOCKS module")
3891 (description
3892 "SocksiPy - A Python SOCKS client module. It provides a
3893socket-like interface that supports connections to any TCP
3894service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
3895The original version was developed by Dan Haim, this is a
3896branch created by Mario Vilas to address some open issues,
3897as the original project seems to have been abandoned circa 2007.")
3898 (license license:bsd-3)))
3899
3900(define-public python2-socksipy-branch
3901 (package-with-python2 python-socksipy-branch))
3902
3903(define-public python-pycodestyle
3904 (package
3905 (name "python-pycodestyle")
3906 (version "2.4.0")
3907 (source
3908 (origin
3909 (method url-fetch)
3910 (uri (pypi-uri "pycodestyle" version))
3911 (sha256
3912 (base32
3913 "0fhy4vnlgpjq4qd1wdnl6pvdw7rah0ypmn8c9mkhz8clsndskz6b"))))
3914 (build-system python-build-system)
3915 (home-page "https://pycodestyle.readthedocs.io/")
3916 (synopsis "Python style guide checker")
3917 (description "@code{pycodestyle} (formerly pep8) is a tool to check
3918Python code against some of the style conventions in
3919@url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
3920 (license license:expat)))
3921
3922(define-public python2-pycodestyle
3923 (package-with-python2 python-pycodestyle))
3924
3925(define-public python-multidict
3926 (package
3927 (name "python-multidict")
3928 (version "4.2.0")
3929 (source
3930 (origin
3931 (method url-fetch)
3932 (uri (pypi-uri "multidict" version))
3933 (sha256
3934 (base32
3935 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
3936 (build-system python-build-system)
3937 (native-inputs
3938 `(("python-pytest" ,python-pytest)
3939 ("python-pytest-runner" ,python-pytest-runner)))
3940 (home-page "https://github.com/aio-libs/multidict/")
3941 (synopsis "Multidict implementation")
3942 (description "Multidict is dict-like collection of key-value pairs
3943where key might be occurred more than once in the container.")
3944 (license license:asl2.0)))
3945
3946(define-public python-orderedmultidict
3947 (package
3948 (name "python-orderedmultidict")
3949 (version "0.7.11")
3950 (source
3951 (origin
3952 (method url-fetch)
3953 (uri (pypi-uri "orderedmultidict" version))
3954 (sha256
3955 (base32
3956 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
3957 (build-system python-build-system)
3958 (arguments
3959 `(#:phases
3960 (modify-phases %standard-phases
3961 (add-after 'unpack 'fix-tests
3962 (lambda _
3963 ;; The package uses nosetest for running the tests.
3964 ;; Adding this initfile allows to run the test suite
3965 ;; without requiring nosetest.
d1c4f329
RW
3966 (with-output-to-file "tests/__init__.py" newline)
3967 #t)))))
44d10b1f
RW
3968 (propagated-inputs
3969 `(("python-six" ,python-six)))
3970 (native-inputs
3971 `(("python-pycodestyle" ,python-pycodestyle)))
3972 (home-page "https://github.com/gruns/orderedmultidict")
3973 (synopsis "Python Ordered Multivalue Dictionary - omdict")
3974 (description "This package contains a library for ordered multivalue
3975dictionaries. A multivalue dictionary is a dictionary that can store
3976multiple values for the same key. An ordered multivalue dictionary is a
3977multivalue dictionary that retains the order of insertions and deletions.")
3978 (license license:unlicense)))
3979
3980(define-public python2-orderedmultidict
3981 (package-with-python2 python-orderedmultidict))
3982
3983(define-public python-autopep8
3984 (package
3985 (name "python-autopep8")
3986 (version "1.3.5")
3987 (source
3988 (origin
3989 (method url-fetch)
3990 (uri (pypi-uri "autopep8" version))
3991 (sha256
3992 (base32
3993 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
3994 (build-system python-build-system)
3995 (propagated-inputs
3996 `(("python-pycodestyle" ,python-pycodestyle)))
3997 (home-page "https://github.com/hhatto/autopep8")
3998 (synopsis "Format Python code according to the PEP 8 style guide")
3999 (description
4000 "@code{autopep8} automatically formats Python code to conform to
4001the PEP 8 style guide. It uses the pycodestyle utility to determine
4002what parts of the code needs to be formatted. @code{autopep8} is
4003capable of fixing most of the formatting issues that can be reported
4004by pycodestyle.")
4005 (license (license:non-copyleft
4006 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4007
4008(define-public python2-autopep8
4009 (package-with-python2 python-autopep8))
4010
4011(define-public python-distutils-extra
4012 (package
4013 (name "python-distutils-extra")
4014 (version "2.38")
4015 (source
4016 (origin
4017 (method url-fetch)
4018 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4019 version "/+download/python-distutils-extra-"
4020 version ".tar.gz"))
4021 (sha256
4022 (base32
4023 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4024 (build-system python-build-system)
4025 (home-page "https://launchpad.net/python-distutils-extra/")
4026 (synopsis "Enhancements to Python's distutils")
4027 (description
4028 "The python-distutils-extra module enables you to easily integrate
4029gettext support, themed icons, and scrollkeeper-based documentation into
4030Python's distutils.")
4031 (license license:gpl2)))
4032
4033(define-public python2-distutils-extra
4034 (package-with-python2 python-distutils-extra))
4035
4036(define-public python2-elib.intl
4037 (package
4038 (name "python2-elib.intl")
4039 (version "0.0.3")
4040 (source
4041 (origin
4042 ;; This project doesn't tag releases or publish tarballs, so we take
4043 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4044 (method git-fetch)
4045 (uri (git-reference
4046 (url "https://github.com/dieterv/elib.intl.git")
4047 (commit "d09997cfef")))
4048 (file-name (string-append name "-" version "-checkout"))
4049 (sha256
4050 (base32
4051 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4052 (build-system python-build-system)
4053 (arguments
4054 ;; incompatible with Python 3 (exception syntax)
4055 `(#:python ,python-2
4056 #:tests? #f))
4057 (home-page "https://github.com/dieterv/elib.intl")
4058 (synopsis "Enhanced internationalization for Python")
4059 (description
4060 "The elib.intl module provides enhanced internationalization (I18N)
4061services for your Python modules and applications.")
4062 (license license:lgpl3+)))
4063
4064(define-public python-olefile
4065 (package
4066 (name "python-olefile")
4067 (version "0.45.1")
4068 (source
4069 (origin
4070 (method url-fetch)
4071 (uri (string-append "https://github.com/decalage2/olefile/archive/v"
4072 version ".tar.gz"))
4073 (file-name (string-append name "-" version ".tar.gz"))
4074 (sha256
4075 (base32
4076 "18ai19zwagm6nli14k8bii31ipbab2rp7plrvsm6gmfql551a8ai"))))
4077 (build-system python-build-system)
4078 (home-page
4079 "https://www.decalage.info/python/olefileio")
4080 (synopsis "Read and write Microsoft OLE2 files.")
4081 (description
4082 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
4083Storage or Compound Document, Microsoft Office). It is an improved version of
4084the OleFileIO module from PIL, the Python Image Library.")
4085 (license license:bsd-3)))
4086
4087(define-public python2-olefile
4088 (package-with-python2 python-olefile))
4089
4090(define-public python-pillow
4091 (package
4092 (name "python-pillow")
4093 (version "5.4.1")
4094 (source
4095 (origin
4096 (method url-fetch)
4097 (uri (pypi-uri "Pillow" version))
4098 (sha256
4099 (base32
4100 "17waygkhhzjd75kajlfw9v57mbb41lcpg6cvkdijqd7smm76ccsj"))))
4101 (build-system python-build-system)
4102 (native-inputs
4103 `(("python-pytest" ,python-pytest)))
4104 (inputs
4105 `(("freetype" ,freetype)
4106 ("lcms" ,lcms)
4107 ("zlib" ,zlib)
4108 ("libjpeg" ,libjpeg)
4109 ("openjpeg" ,openjpeg)
4110 ("libtiff" ,libtiff)
4111 ("libwebp" ,libwebp)))
4112 (propagated-inputs
4113 `(("python-olefile" ,python-olefile)))
4114 (arguments
4115 `(#:phases
4116 (modify-phases %standard-phases
4117 (add-after 'unpack 'patch-ldconfig
4118 (lambda _
4119 (substitute* "setup.py"
4120 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
4121 (delete 'check) ; We must run checks after python-pillow is installed.
4122 (add-after 'install 'check-installed
4123 (lambda* (#:key outputs inputs #:allow-other-keys)
4124 (begin
4125 (setenv "HOME" (getcwd))
4126 ;; Make installed package available for running the tests.
4127 (add-installed-pythonpath inputs outputs)
4128 (invoke "python" "selftest.py" "--installed")
4129 (invoke "python" "-m" "pytest" "-vv")))))))
4130 (home-page "https://python-pillow.org")
4131 (synopsis "Fork of the Python Imaging Library")
4132 (description
4133 "The Python Imaging Library adds image processing capabilities to your
4134Python interpreter. This library provides extensive file format support, an
4135efficient internal representation, and fairly powerful image processing
4136capabilities. The core image library is designed for fast access to data
4137stored in a few basic pixel formats. It should provide a solid foundation for
4138a general image processing tool.")
4139 (license (license:x11-style
4140 "http://www.pythonware.com/products/pil/license.htm"
4141 "The PIL Software License"))))
4142
4143(define-public python2-pillow
4144 (package-with-python2 python-pillow))
4145
4146(define-public python-pycparser
4147 (package
4148 (name "python-pycparser")
4149 (version "2.18")
4150 (source
4151 (origin
4152 (method url-fetch)
4153 (uri (pypi-uri "pycparser" version))
4154 (sha256
4155 (base32
4156 "09mjyw82ibqzl449g7swy8bfxnfpmas0815d2rkdjlcqw81wma4r"))))
4157 (outputs '("out" "doc"))
4158 (build-system python-build-system)
4159 (native-inputs
4160 `(("pkg-config" ,pkg-config)))
4161 (arguments
4162 `(#:phases
4163 (modify-phases %standard-phases
4164 (replace 'check
4165 (lambda _
4166 (with-directory-excursion "tests"
acb75c03
RW
4167 (invoke "python" "all_tests.py"))
4168 #t))
44d10b1f
RW
4169 (add-after 'install 'install-doc
4170 (lambda* (#:key outputs #:allow-other-keys)
4171 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4172 (doc (string-append data "/doc/" ,name "-" ,version))
4173 (examples (string-append doc "/examples")))
4174 (mkdir-p examples)
4175 (for-each (lambda (file)
4176 (copy-file (string-append "." file)
4177 (string-append doc file)))
4178 '("/README.rst" "/CHANGES" "/LICENSE"))
4179 (copy-recursively "examples" examples)))))))
4180 (home-page "https://github.com/eliben/pycparser")
4181 (synopsis "C parser in Python")
4182 (description
4183 "Pycparser is a complete parser of the C language, written in pure Python
4184using the PLY parsing library. It parses C code into an AST and can serve as
4185a front-end for C compilers or analysis tools.")
4186 (license license:bsd-3)))
4187
4188(define-public python2-pycparser
4189 (package-with-python2 python-pycparser))
4190
4191(define-public python-pywavelets
4192 (package
4193 (name "python-pywavelets")
4194 (version "1.0.1")
4195 (home-page "https://github.com/PyWavelets/pywt")
4196 (source (origin
4197 (method url-fetch)
4198 (uri (pypi-uri "PyWavelets" version))
4199 (sha256
4200 (base32
4201 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
4202 (build-system python-build-system)
4203 (arguments
4204 '(#:modules ((ice-9 ftw)
4205 (srfi srfi-1)
4206 (srfi srfi-26)
4207 (guix build utils)
4208 (guix build python-build-system))
4209 #:phases (modify-phases %standard-phases
4210 (replace 'check
4211 (lambda _
4212 (let ((cwd (getcwd))
4213 (libdir (find (cut string-prefix? "lib." <>)
4214 (scandir "build"))))
4215 (with-directory-excursion (string-append cwd "/build/" libdir)
4216 (invoke "nosetests" "-v" "."))))))))
4217 (native-inputs
4218 `(("python-matplotlib" ,python-matplotlib) ;for tests
4219 ("python-nose" ,python-nose)))
4220 (propagated-inputs
4221 `(("python-numpy" ,python-numpy)))
4222 (synopsis "Wavelet transforms in Python")
4223 (description
4224 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
4225mathematical basis functions that are localized in both time and frequency.
4226Wavelet transforms are time-frequency transforms employing wavelets. They are
4227similar to Fourier transforms, the difference being that Fourier transforms are
4228localized only in frequency instead of in time and frequency.")
4229 (license license:expat)))
4230
4231(define-public python2-pywavelets
4232 (package-with-python2 python-pywavelets))
4233
4234(define-public python-xcffib
4235 (package
4236 (name "python-xcffib")
4237 (version "0.6.0")
4238 (source
4239 (origin
4240 (method url-fetch)
4241 (uri (pypi-uri "xcffib" version))
4242 (sha256
4243 (base32
4244 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
4245 (build-system python-build-system)
4246 (inputs
4247 `(("libxcb" ,libxcb)))
4248 (propagated-inputs
4249 `(("python-cffi" ,python-cffi) ; used at run time
4250 ("python-six" ,python-six)))
4251 (arguments
4252 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4253 #:tests? #f
4254 #:phases
4255 (modify-phases %standard-phases
4256 (add-after 'unpack 'fix-libxcb-path
4257 (lambda* (#:key inputs #:allow-other-keys)
4258 (let ((libxcb (assoc-ref inputs "libxcb")))
4259 (substitute* '("xcffib/__init__.py")
4260 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4261 #t)))
4262 (add-after 'install 'install-doc
4263 (lambda* (#:key outputs #:allow-other-keys)
4264 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4265 "/doc/" ,name "-" ,version)))
4266 (mkdir-p doc)
4267 (copy-file "README.md"
4268 (string-append doc "/README.md"))
4269 #t))))))
4270 (home-page "https://github.com/tych0/xcffib")
4271 (synopsis "XCB Python bindings")
4272 (description
4273 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4274support for Python 3 and PyPy. It is based on cffi.")
4275 (license license:expat)))
4276
4277(define-public python2-xcffib
4278 (package-with-python2 python-xcffib))
4279
4280(define-public python-cairocffi
4281 (package
4282 (name "python-cairocffi")
4283 (version "0.9.0")
4284 (source
4285 (origin
4286 (method url-fetch)
4287 (uri (pypi-uri "cairocffi" version))
4288 (sha256
4289 (base32
4290 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
4291 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
4292 (build-system python-build-system)
4293 (outputs '("out" "doc"))
4294 (inputs
4295 `(("glib" ,glib)
4296 ("gtk+" ,gtk+)
4297 ("gdk-pixbuf" ,gdk-pixbuf)
4298 ("cairo" ,cairo)
4299 ("pango" ,pango)))
4300 (native-inputs
4301 `(("pkg-config" ,pkg-config)
4302 ("python-pytest" ,python-pytest)
4303 ("python-pytest-cov" ,python-pytest-cov)
4304 ("python-pytest-runner" ,python-pytest-runner)
4305 ("python-sphinx" ,python-sphinx)
4306 ("python-docutils" ,python-docutils)))
4307 (propagated-inputs
4308 `(("python-xcffib" ,python-xcffib))) ; used at run time
4309 (arguments
4310 `(#:phases
4311 (modify-phases %standard-phases
4312 (add-after 'unpack 'patch-paths
4313 (lambda* (#:key inputs outputs #:allow-other-keys)
4314 (substitute* (find-files "." "\\.py$")
4315 (("dlopen\\(ffi, 'cairo'")
4316 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
4317 "/lib/libcairo.so.2'"))
4318 (("dlopen\\(ffi, 'gdk-3'")
4319 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
4320 "/lib/libgtk-3.so.0'"))
4321 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
4322 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
4323 "/lib/libgdk_pixbuf-2.0.so.0'"))
4324 (("dlopen\\(ffi, 'glib-2.0'")
4325 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4326 "/lib/libglib-2.0.so.0'"))
4327 (("dlopen\\(ffi, 'gobject-2.0'")
4328 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4329 "/lib/libgobject-2.0.so.0'"))
4330 (("dlopen\\(ffi, 'pangocairo-1.0'")
4331 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4332 "/lib/libpangocairo-1.0.so.0'"))
4333 (("dlopen\\(ffi, 'pango-1.0'")
4334 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4335 "/lib/libpango-1.0.so.0'")))
4336 #t))
4337 (add-after 'install 'install-doc
4338 (lambda* (#:key inputs outputs #:allow-other-keys)
4339 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4340 (doc (string-append data "/doc/" ,name "-" ,version))
4341 (html (string-append doc "/html")))
4342 (setenv "LD_LIBRARY_PATH"
4343 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4344 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4345 (setenv "LANG" "en_US.UTF-8")
4346 (mkdir-p html)
4347 (for-each (lambda (file)
4348 (copy-file (string-append "." file)
4349 (string-append doc file)))
4350 '("/README.rst" "/CHANGES" "/LICENSE"))
4351 (system* "python" "setup.py" "build_sphinx")
4352 (copy-recursively "docs/_build/html" html)
4353 #t))))))
4354 (home-page "https://github.com/Kozea/cairocffi")
4355 (synopsis "Python bindings and object-oriented API for Cairo")
4356 (description
4357 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4358Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4359graphics library with support for multiple backends including image buffers,
4360PNG, PostScript, PDF, and SVG file output.")
4361 (license license:bsd-3)))
4362
4363(define-public python2-cairocffi
4364 (package-with-python2 python-cairocffi))
4365
4366(define-public python-decorator
4367 (package
4368 (name "python-decorator")
4369 (version "4.3.0")
4370 (source
4371 (origin
4372 (method url-fetch)
4373 (uri (pypi-uri "decorator" version))
4374 (sha256
4375 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4376 (build-system python-build-system)
4377 (home-page "https://pypi.python.org/pypi/decorator/")
4378 (synopsis "Python module to simplify usage of decorators")
4379 (description
4380 "The aim of the decorator module is to simplify the usage of decorators
4381for the average programmer, and to popularize decorators usage giving examples
4382of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4383etc. The core of this module is a decorator factory.")
4384 (license license:expat)))
4385
4386(define-public python2-decorator
4387 (package-with-python2 python-decorator))
4388
4389(define-public python-drmaa
4390 (package
4391 (name "python-drmaa")
4392 (version "0.7.7")
4393 (source
4394 (origin
4395 (method url-fetch)
4396 (uri (pypi-uri "drmaa" version))
4397 (sha256
4398 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4399 (build-system python-build-system)
4400 ;; The test suite requires libdrmaa which is provided by the cluster
4401 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4402 ;; should be set to the path of the libdrmaa library.
4403 (arguments '(#:tests? #f))
4404 (native-inputs
4405 `(("python-nose" ,python-nose)))
4406 (home-page "https://pypi.python.org/pypi/drmaa")
4407 (synopsis "Python bindings for the DRMAA library")
4408 (description
4409 "A Python package for Distributed Resource Management (DRM) job
4410submission and control. This package is an implementation of the DRMAA 1.0
4411Python language binding specification.")
4412 (license license:bsd-3)))
4413
4414(define-public python2-drmaa
4415 (package-with-python2 python-drmaa))
4416
4417(define-public python-grako
4418 (package
4419 (name "python-grako")
4420 (version "3.99.9")
4421 (source
4422 (origin
4423 (method url-fetch)
4424 (uri
4425 (pypi-uri "grako" version ".zip"))
4426 (sha256
4427 (base32
4428 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4429 (build-system python-build-system)
4430 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4431 (native-inputs
4432 `(("unzip" ,unzip)
4433 ("python-pytest" ,python-pytest)
4434 ("python-pytest-runner" ,python-pytest-runner)))
4435 (home-page "https://bitbucket.org/neogeny/grako")
4436 (synopsis "EBNF parser generator")
4437 (description
4438 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4439memoizing PEG/Packrat parser in Python.")
4440 (license license:bsd-3)))
4441
4442(define-public python2-grako
4443 (package-with-python2 python-grako))
4444
4445(define-public python-gridmap
4446 (package
4447 (name "python-gridmap")
4448 (version "0.13.0")
4449 (source
4450 (origin
768fea0f
TGR
4451 (method git-fetch)
4452 (uri (git-reference
4453 (url "https://github.com/pygridtools/gridmap.git")
4454 (commit (string-append "v" version))))
4455 (file-name (git-file-name name version))
44d10b1f 4456 (sha256
768fea0f 4457 (base32 "1478lbwsr1w24cii2x01m2910fvh8r43ghnb78nc972a96hqiknm"))))
44d10b1f
RW
4458 (build-system python-build-system)
4459 (arguments
4460 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4461 (propagated-inputs
4462 `(("python-psutil" ,python-psutil)
4463 ("python-drmaa" ,python-drmaa)
4464 ("python-pyzmq" ,python-pyzmq)))
4465 (home-page "https://github.com/pygridtools/gridmap")
4466 (synopsis "Create jobs on a cluster directly from Python")
4467 (description
4468 "Gridmap is a Python package to allow you to easily create jobs on the
4469cluster directly from Python. You can directly map Python functions onto the
4470cluster without needing to write any wrapper code yourself.")
4471 (license license:gpl3+)))
4472
4473(define-public python2-gridmap
4474 (package-with-python2 python-gridmap))
4475
4476(define-public python-honcho
4477 (package
4478 (name "python-honcho")
4479 (version "1.0.1")
4480 (source
4481 (origin
8524d130
TGR
4482 (method git-fetch)
4483 (uri (git-reference
4484 (url "https://github.com/nickstenning/honcho.git")
4485 (commit (string-append "v" version))))
4486 (file-name (git-file-name name version))
44d10b1f 4487 (sha256
8524d130 4488 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
44d10b1f
RW
4489 (build-system python-build-system)
4490 (native-inputs
4491 `(("python-pytest" ,python-pytest)
4492 ("python-mock" ,python-mock)
4493 ("python-tox" ,python-tox)
4494 ("which" ,which))) ;for tests
4495 (propagated-inputs
4496 `(("python-jinja2" ,python-jinja2)))
4497 (arguments
4498 `(#:phases
4499 (modify-phases %standard-phases
4500 (delete 'check)
4501 (add-after 'install 'check
4502 (lambda* (#:key outputs inputs #:allow-other-keys)
4503 ;; fix honcho path in testsuite
4504 (substitute* "tests/conftest.py"
4505 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4506 "/bin/honcho" "'")))
4507 ;; It's easier to run tests after install.
4508 ;; Make installed package available for running the tests
4509 (add-installed-pythonpath inputs outputs)
95b707fb 4510 (invoke "py.test" "-v"))))))
44d10b1f
RW
4511 (home-page "https://github.com/nickstenning/honcho")
4512 (synopsis "Manage Procfile-based applications")
4513 (description
4514 "A Procfile is a file which describes how to run an application
4515consisting of serveral processes. honcho starts all listed processes.
4516The output of all running processes is collected by honcho and
4517displayed.")
4518 (license license:expat)))
4519
4520(define-public python2-honcho
4521 (package-with-python2 python-honcho))
4522
4523(define-public python-pexpect
4524 (package
4525 (name "python-pexpect")
4526 (version "4.6.0")
4527 (source
4528 (origin
4529 (method url-fetch)
4530 (uri (pypi-uri "pexpect" version))
4531 (sha256
4532 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
4533 (build-system python-build-system)
4534 (arguments
4535 `(#:phases
4536 (modify-phases %standard-phases
4537 (add-before 'check 'prepare-tests
4538 (lambda _
4539 (substitute* (find-files "tests")
4540 (("/bin/ls") (which "ls"))
4541 (("/bin/echo") (which "echo"))
4542 (("/bin/which") (which "which"))
4543 ;; Many tests try to use the /bin directory which
4544 ;; is not present in the build environment.
4545 ;; Use one that's non-empty and unlikely to change.
4546 (("/bin'") "/dev'"))
4547 ;; XXX: Socket connection test gets "Connection reset by peer".
4548 ;; Why does it not work? Delete for now.
4549 (delete-file "tests/test_socket.py")
4550 #t))
4551 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
4552 (native-inputs
4553 `(("python-nose" ,python-nose)
4554 ("python-pytest" ,python-pytest)
4555 ("man-db" ,man-db)
4556 ("which" ,which)
4557 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
4558 (propagated-inputs
4559 `(("python-ptyprocess" ,python-ptyprocess)))
4560 (home-page "http://pexpect.readthedocs.org/")
4561 (synopsis "Controlling interactive console applications")
4562 (description
4563 "Pexpect is a pure Python module for spawning child applications;
4564controlling them; and responding to expected patterns in their output.
4565Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4566child application and control it as if a human were typing commands.")
4567 (license license:isc)))
4568
4569(define-public python2-pexpect
4570 (package-with-python2 python-pexpect))
4571
4572(define-public python-setuptools-scm
4573 (package
4574 (name "python-setuptools-scm")
4575 (version "3.1.0")
4576 (source (origin
4577 (method url-fetch)
4578 (uri (pypi-uri "setuptools_scm" version))
4579 (sha256
4580 (base32
4581 "0h4bglwfz8b9prqljv8z3w9rgydfyxzaj05bm1y6zs5m6shz548i"))))
4582 (build-system python-build-system)
4583 (home-page "https://github.com/pypa/setuptools_scm/")
4584 (synopsis "Manage Python package versions in SCM metadata")
4585 (description
4586 "Setuptools_scm handles managing your Python package versions in
4587@dfn{software configuration management} (SCM) metadata instead of declaring
4588them as the version argument or in a SCM managed file.")
4589 (license license:expat)))
4590
4591(define-public python2-setuptools-scm
4592 (package-with-python2 python-setuptools-scm))
4593
4594(define-public python-pathpy
4595 (package
4596 (name "python-pathpy")
4597 (version "11.0.1")
4598 (source
4599 (origin
4600 (method url-fetch)
4601 (uri (pypi-uri "path.py" version))
4602 (sha256
4603 (base32 "07x15v8c7ry9bvycw294c9yq6ky9v2b0dalvgi6rn38ilh69vsz7"))))
4604 ;; (outputs '("out" "doc"))
4605 (build-system python-build-system)
4606 (propagated-inputs
4607 `(("python-appdirs" ,python-appdirs)))
4608 (native-inputs
4609 `(("python-setuptools-scm" ,python-setuptools-scm)
4610 ("python-sphinx" ,python-sphinx)
4611 ("python-rst.linker" ,python-rst.linker)
4612 ("python-pytest" ,python-pytest)
4613 ("python-pytest-runner" ,python-pytest-runner)))
4614 (arguments
4615 ;; FIXME: Documentation and tests require "jaraco.packaging".
4616 `(#:tests? #f))
4617 ;; #:phases
4618 ;; (modify-phases %standard-phases
4619 ;; (add-after 'build 'build-doc
4620 ;; (lambda _
4621 ;; (setenv "LANG" "en_US.UTF-8")
4622 ;; (zero? (system* "python" "setup.py" "build_sphinx"))))
4623 ;; (add-after 'install 'install-doc
4624 ;; (lambda* (#:key outputs #:allow-other-keys)
4625 ;; (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4626 ;; (doc (string-append data "/doc/" ,name "-" ,version))
4627 ;; (html (string-append doc "/html")))
4628 ;; (mkdir-p html)
4629 ;; (for-each (lambda (file)
4630 ;; (copy-file file (string-append doc "/" file)))
4631 ;; '("README.rst" "CHANGES.rst"))
4632 ;; (copy-recursively "build/sphinx/html" html)))))))
4633 (home-page "https://github.com/jaraco/path.py")
4634 (synopsis "Python module wrapper for built-in os.path")
4635 (description
4636 "@code{path.py} implements path objects as first-class entities, allowing
4637common operations on files to be invoked on those path objects directly.")
4638 (license license:expat)))
4639
4640(define-public python2-pathpy
4641 (package-with-python2 python-pathpy))
4642
4643(define-public python-simplegeneric
4644 (package
4645 (name "python-simplegeneric")
4646 (version "0.8.1")
4647 (source
4648 (origin
4649 (method url-fetch)
6c8c3980 4650 (uri (pypi-uri "simplegeneric" version ".zip"))
44d10b1f
RW
4651 (sha256
4652 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4653 (build-system python-build-system)
4654 (native-inputs
4655 `(("unzip" ,unzip)))
4656 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
4657 (synopsis "Python module for simple generic functions")
4658 (description
4659 "The simplegeneric module lets you define simple single-dispatch generic
4660functions, akin to Python’s built-in generic functions like @code{len()},
4661@code{iter()} and so on. However, instead of using specially-named methods,
4662these generic functions use simple lookup tables, akin to those used by
4663e.g. @code{pickle.dump()} and other generic functions found in the Python
4664standard library.")
4665 (license license:zpl2.1)))
4666
4667(define-public python2-simplegeneric
4668 (package-with-python2 python-simplegeneric))
4669
4670(define-public python-ipython-genutils
4671 ;; TODO: This package is retired, check if can be removed, see description.
4672 (package
4673 (name "python-ipython-genutils")
4674 (version "0.1.0")
4675 (source
4676 (origin
4677 (method url-fetch)
c9671d4b 4678 (uri (pypi-uri "ipython_genutils" version))
44d10b1f
RW
4679 (sha256
4680 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
4681 (build-system python-build-system)
4682 (arguments `(#:tests? #f)) ; no tests
4683 (home-page "https://ipython.org")
4684 (synopsis "Vestigial utilities from IPython")
4685 (description
4686 "This package provides retired utilities from IPython. No packages
4687outside IPython/Jupyter should depend on it.
4688
4689This package shouldn't exist. It contains some common utilities shared by
4690Jupyter and IPython projects during The Big Split. As soon as possible, those
4691packages will remove their dependency on this, and this package will go
4692away.")
4693 (license license:bsd-3)))
4694
4695(define-public python2-ipython-genutils
4696 (package-with-python2 python-ipython-genutils))
4697
4698(define-public python-traitlets
4699 (package
4700 (name "python-traitlets")
4701 (version "4.3.2")
4702 (source
4703 (origin
4704 (method url-fetch)
4705 (uri (pypi-uri "traitlets" version))
4706 (sha256
4707 (base32
4708 "0dbq7sx26xqz5ixs711k5nc88p8a0nqyz6162pwks5dpcz9d4jww"))))
4709 (build-system python-build-system)
4710 (arguments
4711 `(#:phases
4712 (modify-phases %standard-phases
4713 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
4714 (propagated-inputs
4715 `(("python-ipython-genutils" ,python-ipython-genutils)
4716 ("python-decorator" ,python-decorator))) ;not needed for >4.3.2
4717 (native-inputs
4718 `(("python-pytest" ,python-pytest)))
4719 (properties `((python2-variant . ,(delay python2-traitlets))))
4720 (home-page "https://ipython.org")
4721 (synopsis "Configuration system for Python applications")
4722 (description
4723 "Traitlets is a framework that lets Python classes have attributes with
4724type checking, dynamically calculated default values, and ‘on change’
4725callbacks. The package also includes a mechanism to use traitlets for
4726configuration, loading values from files or from command line arguments. This
4727is a distinct layer on top of traitlets, so you can use traitlets in your code
4728without using the configuration machinery.")
4729 (license license:bsd-3)))
4730
4731(define-public python2-traitlets
4732 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
4733 (package
4734 (inherit traitlets)
4735 (propagated-inputs
4736 `(("python2-enum34" ,python2-enum34)
4737 ,@(package-propagated-inputs traitlets))))))
4738
4739(define-public python-jupyter-core
4740 (package
4741 (name "python-jupyter-core")
4742 (version "4.4.0")
4743 (source
4744 (origin
4745 (method url-fetch)
4746 (uri (string-append (pypi-uri "jupyter_core" version)))
4747 (sha256
4748 (base32
4749 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
4750 (build-system python-build-system)
4751 ;; FIXME: not sure how to run the tests
4752 (arguments `(#:tests? #f))
4753 (propagated-inputs
4754 `(("python-traitlets" ,python-traitlets)))
4755 (home-page "http://jupyter.org/")
4756 (synopsis "Jupyter base package")
4757 (description
4758 "Jupyter core is the base package on which Jupyter projects rely.")
4759 (license license:bsd-3)))
4760
4761(define-public python2-jupyter-core
4762 (package-with-python2 python-jupyter-core))
4763
4764(define-public python-jupyter-client
4765 (package
4766 (name "python-jupyter-client")
4767 (version "5.2.4")
4768 (source
4769 (origin
4770 (method url-fetch)
4771 (uri (pypi-uri "jupyter_client" version))
4772 (sha256
4773 (base32
4774 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
4775 (build-system python-build-system)
4776 ;; Tests fail because of missing native python kernel which I assume is
4777 ;; provided by the ipython package, which we cannot use because it would
4778 ;; cause a dependency cycle.
4779 (arguments `(#:tests? #f))
4780 (propagated-inputs
4781 `(("python-pyzmq" ,python-pyzmq)
4782 ("python-traitlets" ,python-traitlets)
4783 ("python-jupyter-core" ,python-jupyter-core)))
4784 (home-page "http://jupyter.org/")
4785 (synopsis "Jupyter protocol implementation and client libraries")
4786 (description
4787 "The @code{jupyter_client} package contains the reference implementation
4788of the Jupyter protocol. It also provides client and kernel management APIs
4789for working with kernels, and the @code{jupyter kernelspec} entrypoint for
4790installing @code{kernelspec}s for use with Jupyter frontends.")
4791 (license license:bsd-3)))
4792
4793(define-public python2-jupyter-client
4794 (package-with-python2 python-jupyter-client))
4795
4796(define-public python-ipykernel
4797 (package
4798 (name "python-ipykernel")
4799 (version "5.1.0")
4800 (source
4801 (origin
4802 (method url-fetch)
4803 (uri (pypi-uri "ipykernel" version))
4804 (sha256
4805 (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g"))))
4806 (build-system python-build-system)
4807 (arguments
4808 `(#:phases
4809 (modify-phases %standard-phases
4810 (replace 'check
4811 (lambda _
4812 (setenv "HOME" "/tmp")
4813 (invoke "pytest" "-v")
4814 #t)))))
4815 (propagated-inputs
4816 `(("python-ipython" ,python-ipython)
4817 ;; imported at runtime during connect
4818 ("python-jupyter-client" ,python-jupyter-client)))
4819 (native-inputs
4820 `(("python-pytest" ,python-pytest)
4821 ("python-nose" ,python-nose)))
4822 (home-page "https://ipython.org")
4823 (synopsis "IPython Kernel for Jupyter")
4824 (description
4825 "This package provides the IPython kernel for Jupyter.")
4826 (license license:bsd-3)))
4827
4828(define-public python2-ipykernel
4829 (package-with-python2 python-ipykernel))
4830
966aa714
AE
4831(define-public python-pari-jupyter
4832 (package
4833 (name "python-pari-jupyter")
4834 (version "1.3.2")
4835 (source
4836 (origin
4837 (method url-fetch)
4838 (uri (pypi-uri "pari_jupyter" version))
4839 (sha256
4840 (base32
4841 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
4842 (build-system python-build-system)
4843 (propagated-inputs
4844 `(("python-ipykernel" ,python-ipykernel)))
4845 (inputs
4846 `(("pari-gp" ,pari-gp)
4847 ("readline" ,readline)))
4848 (arguments
4849 `(#:tests? #f)) ; no test suite
4850 (home-page
4851 "https://github.com/jdemeyer/pari_jupyter")
4852 (synopsis "A Jupyter kernel for PARI/GP")
4853 (description "The package provides a PARI/GP kernel for Jupyter.")
4854 (license license:gpl3+)))
4855
44d10b1f
RW
4856;; This is the latest release of the LTS version of ipython with support for
4857;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
4858;; dropped support for Python 2.7. We may want to rename this package.
4859(define-public python-ipython
4860 (package
4861 (name "python-ipython")
4862 (version "5.8.0")
4863 (source
4864 (origin
4865 (method url-fetch)
4866 (uri (pypi-uri "ipython" version ".tar.gz"))
4867 (sha256
4868 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
4869 (build-system python-build-system)
4870 (outputs '("out" "doc"))
4871 (propagated-inputs
4872 `(("python-pyzmq" ,python-pyzmq)
4873 ("python-prompt-toolkit" ,python-prompt-toolkit-1)
4874 ("python-terminado" ,python-terminado)
4875 ("python-matplotlib" ,python-matplotlib)
4876 ("python-numpy" ,python-numpy)
4877 ("python-numpydoc" ,python-numpydoc)
4878 ("python-jinja2" ,python-jinja2)
4879 ("python-mistune" ,python-mistune)
4880 ("python-pexpect" ,python-pexpect)
4881 ("python-pickleshare" ,python-pickleshare)
4882 ("python-simplegeneric" ,python-simplegeneric)
4883 ("python-jsonschema" ,python-jsonschema)
4884 ("python-traitlets" ,python-traitlets)
4885 ("python-nbformat" ,python-nbformat)
4886 ("python-pygments" ,python-pygments)))
4887 (inputs
4888 `(("readline" ,readline)
4889 ("which" ,which)))
4890 (native-inputs
4891 `(("graphviz" ,graphviz)
4892 ("pkg-config" ,pkg-config)
4893 ("python-requests" ,python-requests) ;; for tests
4894 ("python-testpath" ,python-testpath)
4895 ("python-nose" ,python-nose)
4896 ("python-sphinx" ,python-sphinx)
4897 ("python-shpinx-rtd-theme" ,python-sphinx-rtd-theme)
4898 ;; FIXME: It's possible that a smaller union would work just as well.
4899 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
4900 texlive-fonts-ec
4901 texlive-generic-ifxetex
4902 texlive-generic-pdftex
4903 texlive-latex-amsfonts
4904 texlive-latex-capt-of
4905 texlive-latex-cmap
4906 texlive-latex-environ
4907 texlive-latex-eqparbox
4908 texlive-latex-etoolbox
4909 texlive-latex-expdlist
4910 texlive-latex-fancyhdr
4911 texlive-latex-fancyvrb
4912 texlive-latex-fncychap
4913 texlive-latex-float
4914 texlive-latex-framed
4915 texlive-latex-geometry
4916 texlive-latex-graphics
4917 texlive-latex-hyperref
4918 texlive-latex-mdwtools
4919 texlive-latex-multirow
4920 texlive-latex-oberdiek
4921 texlive-latex-parskip
4922 texlive-latex-preview
4923 texlive-latex-tabulary
4924 texlive-latex-threeparttable
4925 texlive-latex-titlesec
4926 texlive-latex-trimspaces
4927 texlive-latex-ucs
4928 texlive-latex-upquote
4929 texlive-latex-url
4930 texlive-latex-varwidth
4931 texlive-latex-wrapfig)))
4932 ("texinfo" ,texinfo)))
4933 (arguments
4934 `(#:phases
4935 (modify-phases %standard-phases
4936 (add-after 'install 'install-doc
4937 (lambda* (#:key inputs outputs #:allow-other-keys)
4938 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4939 (doc (string-append data "/doc/" ,name "-" ,version))
4940 (html (string-append doc "/html"))
4941 (man1 (string-append data "/man/man1"))
4942 (info (string-append data "/info"))
4943 (examples (string-append doc "/examples"))
4944 (python-arg (string-append "PYTHON=" (which "python"))))
4945 (setenv "LANG" "en_US.utf8")
4946 ;; Make installed package available for running the tests
4947 (add-installed-pythonpath inputs outputs)
4948 (with-directory-excursion "docs"
4949 ;; FIXME: pdf fails to build
4950 ;;(system* "make" "pdf" "PAPER=a4")
4951 (system* "make" python-arg "html")
4952 (system* "make" python-arg "info"))
4953 (copy-recursively "docs/man" man1)
4954 (copy-recursively "examples" examples)
4955 (copy-recursively "docs/build/html" html)
4956 ;; (copy-file "docs/build/latex/ipython.pdf"
4957 ;; (string-append doc "/ipython.pdf"))
4958 (mkdir-p info)
4959 (copy-file "docs/build/texinfo/ipython.info"
4960 (string-append info "/ipython.info"))
4961 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
4962 #t))
4963 ;; Tests can only be run after the library has been installed and not
4964 ;; within the source directory.
4965 (delete 'check)
4966 (add-after 'install 'check
4967 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
4968 (if tests?
4969 (begin
4970 ;; Make installed package available for running the tests
4971 (add-installed-pythonpath inputs outputs)
4972 (setenv "HOME" "/tmp/") ;; required by a test
4973 ;; We only test the core because one of the other tests
4974 ;; tries to import ipykernel.
4975 (invoke "python" "IPython/testing/iptest.py"
4976 "-v" "IPython/core/tests"))
4977 #t)))
4978 (add-before 'check 'fix-tests
4979 (lambda* (#:key inputs #:allow-other-keys)
4980 (substitute* "./IPython/utils/_process_posix.py"
4981 (("/usr/bin/env', 'which") (which "which")))
4982 (substitute* "./IPython/core/tests/test_inputtransformer.py"
4983 (("#!/usr/bin/env python")
4984 (string-append "#!" (which "python"))))
4985 ;; Disable 1 failing test
4986 (substitute* "./IPython/core/tests/test_magic.py"
4987 (("def test_dirops\\(\\):" all)
4988 (string-append "@dec.skipif(True)\n" all)))
4989 ;; This test introduces a circular dependency on ipykernel
4990 ;; (which depends on ipython).
4991 (delete-file "IPython/core/tests/test_display.py")
4992 ;; These tests throw errors for unknown reasons.
4993 (delete-file "IPython/extensions/tests/test_storemagic.py")
4994 (delete-file "IPython/core/tests/test_displayhook.py")
4995 (delete-file "IPython/core/tests/test_interactiveshell.py")
4996 (delete-file "IPython/core/tests/test_pylabtools.py")
4997 (delete-file "IPython/core/tests/test_paths.py")
4998 #t)))))
4999 (home-page "https://ipython.org")
5000 (synopsis "IPython is a tool for interactive computing in Python")
5001 (description
5002 "IPython provides a rich architecture for interactive computing with:
5003Powerful interactive shells, a browser-based notebook, support for interactive
5004data visualization, embeddable interpreters and tools for parallel
5005computing.")
5006 (license license:bsd-3)
5007 (properties `((python2-variant . ,(delay python2-ipython))))))
5008
5009(define-public python2-ipython
5010 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
5011 (package
5012 (inherit ipython)
5013 ;; FIXME: add pyreadline once available.
5014 (propagated-inputs
5015 `(("python2-backports-shutil-get-terminal-size"
5016 ,python2-backports-shutil-get-terminal-size)
5017 ("python2-pathlib2" ,python2-pathlib2)
5018 ,@(package-propagated-inputs ipython)))
5019 (native-inputs
5020 `(("python2-mock" ,python2-mock)
5021 ,@(package-native-inputs ipython))))))
5022
5023(define-public python-urwid
5024 (package
5025 (name "python-urwid")
5026 (version "2.0.1")
5027 (source
5028 (origin
5029 (method url-fetch)
5030 (uri (pypi-uri "urwid" version))
5031 (sha256
5032 (base32
5033 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
5034 (build-system python-build-system)
5035 (home-page "http://urwid.org")
5036 (synopsis "Console user interface library for Python")
5037 (description
5038 "Urwid is a curses-based UI/widget library for Python. It includes many
5039features useful for text console applications.")
5040 (license license:lgpl2.1+)))
5041
5042(define-public python2-urwid
5043 (package-with-python2 python-urwid))
5044
5045(define-public python-urwidtrees
5046 (package
5047 (name "python-urwidtrees")
5048 (version "1.0.2")
5049 (source
5050 (origin
5051 (method url-fetch)
5052 ;; package author intends on distributing via github rather than pypi:
5053 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5054 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5055 version ".tar.gz"))
5056 (file-name (string-append name "-" version ".tar.gz"))
5057 (sha256
5058 (base32
5059 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
5060 (build-system python-build-system)
5061 (arguments
5062 '(#:tests? #f)) ; no tests
5063 (propagated-inputs `(("python-urwid" ,python-urwid)))
5064 (home-page "https://github.com/pazz/urwidtrees")
5065 (synopsis "Tree widgets for urwid")
5066 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5067toolkit. Use it to build trees of widgets.")
5068 (license license:gpl3+)))
5069
5070(define-public python2-urwidtrees
5071 (package-with-python2 python-urwidtrees))
5072
5073(define-public python-ua-parser
5074 (package
5075 (name "python-ua-parser")
5076 (version "0.8.0")
5077 (source
5078 (origin
5079 (method url-fetch)
5080 (uri (pypi-uri "ua-parser" version))
5081 (sha256
5082 (base32
5083 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
5084 (build-system python-build-system)
5085 (arguments
5086 `(#:tests? #f)) ;no test suite in release
5087 (native-inputs
5088 `(("python-pyyaml" ,python-pyyaml)))
5089 (home-page "https://github.com/ua-parser/uap-python")
5090 (synopsis "User agent parser")
5091 (description
5092 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
5093 (license license:asl2.0)))
5094
5095(define-public python2-ua-parser
5096 (package-with-python2 python-ua-parser))
5097
5098(define-public python-user-agents
5099 (package
5100 (name "python-user-agents")
5101 (version "1.1.0")
5102 (source
5103 (origin
5104 (method url-fetch)
5105 (uri (pypi-uri "user-agents" version))
5106 (sha256
5107 (base32
5108 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
5109 (build-system python-build-system)
5110 (arguments
5111 `(#:tests? #f)) ;missing devices.json test file in release
5112 (propagated-inputs
5113 `(("python-ua-parser" ,python-ua-parser)))
5114 (home-page "https://github.com/selwin/python-user-agents")
5115 (synopsis "User Agent strings parsing library")
5116 (description
5117 "A library to identify devices (phones, tablets) and their capabilities by
5118parsing (browser/HTTP) user agent strings.")
5119 (license license:expat)))
5120
5121(define-public python2-user-agents
5122 (package-with-python2 python-user-agents))
5123
5124(define-public python-dbus
5125 (package
5126 (name "python-dbus")
5127 (version "1.2.8")
5128 (source
5129 (origin
5130 (method url-fetch)
5131 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
5132 "dbus-python-" version ".tar.gz"))
5133 (sha256
5134 (base32
5135 "0vvvjmiwnc9cjlks3gcdk43ap7llhlpz7cm1wbw0nc2yfsxjpwdb"))))
5136 (build-system gnu-build-system)
5137 (arguments
5138 '(#:phases
5139 (modify-phases %standard-phases
5140 (add-before
5141 'check 'pre-check
5142 (lambda _
5143 ;; XXX: For the missing '/etc/machine-id'.
5144 (substitute* "test/run-test.sh"
5145 (("DBUS_FATAL_WARNINGS=1")
5146 "DBUS_FATAL_WARNINGS=0"))
5147 #t)))))
5148 (native-inputs
5149 `(("pkg-config" ,pkg-config)))
5150 (inputs
5151 `(("python" ,python-wrapper)
5152 ("dbus-glib" ,dbus-glib)))
5153 (synopsis "Python bindings for D-bus")
5154 (description "python-dbus provides bindings for libdbus, the reference
5155implementation of D-Bus.")
5156 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
5157 (license license:expat)))
5158
5159(define-public python2-dbus
5160 (package (inherit python-dbus)
5161 (name "python2-dbus")
5162 (inputs `(("python" ,python-2)
5163 ,@(alist-delete "python"
5164 (package-inputs python-dbus)
5165 equal?)))
5166 ;; FIXME: on Python 2, the test_utf8 fails with:
5167 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5168 (arguments `(#:tests? #f))))
5169
5170(define-public python-lxml
5171 (package
5172 (name "python-lxml")
5173 (version "4.2.5")
5174 (source
5175 (origin
5176 (method url-fetch)
5177 (uri (pypi-uri "lxml" version))
5178 (sha256
5179 (base32
5180 "0zw0y9hs0nflxhl9cs6ipwwh53szi3w2x06wl0k9cylyqac0cwin"))))
5181 (build-system python-build-system)
5182 (inputs
5183 `(("libxml2" ,libxml2)
5184 ("libxslt" ,libxslt)))
5185 (home-page "http://lxml.de/")
5186 (synopsis
5187 "Python XML processing library")
5188 (description
5189 "The lxml XML toolkit is a Pythonic binding for the C libraries
5190libxml2 and libxslt.")
5191 (license license:bsd-3))) ; and a few more, see LICENSES.txt
5192
5193(define-public python2-lxml
5194 (package-with-python2 python-lxml))
5195
5196;; beautifulsoup4 has a totally different namespace than 3.x,
5197;; and pypi seems to put it under its own name, so I guess we should too
5198(define-public python-beautifulsoup4
5199 (package
5200 (name "python-beautifulsoup4")
5201 (version "4.6.3")
5202 (source
5203 (origin
5204 (method url-fetch)
5205 (uri (pypi-uri "beautifulsoup4" version))
5206 (sha256
5207 (base32
5208 "041dhalzjciw6qyzzq7a2k4h1yvyk76xigp35hv5ibnn448ydy4h"))))
5209 (build-system python-build-system)
5210 (arguments
5211 `(#:phases
5212 (modify-phases %standard-phases
5213 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5214 ;; must use this conversion script when building with Python 3. The
5215 ;; conversion script also runs the tests.
5216 ;; For more information, see the file 'convert-py3k' in the source
5217 ;; distribution.
5218 (replace 'check
dff0197e 5219 (lambda _ (invoke "./convert-py3k"))))))
44d10b1f
RW
5220 (home-page
5221 "https://www.crummy.com/software/BeautifulSoup/bs4/")
5222 (synopsis
5223 "Python screen-scraping library")
5224 (description
5225 "Beautiful Soup is a Python library designed for rapidly setting up
5226screen-scraping projects. It offers Pythonic idioms for navigating,
5227searching, and modifying a parse tree, providing a toolkit for
5228dissecting a document and extracting what you need. It automatically
5229converts incoming documents to Unicode and outgoing documents to UTF-8.")
5230 (license license:expat)
5231 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5232
5233(define-public python2-beautifulsoup4
5234 (package
5235 (inherit (package-with-python2
5236 (strip-python2-variant python-beautifulsoup4)))
5237 (arguments `(#:python ,python-2))))
5238
5239(define-public python-netifaces
5240 (package
5241 (name "python-netifaces")
5242 (version "0.10.7")
5243 (source
5244 (origin
5245 (method url-fetch)
5246 (uri (pypi-uri "netifaces" version))
5247 (sha256
5248 (base32
5249 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
5250 (build-system python-build-system)
5251 (home-page "https://github.com/al45tair/netifaces")
5252 (synopsis
5253 "Python module for portable network interface information")
5254 (description
5255 "Netifaces is a Python module providing information on network
5256interfaces in an easy and portable manner.")
5257 (license license:expat)))
5258
5259(define-public python2-netifaces
5260 (package-with-python2 python-netifaces))
5261
5262(define-public python-networkx
5263 (package
5264 (name "python-networkx")
5265 (version "2.2")
5266 (source
5267 (origin
5268 (method url-fetch)
5269 (uri (pypi-uri "networkx" version ".zip"))
5270 (sha256
5271 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
5272 (build-system python-build-system)
5273 ;; python-decorator is needed at runtime.
5274 (propagated-inputs
5275 `(("python-decorator" ,python-decorator)))
5276 (native-inputs
5277 `(("python-nose" ,python-nose)
5278 ("unzip" ,unzip)))
5279 (home-page "https://networkx.github.io/")
5280 (synopsis "Python module for creating and manipulating graphs and networks")
5281 (description
5282 "NetworkX is a Python package for the creation, manipulation, and study
5283of the structure, dynamics, and functions of complex networks.")
5284 (license license:bsd-3)))
5285
5286(define-public python2-networkx
5287 (package-with-python2 python-networkx))
5288
5289(define-public python-datrie
5290 (package
5291 (name "python-datrie")
5292 (version "0.7.1")
5293 (source
5294 (origin
5295 (method url-fetch)
5296 (uri (pypi-uri "datrie" version))
5297 (sha256
5298 (base32
5299 "08r0if7dry2q7p34gf7ffyrlnf4bdvnprxgydlfxgfnvq8f3f4bs"))))
5300 (build-system python-build-system)
5301 (arguments
5302 `(#:phases (modify-phases %standard-phases
5303 (add-before 'build 'cythonize
5304 (lambda _
5305 ;; Regenerate Cython classes to solve ABI issues with Python
5306 ;; 3.7.0. See <https://github.com/pytries/datrie/issues/52>.
5307 (invoke "cython" "src/datrie.pyx" "src/cdatrie.pxd"
5308 "src/stdio_ext.pxd" "-a"))))))
5309 (native-inputs
5310 `(("python-cython" ,python-cython)
5311 ("python-hypothesis" ,python-hypothesis)
5312 ("python-pytest" ,python-pytest)
5313 ("python-pytest-runner" ,python-pytest-runner)))
5314 (home-page "https://github.com/kmike/datrie")
5315 (synopsis "Fast, efficiently stored trie for Python")
5316 (description
5317 "This package provides a fast, efficiently stored trie implementation for
5318Python.")
5319 (license license:lgpl2.1+)))
5320
5321(define-public snakemake
5322 (package
5323 (name "snakemake")
5324 (version "5.2.4")
5325 (source
5326 (origin
5327 (method url-fetch)
5328 (uri (pypi-uri "snakemake" version))
5329 (sha256
5330 (base32 "0gj0xxgiq3mp9qyyrbfzldiaq1giliqw0in64nqiz7vx49myqj7z"))))
5331 (build-system python-build-system)
5332 (arguments
5333 ;; TODO: Package missing test dependencies.
5334 '(#:tests? #f
5335 #:phases
5336 (modify-phases %standard-phases
5337 ;; For cluster execution Snakemake will call Python. Since there is
5338 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
5339 ;; this by calling the snakemake wrapper instead.
5340 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
5341 (lambda* (#:key outputs #:allow-other-keys)
5342 (substitute* "snakemake/executors.py"
5343 (("\\{sys.executable\\} -m snakemake")
5344 (string-append (assoc-ref outputs "out")
5345 "/bin/snakemake")))
5346 #t)))))
5347 (propagated-inputs
5348 `(("python-gitpython" ,python-gitpython)
5349 ("python-wrapt" ,python-wrapt)
5350 ("python-requests" ,python-requests)
5351 ("python-appdirs" ,python-appdirs)
5352 ("python-configargparse" ,python-configargparse)
5353 ("python-datrie" ,python-datrie)
5354 ("python-docutils" ,python-docutils)
5355 ("python-jinja2" ,python-jinja2)
5356 ("python-jsonschema" ,python-jsonschema)
5357 ("python-networkx" ,python-networkx)
5358 ("python-pyyaml" ,python-pyyaml)
5359 ("python-ratelimiter" ,python-ratelimiter)))
5360 (home-page "https://snakemake.readthedocs.io")
5361 (synopsis "Python-based execution environment for make-like workflows")
5362 (description
5363 "Snakemake aims to reduce the complexity of creating workflows by
5364providing a clean and modern domain specific specification language (DSL) in
5365Python style, together with a fast and comfortable execution environment.")
5366 (license license:expat)))
5367
5368;; This is currently needed for the pigx-* packages.
5369(define-public snakemake-4
5370 (package (inherit snakemake)
5371 (version "4.4.0")
5372 (source
5373 (origin
5374 (method url-fetch)
5375 (uri (pypi-uri "snakemake" version))
5376 (sha256
5377 (base32 "0g0paia4z7w3srnqdmavq3hrb2x7qnpf81jx50njl0p7y4y0j8jv"))))
5378 (propagated-inputs
5379 `(("python-wrapt" ,python-wrapt)
5380 ("python-requests" ,python-requests)
5381 ("python-appdirs" ,python-appdirs)
5382 ("python-configargparse" ,python-configargparse)
5383 ("python-pyyaml" ,python-pyyaml)
5384 ("python-ratelimiter" ,python-ratelimiter)))))
5385
5386(define-public python-pyqrcode
5387 (package
5388 (name "python-pyqrcode")
5389 (version "1.2.1")
5390 (source
5391 (origin
5392 (method url-fetch)
5393 (uri (pypi-uri "PyQRCode" version))
5394 (sha256
5395 (base32
5396 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
5397 (build-system python-build-system)
5398 (home-page
5399 "https://github.com/mnooner256/pyqrcode")
5400 (synopsis "QR code generator")
5401 (description
5402 "Pyqrcode is a QR code generator written purely in Python with
5403SVG, EPS, PNG and terminal output.")
5404 (license license:bsd-3)))
5405
5406(define-public python-seaborn
5407 (package
5408 (name "python-seaborn")
5409 (version "0.9.0")
5410 (source
5411 (origin
5412 (method url-fetch)
5413 (uri (pypi-uri "seaborn" version))
5414 (sha256
5415 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))))
5416 (build-system python-build-system)
5417 (arguments
5418 `(#:phases
5419 (modify-phases %standard-phases
5420 (add-before 'check 'start-xserver
5421 (lambda* (#:key inputs #:allow-other-keys)
5422 (let ((xorg-server (assoc-ref inputs "xorg-server")))
5423 ;; There must be a running X server and make check doesn't
5424 ;; start one. Therefore we must do it.
5425 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
5426 (setenv "DISPLAY" ":1")
5427 #t)))
5428 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
5429 (propagated-inputs
5430 `(("python-pandas" ,python-pandas)
5431 ("python-matplotlib" ,python-matplotlib)
5432 ("python-numpy" ,python-numpy)
5433 ("python-scipy" ,python-scipy)))
5434 (native-inputs
5435 `(("python-pytest" ,python-pytest)
5436 ("xorg-server" ,xorg-server)))
5437 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5438 (synopsis "Statistical data visualization")
5439 (description
5440 "Seaborn is a library for making attractive and informative statistical
5441graphics in Python. It is built on top of matplotlib and tightly integrated
5442with the PyData stack, including support for numpy and pandas data structures
5443and statistical routines from scipy and statsmodels.")
5444 (license license:bsd-3)))
5445
5446(define-public python2-seaborn
5447 (package-with-python2 python-seaborn))
5448
5449(define-public python-mpmath
5450 (package
5451 (name "python-mpmath")
5452 (version "0.19")
5453 (source (origin
5454 (method url-fetch)
5455 (uri (string-append "http://mpmath.org/files/mpmath-"
5456 version ".tar.gz"))
5457 (sha256
5458 (base32
5459 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
5460 (build-system python-build-system)
5461 (arguments
5462 '(#:phases
5463 (modify-phases %standard-phases
5464 (replace 'check
5465 (lambda _
5d7a6f1c 5466 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
44d10b1f
RW
5467 (home-page "http://mpmath.org")
5468 (synopsis "Arbitrary-precision floating-point arithmetic in python")
5469 (description
5470 "@code{mpmath} can be used as an arbitrary-precision substitute for
5471Python's float/complex types and math/cmath modules, but also does much
5472more advanced mathematics.")
5473 (license license:bsd-3)))
5474
5475(define-public python2-mpmath
5476 (package-with-python2 python-mpmath))
5477
5478(define-public python-bigfloat
5479 (package
5480 (name "python-bigfloat")
5481 (version "0.3.0")
5482 (source
5483 (origin
5484 (method url-fetch)
5485 (uri (pypi-uri "bigfloat" version))
5486 (sha256
5487 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
5488 (build-system python-build-system)
5489 (inputs
5490 `(("mpfr" ,mpfr)))
5491 (home-page "https://github.com/mdickinson/bigfloat")
5492 (synopsis "Arbitrary precision floating-point arithmetic for Python")
5493 (description
5494 "This packages provides a Python interface to the MPFR library for
5495multiprecision arithmetic.")
5496 (license license:lgpl3+)))
5497
5498(define-public python2-bigfloat
5499 (package-with-python2 python-bigfloat))
5500
5501(define-public python-sympy
5502 (package
5503 (name "python-sympy")
5504 (version "1.1.1")
5505 (source
5506 (origin
5507 (method url-fetch)
5508 (uri (string-append
5509 "https://github.com/sympy/sympy/releases/download/sympy-"
5510 version "/sympy-" version ".tar.gz"))
5511 (sha256
5512 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
5513 (build-system python-build-system)
5514 (arguments
5515 `(#:phases
5516 (modify-phases %standard-phases
5517 ;; Run the core tests after installation. By default it would run
5518 ;; *all* tests, which take a very long time to complete and are known
5519 ;; to be flaky.
5520 (delete 'check)
5521 (add-after 'install 'check
5522 (lambda* (#:key outputs #:allow-other-keys)
5523 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
5524 #t)))))
5525 (propagated-inputs
5526 `(("python-mpmath" ,python-mpmath)))
5527 (home-page "http://www.sympy.org/")
5528 (synopsis "Python library for symbolic mathematics")
5529 (description
5530 "SymPy is a Python library for symbolic mathematics. It aims to become a
5531full-featured computer algebra system (CAS) while keeping the code as simple
5532as possible in order to be comprehensible and easily extensible.")
5533 (license license:bsd-3)))
5534
5535(define-public python2-sympy
5536 (package
5537 (inherit (package-with-python2 python-sympy))
5538 (arguments
5539 `(#:phases
5540 (modify-phases %standard-phases
5541 ;; Run the core tests after installation. By default it would run
5542 ;; *all* tests, which take a very long time to complete and are known
5543 ;; to be flaky.
5544 (delete 'check)
5545 (add-after 'install 'check
5546 (lambda* (#:key outputs #:allow-other-keys)
5547 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
5548 #t)))))))
5549
5550(define-public python-q
5551 (package
5552 (name "python-q")
5553 (version "2.6")
5554 (source
5555 (origin
5556 (method url-fetch)
5557 (uri (pypi-uri "q" version))
5558 (sha256
5559 (base32
5560 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
5561 (build-system python-build-system)
5562 (home-page "https://github.com/zestyping/q")
5563 (synopsis "Quick-and-dirty debugging output for tired programmers")
5564 (description
5565 "q is a Python module for \"print\" style of debugging Python code. It
5566provides convenient short API for print out of values, tracebacks, and
5567falling into the Python interpreter.")
5568 (license license:asl2.0)))
5569
5570(define-public python2-q
5571 (package-with-python2 python-q))
5572
5573(define-public python2-xlib
5574 (package
5575 (name "python2-xlib")
5576 (version "0.14")
5577 (source (origin
5578 (method url-fetch)
5579 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
5580 "/" version "/"
5581 "python-xlib-" version ".tar.gz"))
5582 (sha256
5583 (base32
5584 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
5585 (build-system python-build-system)
5586 (arguments
5587 `(#:python ,python-2 ;Python 2 only
5588 #:tests? #f)) ;no tests
5589 (home-page "http://python-xlib.sourceforge.net/")
5590 (synopsis "Python X11 client library")
5591 (description
5592 "The Python X Library is intended to be a fully functional X client
5593library for Python programs. It is useful to implement low-level X clients.
5594It is written entirely in Python.")
5595 (license license:gpl2+)))
5596
5597(define-public python-singledispatch
5598 (package
5599 (name "python-singledispatch")
5600 (version "3.4.0.3")
5601 (source
5602 (origin
5603 (method url-fetch)
5604 (uri (pypi-uri "singledispatch" version))
5605 (sha256
5606 (base32
5607 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
5608 (build-system python-build-system)
5609 (native-inputs
5610 `(("python-six" ,python-six))) ; required for conversion, not at run-time
5611 (home-page
5612 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
5613 (synopsis "Backport of singledispatch feature from Python 3.4")
5614 (description
5615 "This library brings functools.singledispatch from Python 3.4 to Python
56162.6-3.3.")
5617 (license license:expat)))
5618
5619(define-public python2-singledispatch
5620 (package-with-python2 python-singledispatch))
5621
5622;; the python- version can be removed with python-3.5
5623(define-public python-backports-abc
5624 (package
5625 (name "python-backports-abc")
5626 (version "0.5")
5627 (source
5628 (origin
5629 (method url-fetch)
5630 (uri (pypi-uri "backports_abc" version))
5631 (sha256
5632 (base32
5633 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
5634 (build-system python-build-system)
5635 (home-page "https://github.com/cython/backports_abc")
5636 (synopsis "Backport of additions to the 'collections.abc' module")
5637 (description
5638 "Python-backports-abc provides a backport of additions to the
36a4366d 5639@code{collections.abc} module in Python-3.5.")
44d10b1f
RW
5640 (license license:psfl)))
5641
5642(define-public python2-backports-abc
5643 (package-with-python2 python-backports-abc))
5644
5645(define-public python-backports-csv
5646 (package
5647 (name "python-backports-csv")
5648 (version "1.0.5")
5649 (source
5650 (origin
5651 (method url-fetch)
5652 (uri (pypi-uri "backports.csv" version))
5653 (sha256
5654 (base32
5655 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
5656 (build-system python-build-system)
5657 (home-page "https://github.com/ryanhiebert/backports.csv")
5658 (synopsis "Backport of Python 3's csv module for Python 2")
5659 (description
5660 "Provides a backport of Python 3's @code{csv} module for parsing
5661comma separated values. The API of the @code{csv} module in Python 2
5662is drastically different from the @code{csv} module in Python 3.
5663This is due, for the most part, to the difference between str in
5664Python 2 and Python 3.")
5665 (license license:psfl)))
5666
5667(define-public python2-backports-csv
5668 (package-with-python2 python-backports-csv))
5669
5670(define-public python2-backports-shutil-get-terminal-size
5671 (package
5672 (name "python2-backports-shutil-get-terminal-size")
5673 (version "1.0.0")
5674 (source
5675 (origin
5676 (method url-fetch)
5677 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
5678 (sha256
5679 (base32
5680 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
5681 (build-system python-build-system)
5682 (arguments
5683 `(#:python ,python-2
5684 #:phases
5685 (modify-phases %standard-phases
5686 (replace 'check
5687 (lambda _
4a4a7d9a 5688 (invoke "py.test" "-v"))))))
44d10b1f
RW
5689 (native-inputs
5690 `(("python2-pytest" ,python2-pytest)))
5691 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
5692 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
5693 (description
5694 "This package provides a backport of the @code{get_terminal_size
5695function} from Python 3.3's @code{shutil}.
5696Unlike the original version it is written in pure Python rather than C,
5697so it might be a tiny bit slower.")
5698 (license license:expat)))
5699
5700(define-public python-waf
5701 (package
5702 (name "python-waf")
5703 (version "2.0.11")
5704 (source (origin
5705 (method url-fetch)
5706 (uri (string-append "https://waf.io/"
5707 "waf-" version ".tar.bz2"))
5708 (sha256
5709 (base32
5710 "13zrniwkmfqgsgzi9v5m1367fppp9yzrz6z2ny6hy8dmpb8mj4z4"))))
5711 (build-system python-build-system)
5712 (arguments
5713 '(#:phases
5714 (modify-phases %standard-phases
5715 (replace 'build
5716 (lambda _
5717 (invoke "python" "waf-light" "configure" "build")))
5718 (replace 'check
5719 (lambda _
5720 (invoke "python" "waf" "--version")))
5721 (replace 'install
5722 (lambda* (#:key outputs #:allow-other-keys)
5723 (let ((out (assoc-ref outputs "out")))
5724 (install-file "waf" (string-append out "/bin")))
5725 #t))
5726 ;; waf breaks when it is wrapped.
5727 (delete 'wrap))))
5728 (home-page "https://waf.io/")
5729 (synopsis "Python-based build system")
5730 (description
5731 "Waf is a Python-based framework for configuring, compiling and installing
5732applications.")
5733 (license license:bsd-3)))
5734
5735(define-public python2-waf
5736 (package-with-python2 python-waf))
5737
5738(define-public python-pyzmq
5739 (package
5740 (name "python-pyzmq")
5741 (version "17.1.2")
5742 (source
5743 (origin
5744 (method url-fetch)
5745 (uri (pypi-uri "pyzmq" version))
5746 (sha256
5747 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
5748 (build-system python-build-system)
5749 (arguments
5750 `(#:configure-flags
5751 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
5752 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
5753 ;; --inplace' for 'python setup.py test' to work.
5754 #:tests? #f))
5755 (inputs
5756 `(("zeromq" ,zeromq)))
5757 (native-inputs
5758 `(("pkg-config" ,pkg-config)
5759 ("python-nose" ,python-nose)))
5760 (home-page "https://github.com/zeromq/pyzmq")
5761 (synopsis "Python bindings for 0MQ")
5762 (description
5763 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
5764 (license license:bsd-4)))
5765
5766(define-public python2-pyzmq
5767 (package-with-python2 python-pyzmq))
5768
5769(define-public python-pep8
5770 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
5771 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
5772 ;; some dependents' test suites, and nothing more.
5773 (package
5774 (name "python-pep8")
5775 (version "1.7.0")
5776 (source
5777 (origin
5778 (method url-fetch)
5779 (uri (pypi-uri "pep8" version))
5780 (sha256
5781 (base32
5782 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
5783 (build-system python-build-system)
5784 (home-page "https://pep8.readthedocs.org/")
5785 (synopsis "Python style guide checker")
5786 (description
5787 "This tools checks Python code against some of the style conventions in
5788PEP 8.")
5789 (license license:expat)))
5790
5791(define-public python2-pep8
5792 (package-with-python2 python-pep8))
5793
5794(define-public python-pyflakes
5795 (package
5796 (name "python-pyflakes")
5797 (version "2.0.0")
5798 (source
5799 (origin
5800 (method url-fetch)
5801 (uri (pypi-uri "pyflakes" version))
5802 (sha256
5803 (base32
5804 "0jba28czyvimdc72llms3f17swp3i8jdcabf5w0j00adfbn64xls"))))
5805 (build-system python-build-system)
5806 (home-page
5807 "https://github.com/pyflakes/pyflakes")
5808 (synopsis "Passive checker of Python programs")
5809 (description
5810 "Pyflakes statically checks Python source code for common errors.")
5811 (license license:expat)))
5812
5813(define-public python2-pyflakes
5814 (package-with-python2 python-pyflakes))
5815
5816(define-public python-mccabe
5817 (package
5818 (name "python-mccabe")
5819 (version "0.6.1")
5820 (source
5821 (origin
5822 (method url-fetch)
5823 (uri (pypi-uri "mccabe" version))
5824 (sha256
5825 (base32
5826 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
5827 (build-system python-build-system)
5828 (native-inputs
5829 `(("python-pytest" ,python-pytest-bootstrap)
5830 ("python-pytest-runner" ,python-pytest-runner)))
5831 (home-page "https://github.com/flintwork/mccabe")
5832 (synopsis "McCabe checker, plugin for flake8")
5833 (description
5834 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
5835complexity of Python source code.")
5836 (license license:expat)))
5837
5838(define-public python2-mccabe
5839 (package-with-python2 python-mccabe))
5840
5841(define-public python-mccabe-0.2.1
5842 (package (inherit python-mccabe)
5843 (version "0.2.1")
5844 (source
5845 (origin
5846 (method url-fetch)
5847 (uri (pypi-uri "mccabe" version))
5848 (sha256
5849 (base32
5850 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
5851
5852(define-public python2-mccabe-0.2.1
5853 (package-with-python2 python-mccabe-0.2.1))
5854
5855;; Flake8 2.4.1 requires an older version of pep8.
5856;; This should be removed ASAP.
5857(define-public python-pep8-1.5.7
5858 (package (inherit python-pep8)
5859 (version "1.5.7")
5860 (source
f3576970
RW
5861 (origin
5862 (method url-fetch)
5863 (uri (pypi-uri "pep8" version))
5864 (sha256
5865 (base32
5866 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
44d10b1f
RW
5867 (arguments
5868 ;; XXX Tests not compatible with Python 3.5.
5869 '(#:tests? #f))))
5870
5871(define-public python2-pep8-1.5.7
5872 (package-with-python2 python-pep8-1.5.7))
5873
5874;; Flake8 2.4.1 requires an older version of pyflakes.
5875;; This should be removed ASAP.
5876(define-public python-pyflakes-0.8.1
5877 (package (inherit python-pyflakes)
5878 (version "0.8.1")
5879 (source
8c4dffb5
RW
5880 (origin
5881 (method url-fetch)
5882 (uri (pypi-uri "pyflakes" version))
5883 (sha256
5884 (base32
5885 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
44d10b1f
RW
5886 (arguments
5887 ;; XXX Tests not compatible with Python 3.5.
5888 '(#:tests? #f))))
5889
5890(define-public python2-pyflakes-0.8.1
5891 (package-with-python2 python-pyflakes-0.8.1))
5892
5893;; This package is used by hypothesis which has thousands of dependent packages.
5894;; FIXME: Consolidate this with "python-flake8" below in the next rebuild cycle.
5895(define-public python-flake8-3.5
5896 (package
5897 (name "python-flake8")
5898 (version "3.5.0")
5899 (source
5900 (origin
5901 (method url-fetch)
5902 (uri (pypi-uri "flake8" version))
5903 (sha256
5904 (base32
5905 "184b33grvvjmiwlv9kyd7yng9qv5ld24154j70z332xxg9gjclvj"))))
5906 (build-system python-build-system)
5907 (arguments
5908 `(#:phases
5909 (modify-phases %standard-phases
5910 ;; Two errors don't seem to have assigned codes.
5911 (add-after 'unpack 'delete-broken-test
5912 (lambda _ (delete-file "tests/unit/test_pyflakes_codes.py") #t))
5913 (add-after 'unpack 'fix-problem-with-pycodestyle
5914 (lambda _
5915 ;; See https://gitlab.com/pycqa/flake8/merge_requests/230
5916 ;; This should no longer be needed with the next release.
5917 (substitute* "setup.py"
5918 (("PEP8_PLUGIN\\('break_around_binary_operator'\\),")
5919 "PEP8_PLUGIN('break_after_binary_operator'),\
5920PEP8_PLUGIN('break_before_binary_operator'),"))
5921 #t))
5922 (delete 'check)
5923 (add-after 'install 'check
5924 (lambda* (#:key inputs outputs #:allow-other-keys)
5925 (add-installed-pythonpath inputs outputs)
5926 (invoke "pytest" "-v")
5927 #t)))))
5928 (propagated-inputs
5929 `(("python-pycodestyle" ,python-pycodestyle)
5930 ("python-pyflakes" ,python-pyflakes)
5931 ("python-mccabe" ,python-mccabe)))
5932 (native-inputs
5933 `(("python-mock" ,python-mock)
5934 ("python-pytest" ,python-pytest-bootstrap)
5935 ("python-pytest-runner" ,python-pytest-runner)))
5936 (home-page "https://gitlab.com/pycqa/flake8")
5937 (synopsis
5938 "The modular source code checker: pep8, pyflakes and co")
5939 (description
5940 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
5941 (properties `((python2-variant . ,(delay python2-flake8-3.5))))
5942 (license license:expat)))
5943
5944(define-public python2-flake8-3.5
5945 (let ((base (package-with-python2 (strip-python2-variant python-flake8-3.5))))
5946 (package (inherit base)
5947 (propagated-inputs
5948 `(("python2-configparser" ,python2-configparser)
5949 ("python2-enum34" ,python2-enum34)
5950 ,@(package-propagated-inputs base))))))
5951
5952;; Version 3.5.0 has compatibility issues with Pyflakes 2.0, so we need
5953;; this newer version. Keep it as a separate variable for now to avoid
5954;; rebuilding "python-hypothesis"; this should be removed in the next
5955;; rebuild cycle.
5956(define-public python-flake8
5957 (package
5958 (inherit python-flake8-3.5)
5959 (version "3.6.0")
5960 (source (origin
5961 (method url-fetch)
5962 (uri (pypi-uri "flake8" version))
5963 (sha256
5964 (base32
5965 "0w0nprx22rbvrrkbfx9v5jc5gskbm08g219l7r8wai8zfswgadba"))))
5966 (arguments
5967 (substitute-keyword-arguments (package-arguments python-flake8-3.5)
5968 ((#:phases phases)
5969 `(modify-phases ,phases
5970 (delete 'delete-broken-test)
5971 (delete 'fix-problem-with-pycodestyle)))))
5972 (properties `((python2-variant . ,(delay python2-flake8))))))
5973
5974(define-public python2-flake8
5975 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
5976 (package (inherit base)
5977 (propagated-inputs
5978 (package-propagated-inputs python2-flake8-3.5)))))
5979
5980;; python-hacking requires flake8 <2.6.0.
5981(define-public python-flake8-2.5
5982 (package
5983 (inherit python-flake8)
5984 (version "2.5.5")
5985 (source (origin
5986 (method url-fetch)
5987 (uri (pypi-uri "flake8" version))
5988 (sha256
5989 (base32
5990 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
5991 (propagated-inputs
5992 `(("python-pep8" ,python-pep8)
5993 ,@(package-propagated-inputs python-flake8)))
5994 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
5995
5996(define-public python2-flake8-2.5
5997 (package
5998 (inherit python2-flake8)
5999 (version (package-version python-flake8-2.5))
6000 (source (origin
6001 (inherit (package-source python-flake8-2.5))))
6002 (propagated-inputs
6003 `(("python2-pep8" ,python2-pep8)
6004 ,@(package-propagated-inputs python2-flake8)))))
6005
6006(define-public python-flake8-polyfill
6007 (package
6008 (name "python-flake8-polyfill")
6009 (version "1.0.2")
6010 (source
6011 (origin
6012 (method url-fetch)
6013 (uri (pypi-uri "flake8-polyfill" version))
6014 (sha256
6015 (base32
6016 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
6017 (build-system python-build-system)
6018 (arguments
6019 '(#:phases
6020 (modify-phases %standard-phases
6021 (replace 'check
6022 (lambda _
6023 (setenv "PYTHONPATH"
6024 (string-append (getcwd) "/build/lib:"
6025 (getenv "PYTHONPATH")))
4f0a0894 6026 (invoke "py.test" "-v"))))))
44d10b1f
RW
6027 (native-inputs
6028 `(("python-flake8" ,python-flake8)
6029 ("python-mock" ,python-mock)
6030 ("python-pep8" ,python-pep8)
6031 ("python-pycodestyle" ,python-pycodestyle)
6032 ("python-pytest" ,python-pytest)))
6033 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6034 (synopsis "Polyfill package for Flake8 plugins")
6035 (description
6036 "This package that provides some compatibility helpers for Flake8
6037plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6038 (license license:expat)))
6039
6040(define-public python2-flake8-polyfill
6041 (package-with-python2 python-flake8-polyfill))
6042
6043(define-public python-mistune
6044 (package
6045 (name "python-mistune")
6046 (version "0.8.4")
6047 (source
6048 (origin
6049 (method url-fetch)
6050 (uri (pypi-uri "mistune" version))
6051 (sha256
6052 (base32
6053 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
6054 (build-system python-build-system)
6055 (native-inputs
6056 `(("python-nose" ,python-nose)
6057 ("python-cython" ,python-cython)))
6058 (home-page "https://github.com/lepture/mistune")
6059 (synopsis "Markdown parser in pure Python")
6060 (description "This package provides a fast markdown parser in pure
6061Python.")
6062 (license license:bsd-3)))
6063
6064(define-public python2-mistune
6065 (package-with-python2 python-mistune))
6066
6067(define-public python-markdown
6068 (package
6069 (name "python-markdown")
1e3c7119 6070 (version "3.1")
44d10b1f
RW
6071 (source
6072 (origin
6073 (method url-fetch)
6074 (uri (pypi-uri "Markdown" version))
6075 (sha256
6076 (base32
1e3c7119 6077 "0l62x154r9mgdvfap06gf0nkrmjd7xixlfshsxcdif2nlrlnyjpw"))))
44d10b1f
RW
6078 (build-system python-build-system)
6079 (native-inputs
6080 `(("python-nose" ,python-nose)
6081 ("python-pyyaml" ,python-pyyaml)))
6082 (home-page "https://python-markdown.github.io/")
6083 (synopsis "Python implementation of Markdown")
6084 (description
6085 "This package provides a Python implementation of John Gruber's
6086Markdown. The library features international input, various Markdown
6087extensions, and several HTML output formats. A command line wrapper
6088markdown_py is also provided to convert Markdown files to HTML.")
6089 (license license:bsd-3)))
6090
6091(define-public python2-markdown
6092 (package-with-python2 python-markdown))
6093
6094(define-public python-ptyprocess
6095 (package
6096 (name "python-ptyprocess")
6097 (version "0.5.2")
6098 (source
6099 (origin
6100 (method url-fetch)
6101 (uri (pypi-uri "ptyprocess" version))
6102 (sha256
6103 (base32
6104 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
6105 (build-system python-build-system)
6106 (native-inputs
6107 `(("python-nose" ,python-nose)))
6108 (arguments
6109 `(#:phases
6110 (modify-phases %standard-phases
6111 (replace 'check
7904d6fa 6112 (lambda _ (invoke "nosetests"))))))
44d10b1f
RW
6113 (home-page "https://github.com/pexpect/ptyprocess")
6114 (synopsis "Run a subprocess in a pseudo terminal")
6115 (description
6116 "This package provides a Python library used to launch a subprocess in a
6117pseudo terminal (pty), and interact with both the process and its pty.")
6118 (license license:isc)))
6119
6120(define-public python2-ptyprocess
6121 (package-with-python2 python-ptyprocess))
6122
6123(define-public python-cram
6124 (package
6125 (name "python-cram")
6126 (version "0.7")
6127 (home-page "https://bitheap.org/cram/")
6128 (source (origin
6129 (method url-fetch)
6130 (uri (list (string-append home-page "cram-"
6131 version ".tar.gz")
6132 (pypi-uri "cram" version)))
6133 (sha256
6134 (base32
6135 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6136 (arguments
6137 '(#:phases
6138 (modify-phases %standard-phases
6139 (add-after 'unpack 'patch-source
6140 (lambda _
6141 (substitute* (find-files "cram" ".*\\.py$")
6142 ;; Replace default shell path.
6143 (("/bin/sh") (which "sh")))
6144 (substitute* (find-files "tests" ".*\\.t$")
6145 (("md5") "md5sum")
6146 (("/bin/bash") (which "bash"))
6147 (("/bin/sh") (which "sh")))
6148 (substitute* "cram/_test.py"
6149 ;; This hack works around a bug triggered by substituting
6150 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6151 ;; "cram -h", which breaks the output at 80 characters. This
6152 ;; causes the line showing the default shell to break into two
6153 ;; lines, but the test expects a single line...
6154 (("env\\['COLUMNS'\\] = '80'")
6155 "env['COLUMNS'] = '160'"))
6156 #t))
6157 (delete 'check)
6158 (add-after 'install 'check
6159 ;; The test phase uses the built library and executable.
6160 ;; It's easier to run it after install since the build
6161 ;; directory contains version-specific PATH.
6162 (lambda* (#:key inputs outputs #:allow-other-keys)
6163 (add-installed-pythonpath inputs outputs)
6164 (setenv "PATH" (string-append (getenv "PATH") ":"
6165 (assoc-ref outputs "out") "/bin"))
2d7db192 6166 (invoke "make" "test"))))))
44d10b1f
RW
6167 (build-system python-build-system)
6168 (native-inputs
6169 `(("python-coverage" ,python-coverage)
6170 ("which" ,which)))
6171 (synopsis "Simple testing framework for command line applications")
6172 (description
6173 "Cram is a functional testing framework for command line applications.
6174Cram tests look like snippets of interactive shell sessions. Cram runs each
6175command and compares the command output in the test with the command’s actual
6176output.")
6177 (license license:gpl2+)))
6178
6179(define-public python2-cram
6180 (package-with-python2 python-cram))
6181
6182(define-public python-straight-plugin
6183 (package
6184 (name "python-straight-plugin")
6185 (version "1.4.1")
6186 (source
6187 (origin
6188 (method url-fetch)
6189 (uri (pypi-uri "straight.plugin" version))
6190 (sha256
6191 (base32
6192 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6193 (build-system python-build-system)
6194 (home-page "https://github.com/ironfroggy/straight.plugin")
6195 (synopsis "Simple namespaced plugin facility")
6196 (description "Straight Plugin provides a type of plugin you can create from
6197almost any existing Python modules, and an easy way for outside developers to
6198add functionality and customization to your projects with their own plugins.")
6199 (license license:expat)))
6200
6201(define-public python2-straight-plugin
6202 (package-with-python2 python-straight-plugin))
6203
6204(define-public python-fonttools
6205 (package
6206 (name "python-fonttools")
6207 (version "3.28.0")
6208 (source (origin
6209 (method url-fetch)
6210 (uri (pypi-uri "fonttools" version ".zip"))
6211 (sha256
6212 (base32
6213 "0vsvjhidpb5kywpjgz1j3fywzkddxkb0afqai18qa3h6lqjyxwpb"))))
6214 (build-system python-build-system)
6215 (native-inputs
6216 `(("unzip" ,unzip)
6217 ("python-pytest" ,python-pytest)
6218 ("python-pytest-runner" ,python-pytest-runner)))
6219 (home-page "https://github.com/behdad/fonttools")
6220 (synopsis "Tools to manipulate font files")
6221 (description
6222 "FontTools/TTX is a library to manipulate font files from Python. It
6223supports reading and writing of TrueType/OpenType fonts, reading and writing
6224of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6225also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6226from an XML-based format.")
6227 (license license:expat)))
6228
6229(define-public python2-fonttools
6230 (package-with-python2 python-fonttools))
6231
6232(define-public python-ly
6233 (package
6234 (name "python-ly")
6235 (version "0.9.5")
6236 (source
6237 (origin
6238 (method url-fetch)
6239 (uri (pypi-uri name version))
6240 (sha256
6241 (base32
6242 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
6243 (build-system python-build-system)
6244 (arguments
6245 ;; FIXME: Some tests need network access.
6246 '(#:tests? #f))
6247 (synopsis "Tool and library for manipulating LilyPond files")
6248 (description "This package provides a Python library to parse, manipulate
6249or create documents in LilyPond format. A command line program ly is also
6250provided that can be used to do various manipulations with LilyPond files.")
6251 (home-page "https://pypi.python.org/pypi/python-ly")
6252 (license license:gpl2+)))
6253
6254(define-public python-appdirs
6255 (package
6256 (name "python-appdirs")
6257 (version "1.4.3")
6258 (source
6259 (origin
6260 (method url-fetch)
6261 (uri (pypi-uri "appdirs" version))
6262 (sha256
6263 (base32
6264 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
6265 (build-system python-build-system)
6266 (home-page "https://github.com/ActiveState/appdirs")
6267 (synopsis
6268 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6269 (description
6270 "This module provides a portable way of finding out where user data
6271should be stored on various operating systems.")
6272 (license license:expat)))
6273
6274(define-public python2-appdirs
6275 (package-with-python2 python-appdirs))
6276
6277(define-public python-llfuse
6278 (package
6279 (name "python-llfuse")
6280 (version "1.3.5")
6281 (source (origin
6282 (method url-fetch)
6283 (uri (pypi-uri "llfuse" version ".tar.bz2"))
6284 (sha256
6285 (base32
6286 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
6287 (build-system python-build-system)
6288 (inputs
6289 `(("fuse" ,fuse)
6290 ("attr" ,attr)))
6291 (native-inputs
6292 `(("pkg-config" ,pkg-config)))
6293 (synopsis "Python bindings for FUSE")
6294 (description
6295 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6296 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
6297 (license license:lgpl2.0+)
6298 (properties `((python2-variant . ,(delay python2-llfuse))))))
6299
6300(define-public python2-llfuse
6301 (package (inherit (package-with-python2
6302 (strip-python2-variant python-llfuse)))
6303 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6304
6305;; For attic-0.16
6306(define-public python-llfuse-0.41
6307 (package (inherit python-llfuse)
6308 (version "0.41.1")
6309 (source (origin
6310 (method url-fetch)
6311 (uri (string-append
6312 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6313 "llfuse-" version ".tar.bz2"))
6314 (sha256
6315 (base32
6316 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
6317 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6318 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
6319 (license (list license:expat license:lgpl2.0+))))
6320
6321(define-public python-msgpack
6322 (package
6323 (name "python-msgpack")
6324 (version "0.5.6")
6325 (source (origin
6326 (method url-fetch)
6327 (uri (pypi-uri "msgpack" version))
6328 (sha256
6329 (base32
6330 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
6331 (build-system python-build-system)
6332 (arguments
6333 `(#:modules ((guix build utils)
6334 (guix build python-build-system)
6335 (ice-9 ftw)
6336 (srfi srfi-1)
6337 (srfi srfi-26))
6338 #:phases
6339 (modify-phases %standard-phases
6340 (replace 'check
6341 (lambda _
6342 (let ((cwd (getcwd)))
6343 (setenv "PYTHONPATH"
6344 (string-append cwd "/build/"
6345 (find (cut string-prefix? "lib" <>)
6346 (scandir (string-append cwd "/build")))
6347 ":"
6348 (getenv "PYTHONPATH")))
6349 (invoke "pytest" "-v" "test")))))))
6350 (native-inputs
6351 `(("python-pytest" ,python-pytest)))
6352 (synopsis "MessagePack (de)serializer")
6353 (description "MessagePack is a fast, compact binary serialization format,
6354suitable for similar data to JSON. This package provides CPython bindings for
6355reading and writing MessagePack data.")
6356 (home-page "https://pypi.python.org/pypi/msgpack/")
6357 (license license:asl2.0)))
6358
6359;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
6360;; release 0.5. Some packages like borg still call it by the old name for now.
6361;; <https://bugs.gnu.org/30662>
6362(define-public python-msgpack-transitional
6363 (package
6364 (inherit python-msgpack)
6365 (name "python-msgpack-transitional")
6366 (arguments
6367 (substitute-keyword-arguments (package-arguments python-msgpack)
6368 ((#:phases phases)
6369 `(modify-phases ,phases
6370 (add-after 'unpack 'configure-transitional
6371 (lambda _
6372 ;; Keep using the old name.
6373 (substitute* "setup.py"
6374 (("TRANSITIONAL = False")
6375 "TRANSITIONAL = 1"))
6376 #t))))))))
6377
6378(define-public python2-msgpack
6379 (package-with-python2 python-msgpack))
6380
6381(define-public python-netaddr
6382 (package
6383 (name "python-netaddr")
6384 (version "0.7.19")
6385 (source
6386 (origin
6387 (method url-fetch)
6388 (uri (pypi-uri "netaddr" version))
6389 (sha256
6390 (base32
6391 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
6392 (build-system python-build-system)
6393 (arguments `(#:tests? #f)) ;; No tests.
6394 (home-page "https://github.com/drkjam/netaddr/")
6395 (synopsis "Pythonic manipulation of network addresses")
6396 (description
6397 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6398and MAC network addresses.")
6399 (license license:bsd-3)))
6400
6401(define-public python2-netaddr
6402 (package-with-python2 python-netaddr))
6403
6404(define-public python-wrapt
6405 (package
6406 (name "python-wrapt")
dddd7a75 6407 (version "1.11.1")
44d10b1f
RW
6408 (source
6409 (origin
6410 (method url-fetch)
6411 (uri (pypi-uri "wrapt" version))
6412 (sha256
6413 (base32
dddd7a75 6414 "0cqmysny1pz01jw26q48q5zasvns6507rwhgm6wcw743f0r01sja"))))
44d10b1f
RW
6415 (build-system python-build-system)
6416 (arguments
6417 ;; Tests are not included in the tarball, they are only available in the
6418 ;; git repository.
6419 `(#:tests? #f))
6420 (home-page "https://github.com/GrahamDumpleton/wrapt")
6421 (synopsis "Module for decorators, wrappers and monkey patching")
6422 (description
6423 "The aim of the wrapt module is to provide a transparent object proxy for
6424 Python, which can be used as the basis for the construction of function
6425 wrappers and decorator functions.")
6426 (license license:bsd-2)))
6427
6428(define-public python2-wrapt
6429 (package-with-python2 python-wrapt))
6430
6431(define-public python-xlrd
6432 (package
6433 (name "python-xlrd")
6434 (version "1.0.0")
6435 (source (origin
6436 (method url-fetch)
6437 (uri (pypi-uri "xlrd" version))
6438 (sha256
6439 (base32
6440 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
6441 (build-system python-build-system)
6442 (arguments
6443 `(#:phases
6444 (modify-phases %standard-phases
6445 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
6446 ;; run tests instead for now.
45fd0081 6447 (replace 'check (lambda _ (invoke "nosetests"))))))
44d10b1f
RW
6448 (native-inputs `(("python-nose" ,python-nose)))
6449 (home-page "http://www.python-excel.org/")
6450 (synopsis "Library for extracting data from Excel files")
6451 (description "This packages provides a library to extract data from
6452spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
6453@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
6454Unicode-aware. It is not intended as an end-user tool.")
6455 (license license:bsd-3)))
6456
6457(define-public python2-xlrd
6458 (package-with-python2 python-xlrd))
6459
6460(define-public python-prettytable
6461 (package
6462 (name "python-prettytable")
6463 (version "0.7.2")
6464 (source
6465 (origin
6466 (method url-fetch)
337c3a1e 6467 (uri (pypi-uri "prettytable" version ".tar.bz2"))
44d10b1f
RW
6468 (sha256
6469 (base32
6470 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
6471 (build-system python-build-system)
6472 (home-page "http://code.google.com/p/prettytable/")
6473 (synopsis "Display tabular data in an ASCII table format")
6474 (description
6475 "A library designed to represent tabular data in visually appealing ASCII
6476tables. PrettyTable allows for selection of which columns are to be printed,
6477independent alignment of columns (left or right justified or centred) and
6478printing of sub-tables by specifying a row range.")
6479 (license license:bsd-3)))
6480
6481(define-public python2-prettytable
6482 (package-with-python2 python-prettytable))
6483
6484(define-public python-tables
6485 (package
6486 (name "python-tables")
6487 (version "3.4.4")
6488 (source
6489 (origin
6490 (method url-fetch)
6491 (uri (pypi-uri "tables" version))
6492 (sha256
6493 (base32
6494 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
6495 (modules '((guix build utils)))
6496 (snippet
6497 '(begin
6498 ;; Remove pre-compiled .pyc files from source.
6499 (for-each delete-file-recursively
6500 (find-files "." "__pycache__" #:directories? #t))
6501 (for-each delete-file (find-files "." "\\.pyc$"))
6502 #t))))
6503 (build-system python-build-system)
6504 (arguments
6505 `(;; FIXME: python-build-system does not pass configure-flags to "build"
6506 ;; or "check", so we must override the build and check phases.
6507 #:phases
6508 (modify-phases %standard-phases
6509 (add-after 'unpack 'use-gcc
6510 (lambda _
6511 (substitute* "setup.py"
6512 (("compiler = new_compiler\\(\\)" line)
6513 (string-append line
6514 "\ncompiler.set_executables(compiler='gcc',"
6515 "compiler_so='gcc',"
6516 "linker_exe='gcc',"
6517 "linker_so='gcc -shared')")))
6518 #t))
6519 (replace 'build
6520 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
6521 (invoke "python" "setup.py" "build"
6522 (string-append "--hdf5="
6523 (assoc-ref inputs "hdf5")))))
44d10b1f
RW
6524 (replace 'check
6525 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
6526 (invoke "python" "setup.py" "check"
6527 (string-append "--hdf5="
6528 (assoc-ref inputs "hdf5"))))))))
44d10b1f
RW
6529 (propagated-inputs
6530 `(("python-numexpr" ,python-numexpr)
6531 ("python-numpy" ,python-numpy)))
6532 (native-inputs
6533 `(("python-cython" ,python-cython)
6534 ("pkg-config" ,pkg-config)))
6535 (inputs
6536 `(("hdf5" ,hdf5)
6537 ("bzip2" ,bzip2)
6538 ("zlib" ,zlib)))
6539 (home-page "http://www.pytables.org/")
6540 (synopsis "Hierarchical datasets for Python")
6541 (description "PyTables is a package for managing hierarchical datasets and
6542designed to efficiently cope with extremely large amounts of data.")
6543 (license license:bsd-3)))
6544
6545(define-public python2-tables
6546 (package-with-python2 python-tables))
6547
6548(define-public python-pyasn1
6549 (package
6550 (name "python-pyasn1")
6551 (version "0.4.3")
6552 (source
6553 (origin
6554 (method url-fetch)
6555 (uri (pypi-uri "pyasn1" version))
6556 (sha256
6557 (base32
6558 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
6559 (build-system python-build-system)
6560 (home-page "http://pyasn1.sourceforge.net/")
6561 (synopsis "ASN.1 types and codecs")
6562 (description
6563 "This is an implementation of ASN.1 types and codecs in Python. It is
6564suitable for a wide range of protocols based on the ASN.1 specification.")
6565 (license license:bsd-2)))
6566
6567(define-public python2-pyasn1
6568 (package-with-python2 python-pyasn1))
6569
6570(define-public python-pyasn1-modules
6571 (package
6572 (name "python-pyasn1-modules")
6573 (version "0.2.2")
6574 (source
6575 (origin
6576 (method url-fetch)
6577 (uri (pypi-uri "pyasn1-modules" version))
6578 (sha256
6579 (base32
6580 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
6581 (build-system python-build-system)
6582 (propagated-inputs
6583 `(("python-pyasn1" ,python-pyasn1)))
6584 (home-page "https://sourceforge.net/projects/pyasn1/")
6585 (synopsis "ASN.1 codec implementations")
6586 (description
6587 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
6588implementations of ASN.1-based codecs and protocols.")
6589 (license license:bsd-3)))
6590
6591(define-public python2-pyasn1-modules
6592 (package-with-python2 python-pyasn1-modules))
6593
6594(define-public python-ipaddress
6595 (package
6596 (name "python-ipaddress")
6597 (version "1.0.22")
6598 (source (origin
6599 (method url-fetch)
6600 (uri (pypi-uri "ipaddress" version))
6601 (sha256
6602 (base32
6603 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
6604 (build-system python-build-system)
6605 (home-page "https://github.com/phihag/ipaddress")
6606 (synopsis "IP address manipulation library")
6607 (description
6608 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
6609 in Python. This library is used to create, poke at, and manipulate IPv4 and
6610 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
6611 module to older versions of Python.")
6612 (license license:psfl)))
6613
6614(define-public python2-ipaddress
6615 (package-with-python2 python-ipaddress))
6616
6617(define-public python2-ipaddr
6618 (package
6619 (name "python2-ipaddr")
6620 (version "2.1.11")
6621 (source
6622 (origin
6623 (method url-fetch)
6624 (uri (pypi-uri "ipaddr" version))
6625 (sha256
6626 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
6627 (build-system python-build-system)
6628 (arguments
6629 `(#:python ,python-2 ;version 2 only
6630 #:phases
6631 (modify-phases %standard-phases
6632 (replace 'check
40b8c4e3 6633 (lambda _ (invoke "python" "ipaddr_test.py"))))))
44d10b1f
RW
6634 (home-page "https://github.com/google/ipaddr-py")
6635 (synopsis "IP address manipulation library")
6636 (description
6637 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
6638IPv6 addresses and networks.
6639
6640For new implementations you may prefer to use the standard module
6641@code{ipaddress}, which was introduced in Python 3.3 and backported to older
6642versions of Python.")
6643 (license license:asl2.0)))
6644
6645(define-public python-idna
6646 (package
6647 (name "python-idna")
6648 (version "2.7")
6649 (source
6650 (origin
6651 (method url-fetch)
6652 (uri (pypi-uri "idna" version))
6653 (sha256
6654 (base32
6655 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))
6656 (build-system python-build-system)
6657 (home-page "https://github.com/kjd/idna")
6658 (synopsis "Internationalized domain names in applications")
6659 (description
6660 "This is a library to support the Internationalised Domain Names in
6661Applications (IDNA) protocol as specified in RFC 5891. This version of the
6662protocol is often referred to as “IDNA2008” and can produce different results
6663from the earlier standard from 2003. The library is also intended to act as a
6664suitable drop-in replacement for the “encodings.idna” module that comes with
6665the Python standard library but currently only supports the older 2003
6666specification.")
6667 (license license:bsd-4)))
6668
6669(define-public python2-idna
6670 (package-with-python2 python-idna))
6671
6672(define-public python-idna-ssl
6673 (package
6674 (name "python-idna-ssl")
6675 (version "1.0.1")
6676 (source
6677 (origin
6678 (method url-fetch)
6679 (uri (pypi-uri "idna-ssl" version))
6680 (sha256
6681 (base32
6682 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
6683 (build-system python-build-system)
6684 (arguments
6685 `(#:tests? #f)) ;circular dependency with python-aiohttp
6686 (home-page "https://github.com/aio-libs/idna-ssl")
6687 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
6688 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
6689domains support.")
6690 (license license:expat)))
6691
6692(define-public python-pretend
6693 (package
6694 (name "python-pretend")
6695 (version "1.0.9")
6696 (source
6697 (origin
6698 (method url-fetch)
9f1f22ee 6699 (uri (pypi-uri "pretend" version))
44d10b1f
RW
6700 (sha256
6701 (base32
6702 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
6703 (build-system python-build-system)
6704 (home-page "https://github.com/alex/pretend")
6705 (synopsis "Library for stubbing in Python")
6706 (description
6707 "Pretend is a library to make stubbing with Python easier. Stubbing is a
6708technique for writing tests. You may hear the term mixed up with mocks,
6709fakes, or doubles. Basically, a stub is an object that returns pre-canned
6710responses, rather than doing any computation.")
6711 (license license:bsd-3)))
6712
6713(define-public python2-pretend
6714 (package-with-python2 python-pretend))
6715
6716(define-public python-pip
6717 (package
6718 (name "python-pip")
6719 (version "18.1")
6720 (source
6721 (origin
6722 (method url-fetch)
6723 (uri (pypi-uri "pip" version))
6724 (sha256
6725 (base32
6726 "188fclay154s520n43s7cxxlhdaiysvxf19zk8vr1xbyjyyr58n0"))))
6727 (build-system python-build-system)
6728 (arguments
6729 '(#:tests? #f)) ; there are no tests in the pypi archive.
6730 (home-page "https://pip.pypa.io/")
6731 (synopsis "Package manager for Python software")
6732 (description
6733 "Pip is a package manager for Python software, that finds packages on the
6734Python Package Index (PyPI).")
6735 (license license:expat)))
6736
6737(define-public python2-pip
6738 (package-with-python2 python-pip))
6739
6740(define-public python-tlsh
6741 (package
6742 (name "python-tlsh")
6743 (version "3.4.5")
6744 (home-page "https://github.com/trendmicro/tlsh")
3e3ff8ad
TGR
6745 (source
6746 (origin
6747 (method git-fetch)
6748 (uri (git-reference
6749 (url "https://github.com/trendmicro/tlsh.git")
6750 (commit (string-append "v" version))))
6751 (file-name (git-file-name name version))
6752 (sha256
6753 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
44d10b1f
RW
6754 (build-system cmake-build-system)
6755 (arguments
6756 '(#:out-of-source? #f
6757 #:phases (modify-phases %standard-phases
6758 (replace
6759 'install
6760 (lambda* (#:key outputs #:allow-other-keys)
6761 ;; Build and install the Python bindings. The underlying
6762 ;; C++ library is apparently not meant to be installed.
6763 (let ((out (assoc-ref outputs "out")))
6764 (with-directory-excursion "py_ext"
6765 (and (system* "python" "setup.py" "build")
6766 (system* "python" "setup.py" "install"
6767 (string-append "--prefix=" out))))))))))
6768 (inputs `(("python" ,python-wrapper))) ;for the bindings
6769 (synopsis "Fuzzy matching library for Python")
6770 (description
6771 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
6772Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
6773value which can be used for similarity comparisons. Similar objects have
6774similar hash values, which allows for the detection of similar objects by
6775comparing their hash values. The byte stream should have a sufficient amount
6776of complexity; for example, a byte stream of identical bytes will not generate
6777a hash value.")
6778 (license license:asl2.0)))
6779
6780(define-public python2-tlsh
6781 (package
6782 (inherit python-tlsh)
6783 (name "python2-tlsh")
6784 (inputs `(("python" ,python-2)))))
6785
6786(define-public python-termcolor
6787 (package
6788 (name "python-termcolor")
6789 (version "1.1.0")
6790 (source
6791 (origin
6792 (method url-fetch)
6793 (uri (pypi-uri "termcolor" version))
6794 (sha256
6795 (base32
6796 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
6797 (build-system python-build-system)
6798 (arguments
6799 ;; There are no tests.
6800 `(#:tests? #f))
6801 (home-page "https://pypi.python.org/pypi/termcolor")
6802 (synopsis "ANSII Color formatting for terminal output")
6803 (description
6804 "This package provides ANSII Color formatting for output in terminals.")
6805 (license license:expat)))
6806
6807(define-public python2-termcolor
6808 (package-with-python2 python-termcolor))
6809
6810(define-public python-libarchive-c
6811 (package
6812 (name "python-libarchive-c")
6813 (version "2.8")
6814 (source (origin
6815 (method url-fetch)
6816 (uri (pypi-uri "libarchive-c" version))
6817 (sha256
6818 (base32
6819 "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06"))))
6820 (build-system python-build-system)
6821 (arguments
6822 '(#:phases (modify-phases %standard-phases
6823 (add-before
6824 'build 'reference-libarchive
6825 (lambda* (#:key inputs #:allow-other-keys)
6826 ;; Retain the absolute file name of libarchive.so.
6827 (let ((libarchive (assoc-ref inputs "libarchive")))
6828 (substitute* "libarchive/ffi.py"
6829 (("find_library\\('archive'\\)")
6830 (string-append "'" libarchive
6831 "/lib/libarchive.so'"))))))
6832 (replace 'check
6833 (lambda _ (invoke "pytest" "-vv"))))))
6834 (native-inputs
6835 `(("python-mock" ,python-mock)
6836 ("python-pytest" ,python-pytest)))
6837 (inputs
6838 `(("libarchive" ,libarchive)))
6839 (home-page "https://github.com/Changaco/python-libarchive-c")
6840 (synopsis "Python interface to libarchive")
6841 (description
6842 "This package provides Python bindings to libarchive, a C library to
6843access possibly compressed archives in many different formats. It uses
6844Python's @code{ctypes} foreign function interface (FFI).")
6845 (license license:lgpl2.0+)))
6846
6847(define-public python2-libarchive-c
6848 (package-with-python2 python-libarchive-c))
6849
6850(define-public python-file
6851 (package
6852 (inherit file)
6853 (name "python-file")
6854 (build-system python-build-system)
6855 (arguments
6856 '(#:tests? #f ;no tests
6857 #:configure-flags '("--single-version-externally-managed" "--root=/")
6858 #:phases (modify-phases %standard-phases
6859 (add-before 'build 'change-directory
6860 (lambda _
6861 (chdir "python")
6862 #t))
6863 (add-before 'build 'set-library-file-name
6864 (lambda* (#:key inputs #:allow-other-keys)
6865 (let ((file (assoc-ref inputs "file")))
6866 (substitute* "magic.py"
6867 (("find_library\\('magic'\\)")
6868 (string-append "'" file "/lib/libmagic.so'")))
6869 #t))))))
6870 (inputs `(("file" ,file)))
528ea990
LC
6871 (native-inputs (if (%current-target-system)
6872 `(("self" ,this-package))
6873 '()))
44d10b1f
RW
6874 (synopsis "Python bindings to the libmagic file type guesser. Note that
6875this module and the python-magic module both provide a \"magic.py\" file;
6876these two modules, which are different and were developed separately, both
6877serve the same purpose: provide Python bindings for libmagic.")))
6878
6879(define-public python2-file
6880 (package-with-python2 python-file))
6881
6882(define-public python-debian
6883 (package
6884 (name "python-debian")
6885 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
6886 (version "0.1.28")
6887 (source
6888 (origin
6889 (method url-fetch)
6890 (uri (pypi-uri name version))
6891 (sha256
6892 (base32
6893 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
6894 (build-system python-build-system)
6895 (propagated-inputs
6896 `(("python-six" ,python-six)))
6897 (synopsis "Debian package related modules")
6898 (description
6899 ;; XXX: Use @enumerate instead of @itemize to work around
6900 ;; <http://bugs.gnu.org/21772>.
6901 "This package provides Python modules that abstract many formats of
6902Debian-related files, such as:
6903
6904@enumerate
6905@item Debtags information;
6906@item @file{debian/changelog} files;
6907@item packages files, pdiffs;
6908@item control files of single or multiple RFC822-style paragraphs---e.g.
6909 @file{debian/control}, @file{.changes}, @file{.dsc};
6910@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
6911 contained files and meta-information.
6912@end enumerate\n")
6913
6914 ;; Modules are either GPLv2+ or GPLv3+.
6915 (license license:gpl3+)))
6916
6917(define-public python2-debian
6918 (package-with-python2 python-debian))
6919
6920(define-public python-nbformat
6921 (package
6922 (name "python-nbformat")
6923 (version "4.4.0")
6924 (source
6925 (origin
6926 (method url-fetch)
6927 (uri (pypi-uri "nbformat" version))
6928 (sha256
6929 (base32
6930 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
6931 (build-system python-build-system)
6932 (arguments `(#:tests? #f)) ; no test target
6933 (propagated-inputs
6934 `(("python-ipython-genutils" ,python-ipython-genutils)
6935 ("python-jsonschema" ,python-jsonschema)
6936 ("python-jupyter-core" ,python-jupyter-core)
6937 ("python-traitlets" ,python-traitlets)))
6938 (home-page "http://jupyter.org")
6939 (synopsis "Jupyter Notebook format")
6940 (description "This package provides the reference implementation of the
6941Jupyter Notebook format and Python APIs for working with notebooks.")
6942 (license license:bsd-3)))
6943
6944(define-public python2-nbformat
6945 (package-with-python2 python-nbformat))
6946
6947(define-public python-bleach
6948 (package
6949 (name "python-bleach")
6950 (version "1.4.3")
6951 (source
6952 (origin
6953 (method url-fetch)
6954 (uri (pypi-uri "bleach" version))
6955 (sha256
6956 (base32
6957 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
6958 (build-system python-build-system)
6959 (propagated-inputs
6960 `(("python-html5lib" ,python-html5lib-0.9)
6961 ("python-six" ,python-six)))
6962 (native-inputs
6963 `(("python-nose" ,python-nose)))
6964 (home-page "https://github.com/jsocol/bleach")
6965 (synopsis "Whitelist-based HTML-sanitizing tool")
6966 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
6967 (license license:asl2.0)))
6968
6969(define-public python2-bleach
6970 (package-with-python2 python-bleach))
6971
6972(define-public python-entrypoints
6973 (package
6974 (name "python-entrypoints")
a7f1b718 6975 (version "0.3")
44d10b1f
RW
6976 (source
6977 (origin
6978 (method url-fetch)
a7f1b718 6979 (uri (pypi-uri "entrypoints" version))
44d10b1f
RW
6980 (sha256
6981 (base32
a7f1b718 6982 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
44d10b1f
RW
6983 (build-system python-build-system)
6984 ;; The package does not come with a setup.py file, so we have to generate
6985 ;; one ourselves.
6986 (arguments
6987 `(#:tests? #f
6988 #:phases
6989 (modify-phases %standard-phases
6990 (add-after 'unpack 'create-setup.py
6991 (lambda _
6992 (call-with-output-file "setup.py"
6993 (lambda (port)
6994 (format port "\
6995from setuptools import setup
6996setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
6997" ,version))))))))
6998 (home-page "https://github.com/takluyver/entrypoints")
6999 (synopsis "Discover and load entry points from installed Python packages")
7000 (description "Entry points are a way for Python packages to advertise
7001objects with some common interface. The most common examples are
7002@code{console_scripts} entry points, which define shell commands by
7003identifying a Python function to run. The @code{entrypoints} module contains
7004functions to find and load entry points.")
7005 (license license:expat)))
7006
7007(define-public python2-entrypoints
7008 (package-with-python2 python-entrypoints))
7009
7010(define-public python-nbconvert
7011 (package
7012 (name "python-nbconvert")
7013 (version "5.0.0b1")
7014 (source
7015 (origin
7016 (method url-fetch)
7017 (uri (pypi-uri "nbconvert" version))
7018 (sha256
7019 (base32
7020 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7021 (build-system python-build-system)
7022 (arguments
7023 `(;; The "bdist_egg" target is disabled by default, causing the installation
7024 ;; to fail.
7025 #:configure-flags (list "bdist_egg")
7026 ;; FIXME: 5 failures, 40 errors.
7027 #:tests? #f))
7028 ;; #:phases
7029 ;; (modify-phases %standard-phases
7030 ;; (replace 'check
7031 ;; (lambda _
7032 ;; (zero? (system* "py.test" "-v")))))
7033 (native-inputs
7034 `(("python-pytest" ,python-pytest)))
7035 (propagated-inputs
7036 `(("python-bleach" ,python-bleach)
7037 ("python-entrypoints" ,python-entrypoints)
7038 ("python-jinja2" ,python-jinja2)
7039 ("python-jupyter-core" ,python-jupyter-core)
7040 ("python-mistune" ,python-mistune)
7041 ("python-nbformat" ,python-nbformat)
7042 ("python-pygments" ,python-pygments)
7043 ("python-traitlets" ,python-traitlets)))
7044 (home-page "http://jupyter.org")
7045 (synopsis "Converting Jupyter Notebooks")
7046 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7047notebooks to various other formats via Jinja templates. It allows you to
7048convert an @code{.ipynb} notebook file into various static formats including:
7049
7050@enumerate
7051@item HTML
7052@item LaTeX
7053@item PDF
7054@item Reveal JS
7055@item Markdown (md)
7056@item ReStructured Text (rst)
7057@item executable script
7058@end enumerate\n")
7059 (license license:bsd-3)))
7060
7061(define-public python2-nbconvert
7062 (package-with-python2 python-nbconvert))
7063
44d10b1f
RW
7064(define-public python-notebook
7065 (package
7066 (name "python-notebook")
7067 (version "5.7.4")
7068 (source (origin
7069 (method url-fetch)
7070 (uri (pypi-uri "notebook" version))
7071 (sha256
7072 (base32
7073 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
7074 (build-system python-build-system)
7075 (arguments
7076 `(#:phases
7077 (modify-phases %standard-phases
7078 (replace 'check
7079 (lambda _
7080 ;; These tests require a browser
7081 (delete-file-recursively "notebook/tests/selenium")
7082 ;; Some tests need HOME
7083 (setenv "HOME" "/tmp")
7084 ;; This file contains "warningfilters", which are not supported
7085 ;; by this version of nose.
7086 (delete-file "setup.cfg")
7087 (with-directory-excursion "/tmp"
7088 (invoke "nosetests" "-v"))
7089 #t)))))
7090 (propagated-inputs
7091 `(("python-jupyter-core" ,python-jupyter-core)
7092 ("python-nbformat" ,python-nbformat)
7093 ("python-nbconvert" ,python-nbconvert)
7094 ("python-prometheus-client" ,python-prometheus-client)
7095 ("python-send2trash" ,python-send2trash)
7096 ("python-terminado" ,python-terminado)))
7097 (native-inputs
7098 `(("python-nose" ,python-nose)
7099 ("python-sphinx" ,python-sphinx)
7100 ("python-requests" ,python-requests)))
7101 (home-page "http://jupyter.org/")
7102 (synopsis "Web-based notebook environment for interactive computing")
7103 (description
7104 "The Jupyter HTML notebook is a web-based notebook environment for
7105interactive computing.")
7106 (properties `((python2-variant . ,(delay python2-notebook))))
7107 (license license:bsd-3)))
7108
7109(define-public python2-notebook
7110 (let ((base (package-with-python2
7111 (strip-python2-variant python-notebook))))
7112 (package (inherit base)
7113 (native-inputs
7114 `(("python2-mock" ,python2-mock)
7115 ,@(package-native-inputs base)))
7116 (arguments
7117 (substitute-keyword-arguments (package-arguments base)
7118 ((#:phases phases)
7119 `(modify-phases ,phases
7120 (add-before 'check 'disable-test-case
7121 ;; The test requires network access to localhost. Curiously it
7122 ;; fails with Python 2 only. Simply make the test-case return
7123 ;; immediately.
7124 (lambda _
7125 (substitute*
7126 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7127 (("formats = self.nbconvert_api") "return #")))))))))))
7128
7129(define-public python-widgetsnbextension
7130 (package
7131 (name "python-widgetsnbextension")
7132 (version "3.4.2")
7133 (source
7134 (origin
7135 (method url-fetch)
7136 (uri (pypi-uri "widgetsnbextension" version))
7137 (sha256
7138 (base32
7139 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
7140 (build-system python-build-system)
7141 (propagated-inputs
7142 `(("python-ipykernel" ,python-ipykernel)
7143 ("python-notebook" ,python-notebook)))
7144 (native-inputs
7145 `(("python-certifi" ,python-certifi)
7146 ("python-nose" ,python-nose)))
7147 (home-page "https://ipython.org")
7148 (synopsis "IPython HTML widgets for Jupyter")
7149 (description "This package provides interactive HTML widgets for Jupyter
7150notebooks.")
7151 (license license:bsd-3)))
7152
7153(define-public python2-widgetsnbextension
7154 (package-with-python2 python-widgetsnbextension))
7155
7156(define-public python-ipywidgets
7157 (package
7158 (name "python-ipywidgets")
7159 (version "5.2.2")
7160 (source
7161 (origin
7162 (method url-fetch)
7163 (uri (pypi-uri "ipywidgets" version))
7164 (sha256
7165 (base32
7166 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7167 (build-system python-build-system)
7168 (propagated-inputs
7169 `(("python-ipython" ,python-ipython)
7170 ("python-traitlets" ,python-traitlets)
7171 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7172 (native-inputs
7173 `(("python-nose" ,python-nose)
7174 ("python-pytest" ,python-pytest)))
7175 (home-page "https://ipython.org")
7176 (synopsis "IPython HTML widgets for Jupyter")
7177 (description "Ipywidgets are interactive HTML widgets for Jupyter
7178notebooks and the IPython kernel. Notebooks come alive when interactive
7179widgets are used. Users gain control of their data and can visualize changes
7180in the data.")
7181 (license license:bsd-3)))
7182
7183(define-public python2-ipywidgets
7184 (package-with-python2 python-ipywidgets))
7185
7186(define-public python-jupyter-console
7187 (package
7188 (name "python-jupyter-console")
7189 (version "5.2.0")
7190 (source
7191 (origin
7192 (method url-fetch)
7193 (uri (pypi-uri "jupyter_console" version))
7194 (sha256
7195 (base32
7196 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
7197 (build-system python-build-system)
7198 ;; Tests only run in an TTY.
7199 (arguments `(#:tests? #f))
7200 (propagated-inputs
7201 `(("python-ipykernel" ,python-ipykernel)
7202 ("python-jupyter-client" ,python-jupyter-client)
7203 ("python-prompt-toolkit" ,python-prompt-toolkit-1)
7204 ("python-pygments" ,python-pygments)))
7205 (native-inputs
7206 `(("python-nose" ,python-nose)))
7207 (home-page "https://jupyter.org")
7208 (synopsis "Jupyter terminal console")
7209 (description "This package provides a terminal-based console frontend for
7210Jupyter kernels. It also allows for console-based interaction with non-Python
7211Jupyter kernels such as IJulia and IRKernel.")
7212 (license license:bsd-3)))
7213
7214(define-public python2-jupyter-console
7215 (package-with-python2 python-jupyter-console))
7216
7217;; The python-ipython and python-jupyter-console require each other. To get
7218;; the functionality in both packages working, strip down the
7219;; python-jupyter-console package when using it as an input to python-ipython.
7220(define python-jupyter-console-minimal
7221 (package
7222 (inherit python-jupyter-console)
7223 (name "python-jupyter-console-minimal")
7224 (arguments
7225 (substitute-keyword-arguments
7226 (package-arguments python-jupyter-console)
7227 ((#:phases phases)
7228 `(modify-phases ,phases
7229 (add-after 'install 'delete-bin
7230 (lambda* (#:key outputs #:allow-other-keys)
7231 ;; Delete the bin files, to avoid conflicts in profiles
7232 ;; where python-ipython and python-jupyter-console are
7233 ;; both present.
7234 (delete-file-recursively
7235 (string-append
7236 (assoc-ref outputs "out") "/bin"))))))))
7237 ;; Remove the python-ipython propagated input, to avoid the cycle
7238 (propagated-inputs
7239 (alist-delete
7240 "python-ipython"
7241 (package-propagated-inputs python-jupyter-console)))))
7242
7243(define-public python-qtconsole
7244 (package
7245 (name "python-qtconsole")
7246 (version "4.4.3")
7247 (source
7248 (origin
7249 (method url-fetch)
7250 (uri (pypi-uri "qtconsole" version))
7251 (sha256
7252 (base32
7253 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
7254 (build-system python-build-system)
7255 (arguments
7256 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
7257 ;; but we only have the LTS version 5.x. This means that there might be
7258 ;; runtime errors, but since this is a dependency of the Jupyter package,
7259 ;; and Jupyter can be used without the qtconsole we can overlook this for
7260 ;; now.
7261 `(#:tests? #f
7262 #:phases
7263 (modify-phases %standard-phases
7264 (add-before 'check 'pre-check
7265 (lambda _
7266 (setenv "QT_QPA_PLATFORM" "offscreen")
7267 #t)))))
7268 (propagated-inputs
7269 `(("python-ipykernel" ,python-ipykernel)
7270 ("python-ipython" ,python-ipython)))
7271 (native-inputs
7272 `(("python-pytest" ,python-pytest)))
7273 (home-page "http://jupyter.org")
7274 (synopsis "Jupyter Qt console")
7275 (description "This package provides a Qt-based console for Jupyter with
7276support for rich media output.")
7277 (license license:bsd-3)))
7278
7279(define-public jupyter
7280 (package
7281 (name "jupyter")
7282 (version "1.0.0")
7283 (source
7284 (origin
7285 (method url-fetch)
7286 (uri (pypi-uri "jupyter" version))
7287 (sha256
7288 (base32
7289 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
7290 (build-system python-build-system)
7291 (arguments '(#:tests? #f)) ; there are none.
7292 (propagated-inputs
7293 `(("python-ipykernel" ,python-ipykernel)
7294 ("python-ipywidgets" ,python-ipywidgets)
7295 ("python-jupyter-console" ,python-jupyter-console)
7296 ("python-nbconvert" ,python-nbconvert)
7297 ("python-notebook" ,python-notebook)
7298 ("python-qtconsole" ,python-qtconsole)))
7299 (native-search-paths
7300 (list (search-path-specification
7301 (variable "JUPYTER_PATH")
7302 (files '("share/jupyter")))))
7303 (home-page "https://jupyter.org")
7304 (synopsis "Web application for interactive documents")
7305 (description
7306 "The Jupyter Notebook is a web application that allows you to create and
7307share documents that contain live code, equations, visualizations and
7308explanatory text. Uses include: data cleaning and transformation, numerical
7309simulation, statistical modeling, machine learning and much more.")
7310 (license license:bsd-3)))
7311
7312(define-public python-chardet
7313 (package
7314 (name "python-chardet")
7315 (version "3.0.4")
7316 (source
7317 (origin
7318 (method url-fetch)
7319 (uri (pypi-uri "chardet" version))
7320 (sha256
7321 (base32
7322 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
7323 (native-inputs
7324 `(("python-hypothesis" ,python-hypothesis)
7325 ("python-pytest" ,python-pytest)
7326 ("python-pytest-runner" ,python-pytest-runner)))
7327 (build-system python-build-system)
7328 (home-page "https://github.com/chardet/chardet")
7329 (synopsis "Universal encoding detector for Python 2 and 3")
7330 (description
7331 "This package provides @code{chardet}, a Python module that can
7332automatically detect a wide range of file encodings.")
7333 (license license:lgpl2.1+)))
7334
7335(define-public python2-chardet
7336 (package-with-python2 python-chardet))
7337
7338(define-public python-docopt
7339 (package
7340 (name "python-docopt")
7341 (version "0.6.2")
7342 (source
7343 (origin
7344 (method url-fetch)
7345 ;; The release on PyPI does not include tests.
7346 (uri (string-append
7347 "https://github.com/docopt/docopt/archive/"
7348 version ".tar.gz"))
7349 (file-name (string-append name "-" version ".tar.gz"))
7350 (sha256
7351 (base32
7352 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
7353 (build-system python-build-system)
7354 (native-inputs
7355 `(("python-pytest" ,python-pytest)))
7356 (arguments
7357 `(#:phases
7358 (modify-phases %standard-phases
7359 (replace 'check
7360 (lambda _ (invoke "py.test"))))))
7361 (home-page "http://docopt.org")
7362 (synopsis "Command-line interface description language for Python")
7363 (description "This library allows the user to define a command-line
7364interface from a program's help message rather than specifying it
7365programatically with command-line parsers like @code{getopt} and
7366@code{argparse}.")
7367 (license license:expat)))
7368
7369(define-public python2-docopt
7370 (package-with-python2 python-docopt))
7371
7372(define-public python-pythondialog
7373 (package
7374 (name "python-pythondialog")
7375 (version "3.4.0")
7376 (source
7377 (origin
7378 (method url-fetch)
7379 (uri (pypi-uri "pythondialog" version))
7380 (sha256
7381 (base32
7382 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
7383 (build-system python-build-system)
7384 (arguments
7385 `(#:phases
7386 (modify-phases %standard-phases
7387 (add-after 'unpack 'patch-path
7388 (lambda* (#:key inputs #:allow-other-keys)
7389 (let* ((dialog (assoc-ref inputs "dialog")))
7390 ;; Since this library really wants to grovel the search path, we
7391 ;; must hardcode dialog's store path into it.
7392 (substitute* "dialog.py"
7393 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
7394 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
7395 #t))))
7396 #:tests? #f)) ; no test suite
7397 (propagated-inputs
7398 `(("dialog" ,dialog)))
7399 (home-page "http://pythondialog.sourceforge.net/")
7400 (synopsis "Python interface to the UNIX dialog utility")
7401 (description "A Python wrapper for the dialog utility. Its purpose is to
7402provide an easy to use, pythonic and comprehensive Python interface to dialog.
7403This allows one to make simple text-mode user interfaces on Unix-like systems")
7404 (license license:lgpl2.1)
7405 (properties `((python2-variant . ,(delay python2-pythondialog))))))
7406
7407(define-public python2-pythondialog
7408 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
7409 (package
7410 (inherit base)
7411 (version (package-version python-pythondialog))
7412 (source (origin
7413 (method url-fetch)
7414 (uri (pypi-uri "python2-pythondialog" version))
7415 (sha256
7416 (base32
7417 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
7418
7419(define-public python-configobj
7420 (package
7421 (name "python-configobj")
7422 (version "5.0.6")
7423 (source (origin
7424 (method url-fetch)
b0758fbb 7425 (uri (pypi-uri "configobj" version))
44d10b1f
RW
7426 (sha256
7427 (base32
7428 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
7429 ;; Patch setup.py so it looks for python-setuptools, which is
7430 ;; required to parse the keyword 'install_requires' in setup.py.
7431 (patches (search-patches "python-configobj-setuptools.patch"))))
7432 (build-system python-build-system)
7433 (propagated-inputs
7434 `(("python-six" ,python-six)))
7435 (synopsis "Config file reading, writing and validation")
7436 (description "ConfigObj is a simple but powerful config file reader and
7437writer: an ini file round tripper. Its main feature is that it is very easy to
7438use, with a straightforward programmer’s interface and a simple syntax for
7439config files.")
7440 (home-page "https://github.com/DiffSK/configobj")
7441 (license license:bsd-3)))
7442
7443(define-public python2-configobj
7444 (package-with-python2 python-configobj))
7445
7446(define-public python-configargparse
7447 (package
7448 (name "python-configargparse")
86ae491f 7449 (version "0.14.0")
44d10b1f
RW
7450 (source (origin
7451 (method url-fetch)
7452 (uri (pypi-uri "ConfigArgParse" version))
7453 (sha256
7454 (base32
86ae491f 7455 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
44d10b1f
RW
7456 (build-system python-build-system)
7457 (native-inputs
7458 `(("python-pyyaml" ,python-pyyaml)))
7459 (arguments
7460 `(#:phases
7461 (modify-phases %standard-phases
7462 (replace 'check
7463 (lambda _
7464 ;; Bypass setuptools-shim because one test relies on "setup.py"
7465 ;; being the first argument passed to the python call.
7466 ;;
7467 ;; NOTE: Many tests do not run because they rely on Python's
7468 ;; built-in test.test_argparse, but we remove the unit tests from
7469 ;; our Python installation.
7470 (invoke "python" "setup.py" "test"))))))
7471 (synopsis "Replacement for argparse")
7472 (description "A drop-in replacement for argparse that allows options to also
7473be set via config files and/or environment variables.")
7474 (home-page "https://github.com/bw2/ConfigArgParse")
7475 (license license:expat)))
7476
7477(define-public python2-configargparse
7478 (package-with-python2 python-configargparse))
7479
7480(define-public python-argparse-manpage
7481 (package
7482 (name "python-argparse-manpage")
7483 (version "1.1")
7484 (source
7485 (origin
7486 (method url-fetch)
7487 (uri (pypi-uri "argparse-manpage" version))
7488 (sha256
7489 (base32
7490 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
7491 (build-system python-build-system)
7492 (home-page "https://github.com/praiskup/argparse-manpage")
7493 (synopsis "Build manual page from Python's ArgumentParser object")
7494 (description
7495 "This package provides tools to build manual pages from Python's
7496@code{ArgumentParser} object.")
7497 (license license:asl2.0)))
7498
7499(define-public python2-contextlib2
7500 (package
7501 (name "python2-contextlib2")
7502 (version "0.5.5")
7503 (source
7504 (origin
7505 (method url-fetch)
7506 (uri (pypi-uri "contextlib2" version))
7507 (sha256
7508 (base32
7509 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
7510 (build-system python-build-system)
7511 (arguments
7512 `(#:python ,python-2
7513 #:phases
7514 (modify-phases %standard-phases
7515 (replace 'check
7516 (lambda _ (invoke "python" "test_contextlib2.py" "-v"))))))
7517 (native-inputs
7518 `(("python2-unittest2" ,python2-unittest2)))
7519 (home-page "http://contextlib2.readthedocs.org/")
7520 (synopsis "Tools for decorators and context managers")
7521 (description "This module is primarily a backport of the Python
75223.2 contextlib to earlier Python versions. Like contextlib, it
7523provides utilities for common tasks involving decorators and context
7524managers. It also contains additional features that are not part of
7525the standard library.")
7526 (license license:psfl)))
7527
7528(define-public python-texttable
7529 (package
7530 (name "python-texttable")
7531 (version "0.8.7")
7532 (source
7533 (origin
7534 (method url-fetch)
7535 (uri (pypi-uri "texttable" version))
7536 (sha256
7537 (base32
7538 "1liiiydgkg37i46a418aw19fyf6z3ds51wdwwpyjbs12x0phhf4a"))))
7539 (build-system python-build-system)
7540 (arguments '(#:tests? #f)) ; no tests
7541 (home-page "https://github.com/foutaise/texttable/")
7542 (synopsis "Python module for creating simple ASCII tables")
7543 (description "Texttable is a Python module for creating simple ASCII
7544tables.")
7545 (license license:lgpl2.1+)))
7546
7547(define-public python2-texttable
7548 (package-with-python2 python-texttable))
7549
7550(define-public python-atomicwrites
7551 (package
7552 (name "python-atomicwrites")
7553 (version "1.1.5")
7554 (source (origin
7555 (method url-fetch)
7556 (uri (pypi-uri "atomicwrites" version))
7557 (sha256
7558 (base32
7559 "11bm90fwm2avvf4f3ib8g925w7jr4m11vcsinn1bi6ns4bm32214"))))
7560 (build-system python-build-system)
7561 (synopsis "Atomic file writes in Python")
7562 (description "Library for atomic file writes using platform dependent tools
7563for atomic file system operations.")
7564 (home-page "https://github.com/untitaker/python-atomicwrites")
7565 (license license:expat)))
7566
7567(define-public python2-atomicwrites
7568 (package-with-python2 python-atomicwrites))
7569
7570(define-public python-click-threading
7571 (package
7572 (name "python-click-threading")
7573 (version "0.4.4")
7574 (source (origin
7575 (method url-fetch)
7576 (uri (pypi-uri "click-threading" version))
7577 (sha256
7578 (base32
7579 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
7580 (build-system python-build-system)
7581 (propagated-inputs
7582 `(("python-click" ,python-click)))
7583 (synopsis "Utilities for multithreading in Click")
7584 (description "This package provides utilities for multithreading in Click
7585applications.")
7586 (home-page "https://github.com/click-contrib/click-threading")
7587 (license license:expat)))
7588
7589(define-public python-click-log
7590 (package
7591 (name "python-click-log")
7592 (version "0.3.2")
7593 (source (origin
7594 (method url-fetch)
7595 (uri (pypi-uri "click-log" version))
7596 (sha256
7597 (base32
7598 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
7599 (build-system python-build-system)
7600 (propagated-inputs
7601 `(("python-click" ,python-click)))
7602 (synopsis "Logging for click applications")
7603 (description "This package provides a Python library for logging Click
7604applications.")
7605 (home-page "https://github.com/click-contrib/click-log")
7606 (license license:expat)))
7607
7608(define-public python-apipkg
7609 (package
7610 (name "python-apipkg")
7611 (version "1.4")
7612 (source (origin
7613 (method url-fetch)
7614 (uri (pypi-uri "apipkg" version))
7615 (sha256
7616 (base32
7617 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
7618 (build-system python-build-system)
7619 (native-inputs
7620 `(("python-pytest" ,python-pytest)))
7621 (synopsis "Namespace control and lazy-import mechanism")
7622 (description "With apipkg you can control the exported namespace of a Python
7623package and greatly reduce the number of imports for your users. It is a small
7624pure Python module that works on virtually all Python versions.")
7625 (home-page "https://github.com/pytest-dev/apipkg")
7626 (license license:expat)))
7627
7628(define-public python2-apipkg
7629 (package-with-python2 python-apipkg))
7630
7631(define-public python-execnet
7632 (package
7633 (name "python-execnet")
7634 (version "1.4.1")
7635 (source (origin
7636 (method url-fetch)
7637 (uri (pypi-uri "execnet" version))
7638 (sha256
7639 (base32
7640 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
7641 (build-system python-build-system)
7642 (arguments
7643 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
7644 ;; The two test failures are caused by the lack of an `ssh` executable.
7645 ;; The test suite can be run with pytest after the 'install' phase.
7646 #:tests? #f))
7647 (native-inputs
7648 `(("python-pytest" ,python-pytest)
7649 ("python-setuptools-scm" ,python-setuptools-scm)))
7650 (propagated-inputs
7651 `(("python-apipkg" ,python-apipkg)))
7652 (synopsis "Rapid multi-Python deployment")
7653 (description "Execnet provides a share-nothing model with
7654channel-send/receive communication for distributing execution across many
7655Python interpreters across version, platform and network barriers. It has a
7656minimal and fast API targeting the following uses:
7657@enumerate
7658@item distribute tasks to (many) local or remote CPUs
7659@item write and deploy hybrid multi-process applications
7660@item write scripts to administer multiple environments
7661@end enumerate")
7662 (home-page "http://codespeak.net/execnet/")
7663 (license license:expat)))
7664
7665(define-public python2-execnet
7666 (package-with-python2 python-execnet))
7667
7668(define-public python-icalendar
7669 (package
7670 (name "python-icalendar")
7671 (version "4.0.3")
7672 (source (origin
7673 (method url-fetch)
7674 (uri (pypi-uri "icalendar" version))
7675 (sha256
7676 (base32
7677 "0mk3dk1dxkcm46jy48v27j2w2349iv4sbimqj1yb5js43mx49hh7"))))
7678 (build-system python-build-system)
7679 (propagated-inputs
7680 `(("python-dateutil" ,python-dateutil)
7681 ("python-pytz" ,python-pytz)))
7682 (synopsis "Python library for parsing iCalendar files")
7683 (description "The icalendar package is a parser/generator of iCalendar
7684files for use with Python.")
7685 (home-page "https://github.com/collective/icalendar")
7686 (license license:bsd-2)))
7687
7688(define-public python-sphinxcontrib-newsfeed
7689 (package
7690 (name "python-sphinxcontrib-newsfeed")
7691 (version "0.1.4")
7692 (source (origin
7693 (method url-fetch)
7694 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
7695 (sha256
7696 (base32
7697 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
7698 (arguments '(#:tests? #f)) ; No tests.
7699 (build-system python-build-system)
7700 (propagated-inputs
7701 `(("python-sphinx" ,python-sphinx)))
7702 (synopsis "News Feed extension for Sphinx")
7703 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
7704Blog, News or Announcements section to a Sphinx website.")
7705 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
7706 (license license:bsd-2)))
7707
7708(define-public python-args
7709 (package
7710 (name "python-args")
7711 (version "0.1.0")
7712 (source (origin
7713 (method url-fetch)
7714 (uri (pypi-uri "args" version))
7715 (sha256
7716 (base32
7717 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
7718 (build-system python-build-system)
7719 (home-page "https://github.com/kennethreitz/args")
7720 (synopsis "Command-line argument parser")
7721 (description
7722 "This library provides a Python module to parse command-line arguments.")
7723 (license license:bsd-3)))
7724
7725(define-public python2-args
7726 (package-with-python2 python-args))
7727
7728(define-public python-clint
7729 (package
7730 (name "python-clint")
7731 (version "0.5.1")
7732 (source (origin
7733 (method url-fetch)
7734 (uri (pypi-uri "clint" version))
7735 (sha256
7736 (base32
7737 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
7738 (build-system python-build-system)
7739 (arguments
7740 '(#:phases
7741 (modify-phases %standard-phases
7742 (replace 'check
7743 (lambda _ (invoke "py.test" "-v"))))))
7744 (native-inputs
7745 `(("python-pytest" ,python-pytest)))
7746 (propagated-inputs
7747 `(("python-args" ,python-args)))
7748 (home-page "https://github.com/kennethreitz/clint")
7749 (synopsis "Command-line interface tools")
7750 (description
7751 "Clint is a Python module filled with a set of tools for developing
7752command-line applications, including tools for colored and indented
7753output, progress bar display, and pipes.")
7754 (license license:isc)))
7755
7756(define-public python2-clint
7757 (package-with-python2 python-clint))
7758
44d10b1f
RW
7759(define-public python-rply
7760 (package
7761 (name "python-rply")
7762 (version "0.7.5")
7763 (source (origin
7764 (method url-fetch)
7765 (uri (pypi-uri "rply" version))
7766 (sha256
7767 (base32
7768 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
7769 (build-system python-build-system)
7770 (propagated-inputs
7771 `(("python-appdirs" ,python-appdirs)))
7772 (home-page "https://github.com/alex/rply")
7773 (synopsis "Parser generator for Python")
7774 (description
7775 "This package provides a pure Python based parser generator, that also
7776works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
7777with a new public API, and RPython support.")
7778 (license license:bsd-3)))
7779
7780(define-public python2-rply
7781 (package-with-python2 python-rply))
7782
7783(define-public python-hy
7784 (package
7785 (name "python-hy")
7786 (version "0.13.0")
7787 (source (origin
7788 (method url-fetch)
7789 (uri (pypi-uri "hy" version))
7790 (sha256
7791 (base32
7792 "19sfymaksx9jhksfnb15ahid46mzrhdfzz6yy2craz2qnzvpmky8"))))
7793 (build-system python-build-system)
7794 (arguments
7795 '(#:phases
7796 (modify-phases %standard-phases
7797 (replace 'check
7798 (lambda _
7799 ;; Tests require write access to HOME.
7800 (setenv "HOME" "/tmp")
7801 (invoke "nosetests"))))))
7802 (native-inputs
7803 `(("python-coverage" ,python-coverage)
7804 ("python-nose" ,python-nose)))
7805 (propagated-inputs
7806 `(("python-astor" ,python-astor)
7807 ("python-clint" ,python-clint)
7808 ("python-rply" ,python-rply)))
7809 (home-page "http://hylang.org/")
7810 (synopsis "Lisp frontend to Python")
7811 (description
7812 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
7813its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
7814Python at your fingertips, in Lisp form.")
7815 (license license:expat)))
7816
7817(define-public python2-hy
7818 (package-with-python2 python-hy))
7819
7820(define-public python2-functools32
7821 (package
7822 (name "python2-functools32")
7823 (version "3.2.3-2")
7824 (source
7825 (origin
7826 (method url-fetch)
7827 (uri (pypi-uri "functools32" version))
7828 (sha256
7829 (base32
7830 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
7831 (build-system python-build-system)
7832 (arguments
7833 `(#:python ,python-2
7834 #:tests? #f)) ; no test target
7835 (home-page "https://github.com/MiCHiLU/python-functools32")
7836 (synopsis
7837 "Backport of the functools module from Python 3.2.3")
7838 (description
7839 "This package is a backport of the @code{functools} module from Python
78403.2.3 for use with older versions of Python and PyPy.")
7841 (license license:expat)))
7842
7843(define-public python2-subprocess32
7844 (package
7845 (name "python2-subprocess32")
7846 (version "3.2.7")
7847 (source (origin
7848 (method url-fetch)
7849 (uri (pypi-uri "subprocess32" version))
7850 (sha256
7851 (base32
7852 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
7853 (patches
7854 (search-patches "python2-subprocess32-disable-input-test.patch"))))
7855 (build-system python-build-system)
7856 (arguments
7857 `(#:python ,python-2
7858 ;; The test suite fails with Python > 2.7.13:
7859 ;; import test.support
7860 ;; ImportError: No module named support
7861 #:tests? #f
7862 #:phases
7863 (modify-phases %standard-phases
7864 (add-after 'unpack 'patch-/bin/sh
7865 (lambda _
7866 (substitute* '("subprocess32.py"
7867 "test_subprocess32.py")
7868 (("/bin/sh") (which "sh")))
7869 #t)))))
7870 (home-page "https://github.com/google/python-subprocess32")
7871 (synopsis "Backport of the subprocess module from Python 3.2")
7872 (description
7873 "This is a backport of the @code{subprocess} standard library module
7874from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
7875new features. On POSIX systems it is guaranteed to be reliable when used
7876in threaded applications. It includes timeout support from Python 3.3 but
7877otherwise matches 3.2’s API.")
7878 (license license:psfl)))
7879
7880(define-public python2-futures
7881 (package
7882 (name "python2-futures")
7883 (version "3.2.0")
7884 (source
7885 (origin
7886 (method url-fetch)
7887 (uri (pypi-uri "futures" version))
7888 (sha256
7889 (base32
7890 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
7891 (build-system python-build-system)
7892 (arguments `(#:python ,python-2
7893 ;; FIXME: Python 2.7.14 moved the test.support library,
7894 ;; but our package has not yet been adjusted. Enable
7895 ;; tests when the python2 package has been fixed.
7896 #:tests? #f))
7897 (home-page "https://github.com/agronholm/pythonfutures")
7898 (synopsis
7899 "Backport of the concurrent.futures package from Python 3.2")
7900 (description
7901 "The concurrent.futures module provides a high-level interface for
7902asynchronously executing callables. This package backports the
7903concurrent.futures package from Python 3.2")
7904 (license license:bsd-3)))
7905
7906(define-public python-promise
7907 (package
7908 (name "python-promise")
7909 (version "0.4.2")
7910 (source
7911 (origin
7912 (method url-fetch)
7913 (uri (pypi-uri "promise" version))
7914 (sha256
7915 (base32
7916 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
7917 (build-system python-build-system)
7918 ;; Tests wants python-futures, which is a python2 only program, and
7919 ;; can't be found by python-promise at test time.
7920 (arguments `(#:tests? #f))
7921 (home-page "https://github.com/syrusakbary/promise")
7922 (synopsis "Promises/A+ implementation for Python")
7923 (description
7924 "Promises/A+ implementation for Python")
7925 (properties `((python2-variant . ,(delay python2-promise))))
7926 (license license:expat)))
7927
7928(define-public python2-promise
7929 (let ((promise (package-with-python2
7930 (strip-python2-variant python-promise))))
7931 (package (inherit promise)
7932 (arguments (substitute-keyword-arguments (package-arguments promise)
7933 ((#:tests? _) #t)))
7934 (native-inputs
7935 `(("python2-futures" ,python2-futures)
7936 ("python2-pytest" ,python2-pytest)
7937 ,@(package-native-inputs promise))))))
7938
7939(define-public python-colorama
7940 (package
7941 (name "python-colorama")
7942 (version "0.3.9")
7943 (source
7944 (origin
7945 (method url-fetch)
7946 (uri (pypi-uri "colorama" version))
7947 (sha256
7948 (base32
7949 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
7950 (build-system python-build-system)
7951 (synopsis "Colored terminal text rendering for Python")
7952 (description "Colorama is a Python library for rendering colored terminal
7953text.")
7954 (home-page "https://pypi.python.org/pypi/colorama")
7955 (license license:bsd-3)))
7956
7957(define-public python2-colorama
7958 (package-with-python2 python-colorama))
7959
7960(define-public python-rsa
7961 (package
7962 (name "python-rsa")
7963 (version "3.4.2")
7964 (source
7965 (origin
7966 (method url-fetch)
7967 (uri (pypi-uri "rsa" version))
7968 (sha256
7969 (base32
7970 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
7971 (build-system python-build-system)
7972 (propagated-inputs
7973 `(("python-pyasn1" ,python-pyasn1)))
7974 (synopsis "Pure-Python RSA implementation")
7975 (description "Python-RSA is a pure-Python RSA implementation. It supports
7976encryption and decryption, signing and verifying signatures, and key
7977generation according to PKCS#1 version 1.5. It can be used as a Python
7978library as well as on the command line.")
7979 (home-page "https://stuvel.eu/rsa")
7980 (license license:asl2.0)))
7981
7982(define-public python2-rsa
7983 (package-with-python2 python-rsa))
7984
7985(define-public python-pluggy
7986 (package
7987 (name "python-pluggy")
7988 (version "0.7.1")
7989 (source
7990 (origin
7991 (method url-fetch)
7992 (uri (pypi-uri "pluggy" version))
7993 (sha256
7994 (base32
7995 "1qbn70mksmr03hac6jgp6fiqc4l7859z8dchx2x950vhlij87swm"))))
7996 (build-system python-build-system)
7997 (native-inputs
7998 `(("python-setuptools-scm" ,python-setuptools-scm)))
7999 (synopsis "Plugin and hook calling mechanism for Python")
8000 (description "Pluggy is an extraction of the plugin manager as used by
8001Pytest but stripped of Pytest specific details.")
8002 (home-page "https://pypi.python.org/pypi/pluggy")
8003 (license license:expat)))
8004
8005(define-public python2-pluggy
8006 (package-with-python2 python-pluggy))
8007
8008(define-public python-tox
8009 (package
8010 (name "python-tox")
8011 (version "2.8.1")
8012 (source
8013 (origin
8014 (method url-fetch)
8015 (uri (pypi-uri "tox" version))
8016 (sha256
8017 (base32
8018 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
8019 (build-system python-build-system)
8020 (arguments
8021 ;; FIXME: Tests require pytest-timeout, which itself requires
8022 ;; pytest>=2.8.0 for installation.
8023 '(#:tests? #f))
8024 (propagated-inputs
8025 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
8026 ("python-py" ,python-py)
8027 ("python-virtualenv" ,python-virtualenv)))
8028 (native-inputs
8029 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
8030 ("python-pytest" ,python-pytest) ; >= 2.3.5
8031 ("python-setuptools-scm" ,python-setuptools-scm)))
8032 (home-page "http://tox.testrun.org/")
8033 (synopsis "Virtualenv-based automation of test activities")
8034 (description "Tox is a generic virtualenv management and test command line
8035tool. It can be used to check that a package installs correctly with
8036different Python versions and interpreters, or run tests in each type of
8037supported environment, or act as a frontend to continuous integration
8038servers.")
8039 (license license:expat)))
8040
8041(define-public python2-tox
8042 (package-with-python2 python-tox))
8043
8044(define-public python-jmespath
8045 (package
8046 (name "python-jmespath")
8047 (version "0.9.3")
8048 (source
8049 (origin
8050 (method url-fetch)
8051 (uri (pypi-uri "jmespath" version))
8052 (sha256
8053 (base32
8054 "0r7wc7fsxmlwzxx9j1j7rms06c6xs6d4sysirdhz1jk2mb4x90ba"))))
8055 (build-system python-build-system)
8056 (native-inputs
8057 `(("python-nose" ,python-nose)))
8058 (synopsis "JSON Matching Expressions")
8059 (description "JMESPath (pronounced “james path”) is a Python library that
8060allows one to declaratively specify how to extract elements from a JSON
8061document.")
8062 (home-page "https://github.com/jmespath/jmespath.py")
8063 (license license:expat)))
8064
8065(define-public python2-jmespath
8066 (package-with-python2 python-jmespath))
8067
8068(define-public python-botocore
8069 (package
8070 (name "python-botocore")
8071 (version "1.8.43")
8072 (source
8073 (origin
8074 (method url-fetch)
8075 (uri (pypi-uri "botocore" version))
8076 (sha256
8077 (base32
8078 "12cqpbnz3vfv41mp9admvciw7bc7hz57sjpqs2bxaw9wnfmbw5lg"))))
8079 (build-system python-build-system)
8080 (arguments
8081 ;; FIXME: Many tests are failing.
8082 '(#:tests? #f))
8083 (propagated-inputs
8084 `(("python-dateutil" ,python-dateutil)
8085 ("python-docutils" ,python-docutils)
8086 ("python-jmespath" ,python-jmespath)))
8087 (native-inputs
8088 `(("python-mock" ,python-mock)
8089 ("python-nose" ,python-nose)
8090 ("behave" ,behave)
8091 ("python-tox" ,python-tox)
8092 ("python-wheel" ,python-wheel)))
8093 (home-page "https://github.com/boto/botocore")
8094 (synopsis "Low-level interface to AWS")
8095 (description "Botocore is a Python library that provides a low-level
8096interface to the Amazon Web Services (AWS) API.")
8097 (license license:asl2.0)))
8098
8099(define-public python2-botocore
8100 (package-with-python2 python-botocore))
8101
8102(define-public python-xdo
8103 (package
8104 (name "python-xdo")
8105 (version "0.3")
8106 (source (origin
8107 (method url-fetch)
8108 (uri (string-append
8109 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8110 "python-xdo_" version ".orig.tar.gz"))
8111 (sha256
8112 (base32
8113 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
8114 (build-system python-build-system)
8115 (arguments
8116 '(#:phases
8117 (modify-phases %standard-phases
8118 (add-before 'install 'patch-libxdo-path
8119 ;; Hardcode the path of dynamically loaded libxdo library.
8120 (lambda* (#:key inputs #:allow-other-keys)
8121 (let ((libxdo (string-append
8122 (assoc-ref inputs "xdotool")
8123 "/lib/libxdo.so")))
8124 (substitute* "xdo/_xdo.py"
8125 (("find_library\\(\"xdo\"\\)")
8126 (simple-format #f "\"~a\"" libxdo)))
8127 #t))))
8128 #:tests? #f)) ; no tests provided
8129 (propagated-inputs
8130 `(("python-six" ,python-six)))
8131 (inputs
8132 `(("xdotool" ,xdotool)
8133 ("libX11" ,libx11)))
8134 (home-page "https://tracker.debian.org/pkg/python-xdo")
8135 (synopsis "Python library for simulating X11 keyboard/mouse input")
8136 (description "Provides bindings to libxdo for manipulating X11 via simulated
8137input. (Note that this is mostly a legacy library; you may wish to look at
8138python-xdo for newer bindings.)")
8139 (license license:bsd-3)))
8140
8141(define-public python2-xdo
8142 (package-with-python2 python-xdo))
8143
8144(define-public python-mako
8145 (package
8146 (name "python-mako")
8147 (version "1.0.7")
8148 (source
8149 (origin
8150 (method url-fetch)
8151 (uri (pypi-uri "Mako" version))
8152 (sha256
8153 (base32
8154 "1bi5gnr8r8dva06qpyx4kgjc6spm2k1y908183nbbaylggjzs0jf"))))
8155 (build-system python-build-system)
8156 (propagated-inputs
8157 `(("python-markupsafe" ,python-markupsafe)))
8158 (native-inputs
8159 `(("python-mock" ,python-mock)
8160 ("python-nose" ,python-nose)
8161 ("python-pytest" ,python-pytest)))
7016e620 8162 (home-page "https://www.makotemplates.org/")
44d10b1f
RW
8163 (synopsis "Templating language for Python")
8164 (description "Mako is a templating language for Python that compiles
8165templates into Python modules.")
8166 (license license:expat)))
8167
8168(define-public python2-mako
8169 (package-with-python2 python-mako))
8170
8171(define-public python-waitress
8172 (package
8173 (name "python-waitress")
8174 (version "1.1.0")
8175 (source
8176 (origin
8177 (method url-fetch)
8178 (uri (pypi-uri "waitress" version))
8179 (patches (search-patches "python-waitress-fix-tests.patch"))
8180 (sha256
8181 (base32
8182 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
8183 (build-system python-build-system)
8184 (home-page "https://github.com/Pylons/waitress")
8185 (synopsis "Waitress WSGI server")
8186 (description "Waitress is meant to be a production-quality pure-Python WSGI
8187server with very acceptable performance.")
8188 (license license:zpl2.1)))
8189
8190(define-public python2-waitress
8191 (package-with-python2 python-waitress))
8192
8193(define-public python-pyquery
8194 (package
8195 (name "python-pyquery")
8196 (version "1.2.17")
8197 (source
8198 (origin
8199 (method url-fetch)
8200 (uri (pypi-uri "pyquery" version))
8201 (sha256
8202 (base32
8203 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
8204 (build-system python-build-system)
8205 (native-inputs
8206 `(("python-webob" ,python-webob)
8207 ("python-webtest" ,python-webtest)))
8208 (propagated-inputs
8209 `(("python-lxml" ,python-lxml)
8210 ("python-cssselect" ,python-cssselect)))
8211 (home-page "https://github.com/gawel/pyquery")
8212 (synopsis "Make jQuery-like queries on xml documents")
8213 (description "pyquery allows you to make jQuery queries on xml documents.
8214The API is as much as possible the similar to jQuery. pyquery uses lxml for
8215fast xml and html manipulation.")
8216 (license license:bsd-3)))
8217
44d10b1f
RW
8218(define-public python-anyjson
8219 (package
8220 (name "python-anyjson")
8221 (version "0.3.3")
8222 (source
8223 (origin
8224 (method url-fetch)
8225 (uri (pypi-uri "anyjson" version))
8226 (sha256
8227 (base32
8228 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
8229 (build-system python-build-system)
8230 (arguments
8231 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
8232 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
8233 ;; whatever) so this transformation needs to be done before the tests
8234 ;; can be run. Maybe we could add a build step to transform beforehand
8235 ;; but it could be annoying/difficult.
8236 ;; We can enable tests for the Python 2 version, though, and do below.
8237 #:tests? #f))
8238 (home-page "https://bitbucket.org/runeh/anyjson/")
8239 (synopsis
8240 "Wraps best available JSON implementation in a common interface")
8241 (description
8242 "Anyjson loads whichever is the fastest JSON module installed
8243and provides a uniform API regardless of which JSON implementation is used.")
8244 (license license:bsd-3)
8245 (properties `((python2-variant . ,(delay python2-anyjson))))))
8246
8247(define-public python2-anyjson
8248 (let ((anyjson (package-with-python2
8249 (strip-python2-variant python-anyjson))))
8250 (package
8251 (inherit anyjson)
8252 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
8253 #:tests? #t
8254 ,@(package-arguments anyjson)))
8255 (native-inputs `(("python2-nose" ,python2-nose))))))
8256
8257(define-public python-amqp
8258 (package
8259 (name "python-amqp")
8260 (version "2.3.2")
8261 (source
8262 (origin
8263 (method url-fetch)
8264 (uri (pypi-uri "amqp" version))
8265 (sha256
8266 (base32
8267 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
8268 (build-system python-build-system)
8269 (native-inputs
8270 `(("python-case" ,python-case)
8271 ("python-pytest-sugar" ,python-pytest-sugar)
8272 ("python-mock" ,python-mock)))
8273 (propagated-inputs
8274 `(("python-vine" ,python-vine)))
8275 (home-page "https://github.com/celery/py-amqp")
8276 (synopsis
8277 "Low-level AMQP client for Python (fork of amqplib)")
8278 (description
8279 "This is a fork of amqplib which was originally written by Barry Pederson.
8280It is maintained by the Celery project, and used by kombu as a pure python
8281alternative when librabbitmq is not available.")
8282 (license license:lgpl2.1+)
8283 (properties `((python2-variant . ,(delay python2-amqp))))))
8284
8285(define-public python2-amqp
8286 (let ((amqp (package-with-python2
8287 (strip-python2-variant python-amqp))))
8288 (package
8289 (inherit amqp)
8290 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
8291 ;; unmaintained. Weirdly, does not do this on the python 3
8292 ;; version?
8293 #:tests? #f
8294 ,@(package-arguments amqp))))))
8295
8296(define-public python-txamqp
8297 (package
8298 (name "python-txamqp")
8299 (version "0.8.2")
8300 (source
8301 (origin
8302 (method url-fetch)
8303 (uri (pypi-uri "txAMQP" version))
8304 (sha256
8305 (base32
8306 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
8307 (build-system python-build-system)
8308 (propagated-inputs
8309 `(("python-six" ,python-six)
8310 ("python-twisted" ,python-twisted)))
8311 (home-page "https://github.com/txamqp/txamqp")
8312 (synopsis "Communicate with AMQP peers and brokers using Twisted")
8313 (description
8314 "This package provides a Python library for communicating with AMQP peers
8315and brokers using the asynchronous networking framework Twisted. It contains
8316all the necessary code to connect, send and receive messages to/from an
8317AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
8318also includes support for using Thrift RPC over AMQP in Twisted
8319applications.")
8320 (license license:asl2.0)))
8321
8322(define-public python2-txamqp
8323 (package-with-python2 python-txamqp))
8324
8325(define-public python-kombu
8326 (package
8327 (name "python-kombu")
8328 (version "4.2.2")
8329 (source
8330 (origin
8331 (method url-fetch)
8332 (uri (pypi-uri "kombu" version))
8333 (sha256
8334 (base32
8335 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
8336 (build-system python-build-system)
8337 (native-inputs
8338 `(("python-mock" ,python-mock)
8339 ("python-case" ,python-case)
8340 ("python-pyro4" ,python-pyro4)
8341 ("python-pytest-sugar" ,python-pytest-sugar)
8342 ("python-pytz" ,python-pytz)))
8343 (propagated-inputs
8344 `(("python-anyjson" ,python-anyjson)
8345 ("python-amqp" ,python-amqp)
8346 ("python-redis" ,python-redis)))
8347 (home-page "https://kombu.readthedocs.io")
8348 (synopsis "Message passing library for Python")
8349 (description "The aim of Kombu is to make messaging in Python as easy as
8350possible by providing an idiomatic high-level interface for the AMQ protocol,
8351and also provide proven and tested solutions to common messaging problems.
8352AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
8353message orientation, queuing, routing, reliability and security, for which the
8354RabbitMQ messaging server is the most popular implementation.")
8355 (license license:bsd-3)
8356 (properties `((python2-variant . ,(delay python2-kombu))))))
8357
8358(define-public python2-kombu
8359 (let ((kombu (package-with-python2
8360 (strip-python2-variant python-kombu))))
8361 (package
8362 (inherit kombu)
8363 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
8364 ;; It works fine on the python3 variant.
8365 #:tests? #f
8366 ,@(package-arguments kombu)))
8367 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8368 ,@(package-native-inputs kombu))))))
8369
8370(define-public python-billiard
8371 (package
8372 (name "python-billiard")
8373 (version "3.5.0.5")
8374 (source
8375 (origin
8376 (method url-fetch)
8377 (uri (pypi-uri "billiard" version))
8378 (sha256
8379 (base32
8380 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
8381 (build-system python-build-system)
8382 (native-inputs
8383 `(("python-case" ,python-case)
8384 ("python-pytest" ,python-pytest)))
8385 (home-page "https://github.com/celery/billiard")
8386 (synopsis
8387 "Python multiprocessing fork with improvements and bugfixes")
8388 (description
8389 "Billiard is a fork of the Python 2.7 multiprocessing package. The
8390multiprocessing package itself is a renamed and updated version of R Oudkerk's
8391pyprocessing package. This standalone variant is intended to be compatible with
8392Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
8393 (license license:bsd-3)
8394 (properties `((python2-variant . ,(delay python2-billiard))))))
8395
8396(define-public python2-billiard
8397 (let ((billiard (package-with-python2
8398 (strip-python2-variant python-billiard))))
8399 (package
8400 (inherit billiard)
8401 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8402 ("python2-mock" ,python2-mock)
8403 ,@(package-native-inputs billiard))))))
8404
8405(define-public python-celery
8406 (package
8407 (name "python-celery")
8408 (version "4.2.1")
8409 (source
8410 (origin
8411 (method url-fetch)
8412 (uri (pypi-uri "celery" version))
8413 (sha256
8414 (base32
8415 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
8416 (build-system python-build-system)
8417 (arguments
8418 '(;; TODO The tests fail with Python 3.7
8419 ;; https://github.com/celery/celery/issues/4849
8420 #:tests? #f
8421 #:phases
8422 (modify-phases %standard-phases
8423 (add-after 'unpack 'patch-requirements
8424 (lambda _
8425 (substitute* "requirements/test.txt"
8426 (("pytest>=3\\.0,<3\\.3")
8427 "pytest>=3.0"))
8428 #t)))))
8429 (native-inputs
8430 `(("python-case" ,python-case)
8431 ("python-pytest" ,python-pytest)))
8432 (propagated-inputs
8433 `(("python-pytz" ,python-pytz)
8434 ("python-billiard" ,python-billiard)
8435 ("python-kombu" ,python-kombu)))
8436 (home-page "https://celeryproject.org")
8437 (synopsis "Distributed Task Queue")
8438 (description "Celery is an asynchronous task queue/job queue based on
8439distributed message passing. It is focused on real-time operation, but
8440supports scheduling as well. The execution units, called tasks, are executed
8441concurrently on a single or more worker servers using multiprocessing,
8442Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
8443synchronously (wait until ready).")
8444 (license license:bsd-3)
8445 (properties `((python2-variant . ,(delay python2-celery))))))
8446
8447(define-public python2-celery
8448 (let ((celery (package-with-python2
8449 (strip-python2-variant python-celery))))
8450 (package
8451 (inherit celery)
8452 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8453 ("python2-mock" ,python2-mock)
8454 ,@(package-native-inputs celery))))))
8455
8456(define-public python-translitcodec
8457 (package
8458 (name "python-translitcodec")
8459 (version "0.4.0")
8460 (source
8461 (origin
8462 (method url-fetch)
8463 (uri (pypi-uri "translitcodec" version))
8464 (sha256
8465 (base32
8466 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
8467 (build-system python-build-system)
8468 (arguments
8469 `(#:tests? #f)) ; no tests provided
8470 (home-page
8471 "https://github.com/claudep/translitcodec")
8472 (synopsis
8473 "Unicode to 8-bit charset transliteration codec")
8474 (description
8475 "This package contains codecs for transliterating ISO 10646 texts into
8476best-effort representations using smaller coded character sets (ASCII,
8477ISO 8859, etc.).")
8478 (license license:expat)))
8479
8480(define-public python2-translitcodec
8481 (package-with-python2 python-translitcodec))
8482
8483(define-public python-editor
8484 (package
8485 (name "python-editor")
8486 (version "0.5")
8487 (source
8488 (origin
8489 (method url-fetch)
8490 (uri (pypi-uri "python-editor" version))
8491 (sha256
8492 (base32
8493 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
8494 (build-system python-build-system)
8495 (home-page
8496 "https://github.com/fmoo/python-editor")
8497 (synopsis
8498 "Programmatically open an editor, capture the result")
8499 (description
8500 "python-editor is a library that provides the editor module for
8501programmatically interfacing with your system's $EDITOR.")
8502 (license license:asl2.0)))
8503
8504(define-public python2-editor
8505 (package-with-python2 python-editor))
8506
8507(define-public python-sphinxcontrib-programoutput
8508 (package
8509 (name "python-sphinxcontrib-programoutput")
8510 (version "0.10")
8511 (source (origin
8512 (method url-fetch)
8513 (uri (pypi-uri "sphinxcontrib-programoutput" version))
8514 (sha256
8515 (base32
8516 "153hhnlbx4688zj9wd64819ps5znc2jlyp5crkgzvn5hxgy99vpx"))))
8517 (build-system python-build-system)
8518 (arguments
8519 ;; FIXME: Many tests are failing and the upstream is gone.
8520 '(#:tests? #f))
8521 (propagated-inputs
8522 `(("python-sphinx" ,python-sphinx)))
8523 (synopsis "Sphinx extension to include program output")
8524 (description "A Sphinx extension to literally insert the output of arbitrary
8525commands into documents, helping you to keep your command examples up to date.")
8526 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
8527 (license license:bsd-2)))
8528
8529(define-public python2-sphinxcontrib-programoutput
8530 (package-with-python2 python-sphinxcontrib-programoutput))
8531
8532(define-public python-sphinx-repoze-autointerface
8533 (package
8534 (name "python-sphinx-repoze-autointerface")
8535 (version "0.8")
8536 (source (origin
8537 (method url-fetch)
8538 (uri (pypi-uri "repoze.sphinx.autointerface" version))
8539 (sha256
8540 (base32
8541 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
8542 (build-system python-build-system)
8543 (arguments '(#:tests? #f)) ; No tests.
8544 (propagated-inputs
8545 `(("python-sphinx" ,python-sphinx)
8546 ("python-zope-interface" ,python-zope-interface)))
8547 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
8548 (description "This package defines an extension for the Sphinx documentation
8549system. The extension allows generation of API documentation by
8550introspection of @code{zope.interface} instances in code.")
8551 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
8552 (license license:repoze)))
8553
8554(define-public python2-sphinx-repoze-autointerface
8555 (package-with-python2 python-sphinx-repoze-autointerface))
8556
8557(define-public python-vobject
8558 (package
8559 (name "python-vobject")
8560 (version "0.9.5")
8561 (source (origin
8562 (method url-fetch)
8563 (uri (pypi-uri "vobject" version))
8564 (sha256
8565 (base32
8566 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
8567 (build-system python-build-system)
8568 (arguments
8569 '(;; The test suite relies on some non-portable Windows interfaces.
8570 #:tests? #f))
8571 (propagated-inputs
8572 `(("python-dateutil" ,python-dateutil)
8573 ("python-pyicu" ,python-pyicu)))
8574 (synopsis "Parse and generate vCard and vCalendar files")
8575 (description "Vobject is intended to be a full featured Python package for
8576parsing and generating vCard and vCalendar files. Currently, iCalendar files
8577are supported and well tested. vCard 3.0 files are supported, and all data
8578should be imported, but only a few components are understood in a sophisticated
8579way.")
8580 (home-page "http://eventable.github.io/vobject/")
8581 (license license:asl2.0)))
8582
8583(define-public python2-vobject
8584 (package-with-python2 python-vobject))
8585
8586(define-public python-munkres
8587 (package
8588 (name "python-munkres")
8589 (version "1.0.8")
8590 (source (origin
8591 (method url-fetch)
8592 (uri (pypi-uri "munkres" version))
8593 (sha256
8594 (base32
8595 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
8596 (build-system python-build-system)
8597 (arguments
8598 '(#:tests? #f)) ; no test suite
8599 (home-page "http://software.clapper.org/munkres/")
8600 (synopsis "Implementation of the Munkres algorithm")
8601 (description "The Munkres module provides an implementation of the Munkres
8602algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
8603useful for solving the Assignment Problem.")
8604 (license license:bsd-3)))
8605
8606(define-public python2-munkres
8607 (package-with-python2 python-munkres))
8608
8609(define-public python-whoosh
8610 (package
8611 (name "python-whoosh")
8612 (version "2.7.4")
8613 (source
8614 (origin
8615 (method url-fetch)
8616 (uri (pypi-uri "Whoosh" version))
8617 (sha256
8618 (base32
8619 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
8620 (build-system python-build-system)
8621 (native-inputs
8622 `(("python-pytest" ,python-pytest)))
8623 (home-page "https://bitbucket.org/mchaput/whoosh")
8624 (synopsis "Full text indexing, search, and spell checking library")
8625 (description
8626 "Whoosh is a fast, pure-Python full text indexing, search, and spell
8627checking library.")
8628 (license license:bsd-2)))
8629
8630(define-public python2-whoosh
8631 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
8632 (package (inherit whoosh)
8633 (propagated-inputs
8634 `(("python2-backport-ssl-match-hostname"
8635 ,python2-backport-ssl-match-hostname)
8636 ,@(package-propagated-inputs whoosh))))))
8637
8638(define-public python-pathlib
8639 (package
8640 (name "python-pathlib")
8641 (version "1.0.1")
8642 (source (origin
8643 (method url-fetch)
8644 (uri (pypi-uri "pathlib" version))
8645 (sha256
8646 (base32
8647 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
8648 (build-system python-build-system)
8649 ;; The tests depend on the internal "test" module, which does not provide
8650 ;; a stable interface.
8651 (arguments `(#:tests? #f))
8652 (home-page "https://pathlib.readthedocs.org/")
8653 (synopsis "Object-oriented file system paths")
8654 (description "Pathlib offers a set of classes to handle file system paths.
8655It offers the following advantages over using string objects:
8656
8657@enumerate
8658@item No more cumbersome use of os and os.path functions. Everything can
8659be done easily through operators, attribute accesses, and method calls.
8660@item Embodies the semantics of different path types. For example,
8661comparing Windows paths ignores casing.
8662@item Well-defined semantics, eliminating any inconsistencies or
8663ambiguities (forward vs. backward slashes, etc.).
8664@end enumerate
8665
8666Note: In Python 3.4, pathlib is now part of the standard library. For other
8667Python versions please consider python-pathlib2 instead, which tracks the
8668standard library module. This module (python-pathlib) isn't maintained
8669anymore.")
8670 (license license:expat)))
8671
8672(define-public python2-pathlib
8673 (package-with-python2 python-pathlib))
8674
8675(define-public python2-pathlib2
8676 (package
8677 (name "python2-pathlib2")
8678 (version "2.3.2")
8679 (source (origin
8680 (method url-fetch)
8681 (uri (pypi-uri "pathlib2" version))
8682 (sha256
8683 (base32
8684 "10yb0iv5x2hs631rcppkhbddx799d3h8pcwmkbh2a66ns3w71ccf"))))
8685 (build-system python-build-system)
8686 ;; We only need the the Python 2 variant, since for Python 3 our minimum
8687 ;; version is 3.4 which already includes this package as part of the
8688 ;; standard library.
8689 (arguments
8690 `(#:python ,python-2))
8691 (propagated-inputs
8692 `(("python2-scandir" ,python2-scandir)
8693 ("python2-six" ,python2-six)))
8694 (home-page "https://pypi.python.org/pypi/pathlib2/")
8695 (synopsis "Object-oriented file system paths - backport of standard
8696pathlib module")
8697 (description "The goal of pathlib2 is to provide a backport of standard
8698pathlib module which tracks the standard library module, so all the newest
8699features of the standard pathlib can be used also on older Python versions.
8700
8701Pathlib offers a set of classes to handle file system paths. It offers the
8702following advantages over using string objects:
8703
8704@enumerate
8705@item No more cumbersome use of os and os.path functions. Everything can
8706be done easily through operators, attribute accesses, and method calls.
8707@item Embodies the semantics of different path types. For example,
8708comparing Windows paths ignores casing.
8709@item Well-defined semantics, eliminating any inconsistencies or
8710ambiguities (forward vs. backward slashes, etc.).
8711@end enumerate")
8712 (license license:expat)))
8713
8714(define-public python2-pathlib2-bootstrap
8715 (hidden-package
8716 (package
8717 (inherit python2-pathlib2)
8718 (name "python2-pathlib2-bootstrap")
8719 (propagated-inputs
8720 `(("python2-scandir" ,python2-scandir)
8721 ("python2-six" ,python2-six-bootstrap))))))
8722
8723(define-public python-jellyfish
8724 (package
8725 (name "python-jellyfish")
8726 (version "0.5.6")
8727 (source (origin
8728 (method url-fetch)
8729 (uri (pypi-uri "jellyfish" version))
8730 (sha256
8731 (base32
8732 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
8733 (build-system python-build-system)
8734 (native-inputs
8735 `(("python-pytest" ,python-pytest)))
8736 (home-page "https://github.com/jamesturk/jellyfish")
8737 (synopsis "Approximate and phonetic matching of strings")
8738 (description "Jellyfish uses a variety of string comparison and phonetic
8739encoding algorithms to do fuzzy string matching.")
8740 (license license:bsd-2)
8741 (properties `((python2-variant . ,(delay python2-jellyfish))))))
8742
8743(define-public python2-jellyfish
8744 (let ((jellyfish (package-with-python2
8745 (strip-python2-variant python-jellyfish))))
8746 (package (inherit jellyfish)
8747 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
8748 ,@(package-native-inputs jellyfish))))))
8749
8750(define-public python2-unicodecsv
8751 (package
8752 (name "python2-unicodecsv")
8753 (version "0.14.1")
8754 (source (origin
8755 (method url-fetch)
8756 ;; The test suite is not included in the PyPi release.
8757 ;; https://github.com/jdunck/python-unicodecsv/issues/19
8758 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
8759 "archive/" version ".tar.gz"))
8760 (file-name (string-append name "-" version ".tar.gz"))
8761 (sha256
8762 (base32
8763 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
8764 (build-system python-build-system)
8765 (arguments
8766 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
8767 #:python ,python-2))
8768 (native-inputs
8769 `(("python2-unittest2" ,python2-unittest2)))
8770 (home-page "https://github.com/jdunck/python-unicodecsv")
8771 (synopsis "Unicode CSV module for Python 2")
8772 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
8773module, adding support for Unicode strings.")
8774 (license license:bsd-2)))
8775
8776(define-public python-rarfile
8777 (package
8778 (name "python-rarfile")
8779 (version "2.8")
8780 (source (origin
8781 (method url-fetch)
8782 (uri (pypi-uri "rarfile" version))
8783 (sha256
8784 (base32
8785 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
8786 (build-system python-build-system)
8787 (arguments
8788 '(#:phases
8789 (modify-phases %standard-phases
8790 (replace 'check
8791 ;; Many tests fail, but the installation proceeds.
e59dd341 8792 (lambda _ (invoke "make" "-C" "test" "test"))))))
44d10b1f
RW
8793 (native-inputs
8794 `(("which" ,which))) ; required for tests
8795 (propagated-inputs
8796 `(("libarchive" ,libarchive)))
8797 (home-page "https://github.com/markokr/rarfile")
8798 (synopsis "RAR archive reader for Python")
8799 (description "This is Python module for RAR archive reading. The interface
8800is made as zipfile like as possible.")
8801 (license license:isc)))
8802
8803(define-public python2-rarfile
8804 (package-with-python2 python-rarfile))
8805
8806(define-public python-magic
8807 (package
8808 (name "python-magic")
8809 (version "0.4.15")
8810 (source
8811 (origin
8812 (method url-fetch)
8813 (uri (pypi-uri "python-magic" version))
8814 (sha256
8815 (base32
8816 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
8817 (file-name (string-append name "-" version "-checkout"))))
8818 (build-system python-build-system)
8819 (arguments
8820 ;; The tests are unreliable, so don't run them. The tests fail
8821 ;; under Python3 because they were written for Python2 and
8822 ;; contain import statements that do not work in Python3. One of
8823 ;; the tests fails under Python2 because its assertions are
8824 ;; overly stringent; it relies on comparing output strings which
8825 ;; are brittle and can change depending on the version of
8826 ;; libmagic being used and the system on which the test is
8827 ;; running. In my case, under GuixSD 0.10.0, only one test
8828 ;; failed, and it seems to have failed only because the version
8829 ;; of libmagic that is packaged in Guix outputs a slightly
8830 ;; different (but not wrong) string than the one that the test
8831 ;; expected.
8832 '(#:tests? #f
8833 #:phases (modify-phases %standard-phases
8834 ;; Replace a specific method call with a hard-coded
8835 ;; path to the necessary libmagic.so file in the
8836 ;; store. If we don't do this, then the method call
8837 ;; will fail to find the libmagic.so file, which in
8838 ;; turn will cause any application using
8839 ;; python-magic to fail.
8840 (add-before 'build 'hard-code-path-to-libmagic
8841 (lambda* (#:key inputs #:allow-other-keys)
8842 (let ((file (assoc-ref inputs "file")))
8843 (substitute* "magic.py"
8844 (("ctypes.util.find_library\\('magic'\\)")
8845 (string-append "'" file "/lib/libmagic.so'")))
8846 #t)))
8847 (add-before 'install 'disable-egg-compression
8848 (lambda _
8849 (let ((port (open-file "setup.cfg" "a")))
8850 (display "\n[easy_install]\nzip_ok = 0\n"
8851 port)
8852 (close-port port)
8853 #t))))))
8854 (inputs
8855 ;; python-magic needs to be able to find libmagic.so.
8856 `(("file" ,file)))
8857 (home-page
8858 "https://github.com/ahupp/python-magic")
8859 (synopsis
8860 "File type identification using libmagic")
8861 (description
8862 "This module uses ctypes to access the libmagic file type
8863identification library. It makes use of the local magic database and
8864supports both textual and MIME-type output. Note that this module and
8865the python-file module both provide a \"magic.py\" file; these two
8866modules, which are different and were developed separately, both serve
8867the same purpose: to provide Python bindings for libmagic.")
8868 (license license:expat)))
8869
8870(define-public python2-magic
8871 (package-with-python2 python-magic))
8872
8873(define-public python2-s3cmd
8874 (package
8875 (name "python2-s3cmd")
8876 (version "1.6.1")
8877 (source
8878 (origin
8879 (method url-fetch)
8880 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
8881 "s3cmd-" version ".tar.gz"))
8882 (sha256
8883 (base32
8884 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
8885 (build-system python-build-system)
8886 (arguments
8887 ;; s3cmd is written for python2 only and contains no tests.
8888 `(#:python ,python-2
8889 #:tests? #f))
8890 (propagated-inputs
8891 `(("python2-dateutil" ,python2-dateutil)
8892 ;; The python-file package also provides a magic.py module.
8893 ;; This is an unfortunate state of affairs; however, s3cmd
8894 ;; fails to install if it cannot find specifically the
8895 ;; python-magic package. Thus we include it, instead of using
8896 ;; python-file. Ironically, s3cmd sometimes works better
8897 ;; without libmagic bindings at all:
8898 ;; https://github.com/s3tools/s3cmd/issues/198
8899 ("python2-magic" ,python2-magic)))
8900 (home-page "http://s3tools.org/s3cmd")
8901 (synopsis "Command line tool for S3-compatible storage services")
8902 (description
8903 "S3cmd is a command line tool for uploading, retrieving and managing data
8904in storage services that are compatible with the Amazon Simple Storage
8905Service (S3) protocol, including S3 itself. It supports rsync-like backup,
8906GnuPG encryption, and more. It also supports management of Amazon's
8907CloudFront content delivery network.")
8908 (license license:gpl2+)))
8909
8910(define-public python-pkgconfig
8911 (package
8912 (name "python-pkgconfig")
8913 (version "1.3.1")
8914 (source
8915 (origin
8916 (method url-fetch)
8917 (uri (pypi-uri "pkgconfig" version))
8918 (sha256
8919 (base32
8920 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
8921 (build-system python-build-system)
8922 (native-inputs
8923 `(("python-nose" ,python-nose)))
8924 (inputs
8925 `(("pkg-config" ,pkg-config)))
8926 (arguments
8927 `(#:phases
8928 (modify-phases %standard-phases
8929 (add-before 'build 'patch
8930 ;; Hard-code the path to pkg-config.
8931 (lambda _
8932 (substitute* "pkgconfig/pkgconfig.py"
8933 (("cmd = 'pkg-config")
8934 (string-append "cmd = '" (which "pkg-config"))))
8935 #t))
8936 (replace 'check
8937 (lambda _
8938 (invoke "nosetests" "test.py"))))))
8939 (home-page "https://github.com/matze/pkgconfig")
8940 (synopsis "Python interface for pkg-config")
8941 (description "This module provides a Python interface to pkg-config. It
8942can be used to find all pkg-config packages, check if a package exists,
8943check if a package meets certain version requirements, query CFLAGS and
8944LDFLAGS and parse the output to build extensions with setup.py.")
8945 (license license:expat)))
8946
8947(define-public python2-pkgconfig
8948 (package-with-python2 python-pkgconfig))
8949
8950(define-public python-bz2file
8951 (package
8952 (name "python-bz2file")
8953 (version "0.98")
8954 (source
8955 (origin
8956 (method url-fetch)
8957 (uri (pypi-uri "bz2file" version))
8958 (sha256
8959 (base32
8960 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
8961 (build-system python-build-system)
8962 (arguments
8963 `(#:tests? #f)) ; Tests use deprecated python modules.
8964 (home-page "https://github.com/nvawda/bz2file")
8965 (synopsis "Read and write bzip2-compressed files")
8966 (description
8967 "Bz2file is a Python library for reading and writing bzip2-compressed
8968files. It contains a drop-in replacement for the I/O interface in the
8969standard library's @code{bz2} module, including features from the latest
8970development version of CPython that are not available in older releases.")
8971 (license license:asl2.0)))
8972
8973(define-public python2-bz2file
8974 (package-with-python2 python-bz2file))
8975
8976(define-public python-future
8977 (package
8978 (name "python-future")
8979 (version "0.16.0")
8980 (source
8981 (origin
8982 (method url-fetch)
8983 (uri (pypi-uri "future" version))
8984 (sha256
8985 (base32
8986 "1nzy1k4m9966sikp0qka7lirh8sqrsyainyf8rk97db7nwdfv773"))))
8987 (build-system python-build-system)
8988 ;; Many tests connect to the network or are otherwise flawed.
8989 ;; https://github.com/PythonCharmers/python-future/issues/210
8990 (arguments
8991 `(#:tests? #f))
8992 (home-page "http://python-future.org")
8993 (synopsis "Single-source support for Python 3 and 2")
8994 (description
8995 "@code{python-future} is the missing compatibility layer between Python 2 and
8996Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
8997to support both Python 2 and Python 3 with minimal overhead.")
8998 (license license:expat)))
8999
9000(define-public python2-future
9001 (package-with-python2 python-future))
9002
9003(define-public python-cysignals
9004 (package
9005 (name "python-cysignals")
8e3e51df 9006 (version "1.9.0")
44d10b1f
RW
9007 (source
9008 (origin
9009 (method url-fetch)
8e3e51df 9010 (uri (pypi-uri "cysignals" version))
44d10b1f
RW
9011 (sha256
9012 (base32
8e3e51df 9013 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
44d10b1f
RW
9014 (build-system python-build-system)
9015 (native-inputs
9016 `(("python-cython" ,python-cython)
9017 ("python-sphinx" ,python-sphinx)))
9018 (inputs
9019 `(("pari-gp" ,pari-gp)))
9020 (arguments
9021 `(#:modules ((guix build python-build-system)
9022 ((guix build gnu-build-system) #:prefix gnu:)
9023 (guix build utils))
9024 ;; FIXME: Tests are executed after installation and currently fail
9025 ;; when not installing into standard locations; the author is working
9026 ;; on a fix.
9027 #:tests? #f
9028 #:phases
9029 (modify-phases %standard-phases
9030 (add-before
9031 'build 'configure
9032 (assoc-ref gnu:%standard-phases 'configure)))))
9033 (home-page
9034 "https://github.com/sagemath/cysignals")
9035 (synopsis
9036 "Handling of interrupts and signals for Cython")
9037 (description
9038 "The cysignals package provides mechanisms to handle interrupts (and
9039other signals and errors) in Cython code, using two related approaches,
9040for mixed Cython/Python code or external C libraries and pure Cython code,
9041respectively.")
9042 (license license:lgpl3+)))
9043
9044(define-public python2-cysignals
9045 (package-with-python2 python-cysignals))
9046
9047(define-public python2-shedskin
9048 (package
9049 (name "python2-shedskin")
9050 (version "0.9.4")
9051 (source
9052 (origin
9053 (method url-fetch)
9054 (uri (string-append "https://github.com/shedskin/shedskin/"
9055 "releases/download/v" version
9056 "/shedskin-" version ".tgz"))
9057 (sha256
9058 (base32
9059 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9060 (build-system python-build-system)
9061 (arguments
9062 `(#:python ,python-2
9063 #:phases (modify-phases %standard-phases
9064 (add-after 'unpack 'fix-resulting-include-libs
9065 (lambda* (#:key inputs #:allow-other-keys)
9066 (let ((libgc (assoc-ref inputs "libgc"))
9067 (pcre (assoc-ref inputs "pcre")))
9068 (substitute* "shedskin/makefile.py"
9069 (("variable == 'CCFLAGS':[ ]*")
9070 (string-append "variable == 'CCFLAGS':\n"
9071 " line += ' -I " pcre "/include"
9072 " -I " libgc "/include'"))
9073 (("variable == 'LFLAGS':[ ]*")
9074 (string-append "variable == 'LFLAGS':\n"
9075 " line += ' -L" pcre "/lib"
9076 " -L " libgc "/lib'")))
9077 #t))))))
9078 (inputs `(("pcre" ,pcre)
9079 ("libgc" ,libgc)))
9080 (home-page "https://shedskin.github.io/")
9081 (synopsis "Experimental Python-2 to C++ Compiler")
9082 (description (string-append "This is an experimental compiler for a subset of
9083Python. It generates C++ code and a Makefile."))
9084 (license (list license:gpl3 license:bsd-3 license:expat))))
9085
9086(define-public python2-rope
9087 (package
9088 (name "python2-rope")
a9ba0a31 9089 (version "0.11.0")
44d10b1f
RW
9090 (source
9091 (origin
9092 (method url-fetch)
9093 (uri (pypi-uri "rope" version))
9094 (sha256
9095 (base32
a9ba0a31 9096 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
44d10b1f 9097 (arguments
afb29715 9098 ;; Rope has only partial python3 support, see `python-rope'
44d10b1f
RW
9099 `(#:python ,python-2))
9100 (build-system python-build-system)
9101 (native-inputs
9102 `(("python2-unittest2" ,python2-unittest2)))
9103 (home-page "https://github.com/python-rope/rope")
9104 (synopsis "Refactoring library for Python")
9105 (description "Rope is a refactoring library for Python. It facilitates
9106the renaming, moving and extracting of attributes, functions, modules, fields
9107and parameters in Python 2 source code. These refactorings can also be applied
9108to occurrences in strings and comments.")
9109 (license license:gpl2)))
9110
2c880ef4
LC
9111(define-public python-rope
9112 (package
9113 (inherit python2-rope)
9114 (name "python-rope")
9115 (arguments `(#:python ,python-wrapper
9116 ;; XXX: Only partial python3 support, results in some failing
9117 ;; tests: <https://github.com/python-rope/rope/issues/247>.
9118 #:tests? #f))
9119 (properties `((python2-variant . ,(delay python2-rope))))))
9120
44d10b1f
RW
9121(define-public python-py3status
9122 (package
9123 (name "python-py3status")
77f3d303 9124 (version "3.16")
44d10b1f
RW
9125 (source
9126 (origin
9127 (method url-fetch)
9128 (uri (pypi-uri "py3status" version))
9129 (sha256
9130 (base32
77f3d303 9131 "1xrfph277bgjln3jbpzpgkhxad04fjvj7s3xfil42q1sxi4s3q3g"))))
44d10b1f
RW
9132 (build-system python-build-system)
9133 (inputs
9134 `(("file" ,file)))
9135 (arguments
9136 '(#:phases
9137 (modify-phases %standard-phases
9138 ;; 'file' is used for detection of configuration file encoding
9139 ;; let's make link the dependency to particular input
9140 (add-before 'build 'patch-file-path
9141 (lambda* (#:key inputs #:allow-other-keys)
9142 (let ((file-path (assoc-ref inputs "file")))
9143 (substitute* "py3status/parse_config.py"
9144 (("\\['file', '-b'")
9145 (string-append "['" file-path "/bin/file', '-b'")))
9146 #t))))
9147 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
9148 (home-page "https://github.com/ultrabug/py3status")
9149 (synopsis "Extensible i3status wrapper written in Python")
9150 (description "py3status is an i3status wrapper which extends i3status
9151functionality in a modular way, allowing you to extend your panel with your
9152own code, responding to click events and updating clock every second.")
9153 (license license:bsd-3)))
9154
9155(define-public python-tblib
9156 (package
9157 (name "python-tblib")
9158 (version "1.3.2")
9159 (source (origin
9160 (method url-fetch)
9161 (uri (pypi-uri "tblib" version))
9162 (sha256 (base32
9163 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
9164 (build-system python-build-system)
9165 (arguments
9166 `(#:phases
9167 (modify-phases %standard-phases
9168 (add-before 'check 'adjust-tests
9169 (lambda _
9170 (when (which "python3")
9171 ;; Adjust the example output to match that of Python 3.7:
9172 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
9173 (substitute* "README.rst"
9174 (("Exception\\('fail',") "Exception('fail'"))
9175 #t)))
9176 (replace 'check
9177 (lambda _
9178 ;; Upstream runs tests after installation and the package itself
9179 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
9180 ;; found.
9181 (setenv "PYTHONPATH"
9182 (string-append (getcwd) "/build/lib:"
9183 (getenv "PYTHONPATH")))
9184 (invoke "py.test" "-vv" "tests" "README.rst"))))))
9185 (native-inputs
9186 `(("python-pytest" ,python-pytest)
9187 ("python-six" ,python-six)))
9188 (home-page "https://github.com/ionelmc/python-tblib")
9189 (synopsis "Traceback serialization library")
9190 (description
9191 "Traceback serialization allows you to:
9192
9193@enumerate
9194@item Pickle tracebacks and raise exceptions with pickled tracebacks in
9195different processes. This allows better error handling when running code over
9196multiple processes (imagine multiprocessing, billiard, futures, celery etc).
9197
9198@item Parse traceback strings and raise with the parsed tracebacks.
9199@end enumerate\n")
9200 (license license:bsd-3)))
9201
9202(define-public python2-tblib
9203 (package-with-python2 python-tblib))
9204
9205(define-public python-greenlet
9206 (package
9207 (name "python-greenlet")
9208 (version "0.4.15")
9209 (source (origin
9210 (method url-fetch)
9211 (uri (pypi-uri "greenlet" version))
9212 (sha256
9213 (base32
9214 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
9215 (build-system python-build-system)
9216 (home-page "https://greenlet.readthedocs.io/")
9217 (synopsis "Lightweight in-process concurrent programming")
9218 (description
9219 "Greenlet package is a spin-off of Stackless, a version of CPython
9220that supports micro-threads called \"tasklets\". Tasklets run
9221pseudo-concurrently (typically in a single or a few OS-level threads) and
9222are synchronized with data exchanges on \"channels\".")
9223 (license (list license:psfl license:expat))))
9224
9225(define-public python2-greenlet
9226 (package-with-python2 python-greenlet))
9227
9228(define-public python-objgraph
9229 (package
9230 (name "python-objgraph")
9231 (version "3.4.0")
9232 (source
9233 (origin
9234 (method url-fetch)
9235 (uri (pypi-uri "objgraph" version))
9236 (sha256
9237 (base32
9238 "184m09am5gpbqfaiy7l0hwh476mczbrly1dffs0rw2p1d1i2q32a"))))
9239 (build-system python-build-system)
9240 (propagated-inputs
9241 `(("python-graphviz" ,python-graphviz)))
9242 (native-inputs
9243 `(("python-mock" ,python-mock)
9244 ("graphviz" ,graphviz)))
9245 (home-page "https://mg.pov.lt/objgraph/")
9246 (synopsis "Draw Python object reference graphs with graphviz")
9247 (description
9248 "This package provides tools to draw Python object reference graphs with
9249graphviz.")
9250 (license license:expat)))
9251
9252(define-public python-gevent
9253 (package
9254 (name "python-gevent")
9255 (version "1.3.7")
9256 (source (origin
9257 (method url-fetch)
9258 (uri (pypi-uri "gevent" version))
9259 (sha256
9260 (base32
9261 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
9262 (modules '((guix build utils)))
9263 (snippet
9264 '(begin
9265 ;; unbunding libev and c-ares
9266 (delete-file-recursively "deps")
9267 #t))))
9268 (build-system python-build-system)
9269 (arguments
9270 `(#:modules ((ice-9 ftw)
9271 (ice-9 match)
9272 (srfi srfi-26)
9273 (guix build utils)
9274 (guix build python-build-system))
9275 #:phases (modify-phases %standard-phases
9276 (add-after 'unpack 'unpack-libev
9277 (lambda* (#:key inputs #:allow-other-keys)
9278 (mkdir-p "deps/libev")
9279 ;; FIXME: gevent requires building libev, even though
9280 ;; it only links against the proper one.
9281 (invoke "tar" "-xf" (assoc-ref inputs "libev-source")
9282 "--strip-components=1" "-C" "deps/libev")))
9283 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
9284 (lambda _
9285 (substitute* "src/gevent/subprocess.py"
9286 (("/bin/sh") (which "sh")))
9287 (for-each (lambda (file)
9288 (substitute* file
9289 (("/bin/sh") (which "sh"))
9290 (("/bin/true") (which "true"))))
9291 (find-files "src/greentest" "\\.py$"))
9292 #t))
9293 (add-before 'build 'do-not-use-bundled-sources
9294 (lambda* (#:key inputs #:allow-other-keys)
9295 (setenv "CONFIG_SHELL" (which "bash"))
9296 (setenv "LIBEV_EMBED" "false")
9297 (setenv "CARES_EMBED" "false")
9298 (setenv "EMBED" "false")
9299
9300 (let ((greenlet (string-append
9301 (assoc-ref inputs "python-greenlet")
9302 "/include")))
9303 (match (scandir greenlet
9304 (lambda (item)
9305 (string-prefix? "python" item)))
9306 ((python)
9307 (setenv "CPATH"
9308 (string-append greenlet "/" python)))))
9309 #t))
9310 (add-before 'check 'skip-timer-test
9311 (lambda _
9312 ;; XXX: Skip 'TestTimerResolution', which appears to be
9313 ;; unreliable.
9314 (substitute* "src/greentest/test__core_timer.py"
9315 (("not greentest.RUNNING_ON_CI") "False"))
9316 #t))
9317 (replace 'check
9318 (lambda _
9319 ;; Make sure the build directory is on PYTHONPATH.
9320 (setenv "PYTHONPATH"
9321 (string-append
9322 (getenv "PYTHONPATH") ":"
9323 (getcwd) "/build/"
9324 (car (scandir "build" (cut string-prefix? "lib." <>)))))
9325 (with-directory-excursion "src/greentest"
9326 ;; XXX: Many tests require network access. Instead we only
9327 ;; run known-good tests. Unfortunately we cannot use
9328 ;; recursion here since this directory also contains
9329 ;; Python-version-specific subfolders.
9330 (apply invoke "python" "testrunner.py" "--config"
9331 "known_failures.py"
9332 (scandir "." (cut regexp-exec
9333 (make-regexp "test_+(subprocess|core)")
9334 <>)))))))))
9335 (propagated-inputs
9336 `(("python-greenlet" ,python-greenlet)
9337 ("python-objgraph" ,python-objgraph)))
9338 (native-inputs
9339 `(("libev-source" ,(package-source libev))
9340 ("python-six" ,python-six)))
9341 (inputs
9342 `(("c-ares" ,c-ares)
9343 ("libev" ,libev)))
9344 (home-page "http://www.gevent.org/")
9345 (synopsis "Coroutine-based network library")
9346 (description
9347 "gevent is a coroutine-based Python networking library that uses greenlet
9348to provide a high-level synchronous API on top of the libev event loop.")
9349 (license license:expat)
9350 (properties `((python2-variant . ,(delay python2-gevent))))))
9351
9352(define-public python2-gevent
9353 (let ((base (package-with-python2
9354 (strip-python2-variant python-gevent))))
9355 (package
9356 (inherit base)
9357 (native-inputs `(,@(package-native-inputs python-gevent)
9358 ("python-mock" ,python2-mock))))))
9359
9360(define-public python-fastimport
9361 (package
9362 (name "python-fastimport")
9363 (version "0.9.6")
9364 (source
9365 (origin
9366 (method url-fetch)
9367 (uri (pypi-uri "fastimport" version))
9368 (sha256
9369 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
9370 (build-system python-build-system)
9371 (home-page "https://github.com/jelmer/python-fastimport")
9372 (synopsis "VCS fastimport parser and generator in Python")
9373 (description "This package provides a parser for and generator of the Git
9374@url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
9375format.")
9376 (license license:gpl2+)))
9377
9378(define-public python2-fastimport
9379 (package-with-python2 python-fastimport))
9380
9381(define-public python-twisted
9382 (package
9383 (name "python-twisted")
e5ba2fe3 9384 (version "17.5.0")
44d10b1f
RW
9385 (source (origin
9386 (method url-fetch)
9387 (uri (pypi-uri "Twisted" version ".tar.bz2"))
9388 (sha256
9389 (base32
e5ba2fe3 9390 "1sh2h23nnizcdyrl2rn7zxijglikxwz7z7grqpvq496zy2aa967i"))))
44d10b1f
RW
9391 (build-system python-build-system)
9392 (arguments
9393 '(#:tests? #f)) ; FIXME: Some tests are failing.
9394 ;; #:phases
9395 ;; (modify-phases %standard-phases
9396 ;; (replace 'check
9397 ;; (lambda _
9398 ;; (zero? (system* "./bin/trial" "twisted")))))
9399 (propagated-inputs
9400 `(("python-zope-interface" ,python-zope-interface)
9401 ("python-incremental" ,python-incremental)
e5ba2fe3 9402 ("python-hyperlink" ,python-hyperlink)
44d10b1f
RW
9403 ("python-constantly" ,python-constantly)
9404 ("python-automat" ,python-automat)))
9405 (home-page "https://twistedmatrix.com/")
9406 (synopsis "Asynchronous networking framework written in Python")
9407 (description
9408 "Twisted is an extensible framework for Python programming, with special
9409focus on event-based network programming and multiprotocol integration.")
9410 (license license:expat)))
9411
9412(define-public python2-twisted
9413 (package-with-python2 python-twisted))
9414
9415(define-public python-pika
9416 (package
9417 (name "python-pika")
9418 (version "0.12.0")
9419 (source
9420 (origin
9421 (method url-fetch)
9422 (uri (pypi-uri "pika" version))
9423 (sha256
9424 (base32
9425 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
9426 (build-system python-build-system)
9427 (native-inputs
9428 `(("python-pyev" ,python-pyev)
9429 ("python-tornado" ,python-tornado)
9430 ("python-twisted" ,python-twisted)))
9431 (home-page "https://pika.readthedocs.org")
9432 (synopsis "Pure Python AMQP Client Library")
9433 (description
9434 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
9435Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
9436network support library.")
9437 (license license:bsd-3)))
9438
9439(define-public python2-pika
9440 (package-with-python2 python-pika))
9441
9442(define-public python-ply
9443 (package
9444 (name "python-ply")
9445 (version "3.10")
9446 (source
9447 (origin
9448 (method url-fetch)
9449 (uri (pypi-uri "ply" version))
9450 (sha256
9451 (base32
9452 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
9453 (build-system python-build-system)
9454 (home-page "http://www.dabeaz.com/ply/")
9455 (synopsis "Python Lex & Yacc")
9456 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
9457It uses LR parsing and does extensive error checking.")
9458 (license license:bsd-3)))
9459
9460(define-public python2-ply
9461 (package-with-python2 python-ply))
9462
9463(define-public python-tabulate
9464 (package
9465 (name "python-tabulate")
9466 (version "0.7.7")
9467 (source (origin
9468 (method url-fetch)
9469 (uri (pypi-uri "tabulate" version))
9470 (sha256
9471 (base32
9472 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
9473 (build-system python-build-system)
9474 (arguments
9475 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
9476 ;; and the latest release is not tagged in the upstream repository.
9477 '(#:tests? #f))
9478 (home-page "https://bitbucket.org/astanin/python-tabulate")
9479 (synopsis "Pretty-print tabular data")
9480 (description
9481 "Tabulate is a library and command-line utility to pretty-print tabular
9482data in Python.")
9483 (license license:expat)))
9484
9485(define-public python2-tabulate
9486 (package-with-python2 python-tabulate))
9487
9488(define-public python-kazoo
9489 (package
9490 (name "python-kazoo")
9491 (version "2.4.0")
9492 (source
9493 (origin
9494 (method url-fetch)
9495 (uri (pypi-uri "kazoo" version))
9496 (sha256
9497 (base32
9498 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
9499 (build-system python-build-system)
9500 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
9501 (propagated-inputs
9502 `(("python-six" ,python-six)))
9503 (home-page "https://kazoo.readthedocs.org")
9504 (synopsis "High-level Zookeeper client library")
9505 (description
9506 "Kazoo is a Python client library for the Apache Zookeeper distributed
9507application service. It is designed to be easy to use and to avoid common
9508programming errors.")
9509 (license license:asl2.0)))
9510
9511(define-public python2-kazoo
9512 (package-with-python2 python-kazoo))
9513
9514(define-public python-pykafka
9515 (package
9516 (name "python-pykafka")
9517 (version "2.4.0")
9518 (source (origin
9519 (method url-fetch)
0ca1d040 9520 (uri (pypi-uri "pykafka" version))
44d10b1f
RW
9521 (sha256
9522 (base32
9523 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
9524 (build-system python-build-system)
9525 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
9526 (propagated-inputs
9527 `(("python-gevent" ,python-gevent)
9528 ("python-kazoo" ,python-kazoo)
9529 ("python-tabulate" ,python-tabulate)))
9530 (inputs
9531 `(("librdkafka" ,librdkafka)))
9532 (home-page "https://pykafka.readthedocs.io/")
9533 (synopsis "Apache Kafka client for Python")
9534 (description
9535 "PyKafka is a client for the Apache Kafka distributed messaging system.
9536It includes Python implementations of Kafka producers and consumers, which
9537are optionally backed by a C extension built on librdkafka.")
9538 (license license:asl2.0)))
9539
9540(define-public python2-pykafka
9541 (package-with-python2 python-pykafka))
9542
9543(define-public python-wcwidth
9544 (package
9545 (name "python-wcwidth")
9546 (version "0.1.7")
9547 (source
9548 (origin
9549 (method url-fetch)
9550 (uri (pypi-uri "wcwidth" version))
9551 (sha256
9552 (base32
9553 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
9554 (build-system python-build-system)
9555 (home-page "https://github.com/jquast/wcwidth")
9556 (synopsis "Measure number of terminal column cells of wide-character codes")
9557 (description "Wcwidth measures the number of terminal column cells of
9558wide-character codes. It is useful for those implementing a terminal emulator,
9559or programs that carefully produce output to be interpreted by one. It is a
9560Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
9561specified in POSIX.1-2001 and POSIX.1-2008.")
9562 (license license:expat)))
9563
9564(define-public python2-wcwidth
9565 (package-with-python2 python-wcwidth))
9566
9567(define-public python2-jsonrpclib
9568 (package
9569 (name "python2-jsonrpclib")
9570 (version "0.1.7")
9571 (source (origin
9572 (method url-fetch)
6571bba0 9573 (uri (pypi-uri "jsonrpclib" version))
44d10b1f
RW
9574 (sha256
9575 (base32
9576 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
9577 (build-system python-build-system)
9578 (arguments
9579 `(#:tests? #f
9580 #:python ,python-2))
9581 (home-page "https://github.com/joshmarshall/jsonrpclib/")
9582 (synopsis "Implementation of JSON-RPC specification for Python")
9583 (description
9584 "This library is an implementation of the JSON-RPC specification.
9585It supports both the original 1.0 specification, as well as the
9586new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
9587etc.")
9588 (license license:asl2.0)))
9589
9590(define-public python-chai
9591 (package
9592 (name "python-chai")
9593 (version "1.1.2")
9594 (source (origin
9595 (method url-fetch)
9596 (uri (pypi-uri "chai" version))
9597 (sha256
9598 (base32
9599 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
9600 (build-system python-build-system)
9601 (home-page "https://github.com/agoragames/chai")
9602 (synopsis "Mocking framework for Python")
9603 (description
9604 "Chai provides an api for mocking, stubbing and spying your python
9605objects, patterned after the Mocha library for Ruby.")
9606 (license license:bsd-3)))
9607
9608(define-public python2-chai
9609 (package-with-python2 python-chai))
9610
9611(define-public python-inflection
9612 (package
9613 (name "python-inflection")
9614 (version "0.3.1")
9615 (source
9616 (origin (method url-fetch)
9617 (uri (pypi-uri "inflection" version))
9618 (sha256
9619 (base32
9620 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
9621 (build-system python-build-system)
9622 (native-inputs
9623 `(("python-pytest" ,python-pytest)))
9624 (home-page "https://github.com/jpvanhal/inflection")
9625 (synopsis "Python string transformation library")
9626 (description
9627 "Inflection is a string transformation library. It singularizes
9628and pluralizes English words, and transforms strings from CamelCase to
9629underscored string.")
9630 (license license:expat)))
9631
9632(define-public python2-inflection
9633 (package-with-python2 python-inflection))
9634
9635(define-public python-pylev
9636 (package
9637 (name "python-pylev")
9638 (version "1.3.0")
9639 (source (origin
9640 (method url-fetch)
9641 (uri (pypi-uri "pylev" version))
9642 (sha256
9643 (base32
9644 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
9645 (build-system python-build-system)
9646 (home-page "https://github.com/toastdriven/pylev")
9647 (synopsis "Levenshtein distance implementation in Python")
9648 (description "Pure Python Levenshtein implementation, based off the
9649Wikipedia code samples at
9650@url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
9651 (license license:bsd-3)))
9652
9653(define-public python2-pylev
9654 (package-with-python2 python-pylev))
9655
9656(define-public python-cleo
9657 (package
9658 (name "python-cleo")
9659 (version "0.6.1")
9660 (source (origin
9661 (method url-fetch)
9662 (uri (pypi-uri "cleo" version))
9663 (sha256
9664 (base32
9665 "0q1cf0szr0d54am4pypzwdnm74zpladdsinad94c2fz5i06fdpf7"))))
9666 (build-system python-build-system)
9667 (native-inputs
9668 `(;; For testing
9669 ("python-mock" ,python-mock)
9670 ("python-pytest-mock" ,python-pytest-mock)
9671 ("python-pytest" ,python-pytest)))
9672 (propagated-inputs
9673 `(("python-backpack" ,python-backpack)
9674 ("python-pastel" ,python-pastel)
9675 ("python-pylev" ,python-pylev)))
9676 (home-page "https://github.com/sdispater/cleo")
9677 (synopsis "Command-line arguments library for Python")
9678 (description
9679 "Cleo allows you to create command-line commands with signature in
9680docstring and colored output.")
9681 (license license:expat)))
9682
9683(define-public python2-cleo
9684 (package-with-python2 python-cleo))
9685
9686(define-public python-lazy-object-proxy
9687 (package
9688 (name "python-lazy-object-proxy")
9689 (version "1.3.1")
9690 (source (origin
9691 (method url-fetch)
9692 (uri (pypi-uri "lazy-object-proxy" version))
9693 (sha256
9694 (base32
9695 "0yha7q9bhw857fwaby785d63mffhngl9npwzlk9i0pwlkwvbx4gb"))))
9696 (build-system python-build-system)
9697 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
9698 (synopsis "Lazy object proxy for python")
9699 (description
9700 "Lazy object proxy is an object that wraps a callable but defers the call
9701until the object is actually required, and caches the result of said call.")
9702 (license license:bsd-2)))
9703
9704(define-public python2-lazy-object-proxy
9705 (package-with-python2 python-lazy-object-proxy))
9706
9707(define-public python-dnspython
9708 (package
9709 (name "python-dnspython")
9710 (version "1.15.0")
9711 (source (origin
9712 (method url-fetch)
9713 (uri (string-append "http://www.dnspython.org/kits/"
9714 version "/dnspython-" version ".tar.gz"))
9715 (sha256
9716 (base32
9717 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
9718 (build-system python-build-system)
9719 (arguments '(#:tests? #f)) ; XXX: requires internet access
9720 (home-page "http://www.dnspython.org")
9721 (synopsis "DNS toolkit for Python")
9722 (description
9723 "dnspython is a DNS toolkit for Python. It supports almost all record
9724types. It can be used for queries, zone transfers, and dynamic updates.
9725It supports TSIG authenticated messages and EDNS0.")
9726 (license license:expat)))
9727
9728(define-public python2-dnspython
9729 (package-with-python2 python-dnspython))
9730
9731(define-public python-email-validator
9732 (package
9733 (name "python-email-validator")
9734 (version "1.0.2")
9735 (source
9736 (origin (method url-fetch)
9737 (uri (pypi-uri "email_validator" version))
9738 (sha256
9739 (base32
9740 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
9741 (build-system python-build-system)
9742 (arguments
9743 '(#:phases
9744 (modify-phases %standard-phases
9745 (add-before 'build 'use-dnspython
9746 (lambda _
9747 (substitute* "setup.py"
9748 (("dnspython3") "dnspython"))
9749 #t)))))
9750 (propagated-inputs
9751 `(("python-dnspython" ,python-dnspython)
9752 ("python-idna" ,python-idna)))
9753 (home-page "https://github.com/JoshData/python-email-validator")
9754 (synopsis "Email address validation library for Python")
9755 (description
9756 "This library validates email address syntax and deliverability.")
9757 (license license:cc0)))
9758
9759(define-public python2-email-validator
9760 (package-with-python2 python-email-validator))
9761
9762(define-public python-ukpostcodeparser
9763 (package
9764 (name "python-ukpostcodeparser")
9765 (version "1.0.3")
9766 (source (origin
9767 (method url-fetch)
9768 (uri (pypi-uri "UkPostcodeParser" version))
9769 (sha256
9770 (base32
9771 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
9772 (build-system python-build-system)
9773 (home-page "https://github.com/hamstah/ukpostcodeparser")
9774 (synopsis "UK Postcode parser for Python")
9775 (description
9776 "This library provides the @code{parse_uk_postcode} function for
9777parsing UK postcodes.")
9778 (license license:expat)))
9779
9780(define-public python2-ukpostcodeparser
9781 (package-with-python2 python-ukpostcodeparser))
9782
9783(define-public python-faker
9784 (package
9785 (name "python-faker")
9786 (version "0.7.9")
9787 (source (origin
9788 (method url-fetch)
9789 (uri (pypi-uri "Faker" version))
9790 (sha256
9791 (base32
9792 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
9793 (patches
9794 (search-patches "python-faker-fix-build-32bit.patch"))
9795 (modules '((guix build utils)))
9796 (snippet
9797 '(begin
9798 (for-each delete-file (find-files "." "\\.pyc$"))
9799 #t))))
9800 (build-system python-build-system)
9801 (arguments
9802 '(#:phases
9803 (modify-phases %standard-phases
9804 (replace 'check
49ff8827 9805 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
44d10b1f
RW
9806 (native-inputs
9807 `(;; For testing
9808 ("python-email-validator" ,python-email-validator)
9809 ("python-mock" ,python-mock)
9810 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
9811 (propagated-inputs
9812 `(("python-dateutil" ,python-dateutil)
9813 ("python-six" ,python-six)))
9814 (home-page "https://github.com/joke2k/faker")
9815 (synopsis "Python package that generates fake data")
9816 (description
9817 "Faker is a Python package that generates fake data such as names,
9818addresses, and phone numbers.")
9819 (license license:expat)
9820 (properties `((python2-variant . ,(delay python2-faker))))))
9821
9822(define-public python2-faker
9823 (let ((base (package-with-python2 (strip-python2-variant
9824 python-faker))))
9825 (package
9826 (inherit base)
9827 (propagated-inputs
9828 `(("python2-ipaddress" ,python2-ipaddress)
9829 ,@(package-propagated-inputs base))))))
9830
9831(define-public python-pyaml
9832 (package
9833 (name "python-pyaml")
9834 (version "18.11.0")
9835 (source (origin
9836 (method url-fetch)
9837 (uri (pypi-uri "pyaml" version))
9838 (sha256
9839 (base32
9840 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
9841 (build-system python-build-system)
9842 (native-inputs
9843 `(("python-unidecode" ,python-unidecode)))
9844 (propagated-inputs
9845 `(("python-pyyaml" ,python-pyyaml)))
9846 (home-page "https://github.com/mk-fg/pretty-yaml")
9847 (synopsis "YAML pretty-print library for Python")
9848 (description
9849 "pyaml is a PyYAML based python module to produce pretty and readable
9850YAML-serialized data.")
9851 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
9852
9853(define-public python2-pyaml
9854 (package-with-python2 python-pyaml))
9855
9856(define-public python-backpack
9857 (package
9858 (name "python-backpack")
9859 (version "0.1")
9860 (source
9861 (origin
9862 (method url-fetch)
9863 (uri (pypi-uri "backpack" version))
9864 (sha256
9865 (base32
9866 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
9867 (build-system python-build-system)
9868 (native-inputs
9869 `(("python-pytest" ,python-pytest)
9870 ("python-nose" ,python-nose)))
9871 (propagated-inputs
9872 `(("python-simplejson" ,python-simplejson)))
9873 (home-page "https://github.com/sdispater/backpack")
9874 (synopsis "Utilities for working with Python collections")
9875 (description "Backpack provides some useful utilities for working with
9876collections of data.")
9877 (license license:expat)))
9878
9879(define-public python2-backpack
9880 (package-with-python2 python-backpack))
9881
9882(define-public python-prompt-toolkit
9883 (package
9884 (name "python-prompt-toolkit")
9885 (version "2.0.7")
9886 (source
9887 (origin
9888 (method url-fetch)
9889 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
9890 (sha256
9891 (base32
9892 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
9893 (build-system python-build-system)
9894 (arguments
9895 `(#:phases
9896 (modify-phases %standard-phases
9897 (delete 'check)
9898 (add-after 'install 'post-install-check
9899 (lambda* (#:key inputs outputs #:allow-other-keys)
9900 ;; HOME is needed for the test
9901 ;; "test_pathcompleter_can_expanduser".
9902 (setenv "HOME" "/tmp")
9903 (add-installed-pythonpath inputs outputs)
9904 (invoke "py.test"))))))
9905 (propagated-inputs
9906 `(("python-wcwidth" ,python-wcwidth)
9907 ("python-six" ,python-six)
9908 ("python-pygments" ,python-pygments)))
9909 (native-inputs
9910 `(("python-pytest" ,python-pytest)))
9911 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
9912 (synopsis "Library for building command line interfaces in Python")
9913 (description
9914 "Prompt-Toolkit is a library for building interactive command line
9915interfaces in Python. It's like GNU Readline but it also features syntax
9916highlighting while typing, out-of-the-box multi-line input editing, advanced
9917code completion, incremental search, support for Chinese double-width
9918characters, mouse support, and auto suggestions.")
9919 (license license:bsd-3)))
9920
9921(define-public python2-prompt-toolkit
9922 (package-with-python2 python-prompt-toolkit))
9923
9924(define-public python-prompt-toolkit-1
9925 (package (inherit python-prompt-toolkit)
9926 (version "1.0.15")
9927 (source
9928 (origin
9929 (method url-fetch)
9930 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
9931 (sha256
9932 (base32
9933 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
9934
9935(define-public python2-prompt-toolkit-1
9936 (package-with-python2 python-prompt-toolkit-1))
9937
9938(define-public python-jedi
9939 (package
9940 (name "python-jedi")
40bd0aa3 9941 (version "0.13.2")
44d10b1f
RW
9942 (source
9943 (origin
9944 (method url-fetch)
9945 (uri (pypi-uri "jedi" version))
9946 (sha256
9947 (base32
40bd0aa3 9948 "1za944msp0f8x36qa8l309jhv0kzlsdh7r9nj3z12y8npnsh45sp"))))
44d10b1f
RW
9949 (build-system python-build-system)
9950 (arguments
40bd0aa3 9951 `( ;; Many tests are failing with Python 3.7.x as of version 0.13.2 (see:
44d10b1f
RW
9952 ;; https://github.com/davidhalter/jedi/issues/1263)
9953 #:tests? #f
9954 #:phases
9955 (modify-phases %standard-phases
9956 (replace 'check
9957 (lambda* (#:key tests? #:allow-other-keys)
9958 (when tests?
9959 (invoke "py.test" "-vv")))))))
9960 (native-inputs
9961 `(("python-pytest" ,python-pytest)
9962 ("python-docopt" ,python-docopt)))
9963 (propagated-inputs
9964 `(("python-parso" ,python-parso)))
9965 (home-page "https://github.com/davidhalter/jedi")
9966 (synopsis "Autocompletion and static analysis library for Python")
9967 (description
9968 "Jedi is a static analysis tool for Python that can be used in Integrated
9969Development Environments (@dfn{IDE}s) and text editors. It understands Python
9970on a deeper level than many other static analysis frameworks for Python.
9971
9972Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
9973well.")
9974 (license license:expat)))
9975
9976(define-public python2-jedi
9977 (package-with-python2 python-jedi))
9978
9979(define-public ptpython
9980 (package
9981 (name "ptpython")
9982 (version "0.34")
9983 (source (origin
9984 (method url-fetch)
9985 (uri (pypi-uri "ptpython" version))
9986 (sha256
9987 (base32
9988 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
9989 (build-system python-build-system)
9990 (arguments
9991 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
9992 (propagated-inputs
9993 `(("python-docopt" ,python-docopt)
9994 ("python-jedi" ,python-jedi)
9995 ("python-prompt-toolkit" ,python-prompt-toolkit)
9996 ("python-pygments" ,python-pygments)))
9997 (home-page "https://github.com/jonathanslenders/ptpython")
9998 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
9999 (description
10000 "ptpython is a Python read-eval-print loop with IDE-like features.
10001It supports syntax highlighting, multiline editing, autocompletion, mouse,
10002color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10003etc.")
10004 (license license:bsd-3)
10005 (properties `((python2-variant . ,(delay ptpython-2))))))
10006
10007(define-public ptpython-2
10008 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10009 (package
10010 (inherit base)
10011 (name "ptpython2"))))
10012
10013(define-public python-stem
10014 (package
10015 (name "python-stem")
10016 (version "1.7.0")
10017 (source
10018 (origin
10019 (method url-fetch)
10020 (uri (pypi-uri "stem" version))
10021 (sha256
10022 (base32
10023 "1awiglfiajnx2hva9aqpj3fmdvdb4qg7cwnlfyih827m68y3cq8v"))))
10024 (build-system python-build-system)
10025 (arguments
10026 `(#:phases
10027 (modify-phases %standard-phases
10028 (replace 'check
10029 (lambda _
10030 (invoke "./run_tests.py" "--unit")
10031 #t)))))
10032 (native-inputs
10033 `(("python-mock" ,python-mock)
10034 ("python-pycodestyle" ,python-pycodestyle)
10035 ("python-pyflakes" ,python-pyflakes)))
10036 (home-page "https://stem.torproject.org/")
10037 (synopsis
10038 "Python controller library that allows applications to interact with Tor")
10039 (description
10040 "Stem is a Python controller library for Tor. With it you can use Tor's
10041control protocol to script against the Tor process and read descriptor data
10042relays publish about themselves.")
10043 (license license:lgpl3)))
10044
10045(define-public python2-stem
10046 (package-with-python2 python-stem))
10047
10048(define-public python-pyserial
10049 (package
10050 (name "python-pyserial")
10051 (version "3.1.1")
10052 (source
10053 (origin
10054 (method url-fetch)
10055 (uri (pypi-uri "pyserial" version))
10056 (sha256
10057 (base32
10058 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
10059 (build-system python-build-system)
10060 (arguments
10061 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
10062 ;; #:phases
10063 ;; (modify-phases %standard-phases
10064 ;; (replace 'check
10065 ;; (lambda _
10066 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
10067 (home-page
10068 "https://github.com/pyserial/pyserial")
10069 (synopsis "Python Serial Port Bindings")
10070 (description "@code{pyserial} provide serial port bindings for Python. It
10071supports different byte sizes, stop bits, parity and flow control with RTS/CTS
10072and/or Xon/Xoff. The port is accessed in RAW mode.")
10073 (license license:bsd-3)))
10074
10075(define-public python2-pyserial
10076 (package-with-python2 python-pyserial))
10077
10078(define-public python-kivy
10079 (package
10080 (name "python-kivy")
10081 (version "1.10.1")
10082 (source
10083 (origin
10084 (method url-fetch)
10085 (uri (pypi-uri "Kivy" version))
10086 (file-name (string-append name "-" version ".tar.gz"))
10087 (sha256
10088 (base32
10089 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
10090 (build-system python-build-system)
10091 (arguments
10092 `(#:tests? #f ; Tests require many optional packages
10093 #:phases
10094 (modify-phases %standard-phases
10095 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
10096 (lambda* (#:key inputs #:allow-other-keys)
10097 (setenv "KIVY_SDL2_PATH"
10098 (string-append (assoc-ref inputs "sdl-union")
10099 "/include/SDL2"))
10100 #t)))))
10101 (native-inputs
10102 `(("git" ,git)
10103 ("pkg-config" ,pkg-config)
10104 ("python-cython" ,python-cython)))
10105 (inputs
10106 `(("gstreamer" ,gstreamer)
10107 ("mesa" ,mesa)
10108 ("sdl-union"
10109 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
10110 (home-page "http://kivy.org")
10111 (synopsis
10112 "Multitouch application framework")
10113 (description
10114 "A software library for rapid development of
10115hardware-accelerated multitouch applications.")
10116 (license license:expat)))
10117
10118(define-public python2-kivy
10119 (package-with-python2 python-kivy))
10120
10121(define-public python-kivy-next
10122 (deprecated-package "python-kivy-next" python-kivy))
10123
10124(define-public python2-kivy-next
10125 (deprecated-package "python2-kivy-next" python2-kivy))
10126
10127(define-public python-binaryornot
10128 (package
10129 (name "python-binaryornot")
10130 (version "0.4.4")
10131 (source (origin
10132 (method url-fetch)
10133 (uri (pypi-uri "binaryornot" version))
10134 (sha256
10135 (base32
10136 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
10137 (build-system python-build-system)
10138 (propagated-inputs
10139 `(("python-chardet" ,python-chardet)
10140 ("python-hypothesis" ,python-hypothesis)))
10141 (home-page "https://github.com/audreyr/binaryornot")
10142 (synopsis "Package to check if a file is binary or text")
10143 (description "Ultra-lightweight pure Python package to check if a file is
10144binary or text.")
10145 (license license:bsd-3)
10146 (properties `((python2-variant . ,(delay python2-binaryornot))))))
10147
10148(define-public python2-binaryornot
10149 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
10150 (package (inherit base)
10151 (propagated-inputs
10152 `(("python2-enum34" ,python2-enum34)
10153 ,@(package-propagated-inputs base))))))
10154
10155(define-public python-nltk
10156 (package
10157 (name "python-nltk")
10158 (version "3.2.1")
10159 (source (origin
10160 (method url-fetch)
10161 (uri (pypi-uri "nltk" version))
10162 (sha256
10163 (base32
10164 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
10165 (build-system python-build-system)
10166 (arguments
10167 '(;; The tests require some extra resources to be downloaded.
10168 ;; TODO Try packaging these resources.
10169 #:tests? #f))
10170 (home-page "http://nltk.org/")
10171 (synopsis "Natural Language Toolkit")
10172 (description "It provides interfaces to over 50 corpora and lexical
10173resources such as WordNet, along with a suite of text processing libraries
10174for classification, tokenization, stemming, tagging, parsing, and semantic
10175reasoning, wrappers for natural language processing libraries.")
10176 (license license:asl2.0)))
10177
10178(define-public python2-nltk
10179 (package-with-python2 python-nltk))
10180
10181(define-public python-pymongo
10182 (package
10183 (name "python-pymongo")
10184 (version "3.7.2")
10185 (source (origin
10186 (method url-fetch)
10187 (uri (pypi-uri "pymongo" version))
10188 (sha256
10189 (base32
10190 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
10191 (build-system python-build-system)
10192 (propagated-inputs
10193 `(("python-certifi" ,python-certifi)))
10194 (home-page "https://github.com/mongodb/mongo-python-driver")
10195 (synopsis "Python driver for MongoDB")
10196 (description "Python driver for MongoDB.")
10197 (license license:asl2.0)))
10198
10199(define-public python2-pymongo
10200 (package-with-python2 python-pymongo))
10201
44d10b1f
RW
10202(define-public python-consul
10203 (package
10204 (name "python-consul")
10205 (version "0.6.1")
10206 (source
10207 (origin
10208 (method url-fetch)
10209 (uri (pypi-uri "python-consul" version))
10210 (sha256
10211 (base32
10212 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
10213 (build-system python-build-system)
10214 (arguments
10215 '(#:tests? #f)) ; The tests are not distributed
10216 (propagated-inputs
10217 `(("python-requests" ,python-requests)
10218 ("python-six" ,python-six)))
10219 (home-page "https://github.com/cablehead/python-consul")
10220 (synopsis "Python client for Consul")
10221 (description
10222 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
10223discovery, monitoring and configuration.")
10224 (license license:expat)))
10225
10226(define-public python2-consul
10227 (package-with-python2 python-consul))
10228
10229(define-public python-schematics
10230 (package
10231 (name "python-schematics")
10232 (version "1.1.1")
10233 (source
1961d187
TGR
10234 (origin
10235 (method git-fetch)
10236 (uri (git-reference
10237 (url "https://github.com/schematics/schematics.git")
10238 (commit (string-append "v" version))))
10239 (file-name (git-file-name name version))
10240 (sha256
10241 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
44d10b1f
RW
10242 (build-system python-build-system)
10243 (propagated-inputs
10244 `(("python-six" ,python-six)))
10245 (arguments
1961d187
TGR
10246 ;; The tests require a bunch of not very nice packages with fixed
10247 ;; version requirements (e.g. python-coveralls).
10248 `(#:tests? #f))
44d10b1f
RW
10249 (home-page "https://github.com/schematics/schematics")
10250 (synopsis "Python Data Structures for Humans")
10251 (description "Python Data Structures for Humans.")
10252 (license license:bsd-3)))
10253
10254(define-public python2-schematics
10255 (package-with-python2 python-schematics))
10256
10257(define-public python-odfpy
10258 (package
10259 (name "python-odfpy")
10260 (version "1.3.3")
10261 (source (origin
10262 (method url-fetch)
10263 (uri (pypi-uri "odfpy" version))
10264 (sha256
10265 (base32
10266 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
10267 (arguments
10268 `(#:modules ((srfi srfi-1)
10269 (guix build python-build-system)
10270 (guix build utils))
10271 #:phases
10272 (modify-phases %standard-phases
10273 (replace 'check
10274 ;; The test runner invokes python2 and python3 for test*.py.
10275 ;; To avoid having both in inputs, we replicate it here.
10276 (lambda _
21ccc01d
RW
10277 (for-each (lambda (test-file) (invoke "python" test-file))
10278 (find-files "tests" "^test.*\\.py$"))
10279 #t)))))
44d10b1f
RW
10280 (build-system python-build-system)
10281 (home-page "https://github.com/eea/odfpy")
10282 (synopsis "Python API and tools to manipulate OpenDocument files")
10283 (description "Collection of libraries and utility programs written in
10284Python to manipulate OpenDocument 1.2 files.")
10285 (license
10286 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
10287 ;; number of files with other licenses.
10288 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
10289
10290(define-public python2-odfpy
10291 (package-with-python2 python-odfpy))
10292
10293(define-public python-natsort
10294 (package
10295 (name "python-natsort")
10296 (version "5.4.1")
10297 (source (origin
10298 (method url-fetch)
10299 (uri (pypi-uri "natsort" version))
10300 (sha256
10301 (base32
10302 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
10303 (build-system python-build-system)
10304 (arguments
10305 `(#:modules ((guix build utils)
10306 (guix build python-build-system)
10307 (srfi srfi-1)
10308 (srfi srfi-26)
10309 (ice-9 ftw))
10310 #:phases
10311 (modify-phases %standard-phases
10312 (add-before 'check 'set-cachedir
10313 ;; Tests require write access to $HOME by default
10314 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
10315 (replace 'check
10316 (lambda _
10317 (let ((cwd (getcwd)))
10318 (setenv "PYTHONPATH"
10319 (string-append
10320 cwd "/build/"
10321 (find (cut string-prefix? "lib" <>)
10322 (scandir (string-append cwd "/build")))
10323 ":"
10324 (getenv "PYTHONPATH")))
10325 (invoke "pytest" "-v")))))))
10326 (native-inputs
10327 `(("python-hypothesis" ,python-hypothesis)
10328 ("python-pytest-cov" ,python-pytest-cov)
10329 ("python-pytest-mock" ,python-pytest-mock)
10330 ("python-pytest" ,python-pytest)))
10331 (propagated-inputs ; TODO: Add python-fastnumbers.
10332 `(("python-pyicu" ,python-pyicu)))
10333 (home-page "https://github.com/SethMMorton/natsort")
10334 (synopsis "Natural sorting for python and shell")
10335 (description
10336 "Natsort lets you apply natural sorting on lists instead of
10337lexicographical. If you use the built-in @code{sorted} method in python
36a4366d
EF
10338on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
10339@code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
10340@code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
10341identifies numbers and sorts them separately from strings. It can also sort
10342version numbers, real numbers, mixed types and more, and comes with a shell
10343command @command{natsort} that exposes this functionality in the command line.")
44d10b1f
RW
10344 (license license:expat)
10345 (properties `((python2-variant . ,(delay python2-natsort))))))
10346
10347(define-public python2-natsort
10348 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
10349 (package (inherit base)
10350 (native-inputs
10351 `(("python2-pathlib" ,python2-pathlib)
10352 ,@(package-native-inputs base))))))
10353
10354(define-public python-glances
10355 (package
10356 (name "python-glances")
10357 (version "3.0.2")
10358 (source
10359 (origin
10360 (method url-fetch)
10361 (uri (pypi-uri "Glances" version))
10362 (sha256
10363 (base32
10364 "09fxysfp1n16csqvzvawy74qm6a94nvwjf3vcf5gkqp4i6k4vjjy"))))
10365 (build-system python-build-system)
10366 (propagated-inputs
10367 `(("python-psutil" ,python-psutil)))
10368 (home-page
10369 "https://github.com/nicolargo/glances")
10370 (synopsis
10371 "A cross-platform curses-based monitoring tool")
10372 (description
10373 "Glances is a curses-based monitoring tool for a wide variety of platforms.
10374Glances uses the PsUtil library to get information from your system. It monitors
10375CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
10376 (license license:lgpl3+)))
10377
10378(define-public python2-glances
10379 (package-with-python2 python-glances))
10380
10381(define-public python-graphql-core
10382 (package
10383 (name "python-graphql-core")
10384 (version "0.5.3")
10385 (source
10386 (origin
10387 (method url-fetch)
10388 (uri (pypi-uri "graphql-core" version))
10389 (sha256
10390 (base32
10391 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
10392 (build-system python-build-system)
10393 (arguments
10394 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
10395 #:phases
10396 (modify-phases %standard-phases
10397 (add-after 'unpack 'patch-hardcoded-version
10398 (lambda _ (substitute*
10399 "setup.py"
10400 (("'gevent==1.1rc1'") "'gevent'"))
10401 #t)))))
10402 (native-inputs
10403 `(("python-gevent" ,python-gevent)
10404 ("python-mock" ,python-mock)
10405 ("python-pytest-mock" ,python-pytest-mock)))
10406 (propagated-inputs
10407 `(("python-promise" ,python-promise)
10408 ("python-six" ,python-six)))
10409 (home-page "https://github.com/graphql-python/graphql-core")
10410 (synopsis "GraphQL implementation for Python")
10411 (description
10412 "GraphQL implementation for Python. GraphQL is a data query language and
10413runtime designed and used to request and deliver data to mobile and web apps.
10414This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
10415to Python.")
10416 (license license:expat)))
10417
10418(define-public python2-graphql-core
10419 (package-with-python2 python-graphql-core))
10420
10421(define-public python-graphql-relay
10422 (package
10423 (name "python-graphql-relay")
10424 (version "0.4.5")
10425 (source
10426 (origin
10427 (method url-fetch)
10428 (uri (pypi-uri "graphql-relay" version))
10429 (sha256
10430 (base32
10431 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
10432 (build-system python-build-system)
10433 (arguments
10434 '(#:tests? #f)) ; The tests are not distributed
10435 (propagated-inputs
10436 `(("python-graphql-core" ,python-graphql-core)
10437 ("python-promise" ,python-promise)
10438 ("python-six" ,python-six)))
10439 (home-page "https://github.com/graphql-python/graphql-relay-py")
10440 (synopsis "Relay implementation for Python")
10441 (description
10442 "This is a library to allow the easy creation of Relay-compliant servers
10443using the GraphQL Python reference implementation of a GraphQL server. It
10444should be noted that the code is a exact port of the original
10445@url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
10446from Facebook.")
10447 (license license:expat)))
10448
10449(define-public python2-graphql-relay
10450 (package-with-python2 python-graphql-relay))
10451
10452(define-public python-graphene
10453 (package
10454 (name "python-graphene")
10455 (version "0.10.2")
10456 (source
10457 (origin
10458 (method url-fetch)
10459 (uri (pypi-uri "graphene" version))
10460 (sha256
10461 (base32
10462 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
10463 (build-system python-build-system)
10464 (propagated-inputs
10465 `(("python-graphql-core" ,python-graphql-core)
10466 ("python-graphql-relay" ,python-graphql-relay)
10467 ("python-iso8601" ,python-iso8601)
10468 ("python-promise" ,python-promise)
10469 ("python-six" ,python-six)))
10470 (arguments
10471 `(#:tests? #f)) ; no tests/ in the PyPI tarball
10472 (home-page "http://graphene-python.org/")
10473 (synopsis "GraphQL Framework for Python")
10474 (description
10475 "Graphene is a Python library for building GraphQL schemas/types.
10476A GraphQL schema describes your data model, and provides a GraphQL server
10477with an associated set of resolve methods that know how to fetch data.")
10478 (properties `((python2-variant . ,(delay python2-graphene))))
10479 (license license:expat)))
10480
10481(define-public python2-graphene
10482 (let ((base (package-with-python2
10483 (strip-python2-variant python-graphene))))
10484 (package (inherit base)
10485 (native-inputs
10486 `(("python2-sqlalchemy" ,python2-sqlalchemy)
10487 ,@(package-native-inputs base))))))
10488
10489(define-public python-nautilus
10490 (package
10491 (name "python-nautilus")
10492 (version "0.4.9")
10493 (source
10494 (origin
10495 (method url-fetch)
10496 (uri (pypi-uri "nautilus" version))
10497 (sha256
10498 (base32
10499 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
10500 (build-system python-build-system)
10501 (arguments `(#:tests? #f)) ; fails to import test modules
10502 (propagated-inputs
10503 `(("python-bcrypt" ,python-bcrypt)
10504 ("python-click" ,python-click)
10505 ("python-consul" ,python-consul)
10506 ("python-graphene" ,python-graphene)
10507 ("python-jinja2" ,python-jinja2)
10508 ("python-peewee" ,python-peewee)
10509 ("python-pika" ,python-pika)
10510 ("python-tornado" ,python-tornado)
10511 ("python-wtforms" ,python-wtforms)))
10512 (native-inputs
10513 `(("python-nose2" ,python-nose2)))
10514 (home-page "https://github.com/AlecAivazis/nautilus")
10515 (synopsis "Library for creating microservice applications")
10516 (description
10517 "Nautilus is a framework for flux based microservices that looks to
10518provide extendible implementations of common aspects of a cloud so that you can
10519focus on building massively scalable web applications.")
10520 (license license:expat)))
10521
10522(define-public python-snowballstemmer
10523 (package
10524 (name "python-snowballstemmer")
10525 (version "1.2.1")
10526 (source (origin
10527 (method url-fetch)
10528 (uri (pypi-uri "snowballstemmer" version))
10529 (sha256
10530 (base32
10531 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
10532 (build-system python-build-system)
10533 (arguments
10534 `(;; No tests exist
10535 #:tests? #f))
10536 (home-page "https://github.com/shibukawa/snowball_py")
10537 (synopsis "Snowball stemming library collection for Python")
10538 (description "This package provides 16 word stemmer algorithms generated
10539from Snowball algorithms. It includes the 15 original ones plus the Poerter
10540English stemmer.")
10541 (license license:bsd-3)))
10542
10543(define-public python2-snowballstemmer
10544 (package-with-python2 python-snowballstemmer))
10545
10546(define-public python-sphinx-cloud-sptheme
10547 (package
10548 (name "python-sphinx-cloud-sptheme")
10549 (version "1.8.0")
10550 (source (origin
10551 (method url-fetch)
10552 (uri (pypi-uri "cloud_sptheme" version))
10553 (sha256
10554 (base32
10555 "1dniqb6a39yh786f86c4jn666rwnyi1jvzn4616zhcchb7sfdshd"))))
10556 (build-system python-build-system)
10557 ;; FIXME: The 'pypi' release archive does not contain tests.
10558 (arguments '(#:tests? #f))
10559 (native-inputs
10560 `(("python-sphinx" ,python-sphinx)))
10561 (home-page "https://bitbucket.org/ecollins/cloud_sptheme")
10562 (synopsis "'Cloud' theme for Sphinx documenter")
10563 (description "This package contains the \"Cloud\" theme for Sphinx and some
10564related extensions.")
10565 (license license:bsd-3)))
10566
10567(define-public python2-sphinx-cloud-sptheme
10568 (package-with-python2 python-sphinx-cloud-sptheme))
10569
10570(define-public python-sphinx-alabaster-theme
10571 (package
10572 (name "python-sphinx-alabaster-theme")
10573 (version "0.7.12")
10574 (source (origin
10575 (method url-fetch)
10576 (uri (pypi-uri "alabaster" version))
10577 (sha256
10578 (base32
10579 "00nwwjj2d2ym4s2kk217x7jkx1hnczc3fvm8yxbqmsp6b0nxfqd6"))))
10580 (build-system python-build-system)
10581 (propagated-inputs
10582 `(("python-pygments" ,python-pygments)))
10583 (home-page "https://alabaster.readthedocs.io/")
10584 (synopsis "Configurable sidebar-enabled Sphinx theme")
10585 (description "Alabaster is a visually (c)lean, responsive, configurable
10586theme for the Sphinx documentation system. It's the default theme of Sphinx.")
10587 (license license:bsd-3)))
10588
10589(define-public python2-sphinx-alabaster-theme
10590 (package-with-python2 python-sphinx-alabaster-theme))
10591
10592(define-public python-setproctitle
10593(package
10594 (name "python-setproctitle")
10595 (version "1.1.10")
10596 (source
10597 (origin
10598 (method url-fetch)
10599 (uri (pypi-uri "setproctitle" version))
10600 (sha256
10601 (base32
10602 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
10603 (build-system python-build-system)
10604 (arguments
10605 '(#:phases
10606 (modify-phases %standard-phases
10607 (add-before 'check 'patch-Makefile
10608 ;; Stricly this is only required for the python2 variant.
10609 ;; But adding a phase in an inherited package seems to be
10610 ;; cumbersum. So we patch even for python3.
10611 (lambda _
10612 (let ((nose (assoc-ref %build-inputs "python2-nose")))
10613 (when nose
10614 (substitute* "Makefile"
10615 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
10616 (string-append nose "/bin/nosetests "))))
10617 #t)))
10618 (replace 'check
10619 (lambda _
10620 (setenv "PYTHON" (or (which "python3") (which "python")))
10621 (setenv "PYCONFIG" (or (which "python3-config")
10622 (which "python-config")))
10623 (setenv "CC" "gcc")
10624 ;; No need to extend PYTHONPATH to find the built package, since
10625 ;; the Makefile will build anyway
10626 (invoke "make" "check"))))))
10627 (native-inputs
10628 `(("procps" ,procps))) ; required for tests
10629 (home-page
10630 "https://github.com/dvarrazzo/py-setproctitle")
10631 (synopsis
10632 "Setproctitle implementation for Python to customize the process title")
10633 (description "The library allows a process to change its title (as displayed
10634by system tools such as ps and top).
10635
10636Changing the title is mostly useful in multi-process systems, for
10637example when a master process is forked: changing the children's title
10638allows to identify the task each process is busy with. The technique
10639is used by PostgreSQL and the OpenSSH Server for example.")
10640 (license license:bsd-3)
10641 (properties `((python2-variant . ,(delay python2-setproctitle))))))
10642
10643(define-public python2-setproctitle
10644 (let ((base (package-with-python2
10645 (strip-python2-variant python-setproctitle))))
10646 (package
10647 (inherit base)
10648 (native-inputs `(("python2-nose" ,python2-nose)
10649 ,@(package-native-inputs base))))))
10650
10651(define-public python-validictory
10652 (package
10653 (name "python-validictory")
10654 (version "1.0.1")
10655 (source
10656 (origin
10657 (method url-fetch)
10658 (uri (pypi-uri "validictory" version))
10659 (sha256
10660 (base32
10661 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
10662 (build-system python-build-system)
10663 (arguments
10664 '(#:phases
10665 (modify-phases %standard-phases
10666 (add-after 'unpack 'bootstrap
10667 ;; Move the tests out of the package directory to avoid
10668 ;; packaging them.
10669 (lambda* _
10670 (rename-file "validictory/tests" "tests")
10671 (delete-file "tests/__init__.py")))
10672 (replace 'check
10673 (lambda _
10674 ;; Extend PYTHONPATH so the built package will be found.
10675 (setenv "PYTHONPATH"
10676 (string-append (getcwd) "/build/lib:"
10677 (getenv "PYTHONPATH")))
6568bd5d 10678 (invoke "py.test" "-vv" ))))))
44d10b1f
RW
10679 (native-inputs
10680 `(("python-pytest" ,python-pytest)))
10681 (home-page
10682 "https://github.com/jamesturk/validictory")
10683 (synopsis "General purpose Python data validator")
10684 (description "It allows validation of arbitrary Python data structures.
10685
10686The schema format is based on the JSON Schema
10687proposal (http://json-schema.org), so combined with json the library is also
10688useful as a validator for JSON data.")
10689 (license license:expat)))
10690
10691(define-public python2-validictory
10692 (package-with-python2 python-validictory))
10693
10694(define-public python-pyelftools
10695 (package
10696 (name "python-pyelftools")
10697 (version "0.25")
10698 (source
10699 (origin
10700 (method url-fetch)
10701 (uri (pypi-uri "pyelftools" version))
10702 (sha256
10703 (base32
10704 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
10705 (build-system python-build-system)
10706 (arguments
10707 `(#:phases
10708 (modify-phases %standard-phases
10709 (add-before 'check 'set-pythonpath
10710 (lambda _
10711 (setenv "PYTHONPATH"
10712 (string-append
10713 (getcwd) "/test/"
10714 ":" (getenv "PYTHONPATH")))
10715 #t)))))
10716 (home-page
10717 "https://github.com/eliben/pyelftools")
10718 (synopsis
10719 "Analyze binary and library file information")
10720 (description "This Python library provides interfaces for parsing and
10721analyzing two binary and library file formats; the Executable and Linking
10722Format (ELF), and debugging information in the Debugging With Attributed
10723Record Format (DWARF).")
10724 (license license:public-domain)))
10725
10726(define-public python-pyev
10727 (package
10728 (name "python-pyev")
10729 (version "0.9.0")
10730 (source
10731 (origin
10732 (method url-fetch)
10733 (uri (pypi-uri "pyev" version))
10734 (sha256
10735 (base32
10736 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
10737 (build-system python-build-system)
10738 (arguments
10739 `(#:tests? #f ; no test suite
10740 #:phases
10741 (modify-phases %standard-phases
10742 (add-after 'unpack 'patch
10743 (lambda* (#:key inputs #:allow-other-keys)
10744 (let ((libev (string-append (assoc-ref inputs "libev")
10745 "/lib/libev.so.4")))
10746 (substitute* "setup.py"
10747 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
10748 (string-append "libev_dll_name = \"" libev "\"")))))))))
10749 (inputs
10750 `(("libev" ,libev)))
10751 (home-page "http://pythonhosted.org/pyev/")
10752 (synopsis "Python libev interface")
10753 (description "Pyev provides a Python interface to libev.")
10754 (license license:gpl3)))
10755
10756(define-public python2-pyev
10757 (package-with-python2 python-pyev))
10758
10759(define-public python-imagesize
10760 (package
10761 (name "python-imagesize")
10762 (version "1.1.0")
10763 (source
10764 (origin
10765 (method url-fetch)
10766 (uri (pypi-uri "imagesize" version))
10767 (sha256
10768 (base32
10769 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
10770 (build-system python-build-system)
10771 (home-page "https://github.com/shibukawa/imagesize_py")
10772 (synopsis "Gets image size of files in various formats in Python")
10773 (description
10774 "This package allows determination of image size from
10775PNG, JPEG, JPEG2000 and GIF files in pure Python.")
10776 (license license:expat)))
10777
10778(define-public python2-imagesize
10779 (package-with-python2 python-imagesize))
10780
10781(define-public python-termstyle
10782 (package
10783 (name "python-termstyle")
10784 (version "0.1.11")
10785 (source
10786 (origin
10787 (method url-fetch)
10788 (uri (pypi-uri "termstyle" version))
10789 (sha256
10790 (base32
10791 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
10792 (build-system python-build-system)
10793 (arguments
10794 '(#:phases
10795 (modify-phases %standard-phases
10796 (replace 'check
10797 (lambda _
831080a6 10798 (invoke "python" "test3.py"))))))
44d10b1f
RW
10799 (home-page "https://github.com/gfxmonk/termstyle")
10800 (synopsis "Console text coloring for Python")
10801 (description "This package provides console text coloring for Python.")
10802 (license license:bsd-3)))
10803
10804(define-public python-argcomplete
10805 (package
10806 (name "python-argcomplete")
10807 (version "1.7.0")
10808 (source
10809 (origin
10810 (method url-fetch)
10811 (uri (pypi-uri "argcomplete" version))
10812 (sha256
10813 (base32
10814 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
10815 (build-system python-build-system)
10816 (native-inputs
10817 `(("python-pexpect" ,python-pexpect)
10818 ("tcsh" ,tcsh)
10819 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
10820 (home-page "https://github.com/kislyuk/argcomplete")
10821 (synopsis "Shell tab completion for Python argparse")
10822 (description "argcomplete provides extensible command line tab completion
10823of arguments and options for Python scripts using @code{argparse}. It's
10824particularly useful for programs with many options or sub-parsers that can
10825dynamically suggest completions; for example, when browsing resources over the
10826network.")
10827 (license license:asl2.0)))
10828
10829(define-public python2-argcomplete
10830 (package-with-python2 python-argcomplete))
10831
10832(define-public python-xopen
10833 (package
10834 (name "python-xopen")
24d64989 10835 (version "0.5.0")
44d10b1f
RW
10836 (source
10837 (origin
10838 (method url-fetch)
10839 (uri (pypi-uri "xopen" version))
10840 (sha256
10841 (base32
24d64989 10842 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
44d10b1f 10843 (build-system python-build-system)
24d64989
RW
10844 (propagated-inputs
10845 `(("python-setuptools-scm" ,python-setuptools-scm)))
44d10b1f
RW
10846 (home-page "https://github.com/marcelm/xopen/")
10847 (synopsis "Open compressed files transparently")
10848 (description "This module provides an @code{xopen} function that works like
10849Python's built-in @code{open} function, but can also deal with compressed files.
10850Supported compression formats are gzip, bzip2 and, xz, and are automatically
10851recognized by their file extensions. The focus is on being as efficient as
10852possible on all supported Python versions.")
10853 (license license:expat)))
10854
10855(define-public python2-xopen
10856 (let ((base (package-with-python2
10857 (strip-python2-variant python-xopen))))
10858 (package
10859 (inherit base)
10860 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
10861 ,@(package-propagated-inputs base))))))
10862
10863(define-public python-cheetah
10864 (package
10865 (name "python-cheetah")
10866 (version "3.1.0")
10867 (source
10868 (origin
10869 (method url-fetch)
10870 (uri (pypi-uri "Cheetah3" version))
10871 (sha256
10872 (base32
10873 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
10874 (build-system python-build-system)
10875 (arguments
10876 `(#:modules ((guix build utils)
10877 (guix build python-build-system)
10878 (ice-9 ftw)
10879 (srfi srfi-1)
10880 (srfi srfi-26))
10881 #:phases (modify-phases %standard-phases
10882 (add-after 'unpack 'use-absolute-python
10883 (lambda _
10884 (substitute* "Cheetah/CheetahWrapper.py"
10885 (("#!/usr/bin/env python")
10886 (string-append "#!" (which "python"))))
10887 #t))
10888 (replace 'check
10889 (lambda _
10890 (let ((cwd (getcwd)))
10891 (setenv "PYTHONPATH"
10892 (string-append
10893 cwd "/build/"
10894 (find (cut string-prefix? "lib" <>)
10895 (scandir (string-append cwd "/build")))
10896 ":" (getenv "PYTHONPATH")))
10897 (setenv "PATH"
10898 (string-append (getenv "PATH")
10899 ":" cwd "/bin"))
10900 (setenv "TMPDIR" "/tmp")
10901
10902 (substitute* "Cheetah/Tests/Test.py"
10903 (("unittest.TextTestRunner\\(\\)")
10904 "unittest.TextTestRunner(verbosity=2)"))
10905
10906 (invoke "python" "Cheetah/Tests/Test.py")))))))
10907 (propagated-inputs
10908 `(("python-markdown" ,python-markdown))) ;optional
10909 (home-page "http://cheetahtemplate.org/")
10910 (synopsis "Template engine")
10911 (description "Cheetah is a text-based template engine and Python code
10912generator.
10913
10914Cheetah can be used as a standalone templating utility or referenced as
10915a library from other Python applications. It has many potential uses,
10916but web developers looking for a viable alternative to ASP, JSP, PHP and
10917PSP are expected to be its principle user group.
10918
10919Features:
10920@enumerate
10921@item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
10922 text-based format.
10923@item Cleanly separates content, graphic design, and program code.
10924@item Blends the power and flexibility of Python with a simple template language
10925 that non-programmers can understand.
10926@item Gives template writers full access to any Python data structure, module,
10927 function, object, or method in their templates.
10928@item Makes code reuse easy by providing an object-orientated interface to
10929 templates that is accessible from Python code or other Cheetah templates.
10930 One template can subclass another and selectively reimplement sections of it.
10931@item Provides a simple, yet powerful, caching mechanism that can dramatically
10932 improve the performance of a dynamic website.
10933@item Compiles templates into optimized, yet readable, Python code.
10934@end enumerate")
10935 (license (license:x11-style "file://LICENSE"))))
10936
10937(define-public python2-cheetah
10938 (package-with-python2 python-cheetah))
10939
10940(define-public python-dulwich
10941 (package
10942 (name "python-dulwich")
10943 (version "0.18.6")
10944 (source
10945 (origin
10946 (method url-fetch)
10947 (uri (list (string-append "https://www.dulwich.io/releases/"
10948 "dulwich-" version ".tar.gz")
10949 (pypi-uri "dulwich" version)))
10950 (sha256
10951 (base32
10952 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
10953 (build-system python-build-system)
10954 (arguments
10955 `(#:phases
10956 (modify-phases %standard-phases
10957 (add-before 'check 'fix-tests
10958 (lambda* (#:key inputs #:allow-other-keys)
10959 ;; The tests use Popen with a custom environment which doesn't
10960 ;; include PATH.
10961 (substitute* "dulwich/tests/compat/utils.py"
10962 (("'git'") (string-append "'"
10963 (which "git")
10964 "'")))
10965 (substitute* '("dulwich/tests/test_repository.py"
10966 "dulwich/tests/test_hooks.py")
10967 (("#!/bin/sh") (string-append "#!" (which "sh"))))
10968 (setenv "TEST_RUNNER" "unittest")
10969 (setenv "PYTHONHASHSEED" "random")
10970 #t)))))
10971 (propagated-inputs
10972 `(("python-fastimport" ,python-fastimport)))
10973 (native-inputs
10974 `(("python-mock" ,python-mock)
10975 ("python-geventhttpclient" ,python-geventhttpclient)
10976 ("git" ,git)))
10977 (home-page "https://www.dulwich.io/")
10978 (synopsis "Git implementation in Python")
10979 (description "Dulwich is an implementation of the Git file formats and
10980protocols written in pure Python.")
10981 ;; Can be used with either license.
10982 (license (list license:asl2.0 license:gpl2+))))
10983
10984(define-public python2-dulwich
10985 (package-with-python2 python-dulwich))
10986
10987(define-public python-pbkdf2
10988 (package
10989 (name "python-pbkdf2")
10990 (version "1.3")
10991 (source
10992 (origin
10993 (method url-fetch)
10994 (uri (pypi-uri "pbkdf2" version))
10995 (sha256
10996 (base32
10997 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
10998 (build-system python-build-system)
10999 (arguments
11000 '(#:phases
11001 (modify-phases %standard-phases
11002 (replace 'check
11003 (lambda _
11004 (setenv "PYTHONPATH"
11005 (string-append (getcwd) "/build/lib:"
11006 (getenv "PYTHONPATH")))
ee2bb944 11007 (invoke "python" "test/test_pbkdf2.py"))))))
44d10b1f
RW
11008 (propagated-inputs
11009 `(("python-pycrypto" ,python-pycrypto))) ; optional
11010 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
11011 (synopsis "Password-based key derivation")
11012 (description "This module implements the password-based key derivation
11013function, PBKDF2, specified in RSA PKCS#5 v2.0.
11014
11015PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
11016is part of the RSA Public Key Cryptography Standards series. The provided
11017implementation takes a password or a passphrase and a salt value (and
11018optionally a iteration count, a digest module, and a MAC module) and provides
11019a file-like object from which an arbitrarly-sized key can be read.")
11020 (license license:expat)))
11021
11022(define-public python2-pbkdf2
11023 (package-with-python2 python-pbkdf2))
11024
11025(define-public python-qrcode
11026 (package
11027 (name "python-qrcode")
217ea1a1 11028 (version "6.1")
44d10b1f
RW
11029 (source
11030 (origin
11031 (method url-fetch)
11032 (uri (pypi-uri "qrcode" version))
11033 (sha256
217ea1a1 11034 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
44d10b1f
RW
11035 (build-system python-build-system)
11036 (arguments
11037 ;; FIXME: Tests require packaging 'pymaging'.
11038 '(#:tests? #f))
11039 (propagated-inputs
11040 `(("python-lxml" ,python-lxml) ; for SVG output
11041 ("python-pillow" ,python-pillow) ; for PNG output
11042 ("python-six" ,python-six)))
44d10b1f
RW
11043 (home-page "https://github.com/lincolnloop/python-qrcode")
11044 (synopsis "QR Code image generator")
11045 (description "This package provides a pure Python QR Code generator
11046module. It uses the Python Imaging Library (PIL) to allow for the generation
11047of QR Codes.
11048
11049In addition this package provides a command line tool to generate QR codes and
11050either write these QR codes to a file or do the output as ascii art at the
11051console.")
11052 (license license:bsd-3)))
11053
11054(define-public python2-qrcode
11055 (package-with-python2 python-qrcode))
11056
11057(define-public python-rst2ansi
11058 (package
11059 (name "python-rst2ansi")
11060 (version "0.1.5")
11061 (source
11062 (origin
11063 (method url-fetch)
11064 (uri (pypi-uri "rst2ansi" version))
11065 (sha256
11066 (base32
11067 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
11068 (build-system python-build-system)
11069 (propagated-inputs
11070 `(("python-docutils" ,python-docutils)))
11071 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
11072 (synopsis "Convert RST to ANSI-decorated console output")
11073 (description
11074 "Python module dedicated to rendering RST (reStructuredText) documents
11075to ansi-escaped strings suitable for display in a terminal.")
11076 (license license:expat)))
11077
11078(define-public python-ansi2html
11079 (package
11080 (name "python-ansi2html")
11081 (version "1.2.0")
11082 (source
11083 (origin
11084 (method url-fetch)
11085 (uri (pypi-uri "ansi2html" version))
11086 (sha256
11087 (base32
11088 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
11089 (build-system python-build-system)
11090 (native-inputs
11091 `(("python-mock" ,python-mock)
11092 ("python-nose" ,python-nose)))
11093 (propagated-inputs
11094 `(("python-six" ,python-six)))
11095 (home-page "https://github.com/ralphbean/ansi2html")
11096 (synopsis "Convert ANSI-decorated console output to HTML")
11097 (description
11098 "@command{ansi2html} is a Python library and command line utility for
11099convering text with ANSI color codes to HTML or LaTeX.")
11100 (license license:gpl3+)))
11101
11102(define-public python2-ansi2html
11103 (package-with-python2 python-ansi2html))
11104
11105(define-public python-ddt
11106 (package
11107 (name "python-ddt")
11108 (version "1.1.3")
11109 (source
11110 (origin
11111 (method url-fetch)
11112 (uri (pypi-uri "ddt" version))
11113 (sha256
11114 (base32
11115 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
11116 (build-system python-build-system)
11117 (native-inputs
11118 `(("python-mock" ,python-mock)
11119 ("python-nose" ,python-nose)))
11120 (propagated-inputs
11121 `(("python-six" ,python-six)
11122 ("python-pyyaml" ,python-pyyaml)))
11123 (home-page "https://github.com/txels/ddt")
11124 (synopsis "Data-Driven Tests")
11125 (description
11126 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
11127running it with different test data, and make it appear as multiple test
11128cases.")
11129 (license license:expat)))
11130
11131(define-public python2-ddt
11132 (package-with-python2 python-ddt))
11133
11134(define-public python-pycountry
11135 (package
11136 (name "python-pycountry")
11137 (version "18.5.26")
11138 (source
11139 (origin
11140 (method url-fetch)
11141 (uri (pypi-uri "pycountry" version))
11142 (sha256
11143 (base32
11144 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
11145 (build-system python-build-system)
11146 (home-page "https://bitbucket.org/flyingcircus/pycountry")
11147 (synopsis "ISO databases for languages, countries, currencies, etc.")
11148 (description
11149 "@code{pycountry} provides the ISO databases for the standards:
11150@enumerate
11151@item 639-3 (Languages)
11152@item 3166 (Countries)
11153@item 3166-3 (Deleted Countries)
11154@item 3166-2 (Subdivisions of countries)
11155@item 4217 (Currencies)
11156@item 15924 (Scripts)
11157@end enumerate
11158It includes a copy from Debian’s pkg-isocodes and makes the data accessible
11159through a Python API.")
11160 (license license:lgpl2.1+)))
11161
11162(define-public python2-pycountry
11163 (package-with-python2 python-pycountry))
11164
11165(define-public python-pycosat
11166 (package
11167 (name "python-pycosat")
11168 (version "0.6.1")
11169 (source
11170 (origin
11171 (method url-fetch)
11172 (uri (pypi-uri "pycosat" version))
11173 (sha256
11174 (base32
11175 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
11176 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
11177 (build-system python-build-system)
11178 (home-page "https://github.com/ContinuumIO/pycosat")
11179 (synopsis "Bindings to picosat (a SAT solver)")
11180 (description
11181 "This package provides efficient Python bindings to @code{picosat} on
11182the C level. When importing pycosat, the @code{picosat} solver becomes part
11183of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
11184Problem} (SAT) solver.")
11185 (license license:expat)))
11186
11187(define-public python2-pycosat
11188 (package-with-python2 python-pycosat))
11189
11190(define-public python2-ruamel.ordereddict
11191 (package
11192 (name "python2-ruamel.ordereddict")
11193 (version "0.4.9")
11194 (source
11195 (origin
11196 (method url-fetch)
11197 (uri (pypi-uri "ruamel.ordereddict" version))
11198 (sha256
11199 (base32
11200 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
11201 (build-system python-build-system)
11202 (arguments
11203 `(#:python ,python-2
11204 #:phases
11205 (modify-phases %standard-phases
11206 (delete 'check)
11207 (add-after 'install 'check
11208 (lambda* (#:key inputs outputs #:allow-other-keys)
11209 (add-installed-pythonpath inputs outputs)
f987ac30 11210 (invoke "python" "test/testordereddict.py"))))))
44d10b1f
RW
11211 (home-page "https://bitbucket.org/ruamel/ordereddict")
11212 (synopsis "Version of dict that keeps keys in insertion order")
11213 (description
11214 "This is an implementation of an ordered dictionary with @dfn{Key
11215Insertion Order} (KIO: updates of values do not affect the position of the
11216key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
11217removed and put at the back). The standard library module @code{OrderedDict},
11218implemented later, implements a subset of @code{ordereddict} functionality.
11219Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
11220Order} (KSO, no sorting function can be specified, but a transform can be
11221specified to apply on the key before comparison (e.g. @code{string.lower})).")
11222 (license license:expat)))
11223
11224(define-public python-pypeg2
11225 (package
11226 (name "python-pypeg2")
11227 (version "2.15.2")
11228 (source
11229 (origin
11230 (method url-fetch)
11231 (uri (pypi-uri "pyPEG2" version))
11232 (sha256
11233 (base32
11234 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
11235 (build-system python-build-system)
11236 (propagated-inputs `(("python-lxml" ,python-lxml)))
11237 (arguments
11238 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
11239 '(#:tests? #f))
11240 (home-page "https://fdik.org/pyPEG/")
11241 (synopsis "Parsering Expression Grammars in Python")
11242 (description "PyPEG is an intrinsic parser interpreter framework for
11243Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
11244parse many formal languages.")
11245 (license license:gpl2)))
11246
11247(define-public python-incremental
11248 (package
11249 (name "python-incremental")
11250 (version "17.5.0")
11251 (source
11252 (origin
11253 (method url-fetch)
11254 (uri (pypi-uri "incremental" version))
11255 (sha256
11256 (base32
11257 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
11258 (build-system python-build-system)
11259 (home-page "https://github.com/hawkowl/incremental")
11260 (synopsis "Library for versioning Python projects")
11261 (description "Incremental is a small library that versions your Python
11262projects.")
11263 (license license:expat)))
11264
11265(define-public python2-incremental
11266 (package-with-python2 python-incremental))
11267
11268(define-public python-invoke
11269 (package
11270 (name "python-invoke")
11271 (home-page "http://www.pyinvoke.org/")
11272 (version "1.1.0")
11273 (source (origin
11274 (method url-fetch)
11275 (uri (pypi-uri "invoke" version))
11276 (sha256
11277 (base32
11278 "0aiy1xvk1f91246zxd1zqrm679vdvd10h843a2na41cqr3cflpi6"))))
11279 (build-system python-build-system)
11280 (arguments
11281 ;; XXX: Requires many dependencies that are not yet in Guix.
11282 `(#:tests? #f))
11283 (synopsis "Pythonic task execution")
11284 (description
11285 "Invoke is a Python task execution tool and library, drawing inspiration
11286from various sources to arrive at a powerful and clean feature set. It is
11287evolved from the Fabric project, but focuses on local and abstract concerns
11288instead of servers and network commands.")
11289 (license license:bsd-3)))
11290
11291(define-public python2-invoke
11292 (package-with-python2 python-invoke))
11293
11294(define-public python-automat
11295 (package
11296 (name "python-automat")
11297 (version "0.6.0")
11298 (source (origin
11299 (method url-fetch)
11300 (uri (pypi-uri "Automat" version))
11301 (sha256
11302 (base32
11303 "1a7nsrljysfmdqmpn2apfa1gg6rfah4y9sizvns8gb08rx7d07rw"))))
11304 (build-system python-build-system)
11305 ;; We disable the tests because they require python-twisted, while
11306 ;; python-twisted depends on python-automat. Twisted is optional, but the
11307 ;; tests fail if it is not available. Also see
11308 ;; <https://github.com/glyph/automat/issues/71>.
11309 (arguments '(#:tests? #f))
11310 (native-inputs
11311 `(("python-m2r" ,python-m2r)
11312 ("python-setuptools-scm" ,python-setuptools-scm)
11313 ("python-graphviz" ,python-graphviz)))
11314 (propagated-inputs
11315 `(("python-six" ,python-six)
11316 ("python-attrs" ,python-attrs)))
11317 (home-page "https://github.com/glyph/Automat")
11318 (synopsis "Self-service finite-state machines")
11319 (description "Automat is a library for concise, idiomatic Python
11320expression of finite-state automata (particularly deterministic finite-state
11321transducers).")
11322 (license license:expat)))
11323
11324(define-public python2-automat
11325 (package-with-python2 python-automat))
11326
11327(define-public python-m2r
11328 (package
11329 (name "python-m2r")
11330 (version "0.1.12")
11331 (source (origin
11332 (method url-fetch)
11333 (uri (pypi-uri "m2r" version))
11334 (sha256
11335 (base32
11336 "1axrwnf425sz4qz3c0qc7yhhki4myzb8rki7pczcsgzznzmqdyxd"))))
11337 (build-system python-build-system)
11338 (propagated-inputs
11339 `(("python-docutils" ,python-docutils)
11340 ("python-mistune" ,python-mistune)))
11341 (native-inputs
11342 `(("python-pygments" ,python-pygments)
11343 ("python-mock" ,python-mock)))
11344 (home-page "https://github.com/miyakogi/m2r")
11345 (synopsis "Markdown to reStructuredText converter")
11346 (description "M2R converts a markdown file including reST markups to valid
11347reST format.")
11348 (license license:expat)))
11349
11350(define-public python2-m2r
11351 (package-with-python2 python-m2r))
11352
11353(define-public python-constantly
11354 (package
11355 (name "python-constantly")
11356 (version "15.1.0")
11357 (source (origin
11358 (method url-fetch)
11359 (uri (pypi-uri "constantly" version))
11360 (sha256
11361 (base32
11362 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
11363 (build-system python-build-system)
11364 (home-page "https://github.com/twisted/constantly")
11365 (synopsis "Symbolic constants in Python")
11366 (description "Constantly is a Python library that provides symbolic
11367constant support. It includes collections and constants with text, numeric,
11368and bit flag values.")
11369 (license license:expat)))
11370
11371(define-public python2-constantly
11372 (package-with-python2 python-constantly))
11373
11374(define-public python-attrs
11375 (package
11376 (name "python-attrs")
11377 (version "18.2.0")
11378 (source (origin
11379 (method url-fetch)
11380 (uri (pypi-uri "attrs" version))
11381 (sha256
11382 (base32
11383 "0s9ydh058wmmf5v391pym877x4ahxg45dw6a0w4c7s5wgpigdjqh"))))
11384 (build-system python-build-system)
11385 (arguments
11386 `(#:modules ((guix build utils)
11387 (guix build python-build-system)
11388 (ice-9 ftw)
11389 (srfi srfi-1)
11390 (srfi srfi-26))
11391 #:phases (modify-phases %standard-phases
11392 (replace 'check
11393 (lambda _
11394 (let ((cwd (getcwd)))
11395 (setenv "PYTHONPATH"
11396 (string-append
11397 cwd "/build/"
11398 (find (cut string-prefix? "lib" <>)
11399 (scandir (string-append cwd "/build")))
11400 ":"
11401 (getenv "PYTHONPATH")))
11402 (invoke "python" "-m" "pytest")))))))
11403 (native-inputs
11404 `(("python-coverage" ,python-coverage)
11405 ("python-hypothesis" ,python-hypothesis)
11406 ("python-pympler" ,python-pympler)
11407 ("python-pytest" ,python-pytest)
11408 ("python-six" ,python-six)
11409 ("python-sphinx" ,python-sphinx)
11410 ("python-zope-interface" ,python-zope-interface)))
11411 (home-page "https://github.com/python-attrs/attrs/")
11412 (synopsis "Attributes without boilerplate")
11413 (description "@code{attrs} is a Python package with class decorators that
11414ease the chores of implementing the most common attribute-related object
11415protocols.")
11416 (license license:expat)))
11417
11418(define-public python2-attrs
11419 (package-with-python2 python-attrs))
11420
11421(define-public python-attrs-bootstrap
11422 (package
11423 (inherit python-attrs)
11424 (name "python-attrs-bootstrap")
11425 ;; Keep this on a fixed version so python-attrs can be updated without
11426 ;; triggering a mass-rebuild. FIXME: Update this in the next rebuild cycle.
11427 (version "17.4.0")
11428 (source (origin
11429 (method url-fetch)
11430 (uri (pypi-uri "attrs" version))
11431 (sha256
11432 (base32
11433 "1jafnn1kzd6qhxgprhx6y6ik1r5m2rilx25syzcmq03azp660y8w"))))
11434 (native-inputs `())
11435 (arguments `(#:tests? #f))))
11436
11437(define-public python2-attrs-bootstrap
11438 (package-with-python2 python-attrs-bootstrap))
11439
11440(define-public python2-cliapp
11441 (package
11442 (name "python2-cliapp")
9064b84e 11443 (version "1.20180812.1")
44d10b1f
RW
11444 (source
11445 (origin
11446 (method url-fetch)
11447 (uri (string-append
11448 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
11449 version ".tar.gz"))
11450 (sha256
11451 (base32
9064b84e 11452 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
44d10b1f
RW
11453 (build-system python-build-system)
11454 (arguments
11455 `(#:python ,python-2
11456 #:phases
11457 (modify-phases %standard-phases
11458 ;; check phase needs to be run before the build phase. If not,
11459 ;; coverage-test-runner looks for tests for the built source files,
11460 ;; and fails.
11461 (delete 'check)
11462 (add-before 'build 'check
11463 (lambda _
11464 ;; Disable python3 tests
11465 (substitute* "check"
11466 (("python3") "# python3"))
6c826d32 11467 (invoke "./check"))))))
44d10b1f
RW
11468 (native-inputs
11469 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
11470 ("python2-pep8" ,python2-pep8)))
11471 (propagated-inputs
11472 `(("python2-pyaml" ,python2-pyaml)))
11473 (home-page "https://liw.fi/cliapp/")
11474 (synopsis "Python framework for command line programs")
11475 (description "@code{python2-cliapp} is a python framework for
11476command line programs. It contains the typical stuff such programs
11477need to do, such as parsing the command line for options, and
11478iterating over input files.")
11479 (license license:gpl2+)))
11480
11481(define-public python2-ttystatus
11482 (package
11483 (name "python2-ttystatus")
e516a9c2 11484 (version "0.36")
44d10b1f
RW
11485 (source
11486 (origin
11487 (method url-fetch)
11488 (uri (string-append
11489 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
11490 version ".tar.gz"))
11491 (sha256
11492 (base32
e516a9c2 11493 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
44d10b1f
RW
11494 (build-system python-build-system)
11495 (native-inputs
11496 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
11497 ("python2-pep8" ,python2-pep8)))
11498 (arguments
11499 `(#:python ,python-2
11500 #:phases
11501 (modify-phases %standard-phases
11502 ;; check phase needs to be run before the build phase. If not,
11503 ;; coverage-test-runner looks for tests for the built source files,
11504 ;; and fails.
11505 (delete 'check)
11506 (add-before 'build 'check
cbeee881 11507 (lambda _ (invoke "make" "check"))))))
44d10b1f
RW
11508 (home-page "https://liw.fi/ttystatus/")
11509 (synopsis "Python library for showing progress reporting and
11510status updates on terminals")
11511 (description "@code{python2-ttystatus} is a python library for
11512showing progress reporting and status updates on terminals, for
11513command line programs. Output is automatically adapted to the width
11514of the terminal: truncated if it does not fit, and resized if the
11515terminal size changes.")
11516 (license license:gpl3+)))
11517
11518(define-public python2-tracing
11519 (package
11520 (name "python2-tracing")
11521 (version "0.10")
11522 (source
11523 (origin
11524 (method url-fetch)
11525 (uri (string-append
11526 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
11527 version ".tar.gz"))
11528 (sha256
11529 (base32
11530 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
11531 (build-system python-build-system)
11532 (arguments
11533 `(#:python ,python-2))
11534 (home-page "https://liw.fi/tracing/")
11535 (synopsis "Python debug logging helper")
11536 (description "@code{python2-tracing} is a python library for
11537logging debug messages. It provides a way to turn debugging messages
11538on and off, based on the filename they occur in. It is much faster
11539than using @code{logging.Filter} to accomplish the same thing, which
11540matters when code is run in production mode. The actual logging still
11541happens using the @code{logging} library.")
11542 (license license:gpl3+)))
11543
11544(define-public python2-larch
11545 (package
11546 (name "python2-larch")
11547 (version "1.20151025")
11548 (source
11549 (origin
11550 (method url-fetch)
11551 (uri (string-append
11552 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
11553 version ".tar.gz"))
11554 (patches (search-patches
11555 "python2-larch-coverage-4.0a6-compatibility.patch"))
11556 (sha256
11557 (base32
11558 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
11559 (build-system python-build-system)
11560 (arguments
11561 `(#:python ,python-2
11562 #:phases
11563 (modify-phases %standard-phases
11564 ;; check phase needs to be run before the build phase. If not,
11565 ;; coverage-test-runner looks for tests for the built source files,
11566 ;; and fails.
11567 (delete 'check)
11568 (add-before 'build 'check
204ad455 11569 (lambda _ (invoke "make" "check"))))))
44d10b1f
RW
11570 (native-inputs
11571 `(("cmdtest" ,cmdtest)
11572 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
11573 (propagated-inputs
11574 `(("python2-tracing" ,python2-tracing)))
11575 (home-page "https://liw.fi/larch/")
11576 (synopsis "Python copy-on-write B-tree library")
11577 (description "@code{python2-larch} is an implementation of
11578particular kind of B-tree, based on research by Ohad Rodeh. See
11579@url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
11580on the data structure.
11581
11582The distinctive feature of this B-tree is that a node is never
11583(conceptually) modified. Instead, all updates are done by
11584copy-on-write. This makes it easy to clone a tree, and modify only the
11585clone, while other processes access the original tree.")
11586 (license license:gpl3+)))
11587
11588(define-public python-astroid
11589 (package
11590 (name "python-astroid")
11591 (version "2.1.0")
11592 (source
11593 (origin
11594 (method url-fetch)
11595 (uri (pypi-uri "astroid" version))
11596 (sha256
11597 (base32
11598 "08hz675knh4294bancdapql392fmbjyimhbyrmfkz1ka7l035c1m"))))
11599 (build-system python-build-system)
11600 (propagated-inputs
11601 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
11602 ("python-six" ,python-six)
11603 ("python-wrapt" ,python-wrapt)))
11604 (native-inputs
11605 `(("python-dateutil" ,python-dateutil)
11606 ("python-nose" ,python-nose)
11607 ("python-pytest" ,python-pytest)
11608 ("python-pytest-runner" ,python-pytest-runner)))
11609 (arguments
11610 `(#:phases
11611 (modify-phases %standard-phases
11612 (add-after 'unpack 'remove-spurious-test
11613 (lambda _
11614 ;; This can be removed after upgrading from python-3.7
11615 ;; https://github.com/PyCQA/astroid/issues/593
11616 ;; https://bugs.python.org/issue34056
11617 (delete-file "astroid/tests/unittest_modutils.py")
11618 #t))
11619 (replace 'check
11620 (lambda _
11621 (invoke "pytest" "astroid"))))))
11622 (home-page "https://github.com/PyCQA/astroid")
11623 (synopsis "Common base representation of python source code for pylint and
11624other projects")
11625 (description "@code{python-astroid} provides a common base representation
11626of python source code for projects such as pychecker, pyreverse, pylint, etc.
11627
11628It provides a compatible representation which comes from the _ast module. It
11629rebuilds the tree generated by the builtin _ast module by recursively walking
11630down the AST and building an extended ast. The new node classes have
11631additional methods and attributes for different usages. They include some
11632support for static inference and local name scopes. Furthermore, astroid
11633builds partial trees by inspecting living objects.")
11634 (license license:lgpl2.1+)
11635 (properties `((python2-variant . ,(delay python2-astroid))))))
11636
11637(define-public python2-astroid
11638 (let ((base (package-with-python2
11639 (strip-python2-variant python-astroid))))
11640 (package (inherit base)
11641 ;; Version 2.x removes python2 support.
11642 (version "1.6.5")
11643 (source
11644 (origin
11645 (method url-fetch)
11646 (uri (pypi-uri "astroid" version))
11647 (sha256
11648 (base32
11649 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
11650 (arguments
11651 (substitute-keyword-arguments (package-arguments base)
11652 ((#:phases phases)
11653 `(modify-phases ,phases
11654 (add-after 'unpack 'remove-spurious-test
11655 (lambda _
11656 ;; https://github.com/PyCQA/astroid/issues/276
11657 (delete-file "astroid/tests/unittest_brain.py")
11658 #t))
11659 (replace 'check
11660 (lambda _
11661 (invoke"python" "-m" "unittest" "discover"
11662 "-p" "unittest*.py")))))))
11663 (native-inputs `())
11664 (propagated-inputs
11665 `(("python2-backports-functools-lru-cache"
11666 ,python2-backports-functools-lru-cache)
11667 ("python2-enum34" ,python2-enum34)
11668 ("python2-singledispatch" ,python2-singledispatch)
11669 ,@(package-propagated-inputs base))))))
11670
11671(define-public python-isort
11672 (package
11673 (name "python-isort")
e2227b6a 11674 (version "4.3.4")
44d10b1f
RW
11675 (source
11676 (origin
e2227b6a
EF
11677 (method git-fetch)
11678 (uri (git-reference
11679 ;; Tests pass only from the Github sources
11680 (url "https://github.com/timothycrosley/isort")
11681 (commit version)))
11682 (file-name (git-file-name name version))
44d10b1f
RW
11683 (sha256
11684 (base32
e2227b6a 11685 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
44d10b1f
RW
11686 (build-system python-build-system)
11687 (native-inputs
11688 `(("python-mock" ,python-mock)
11689 ("python-pytest" ,python-pytest)))
11690 (home-page "https://github.com/timothycrosley/isort")
11691 (synopsis "Python utility/library to sort python imports")
11692 (description "@code{python-isort} is a python utility/library to sort
11693imports alphabetically, and automatically separated into sections. It
11694provides a command line utility, a python library and plugins for various
11695editors.")
e2227b6a
EF
11696 (license license:expat)
11697 (properties `((python2-variant . ,(delay python2-isort))))))
44d10b1f
RW
11698
11699(define-public python2-isort
e2227b6a
EF
11700 (let ((base (package-with-python2
11701 (strip-python2-variant python-isort))))
11702 (package (inherit base)
11703 (native-inputs
11704 `(("python2-futures" ,python2-futures)
11705 ,@(package-native-inputs base))))))
44d10b1f
RW
11706
11707(define-public python2-backports-functools-lru-cache
11708 (package
11709 (name "python2-backports-functools-lru-cache")
11710 (version "1.5")
11711 (source
11712 (origin
11713 (method url-fetch)
11714 ;; only the pypi tarballs contain the necessary metadata
11715 (uri (pypi-uri "backports.functools_lru_cache" version))
11716 (sha256
11717 (base32
11718 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
11719 (build-system python-build-system)
11720 (native-inputs
11721 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
11722 (arguments
11723 `(#:python ,python-2))
11724 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
11725 (synopsis "Backport of functools.lru_cache from Python 3.3")
11726 (description "@code{python2-backports-functools-lru-cache} is a backport
11727of @code{functools.lru_cache} from python 3.3.")
11728 (license license:expat)))
11729
11730(define-public python-configparser
11731 (package
11732 (name "python-configparser")
11733 (version "3.5.0")
11734 (source
11735 (origin
11736 (method url-fetch)
11737 (uri (string-append
11738 "https://bitbucket.org/ambv/configparser/get/"
11739 version ".tar.bz2"))
11740 (file-name (string-append name "-" version ".tar.gz"))
11741 (sha256
11742 (base32
11743 "0waq40as14abwzbb321hfz4vr1fi363nscy32ga14qvfygrg96wa"))))
11744 (build-system python-build-system)
809f003f 11745 (home-page "https://github.com/jaraco/configparser/")
44d10b1f
RW
11746 (synopsis "Backport of configparser from python 3.5")
11747 (description "@code{python-configparser} is a backport of
11748@code{configparser} from Python 3.5 so that it can be used directly
11749in other versions.")
11750 (license license:expat)))
11751
11752(define-public python2-configparser
11753 (package-with-python2 python-configparser))
11754
11755(define-public python-mando
11756 (package
11757 (name "python-mando")
11758 (version "0.6.4")
11759 (source (origin
11760 (method url-fetch)
11761 (uri (pypi-uri "mando" version))
11762 (sha256
11763 (base32
11764 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
11765 (build-system python-build-system)
11766 (propagated-inputs
11767 `(("python-rst2ansi" ,python-rst2ansi)
11768 ("python-six" ,python-six)))
11769 (native-inputs
11770 `(("python-pytest" ,python-pytest)))
11771 (home-page "https://mando.readthedocs.org/")
11772 (synopsis
11773 "Wrapper around argparse, allowing creation of complete CLI applications")
11774 (description
11775 "This package is a wrapper around argparse, allowing you to write complete CLI
11776applications in seconds while maintaining all the flexibility.")
11777 (license license:expat)))
11778
11779(define-public python2-mando
11780 (package-with-python2 python-mando))
11781
70daf82f
RW
11782(define-public python2-argparse
11783 (package
11784 (name "python2-argparse")
11785 (version "1.4.0")
11786 (source
11787 (origin
11788 (method url-fetch)
11789 (uri (pypi-uri "argparse" version))
11790 (sha256
11791 (base32
11792 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
11793 (build-system python-build-system)
11794 (arguments
11795 `(#:python ,python-2))
11796 (home-page "https://github.com/ThomasWaldmann/argparse/")
11797 (synopsis "Python command-line parsing library")
11798 (description
11799 "This package is mostly for people who want to have @code{argparse} on
11800older Pythons because it was not part of the standard library back then.")
11801 (license license:psfl)))
11802
44d10b1f
RW
11803(define-public python-fudge
11804 (package
11805 (name "python-fudge")
11806 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
11807 ;; package, which is currently the only use of this package.
11808 (version "0.9.6")
11809 (source
11810 (origin
11811 (method url-fetch)
11812 (uri (pypi-uri "fudge" version))
11813 (sha256
11814 (base32
11815 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
11816 (build-system python-build-system)
11817 (arguments
11818 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
11819 (home-page "https://github.com/fudge-py/fudge")
11820 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
11821 (description
11822 "Fudge is a Python module for using fake objects (mocks and stubs) to
11823test real ones.
11824
11825In readable Python code, you declare the methods available on your fake object
11826and how they should be called. Then you inject that into your application and
11827start testing. This declarative approach means you don’t have to record and
11828playback actions and you don’t have to inspect your fakes after running code.
11829If the fake object was used incorrectly then you’ll see an informative
11830exception message with a traceback that points to the culprit.")
11831 (license license:expat)))
11832
11833(define-public python2-fudge
11834 (package-with-python2 python-fudge))
11835
11836(define-public python-mwclient
11837 (package
11838 (name "python-mwclient")
11839 (version "0.8.4")
11840 (source
11841 (origin
11842 (method url-fetch)
11843 ;; The PyPI version wouldn't contain tests.
11844 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
11845 "v" version ".tar.gz"))
11846 (file-name (string-append name "-" version ".tar.gz"))
11847 (sha256
11848 (base32
11849 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
11850 (build-system python-build-system)
11851 (propagated-inputs
11852 `(("python-requests" ,python-requests)
11853 ("python-requests-oauthlib"
11854 ,python-requests-oauthlib)
11855 ("python-six" ,python-six)))
11856 (native-inputs
11857 `(("python-mock" ,python-mock)
11858 ("python-pytest" ,python-pytest)
11859 ("python-pytest-pep8" ,python-pytest-pep8)
11860 ("python-pytest-cache" ,python-pytest-cache)
11861 ("python-pytest-cov" ,python-pytest-cov)
11862 ("python-responses" ,python-responses)))
11863 (home-page "https://github.com/btongminh/mwclient")
11864 (synopsis "MediaWiki API client")
11865 (description "This package provides a MediaWiki API client.")
11866 (license license:expat)))
11867
11868(define-public python2-mwclient
11869 (package-with-python2 python-mwclient))
11870
11871(define-public python-utils
11872 (package
11873 (name "python-utils")
11874 (version "2.1.0")
11875 (source (origin
11876 (method url-fetch)
11877 (uri (pypi-uri "python-utils" version))
11878 (sha256
11879 (base32
11880 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
11881 (build-system python-build-system)
11882 (native-inputs
11883 `(("pytest-runner" ,python-pytest-runner)
11884 ("pytest" ,python-pytest)
11885 ("six" ,python-six)))
11886 (home-page "https://github.com/WoLpH/python-utils")
11887 (synopsis "Convenient utilities not included with the standard Python install")
11888 (description
11889 "Python Utils is a collection of small Python functions and classes which
11890make common patterns shorter and easier.")
11891 (license license:bsd-2)))
11892
11893(define-public python2-utils
11894 (package-with-python2 python-utils))
11895
11896(define-public python-sphinx-me
11897 (package
11898 (name "python-sphinx-me")
11899 (version "0.3")
11900 (source
11901 (origin
11902 (method url-fetch)
11903 (uri (pypi-uri "sphinx-me" version))
11904 (sha256
11905 (base32
11906 "06jzgp213zihnvpcy2y5jy3ykid3apc2ncp2pg6a2g05lhiziglq"))))
11907 (build-system python-build-system)
11908 (home-page "https://github.com/stephenmcd/sphinx-me")
11909 (synopsis "Create a Sphinx documentation shell")
11910 (description
11911 "Create a Sphinx documentation shell for your project and include the
11912README file as the documentation index. It handles extracting the required
11913meta data such as the project name, author and version from your project for
11914use in your Sphinx docs.")
11915 (license license:bsd-2)))
11916
11917(define-public python2-sphinx-me
11918 (package-with-python2 python-sphinx-me))
11919
11920(define-public python-diff-match-patch
11921 (package
11922 (name "python-diff-match-patch")
11923 (version "20121119")
11924 (source
11925 (origin
11926 (method url-fetch)
11927 (uri (pypi-uri "diff-match-patch" version))
11928 (sha256
11929 (base32
11930 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
11931 (build-system python-build-system)
11932 (home-page "https://code.google.com/p/google-diff-match-patch")
11933 (synopsis "Synchronize plain text")
11934 (description "Diff Match and Patch libraries offer robust algorithms to
11935perform the operations required for synchronizing plain text.")
11936 (license license:asl2.0)))
11937
11938(define-public python2-diff-match-patch
11939 (package-with-python2 python-diff-match-patch))
11940
11941(define-public python-dirsync
11942 (package
11943 (name "python-dirsync")
11944 (version "2.2.3")
11945 (source
11946 (origin
11947 (method url-fetch)
11948 (uri (pypi-uri "dirsync" version))
11949 (sha256
11950 (base32
11951 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
11952 (build-system python-build-system)
11953 (propagated-inputs
11954 `(("six" ,python-six)))
11955 (home-page "https://bitbucket.org/tkhyn/dirsync")
11956 (synopsis "Advanced directory tree synchronisation tool")
11957 (description "Advanced directory tree synchronisation tool.")
11958 (license license:expat)))
11959
11960(define-public python2-dirsync
11961 (package-with-python2 python-dirsync))
11962
11963(define-public python-levenshtein
11964 (package
11965 (name "python-levenshtein")
11966 (version "0.12.0")
11967 (source
11968 (origin
11969 (method url-fetch)
11970 (uri (pypi-uri "python-Levenshtein" version))
11971 (sha256
11972 (base32
11973 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
11974 (build-system python-build-system)
11975 (home-page "https://github.com/ztane/python-Levenshtein")
11976 (synopsis "Fast computation of Levenshtein distance and string similarity")
11977 (description
11978 "The Levenshtein Python C extension module contains functions for fast computation of
11979@enumerate
11980@item Levenshtein (edit) distance, and edit operations
11981@item string similarity
11982@item approximate median strings, and generally string averaging
11983@item string sequence and set similarity
11984@end enumerate
11985It supports both normal and Unicode strings.")
11986 (license license:gpl2+)))
11987
11988(define-public python2-levenshtein
11989 (package-with-python2 python-levenshtein))
11990
11991(define-public python-scandir
11992 (package
11993 (name "python-scandir")
11994 (version "1.9.0")
11995 (source
11996 (origin
11997 (method url-fetch)
11998 (uri (pypi-uri "scandir" version))
11999 (sha256
12000 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
12001 (build-system python-build-system)
12002 (arguments
12003 `(#:phases (modify-phases %standard-phases
12004 (replace 'check
12005 (lambda _
12006 (invoke "python" "test/run_tests.py"))))))
12007 (home-page "https://github.com/benhoyt/scandir")
12008 (synopsis "Directory iteration function")
12009 (description
12010 "Directory iteration function like os.listdir(), except that instead of
12011returning a list of bare filenames, it yields DirEntry objects that include
12012file type and stat information along with the name. Using scandir() increases
12013the speed of os.walk() by 2-20 times (depending on the platform and file
12014system) by avoiding unnecessary calls to os.stat() in most cases.
12015
12016This package is part of the Python standard library since version 3.5.")
12017 (license license:bsd-3)))
12018
12019(define-public python2-scandir
12020 (package-with-python2 python-scandir))
12021
12022(define-public python2-stemming
12023 (package
12024 (name "python2-stemming")
12025 (version "1.0.1")
12026 (source
12027 (origin
12028 (method url-fetch)
12029 (uri (pypi-uri "stemming" version))
12030 (sha256
12031 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
12032 (build-system python-build-system)
12033 (arguments
12034 `(#:python ,python-2))
12035 (home-page "https://bitbucket.org/mchaput/stemming/overview")
12036 (synopsis "Python implementations of various stemming algorithms")
12037 (description
12038 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
12039stemming algorithms for English. These implementations are straightforward and
12040efficient, unlike some Python versions of the same algorithms available on the
12041Web. This package is an extraction of the stemming code included in the Whoosh
12042search engine.")
12043 (license license:public-domain)))
12044
12045(define-public python-factory-boy
12046 (package
12047 (name "python-factory-boy")
12048 (version "2.8.1")
12049 (source
12050 (origin
12051 (method url-fetch)
12052 (uri (pypi-uri "factory_boy" version))
12053 (sha256
12054 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
12055 (build-system python-build-system)
12056 (arguments
12057 ;; Tests are not included in the tarball.
12058 `(#:tests? #f))
12059 (propagated-inputs
12060 `(("faker" ,python-faker)))
12061 (home-page "https://github.com/benhoyt/scandir")
12062 (synopsis "Versatile test fixtures replacement")
12063 (description
12064 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
12065
12066As a fixtures replacement tool, it aims to replace static, hard to maintain
12067fixtures with easy-to-use factories for complex object.
12068
12069Instead of building an exhaustive test setup with every possible combination
12070of corner cases, factory_boy allows you to use objects customized for the
12071current test, while only declaring the test-specific fields")
12072 (license license:expat)))
12073
12074(define-public python2-factory-boy
12075 (package-with-python2 python-factory-boy))
12076
12077(define-public python-translate-toolkit
12078 (package
12079 (name "python-translate-toolkit")
12080 (version "2.1.0")
12081 (source
12082 (origin
12083 (method url-fetch)
12084 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
12085 (sha256
12086 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
12087 (build-system python-build-system)
12088 (native-inputs
12089 `(("python-pytest" ,python-pytest)
12090 ("python-sphinx" ,python-sphinx)))
12091 (propagated-inputs
12092 `(("python-babel" ,python-babel)
12093 ("python-beautifulsoup4" ,python-beautifulsoup4)
12094 ("python-chardet" ,python-chardet)
12095 ("python-diff-match-patch" ,python-diff-match-patch)
12096 ("python-levenshtein" ,python-levenshtein)
12097 ("python-lxml" ,python-lxml)
12098 ("python-six" ,python-six)
12099 ("python-vobject" ,python-vobject)
12100 ("python-pyyaml" ,python-pyyaml)))
12101 (arguments
12102 ;; TODO: tests are not run, because they end with
12103 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
12104 ;; 'parse_funcs'
12105 ;; during test setup.
12106 `(#:tests? #f))
12107 (home-page "http://toolkit.translatehouse.org")
12108 (synopsis "Tools and API for translation and localization engineering")
12109 (description
12110 "Tools and API for translation and localization engineering. It contains
12111several utilities, as well as an API for building localization tools.")
12112 (license license:gpl2+)))
12113
12114(define-public python2-translate-toolkit
12115 (package-with-python2 python-translate-toolkit))
12116
12117(define-public python-packaging
12118 (package
12119 (name "python-packaging")
12120 (version "18.0")
12121 (source
12122 (origin
12123 (method url-fetch)
12124 (uri (pypi-uri "packaging" version))
12125 (sha256
12126 (base32
12127 "01wq9c53ix5rz6qg2c98gy8n4ff768rmanifm8m5jpjiaizj51h8"))))
12128 (build-system python-build-system)
12129 (arguments
12130 `(#:phases (modify-phases %standard-phases
12131 (replace 'check
12132 (lambda _ (invoke "py.test" "-vv"))))))
12133 (native-inputs
12134 `(("python-pretend" ,python-pretend)
12135 ("python-pytest" ,python-pytest)))
12136 (propagated-inputs
12137 `(("python-pyparsing" ,python-pyparsing)
12138 ("python-six" ,python-six)))
12139 (home-page "https://github.com/pypa/packaging")
12140 (synopsis "Core utilities for Python packages")
12141 (description "Packaging is a Python module for dealing with Python packages.
12142It offers an interface for working with package versions, names, and dependency
12143information.")
12144 ;; From 'LICENSE': This software is made available under the terms of
12145 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
12146 ;; Contributions to this software is made under the terms of *both* these
12147 ;; licenses.
12148 (license (list license:asl2.0 license:bsd-2))))
12149
12150(define-public python2-packaging
12151 (package-with-python2 python-packaging))
12152
12153(define-public python-relatorio
12154 (package
12155 (name "python-relatorio")
12156 (version "0.8.0")
12157 (source
12158 (origin
12159 (method url-fetch)
12160 (uri (pypi-uri "relatorio" version))
12161 (sha256
12162 (base32
12163 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
12164 (build-system python-build-system)
12165 (propagated-inputs
12166 `(("python-lxml" ,python-lxml)
12167 ("python-genshi" ,python-genshi)))
12168 (native-inputs
12169 `(("python-magic" ,python-magic)))
12170 (home-page "https://relatorio.tryton.org/")
12171 (synopsis "Templating library able to output ODT and PDF files")
12172 (description "Relatorio is a templating library which provides a way to
12173easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
12174for more filetypes can be easily added by creating plugins for them.")
12175 (license license:gpl3+)))
12176
12177(define-public python2-relatorio
12178 (package-with-python2 python-relatorio))
12179
12180(define-public python-radon
12181 (package
12182 (name "python-radon")
12183 (version "2.2.0")
12184 (source
12185 (origin
12186 (method url-fetch)
12187 (uri (pypi-uri "radon" version))
12188 (sha256
12189 (base32
12190 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
12191 (build-system python-build-system)
12192 (arguments
12193 `(#:phases (modify-phases %standard-phases
12194 (replace 'check
12195 (lambda _
12196 (invoke "python" "radon/tests/run.py"))))))
12197 (propagated-inputs
12198 `(("python-colorama" ,python-colorama)
12199 ("python-flake8-polyfill" ,python-flake8-polyfill)
12200 ("python-mando" ,python-mando)))
12201 (native-inputs
12202 `(("python-pytest" ,python-pytest)
12203 ("python-pytest-mock" ,python-pytest-mock)))
12204 (home-page "https://radon.readthedocs.org/")
12205 (synopsis "Code Metrics in Python")
12206 (description "Radon is a Python tool which computes various code metrics.
12207Supported metrics are:
12208@itemize @bullet
12209@item raw metrics: SLOC, comment lines, blank lines, &c.
12210@item Cyclomatic Complexity (i.e. McCabe’s Complexity)
12211@item Halstead metrics (all of them)
12212@item the Maintainability Index (a Visual Studio metric)
12213@end itemize")
12214 (license license:expat)))
12215
12216(define-public python2-radon
12217 (package-with-python2 python-radon))
12218
12219(define-public python-sure
12220 (package
12221 (name "python-sure")
12222 (version "1.4.11")
12223 (source
12224 (origin
12225 (method url-fetch)
12226 (uri (pypi-uri "sure" version))
12227 (sha256
12228 (base32
12229 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
12230 (build-system python-build-system)
12231 (propagated-inputs
12232 `(("python-mock" ,python-mock)
12233 ("python-six" ,python-six)))
12234 (native-inputs
12235 `(("python-nose" ,python-nose)))
12236 (home-page "https://github.com/gabrielfalcao/sure")
12237 (synopsis "Automated testing library in python for python")
12238 (description
12239 "Sure is a python library that leverages a DSL for writing assertions.
12240Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
12241 (license license:gpl3+)))
12242
12243(define-public python2-sure
12244 (package-with-python2 python-sure))
12245
12246(define-public python2-couleur
12247 ;; This package does not seem to support python3 at all, hence,
12248 ;; only the python2 variant definition is provided.
12249 (package
12250 (name "python2-couleur")
12251 (version "0.6.2")
12252 (source
12253 (origin
12254 (method url-fetch)
12255 (uri (pypi-uri "couleur" version))
12256 (sha256
12257 (base32
12258 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
12259 (build-system python-build-system)
12260 (arguments
12261 `(#:python ,python-2))
12262 (home-page "https://github.com/gabrielfalcao/couleur")
12263 (synopsis
12264 "ANSI terminal tool for python, colored shell and other handy fancy features")
12265 (description
12266 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
12267terminal such as coloured output in the shell, overwriting output, indentation, etc.")
12268 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
12269 ;; https://github.com/gabrielfalcao/couleur/issues/11
12270 (license license:lgpl3+)))
12271
12272(define-public python-misaka
12273 (package
12274 (name "python-misaka")
0dcb3412 12275 (version "2.1.1")
44d10b1f
RW
12276 (source
12277 (origin
12278 (method url-fetch)
12279 (uri (pypi-uri "misaka" version))
12280 (sha256
12281 (base32
0dcb3412 12282 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
44d10b1f
RW
12283 (build-system python-build-system)
12284 (arguments
12285 `(;; Line 37 of setup.py calls self.run_command('develop')
12286 ;; in the 'check' phase. This command seems to be trying
12287 ;; to write to
12288 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
12289 ;; for which it does not have the permission to write.
12290 #:tests? #f))
12291 (propagated-inputs
12292 `(("python-cffi" ,python-cffi)))
12293 (home-page "https://github.com/FSX/misaka")
12294 (synopsis "Python binding for Hoedown")
12295 (description
12296 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
12297library written in C. It features a fast HTML renderer and functionality to make custom
12298renderers (e.g. man pages or LaTeX).")
12299 (license license:expat)))
12300
12301(define-public python2-misaka
12302 (package-with-python2 python-misaka))
12303
12304(define-public python2-steadymark
12305 ;; This is forced into being a python2 only variant
12306 ;; due to its dependence on couleur that has no support
12307 ;; for python3
12308 (package
12309 (name "python2-steadymark")
12310 (version "0.7.3")
12311 (source
12312 (origin
12313 (method url-fetch)
12314 (uri (pypi-uri "steadymark" version))
12315 (sha256
12316 (base32
12317 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
12318 (build-system python-build-system)
12319 (native-inputs
12320 `(("python-couleur" ,python2-couleur)
12321 ("python-sure" ,python2-sure)
12322 ("python-misaka" ,python2-misaka)))
12323 (arguments
12324 `(#:python ,python-2
12325 #:phases
12326 (modify-phases %standard-phases
12327 (add-before 'build 'patch-setup-py
12328 (lambda _
12329 ;; Update requirements from dependency==version
12330 ;; to dependency>=version
12331 (substitute* "setup.py"
12332 (("==") ">="))
12333 #t)))))
12334 (home-page "https://github.com/gabrielfalcao/steadymark")
12335 (synopsis "Markdown-based test runner for python")
12336 (description
12337 "@code{Steadymark} allows documentation to be written in github-flavoured
12338markdown. The documentation may contain snippets of code surrounded by python
12339code blocks and @code{Steadymark} will find these snippets and run them, making
12340sure that there are no old malfunctional examples in the documentation examples.")
12341 (license license:expat)))
12342
12343(define-public python-jsonpointer
12344 (package
12345 (name "python-jsonpointer")
12346 (version "1.10")
12347 (source
12348 (origin
12349 (method url-fetch)
12350 (uri (pypi-uri "jsonpointer" version))
12351 (sha256
12352 (base32
12353 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
12354 (build-system python-build-system)
12355 (home-page "https://github.com/stefankoegl/python-json-pointer")
12356 (synopsis "Identify specific nodes in a JSON document")
12357 (description "@code{jsonpointer} allows you to access specific nodes
12358by path in a JSON document (see RFC 6901).")
12359 (license license:bsd-3)))
12360
12361(define-public python2-jsonpointer
12362 (package-with-python2 python-jsonpointer))
12363
12364(define-public python-jsonpatch
12365 (package
12366 (name "python-jsonpatch")
12367 (version "1.16")
12368 (source
12369 (origin
12370 (method url-fetch)
12371 ;; pypi version lacks tests.js
12372 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12373 "archive/v" version ".tar.gz"))
12374 (file-name (string-append name "-" version ".tar.gz"))
12375 (sha256
12376 (base32
12377 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
12378 (build-system python-build-system)
12379 (native-inputs
12380 `(("python-jsonpointer" ,python-jsonpointer)))
12381 (home-page "https://github.com/stefankoegl/python-json-patch")
12382 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
12383 (description "@code{jsonpatch} is a library and program that allows
12384applying JSON Patches according to RFC 6902.")
12385 (license license:bsd-3)))
12386
12387(define-public python2-jsonpatch
12388 (package-with-python2 python-jsonpatch))
12389
12390(define-public python-jsonpatch-0.4
12391 (package (inherit python-jsonpatch)
12392 (name "python-jsonpatch")
12393 (version "0.4")
12394 (source
12395 (origin
12396 (method url-fetch)
12397 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12398 "archive/v" version ".tar.gz"))
12399 (file-name (string-append name "-" version ".tar.gz"))
12400 (sha256
12401 (base32
12402 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
12403
12404(define-public python2-jsonpatch-0.4
12405 (package-with-python2 python-jsonpatch-0.4))
12406
12407(define-public python-rfc3986
12408 (package
12409 (name "python-rfc3986")
12410 (version "1.1.0")
12411 (source (origin
12412 (method url-fetch)
12413 (uri (pypi-uri "rfc3986" version))
12414 (sha256
12415 (base32
12416 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
12417 (build-system python-build-system)
12418 (arguments
12419 `(#:modules ((guix build utils)
12420 (guix build python-build-system)
12421 (ice-9 ftw)
12422 (srfi srfi-1)
12423 (srfi srfi-26))
12424 #:phases
12425 (modify-phases %standard-phases
12426 (replace 'check
12427 (lambda _
12428 (let ((cwd (getcwd)))
12429 (setenv "PYTHONPATH"
12430 (string-append cwd "/build/"
12431 (find (cut string-prefix? "lib" <>)
12432 (scandir (string-append cwd "/build")))
12433 ":"
12434 (getenv "PYTHONPATH")))
12435 (invoke "pytest" "-v")))))))
12436 (native-inputs
12437 `(("python-pytest" ,python-pytest)))
12438 (home-page "https://rfc3986.readthedocs.io/")
12439 (synopsis "Parse and validate URI references")
12440 (description
12441 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
12442validation and authority parsing. This module also supports RFC@tie{}6874
12443which adds support for zone identifiers to IPv6 addresses.")
12444 (license license:asl2.0)))
12445
12446(define-public python2-rfc3986
12447 (package-with-python2 python-rfc3986))
12448
12449(define-public python-rfc3987
12450 (package
12451 (name "python-rfc3987")
12452 (version "1.3.7")
12453 (source
12454 (origin
12455 (method url-fetch)
12456 (uri (pypi-uri "rfc3987" version))
12457 (sha256
12458 (base32
12459 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
12460 (build-system python-build-system)
12461 (home-page "https://pypi.python.org/pypi/rfc3987")
12462 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
12463 (description "@code{rfc3987} provides routines for parsing and
12464validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
12465 (license license:gpl3+)))
12466
12467(define-public python2-rfc3987
12468 (package-with-python2 python-rfc3987))
12469
12470(define-public python-validate-email
12471 (package
12472 (name "python-validate-email")
12473 (version "1.3")
12474 (source
12475 (origin
12476 (method url-fetch)
12477 (uri (pypi-uri "validate_email" version))
12478 (sha256
12479 (base32
12480 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
12481 (build-system python-build-system)
12482 (home-page "https://github.com/syrusakbary/validate_email")
12483 (synopsis "Verifies if an email address is valid and really exists")
12484 (description "@code{validate_email} can be used to verify if an email
12485address is valid and really exists.")
12486 (license license:lgpl3+)))
12487
12488(define-public python2-validate-email
12489 (package-with-python2 python-validate-email))
12490
12491(define-public python-flex
12492 (package
12493 (name "python-flex")
12494 (version "6.10.0")
12495 (source
12496 (origin
12497 (method url-fetch)
12498 (uri (pypi-uri "flex" version))
12499 (sha256
12500 (base32
12501 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
12502 (build-system python-build-system)
12503 (propagated-inputs
12504 `(("python-click" ,python-click)
12505 ("python-iso8601" ,python-iso8601)
12506 ("python-jsonpointer" ,python-jsonpointer)
12507 ("python-pyyaml" ,python-pyyaml)
12508 ("python-requests" ,python-requests)
12509 ("python-rfc3987" ,python-rfc3987)
12510 ("python-six" ,python-six)
12511 ("python-validate-email" ,python-validate-email)))
12512 (home-page "https://github.com/pipermerriam/flex")
12513 (synopsis "Validates Swagger schemata")
12514 (description "@code{flex} can be used to validate Swagger schemata.")
12515 (license license:bsd-3)))
12516
12517(define-public python2-flex
12518 (package-with-python2 python-flex))
12519
12520(define-public python-marshmallow
12521 (package
12522 (name "python-marshmallow")
12523 (version "3.0.0b14")
12524 (source
12525 (origin
12526 (method url-fetch)
12527 (uri (pypi-uri "marshmallow" version))
12528 (sha256
12529 (base32
12530 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
12531 (build-system python-build-system)
12532 (propagated-inputs
12533 `(("python-dateutil" ,python-dateutil)
12534 ("python-simplejson" ,python-simplejson)))
12535 (native-inputs
12536 `(("python-pytest" ,python-pytest)
12537 ("python-pytz" ,python-pytz)))
12538 (home-page "https://github.com/marshmallow-code/marshmallow")
12539 (synopsis "Convert complex datatypes to and from native
12540Python datatypes.")
12541 (description "@code{marshmallow} provides a library for converting
12542complex datatypes to and from native Python datatypes.")
12543 (license license:expat)))
12544
12545(define-public python2-marshmallow
12546 (package-with-python2 python-marshmallow))
12547
12548(define-public python-apispec
12549 (package
12550 (name "python-apispec")
12551 (version "0.25.3")
12552 (source
12553 (origin
12554 (method url-fetch)
12555 (uri (pypi-uri "apispec" version))
12556 (sha256
12557 (base32
12558 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
12559 (build-system python-build-system)
12560 (propagated-inputs
12561 `(("python-pyyaml" ,python-pyyaml)))
12562 (native-inputs
12563 `(("python-pytest" ,python-pytest)
12564 ("python-flask" ,python-flask)
12565 ("python-marshmallow" ,python-marshmallow)
12566 ("python-tornado" ,python-tornado)
12567 ("python-bottle" ,python-bottle)
12568 ("python-mock" ,python-mock)))
12569 (home-page "https://github.com/marshmallow-code/apispec")
12570 (synopsis "Swagger 2.0 API specification generator")
12571 (description "@code{python-apispec} is a pluggable API specification
12572generator. Currently supports the OpenAPI specification (f.k.a.
12573Swagger 2.0).")
12574 (license license:expat)))
12575
12576(define-public python2-apispec
12577 (package-with-python2 python-apispec))
12578
12579(define-public python-flasgger
12580 (package
12581 (name "python-flasgger")
12582 (version "0.6.3")
12583 (source
12584 (origin
1a04d421
TGR
12585 (method git-fetch)
12586 (uri (git-reference
12587 (url "https://github.com/rochacbruno/flasgger.git")
12588 (commit version)))
12589 (file-name (git-file-name name version))
44d10b1f 12590 (sha256
1a04d421 12591 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
44d10b1f
RW
12592 (build-system python-build-system)
12593 (arguments
12594 `(#:phases
12595 (modify-phases %standard-phases
12596 (replace 'check
12597 (lambda* (#:key inputs outputs #:allow-other-keys)
12598 (substitute* "Makefile"
12599 (("flake8 flasgger --ignore=F403")
12600 "flake8 flasgger --ignore=E731,F403"))
12601 (setenv "PYTHONPATH" (string-append (getcwd)
12602 ":"
12603 (getenv "PYTHONPATH")))
ac599a09 12604 (invoke "py.test"))))))
44d10b1f
RW
12605 (propagated-inputs
12606 `(("python-flask" ,python-flask)
12607 ("python-pyyaml" ,python-pyyaml)
12608 ("python-jsonschema" ,python-jsonschema)
12609 ("python-mistune" ,python-mistune)
12610 ("python-six" ,python-six)))
12611 (native-inputs
12612 `(("python-decorator" ,python-decorator)
12613 ("python-flake8" ,python-flake8)
12614 ("python-flask-restful" ,python-flask-restful)
12615 ("python-flex" ,python-flex)
12616 ("python-pytest" ,python-pytest)
12617 ("python-pytest-cov" ,python-pytest-cov)
12618 ("python-marshmallow" ,python-marshmallow)
12619 ("python-apispec" ,python-apispec)))
12620 (home-page "https://github.com/rochacbruno/flasgger/")
12621 (synopsis "Extract Swagger specs from your Flask project")
12622 (description "@code{python-flasgger} allows extracting Swagger specs
12623from your Flask project. It is a fork of Flask-Swagger.")
12624 (license license:expat)))
12625
12626(define-public python2-flasgger
12627 (package-with-python2 python-flasgger))
12628
12629(define-public python-swagger-spec-validator
12630 (package
12631 (name "python-swagger-spec-validator")
12632 (version "2.1.0")
12633 (source
12634 (origin
12635 (method url-fetch)
12636 (uri (pypi-uri "swagger-spec-validator" version))
12637 (sha256
12638 (base32
12639 "13hkpn2lycwr0468yqhjb3kwszqf7hjwlq61w7vdxq1caz31k4nw"))))
12640 (build-system python-build-system)
12641 (propagated-inputs
12642 `(("python-jsonschema" ,python-jsonschema)
12643 ("python-six" ,python-six)))
12644 (home-page
12645 "https://github.com/Yelp/swagger_spec_validator")
12646 (synopsis "Validation of Swagger specifications")
12647 (description "@code{swagger_spec_validator} provides a library for
12648validating Swagger API specifications.")
12649 (license license:asl2.0)))
12650
12651(define-public python2-swagger-spec-validator
12652 (package-with-python2 python-swagger-spec-validator))
12653
12654(define-public python-apache-libcloud
12655 (package
12656 (name "python-apache-libcloud")
12657 (version "2.4.0")
12658 (source
12659 (origin
12660 (method url-fetch)
12661 (uri (pypi-uri "apache-libcloud" version))
12662 (sha256
12663 (base32
12664 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
12665 (build-system python-build-system)
12666 (arguments
12667 `(#:phases
12668 (modify-phases %standard-phases
12669 (add-after 'unpack 'patch-ssh
12670 (lambda* (#:key inputs #:allow-other-keys)
12671 (substitute* "libcloud/compute/ssh.py"
12672 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
12673 "/bin/ssh" "'")))
12674 #t))
12675 (add-after 'unpack 'patch-tests
12676 (lambda _
12677 (substitute* "./libcloud/test/test_file_fixtures.py"
12678 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
12679 (("def _ascii") "def _raw_data(self, method, url, body, headers):
12680 return (httplib.OK,
12681 \"1234abcd\",
12682 {\"test\": \"value\"},
12683 httplib.responses[httplib.OK])
12684 def _ascii"))
12685 (substitute* "libcloud/test/compute/test_ssh_client.py"
12686 (("class ShellOutSSHClientTests")
12687 "@unittest.skip(\"Guix container doesn't have ssh service\")
12688class ShellOutSSHClientTests")
12689 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
12690 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
12691 (("'.xF0', '.x90', '.x8D', '.x88'")
12692 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
12693 #t))
12694 (add-before 'check 'copy-secret
12695 (lambda _
12696 (copy-file "libcloud/test/secrets.py-dist"
12697 "libcloud/test/secrets.py")
12698 #t)))))
12699 (inputs
12700 `(("openssh" ,openssh)))
12701 (propagated-inputs
12702 `(("python-paramiko" ,python-paramiko)
12703 ("python-requests" ,python-requests)))
12704 (native-inputs
12705 `(("python-lockfile" ,python-lockfile)
12706 ("python-mock" ,python-mock)
12707 ("python-pytest" ,python-pytest)
12708 ("python-pytest-runner" ,python-pytest-runner)
12709 ("python-requests-mock" ,python-requests-mock)))
12710 (home-page "https://libcloud.apache.org/")
12711 (synopsis "Unified Cloud API")
12712 (description "@code{libcloud} is a Python library for interacting with
12713many of the popular cloud service providers using a unified API.")
12714 (license license:asl2.0)))
12715
12716(define-public python2-apache-libcloud
12717 (package-with-python2 python-apache-libcloud))
12718
12719(define-public python-smmap2
12720 (package
12721 (name "python-smmap2")
12722 (version "2.0.3")
12723 (source
12724 (origin
12725 (method url-fetch)
12726 (uri (pypi-uri "smmap2" version))
12727 (sha256
12728 (base32
12729 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
12730 (build-system python-build-system)
12731 (native-inputs
12732 `(("python-nosexcover" ,python-nosexcover)))
12733 (home-page "https://github.com/Byron/smmap")
12734 (synopsis "Python sliding window memory map manager")
12735 (description "@code{smmap2} is a pure Python implementation of a sliding
12736window memory map manager.")
12737 (license license:bsd-3)))
12738
12739(define-public python2-smmap2
12740 (package-with-python2 python-smmap2))
12741
12742(define-public python-regex
12743 (package
12744 (name "python-regex")
12745 (version "2017.06.07")
12746 (source (origin
12747 (method url-fetch)
12748 (uri (pypi-uri "regex" version))
12749 (sha256
12750 (base32
12751 "06r6b7yigikbj3a72whl85r2b64pj1r0ypmw9yalmkm0wnxq8mz4"))))
12752 (build-system python-build-system)
12753 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
12754 (synopsis "Alternative regular expression module")
12755 (description "This regular expression implementation is backwards-
12756compatible with the standard @code{re} module, but offers additional
12757functionality like full case-folding for case-insensitive matches in Unicode.")
12758 (license license:psfl)))
12759
12760(define-public python2-regex
12761 (package-with-python2 python-regex))
12762
12763(define-public python2-pyopengl
12764 (package
12765 (name "python2-pyopengl")
12766 (version "3.1.0")
12767 (source
12768 (origin
12769 (method url-fetch)
12770 (uri (pypi-uri "PyOpenGL" version))
12771 (sha256
12772 (base32
12773 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
12774 (arguments
12775 `(#:python ,python-2))
12776 (build-system python-build-system)
12777 (home-page "http://pyopengl.sourceforge.net")
12778 (synopsis "Standard OpenGL bindings for Python")
12779 (description
12780 "PyOpenGL is the most common cross platform Python binding to OpenGL and
12781related APIs. The binding is created using the standard @code{ctypes}
12782library.")
12783 (license license:bsd-3)))
12784
12785(define-public python2-pyopengl-accelerate
12786 (package
12787 (inherit python2-pyopengl)
12788 (name "python2-pyopengl-accelerate")
12789 (version "3.1.0")
12790 (source
12791 (origin
12792 (method url-fetch)
12793 (uri (pypi-uri "PyOpenGL-accelerate" version))
12794 (sha256
12795 (base32
12796 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
12797 (synopsis "Acceleration code for PyOpenGL")
12798 (description
12799 "This is the Cython-coded accelerator module for PyOpenGL.")))
12800
12801(define-public python-rencode
12802 (package
12803 (name "python-rencode")
12804 (version "1.0.5")
12805 (source
12806 (origin
12807 (method url-fetch)
12808 (uri (pypi-uri "rencode" version))
12809 (sha256
12810 (base32
12811 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
12812 (build-system python-build-system)
12813 (arguments
12814 `(#:phases
12815 (modify-phases %standard-phases
12816 (add-before 'check 'delete-bogus-test
12817 ;; This test requires /home/aresch/Downloads, which is not provided by
12818 ;; the build environment.
12819 (lambda _
12820 (delete-file "rencode/t.py")
12821 #t)))))
12822 (native-inputs `(("pkg-config" ,pkg-config)
12823 ("python-cython" ,python-cython)))
12824 (home-page "https://github.com/aresch/rencode")
12825 (synopsis "Serialization of heterogeneous data structures")
12826 (description
12827 "The @code{rencode} module is a data structure serialization library,
12828similar to @code{bencode} from the BitTorrent project. For complex,
12829heterogeneous data structures with many small elements, r-encoding stake up
12830significantly less space than b-encodings. This version of rencode is a
12831complete rewrite in Cython to attempt to increase the performance over the
12832pure Python module.")
12833 (license license:bsd-3)))
12834
12835(define-public python2-rencode
12836 (package-with-python2 python-rencode))
12837
12838(define-public python-xenon
12839 (package
12840 (name "python-xenon")
12841 (version "0.5.4")
12842 (source
12843 (origin
12844 (method url-fetch)
12845 (uri (pypi-uri "xenon" version))
12846 (sha256
12847 (base32
12848 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
12849 (build-system python-build-system)
12850 (native-inputs
12851 `(("python-pyyaml" ,python-pyyaml)
12852 ("python-radon" ,python-radon)
12853 ("python-requests" ,python-requests)
12854 ("python-flake8" ,python-flake8)
12855 ("python-tox" ,python-tox)))
12856 (arguments
12857 `(#:phases
12858 (modify-phases %standard-phases
12859 (add-before 'build 'patch-test-requirements
12860 (lambda _
12861 ;; Remove httpretty dependency for tests.
12862 (substitute* "setup.py"
12863 (("httpretty") ""))
12864 #t)))))
12865 (home-page "https://xenon.readthedocs.org/")
12866 (synopsis "Monitor code metrics for Python on your CI server")
12867 (description
12868 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
12869Ideally, @code{xenon} is run every time code is committed. Through command
12870line options, various thresholds can be set for the complexity of code. It
12871will fail (i.e. it will exit with a non-zero exit code) when any of these
12872requirements is not met.")
12873 (license license:expat)))
12874
12875(define-public python2-xenon
12876 (package-with-python2 python-xenon))
12877
12878(define-public python-pysocks
12879 (package
12880 (name "python-pysocks")
12881 (version "1.6.8")
12882 (source
12883 (origin
12884 (method url-fetch)
12885 (uri (pypi-uri "PySocks" version))
12886 (sha256
12887 (base32
12888 "0wn6xafwy9c1gamwljw3fyvih5w19qy9xp39zmv8c90ai5ajrr9z"))))
12889 (build-system python-build-system)
12890 (arguments `(#:tests? #f))
12891 (home-page "https://github.com/Anorov/PySocks")
12892 (synopsis "SOCKS client module")
12893 (description "@code{pysocks} is an updated and semi-actively maintained
12894version of @code{SocksiPy} with bug fixes and extra features.")
12895 (license license:bsd-3)))
12896
12897(define-public python2-pysocks
12898 (package-with-python2 python-pysocks))
12899
12900(define-public python-pydiff
12901 (package
12902 (name "python-pydiff")
12903 (version "0.2")
12904 (source
12905 (origin
12906 (method url-fetch)
12907 (uri (pypi-uri "pydiff" version))
12908 (sha256
12909 (base32
12910 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
12911 (build-system python-build-system)
12912 (home-page "https://github.com/myint/pydiff")
12913 (synopsis "Library to diff two Python files at the bytecode level")
12914 (description
12915 "@code{pydiff} makes it easy to look for actual code changes while
12916ignoring formatting changes.")
12917 (license license:expat)))
12918
12919(define-public python2-pydiff
12920 (package-with-python2 python-pydiff))
12921
12922(define-public python-tqdm
12923 (package
12924 (name "python-tqdm")
12925 (version "4.19.6")
12926 (source
12927 (origin
12928 (method url-fetch)
12929 (uri (pypi-uri "tqdm" version))
12930 (sha256
12931 (base32
12932 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
12933 (build-system python-build-system)
12934 (native-inputs
12935 `(("python-flake8" ,python-flake8)
12936 ("python-nose" ,python-nose)
12937 ("python-coverage" ,python-coverage)))
12938 (home-page "https://github.com/tqdm/tqdm")
12939 (synopsis "Fast, extensible progress meter")
12940 (description
12941 "Make loops show a progress bar on the console by just wrapping any
12942iterable with @code{|tqdm(iterable)|}. Offers many options to define
12943design and layout.")
12944 (license (list license:mpl2.0 license:expat))))
12945
12946(define-public python2-tqdm
12947 (package-with-python2 python-tqdm))
12948
12949(define-public python-pkginfo
12950 (package
12951 (name "python-pkginfo")
12952 (version "1.4.2")
12953 (source
12954 (origin
12955 (method url-fetch)
12956 (uri (pypi-uri "pkginfo" version))
12957 (sha256
12958 (base32
12959 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
12960 (build-system python-build-system)
12961 (arguments
12962 ;; The tests are broken upstream.
12963 '(#:tests? #f))
12964 (home-page
12965 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
12966 (synopsis
12967 "Query metadatdata from sdists, bdists, and installed packages")
12968 (description
12969 "API to query the distutils metadata written in @file{PKG-INFO} inside a
12970source distriubtion (an sdist) or a binary distribution (e.g., created by
12971running bdist_egg). It can also query the EGG-INFO directory of an installed
12972distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
12973created by running @code{python setup.py develop}).")
12974 (license license:expat)))
12975
12976(define-public python2-pkginfo
12977 (package-with-python2 python-pkginfo))
12978
12979(define-public python-twine
12980 (package
12981 (name "python-twine")
12982 (version "1.9.1")
12983 (source
12984 (origin
12985 (method url-fetch)
12986 (uri (pypi-uri "twine" version))
12987 (sha256
12988 (base32
12989 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
12990 (build-system python-build-system)
12991 (propagated-inputs
12992 `(("python-tqdm" ,python-tqdm)
12993 ("python-pkginfo" ,python-pkginfo)
12994 ("python-requests" ,python-requests)
12995 ("python-requests-toolbelt" ,python-requests-toolbelt)))
12996 (home-page "https://github.com/pypa/twine")
12997 (synopsis "Collection of utilities for interacting with PyPI")
12998 (description
12999 "@code{twine} currently supports registering projects and uploading
13000distributions. It authenticates the user over HTTPS, allows them to pre-sign
13001their files and supports any packaging format (including wheels).")
13002 (license license:asl2.0)))
13003
13004(define-public python2-twine
13005 (package-with-python2 python-twine))
13006
13007(define-public python-linecache2
13008 (package
13009 (name "python-linecache2")
13010 (version "1.0.0")
13011 (source
13012 (origin
13013 (method url-fetch)
13014 (uri (pypi-uri "linecache2" version))
13015 (sha256
13016 (base32
13017 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
13018 (build-system python-build-system)
13019 (arguments
13020 `(;; The tests depend on unittest2, and our version is a bit too old.
13021 #:tests? #f))
13022 (native-inputs
13023 `(("python-pbr" ,python-pbr-minimal)))
13024 (home-page
13025 "https://github.com/testing-cabal/linecache2")
13026 (synopsis "Backports of the linecache module")
13027 (description
13028 "The linecache module allows one to get any line from any file, while
13029attempting to optimize internally, using a cache, the common case where many
13030lines are read from a single file.")
13031 (license license:psfl)))
13032
13033(define-public python2-linecache2
13034 (package-with-python2 python-linecache2))
13035
13036(define-public python-traceback2
13037 (package
13038 (name "python-traceback2")
13039 (version "1.4.0")
13040 (source
13041 (origin
13042 (method url-fetch)
13043 (uri (pypi-uri "traceback2" version))
13044 (sha256
13045 (base32
13046 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
13047 (build-system python-build-system)
13048 (arguments
13049 `(;; python-traceback2 and python-unittest2 depend on one another.
13050 #:tests? #f))
13051 (native-inputs
13052 `(("python-pbr" ,python-pbr-minimal)))
13053 (propagated-inputs
13054 `(("python-linecache2" ,python-linecache2)))
13055 (home-page
13056 "https://github.com/testing-cabal/traceback2")
13057 (synopsis "Backports of the traceback module")
13058 (description
13059 "This module provides a standard interface to extract, format and print
13060stack traces of Python programs. It exactly mimics the behavior of the Python
13061interpreter when it prints a stack trace.")
13062 (license license:psfl)))
13063
13064(define-public python2-traceback2
13065 (package-with-python2 python-traceback2))
13066
13067(define-public python-ratelimiter
13068 (package
13069 (name "python-ratelimiter")
13070 (version "1.2.0")
13071 (source
13072 (origin
13073 (method url-fetch)
13074 (uri (pypi-uri "ratelimiter" version))
13075 (sha256
13076 (base32
13077 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
13078 (build-system python-build-system)
13079 (arguments
13080 '(#:tests? #f)) ; There are no tests in the pypi archive.
13081 (home-page "https://github.com/RazerM/ratelimiter")
13082 (synopsis "Simple rate limiting object")
13083 (description
13084 "The @code{ratelimiter} module ensures that an operation will not be
13085executed more than a given number of times during a given period.")
13086 (license license:asl2.0)))
13087
13088(define-public python2-ratelimiter
13089 (package-with-python2 python-ratelimiter))
13090
13091(define-public python-dukpy
13092 (package
13093 (name "python-dukpy")
13094 (version "0.3")
13095 (source
13096 (origin
5b77ebe1
TGR
13097 (method git-fetch)
13098 (uri (git-reference
13099 (url "https://github.com/kovidgoyal/dukpy.git")
13100 (commit (string-append "v" version))))
13101 (file-name (git-file-name name version))
44d10b1f 13102 (sha256
5b77ebe1 13103 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
44d10b1f
RW
13104 (build-system python-build-system)
13105 (home-page "https://github.com/kovidgoyal/dukpy")
13106 (synopsis "Run JavaScript in python")
13107 (description
13108 "dukpy is a JavaScript runtime environment for Python using the duktape
13109embeddable JavaScript engine.")
13110 ;; Dukpy is licensed under MIT like the embedded duktape library,
13111 ;; with 'errors.c' as GPL3.
13112 (license (list license:expat license:gpl3))))
13113
13114(define-public python2-dukpy
13115 (package-with-python2 python-dukpy))
13116
13117(define-public python-jsonrpclib-pelix
13118 (package
13119 (name "python-jsonrpclib-pelix")
13120 (version "0.3.2")
13121 (source
13122 (origin
13123 (method url-fetch)
13124 (uri (pypi-uri "jsonrpclib-pelix" version))
13125 (sha256
13126 (base32
13127 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
13128 (build-system python-build-system)
13129 (arguments
13130 `(#:tests? #f)) ; no tests in PyPI tarball
13131 (home-page "https://github.com/tcalmant/jsonrpclib/")
13132 (synopsis "JSON-RPC 2.0 client library for Python")
13133 (description
13134 "This library implements the JSON-RPC v2.0
13135specification (backwards-compatible) as a client library for Python. This
13136version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
13137services.")
13138 (license license:asl2.0)))
13139
13140(define-public python2-jsonrpclib-pelix
13141 (package-with-python2 python-jsonrpclib-pelix))
13142
13143(define-public python-setuptools-scm-git-archive
13144 (package
13145 (name "python-setuptools-scm-git-archive")
13146 (version "1.0")
13147 (source
13148 (origin
13149 (method url-fetch)
13150 (uri (pypi-uri "setuptools_scm_git_archive" version))
13151 (sha256
13152 (base32
13153 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
13154 (build-system python-build-system)
13155 (native-inputs
13156 `(("python-pytest" ,python-pytest)))
13157 (propagated-inputs
13158 `(("python-setuptools-scm" ,python-setuptools-scm)))
13159 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
13160 (synopsis "Setuptools_scm plugin for git archives")
13161 (description
13162 "The setuptools_scm_git_archive package is a plugin to
13163setuptools_scm, which supports obtaining versions from git archives that
13164belong to tagged versions.")
13165 (license license:expat)))
13166
13167(define-public python2-setuptools-scm-git-archive
13168 (package-with-python2 python-setuptools-scm-git-archive))
13169
13170(define-public python-pyclipper
13171 (package
13172 (name "python-pyclipper")
13173 (version "1.1.0.post1")
13174 (source
13175 (origin
13176 (method url-fetch)
13177 (uri (pypi-uri "pyclipper" version ".zip"))
13178 (sha256
13179 (base32
13180 "0ldbkbnx94an4zzrwb1sxmg6k0jgk4cwmvcdyy8y5k1zslc612wa"))
13181 (modules '((guix build utils)))
13182 (snippet
13183 '(begin
13184 ;; This file is generated by Cython.
13185 (delete-file "pyclipper/pyclipper.cpp") #t))))
13186 (build-system python-build-system)
13187 (arguments
13188 `(#:phases
13189 (modify-phases %standard-phases
13190 (add-before 'build 'cythonize-sources
13191 (lambda _
13192 (with-directory-excursion "pyclipper"
13193 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
13194 (propagated-inputs
13195 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
13196 (native-inputs
13197 `(("python-cython" ,python-cython)
13198 ("python-pytest" ,python-pytest)
13199 ("python-pytest-runner" ,python-pytest-runner)
13200 ("python-unittest2" ,python-unittest2)
13201 ("unzip" ,unzip)))
13202 (home-page "https://github.com/greginvm/pyclipper")
13203 (synopsis "Wrapper for Angus Johnson's Clipper library")
13204 (description
13205 "Pyclipper is a Cython wrapper for the C++ translation of the
13206Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
13207 (license license:expat)))
13208
13209(define-public python2-pyclipper
13210 (package-with-python2 python-pyclipper))
13211
13212(define-public python2-booleanoperations
13213 (package
13214 (name "python2-booleanoperations")
13215 (version "0.7.1")
13216 (source
13217 (origin
13218 (method url-fetch)
13219 (uri (pypi-uri "booleanOperations" version ".zip"))
13220 (sha256
13221 (base32
13222 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
13223 (build-system python-build-system)
13224 (arguments
13225 `(#:python ,python-2))
13226 (native-inputs
13227 `(("unzip" ,unzip)
13228 ("python2-pytest" ,python2-pytest)
13229 ("python2-pytest-runner" ,python2-pytest-runner)))
13230 (propagated-inputs
13231 `(("python-fonttools" ,python2-fonttools)
13232 ("python-pyclipper" ,python2-pyclipper)
13233 ("python-ufolib" ,python2-ufolib)))
13234 (home-page "https://github.com/typemytype/booleanOperations")
13235 (synopsis "Boolean operations on paths")
13236 (description
13237 "BooleanOperations provides a Python library that enables
13238boolean operations on paths.")
13239 (license license:expat)))
13240
13241(define-public python-tempdir
13242 (package
13243 (name "python-tempdir")
13244 (version "0.7.1")
13245 (source
13246 (origin
13247 (method url-fetch)
13248 (uri (pypi-uri "tempdir" version))
13249 (sha256
13250 (base32
13251 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
13252 (build-system python-build-system)
13253 (home-page "https://pypi.org/project/tempdir/")
13254 (arguments
13255 ;; the package has no tests
13256 '(#:tests? #f))
13257 (synopsis "Python library for managing temporary directories")
13258 (description
13259 "This library manages temporary directories that are automatically
13260deleted with all their contents when they are no longer needed. It is
13261particularly convenient for use in tests.")
13262 (license license:expat)))
13263
13264(define-public python2-tempdir
13265 (package-with-python2 python-tempdir))
13266
13267(define-public python-activepapers
13268 (package
13269 (name "python-activepapers")
13270 (version "0.2.2")
13271 (source
13272 (origin
13273 (method url-fetch)
13274 (uri (pypi-uri "ActivePapers.Py" version))
13275 (sha256
13276 (base32
13277 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
13278 (build-system python-build-system)
13279 (arguments
13280 `(#:modules ((ice-9 ftw)
13281 (srfi srfi-1)
13282 (guix build utils)
13283 (guix build python-build-system))
13284
13285 #:phases
13286 (modify-phases %standard-phases
13287 (add-after 'unpack 'delete-python2-code
13288 (lambda _
13289 (for-each delete-file
13290 '("lib/activepapers/builtins2.py"
13291 "lib/activepapers/standardlib2.py"
13292 "lib/activepapers/utility2.py"))))
13293 (replace 'check
13294 (lambda _
13295 ;; Deactivate the test cases that download files
13296 (setenv "NO_NETWORK_ACCESS" "1")
13297 ;; For some strange reason, some tests fail if nosetests runs all
13298 ;; test modules in a single execution. They pass if each test
13299 ;; module is run individually.
13300 (for-each (lambda (filename)
13301 (invoke "nosetests"
13302 (string-append "tests/" filename)))
13303 (scandir "tests"
13304 (lambda (filename)
13305 (string-suffix? ".py" filename)))))))))
13306 (native-inputs
13307 `(("python-tempdir" ,python-tempdir)
13308 ("python-nose" ,python-nose)))
13309 (propagated-inputs
13310 `(("python-h5py" ,python-h5py)))
13311 (home-page "http://www.activepapers.org/")
13312 (synopsis "Executable papers for scientific computing")
13313 (description
13314 "ActivePapers is a tool for working with executable papers, which
13315combine data, code, and documentation in single-file packages,
13316suitable for publication as supplementary material or on repositories
13317such as figshare or Zenodo.")
13318 (properties `((python2-variant . ,(delay python2-activepapers))))
13319 (license license:bsd-3)))
13320
13321(define-public python2-activepapers
13322 (let ((base (package-with-python2
13323 (strip-python2-variant python-activepapers))))
13324 (package
13325 (inherit base)
13326 (arguments
13327 (substitute-keyword-arguments (package-arguments base)
13328 ((#:phases phases)
13329 `(modify-phases ,phases
13330 (delete 'delete-python2-code)
13331 (add-after 'unpack 'delete-python3-code
13332 (lambda _
13333 (for-each delete-file
13334 '("lib/activepapers/builtins3.py"
13335 "lib/activepapers/standardlib3.py"
13336 "lib/activepapers/utility3.py")))))))))))
13337
13338(define-public python-semver
13339 (package
13340 (name "python-semver")
13341 (version "2.7.9")
13342 (source
13343 (origin
13344 (method url-fetch)
13345 (uri (pypi-uri "semver" version))
13346 (sha256
13347 (base32
13348 "0hhgqppchv59rqj0yzi1prdg2nfsywqmjsqy2rycyxm0hvxmbyqz"))))
13349 (build-system python-build-system)
13350 (arguments
13351 `(#:phases
13352 (modify-phases %standard-phases
13353 (add-after 'unpack 'patch-test-requirements
13354 (lambda _
13355 (substitute* "setup.py"
13356 ;; Our Python is new enough.
13357 (("'virtualenv<14\\.0\\.0'") "'virtualenv'"))
13358 #t)))))
13359 (native-inputs
13360 `(("python-tox" ,python-tox)
13361 ("python-virtualenv" ,python-virtualenv)))
13362 (home-page "https://github.com/k-bx/python-semver")
13363 (synopsis "Python helper for Semantic Versioning")
13364 (description "This package provides a Python library for
13365@url{Semantic Versioning, http://semver.org/}.")
13366 (license license:bsd-3)))
13367
13368(define-public python2-semver
13369 (package-with-python2 python-semver))
13370
13371(define-public python-pyro4
13372 (package
13373 (name "python-pyro4")
ad1acb81 13374 (version "4.75")
44d10b1f
RW
13375 (source
13376 (origin
13377 (method url-fetch)
13378 (uri (pypi-uri "Pyro4" version))
13379 (sha256
ad1acb81 13380 (base32 "1dfpp36imddx19yv0kd28gk1l71ckhpqy6jd590wpm2680jw15rq"))))
44d10b1f
RW
13381 (build-system python-build-system)
13382 (propagated-inputs
13383 `(("python-serpent" ,python-serpent)))
13384 (home-page "https://pyro4.readthedocs.io")
13385 (synopsis "Distributed object middleware for Python")
13386 (description
13387 "Pyro enables you to build applications in which objects can talk to each
13388other over the network. You can just use normal Python method calls to call
13389objects on other machines, also known as remote procedure calls (RPC).")
13390 (license license:expat)))
13391
13392(define-public python2-pyro
13393 (package
13394 (name "python2-pyro")
13395 (version "3.16")
13396 (source
13397 (origin
13398 (method url-fetch)
13399 (uri (pypi-uri "Pyro" version))
13400 (file-name (string-append "Pyro-" version ".tar.gz"))
13401 (sha256
13402 (base32
13403 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
13404 (build-system python-build-system)
13405 (arguments
13406 ;; Pyro is not compatible with Python 3
13407 `(#:python ,python-2
13408 ;; Pyro has no test cases for automatic execution
13409 #:tests? #f))
13410 (home-page "http://pythonhosted.org/Pyro/")
13411 (synopsis "Distributed object manager for Python")
13412 (description "Pyro is a Distributed Object Technology system
13413written in Python that is designed to be easy to use. It resembles
13414Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
13415which is a system and language independent Distributed Object Technology
13416and has much more to offer than Pyro or RMI. Pyro 3.x is no
13417longer maintained. New projects should use Pyro4 instead, which
13418is the new Pyro version that is actively developed.")
13419 (license license:expat)))
13420
13421(define-public python2-scientific
13422 (package
13423 (name "python2-scientific")
13424 (version "2.9.4")
13425 (source
13426 (origin
13427 (method url-fetch)
13428 (uri (string-append "https://bitbucket.org/khinsen/"
13429 "scientificpython/downloads/ScientificPython-"
13430 version ".tar.gz"))
13431 (file-name (string-append "ScientificPython-" version ".tar.gz"))
13432 (sha256
13433 (base32
13434 "0fc69zhlsn9d2jvbzyjl9ah53vj598h84nkq230c83ahfvgzx5y3"))))
13435 (build-system python-build-system)
13436 (inputs
13437 `(("netcdf" ,netcdf)))
13438 (propagated-inputs
13439 `(("python-numpy" ,python2-numpy-1.8)
13440 ("python-pyro" ,python2-pyro)))
13441 (arguments
13442 ;; ScientificPython is not compatible with Python 3
13443 `(#:python ,python-2
13444 #:tests? #f ; No test suite
13445 #:phases
13446 (modify-phases %standard-phases
13447 (replace 'build
13448 (lambda* (#:key inputs #:allow-other-keys)
77e61e25
RW
13449 (invoke "python" "setup.py" "build"
13450 (string-append "--netcdf_prefix="
13451 (assoc-ref inputs "netcdf"))))))))
44d10b1f
RW
13452 (home-page "https://bitbucket.org/khinsen/scientificpython")
13453 (synopsis "Python modules for scientific computing")
13454 (description "ScientificPython is a collection of Python modules that are
13455useful for scientific computing. Most modules are rather general (Geometry,
13456physical units, automatic derivatives, ...) whereas others are more
13457domain-specific (e.g. netCDF and PDB support). The library is currently
13458not actively maintained and works only with Python 2 and NumPy < 1.9.")
13459 (license license:cecill-c)))
13460
13461(define-public python2-mmtk
13462 (package
13463 (name "python2-mmtk")
13464 (version "2.7.11")
13465 (source
13466 (origin
13467 (method url-fetch)
13468 (uri (string-append "https://bitbucket.org/khinsen/"
13469 "mmtk/downloads/MMTK-" version ".tar.gz"))
13470 (file-name (string-append "MMTK-" version ".tar.gz"))
13471 (sha256
13472 (base32
13473 "1d0nnjx4lwsvh8f99vv1r6gi50d93yba0adkz8b4zgv4za4c5862"))))
13474 (build-system python-build-system)
13475 (native-inputs
13476 `(("netcdf" ,netcdf)))
13477 (propagated-inputs
13478 `(("python-scientific" ,python2-scientific)
13479 ("python-tkinter" ,python-2 "tk")))
13480 (arguments
13481 `(#:python ,python-2
13482 #:tests? #f
13483 #:phases
13484 (modify-phases %standard-phases
13485 (add-before 'build 'includes-from-scientific
13486 (lambda* (#:key inputs #:allow-other-keys)
13487 (mkdir-p "Include/Scientific")
13488 (copy-recursively
13489 (string-append
13490 (assoc-ref inputs "python-scientific")
13491 "/include/python2.7/Scientific")
13492 "Include/Scientific"))))))
13493 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
13494 (synopsis "Python library for molecular simulation")
13495 (description "MMTK is a library for molecular simulations with an emphasis
13496on biomolecules. It provides widely used methods such as Molecular Dynamics
13497and normal mode analysis, but also basic routines for implementing new methods
13498for simulation and analysis. The library is currently not actively maintained
13499and works only with Python 2 and NumPy < 1.9.")
13500 (license license:cecill-c)))
13501
13502(define-public python-phonenumbers
13503 (package
13504 (name "python-phonenumbers")
13505 (version "8.9.1")
13506 (source
13507 (origin
13508 (method url-fetch)
13509 (uri (pypi-uri "phonenumbers" version))
13510 (sha256
13511 (base32
13512 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
13513 (build-system python-build-system)
13514 (home-page
13515 "https://github.com/daviddrysdale/python-phonenumbers")
13516 (synopsis
13517 "Python library for dealing with international phone numbers")
13518 (description
13519 "This package provides a Python port of Google's libphonenumber library.")
13520 (license license:asl2.0)))
13521
13522(define-public python2-phonenumbers
13523 (package-with-python2 python-phonenumbers))
13524
13525(define-public python-send2trash
13526 (package
13527 (name "python-send2trash")
d9b0216b 13528 (version "1.5.0")
44d10b1f 13529 (source
d9b0216b 13530 (origin (method git-fetch)
44d10b1f 13531 ;; Source tarball on PyPI doesn't include tests.
d9b0216b
RW
13532 (uri (git-reference
13533 (url "https://github.com/hsoft/send2trash.git")
13534 (commit version)))
13535 (file-name (git-file-name name version))
44d10b1f
RW
13536 (sha256
13537 (base32
d9b0216b 13538 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
44d10b1f
RW
13539 (build-system python-build-system)
13540 (arguments
13541 '(#:phases
13542 (modify-phases %standard-phases
13543 (add-before 'check 'pre-check
13544 (lambda _
13545 (mkdir-p "/tmp/foo")
13546 (setenv "HOME" "/tmp/foo")
13547 #t)))))
13548 (home-page "https://github.com/hsoft/send2trash")
13549 (synopsis "Send files to the user's @file{~/Trash} directory")
13550 (description "This package provides a Python library to send files to the
13551user's @file{~/Trash} directory.")
13552 (license license:bsd-3)))
13553
13554(define-public python2-send2trash
13555 (package
13556 (inherit (package-with-python2 python-send2trash))
13557 (arguments
13558 (substitute-keyword-arguments (package-arguments python-send2trash)
13559 ((#:phases phases)
13560 `(modify-phases ,phases
13561 (add-before 'check 'setenv
13562 (lambda _
13563 (setenv "PYTHONPATH"
13564 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
13565 #t))))))
13566 (properties `((python2-variant . ,(delay python-send2trash))))))
13567
13568(define-public python-yapf
13569 (package
13570 (name "python-yapf")
13571 (version "0.24.0")
13572 (source
13573 (origin
13574 (method url-fetch)
13575 (uri (pypi-uri "yapf" version))
13576 (sha256
13577 (base32
13578 "0anwby0ydmyzcsgjc5dn1ryddwvii4dq61vck447q0n96npnzfyf"))))
13579 (build-system python-build-system)
13580 (home-page "https://github.com/google/yapf")
13581 (synopsis "Formatter for Python code")
13582 (description "YAPF is a formatter for Python code. It's based off of
13583@dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
13584takes the code and reformats it to the best formatting that conforms to the
13585style guide, even if the original code didn't violate the style guide.")
13586 (license license:asl2.0)))
13587
13588(define-public python2-yapf
13589 (package-with-python2 python-yapf))
13590
13591(define-public python-gyp
13592 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
13593 (revision "0"))
13594 (package
13595 (name "python-gyp")
13596 ;; Google does not release versions,
13597 ;; based on second most recent commit date.
13598 (version (git-version "0.0.0" revision commit))
13599 (source
13600 (origin
13601 ;; Google does not release tarballs,
13602 ;; git checkout is needed.
13603 (method git-fetch)
13604 (uri (git-reference
13605 (url "https://chromium.googlesource.com/external/gyp")
13606 (commit commit)))
13607 (file-name (git-file-name name version))
13608 (sha256
13609 (base32
13610 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
13611 (build-system python-build-system)
13612 (home-page "https://gyp.gsrc.io/")
13613 (synopsis "GYP is a Meta-Build system")
13614 (description
13615 "GYP builds build systems for large, cross platform applications.
13616It can be used to generate XCode projects, Visual Studio projects, Ninja build
13617files, and Makefiles.")
13618 (license license:bsd-3))))
13619
13620(define-public python2-gyp
13621 (package-with-python2 python-gyp))
13622
13623(define-public python-whatever
13624 (package
13625 (name "python-whatever")
13626 (version "0.5")
13627 (source
13628 (origin
13629 (method url-fetch)
13630 (uri (string-append "https://github.com/Suor/whatever/archive/" version
13631 ".tar.gz"))
13632 (sha256
13633 (base32
13634 "1iqvnaf0zpc6b4rvbqq4xy45mszcscyzpzknv8wg6j84pbp22sap"))
13635 (file-name (string-append name "-" version ".tar.gz"))))
13636 (build-system python-build-system)
13637 (arguments
13638 `(#:phases
13639 (modify-phases %standard-phases
13640 (replace 'check
13641 (lambda _
13642 (invoke "py.test"))))))
13643 (native-inputs
13644 `(("python-pytest" ,python-pytest)))
13645 (home-page "http://github.com/Suor/whatever")
13646 (synopsis "Make anonymous functions by partial application of operators")
13647 (description "@code{whatever} provides an easy way to make anonymous
13648functions by partial application of operators.")
13649 (license license:bsd-3)))
13650
13651(define-public python2-whatever
13652 (package-with-python2 python-whatever))
13653
13654(define-public python-funcy
13655 (package
13656 (name "python-funcy")
9e396ab8 13657 (version "1.11")
44d10b1f
RW
13658 (source
13659 (origin
a85c6027
TGR
13660 (method git-fetch)
13661 (uri (git-reference
13662 (url "https://github.com/Suor/funcy.git")
13663 (commit version)))
44d10b1f 13664 (sha256
a85c6027
TGR
13665 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
13666 (file-name (git-file-name name version))))
44d10b1f
RW
13667 (build-system python-build-system)
13668 (arguments
13669 `(#:phases
13670 (modify-phases %standard-phases
13671 (replace 'check
13672 (lambda _
13673 (invoke "py.test"))))))
13674 (native-inputs
13675 `(("python-pytest" ,python-pytest)
13676 ("python-whatever" ,python-whatever)))
13677 (home-page "http://github.com/Suor/funcy")
13678 (synopsis "Functional tools")
13679 (description "@code{funcy} is a library that provides functional tools.
13680Examples are:
13681@enumerate
13682@item merge - Merges collections of the same type
13683@item walk - Type-preserving map
13684@item select - Selects a part of a collection
13685@item take - Takes the first n items of a collection
13686@item first - Takes the first item of a collection
13687@item remove - Predicated-removes items of a collection
13688@item concat - Concatenates two collections
13689@item flatten - Flattens a collection with subcollections
13690@item distinct - Returns only distinct items
13691@item split - Predicated-splits a collection
13692@item split_at - Splits a collection at a given item
13693@item group_by - Groups items by group
13694@item pairwise - Pairs off adjacent items
13695@item partial - Partially-applies a function
13696@item curry - Curries a function
13697@item compose - Composes functions
13698@item complement - Complements a predicate
13699@item all_fn - \"all\" with predicate
13700@end enumerate")
13701 (license license:bsd-3)))
13702
13703(define-public python2-funcy
13704 (package-with-python2 python-funcy))
13705
13706(define-public python-isoweek
13707 (package
13708 (name "python-isoweek")
13709 (version "1.3.3")
13710 (source
13711 (origin
13712 (method url-fetch)
13713 (uri (pypi-uri "isoweek" version))
13714 (sha256
13715 (base32
13716 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
13717 (build-system python-build-system)
13718 (home-page "https://github.com/gisle/isoweek")
13719 (synopsis "Objects representing a week")
13720 (description "The @code{isoweek} module provide the class Week that
13721implements the week definition of ISO 8601. This standard also defines
13722a notation for identifying weeks; yyyyWww (where the W is a literal).
13723Week instances stringify to this form.")
13724 (license license:bsd-3)))
13725
13726(define-public python2-isoweek
13727 (package-with-python2 python-isoweek))
13728
13729(define-public python-tokenize-rt
13730 (package
13731 (name "python-tokenize-rt")
13732 (version "2.0.1")
13733 (source
13734 (origin
13735 (method url-fetch)
13736 (uri (pypi-uri "tokenize-rt" version))
13737 (sha256
13738 (base32
13739 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
13740 (build-system python-build-system)
13741 (home-page "https://github.com/asottile/tokenize-rt")
13742 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
13743 (description
13744 "This Python library is a wrapper around @code{tokenize} from the Python
13745standard library. It provides two additional tokens @code{ESCAPED_NL} and
13746@code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
13747and @code{tokens_to_src} to roundtrip.")
13748 (license license:expat)))
13749
13750(define-public python-future-fstrings
13751 (package
13752 (name "python-future-fstrings")
13753 (version "0.4.1")
13754 (source
13755 (origin
13756 (method url-fetch)
13757 (uri (pypi-uri "future_fstrings" version))
13758 (sha256
13759 (base32
13760 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
13761 (build-system python-build-system)
13762 (propagated-inputs
13763 `(("python-tokenize-rt" ,python-tokenize-rt)))
13764 (home-page "https://github.com/asottile/future-fstrings")
13765 (synopsis "Backport of fstrings to Python < 3.6")
13766 (description
13767 "This package provides a UTF-8 compatible encoding
13768@code{future_fstrings}, which performs source manipulation. It decodes the
13769source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
13770@code{f} strings.")
13771 (license license:expat)))
13772
13773(define-public python-typing
13774 (package
13775 (name "python-typing")
13776 (version "3.6.6")
13777 (source
13778 (origin
13779 (method url-fetch)
13780 (uri (pypi-uri "typing" version))
13781 (sha256
13782 (base32
13783 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
13784 (build-system python-build-system)
13785 (home-page "https://docs.python.org/3/library/typing.html")
13786 (synopsis "Type hints for Python")
13787 (description "This is a backport of the standard library @code{typing}
13788module to Python versions older than 3.5. Typing defines a standard notation
13789for Python function and variable type annotations. The notation can be used
13790for documenting code in a concise, standard format, and it has been designed
13791to also be used by static and runtime type checkers, static analyzers, IDEs
13792and other tools.")
13793 (license license:psfl)))
13794
13795(define-public python2-typing
13796 (package-with-python2 python-typing))
13797
f89d443b
VC
13798(define-public python-typing-extensions
13799 (package
13800 (name "python-typing-extensions")
13801 (version "3.7.2")
13802 (source
13803 (origin
13804 (method url-fetch)
13805 (uri (pypi-uri "typing_extensions" version))
13806 (sha256
13807 (base32
13808 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
13809 (build-system python-build-system)
13810 (home-page
13811 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
13812 (synopsis "Experimental type hints for Python")
13813 (description
13814 "The typing_extensions module contains additional @code{typing} hints not
13815yet present in the of the @code{typing} standard library.
13816Included are implementations of:
13817@enumerate
13818@item ClassVar
13819@item ContextManager
13820@item Counter
13821@item DefaultDict
13822@item Deque
13823@item NewType
13824@item NoReturn
13825@item overload
13826@item Protocol
13827@item runtime
13828@item Text
13829@item Type
13830@item TYPE_CHECKING
13831@item AsyncGenerator
13832@end enumerate\n")
13833 (license license:psfl)))
13834
44d10b1f
RW
13835(define-public bpython
13836 (package
13837 (name "bpython")
13838 (version "0.17.1")
13839 (source
13840 (origin
13841 (method url-fetch)
13842 (uri (pypi-uri "bpython" version))
13843 (sha256
13844 (base32
13845 "0bxhxi5zxdkrf8b4gwn0d363kdz3qnypjwhm1aydki53ph8ca1w9"))))
13846 (build-system python-build-system)
13847 (arguments
13848 `(#:phases
13849 (modify-phases %standard-phases
13850 (add-after 'unpack 'remove-failing-test
13851 (lambda _
13852 ;; Remove failing test. FIXME: make it pass
13853 (delete-file "bpython/test/test_args.py")
13854 #t))
13855 (add-after 'wrap 'add-aliases
13856 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
13857 (lambda* (#:key outputs #:allow-other-keys)
13858 (let ((out (assoc-ref outputs "out")))
13859 (for-each
13860 (lambda (old new)
13861 (symlink old (string-append out "/bin/" new)))
13862 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
13863 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
13864 #t)))))
13865 (propagated-inputs
13866 `(("python-pygments" ,python-pygments)
13867 ("python-requests" ,python-requests)
13868 ("python-babel" ,python-babel) ; optional, for internationalization
13869 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
13870 ("python-greenlet" ,python-greenlet)
13871 ("python-urwid" ,python-urwid) ; for bpython-urwid only
13872 ("python-six" ,python-six)))
13873 (native-inputs
13874 `(("python-sphinx" ,python-sphinx)
13875 ("python-mock" ,python-mock)))
13876 (home-page "https://bpython-interpreter.org/")
13877 (synopsis "Fancy interface to the Python interpreter")
13878 (description "Bpython is a fancy interface to the Python
13879interpreter. bpython's main features are
13880
13881@enumerate
13882@item in-line syntax highlighting,
13883@item readline-like autocomplete with suggestions displayed as you type,
13884@item expected parameter list for any Python function,
13885@item \"rewind\" function to pop the last line of code from memory and
13886 re-evaluate,
13887@item send the code you've entered off to a pastebin,
13888@item save the code you've entered to a file, and
13889@item auto-indentation.
13890@end enumerate")
13891 (license license:expat)))
13892
13893(define-public bpython2
13894 (let ((base (package-with-python2
13895 (strip-python2-variant bpython))))
13896 (package (inherit base)
13897 (name "bpython2")
13898 (arguments
13899 `(#:python ,python-2
13900 #:phases
13901 (modify-phases %standard-phases
13902 (add-after 'unpack 'remove-failing-test
13903 (lambda _
13904 ;; Remove failing test. FIXME: make it pass
13905 (delete-file "bpython/test/test_args.py")
13906 ;; Disable failing test-cases (renaming inhibits they are
13907 ;; discovered)
13908 (substitute* "bpython/test/test_curtsies_repl.py"
13909 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
13910 (string-append a "xxx_off_" b))
13911 (("^(\\s*def )(test_complex\\W)" _ a b)
13912 (string-append a "xxx_off_" b)))
13913 #t))
13914 (add-before 'build 'rename-scripts
13915 ;; rename the scripts to bypthon2, bpdb2, etc.
13916 (lambda _
13917 (substitute* "setup.py"
13918 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
13919 (string-append name "2" rest "\n"))
13920 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
13921 (string-append name "2" (or sub "") rest "\n")))
13922 #t))))))))
13923
13924(define-public python-pyinotify
13925 (package
13926 (name "python-pyinotify")
13927 (version "0.9.6")
13928 (source (origin
13929 (method url-fetch)
13930 (uri (pypi-uri "pyinotify" version))
13931 (sha256
13932 (base32
13933 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
13934 (build-system python-build-system)
13935 (arguments `(#:tests? #f)) ;no tests
13936 (home-page "https://github.com/seb-m/pyinotify")
13937 (synopsis "Python library for monitoring inotify events")
13938 (description
13939 "@code{pyinotify} provides a Python interface for monitoring
13940file system events on Linux.")
13941 (license license:expat)))
13942
13943(define-public python2-pyinotify
13944 (package-with-python2 python-pyinotify))
13945
13946;; Ada parser uses this version.
13947(define-public python2-quex-0.67.3
13948 (package
13949 (name "python2-quex")
13950 (version "0.67.3")
13951 (source
13952 (origin
13953 (method url-fetch)
13954 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
13955 (version-major+minor version)
13956 "/quex-" version ".zip"))
13957 (sha256
13958 (base32
13959 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
13960 (build-system python-build-system)
13961 (native-inputs
13962 `(("unzip" ,unzip)))
13963 (arguments
13964 `(#:python ,python-2
13965 #:tests? #f
13966 #:phases
13967 (modify-phases %standard-phases
13968 (delete 'configure)
13969 (delete 'build)
13970 (replace 'install
13971 (lambda* (#:key outputs #:allow-other-keys)
13972 (let* ((out (assoc-ref outputs "out"))
13973 (share/quex (string-append out "/share/quex"))
13974 (bin (string-append out "/bin")))
13975 (copy-recursively "." share/quex)
13976 (mkdir-p bin)
13977 (symlink (string-append share/quex "/quex-exe.py")
13978 (string-append bin "/quex"))
13979 #t))))))
13980 (native-search-paths
13981 (list (search-path-specification
13982 (variable "QUEX_PATH")
13983 (files '("share/quex")))))
13984 (home-page "http://quex.sourceforge.net/")
13985 (synopsis "Lexical analyzer generator in Python")
13986 (description "@code{quex} is a lexical analyzer generator in Python.")
13987 (license license:lgpl2.1+))) ; Non-military
13988
13989(define-public python2-quex
13990 (package (inherit python2-quex-0.67.3)
13991 (name "python2-quex")
13992 (version "0.68.1")
13993 (source
13994 (origin
13995 (method url-fetch)
13996 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
13997 (sha256
13998 (base32
13999 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
14000 (file-name (string-append name "-" version ".tar.gz"))))))
14001
14002(define-public python-more-itertools
14003 (package
14004 (name "python-more-itertools")
14005 (version "4.3.0")
14006 (source
14007 (origin
14008 (method url-fetch)
14009 (uri (pypi-uri "more-itertools" version))
14010 (sha256
14011 (base32
14012 "17h3na0rdh8xq30w4b9pizgkdxmm51896bxw600x84jflg9vaxn4"))))
14013 (build-system python-build-system)
14014 (arguments
14015 `(,@(if (any (cute string-prefix? <> (or (%current-system)
14016 (%current-target-system)))
14017 '("armhf" "i686"))
14018 '(#:phases
14019 (modify-phases %standard-phases
14020 ;; This is required for 32-bit hardware.
14021 ;; TODO: Try to remove this when upgrading.
14022 (add-after 'unpack 'patch-test
14023 (lambda _
14024 (substitute* "more_itertools/tests/test_more.py"
14025 (("10 \\*\\* 10") "9 ** 9"))
14026 #t))))
14027 '())))
14028 (propagated-inputs
14029 `(("python-six" ,python-six-bootstrap)))
14030 (home-page "https://github.com/erikrose/more-itertools")
14031 (synopsis "More routines for operating on iterables, beyond itertools")
14032 (description "Python's built-in @code{itertools} module implements a
14033number of iterator building blocks inspired by constructs from APL, Haskell,
14034and SML. @code{more-itertools} includes additional building blocks for
14035working with iterables.")
14036 (license license:expat)))
14037
14038(define-public python2-more-itertools
14039 (package-with-python2 python-more-itertools))
14040
14041(define-public python-latexcodec
14042 (package
14043 (name "python-latexcodec")
91b61f02 14044 (version "1.0.6")
44d10b1f
RW
14045 (source
14046 (origin
14047 (method url-fetch)
14048 (uri (pypi-uri "latexcodec" version))
14049 (sha256
91b61f02 14050 (base32 "0s4wdbg0w2l8pj3i0y4510i0s04p8nhxcsa2z41bjsv0k66npb81"))))
44d10b1f
RW
14051 (build-system python-build-system)
14052 (inputs
14053 `(("python-six" ,python-six)))
14054 (home-page "https://readthedocs.org/projects/latexcodec/")
14055 (synopsis "Work with LaTeX code in Python")
14056 (description "Lexer and codec to work with LaTeX code in Python.")
14057 (license license:expat)))
14058
14059(define-public python-pybtex
14060 (package
14061 (name "python-pybtex")
14062 (version "0.21")
14063 (source
14064 (origin
14065 (method url-fetch)
14066 (uri (pypi-uri "pybtex" version))
14067 (sha256
14068 (base32
14069 "00300j8dn5pxq4ndxmfmbmycg2znawkqs49val2x6jlmfiy6r2mg"))))
14070 (build-system python-build-system)
14071 (native-inputs
14072 `(("python-nose" ,python-nose)))
14073 (inputs
14074 `(("python-latexcodec" ,python-latexcodec)
14075 ("python-pyyaml" ,python-pyyaml)
14076 ("python-six" ,python-six)))
14077 (arguments
14078 `(#:test-target "nosetests"))
14079 (home-page "https://pybtex.org/")
14080 (synopsis "BibTeX-compatible bibliography processor")
14081 (description "Pybtex is a BibTeX-compatible bibliography processor written
14082in Python. You can simply type pybtex instead of bibtex.")
14083 (license license:expat)))
14084
14085(define-public python-onetimepass
14086 (package
14087 (name "python-onetimepass")
14088 (version "1.0.1")
14089 (source
14090 (origin
14091 (method url-fetch)
14092 (uri (pypi-uri "onetimepass" version))
14093 (sha256
14094 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
14095 (build-system python-build-system)
14096 (propagated-inputs `(("python-six" ,python-six)))
14097 (home-page "https://github.com/tadeck/onetimepass/")
14098 (synopsis "One-time password library")
14099 (description "Python one-time password library for HMAC-based (HOTP) and
14100time-based (TOTP) passwords.")
14101 (license license:expat)))
14102
14103(define-public python-parso
14104 (package
14105 (name "python-parso")
14106 (version "0.3.1")
14107 (source
14108 (origin
14109 (method url-fetch)
14110 (uri (pypi-uri "parso" version))
14111 (sha256
14112 (base32
14113 "18p89iwcm8mnf380f92g9w0bhx5km8wxp392vvjcq4y1ld1llw1m"))))
14114 (native-inputs
14115 `(("python-pytest" ,python-pytest)))
14116 (build-system python-build-system)
14117 (home-page "https://github.com/davidhalter/parso")
14118 (synopsis "Python Parser")
14119 (description "Parso is a Python parser that supports error recovery and
14120round-trip parsing for different Python versions (in multiple Python versions).
14121Parso is also able to list multiple syntax errors in your Python file.")
14122 (license license:expat)))
14123
14124(define-public python2-parso
14125 (package-with-python2 python-parso))
14126
14127(define-public python-async-generator
14128 (package
14129 (name "python-async-generator")
94fcbf8d 14130 (version "1.10")
44d10b1f
RW
14131 (source
14132 (origin
14133 (method url-fetch)
14134 (uri (pypi-uri "async_generator" version))
14135 (sha256
14136 (base32
94fcbf8d 14137 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
44d10b1f
RW
14138 (build-system python-build-system)
14139 (native-inputs
14140 `(("python-pytest" ,python-pytest)))
14141 (home-page "https://github.com/python-trio/async_generator")
14142 (synopsis "Async generators and context managers for Python 3.5+")
14143 (description "@code{async_generator} back-ports Python 3.6's native async
14144generators and Python 3.7's context managers into Python 3.5.")
14145 ;; Dual licensed.
14146 (license (list license:expat license:asl2.0))))
14147
14148(define-public python-async-timeout
14149 (package
14150 (name "python-async-timeout")
14151 (version "3.0.1")
14152 (source
14153 (origin
14154 (method url-fetch)
14155 (uri (pypi-uri "async-timeout" version))
14156 (sha256
14157 (base32
14158 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
14159 (build-system python-build-system)
14160 (home-page "https://github.com/aio-libs/async_timeout/")
14161 (synopsis "Timeout context manager for asyncio programs")
14162 (description "@code{async-timeout} provides a timeout timeout context
14163manager compatible with @code{asyncio}.")
14164 (license license:asl2.0)))
14165
14166(define-public python-glob2
14167 (package
14168 (name "python-glob2")
14169 (version "0.6")
8fa2bcc7
TGR
14170 (source
14171 (origin
14172 (method git-fetch)
14173 (uri (git-reference
14174 (url "https://github.com/miracle2k/python-glob2.git")
14175 (commit version)))
14176 (file-name (git-file-name name version))
14177 (sha256
14178 (base32 "1lm1xz3k3l0k1c5bcp9hlzmi3gp5j8dl1k3xhpiq5mnm0xq6n163"))))
44d10b1f
RW
14179 (build-system python-build-system)
14180 (home-page "https://github.com/miracle2k/python-glob2/")
14181 (synopsis "Extended Version of the python buildin glob module")
14182 (description "This is an extended version of the Python
14183@url{http://docs.python.org/library/glob.html, built-in glob module} which
14184adds:
14185
14186@itemize
14187@item The ability to capture the text matched by glob patterns, and return
14188those matches alongside the file names.
14189@item A recursive @code{**} globbing syntax, akin for example to the
14190@code{globstar} option of Bash.
14191@item The ability to replace the file system functions used, in order to glob
14192on virtual file systems.
14193@item Compatible with Python 2 and Python 3 (tested with 3.3).
14194@end itemize
14195
14196Glob2 currently based on the glob code from Python 3.3.1.")
14197 (license license:bsd-2)))
14198
14199(define-public python2-glob2
14200 (package-with-python2 python-glob2))
14201
14202(define-public python-gipc
14203 (package
14204 (name "python-gipc")
14205 (version "0.6.0")
14206 (source
14207 (origin
14208 (method url-fetch)
14209 (uri (pypi-uri "gipc" version ".zip"))
14210 (sha256
14211 (base32
14212 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
14213 (build-system python-build-system)
14214 (native-inputs
14215 `(("unzip" ,unzip)))
14216 (propagated-inputs
14217 `(("python-gevent" ,python-gevent)))
14218 (home-page "http://gehrcke.de/gipc")
14219 (synopsis "Child process management in the context of gevent")
14220 (description "Usage of Python's multiprocessing package in a
14221gevent-powered application may raise problems. With @code{gipc},
14222process-based child processes can safely be created anywhere within a
14223gevent-powered application.")
14224 (license license:expat)))
14225
14226(define-public python2-gipc
14227 (package-with-python2 python-gipc))
14228
14229(define-public python-fusepy
14230 (package
14231 (name "python-fusepy")
14232 (version "2.0.4")
14233 (source
14234 (origin
14235 (method url-fetch)
14236 (uri (pypi-uri "fusepy" version))
14237 (sha256
14238 (base32
14239 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
14240 (build-system python-build-system)
14241 (arguments
14242 `(#:phases
14243 (modify-phases %standard-phases
14244 (add-before 'build 'set-library-file-name
14245 (lambda* (#:key inputs #:allow-other-keys)
14246 (let ((fuse (assoc-ref inputs "fuse")))
14247 (substitute* "fuse.py"
14248 (("find_library\\('fuse'\\)")
14249 (string-append "'" fuse "/lib/libfuse.so'")))
14250 #t))))))
14251 (propagated-inputs
14252 `(("fuse" ,fuse)))
14253 (home-page "https://github.com/fusepy/fusepy")
14254 (synopsis "Simple ctypes bindings for FUSE")
14255 (description "Python module that provides a simple interface to FUSE and
14256MacFUSE. The binding is created using the standard @code{ctypes} library.")
14257 (license license:isc)))
14258
14259(define-public python2-fusepy
14260 (package-with-python2 python-fusepy))
14261
14262(define-public python2-gdrivefs
14263 (package
14264 (name "python2-gdrivefs")
14265 (version "0.14.9")
14266 (source
14267 (origin
14268 (method url-fetch)
14269 (uri (pypi-uri "gdrivefs" version))
14270 (sha256
14271 (base32
14272 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
14273 (build-system python-build-system)
14274 (arguments
14275 `(#:python ,python-2
14276 #:phases
14277 (modify-phases %standard-phases
14278 (add-before 'build 'patch-setup-py
14279 (lambda _
14280 ;; Update requirements from dependency==version
14281 ;; to dependency>=version
14282 (substitute* "gdrivefs/resources/requirements.txt"
14283 (("==") ">="))
14284 #t)))))
14285 (native-inputs
14286 `(("python2-gipc" ,python2-gipc)
14287 ("python2-gevent" ,python2-gevent)
14288 ("python2-greenlet" ,python2-greenlet)
14289 ("python2-httplib2" ,python2-httplib2)
14290 ("python2-uritemplate" ,python2-uritemplate)
14291 ("python2-oauth2client" ,python2-oauth2client)
14292 ("python2-six" ,python2-six)))
14293 (propagated-inputs
14294 `(("python2-dateutil" ,python2-dateutil)
14295 ("python2-fusepy" ,python2-fusepy)
14296 ("python2-google-api-client" ,python2-google-api-client)))
14297 (home-page "https://github.com/dsoprea/GDriveFS")
14298 (synopsis "Mount Google Drive as a local file system")
14299 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
14300under Python 2.7.")
14301 (license license:gpl2)))
14302
14303(define-public pybind11
14304 (package
14305 (name "pybind11")
14306 (version "2.2.4")
14307 (source (origin
14308 (method git-fetch)
14309 (uri (git-reference
14310 (url "https://github.com/pybind/pybind11.git")
14311 (commit (string-append "v" version))))
14312 (sha256
14313 (base32
14314 "0pa79ymcasv8br5ifbx7878id5py2jpjac3i20cqxr6gs9l6ivlv"))
14315 (file-name (git-file-name name version))))
14316 (build-system cmake-build-system)
14317 (native-inputs
14318 `(("python" ,python)
14319 ("python-pytest" ,python-pytest)))
14320 (arguments
14321 `(#:test-target "check"))
14322 (home-page "https://github.com/pybind/pybind11/")
14323 (synopsis "Seamless operability between C++11 and Python")
14324 (description "pybind11 is a lightweight header-only library that exposes
14325C++ types in Python and vice versa, mainly to create Python bindings of
14326existing C++ code. Its goals and syntax are similar to the excellent
14327Boost.Python library by David Abrahams: to minimize boilerplate code in
14328traditional extension modules by inferring type information using compile-time
14329introspection.")
14330 (license license:expat)))
14331
14332(define-public python-fasteners
14333 (package
14334 (name "python-fasteners")
14335 (version "0.14.1")
14336 (source
14337 (origin
14338 (method url-fetch)
14339 (uri (pypi-uri "fasteners" version))
14340 (sha256
14341 (base32
14342 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
14343 (build-system python-build-system)
14344 (propagated-inputs
14345 `(("python-monotonic" ,python-monotonic)
14346 ("python-six" ,python-six)
14347 ("python-testtools" ,python-testtools)))
14348 (home-page "https://github.com/harlowja/fasteners")
14349 (synopsis "Python package that provides useful locks")
14350 (description
14351 "This package provides a Python program that provides following locks:
14352
14353@itemize
14354@item Locking decorator
14355@item Reader-writer locks
14356@item Inter-process locks
14357@item Generic helpers
14358@end itemize\n")
14359 (properties `((python2-variant . ,(delay python2-fasteners))))
14360 (license license:asl2.0)))
14361
14362(define-public python2-fasteners
14363 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
14364 (package
14365 (inherit base)
14366 (propagated-inputs
14367 `(("python2-futures" ,python2-futures)
14368 ,@(package-propagated-inputs base))))))
14369
14370(define-public python-requests-file
14371 (package
14372 (name "python-requests-file")
14373 (version "1.4.3")
14374 (source
14375 (origin
14376 (method url-fetch)
14377 (uri (pypi-uri "requests-file" version))
14378 (sha256
14379 (base32
14380 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
14381 (build-system python-build-system)
14382 (propagated-inputs
14383 `(("python-requests" ,python-requests)
14384 ("python-six" ,python-six)))
14385 (home-page
14386 "https://github.com/dashea/requests-file")
14387 (synopsis "File transport adapter for Requests")
14388 (description
14389 "Requests-File is a transport adapter for use with the Requests Python
14390library to allow local filesystem access via file:// URLs.")
14391 (license license:asl2.0)))
14392
14393(define-public python2-requests-file
14394 (package-with-python2 python-requests-file))
14395
14396(define-public python-tldextract
14397 (package
14398 (name "python-tldextract")
14399 (version "2.2.0")
14400 (source
14401 (origin
14402 (method url-fetch)
14403 (uri (pypi-uri "tldextract" version))
14404 (sha256
14405 (base32
14406 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
14407 (build-system python-build-system)
14408 (native-inputs
14409 `(("python-pytest" ,python-pytest)
14410 ("python-responses" ,python-responses)))
14411 (propagated-inputs
14412 `(("python-idna" ,python-idna)
14413 ("python-requests" ,python-requests)
14414 ("python-requests-file" ,python-requests-file)))
14415 (home-page
14416 "https://github.com/john-kurkowski/tldextract")
14417 (synopsis
14418 "Separate the TLD from the registered domain and subdomains of a URL")
14419 (description
14420 "TLDExtract accurately separates the TLD from the registered domain and
14421subdomains of a URL, using the Public Suffix List. By default, this includes
14422the public ICANN TLDs and their exceptions. It can optionally support the
14423Public Suffix List's private domains as well.")
14424 (license license:bsd-3)))
14425
14426(define-public python2-tldextract
14427 (package-with-python2 python-tldextract))
14428
14429(define-public python-pynamecheap
14430 (package
14431 (name "python-pynamecheap")
14432 (version "0.0.3")
14433 (source
14434 (origin
14435 (method url-fetch)
14436 (uri (pypi-uri "PyNamecheap" version))
14437 (sha256
14438 (base32
14439 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
14440 (build-system python-build-system)
14441 (propagated-inputs
14442 `(("python-requests" ,python-requests)))
14443 (home-page
14444 "https://github.com/Bemmu/PyNamecheap")
14445 (synopsis
14446 "Namecheap API client in Python")
14447 (description
14448 "PyNamecheap is a Namecheap API client in Python.")
14449 (license license:expat)))
14450
14451(define-public python2-pynamecheap
14452 (package-with-python2 python-pynamecheap))
14453
14454(define-public python-dns-lexicon
14455 (package
14456 (name "python-dns-lexicon")
14457 (version "2.4.0")
14458 (source
14459 (origin
14460 (method url-fetch)
14461 (uri (pypi-uri "dns-lexicon" version))
14462 (sha256
14463 (base32
14464 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
14465 (build-system python-build-system)
14466 (arguments
14467 `(#:tests? #f)) ;requires internet access
14468 (propagated-inputs
14469 `(("python-future" ,python-future)
14470 ("python-pynamecheap" ,python-pynamecheap)
14471 ("python-requests" ,python-requests)
14472 ("python-tldextract" ,python-tldextract)
14473 ("python-urllib3" ,python-urllib3)))
14474 (home-page "https://github.com/AnalogJ/lexicon")
14475 (synopsis
14476 "Manipulate DNS records on various DNS providers")
14477 (description
14478 "Lexicon provides a way to manipulate DNS records on multiple DNS
14479providers in a standardized way. It has a CLI but it can also be used as a
14480Python library. It was designed to be used in automation, specifically with
14481Let's Encrypt.")
14482 (license license:expat)))
14483
14484(define-public python2-dns-lexicon
14485 (package-with-python2 python-dns-lexicon))
14486
14487(define-public python-commandlines
14488 (package
14489 (name "python-commandlines")
14490 (version "0.4.1")
14491 (source
14492 (origin
14493 (method url-fetch)
14494 (uri (pypi-uri "commandlines" version))
14495 (sha256
14496 (base32
14497 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
14498 (build-system python-build-system)
14499 (home-page "https://github.com/chrissimpkins/commandlines")
14500 (synopsis "Command line argument to object parsing library")
14501 (description
14502 "@code{Commandlines} is a Python library for command line application
14503development that supports command line argument parsing, command string
14504validation testing and application logic.")
14505 (license license:expat)))
14506
14507;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
14508;; python-numba. They have a very unflexible relationship.
14509(define-public python-numba
14510 (package
14511 (name "python-numba")
7757e6d8 14512 (version "0.42.0")
44d10b1f
RW
14513 (source
14514 (origin
14515 (method url-fetch)
14516 (uri (pypi-uri "numba" version))
14517 (sha256
14518 (base32
7757e6d8 14519 "03rqdfx0512lcri2bcpngx5k3jwfbqnanqj3n19c7d6h6hqxvq9x"))))
44d10b1f
RW
14520 (build-system python-build-system)
14521 (arguments
14522 `(#:modules ((guix build utils)
14523 (guix build python-build-system)
14524 (ice-9 ftw)
14525 (srfi srfi-1)
14526 (srfi srfi-26))
14527 #:phases
14528 (modify-phases %standard-phases
14529 (add-after 'unpack 'disable-proprietary-features
14530 (lambda _
14531 (setenv "NUMBA_DISABLE_HSA" "1")
14532 (setenv "NUMBA_DISABLE_CUDA" "1")
14533 #t))
14534 (add-after 'unpack 'remove-failing-tests
14535 (lambda _
14536 ;; FIXME: these tests fail for unknown reasons:
14537 ;; test_non_writable_pycache, test_non_creatable_pycache, and
14538 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
14539 (substitute* "numba/tests/test_dispatcher.py"
14540 (("def test(_non_writable_pycache)" _ m)
14541 (string-append "def guix_skip" m))
14542 (("def test(_non_creatable_pycache)" _ m)
14543 (string-append "def guix_skip" m))
14544 (("def test(_frozen)" _ m)
14545 (string-append "def guix_skip" m)))
14546
14547 ;; These tests fail because we don't run the tests from the build
14548 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
14549 ;; They ar in numba.tests.test_pycc.TestDistutilsSupport.
14550 (substitute* "numba/tests/test_pycc.py"
14551 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
14552 (string-append "def guix_skip" m)))
14553 #t))
14554 (replace 'check
14555 (lambda _
14556 (let ((cwd (getcwd)))
14557 (setenv "PYTHONPATH"
14558 (string-append cwd "/build/"
14559 (find (cut string-prefix? "lib" <>)
14560 (scandir (string-append cwd "/build")))
14561 ":"
14562 (getenv "PYTHONPATH")))
14563 ;; Something is wrong with the PYTHONPATH when running the
14564 ;; tests from the build directory, as it complains about not being
14565 ;; able to import certain modules.
14566 (with-directory-excursion "/tmp"
14567 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
14568 #t)))))
14569 (propagated-inputs
14570 `(("python-llvmlite" ,python-llvmlite)
14571 ("python-numpy" ,python-numpy)
14572 ("python-singledispatch" ,python-singledispatch)))
14573 ;; Needed for tests.
14574 (inputs
14575 `(("python-jinja2" ,python-jinja2)
14576 ("python-pygments" ,python-pygments)))
14577 (home-page "https://numba.pydata.org")
14578 (synopsis "Compile Python code using LLVM")
14579 (description "Numba gives you the power to speed up your applications with
14580high performance functions written directly in Python. With a few
14581annotations, array-oriented and math-heavy Python code can be just-in-time
14582compiled to native machine instructions, similar in performance to C, C++ and
14583Fortran, without having to switch languages or Python interpreters.
14584
14585Numba works by generating optimized machine code using the LLVM compiler
14586infrastructure at import time, runtime, or statically (using the included pycc
14587tool).")
14588 (license license:bsd-3)))
14589
14590(define-public python-anndata
14591 (package
14592 (name "python-anndata")
8c9372c1 14593 (version "0.6.18")
44d10b1f
RW
14594 (source
14595 (origin
14596 (method url-fetch)
14597 (uri (pypi-uri "anndata" version))
14598 (sha256
14599 (base32
8c9372c1 14600 "03x83yjaccbqszj7x4fwwmpil0ai59yx64d1zmf2691za3j03w73"))))
44d10b1f
RW
14601 (build-system python-build-system)
14602 (propagated-inputs
14603 `(("python-h5py" ,python-h5py)
14604 ("python-natsort" ,python-natsort)
14605 ("python-pandas" ,python-pandas)
14606 ("python-scipy" ,python-scipy)))
14607 (home-page "https://github.com/theislab/anndata")
14608 (synopsis "Annotated data for data analysis pipelines")
14609 (description "Anndata is a package for simple (functional) high-level APIs
14610for data analysis pipelines. In this context, it provides an efficient,
14611scalable way of keeping track of data together with learned annotations and
14612reduces the code overhead typically encountered when using a mostly
14613object-oriented library such as @code{scikit-learn}.")
14614 (license license:bsd-3)))
14615
14616(define-public python-dill
14617 (package
14618 (name "python-dill")
14619 (version "0.2.8.2")
14620 (source
14621 (origin
14622 (method url-fetch)
14623 (uri (pypi-uri "dill" version))
14624 (sha256
14625 (base32
14626 "1cymzn9fxwdy33h21zkk4gqgzvd25110hh3zdqnvnwa3p52c4kb2"))))
14627 (build-system python-build-system)
14628 ;; FIXME: The check phase fails with "don't know how to make test".
14629 (arguments '(#:tests? #f))
14630 (home-page "https://pypi.org/project/dill")
14631 (synopsis "Serialize all of Python")
14632 (description "Dill extends Python's @code{pickle} module for serializing
14633and de-serializing Python objects to the majority of the built-in Python
14634types. Dill provides the user the same interface as the @code{pickle} module,
14635and also includes some additional features. In addition to pickling Python
14636objects, @code{dill} provides the ability to save the state of an interpreter
14637session in a single command. Hence, it would be feasable to save a
14638interpreter session, close the interpreter, ship the pickled file to another
14639computer, open a new interpreter, unpickle the session and thus continue from
14640the saved state of the original interpreter session.")
14641 (license license:bsd-3)))
14642
14643(define-public python-multiprocess
14644 (package
14645 (name "python-multiprocess")
14646 (version "0.70.6.1")
14647 (source
14648 (origin
14649 (method url-fetch)
14650 (uri (pypi-uri "multiprocess" version))
14651 (sha256
14652 (base32
14653 "1ip5caz67b3q0553mr8gm8xwsb8x500jn8ml0gihgyfy52m2ypcq"))))
14654 (build-system python-build-system)
14655 (propagated-inputs
14656 `(("python-dill" ,python-dill)))
14657 (home-page "https://pypi.org/project/multiprocess")
14658 (synopsis "Multiprocessing and multithreading in Python")
14659 (description
14660 "This package is a fork of the multiprocessing Python package, a package
14661which supports the spawning of processes using the API of the standard
14662library's @code{threading} module.")
14663 (license license:bsd-3)))
14664
14665(define-public python-toolz
14666 (package
14667 (name "python-toolz")
14668 (version "0.9.0")
14669 (source
14670 (origin
14671 (method url-fetch)
14672 (uri (pypi-uri "toolz" version))
14673 (sha256
14674 (base32
14675 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
14676 (build-system python-build-system)
14677 ;; FIXME: tests cannot be computed: "Can't perform this operation for
14678 ;; unregistered loader type"
14679 (arguments '(#:tests? #f))
14680 (home-page "https://github.com/pytoolz/toolz/")
14681 (synopsis "List processing tools and functional utilities")
14682 (description
14683 "This package provides a set of utility functions for iterators,
14684functions, and dictionaries.")
14685 (license license:bsd-3)))
14686
14687(define-public python2-toolz
14688 (package-with-python2 python-toolz))
14689
14690(define-public python-cytoolz
14691 (package
14692 (name "python-cytoolz")
14693 (version "0.9.0.1")
14694 (source
14695 (origin
14696 (method url-fetch)
14697 (uri (pypi-uri "cytoolz" version))
14698 (sha256
14699 (base32
14700 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
14701 (build-system python-build-system)
14702 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
14703 ;; 'exceptions'"
14704 (arguments '(#:tests? #f))
14705 (propagated-inputs
14706 `(("python-toolz" ,python-toolz)))
14707 (native-inputs
14708 `(("python-cython" ,python-cython)))
14709 (home-page "https://github.com/pytoolz/cytoolz")
14710 (synopsis "High performance functional utilities")
14711 (description
14712 "The cytoolz package implements the same API as provided by toolz. The
14713main differences are that @code{cytoolz} is faster and cytoolz offers a C API
14714that is accessible to other projects developed in Cython.")
14715 (license license:bsd-3)))
14716
14717(define-public python-sortedcontainers
14718 (package
14719 (name "python-sortedcontainers")
14720 (version "2.0.4")
14721 (source
14722 (origin
14723 (method url-fetch)
14724 (uri (pypi-uri "sortedcontainers" version))
14725 (sha256
14726 (base32
14727 "10hrk2k0hbf9x78vd3f0lj277m1yzfhzzxr0hja718liwb398wk0"))))
14728 (build-system python-build-system)
14729 (native-inputs
14730 `(("python-tox" ,python-tox)))
14731 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
14732 (synopsis "Sorted List, Sorted Dict, Sorted Set")
14733 (description
14734 "This package provides a sorted collections library, written in
14735pure-Python.")
14736 (license license:asl2.0)))
14737
14738(define-public python-cloudpickle
14739 (package
14740 (name "python-cloudpickle")
14741 (version "0.6.1")
14742 (source
14743 (origin
14744 (method url-fetch)
14745 (uri (pypi-uri "cloudpickle" version))
14746 (sha256
14747 (base32
14748 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
14749 (build-system python-build-system)
14750 ;; FIXME: there are 5 errors in 122 tests:
14751 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
14752 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
14753 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
14754 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
14755 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
14756 ;; TypeError: cannot serialize '_io.BufferedRandom' object
14757 (arguments '(#:tests? #f))
14758 (native-inputs
14759 `(("python-pytest" ,python-pytest)
14760 ("python-mock" ,python-mock)
14761 ("python-tornado" ,python-tornado)))
14762 (home-page "https://github.com/cloudpipe/cloudpickle")
14763 (synopsis "Extended pickling support for Python objects")
14764 (description
14765 "Cloudpickle makes it possible to serialize Python constructs not
14766supported by the default pickle module from the Python standard library. It
14767is especially useful for cluster computing where Python expressions are
14768shipped over the network to execute on remote hosts, possibly close to the
14769data.")
14770 (license license:bsd-3)))
14771
14772(define-public python2-cloudpickle
14773 (package-with-python2 python-cloudpickle))
14774
14775(define-public python-locket
14776 (package
14777 (name "python-locket")
14778 (version "0.2.0")
14779 (source
14780 (origin
14781 (method url-fetch)
14782 (uri (pypi-uri "locket" version))
14783 (sha256
14784 (base32
14785 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
14786 (build-system python-build-system)
14787 (home-page "https://github.com/mwilliamson/locket.py")
14788 (synopsis "File-based locks for Python")
14789 (description
14790 "Locket implements a lock that can be used by multiple processes provided
14791they use the same path.")
14792 (license license:bsd-2)))
14793
14794(define-public python2-locket
14795 (package-with-python2 python-locket))
14796
14797(define-public python-blosc
14798 (package
14799 (name "python-blosc")
14800 (version "1.5.1")
14801 (source
14802 (origin
14803 (method url-fetch)
14804 (uri (pypi-uri "blosc" version))
14805 (sha256
14806 (base32
14807 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
14808 (build-system python-build-system)
14809 ;; FIXME: all tests pass, but then this error is printed:
14810 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
14811 (arguments '(#:tests? #f))
14812 (propagated-inputs
14813 `(("python-numpy" ,python-numpy)))
14814 (home-page "https://github.com/blosc/python-blosc")
14815 (synopsis "Python wrapper for the Blosc data compressor library")
14816 (description "Blosc is a high performance compressor optimized for binary
14817data. It has been designed to transmit data to the processor cache faster
14818than the traditional, non-compressed, direct memory fetch approach via a
14819@code{memcpy()} system call.
14820
14821Blosc works well for compressing numerical arrays that contains data with
14822relatively low entropy, like sparse data, time series, grids with
14823regular-spaced values, etc.
14824
14825This Python package wraps the Blosc library.")
14826 (license license:bsd-3)))
14827
14828(define-public python2-blosc
14829 (package-with-python2 python-blosc))
14830
14831(define-public python-partd
14832 (package
14833 (name "python-partd")
14834 (version "0.3.9")
14835 (source
14836 (origin
14837 (method url-fetch)
14838 (uri (pypi-uri "partd" version))
14839 (sha256
14840 (base32
14841 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
14842 (build-system python-build-system)
14843 (propagated-inputs
14844 `(("python-blosc" ,python-blosc)
14845 ("python-locket" ,python-locket)
14846 ("python-numpy" ,python-numpy)
14847 ("python-pandas" ,python-pandas)
14848 ("python-pyzmq" ,python-pyzmq)
14849 ("python-toolz" ,python-toolz)))
14850 (home-page "https://github.com/dask/partd/")
14851 (synopsis "Appendable key-value storage")
14852 (description "Partd stores key-value pairs. Values are raw bytes. We
14853append on old values. Partd excels at shuffling operations.")
14854 (license license:bsd-3)))
14855
14856(define-public python2-partd
14857 (package-with-python2 python-partd))
14858
14859(define-public python-dask
14860 (package
14861 (name "python-dask")
755226e9 14862 (version "1.1.4")
44d10b1f
RW
14863 (source
14864 (origin
14865 (method url-fetch)
14866 (uri (pypi-uri "dask" version))
14867 (sha256
14868 (base32
755226e9 14869 "1hrnfz4pzawikz9b622vjz2500n7hs25nz9msy1k8l4g7l2kr6ky"))))
44d10b1f
RW
14870 (build-system python-build-system)
14871 ;; A single test out of 5000+ fails. This test is marked as xfail when
14872 ;; pytest-xdist is used.
14873 (arguments
14874 `(#:phases
14875 (modify-phases %standard-phases
14876 (add-after 'unpack 'disable-broken-test
14877 (lambda _
14878 (substitute* "dask/tests/test_threaded.py"
14879 (("def test_interrupt\\(\\)" m)
14880 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
14881 m)))
14882 (when (which "python2")
14883 ;; This test fails with recent Pandas:
14884 ;; <https://github.com/dask/dask/issues/3794>.
14885 (substitute* "dask/dataframe/tests/test_dataframe.py"
14886 (("def test_info\\(\\)" m)
14887 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
14888 m))))
14889 #t))
14890 (replace 'check
14891 (lambda _ (invoke "pytest" "-vv"))))))
14892 (propagated-inputs
14893 `(("python-cloudpickle" ,python-cloudpickle)
14894 ("python-numpy" ,python-numpy)
14895 ("python-pandas" ,python-pandas)
14896 ("python-partd" ,python-partd)
14897 ("python-toolz" ,python-toolz)
14898 ("python-pyyaml" ,python-pyyaml)))
14899 (native-inputs
14900 `(("python-pytest" ,python-pytest)
14901 ("python-pytest-runner" ,python-pytest-runner)))
14902 (home-page "https://github.com/dask/dask/")
14903 (synopsis "Parallel computing with task scheduling")
14904 (description
14905 "Dask is a flexible parallel computing library for analytics. It
14906consists of two components: dynamic task scheduling optimized for computation,
14907and large data collections like parallel arrays, dataframes, and lists that
14908extend common interfaces like NumPy, Pandas, or Python iterators to
14909larger-than-memory or distributed environments. These parallel collections
14910run on top of the dynamic task schedulers. ")
14911 (license license:bsd-3)))
14912
14913(define-public python2-dask
14914 (package-with-python2 python-dask))
14915
14916(define-public python-ilinkedlist
14917 (package
14918 (name "python-ilinkedlist")
14919 (version "0.4.0")
14920 (source
14921 (origin
14922 (method url-fetch)
14923 (uri (pypi-uri "ilinkedlist" version))
14924 (sha256
14925 (base32
14926 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
14927 (build-system python-build-system)
14928 (native-inputs `(("python-pytest" ,python-pytest)))
14929 (inputs `(("python" ,python)))
14930 (home-page "https://github.com/luther9/ilinkedlist-py")
14931 (synopsis "Immutable linked list library")
14932 (description
14933 "This is a implementation of immutable linked lists for Python. It
14934contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
14935Since a linked list is treated as immutable, it is hashable, and its length
14936can be retrieved in constant time. Some of the terminology is inspired by
14937LISP. It is possible to create an improper list by creating a @code{Pair}
14938with a non-list @code{cdr}.")
14939 (license license:gpl3+)))
14940
14941(define-public python-readlike
14942 (package
14943 (name "python-readlike")
14944 (version "0.1.3")
14945 (source
14946 (origin
14947 (method url-fetch)
14948 (uri (pypi-uri "readlike" version))
14949 (sha256
14950 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
14951 (build-system python-build-system)
14952 (home-page "https://github.com/jangler/readlike")
14953 (synopsis "GNU Readline-like line editing module")
14954 (description
14955 "This Python module provides line editing functions similar to the default
14956Emacs-style ones of GNU Readline. Unlike the Python standard library's
14957@code{readline} package, this one allows access to those capabilties in settings
14958outside of a standard command-line interface. It is especially well-suited to
14959interfacing with Urwid, due to a shared syntax for describing key inputs.
14960
14961Currently, all stateless Readline commands are implemented. Yanking and history
14962are not supported.")
14963 (license license:expat)))
14964
14965(define-public python2-readlike
14966 (package-with-python2 python-readlike))
14967
14968(define-public python-reparser
14969 (package
14970 (name "python-reparser")
14971 (version "1.4.3")
14972 (source
14973 (origin
14974 (method url-fetch)
14975 (uri (pypi-uri "ReParser" version))
14976 (sha256
14977 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
14978 (build-system python-build-system)
14979 (home-page "https://github.com/xmikos/reparser")
14980 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
14981 (description
14982 "This Python library provides a simple lexer/parser for inline markup based
14983on regular expressions.")
14984 (license license:expat)))
14985
14986(define-public python2-reparser
14987 (let ((reparser (package-with-python2
14988 (strip-python2-variant python-reparser))))
14989 (package (inherit reparser)
14990 (propagated-inputs
14991 `(("python2-enum34" ,python2-enum34)
14992 ,@(package-propagated-inputs reparser))))))
14993
14994(define-public python-precis-i18n
14995 (package
14996 (name "python-precis-i18n")
14997 (version "1.0.0")
14998 (source
14999 (origin
15000 (method url-fetch)
15001 (uri (pypi-uri "precis_i18n" version))
15002 (sha256
15003 (base32
15004 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
15005 (build-system python-build-system)
15006 (home-page "https://github.com/byllyfish/precis_i18n")
15007 (synopsis "Implementation of the PRECIS framework")
15008 (description
15009 "This module implements the PRECIS Framework as described in RFC 8264,
15010RFC 8265 and RFC 8266.")
15011 (license license:expat)))
15012
d0446c4b
RW
15013(define-public python-absl-py
15014 (package
15015 (name "python-absl-py")
15016 (version "0.6.1")
15017 (source
15018 (origin
15019 (method url-fetch)
15020 (uri (pypi-uri "absl-py" version))
15021 (sha256
15022 (base32
15023 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
15024 (build-system python-build-system)
15025 (propagated-inputs
15026 `(("python-six" ,python-six)))
15027 (home-page "https://github.com/abseil/abseil-py")
15028 (synopsis "Abseil Python common libraries")
15029 (description
15030 "This package provides the Abseil Python Common Libraries, a collection
15031of Python libraries for building Python applications.")
15032 (license license:asl2.0)))
15033
81bed4e9
RW
15034(define-public python-astor
15035 (package
15036 (name "python-astor")
15037 (version "0.7.1")
15038 (source
15039 (origin
15040 (method url-fetch)
15041 (uri (pypi-uri "astor" version))
15042 (sha256
15043 (base32
15044 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
15045 (build-system python-build-system)
15046 ;; FIXME: There are two errors and two test failures.
15047 (arguments `(#:tests? #f))
15048 (home-page "https://github.com/berkerpeksag/astor")
39ee82ff 15049 (synopsis "Read and write Python ASTs")
81bed4e9 15050 (description "Astor is designed to allow easy manipulation of Python
39ee82ff 15051source via the Abstract Syntax Tree.")
81bed4e9
RW
15052 (license license:bsd-3)))
15053
39ee82ff
RW
15054(define-public python2-astor
15055 (package-with-python2 python-astor))
15056
22e623ae
RW
15057(define-public python-grpcio
15058 (package
15059 (name "python-grpcio")
15060 (version "1.17.1")
15061 (source
15062 (origin
15063 (method url-fetch)
15064 (uri (pypi-uri "grpcio" version))
15065 (sha256
15066 (base32
15067 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
15068 (build-system python-build-system)
15069 (propagated-inputs
15070 `(("python-six" ,python-six)))
15071 (home-page "https://grpc.io")
15072 (synopsis "HTTP/2-based RPC framework")
15073 (description "This package provides a Python library for communicating
15074with the HTTP/2-based RPC framework gRPC.")
15075 (license license:asl2.0)))
15076
79869f80
RW
15077(define-public python-astunparse
15078 (package
15079 (name "python-astunparse")
15080 (version "1.6.1")
15081 (source
15082 (origin
15083 (method url-fetch)
15084 (uri (pypi-uri "astunparse" version))
15085 (sha256
15086 (base32
15087 "1jhidwyrqn17avqh9xnnm3wd7q7aahaq009cba67g86y6gxicyyj"))))
15088 (build-system python-build-system)
15089 (arguments '(#:tests? #f)) ; there are none
15090 (propagated-inputs
15091 `(("python-six" ,python-six)
15092 ("python-wheel" ,python-wheel)))
15093 (home-page "https://github.com/simonpercivall/astunparse")
15094 (synopsis "AST unparser for Python")
15095 (description "This package provides an AST unparser for Python. It is a
15096factored out version of @code{unparse} found in the Python source
15097distribution.")
15098 (license license:bsd-3)))
15099
2884aac0
RW
15100(define-public python-gast
15101 (package
15102 (name "python-gast")
bd300261 15103 (version "0.2.2")
2884aac0
RW
15104 (source
15105 (origin
15106 (method url-fetch)
15107 (uri (pypi-uri "gast" version))
15108 (sha256
bd300261 15109 (base32 "1w5dzdb3gpcfmd2s0b93d8gff40a1s41rv31458z14inb3s9v4zy"))))
2884aac0
RW
15110 (build-system python-build-system)
15111 (propagated-inputs
15112 `(("python-astunparse" ,python-astunparse)))
15113 (home-page "https://pypi.org/project/gast/")
15114 (synopsis "Generic Python AST that abstracts the underlying Python version")
15115 (description
15116 "GAST provides a compatibility layer between the AST of various Python
15117versions, as produced by @code{ast.parse} from the standard @code{ast}
15118module.")
15119 (license license:bsd-3)))
15120
44d10b1f
RW
15121(define-public python-wikidata
15122 (package
15123 (name "python-wikidata")
15124 (version "0.6.1")
15125 (source
15126 (origin
15127 (method url-fetch)
15128 (uri (pypi-uri "Wikidata" version))
15129 (sha256
15130 (base32
15131 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
15132 (build-system python-build-system)
15133 (propagated-inputs
15134 `(("python-babel" ,python-babel)))
15135 (home-page "https://github.com/dahlia/wikidata")
15136 (synopsis "Wikidata client library")
15137 (description
15138 "This package provides a Python interface to
15139@url{https://www.wikidata.org/, Wikidata}.")
15140 (properties '((upstream-name . "Wikidata")))
15141 (license license:gpl3+)))
15142
15143(define-public python-doctest-ignore-unicode
15144 (package
15145 (name "python-doctest-ignore-unicode")
15146 (version "0.1.2")
15147 (source
15148 (origin
15149 (method url-fetch)
15150 (uri (pypi-uri "doctest-ignore-unicode" version))
15151 (sha256
15152 (base32
15153 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
15154 (build-system python-build-system)
15155 (native-inputs
15156 `(("python-nose" ,python-nose)))
15157 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
15158 (synopsis "Ignore Unicode literal prefixes in doctests")
15159 (description
15160 "This package adds support for a flag to ignore Unicode literal prefixes
15161in doctests.")
15162 (license license:asl2.0)))
15163
15164(define-public python-attr
15165 (package
15166 (name "python-attr")
15167 (version "0.3.1")
15168 (source
15169 (origin
15170 (method url-fetch)
15171 (uri (pypi-uri "attr" version))
15172 (sha256
15173 (base32
15174 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
15175 (build-system python-build-system)
15176 (home-page "https://github.com/denis-ryzhkov/attr")
15177 (synopsis "Decorator for attributes of target function or class")
15178 (description "Simple decorator to set attributes of target function or
15179class in a @acronym{DRY, Don't Repeat Yourself} way.")
15180 (license license:expat)))
f98232a3
VC
15181
15182(define-public python-construct
15183 (package
15184 (name "python-construct")
15185 (version "2.9.45")
15186 (source
15187 (origin
15188 (method url-fetch)
15189 (uri (pypi-uri "construct" version))
15190 (sha256
15191 (base32
15192 "130iy05awzigm2xah2yvlmb08mac5bi4gzr5m3g7k1krs3ps0w92"))))
15193 (build-system python-build-system)
15194 (arguments
15195 `(#:tests? #f)) ; No tests exist.
15196 (propagated-inputs
15197 `(("python-extras" ,python-extras)
15198 ("python-arrow" ,python-arrow)
15199 ("python-numpy" ,python-numpy)
15200 ("python-ruamel.yaml" ,python-ruamel.yaml)))
15201 (home-page "http://construct.readthedocs.io")
15202 (synopsis "Declarative and symmetrical parser and builder for binary data")
15203 (description
15204 "This package provides both simple, atomic constructs (such as
15205integers of various sizes), as well as composite ones which allow you
15206form hierarchical and sequential structures of increasing complexity.
15207It features bit and byte granularity, easy debugging and testing, an
15208easy-to-extend subclass system, and lots of primitive constructs to
15209make your work easier.")
15210 (license license:expat)))
b742c006
LF
15211
15212(define-public python-humanize
15213 (package
15214 (name "python-humanize")
15215 (version "0.5.1")
15216 (source
15217 (origin
15218 (method url-fetch)
15219 (uri (pypi-uri "humanize" version))
15220 (sha256
15221 (base32
15222 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
15223 (arguments
15224 '(#:tests? #f)) ; tests not in pypi archive
15225 (build-system python-build-system)
15226 (home-page "https://github.com/jmoiron/humanize")
15227 (synopsis "Print numerical information in a human-readable form")
15228 (description "This package provides a Python module that displays numbers
15229and dates in \"human readable\" forms. For example, it would display
15230\"12345591313\" as \"12.3 billion\".")
15231 (license license:expat)))
d5bbf66d
LF
15232
15233(define-public python-txaio
15234 (package
15235 (name "python-txaio")
15236 (version "18.8.1")
15237 (source
15238 (origin
15239 (method url-fetch)
15240 (uri (pypi-uri "txaio" version))
15241 (sha256
15242 (base32
15243 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
15244 (build-system python-build-system)
15245 (propagated-inputs
15246 `(("python-twisted" ,python-twisted)
15247 ("python-six" ,python-six)))
15248 (home-page "https://github.com/crossbario/txaio")
15249 (synopsis "Compatibility layer between Python asyncio and Twisted")
15250 (description "Txaio provides a compatibility layer between the Python
15251@code{asyncio} module and @code{Twisted}.")
15252 (license license:expat)))
963dfd3a
RW
15253
15254(define-public python-toolshed
15255 (package
15256 (name "python-toolshed")
15257 (version "0.4.6")
15258 (source
15259 (origin
15260 (method url-fetch)
15261 (uri (pypi-uri "toolshed" version))
15262 (sha256
15263 (base32
15264 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
15265 (build-system python-build-system)
15266 (native-inputs
15267 `(("python-nose" ,python-nose)))
15268 (home-page "https://github.com/brentp/toolshed/")
15269 (synopsis "Collection of modules and functions for working with data")
15270 (description "This is a collection of well-tested, simple modules and
15271functions that aim to reduce boilerplate when working with data.")
15272 (license license:bsd-2)))
c91ecf2d
RW
15273
15274(define-public python-annoy
15275 (package
15276 (name "python-annoy")
15277 (version "1.15.1")
15278 (source
15279 (origin
15280 (method url-fetch)
15281 (uri (pypi-uri "annoy" version))
15282 (sha256
15283 (base32
15284 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
15285 (build-system python-build-system)
15286 (native-inputs
15287 `(("python-nose" ,python-nose)))
15288 (home-page "https://github.com/spotify/annoy/")
15289 (synopsis "Approximate nearest neighbors library")
15290 (description
15291 "Annoy is a C++ library with Python bindings to search for points in
15292space that are close to a given query point. It also creates large read-only
15293file-based data structures that are @code{mmap}ped into memory so that many
15294processes may share the same data.")
15295 (license license:asl2.0)))
412342d1
NG
15296
15297(define-public python-sphinxcontrib-svg2pdfconverter
15298 (package
15299 (name "python-sphinxcontrib-svg2pdfconverter")
15300 (version "0.1.0")
15301 (source (origin
15302 (method url-fetch)
15303 (uri (pypi-uri "sphinxcontrib-svg2pdfconverter" version))
15304 (sha256
15305 (base32
15306 "1abvbgkkii13q8nsb10r0gc5lm0p9iq1iwhfhakn5ifn6asa0183"))))
15307 (build-system python-build-system)
15308 (propagated-inputs
15309 `(("python-sphinx" ,python-sphinx)))
15310 (home-page "https://github.com/missinglinkelectronics/sphinxcontrib-svg2pdfconverter/releases")
15311 (synopsis "Sphinx SVG to PDF converter extension")
15312 (description "A Sphinx extension to convert SVG images to PDF in case the builder does not support
15313SVG images natively (e.g. LaTeX).")
15314 (license license:bsd-3)))