gnu: python-latexcodec: Update to 1.0.6.
[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>
54;;; Copyright © 2018 Nicolas Goaziou <mail@nicolasgoaziou.fr>
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")
fe4a4bd2 2768 (version "0.25.0")
be4d840c
BG
2769 (source
2770 (origin
2771 (method url-fetch)
2772 (uri (pypi-uri "python-language-server" version))
2773 (sha256
2774 (base32
fe4a4bd2 2775 "1xabnaqd4n72myrc3mxl2y33vr2p7c9c5a87n77p9k327ckvdx01"))))
be4d840c
BG
2776 (build-system python-build-system)
2777 (propagated-inputs
2778 `(("python-pluggy" ,python-pluggy)
2779 ("python-jsonrpc-server" ,python-jsonrpc-server)
2780 ("python-jedi" ,python-jedi)
2781 ("python-yapf" ,python-yapf)
2782 ("python-pyflakes" ,python-pyflakes)
2783 ("python-pydocstyle" ,python-pydocstyle)
2784 ("python-pycodestyle" ,python-pycodestyle)
2785 ("python-mccabe" ,python-mccabe)
2786 ("python-rope" ,python-rope)
fe4a4bd2
BG
2787 ("python-autopep8" ,python-autopep8)
2788 ("python-pylint" ,python-pylint)))
be4d840c
BG
2789 (home-page "https://github.com/palantir/python-language-server")
2790 (synopsis "Python implementation of the Language Server Protocol")
2791 (description
2792 "The Python Language Server (pyls) is an implementation of the Python 3
2793language specification for the Language Server Protocol (LSP). This tool is
2794used in text editing environments to provide a complete and integrated
2795feature-set for programming Python effectively.")
2796 (license license:expat)))
2797
44d10b1f
RW
2798(define-public python-black
2799 (package
2800 (name "python-black")
2801 (version "18.6b4")
2802 (source
2803 (origin
2804 (method url-fetch)
2805 (uri (pypi-uri "black" version))
2806 (sha256
2807 (base32
2808 "0i4sfqgz6w15vd50kbhi7g7rifgqlf8yfr8y78rypd56q64qn592"))))
2809 (build-system python-build-system)
2810 (arguments
2811 `(#:phases
2812 (modify-phases %standard-phases
2813 (add-after 'patch-source-shebangs 'patch-extra-shebangs
2814 (lambda _
2815 (let ((python3 (which "python3")))
2816 (substitute* '("tests/data/fmtonoff.py"
2817 "tests/data/string_prefixes.py"
2818 "tests/data/function.py")
2819 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
2820 (string-append "#!" python3 (if (string? minor-version)
2821 minor-version
2822 ""))))))))))
2823 (propagated-inputs
2824 `(("python-click" ,python-click)
2825 ("python-attrs" ,python-attrs)
2826 ("python-appdirs" ,python-appdirs)
2827 ("python-toml" ,python-toml)))
2828 (home-page "https://github.com/ambv/black")
2829 (synopsis "The uncompromising code formatter")
2830 (description "Black is the uncompromising Python code formatter.")
2831 (license license:expat)))
2832
2833(define-public python-blinker
2834 (package
2835 (name "python-blinker")
2836 (version "1.4")
2837 (source
2838 (origin
2839 (method url-fetch)
2840 (uri (pypi-uri "blinker" version))
2841 (sha256
2842 (base32
2843 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
2844 (build-system python-build-system)
2845 (home-page "http://pythonhosted.org/blinker/")
2846 (synopsis "Fast, simple object-to-object and broadcast signaling")
2847 (description
2848 "Blinker provides a fast dispatching system that allows any number of
2849interested parties to subscribe to events, or \"signals\".")
2850 (license license:expat)))
2851
2852(define-public python2-blinker
2853 (package-with-python2 python-blinker))
2854
2855(define-public pelican
2856 (package
2857 (name "pelican")
aa71b690 2858 (version "4.0.1")
44d10b1f
RW
2859 (source
2860 (origin
2861 (method url-fetch)
2862 (uri (pypi-uri "pelican" version))
2863 (sha256
2864 (base32
aa71b690 2865 "05yda7n6r0ll18fpdjzkzyr0ls8hbb86fnjyb33k9jvv5avah2lr"))))
44d10b1f
RW
2866 (build-system python-build-system)
2867 (propagated-inputs
2868 `(("python-feedgenerator" ,python-feedgenerator)
2869 ("python-jinja2" ,python-jinja2)
2870 ("python-pygments" ,python-pygments)
2871 ("python-docutils" ,python-docutils)
2872 ("python-pytz" ,python-pytz)
2873 ("python-blinker" ,python-blinker)
2874 ("python-unidecode" ,python-unidecode)
2875 ("python-six" ,python-six)
2876 ("python-dateutil" ,python-dateutil)
2877 ("python-markdown" ,python-markdown)))
2878 (home-page "https://getpelican.com/")
2879 (arguments
2880 `(;; XXX Requires a lot more packages to do unit tests :P
2881 #:tests? #f
2882 #:phases (modify-phases %standard-phases
2883 (add-before
2884 'install 'adjust-requires
2885 ;; Since feedgenerator is installed from git, it doesn't
2886 ;; conform to the version requirements.
2887 ;;
2888 ;; We *do have* "feedgenerator >= 1.6", but strip off the
2889 ;; version requirement so setuptools doesn't get confused.
2890 (lambda _
2891 (substitute* "setup.py"
2892 (("['\"]feedgenerator.*?['\"]")
2893 "'feedgenerator'")))))))
2894 (synopsis "Python-based static site publishing system")
2895 (description
2896 "Pelican is a tool to generate a static blog from reStructuredText,
2897Markdown input files, and more. Pelican uses Jinja2 for templating
2898and is very extensible.")
2899 (license license:agpl3+)))
2900
2901(define-public python-scikit-image
2902 (package
2903 (name "python-scikit-image")
9ff04084 2904 (version "0.14.2")
44d10b1f
RW
2905 (source
2906 (origin
2907 (method url-fetch)
2908 (uri (pypi-uri "scikit-image" version))
2909 (sha256
9ff04084 2910 (base32 "07qchljkyxvg5nrm12fvszi7pmjk4m01qp0w0z8syxzxxs20pz8s"))))
44d10b1f
RW
2911 (build-system python-build-system)
2912 (arguments
2913 ;; TODO: Some tests require running X11 server. Disable them?
2914 '(#:tests? #f))
2915 ;; See DEPENDS.txt for the list of build and run time requiremnts
2916 (propagated-inputs
2917 `(("python-cloudpickle" ,python-cloudpickle)
2918 ("python-dask" ,python-dask)
2919 ("python-matplotlib" ,python-matplotlib)
2920 ("python-networkx" ,python-networkx)
2921 ("python-numpy" ,python-numpy)
2922 ("python-pillow" ,python-pillow)
2923 ("python-pywavelets" ,python-pywavelets)
2924 ("python-scipy" ,python-scipy)
2925 ("python-six" ,python-six)))
2926 (native-inputs
2927 `(("python-cython" ,python-cython)))
2928 (home-page "http://scikit-image.org/")
2929 (synopsis "Image processing in Python")
2930 (description
2931 "Scikit-image is a collection of algorithms for image processing.")
2932 (license license:bsd-3)))
2933
2934(define-public python2-scikit-image
2935 (package-with-python2 python-scikit-image))
2936
2937(define-public python-cython
2938 (package
2939 (name "python-cython")
fa8ffaa0 2940 (version "0.29.5")
44d10b1f
RW
2941 (source
2942 (origin
2943 (method url-fetch)
2944 (uri (pypi-uri "Cython" version))
2945 (sha256
2946 (base32
fa8ffaa0 2947 "1wfb68g115gmf3mv23w0hh972b0ll85gpb92ci28x6h997br0llx"))))
44d10b1f
RW
2948 (build-system python-build-system)
2949 ;; we need the full python package and not just the python-wrapper
2950 ;; because we need libpython3.3m.so
2951 (inputs
2952 `(("python" ,python)))
2953 (arguments
2954 `(#:phases
2955 (modify-phases %standard-phases
2956 (add-before 'check 'set-HOME
2957 ;; some tests require access to "$HOME/.cython"
2958 (lambda _ (setenv "HOME" "/tmp") #t))
2959
2960 ;; FIXME: These tests started failing on armhf after the 0.28 update
2961 ;; (commit c69d11c5930), both with an error such as this:
2962 ;; compiling (cpp) and running dictcomp ...
2963 ;; === C/C++ compiler error output: ===
2964 ;; ‘
2965 ;; dictcomp.cpp:5221: confused by earlier errors, bailing out
2966 ;; See <https://hydra.gnu.org/build/2948724> for logs.
2967 ,@(if (target-arm32?)
2968 `((add-before 'check 'disable-failing-tests
2969 (lambda _
2970 (let ((disabled-tests (open-file "tests/bugs.txt" "a")))
2971 (for-each (lambda (test)
2972 (format disabled-tests "~a\n" test))
2973 '("memslice" "dictcomp"))
2974 (close-port disabled-tests)))))
2975 '())
2976
2977 (replace 'check
2978 (lambda _
2979 ;; The "with_outer_raising" test fails with Python 3.7. See
2980 ;; https://github.com/cython/cython/issues/2454
2981 (delete-file "tests/run/generators_py.py")
2982 (invoke "python" "runtests.py" "-vv"))))))
2983 (home-page "http://cython.org/")
2984 (synopsis "C extensions for Python")
2985 (description "Cython is an optimising static compiler for both the Python
2986programming language and the extended Cython programming language. It makes
2987writing C extensions for Python as easy as Python itself.")
2988 (license license:asl2.0)
2989 (properties `((python2-variant . ,(delay python2-cython))))))
2990
2991(define-public python2-cython
2992 (package (inherit (package-with-python2
2993 (strip-python2-variant python-cython)))
2994 (name "python2-cython")
2995 (inputs
2996 `(("python-2" ,python-2))))) ; this is not automatically changed
2997
2998;; The RPython toolchain currently does not support Python 3.
2999(define-public python2-rpython
3000 (package
3001 (name "python2-rpython")
3002 (version "0.2.1")
3003 (source
3004 (origin
3005 (method url-fetch)
3006 (uri (pypi-uri "rpython" version))
3007 (sha256
3008 (base32
3009 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
3010 (build-system python-build-system)
3011 (arguments `(#:python ,python-2))
3012 (native-inputs
3013 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3014 (home-page "https://rpython.readthedocs.org")
3015 (synopsis "Framework for implementing interpreters and virtual machines")
3016 (description "RPython is a translation and support framework for
3017producing implementations of dynamic languages, emphasizing a clean separation
3018between language specification and implementation aspects.")
3019 (license license:expat)))
3020
3021;; NOTE: when upgrading numpy please make sure that python-pandas and
3022;; python-scipy still build, as these three packages are often used together.
3023(define-public python-numpy
3024 (package
3025 (name "python-numpy")
3026 (version "1.15.4")
3027 (source
3028 (origin
3029 (method url-fetch)
3030 (uri (string-append
3031 "https://github.com/numpy/numpy/releases/download/v"
3032 version "/numpy-" version ".tar.gz"))
3033 (sha256
3034 (base32
3035 "102vcl2qq4pjbm7a3d67vkkvn4466ngia1d8wi5avqwqh8j0jvkn"))))
3036 (build-system python-build-system)
3037 (inputs
3038 `(("openblas" ,openblas)
3039 ("lapack" ,lapack)))
3040 (native-inputs
3041 `(("python-cython" ,python-cython)
3042 ("python-pytest" ,python-pytest)
3043 ("gfortran" ,gfortran)))
3044 (arguments
3045 `(#:phases
3046 (modify-phases %standard-phases
3047 (add-before 'build 'configure-blas-lapack
3048 (lambda* (#:key inputs #:allow-other-keys)
3049 (call-with-output-file "site.cfg"
3050 (lambda (port)
3051 (format port
3052 "[openblas]
3053libraries = openblas
3054library_dirs = ~a/lib
3055include_dirs = ~a/include
3056
3057# backslash-n to make emacs happy
3058\n[lapack]
3059lapack_libs = lapack
3060library_dirs = ~a/lib
3061include_dirs = ~a/include
3062"
3063 (assoc-ref inputs "openblas")
3064 (assoc-ref inputs "openblas")
3065 (assoc-ref inputs "lapack")
3066 (assoc-ref inputs "lapack"))))
3067 #t))
3068 (add-before 'build 'fix-executable-paths
3069 (lambda* (#:key inputs #:allow-other-keys)
3070 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
3071 ;; instead of /bin/sh.
3072 (substitute* "numpy/distutils/exec_command.py"
3073 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
3074 (string-append match-start (assoc-ref inputs "bash") match-end)))
3075 ;; Use "gcc" executable, not "cc".
3076 (substitute* "numpy/distutils/system_info.py"
3077 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3078 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3079 #t))
3080 ;; Tests can only be run after the library has been installed and not
3081 ;; within the source directory.
3082 (delete 'check)
3083 (add-after 'install 'check
3084 (lambda* (#:key outputs inputs #:allow-other-keys)
3085 ;; Make installed package available for running the tests
3086 (add-installed-pythonpath inputs outputs)
3087 ;; Make sure "f2py" etc is found.
3088 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
3089 ":" (getenv "PATH")))
3090 (with-directory-excursion "/tmp"
3091 (invoke "python" "-c"
3092 "import numpy; numpy.test(verbose=2)")))))))
3093 (home-page "http://www.numpy.org/")
3094 (synopsis "Fundamental package for scientific computing with Python")
3095 (description "NumPy is the fundamental package for scientific computing
3096with Python. It contains among other things: a powerful N-dimensional array
3097object, sophisticated (broadcasting) functions, tools for integrating C/C++
3098and Fortran code, useful linear algebra, Fourier transform, and random number
3099capabilities.")
3100 (license license:bsd-3)))
3101
3102(define-public python2-numpy
3103 (package-with-python2 python-numpy))
3104
3105;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
3106;; interest only for legacy code going back to NumPy's predecessor
3107;; Numeric.
3108(define-public python2-numpy-1.8
3109 (package (inherit python2-numpy)
3110 (version "1.8.2")
3111 (source
3112 (origin
3113 (method url-fetch)
3114 (uri (string-append
3115 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
3116 (file-name (string-append "python2-numpy-" version ".tar.gz"))
3117 (sha256
3118 (base32
3119 "0sc20gz1b17xnyrkp5frca3ql5qfalpv916hfg2kqxpwr6jg0f1g"))))
3120 (arguments
3121 (substitute-keyword-arguments (package-arguments python2-numpy)
3122 ((#:phases phases)
3123 `(modify-phases ,phases
3124 (replace 'configure-blas-lapack
3125 (lambda* (#:key inputs #:allow-other-keys)
3126 (call-with-output-file "site.cfg"
3127 (lambda (port)
3128 (format port
3129 "[openblas]
3130libraries = openblas,lapack
3131library_dirs = ~a/lib:~a/lib
3132include_dirs = ~a/include:~a/include
3133"
3134 (assoc-ref inputs "openblas")
3135 (assoc-ref inputs "lapack")
3136 (assoc-ref inputs "openblas")
3137 (assoc-ref inputs "lapack"))))
3138 #t))))))
3139 (native-inputs
3140 `(("python2-nose" ,python2-nose)))
3141 (description "NumPy is the fundamental package for scientific computing
3142with Python. It contains among other things: a powerful N-dimensional array
3143object, sophisticated (broadcasting) functions, tools for integrating C/C++
3144and Fortran code, useful linear algebra, Fourier transform, and random number
3145capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
3146that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
3147Numeric.")
3148 (license license:bsd-3)))
3149
3150(define-public python-munch
3151 (package
3152 (name "python-munch")
3153 (version "2.0.4")
3154 (source
3155 (origin
3156 (method url-fetch)
3157 (uri (pypi-uri "munch" version))
3158 (sha256
3159 (base32
3160 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3161 (build-system python-build-system)
3162 (home-page "https://github.com/Infinidat/munch")
3163 (synopsis "Dot-accessible dictionary")
3164 (description "Munch is a dot-accessible dictionary similar to JavaScript
3165objects.")
3166 (license license:expat)))
3167
3168(define-public python2-munch
3169 (package-with-python2 python-munch))
3170
3171(define-public python-colormath
3172 (package
3173 (name "python-colormath")
3174 (version "3.0.0")
3175 (source
3176 (origin
3177 (method url-fetch)
3178 (uri (pypi-uri "colormath" version))
3179 (sha256
3180 (base32
3181 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3182 (build-system python-build-system)
3183 (propagated-inputs
3184 `(("python-networkx" ,python-networkx)
3185 ("python-numpy" ,python-numpy)))
3186 (home-page "https://github.com/gtaylor/python-colormath")
3187 (synopsis "Color math and conversion library")
3188 (description
3189 "This is a Python library for color math and conversions.")
3190 (license license:bsd-3)))
3191
3192(define-public python2-colormath
3193 (package-with-python2 python-colormath))
3194
3195(define-public python-spectra
3196 (package
3197 (name "python-spectra")
3198 (version "0.0.11")
3199 (source
3200 (origin
3201 (method url-fetch)
3202 (uri (pypi-uri "spectra" version))
3203 (sha256
3204 (base32
3205 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3206 (build-system python-build-system)
3207 (arguments
3208 `(#:phases
3209 (modify-phases %standard-phases
3210 (replace 'check
38ec0f6a 3211 (lambda _ (invoke "nosetests" "-v"))))))
44d10b1f
RW
3212 (propagated-inputs
3213 `(("python-colormath" ,python-colormath)))
3214 (native-inputs
3215 `(("python-nose" ,python-nose)))
3216 (home-page "https://github.com/jsvine/spectra")
3217 (synopsis "Color scales and color conversion")
3218 (description
3219 "This package provides a Python library intended to make color math,
3220color scales, and color space conversion easy. It has support for:
3221
3222@enumerate
3223@item Color scales
3224@item Color ranges
3225@item Color blending
3226@item Brightening/darkening colors
3227@item Saturating/desaturating colors
3228@item Conversion to/from multiple color spaces.
3229@end enumerate\n")
3230 (license license:expat)))
3231
3232(define-public python2-spectra
3233 (package-with-python2 python-spectra))
3234
3235(define-public python-numpy-documentation
3236 (package
3237 (name "python-numpy-documentation")
3238 (version (package-version python-numpy))
3239 (source (package-source python-numpy))
3240 (build-system python-build-system)
3241 (native-inputs
3242 `(("python-matplotlib" ,python-matplotlib)
3243 ("python-numpy" ,python-numpy)
3244 ("pkg-config" ,pkg-config)
3245 ("python-sphinx" ,python-sphinx)
3246 ("python-numpydoc" ,python-numpydoc)
3247 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
3248 texlive-fonts-cm-super
3249 texlive-fonts-ec
3250 texlive-generic-ifxetex
3251 texlive-generic-pdftex
3252 texlive-latex-amsfonts
3253 texlive-latex-capt-of
3254 texlive-latex-cmap
3255 texlive-latex-environ
3256 texlive-latex-eqparbox
3257 texlive-latex-etoolbox
3258 texlive-latex-expdlist
3259 texlive-latex-fancyhdr
3260 texlive-latex-fancyvrb
3261 texlive-latex-fncychap
3262 texlive-latex-float
3263 texlive-latex-framed
3264 texlive-latex-geometry
3265 texlive-latex-graphics
3266 texlive-latex-hyperref
3267 texlive-latex-mdwtools
3268 texlive-latex-multirow
3269 texlive-latex-needspace
3270 texlive-latex-oberdiek
3271 texlive-latex-parskip
3272 texlive-latex-preview
3273 texlive-latex-tabulary
3274 texlive-latex-threeparttable
3275 texlive-latex-titlesec
3276 texlive-latex-trimspaces
3277 texlive-latex-ucs
3278 texlive-latex-upquote
3279 texlive-latex-url
3280 texlive-latex-varwidth
3281 texlive-latex-wrapfig)))
3282 ("texinfo" ,texinfo)
3283 ("perl" ,perl)
3284 ("scipy-sphinx-theme"
3285 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3286 (method git-fetch)
3287 (uri (git-reference
3288 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3289 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3290 (sha256
3291 (base32
3292 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3293 ,@(package-native-inputs python-numpy)))
3294 (arguments
3295 `(#:tests? #f ; we're only generating the documentation
3296 #:phases
3297 (modify-phases %standard-phases
3298 (delete 'build)
3299 (replace 'install
3300 (lambda* (#:key inputs outputs #:allow-other-keys)
3301 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3302 (doc (string-append
3303 data "/doc/" ,name "-"
3304 ,(package-version python-numpy)))
3305 (info-reader (string-append data "/info"))
3306 (html (string-append doc "/html"))
3307 (scipy-sphinx-theme "scipy-sphinx-theme")
3308 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3309 (pyver ,(string-append "PYVER=")))
3310
3311 ;; FIXME: this is needed to for texlive-union to generate
3312 ;; fonts, which are not found.
3313 (setenv "HOME" "/tmp")
3314
3315 (with-directory-excursion "doc"
3316 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3317 (mkdir-p html)
4fc898da
RW
3318 (invoke "make" "html" pyver)
3319 (invoke "make" "latex" "PAPER=a4" pyver)
3320 (invoke "make" "-C" "build/latex"
44d10b1f
RW
3321 "all-pdf" "PAPER=a4" pyver)
3322 ;; FIXME: Generation of the info file fails.
4fc898da 3323 ;; (invoke "make" "info" pyver)
44d10b1f
RW
3324 ;; (mkdir-p info)
3325 ;; (copy-file "build/texinfo/numpy.info"
3326 ;; (string-append info "/numpy.info"))
3327 (for-each (lambda (file)
3328 (copy-file (string-append "build/latex" file)
3329 (string-append doc file)))
3330 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3331 (with-directory-excursion "build/html"
3332 (for-each (lambda (file)
3333 (let* ((dir (dirname file))
3334 (tgt-dir (string-append html "/" dir)))
3335 (unless (equal? "." dir)
3336 (mkdir-p tgt-dir))
3337 (install-file file html)))
3338 (find-files "." ".*")))))
3339 #t)))))
3340 (home-page (package-home-page python-numpy))
3341 (synopsis "Documentation for the python-numpy package")
3342 (description (package-description python-numpy))
3343 (license (package-license python-numpy))))
3344
3345(define-public python2-numpy-documentation
3346 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3347 (package
3348 (inherit numpy-documentation)
3349 (native-inputs `(("python2-functools32" ,python2-functools32)
3350 ,@(package-native-inputs numpy-documentation))))))
3351
3352(define-public python-pygit2
3353 (package
3354 (name "python-pygit2")
2ffec22e 3355 (version "0.27.4")
44d10b1f
RW
3356 (source
3357 (origin
3358 (method url-fetch)
3359 (uri (pypi-uri "pygit2" version))
3360 (sha256
3361 (base32
2ffec22e 3362 "15c1mhwwjc7nr8hn5gm21hcfhw61jmwb0vngpjhlm3y5565wg2pz"))))
44d10b1f
RW
3363 (build-system python-build-system)
3364 (arguments
2ffec22e
JL
3365 '(#:tests? #f; tests don't run correctly in our environment
3366 #:phases
44d10b1f 3367 (modify-phases %standard-phases
44d10b1f
RW
3368 (add-after 'unpack 'fix-dependency-versioning
3369 (lambda _
3370 (substitute* "setup.py"
3371 (("<") "<="))
3372 #t)))))
3373 (propagated-inputs
3374 `(("python-six" ,python-six)
3375 ("python-cffi" ,python-cffi)
3376 ("libgit2" ,libgit2)
3377 ("python-tox" ,python-tox)))
3378 (native-inputs
3379 `(("python-pytest" ,python-pytest)))
3380 (home-page "https://github.com/libgit2/pygit2")
3381 (synopsis "Python bindings for libgit2")
3382 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3383library, libgit2 implements Git plumbing.")
3384 ;; GPL2.0 only, with linking exception.
3385 (license license:gpl2)))
3386
3387(define-public python2-pygit2
3388 (package-with-python2 python-pygit2))
3389
3390(define-public python-pyparsing
3391 (package
3392 (name "python-pyparsing")
3393 (version "2.2.1")
3394 (source
3395 (origin
3396 (method url-fetch)
3397 (uri (pypi-uri "pyparsing" version))
3398 (sha256
3399 (base32 "06dgd0iilvf8m0ssmfpcbh8l6jf0zkp8adbb84llksg17crfx4zl"))))
3400 (build-system python-build-system)
3401 (outputs '("out" "doc"))
3402 (arguments
3403 `(#:tests? #f ; no test target
3404 #:phases
3405 (modify-phases %standard-phases
3406 (add-after 'install 'install-doc
3407 (lambda* (#:key outputs #:allow-other-keys)
3408 (let* ((doc (string-append (assoc-ref outputs "doc")
3409 "/share/doc/" ,name "-" ,version))
3410 (html-doc (string-append doc "/html"))
3411 (examples (string-append doc "/examples")))
3412 (mkdir-p html-doc)
3413 (mkdir-p examples)
3414 (for-each
3415 (lambda (dir tgt)
3416 (map (lambda (file)
3417 (install-file file tgt))
3418 (find-files dir ".*")))
3419 (list "docs" "htmldoc" "examples")
3420 (list doc html-doc examples))
3421 #t))))))
3422 (home-page "https://github.com/pyparsing/pyparsing")
3423 (synopsis "Python parsing class library")
3424 (description
3425 "The pyparsing module is an alternative approach to creating and
3426executing simple grammars, vs. the traditional lex/yacc approach, or the use
3427of regular expressions. The pyparsing module provides a library of classes
3428that client code uses to construct the grammar directly in Python code.")
3429 (license license:expat)))
3430
3431(define-public python2-pyparsing
3432 (package-with-python2 python-pyparsing))
3433
3434(define-public python-numpydoc
3435 (package
3436 (name "python-numpydoc")
3437 (version "0.8.0")
3438 (source
3439 (origin
3440 (method url-fetch)
3441 (uri (pypi-uri "numpydoc" version))
3442 (sha256
3443 (base32
3444 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
3445 (build-system python-build-system)
3446 (propagated-inputs
3447 `(("python-sphinx" ,python-sphinx)))
3448 (native-inputs
3449 `(("python-nose" ,python-nose)))
3450 (home-page "https://pypi.python.org/pypi/numpydoc")
3451 (synopsis
3452 "Numpy's Sphinx extensions")
3453 (description
3454 "Sphinx extension to support docstrings in Numpy format.")
3455 (license license:bsd-2)))
3456
3457(define-public python2-numpydoc
3458 (package-with-python2 python-numpydoc))
3459
3460(define-public python-numexpr
3461 (package
3462 (name "python-numexpr")
3463 (version "2.6.5")
3464 (source
3465 (origin
3466 (method url-fetch)
3467 (uri (pypi-uri "numexpr" version))
3468 (sha256
3469 (base32
3470 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3471 (build-system python-build-system)
3472 (arguments `(#:tests? #f)) ; no tests included
3473 (propagated-inputs
3474 `(("python-numpy" ,python-numpy)))
3475 (home-page "https://github.com/pydata/numexpr")
3476 (synopsis "Fast numerical expression evaluator for NumPy")
3477 (description
3478 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3479expressions that operate on arrays are accelerated and use less memory than
3480doing the same calculation in Python. In addition, its multi-threaded
3481capabilities can make use of all your cores, which may accelerate
3482computations, most specially if they are not memory-bounded (e.g. those using
3483transcendental functions).")
3484 (license license:expat)))
3485
3486(define-public python2-numexpr
3487 (package-with-python2 python-numexpr))
3488
3489(define-public python-cycler
3490 (package
3491 (name "python-cycler")
3492 (version "0.10.0")
3493 (source (origin
3494 (method url-fetch)
3495 (uri (pypi-uri "cycler" version))
3496 (sha256
3497 (base32
3498 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3499 (build-system python-build-system)
3500 (arguments
3501 ;; XXX: The current version requires 'coveralls' which we don't have.
3502 ;; Enable this for the next release which uses 'python-pytest'.
3503 '(#:tests? #f))
3504 (propagated-inputs
3505 `(("python-six" ,python-six)))
3506 (home-page "http://matplotlib.org/cycler/")
3507 (synopsis "Composable keyword argument iterator")
3508 (description
3509 "When using @code{matplotlib} and plotting more than one line, it is
3510common to want to be able to want to be able to cycle over one or more artist
3511styles; but the plotting logic can quickly become involved.
3512To address this and enable easy cycling over arbitrary @code{kwargs}, the
3513@code{Cycler} class was developed.")
3514 (license license:bsd-3)))
3515
3516(define-public python2-cycler
3517 (package-with-python2 python-cycler))
3518
3519(define-public python-colorspacious
3520 (package
3521 (name "python-colorspacious")
3522 (version "1.1.0")
3523 (source
dee92e65
TGR
3524 (origin
3525 (method git-fetch)
3526 (uri (git-reference
3527 (url "https://github.com/njsmith/colorspacious.git")
3528 (commit (string-append "v" version))))
3529 (file-name (git-file-name name version))
3530 (sha256
3531 (base32 "0g0lxqiscy5g5rq9421vv7abg0c90jzy0zmas2z3hya6k2dr5aid"))))
44d10b1f
RW
3532 (build-system python-build-system)
3533 (propagated-inputs
3534 `(("python-numpy" ,python-numpy)))
3535 (native-inputs
3536 `(("python-nose" ,python-nose)))
3537 (arguments
3538 `(#:phases
3539 (modify-phases %standard-phases
3540 (replace 'check
3541 (lambda _
c988afda 3542 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
44d10b1f
RW
3543 (home-page "https://github.com/njsmith/colorspacious")
3544 (synopsis "Python library for colorspace conversions")
3545 (description "@code{colorspacious} is a Python library that lets you
3546convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3547 (license license:expat)))
3548
3549(define-public python2-colorspacious
3550 (package-with-python2 python-colorspacious))
3551
3552(define-public python-matplotlib
3553 (package
3554 (name "python-matplotlib")
3555 (version "2.2.3")
3556 (source
3557 (origin
3558 (method url-fetch)
3559 (uri (pypi-uri "matplotlib" version))
3560 (sha256
3561 (base32
3562 "1rcc7x9ig3hpchkc4cwdvym3y451w74275fxr455zkfagrsvymbk"))))
3563 (build-system python-build-system)
3564 (propagated-inputs ; the following packages are all needed at run time
3565 `(("python-cycler" ,python-cycler)
3566 ("python-kiwisolver" ,python-kiwisolver)
3567 ("python-pyparsing" ,python-pyparsing)
3568 ("python-pygobject" ,python-pygobject)
3569 ("gobject-introspection" ,gobject-introspection)
3570 ("python-tkinter" ,python "tk")
3571 ("python-dateutil" ,python-dateutil)
3572 ("python-numpy" ,python-numpy)
3573 ("python-pillow" ,python-pillow)
3574 ("python-pytz" ,python-pytz)
3575 ("python-six" ,python-six)
3576 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3577 ;; from 'gtk+') provides the required 'typelib' files used by
3578 ;; 'gobject-introspection'. The location of these files is set with the
3579 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3580 ;; is done automatically by a 'native-search-path' procedure. However,
3581 ;; at run-time the user must set this variable as follows:
3582 ;;
3583 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
3584 ("gtk+" ,gtk+)
3585 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3586 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3587 ;; object. For this reason we need to import both libraries.
3588 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3589 ("python-pycairo" ,python-pycairo)
3590 ;; XXX: qtwebkit cannot be built reliably.
3591 ("python-pyqt" ,python-pyqt-without-qtwebkit)
3592 ("python-cairocffi" ,python-cairocffi)))
3593 (inputs
3594 `(("libpng" ,libpng)
3595 ("imagemagick" ,imagemagick)
3596 ("freetype" ,freetype)
3597 ("cairo" ,cairo)
3598 ("glib" ,glib)
3599 ;; FIXME: Add backends when available.
3600 ;("python-wxpython" ,python-wxpython)
3601 ("tcl" ,tcl)
3602 ("tk" ,tk)))
3603 (native-inputs
3604 `(("pkg-config" ,pkg-config)
3605 ("python-nose" ,python-nose)
3606 ("python-mock" ,python-mock)))
3607 (arguments
3608 `(#:phases
3609 (modify-phases %standard-phases
3610 (add-before 'build 'configure-environment
3611 (lambda* (#:key outputs inputs #:allow-other-keys)
3612 (let ((cairo (assoc-ref inputs "cairo"))
3613 (gtk+ (assoc-ref inputs "gtk+")))
3614 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3615 ;; has not effect.
3616 (setenv "LD_LIBRARY_PATH"
3617 (string-append cairo "/lib:" gtk+ "/lib"))
3618 (setenv "HOME" (getcwd))
3619 (call-with-output-file "setup.cfg"
3620 (lambda (port)
3621 (format port "[directories]~%
3622basedirlist = ~a,~a~%
3623 [rc_options]~%
3624backend = TkAgg~%"
3625 (assoc-ref inputs "tcl")
3626 (assoc-ref inputs "tk")))))
3627 #t)))))
3628 (home-page "http://matplotlib.org")
3629 (synopsis "2D plotting library for Python")
3630 (description
3631 "Matplotlib is a Python 2D plotting library which produces publication
3632quality figures in a variety of hardcopy formats and interactive environments
3633across platforms. Matplotlib can be used in Python scripts, the python and
3634ipython shell, web application servers, and six graphical user interface
3635toolkits.")
3636 (license license:psfl)
3637 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3638
3639(define-public python2-matplotlib
3640 (let ((matplotlib (package-with-python2
3641 (strip-python2-variant python-matplotlib))))
3642 (package (inherit matplotlib)
3643 ;; Make sure to use special packages for Python 2 instead
3644 ;; of those automatically rewritten by package-with-python2.
3645 (propagated-inputs
3646 `(("python2-pycairo" ,python2-pycairo)
3647 ("python2-backports-functools-lru-cache"
3648 ,python2-backports-functools-lru-cache)
3649 ("python2-functools32" ,python2-functools32)
3650 ("python2-pygobject-2" ,python2-pygobject-2)
3651 ("python2-subprocess32" ,python2-subprocess32)
3652 ("python2-tkinter" ,python-2 "tk")
3653 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3654 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
3655
3656(define-public python-matplotlib-documentation
3657 (package
3658 (name "python-matplotlib-documentation")
3659 (version (package-version python-matplotlib))
3660 (source (package-source python-matplotlib))
3661 (build-system python-build-system)
3662 (native-inputs
3663 `(("python-matplotlib" ,python-matplotlib)
3664 ("python-colorspacious" ,python-colorspacious)
3665 ("python-sphinx" ,python-sphinx)
3666 ("python-sphinx-gallery" ,python-sphinx-gallery)
3667 ("python-numpydoc" ,python-numpydoc)
3668 ("python-ipython" ,python-ipython)
e7a53914 3669 ("python-ipykernel" ,python-ipykernel)
44d10b1f
RW
3670 ("python-mock" ,python-mock)
3671 ("graphviz" ,graphviz)
e7a53914
RW
3672 ("texlive" ,(texlive-union (list texlive-latex-amsfonts
3673 texlive-latex-amsmath
3674 texlive-latex-enumitem
3675 texlive-latex-expdlist
3676 texlive-latex-geometry
3677 texlive-latex-preview
3678 texlive-latex-type1cm
3679 texlive-latex-ucs
3680
3681 texlive-generic-pdftex
3682
3683 texlive-fonts-amsfonts
3684 texlive-fonts-ec
3685 texlive-fonts-adobe-times
3686 texlive-fonts-txfonts)))
44d10b1f
RW
3687 ("texinfo" ,texinfo)
3688 ,@(package-native-inputs python-matplotlib)))
3689 (arguments
3690 `(#:tests? #f ; we're only generating documentation
3691 #:phases
3692 (modify-phases %standard-phases
3693 (replace 'build
3694 (lambda _
3695 (chdir "doc")
e7a53914
RW
3696 (setenv "PYTHONPATH"
3697 (string-append (getenv "PYTHONPATH")
3698 ":" (getcwd) "/../examples/units"))
44d10b1f 3699 (substitute* "conf.py"
e7a53914
RW
3700 ;; Don't use git.
3701 (("^SHA = check_output.*")
3702 (string-append "SHA = \"" ,version "\"\n"))
3703 ;; Don't fetch intersphinx files from the Internet
3704 (("^explicit_order_folders" m)
3705 (string-append "intersphinx_mapping = {}\n" m))
3706 (("'sphinx.ext.intersphinx',") "")
3707 ;; Disable URL embedding which requires internet access.
3708 (("'https://docs.scipy.org/doc/numpy'") "None")
3709 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
3710 (invoke "make"
3711 "SPHINXBUILD=sphinx-build"
3712 "SPHINXOPTS=" ; don't abort on warnings
3713 "html" "texinfo")))
44d10b1f
RW
3714 (replace 'install
3715 (lambda* (#:key inputs outputs #:allow-other-keys)
3716 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3717 (doc (string-append data "/doc/python-matplotlib-" ,version))
3718 (info (string-append data "/info"))
3719 (html (string-append doc "/html")))
3720 (mkdir-p html)
3721 (mkdir-p info)
3722 (copy-recursively "build/html" html)
3723 (symlink (string-append html "/_images")
3724 (string-append info "/matplotlib-figures"))
3725 (with-directory-excursion "build/texinfo"
3726 (substitute* "matplotlib.texi"
3727 (("@image\\{([^,]*)" all file)
3728 (string-append "@image{matplotlib-figures/" file)))
3729 (symlink (string-append html "/_images")
3730 "./matplotlib-figures")
e7a53914
RW
3731 (invoke "makeinfo" "--no-split"
3732 "-o" "matplotlib.info" "matplotlib.texi"))
3733 (install-file "build/texinfo/matplotlib.info" info))
44d10b1f
RW
3734 #t)))))
3735 (home-page (package-home-page python-matplotlib))
3736 (synopsis "Documentation for the python-matplotlib package")
3737 (description (package-description python-matplotlib))
3738 (license (package-license python-matplotlib))))
3739
3740(define-public python2-matplotlib-documentation
3741 (package-with-python2 python-matplotlib-documentation))
3742
3743(define-public python2-pysnptools
3744 (package
3745 (name "python2-pysnptools")
5d1ade85 3746 (version "0.3.13")
44d10b1f
RW
3747 (source
3748 (origin
3749 (method url-fetch)
5d1ade85 3750 (uri (pypi-uri "pysnptools" version))
44d10b1f
RW
3751 (sha256
3752 (base32
5d1ade85 3753 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
44d10b1f
RW
3754 (build-system python-build-system)
3755 (arguments
5d1ade85
RW
3756 `(#:python ,python-2 ; only Python 2.7 is supported
3757 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
44d10b1f
RW
3758 (propagated-inputs
3759 `(("python2-numpy" ,python2-numpy)
3760 ("python2-scipy" ,python2-scipy)
3761 ("python2-pandas" ,python2-pandas)))
44d10b1f 3762 (native-inputs
5d1ade85 3763 `(("python2-cython" ,python2-cython)))
1b66989b 3764 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
44d10b1f
RW
3765 (synopsis "Library for reading and manipulating genetic data")
3766 (description
3767 "PySnpTools is a library for reading and manipulating genetic data. It
3768can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
3769those files. It can also efficiently manipulate ranges of integers using set
3770operators such as union, intersection, and difference.")
3771 (license license:asl2.0)))
3772
3773(define-public python-scipy
3774 (package
3775 (name "python-scipy")
3776 (version "1.1.0")
3777 (source
3778 (origin
3779 (method url-fetch)
3780 (uri (pypi-uri "scipy" version))
3781 (sha256
3782 (base32
3783 "1lfg686w6vv2m2dfs8v9d0bf2i18z7wz5vgzjnkgmpr4hi0550w7"))))
3784 (build-system python-build-system)
3785 (propagated-inputs
3786 `(("python-numpy" ,python-numpy)
3787 ("python-matplotlib" ,python-matplotlib)
3788 ("python-pyparsing" ,python-pyparsing)))
3789 (inputs
3790 `(("lapack" ,lapack)
3791 ("openblas" ,openblas)))
3792 (native-inputs
3793 `(("python-cython" ,python-cython)
3794 ("python-pytest" ,python-pytest)
3795 ("python-sphinx" ,python-sphinx)
3796 ("python-numpydoc" ,python-numpydoc)
3797 ("gfortran" ,gfortran)
3798 ("perl" ,perl)
3799 ("which" ,which)))
3800 (outputs '("out" "doc"))
3801 (arguments
3802 `(#:phases
3803 (modify-phases %standard-phases
3804 (add-after 'unpack 'disable-broken-tests
3805 (lambda _
3806 (substitute* "scipy/sparse/linalg/dsolve/tests/test_linsolve.py"
3807 (("^( +)def test_threads_parallel\\(self\\):" m indent)
3808 (string-append indent
3809 "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
3810 m)))
3811 (substitute* "scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py"
3812 (("^def test_parallel_threads\\(\\):" m)
3813 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
3814 m)))
3815 #t))
3816 (add-before 'build 'configure-openblas
3817 (lambda* (#:key inputs #:allow-other-keys)
3818 (call-with-output-file "site.cfg"
3819 (lambda (port)
3820 (format port
3821 "[blas]
3822libraries = openblas
3823library_dirs = ~a/lib
3824include_dirs = ~a/include
3825
3826# backslash-n to make emacs happy
3827\n[atlas]
3828library_dirs = ~a/lib
3829atlas_libs = openblas
3830"
3831 (assoc-ref inputs "openblas")
3832 (assoc-ref inputs "openblas")
3833 (assoc-ref inputs "openblas"))))
3834 #t))
3835 (add-after 'install 'install-doc
3836 (lambda* (#:key inputs outputs #:allow-other-keys)
3837 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3838 (doc (string-append data "/doc/" ,name "-" ,version))
3839 (html (string-append doc "/html"))
3840 (pyver ,(string-append "PYVER=" (version-major+minor
3841 (package-version python))))
3842 ;; By default it tries to run sphinx-build through the Python
3843 ;; interpreter which won't work with our shell wrapper.
3844 (sphinxbuild "SPHINXBUILD=LANG=C sphinx-build"))
3845 ;; Make installed package available for building the
3846 ;; documentation
3847 (add-installed-pythonpath inputs outputs)
3848 (with-directory-excursion "doc"
3849 ;; Fix generation of images for mathematical expressions.
3850 (substitute* (find-files "source" "conf\\.py")
3851 (("pngmath_use_preview = True")
3852 "pngmath_use_preview = False"))
3853 (mkdir-p html)
3854 (invoke "make" "html" pyver sphinxbuild)
3855 (with-directory-excursion "build/html"
3856 (for-each (lambda (file)
3857 (let* ((dir (dirname file))
3858 (tgt-dir (string-append html "/" dir)))
3859 (install-file file html)))
3860 (find-files "." ".*")))))
3861 #t))
3862 ;; Tests can only be run after the library has been installed and not
3863 ;; within the source directory.
3864 (delete 'check)
3865 (add-after 'install 'check
3866 (lambda* (#:key inputs outputs #:allow-other-keys)
3867 (add-installed-pythonpath inputs outputs)
3868 (with-directory-excursion "/tmp"
3869 (invoke "python" "-c"
3870 "import scipy; scipy.test(verbose=2)")))))))
3871 (home-page "https://www.scipy.org/")
3872 (synopsis "The Scipy library provides efficient numerical routines")
3873 (description "The SciPy library is one of the core packages that make up
3874the SciPy stack. It provides many user-friendly and efficient numerical
3875routines such as routines for numerical integration and optimization.")
3876 (properties `((python2-variant . ,(delay python2-scipy))))
3877 (license license:bsd-3)))
3878
3879(define-public python2-scipy
3880 (package-with-python2
3881 (strip-python2-variant python-scipy)))
3882
3883(define-public python-socksipy-branch
3884 (package
3885 (name "python-socksipy-branch")
3886 (version "1.01")
3887 (source
3888 (origin
3889 (method url-fetch)
3890 (uri (pypi-uri "SocksiPy-branch" version))
3891 (sha256
3892 (base32
3893 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
3894 (build-system python-build-system)
3895 (arguments
3896 `(#:tests? #f)) ; There are no tests
3897 (home-page "https://code.google.com/archive/p/socksipy-branch/")
3898 (synopsis "Python SOCKS module")
3899 (description
3900 "SocksiPy - A Python SOCKS client module. It provides a
3901socket-like interface that supports connections to any TCP
3902service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
3903The original version was developed by Dan Haim, this is a
3904branch created by Mario Vilas to address some open issues,
3905as the original project seems to have been abandoned circa 2007.")
3906 (license license:bsd-3)))
3907
3908(define-public python2-socksipy-branch
3909 (package-with-python2 python-socksipy-branch))
3910
3911(define-public python-pycodestyle
3912 (package
3913 (name "python-pycodestyle")
3914 (version "2.4.0")
3915 (source
3916 (origin
3917 (method url-fetch)
3918 (uri (pypi-uri "pycodestyle" version))
3919 (sha256
3920 (base32
3921 "0fhy4vnlgpjq4qd1wdnl6pvdw7rah0ypmn8c9mkhz8clsndskz6b"))))
3922 (build-system python-build-system)
3923 (home-page "https://pycodestyle.readthedocs.io/")
3924 (synopsis "Python style guide checker")
3925 (description "@code{pycodestyle} (formerly pep8) is a tool to check
3926Python code against some of the style conventions in
3927@url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
3928 (license license:expat)))
3929
3930(define-public python2-pycodestyle
3931 (package-with-python2 python-pycodestyle))
3932
3933(define-public python-multidict
3934 (package
3935 (name "python-multidict")
3936 (version "4.2.0")
3937 (source
3938 (origin
3939 (method url-fetch)
3940 (uri (pypi-uri "multidict" version))
3941 (sha256
3942 (base32
3943 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
3944 (build-system python-build-system)
3945 (native-inputs
3946 `(("python-pytest" ,python-pytest)
3947 ("python-pytest-runner" ,python-pytest-runner)))
3948 (home-page "https://github.com/aio-libs/multidict/")
3949 (synopsis "Multidict implementation")
3950 (description "Multidict is dict-like collection of key-value pairs
3951where key might be occurred more than once in the container.")
3952 (license license:asl2.0)))
3953
3954(define-public python-orderedmultidict
3955 (package
3956 (name "python-orderedmultidict")
3957 (version "0.7.11")
3958 (source
3959 (origin
3960 (method url-fetch)
3961 (uri (pypi-uri "orderedmultidict" version))
3962 (sha256
3963 (base32
3964 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
3965 (build-system python-build-system)
3966 (arguments
3967 `(#:phases
3968 (modify-phases %standard-phases
3969 (add-after 'unpack 'fix-tests
3970 (lambda _
3971 ;; The package uses nosetest for running the tests.
3972 ;; Adding this initfile allows to run the test suite
3973 ;; without requiring nosetest.
d1c4f329
RW
3974 (with-output-to-file "tests/__init__.py" newline)
3975 #t)))))
44d10b1f
RW
3976 (propagated-inputs
3977 `(("python-six" ,python-six)))
3978 (native-inputs
3979 `(("python-pycodestyle" ,python-pycodestyle)))
3980 (home-page "https://github.com/gruns/orderedmultidict")
3981 (synopsis "Python Ordered Multivalue Dictionary - omdict")
3982 (description "This package contains a library for ordered multivalue
3983dictionaries. A multivalue dictionary is a dictionary that can store
3984multiple values for the same key. An ordered multivalue dictionary is a
3985multivalue dictionary that retains the order of insertions and deletions.")
3986 (license license:unlicense)))
3987
3988(define-public python2-orderedmultidict
3989 (package-with-python2 python-orderedmultidict))
3990
3991(define-public python-autopep8
3992 (package
3993 (name "python-autopep8")
3994 (version "1.3.5")
3995 (source
3996 (origin
3997 (method url-fetch)
3998 (uri (pypi-uri "autopep8" version))
3999 (sha256
4000 (base32
4001 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
4002 (build-system python-build-system)
4003 (propagated-inputs
4004 `(("python-pycodestyle" ,python-pycodestyle)))
4005 (home-page "https://github.com/hhatto/autopep8")
4006 (synopsis "Format Python code according to the PEP 8 style guide")
4007 (description
4008 "@code{autopep8} automatically formats Python code to conform to
4009the PEP 8 style guide. It uses the pycodestyle utility to determine
4010what parts of the code needs to be formatted. @code{autopep8} is
4011capable of fixing most of the formatting issues that can be reported
4012by pycodestyle.")
4013 (license (license:non-copyleft
4014 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4015
4016(define-public python2-autopep8
4017 (package-with-python2 python-autopep8))
4018
4019(define-public python-distutils-extra
4020 (package
4021 (name "python-distutils-extra")
4022 (version "2.38")
4023 (source
4024 (origin
4025 (method url-fetch)
4026 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4027 version "/+download/python-distutils-extra-"
4028 version ".tar.gz"))
4029 (sha256
4030 (base32
4031 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4032 (build-system python-build-system)
4033 (home-page "https://launchpad.net/python-distutils-extra/")
4034 (synopsis "Enhancements to Python's distutils")
4035 (description
4036 "The python-distutils-extra module enables you to easily integrate
4037gettext support, themed icons, and scrollkeeper-based documentation into
4038Python's distutils.")
4039 (license license:gpl2)))
4040
4041(define-public python2-distutils-extra
4042 (package-with-python2 python-distutils-extra))
4043
4044(define-public python2-elib.intl
4045 (package
4046 (name "python2-elib.intl")
4047 (version "0.0.3")
4048 (source
4049 (origin
4050 ;; This project doesn't tag releases or publish tarballs, so we take
4051 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4052 (method git-fetch)
4053 (uri (git-reference
4054 (url "https://github.com/dieterv/elib.intl.git")
4055 (commit "d09997cfef")))
4056 (file-name (string-append name "-" version "-checkout"))
4057 (sha256
4058 (base32
4059 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4060 (build-system python-build-system)
4061 (arguments
4062 ;; incompatible with Python 3 (exception syntax)
4063 `(#:python ,python-2
4064 #:tests? #f))
4065 (home-page "https://github.com/dieterv/elib.intl")
4066 (synopsis "Enhanced internationalization for Python")
4067 (description
4068 "The elib.intl module provides enhanced internationalization (I18N)
4069services for your Python modules and applications.")
4070 (license license:lgpl3+)))
4071
4072(define-public python-olefile
4073 (package
4074 (name "python-olefile")
4075 (version "0.45.1")
4076 (source
4077 (origin
4078 (method url-fetch)
4079 (uri (string-append "https://github.com/decalage2/olefile/archive/v"
4080 version ".tar.gz"))
4081 (file-name (string-append name "-" version ".tar.gz"))
4082 (sha256
4083 (base32
4084 "18ai19zwagm6nli14k8bii31ipbab2rp7plrvsm6gmfql551a8ai"))))
4085 (build-system python-build-system)
4086 (home-page
4087 "https://www.decalage.info/python/olefileio")
4088 (synopsis "Read and write Microsoft OLE2 files.")
4089 (description
4090 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
4091Storage or Compound Document, Microsoft Office). It is an improved version of
4092the OleFileIO module from PIL, the Python Image Library.")
4093 (license license:bsd-3)))
4094
4095(define-public python2-olefile
4096 (package-with-python2 python-olefile))
4097
4098(define-public python-pillow
4099 (package
4100 (name "python-pillow")
4101 (version "5.4.1")
4102 (source
4103 (origin
4104 (method url-fetch)
4105 (uri (pypi-uri "Pillow" version))
4106 (sha256
4107 (base32
4108 "17waygkhhzjd75kajlfw9v57mbb41lcpg6cvkdijqd7smm76ccsj"))))
4109 (build-system python-build-system)
4110 (native-inputs
4111 `(("python-pytest" ,python-pytest)))
4112 (inputs
4113 `(("freetype" ,freetype)
4114 ("lcms" ,lcms)
4115 ("zlib" ,zlib)
4116 ("libjpeg" ,libjpeg)
4117 ("openjpeg" ,openjpeg)
4118 ("libtiff" ,libtiff)
4119 ("libwebp" ,libwebp)))
4120 (propagated-inputs
4121 `(("python-olefile" ,python-olefile)))
4122 (arguments
4123 `(#:phases
4124 (modify-phases %standard-phases
4125 (add-after 'unpack 'patch-ldconfig
4126 (lambda _
4127 (substitute* "setup.py"
4128 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
4129 (delete 'check) ; We must run checks after python-pillow is installed.
4130 (add-after 'install 'check-installed
4131 (lambda* (#:key outputs inputs #:allow-other-keys)
4132 (begin
4133 (setenv "HOME" (getcwd))
4134 ;; Make installed package available for running the tests.
4135 (add-installed-pythonpath inputs outputs)
4136 (invoke "python" "selftest.py" "--installed")
4137 (invoke "python" "-m" "pytest" "-vv")))))))
4138 (home-page "https://python-pillow.org")
4139 (synopsis "Fork of the Python Imaging Library")
4140 (description
4141 "The Python Imaging Library adds image processing capabilities to your
4142Python interpreter. This library provides extensive file format support, an
4143efficient internal representation, and fairly powerful image processing
4144capabilities. The core image library is designed for fast access to data
4145stored in a few basic pixel formats. It should provide a solid foundation for
4146a general image processing tool.")
4147 (license (license:x11-style
4148 "http://www.pythonware.com/products/pil/license.htm"
4149 "The PIL Software License"))))
4150
4151(define-public python2-pillow
4152 (package-with-python2 python-pillow))
4153
4154(define-public python-pycparser
4155 (package
4156 (name "python-pycparser")
4157 (version "2.18")
4158 (source
4159 (origin
4160 (method url-fetch)
4161 (uri (pypi-uri "pycparser" version))
4162 (sha256
4163 (base32
4164 "09mjyw82ibqzl449g7swy8bfxnfpmas0815d2rkdjlcqw81wma4r"))))
4165 (outputs '("out" "doc"))
4166 (build-system python-build-system)
4167 (native-inputs
4168 `(("pkg-config" ,pkg-config)))
4169 (arguments
4170 `(#:phases
4171 (modify-phases %standard-phases
4172 (replace 'check
4173 (lambda _
4174 (with-directory-excursion "tests"
acb75c03
RW
4175 (invoke "python" "all_tests.py"))
4176 #t))
44d10b1f
RW
4177 (add-after 'install 'install-doc
4178 (lambda* (#:key outputs #:allow-other-keys)
4179 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4180 (doc (string-append data "/doc/" ,name "-" ,version))
4181 (examples (string-append doc "/examples")))
4182 (mkdir-p examples)
4183 (for-each (lambda (file)
4184 (copy-file (string-append "." file)
4185 (string-append doc file)))
4186 '("/README.rst" "/CHANGES" "/LICENSE"))
4187 (copy-recursively "examples" examples)))))))
4188 (home-page "https://github.com/eliben/pycparser")
4189 (synopsis "C parser in Python")
4190 (description
4191 "Pycparser is a complete parser of the C language, written in pure Python
4192using the PLY parsing library. It parses C code into an AST and can serve as
4193a front-end for C compilers or analysis tools.")
4194 (license license:bsd-3)))
4195
4196(define-public python2-pycparser
4197 (package-with-python2 python-pycparser))
4198
4199(define-public python-pywavelets
4200 (package
4201 (name "python-pywavelets")
4202 (version "1.0.1")
4203 (home-page "https://github.com/PyWavelets/pywt")
4204 (source (origin
4205 (method url-fetch)
4206 (uri (pypi-uri "PyWavelets" version))
4207 (sha256
4208 (base32
4209 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
4210 (build-system python-build-system)
4211 (arguments
4212 '(#:modules ((ice-9 ftw)
4213 (srfi srfi-1)
4214 (srfi srfi-26)
4215 (guix build utils)
4216 (guix build python-build-system))
4217 #:phases (modify-phases %standard-phases
4218 (replace 'check
4219 (lambda _
4220 (let ((cwd (getcwd))
4221 (libdir (find (cut string-prefix? "lib." <>)
4222 (scandir "build"))))
4223 (with-directory-excursion (string-append cwd "/build/" libdir)
4224 (invoke "nosetests" "-v" "."))))))))
4225 (native-inputs
4226 `(("python-matplotlib" ,python-matplotlib) ;for tests
4227 ("python-nose" ,python-nose)))
4228 (propagated-inputs
4229 `(("python-numpy" ,python-numpy)))
4230 (synopsis "Wavelet transforms in Python")
4231 (description
4232 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
4233mathematical basis functions that are localized in both time and frequency.
4234Wavelet transforms are time-frequency transforms employing wavelets. They are
4235similar to Fourier transforms, the difference being that Fourier transforms are
4236localized only in frequency instead of in time and frequency.")
4237 (license license:expat)))
4238
4239(define-public python2-pywavelets
4240 (package-with-python2 python-pywavelets))
4241
4242(define-public python-xcffib
4243 (package
4244 (name "python-xcffib")
4245 (version "0.6.0")
4246 (source
4247 (origin
4248 (method url-fetch)
4249 (uri (pypi-uri "xcffib" version))
4250 (sha256
4251 (base32
4252 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
4253 (build-system python-build-system)
4254 (inputs
4255 `(("libxcb" ,libxcb)))
4256 (propagated-inputs
4257 `(("python-cffi" ,python-cffi) ; used at run time
4258 ("python-six" ,python-six)))
4259 (arguments
4260 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4261 #:tests? #f
4262 #:phases
4263 (modify-phases %standard-phases
4264 (add-after 'unpack 'fix-libxcb-path
4265 (lambda* (#:key inputs #:allow-other-keys)
4266 (let ((libxcb (assoc-ref inputs "libxcb")))
4267 (substitute* '("xcffib/__init__.py")
4268 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4269 #t)))
4270 (add-after 'install 'install-doc
4271 (lambda* (#:key outputs #:allow-other-keys)
4272 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4273 "/doc/" ,name "-" ,version)))
4274 (mkdir-p doc)
4275 (copy-file "README.md"
4276 (string-append doc "/README.md"))
4277 #t))))))
4278 (home-page "https://github.com/tych0/xcffib")
4279 (synopsis "XCB Python bindings")
4280 (description
4281 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4282support for Python 3 and PyPy. It is based on cffi.")
4283 (license license:expat)))
4284
4285(define-public python2-xcffib
4286 (package-with-python2 python-xcffib))
4287
4288(define-public python-cairocffi
4289 (package
4290 (name "python-cairocffi")
4291 (version "0.9.0")
4292 (source
4293 (origin
4294 (method url-fetch)
4295 (uri (pypi-uri "cairocffi" version))
4296 (sha256
4297 (base32
4298 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
4299 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
4300 (build-system python-build-system)
4301 (outputs '("out" "doc"))
4302 (inputs
4303 `(("glib" ,glib)
4304 ("gtk+" ,gtk+)
4305 ("gdk-pixbuf" ,gdk-pixbuf)
4306 ("cairo" ,cairo)
4307 ("pango" ,pango)))
4308 (native-inputs
4309 `(("pkg-config" ,pkg-config)
4310 ("python-pytest" ,python-pytest)
4311 ("python-pytest-cov" ,python-pytest-cov)
4312 ("python-pytest-runner" ,python-pytest-runner)
4313 ("python-sphinx" ,python-sphinx)
4314 ("python-docutils" ,python-docutils)))
4315 (propagated-inputs
4316 `(("python-xcffib" ,python-xcffib))) ; used at run time
4317 (arguments
4318 `(#:phases
4319 (modify-phases %standard-phases
4320 (add-after 'unpack 'patch-paths
4321 (lambda* (#:key inputs outputs #:allow-other-keys)
4322 (substitute* (find-files "." "\\.py$")
4323 (("dlopen\\(ffi, 'cairo'")
4324 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
4325 "/lib/libcairo.so.2'"))
4326 (("dlopen\\(ffi, 'gdk-3'")
4327 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
4328 "/lib/libgtk-3.so.0'"))
4329 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
4330 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
4331 "/lib/libgdk_pixbuf-2.0.so.0'"))
4332 (("dlopen\\(ffi, 'glib-2.0'")
4333 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4334 "/lib/libglib-2.0.so.0'"))
4335 (("dlopen\\(ffi, 'gobject-2.0'")
4336 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4337 "/lib/libgobject-2.0.so.0'"))
4338 (("dlopen\\(ffi, 'pangocairo-1.0'")
4339 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4340 "/lib/libpangocairo-1.0.so.0'"))
4341 (("dlopen\\(ffi, 'pango-1.0'")
4342 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4343 "/lib/libpango-1.0.so.0'")))
4344 #t))
4345 (add-after 'install 'install-doc
4346 (lambda* (#:key inputs outputs #:allow-other-keys)
4347 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4348 (doc (string-append data "/doc/" ,name "-" ,version))
4349 (html (string-append doc "/html")))
4350 (setenv "LD_LIBRARY_PATH"
4351 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4352 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4353 (setenv "LANG" "en_US.UTF-8")
4354 (mkdir-p html)
4355 (for-each (lambda (file)
4356 (copy-file (string-append "." file)
4357 (string-append doc file)))
4358 '("/README.rst" "/CHANGES" "/LICENSE"))
4359 (system* "python" "setup.py" "build_sphinx")
4360 (copy-recursively "docs/_build/html" html)
4361 #t))))))
4362 (home-page "https://github.com/Kozea/cairocffi")
4363 (synopsis "Python bindings and object-oriented API for Cairo")
4364 (description
4365 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4366Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4367graphics library with support for multiple backends including image buffers,
4368PNG, PostScript, PDF, and SVG file output.")
4369 (license license:bsd-3)))
4370
4371(define-public python2-cairocffi
4372 (package-with-python2 python-cairocffi))
4373
4374(define-public python-decorator
4375 (package
4376 (name "python-decorator")
4377 (version "4.3.0")
4378 (source
4379 (origin
4380 (method url-fetch)
4381 (uri (pypi-uri "decorator" version))
4382 (sha256
4383 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4384 (build-system python-build-system)
4385 (home-page "https://pypi.python.org/pypi/decorator/")
4386 (synopsis "Python module to simplify usage of decorators")
4387 (description
4388 "The aim of the decorator module is to simplify the usage of decorators
4389for the average programmer, and to popularize decorators usage giving examples
4390of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4391etc. The core of this module is a decorator factory.")
4392 (license license:expat)))
4393
4394(define-public python2-decorator
4395 (package-with-python2 python-decorator))
4396
4397(define-public python-drmaa
4398 (package
4399 (name "python-drmaa")
4400 (version "0.7.7")
4401 (source
4402 (origin
4403 (method url-fetch)
4404 (uri (pypi-uri "drmaa" version))
4405 (sha256
4406 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4407 (build-system python-build-system)
4408 ;; The test suite requires libdrmaa which is provided by the cluster
4409 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4410 ;; should be set to the path of the libdrmaa library.
4411 (arguments '(#:tests? #f))
4412 (native-inputs
4413 `(("python-nose" ,python-nose)))
4414 (home-page "https://pypi.python.org/pypi/drmaa")
4415 (synopsis "Python bindings for the DRMAA library")
4416 (description
4417 "A Python package for Distributed Resource Management (DRM) job
4418submission and control. This package is an implementation of the DRMAA 1.0
4419Python language binding specification.")
4420 (license license:bsd-3)))
4421
4422(define-public python2-drmaa
4423 (package-with-python2 python-drmaa))
4424
4425(define-public python-grako
4426 (package
4427 (name "python-grako")
4428 (version "3.99.9")
4429 (source
4430 (origin
4431 (method url-fetch)
4432 (uri
4433 (pypi-uri "grako" version ".zip"))
4434 (sha256
4435 (base32
4436 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4437 (build-system python-build-system)
4438 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4439 (native-inputs
4440 `(("unzip" ,unzip)
4441 ("python-pytest" ,python-pytest)
4442 ("python-pytest-runner" ,python-pytest-runner)))
4443 (home-page "https://bitbucket.org/neogeny/grako")
4444 (synopsis "EBNF parser generator")
4445 (description
4446 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4447memoizing PEG/Packrat parser in Python.")
4448 (license license:bsd-3)))
4449
4450(define-public python2-grako
4451 (package-with-python2 python-grako))
4452
4453(define-public python-gridmap
4454 (package
4455 (name "python-gridmap")
4456 (version "0.13.0")
4457 (source
4458 (origin
4459 (method url-fetch)
4460 (uri (string-append
4461 "https://github.com/pygridtools/gridmap/archive/v"
4462 version ".tar.gz"))
4463 (file-name (string-append name "-" version ".tar.gz"))
4464 (sha256
4465 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
4466 (build-system python-build-system)
4467 (arguments
4468 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4469 (propagated-inputs
4470 `(("python-psutil" ,python-psutil)
4471 ("python-drmaa" ,python-drmaa)
4472 ("python-pyzmq" ,python-pyzmq)))
4473 (home-page "https://github.com/pygridtools/gridmap")
4474 (synopsis "Create jobs on a cluster directly from Python")
4475 (description
4476 "Gridmap is a Python package to allow you to easily create jobs on the
4477cluster directly from Python. You can directly map Python functions onto the
4478cluster without needing to write any wrapper code yourself.")
4479 (license license:gpl3+)))
4480
4481(define-public python2-gridmap
4482 (package-with-python2 python-gridmap))
4483
4484(define-public python-honcho
4485 (package
4486 (name "python-honcho")
4487 (version "1.0.1")
4488 (source
4489 (origin
4490 (method url-fetch)
4491 (uri (string-append
4492 "https://github.com/nickstenning/honcho/archive/v"
4493 version ".tar.gz"))
4494 (file-name (string-append name "-" version ".tar.gz"))
4495 (sha256
4496 (base32 "0zizn61n5z5hq421hkypk9pw8s6fpxw30f4hsg7k4ivwzy3gjw9j"))))
4497 (build-system python-build-system)
4498 (native-inputs
4499 `(("python-pytest" ,python-pytest)
4500 ("python-mock" ,python-mock)
4501 ("python-tox" ,python-tox)
4502 ("which" ,which))) ;for tests
4503 (propagated-inputs
4504 `(("python-jinja2" ,python-jinja2)))
4505 (arguments
4506 `(#:phases
4507 (modify-phases %standard-phases
4508 (delete 'check)
4509 (add-after 'install 'check
4510 (lambda* (#:key outputs inputs #:allow-other-keys)
4511 ;; fix honcho path in testsuite
4512 (substitute* "tests/conftest.py"
4513 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4514 "/bin/honcho" "'")))
4515 ;; It's easier to run tests after install.
4516 ;; Make installed package available for running the tests
4517 (add-installed-pythonpath inputs outputs)
95b707fb 4518 (invoke "py.test" "-v"))))))
44d10b1f
RW
4519 (home-page "https://github.com/nickstenning/honcho")
4520 (synopsis "Manage Procfile-based applications")
4521 (description
4522 "A Procfile is a file which describes how to run an application
4523consisting of serveral processes. honcho starts all listed processes.
4524The output of all running processes is collected by honcho and
4525displayed.")
4526 (license license:expat)))
4527
4528(define-public python2-honcho
4529 (package-with-python2 python-honcho))
4530
4531(define-public python-pexpect
4532 (package
4533 (name "python-pexpect")
4534 (version "4.6.0")
4535 (source
4536 (origin
4537 (method url-fetch)
4538 (uri (pypi-uri "pexpect" version))
4539 (sha256
4540 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
4541 (build-system python-build-system)
4542 (arguments
4543 `(#:phases
4544 (modify-phases %standard-phases
4545 (add-before 'check 'prepare-tests
4546 (lambda _
4547 (substitute* (find-files "tests")
4548 (("/bin/ls") (which "ls"))
4549 (("/bin/echo") (which "echo"))
4550 (("/bin/which") (which "which"))
4551 ;; Many tests try to use the /bin directory which
4552 ;; is not present in the build environment.
4553 ;; Use one that's non-empty and unlikely to change.
4554 (("/bin'") "/dev'"))
4555 ;; XXX: Socket connection test gets "Connection reset by peer".
4556 ;; Why does it not work? Delete for now.
4557 (delete-file "tests/test_socket.py")
4558 #t))
4559 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
4560 (native-inputs
4561 `(("python-nose" ,python-nose)
4562 ("python-pytest" ,python-pytest)
4563 ("man-db" ,man-db)
4564 ("which" ,which)
4565 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
4566 (propagated-inputs
4567 `(("python-ptyprocess" ,python-ptyprocess)))
4568 (home-page "http://pexpect.readthedocs.org/")
4569 (synopsis "Controlling interactive console applications")
4570 (description
4571 "Pexpect is a pure Python module for spawning child applications;
4572controlling them; and responding to expected patterns in their output.
4573Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4574child application and control it as if a human were typing commands.")
4575 (license license:isc)))
4576
4577(define-public python2-pexpect
4578 (package-with-python2 python-pexpect))
4579
4580(define-public python-setuptools-scm
4581 (package
4582 (name "python-setuptools-scm")
4583 (version "3.1.0")
4584 (source (origin
4585 (method url-fetch)
4586 (uri (pypi-uri "setuptools_scm" version))
4587 (sha256
4588 (base32
4589 "0h4bglwfz8b9prqljv8z3w9rgydfyxzaj05bm1y6zs5m6shz548i"))))
4590 (build-system python-build-system)
4591 (home-page "https://github.com/pypa/setuptools_scm/")
4592 (synopsis "Manage Python package versions in SCM metadata")
4593 (description
4594 "Setuptools_scm handles managing your Python package versions in
4595@dfn{software configuration management} (SCM) metadata instead of declaring
4596them as the version argument or in a SCM managed file.")
4597 (license license:expat)))
4598
4599(define-public python2-setuptools-scm
4600 (package-with-python2 python-setuptools-scm))
4601
4602(define-public python-pathpy
4603 (package
4604 (name "python-pathpy")
4605 (version "11.0.1")
4606 (source
4607 (origin
4608 (method url-fetch)
4609 (uri (pypi-uri "path.py" version))
4610 (sha256
4611 (base32 "07x15v8c7ry9bvycw294c9yq6ky9v2b0dalvgi6rn38ilh69vsz7"))))
4612 ;; (outputs '("out" "doc"))
4613 (build-system python-build-system)
4614 (propagated-inputs
4615 `(("python-appdirs" ,python-appdirs)))
4616 (native-inputs
4617 `(("python-setuptools-scm" ,python-setuptools-scm)
4618 ("python-sphinx" ,python-sphinx)
4619 ("python-rst.linker" ,python-rst.linker)
4620 ("python-pytest" ,python-pytest)
4621 ("python-pytest-runner" ,python-pytest-runner)))
4622 (arguments
4623 ;; FIXME: Documentation and tests require "jaraco.packaging".
4624 `(#:tests? #f))
4625 ;; #:phases
4626 ;; (modify-phases %standard-phases
4627 ;; (add-after 'build 'build-doc
4628 ;; (lambda _
4629 ;; (setenv "LANG" "en_US.UTF-8")
4630 ;; (zero? (system* "python" "setup.py" "build_sphinx"))))
4631 ;; (add-after 'install 'install-doc
4632 ;; (lambda* (#:key outputs #:allow-other-keys)
4633 ;; (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4634 ;; (doc (string-append data "/doc/" ,name "-" ,version))
4635 ;; (html (string-append doc "/html")))
4636 ;; (mkdir-p html)
4637 ;; (for-each (lambda (file)
4638 ;; (copy-file file (string-append doc "/" file)))
4639 ;; '("README.rst" "CHANGES.rst"))
4640 ;; (copy-recursively "build/sphinx/html" html)))))))
4641 (home-page "https://github.com/jaraco/path.py")
4642 (synopsis "Python module wrapper for built-in os.path")
4643 (description
4644 "@code{path.py} implements path objects as first-class entities, allowing
4645common operations on files to be invoked on those path objects directly.")
4646 (license license:expat)))
4647
4648(define-public python2-pathpy
4649 (package-with-python2 python-pathpy))
4650
4651(define-public python-simplegeneric
4652 (package
4653 (name "python-simplegeneric")
4654 (version "0.8.1")
4655 (source
4656 (origin
4657 (method url-fetch)
6c8c3980 4658 (uri (pypi-uri "simplegeneric" version ".zip"))
44d10b1f
RW
4659 (sha256
4660 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4661 (build-system python-build-system)
4662 (native-inputs
4663 `(("unzip" ,unzip)))
4664 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
4665 (synopsis "Python module for simple generic functions")
4666 (description
4667 "The simplegeneric module lets you define simple single-dispatch generic
4668functions, akin to Python’s built-in generic functions like @code{len()},
4669@code{iter()} and so on. However, instead of using specially-named methods,
4670these generic functions use simple lookup tables, akin to those used by
4671e.g. @code{pickle.dump()} and other generic functions found in the Python
4672standard library.")
4673 (license license:zpl2.1)))
4674
4675(define-public python2-simplegeneric
4676 (package-with-python2 python-simplegeneric))
4677
4678(define-public python-ipython-genutils
4679 ;; TODO: This package is retired, check if can be removed, see description.
4680 (package
4681 (name "python-ipython-genutils")
4682 (version "0.1.0")
4683 (source
4684 (origin
4685 (method url-fetch)
c9671d4b 4686 (uri (pypi-uri "ipython_genutils" version))
44d10b1f
RW
4687 (sha256
4688 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
4689 (build-system python-build-system)
4690 (arguments `(#:tests? #f)) ; no tests
4691 (home-page "https://ipython.org")
4692 (synopsis "Vestigial utilities from IPython")
4693 (description
4694 "This package provides retired utilities from IPython. No packages
4695outside IPython/Jupyter should depend on it.
4696
4697This package shouldn't exist. It contains some common utilities shared by
4698Jupyter and IPython projects during The Big Split. As soon as possible, those
4699packages will remove their dependency on this, and this package will go
4700away.")
4701 (license license:bsd-3)))
4702
4703(define-public python2-ipython-genutils
4704 (package-with-python2 python-ipython-genutils))
4705
4706(define-public python-traitlets
4707 (package
4708 (name "python-traitlets")
4709 (version "4.3.2")
4710 (source
4711 (origin
4712 (method url-fetch)
4713 (uri (pypi-uri "traitlets" version))
4714 (sha256
4715 (base32
4716 "0dbq7sx26xqz5ixs711k5nc88p8a0nqyz6162pwks5dpcz9d4jww"))))
4717 (build-system python-build-system)
4718 (arguments
4719 `(#:phases
4720 (modify-phases %standard-phases
4721 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
4722 (propagated-inputs
4723 `(("python-ipython-genutils" ,python-ipython-genutils)
4724 ("python-decorator" ,python-decorator))) ;not needed for >4.3.2
4725 (native-inputs
4726 `(("python-pytest" ,python-pytest)))
4727 (properties `((python2-variant . ,(delay python2-traitlets))))
4728 (home-page "https://ipython.org")
4729 (synopsis "Configuration system for Python applications")
4730 (description
4731 "Traitlets is a framework that lets Python classes have attributes with
4732type checking, dynamically calculated default values, and ‘on change’
4733callbacks. The package also includes a mechanism to use traitlets for
4734configuration, loading values from files or from command line arguments. This
4735is a distinct layer on top of traitlets, so you can use traitlets in your code
4736without using the configuration machinery.")
4737 (license license:bsd-3)))
4738
4739(define-public python2-traitlets
4740 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
4741 (package
4742 (inherit traitlets)
4743 (propagated-inputs
4744 `(("python2-enum34" ,python2-enum34)
4745 ,@(package-propagated-inputs traitlets))))))
4746
4747(define-public python-jupyter-core
4748 (package
4749 (name "python-jupyter-core")
4750 (version "4.4.0")
4751 (source
4752 (origin
4753 (method url-fetch)
4754 (uri (string-append (pypi-uri "jupyter_core" version)))
4755 (sha256
4756 (base32
4757 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
4758 (build-system python-build-system)
4759 ;; FIXME: not sure how to run the tests
4760 (arguments `(#:tests? #f))
4761 (propagated-inputs
4762 `(("python-traitlets" ,python-traitlets)))
4763 (home-page "http://jupyter.org/")
4764 (synopsis "Jupyter base package")
4765 (description
4766 "Jupyter core is the base package on which Jupyter projects rely.")
4767 (license license:bsd-3)))
4768
4769(define-public python2-jupyter-core
4770 (package-with-python2 python-jupyter-core))
4771
4772(define-public python-jupyter-client
4773 (package
4774 (name "python-jupyter-client")
4775 (version "5.2.4")
4776 (source
4777 (origin
4778 (method url-fetch)
4779 (uri (pypi-uri "jupyter_client" version))
4780 (sha256
4781 (base32
4782 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
4783 (build-system python-build-system)
4784 ;; Tests fail because of missing native python kernel which I assume is
4785 ;; provided by the ipython package, which we cannot use because it would
4786 ;; cause a dependency cycle.
4787 (arguments `(#:tests? #f))
4788 (propagated-inputs
4789 `(("python-pyzmq" ,python-pyzmq)
4790 ("python-traitlets" ,python-traitlets)
4791 ("python-jupyter-core" ,python-jupyter-core)))
4792 (home-page "http://jupyter.org/")
4793 (synopsis "Jupyter protocol implementation and client libraries")
4794 (description
4795 "The @code{jupyter_client} package contains the reference implementation
4796of the Jupyter protocol. It also provides client and kernel management APIs
4797for working with kernels, and the @code{jupyter kernelspec} entrypoint for
4798installing @code{kernelspec}s for use with Jupyter frontends.")
4799 (license license:bsd-3)))
4800
4801(define-public python2-jupyter-client
4802 (package-with-python2 python-jupyter-client))
4803
4804(define-public python-ipykernel
4805 (package
4806 (name "python-ipykernel")
4807 (version "5.1.0")
4808 (source
4809 (origin
4810 (method url-fetch)
4811 (uri (pypi-uri "ipykernel" version))
4812 (sha256
4813 (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g"))))
4814 (build-system python-build-system)
4815 (arguments
4816 `(#:phases
4817 (modify-phases %standard-phases
4818 (replace 'check
4819 (lambda _
4820 (setenv "HOME" "/tmp")
4821 (invoke "pytest" "-v")
4822 #t)))))
4823 (propagated-inputs
4824 `(("python-ipython" ,python-ipython)
4825 ;; imported at runtime during connect
4826 ("python-jupyter-client" ,python-jupyter-client)))
4827 (native-inputs
4828 `(("python-pytest" ,python-pytest)
4829 ("python-nose" ,python-nose)))
4830 (home-page "https://ipython.org")
4831 (synopsis "IPython Kernel for Jupyter")
4832 (description
4833 "This package provides the IPython kernel for Jupyter.")
4834 (license license:bsd-3)))
4835
4836(define-public python2-ipykernel
4837 (package-with-python2 python-ipykernel))
4838
966aa714
AE
4839(define-public python-pari-jupyter
4840 (package
4841 (name "python-pari-jupyter")
4842 (version "1.3.2")
4843 (source
4844 (origin
4845 (method url-fetch)
4846 (uri (pypi-uri "pari_jupyter" version))
4847 (sha256
4848 (base32
4849 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
4850 (build-system python-build-system)
4851 (propagated-inputs
4852 `(("python-ipykernel" ,python-ipykernel)))
4853 (inputs
4854 `(("pari-gp" ,pari-gp)
4855 ("readline" ,readline)))
4856 (arguments
4857 `(#:tests? #f)) ; no test suite
4858 (home-page
4859 "https://github.com/jdemeyer/pari_jupyter")
4860 (synopsis "A Jupyter kernel for PARI/GP")
4861 (description "The package provides a PARI/GP kernel for Jupyter.")
4862 (license license:gpl3+)))
4863
44d10b1f
RW
4864;; This is the latest release of the LTS version of ipython with support for
4865;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
4866;; dropped support for Python 2.7. We may want to rename this package.
4867(define-public python-ipython
4868 (package
4869 (name "python-ipython")
4870 (version "5.8.0")
4871 (source
4872 (origin
4873 (method url-fetch)
4874 (uri (pypi-uri "ipython" version ".tar.gz"))
4875 (sha256
4876 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
4877 (build-system python-build-system)
4878 (outputs '("out" "doc"))
4879 (propagated-inputs
4880 `(("python-pyzmq" ,python-pyzmq)
4881 ("python-prompt-toolkit" ,python-prompt-toolkit-1)
4882 ("python-terminado" ,python-terminado)
4883 ("python-matplotlib" ,python-matplotlib)
4884 ("python-numpy" ,python-numpy)
4885 ("python-numpydoc" ,python-numpydoc)
4886 ("python-jinja2" ,python-jinja2)
4887 ("python-mistune" ,python-mistune)
4888 ("python-pexpect" ,python-pexpect)
4889 ("python-pickleshare" ,python-pickleshare)
4890 ("python-simplegeneric" ,python-simplegeneric)
4891 ("python-jsonschema" ,python-jsonschema)
4892 ("python-traitlets" ,python-traitlets)
4893 ("python-nbformat" ,python-nbformat)
4894 ("python-pygments" ,python-pygments)))
4895 (inputs
4896 `(("readline" ,readline)
4897 ("which" ,which)))
4898 (native-inputs
4899 `(("graphviz" ,graphviz)
4900 ("pkg-config" ,pkg-config)
4901 ("python-requests" ,python-requests) ;; for tests
4902 ("python-testpath" ,python-testpath)
4903 ("python-nose" ,python-nose)
4904 ("python-sphinx" ,python-sphinx)
4905 ("python-shpinx-rtd-theme" ,python-sphinx-rtd-theme)
4906 ;; FIXME: It's possible that a smaller union would work just as well.
4907 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
4908 texlive-fonts-ec
4909 texlive-generic-ifxetex
4910 texlive-generic-pdftex
4911 texlive-latex-amsfonts
4912 texlive-latex-capt-of
4913 texlive-latex-cmap
4914 texlive-latex-environ
4915 texlive-latex-eqparbox
4916 texlive-latex-etoolbox
4917 texlive-latex-expdlist
4918 texlive-latex-fancyhdr
4919 texlive-latex-fancyvrb
4920 texlive-latex-fncychap
4921 texlive-latex-float
4922 texlive-latex-framed
4923 texlive-latex-geometry
4924 texlive-latex-graphics
4925 texlive-latex-hyperref
4926 texlive-latex-mdwtools
4927 texlive-latex-multirow
4928 texlive-latex-oberdiek
4929 texlive-latex-parskip
4930 texlive-latex-preview
4931 texlive-latex-tabulary
4932 texlive-latex-threeparttable
4933 texlive-latex-titlesec
4934 texlive-latex-trimspaces
4935 texlive-latex-ucs
4936 texlive-latex-upquote
4937 texlive-latex-url
4938 texlive-latex-varwidth
4939 texlive-latex-wrapfig)))
4940 ("texinfo" ,texinfo)))
4941 (arguments
4942 `(#:phases
4943 (modify-phases %standard-phases
4944 (add-after 'install 'install-doc
4945 (lambda* (#:key inputs outputs #:allow-other-keys)
4946 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4947 (doc (string-append data "/doc/" ,name "-" ,version))
4948 (html (string-append doc "/html"))
4949 (man1 (string-append data "/man/man1"))
4950 (info (string-append data "/info"))
4951 (examples (string-append doc "/examples"))
4952 (python-arg (string-append "PYTHON=" (which "python"))))
4953 (setenv "LANG" "en_US.utf8")
4954 ;; Make installed package available for running the tests
4955 (add-installed-pythonpath inputs outputs)
4956 (with-directory-excursion "docs"
4957 ;; FIXME: pdf fails to build
4958 ;;(system* "make" "pdf" "PAPER=a4")
4959 (system* "make" python-arg "html")
4960 (system* "make" python-arg "info"))
4961 (copy-recursively "docs/man" man1)
4962 (copy-recursively "examples" examples)
4963 (copy-recursively "docs/build/html" html)
4964 ;; (copy-file "docs/build/latex/ipython.pdf"
4965 ;; (string-append doc "/ipython.pdf"))
4966 (mkdir-p info)
4967 (copy-file "docs/build/texinfo/ipython.info"
4968 (string-append info "/ipython.info"))
4969 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
4970 #t))
4971 ;; Tests can only be run after the library has been installed and not
4972 ;; within the source directory.
4973 (delete 'check)
4974 (add-after 'install 'check
4975 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
4976 (if tests?
4977 (begin
4978 ;; Make installed package available for running the tests
4979 (add-installed-pythonpath inputs outputs)
4980 (setenv "HOME" "/tmp/") ;; required by a test
4981 ;; We only test the core because one of the other tests
4982 ;; tries to import ipykernel.
4983 (invoke "python" "IPython/testing/iptest.py"
4984 "-v" "IPython/core/tests"))
4985 #t)))
4986 (add-before 'check 'fix-tests
4987 (lambda* (#:key inputs #:allow-other-keys)
4988 (substitute* "./IPython/utils/_process_posix.py"
4989 (("/usr/bin/env', 'which") (which "which")))
4990 (substitute* "./IPython/core/tests/test_inputtransformer.py"
4991 (("#!/usr/bin/env python")
4992 (string-append "#!" (which "python"))))
4993 ;; Disable 1 failing test
4994 (substitute* "./IPython/core/tests/test_magic.py"
4995 (("def test_dirops\\(\\):" all)
4996 (string-append "@dec.skipif(True)\n" all)))
4997 ;; This test introduces a circular dependency on ipykernel
4998 ;; (which depends on ipython).
4999 (delete-file "IPython/core/tests/test_display.py")
5000 ;; These tests throw errors for unknown reasons.
5001 (delete-file "IPython/extensions/tests/test_storemagic.py")
5002 (delete-file "IPython/core/tests/test_displayhook.py")
5003 (delete-file "IPython/core/tests/test_interactiveshell.py")
5004 (delete-file "IPython/core/tests/test_pylabtools.py")
5005 (delete-file "IPython/core/tests/test_paths.py")
5006 #t)))))
5007 (home-page "https://ipython.org")
5008 (synopsis "IPython is a tool for interactive computing in Python")
5009 (description
5010 "IPython provides a rich architecture for interactive computing with:
5011Powerful interactive shells, a browser-based notebook, support for interactive
5012data visualization, embeddable interpreters and tools for parallel
5013computing.")
5014 (license license:bsd-3)
5015 (properties `((python2-variant . ,(delay python2-ipython))))))
5016
5017(define-public python2-ipython
5018 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
5019 (package
5020 (inherit ipython)
5021 ;; FIXME: add pyreadline once available.
5022 (propagated-inputs
5023 `(("python2-backports-shutil-get-terminal-size"
5024 ,python2-backports-shutil-get-terminal-size)
5025 ("python2-pathlib2" ,python2-pathlib2)
5026 ,@(package-propagated-inputs ipython)))
5027 (native-inputs
5028 `(("python2-mock" ,python2-mock)
5029 ,@(package-native-inputs ipython))))))
5030
5031(define-public python-urwid
5032 (package
5033 (name "python-urwid")
5034 (version "2.0.1")
5035 (source
5036 (origin
5037 (method url-fetch)
5038 (uri (pypi-uri "urwid" version))
5039 (sha256
5040 (base32
5041 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
5042 (build-system python-build-system)
5043 (home-page "http://urwid.org")
5044 (synopsis "Console user interface library for Python")
5045 (description
5046 "Urwid is a curses-based UI/widget library for Python. It includes many
5047features useful for text console applications.")
5048 (license license:lgpl2.1+)))
5049
5050(define-public python2-urwid
5051 (package-with-python2 python-urwid))
5052
5053(define-public python-urwidtrees
5054 (package
5055 (name "python-urwidtrees")
5056 (version "1.0.2")
5057 (source
5058 (origin
5059 (method url-fetch)
5060 ;; package author intends on distributing via github rather than pypi:
5061 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5062 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5063 version ".tar.gz"))
5064 (file-name (string-append name "-" version ".tar.gz"))
5065 (sha256
5066 (base32
5067 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
5068 (build-system python-build-system)
5069 (arguments
5070 '(#:tests? #f)) ; no tests
5071 (propagated-inputs `(("python-urwid" ,python-urwid)))
5072 (home-page "https://github.com/pazz/urwidtrees")
5073 (synopsis "Tree widgets for urwid")
5074 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5075toolkit. Use it to build trees of widgets.")
5076 (license license:gpl3+)))
5077
5078(define-public python2-urwidtrees
5079 (package-with-python2 python-urwidtrees))
5080
5081(define-public python-ua-parser
5082 (package
5083 (name "python-ua-parser")
5084 (version "0.8.0")
5085 (source
5086 (origin
5087 (method url-fetch)
5088 (uri (pypi-uri "ua-parser" version))
5089 (sha256
5090 (base32
5091 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
5092 (build-system python-build-system)
5093 (arguments
5094 `(#:tests? #f)) ;no test suite in release
5095 (native-inputs
5096 `(("python-pyyaml" ,python-pyyaml)))
5097 (home-page "https://github.com/ua-parser/uap-python")
5098 (synopsis "User agent parser")
5099 (description
5100 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
5101 (license license:asl2.0)))
5102
5103(define-public python2-ua-parser
5104 (package-with-python2 python-ua-parser))
5105
5106(define-public python-user-agents
5107 (package
5108 (name "python-user-agents")
5109 (version "1.1.0")
5110 (source
5111 (origin
5112 (method url-fetch)
5113 (uri (pypi-uri "user-agents" version))
5114 (sha256
5115 (base32
5116 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
5117 (build-system python-build-system)
5118 (arguments
5119 `(#:tests? #f)) ;missing devices.json test file in release
5120 (propagated-inputs
5121 `(("python-ua-parser" ,python-ua-parser)))
5122 (home-page "https://github.com/selwin/python-user-agents")
5123 (synopsis "User Agent strings parsing library")
5124 (description
5125 "A library to identify devices (phones, tablets) and their capabilities by
5126parsing (browser/HTTP) user agent strings.")
5127 (license license:expat)))
5128
5129(define-public python2-user-agents
5130 (package-with-python2 python-user-agents))
5131
5132(define-public python-dbus
5133 (package
5134 (name "python-dbus")
5135 (version "1.2.8")
5136 (source
5137 (origin
5138 (method url-fetch)
5139 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
5140 "dbus-python-" version ".tar.gz"))
5141 (sha256
5142 (base32
5143 "0vvvjmiwnc9cjlks3gcdk43ap7llhlpz7cm1wbw0nc2yfsxjpwdb"))))
5144 (build-system gnu-build-system)
5145 (arguments
5146 '(#:phases
5147 (modify-phases %standard-phases
5148 (add-before
5149 'check 'pre-check
5150 (lambda _
5151 ;; XXX: For the missing '/etc/machine-id'.
5152 (substitute* "test/run-test.sh"
5153 (("DBUS_FATAL_WARNINGS=1")
5154 "DBUS_FATAL_WARNINGS=0"))
5155 #t)))))
5156 (native-inputs
5157 `(("pkg-config" ,pkg-config)))
5158 (inputs
5159 `(("python" ,python-wrapper)
5160 ("dbus-glib" ,dbus-glib)))
5161 (synopsis "Python bindings for D-bus")
5162 (description "python-dbus provides bindings for libdbus, the reference
5163implementation of D-Bus.")
5164 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
5165 (license license:expat)))
5166
5167(define-public python2-dbus
5168 (package (inherit python-dbus)
5169 (name "python2-dbus")
5170 (inputs `(("python" ,python-2)
5171 ,@(alist-delete "python"
5172 (package-inputs python-dbus)
5173 equal?)))
5174 ;; FIXME: on Python 2, the test_utf8 fails with:
5175 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5176 (arguments `(#:tests? #f))))
5177
5178(define-public python-lxml
5179 (package
5180 (name "python-lxml")
5181 (version "4.2.5")
5182 (source
5183 (origin
5184 (method url-fetch)
5185 (uri (pypi-uri "lxml" version))
5186 (sha256
5187 (base32
5188 "0zw0y9hs0nflxhl9cs6ipwwh53szi3w2x06wl0k9cylyqac0cwin"))))
5189 (build-system python-build-system)
5190 (inputs
5191 `(("libxml2" ,libxml2)
5192 ("libxslt" ,libxslt)))
5193 (home-page "http://lxml.de/")
5194 (synopsis
5195 "Python XML processing library")
5196 (description
5197 "The lxml XML toolkit is a Pythonic binding for the C libraries
5198libxml2 and libxslt.")
5199 (license license:bsd-3))) ; and a few more, see LICENSES.txt
5200
5201(define-public python2-lxml
5202 (package-with-python2 python-lxml))
5203
5204;; beautifulsoup4 has a totally different namespace than 3.x,
5205;; and pypi seems to put it under its own name, so I guess we should too
5206(define-public python-beautifulsoup4
5207 (package
5208 (name "python-beautifulsoup4")
5209 (version "4.6.3")
5210 (source
5211 (origin
5212 (method url-fetch)
5213 (uri (pypi-uri "beautifulsoup4" version))
5214 (sha256
5215 (base32
5216 "041dhalzjciw6qyzzq7a2k4h1yvyk76xigp35hv5ibnn448ydy4h"))))
5217 (build-system python-build-system)
5218 (arguments
5219 `(#:phases
5220 (modify-phases %standard-phases
5221 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5222 ;; must use this conversion script when building with Python 3. The
5223 ;; conversion script also runs the tests.
5224 ;; For more information, see the file 'convert-py3k' in the source
5225 ;; distribution.
5226 (replace 'check
dff0197e 5227 (lambda _ (invoke "./convert-py3k"))))))
44d10b1f
RW
5228 (home-page
5229 "https://www.crummy.com/software/BeautifulSoup/bs4/")
5230 (synopsis
5231 "Python screen-scraping library")
5232 (description
5233 "Beautiful Soup is a Python library designed for rapidly setting up
5234screen-scraping projects. It offers Pythonic idioms for navigating,
5235searching, and modifying a parse tree, providing a toolkit for
5236dissecting a document and extracting what you need. It automatically
5237converts incoming documents to Unicode and outgoing documents to UTF-8.")
5238 (license license:expat)
5239 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5240
5241(define-public python2-beautifulsoup4
5242 (package
5243 (inherit (package-with-python2
5244 (strip-python2-variant python-beautifulsoup4)))
5245 (arguments `(#:python ,python-2))))
5246
5247(define-public python-netifaces
5248 (package
5249 (name "python-netifaces")
5250 (version "0.10.7")
5251 (source
5252 (origin
5253 (method url-fetch)
5254 (uri (pypi-uri "netifaces" version))
5255 (sha256
5256 (base32
5257 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
5258 (build-system python-build-system)
5259 (home-page "https://github.com/al45tair/netifaces")
5260 (synopsis
5261 "Python module for portable network interface information")
5262 (description
5263 "Netifaces is a Python module providing information on network
5264interfaces in an easy and portable manner.")
5265 (license license:expat)))
5266
5267(define-public python2-netifaces
5268 (package-with-python2 python-netifaces))
5269
5270(define-public python-networkx
5271 (package
5272 (name "python-networkx")
5273 (version "2.2")
5274 (source
5275 (origin
5276 (method url-fetch)
5277 (uri (pypi-uri "networkx" version ".zip"))
5278 (sha256
5279 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
5280 (build-system python-build-system)
5281 ;; python-decorator is needed at runtime.
5282 (propagated-inputs
5283 `(("python-decorator" ,python-decorator)))
5284 (native-inputs
5285 `(("python-nose" ,python-nose)
5286 ("unzip" ,unzip)))
5287 (home-page "https://networkx.github.io/")
5288 (synopsis "Python module for creating and manipulating graphs and networks")
5289 (description
5290 "NetworkX is a Python package for the creation, manipulation, and study
5291of the structure, dynamics, and functions of complex networks.")
5292 (license license:bsd-3)))
5293
5294(define-public python2-networkx
5295 (package-with-python2 python-networkx))
5296
5297(define-public python-datrie
5298 (package
5299 (name "python-datrie")
5300 (version "0.7.1")
5301 (source
5302 (origin
5303 (method url-fetch)
5304 (uri (pypi-uri "datrie" version))
5305 (sha256
5306 (base32
5307 "08r0if7dry2q7p34gf7ffyrlnf4bdvnprxgydlfxgfnvq8f3f4bs"))))
5308 (build-system python-build-system)
5309 (arguments
5310 `(#:phases (modify-phases %standard-phases
5311 (add-before 'build 'cythonize
5312 (lambda _
5313 ;; Regenerate Cython classes to solve ABI issues with Python
5314 ;; 3.7.0. See <https://github.com/pytries/datrie/issues/52>.
5315 (invoke "cython" "src/datrie.pyx" "src/cdatrie.pxd"
5316 "src/stdio_ext.pxd" "-a"))))))
5317 (native-inputs
5318 `(("python-cython" ,python-cython)
5319 ("python-hypothesis" ,python-hypothesis)
5320 ("python-pytest" ,python-pytest)
5321 ("python-pytest-runner" ,python-pytest-runner)))
5322 (home-page "https://github.com/kmike/datrie")
5323 (synopsis "Fast, efficiently stored trie for Python")
5324 (description
5325 "This package provides a fast, efficiently stored trie implementation for
5326Python.")
5327 (license license:lgpl2.1+)))
5328
5329(define-public snakemake
5330 (package
5331 (name "snakemake")
5332 (version "5.2.4")
5333 (source
5334 (origin
5335 (method url-fetch)
5336 (uri (pypi-uri "snakemake" version))
5337 (sha256
5338 (base32 "0gj0xxgiq3mp9qyyrbfzldiaq1giliqw0in64nqiz7vx49myqj7z"))))
5339 (build-system python-build-system)
5340 (arguments
5341 ;; TODO: Package missing test dependencies.
5342 '(#:tests? #f
5343 #:phases
5344 (modify-phases %standard-phases
5345 ;; For cluster execution Snakemake will call Python. Since there is
5346 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
5347 ;; this by calling the snakemake wrapper instead.
5348 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
5349 (lambda* (#:key outputs #:allow-other-keys)
5350 (substitute* "snakemake/executors.py"
5351 (("\\{sys.executable\\} -m snakemake")
5352 (string-append (assoc-ref outputs "out")
5353 "/bin/snakemake")))
5354 #t)))))
5355 (propagated-inputs
5356 `(("python-gitpython" ,python-gitpython)
5357 ("python-wrapt" ,python-wrapt)
5358 ("python-requests" ,python-requests)
5359 ("python-appdirs" ,python-appdirs)
5360 ("python-configargparse" ,python-configargparse)
5361 ("python-datrie" ,python-datrie)
5362 ("python-docutils" ,python-docutils)
5363 ("python-jinja2" ,python-jinja2)
5364 ("python-jsonschema" ,python-jsonschema)
5365 ("python-networkx" ,python-networkx)
5366 ("python-pyyaml" ,python-pyyaml)
5367 ("python-ratelimiter" ,python-ratelimiter)))
5368 (home-page "https://snakemake.readthedocs.io")
5369 (synopsis "Python-based execution environment for make-like workflows")
5370 (description
5371 "Snakemake aims to reduce the complexity of creating workflows by
5372providing a clean and modern domain specific specification language (DSL) in
5373Python style, together with a fast and comfortable execution environment.")
5374 (license license:expat)))
5375
5376;; This is currently needed for the pigx-* packages.
5377(define-public snakemake-4
5378 (package (inherit snakemake)
5379 (version "4.4.0")
5380 (source
5381 (origin
5382 (method url-fetch)
5383 (uri (pypi-uri "snakemake" version))
5384 (sha256
5385 (base32 "0g0paia4z7w3srnqdmavq3hrb2x7qnpf81jx50njl0p7y4y0j8jv"))))
5386 (propagated-inputs
5387 `(("python-wrapt" ,python-wrapt)
5388 ("python-requests" ,python-requests)
5389 ("python-appdirs" ,python-appdirs)
5390 ("python-configargparse" ,python-configargparse)
5391 ("python-pyyaml" ,python-pyyaml)
5392 ("python-ratelimiter" ,python-ratelimiter)))))
5393
5394(define-public python-pyqrcode
5395 (package
5396 (name "python-pyqrcode")
5397 (version "1.2.1")
5398 (source
5399 (origin
5400 (method url-fetch)
5401 (uri (pypi-uri "PyQRCode" version))
5402 (sha256
5403 (base32
5404 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
5405 (build-system python-build-system)
5406 (home-page
5407 "https://github.com/mnooner256/pyqrcode")
5408 (synopsis "QR code generator")
5409 (description
5410 "Pyqrcode is a QR code generator written purely in Python with
5411SVG, EPS, PNG and terminal output.")
5412 (license license:bsd-3)))
5413
5414(define-public python-seaborn
5415 (package
5416 (name "python-seaborn")
5417 (version "0.9.0")
5418 (source
5419 (origin
5420 (method url-fetch)
5421 (uri (pypi-uri "seaborn" version))
5422 (sha256
5423 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))))
5424 (build-system python-build-system)
5425 (arguments
5426 `(#:phases
5427 (modify-phases %standard-phases
5428 (add-before 'check 'start-xserver
5429 (lambda* (#:key inputs #:allow-other-keys)
5430 (let ((xorg-server (assoc-ref inputs "xorg-server")))
5431 ;; There must be a running X server and make check doesn't
5432 ;; start one. Therefore we must do it.
5433 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
5434 (setenv "DISPLAY" ":1")
5435 #t)))
5436 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
5437 (propagated-inputs
5438 `(("python-pandas" ,python-pandas)
5439 ("python-matplotlib" ,python-matplotlib)
5440 ("python-numpy" ,python-numpy)
5441 ("python-scipy" ,python-scipy)))
5442 (native-inputs
5443 `(("python-pytest" ,python-pytest)
5444 ("xorg-server" ,xorg-server)))
5445 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5446 (synopsis "Statistical data visualization")
5447 (description
5448 "Seaborn is a library for making attractive and informative statistical
5449graphics in Python. It is built on top of matplotlib and tightly integrated
5450with the PyData stack, including support for numpy and pandas data structures
5451and statistical routines from scipy and statsmodels.")
5452 (license license:bsd-3)))
5453
5454(define-public python2-seaborn
5455 (package-with-python2 python-seaborn))
5456
5457(define-public python-mpmath
5458 (package
5459 (name "python-mpmath")
5460 (version "0.19")
5461 (source (origin
5462 (method url-fetch)
5463 (uri (string-append "http://mpmath.org/files/mpmath-"
5464 version ".tar.gz"))
5465 (sha256
5466 (base32
5467 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
5468 (build-system python-build-system)
5469 (arguments
5470 '(#:phases
5471 (modify-phases %standard-phases
5472 (replace 'check
5473 (lambda _
5d7a6f1c 5474 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
44d10b1f
RW
5475 (home-page "http://mpmath.org")
5476 (synopsis "Arbitrary-precision floating-point arithmetic in python")
5477 (description
5478 "@code{mpmath} can be used as an arbitrary-precision substitute for
5479Python's float/complex types and math/cmath modules, but also does much
5480more advanced mathematics.")
5481 (license license:bsd-3)))
5482
5483(define-public python2-mpmath
5484 (package-with-python2 python-mpmath))
5485
5486(define-public python-bigfloat
5487 (package
5488 (name "python-bigfloat")
5489 (version "0.3.0")
5490 (source
5491 (origin
5492 (method url-fetch)
5493 (uri (pypi-uri "bigfloat" version))
5494 (sha256
5495 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
5496 (build-system python-build-system)
5497 (inputs
5498 `(("mpfr" ,mpfr)))
5499 (home-page "https://github.com/mdickinson/bigfloat")
5500 (synopsis "Arbitrary precision floating-point arithmetic for Python")
5501 (description
5502 "This packages provides a Python interface to the MPFR library for
5503multiprecision arithmetic.")
5504 (license license:lgpl3+)))
5505
5506(define-public python2-bigfloat
5507 (package-with-python2 python-bigfloat))
5508
5509(define-public python-sympy
5510 (package
5511 (name "python-sympy")
5512 (version "1.1.1")
5513 (source
5514 (origin
5515 (method url-fetch)
5516 (uri (string-append
5517 "https://github.com/sympy/sympy/releases/download/sympy-"
5518 version "/sympy-" version ".tar.gz"))
5519 (sha256
5520 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
5521 (build-system python-build-system)
5522 (arguments
5523 `(#:phases
5524 (modify-phases %standard-phases
5525 ;; Run the core tests after installation. By default it would run
5526 ;; *all* tests, which take a very long time to complete and are known
5527 ;; to be flaky.
5528 (delete 'check)
5529 (add-after 'install 'check
5530 (lambda* (#:key outputs #:allow-other-keys)
5531 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
5532 #t)))))
5533 (propagated-inputs
5534 `(("python-mpmath" ,python-mpmath)))
5535 (home-page "http://www.sympy.org/")
5536 (synopsis "Python library for symbolic mathematics")
5537 (description
5538 "SymPy is a Python library for symbolic mathematics. It aims to become a
5539full-featured computer algebra system (CAS) while keeping the code as simple
5540as possible in order to be comprehensible and easily extensible.")
5541 (license license:bsd-3)))
5542
5543(define-public python2-sympy
5544 (package
5545 (inherit (package-with-python2 python-sympy))
5546 (arguments
5547 `(#:phases
5548 (modify-phases %standard-phases
5549 ;; Run the core tests after installation. By default it would run
5550 ;; *all* tests, which take a very long time to complete and are known
5551 ;; to be flaky.
5552 (delete 'check)
5553 (add-after 'install 'check
5554 (lambda* (#:key outputs #:allow-other-keys)
5555 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
5556 #t)))))))
5557
5558(define-public python-q
5559 (package
5560 (name "python-q")
5561 (version "2.6")
5562 (source
5563 (origin
5564 (method url-fetch)
5565 (uri (pypi-uri "q" version))
5566 (sha256
5567 (base32
5568 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
5569 (build-system python-build-system)
5570 (home-page "https://github.com/zestyping/q")
5571 (synopsis "Quick-and-dirty debugging output for tired programmers")
5572 (description
5573 "q is a Python module for \"print\" style of debugging Python code. It
5574provides convenient short API for print out of values, tracebacks, and
5575falling into the Python interpreter.")
5576 (license license:asl2.0)))
5577
5578(define-public python2-q
5579 (package-with-python2 python-q))
5580
5581(define-public python2-xlib
5582 (package
5583 (name "python2-xlib")
5584 (version "0.14")
5585 (source (origin
5586 (method url-fetch)
5587 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
5588 "/" version "/"
5589 "python-xlib-" version ".tar.gz"))
5590 (sha256
5591 (base32
5592 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
5593 (build-system python-build-system)
5594 (arguments
5595 `(#:python ,python-2 ;Python 2 only
5596 #:tests? #f)) ;no tests
5597 (home-page "http://python-xlib.sourceforge.net/")
5598 (synopsis "Python X11 client library")
5599 (description
5600 "The Python X Library is intended to be a fully functional X client
5601library for Python programs. It is useful to implement low-level X clients.
5602It is written entirely in Python.")
5603 (license license:gpl2+)))
5604
5605(define-public python-singledispatch
5606 (package
5607 (name "python-singledispatch")
5608 (version "3.4.0.3")
5609 (source
5610 (origin
5611 (method url-fetch)
5612 (uri (pypi-uri "singledispatch" version))
5613 (sha256
5614 (base32
5615 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
5616 (build-system python-build-system)
5617 (native-inputs
5618 `(("python-six" ,python-six))) ; required for conversion, not at run-time
5619 (home-page
5620 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
5621 (synopsis "Backport of singledispatch feature from Python 3.4")
5622 (description
5623 "This library brings functools.singledispatch from Python 3.4 to Python
56242.6-3.3.")
5625 (license license:expat)))
5626
5627(define-public python2-singledispatch
5628 (package-with-python2 python-singledispatch))
5629
5630;; the python- version can be removed with python-3.5
5631(define-public python-backports-abc
5632 (package
5633 (name "python-backports-abc")
5634 (version "0.5")
5635 (source
5636 (origin
5637 (method url-fetch)
5638 (uri (pypi-uri "backports_abc" version))
5639 (sha256
5640 (base32
5641 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
5642 (build-system python-build-system)
5643 (home-page "https://github.com/cython/backports_abc")
5644 (synopsis "Backport of additions to the 'collections.abc' module")
5645 (description
5646 "Python-backports-abc provides a backport of additions to the
5647'collections.abc' module in Python-3.5.")
5648 (license license:psfl)))
5649
5650(define-public python2-backports-abc
5651 (package-with-python2 python-backports-abc))
5652
5653(define-public python-backports-csv
5654 (package
5655 (name "python-backports-csv")
5656 (version "1.0.5")
5657 (source
5658 (origin
5659 (method url-fetch)
5660 (uri (pypi-uri "backports.csv" version))
5661 (sha256
5662 (base32
5663 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
5664 (build-system python-build-system)
5665 (home-page "https://github.com/ryanhiebert/backports.csv")
5666 (synopsis "Backport of Python 3's csv module for Python 2")
5667 (description
5668 "Provides a backport of Python 3's @code{csv} module for parsing
5669comma separated values. The API of the @code{csv} module in Python 2
5670is drastically different from the @code{csv} module in Python 3.
5671This is due, for the most part, to the difference between str in
5672Python 2 and Python 3.")
5673 (license license:psfl)))
5674
5675(define-public python2-backports-csv
5676 (package-with-python2 python-backports-csv))
5677
5678(define-public python2-backports-shutil-get-terminal-size
5679 (package
5680 (name "python2-backports-shutil-get-terminal-size")
5681 (version "1.0.0")
5682 (source
5683 (origin
5684 (method url-fetch)
5685 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
5686 (sha256
5687 (base32
5688 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
5689 (build-system python-build-system)
5690 (arguments
5691 `(#:python ,python-2
5692 #:phases
5693 (modify-phases %standard-phases
5694 (replace 'check
5695 (lambda _
4a4a7d9a 5696 (invoke "py.test" "-v"))))))
44d10b1f
RW
5697 (native-inputs
5698 `(("python2-pytest" ,python2-pytest)))
5699 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
5700 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
5701 (description
5702 "This package provides a backport of the @code{get_terminal_size
5703function} from Python 3.3's @code{shutil}.
5704Unlike the original version it is written in pure Python rather than C,
5705so it might be a tiny bit slower.")
5706 (license license:expat)))
5707
5708(define-public python-waf
5709 (package
5710 (name "python-waf")
5711 (version "2.0.11")
5712 (source (origin
5713 (method url-fetch)
5714 (uri (string-append "https://waf.io/"
5715 "waf-" version ".tar.bz2"))
5716 (sha256
5717 (base32
5718 "13zrniwkmfqgsgzi9v5m1367fppp9yzrz6z2ny6hy8dmpb8mj4z4"))))
5719 (build-system python-build-system)
5720 (arguments
5721 '(#:phases
5722 (modify-phases %standard-phases
5723 (replace 'build
5724 (lambda _
5725 (invoke "python" "waf-light" "configure" "build")))
5726 (replace 'check
5727 (lambda _
5728 (invoke "python" "waf" "--version")))
5729 (replace 'install
5730 (lambda* (#:key outputs #:allow-other-keys)
5731 (let ((out (assoc-ref outputs "out")))
5732 (install-file "waf" (string-append out "/bin")))
5733 #t))
5734 ;; waf breaks when it is wrapped.
5735 (delete 'wrap))))
5736 (home-page "https://waf.io/")
5737 (synopsis "Python-based build system")
5738 (description
5739 "Waf is a Python-based framework for configuring, compiling and installing
5740applications.")
5741 (license license:bsd-3)))
5742
5743(define-public python2-waf
5744 (package-with-python2 python-waf))
5745
5746(define-public python-pyzmq
5747 (package
5748 (name "python-pyzmq")
5749 (version "17.1.2")
5750 (source
5751 (origin
5752 (method url-fetch)
5753 (uri (pypi-uri "pyzmq" version))
5754 (sha256
5755 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
5756 (build-system python-build-system)
5757 (arguments
5758 `(#:configure-flags
5759 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
5760 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
5761 ;; --inplace' for 'python setup.py test' to work.
5762 #:tests? #f))
5763 (inputs
5764 `(("zeromq" ,zeromq)))
5765 (native-inputs
5766 `(("pkg-config" ,pkg-config)
5767 ("python-nose" ,python-nose)))
5768 (home-page "https://github.com/zeromq/pyzmq")
5769 (synopsis "Python bindings for 0MQ")
5770 (description
5771 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
5772 (license license:bsd-4)))
5773
5774(define-public python2-pyzmq
5775 (package-with-python2 python-pyzmq))
5776
5777(define-public python-pep8
5778 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
5779 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
5780 ;; some dependents' test suites, and nothing more.
5781 (package
5782 (name "python-pep8")
5783 (version "1.7.0")
5784 (source
5785 (origin
5786 (method url-fetch)
5787 (uri (pypi-uri "pep8" version))
5788 (sha256
5789 (base32
5790 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
5791 (build-system python-build-system)
5792 (home-page "https://pep8.readthedocs.org/")
5793 (synopsis "Python style guide checker")
5794 (description
5795 "This tools checks Python code against some of the style conventions in
5796PEP 8.")
5797 (license license:expat)))
5798
5799(define-public python2-pep8
5800 (package-with-python2 python-pep8))
5801
5802(define-public python-pyflakes
5803 (package
5804 (name "python-pyflakes")
5805 (version "2.0.0")
5806 (source
5807 (origin
5808 (method url-fetch)
5809 (uri (pypi-uri "pyflakes" version))
5810 (sha256
5811 (base32
5812 "0jba28czyvimdc72llms3f17swp3i8jdcabf5w0j00adfbn64xls"))))
5813 (build-system python-build-system)
5814 (home-page
5815 "https://github.com/pyflakes/pyflakes")
5816 (synopsis "Passive checker of Python programs")
5817 (description
5818 "Pyflakes statically checks Python source code for common errors.")
5819 (license license:expat)))
5820
5821(define-public python2-pyflakes
5822 (package-with-python2 python-pyflakes))
5823
5824(define-public python-mccabe
5825 (package
5826 (name "python-mccabe")
5827 (version "0.6.1")
5828 (source
5829 (origin
5830 (method url-fetch)
5831 (uri (pypi-uri "mccabe" version))
5832 (sha256
5833 (base32
5834 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
5835 (build-system python-build-system)
5836 (native-inputs
5837 `(("python-pytest" ,python-pytest-bootstrap)
5838 ("python-pytest-runner" ,python-pytest-runner)))
5839 (home-page "https://github.com/flintwork/mccabe")
5840 (synopsis "McCabe checker, plugin for flake8")
5841 (description
5842 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
5843complexity of Python source code.")
5844 (license license:expat)))
5845
5846(define-public python2-mccabe
5847 (package-with-python2 python-mccabe))
5848
5849(define-public python-mccabe-0.2.1
5850 (package (inherit python-mccabe)
5851 (version "0.2.1")
5852 (source
5853 (origin
5854 (method url-fetch)
5855 (uri (pypi-uri "mccabe" version))
5856 (sha256
5857 (base32
5858 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
5859
5860(define-public python2-mccabe-0.2.1
5861 (package-with-python2 python-mccabe-0.2.1))
5862
5863;; Flake8 2.4.1 requires an older version of pep8.
5864;; This should be removed ASAP.
5865(define-public python-pep8-1.5.7
5866 (package (inherit python-pep8)
5867 (version "1.5.7")
5868 (source
f3576970
RW
5869 (origin
5870 (method url-fetch)
5871 (uri (pypi-uri "pep8" version))
5872 (sha256
5873 (base32
5874 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
44d10b1f
RW
5875 (arguments
5876 ;; XXX Tests not compatible with Python 3.5.
5877 '(#:tests? #f))))
5878
5879(define-public python2-pep8-1.5.7
5880 (package-with-python2 python-pep8-1.5.7))
5881
5882;; Flake8 2.4.1 requires an older version of pyflakes.
5883;; This should be removed ASAP.
5884(define-public python-pyflakes-0.8.1
5885 (package (inherit python-pyflakes)
5886 (version "0.8.1")
5887 (source
8c4dffb5
RW
5888 (origin
5889 (method url-fetch)
5890 (uri (pypi-uri "pyflakes" version))
5891 (sha256
5892 (base32
5893 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
44d10b1f
RW
5894 (arguments
5895 ;; XXX Tests not compatible with Python 3.5.
5896 '(#:tests? #f))))
5897
5898(define-public python2-pyflakes-0.8.1
5899 (package-with-python2 python-pyflakes-0.8.1))
5900
5901;; This package is used by hypothesis which has thousands of dependent packages.
5902;; FIXME: Consolidate this with "python-flake8" below in the next rebuild cycle.
5903(define-public python-flake8-3.5
5904 (package
5905 (name "python-flake8")
5906 (version "3.5.0")
5907 (source
5908 (origin
5909 (method url-fetch)
5910 (uri (pypi-uri "flake8" version))
5911 (sha256
5912 (base32
5913 "184b33grvvjmiwlv9kyd7yng9qv5ld24154j70z332xxg9gjclvj"))))
5914 (build-system python-build-system)
5915 (arguments
5916 `(#:phases
5917 (modify-phases %standard-phases
5918 ;; Two errors don't seem to have assigned codes.
5919 (add-after 'unpack 'delete-broken-test
5920 (lambda _ (delete-file "tests/unit/test_pyflakes_codes.py") #t))
5921 (add-after 'unpack 'fix-problem-with-pycodestyle
5922 (lambda _
5923 ;; See https://gitlab.com/pycqa/flake8/merge_requests/230
5924 ;; This should no longer be needed with the next release.
5925 (substitute* "setup.py"
5926 (("PEP8_PLUGIN\\('break_around_binary_operator'\\),")
5927 "PEP8_PLUGIN('break_after_binary_operator'),\
5928PEP8_PLUGIN('break_before_binary_operator'),"))
5929 #t))
5930 (delete 'check)
5931 (add-after 'install 'check
5932 (lambda* (#:key inputs outputs #:allow-other-keys)
5933 (add-installed-pythonpath inputs outputs)
5934 (invoke "pytest" "-v")
5935 #t)))))
5936 (propagated-inputs
5937 `(("python-pycodestyle" ,python-pycodestyle)
5938 ("python-pyflakes" ,python-pyflakes)
5939 ("python-mccabe" ,python-mccabe)))
5940 (native-inputs
5941 `(("python-mock" ,python-mock)
5942 ("python-pytest" ,python-pytest-bootstrap)
5943 ("python-pytest-runner" ,python-pytest-runner)))
5944 (home-page "https://gitlab.com/pycqa/flake8")
5945 (synopsis
5946 "The modular source code checker: pep8, pyflakes and co")
5947 (description
5948 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
5949 (properties `((python2-variant . ,(delay python2-flake8-3.5))))
5950 (license license:expat)))
5951
5952(define-public python2-flake8-3.5
5953 (let ((base (package-with-python2 (strip-python2-variant python-flake8-3.5))))
5954 (package (inherit base)
5955 (propagated-inputs
5956 `(("python2-configparser" ,python2-configparser)
5957 ("python2-enum34" ,python2-enum34)
5958 ,@(package-propagated-inputs base))))))
5959
5960;; Version 3.5.0 has compatibility issues with Pyflakes 2.0, so we need
5961;; this newer version. Keep it as a separate variable for now to avoid
5962;; rebuilding "python-hypothesis"; this should be removed in the next
5963;; rebuild cycle.
5964(define-public python-flake8
5965 (package
5966 (inherit python-flake8-3.5)
5967 (version "3.6.0")
5968 (source (origin
5969 (method url-fetch)
5970 (uri (pypi-uri "flake8" version))
5971 (sha256
5972 (base32
5973 "0w0nprx22rbvrrkbfx9v5jc5gskbm08g219l7r8wai8zfswgadba"))))
5974 (arguments
5975 (substitute-keyword-arguments (package-arguments python-flake8-3.5)
5976 ((#:phases phases)
5977 `(modify-phases ,phases
5978 (delete 'delete-broken-test)
5979 (delete 'fix-problem-with-pycodestyle)))))
5980 (properties `((python2-variant . ,(delay python2-flake8))))))
5981
5982(define-public python2-flake8
5983 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
5984 (package (inherit base)
5985 (propagated-inputs
5986 (package-propagated-inputs python2-flake8-3.5)))))
5987
5988;; python-hacking requires flake8 <2.6.0.
5989(define-public python-flake8-2.5
5990 (package
5991 (inherit python-flake8)
5992 (version "2.5.5")
5993 (source (origin
5994 (method url-fetch)
5995 (uri (pypi-uri "flake8" version))
5996 (sha256
5997 (base32
5998 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
5999 (propagated-inputs
6000 `(("python-pep8" ,python-pep8)
6001 ,@(package-propagated-inputs python-flake8)))
6002 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
6003
6004(define-public python2-flake8-2.5
6005 (package
6006 (inherit python2-flake8)
6007 (version (package-version python-flake8-2.5))
6008 (source (origin
6009 (inherit (package-source python-flake8-2.5))))
6010 (propagated-inputs
6011 `(("python2-pep8" ,python2-pep8)
6012 ,@(package-propagated-inputs python2-flake8)))))
6013
6014(define-public python-flake8-polyfill
6015 (package
6016 (name "python-flake8-polyfill")
6017 (version "1.0.2")
6018 (source
6019 (origin
6020 (method url-fetch)
6021 (uri (pypi-uri "flake8-polyfill" version))
6022 (sha256
6023 (base32
6024 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
6025 (build-system python-build-system)
6026 (arguments
6027 '(#:phases
6028 (modify-phases %standard-phases
6029 (replace 'check
6030 (lambda _
6031 (setenv "PYTHONPATH"
6032 (string-append (getcwd) "/build/lib:"
6033 (getenv "PYTHONPATH")))
4f0a0894 6034 (invoke "py.test" "-v"))))))
44d10b1f
RW
6035 (native-inputs
6036 `(("python-flake8" ,python-flake8)
6037 ("python-mock" ,python-mock)
6038 ("python-pep8" ,python-pep8)
6039 ("python-pycodestyle" ,python-pycodestyle)
6040 ("python-pytest" ,python-pytest)))
6041 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6042 (synopsis "Polyfill package for Flake8 plugins")
6043 (description
6044 "This package that provides some compatibility helpers for Flake8
6045plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6046 (license license:expat)))
6047
6048(define-public python2-flake8-polyfill
6049 (package-with-python2 python-flake8-polyfill))
6050
6051(define-public python-mistune
6052 (package
6053 (name "python-mistune")
6054 (version "0.8.4")
6055 (source
6056 (origin
6057 (method url-fetch)
6058 (uri (pypi-uri "mistune" version))
6059 (sha256
6060 (base32
6061 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
6062 (build-system python-build-system)
6063 (native-inputs
6064 `(("python-nose" ,python-nose)
6065 ("python-cython" ,python-cython)))
6066 (home-page "https://github.com/lepture/mistune")
6067 (synopsis "Markdown parser in pure Python")
6068 (description "This package provides a fast markdown parser in pure
6069Python.")
6070 (license license:bsd-3)))
6071
6072(define-public python2-mistune
6073 (package-with-python2 python-mistune))
6074
6075(define-public python-markdown
6076 (package
6077 (name "python-markdown")
6078 (version "3.0.1")
6079 (source
6080 (origin
6081 (method url-fetch)
6082 (uri (pypi-uri "Markdown" version))
6083 (sha256
6084 (base32
6085 "0z6v8649sr434d5r5zmrhydka7v7f9yas4bwcgkcs0650jdhybnh"))))
6086 (build-system python-build-system)
6087 (native-inputs
6088 `(("python-nose" ,python-nose)
6089 ("python-pyyaml" ,python-pyyaml)))
6090 (home-page "https://python-markdown.github.io/")
6091 (synopsis "Python implementation of Markdown")
6092 (description
6093 "This package provides a Python implementation of John Gruber's
6094Markdown. The library features international input, various Markdown
6095extensions, and several HTML output formats. A command line wrapper
6096markdown_py is also provided to convert Markdown files to HTML.")
6097 (license license:bsd-3)))
6098
6099(define-public python2-markdown
6100 (package-with-python2 python-markdown))
6101
6102(define-public python-ptyprocess
6103 (package
6104 (name "python-ptyprocess")
6105 (version "0.5.2")
6106 (source
6107 (origin
6108 (method url-fetch)
6109 (uri (pypi-uri "ptyprocess" version))
6110 (sha256
6111 (base32
6112 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
6113 (build-system python-build-system)
6114 (native-inputs
6115 `(("python-nose" ,python-nose)))
6116 (arguments
6117 `(#:phases
6118 (modify-phases %standard-phases
6119 (replace 'check
7904d6fa 6120 (lambda _ (invoke "nosetests"))))))
44d10b1f
RW
6121 (home-page "https://github.com/pexpect/ptyprocess")
6122 (synopsis "Run a subprocess in a pseudo terminal")
6123 (description
6124 "This package provides a Python library used to launch a subprocess in a
6125pseudo terminal (pty), and interact with both the process and its pty.")
6126 (license license:isc)))
6127
6128(define-public python2-ptyprocess
6129 (package-with-python2 python-ptyprocess))
6130
6131(define-public python-cram
6132 (package
6133 (name "python-cram")
6134 (version "0.7")
6135 (home-page "https://bitheap.org/cram/")
6136 (source (origin
6137 (method url-fetch)
6138 (uri (list (string-append home-page "cram-"
6139 version ".tar.gz")
6140 (pypi-uri "cram" version)))
6141 (sha256
6142 (base32
6143 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6144 (arguments
6145 '(#:phases
6146 (modify-phases %standard-phases
6147 (add-after 'unpack 'patch-source
6148 (lambda _
6149 (substitute* (find-files "cram" ".*\\.py$")
6150 ;; Replace default shell path.
6151 (("/bin/sh") (which "sh")))
6152 (substitute* (find-files "tests" ".*\\.t$")
6153 (("md5") "md5sum")
6154 (("/bin/bash") (which "bash"))
6155 (("/bin/sh") (which "sh")))
6156 (substitute* "cram/_test.py"
6157 ;; This hack works around a bug triggered by substituting
6158 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6159 ;; "cram -h", which breaks the output at 80 characters. This
6160 ;; causes the line showing the default shell to break into two
6161 ;; lines, but the test expects a single line...
6162 (("env\\['COLUMNS'\\] = '80'")
6163 "env['COLUMNS'] = '160'"))
6164 #t))
6165 (delete 'check)
6166 (add-after 'install 'check
6167 ;; The test phase uses the built library and executable.
6168 ;; It's easier to run it after install since the build
6169 ;; directory contains version-specific PATH.
6170 (lambda* (#:key inputs outputs #:allow-other-keys)
6171 (add-installed-pythonpath inputs outputs)
6172 (setenv "PATH" (string-append (getenv "PATH") ":"
6173 (assoc-ref outputs "out") "/bin"))
2d7db192 6174 (invoke "make" "test"))))))
44d10b1f
RW
6175 (build-system python-build-system)
6176 (native-inputs
6177 `(("python-coverage" ,python-coverage)
6178 ("which" ,which)))
6179 (synopsis "Simple testing framework for command line applications")
6180 (description
6181 "Cram is a functional testing framework for command line applications.
6182Cram tests look like snippets of interactive shell sessions. Cram runs each
6183command and compares the command output in the test with the command’s actual
6184output.")
6185 (license license:gpl2+)))
6186
6187(define-public python2-cram
6188 (package-with-python2 python-cram))
6189
6190(define-public python-straight-plugin
6191 (package
6192 (name "python-straight-plugin")
6193 (version "1.4.1")
6194 (source
6195 (origin
6196 (method url-fetch)
6197 (uri (pypi-uri "straight.plugin" version))
6198 (sha256
6199 (base32
6200 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6201 (build-system python-build-system)
6202 (home-page "https://github.com/ironfroggy/straight.plugin")
6203 (synopsis "Simple namespaced plugin facility")
6204 (description "Straight Plugin provides a type of plugin you can create from
6205almost any existing Python modules, and an easy way for outside developers to
6206add functionality and customization to your projects with their own plugins.")
6207 (license license:expat)))
6208
6209(define-public python2-straight-plugin
6210 (package-with-python2 python-straight-plugin))
6211
6212(define-public python-fonttools
6213 (package
6214 (name "python-fonttools")
6215 (version "3.28.0")
6216 (source (origin
6217 (method url-fetch)
6218 (uri (pypi-uri "fonttools" version ".zip"))
6219 (sha256
6220 (base32
6221 "0vsvjhidpb5kywpjgz1j3fywzkddxkb0afqai18qa3h6lqjyxwpb"))))
6222 (build-system python-build-system)
6223 (native-inputs
6224 `(("unzip" ,unzip)
6225 ("python-pytest" ,python-pytest)
6226 ("python-pytest-runner" ,python-pytest-runner)))
6227 (home-page "https://github.com/behdad/fonttools")
6228 (synopsis "Tools to manipulate font files")
6229 (description
6230 "FontTools/TTX is a library to manipulate font files from Python. It
6231supports reading and writing of TrueType/OpenType fonts, reading and writing
6232of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6233also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6234from an XML-based format.")
6235 (license license:expat)))
6236
6237(define-public python2-fonttools
6238 (package-with-python2 python-fonttools))
6239
6240(define-public python-ly
6241 (package
6242 (name "python-ly")
6243 (version "0.9.5")
6244 (source
6245 (origin
6246 (method url-fetch)
6247 (uri (pypi-uri name version))
6248 (sha256
6249 (base32
6250 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
6251 (build-system python-build-system)
6252 (arguments
6253 ;; FIXME: Some tests need network access.
6254 '(#:tests? #f))
6255 (synopsis "Tool and library for manipulating LilyPond files")
6256 (description "This package provides a Python library to parse, manipulate
6257or create documents in LilyPond format. A command line program ly is also
6258provided that can be used to do various manipulations with LilyPond files.")
6259 (home-page "https://pypi.python.org/pypi/python-ly")
6260 (license license:gpl2+)))
6261
6262(define-public python-appdirs
6263 (package
6264 (name "python-appdirs")
6265 (version "1.4.3")
6266 (source
6267 (origin
6268 (method url-fetch)
6269 (uri (pypi-uri "appdirs" version))
6270 (sha256
6271 (base32
6272 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
6273 (build-system python-build-system)
6274 (home-page "https://github.com/ActiveState/appdirs")
6275 (synopsis
6276 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6277 (description
6278 "This module provides a portable way of finding out where user data
6279should be stored on various operating systems.")
6280 (license license:expat)))
6281
6282(define-public python2-appdirs
6283 (package-with-python2 python-appdirs))
6284
6285(define-public python-llfuse
6286 (package
6287 (name "python-llfuse")
6288 (version "1.3.5")
6289 (source (origin
6290 (method url-fetch)
6291 (uri (pypi-uri "llfuse" version ".tar.bz2"))
6292 (sha256
6293 (base32
6294 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
6295 (build-system python-build-system)
6296 (inputs
6297 `(("fuse" ,fuse)
6298 ("attr" ,attr)))
6299 (native-inputs
6300 `(("pkg-config" ,pkg-config)))
6301 (synopsis "Python bindings for FUSE")
6302 (description
6303 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6304 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
6305 (license license:lgpl2.0+)
6306 (properties `((python2-variant . ,(delay python2-llfuse))))))
6307
6308(define-public python2-llfuse
6309 (package (inherit (package-with-python2
6310 (strip-python2-variant python-llfuse)))
6311 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6312
6313;; For attic-0.16
6314(define-public python-llfuse-0.41
6315 (package (inherit python-llfuse)
6316 (version "0.41.1")
6317 (source (origin
6318 (method url-fetch)
6319 (uri (string-append
6320 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6321 "llfuse-" version ".tar.bz2"))
6322 (sha256
6323 (base32
6324 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
6325 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6326 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
6327 (license (list license:expat license:lgpl2.0+))))
6328
6329(define-public python-msgpack
6330 (package
6331 (name "python-msgpack")
6332 (version "0.5.6")
6333 (source (origin
6334 (method url-fetch)
6335 (uri (pypi-uri "msgpack" version))
6336 (sha256
6337 (base32
6338 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
6339 (build-system python-build-system)
6340 (arguments
6341 `(#:modules ((guix build utils)
6342 (guix build python-build-system)
6343 (ice-9 ftw)
6344 (srfi srfi-1)
6345 (srfi srfi-26))
6346 #:phases
6347 (modify-phases %standard-phases
6348 (replace 'check
6349 (lambda _
6350 (let ((cwd (getcwd)))
6351 (setenv "PYTHONPATH"
6352 (string-append cwd "/build/"
6353 (find (cut string-prefix? "lib" <>)
6354 (scandir (string-append cwd "/build")))
6355 ":"
6356 (getenv "PYTHONPATH")))
6357 (invoke "pytest" "-v" "test")))))))
6358 (native-inputs
6359 `(("python-pytest" ,python-pytest)))
6360 (synopsis "MessagePack (de)serializer")
6361 (description "MessagePack is a fast, compact binary serialization format,
6362suitable for similar data to JSON. This package provides CPython bindings for
6363reading and writing MessagePack data.")
6364 (home-page "https://pypi.python.org/pypi/msgpack/")
6365 (license license:asl2.0)))
6366
6367;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
6368;; release 0.5. Some packages like borg still call it by the old name for now.
6369;; <https://bugs.gnu.org/30662>
6370(define-public python-msgpack-transitional
6371 (package
6372 (inherit python-msgpack)
6373 (name "python-msgpack-transitional")
6374 (arguments
6375 (substitute-keyword-arguments (package-arguments python-msgpack)
6376 ((#:phases phases)
6377 `(modify-phases ,phases
6378 (add-after 'unpack 'configure-transitional
6379 (lambda _
6380 ;; Keep using the old name.
6381 (substitute* "setup.py"
6382 (("TRANSITIONAL = False")
6383 "TRANSITIONAL = 1"))
6384 #t))))))))
6385
6386(define-public python2-msgpack
6387 (package-with-python2 python-msgpack))
6388
6389(define-public python-netaddr
6390 (package
6391 (name "python-netaddr")
6392 (version "0.7.19")
6393 (source
6394 (origin
6395 (method url-fetch)
6396 (uri (pypi-uri "netaddr" version))
6397 (sha256
6398 (base32
6399 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
6400 (build-system python-build-system)
6401 (arguments `(#:tests? #f)) ;; No tests.
6402 (home-page "https://github.com/drkjam/netaddr/")
6403 (synopsis "Pythonic manipulation of network addresses")
6404 (description
6405 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6406and MAC network addresses.")
6407 (license license:bsd-3)))
6408
6409(define-public python2-netaddr
6410 (package-with-python2 python-netaddr))
6411
6412(define-public python-wrapt
6413 (package
6414 (name "python-wrapt")
dddd7a75 6415 (version "1.11.1")
44d10b1f
RW
6416 (source
6417 (origin
6418 (method url-fetch)
6419 (uri (pypi-uri "wrapt" version))
6420 (sha256
6421 (base32
dddd7a75 6422 "0cqmysny1pz01jw26q48q5zasvns6507rwhgm6wcw743f0r01sja"))))
44d10b1f
RW
6423 (build-system python-build-system)
6424 (arguments
6425 ;; Tests are not included in the tarball, they are only available in the
6426 ;; git repository.
6427 `(#:tests? #f))
6428 (home-page "https://github.com/GrahamDumpleton/wrapt")
6429 (synopsis "Module for decorators, wrappers and monkey patching")
6430 (description
6431 "The aim of the wrapt module is to provide a transparent object proxy for
6432 Python, which can be used as the basis for the construction of function
6433 wrappers and decorator functions.")
6434 (license license:bsd-2)))
6435
6436(define-public python2-wrapt
6437 (package-with-python2 python-wrapt))
6438
6439(define-public python-xlrd
6440 (package
6441 (name "python-xlrd")
6442 (version "1.0.0")
6443 (source (origin
6444 (method url-fetch)
6445 (uri (pypi-uri "xlrd" version))
6446 (sha256
6447 (base32
6448 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
6449 (build-system python-build-system)
6450 (arguments
6451 `(#:phases
6452 (modify-phases %standard-phases
6453 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
6454 ;; run tests instead for now.
45fd0081 6455 (replace 'check (lambda _ (invoke "nosetests"))))))
44d10b1f
RW
6456 (native-inputs `(("python-nose" ,python-nose)))
6457 (home-page "http://www.python-excel.org/")
6458 (synopsis "Library for extracting data from Excel files")
6459 (description "This packages provides a library to extract data from
6460spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
6461@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
6462Unicode-aware. It is not intended as an end-user tool.")
6463 (license license:bsd-3)))
6464
6465(define-public python2-xlrd
6466 (package-with-python2 python-xlrd))
6467
6468(define-public python-prettytable
6469 (package
6470 (name "python-prettytable")
6471 (version "0.7.2")
6472 (source
6473 (origin
6474 (method url-fetch)
337c3a1e 6475 (uri (pypi-uri "prettytable" version ".tar.bz2"))
44d10b1f
RW
6476 (sha256
6477 (base32
6478 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
6479 (build-system python-build-system)
6480 (home-page "http://code.google.com/p/prettytable/")
6481 (synopsis "Display tabular data in an ASCII table format")
6482 (description
6483 "A library designed to represent tabular data in visually appealing ASCII
6484tables. PrettyTable allows for selection of which columns are to be printed,
6485independent alignment of columns (left or right justified or centred) and
6486printing of sub-tables by specifying a row range.")
6487 (license license:bsd-3)))
6488
6489(define-public python2-prettytable
6490 (package-with-python2 python-prettytable))
6491
6492(define-public python-tables
6493 (package
6494 (name "python-tables")
6495 (version "3.4.4")
6496 (source
6497 (origin
6498 (method url-fetch)
6499 (uri (pypi-uri "tables" version))
6500 (sha256
6501 (base32
6502 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
6503 (modules '((guix build utils)))
6504 (snippet
6505 '(begin
6506 ;; Remove pre-compiled .pyc files from source.
6507 (for-each delete-file-recursively
6508 (find-files "." "__pycache__" #:directories? #t))
6509 (for-each delete-file (find-files "." "\\.pyc$"))
6510 #t))))
6511 (build-system python-build-system)
6512 (arguments
6513 `(;; FIXME: python-build-system does not pass configure-flags to "build"
6514 ;; or "check", so we must override the build and check phases.
6515 #:phases
6516 (modify-phases %standard-phases
6517 (add-after 'unpack 'use-gcc
6518 (lambda _
6519 (substitute* "setup.py"
6520 (("compiler = new_compiler\\(\\)" line)
6521 (string-append line
6522 "\ncompiler.set_executables(compiler='gcc',"
6523 "compiler_so='gcc',"
6524 "linker_exe='gcc',"
6525 "linker_so='gcc -shared')")))
6526 #t))
6527 (replace 'build
6528 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
6529 (invoke "python" "setup.py" "build"
6530 (string-append "--hdf5="
6531 (assoc-ref inputs "hdf5")))))
44d10b1f
RW
6532 (replace 'check
6533 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
6534 (invoke "python" "setup.py" "check"
6535 (string-append "--hdf5="
6536 (assoc-ref inputs "hdf5"))))))))
44d10b1f
RW
6537 (propagated-inputs
6538 `(("python-numexpr" ,python-numexpr)
6539 ("python-numpy" ,python-numpy)))
6540 (native-inputs
6541 `(("python-cython" ,python-cython)
6542 ("pkg-config" ,pkg-config)))
6543 (inputs
6544 `(("hdf5" ,hdf5)
6545 ("bzip2" ,bzip2)
6546 ("zlib" ,zlib)))
6547 (home-page "http://www.pytables.org/")
6548 (synopsis "Hierarchical datasets for Python")
6549 (description "PyTables is a package for managing hierarchical datasets and
6550designed to efficiently cope with extremely large amounts of data.")
6551 (license license:bsd-3)))
6552
6553(define-public python2-tables
6554 (package-with-python2 python-tables))
6555
6556(define-public python-pyasn1
6557 (package
6558 (name "python-pyasn1")
6559 (version "0.4.3")
6560 (source
6561 (origin
6562 (method url-fetch)
6563 (uri (pypi-uri "pyasn1" version))
6564 (sha256
6565 (base32
6566 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
6567 (build-system python-build-system)
6568 (home-page "http://pyasn1.sourceforge.net/")
6569 (synopsis "ASN.1 types and codecs")
6570 (description
6571 "This is an implementation of ASN.1 types and codecs in Python. It is
6572suitable for a wide range of protocols based on the ASN.1 specification.")
6573 (license license:bsd-2)))
6574
6575(define-public python2-pyasn1
6576 (package-with-python2 python-pyasn1))
6577
6578(define-public python-pyasn1-modules
6579 (package
6580 (name "python-pyasn1-modules")
6581 (version "0.2.2")
6582 (source
6583 (origin
6584 (method url-fetch)
6585 (uri (pypi-uri "pyasn1-modules" version))
6586 (sha256
6587 (base32
6588 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
6589 (build-system python-build-system)
6590 (propagated-inputs
6591 `(("python-pyasn1" ,python-pyasn1)))
6592 (home-page "https://sourceforge.net/projects/pyasn1/")
6593 (synopsis "ASN.1 codec implementations")
6594 (description
6595 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
6596implementations of ASN.1-based codecs and protocols.")
6597 (license license:bsd-3)))
6598
6599(define-public python2-pyasn1-modules
6600 (package-with-python2 python-pyasn1-modules))
6601
6602(define-public python-ipaddress
6603 (package
6604 (name "python-ipaddress")
6605 (version "1.0.22")
6606 (source (origin
6607 (method url-fetch)
6608 (uri (pypi-uri "ipaddress" version))
6609 (sha256
6610 (base32
6611 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
6612 (build-system python-build-system)
6613 (home-page "https://github.com/phihag/ipaddress")
6614 (synopsis "IP address manipulation library")
6615 (description
6616 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
6617 in Python. This library is used to create, poke at, and manipulate IPv4 and
6618 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
6619 module to older versions of Python.")
6620 (license license:psfl)))
6621
6622(define-public python2-ipaddress
6623 (package-with-python2 python-ipaddress))
6624
6625(define-public python2-ipaddr
6626 (package
6627 (name "python2-ipaddr")
6628 (version "2.1.11")
6629 (source
6630 (origin
6631 (method url-fetch)
6632 (uri (pypi-uri "ipaddr" version))
6633 (sha256
6634 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
6635 (build-system python-build-system)
6636 (arguments
6637 `(#:python ,python-2 ;version 2 only
6638 #:phases
6639 (modify-phases %standard-phases
6640 (replace 'check
40b8c4e3 6641 (lambda _ (invoke "python" "ipaddr_test.py"))))))
44d10b1f
RW
6642 (home-page "https://github.com/google/ipaddr-py")
6643 (synopsis "IP address manipulation library")
6644 (description
6645 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
6646IPv6 addresses and networks.
6647
6648For new implementations you may prefer to use the standard module
6649@code{ipaddress}, which was introduced in Python 3.3 and backported to older
6650versions of Python.")
6651 (license license:asl2.0)))
6652
6653(define-public python-idna
6654 (package
6655 (name "python-idna")
6656 (version "2.7")
6657 (source
6658 (origin
6659 (method url-fetch)
6660 (uri (pypi-uri "idna" version))
6661 (sha256
6662 (base32
6663 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))
6664 (build-system python-build-system)
6665 (home-page "https://github.com/kjd/idna")
6666 (synopsis "Internationalized domain names in applications")
6667 (description
6668 "This is a library to support the Internationalised Domain Names in
6669Applications (IDNA) protocol as specified in RFC 5891. This version of the
6670protocol is often referred to as “IDNA2008” and can produce different results
6671from the earlier standard from 2003. The library is also intended to act as a
6672suitable drop-in replacement for the “encodings.idna” module that comes with
6673the Python standard library but currently only supports the older 2003
6674specification.")
6675 (license license:bsd-4)))
6676
6677(define-public python2-idna
6678 (package-with-python2 python-idna))
6679
6680(define-public python-idna-ssl
6681 (package
6682 (name "python-idna-ssl")
6683 (version "1.0.1")
6684 (source
6685 (origin
6686 (method url-fetch)
6687 (uri (pypi-uri "idna-ssl" version))
6688 (sha256
6689 (base32
6690 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
6691 (build-system python-build-system)
6692 (arguments
6693 `(#:tests? #f)) ;circular dependency with python-aiohttp
6694 (home-page "https://github.com/aio-libs/idna-ssl")
6695 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
6696 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
6697domains support.")
6698 (license license:expat)))
6699
6700(define-public python-pretend
6701 (package
6702 (name "python-pretend")
6703 (version "1.0.9")
6704 (source
6705 (origin
6706 (method url-fetch)
9f1f22ee 6707 (uri (pypi-uri "pretend" version))
44d10b1f
RW
6708 (sha256
6709 (base32
6710 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
6711 (build-system python-build-system)
6712 (home-page "https://github.com/alex/pretend")
6713 (synopsis "Library for stubbing in Python")
6714 (description
6715 "Pretend is a library to make stubbing with Python easier. Stubbing is a
6716technique for writing tests. You may hear the term mixed up with mocks,
6717fakes, or doubles. Basically, a stub is an object that returns pre-canned
6718responses, rather than doing any computation.")
6719 (license license:bsd-3)))
6720
6721(define-public python2-pretend
6722 (package-with-python2 python-pretend))
6723
6724(define-public python-pip
6725 (package
6726 (name "python-pip")
6727 (version "18.1")
6728 (source
6729 (origin
6730 (method url-fetch)
6731 (uri (pypi-uri "pip" version))
6732 (sha256
6733 (base32
6734 "188fclay154s520n43s7cxxlhdaiysvxf19zk8vr1xbyjyyr58n0"))))
6735 (build-system python-build-system)
6736 (arguments
6737 '(#:tests? #f)) ; there are no tests in the pypi archive.
6738 (home-page "https://pip.pypa.io/")
6739 (synopsis "Package manager for Python software")
6740 (description
6741 "Pip is a package manager for Python software, that finds packages on the
6742Python Package Index (PyPI).")
6743 (license license:expat)))
6744
6745(define-public python2-pip
6746 (package-with-python2 python-pip))
6747
6748(define-public python-tlsh
6749 (package
6750 (name "python-tlsh")
6751 (version "3.4.5")
6752 (home-page "https://github.com/trendmicro/tlsh")
6753 (source (origin
6754 (method url-fetch)
6755 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
6756 version ".tar.gz"))
6757 (sha256
6758 (base32
6759 "1x1vahd4zg5kpyr9h9hs3fvh460p25rjy4cclwdnbbw8x3vc30q3"))
6760 (file-name (string-append name "-" version ".tar.gz"))))
6761 (build-system cmake-build-system)
6762 (arguments
6763 '(#:out-of-source? #f
6764 #:phases (modify-phases %standard-phases
6765 (replace
6766 'install
6767 (lambda* (#:key outputs #:allow-other-keys)
6768 ;; Build and install the Python bindings. The underlying
6769 ;; C++ library is apparently not meant to be installed.
6770 (let ((out (assoc-ref outputs "out")))
6771 (with-directory-excursion "py_ext"
6772 (and (system* "python" "setup.py" "build")
6773 (system* "python" "setup.py" "install"
6774 (string-append "--prefix=" out))))))))))
6775 (inputs `(("python" ,python-wrapper))) ;for the bindings
6776 (synopsis "Fuzzy matching library for Python")
6777 (description
6778 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
6779Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
6780value which can be used for similarity comparisons. Similar objects have
6781similar hash values, which allows for the detection of similar objects by
6782comparing their hash values. The byte stream should have a sufficient amount
6783of complexity; for example, a byte stream of identical bytes will not generate
6784a hash value.")
6785 (license license:asl2.0)))
6786
6787(define-public python2-tlsh
6788 (package
6789 (inherit python-tlsh)
6790 (name "python2-tlsh")
6791 (inputs `(("python" ,python-2)))))
6792
6793(define-public python-termcolor
6794 (package
6795 (name "python-termcolor")
6796 (version "1.1.0")
6797 (source
6798 (origin
6799 (method url-fetch)
6800 (uri (pypi-uri "termcolor" version))
6801 (sha256
6802 (base32
6803 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
6804 (build-system python-build-system)
6805 (arguments
6806 ;; There are no tests.
6807 `(#:tests? #f))
6808 (home-page "https://pypi.python.org/pypi/termcolor")
6809 (synopsis "ANSII Color formatting for terminal output")
6810 (description
6811 "This package provides ANSII Color formatting for output in terminals.")
6812 (license license:expat)))
6813
6814(define-public python2-termcolor
6815 (package-with-python2 python-termcolor))
6816
6817(define-public python-libarchive-c
6818 (package
6819 (name "python-libarchive-c")
6820 (version "2.8")
6821 (source (origin
6822 (method url-fetch)
6823 (uri (pypi-uri "libarchive-c" version))
6824 (sha256
6825 (base32
6826 "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06"))))
6827 (build-system python-build-system)
6828 (arguments
6829 '(#:phases (modify-phases %standard-phases
6830 (add-before
6831 'build 'reference-libarchive
6832 (lambda* (#:key inputs #:allow-other-keys)
6833 ;; Retain the absolute file name of libarchive.so.
6834 (let ((libarchive (assoc-ref inputs "libarchive")))
6835 (substitute* "libarchive/ffi.py"
6836 (("find_library\\('archive'\\)")
6837 (string-append "'" libarchive
6838 "/lib/libarchive.so'"))))))
6839 (replace 'check
6840 (lambda _ (invoke "pytest" "-vv"))))))
6841 (native-inputs
6842 `(("python-mock" ,python-mock)
6843 ("python-pytest" ,python-pytest)))
6844 (inputs
6845 `(("libarchive" ,libarchive)))
6846 (home-page "https://github.com/Changaco/python-libarchive-c")
6847 (synopsis "Python interface to libarchive")
6848 (description
6849 "This package provides Python bindings to libarchive, a C library to
6850access possibly compressed archives in many different formats. It uses
6851Python's @code{ctypes} foreign function interface (FFI).")
6852 (license license:lgpl2.0+)))
6853
6854(define-public python2-libarchive-c
6855 (package-with-python2 python-libarchive-c))
6856
6857(define-public python-file
6858 (package
6859 (inherit file)
6860 (name "python-file")
6861 (build-system python-build-system)
6862 (arguments
6863 '(#:tests? #f ;no tests
6864 #:configure-flags '("--single-version-externally-managed" "--root=/")
6865 #:phases (modify-phases %standard-phases
6866 (add-before 'build 'change-directory
6867 (lambda _
6868 (chdir "python")
6869 #t))
6870 (add-before 'build 'set-library-file-name
6871 (lambda* (#:key inputs #:allow-other-keys)
6872 (let ((file (assoc-ref inputs "file")))
6873 (substitute* "magic.py"
6874 (("find_library\\('magic'\\)")
6875 (string-append "'" file "/lib/libmagic.so'")))
6876 #t))))))
6877 (inputs `(("file" ,file)))
6878 (self-native-input? #f)
6879 (synopsis "Python bindings to the libmagic file type guesser. Note that
6880this module and the python-magic module both provide a \"magic.py\" file;
6881these two modules, which are different and were developed separately, both
6882serve the same purpose: provide Python bindings for libmagic.")))
6883
6884(define-public python2-file
6885 (package-with-python2 python-file))
6886
6887(define-public python-debian
6888 (package
6889 (name "python-debian")
6890 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
6891 (version "0.1.28")
6892 (source
6893 (origin
6894 (method url-fetch)
6895 (uri (pypi-uri name version))
6896 (sha256
6897 (base32
6898 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
6899 (build-system python-build-system)
6900 (propagated-inputs
6901 `(("python-six" ,python-six)))
6902 (synopsis "Debian package related modules")
6903 (description
6904 ;; XXX: Use @enumerate instead of @itemize to work around
6905 ;; <http://bugs.gnu.org/21772>.
6906 "This package provides Python modules that abstract many formats of
6907Debian-related files, such as:
6908
6909@enumerate
6910@item Debtags information;
6911@item @file{debian/changelog} files;
6912@item packages files, pdiffs;
6913@item control files of single or multiple RFC822-style paragraphs---e.g.
6914 @file{debian/control}, @file{.changes}, @file{.dsc};
6915@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
6916 contained files and meta-information.
6917@end enumerate\n")
6918
6919 ;; Modules are either GPLv2+ or GPLv3+.
6920 (license license:gpl3+)))
6921
6922(define-public python2-debian
6923 (package-with-python2 python-debian))
6924
6925(define-public python-nbformat
6926 (package
6927 (name "python-nbformat")
6928 (version "4.4.0")
6929 (source
6930 (origin
6931 (method url-fetch)
6932 (uri (pypi-uri "nbformat" version))
6933 (sha256
6934 (base32
6935 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
6936 (build-system python-build-system)
6937 (arguments `(#:tests? #f)) ; no test target
6938 (propagated-inputs
6939 `(("python-ipython-genutils" ,python-ipython-genutils)
6940 ("python-jsonschema" ,python-jsonschema)
6941 ("python-jupyter-core" ,python-jupyter-core)
6942 ("python-traitlets" ,python-traitlets)))
6943 (home-page "http://jupyter.org")
6944 (synopsis "Jupyter Notebook format")
6945 (description "This package provides the reference implementation of the
6946Jupyter Notebook format and Python APIs for working with notebooks.")
6947 (license license:bsd-3)))
6948
6949(define-public python2-nbformat
6950 (package-with-python2 python-nbformat))
6951
6952(define-public python-bleach
6953 (package
6954 (name "python-bleach")
6955 (version "1.4.3")
6956 (source
6957 (origin
6958 (method url-fetch)
6959 (uri (pypi-uri "bleach" version))
6960 (sha256
6961 (base32
6962 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
6963 (build-system python-build-system)
6964 (propagated-inputs
6965 `(("python-html5lib" ,python-html5lib-0.9)
6966 ("python-six" ,python-six)))
6967 (native-inputs
6968 `(("python-nose" ,python-nose)))
6969 (home-page "https://github.com/jsocol/bleach")
6970 (synopsis "Whitelist-based HTML-sanitizing tool")
6971 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
6972 (license license:asl2.0)))
6973
6974(define-public python2-bleach
6975 (package-with-python2 python-bleach))
6976
6977(define-public python-entrypoints
6978 (package
6979 (name "python-entrypoints")
a7f1b718 6980 (version "0.3")
44d10b1f
RW
6981 (source
6982 (origin
6983 (method url-fetch)
a7f1b718 6984 (uri (pypi-uri "entrypoints" version))
44d10b1f
RW
6985 (sha256
6986 (base32
a7f1b718 6987 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
44d10b1f
RW
6988 (build-system python-build-system)
6989 ;; The package does not come with a setup.py file, so we have to generate
6990 ;; one ourselves.
6991 (arguments
6992 `(#:tests? #f
6993 #:phases
6994 (modify-phases %standard-phases
6995 (add-after 'unpack 'create-setup.py
6996 (lambda _
6997 (call-with-output-file "setup.py"
6998 (lambda (port)
6999 (format port "\
7000from setuptools import setup
7001setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7002" ,version))))))))
7003 (home-page "https://github.com/takluyver/entrypoints")
7004 (synopsis "Discover and load entry points from installed Python packages")
7005 (description "Entry points are a way for Python packages to advertise
7006objects with some common interface. The most common examples are
7007@code{console_scripts} entry points, which define shell commands by
7008identifying a Python function to run. The @code{entrypoints} module contains
7009functions to find and load entry points.")
7010 (license license:expat)))
7011
7012(define-public python2-entrypoints
7013 (package-with-python2 python-entrypoints))
7014
7015(define-public python-nbconvert
7016 (package
7017 (name "python-nbconvert")
7018 (version "5.0.0b1")
7019 (source
7020 (origin
7021 (method url-fetch)
7022 (uri (pypi-uri "nbconvert" version))
7023 (sha256
7024 (base32
7025 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7026 (build-system python-build-system)
7027 (arguments
7028 `(;; The "bdist_egg" target is disabled by default, causing the installation
7029 ;; to fail.
7030 #:configure-flags (list "bdist_egg")
7031 ;; FIXME: 5 failures, 40 errors.
7032 #:tests? #f))
7033 ;; #:phases
7034 ;; (modify-phases %standard-phases
7035 ;; (replace 'check
7036 ;; (lambda _
7037 ;; (zero? (system* "py.test" "-v")))))
7038 (native-inputs
7039 `(("python-pytest" ,python-pytest)))
7040 (propagated-inputs
7041 `(("python-bleach" ,python-bleach)
7042 ("python-entrypoints" ,python-entrypoints)
7043 ("python-jinja2" ,python-jinja2)
7044 ("python-jupyter-core" ,python-jupyter-core)
7045 ("python-mistune" ,python-mistune)
7046 ("python-nbformat" ,python-nbformat)
7047 ("python-pygments" ,python-pygments)
7048 ("python-traitlets" ,python-traitlets)))
7049 (home-page "http://jupyter.org")
7050 (synopsis "Converting Jupyter Notebooks")
7051 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7052notebooks to various other formats via Jinja templates. It allows you to
7053convert an @code{.ipynb} notebook file into various static formats including:
7054
7055@enumerate
7056@item HTML
7057@item LaTeX
7058@item PDF
7059@item Reveal JS
7060@item Markdown (md)
7061@item ReStructured Text (rst)
7062@item executable script
7063@end enumerate\n")
7064 (license license:bsd-3)))
7065
7066(define-public python2-nbconvert
7067 (package-with-python2 python-nbconvert))
7068
44d10b1f
RW
7069(define-public python-notebook
7070 (package
7071 (name "python-notebook")
7072 (version "5.7.4")
7073 (source (origin
7074 (method url-fetch)
7075 (uri (pypi-uri "notebook" version))
7076 (sha256
7077 (base32
7078 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
7079 (build-system python-build-system)
7080 (arguments
7081 `(#:phases
7082 (modify-phases %standard-phases
7083 (replace 'check
7084 (lambda _
7085 ;; These tests require a browser
7086 (delete-file-recursively "notebook/tests/selenium")
7087 ;; Some tests need HOME
7088 (setenv "HOME" "/tmp")
7089 ;; This file contains "warningfilters", which are not supported
7090 ;; by this version of nose.
7091 (delete-file "setup.cfg")
7092 (with-directory-excursion "/tmp"
7093 (invoke "nosetests" "-v"))
7094 #t)))))
7095 (propagated-inputs
7096 `(("python-jupyter-core" ,python-jupyter-core)
7097 ("python-nbformat" ,python-nbformat)
7098 ("python-nbconvert" ,python-nbconvert)
7099 ("python-prometheus-client" ,python-prometheus-client)
7100 ("python-send2trash" ,python-send2trash)
7101 ("python-terminado" ,python-terminado)))
7102 (native-inputs
7103 `(("python-nose" ,python-nose)
7104 ("python-sphinx" ,python-sphinx)
7105 ("python-requests" ,python-requests)))
7106 (home-page "http://jupyter.org/")
7107 (synopsis "Web-based notebook environment for interactive computing")
7108 (description
7109 "The Jupyter HTML notebook is a web-based notebook environment for
7110interactive computing.")
7111 (properties `((python2-variant . ,(delay python2-notebook))))
7112 (license license:bsd-3)))
7113
7114(define-public python2-notebook
7115 (let ((base (package-with-python2
7116 (strip-python2-variant python-notebook))))
7117 (package (inherit base)
7118 (native-inputs
7119 `(("python2-mock" ,python2-mock)
7120 ,@(package-native-inputs base)))
7121 (arguments
7122 (substitute-keyword-arguments (package-arguments base)
7123 ((#:phases phases)
7124 `(modify-phases ,phases
7125 (add-before 'check 'disable-test-case
7126 ;; The test requires network access to localhost. Curiously it
7127 ;; fails with Python 2 only. Simply make the test-case return
7128 ;; immediately.
7129 (lambda _
7130 (substitute*
7131 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7132 (("formats = self.nbconvert_api") "return #")))))))))))
7133
7134(define-public python-widgetsnbextension
7135 (package
7136 (name "python-widgetsnbextension")
7137 (version "3.4.2")
7138 (source
7139 (origin
7140 (method url-fetch)
7141 (uri (pypi-uri "widgetsnbextension" version))
7142 (sha256
7143 (base32
7144 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
7145 (build-system python-build-system)
7146 (propagated-inputs
7147 `(("python-ipykernel" ,python-ipykernel)
7148 ("python-notebook" ,python-notebook)))
7149 (native-inputs
7150 `(("python-certifi" ,python-certifi)
7151 ("python-nose" ,python-nose)))
7152 (home-page "https://ipython.org")
7153 (synopsis "IPython HTML widgets for Jupyter")
7154 (description "This package provides interactive HTML widgets for Jupyter
7155notebooks.")
7156 (license license:bsd-3)))
7157
7158(define-public python2-widgetsnbextension
7159 (package-with-python2 python-widgetsnbextension))
7160
7161(define-public python-ipywidgets
7162 (package
7163 (name "python-ipywidgets")
7164 (version "5.2.2")
7165 (source
7166 (origin
7167 (method url-fetch)
7168 (uri (pypi-uri "ipywidgets" version))
7169 (sha256
7170 (base32
7171 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7172 (build-system python-build-system)
7173 (propagated-inputs
7174 `(("python-ipython" ,python-ipython)
7175 ("python-traitlets" ,python-traitlets)
7176 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7177 (native-inputs
7178 `(("python-nose" ,python-nose)
7179 ("python-pytest" ,python-pytest)))
7180 (home-page "https://ipython.org")
7181 (synopsis "IPython HTML widgets for Jupyter")
7182 (description "Ipywidgets are interactive HTML widgets for Jupyter
7183notebooks and the IPython kernel. Notebooks come alive when interactive
7184widgets are used. Users gain control of their data and can visualize changes
7185in the data.")
7186 (license license:bsd-3)))
7187
7188(define-public python2-ipywidgets
7189 (package-with-python2 python-ipywidgets))
7190
7191(define-public python-jupyter-console
7192 (package
7193 (name "python-jupyter-console")
7194 (version "5.2.0")
7195 (source
7196 (origin
7197 (method url-fetch)
7198 (uri (pypi-uri "jupyter_console" version))
7199 (sha256
7200 (base32
7201 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
7202 (build-system python-build-system)
7203 ;; Tests only run in an TTY.
7204 (arguments `(#:tests? #f))
7205 (propagated-inputs
7206 `(("python-ipykernel" ,python-ipykernel)
7207 ("python-jupyter-client" ,python-jupyter-client)
7208 ("python-prompt-toolkit" ,python-prompt-toolkit-1)
7209 ("python-pygments" ,python-pygments)))
7210 (native-inputs
7211 `(("python-nose" ,python-nose)))
7212 (home-page "https://jupyter.org")
7213 (synopsis "Jupyter terminal console")
7214 (description "This package provides a terminal-based console frontend for
7215Jupyter kernels. It also allows for console-based interaction with non-Python
7216Jupyter kernels such as IJulia and IRKernel.")
7217 (license license:bsd-3)))
7218
7219(define-public python2-jupyter-console
7220 (package-with-python2 python-jupyter-console))
7221
7222;; The python-ipython and python-jupyter-console require each other. To get
7223;; the functionality in both packages working, strip down the
7224;; python-jupyter-console package when using it as an input to python-ipython.
7225(define python-jupyter-console-minimal
7226 (package
7227 (inherit python-jupyter-console)
7228 (name "python-jupyter-console-minimal")
7229 (arguments
7230 (substitute-keyword-arguments
7231 (package-arguments python-jupyter-console)
7232 ((#:phases phases)
7233 `(modify-phases ,phases
7234 (add-after 'install 'delete-bin
7235 (lambda* (#:key outputs #:allow-other-keys)
7236 ;; Delete the bin files, to avoid conflicts in profiles
7237 ;; where python-ipython and python-jupyter-console are
7238 ;; both present.
7239 (delete-file-recursively
7240 (string-append
7241 (assoc-ref outputs "out") "/bin"))))))))
7242 ;; Remove the python-ipython propagated input, to avoid the cycle
7243 (propagated-inputs
7244 (alist-delete
7245 "python-ipython"
7246 (package-propagated-inputs python-jupyter-console)))))
7247
7248(define-public python-qtconsole
7249 (package
7250 (name "python-qtconsole")
7251 (version "4.4.3")
7252 (source
7253 (origin
7254 (method url-fetch)
7255 (uri (pypi-uri "qtconsole" version))
7256 (sha256
7257 (base32
7258 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
7259 (build-system python-build-system)
7260 (arguments
7261 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
7262 ;; but we only have the LTS version 5.x. This means that there might be
7263 ;; runtime errors, but since this is a dependency of the Jupyter package,
7264 ;; and Jupyter can be used without the qtconsole we can overlook this for
7265 ;; now.
7266 `(#:tests? #f
7267 #:phases
7268 (modify-phases %standard-phases
7269 (add-before 'check 'pre-check
7270 (lambda _
7271 (setenv "QT_QPA_PLATFORM" "offscreen")
7272 #t)))))
7273 (propagated-inputs
7274 `(("python-ipykernel" ,python-ipykernel)
7275 ("python-ipython" ,python-ipython)))
7276 (native-inputs
7277 `(("python-pytest" ,python-pytest)))
7278 (home-page "http://jupyter.org")
7279 (synopsis "Jupyter Qt console")
7280 (description "This package provides a Qt-based console for Jupyter with
7281support for rich media output.")
7282 (license license:bsd-3)))
7283
7284(define-public jupyter
7285 (package
7286 (name "jupyter")
7287 (version "1.0.0")
7288 (source
7289 (origin
7290 (method url-fetch)
7291 (uri (pypi-uri "jupyter" version))
7292 (sha256
7293 (base32
7294 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
7295 (build-system python-build-system)
7296 (arguments '(#:tests? #f)) ; there are none.
7297 (propagated-inputs
7298 `(("python-ipykernel" ,python-ipykernel)
7299 ("python-ipywidgets" ,python-ipywidgets)
7300 ("python-jupyter-console" ,python-jupyter-console)
7301 ("python-nbconvert" ,python-nbconvert)
7302 ("python-notebook" ,python-notebook)
7303 ("python-qtconsole" ,python-qtconsole)))
7304 (native-search-paths
7305 (list (search-path-specification
7306 (variable "JUPYTER_PATH")
7307 (files '("share/jupyter")))))
7308 (home-page "https://jupyter.org")
7309 (synopsis "Web application for interactive documents")
7310 (description
7311 "The Jupyter Notebook is a web application that allows you to create and
7312share documents that contain live code, equations, visualizations and
7313explanatory text. Uses include: data cleaning and transformation, numerical
7314simulation, statistical modeling, machine learning and much more.")
7315 (license license:bsd-3)))
7316
7317(define-public python-chardet
7318 (package
7319 (name "python-chardet")
7320 (version "3.0.4")
7321 (source
7322 (origin
7323 (method url-fetch)
7324 (uri (pypi-uri "chardet" version))
7325 (sha256
7326 (base32
7327 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
7328 (native-inputs
7329 `(("python-hypothesis" ,python-hypothesis)
7330 ("python-pytest" ,python-pytest)
7331 ("python-pytest-runner" ,python-pytest-runner)))
7332 (build-system python-build-system)
7333 (home-page "https://github.com/chardet/chardet")
7334 (synopsis "Universal encoding detector for Python 2 and 3")
7335 (description
7336 "This package provides @code{chardet}, a Python module that can
7337automatically detect a wide range of file encodings.")
7338 (license license:lgpl2.1+)))
7339
7340(define-public python2-chardet
7341 (package-with-python2 python-chardet))
7342
7343(define-public python-docopt
7344 (package
7345 (name "python-docopt")
7346 (version "0.6.2")
7347 (source
7348 (origin
7349 (method url-fetch)
7350 ;; The release on PyPI does not include tests.
7351 (uri (string-append
7352 "https://github.com/docopt/docopt/archive/"
7353 version ".tar.gz"))
7354 (file-name (string-append name "-" version ".tar.gz"))
7355 (sha256
7356 (base32
7357 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
7358 (build-system python-build-system)
7359 (native-inputs
7360 `(("python-pytest" ,python-pytest)))
7361 (arguments
7362 `(#:phases
7363 (modify-phases %standard-phases
7364 (replace 'check
7365 (lambda _ (invoke "py.test"))))))
7366 (home-page "http://docopt.org")
7367 (synopsis "Command-line interface description language for Python")
7368 (description "This library allows the user to define a command-line
7369interface from a program's help message rather than specifying it
7370programatically with command-line parsers like @code{getopt} and
7371@code{argparse}.")
7372 (license license:expat)))
7373
7374(define-public python2-docopt
7375 (package-with-python2 python-docopt))
7376
7377(define-public python-pythondialog
7378 (package
7379 (name "python-pythondialog")
7380 (version "3.4.0")
7381 (source
7382 (origin
7383 (method url-fetch)
7384 (uri (pypi-uri "pythondialog" version))
7385 (sha256
7386 (base32
7387 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
7388 (build-system python-build-system)
7389 (arguments
7390 `(#:phases
7391 (modify-phases %standard-phases
7392 (add-after 'unpack 'patch-path
7393 (lambda* (#:key inputs #:allow-other-keys)
7394 (let* ((dialog (assoc-ref inputs "dialog")))
7395 ;; Since this library really wants to grovel the search path, we
7396 ;; must hardcode dialog's store path into it.
7397 (substitute* "dialog.py"
7398 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
7399 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
7400 #t))))
7401 #:tests? #f)) ; no test suite
7402 (propagated-inputs
7403 `(("dialog" ,dialog)))
7404 (home-page "http://pythondialog.sourceforge.net/")
7405 (synopsis "Python interface to the UNIX dialog utility")
7406 (description "A Python wrapper for the dialog utility. Its purpose is to
7407provide an easy to use, pythonic and comprehensive Python interface to dialog.
7408This allows one to make simple text-mode user interfaces on Unix-like systems")
7409 (license license:lgpl2.1)
7410 (properties `((python2-variant . ,(delay python2-pythondialog))))))
7411
7412(define-public python2-pythondialog
7413 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
7414 (package
7415 (inherit base)
7416 (version (package-version python-pythondialog))
7417 (source (origin
7418 (method url-fetch)
7419 (uri (pypi-uri "python2-pythondialog" version))
7420 (sha256
7421 (base32
7422 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
7423
7424(define-public python-configobj
7425 (package
7426 (name "python-configobj")
7427 (version "5.0.6")
7428 (source (origin
7429 (method url-fetch)
b0758fbb 7430 (uri (pypi-uri "configobj" version))
44d10b1f
RW
7431 (sha256
7432 (base32
7433 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
7434 ;; Patch setup.py so it looks for python-setuptools, which is
7435 ;; required to parse the keyword 'install_requires' in setup.py.
7436 (patches (search-patches "python-configobj-setuptools.patch"))))
7437 (build-system python-build-system)
7438 (propagated-inputs
7439 `(("python-six" ,python-six)))
7440 (synopsis "Config file reading, writing and validation")
7441 (description "ConfigObj is a simple but powerful config file reader and
7442writer: an ini file round tripper. Its main feature is that it is very easy to
7443use, with a straightforward programmer’s interface and a simple syntax for
7444config files.")
7445 (home-page "https://github.com/DiffSK/configobj")
7446 (license license:bsd-3)))
7447
7448(define-public python2-configobj
7449 (package-with-python2 python-configobj))
7450
7451(define-public python-configargparse
7452 (package
7453 (name "python-configargparse")
86ae491f 7454 (version "0.14.0")
44d10b1f
RW
7455 (source (origin
7456 (method url-fetch)
7457 (uri (pypi-uri "ConfigArgParse" version))
7458 (sha256
7459 (base32
86ae491f 7460 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
44d10b1f
RW
7461 (build-system python-build-system)
7462 (native-inputs
7463 `(("python-pyyaml" ,python-pyyaml)))
7464 (arguments
7465 `(#:phases
7466 (modify-phases %standard-phases
7467 (replace 'check
7468 (lambda _
7469 ;; Bypass setuptools-shim because one test relies on "setup.py"
7470 ;; being the first argument passed to the python call.
7471 ;;
7472 ;; NOTE: Many tests do not run because they rely on Python's
7473 ;; built-in test.test_argparse, but we remove the unit tests from
7474 ;; our Python installation.
7475 (invoke "python" "setup.py" "test"))))))
7476 (synopsis "Replacement for argparse")
7477 (description "A drop-in replacement for argparse that allows options to also
7478be set via config files and/or environment variables.")
7479 (home-page "https://github.com/bw2/ConfigArgParse")
7480 (license license:expat)))
7481
7482(define-public python2-configargparse
7483 (package-with-python2 python-configargparse))
7484
7485(define-public python-argparse-manpage
7486 (package
7487 (name "python-argparse-manpage")
7488 (version "1.1")
7489 (source
7490 (origin
7491 (method url-fetch)
7492 (uri (pypi-uri "argparse-manpage" version))
7493 (sha256
7494 (base32
7495 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
7496 (build-system python-build-system)
7497 (home-page "https://github.com/praiskup/argparse-manpage")
7498 (synopsis "Build manual page from Python's ArgumentParser object")
7499 (description
7500 "This package provides tools to build manual pages from Python's
7501@code{ArgumentParser} object.")
7502 (license license:asl2.0)))
7503
7504(define-public python2-contextlib2
7505 (package
7506 (name "python2-contextlib2")
7507 (version "0.5.5")
7508 (source
7509 (origin
7510 (method url-fetch)
7511 (uri (pypi-uri "contextlib2" version))
7512 (sha256
7513 (base32
7514 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
7515 (build-system python-build-system)
7516 (arguments
7517 `(#:python ,python-2
7518 #:phases
7519 (modify-phases %standard-phases
7520 (replace 'check
7521 (lambda _ (invoke "python" "test_contextlib2.py" "-v"))))))
7522 (native-inputs
7523 `(("python2-unittest2" ,python2-unittest2)))
7524 (home-page "http://contextlib2.readthedocs.org/")
7525 (synopsis "Tools for decorators and context managers")
7526 (description "This module is primarily a backport of the Python
75273.2 contextlib to earlier Python versions. Like contextlib, it
7528provides utilities for common tasks involving decorators and context
7529managers. It also contains additional features that are not part of
7530the standard library.")
7531 (license license:psfl)))
7532
7533(define-public python-texttable
7534 (package
7535 (name "python-texttable")
7536 (version "0.8.7")
7537 (source
7538 (origin
7539 (method url-fetch)
7540 (uri (pypi-uri "texttable" version))
7541 (sha256
7542 (base32
7543 "1liiiydgkg37i46a418aw19fyf6z3ds51wdwwpyjbs12x0phhf4a"))))
7544 (build-system python-build-system)
7545 (arguments '(#:tests? #f)) ; no tests
7546 (home-page "https://github.com/foutaise/texttable/")
7547 (synopsis "Python module for creating simple ASCII tables")
7548 (description "Texttable is a Python module for creating simple ASCII
7549tables.")
7550 (license license:lgpl2.1+)))
7551
7552(define-public python2-texttable
7553 (package-with-python2 python-texttable))
7554
7555(define-public python-atomicwrites
7556 (package
7557 (name "python-atomicwrites")
7558 (version "1.1.5")
7559 (source (origin
7560 (method url-fetch)
7561 (uri (pypi-uri "atomicwrites" version))
7562 (sha256
7563 (base32
7564 "11bm90fwm2avvf4f3ib8g925w7jr4m11vcsinn1bi6ns4bm32214"))))
7565 (build-system python-build-system)
7566 (synopsis "Atomic file writes in Python")
7567 (description "Library for atomic file writes using platform dependent tools
7568for atomic file system operations.")
7569 (home-page "https://github.com/untitaker/python-atomicwrites")
7570 (license license:expat)))
7571
7572(define-public python2-atomicwrites
7573 (package-with-python2 python-atomicwrites))
7574
7575(define-public python-click-threading
7576 (package
7577 (name "python-click-threading")
7578 (version "0.4.4")
7579 (source (origin
7580 (method url-fetch)
7581 (uri (pypi-uri "click-threading" version))
7582 (sha256
7583 (base32
7584 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
7585 (build-system python-build-system)
7586 (propagated-inputs
7587 `(("python-click" ,python-click)))
7588 (synopsis "Utilities for multithreading in Click")
7589 (description "This package provides utilities for multithreading in Click
7590applications.")
7591 (home-page "https://github.com/click-contrib/click-threading")
7592 (license license:expat)))
7593
7594(define-public python-click-log
7595 (package
7596 (name "python-click-log")
7597 (version "0.3.2")
7598 (source (origin
7599 (method url-fetch)
7600 (uri (pypi-uri "click-log" version))
7601 (sha256
7602 (base32
7603 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
7604 (build-system python-build-system)
7605 (propagated-inputs
7606 `(("python-click" ,python-click)))
7607 (synopsis "Logging for click applications")
7608 (description "This package provides a Python library for logging Click
7609applications.")
7610 (home-page "https://github.com/click-contrib/click-log")
7611 (license license:expat)))
7612
7613(define-public python-apipkg
7614 (package
7615 (name "python-apipkg")
7616 (version "1.4")
7617 (source (origin
7618 (method url-fetch)
7619 (uri (pypi-uri "apipkg" version))
7620 (sha256
7621 (base32
7622 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
7623 (build-system python-build-system)
7624 (native-inputs
7625 `(("python-pytest" ,python-pytest)))
7626 (synopsis "Namespace control and lazy-import mechanism")
7627 (description "With apipkg you can control the exported namespace of a Python
7628package and greatly reduce the number of imports for your users. It is a small
7629pure Python module that works on virtually all Python versions.")
7630 (home-page "https://github.com/pytest-dev/apipkg")
7631 (license license:expat)))
7632
7633(define-public python2-apipkg
7634 (package-with-python2 python-apipkg))
7635
7636(define-public python-execnet
7637 (package
7638 (name "python-execnet")
7639 (version "1.4.1")
7640 (source (origin
7641 (method url-fetch)
7642 (uri (pypi-uri "execnet" version))
7643 (sha256
7644 (base32
7645 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
7646 (build-system python-build-system)
7647 (arguments
7648 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
7649 ;; The two test failures are caused by the lack of an `ssh` executable.
7650 ;; The test suite can be run with pytest after the 'install' phase.
7651 #:tests? #f))
7652 (native-inputs
7653 `(("python-pytest" ,python-pytest)
7654 ("python-setuptools-scm" ,python-setuptools-scm)))
7655 (propagated-inputs
7656 `(("python-apipkg" ,python-apipkg)))
7657 (synopsis "Rapid multi-Python deployment")
7658 (description "Execnet provides a share-nothing model with
7659channel-send/receive communication for distributing execution across many
7660Python interpreters across version, platform and network barriers. It has a
7661minimal and fast API targeting the following uses:
7662@enumerate
7663@item distribute tasks to (many) local or remote CPUs
7664@item write and deploy hybrid multi-process applications
7665@item write scripts to administer multiple environments
7666@end enumerate")
7667 (home-page "http://codespeak.net/execnet/")
7668 (license license:expat)))
7669
7670(define-public python2-execnet
7671 (package-with-python2 python-execnet))
7672
7673(define-public python-icalendar
7674 (package
7675 (name "python-icalendar")
7676 (version "4.0.3")
7677 (source (origin
7678 (method url-fetch)
7679 (uri (pypi-uri "icalendar" version))
7680 (sha256
7681 (base32
7682 "0mk3dk1dxkcm46jy48v27j2w2349iv4sbimqj1yb5js43mx49hh7"))))
7683 (build-system python-build-system)
7684 (propagated-inputs
7685 `(("python-dateutil" ,python-dateutil)
7686 ("python-pytz" ,python-pytz)))
7687 (synopsis "Python library for parsing iCalendar files")
7688 (description "The icalendar package is a parser/generator of iCalendar
7689files for use with Python.")
7690 (home-page "https://github.com/collective/icalendar")
7691 (license license:bsd-2)))
7692
7693(define-public python-sphinxcontrib-newsfeed
7694 (package
7695 (name "python-sphinxcontrib-newsfeed")
7696 (version "0.1.4")
7697 (source (origin
7698 (method url-fetch)
7699 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
7700 (sha256
7701 (base32
7702 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
7703 (arguments '(#:tests? #f)) ; No tests.
7704 (build-system python-build-system)
7705 (propagated-inputs
7706 `(("python-sphinx" ,python-sphinx)))
7707 (synopsis "News Feed extension for Sphinx")
7708 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
7709Blog, News or Announcements section to a Sphinx website.")
7710 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
7711 (license license:bsd-2)))
7712
7713(define-public python-args
7714 (package
7715 (name "python-args")
7716 (version "0.1.0")
7717 (source (origin
7718 (method url-fetch)
7719 (uri (pypi-uri "args" version))
7720 (sha256
7721 (base32
7722 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
7723 (build-system python-build-system)
7724 (home-page "https://github.com/kennethreitz/args")
7725 (synopsis "Command-line argument parser")
7726 (description
7727 "This library provides a Python module to parse command-line arguments.")
7728 (license license:bsd-3)))
7729
7730(define-public python2-args
7731 (package-with-python2 python-args))
7732
7733(define-public python-clint
7734 (package
7735 (name "python-clint")
7736 (version "0.5.1")
7737 (source (origin
7738 (method url-fetch)
7739 (uri (pypi-uri "clint" version))
7740 (sha256
7741 (base32
7742 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
7743 (build-system python-build-system)
7744 (arguments
7745 '(#:phases
7746 (modify-phases %standard-phases
7747 (replace 'check
7748 (lambda _ (invoke "py.test" "-v"))))))
7749 (native-inputs
7750 `(("python-pytest" ,python-pytest)))
7751 (propagated-inputs
7752 `(("python-args" ,python-args)))
7753 (home-page "https://github.com/kennethreitz/clint")
7754 (synopsis "Command-line interface tools")
7755 (description
7756 "Clint is a Python module filled with a set of tools for developing
7757command-line applications, including tools for colored and indented
7758output, progress bar display, and pipes.")
7759 (license license:isc)))
7760
7761(define-public python2-clint
7762 (package-with-python2 python-clint))
7763
44d10b1f
RW
7764(define-public python-rply
7765 (package
7766 (name "python-rply")
7767 (version "0.7.5")
7768 (source (origin
7769 (method url-fetch)
7770 (uri (pypi-uri "rply" version))
7771 (sha256
7772 (base32
7773 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
7774 (build-system python-build-system)
7775 (propagated-inputs
7776 `(("python-appdirs" ,python-appdirs)))
7777 (home-page "https://github.com/alex/rply")
7778 (synopsis "Parser generator for Python")
7779 (description
7780 "This package provides a pure Python based parser generator, that also
7781works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
7782with a new public API, and RPython support.")
7783 (license license:bsd-3)))
7784
7785(define-public python2-rply
7786 (package-with-python2 python-rply))
7787
7788(define-public python-hy
7789 (package
7790 (name "python-hy")
7791 (version "0.13.0")
7792 (source (origin
7793 (method url-fetch)
7794 (uri (pypi-uri "hy" version))
7795 (sha256
7796 (base32
7797 "19sfymaksx9jhksfnb15ahid46mzrhdfzz6yy2craz2qnzvpmky8"))))
7798 (build-system python-build-system)
7799 (arguments
7800 '(#:phases
7801 (modify-phases %standard-phases
7802 (replace 'check
7803 (lambda _
7804 ;; Tests require write access to HOME.
7805 (setenv "HOME" "/tmp")
7806 (invoke "nosetests"))))))
7807 (native-inputs
7808 `(("python-coverage" ,python-coverage)
7809 ("python-nose" ,python-nose)))
7810 (propagated-inputs
7811 `(("python-astor" ,python-astor)
7812 ("python-clint" ,python-clint)
7813 ("python-rply" ,python-rply)))
7814 (home-page "http://hylang.org/")
7815 (synopsis "Lisp frontend to Python")
7816 (description
7817 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
7818its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
7819Python at your fingertips, in Lisp form.")
7820 (license license:expat)))
7821
7822(define-public python2-hy
7823 (package-with-python2 python-hy))
7824
7825(define-public python2-functools32
7826 (package
7827 (name "python2-functools32")
7828 (version "3.2.3-2")
7829 (source
7830 (origin
7831 (method url-fetch)
7832 (uri (pypi-uri "functools32" version))
7833 (sha256
7834 (base32
7835 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
7836 (build-system python-build-system)
7837 (arguments
7838 `(#:python ,python-2
7839 #:tests? #f)) ; no test target
7840 (home-page "https://github.com/MiCHiLU/python-functools32")
7841 (synopsis
7842 "Backport of the functools module from Python 3.2.3")
7843 (description
7844 "This package is a backport of the @code{functools} module from Python
78453.2.3 for use with older versions of Python and PyPy.")
7846 (license license:expat)))
7847
7848(define-public python2-subprocess32
7849 (package
7850 (name "python2-subprocess32")
7851 (version "3.2.7")
7852 (source (origin
7853 (method url-fetch)
7854 (uri (pypi-uri "subprocess32" version))
7855 (sha256
7856 (base32
7857 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
7858 (patches
7859 (search-patches "python2-subprocess32-disable-input-test.patch"))))
7860 (build-system python-build-system)
7861 (arguments
7862 `(#:python ,python-2
7863 ;; The test suite fails with Python > 2.7.13:
7864 ;; import test.support
7865 ;; ImportError: No module named support
7866 #:tests? #f
7867 #:phases
7868 (modify-phases %standard-phases
7869 (add-after 'unpack 'patch-/bin/sh
7870 (lambda _
7871 (substitute* '("subprocess32.py"
7872 "test_subprocess32.py")
7873 (("/bin/sh") (which "sh")))
7874 #t)))))
7875 (home-page "https://github.com/google/python-subprocess32")
7876 (synopsis "Backport of the subprocess module from Python 3.2")
7877 (description
7878 "This is a backport of the @code{subprocess} standard library module
7879from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
7880new features. On POSIX systems it is guaranteed to be reliable when used
7881in threaded applications. It includes timeout support from Python 3.3 but
7882otherwise matches 3.2’s API.")
7883 (license license:psfl)))
7884
7885(define-public python2-futures
7886 (package
7887 (name "python2-futures")
7888 (version "3.2.0")
7889 (source
7890 (origin
7891 (method url-fetch)
7892 (uri (pypi-uri "futures" version))
7893 (sha256
7894 (base32
7895 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
7896 (build-system python-build-system)
7897 (arguments `(#:python ,python-2
7898 ;; FIXME: Python 2.7.14 moved the test.support library,
7899 ;; but our package has not yet been adjusted. Enable
7900 ;; tests when the python2 package has been fixed.
7901 #:tests? #f))
7902 (home-page "https://github.com/agronholm/pythonfutures")
7903 (synopsis
7904 "Backport of the concurrent.futures package from Python 3.2")
7905 (description
7906 "The concurrent.futures module provides a high-level interface for
7907asynchronously executing callables. This package backports the
7908concurrent.futures package from Python 3.2")
7909 (license license:bsd-3)))
7910
7911(define-public python-promise
7912 (package
7913 (name "python-promise")
7914 (version "0.4.2")
7915 (source
7916 (origin
7917 (method url-fetch)
7918 (uri (pypi-uri "promise" version))
7919 (sha256
7920 (base32
7921 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
7922 (build-system python-build-system)
7923 ;; Tests wants python-futures, which is a python2 only program, and
7924 ;; can't be found by python-promise at test time.
7925 (arguments `(#:tests? #f))
7926 (home-page "https://github.com/syrusakbary/promise")
7927 (synopsis "Promises/A+ implementation for Python")
7928 (description
7929 "Promises/A+ implementation for Python")
7930 (properties `((python2-variant . ,(delay python2-promise))))
7931 (license license:expat)))
7932
7933(define-public python2-promise
7934 (let ((promise (package-with-python2
7935 (strip-python2-variant python-promise))))
7936 (package (inherit promise)
7937 (arguments (substitute-keyword-arguments (package-arguments promise)
7938 ((#:tests? _) #t)))
7939 (native-inputs
7940 `(("python2-futures" ,python2-futures)
7941 ("python2-pytest" ,python2-pytest)
7942 ,@(package-native-inputs promise))))))
7943
7944(define-public python-colorama
7945 (package
7946 (name "python-colorama")
7947 (version "0.3.9")
7948 (source
7949 (origin
7950 (method url-fetch)
7951 (uri (pypi-uri "colorama" version))
7952 (sha256
7953 (base32
7954 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
7955 (build-system python-build-system)
7956 (synopsis "Colored terminal text rendering for Python")
7957 (description "Colorama is a Python library for rendering colored terminal
7958text.")
7959 (home-page "https://pypi.python.org/pypi/colorama")
7960 (license license:bsd-3)))
7961
7962(define-public python2-colorama
7963 (package-with-python2 python-colorama))
7964
7965(define-public python-rsa
7966 (package
7967 (name "python-rsa")
7968 (version "3.4.2")
7969 (source
7970 (origin
7971 (method url-fetch)
7972 (uri (pypi-uri "rsa" version))
7973 (sha256
7974 (base32
7975 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
7976 (build-system python-build-system)
7977 (propagated-inputs
7978 `(("python-pyasn1" ,python-pyasn1)))
7979 (synopsis "Pure-Python RSA implementation")
7980 (description "Python-RSA is a pure-Python RSA implementation. It supports
7981encryption and decryption, signing and verifying signatures, and key
7982generation according to PKCS#1 version 1.5. It can be used as a Python
7983library as well as on the command line.")
7984 (home-page "https://stuvel.eu/rsa")
7985 (license license:asl2.0)))
7986
7987(define-public python2-rsa
7988 (package-with-python2 python-rsa))
7989
7990(define-public python-pluggy
7991 (package
7992 (name "python-pluggy")
7993 (version "0.7.1")
7994 (source
7995 (origin
7996 (method url-fetch)
7997 (uri (pypi-uri "pluggy" version))
7998 (sha256
7999 (base32
8000 "1qbn70mksmr03hac6jgp6fiqc4l7859z8dchx2x950vhlij87swm"))))
8001 (build-system python-build-system)
8002 (native-inputs
8003 `(("python-setuptools-scm" ,python-setuptools-scm)))
8004 (synopsis "Plugin and hook calling mechanism for Python")
8005 (description "Pluggy is an extraction of the plugin manager as used by
8006Pytest but stripped of Pytest specific details.")
8007 (home-page "https://pypi.python.org/pypi/pluggy")
8008 (license license:expat)))
8009
8010(define-public python2-pluggy
8011 (package-with-python2 python-pluggy))
8012
8013(define-public python-tox
8014 (package
8015 (name "python-tox")
8016 (version "2.8.1")
8017 (source
8018 (origin
8019 (method url-fetch)
8020 (uri (pypi-uri "tox" version))
8021 (sha256
8022 (base32
8023 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
8024 (build-system python-build-system)
8025 (arguments
8026 ;; FIXME: Tests require pytest-timeout, which itself requires
8027 ;; pytest>=2.8.0 for installation.
8028 '(#:tests? #f))
8029 (propagated-inputs
8030 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
8031 ("python-py" ,python-py)
8032 ("python-virtualenv" ,python-virtualenv)))
8033 (native-inputs
8034 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
8035 ("python-pytest" ,python-pytest) ; >= 2.3.5
8036 ("python-setuptools-scm" ,python-setuptools-scm)))
8037 (home-page "http://tox.testrun.org/")
8038 (synopsis "Virtualenv-based automation of test activities")
8039 (description "Tox is a generic virtualenv management and test command line
8040tool. It can be used to check that a package installs correctly with
8041different Python versions and interpreters, or run tests in each type of
8042supported environment, or act as a frontend to continuous integration
8043servers.")
8044 (license license:expat)))
8045
8046(define-public python2-tox
8047 (package-with-python2 python-tox))
8048
8049(define-public python-jmespath
8050 (package
8051 (name "python-jmespath")
8052 (version "0.9.3")
8053 (source
8054 (origin
8055 (method url-fetch)
8056 (uri (pypi-uri "jmespath" version))
8057 (sha256
8058 (base32
8059 "0r7wc7fsxmlwzxx9j1j7rms06c6xs6d4sysirdhz1jk2mb4x90ba"))))
8060 (build-system python-build-system)
8061 (native-inputs
8062 `(("python-nose" ,python-nose)))
8063 (synopsis "JSON Matching Expressions")
8064 (description "JMESPath (pronounced “james path”) is a Python library that
8065allows one to declaratively specify how to extract elements from a JSON
8066document.")
8067 (home-page "https://github.com/jmespath/jmespath.py")
8068 (license license:expat)))
8069
8070(define-public python2-jmespath
8071 (package-with-python2 python-jmespath))
8072
8073(define-public python-botocore
8074 (package
8075 (name "python-botocore")
8076 (version "1.8.43")
8077 (source
8078 (origin
8079 (method url-fetch)
8080 (uri (pypi-uri "botocore" version))
8081 (sha256
8082 (base32
8083 "12cqpbnz3vfv41mp9admvciw7bc7hz57sjpqs2bxaw9wnfmbw5lg"))))
8084 (build-system python-build-system)
8085 (arguments
8086 ;; FIXME: Many tests are failing.
8087 '(#:tests? #f))
8088 (propagated-inputs
8089 `(("python-dateutil" ,python-dateutil)
8090 ("python-docutils" ,python-docutils)
8091 ("python-jmespath" ,python-jmespath)))
8092 (native-inputs
8093 `(("python-mock" ,python-mock)
8094 ("python-nose" ,python-nose)
8095 ("behave" ,behave)
8096 ("python-tox" ,python-tox)
8097 ("python-wheel" ,python-wheel)))
8098 (home-page "https://github.com/boto/botocore")
8099 (synopsis "Low-level interface to AWS")
8100 (description "Botocore is a Python library that provides a low-level
8101interface to the Amazon Web Services (AWS) API.")
8102 (license license:asl2.0)))
8103
8104(define-public python2-botocore
8105 (package-with-python2 python-botocore))
8106
8107(define-public python-xdo
8108 (package
8109 (name "python-xdo")
8110 (version "0.3")
8111 (source (origin
8112 (method url-fetch)
8113 (uri (string-append
8114 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8115 "python-xdo_" version ".orig.tar.gz"))
8116 (sha256
8117 (base32
8118 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
8119 (build-system python-build-system)
8120 (arguments
8121 '(#:phases
8122 (modify-phases %standard-phases
8123 (add-before 'install 'patch-libxdo-path
8124 ;; Hardcode the path of dynamically loaded libxdo library.
8125 (lambda* (#:key inputs #:allow-other-keys)
8126 (let ((libxdo (string-append
8127 (assoc-ref inputs "xdotool")
8128 "/lib/libxdo.so")))
8129 (substitute* "xdo/_xdo.py"
8130 (("find_library\\(\"xdo\"\\)")
8131 (simple-format #f "\"~a\"" libxdo)))
8132 #t))))
8133 #:tests? #f)) ; no tests provided
8134 (propagated-inputs
8135 `(("python-six" ,python-six)))
8136 (inputs
8137 `(("xdotool" ,xdotool)
8138 ("libX11" ,libx11)))
8139 (home-page "https://tracker.debian.org/pkg/python-xdo")
8140 (synopsis "Python library for simulating X11 keyboard/mouse input")
8141 (description "Provides bindings to libxdo for manipulating X11 via simulated
8142input. (Note that this is mostly a legacy library; you may wish to look at
8143python-xdo for newer bindings.)")
8144 (license license:bsd-3)))
8145
8146(define-public python2-xdo
8147 (package-with-python2 python-xdo))
8148
8149(define-public python-mako
8150 (package
8151 (name "python-mako")
8152 (version "1.0.7")
8153 (source
8154 (origin
8155 (method url-fetch)
8156 (uri (pypi-uri "Mako" version))
8157 (sha256
8158 (base32
8159 "1bi5gnr8r8dva06qpyx4kgjc6spm2k1y908183nbbaylggjzs0jf"))))
8160 (build-system python-build-system)
8161 (propagated-inputs
8162 `(("python-markupsafe" ,python-markupsafe)))
8163 (native-inputs
8164 `(("python-mock" ,python-mock)
8165 ("python-nose" ,python-nose)
8166 ("python-pytest" ,python-pytest)))
7016e620 8167 (home-page "https://www.makotemplates.org/")
44d10b1f
RW
8168 (synopsis "Templating language for Python")
8169 (description "Mako is a templating language for Python that compiles
8170templates into Python modules.")
8171 (license license:expat)))
8172
8173(define-public python2-mako
8174 (package-with-python2 python-mako))
8175
8176(define-public python-waitress
8177 (package
8178 (name "python-waitress")
8179 (version "1.1.0")
8180 (source
8181 (origin
8182 (method url-fetch)
8183 (uri (pypi-uri "waitress" version))
8184 (patches (search-patches "python-waitress-fix-tests.patch"))
8185 (sha256
8186 (base32
8187 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
8188 (build-system python-build-system)
8189 (home-page "https://github.com/Pylons/waitress")
8190 (synopsis "Waitress WSGI server")
8191 (description "Waitress is meant to be a production-quality pure-Python WSGI
8192server with very acceptable performance.")
8193 (license license:zpl2.1)))
8194
8195(define-public python2-waitress
8196 (package-with-python2 python-waitress))
8197
8198(define-public python-pyquery
8199 (package
8200 (name "python-pyquery")
8201 (version "1.2.17")
8202 (source
8203 (origin
8204 (method url-fetch)
8205 (uri (pypi-uri "pyquery" version))
8206 (sha256
8207 (base32
8208 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
8209 (build-system python-build-system)
8210 (native-inputs
8211 `(("python-webob" ,python-webob)
8212 ("python-webtest" ,python-webtest)))
8213 (propagated-inputs
8214 `(("python-lxml" ,python-lxml)
8215 ("python-cssselect" ,python-cssselect)))
8216 (home-page "https://github.com/gawel/pyquery")
8217 (synopsis "Make jQuery-like queries on xml documents")
8218 (description "pyquery allows you to make jQuery queries on xml documents.
8219The API is as much as possible the similar to jQuery. pyquery uses lxml for
8220fast xml and html manipulation.")
8221 (license license:bsd-3)))
8222
44d10b1f
RW
8223(define-public python-anyjson
8224 (package
8225 (name "python-anyjson")
8226 (version "0.3.3")
8227 (source
8228 (origin
8229 (method url-fetch)
8230 (uri (pypi-uri "anyjson" version))
8231 (sha256
8232 (base32
8233 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
8234 (build-system python-build-system)
8235 (arguments
8236 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
8237 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
8238 ;; whatever) so this transformation needs to be done before the tests
8239 ;; can be run. Maybe we could add a build step to transform beforehand
8240 ;; but it could be annoying/difficult.
8241 ;; We can enable tests for the Python 2 version, though, and do below.
8242 #:tests? #f))
8243 (home-page "https://bitbucket.org/runeh/anyjson/")
8244 (synopsis
8245 "Wraps best available JSON implementation in a common interface")
8246 (description
8247 "Anyjson loads whichever is the fastest JSON module installed
8248and provides a uniform API regardless of which JSON implementation is used.")
8249 (license license:bsd-3)
8250 (properties `((python2-variant . ,(delay python2-anyjson))))))
8251
8252(define-public python2-anyjson
8253 (let ((anyjson (package-with-python2
8254 (strip-python2-variant python-anyjson))))
8255 (package
8256 (inherit anyjson)
8257 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
8258 #:tests? #t
8259 ,@(package-arguments anyjson)))
8260 (native-inputs `(("python2-nose" ,python2-nose))))))
8261
8262(define-public python-amqp
8263 (package
8264 (name "python-amqp")
8265 (version "2.3.2")
8266 (source
8267 (origin
8268 (method url-fetch)
8269 (uri (pypi-uri "amqp" version))
8270 (sha256
8271 (base32
8272 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
8273 (build-system python-build-system)
8274 (native-inputs
8275 `(("python-case" ,python-case)
8276 ("python-pytest-sugar" ,python-pytest-sugar)
8277 ("python-mock" ,python-mock)))
8278 (propagated-inputs
8279 `(("python-vine" ,python-vine)))
8280 (home-page "https://github.com/celery/py-amqp")
8281 (synopsis
8282 "Low-level AMQP client for Python (fork of amqplib)")
8283 (description
8284 "This is a fork of amqplib which was originally written by Barry Pederson.
8285It is maintained by the Celery project, and used by kombu as a pure python
8286alternative when librabbitmq is not available.")
8287 (license license:lgpl2.1+)
8288 (properties `((python2-variant . ,(delay python2-amqp))))))
8289
8290(define-public python2-amqp
8291 (let ((amqp (package-with-python2
8292 (strip-python2-variant python-amqp))))
8293 (package
8294 (inherit amqp)
8295 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
8296 ;; unmaintained. Weirdly, does not do this on the python 3
8297 ;; version?
8298 #:tests? #f
8299 ,@(package-arguments amqp))))))
8300
8301(define-public python-txamqp
8302 (package
8303 (name "python-txamqp")
8304 (version "0.8.2")
8305 (source
8306 (origin
8307 (method url-fetch)
8308 (uri (pypi-uri "txAMQP" version))
8309 (sha256
8310 (base32
8311 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
8312 (build-system python-build-system)
8313 (propagated-inputs
8314 `(("python-six" ,python-six)
8315 ("python-twisted" ,python-twisted)))
8316 (home-page "https://github.com/txamqp/txamqp")
8317 (synopsis "Communicate with AMQP peers and brokers using Twisted")
8318 (description
8319 "This package provides a Python library for communicating with AMQP peers
8320and brokers using the asynchronous networking framework Twisted. It contains
8321all the necessary code to connect, send and receive messages to/from an
8322AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
8323also includes support for using Thrift RPC over AMQP in Twisted
8324applications.")
8325 (license license:asl2.0)))
8326
8327(define-public python2-txamqp
8328 (package-with-python2 python-txamqp))
8329
8330(define-public python-kombu
8331 (package
8332 (name "python-kombu")
8333 (version "4.2.2")
8334 (source
8335 (origin
8336 (method url-fetch)
8337 (uri (pypi-uri "kombu" version))
8338 (sha256
8339 (base32
8340 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
8341 (build-system python-build-system)
8342 (native-inputs
8343 `(("python-mock" ,python-mock)
8344 ("python-case" ,python-case)
8345 ("python-pyro4" ,python-pyro4)
8346 ("python-pytest-sugar" ,python-pytest-sugar)
8347 ("python-pytz" ,python-pytz)))
8348 (propagated-inputs
8349 `(("python-anyjson" ,python-anyjson)
8350 ("python-amqp" ,python-amqp)
8351 ("python-redis" ,python-redis)))
8352 (home-page "https://kombu.readthedocs.io")
8353 (synopsis "Message passing library for Python")
8354 (description "The aim of Kombu is to make messaging in Python as easy as
8355possible by providing an idiomatic high-level interface for the AMQ protocol,
8356and also provide proven and tested solutions to common messaging problems.
8357AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
8358message orientation, queuing, routing, reliability and security, for which the
8359RabbitMQ messaging server is the most popular implementation.")
8360 (license license:bsd-3)
8361 (properties `((python2-variant . ,(delay python2-kombu))))))
8362
8363(define-public python2-kombu
8364 (let ((kombu (package-with-python2
8365 (strip-python2-variant python-kombu))))
8366 (package
8367 (inherit kombu)
8368 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
8369 ;; It works fine on the python3 variant.
8370 #:tests? #f
8371 ,@(package-arguments kombu)))
8372 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8373 ,@(package-native-inputs kombu))))))
8374
8375(define-public python-billiard
8376 (package
8377 (name "python-billiard")
8378 (version "3.5.0.5")
8379 (source
8380 (origin
8381 (method url-fetch)
8382 (uri (pypi-uri "billiard" version))
8383 (sha256
8384 (base32
8385 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
8386 (build-system python-build-system)
8387 (native-inputs
8388 `(("python-case" ,python-case)
8389 ("python-pytest" ,python-pytest)))
8390 (home-page "https://github.com/celery/billiard")
8391 (synopsis
8392 "Python multiprocessing fork with improvements and bugfixes")
8393 (description
8394 "Billiard is a fork of the Python 2.7 multiprocessing package. The
8395multiprocessing package itself is a renamed and updated version of R Oudkerk's
8396pyprocessing package. This standalone variant is intended to be compatible with
8397Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
8398 (license license:bsd-3)
8399 (properties `((python2-variant . ,(delay python2-billiard))))))
8400
8401(define-public python2-billiard
8402 (let ((billiard (package-with-python2
8403 (strip-python2-variant python-billiard))))
8404 (package
8405 (inherit billiard)
8406 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8407 ("python2-mock" ,python2-mock)
8408 ,@(package-native-inputs billiard))))))
8409
8410(define-public python-celery
8411 (package
8412 (name "python-celery")
8413 (version "4.2.1")
8414 (source
8415 (origin
8416 (method url-fetch)
8417 (uri (pypi-uri "celery" version))
8418 (sha256
8419 (base32
8420 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
8421 (build-system python-build-system)
8422 (arguments
8423 '(;; TODO The tests fail with Python 3.7
8424 ;; https://github.com/celery/celery/issues/4849
8425 #:tests? #f
8426 #:phases
8427 (modify-phases %standard-phases
8428 (add-after 'unpack 'patch-requirements
8429 (lambda _
8430 (substitute* "requirements/test.txt"
8431 (("pytest>=3\\.0,<3\\.3")
8432 "pytest>=3.0"))
8433 #t)))))
8434 (native-inputs
8435 `(("python-case" ,python-case)
8436 ("python-pytest" ,python-pytest)))
8437 (propagated-inputs
8438 `(("python-pytz" ,python-pytz)
8439 ("python-billiard" ,python-billiard)
8440 ("python-kombu" ,python-kombu)))
8441 (home-page "https://celeryproject.org")
8442 (synopsis "Distributed Task Queue")
8443 (description "Celery is an asynchronous task queue/job queue based on
8444distributed message passing. It is focused on real-time operation, but
8445supports scheduling as well. The execution units, called tasks, are executed
8446concurrently on a single or more worker servers using multiprocessing,
8447Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
8448synchronously (wait until ready).")
8449 (license license:bsd-3)
8450 (properties `((python2-variant . ,(delay python2-celery))))))
8451
8452(define-public python2-celery
8453 (let ((celery (package-with-python2
8454 (strip-python2-variant python-celery))))
8455 (package
8456 (inherit celery)
8457 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8458 ("python2-mock" ,python2-mock)
8459 ,@(package-native-inputs celery))))))
8460
8461(define-public python-translitcodec
8462 (package
8463 (name "python-translitcodec")
8464 (version "0.4.0")
8465 (source
8466 (origin
8467 (method url-fetch)
8468 (uri (pypi-uri "translitcodec" version))
8469 (sha256
8470 (base32
8471 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
8472 (build-system python-build-system)
8473 (arguments
8474 `(#:tests? #f)) ; no tests provided
8475 (home-page
8476 "https://github.com/claudep/translitcodec")
8477 (synopsis
8478 "Unicode to 8-bit charset transliteration codec")
8479 (description
8480 "This package contains codecs for transliterating ISO 10646 texts into
8481best-effort representations using smaller coded character sets (ASCII,
8482ISO 8859, etc.).")
8483 (license license:expat)))
8484
8485(define-public python2-translitcodec
8486 (package-with-python2 python-translitcodec))
8487
8488(define-public python-editor
8489 (package
8490 (name "python-editor")
8491 (version "0.5")
8492 (source
8493 (origin
8494 (method url-fetch)
8495 (uri (pypi-uri "python-editor" version))
8496 (sha256
8497 (base32
8498 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
8499 (build-system python-build-system)
8500 (home-page
8501 "https://github.com/fmoo/python-editor")
8502 (synopsis
8503 "Programmatically open an editor, capture the result")
8504 (description
8505 "python-editor is a library that provides the editor module for
8506programmatically interfacing with your system's $EDITOR.")
8507 (license license:asl2.0)))
8508
8509(define-public python2-editor
8510 (package-with-python2 python-editor))
8511
8512(define-public python-sphinxcontrib-programoutput
8513 (package
8514 (name "python-sphinxcontrib-programoutput")
8515 (version "0.10")
8516 (source (origin
8517 (method url-fetch)
8518 (uri (pypi-uri "sphinxcontrib-programoutput" version))
8519 (sha256
8520 (base32
8521 "153hhnlbx4688zj9wd64819ps5znc2jlyp5crkgzvn5hxgy99vpx"))))
8522 (build-system python-build-system)
8523 (arguments
8524 ;; FIXME: Many tests are failing and the upstream is gone.
8525 '(#:tests? #f))
8526 (propagated-inputs
8527 `(("python-sphinx" ,python-sphinx)))
8528 (synopsis "Sphinx extension to include program output")
8529 (description "A Sphinx extension to literally insert the output of arbitrary
8530commands into documents, helping you to keep your command examples up to date.")
8531 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
8532 (license license:bsd-2)))
8533
8534(define-public python2-sphinxcontrib-programoutput
8535 (package-with-python2 python-sphinxcontrib-programoutput))
8536
8537(define-public python-sphinx-repoze-autointerface
8538 (package
8539 (name "python-sphinx-repoze-autointerface")
8540 (version "0.8")
8541 (source (origin
8542 (method url-fetch)
8543 (uri (pypi-uri "repoze.sphinx.autointerface" version))
8544 (sha256
8545 (base32
8546 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
8547 (build-system python-build-system)
8548 (arguments '(#:tests? #f)) ; No tests.
8549 (propagated-inputs
8550 `(("python-sphinx" ,python-sphinx)
8551 ("python-zope-interface" ,python-zope-interface)))
8552 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
8553 (description "This package defines an extension for the Sphinx documentation
8554system. The extension allows generation of API documentation by
8555introspection of @code{zope.interface} instances in code.")
8556 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
8557 (license license:repoze)))
8558
8559(define-public python2-sphinx-repoze-autointerface
8560 (package-with-python2 python-sphinx-repoze-autointerface))
8561
8562(define-public python-vobject
8563 (package
8564 (name "python-vobject")
8565 (version "0.9.5")
8566 (source (origin
8567 (method url-fetch)
8568 (uri (pypi-uri "vobject" version))
8569 (sha256
8570 (base32
8571 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
8572 (build-system python-build-system)
8573 (arguments
8574 '(;; The test suite relies on some non-portable Windows interfaces.
8575 #:tests? #f))
8576 (propagated-inputs
8577 `(("python-dateutil" ,python-dateutil)
8578 ("python-pyicu" ,python-pyicu)))
8579 (synopsis "Parse and generate vCard and vCalendar files")
8580 (description "Vobject is intended to be a full featured Python package for
8581parsing and generating vCard and vCalendar files. Currently, iCalendar files
8582are supported and well tested. vCard 3.0 files are supported, and all data
8583should be imported, but only a few components are understood in a sophisticated
8584way.")
8585 (home-page "http://eventable.github.io/vobject/")
8586 (license license:asl2.0)))
8587
8588(define-public python2-vobject
8589 (package-with-python2 python-vobject))
8590
8591(define-public python-munkres
8592 (package
8593 (name "python-munkres")
8594 (version "1.0.8")
8595 (source (origin
8596 (method url-fetch)
8597 (uri (pypi-uri "munkres" version))
8598 (sha256
8599 (base32
8600 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
8601 (build-system python-build-system)
8602 (arguments
8603 '(#:tests? #f)) ; no test suite
8604 (home-page "http://software.clapper.org/munkres/")
8605 (synopsis "Implementation of the Munkres algorithm")
8606 (description "The Munkres module provides an implementation of the Munkres
8607algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
8608useful for solving the Assignment Problem.")
8609 (license license:bsd-3)))
8610
8611(define-public python2-munkres
8612 (package-with-python2 python-munkres))
8613
8614(define-public python-whoosh
8615 (package
8616 (name "python-whoosh")
8617 (version "2.7.4")
8618 (source
8619 (origin
8620 (method url-fetch)
8621 (uri (pypi-uri "Whoosh" version))
8622 (sha256
8623 (base32
8624 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
8625 (build-system python-build-system)
8626 (native-inputs
8627 `(("python-pytest" ,python-pytest)))
8628 (home-page "https://bitbucket.org/mchaput/whoosh")
8629 (synopsis "Full text indexing, search, and spell checking library")
8630 (description
8631 "Whoosh is a fast, pure-Python full text indexing, search, and spell
8632checking library.")
8633 (license license:bsd-2)))
8634
8635(define-public python2-whoosh
8636 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
8637 (package (inherit whoosh)
8638 (propagated-inputs
8639 `(("python2-backport-ssl-match-hostname"
8640 ,python2-backport-ssl-match-hostname)
8641 ,@(package-propagated-inputs whoosh))))))
8642
8643(define-public python-pathlib
8644 (package
8645 (name "python-pathlib")
8646 (version "1.0.1")
8647 (source (origin
8648 (method url-fetch)
8649 (uri (pypi-uri "pathlib" version))
8650 (sha256
8651 (base32
8652 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
8653 (build-system python-build-system)
8654 ;; The tests depend on the internal "test" module, which does not provide
8655 ;; a stable interface.
8656 (arguments `(#:tests? #f))
8657 (home-page "https://pathlib.readthedocs.org/")
8658 (synopsis "Object-oriented file system paths")
8659 (description "Pathlib offers a set of classes to handle file system paths.
8660It offers the following advantages over using string objects:
8661
8662@enumerate
8663@item No more cumbersome use of os and os.path functions. Everything can
8664be done easily through operators, attribute accesses, and method calls.
8665@item Embodies the semantics of different path types. For example,
8666comparing Windows paths ignores casing.
8667@item Well-defined semantics, eliminating any inconsistencies or
8668ambiguities (forward vs. backward slashes, etc.).
8669@end enumerate
8670
8671Note: In Python 3.4, pathlib is now part of the standard library. For other
8672Python versions please consider python-pathlib2 instead, which tracks the
8673standard library module. This module (python-pathlib) isn't maintained
8674anymore.")
8675 (license license:expat)))
8676
8677(define-public python2-pathlib
8678 (package-with-python2 python-pathlib))
8679
8680(define-public python2-pathlib2
8681 (package
8682 (name "python2-pathlib2")
8683 (version "2.3.2")
8684 (source (origin
8685 (method url-fetch)
8686 (uri (pypi-uri "pathlib2" version))
8687 (sha256
8688 (base32
8689 "10yb0iv5x2hs631rcppkhbddx799d3h8pcwmkbh2a66ns3w71ccf"))))
8690 (build-system python-build-system)
8691 ;; We only need the the Python 2 variant, since for Python 3 our minimum
8692 ;; version is 3.4 which already includes this package as part of the
8693 ;; standard library.
8694 (arguments
8695 `(#:python ,python-2))
8696 (propagated-inputs
8697 `(("python2-scandir" ,python2-scandir)
8698 ("python2-six" ,python2-six)))
8699 (home-page "https://pypi.python.org/pypi/pathlib2/")
8700 (synopsis "Object-oriented file system paths - backport of standard
8701pathlib module")
8702 (description "The goal of pathlib2 is to provide a backport of standard
8703pathlib module which tracks the standard library module, so all the newest
8704features of the standard pathlib can be used also on older Python versions.
8705
8706Pathlib offers a set of classes to handle file system paths. It offers the
8707following advantages over using string objects:
8708
8709@enumerate
8710@item No more cumbersome use of os and os.path functions. Everything can
8711be done easily through operators, attribute accesses, and method calls.
8712@item Embodies the semantics of different path types. For example,
8713comparing Windows paths ignores casing.
8714@item Well-defined semantics, eliminating any inconsistencies or
8715ambiguities (forward vs. backward slashes, etc.).
8716@end enumerate")
8717 (license license:expat)))
8718
8719(define-public python2-pathlib2-bootstrap
8720 (hidden-package
8721 (package
8722 (inherit python2-pathlib2)
8723 (name "python2-pathlib2-bootstrap")
8724 (propagated-inputs
8725 `(("python2-scandir" ,python2-scandir)
8726 ("python2-six" ,python2-six-bootstrap))))))
8727
8728(define-public python-jellyfish
8729 (package
8730 (name "python-jellyfish")
8731 (version "0.5.6")
8732 (source (origin
8733 (method url-fetch)
8734 (uri (pypi-uri "jellyfish" version))
8735 (sha256
8736 (base32
8737 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
8738 (build-system python-build-system)
8739 (native-inputs
8740 `(("python-pytest" ,python-pytest)))
8741 (home-page "https://github.com/jamesturk/jellyfish")
8742 (synopsis "Approximate and phonetic matching of strings")
8743 (description "Jellyfish uses a variety of string comparison and phonetic
8744encoding algorithms to do fuzzy string matching.")
8745 (license license:bsd-2)
8746 (properties `((python2-variant . ,(delay python2-jellyfish))))))
8747
8748(define-public python2-jellyfish
8749 (let ((jellyfish (package-with-python2
8750 (strip-python2-variant python-jellyfish))))
8751 (package (inherit jellyfish)
8752 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
8753 ,@(package-native-inputs jellyfish))))))
8754
8755(define-public python2-unicodecsv
8756 (package
8757 (name "python2-unicodecsv")
8758 (version "0.14.1")
8759 (source (origin
8760 (method url-fetch)
8761 ;; The test suite is not included in the PyPi release.
8762 ;; https://github.com/jdunck/python-unicodecsv/issues/19
8763 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
8764 "archive/" version ".tar.gz"))
8765 (file-name (string-append name "-" version ".tar.gz"))
8766 (sha256
8767 (base32
8768 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
8769 (build-system python-build-system)
8770 (arguments
8771 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
8772 #:python ,python-2))
8773 (native-inputs
8774 `(("python2-unittest2" ,python2-unittest2)))
8775 (home-page "https://github.com/jdunck/python-unicodecsv")
8776 (synopsis "Unicode CSV module for Python 2")
8777 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
8778module, adding support for Unicode strings.")
8779 (license license:bsd-2)))
8780
8781(define-public python-rarfile
8782 (package
8783 (name "python-rarfile")
8784 (version "2.8")
8785 (source (origin
8786 (method url-fetch)
8787 (uri (pypi-uri "rarfile" version))
8788 (sha256
8789 (base32
8790 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
8791 (build-system python-build-system)
8792 (arguments
8793 '(#:phases
8794 (modify-phases %standard-phases
8795 (replace 'check
8796 ;; Many tests fail, but the installation proceeds.
e59dd341 8797 (lambda _ (invoke "make" "-C" "test" "test"))))))
44d10b1f
RW
8798 (native-inputs
8799 `(("which" ,which))) ; required for tests
8800 (propagated-inputs
8801 `(("libarchive" ,libarchive)))
8802 (home-page "https://github.com/markokr/rarfile")
8803 (synopsis "RAR archive reader for Python")
8804 (description "This is Python module for RAR archive reading. The interface
8805is made as zipfile like as possible.")
8806 (license license:isc)))
8807
8808(define-public python2-rarfile
8809 (package-with-python2 python-rarfile))
8810
8811(define-public python-magic
8812 (package
8813 (name "python-magic")
8814 (version "0.4.15")
8815 (source
8816 (origin
8817 (method url-fetch)
8818 (uri (pypi-uri "python-magic" version))
8819 (sha256
8820 (base32
8821 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
8822 (file-name (string-append name "-" version "-checkout"))))
8823 (build-system python-build-system)
8824 (arguments
8825 ;; The tests are unreliable, so don't run them. The tests fail
8826 ;; under Python3 because they were written for Python2 and
8827 ;; contain import statements that do not work in Python3. One of
8828 ;; the tests fails under Python2 because its assertions are
8829 ;; overly stringent; it relies on comparing output strings which
8830 ;; are brittle and can change depending on the version of
8831 ;; libmagic being used and the system on which the test is
8832 ;; running. In my case, under GuixSD 0.10.0, only one test
8833 ;; failed, and it seems to have failed only because the version
8834 ;; of libmagic that is packaged in Guix outputs a slightly
8835 ;; different (but not wrong) string than the one that the test
8836 ;; expected.
8837 '(#:tests? #f
8838 #:phases (modify-phases %standard-phases
8839 ;; Replace a specific method call with a hard-coded
8840 ;; path to the necessary libmagic.so file in the
8841 ;; store. If we don't do this, then the method call
8842 ;; will fail to find the libmagic.so file, which in
8843 ;; turn will cause any application using
8844 ;; python-magic to fail.
8845 (add-before 'build 'hard-code-path-to-libmagic
8846 (lambda* (#:key inputs #:allow-other-keys)
8847 (let ((file (assoc-ref inputs "file")))
8848 (substitute* "magic.py"
8849 (("ctypes.util.find_library\\('magic'\\)")
8850 (string-append "'" file "/lib/libmagic.so'")))
8851 #t)))
8852 (add-before 'install 'disable-egg-compression
8853 (lambda _
8854 (let ((port (open-file "setup.cfg" "a")))
8855 (display "\n[easy_install]\nzip_ok = 0\n"
8856 port)
8857 (close-port port)
8858 #t))))))
8859 (inputs
8860 ;; python-magic needs to be able to find libmagic.so.
8861 `(("file" ,file)))
8862 (home-page
8863 "https://github.com/ahupp/python-magic")
8864 (synopsis
8865 "File type identification using libmagic")
8866 (description
8867 "This module uses ctypes to access the libmagic file type
8868identification library. It makes use of the local magic database and
8869supports both textual and MIME-type output. Note that this module and
8870the python-file module both provide a \"magic.py\" file; these two
8871modules, which are different and were developed separately, both serve
8872the same purpose: to provide Python bindings for libmagic.")
8873 (license license:expat)))
8874
8875(define-public python2-magic
8876 (package-with-python2 python-magic))
8877
8878(define-public python2-s3cmd
8879 (package
8880 (name "python2-s3cmd")
8881 (version "1.6.1")
8882 (source
8883 (origin
8884 (method url-fetch)
8885 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
8886 "s3cmd-" version ".tar.gz"))
8887 (sha256
8888 (base32
8889 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
8890 (build-system python-build-system)
8891 (arguments
8892 ;; s3cmd is written for python2 only and contains no tests.
8893 `(#:python ,python-2
8894 #:tests? #f))
8895 (propagated-inputs
8896 `(("python2-dateutil" ,python2-dateutil)
8897 ;; The python-file package also provides a magic.py module.
8898 ;; This is an unfortunate state of affairs; however, s3cmd
8899 ;; fails to install if it cannot find specifically the
8900 ;; python-magic package. Thus we include it, instead of using
8901 ;; python-file. Ironically, s3cmd sometimes works better
8902 ;; without libmagic bindings at all:
8903 ;; https://github.com/s3tools/s3cmd/issues/198
8904 ("python2-magic" ,python2-magic)))
8905 (home-page "http://s3tools.org/s3cmd")
8906 (synopsis "Command line tool for S3-compatible storage services")
8907 (description
8908 "S3cmd is a command line tool for uploading, retrieving and managing data
8909in storage services that are compatible with the Amazon Simple Storage
8910Service (S3) protocol, including S3 itself. It supports rsync-like backup,
8911GnuPG encryption, and more. It also supports management of Amazon's
8912CloudFront content delivery network.")
8913 (license license:gpl2+)))
8914
8915(define-public python-pkgconfig
8916 (package
8917 (name "python-pkgconfig")
8918 (version "1.3.1")
8919 (source
8920 (origin
8921 (method url-fetch)
8922 (uri (pypi-uri "pkgconfig" version))
8923 (sha256
8924 (base32
8925 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
8926 (build-system python-build-system)
8927 (native-inputs
8928 `(("python-nose" ,python-nose)))
8929 (inputs
8930 `(("pkg-config" ,pkg-config)))
8931 (arguments
8932 `(#:phases
8933 (modify-phases %standard-phases
8934 (add-before 'build 'patch
8935 ;; Hard-code the path to pkg-config.
8936 (lambda _
8937 (substitute* "pkgconfig/pkgconfig.py"
8938 (("cmd = 'pkg-config")
8939 (string-append "cmd = '" (which "pkg-config"))))
8940 #t))
8941 (replace 'check
8942 (lambda _
8943 (invoke "nosetests" "test.py"))))))
8944 (home-page "https://github.com/matze/pkgconfig")
8945 (synopsis "Python interface for pkg-config")
8946 (description "This module provides a Python interface to pkg-config. It
8947can be used to find all pkg-config packages, check if a package exists,
8948check if a package meets certain version requirements, query CFLAGS and
8949LDFLAGS and parse the output to build extensions with setup.py.")
8950 (license license:expat)))
8951
8952(define-public python2-pkgconfig
8953 (package-with-python2 python-pkgconfig))
8954
8955(define-public python-bz2file
8956 (package
8957 (name "python-bz2file")
8958 (version "0.98")
8959 (source
8960 (origin
8961 (method url-fetch)
8962 (uri (pypi-uri "bz2file" version))
8963 (sha256
8964 (base32
8965 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
8966 (build-system python-build-system)
8967 (arguments
8968 `(#:tests? #f)) ; Tests use deprecated python modules.
8969 (home-page "https://github.com/nvawda/bz2file")
8970 (synopsis "Read and write bzip2-compressed files")
8971 (description
8972 "Bz2file is a Python library for reading and writing bzip2-compressed
8973files. It contains a drop-in replacement for the I/O interface in the
8974standard library's @code{bz2} module, including features from the latest
8975development version of CPython that are not available in older releases.")
8976 (license license:asl2.0)))
8977
8978(define-public python2-bz2file
8979 (package-with-python2 python-bz2file))
8980
8981(define-public python-future
8982 (package
8983 (name "python-future")
8984 (version "0.16.0")
8985 (source
8986 (origin
8987 (method url-fetch)
8988 (uri (pypi-uri "future" version))
8989 (sha256
8990 (base32
8991 "1nzy1k4m9966sikp0qka7lirh8sqrsyainyf8rk97db7nwdfv773"))))
8992 (build-system python-build-system)
8993 ;; Many tests connect to the network or are otherwise flawed.
8994 ;; https://github.com/PythonCharmers/python-future/issues/210
8995 (arguments
8996 `(#:tests? #f))
8997 (home-page "http://python-future.org")
8998 (synopsis "Single-source support for Python 3 and 2")
8999 (description
9000 "@code{python-future} is the missing compatibility layer between Python 2 and
9001Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9002to support both Python 2 and Python 3 with minimal overhead.")
9003 (license license:expat)))
9004
9005(define-public python2-future
9006 (package-with-python2 python-future))
9007
9008(define-public python-cysignals
9009 (package
9010 (name "python-cysignals")
8e3e51df 9011 (version "1.9.0")
44d10b1f
RW
9012 (source
9013 (origin
9014 (method url-fetch)
8e3e51df 9015 (uri (pypi-uri "cysignals" version))
44d10b1f
RW
9016 (sha256
9017 (base32
8e3e51df 9018 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
44d10b1f
RW
9019 (build-system python-build-system)
9020 (native-inputs
9021 `(("python-cython" ,python-cython)
9022 ("python-sphinx" ,python-sphinx)))
9023 (inputs
9024 `(("pari-gp" ,pari-gp)))
9025 (arguments
9026 `(#:modules ((guix build python-build-system)
9027 ((guix build gnu-build-system) #:prefix gnu:)
9028 (guix build utils))
9029 ;; FIXME: Tests are executed after installation and currently fail
9030 ;; when not installing into standard locations; the author is working
9031 ;; on a fix.
9032 #:tests? #f
9033 #:phases
9034 (modify-phases %standard-phases
9035 (add-before
9036 'build 'configure
9037 (assoc-ref gnu:%standard-phases 'configure)))))
9038 (home-page
9039 "https://github.com/sagemath/cysignals")
9040 (synopsis
9041 "Handling of interrupts and signals for Cython")
9042 (description
9043 "The cysignals package provides mechanisms to handle interrupts (and
9044other signals and errors) in Cython code, using two related approaches,
9045for mixed Cython/Python code or external C libraries and pure Cython code,
9046respectively.")
9047 (license license:lgpl3+)))
9048
9049(define-public python2-cysignals
9050 (package-with-python2 python-cysignals))
9051
9052(define-public python2-shedskin
9053 (package
9054 (name "python2-shedskin")
9055 (version "0.9.4")
9056 (source
9057 (origin
9058 (method url-fetch)
9059 (uri (string-append "https://github.com/shedskin/shedskin/"
9060 "releases/download/v" version
9061 "/shedskin-" version ".tgz"))
9062 (sha256
9063 (base32
9064 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9065 (build-system python-build-system)
9066 (arguments
9067 `(#:python ,python-2
9068 #:phases (modify-phases %standard-phases
9069 (add-after 'unpack 'fix-resulting-include-libs
9070 (lambda* (#:key inputs #:allow-other-keys)
9071 (let ((libgc (assoc-ref inputs "libgc"))
9072 (pcre (assoc-ref inputs "pcre")))
9073 (substitute* "shedskin/makefile.py"
9074 (("variable == 'CCFLAGS':[ ]*")
9075 (string-append "variable == 'CCFLAGS':\n"
9076 " line += ' -I " pcre "/include"
9077 " -I " libgc "/include'"))
9078 (("variable == 'LFLAGS':[ ]*")
9079 (string-append "variable == 'LFLAGS':\n"
9080 " line += ' -L" pcre "/lib"
9081 " -L " libgc "/lib'")))
9082 #t))))))
9083 (inputs `(("pcre" ,pcre)
9084 ("libgc" ,libgc)))
9085 (home-page "https://shedskin.github.io/")
9086 (synopsis "Experimental Python-2 to C++ Compiler")
9087 (description (string-append "This is an experimental compiler for a subset of
9088Python. It generates C++ code and a Makefile."))
9089 (license (list license:gpl3 license:bsd-3 license:expat))))
9090
9091(define-public python2-rope
9092 (package
9093 (name "python2-rope")
a9ba0a31 9094 (version "0.11.0")
44d10b1f
RW
9095 (source
9096 (origin
9097 (method url-fetch)
9098 (uri (pypi-uri "rope" version))
9099 (sha256
9100 (base32
a9ba0a31 9101 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
44d10b1f 9102 (arguments
afb29715 9103 ;; Rope has only partial python3 support, see `python-rope'
44d10b1f
RW
9104 `(#:python ,python-2))
9105 (build-system python-build-system)
9106 (native-inputs
9107 `(("python2-unittest2" ,python2-unittest2)))
9108 (home-page "https://github.com/python-rope/rope")
9109 (synopsis "Refactoring library for Python")
9110 (description "Rope is a refactoring library for Python. It facilitates
9111the renaming, moving and extracting of attributes, functions, modules, fields
9112and parameters in Python 2 source code. These refactorings can also be applied
9113to occurrences in strings and comments.")
9114 (license license:gpl2)))
9115
2c880ef4
LC
9116(define-public python-rope
9117 (package
9118 (inherit python2-rope)
9119 (name "python-rope")
9120 (arguments `(#:python ,python-wrapper
9121 ;; XXX: Only partial python3 support, results in some failing
9122 ;; tests: <https://github.com/python-rope/rope/issues/247>.
9123 #:tests? #f))
9124 (properties `((python2-variant . ,(delay python2-rope))))))
9125
44d10b1f
RW
9126(define-public python-py3status
9127 (package
9128 (name "python-py3status")
77f3d303 9129 (version "3.16")
44d10b1f
RW
9130 (source
9131 (origin
9132 (method url-fetch)
9133 (uri (pypi-uri "py3status" version))
9134 (sha256
9135 (base32
77f3d303 9136 "1xrfph277bgjln3jbpzpgkhxad04fjvj7s3xfil42q1sxi4s3q3g"))))
44d10b1f
RW
9137 (build-system python-build-system)
9138 (inputs
9139 `(("file" ,file)))
9140 (arguments
9141 '(#:phases
9142 (modify-phases %standard-phases
9143 ;; 'file' is used for detection of configuration file encoding
9144 ;; let's make link the dependency to particular input
9145 (add-before 'build 'patch-file-path
9146 (lambda* (#:key inputs #:allow-other-keys)
9147 (let ((file-path (assoc-ref inputs "file")))
9148 (substitute* "py3status/parse_config.py"
9149 (("\\['file', '-b'")
9150 (string-append "['" file-path "/bin/file', '-b'")))
9151 #t))))
9152 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
9153 (home-page "https://github.com/ultrabug/py3status")
9154 (synopsis "Extensible i3status wrapper written in Python")
9155 (description "py3status is an i3status wrapper which extends i3status
9156functionality in a modular way, allowing you to extend your panel with your
9157own code, responding to click events and updating clock every second.")
9158 (license license:bsd-3)))
9159
9160(define-public python-tblib
9161 (package
9162 (name "python-tblib")
9163 (version "1.3.2")
9164 (source (origin
9165 (method url-fetch)
9166 (uri (pypi-uri "tblib" version))
9167 (sha256 (base32
9168 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
9169 (build-system python-build-system)
9170 (arguments
9171 `(#:phases
9172 (modify-phases %standard-phases
9173 (add-before 'check 'adjust-tests
9174 (lambda _
9175 (when (which "python3")
9176 ;; Adjust the example output to match that of Python 3.7:
9177 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
9178 (substitute* "README.rst"
9179 (("Exception\\('fail',") "Exception('fail'"))
9180 #t)))
9181 (replace 'check
9182 (lambda _
9183 ;; Upstream runs tests after installation and the package itself
9184 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
9185 ;; found.
9186 (setenv "PYTHONPATH"
9187 (string-append (getcwd) "/build/lib:"
9188 (getenv "PYTHONPATH")))
9189 (invoke "py.test" "-vv" "tests" "README.rst"))))))
9190 (native-inputs
9191 `(("python-pytest" ,python-pytest)
9192 ("python-six" ,python-six)))
9193 (home-page "https://github.com/ionelmc/python-tblib")
9194 (synopsis "Traceback serialization library")
9195 (description
9196 "Traceback serialization allows you to:
9197
9198@enumerate
9199@item Pickle tracebacks and raise exceptions with pickled tracebacks in
9200different processes. This allows better error handling when running code over
9201multiple processes (imagine multiprocessing, billiard, futures, celery etc).
9202
9203@item Parse traceback strings and raise with the parsed tracebacks.
9204@end enumerate\n")
9205 (license license:bsd-3)))
9206
9207(define-public python2-tblib
9208 (package-with-python2 python-tblib))
9209
9210(define-public python-greenlet
9211 (package
9212 (name "python-greenlet")
9213 (version "0.4.15")
9214 (source (origin
9215 (method url-fetch)
9216 (uri (pypi-uri "greenlet" version))
9217 (sha256
9218 (base32
9219 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
9220 (build-system python-build-system)
9221 (home-page "https://greenlet.readthedocs.io/")
9222 (synopsis "Lightweight in-process concurrent programming")
9223 (description
9224 "Greenlet package is a spin-off of Stackless, a version of CPython
9225that supports micro-threads called \"tasklets\". Tasklets run
9226pseudo-concurrently (typically in a single or a few OS-level threads) and
9227are synchronized with data exchanges on \"channels\".")
9228 (license (list license:psfl license:expat))))
9229
9230(define-public python2-greenlet
9231 (package-with-python2 python-greenlet))
9232
9233(define-public python-objgraph
9234 (package
9235 (name "python-objgraph")
9236 (version "3.4.0")
9237 (source
9238 (origin
9239 (method url-fetch)
9240 (uri (pypi-uri "objgraph" version))
9241 (sha256
9242 (base32
9243 "184m09am5gpbqfaiy7l0hwh476mczbrly1dffs0rw2p1d1i2q32a"))))
9244 (build-system python-build-system)
9245 (propagated-inputs
9246 `(("python-graphviz" ,python-graphviz)))
9247 (native-inputs
9248 `(("python-mock" ,python-mock)
9249 ("graphviz" ,graphviz)))
9250 (home-page "https://mg.pov.lt/objgraph/")
9251 (synopsis "Draw Python object reference graphs with graphviz")
9252 (description
9253 "This package provides tools to draw Python object reference graphs with
9254graphviz.")
9255 (license license:expat)))
9256
9257(define-public python-gevent
9258 (package
9259 (name "python-gevent")
9260 (version "1.3.7")
9261 (source (origin
9262 (method url-fetch)
9263 (uri (pypi-uri "gevent" version))
9264 (sha256
9265 (base32
9266 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
9267 (modules '((guix build utils)))
9268 (snippet
9269 '(begin
9270 ;; unbunding libev and c-ares
9271 (delete-file-recursively "deps")
9272 #t))))
9273 (build-system python-build-system)
9274 (arguments
9275 `(#:modules ((ice-9 ftw)
9276 (ice-9 match)
9277 (srfi srfi-26)
9278 (guix build utils)
9279 (guix build python-build-system))
9280 #:phases (modify-phases %standard-phases
9281 (add-after 'unpack 'unpack-libev
9282 (lambda* (#:key inputs #:allow-other-keys)
9283 (mkdir-p "deps/libev")
9284 ;; FIXME: gevent requires building libev, even though
9285 ;; it only links against the proper one.
9286 (invoke "tar" "-xf" (assoc-ref inputs "libev-source")
9287 "--strip-components=1" "-C" "deps/libev")))
9288 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
9289 (lambda _
9290 (substitute* "src/gevent/subprocess.py"
9291 (("/bin/sh") (which "sh")))
9292 (for-each (lambda (file)
9293 (substitute* file
9294 (("/bin/sh") (which "sh"))
9295 (("/bin/true") (which "true"))))
9296 (find-files "src/greentest" "\\.py$"))
9297 #t))
9298 (add-before 'build 'do-not-use-bundled-sources
9299 (lambda* (#:key inputs #:allow-other-keys)
9300 (setenv "CONFIG_SHELL" (which "bash"))
9301 (setenv "LIBEV_EMBED" "false")
9302 (setenv "CARES_EMBED" "false")
9303 (setenv "EMBED" "false")
9304
9305 (let ((greenlet (string-append
9306 (assoc-ref inputs "python-greenlet")
9307 "/include")))
9308 (match (scandir greenlet
9309 (lambda (item)
9310 (string-prefix? "python" item)))
9311 ((python)
9312 (setenv "CPATH"
9313 (string-append greenlet "/" python)))))
9314 #t))
9315 (add-before 'check 'skip-timer-test
9316 (lambda _
9317 ;; XXX: Skip 'TestTimerResolution', which appears to be
9318 ;; unreliable.
9319 (substitute* "src/greentest/test__core_timer.py"
9320 (("not greentest.RUNNING_ON_CI") "False"))
9321 #t))
9322 (replace 'check
9323 (lambda _
9324 ;; Make sure the build directory is on PYTHONPATH.
9325 (setenv "PYTHONPATH"
9326 (string-append
9327 (getenv "PYTHONPATH") ":"
9328 (getcwd) "/build/"
9329 (car (scandir "build" (cut string-prefix? "lib." <>)))))
9330 (with-directory-excursion "src/greentest"
9331 ;; XXX: Many tests require network access. Instead we only
9332 ;; run known-good tests. Unfortunately we cannot use
9333 ;; recursion here since this directory also contains
9334 ;; Python-version-specific subfolders.
9335 (apply invoke "python" "testrunner.py" "--config"
9336 "known_failures.py"
9337 (scandir "." (cut regexp-exec
9338 (make-regexp "test_+(subprocess|core)")
9339 <>)))))))))
9340 (propagated-inputs
9341 `(("python-greenlet" ,python-greenlet)
9342 ("python-objgraph" ,python-objgraph)))
9343 (native-inputs
9344 `(("libev-source" ,(package-source libev))
9345 ("python-six" ,python-six)))
9346 (inputs
9347 `(("c-ares" ,c-ares)
9348 ("libev" ,libev)))
9349 (home-page "http://www.gevent.org/")
9350 (synopsis "Coroutine-based network library")
9351 (description
9352 "gevent is a coroutine-based Python networking library that uses greenlet
9353to provide a high-level synchronous API on top of the libev event loop.")
9354 (license license:expat)
9355 (properties `((python2-variant . ,(delay python2-gevent))))))
9356
9357(define-public python2-gevent
9358 (let ((base (package-with-python2
9359 (strip-python2-variant python-gevent))))
9360 (package
9361 (inherit base)
9362 (native-inputs `(,@(package-native-inputs python-gevent)
9363 ("python-mock" ,python2-mock))))))
9364
9365(define-public python-fastimport
9366 (package
9367 (name "python-fastimport")
9368 (version "0.9.6")
9369 (source
9370 (origin
9371 (method url-fetch)
9372 (uri (pypi-uri "fastimport" version))
9373 (sha256
9374 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
9375 (build-system python-build-system)
9376 (home-page "https://github.com/jelmer/python-fastimport")
9377 (synopsis "VCS fastimport parser and generator in Python")
9378 (description "This package provides a parser for and generator of the Git
9379@url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
9380format.")
9381 (license license:gpl2+)))
9382
9383(define-public python2-fastimport
9384 (package-with-python2 python-fastimport))
9385
9386(define-public python-twisted
9387 (package
9388 (name "python-twisted")
e5ba2fe3 9389 (version "17.5.0")
44d10b1f
RW
9390 (source (origin
9391 (method url-fetch)
9392 (uri (pypi-uri "Twisted" version ".tar.bz2"))
9393 (sha256
9394 (base32
e5ba2fe3 9395 "1sh2h23nnizcdyrl2rn7zxijglikxwz7z7grqpvq496zy2aa967i"))))
44d10b1f
RW
9396 (build-system python-build-system)
9397 (arguments
9398 '(#:tests? #f)) ; FIXME: Some tests are failing.
9399 ;; #:phases
9400 ;; (modify-phases %standard-phases
9401 ;; (replace 'check
9402 ;; (lambda _
9403 ;; (zero? (system* "./bin/trial" "twisted")))))
9404 (propagated-inputs
9405 `(("python-zope-interface" ,python-zope-interface)
9406 ("python-incremental" ,python-incremental)
e5ba2fe3 9407 ("python-hyperlink" ,python-hyperlink)
44d10b1f
RW
9408 ("python-constantly" ,python-constantly)
9409 ("python-automat" ,python-automat)))
9410 (home-page "https://twistedmatrix.com/")
9411 (synopsis "Asynchronous networking framework written in Python")
9412 (description
9413 "Twisted is an extensible framework for Python programming, with special
9414focus on event-based network programming and multiprotocol integration.")
9415 (license license:expat)))
9416
9417(define-public python2-twisted
9418 (package-with-python2 python-twisted))
9419
9420(define-public python-pika
9421 (package
9422 (name "python-pika")
9423 (version "0.12.0")
9424 (source
9425 (origin
9426 (method url-fetch)
9427 (uri (pypi-uri "pika" version))
9428 (sha256
9429 (base32
9430 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
9431 (build-system python-build-system)
9432 (native-inputs
9433 `(("python-pyev" ,python-pyev)
9434 ("python-tornado" ,python-tornado)
9435 ("python-twisted" ,python-twisted)))
9436 (home-page "https://pika.readthedocs.org")
9437 (synopsis "Pure Python AMQP Client Library")
9438 (description
9439 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
9440Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
9441network support library.")
9442 (license license:bsd-3)))
9443
9444(define-public python2-pika
9445 (package-with-python2 python-pika))
9446
9447(define-public python-ply
9448 (package
9449 (name "python-ply")
9450 (version "3.10")
9451 (source
9452 (origin
9453 (method url-fetch)
9454 (uri (pypi-uri "ply" version))
9455 (sha256
9456 (base32
9457 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
9458 (build-system python-build-system)
9459 (home-page "http://www.dabeaz.com/ply/")
9460 (synopsis "Python Lex & Yacc")
9461 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
9462It uses LR parsing and does extensive error checking.")
9463 (license license:bsd-3)))
9464
9465(define-public python2-ply
9466 (package-with-python2 python-ply))
9467
9468(define-public python-tabulate
9469 (package
9470 (name "python-tabulate")
9471 (version "0.7.7")
9472 (source (origin
9473 (method url-fetch)
9474 (uri (pypi-uri "tabulate" version))
9475 (sha256
9476 (base32
9477 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
9478 (build-system python-build-system)
9479 (arguments
9480 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
9481 ;; and the latest release is not tagged in the upstream repository.
9482 '(#:tests? #f))
9483 (home-page "https://bitbucket.org/astanin/python-tabulate")
9484 (synopsis "Pretty-print tabular data")
9485 (description
9486 "Tabulate is a library and command-line utility to pretty-print tabular
9487data in Python.")
9488 (license license:expat)))
9489
9490(define-public python2-tabulate
9491 (package-with-python2 python-tabulate))
9492
9493(define-public python-kazoo
9494 (package
9495 (name "python-kazoo")
9496 (version "2.4.0")
9497 (source
9498 (origin
9499 (method url-fetch)
9500 (uri (pypi-uri "kazoo" version))
9501 (sha256
9502 (base32
9503 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
9504 (build-system python-build-system)
9505 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
9506 (propagated-inputs
9507 `(("python-six" ,python-six)))
9508 (home-page "https://kazoo.readthedocs.org")
9509 (synopsis "High-level Zookeeper client library")
9510 (description
9511 "Kazoo is a Python client library for the Apache Zookeeper distributed
9512application service. It is designed to be easy to use and to avoid common
9513programming errors.")
9514 (license license:asl2.0)))
9515
9516(define-public python2-kazoo
9517 (package-with-python2 python-kazoo))
9518
9519(define-public python-pykafka
9520 (package
9521 (name "python-pykafka")
9522 (version "2.4.0")
9523 (source (origin
9524 (method url-fetch)
0ca1d040 9525 (uri (pypi-uri "pykafka" version))
44d10b1f
RW
9526 (sha256
9527 (base32
9528 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
9529 (build-system python-build-system)
9530 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
9531 (propagated-inputs
9532 `(("python-gevent" ,python-gevent)
9533 ("python-kazoo" ,python-kazoo)
9534 ("python-tabulate" ,python-tabulate)))
9535 (inputs
9536 `(("librdkafka" ,librdkafka)))
9537 (home-page "https://pykafka.readthedocs.io/")
9538 (synopsis "Apache Kafka client for Python")
9539 (description
9540 "PyKafka is a client for the Apache Kafka distributed messaging system.
9541It includes Python implementations of Kafka producers and consumers, which
9542are optionally backed by a C extension built on librdkafka.")
9543 (license license:asl2.0)))
9544
9545(define-public python2-pykafka
9546 (package-with-python2 python-pykafka))
9547
9548(define-public python-wcwidth
9549 (package
9550 (name "python-wcwidth")
9551 (version "0.1.7")
9552 (source
9553 (origin
9554 (method url-fetch)
9555 (uri (pypi-uri "wcwidth" version))
9556 (sha256
9557 (base32
9558 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
9559 (build-system python-build-system)
9560 (home-page "https://github.com/jquast/wcwidth")
9561 (synopsis "Measure number of terminal column cells of wide-character codes")
9562 (description "Wcwidth measures the number of terminal column cells of
9563wide-character codes. It is useful for those implementing a terminal emulator,
9564or programs that carefully produce output to be interpreted by one. It is a
9565Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
9566specified in POSIX.1-2001 and POSIX.1-2008.")
9567 (license license:expat)))
9568
9569(define-public python2-wcwidth
9570 (package-with-python2 python-wcwidth))
9571
9572(define-public python2-jsonrpclib
9573 (package
9574 (name "python2-jsonrpclib")
9575 (version "0.1.7")
9576 (source (origin
9577 (method url-fetch)
6571bba0 9578 (uri (pypi-uri "jsonrpclib" version))
44d10b1f
RW
9579 (sha256
9580 (base32
9581 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
9582 (build-system python-build-system)
9583 (arguments
9584 `(#:tests? #f
9585 #:python ,python-2))
9586 (home-page "https://github.com/joshmarshall/jsonrpclib/")
9587 (synopsis "Implementation of JSON-RPC specification for Python")
9588 (description
9589 "This library is an implementation of the JSON-RPC specification.
9590It supports both the original 1.0 specification, as well as the
9591new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
9592etc.")
9593 (license license:asl2.0)))
9594
9595(define-public python-chai
9596 (package
9597 (name "python-chai")
9598 (version "1.1.2")
9599 (source (origin
9600 (method url-fetch)
9601 (uri (pypi-uri "chai" version))
9602 (sha256
9603 (base32
9604 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
9605 (build-system python-build-system)
9606 (home-page "https://github.com/agoragames/chai")
9607 (synopsis "Mocking framework for Python")
9608 (description
9609 "Chai provides an api for mocking, stubbing and spying your python
9610objects, patterned after the Mocha library for Ruby.")
9611 (license license:bsd-3)))
9612
9613(define-public python2-chai
9614 (package-with-python2 python-chai))
9615
9616(define-public python-inflection
9617 (package
9618 (name "python-inflection")
9619 (version "0.3.1")
9620 (source
9621 (origin (method url-fetch)
9622 (uri (pypi-uri "inflection" version))
9623 (sha256
9624 (base32
9625 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
9626 (build-system python-build-system)
9627 (native-inputs
9628 `(("python-pytest" ,python-pytest)))
9629 (home-page "https://github.com/jpvanhal/inflection")
9630 (synopsis "Python string transformation library")
9631 (description
9632 "Inflection is a string transformation library. It singularizes
9633and pluralizes English words, and transforms strings from CamelCase to
9634underscored string.")
9635 (license license:expat)))
9636
9637(define-public python2-inflection
9638 (package-with-python2 python-inflection))
9639
9640(define-public python-pylev
9641 (package
9642 (name "python-pylev")
9643 (version "1.3.0")
9644 (source (origin
9645 (method url-fetch)
9646 (uri (pypi-uri "pylev" version))
9647 (sha256
9648 (base32
9649 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
9650 (build-system python-build-system)
9651 (home-page "https://github.com/toastdriven/pylev")
9652 (synopsis "Levenshtein distance implementation in Python")
9653 (description "Pure Python Levenshtein implementation, based off the
9654Wikipedia code samples at
9655@url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
9656 (license license:bsd-3)))
9657
9658(define-public python2-pylev
9659 (package-with-python2 python-pylev))
9660
9661(define-public python-cleo
9662 (package
9663 (name "python-cleo")
9664 (version "0.6.1")
9665 (source (origin
9666 (method url-fetch)
9667 (uri (pypi-uri "cleo" version))
9668 (sha256
9669 (base32
9670 "0q1cf0szr0d54am4pypzwdnm74zpladdsinad94c2fz5i06fdpf7"))))
9671 (build-system python-build-system)
9672 (native-inputs
9673 `(;; For testing
9674 ("python-mock" ,python-mock)
9675 ("python-pytest-mock" ,python-pytest-mock)
9676 ("python-pytest" ,python-pytest)))
9677 (propagated-inputs
9678 `(("python-backpack" ,python-backpack)
9679 ("python-pastel" ,python-pastel)
9680 ("python-pylev" ,python-pylev)))
9681 (home-page "https://github.com/sdispater/cleo")
9682 (synopsis "Command-line arguments library for Python")
9683 (description
9684 "Cleo allows you to create command-line commands with signature in
9685docstring and colored output.")
9686 (license license:expat)))
9687
9688(define-public python2-cleo
9689 (package-with-python2 python-cleo))
9690
9691(define-public python-lazy-object-proxy
9692 (package
9693 (name "python-lazy-object-proxy")
9694 (version "1.3.1")
9695 (source (origin
9696 (method url-fetch)
9697 (uri (pypi-uri "lazy-object-proxy" version))
9698 (sha256
9699 (base32
9700 "0yha7q9bhw857fwaby785d63mffhngl9npwzlk9i0pwlkwvbx4gb"))))
9701 (build-system python-build-system)
9702 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
9703 (synopsis "Lazy object proxy for python")
9704 (description
9705 "Lazy object proxy is an object that wraps a callable but defers the call
9706until the object is actually required, and caches the result of said call.")
9707 (license license:bsd-2)))
9708
9709(define-public python2-lazy-object-proxy
9710 (package-with-python2 python-lazy-object-proxy))
9711
9712(define-public python-dnspython
9713 (package
9714 (name "python-dnspython")
9715 (version "1.15.0")
9716 (source (origin
9717 (method url-fetch)
9718 (uri (string-append "http://www.dnspython.org/kits/"
9719 version "/dnspython-" version ".tar.gz"))
9720 (sha256
9721 (base32
9722 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
9723 (build-system python-build-system)
9724 (arguments '(#:tests? #f)) ; XXX: requires internet access
9725 (home-page "http://www.dnspython.org")
9726 (synopsis "DNS toolkit for Python")
9727 (description
9728 "dnspython is a DNS toolkit for Python. It supports almost all record
9729types. It can be used for queries, zone transfers, and dynamic updates.
9730It supports TSIG authenticated messages and EDNS0.")
9731 (license license:expat)))
9732
9733(define-public python2-dnspython
9734 (package-with-python2 python-dnspython))
9735
9736(define-public python-email-validator
9737 (package
9738 (name "python-email-validator")
9739 (version "1.0.2")
9740 (source
9741 (origin (method url-fetch)
9742 (uri (pypi-uri "email_validator" version))
9743 (sha256
9744 (base32
9745 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
9746 (build-system python-build-system)
9747 (arguments
9748 '(#:phases
9749 (modify-phases %standard-phases
9750 (add-before 'build 'use-dnspython
9751 (lambda _
9752 (substitute* "setup.py"
9753 (("dnspython3") "dnspython"))
9754 #t)))))
9755 (propagated-inputs
9756 `(("python-dnspython" ,python-dnspython)
9757 ("python-idna" ,python-idna)))
9758 (home-page "https://github.com/JoshData/python-email-validator")
9759 (synopsis "Email address validation library for Python")
9760 (description
9761 "This library validates email address syntax and deliverability.")
9762 (license license:cc0)))
9763
9764(define-public python2-email-validator
9765 (package-with-python2 python-email-validator))
9766
9767(define-public python-ukpostcodeparser
9768 (package
9769 (name "python-ukpostcodeparser")
9770 (version "1.0.3")
9771 (source (origin
9772 (method url-fetch)
9773 (uri (pypi-uri "UkPostcodeParser" version))
9774 (sha256
9775 (base32
9776 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
9777 (build-system python-build-system)
9778 (home-page "https://github.com/hamstah/ukpostcodeparser")
9779 (synopsis "UK Postcode parser for Python")
9780 (description
9781 "This library provides the @code{parse_uk_postcode} function for
9782parsing UK postcodes.")
9783 (license license:expat)))
9784
9785(define-public python2-ukpostcodeparser
9786 (package-with-python2 python-ukpostcodeparser))
9787
9788(define-public python-faker
9789 (package
9790 (name "python-faker")
9791 (version "0.7.9")
9792 (source (origin
9793 (method url-fetch)
9794 (uri (pypi-uri "Faker" version))
9795 (sha256
9796 (base32
9797 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
9798 (patches
9799 (search-patches "python-faker-fix-build-32bit.patch"))
9800 (modules '((guix build utils)))
9801 (snippet
9802 '(begin
9803 (for-each delete-file (find-files "." "\\.pyc$"))
9804 #t))))
9805 (build-system python-build-system)
9806 (arguments
9807 '(#:phases
9808 (modify-phases %standard-phases
9809 (replace 'check
49ff8827 9810 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
44d10b1f
RW
9811 (native-inputs
9812 `(;; For testing
9813 ("python-email-validator" ,python-email-validator)
9814 ("python-mock" ,python-mock)
9815 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
9816 (propagated-inputs
9817 `(("python-dateutil" ,python-dateutil)
9818 ("python-six" ,python-six)))
9819 (home-page "https://github.com/joke2k/faker")
9820 (synopsis "Python package that generates fake data")
9821 (description
9822 "Faker is a Python package that generates fake data such as names,
9823addresses, and phone numbers.")
9824 (license license:expat)
9825 (properties `((python2-variant . ,(delay python2-faker))))))
9826
9827(define-public python2-faker
9828 (let ((base (package-with-python2 (strip-python2-variant
9829 python-faker))))
9830 (package
9831 (inherit base)
9832 (propagated-inputs
9833 `(("python2-ipaddress" ,python2-ipaddress)
9834 ,@(package-propagated-inputs base))))))
9835
9836(define-public python-pyaml
9837 (package
9838 (name "python-pyaml")
9839 (version "18.11.0")
9840 (source (origin
9841 (method url-fetch)
9842 (uri (pypi-uri "pyaml" version))
9843 (sha256
9844 (base32
9845 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
9846 (build-system python-build-system)
9847 (native-inputs
9848 `(("python-unidecode" ,python-unidecode)))
9849 (propagated-inputs
9850 `(("python-pyyaml" ,python-pyyaml)))
9851 (home-page "https://github.com/mk-fg/pretty-yaml")
9852 (synopsis "YAML pretty-print library for Python")
9853 (description
9854 "pyaml is a PyYAML based python module to produce pretty and readable
9855YAML-serialized data.")
9856 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
9857
9858(define-public python2-pyaml
9859 (package-with-python2 python-pyaml))
9860
9861(define-public python-backpack
9862 (package
9863 (name "python-backpack")
9864 (version "0.1")
9865 (source
9866 (origin
9867 (method url-fetch)
9868 (uri (pypi-uri "backpack" version))
9869 (sha256
9870 (base32
9871 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
9872 (build-system python-build-system)
9873 (native-inputs
9874 `(("python-pytest" ,python-pytest)
9875 ("python-nose" ,python-nose)))
9876 (propagated-inputs
9877 `(("python-simplejson" ,python-simplejson)))
9878 (home-page "https://github.com/sdispater/backpack")
9879 (synopsis "Utilities for working with Python collections")
9880 (description "Backpack provides some useful utilities for working with
9881collections of data.")
9882 (license license:expat)))
9883
9884(define-public python2-backpack
9885 (package-with-python2 python-backpack))
9886
9887(define-public python-prompt-toolkit
9888 (package
9889 (name "python-prompt-toolkit")
9890 (version "2.0.7")
9891 (source
9892 (origin
9893 (method url-fetch)
9894 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
9895 (sha256
9896 (base32
9897 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
9898 (build-system python-build-system)
9899 (arguments
9900 `(#:phases
9901 (modify-phases %standard-phases
9902 (delete 'check)
9903 (add-after 'install 'post-install-check
9904 (lambda* (#:key inputs outputs #:allow-other-keys)
9905 ;; HOME is needed for the test
9906 ;; "test_pathcompleter_can_expanduser".
9907 (setenv "HOME" "/tmp")
9908 (add-installed-pythonpath inputs outputs)
9909 (invoke "py.test"))))))
9910 (propagated-inputs
9911 `(("python-wcwidth" ,python-wcwidth)
9912 ("python-six" ,python-six)
9913 ("python-pygments" ,python-pygments)))
9914 (native-inputs
9915 `(("python-pytest" ,python-pytest)))
9916 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
9917 (synopsis "Library for building command line interfaces in Python")
9918 (description
9919 "Prompt-Toolkit is a library for building interactive command line
9920interfaces in Python. It's like GNU Readline but it also features syntax
9921highlighting while typing, out-of-the-box multi-line input editing, advanced
9922code completion, incremental search, support for Chinese double-width
9923characters, mouse support, and auto suggestions.")
9924 (license license:bsd-3)))
9925
9926(define-public python2-prompt-toolkit
9927 (package-with-python2 python-prompt-toolkit))
9928
9929(define-public python-prompt-toolkit-1
9930 (package (inherit python-prompt-toolkit)
9931 (version "1.0.15")
9932 (source
9933 (origin
9934 (method url-fetch)
9935 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
9936 (sha256
9937 (base32
9938 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
9939
9940(define-public python2-prompt-toolkit-1
9941 (package-with-python2 python-prompt-toolkit-1))
9942
9943(define-public python-jedi
9944 (package
9945 (name "python-jedi")
40bd0aa3 9946 (version "0.13.2")
44d10b1f
RW
9947 (source
9948 (origin
9949 (method url-fetch)
9950 (uri (pypi-uri "jedi" version))
9951 (sha256
9952 (base32
40bd0aa3 9953 "1za944msp0f8x36qa8l309jhv0kzlsdh7r9nj3z12y8npnsh45sp"))))
44d10b1f
RW
9954 (build-system python-build-system)
9955 (arguments
40bd0aa3 9956 `( ;; Many tests are failing with Python 3.7.x as of version 0.13.2 (see:
44d10b1f
RW
9957 ;; https://github.com/davidhalter/jedi/issues/1263)
9958 #:tests? #f
9959 #:phases
9960 (modify-phases %standard-phases
9961 (replace 'check
9962 (lambda* (#:key tests? #:allow-other-keys)
9963 (when tests?
9964 (invoke "py.test" "-vv")))))))
9965 (native-inputs
9966 `(("python-pytest" ,python-pytest)
9967 ("python-docopt" ,python-docopt)))
9968 (propagated-inputs
9969 `(("python-parso" ,python-parso)))
9970 (home-page "https://github.com/davidhalter/jedi")
9971 (synopsis "Autocompletion and static analysis library for Python")
9972 (description
9973 "Jedi is a static analysis tool for Python that can be used in Integrated
9974Development Environments (@dfn{IDE}s) and text editors. It understands Python
9975on a deeper level than many other static analysis frameworks for Python.
9976
9977Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
9978well.")
9979 (license license:expat)))
9980
9981(define-public python2-jedi
9982 (package-with-python2 python-jedi))
9983
9984(define-public ptpython
9985 (package
9986 (name "ptpython")
9987 (version "0.34")
9988 (source (origin
9989 (method url-fetch)
9990 (uri (pypi-uri "ptpython" version))
9991 (sha256
9992 (base32
9993 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
9994 (build-system python-build-system)
9995 (arguments
9996 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
9997 (propagated-inputs
9998 `(("python-docopt" ,python-docopt)
9999 ("python-jedi" ,python-jedi)
10000 ("python-prompt-toolkit" ,python-prompt-toolkit)
10001 ("python-pygments" ,python-pygments)))
10002 (home-page "https://github.com/jonathanslenders/ptpython")
10003 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10004 (description
10005 "ptpython is a Python read-eval-print loop with IDE-like features.
10006It supports syntax highlighting, multiline editing, autocompletion, mouse,
10007color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10008etc.")
10009 (license license:bsd-3)
10010 (properties `((python2-variant . ,(delay ptpython-2))))))
10011
10012(define-public ptpython-2
10013 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10014 (package
10015 (inherit base)
10016 (name "ptpython2"))))
10017
10018(define-public python-stem
10019 (package
10020 (name "python-stem")
10021 (version "1.7.0")
10022 (source
10023 (origin
10024 (method url-fetch)
10025 (uri (pypi-uri "stem" version))
10026 (sha256
10027 (base32
10028 "1awiglfiajnx2hva9aqpj3fmdvdb4qg7cwnlfyih827m68y3cq8v"))))
10029 (build-system python-build-system)
10030 (arguments
10031 `(#:phases
10032 (modify-phases %standard-phases
10033 (replace 'check
10034 (lambda _
10035 (invoke "./run_tests.py" "--unit")
10036 #t)))))
10037 (native-inputs
10038 `(("python-mock" ,python-mock)
10039 ("python-pycodestyle" ,python-pycodestyle)
10040 ("python-pyflakes" ,python-pyflakes)))
10041 (home-page "https://stem.torproject.org/")
10042 (synopsis
10043 "Python controller library that allows applications to interact with Tor")
10044 (description
10045 "Stem is a Python controller library for Tor. With it you can use Tor's
10046control protocol to script against the Tor process and read descriptor data
10047relays publish about themselves.")
10048 (license license:lgpl3)))
10049
10050(define-public python2-stem
10051 (package-with-python2 python-stem))
10052
10053(define-public python-pyserial
10054 (package
10055 (name "python-pyserial")
10056 (version "3.1.1")
10057 (source
10058 (origin
10059 (method url-fetch)
10060 (uri (pypi-uri "pyserial" version))
10061 (sha256
10062 (base32
10063 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
10064 (build-system python-build-system)
10065 (arguments
10066 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
10067 ;; #:phases
10068 ;; (modify-phases %standard-phases
10069 ;; (replace 'check
10070 ;; (lambda _
10071 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
10072 (home-page
10073 "https://github.com/pyserial/pyserial")
10074 (synopsis "Python Serial Port Bindings")
10075 (description "@code{pyserial} provide serial port bindings for Python. It
10076supports different byte sizes, stop bits, parity and flow control with RTS/CTS
10077and/or Xon/Xoff. The port is accessed in RAW mode.")
10078 (license license:bsd-3)))
10079
10080(define-public python2-pyserial
10081 (package-with-python2 python-pyserial))
10082
10083(define-public python-kivy
10084 (package
10085 (name "python-kivy")
10086 (version "1.10.1")
10087 (source
10088 (origin
10089 (method url-fetch)
10090 (uri (pypi-uri "Kivy" version))
10091 (file-name (string-append name "-" version ".tar.gz"))
10092 (sha256
10093 (base32
10094 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
10095 (build-system python-build-system)
10096 (arguments
10097 `(#:tests? #f ; Tests require many optional packages
10098 #:phases
10099 (modify-phases %standard-phases
10100 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
10101 (lambda* (#:key inputs #:allow-other-keys)
10102 (setenv "KIVY_SDL2_PATH"
10103 (string-append (assoc-ref inputs "sdl-union")
10104 "/include/SDL2"))
10105 #t)))))
10106 (native-inputs
10107 `(("git" ,git)
10108 ("pkg-config" ,pkg-config)
10109 ("python-cython" ,python-cython)))
10110 (inputs
10111 `(("gstreamer" ,gstreamer)
10112 ("mesa" ,mesa)
10113 ("sdl-union"
10114 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
10115 (home-page "http://kivy.org")
10116 (synopsis
10117 "Multitouch application framework")
10118 (description
10119 "A software library for rapid development of
10120hardware-accelerated multitouch applications.")
10121 (license license:expat)))
10122
10123(define-public python2-kivy
10124 (package-with-python2 python-kivy))
10125
10126(define-public python-kivy-next
10127 (deprecated-package "python-kivy-next" python-kivy))
10128
10129(define-public python2-kivy-next
10130 (deprecated-package "python2-kivy-next" python2-kivy))
10131
10132(define-public python-binaryornot
10133 (package
10134 (name "python-binaryornot")
10135 (version "0.4.4")
10136 (source (origin
10137 (method url-fetch)
10138 (uri (pypi-uri "binaryornot" version))
10139 (sha256
10140 (base32
10141 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
10142 (build-system python-build-system)
10143 (propagated-inputs
10144 `(("python-chardet" ,python-chardet)
10145 ("python-hypothesis" ,python-hypothesis)))
10146 (home-page "https://github.com/audreyr/binaryornot")
10147 (synopsis "Package to check if a file is binary or text")
10148 (description "Ultra-lightweight pure Python package to check if a file is
10149binary or text.")
10150 (license license:bsd-3)
10151 (properties `((python2-variant . ,(delay python2-binaryornot))))))
10152
10153(define-public python2-binaryornot
10154 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
10155 (package (inherit base)
10156 (propagated-inputs
10157 `(("python2-enum34" ,python2-enum34)
10158 ,@(package-propagated-inputs base))))))
10159
10160(define-public python-nltk
10161 (package
10162 (name "python-nltk")
10163 (version "3.2.1")
10164 (source (origin
10165 (method url-fetch)
10166 (uri (pypi-uri "nltk" version))
10167 (sha256
10168 (base32
10169 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
10170 (build-system python-build-system)
10171 (arguments
10172 '(;; The tests require some extra resources to be downloaded.
10173 ;; TODO Try packaging these resources.
10174 #:tests? #f))
10175 (home-page "http://nltk.org/")
10176 (synopsis "Natural Language Toolkit")
10177 (description "It provides interfaces to over 50 corpora and lexical
10178resources such as WordNet, along with a suite of text processing libraries
10179for classification, tokenization, stemming, tagging, parsing, and semantic
10180reasoning, wrappers for natural language processing libraries.")
10181 (license license:asl2.0)))
10182
10183(define-public python2-nltk
10184 (package-with-python2 python-nltk))
10185
10186(define-public python-pymongo
10187 (package
10188 (name "python-pymongo")
10189 (version "3.7.2")
10190 (source (origin
10191 (method url-fetch)
10192 (uri (pypi-uri "pymongo" version))
10193 (sha256
10194 (base32
10195 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
10196 (build-system python-build-system)
10197 (propagated-inputs
10198 `(("python-certifi" ,python-certifi)))
10199 (home-page "https://github.com/mongodb/mongo-python-driver")
10200 (synopsis "Python driver for MongoDB")
10201 (description "Python driver for MongoDB.")
10202 (license license:asl2.0)))
10203
10204(define-public python2-pymongo
10205 (package-with-python2 python-pymongo))
10206
44d10b1f
RW
10207(define-public python-consul
10208 (package
10209 (name "python-consul")
10210 (version "0.6.1")
10211 (source
10212 (origin
10213 (method url-fetch)
10214 (uri (pypi-uri "python-consul" version))
10215 (sha256
10216 (base32
10217 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
10218 (build-system python-build-system)
10219 (arguments
10220 '(#:tests? #f)) ; The tests are not distributed
10221 (propagated-inputs
10222 `(("python-requests" ,python-requests)
10223 ("python-six" ,python-six)))
10224 (home-page "https://github.com/cablehead/python-consul")
10225 (synopsis "Python client for Consul")
10226 (description
10227 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
10228discovery, monitoring and configuration.")
10229 (license license:expat)))
10230
10231(define-public python2-consul
10232 (package-with-python2 python-consul))
10233
10234(define-public python-schematics
10235 (package
10236 (name "python-schematics")
10237 (version "1.1.1")
10238 (source
10239 (origin
10240 (method url-fetch)
10241 (uri (string-append
10242 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
10243 (file-name (string-append name "-" version ".tar.gz"))
10244 (sha256
10245 (base32
10246 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
10247 (build-system python-build-system)
10248 (propagated-inputs
10249 `(("python-six" ,python-six)))
10250 (arguments
10251 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
10252 ; version requirements (eg python-coveralls)
10253 (home-page "https://github.com/schematics/schematics")
10254 (synopsis "Python Data Structures for Humans")
10255 (description "Python Data Structures for Humans.")
10256 (license license:bsd-3)))
10257
10258(define-public python2-schematics
10259 (package-with-python2 python-schematics))
10260
10261(define-public python-odfpy
10262 (package
10263 (name "python-odfpy")
10264 (version "1.3.3")
10265 (source (origin
10266 (method url-fetch)
10267 (uri (pypi-uri "odfpy" version))
10268 (sha256
10269 (base32
10270 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
10271 (arguments
10272 `(#:modules ((srfi srfi-1)
10273 (guix build python-build-system)
10274 (guix build utils))
10275 #:phases
10276 (modify-phases %standard-phases
10277 (replace 'check
10278 ;; The test runner invokes python2 and python3 for test*.py.
10279 ;; To avoid having both in inputs, we replicate it here.
10280 (lambda _
21ccc01d
RW
10281 (for-each (lambda (test-file) (invoke "python" test-file))
10282 (find-files "tests" "^test.*\\.py$"))
10283 #t)))))
44d10b1f
RW
10284 (build-system python-build-system)
10285 (home-page "https://github.com/eea/odfpy")
10286 (synopsis "Python API and tools to manipulate OpenDocument files")
10287 (description "Collection of libraries and utility programs written in
10288Python to manipulate OpenDocument 1.2 files.")
10289 (license
10290 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
10291 ;; number of files with other licenses.
10292 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
10293
10294(define-public python2-odfpy
10295 (package-with-python2 python-odfpy))
10296
10297(define-public python-natsort
10298 (package
10299 (name "python-natsort")
10300 (version "5.4.1")
10301 (source (origin
10302 (method url-fetch)
10303 (uri (pypi-uri "natsort" version))
10304 (sha256
10305 (base32
10306 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
10307 (build-system python-build-system)
10308 (arguments
10309 `(#:modules ((guix build utils)
10310 (guix build python-build-system)
10311 (srfi srfi-1)
10312 (srfi srfi-26)
10313 (ice-9 ftw))
10314 #:phases
10315 (modify-phases %standard-phases
10316 (add-before 'check 'set-cachedir
10317 ;; Tests require write access to $HOME by default
10318 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
10319 (replace 'check
10320 (lambda _
10321 (let ((cwd (getcwd)))
10322 (setenv "PYTHONPATH"
10323 (string-append
10324 cwd "/build/"
10325 (find (cut string-prefix? "lib" <>)
10326 (scandir (string-append cwd "/build")))
10327 ":"
10328 (getenv "PYTHONPATH")))
10329 (invoke "pytest" "-v")))))))
10330 (native-inputs
10331 `(("python-hypothesis" ,python-hypothesis)
10332 ("python-pytest-cov" ,python-pytest-cov)
10333 ("python-pytest-mock" ,python-pytest-mock)
10334 ("python-pytest" ,python-pytest)))
10335 (propagated-inputs ; TODO: Add python-fastnumbers.
10336 `(("python-pyicu" ,python-pyicu)))
10337 (home-page "https://github.com/SethMMorton/natsort")
10338 (synopsis "Natural sorting for python and shell")
10339 (description
10340 "Natsort lets you apply natural sorting on lists instead of
10341lexicographical. If you use the built-in @code{sorted} method in python
10342on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
10343returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
10344function @code{natsorted} that identifies numbers and sorts them separately
10345from strings. It can also sort version numbers, real numbers, mixed types
10346and more, and comes with a shell command @command{natsort} that exposes this
10347functionality in the command line.")
10348 (license license:expat)
10349 (properties `((python2-variant . ,(delay python2-natsort))))))
10350
10351(define-public python2-natsort
10352 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
10353 (package (inherit base)
10354 (native-inputs
10355 `(("python2-pathlib" ,python2-pathlib)
10356 ,@(package-native-inputs base))))))
10357
10358(define-public python-glances
10359 (package
10360 (name "python-glances")
10361 (version "3.0.2")
10362 (source
10363 (origin
10364 (method url-fetch)
10365 (uri (pypi-uri "Glances" version))
10366 (sha256
10367 (base32
10368 "09fxysfp1n16csqvzvawy74qm6a94nvwjf3vcf5gkqp4i6k4vjjy"))))
10369 (build-system python-build-system)
10370 (propagated-inputs
10371 `(("python-psutil" ,python-psutil)))
10372 (home-page
10373 "https://github.com/nicolargo/glances")
10374 (synopsis
10375 "A cross-platform curses-based monitoring tool")
10376 (description
10377 "Glances is a curses-based monitoring tool for a wide variety of platforms.
10378Glances uses the PsUtil library to get information from your system. It monitors
10379CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
10380 (license license:lgpl3+)))
10381
10382(define-public python2-glances
10383 (package-with-python2 python-glances))
10384
10385(define-public python-graphql-core
10386 (package
10387 (name "python-graphql-core")
10388 (version "0.5.3")
10389 (source
10390 (origin
10391 (method url-fetch)
10392 (uri (pypi-uri "graphql-core" version))
10393 (sha256
10394 (base32
10395 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
10396 (build-system python-build-system)
10397 (arguments
10398 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
10399 #:phases
10400 (modify-phases %standard-phases
10401 (add-after 'unpack 'patch-hardcoded-version
10402 (lambda _ (substitute*
10403 "setup.py"
10404 (("'gevent==1.1rc1'") "'gevent'"))
10405 #t)))))
10406 (native-inputs
10407 `(("python-gevent" ,python-gevent)
10408 ("python-mock" ,python-mock)
10409 ("python-pytest-mock" ,python-pytest-mock)))
10410 (propagated-inputs
10411 `(("python-promise" ,python-promise)
10412 ("python-six" ,python-six)))
10413 (home-page "https://github.com/graphql-python/graphql-core")
10414 (synopsis "GraphQL implementation for Python")
10415 (description
10416 "GraphQL implementation for Python. GraphQL is a data query language and
10417runtime designed and used to request and deliver data to mobile and web apps.
10418This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
10419to Python.")
10420 (license license:expat)))
10421
10422(define-public python2-graphql-core
10423 (package-with-python2 python-graphql-core))
10424
10425(define-public python-graphql-relay
10426 (package
10427 (name "python-graphql-relay")
10428 (version "0.4.5")
10429 (source
10430 (origin
10431 (method url-fetch)
10432 (uri (pypi-uri "graphql-relay" version))
10433 (sha256
10434 (base32
10435 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
10436 (build-system python-build-system)
10437 (arguments
10438 '(#:tests? #f)) ; The tests are not distributed
10439 (propagated-inputs
10440 `(("python-graphql-core" ,python-graphql-core)
10441 ("python-promise" ,python-promise)
10442 ("python-six" ,python-six)))
10443 (home-page "https://github.com/graphql-python/graphql-relay-py")
10444 (synopsis "Relay implementation for Python")
10445 (description
10446 "This is a library to allow the easy creation of Relay-compliant servers
10447using the GraphQL Python reference implementation of a GraphQL server. It
10448should be noted that the code is a exact port of the original
10449@url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
10450from Facebook.")
10451 (license license:expat)))
10452
10453(define-public python2-graphql-relay
10454 (package-with-python2 python-graphql-relay))
10455
10456(define-public python-graphene
10457 (package
10458 (name "python-graphene")
10459 (version "0.10.2")
10460 (source
10461 (origin
10462 (method url-fetch)
10463 (uri (pypi-uri "graphene" version))
10464 (sha256
10465 (base32
10466 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
10467 (build-system python-build-system)
10468 (propagated-inputs
10469 `(("python-graphql-core" ,python-graphql-core)
10470 ("python-graphql-relay" ,python-graphql-relay)
10471 ("python-iso8601" ,python-iso8601)
10472 ("python-promise" ,python-promise)
10473 ("python-six" ,python-six)))
10474 (arguments
10475 `(#:tests? #f)) ; no tests/ in the PyPI tarball
10476 (home-page "http://graphene-python.org/")
10477 (synopsis "GraphQL Framework for Python")
10478 (description
10479 "Graphene is a Python library for building GraphQL schemas/types.
10480A GraphQL schema describes your data model, and provides a GraphQL server
10481with an associated set of resolve methods that know how to fetch data.")
10482 (properties `((python2-variant . ,(delay python2-graphene))))
10483 (license license:expat)))
10484
10485(define-public python2-graphene
10486 (let ((base (package-with-python2
10487 (strip-python2-variant python-graphene))))
10488 (package (inherit base)
10489 (native-inputs
10490 `(("python2-sqlalchemy" ,python2-sqlalchemy)
10491 ,@(package-native-inputs base))))))
10492
10493(define-public python-nautilus
10494 (package
10495 (name "python-nautilus")
10496 (version "0.4.9")
10497 (source
10498 (origin
10499 (method url-fetch)
10500 (uri (pypi-uri "nautilus" version))
10501 (sha256
10502 (base32
10503 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
10504 (build-system python-build-system)
10505 (arguments `(#:tests? #f)) ; fails to import test modules
10506 (propagated-inputs
10507 `(("python-bcrypt" ,python-bcrypt)
10508 ("python-click" ,python-click)
10509 ("python-consul" ,python-consul)
10510 ("python-graphene" ,python-graphene)
10511 ("python-jinja2" ,python-jinja2)
10512 ("python-peewee" ,python-peewee)
10513 ("python-pika" ,python-pika)
10514 ("python-tornado" ,python-tornado)
10515 ("python-wtforms" ,python-wtforms)))
10516 (native-inputs
10517 `(("python-nose2" ,python-nose2)))
10518 (home-page "https://github.com/AlecAivazis/nautilus")
10519 (synopsis "Library for creating microservice applications")
10520 (description
10521 "Nautilus is a framework for flux based microservices that looks to
10522provide extendible implementations of common aspects of a cloud so that you can
10523focus on building massively scalable web applications.")
10524 (license license:expat)))
10525
10526(define-public python-snowballstemmer
10527 (package
10528 (name "python-snowballstemmer")
10529 (version "1.2.1")
10530 (source (origin
10531 (method url-fetch)
10532 (uri (pypi-uri "snowballstemmer" version))
10533 (sha256
10534 (base32
10535 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
10536 (build-system python-build-system)
10537 (arguments
10538 `(;; No tests exist
10539 #:tests? #f))
10540 (home-page "https://github.com/shibukawa/snowball_py")
10541 (synopsis "Snowball stemming library collection for Python")
10542 (description "This package provides 16 word stemmer algorithms generated
10543from Snowball algorithms. It includes the 15 original ones plus the Poerter
10544English stemmer.")
10545 (license license:bsd-3)))
10546
10547(define-public python2-snowballstemmer
10548 (package-with-python2 python-snowballstemmer))
10549
10550(define-public python-sphinx-cloud-sptheme
10551 (package
10552 (name "python-sphinx-cloud-sptheme")
10553 (version "1.8.0")
10554 (source (origin
10555 (method url-fetch)
10556 (uri (pypi-uri "cloud_sptheme" version))
10557 (sha256
10558 (base32
10559 "1dniqb6a39yh786f86c4jn666rwnyi1jvzn4616zhcchb7sfdshd"))))
10560 (build-system python-build-system)
10561 ;; FIXME: The 'pypi' release archive does not contain tests.
10562 (arguments '(#:tests? #f))
10563 (native-inputs
10564 `(("python-sphinx" ,python-sphinx)))
10565 (home-page "https://bitbucket.org/ecollins/cloud_sptheme")
10566 (synopsis "'Cloud' theme for Sphinx documenter")
10567 (description "This package contains the \"Cloud\" theme for Sphinx and some
10568related extensions.")
10569 (license license:bsd-3)))
10570
10571(define-public python2-sphinx-cloud-sptheme
10572 (package-with-python2 python-sphinx-cloud-sptheme))
10573
10574(define-public python-sphinx-alabaster-theme
10575 (package
10576 (name "python-sphinx-alabaster-theme")
10577 (version "0.7.12")
10578 (source (origin
10579 (method url-fetch)
10580 (uri (pypi-uri "alabaster" version))
10581 (sha256
10582 (base32
10583 "00nwwjj2d2ym4s2kk217x7jkx1hnczc3fvm8yxbqmsp6b0nxfqd6"))))
10584 (build-system python-build-system)
10585 (propagated-inputs
10586 `(("python-pygments" ,python-pygments)))
10587 (home-page "https://alabaster.readthedocs.io/")
10588 (synopsis "Configurable sidebar-enabled Sphinx theme")
10589 (description "Alabaster is a visually (c)lean, responsive, configurable
10590theme for the Sphinx documentation system. It's the default theme of Sphinx.")
10591 (license license:bsd-3)))
10592
10593(define-public python2-sphinx-alabaster-theme
10594 (package-with-python2 python-sphinx-alabaster-theme))
10595
10596(define-public python-setproctitle
10597(package
10598 (name "python-setproctitle")
10599 (version "1.1.10")
10600 (source
10601 (origin
10602 (method url-fetch)
10603 (uri (pypi-uri "setproctitle" version))
10604 (sha256
10605 (base32
10606 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
10607 (build-system python-build-system)
10608 (arguments
10609 '(#:phases
10610 (modify-phases %standard-phases
10611 (add-before 'check 'patch-Makefile
10612 ;; Stricly this is only required for the python2 variant.
10613 ;; But adding a phase in an inherited package seems to be
10614 ;; cumbersum. So we patch even for python3.
10615 (lambda _
10616 (let ((nose (assoc-ref %build-inputs "python2-nose")))
10617 (when nose
10618 (substitute* "Makefile"
10619 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
10620 (string-append nose "/bin/nosetests "))))
10621 #t)))
10622 (replace 'check
10623 (lambda _
10624 (setenv "PYTHON" (or (which "python3") (which "python")))
10625 (setenv "PYCONFIG" (or (which "python3-config")
10626 (which "python-config")))
10627 (setenv "CC" "gcc")
10628 ;; No need to extend PYTHONPATH to find the built package, since
10629 ;; the Makefile will build anyway
10630 (invoke "make" "check"))))))
10631 (native-inputs
10632 `(("procps" ,procps))) ; required for tests
10633 (home-page
10634 "https://github.com/dvarrazzo/py-setproctitle")
10635 (synopsis
10636 "Setproctitle implementation for Python to customize the process title")
10637 (description "The library allows a process to change its title (as displayed
10638by system tools such as ps and top).
10639
10640Changing the title is mostly useful in multi-process systems, for
10641example when a master process is forked: changing the children's title
10642allows to identify the task each process is busy with. The technique
10643is used by PostgreSQL and the OpenSSH Server for example.")
10644 (license license:bsd-3)
10645 (properties `((python2-variant . ,(delay python2-setproctitle))))))
10646
10647(define-public python2-setproctitle
10648 (let ((base (package-with-python2
10649 (strip-python2-variant python-setproctitle))))
10650 (package
10651 (inherit base)
10652 (native-inputs `(("python2-nose" ,python2-nose)
10653 ,@(package-native-inputs base))))))
10654
10655(define-public python-validictory
10656 (package
10657 (name "python-validictory")
10658 (version "1.0.1")
10659 (source
10660 (origin
10661 (method url-fetch)
10662 (uri (pypi-uri "validictory" version))
10663 (sha256
10664 (base32
10665 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
10666 (build-system python-build-system)
10667 (arguments
10668 '(#:phases
10669 (modify-phases %standard-phases
10670 (add-after 'unpack 'bootstrap
10671 ;; Move the tests out of the package directory to avoid
10672 ;; packaging them.
10673 (lambda* _
10674 (rename-file "validictory/tests" "tests")
10675 (delete-file "tests/__init__.py")))
10676 (replace 'check
10677 (lambda _
10678 ;; Extend PYTHONPATH so the built package will be found.
10679 (setenv "PYTHONPATH"
10680 (string-append (getcwd) "/build/lib:"
10681 (getenv "PYTHONPATH")))
6568bd5d 10682 (invoke "py.test" "-vv" ))))))
44d10b1f
RW
10683 (native-inputs
10684 `(("python-pytest" ,python-pytest)))
10685 (home-page
10686 "https://github.com/jamesturk/validictory")
10687 (synopsis "General purpose Python data validator")
10688 (description "It allows validation of arbitrary Python data structures.
10689
10690The schema format is based on the JSON Schema
10691proposal (http://json-schema.org), so combined with json the library is also
10692useful as a validator for JSON data.")
10693 (license license:expat)))
10694
10695(define-public python2-validictory
10696 (package-with-python2 python-validictory))
10697
10698(define-public python-pyelftools
10699 (package
10700 (name "python-pyelftools")
10701 (version "0.25")
10702 (source
10703 (origin
10704 (method url-fetch)
10705 (uri (pypi-uri "pyelftools" version))
10706 (sha256
10707 (base32
10708 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
10709 (build-system python-build-system)
10710 (arguments
10711 `(#:phases
10712 (modify-phases %standard-phases
10713 (add-before 'check 'set-pythonpath
10714 (lambda _
10715 (setenv "PYTHONPATH"
10716 (string-append
10717 (getcwd) "/test/"
10718 ":" (getenv "PYTHONPATH")))
10719 #t)))))
10720 (home-page
10721 "https://github.com/eliben/pyelftools")
10722 (synopsis
10723 "Analyze binary and library file information")
10724 (description "This Python library provides interfaces for parsing and
10725analyzing two binary and library file formats; the Executable and Linking
10726Format (ELF), and debugging information in the Debugging With Attributed
10727Record Format (DWARF).")
10728 (license license:public-domain)))
10729
10730(define-public python-pyev
10731 (package
10732 (name "python-pyev")
10733 (version "0.9.0")
10734 (source
10735 (origin
10736 (method url-fetch)
10737 (uri (pypi-uri "pyev" version))
10738 (sha256
10739 (base32
10740 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
10741 (build-system python-build-system)
10742 (arguments
10743 `(#:tests? #f ; no test suite
10744 #:phases
10745 (modify-phases %standard-phases
10746 (add-after 'unpack 'patch
10747 (lambda* (#:key inputs #:allow-other-keys)
10748 (let ((libev (string-append (assoc-ref inputs "libev")
10749 "/lib/libev.so.4")))
10750 (substitute* "setup.py"
10751 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
10752 (string-append "libev_dll_name = \"" libev "\"")))))))))
10753 (inputs
10754 `(("libev" ,libev)))
10755 (home-page "http://pythonhosted.org/pyev/")
10756 (synopsis "Python libev interface")
10757 (description "Pyev provides a Python interface to libev.")
10758 (license license:gpl3)))
10759
10760(define-public python2-pyev
10761 (package-with-python2 python-pyev))
10762
10763(define-public python-imagesize
10764 (package
10765 (name "python-imagesize")
10766 (version "1.1.0")
10767 (source
10768 (origin
10769 (method url-fetch)
10770 (uri (pypi-uri "imagesize" version))
10771 (sha256
10772 (base32
10773 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
10774 (build-system python-build-system)
10775 (home-page "https://github.com/shibukawa/imagesize_py")
10776 (synopsis "Gets image size of files in various formats in Python")
10777 (description
10778 "This package allows determination of image size from
10779PNG, JPEG, JPEG2000 and GIF files in pure Python.")
10780 (license license:expat)))
10781
10782(define-public python2-imagesize
10783 (package-with-python2 python-imagesize))
10784
10785(define-public python-termstyle
10786 (package
10787 (name "python-termstyle")
10788 (version "0.1.11")
10789 (source
10790 (origin
10791 (method url-fetch)
10792 (uri (pypi-uri "termstyle" version))
10793 (sha256
10794 (base32
10795 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
10796 (build-system python-build-system)
10797 (arguments
10798 '(#:phases
10799 (modify-phases %standard-phases
10800 (replace 'check
10801 (lambda _
831080a6 10802 (invoke "python" "test3.py"))))))
44d10b1f
RW
10803 (home-page "https://github.com/gfxmonk/termstyle")
10804 (synopsis "Console text coloring for Python")
10805 (description "This package provides console text coloring for Python.")
10806 (license license:bsd-3)))
10807
10808(define-public python-argcomplete
10809 (package
10810 (name "python-argcomplete")
10811 (version "1.7.0")
10812 (source
10813 (origin
10814 (method url-fetch)
10815 (uri (pypi-uri "argcomplete" version))
10816 (sha256
10817 (base32
10818 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
10819 (build-system python-build-system)
10820 (native-inputs
10821 `(("python-pexpect" ,python-pexpect)
10822 ("tcsh" ,tcsh)
10823 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
10824 (home-page "https://github.com/kislyuk/argcomplete")
10825 (synopsis "Shell tab completion for Python argparse")
10826 (description "argcomplete provides extensible command line tab completion
10827of arguments and options for Python scripts using @code{argparse}. It's
10828particularly useful for programs with many options or sub-parsers that can
10829dynamically suggest completions; for example, when browsing resources over the
10830network.")
10831 (license license:asl2.0)))
10832
10833(define-public python2-argcomplete
10834 (package-with-python2 python-argcomplete))
10835
10836(define-public python-xopen
10837 (package
10838 (name "python-xopen")
10839 (version "0.3.3")
10840 (source
10841 (origin
10842 (method url-fetch)
10843 (uri (pypi-uri "xopen" version))
10844 (sha256
10845 (base32
10846 "1a0wbil552wsmklwd89ssmgz3pjd86qa9i7jh8wqb9wslc8a2qjr"))
10847 (file-name (string-append name "-" version ".tar.gz"))))
10848 (build-system python-build-system)
10849 (home-page "https://github.com/marcelm/xopen/")
10850 (synopsis "Open compressed files transparently")
10851 (description "This module provides an @code{xopen} function that works like
10852Python's built-in @code{open} function, but can also deal with compressed files.
10853Supported compression formats are gzip, bzip2 and, xz, and are automatically
10854recognized by their file extensions. The focus is on being as efficient as
10855possible on all supported Python versions.")
10856 (license license:expat)))
10857
10858(define-public python2-xopen
10859 (let ((base (package-with-python2
10860 (strip-python2-variant python-xopen))))
10861 (package
10862 (inherit base)
10863 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
10864 ,@(package-propagated-inputs base))))))
10865
10866(define-public python-cheetah
10867 (package
10868 (name "python-cheetah")
10869 (version "3.1.0")
10870 (source
10871 (origin
10872 (method url-fetch)
10873 (uri (pypi-uri "Cheetah3" version))
10874 (sha256
10875 (base32
10876 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
10877 (build-system python-build-system)
10878 (arguments
10879 `(#:modules ((guix build utils)
10880 (guix build python-build-system)
10881 (ice-9 ftw)
10882 (srfi srfi-1)
10883 (srfi srfi-26))
10884 #:phases (modify-phases %standard-phases
10885 (add-after 'unpack 'use-absolute-python
10886 (lambda _
10887 (substitute* "Cheetah/CheetahWrapper.py"
10888 (("#!/usr/bin/env python")
10889 (string-append "#!" (which "python"))))
10890 #t))
10891 (replace 'check
10892 (lambda _
10893 (let ((cwd (getcwd)))
10894 (setenv "PYTHONPATH"
10895 (string-append
10896 cwd "/build/"
10897 (find (cut string-prefix? "lib" <>)
10898 (scandir (string-append cwd "/build")))
10899 ":" (getenv "PYTHONPATH")))
10900 (setenv "PATH"
10901 (string-append (getenv "PATH")
10902 ":" cwd "/bin"))
10903 (setenv "TMPDIR" "/tmp")
10904
10905 (substitute* "Cheetah/Tests/Test.py"
10906 (("unittest.TextTestRunner\\(\\)")
10907 "unittest.TextTestRunner(verbosity=2)"))
10908
10909 (invoke "python" "Cheetah/Tests/Test.py")))))))
10910 (propagated-inputs
10911 `(("python-markdown" ,python-markdown))) ;optional
10912 (home-page "http://cheetahtemplate.org/")
10913 (synopsis "Template engine")
10914 (description "Cheetah is a text-based template engine and Python code
10915generator.
10916
10917Cheetah can be used as a standalone templating utility or referenced as
10918a library from other Python applications. It has many potential uses,
10919but web developers looking for a viable alternative to ASP, JSP, PHP and
10920PSP are expected to be its principle user group.
10921
10922Features:
10923@enumerate
10924@item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
10925 text-based format.
10926@item Cleanly separates content, graphic design, and program code.
10927@item Blends the power and flexibility of Python with a simple template language
10928 that non-programmers can understand.
10929@item Gives template writers full access to any Python data structure, module,
10930 function, object, or method in their templates.
10931@item Makes code reuse easy by providing an object-orientated interface to
10932 templates that is accessible from Python code or other Cheetah templates.
10933 One template can subclass another and selectively reimplement sections of it.
10934@item Provides a simple, yet powerful, caching mechanism that can dramatically
10935 improve the performance of a dynamic website.
10936@item Compiles templates into optimized, yet readable, Python code.
10937@end enumerate")
10938 (license (license:x11-style "file://LICENSE"))))
10939
10940(define-public python2-cheetah
10941 (package-with-python2 python-cheetah))
10942
10943(define-public python-dulwich
10944 (package
10945 (name "python-dulwich")
10946 (version "0.18.6")
10947 (source
10948 (origin
10949 (method url-fetch)
10950 (uri (list (string-append "https://www.dulwich.io/releases/"
10951 "dulwich-" version ".tar.gz")
10952 (pypi-uri "dulwich" version)))
10953 (sha256
10954 (base32
10955 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
10956 (build-system python-build-system)
10957 (arguments
10958 `(#:phases
10959 (modify-phases %standard-phases
10960 (add-before 'check 'fix-tests
10961 (lambda* (#:key inputs #:allow-other-keys)
10962 ;; The tests use Popen with a custom environment which doesn't
10963 ;; include PATH.
10964 (substitute* "dulwich/tests/compat/utils.py"
10965 (("'git'") (string-append "'"
10966 (which "git")
10967 "'")))
10968 (substitute* '("dulwich/tests/test_repository.py"
10969 "dulwich/tests/test_hooks.py")
10970 (("#!/bin/sh") (string-append "#!" (which "sh"))))
10971 (setenv "TEST_RUNNER" "unittest")
10972 (setenv "PYTHONHASHSEED" "random")
10973 #t)))))
10974 (propagated-inputs
10975 `(("python-fastimport" ,python-fastimport)))
10976 (native-inputs
10977 `(("python-mock" ,python-mock)
10978 ("python-geventhttpclient" ,python-geventhttpclient)
10979 ("git" ,git)))
10980 (home-page "https://www.dulwich.io/")
10981 (synopsis "Git implementation in Python")
10982 (description "Dulwich is an implementation of the Git file formats and
10983protocols written in pure Python.")
10984 ;; Can be used with either license.
10985 (license (list license:asl2.0 license:gpl2+))))
10986
10987(define-public python2-dulwich
10988 (package-with-python2 python-dulwich))
10989
10990(define-public python-pbkdf2
10991 (package
10992 (name "python-pbkdf2")
10993 (version "1.3")
10994 (source
10995 (origin
10996 (method url-fetch)
10997 (uri (pypi-uri "pbkdf2" version))
10998 (sha256
10999 (base32
11000 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
11001 (build-system python-build-system)
11002 (arguments
11003 '(#:phases
11004 (modify-phases %standard-phases
11005 (replace 'check
11006 (lambda _
11007 (setenv "PYTHONPATH"
11008 (string-append (getcwd) "/build/lib:"
11009 (getenv "PYTHONPATH")))
ee2bb944 11010 (invoke "python" "test/test_pbkdf2.py"))))))
44d10b1f
RW
11011 (propagated-inputs
11012 `(("python-pycrypto" ,python-pycrypto))) ; optional
11013 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
11014 (synopsis "Password-based key derivation")
11015 (description "This module implements the password-based key derivation
11016function, PBKDF2, specified in RSA PKCS#5 v2.0.
11017
11018PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
11019is part of the RSA Public Key Cryptography Standards series. The provided
11020implementation takes a password or a passphrase and a salt value (and
11021optionally a iteration count, a digest module, and a MAC module) and provides
11022a file-like object from which an arbitrarly-sized key can be read.")
11023 (license license:expat)))
11024
11025(define-public python2-pbkdf2
11026 (package-with-python2 python-pbkdf2))
11027
11028(define-public python-qrcode
11029 (package
11030 (name "python-qrcode")
217ea1a1 11031 (version "6.1")
44d10b1f
RW
11032 (source
11033 (origin
11034 (method url-fetch)
11035 (uri (pypi-uri "qrcode" version))
11036 (sha256
217ea1a1 11037 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
44d10b1f
RW
11038 (build-system python-build-system)
11039 (arguments
11040 ;; FIXME: Tests require packaging 'pymaging'.
11041 '(#:tests? #f))
11042 (propagated-inputs
11043 `(("python-lxml" ,python-lxml) ; for SVG output
11044 ("python-pillow" ,python-pillow) ; for PNG output
11045 ("python-six" ,python-six)))
44d10b1f
RW
11046 (home-page "https://github.com/lincolnloop/python-qrcode")
11047 (synopsis "QR Code image generator")
11048 (description "This package provides a pure Python QR Code generator
11049module. It uses the Python Imaging Library (PIL) to allow for the generation
11050of QR Codes.
11051
11052In addition this package provides a command line tool to generate QR codes and
11053either write these QR codes to a file or do the output as ascii art at the
11054console.")
11055 (license license:bsd-3)))
11056
11057(define-public python2-qrcode
11058 (package-with-python2 python-qrcode))
11059
11060(define-public python-rst2ansi
11061 (package
11062 (name "python-rst2ansi")
11063 (version "0.1.5")
11064 (source
11065 (origin
11066 (method url-fetch)
11067 (uri (pypi-uri "rst2ansi" version))
11068 (sha256
11069 (base32
11070 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
11071 (build-system python-build-system)
11072 (propagated-inputs
11073 `(("python-docutils" ,python-docutils)))
11074 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
11075 (synopsis "Convert RST to ANSI-decorated console output")
11076 (description
11077 "Python module dedicated to rendering RST (reStructuredText) documents
11078to ansi-escaped strings suitable for display in a terminal.")
11079 (license license:expat)))
11080
11081(define-public python-ansi2html
11082 (package
11083 (name "python-ansi2html")
11084 (version "1.2.0")
11085 (source
11086 (origin
11087 (method url-fetch)
11088 (uri (pypi-uri "ansi2html" version))
11089 (sha256
11090 (base32
11091 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
11092 (build-system python-build-system)
11093 (native-inputs
11094 `(("python-mock" ,python-mock)
11095 ("python-nose" ,python-nose)))
11096 (propagated-inputs
11097 `(("python-six" ,python-six)))
11098 (home-page "https://github.com/ralphbean/ansi2html")
11099 (synopsis "Convert ANSI-decorated console output to HTML")
11100 (description
11101 "@command{ansi2html} is a Python library and command line utility for
11102convering text with ANSI color codes to HTML or LaTeX.")
11103 (license license:gpl3+)))
11104
11105(define-public python2-ansi2html
11106 (package-with-python2 python-ansi2html))
11107
11108(define-public python-ddt
11109 (package
11110 (name "python-ddt")
11111 (version "1.1.3")
11112 (source
11113 (origin
11114 (method url-fetch)
11115 (uri (pypi-uri "ddt" version))
11116 (sha256
11117 (base32
11118 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
11119 (build-system python-build-system)
11120 (native-inputs
11121 `(("python-mock" ,python-mock)
11122 ("python-nose" ,python-nose)))
11123 (propagated-inputs
11124 `(("python-six" ,python-six)
11125 ("python-pyyaml" ,python-pyyaml)))
11126 (home-page "https://github.com/txels/ddt")
11127 (synopsis "Data-Driven Tests")
11128 (description
11129 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
11130running it with different test data, and make it appear as multiple test
11131cases.")
11132 (license license:expat)))
11133
11134(define-public python2-ddt
11135 (package-with-python2 python-ddt))
11136
11137(define-public python-pycountry
11138 (package
11139 (name "python-pycountry")
11140 (version "18.5.26")
11141 (source
11142 (origin
11143 (method url-fetch)
11144 (uri (pypi-uri "pycountry" version))
11145 (sha256
11146 (base32
11147 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
11148 (build-system python-build-system)
11149 (home-page "https://bitbucket.org/flyingcircus/pycountry")
11150 (synopsis "ISO databases for languages, countries, currencies, etc.")
11151 (description
11152 "@code{pycountry} provides the ISO databases for the standards:
11153@enumerate
11154@item 639-3 (Languages)
11155@item 3166 (Countries)
11156@item 3166-3 (Deleted Countries)
11157@item 3166-2 (Subdivisions of countries)
11158@item 4217 (Currencies)
11159@item 15924 (Scripts)
11160@end enumerate
11161It includes a copy from Debian’s pkg-isocodes and makes the data accessible
11162through a Python API.")
11163 (license license:lgpl2.1+)))
11164
11165(define-public python2-pycountry
11166 (package-with-python2 python-pycountry))
11167
11168(define-public python-pycosat
11169 (package
11170 (name "python-pycosat")
11171 (version "0.6.1")
11172 (source
11173 (origin
11174 (method url-fetch)
11175 (uri (pypi-uri "pycosat" version))
11176 (sha256
11177 (base32
11178 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
11179 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
11180 (build-system python-build-system)
11181 (home-page "https://github.com/ContinuumIO/pycosat")
11182 (synopsis "Bindings to picosat (a SAT solver)")
11183 (description
11184 "This package provides efficient Python bindings to @code{picosat} on
11185the C level. When importing pycosat, the @code{picosat} solver becomes part
11186of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
11187Problem} (SAT) solver.")
11188 (license license:expat)))
11189
11190(define-public python2-pycosat
11191 (package-with-python2 python-pycosat))
11192
11193(define-public python2-ruamel.ordereddict
11194 (package
11195 (name "python2-ruamel.ordereddict")
11196 (version "0.4.9")
11197 (source
11198 (origin
11199 (method url-fetch)
11200 (uri (pypi-uri "ruamel.ordereddict" version))
11201 (sha256
11202 (base32
11203 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
11204 (build-system python-build-system)
11205 (arguments
11206 `(#:python ,python-2
11207 #:phases
11208 (modify-phases %standard-phases
11209 (delete 'check)
11210 (add-after 'install 'check
11211 (lambda* (#:key inputs outputs #:allow-other-keys)
11212 (add-installed-pythonpath inputs outputs)
f987ac30 11213 (invoke "python" "test/testordereddict.py"))))))
44d10b1f
RW
11214 (home-page "https://bitbucket.org/ruamel/ordereddict")
11215 (synopsis "Version of dict that keeps keys in insertion order")
11216 (description
11217 "This is an implementation of an ordered dictionary with @dfn{Key
11218Insertion Order} (KIO: updates of values do not affect the position of the
11219key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
11220removed and put at the back). The standard library module @code{OrderedDict},
11221implemented later, implements a subset of @code{ordereddict} functionality.
11222Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
11223Order} (KSO, no sorting function can be specified, but a transform can be
11224specified to apply on the key before comparison (e.g. @code{string.lower})).")
11225 (license license:expat)))
11226
11227(define-public python-pypeg2
11228 (package
11229 (name "python-pypeg2")
11230 (version "2.15.2")
11231 (source
11232 (origin
11233 (method url-fetch)
11234 (uri (pypi-uri "pyPEG2" version))
11235 (sha256
11236 (base32
11237 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
11238 (build-system python-build-system)
11239 (propagated-inputs `(("python-lxml" ,python-lxml)))
11240 (arguments
11241 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
11242 '(#:tests? #f))
11243 (home-page "https://fdik.org/pyPEG/")
11244 (synopsis "Parsering Expression Grammars in Python")
11245 (description "PyPEG is an intrinsic parser interpreter framework for
11246Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
11247parse many formal languages.")
11248 (license license:gpl2)))
11249
11250(define-public python-incremental
11251 (package
11252 (name "python-incremental")
11253 (version "17.5.0")
11254 (source
11255 (origin
11256 (method url-fetch)
11257 (uri (pypi-uri "incremental" version))
11258 (sha256
11259 (base32
11260 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
11261 (build-system python-build-system)
11262 (home-page "https://github.com/hawkowl/incremental")
11263 (synopsis "Library for versioning Python projects")
11264 (description "Incremental is a small library that versions your Python
11265projects.")
11266 (license license:expat)))
11267
11268(define-public python2-incremental
11269 (package-with-python2 python-incremental))
11270
11271(define-public python-invoke
11272 (package
11273 (name "python-invoke")
11274 (home-page "http://www.pyinvoke.org/")
11275 (version "1.1.0")
11276 (source (origin
11277 (method url-fetch)
11278 (uri (pypi-uri "invoke" version))
11279 (sha256
11280 (base32
11281 "0aiy1xvk1f91246zxd1zqrm679vdvd10h843a2na41cqr3cflpi6"))))
11282 (build-system python-build-system)
11283 (arguments
11284 ;; XXX: Requires many dependencies that are not yet in Guix.
11285 `(#:tests? #f))
11286 (synopsis "Pythonic task execution")
11287 (description
11288 "Invoke is a Python task execution tool and library, drawing inspiration
11289from various sources to arrive at a powerful and clean feature set. It is
11290evolved from the Fabric project, but focuses on local and abstract concerns
11291instead of servers and network commands.")
11292 (license license:bsd-3)))
11293
11294(define-public python2-invoke
11295 (package-with-python2 python-invoke))
11296
11297(define-public python-automat
11298 (package
11299 (name "python-automat")
11300 (version "0.6.0")
11301 (source (origin
11302 (method url-fetch)
11303 (uri (pypi-uri "Automat" version))
11304 (sha256
11305 (base32
11306 "1a7nsrljysfmdqmpn2apfa1gg6rfah4y9sizvns8gb08rx7d07rw"))))
11307 (build-system python-build-system)
11308 ;; We disable the tests because they require python-twisted, while
11309 ;; python-twisted depends on python-automat. Twisted is optional, but the
11310 ;; tests fail if it is not available. Also see
11311 ;; <https://github.com/glyph/automat/issues/71>.
11312 (arguments '(#:tests? #f))
11313 (native-inputs
11314 `(("python-m2r" ,python-m2r)
11315 ("python-setuptools-scm" ,python-setuptools-scm)
11316 ("python-graphviz" ,python-graphviz)))
11317 (propagated-inputs
11318 `(("python-six" ,python-six)
11319 ("python-attrs" ,python-attrs)))
11320 (home-page "https://github.com/glyph/Automat")
11321 (synopsis "Self-service finite-state machines")
11322 (description "Automat is a library for concise, idiomatic Python
11323expression of finite-state automata (particularly deterministic finite-state
11324transducers).")
11325 (license license:expat)))
11326
11327(define-public python2-automat
11328 (package-with-python2 python-automat))
11329
11330(define-public python-m2r
11331 (package
11332 (name "python-m2r")
11333 (version "0.1.12")
11334 (source (origin
11335 (method url-fetch)
11336 (uri (pypi-uri "m2r" version))
11337 (sha256
11338 (base32
11339 "1axrwnf425sz4qz3c0qc7yhhki4myzb8rki7pczcsgzznzmqdyxd"))))
11340 (build-system python-build-system)
11341 (propagated-inputs
11342 `(("python-docutils" ,python-docutils)
11343 ("python-mistune" ,python-mistune)))
11344 (native-inputs
11345 `(("python-pygments" ,python-pygments)
11346 ("python-mock" ,python-mock)))
11347 (home-page "https://github.com/miyakogi/m2r")
11348 (synopsis "Markdown to reStructuredText converter")
11349 (description "M2R converts a markdown file including reST markups to valid
11350reST format.")
11351 (license license:expat)))
11352
11353(define-public python2-m2r
11354 (package-with-python2 python-m2r))
11355
11356(define-public python-constantly
11357 (package
11358 (name "python-constantly")
11359 (version "15.1.0")
11360 (source (origin
11361 (method url-fetch)
11362 (uri (pypi-uri "constantly" version))
11363 (sha256
11364 (base32
11365 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
11366 (build-system python-build-system)
11367 (home-page "https://github.com/twisted/constantly")
11368 (synopsis "Symbolic constants in Python")
11369 (description "Constantly is a Python library that provides symbolic
11370constant support. It includes collections and constants with text, numeric,
11371and bit flag values.")
11372 (license license:expat)))
11373
11374(define-public python2-constantly
11375 (package-with-python2 python-constantly))
11376
11377(define-public python-attrs
11378 (package
11379 (name "python-attrs")
11380 (version "18.2.0")
11381 (source (origin
11382 (method url-fetch)
11383 (uri (pypi-uri "attrs" version))
11384 (sha256
11385 (base32
11386 "0s9ydh058wmmf5v391pym877x4ahxg45dw6a0w4c7s5wgpigdjqh"))))
11387 (build-system python-build-system)
11388 (arguments
11389 `(#:modules ((guix build utils)
11390 (guix build python-build-system)
11391 (ice-9 ftw)
11392 (srfi srfi-1)
11393 (srfi srfi-26))
11394 #:phases (modify-phases %standard-phases
11395 (replace 'check
11396 (lambda _
11397 (let ((cwd (getcwd)))
11398 (setenv "PYTHONPATH"
11399 (string-append
11400 cwd "/build/"
11401 (find (cut string-prefix? "lib" <>)
11402 (scandir (string-append cwd "/build")))
11403 ":"
11404 (getenv "PYTHONPATH")))
11405 (invoke "python" "-m" "pytest")))))))
11406 (native-inputs
11407 `(("python-coverage" ,python-coverage)
11408 ("python-hypothesis" ,python-hypothesis)
11409 ("python-pympler" ,python-pympler)
11410 ("python-pytest" ,python-pytest)
11411 ("python-six" ,python-six)
11412 ("python-sphinx" ,python-sphinx)
11413 ("python-zope-interface" ,python-zope-interface)))
11414 (home-page "https://github.com/python-attrs/attrs/")
11415 (synopsis "Attributes without boilerplate")
11416 (description "@code{attrs} is a Python package with class decorators that
11417ease the chores of implementing the most common attribute-related object
11418protocols.")
11419 (license license:expat)))
11420
11421(define-public python2-attrs
11422 (package-with-python2 python-attrs))
11423
11424(define-public python-attrs-bootstrap
11425 (package
11426 (inherit python-attrs)
11427 (name "python-attrs-bootstrap")
11428 ;; Keep this on a fixed version so python-attrs can be updated without
11429 ;; triggering a mass-rebuild. FIXME: Update this in the next rebuild cycle.
11430 (version "17.4.0")
11431 (source (origin
11432 (method url-fetch)
11433 (uri (pypi-uri "attrs" version))
11434 (sha256
11435 (base32
11436 "1jafnn1kzd6qhxgprhx6y6ik1r5m2rilx25syzcmq03azp660y8w"))))
11437 (native-inputs `())
11438 (arguments `(#:tests? #f))))
11439
11440(define-public python2-attrs-bootstrap
11441 (package-with-python2 python-attrs-bootstrap))
11442
11443(define-public python2-cliapp
11444 (package
11445 (name "python2-cliapp")
9064b84e 11446 (version "1.20180812.1")
44d10b1f
RW
11447 (source
11448 (origin
11449 (method url-fetch)
11450 (uri (string-append
11451 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
11452 version ".tar.gz"))
11453 (sha256
11454 (base32
9064b84e 11455 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
44d10b1f
RW
11456 (build-system python-build-system)
11457 (arguments
11458 `(#:python ,python-2
11459 #:phases
11460 (modify-phases %standard-phases
11461 ;; check phase needs to be run before the build phase. If not,
11462 ;; coverage-test-runner looks for tests for the built source files,
11463 ;; and fails.
11464 (delete 'check)
11465 (add-before 'build 'check
11466 (lambda _
11467 ;; Disable python3 tests
11468 (substitute* "check"
11469 (("python3") "# python3"))
6c826d32 11470 (invoke "./check"))))))
44d10b1f
RW
11471 (native-inputs
11472 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
11473 ("python2-pep8" ,python2-pep8)))
11474 (propagated-inputs
11475 `(("python2-pyaml" ,python2-pyaml)))
11476 (home-page "https://liw.fi/cliapp/")
11477 (synopsis "Python framework for command line programs")
11478 (description "@code{python2-cliapp} is a python framework for
11479command line programs. It contains the typical stuff such programs
11480need to do, such as parsing the command line for options, and
11481iterating over input files.")
11482 (license license:gpl2+)))
11483
11484(define-public python2-ttystatus
11485 (package
11486 (name "python2-ttystatus")
e516a9c2 11487 (version "0.36")
44d10b1f
RW
11488 (source
11489 (origin
11490 (method url-fetch)
11491 (uri (string-append
11492 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
11493 version ".tar.gz"))
11494 (sha256
11495 (base32
e516a9c2 11496 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
44d10b1f
RW
11497 (build-system python-build-system)
11498 (native-inputs
11499 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
11500 ("python2-pep8" ,python2-pep8)))
11501 (arguments
11502 `(#:python ,python-2
11503 #:phases
11504 (modify-phases %standard-phases
11505 ;; check phase needs to be run before the build phase. If not,
11506 ;; coverage-test-runner looks for tests for the built source files,
11507 ;; and fails.
11508 (delete 'check)
11509 (add-before 'build 'check
cbeee881 11510 (lambda _ (invoke "make" "check"))))))
44d10b1f
RW
11511 (home-page "https://liw.fi/ttystatus/")
11512 (synopsis "Python library for showing progress reporting and
11513status updates on terminals")
11514 (description "@code{python2-ttystatus} is a python library for
11515showing progress reporting and status updates on terminals, for
11516command line programs. Output is automatically adapted to the width
11517of the terminal: truncated if it does not fit, and resized if the
11518terminal size changes.")
11519 (license license:gpl3+)))
11520
11521(define-public python2-tracing
11522 (package
11523 (name "python2-tracing")
11524 (version "0.10")
11525 (source
11526 (origin
11527 (method url-fetch)
11528 (uri (string-append
11529 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
11530 version ".tar.gz"))
11531 (sha256
11532 (base32
11533 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
11534 (build-system python-build-system)
11535 (arguments
11536 `(#:python ,python-2))
11537 (home-page "https://liw.fi/tracing/")
11538 (synopsis "Python debug logging helper")
11539 (description "@code{python2-tracing} is a python library for
11540logging debug messages. It provides a way to turn debugging messages
11541on and off, based on the filename they occur in. It is much faster
11542than using @code{logging.Filter} to accomplish the same thing, which
11543matters when code is run in production mode. The actual logging still
11544happens using the @code{logging} library.")
11545 (license license:gpl3+)))
11546
11547(define-public python2-larch
11548 (package
11549 (name "python2-larch")
11550 (version "1.20151025")
11551 (source
11552 (origin
11553 (method url-fetch)
11554 (uri (string-append
11555 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
11556 version ".tar.gz"))
11557 (patches (search-patches
11558 "python2-larch-coverage-4.0a6-compatibility.patch"))
11559 (sha256
11560 (base32
11561 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
11562 (build-system python-build-system)
11563 (arguments
11564 `(#:python ,python-2
11565 #:phases
11566 (modify-phases %standard-phases
11567 ;; check phase needs to be run before the build phase. If not,
11568 ;; coverage-test-runner looks for tests for the built source files,
11569 ;; and fails.
11570 (delete 'check)
11571 (add-before 'build 'check
204ad455 11572 (lambda _ (invoke "make" "check"))))))
44d10b1f
RW
11573 (native-inputs
11574 `(("cmdtest" ,cmdtest)
11575 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
11576 (propagated-inputs
11577 `(("python2-tracing" ,python2-tracing)))
11578 (home-page "https://liw.fi/larch/")
11579 (synopsis "Python copy-on-write B-tree library")
11580 (description "@code{python2-larch} is an implementation of
11581particular kind of B-tree, based on research by Ohad Rodeh. See
11582@url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
11583on the data structure.
11584
11585The distinctive feature of this B-tree is that a node is never
11586(conceptually) modified. Instead, all updates are done by
11587copy-on-write. This makes it easy to clone a tree, and modify only the
11588clone, while other processes access the original tree.")
11589 (license license:gpl3+)))
11590
11591(define-public python-astroid
11592 (package
11593 (name "python-astroid")
11594 (version "2.1.0")
11595 (source
11596 (origin
11597 (method url-fetch)
11598 (uri (pypi-uri "astroid" version))
11599 (sha256
11600 (base32
11601 "08hz675knh4294bancdapql392fmbjyimhbyrmfkz1ka7l035c1m"))))
11602 (build-system python-build-system)
11603 (propagated-inputs
11604 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
11605 ("python-six" ,python-six)
11606 ("python-wrapt" ,python-wrapt)))
11607 (native-inputs
11608 `(("python-dateutil" ,python-dateutil)
11609 ("python-nose" ,python-nose)
11610 ("python-pytest" ,python-pytest)
11611 ("python-pytest-runner" ,python-pytest-runner)))
11612 (arguments
11613 `(#:phases
11614 (modify-phases %standard-phases
11615 (add-after 'unpack 'remove-spurious-test
11616 (lambda _
11617 ;; This can be removed after upgrading from python-3.7
11618 ;; https://github.com/PyCQA/astroid/issues/593
11619 ;; https://bugs.python.org/issue34056
11620 (delete-file "astroid/tests/unittest_modutils.py")
11621 #t))
11622 (replace 'check
11623 (lambda _
11624 (invoke "pytest" "astroid"))))))
11625 (home-page "https://github.com/PyCQA/astroid")
11626 (synopsis "Common base representation of python source code for pylint and
11627other projects")
11628 (description "@code{python-astroid} provides a common base representation
11629of python source code for projects such as pychecker, pyreverse, pylint, etc.
11630
11631It provides a compatible representation which comes from the _ast module. It
11632rebuilds the tree generated by the builtin _ast module by recursively walking
11633down the AST and building an extended ast. The new node classes have
11634additional methods and attributes for different usages. They include some
11635support for static inference and local name scopes. Furthermore, astroid
11636builds partial trees by inspecting living objects.")
11637 (license license:lgpl2.1+)
11638 (properties `((python2-variant . ,(delay python2-astroid))))))
11639
11640(define-public python2-astroid
11641 (let ((base (package-with-python2
11642 (strip-python2-variant python-astroid))))
11643 (package (inherit base)
11644 ;; Version 2.x removes python2 support.
11645 (version "1.6.5")
11646 (source
11647 (origin
11648 (method url-fetch)
11649 (uri (pypi-uri "astroid" version))
11650 (sha256
11651 (base32
11652 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
11653 (arguments
11654 (substitute-keyword-arguments (package-arguments base)
11655 ((#:phases phases)
11656 `(modify-phases ,phases
11657 (add-after 'unpack 'remove-spurious-test
11658 (lambda _
11659 ;; https://github.com/PyCQA/astroid/issues/276
11660 (delete-file "astroid/tests/unittest_brain.py")
11661 #t))
11662 (replace 'check
11663 (lambda _
11664 (invoke"python" "-m" "unittest" "discover"
11665 "-p" "unittest*.py")))))))
11666 (native-inputs `())
11667 (propagated-inputs
11668 `(("python2-backports-functools-lru-cache"
11669 ,python2-backports-functools-lru-cache)
11670 ("python2-enum34" ,python2-enum34)
11671 ("python2-singledispatch" ,python2-singledispatch)
11672 ,@(package-propagated-inputs base))))))
11673
11674(define-public python-isort
11675 (package
11676 (name "python-isort")
e2227b6a 11677 (version "4.3.4")
44d10b1f
RW
11678 (source
11679 (origin
e2227b6a
EF
11680 (method git-fetch)
11681 (uri (git-reference
11682 ;; Tests pass only from the Github sources
11683 (url "https://github.com/timothycrosley/isort")
11684 (commit version)))
11685 (file-name (git-file-name name version))
44d10b1f
RW
11686 (sha256
11687 (base32
e2227b6a 11688 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
44d10b1f
RW
11689 (build-system python-build-system)
11690 (native-inputs
11691 `(("python-mock" ,python-mock)
11692 ("python-pytest" ,python-pytest)))
11693 (home-page "https://github.com/timothycrosley/isort")
11694 (synopsis "Python utility/library to sort python imports")
11695 (description "@code{python-isort} is a python utility/library to sort
11696imports alphabetically, and automatically separated into sections. It
11697provides a command line utility, a python library and plugins for various
11698editors.")
e2227b6a
EF
11699 (license license:expat)
11700 (properties `((python2-variant . ,(delay python2-isort))))))
44d10b1f
RW
11701
11702(define-public python2-isort
e2227b6a
EF
11703 (let ((base (package-with-python2
11704 (strip-python2-variant python-isort))))
11705 (package (inherit base)
11706 (native-inputs
11707 `(("python2-futures" ,python2-futures)
11708 ,@(package-native-inputs base))))))
44d10b1f
RW
11709
11710(define-public python2-backports-functools-lru-cache
11711 (package
11712 (name "python2-backports-functools-lru-cache")
11713 (version "1.5")
11714 (source
11715 (origin
11716 (method url-fetch)
11717 ;; only the pypi tarballs contain the necessary metadata
11718 (uri (pypi-uri "backports.functools_lru_cache" version))
11719 (sha256
11720 (base32
11721 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
11722 (build-system python-build-system)
11723 (native-inputs
11724 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
11725 (arguments
11726 `(#:python ,python-2))
11727 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
11728 (synopsis "Backport of functools.lru_cache from Python 3.3")
11729 (description "@code{python2-backports-functools-lru-cache} is a backport
11730of @code{functools.lru_cache} from python 3.3.")
11731 (license license:expat)))
11732
11733(define-public python-configparser
11734 (package
11735 (name "python-configparser")
11736 (version "3.5.0")
11737 (source
11738 (origin
11739 (method url-fetch)
11740 (uri (string-append
11741 "https://bitbucket.org/ambv/configparser/get/"
11742 version ".tar.bz2"))
11743 (file-name (string-append name "-" version ".tar.gz"))
11744 (sha256
11745 (base32
11746 "0waq40as14abwzbb321hfz4vr1fi363nscy32ga14qvfygrg96wa"))))
11747 (build-system python-build-system)
809f003f 11748 (home-page "https://github.com/jaraco/configparser/")
44d10b1f
RW
11749 (synopsis "Backport of configparser from python 3.5")
11750 (description "@code{python-configparser} is a backport of
11751@code{configparser} from Python 3.5 so that it can be used directly
11752in other versions.")
11753 (license license:expat)))
11754
11755(define-public python2-configparser
11756 (package-with-python2 python-configparser))
11757
11758(define-public python-mando
11759 (package
11760 (name "python-mando")
11761 (version "0.6.4")
11762 (source (origin
11763 (method url-fetch)
11764 (uri (pypi-uri "mando" version))
11765 (sha256
11766 (base32
11767 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
11768 (build-system python-build-system)
11769 (propagated-inputs
11770 `(("python-rst2ansi" ,python-rst2ansi)
11771 ("python-six" ,python-six)))
11772 (native-inputs
11773 `(("python-pytest" ,python-pytest)))
11774 (home-page "https://mando.readthedocs.org/")
11775 (synopsis
11776 "Wrapper around argparse, allowing creation of complete CLI applications")
11777 (description
11778 "This package is a wrapper around argparse, allowing you to write complete CLI
11779applications in seconds while maintaining all the flexibility.")
11780 (license license:expat)))
11781
11782(define-public python2-mando
11783 (package-with-python2 python-mando))
11784
70daf82f
RW
11785(define-public python2-argparse
11786 (package
11787 (name "python2-argparse")
11788 (version "1.4.0")
11789 (source
11790 (origin
11791 (method url-fetch)
11792 (uri (pypi-uri "argparse" version))
11793 (sha256
11794 (base32
11795 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
11796 (build-system python-build-system)
11797 (arguments
11798 `(#:python ,python-2))
11799 (home-page "https://github.com/ThomasWaldmann/argparse/")
11800 (synopsis "Python command-line parsing library")
11801 (description
11802 "This package is mostly for people who want to have @code{argparse} on
11803older Pythons because it was not part of the standard library back then.")
11804 (license license:psfl)))
11805
44d10b1f
RW
11806(define-public python-fudge
11807 (package
11808 (name "python-fudge")
11809 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
11810 ;; package, which is currently the only use of this package.
11811 (version "0.9.6")
11812 (source
11813 (origin
11814 (method url-fetch)
11815 (uri (pypi-uri "fudge" version))
11816 (sha256
11817 (base32
11818 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
11819 (build-system python-build-system)
11820 (arguments
11821 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
11822 (home-page "https://github.com/fudge-py/fudge")
11823 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
11824 (description
11825 "Fudge is a Python module for using fake objects (mocks and stubs) to
11826test real ones.
11827
11828In readable Python code, you declare the methods available on your fake object
11829and how they should be called. Then you inject that into your application and
11830start testing. This declarative approach means you don’t have to record and
11831playback actions and you don’t have to inspect your fakes after running code.
11832If the fake object was used incorrectly then you’ll see an informative
11833exception message with a traceback that points to the culprit.")
11834 (license license:expat)))
11835
11836(define-public python2-fudge
11837 (package-with-python2 python-fudge))
11838
11839(define-public python-mwclient
11840 (package
11841 (name "python-mwclient")
11842 (version "0.8.4")
11843 (source
11844 (origin
11845 (method url-fetch)
11846 ;; The PyPI version wouldn't contain tests.
11847 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
11848 "v" version ".tar.gz"))
11849 (file-name (string-append name "-" version ".tar.gz"))
11850 (sha256
11851 (base32
11852 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
11853 (build-system python-build-system)
11854 (propagated-inputs
11855 `(("python-requests" ,python-requests)
11856 ("python-requests-oauthlib"
11857 ,python-requests-oauthlib)
11858 ("python-six" ,python-six)))
11859 (native-inputs
11860 `(("python-mock" ,python-mock)
11861 ("python-pytest" ,python-pytest)
11862 ("python-pytest-pep8" ,python-pytest-pep8)
11863 ("python-pytest-cache" ,python-pytest-cache)
11864 ("python-pytest-cov" ,python-pytest-cov)
11865 ("python-responses" ,python-responses)))
11866 (home-page "https://github.com/btongminh/mwclient")
11867 (synopsis "MediaWiki API client")
11868 (description "This package provides a MediaWiki API client.")
11869 (license license:expat)))
11870
11871(define-public python2-mwclient
11872 (package-with-python2 python-mwclient))
11873
11874(define-public python-utils
11875 (package
11876 (name "python-utils")
11877 (version "2.1.0")
11878 (source (origin
11879 (method url-fetch)
11880 (uri (pypi-uri "python-utils" version))
11881 (sha256
11882 (base32
11883 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
11884 (build-system python-build-system)
11885 (native-inputs
11886 `(("pytest-runner" ,python-pytest-runner)
11887 ("pytest" ,python-pytest)
11888 ("six" ,python-six)))
11889 (home-page "https://github.com/WoLpH/python-utils")
11890 (synopsis "Convenient utilities not included with the standard Python install")
11891 (description
11892 "Python Utils is a collection of small Python functions and classes which
11893make common patterns shorter and easier.")
11894 (license license:bsd-2)))
11895
11896(define-public python2-utils
11897 (package-with-python2 python-utils))
11898
11899(define-public python-sphinx-me
11900 (package
11901 (name "python-sphinx-me")
11902 (version "0.3")
11903 (source
11904 (origin
11905 (method url-fetch)
11906 (uri (pypi-uri "sphinx-me" version))
11907 (sha256
11908 (base32
11909 "06jzgp213zihnvpcy2y5jy3ykid3apc2ncp2pg6a2g05lhiziglq"))))
11910 (build-system python-build-system)
11911 (home-page "https://github.com/stephenmcd/sphinx-me")
11912 (synopsis "Create a Sphinx documentation shell")
11913 (description
11914 "Create a Sphinx documentation shell for your project and include the
11915README file as the documentation index. It handles extracting the required
11916meta data such as the project name, author and version from your project for
11917use in your Sphinx docs.")
11918 (license license:bsd-2)))
11919
11920(define-public python2-sphinx-me
11921 (package-with-python2 python-sphinx-me))
11922
11923(define-public python-diff-match-patch
11924 (package
11925 (name "python-diff-match-patch")
11926 (version "20121119")
11927 (source
11928 (origin
11929 (method url-fetch)
11930 (uri (pypi-uri "diff-match-patch" version))
11931 (sha256
11932 (base32
11933 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
11934 (build-system python-build-system)
11935 (home-page "https://code.google.com/p/google-diff-match-patch")
11936 (synopsis "Synchronize plain text")
11937 (description "Diff Match and Patch libraries offer robust algorithms to
11938perform the operations required for synchronizing plain text.")
11939 (license license:asl2.0)))
11940
11941(define-public python2-diff-match-patch
11942 (package-with-python2 python-diff-match-patch))
11943
11944(define-public python-dirsync
11945 (package
11946 (name "python-dirsync")
11947 (version "2.2.3")
11948 (source
11949 (origin
11950 (method url-fetch)
11951 (uri (pypi-uri "dirsync" version))
11952 (sha256
11953 (base32
11954 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
11955 (build-system python-build-system)
11956 (propagated-inputs
11957 `(("six" ,python-six)))
11958 (home-page "https://bitbucket.org/tkhyn/dirsync")
11959 (synopsis "Advanced directory tree synchronisation tool")
11960 (description "Advanced directory tree synchronisation tool.")
11961 (license license:expat)))
11962
11963(define-public python2-dirsync
11964 (package-with-python2 python-dirsync))
11965
11966(define-public python-levenshtein
11967 (package
11968 (name "python-levenshtein")
11969 (version "0.12.0")
11970 (source
11971 (origin
11972 (method url-fetch)
11973 (uri (pypi-uri "python-Levenshtein" version))
11974 (sha256
11975 (base32
11976 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
11977 (build-system python-build-system)
11978 (home-page "https://github.com/ztane/python-Levenshtein")
11979 (synopsis "Fast computation of Levenshtein distance and string similarity")
11980 (description
11981 "The Levenshtein Python C extension module contains functions for fast computation of
11982@enumerate
11983@item Levenshtein (edit) distance, and edit operations
11984@item string similarity
11985@item approximate median strings, and generally string averaging
11986@item string sequence and set similarity
11987@end enumerate
11988It supports both normal and Unicode strings.")
11989 (license license:gpl2+)))
11990
11991(define-public python2-levenshtein
11992 (package-with-python2 python-levenshtein))
11993
11994(define-public python-scandir
11995 (package
11996 (name "python-scandir")
11997 (version "1.9.0")
11998 (source
11999 (origin
12000 (method url-fetch)
12001 (uri (pypi-uri "scandir" version))
12002 (sha256
12003 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
12004 (build-system python-build-system)
12005 (arguments
12006 `(#:phases (modify-phases %standard-phases
12007 (replace 'check
12008 (lambda _
12009 (invoke "python" "test/run_tests.py"))))))
12010 (home-page "https://github.com/benhoyt/scandir")
12011 (synopsis "Directory iteration function")
12012 (description
12013 "Directory iteration function like os.listdir(), except that instead of
12014returning a list of bare filenames, it yields DirEntry objects that include
12015file type and stat information along with the name. Using scandir() increases
12016the speed of os.walk() by 2-20 times (depending on the platform and file
12017system) by avoiding unnecessary calls to os.stat() in most cases.
12018
12019This package is part of the Python standard library since version 3.5.")
12020 (license license:bsd-3)))
12021
12022(define-public python2-scandir
12023 (package-with-python2 python-scandir))
12024
12025(define-public python2-stemming
12026 (package
12027 (name "python2-stemming")
12028 (version "1.0.1")
12029 (source
12030 (origin
12031 (method url-fetch)
12032 (uri (pypi-uri "stemming" version))
12033 (sha256
12034 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
12035 (build-system python-build-system)
12036 (arguments
12037 `(#:python ,python-2))
12038 (home-page "https://bitbucket.org/mchaput/stemming/overview")
12039 (synopsis "Python implementations of various stemming algorithms")
12040 (description
12041 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
12042stemming algorithms for English. These implementations are straightforward and
12043efficient, unlike some Python versions of the same algorithms available on the
12044Web. This package is an extraction of the stemming code included in the Whoosh
12045search engine.")
12046 (license license:public-domain)))
12047
12048(define-public python-factory-boy
12049 (package
12050 (name "python-factory-boy")
12051 (version "2.8.1")
12052 (source
12053 (origin
12054 (method url-fetch)
12055 (uri (pypi-uri "factory_boy" version))
12056 (sha256
12057 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
12058 (build-system python-build-system)
12059 (arguments
12060 ;; Tests are not included in the tarball.
12061 `(#:tests? #f))
12062 (propagated-inputs
12063 `(("faker" ,python-faker)))
12064 (home-page "https://github.com/benhoyt/scandir")
12065 (synopsis "Versatile test fixtures replacement")
12066 (description
12067 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
12068
12069As a fixtures replacement tool, it aims to replace static, hard to maintain
12070fixtures with easy-to-use factories for complex object.
12071
12072Instead of building an exhaustive test setup with every possible combination
12073of corner cases, factory_boy allows you to use objects customized for the
12074current test, while only declaring the test-specific fields")
12075 (license license:expat)))
12076
12077(define-public python2-factory-boy
12078 (package-with-python2 python-factory-boy))
12079
12080(define-public python-translate-toolkit
12081 (package
12082 (name "python-translate-toolkit")
12083 (version "2.1.0")
12084 (source
12085 (origin
12086 (method url-fetch)
12087 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
12088 (sha256
12089 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
12090 (build-system python-build-system)
12091 (native-inputs
12092 `(("python-pytest" ,python-pytest)
12093 ("python-sphinx" ,python-sphinx)))
12094 (propagated-inputs
12095 `(("python-babel" ,python-babel)
12096 ("python-beautifulsoup4" ,python-beautifulsoup4)
12097 ("python-chardet" ,python-chardet)
12098 ("python-diff-match-patch" ,python-diff-match-patch)
12099 ("python-levenshtein" ,python-levenshtein)
12100 ("python-lxml" ,python-lxml)
12101 ("python-six" ,python-six)
12102 ("python-vobject" ,python-vobject)
12103 ("python-pyyaml" ,python-pyyaml)))
12104 (arguments
12105 ;; TODO: tests are not run, because they end with
12106 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
12107 ;; 'parse_funcs'
12108 ;; during test setup.
12109 `(#:tests? #f))
12110 (home-page "http://toolkit.translatehouse.org")
12111 (synopsis "Tools and API for translation and localization engineering")
12112 (description
12113 "Tools and API for translation and localization engineering. It contains
12114several utilities, as well as an API for building localization tools.")
12115 (license license:gpl2+)))
12116
12117(define-public python2-translate-toolkit
12118 (package-with-python2 python-translate-toolkit))
12119
12120(define-public python-packaging
12121 (package
12122 (name "python-packaging")
12123 (version "18.0")
12124 (source
12125 (origin
12126 (method url-fetch)
12127 (uri (pypi-uri "packaging" version))
12128 (sha256
12129 (base32
12130 "01wq9c53ix5rz6qg2c98gy8n4ff768rmanifm8m5jpjiaizj51h8"))))
12131 (build-system python-build-system)
12132 (arguments
12133 `(#:phases (modify-phases %standard-phases
12134 (replace 'check
12135 (lambda _ (invoke "py.test" "-vv"))))))
12136 (native-inputs
12137 `(("python-pretend" ,python-pretend)
12138 ("python-pytest" ,python-pytest)))
12139 (propagated-inputs
12140 `(("python-pyparsing" ,python-pyparsing)
12141 ("python-six" ,python-six)))
12142 (home-page "https://github.com/pypa/packaging")
12143 (synopsis "Core utilities for Python packages")
12144 (description "Packaging is a Python module for dealing with Python packages.
12145It offers an interface for working with package versions, names, and dependency
12146information.")
12147 ;; From 'LICENSE': This software is made available under the terms of
12148 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
12149 ;; Contributions to this software is made under the terms of *both* these
12150 ;; licenses.
12151 (license (list license:asl2.0 license:bsd-2))))
12152
12153(define-public python2-packaging
12154 (package-with-python2 python-packaging))
12155
12156(define-public python-relatorio
12157 (package
12158 (name "python-relatorio")
12159 (version "0.8.0")
12160 (source
12161 (origin
12162 (method url-fetch)
12163 (uri (pypi-uri "relatorio" version))
12164 (sha256
12165 (base32
12166 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
12167 (build-system python-build-system)
12168 (propagated-inputs
12169 `(("python-lxml" ,python-lxml)
12170 ("python-genshi" ,python-genshi)))
12171 (native-inputs
12172 `(("python-magic" ,python-magic)))
12173 (home-page "https://relatorio.tryton.org/")
12174 (synopsis "Templating library able to output ODT and PDF files")
12175 (description "Relatorio is a templating library which provides a way to
12176easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
12177for more filetypes can be easily added by creating plugins for them.")
12178 (license license:gpl3+)))
12179
12180(define-public python2-relatorio
12181 (package-with-python2 python-relatorio))
12182
12183(define-public python-radon
12184 (package
12185 (name "python-radon")
12186 (version "2.2.0")
12187 (source
12188 (origin
12189 (method url-fetch)
12190 (uri (pypi-uri "radon" version))
12191 (sha256
12192 (base32
12193 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
12194 (build-system python-build-system)
12195 (arguments
12196 `(#:phases (modify-phases %standard-phases
12197 (replace 'check
12198 (lambda _
12199 (invoke "python" "radon/tests/run.py"))))))
12200 (propagated-inputs
12201 `(("python-colorama" ,python-colorama)
12202 ("python-flake8-polyfill" ,python-flake8-polyfill)
12203 ("python-mando" ,python-mando)))
12204 (native-inputs
12205 `(("python-pytest" ,python-pytest)
12206 ("python-pytest-mock" ,python-pytest-mock)))
12207 (home-page "https://radon.readthedocs.org/")
12208 (synopsis "Code Metrics in Python")
12209 (description "Radon is a Python tool which computes various code metrics.
12210Supported metrics are:
12211@itemize @bullet
12212@item raw metrics: SLOC, comment lines, blank lines, &c.
12213@item Cyclomatic Complexity (i.e. McCabe’s Complexity)
12214@item Halstead metrics (all of them)
12215@item the Maintainability Index (a Visual Studio metric)
12216@end itemize")
12217 (license license:expat)))
12218
12219(define-public python2-radon
12220 (package-with-python2 python-radon))
12221
12222(define-public python-sure
12223 (package
12224 (name "python-sure")
12225 (version "1.4.11")
12226 (source
12227 (origin
12228 (method url-fetch)
12229 (uri (pypi-uri "sure" version))
12230 (sha256
12231 (base32
12232 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
12233 (build-system python-build-system)
12234 (propagated-inputs
12235 `(("python-mock" ,python-mock)
12236 ("python-six" ,python-six)))
12237 (native-inputs
12238 `(("python-nose" ,python-nose)))
12239 (home-page "https://github.com/gabrielfalcao/sure")
12240 (synopsis "Automated testing library in python for python")
12241 (description
12242 "Sure is a python library that leverages a DSL for writing assertions.
12243Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
12244 (license license:gpl3+)))
12245
12246(define-public python2-sure
12247 (package-with-python2 python-sure))
12248
12249(define-public python2-couleur
12250 ;; This package does not seem to support python3 at all, hence,
12251 ;; only the python2 variant definition is provided.
12252 (package
12253 (name "python2-couleur")
12254 (version "0.6.2")
12255 (source
12256 (origin
12257 (method url-fetch)
12258 (uri (pypi-uri "couleur" version))
12259 (sha256
12260 (base32
12261 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
12262 (build-system python-build-system)
12263 (arguments
12264 `(#:python ,python-2))
12265 (home-page "https://github.com/gabrielfalcao/couleur")
12266 (synopsis
12267 "ANSI terminal tool for python, colored shell and other handy fancy features")
12268 (description
12269 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
12270terminal such as coloured output in the shell, overwriting output, indentation, etc.")
12271 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
12272 ;; https://github.com/gabrielfalcao/couleur/issues/11
12273 (license license:lgpl3+)))
12274
12275(define-public python-misaka
12276 (package
12277 (name "python-misaka")
0dcb3412 12278 (version "2.1.1")
44d10b1f
RW
12279 (source
12280 (origin
12281 (method url-fetch)
12282 (uri (pypi-uri "misaka" version))
12283 (sha256
12284 (base32
0dcb3412 12285 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
44d10b1f
RW
12286 (build-system python-build-system)
12287 (arguments
12288 `(;; Line 37 of setup.py calls self.run_command('develop')
12289 ;; in the 'check' phase. This command seems to be trying
12290 ;; to write to
12291 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
12292 ;; for which it does not have the permission to write.
12293 #:tests? #f))
12294 (propagated-inputs
12295 `(("python-cffi" ,python-cffi)))
12296 (home-page "https://github.com/FSX/misaka")
12297 (synopsis "Python binding for Hoedown")
12298 (description
12299 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
12300library written in C. It features a fast HTML renderer and functionality to make custom
12301renderers (e.g. man pages or LaTeX).")
12302 (license license:expat)))
12303
12304(define-public python2-misaka
12305 (package-with-python2 python-misaka))
12306
12307(define-public python2-steadymark
12308 ;; This is forced into being a python2 only variant
12309 ;; due to its dependence on couleur that has no support
12310 ;; for python3
12311 (package
12312 (name "python2-steadymark")
12313 (version "0.7.3")
12314 (source
12315 (origin
12316 (method url-fetch)
12317 (uri (pypi-uri "steadymark" version))
12318 (sha256
12319 (base32
12320 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
12321 (build-system python-build-system)
12322 (native-inputs
12323 `(("python-couleur" ,python2-couleur)
12324 ("python-sure" ,python2-sure)
12325 ("python-misaka" ,python2-misaka)))
12326 (arguments
12327 `(#:python ,python-2
12328 #:phases
12329 (modify-phases %standard-phases
12330 (add-before 'build 'patch-setup-py
12331 (lambda _
12332 ;; Update requirements from dependency==version
12333 ;; to dependency>=version
12334 (substitute* "setup.py"
12335 (("==") ">="))
12336 #t)))))
12337 (home-page "https://github.com/gabrielfalcao/steadymark")
12338 (synopsis "Markdown-based test runner for python")
12339 (description
12340 "@code{Steadymark} allows documentation to be written in github-flavoured
12341markdown. The documentation may contain snippets of code surrounded by python
12342code blocks and @code{Steadymark} will find these snippets and run them, making
12343sure that there are no old malfunctional examples in the documentation examples.")
12344 (license license:expat)))
12345
12346(define-public python-jsonpointer
12347 (package
12348 (name "python-jsonpointer")
12349 (version "1.10")
12350 (source
12351 (origin
12352 (method url-fetch)
12353 (uri (pypi-uri "jsonpointer" version))
12354 (sha256
12355 (base32
12356 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
12357 (build-system python-build-system)
12358 (home-page "https://github.com/stefankoegl/python-json-pointer")
12359 (synopsis "Identify specific nodes in a JSON document")
12360 (description "@code{jsonpointer} allows you to access specific nodes
12361by path in a JSON document (see RFC 6901).")
12362 (license license:bsd-3)))
12363
12364(define-public python2-jsonpointer
12365 (package-with-python2 python-jsonpointer))
12366
12367(define-public python-jsonpatch
12368 (package
12369 (name "python-jsonpatch")
12370 (version "1.16")
12371 (source
12372 (origin
12373 (method url-fetch)
12374 ;; pypi version lacks tests.js
12375 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12376 "archive/v" version ".tar.gz"))
12377 (file-name (string-append name "-" version ".tar.gz"))
12378 (sha256
12379 (base32
12380 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
12381 (build-system python-build-system)
12382 (native-inputs
12383 `(("python-jsonpointer" ,python-jsonpointer)))
12384 (home-page "https://github.com/stefankoegl/python-json-patch")
12385 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
12386 (description "@code{jsonpatch} is a library and program that allows
12387applying JSON Patches according to RFC 6902.")
12388 (license license:bsd-3)))
12389
12390(define-public python2-jsonpatch
12391 (package-with-python2 python-jsonpatch))
12392
12393(define-public python-jsonpatch-0.4
12394 (package (inherit python-jsonpatch)
12395 (name "python-jsonpatch")
12396 (version "0.4")
12397 (source
12398 (origin
12399 (method url-fetch)
12400 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12401 "archive/v" version ".tar.gz"))
12402 (file-name (string-append name "-" version ".tar.gz"))
12403 (sha256
12404 (base32
12405 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
12406
12407(define-public python2-jsonpatch-0.4
12408 (package-with-python2 python-jsonpatch-0.4))
12409
12410(define-public python-rfc3986
12411 (package
12412 (name "python-rfc3986")
12413 (version "1.1.0")
12414 (source (origin
12415 (method url-fetch)
12416 (uri (pypi-uri "rfc3986" version))
12417 (sha256
12418 (base32
12419 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
12420 (build-system python-build-system)
12421 (arguments
12422 `(#:modules ((guix build utils)
12423 (guix build python-build-system)
12424 (ice-9 ftw)
12425 (srfi srfi-1)
12426 (srfi srfi-26))
12427 #:phases
12428 (modify-phases %standard-phases
12429 (replace 'check
12430 (lambda _
12431 (let ((cwd (getcwd)))
12432 (setenv "PYTHONPATH"
12433 (string-append cwd "/build/"
12434 (find (cut string-prefix? "lib" <>)
12435 (scandir (string-append cwd "/build")))
12436 ":"
12437 (getenv "PYTHONPATH")))
12438 (invoke "pytest" "-v")))))))
12439 (native-inputs
12440 `(("python-pytest" ,python-pytest)))
12441 (home-page "https://rfc3986.readthedocs.io/")
12442 (synopsis "Parse and validate URI references")
12443 (description
12444 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
12445validation and authority parsing. This module also supports RFC@tie{}6874
12446which adds support for zone identifiers to IPv6 addresses.")
12447 (license license:asl2.0)))
12448
12449(define-public python2-rfc3986
12450 (package-with-python2 python-rfc3986))
12451
12452(define-public python-rfc3987
12453 (package
12454 (name "python-rfc3987")
12455 (version "1.3.7")
12456 (source
12457 (origin
12458 (method url-fetch)
12459 (uri (pypi-uri "rfc3987" version))
12460 (sha256
12461 (base32
12462 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
12463 (build-system python-build-system)
12464 (home-page "https://pypi.python.org/pypi/rfc3987")
12465 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
12466 (description "@code{rfc3987} provides routines for parsing and
12467validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
12468 (license license:gpl3+)))
12469
12470(define-public python2-rfc3987
12471 (package-with-python2 python-rfc3987))
12472
12473(define-public python-validate-email
12474 (package
12475 (name "python-validate-email")
12476 (version "1.3")
12477 (source
12478 (origin
12479 (method url-fetch)
12480 (uri (pypi-uri "validate_email" version))
12481 (sha256
12482 (base32
12483 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
12484 (build-system python-build-system)
12485 (home-page "https://github.com/syrusakbary/validate_email")
12486 (synopsis "Verifies if an email address is valid and really exists")
12487 (description "@code{validate_email} can be used to verify if an email
12488address is valid and really exists.")
12489 (license license:lgpl3+)))
12490
12491(define-public python2-validate-email
12492 (package-with-python2 python-validate-email))
12493
12494(define-public python-flex
12495 (package
12496 (name "python-flex")
12497 (version "6.10.0")
12498 (source
12499 (origin
12500 (method url-fetch)
12501 (uri (pypi-uri "flex" version))
12502 (sha256
12503 (base32
12504 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
12505 (build-system python-build-system)
12506 (propagated-inputs
12507 `(("python-click" ,python-click)
12508 ("python-iso8601" ,python-iso8601)
12509 ("python-jsonpointer" ,python-jsonpointer)
12510 ("python-pyyaml" ,python-pyyaml)
12511 ("python-requests" ,python-requests)
12512 ("python-rfc3987" ,python-rfc3987)
12513 ("python-six" ,python-six)
12514 ("python-validate-email" ,python-validate-email)))
12515 (home-page "https://github.com/pipermerriam/flex")
12516 (synopsis "Validates Swagger schemata")
12517 (description "@code{flex} can be used to validate Swagger schemata.")
12518 (license license:bsd-3)))
12519
12520(define-public python2-flex
12521 (package-with-python2 python-flex))
12522
12523(define-public python-marshmallow
12524 (package
12525 (name "python-marshmallow")
12526 (version "3.0.0b14")
12527 (source
12528 (origin
12529 (method url-fetch)
12530 (uri (pypi-uri "marshmallow" version))
12531 (sha256
12532 (base32
12533 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
12534 (build-system python-build-system)
12535 (propagated-inputs
12536 `(("python-dateutil" ,python-dateutil)
12537 ("python-simplejson" ,python-simplejson)))
12538 (native-inputs
12539 `(("python-pytest" ,python-pytest)
12540 ("python-pytz" ,python-pytz)))
12541 (home-page "https://github.com/marshmallow-code/marshmallow")
12542 (synopsis "Convert complex datatypes to and from native
12543Python datatypes.")
12544 (description "@code{marshmallow} provides a library for converting
12545complex datatypes to and from native Python datatypes.")
12546 (license license:expat)))
12547
12548(define-public python2-marshmallow
12549 (package-with-python2 python-marshmallow))
12550
12551(define-public python-apispec
12552 (package
12553 (name "python-apispec")
12554 (version "0.25.3")
12555 (source
12556 (origin
12557 (method url-fetch)
12558 (uri (pypi-uri "apispec" version))
12559 (sha256
12560 (base32
12561 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
12562 (build-system python-build-system)
12563 (propagated-inputs
12564 `(("python-pyyaml" ,python-pyyaml)))
12565 (native-inputs
12566 `(("python-pytest" ,python-pytest)
12567 ("python-flask" ,python-flask)
12568 ("python-marshmallow" ,python-marshmallow)
12569 ("python-tornado" ,python-tornado)
12570 ("python-bottle" ,python-bottle)
12571 ("python-mock" ,python-mock)))
12572 (home-page "https://github.com/marshmallow-code/apispec")
12573 (synopsis "Swagger 2.0 API specification generator")
12574 (description "@code{python-apispec} is a pluggable API specification
12575generator. Currently supports the OpenAPI specification (f.k.a.
12576Swagger 2.0).")
12577 (license license:expat)))
12578
12579(define-public python2-apispec
12580 (package-with-python2 python-apispec))
12581
12582(define-public python-flasgger
12583 (package
12584 (name "python-flasgger")
12585 (version "0.6.3")
12586 (source
12587 (origin
12588 (method url-fetch)
12589 (uri (string-append "https://github.com/rochacbruno/flasgger/archive/"
12590 version ".tar.gz"))
12591 (file-name (string-append name "-" version ".tar.gz"))
12592 (sha256
12593 (base32
12594 "1gqzlm0rb55fdpsy5ipkganlx9cnpi454fqyycr03jm22zql14ay"))))
12595 (build-system python-build-system)
12596 (arguments
12597 `(#:phases
12598 (modify-phases %standard-phases
12599 (replace 'check
12600 (lambda* (#:key inputs outputs #:allow-other-keys)
12601 (substitute* "Makefile"
12602 (("flake8 flasgger --ignore=F403")
12603 "flake8 flasgger --ignore=E731,F403"))
12604 (setenv "PYTHONPATH" (string-append (getcwd)
12605 ":"
12606 (getenv "PYTHONPATH")))
ac599a09 12607 (invoke "py.test"))))))
44d10b1f
RW
12608 (propagated-inputs
12609 `(("python-flask" ,python-flask)
12610 ("python-pyyaml" ,python-pyyaml)
12611 ("python-jsonschema" ,python-jsonschema)
12612 ("python-mistune" ,python-mistune)
12613 ("python-six" ,python-six)))
12614 (native-inputs
12615 `(("python-decorator" ,python-decorator)
12616 ("python-flake8" ,python-flake8)
12617 ("python-flask-restful" ,python-flask-restful)
12618 ("python-flex" ,python-flex)
12619 ("python-pytest" ,python-pytest)
12620 ("python-pytest-cov" ,python-pytest-cov)
12621 ("python-marshmallow" ,python-marshmallow)
12622 ("python-apispec" ,python-apispec)))
12623 (home-page "https://github.com/rochacbruno/flasgger/")
12624 (synopsis "Extract Swagger specs from your Flask project")
12625 (description "@code{python-flasgger} allows extracting Swagger specs
12626from your Flask project. It is a fork of Flask-Swagger.")
12627 (license license:expat)))
12628
12629(define-public python2-flasgger
12630 (package-with-python2 python-flasgger))
12631
12632(define-public python-swagger-spec-validator
12633 (package
12634 (name "python-swagger-spec-validator")
12635 (version "2.1.0")
12636 (source
12637 (origin
12638 (method url-fetch)
12639 (uri (pypi-uri "swagger-spec-validator" version))
12640 (sha256
12641 (base32
12642 "13hkpn2lycwr0468yqhjb3kwszqf7hjwlq61w7vdxq1caz31k4nw"))))
12643 (build-system python-build-system)
12644 (propagated-inputs
12645 `(("python-jsonschema" ,python-jsonschema)
12646 ("python-six" ,python-six)))
12647 (home-page
12648 "https://github.com/Yelp/swagger_spec_validator")
12649 (synopsis "Validation of Swagger specifications")
12650 (description "@code{swagger_spec_validator} provides a library for
12651validating Swagger API specifications.")
12652 (license license:asl2.0)))
12653
12654(define-public python2-swagger-spec-validator
12655 (package-with-python2 python-swagger-spec-validator))
12656
12657(define-public python-apache-libcloud
12658 (package
12659 (name "python-apache-libcloud")
12660 (version "2.4.0")
12661 (source
12662 (origin
12663 (method url-fetch)
12664 (uri (pypi-uri "apache-libcloud" version))
12665 (sha256
12666 (base32
12667 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
12668 (build-system python-build-system)
12669 (arguments
12670 `(#:phases
12671 (modify-phases %standard-phases
12672 (add-after 'unpack 'patch-ssh
12673 (lambda* (#:key inputs #:allow-other-keys)
12674 (substitute* "libcloud/compute/ssh.py"
12675 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
12676 "/bin/ssh" "'")))
12677 #t))
12678 (add-after 'unpack 'patch-tests
12679 (lambda _
12680 (substitute* "./libcloud/test/test_file_fixtures.py"
12681 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
12682 (("def _ascii") "def _raw_data(self, method, url, body, headers):
12683 return (httplib.OK,
12684 \"1234abcd\",
12685 {\"test\": \"value\"},
12686 httplib.responses[httplib.OK])
12687 def _ascii"))
12688 (substitute* "libcloud/test/compute/test_ssh_client.py"
12689 (("class ShellOutSSHClientTests")
12690 "@unittest.skip(\"Guix container doesn't have ssh service\")
12691class ShellOutSSHClientTests")
12692 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
12693 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
12694 (("'.xF0', '.x90', '.x8D', '.x88'")
12695 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
12696 #t))
12697 (add-before 'check 'copy-secret
12698 (lambda _
12699 (copy-file "libcloud/test/secrets.py-dist"
12700 "libcloud/test/secrets.py")
12701 #t)))))
12702 (inputs
12703 `(("openssh" ,openssh)))
12704 (propagated-inputs
12705 `(("python-paramiko" ,python-paramiko)
12706 ("python-requests" ,python-requests)))
12707 (native-inputs
12708 `(("python-lockfile" ,python-lockfile)
12709 ("python-mock" ,python-mock)
12710 ("python-pytest" ,python-pytest)
12711 ("python-pytest-runner" ,python-pytest-runner)
12712 ("python-requests-mock" ,python-requests-mock)))
12713 (home-page "https://libcloud.apache.org/")
12714 (synopsis "Unified Cloud API")
12715 (description "@code{libcloud} is a Python library for interacting with
12716many of the popular cloud service providers using a unified API.")
12717 (license license:asl2.0)))
12718
12719(define-public python2-apache-libcloud
12720 (package-with-python2 python-apache-libcloud))
12721
12722(define-public python-smmap2
12723 (package
12724 (name "python-smmap2")
12725 (version "2.0.3")
12726 (source
12727 (origin
12728 (method url-fetch)
12729 (uri (pypi-uri "smmap2" version))
12730 (sha256
12731 (base32
12732 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
12733 (build-system python-build-system)
12734 (native-inputs
12735 `(("python-nosexcover" ,python-nosexcover)))
12736 (home-page "https://github.com/Byron/smmap")
12737 (synopsis "Python sliding window memory map manager")
12738 (description "@code{smmap2} is a pure Python implementation of a sliding
12739window memory map manager.")
12740 (license license:bsd-3)))
12741
12742(define-public python2-smmap2
12743 (package-with-python2 python-smmap2))
12744
12745(define-public python-regex
12746 (package
12747 (name "python-regex")
12748 (version "2017.06.07")
12749 (source (origin
12750 (method url-fetch)
12751 (uri (pypi-uri "regex" version))
12752 (sha256
12753 (base32
12754 "06r6b7yigikbj3a72whl85r2b64pj1r0ypmw9yalmkm0wnxq8mz4"))))
12755 (build-system python-build-system)
12756 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
12757 (synopsis "Alternative regular expression module")
12758 (description "This regular expression implementation is backwards-
12759compatible with the standard @code{re} module, but offers additional
12760functionality like full case-folding for case-insensitive matches in Unicode.")
12761 (license license:psfl)))
12762
12763(define-public python2-regex
12764 (package-with-python2 python-regex))
12765
12766(define-public python2-pyopengl
12767 (package
12768 (name "python2-pyopengl")
12769 (version "3.1.0")
12770 (source
12771 (origin
12772 (method url-fetch)
12773 (uri (pypi-uri "PyOpenGL" version))
12774 (sha256
12775 (base32
12776 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
12777 (arguments
12778 `(#:python ,python-2))
12779 (build-system python-build-system)
12780 (home-page "http://pyopengl.sourceforge.net")
12781 (synopsis "Standard OpenGL bindings for Python")
12782 (description
12783 "PyOpenGL is the most common cross platform Python binding to OpenGL and
12784related APIs. The binding is created using the standard @code{ctypes}
12785library.")
12786 (license license:bsd-3)))
12787
12788(define-public python2-pyopengl-accelerate
12789 (package
12790 (inherit python2-pyopengl)
12791 (name "python2-pyopengl-accelerate")
12792 (version "3.1.0")
12793 (source
12794 (origin
12795 (method url-fetch)
12796 (uri (pypi-uri "PyOpenGL-accelerate" version))
12797 (sha256
12798 (base32
12799 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
12800 (synopsis "Acceleration code for PyOpenGL")
12801 (description
12802 "This is the Cython-coded accelerator module for PyOpenGL.")))
12803
12804(define-public python-rencode
12805 (package
12806 (name "python-rencode")
12807 (version "1.0.5")
12808 (source
12809 (origin
12810 (method url-fetch)
12811 (uri (pypi-uri "rencode" version))
12812 (sha256
12813 (base32
12814 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
12815 (build-system python-build-system)
12816 (arguments
12817 `(#:phases
12818 (modify-phases %standard-phases
12819 (add-before 'check 'delete-bogus-test
12820 ;; This test requires /home/aresch/Downloads, which is not provided by
12821 ;; the build environment.
12822 (lambda _
12823 (delete-file "rencode/t.py")
12824 #t)))))
12825 (native-inputs `(("pkg-config" ,pkg-config)
12826 ("python-cython" ,python-cython)))
12827 (home-page "https://github.com/aresch/rencode")
12828 (synopsis "Serialization of heterogeneous data structures")
12829 (description
12830 "The @code{rencode} module is a data structure serialization library,
12831similar to @code{bencode} from the BitTorrent project. For complex,
12832heterogeneous data structures with many small elements, r-encoding stake up
12833significantly less space than b-encodings. This version of rencode is a
12834complete rewrite in Cython to attempt to increase the performance over the
12835pure Python module.")
12836 (license license:bsd-3)))
12837
12838(define-public python2-rencode
12839 (package-with-python2 python-rencode))
12840
12841(define-public python-xenon
12842 (package
12843 (name "python-xenon")
12844 (version "0.5.4")
12845 (source
12846 (origin
12847 (method url-fetch)
12848 (uri (pypi-uri "xenon" version))
12849 (sha256
12850 (base32
12851 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
12852 (build-system python-build-system)
12853 (native-inputs
12854 `(("python-pyyaml" ,python-pyyaml)
12855 ("python-radon" ,python-radon)
12856 ("python-requests" ,python-requests)
12857 ("python-flake8" ,python-flake8)
12858 ("python-tox" ,python-tox)))
12859 (arguments
12860 `(#:phases
12861 (modify-phases %standard-phases
12862 (add-before 'build 'patch-test-requirements
12863 (lambda _
12864 ;; Remove httpretty dependency for tests.
12865 (substitute* "setup.py"
12866 (("httpretty") ""))
12867 #t)))))
12868 (home-page "https://xenon.readthedocs.org/")
12869 (synopsis "Monitor code metrics for Python on your CI server")
12870 (description
12871 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
12872Ideally, @code{xenon} is run every time code is committed. Through command
12873line options, various thresholds can be set for the complexity of code. It
12874will fail (i.e. it will exit with a non-zero exit code) when any of these
12875requirements is not met.")
12876 (license license:expat)))
12877
12878(define-public python2-xenon
12879 (package-with-python2 python-xenon))
12880
12881(define-public python-pysocks
12882 (package
12883 (name "python-pysocks")
12884 (version "1.6.8")
12885 (source
12886 (origin
12887 (method url-fetch)
12888 (uri (pypi-uri "PySocks" version))
12889 (sha256
12890 (base32
12891 "0wn6xafwy9c1gamwljw3fyvih5w19qy9xp39zmv8c90ai5ajrr9z"))))
12892 (build-system python-build-system)
12893 (arguments `(#:tests? #f))
12894 (home-page "https://github.com/Anorov/PySocks")
12895 (synopsis "SOCKS client module")
12896 (description "@code{pysocks} is an updated and semi-actively maintained
12897version of @code{SocksiPy} with bug fixes and extra features.")
12898 (license license:bsd-3)))
12899
12900(define-public python2-pysocks
12901 (package-with-python2 python-pysocks))
12902
12903(define-public python-pydiff
12904 (package
12905 (name "python-pydiff")
12906 (version "0.2")
12907 (source
12908 (origin
12909 (method url-fetch)
12910 (uri (pypi-uri "pydiff" version))
12911 (sha256
12912 (base32
12913 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
12914 (build-system python-build-system)
12915 (home-page "https://github.com/myint/pydiff")
12916 (synopsis "Library to diff two Python files at the bytecode level")
12917 (description
12918 "@code{pydiff} makes it easy to look for actual code changes while
12919ignoring formatting changes.")
12920 (license license:expat)))
12921
12922(define-public python2-pydiff
12923 (package-with-python2 python-pydiff))
12924
12925(define-public python-tqdm
12926 (package
12927 (name "python-tqdm")
12928 (version "4.19.6")
12929 (source
12930 (origin
12931 (method url-fetch)
12932 (uri (pypi-uri "tqdm" version))
12933 (sha256
12934 (base32
12935 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
12936 (build-system python-build-system)
12937 (native-inputs
12938 `(("python-flake8" ,python-flake8)
12939 ("python-nose" ,python-nose)
12940 ("python-coverage" ,python-coverage)))
12941 (home-page "https://github.com/tqdm/tqdm")
12942 (synopsis "Fast, extensible progress meter")
12943 (description
12944 "Make loops show a progress bar on the console by just wrapping any
12945iterable with @code{|tqdm(iterable)|}. Offers many options to define
12946design and layout.")
12947 (license (list license:mpl2.0 license:expat))))
12948
12949(define-public python2-tqdm
12950 (package-with-python2 python-tqdm))
12951
12952(define-public python-pkginfo
12953 (package
12954 (name "python-pkginfo")
12955 (version "1.4.2")
12956 (source
12957 (origin
12958 (method url-fetch)
12959 (uri (pypi-uri "pkginfo" version))
12960 (sha256
12961 (base32
12962 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
12963 (build-system python-build-system)
12964 (arguments
12965 ;; The tests are broken upstream.
12966 '(#:tests? #f))
12967 (home-page
12968 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
12969 (synopsis
12970 "Query metadatdata from sdists, bdists, and installed packages")
12971 (description
12972 "API to query the distutils metadata written in @file{PKG-INFO} inside a
12973source distriubtion (an sdist) or a binary distribution (e.g., created by
12974running bdist_egg). It can also query the EGG-INFO directory of an installed
12975distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
12976created by running @code{python setup.py develop}).")
12977 (license license:expat)))
12978
12979(define-public python2-pkginfo
12980 (package-with-python2 python-pkginfo))
12981
12982(define-public python-twine
12983 (package
12984 (name "python-twine")
12985 (version "1.9.1")
12986 (source
12987 (origin
12988 (method url-fetch)
12989 (uri (pypi-uri "twine" version))
12990 (sha256
12991 (base32
12992 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
12993 (build-system python-build-system)
12994 (propagated-inputs
12995 `(("python-tqdm" ,python-tqdm)
12996 ("python-pkginfo" ,python-pkginfo)
12997 ("python-requests" ,python-requests)
12998 ("python-requests-toolbelt" ,python-requests-toolbelt)))
12999 (home-page "https://github.com/pypa/twine")
13000 (synopsis "Collection of utilities for interacting with PyPI")
13001 (description
13002 "@code{twine} currently supports registering projects and uploading
13003distributions. It authenticates the user over HTTPS, allows them to pre-sign
13004their files and supports any packaging format (including wheels).")
13005 (license license:asl2.0)))
13006
13007(define-public python2-twine
13008 (package-with-python2 python-twine))
13009
13010(define-public python-linecache2
13011 (package
13012 (name "python-linecache2")
13013 (version "1.0.0")
13014 (source
13015 (origin
13016 (method url-fetch)
13017 (uri (pypi-uri "linecache2" version))
13018 (sha256
13019 (base32
13020 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
13021 (build-system python-build-system)
13022 (arguments
13023 `(;; The tests depend on unittest2, and our version is a bit too old.
13024 #:tests? #f))
13025 (native-inputs
13026 `(("python-pbr" ,python-pbr-minimal)))
13027 (home-page
13028 "https://github.com/testing-cabal/linecache2")
13029 (synopsis "Backports of the linecache module")
13030 (description
13031 "The linecache module allows one to get any line from any file, while
13032attempting to optimize internally, using a cache, the common case where many
13033lines are read from a single file.")
13034 (license license:psfl)))
13035
13036(define-public python2-linecache2
13037 (package-with-python2 python-linecache2))
13038
13039(define-public python-traceback2
13040 (package
13041 (name "python-traceback2")
13042 (version "1.4.0")
13043 (source
13044 (origin
13045 (method url-fetch)
13046 (uri (pypi-uri "traceback2" version))
13047 (sha256
13048 (base32
13049 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
13050 (build-system python-build-system)
13051 (arguments
13052 `(;; python-traceback2 and python-unittest2 depend on one another.
13053 #:tests? #f))
13054 (native-inputs
13055 `(("python-pbr" ,python-pbr-minimal)))
13056 (propagated-inputs
13057 `(("python-linecache2" ,python-linecache2)))
13058 (home-page
13059 "https://github.com/testing-cabal/traceback2")
13060 (synopsis "Backports of the traceback module")
13061 (description
13062 "This module provides a standard interface to extract, format and print
13063stack traces of Python programs. It exactly mimics the behavior of the Python
13064interpreter when it prints a stack trace.")
13065 (license license:psfl)))
13066
13067(define-public python2-traceback2
13068 (package-with-python2 python-traceback2))
13069
13070(define-public python-ratelimiter
13071 (package
13072 (name "python-ratelimiter")
13073 (version "1.2.0")
13074 (source
13075 (origin
13076 (method url-fetch)
13077 (uri (pypi-uri "ratelimiter" version))
13078 (sha256
13079 (base32
13080 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
13081 (build-system python-build-system)
13082 (arguments
13083 '(#:tests? #f)) ; There are no tests in the pypi archive.
13084 (home-page "https://github.com/RazerM/ratelimiter")
13085 (synopsis "Simple rate limiting object")
13086 (description
13087 "The @code{ratelimiter} module ensures that an operation will not be
13088executed more than a given number of times during a given period.")
13089 (license license:asl2.0)))
13090
13091(define-public python2-ratelimiter
13092 (package-with-python2 python-ratelimiter))
13093
13094(define-public python-dukpy
13095 (package
13096 (name "python-dukpy")
13097 (version "0.3")
13098 (source
13099 (origin
13100 (method url-fetch)
13101 (uri (string-append "https://github.com/kovidgoyal/dukpy/archive/v"
13102 version ".tar.gz"))
13103 (file-name (string-append name "-" version ".tar.gz"))
13104 (sha256
13105 (base32
13106 "0pj39rfwlzivqm5hkrsza7gssg6ggpxlq5ivc8f3h7x5pfgc6y6c"))))
13107 (build-system python-build-system)
13108 (home-page "https://github.com/kovidgoyal/dukpy")
13109 (synopsis "Run JavaScript in python")
13110 (description
13111 "dukpy is a JavaScript runtime environment for Python using the duktape
13112embeddable JavaScript engine.")
13113 ;; Dukpy is licensed under MIT like the embedded duktape library,
13114 ;; with 'errors.c' as GPL3.
13115 (license (list license:expat license:gpl3))))
13116
13117(define-public python2-dukpy
13118 (package-with-python2 python-dukpy))
13119
13120(define-public python-jsonrpclib-pelix
13121 (package
13122 (name "python-jsonrpclib-pelix")
13123 (version "0.3.2")
13124 (source
13125 (origin
13126 (method url-fetch)
13127 (uri (pypi-uri "jsonrpclib-pelix" version))
13128 (sha256
13129 (base32
13130 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
13131 (build-system python-build-system)
13132 (arguments
13133 `(#:tests? #f)) ; no tests in PyPI tarball
13134 (home-page "https://github.com/tcalmant/jsonrpclib/")
13135 (synopsis "JSON-RPC 2.0 client library for Python")
13136 (description
13137 "This library implements the JSON-RPC v2.0
13138specification (backwards-compatible) as a client library for Python. This
13139version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
13140services.")
13141 (license license:asl2.0)))
13142
13143(define-public python2-jsonrpclib-pelix
13144 (package-with-python2 python-jsonrpclib-pelix))
13145
13146(define-public python-setuptools-scm-git-archive
13147 (package
13148 (name "python-setuptools-scm-git-archive")
13149 (version "1.0")
13150 (source
13151 (origin
13152 (method url-fetch)
13153 (uri (pypi-uri "setuptools_scm_git_archive" version))
13154 (sha256
13155 (base32
13156 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
13157 (build-system python-build-system)
13158 (native-inputs
13159 `(("python-pytest" ,python-pytest)))
13160 (propagated-inputs
13161 `(("python-setuptools-scm" ,python-setuptools-scm)))
13162 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
13163 (synopsis "Setuptools_scm plugin for git archives")
13164 (description
13165 "The setuptools_scm_git_archive package is a plugin to
13166setuptools_scm, which supports obtaining versions from git archives that
13167belong to tagged versions.")
13168 (license license:expat)))
13169
13170(define-public python2-setuptools-scm-git-archive
13171 (package-with-python2 python-setuptools-scm-git-archive))
13172
13173(define-public python-pyclipper
13174 (package
13175 (name "python-pyclipper")
13176 (version "1.1.0.post1")
13177 (source
13178 (origin
13179 (method url-fetch)
13180 (uri (pypi-uri "pyclipper" version ".zip"))
13181 (sha256
13182 (base32
13183 "0ldbkbnx94an4zzrwb1sxmg6k0jgk4cwmvcdyy8y5k1zslc612wa"))
13184 (modules '((guix build utils)))
13185 (snippet
13186 '(begin
13187 ;; This file is generated by Cython.
13188 (delete-file "pyclipper/pyclipper.cpp") #t))))
13189 (build-system python-build-system)
13190 (arguments
13191 `(#:phases
13192 (modify-phases %standard-phases
13193 (add-before 'build 'cythonize-sources
13194 (lambda _
13195 (with-directory-excursion "pyclipper"
13196 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
13197 (propagated-inputs
13198 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
13199 (native-inputs
13200 `(("python-cython" ,python-cython)
13201 ("python-pytest" ,python-pytest)
13202 ("python-pytest-runner" ,python-pytest-runner)
13203 ("python-unittest2" ,python-unittest2)
13204 ("unzip" ,unzip)))
13205 (home-page "https://github.com/greginvm/pyclipper")
13206 (synopsis "Wrapper for Angus Johnson's Clipper library")
13207 (description
13208 "Pyclipper is a Cython wrapper for the C++ translation of the
13209Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
13210 (license license:expat)))
13211
13212(define-public python2-pyclipper
13213 (package-with-python2 python-pyclipper))
13214
13215(define-public python2-booleanoperations
13216 (package
13217 (name "python2-booleanoperations")
13218 (version "0.7.1")
13219 (source
13220 (origin
13221 (method url-fetch)
13222 (uri (pypi-uri "booleanOperations" version ".zip"))
13223 (sha256
13224 (base32
13225 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
13226 (build-system python-build-system)
13227 (arguments
13228 `(#:python ,python-2))
13229 (native-inputs
13230 `(("unzip" ,unzip)
13231 ("python2-pytest" ,python2-pytest)
13232 ("python2-pytest-runner" ,python2-pytest-runner)))
13233 (propagated-inputs
13234 `(("python-fonttools" ,python2-fonttools)
13235 ("python-pyclipper" ,python2-pyclipper)
13236 ("python-ufolib" ,python2-ufolib)))
13237 (home-page "https://github.com/typemytype/booleanOperations")
13238 (synopsis "Boolean operations on paths")
13239 (description
13240 "BooleanOperations provides a Python library that enables
13241boolean operations on paths.")
13242 (license license:expat)))
13243
13244(define-public python-tempdir
13245 (package
13246 (name "python-tempdir")
13247 (version "0.7.1")
13248 (source
13249 (origin
13250 (method url-fetch)
13251 (uri (pypi-uri "tempdir" version))
13252 (sha256
13253 (base32
13254 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
13255 (build-system python-build-system)
13256 (home-page "https://pypi.org/project/tempdir/")
13257 (arguments
13258 ;; the package has no tests
13259 '(#:tests? #f))
13260 (synopsis "Python library for managing temporary directories")
13261 (description
13262 "This library manages temporary directories that are automatically
13263deleted with all their contents when they are no longer needed. It is
13264particularly convenient for use in tests.")
13265 (license license:expat)))
13266
13267(define-public python2-tempdir
13268 (package-with-python2 python-tempdir))
13269
13270(define-public python-activepapers
13271 (package
13272 (name "python-activepapers")
13273 (version "0.2.2")
13274 (source
13275 (origin
13276 (method url-fetch)
13277 (uri (pypi-uri "ActivePapers.Py" version))
13278 (sha256
13279 (base32
13280 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
13281 (build-system python-build-system)
13282 (arguments
13283 `(#:modules ((ice-9 ftw)
13284 (srfi srfi-1)
13285 (guix build utils)
13286 (guix build python-build-system))
13287
13288 #:phases
13289 (modify-phases %standard-phases
13290 (add-after 'unpack 'delete-python2-code
13291 (lambda _
13292 (for-each delete-file
13293 '("lib/activepapers/builtins2.py"
13294 "lib/activepapers/standardlib2.py"
13295 "lib/activepapers/utility2.py"))))
13296 (replace 'check
13297 (lambda _
13298 ;; Deactivate the test cases that download files
13299 (setenv "NO_NETWORK_ACCESS" "1")
13300 ;; For some strange reason, some tests fail if nosetests runs all
13301 ;; test modules in a single execution. They pass if each test
13302 ;; module is run individually.
13303 (for-each (lambda (filename)
13304 (invoke "nosetests"
13305 (string-append "tests/" filename)))
13306 (scandir "tests"
13307 (lambda (filename)
13308 (string-suffix? ".py" filename)))))))))
13309 (native-inputs
13310 `(("python-tempdir" ,python-tempdir)
13311 ("python-nose" ,python-nose)))
13312 (propagated-inputs
13313 `(("python-h5py" ,python-h5py)))
13314 (home-page "http://www.activepapers.org/")
13315 (synopsis "Executable papers for scientific computing")
13316 (description
13317 "ActivePapers is a tool for working with executable papers, which
13318combine data, code, and documentation in single-file packages,
13319suitable for publication as supplementary material or on repositories
13320such as figshare or Zenodo.")
13321 (properties `((python2-variant . ,(delay python2-activepapers))))
13322 (license license:bsd-3)))
13323
13324(define-public python2-activepapers
13325 (let ((base (package-with-python2
13326 (strip-python2-variant python-activepapers))))
13327 (package
13328 (inherit base)
13329 (arguments
13330 (substitute-keyword-arguments (package-arguments base)
13331 ((#:phases phases)
13332 `(modify-phases ,phases
13333 (delete 'delete-python2-code)
13334 (add-after 'unpack 'delete-python3-code
13335 (lambda _
13336 (for-each delete-file
13337 '("lib/activepapers/builtins3.py"
13338 "lib/activepapers/standardlib3.py"
13339 "lib/activepapers/utility3.py")))))))))))
13340
13341(define-public python-semver
13342 (package
13343 (name "python-semver")
13344 (version "2.7.9")
13345 (source
13346 (origin
13347 (method url-fetch)
13348 (uri (pypi-uri "semver" version))
13349 (sha256
13350 (base32
13351 "0hhgqppchv59rqj0yzi1prdg2nfsywqmjsqy2rycyxm0hvxmbyqz"))))
13352 (build-system python-build-system)
13353 (arguments
13354 `(#:phases
13355 (modify-phases %standard-phases
13356 (add-after 'unpack 'patch-test-requirements
13357 (lambda _
13358 (substitute* "setup.py"
13359 ;; Our Python is new enough.
13360 (("'virtualenv<14\\.0\\.0'") "'virtualenv'"))
13361 #t)))))
13362 (native-inputs
13363 `(("python-tox" ,python-tox)
13364 ("python-virtualenv" ,python-virtualenv)))
13365 (home-page "https://github.com/k-bx/python-semver")
13366 (synopsis "Python helper for Semantic Versioning")
13367 (description "This package provides a Python library for
13368@url{Semantic Versioning, http://semver.org/}.")
13369 (license license:bsd-3)))
13370
13371(define-public python2-semver
13372 (package-with-python2 python-semver))
13373
13374(define-public python-pyro4
13375 (package
13376 (name "python-pyro4")
ad1acb81 13377 (version "4.75")
44d10b1f
RW
13378 (source
13379 (origin
13380 (method url-fetch)
13381 (uri (pypi-uri "Pyro4" version))
13382 (sha256
ad1acb81 13383 (base32 "1dfpp36imddx19yv0kd28gk1l71ckhpqy6jd590wpm2680jw15rq"))))
44d10b1f
RW
13384 (build-system python-build-system)
13385 (propagated-inputs
13386 `(("python-serpent" ,python-serpent)))
13387 (home-page "https://pyro4.readthedocs.io")
13388 (synopsis "Distributed object middleware for Python")
13389 (description
13390 "Pyro enables you to build applications in which objects can talk to each
13391other over the network. You can just use normal Python method calls to call
13392objects on other machines, also known as remote procedure calls (RPC).")
13393 (license license:expat)))
13394
13395(define-public python2-pyro
13396 (package
13397 (name "python2-pyro")
13398 (version "3.16")
13399 (source
13400 (origin
13401 (method url-fetch)
13402 (uri (pypi-uri "Pyro" version))
13403 (file-name (string-append "Pyro-" version ".tar.gz"))
13404 (sha256
13405 (base32
13406 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
13407 (build-system python-build-system)
13408 (arguments
13409 ;; Pyro is not compatible with Python 3
13410 `(#:python ,python-2
13411 ;; Pyro has no test cases for automatic execution
13412 #:tests? #f))
13413 (home-page "http://pythonhosted.org/Pyro/")
13414 (synopsis "Distributed object manager for Python")
13415 (description "Pyro is a Distributed Object Technology system
13416written in Python that is designed to be easy to use. It resembles
13417Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
13418which is a system and language independent Distributed Object Technology
13419and has much more to offer than Pyro or RMI. Pyro 3.x is no
13420longer maintained. New projects should use Pyro4 instead, which
13421is the new Pyro version that is actively developed.")
13422 (license license:expat)))
13423
13424(define-public python2-scientific
13425 (package
13426 (name "python2-scientific")
13427 (version "2.9.4")
13428 (source
13429 (origin
13430 (method url-fetch)
13431 (uri (string-append "https://bitbucket.org/khinsen/"
13432 "scientificpython/downloads/ScientificPython-"
13433 version ".tar.gz"))
13434 (file-name (string-append "ScientificPython-" version ".tar.gz"))
13435 (sha256
13436 (base32
13437 "0fc69zhlsn9d2jvbzyjl9ah53vj598h84nkq230c83ahfvgzx5y3"))))
13438 (build-system python-build-system)
13439 (inputs
13440 `(("netcdf" ,netcdf)))
13441 (propagated-inputs
13442 `(("python-numpy" ,python2-numpy-1.8)
13443 ("python-pyro" ,python2-pyro)))
13444 (arguments
13445 ;; ScientificPython is not compatible with Python 3
13446 `(#:python ,python-2
13447 #:tests? #f ; No test suite
13448 #:phases
13449 (modify-phases %standard-phases
13450 (replace 'build
13451 (lambda* (#:key inputs #:allow-other-keys)
77e61e25
RW
13452 (invoke "python" "setup.py" "build"
13453 (string-append "--netcdf_prefix="
13454 (assoc-ref inputs "netcdf"))))))))
44d10b1f
RW
13455 (home-page "https://bitbucket.org/khinsen/scientificpython")
13456 (synopsis "Python modules for scientific computing")
13457 (description "ScientificPython is a collection of Python modules that are
13458useful for scientific computing. Most modules are rather general (Geometry,
13459physical units, automatic derivatives, ...) whereas others are more
13460domain-specific (e.g. netCDF and PDB support). The library is currently
13461not actively maintained and works only with Python 2 and NumPy < 1.9.")
13462 (license license:cecill-c)))
13463
13464(define-public python2-mmtk
13465 (package
13466 (name "python2-mmtk")
13467 (version "2.7.11")
13468 (source
13469 (origin
13470 (method url-fetch)
13471 (uri (string-append "https://bitbucket.org/khinsen/"
13472 "mmtk/downloads/MMTK-" version ".tar.gz"))
13473 (file-name (string-append "MMTK-" version ".tar.gz"))
13474 (sha256
13475 (base32
13476 "1d0nnjx4lwsvh8f99vv1r6gi50d93yba0adkz8b4zgv4za4c5862"))))
13477 (build-system python-build-system)
13478 (native-inputs
13479 `(("netcdf" ,netcdf)))
13480 (propagated-inputs
13481 `(("python-scientific" ,python2-scientific)
13482 ("python-tkinter" ,python-2 "tk")))
13483 (arguments
13484 `(#:python ,python-2
13485 #:tests? #f
13486 #:phases
13487 (modify-phases %standard-phases
13488 (add-before 'build 'includes-from-scientific
13489 (lambda* (#:key inputs #:allow-other-keys)
13490 (mkdir-p "Include/Scientific")
13491 (copy-recursively
13492 (string-append
13493 (assoc-ref inputs "python-scientific")
13494 "/include/python2.7/Scientific")
13495 "Include/Scientific"))))))
13496 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
13497 (synopsis "Python library for molecular simulation")
13498 (description "MMTK is a library for molecular simulations with an emphasis
13499on biomolecules. It provides widely used methods such as Molecular Dynamics
13500and normal mode analysis, but also basic routines for implementing new methods
13501for simulation and analysis. The library is currently not actively maintained
13502and works only with Python 2 and NumPy < 1.9.")
13503 (license license:cecill-c)))
13504
13505(define-public python-phonenumbers
13506 (package
13507 (name "python-phonenumbers")
13508 (version "8.9.1")
13509 (source
13510 (origin
13511 (method url-fetch)
13512 (uri (pypi-uri "phonenumbers" version))
13513 (sha256
13514 (base32
13515 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
13516 (build-system python-build-system)
13517 (home-page
13518 "https://github.com/daviddrysdale/python-phonenumbers")
13519 (synopsis
13520 "Python library for dealing with international phone numbers")
13521 (description
13522 "This package provides a Python port of Google's libphonenumber library.")
13523 (license license:asl2.0)))
13524
13525(define-public python2-phonenumbers
13526 (package-with-python2 python-phonenumbers))
13527
13528(define-public python-send2trash
13529 (package
13530 (name "python-send2trash")
d9b0216b 13531 (version "1.5.0")
44d10b1f 13532 (source
d9b0216b 13533 (origin (method git-fetch)
44d10b1f 13534 ;; Source tarball on PyPI doesn't include tests.
d9b0216b
RW
13535 (uri (git-reference
13536 (url "https://github.com/hsoft/send2trash.git")
13537 (commit version)))
13538 (file-name (git-file-name name version))
44d10b1f
RW
13539 (sha256
13540 (base32
d9b0216b 13541 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
44d10b1f
RW
13542 (build-system python-build-system)
13543 (arguments
13544 '(#:phases
13545 (modify-phases %standard-phases
13546 (add-before 'check 'pre-check
13547 (lambda _
13548 (mkdir-p "/tmp/foo")
13549 (setenv "HOME" "/tmp/foo")
13550 #t)))))
13551 (home-page "https://github.com/hsoft/send2trash")
13552 (synopsis "Send files to the user's @file{~/Trash} directory")
13553 (description "This package provides a Python library to send files to the
13554user's @file{~/Trash} directory.")
13555 (license license:bsd-3)))
13556
13557(define-public python2-send2trash
13558 (package
13559 (inherit (package-with-python2 python-send2trash))
13560 (arguments
13561 (substitute-keyword-arguments (package-arguments python-send2trash)
13562 ((#:phases phases)
13563 `(modify-phases ,phases
13564 (add-before 'check 'setenv
13565 (lambda _
13566 (setenv "PYTHONPATH"
13567 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
13568 #t))))))
13569 (properties `((python2-variant . ,(delay python-send2trash))))))
13570
13571(define-public python-yapf
13572 (package
13573 (name "python-yapf")
13574 (version "0.24.0")
13575 (source
13576 (origin
13577 (method url-fetch)
13578 (uri (pypi-uri "yapf" version))
13579 (sha256
13580 (base32
13581 "0anwby0ydmyzcsgjc5dn1ryddwvii4dq61vck447q0n96npnzfyf"))))
13582 (build-system python-build-system)
13583 (home-page "https://github.com/google/yapf")
13584 (synopsis "Formatter for Python code")
13585 (description "YAPF is a formatter for Python code. It's based off of
13586@dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
13587takes the code and reformats it to the best formatting that conforms to the
13588style guide, even if the original code didn't violate the style guide.")
13589 (license license:asl2.0)))
13590
13591(define-public python2-yapf
13592 (package-with-python2 python-yapf))
13593
13594(define-public python-gyp
13595 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
13596 (revision "0"))
13597 (package
13598 (name "python-gyp")
13599 ;; Google does not release versions,
13600 ;; based on second most recent commit date.
13601 (version (git-version "0.0.0" revision commit))
13602 (source
13603 (origin
13604 ;; Google does not release tarballs,
13605 ;; git checkout is needed.
13606 (method git-fetch)
13607 (uri (git-reference
13608 (url "https://chromium.googlesource.com/external/gyp")
13609 (commit commit)))
13610 (file-name (git-file-name name version))
13611 (sha256
13612 (base32
13613 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
13614 (build-system python-build-system)
13615 (home-page "https://gyp.gsrc.io/")
13616 (synopsis "GYP is a Meta-Build system")
13617 (description
13618 "GYP builds build systems for large, cross platform applications.
13619It can be used to generate XCode projects, Visual Studio projects, Ninja build
13620files, and Makefiles.")
13621 (license license:bsd-3))))
13622
13623(define-public python2-gyp
13624 (package-with-python2 python-gyp))
13625
13626(define-public python-whatever
13627 (package
13628 (name "python-whatever")
13629 (version "0.5")
13630 (source
13631 (origin
13632 (method url-fetch)
13633 (uri (string-append "https://github.com/Suor/whatever/archive/" version
13634 ".tar.gz"))
13635 (sha256
13636 (base32
13637 "1iqvnaf0zpc6b4rvbqq4xy45mszcscyzpzknv8wg6j84pbp22sap"))
13638 (file-name (string-append name "-" version ".tar.gz"))))
13639 (build-system python-build-system)
13640 (arguments
13641 `(#:phases
13642 (modify-phases %standard-phases
13643 (replace 'check
13644 (lambda _
13645 (invoke "py.test"))))))
13646 (native-inputs
13647 `(("python-pytest" ,python-pytest)))
13648 (home-page "http://github.com/Suor/whatever")
13649 (synopsis "Make anonymous functions by partial application of operators")
13650 (description "@code{whatever} provides an easy way to make anonymous
13651functions by partial application of operators.")
13652 (license license:bsd-3)))
13653
13654(define-public python2-whatever
13655 (package-with-python2 python-whatever))
13656
13657(define-public python-funcy
13658 (package
13659 (name "python-funcy")
9e396ab8 13660 (version "1.11")
44d10b1f
RW
13661 (source
13662 (origin
a85c6027
TGR
13663 (method git-fetch)
13664 (uri (git-reference
13665 (url "https://github.com/Suor/funcy.git")
13666 (commit version)))
44d10b1f 13667 (sha256
a85c6027
TGR
13668 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
13669 (file-name (git-file-name name version))))
44d10b1f
RW
13670 (build-system python-build-system)
13671 (arguments
13672 `(#:phases
13673 (modify-phases %standard-phases
13674 (replace 'check
13675 (lambda _
13676 (invoke "py.test"))))))
13677 (native-inputs
13678 `(("python-pytest" ,python-pytest)
13679 ("python-whatever" ,python-whatever)))
13680 (home-page "http://github.com/Suor/funcy")
13681 (synopsis "Functional tools")
13682 (description "@code{funcy} is a library that provides functional tools.
13683Examples are:
13684@enumerate
13685@item merge - Merges collections of the same type
13686@item walk - Type-preserving map
13687@item select - Selects a part of a collection
13688@item take - Takes the first n items of a collection
13689@item first - Takes the first item of a collection
13690@item remove - Predicated-removes items of a collection
13691@item concat - Concatenates two collections
13692@item flatten - Flattens a collection with subcollections
13693@item distinct - Returns only distinct items
13694@item split - Predicated-splits a collection
13695@item split_at - Splits a collection at a given item
13696@item group_by - Groups items by group
13697@item pairwise - Pairs off adjacent items
13698@item partial - Partially-applies a function
13699@item curry - Curries a function
13700@item compose - Composes functions
13701@item complement - Complements a predicate
13702@item all_fn - \"all\" with predicate
13703@end enumerate")
13704 (license license:bsd-3)))
13705
13706(define-public python2-funcy
13707 (package-with-python2 python-funcy))
13708
13709(define-public python-isoweek
13710 (package
13711 (name "python-isoweek")
13712 (version "1.3.3")
13713 (source
13714 (origin
13715 (method url-fetch)
13716 (uri (pypi-uri "isoweek" version))
13717 (sha256
13718 (base32
13719 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
13720 (build-system python-build-system)
13721 (home-page "https://github.com/gisle/isoweek")
13722 (synopsis "Objects representing a week")
13723 (description "The @code{isoweek} module provide the class Week that
13724implements the week definition of ISO 8601. This standard also defines
13725a notation for identifying weeks; yyyyWww (where the W is a literal).
13726Week instances stringify to this form.")
13727 (license license:bsd-3)))
13728
13729(define-public python2-isoweek
13730 (package-with-python2 python-isoweek))
13731
13732(define-public python-tokenize-rt
13733 (package
13734 (name "python-tokenize-rt")
13735 (version "2.0.1")
13736 (source
13737 (origin
13738 (method url-fetch)
13739 (uri (pypi-uri "tokenize-rt" version))
13740 (sha256
13741 (base32
13742 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
13743 (build-system python-build-system)
13744 (home-page "https://github.com/asottile/tokenize-rt")
13745 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
13746 (description
13747 "This Python library is a wrapper around @code{tokenize} from the Python
13748standard library. It provides two additional tokens @code{ESCAPED_NL} and
13749@code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
13750and @code{tokens_to_src} to roundtrip.")
13751 (license license:expat)))
13752
13753(define-public python-future-fstrings
13754 (package
13755 (name "python-future-fstrings")
13756 (version "0.4.1")
13757 (source
13758 (origin
13759 (method url-fetch)
13760 (uri (pypi-uri "future_fstrings" version))
13761 (sha256
13762 (base32
13763 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
13764 (build-system python-build-system)
13765 (propagated-inputs
13766 `(("python-tokenize-rt" ,python-tokenize-rt)))
13767 (home-page "https://github.com/asottile/future-fstrings")
13768 (synopsis "Backport of fstrings to Python < 3.6")
13769 (description
13770 "This package provides a UTF-8 compatible encoding
13771@code{future_fstrings}, which performs source manipulation. It decodes the
13772source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
13773@code{f} strings.")
13774 (license license:expat)))
13775
13776(define-public python-typing
13777 (package
13778 (name "python-typing")
13779 (version "3.6.6")
13780 (source
13781 (origin
13782 (method url-fetch)
13783 (uri (pypi-uri "typing" version))
13784 (sha256
13785 (base32
13786 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
13787 (build-system python-build-system)
13788 (home-page "https://docs.python.org/3/library/typing.html")
13789 (synopsis "Type hints for Python")
13790 (description "This is a backport of the standard library @code{typing}
13791module to Python versions older than 3.5. Typing defines a standard notation
13792for Python function and variable type annotations. The notation can be used
13793for documenting code in a concise, standard format, and it has been designed
13794to also be used by static and runtime type checkers, static analyzers, IDEs
13795and other tools.")
13796 (license license:psfl)))
13797
13798(define-public python2-typing
13799 (package-with-python2 python-typing))
13800
f89d443b
VC
13801(define-public python-typing-extensions
13802 (package
13803 (name "python-typing-extensions")
13804 (version "3.7.2")
13805 (source
13806 (origin
13807 (method url-fetch)
13808 (uri (pypi-uri "typing_extensions" version))
13809 (sha256
13810 (base32
13811 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
13812 (build-system python-build-system)
13813 (home-page
13814 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
13815 (synopsis "Experimental type hints for Python")
13816 (description
13817 "The typing_extensions module contains additional @code{typing} hints not
13818yet present in the of the @code{typing} standard library.
13819Included are implementations of:
13820@enumerate
13821@item ClassVar
13822@item ContextManager
13823@item Counter
13824@item DefaultDict
13825@item Deque
13826@item NewType
13827@item NoReturn
13828@item overload
13829@item Protocol
13830@item runtime
13831@item Text
13832@item Type
13833@item TYPE_CHECKING
13834@item AsyncGenerator
13835@end enumerate\n")
13836 (license license:psfl)))
13837
44d10b1f
RW
13838(define-public bpython
13839 (package
13840 (name "bpython")
13841 (version "0.17.1")
13842 (source
13843 (origin
13844 (method url-fetch)
13845 (uri (pypi-uri "bpython" version))
13846 (sha256
13847 (base32
13848 "0bxhxi5zxdkrf8b4gwn0d363kdz3qnypjwhm1aydki53ph8ca1w9"))))
13849 (build-system python-build-system)
13850 (arguments
13851 `(#:phases
13852 (modify-phases %standard-phases
13853 (add-after 'unpack 'remove-failing-test
13854 (lambda _
13855 ;; Remove failing test. FIXME: make it pass
13856 (delete-file "bpython/test/test_args.py")
13857 #t))
13858 (add-after 'wrap 'add-aliases
13859 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
13860 (lambda* (#:key outputs #:allow-other-keys)
13861 (let ((out (assoc-ref outputs "out")))
13862 (for-each
13863 (lambda (old new)
13864 (symlink old (string-append out "/bin/" new)))
13865 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
13866 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
13867 #t)))))
13868 (propagated-inputs
13869 `(("python-pygments" ,python-pygments)
13870 ("python-requests" ,python-requests)
13871 ("python-babel" ,python-babel) ; optional, for internationalization
13872 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
13873 ("python-greenlet" ,python-greenlet)
13874 ("python-urwid" ,python-urwid) ; for bpython-urwid only
13875 ("python-six" ,python-six)))
13876 (native-inputs
13877 `(("python-sphinx" ,python-sphinx)
13878 ("python-mock" ,python-mock)))
13879 (home-page "https://bpython-interpreter.org/")
13880 (synopsis "Fancy interface to the Python interpreter")
13881 (description "Bpython is a fancy interface to the Python
13882interpreter. bpython's main features are
13883
13884@enumerate
13885@item in-line syntax highlighting,
13886@item readline-like autocomplete with suggestions displayed as you type,
13887@item expected parameter list for any Python function,
13888@item \"rewind\" function to pop the last line of code from memory and
13889 re-evaluate,
13890@item send the code you've entered off to a pastebin,
13891@item save the code you've entered to a file, and
13892@item auto-indentation.
13893@end enumerate")
13894 (license license:expat)))
13895
13896(define-public bpython2
13897 (let ((base (package-with-python2
13898 (strip-python2-variant bpython))))
13899 (package (inherit base)
13900 (name "bpython2")
13901 (arguments
13902 `(#:python ,python-2
13903 #:phases
13904 (modify-phases %standard-phases
13905 (add-after 'unpack 'remove-failing-test
13906 (lambda _
13907 ;; Remove failing test. FIXME: make it pass
13908 (delete-file "bpython/test/test_args.py")
13909 ;; Disable failing test-cases (renaming inhibits they are
13910 ;; discovered)
13911 (substitute* "bpython/test/test_curtsies_repl.py"
13912 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
13913 (string-append a "xxx_off_" b))
13914 (("^(\\s*def )(test_complex\\W)" _ a b)
13915 (string-append a "xxx_off_" b)))
13916 #t))
13917 (add-before 'build 'rename-scripts
13918 ;; rename the scripts to bypthon2, bpdb2, etc.
13919 (lambda _
13920 (substitute* "setup.py"
13921 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
13922 (string-append name "2" rest "\n"))
13923 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
13924 (string-append name "2" (or sub "") rest "\n")))
13925 #t))))))))
13926
13927(define-public python-pyinotify
13928 (package
13929 (name "python-pyinotify")
13930 (version "0.9.6")
13931 (source (origin
13932 (method url-fetch)
13933 (uri (pypi-uri "pyinotify" version))
13934 (sha256
13935 (base32
13936 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
13937 (build-system python-build-system)
13938 (arguments `(#:tests? #f)) ;no tests
13939 (home-page "https://github.com/seb-m/pyinotify")
13940 (synopsis "Python library for monitoring inotify events")
13941 (description
13942 "@code{pyinotify} provides a Python interface for monitoring
13943file system events on Linux.")
13944 (license license:expat)))
13945
13946(define-public python2-pyinotify
13947 (package-with-python2 python-pyinotify))
13948
13949;; Ada parser uses this version.
13950(define-public python2-quex-0.67.3
13951 (package
13952 (name "python2-quex")
13953 (version "0.67.3")
13954 (source
13955 (origin
13956 (method url-fetch)
13957 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
13958 (version-major+minor version)
13959 "/quex-" version ".zip"))
13960 (sha256
13961 (base32
13962 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
13963 (build-system python-build-system)
13964 (native-inputs
13965 `(("unzip" ,unzip)))
13966 (arguments
13967 `(#:python ,python-2
13968 #:tests? #f
13969 #:phases
13970 (modify-phases %standard-phases
13971 (delete 'configure)
13972 (delete 'build)
13973 (replace 'install
13974 (lambda* (#:key outputs #:allow-other-keys)
13975 (let* ((out (assoc-ref outputs "out"))
13976 (share/quex (string-append out "/share/quex"))
13977 (bin (string-append out "/bin")))
13978 (copy-recursively "." share/quex)
13979 (mkdir-p bin)
13980 (symlink (string-append share/quex "/quex-exe.py")
13981 (string-append bin "/quex"))
13982 #t))))))
13983 (native-search-paths
13984 (list (search-path-specification
13985 (variable "QUEX_PATH")
13986 (files '("share/quex")))))
13987 (home-page "http://quex.sourceforge.net/")
13988 (synopsis "Lexical analyzer generator in Python")
13989 (description "@code{quex} is a lexical analyzer generator in Python.")
13990 (license license:lgpl2.1+))) ; Non-military
13991
13992(define-public python2-quex
13993 (package (inherit python2-quex-0.67.3)
13994 (name "python2-quex")
13995 (version "0.68.1")
13996 (source
13997 (origin
13998 (method url-fetch)
13999 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
14000 (sha256
14001 (base32
14002 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
14003 (file-name (string-append name "-" version ".tar.gz"))))))
14004
14005(define-public python-more-itertools
14006 (package
14007 (name "python-more-itertools")
14008 (version "4.3.0")
14009 (source
14010 (origin
14011 (method url-fetch)
14012 (uri (pypi-uri "more-itertools" version))
14013 (sha256
14014 (base32
14015 "17h3na0rdh8xq30w4b9pizgkdxmm51896bxw600x84jflg9vaxn4"))))
14016 (build-system python-build-system)
14017 (arguments
14018 `(,@(if (any (cute string-prefix? <> (or (%current-system)
14019 (%current-target-system)))
14020 '("armhf" "i686"))
14021 '(#:phases
14022 (modify-phases %standard-phases
14023 ;; This is required for 32-bit hardware.
14024 ;; TODO: Try to remove this when upgrading.
14025 (add-after 'unpack 'patch-test
14026 (lambda _
14027 (substitute* "more_itertools/tests/test_more.py"
14028 (("10 \\*\\* 10") "9 ** 9"))
14029 #t))))
14030 '())))
14031 (propagated-inputs
14032 `(("python-six" ,python-six-bootstrap)))
14033 (home-page "https://github.com/erikrose/more-itertools")
14034 (synopsis "More routines for operating on iterables, beyond itertools")
14035 (description "Python's built-in @code{itertools} module implements a
14036number of iterator building blocks inspired by constructs from APL, Haskell,
14037and SML. @code{more-itertools} includes additional building blocks for
14038working with iterables.")
14039 (license license:expat)))
14040
14041(define-public python2-more-itertools
14042 (package-with-python2 python-more-itertools))
14043
14044(define-public python-latexcodec
14045 (package
14046 (name "python-latexcodec")
91b61f02 14047 (version "1.0.6")
44d10b1f
RW
14048 (source
14049 (origin
14050 (method url-fetch)
14051 (uri (pypi-uri "latexcodec" version))
14052 (sha256
91b61f02 14053 (base32 "0s4wdbg0w2l8pj3i0y4510i0s04p8nhxcsa2z41bjsv0k66npb81"))))
44d10b1f
RW
14054 (build-system python-build-system)
14055 (inputs
14056 `(("python-six" ,python-six)))
14057 (home-page "https://readthedocs.org/projects/latexcodec/")
14058 (synopsis "Work with LaTeX code in Python")
14059 (description "Lexer and codec to work with LaTeX code in Python.")
14060 (license license:expat)))
14061
14062(define-public python-pybtex
14063 (package
14064 (name "python-pybtex")
14065 (version "0.21")
14066 (source
14067 (origin
14068 (method url-fetch)
14069 (uri (pypi-uri "pybtex" version))
14070 (sha256
14071 (base32
14072 "00300j8dn5pxq4ndxmfmbmycg2znawkqs49val2x6jlmfiy6r2mg"))))
14073 (build-system python-build-system)
14074 (native-inputs
14075 `(("python-nose" ,python-nose)))
14076 (inputs
14077 `(("python-latexcodec" ,python-latexcodec)
14078 ("python-pyyaml" ,python-pyyaml)
14079 ("python-six" ,python-six)))
14080 (arguments
14081 `(#:test-target "nosetests"))
14082 (home-page "https://pybtex.org/")
14083 (synopsis "BibTeX-compatible bibliography processor")
14084 (description "Pybtex is a BibTeX-compatible bibliography processor written
14085in Python. You can simply type pybtex instead of bibtex.")
14086 (license license:expat)))
14087
14088(define-public python-onetimepass
14089 (package
14090 (name "python-onetimepass")
14091 (version "1.0.1")
14092 (source
14093 (origin
14094 (method url-fetch)
14095 (uri (pypi-uri "onetimepass" version))
14096 (sha256
14097 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
14098 (build-system python-build-system)
14099 (propagated-inputs `(("python-six" ,python-six)))
14100 (home-page "https://github.com/tadeck/onetimepass/")
14101 (synopsis "One-time password library")
14102 (description "Python one-time password library for HMAC-based (HOTP) and
14103time-based (TOTP) passwords.")
14104 (license license:expat)))
14105
14106(define-public python-parso
14107 (package
14108 (name "python-parso")
14109 (version "0.3.1")
14110 (source
14111 (origin
14112 (method url-fetch)
14113 (uri (pypi-uri "parso" version))
14114 (sha256
14115 (base32
14116 "18p89iwcm8mnf380f92g9w0bhx5km8wxp392vvjcq4y1ld1llw1m"))))
14117 (native-inputs
14118 `(("python-pytest" ,python-pytest)))
14119 (build-system python-build-system)
14120 (home-page "https://github.com/davidhalter/parso")
14121 (synopsis "Python Parser")
14122 (description "Parso is a Python parser that supports error recovery and
14123round-trip parsing for different Python versions (in multiple Python versions).
14124Parso is also able to list multiple syntax errors in your Python file.")
14125 (license license:expat)))
14126
14127(define-public python2-parso
14128 (package-with-python2 python-parso))
14129
14130(define-public python-async-generator
14131 (package
14132 (name "python-async-generator")
94fcbf8d 14133 (version "1.10")
44d10b1f
RW
14134 (source
14135 (origin
14136 (method url-fetch)
14137 (uri (pypi-uri "async_generator" version))
14138 (sha256
14139 (base32
94fcbf8d 14140 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
44d10b1f
RW
14141 (build-system python-build-system)
14142 (native-inputs
14143 `(("python-pytest" ,python-pytest)))
14144 (home-page "https://github.com/python-trio/async_generator")
14145 (synopsis "Async generators and context managers for Python 3.5+")
14146 (description "@code{async_generator} back-ports Python 3.6's native async
14147generators and Python 3.7's context managers into Python 3.5.")
14148 ;; Dual licensed.
14149 (license (list license:expat license:asl2.0))))
14150
14151(define-public python-async-timeout
14152 (package
14153 (name "python-async-timeout")
14154 (version "3.0.1")
14155 (source
14156 (origin
14157 (method url-fetch)
14158 (uri (pypi-uri "async-timeout" version))
14159 (sha256
14160 (base32
14161 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
14162 (build-system python-build-system)
14163 (home-page "https://github.com/aio-libs/async_timeout/")
14164 (synopsis "Timeout context manager for asyncio programs")
14165 (description "@code{async-timeout} provides a timeout timeout context
14166manager compatible with @code{asyncio}.")
14167 (license license:asl2.0)))
14168
14169(define-public python-glob2
14170 (package
14171 (name "python-glob2")
14172 (version "0.6")
14173 (source (origin
14174 (method url-fetch)
14175 (uri (string-append
14176 "https://github.com/miracle2k/python-glob2/archive/"
14177 version
14178 ".tar.gz"))
14179 (sha256
14180 (base32
14181 "0ja168f0dz4kbz4m06dm0rd3acaypk6hjx2km541pw22y9s40mag"))
14182 (file-name (string-append name "-" version ".tar.gz"))))
14183 (build-system python-build-system)
14184 (home-page "https://github.com/miracle2k/python-glob2/")
14185 (synopsis "Extended Version of the python buildin glob module")
14186 (description "This is an extended version of the Python
14187@url{http://docs.python.org/library/glob.html, built-in glob module} which
14188adds:
14189
14190@itemize
14191@item The ability to capture the text matched by glob patterns, and return
14192those matches alongside the file names.
14193@item A recursive @code{**} globbing syntax, akin for example to the
14194@code{globstar} option of Bash.
14195@item The ability to replace the file system functions used, in order to glob
14196on virtual file systems.
14197@item Compatible with Python 2 and Python 3 (tested with 3.3).
14198@end itemize
14199
14200Glob2 currently based on the glob code from Python 3.3.1.")
14201 (license license:bsd-2)))
14202
14203(define-public python2-glob2
14204 (package-with-python2 python-glob2))
14205
14206(define-public python-gipc
14207 (package
14208 (name "python-gipc")
14209 (version "0.6.0")
14210 (source
14211 (origin
14212 (method url-fetch)
14213 (uri (pypi-uri "gipc" version ".zip"))
14214 (sha256
14215 (base32
14216 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
14217 (build-system python-build-system)
14218 (native-inputs
14219 `(("unzip" ,unzip)))
14220 (propagated-inputs
14221 `(("python-gevent" ,python-gevent)))
14222 (home-page "http://gehrcke.de/gipc")
14223 (synopsis "Child process management in the context of gevent")
14224 (description "Usage of Python's multiprocessing package in a
14225gevent-powered application may raise problems. With @code{gipc},
14226process-based child processes can safely be created anywhere within a
14227gevent-powered application.")
14228 (license license:expat)))
14229
14230(define-public python2-gipc
14231 (package-with-python2 python-gipc))
14232
14233(define-public python-fusepy
14234 (package
14235 (name "python-fusepy")
14236 (version "2.0.4")
14237 (source
14238 (origin
14239 (method url-fetch)
14240 (uri (pypi-uri "fusepy" version))
14241 (sha256
14242 (base32
14243 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
14244 (build-system python-build-system)
14245 (arguments
14246 `(#:phases
14247 (modify-phases %standard-phases
14248 (add-before 'build 'set-library-file-name
14249 (lambda* (#:key inputs #:allow-other-keys)
14250 (let ((fuse (assoc-ref inputs "fuse")))
14251 (substitute* "fuse.py"
14252 (("find_library\\('fuse'\\)")
14253 (string-append "'" fuse "/lib/libfuse.so'")))
14254 #t))))))
14255 (propagated-inputs
14256 `(("fuse" ,fuse)))
14257 (home-page "https://github.com/fusepy/fusepy")
14258 (synopsis "Simple ctypes bindings for FUSE")
14259 (description "Python module that provides a simple interface to FUSE and
14260MacFUSE. The binding is created using the standard @code{ctypes} library.")
14261 (license license:isc)))
14262
14263(define-public python2-fusepy
14264 (package-with-python2 python-fusepy))
14265
14266(define-public python2-gdrivefs
14267 (package
14268 (name "python2-gdrivefs")
14269 (version "0.14.9")
14270 (source
14271 (origin
14272 (method url-fetch)
14273 (uri (pypi-uri "gdrivefs" version))
14274 (sha256
14275 (base32
14276 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
14277 (build-system python-build-system)
14278 (arguments
14279 `(#:python ,python-2
14280 #:phases
14281 (modify-phases %standard-phases
14282 (add-before 'build 'patch-setup-py
14283 (lambda _
14284 ;; Update requirements from dependency==version
14285 ;; to dependency>=version
14286 (substitute* "gdrivefs/resources/requirements.txt"
14287 (("==") ">="))
14288 #t)))))
14289 (native-inputs
14290 `(("python2-gipc" ,python2-gipc)
14291 ("python2-gevent" ,python2-gevent)
14292 ("python2-greenlet" ,python2-greenlet)
14293 ("python2-httplib2" ,python2-httplib2)
14294 ("python2-uritemplate" ,python2-uritemplate)
14295 ("python2-oauth2client" ,python2-oauth2client)
14296 ("python2-six" ,python2-six)))
14297 (propagated-inputs
14298 `(("python2-dateutil" ,python2-dateutil)
14299 ("python2-fusepy" ,python2-fusepy)
14300 ("python2-google-api-client" ,python2-google-api-client)))
14301 (home-page "https://github.com/dsoprea/GDriveFS")
14302 (synopsis "Mount Google Drive as a local file system")
14303 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
14304under Python 2.7.")
14305 (license license:gpl2)))
14306
14307(define-public pybind11
14308 (package
14309 (name "pybind11")
14310 (version "2.2.4")
14311 (source (origin
14312 (method git-fetch)
14313 (uri (git-reference
14314 (url "https://github.com/pybind/pybind11.git")
14315 (commit (string-append "v" version))))
14316 (sha256
14317 (base32
14318 "0pa79ymcasv8br5ifbx7878id5py2jpjac3i20cqxr6gs9l6ivlv"))
14319 (file-name (git-file-name name version))))
14320 (build-system cmake-build-system)
14321 (native-inputs
14322 `(("python" ,python)
14323 ("python-pytest" ,python-pytest)))
14324 (arguments
14325 `(#:test-target "check"))
14326 (home-page "https://github.com/pybind/pybind11/")
14327 (synopsis "Seamless operability between C++11 and Python")
14328 (description "pybind11 is a lightweight header-only library that exposes
14329C++ types in Python and vice versa, mainly to create Python bindings of
14330existing C++ code. Its goals and syntax are similar to the excellent
14331Boost.Python library by David Abrahams: to minimize boilerplate code in
14332traditional extension modules by inferring type information using compile-time
14333introspection.")
14334 (license license:expat)))
14335
14336(define-public python-fasteners
14337 (package
14338 (name "python-fasteners")
14339 (version "0.14.1")
14340 (source
14341 (origin
14342 (method url-fetch)
14343 (uri (pypi-uri "fasteners" version))
14344 (sha256
14345 (base32
14346 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
14347 (build-system python-build-system)
14348 (propagated-inputs
14349 `(("python-monotonic" ,python-monotonic)
14350 ("python-six" ,python-six)
14351 ("python-testtools" ,python-testtools)))
14352 (home-page "https://github.com/harlowja/fasteners")
14353 (synopsis "Python package that provides useful locks")
14354 (description
14355 "This package provides a Python program that provides following locks:
14356
14357@itemize
14358@item Locking decorator
14359@item Reader-writer locks
14360@item Inter-process locks
14361@item Generic helpers
14362@end itemize\n")
14363 (properties `((python2-variant . ,(delay python2-fasteners))))
14364 (license license:asl2.0)))
14365
14366(define-public python2-fasteners
14367 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
14368 (package
14369 (inherit base)
14370 (propagated-inputs
14371 `(("python2-futures" ,python2-futures)
14372 ,@(package-propagated-inputs base))))))
14373
14374(define-public python-requests-file
14375 (package
14376 (name "python-requests-file")
14377 (version "1.4.3")
14378 (source
14379 (origin
14380 (method url-fetch)
14381 (uri (pypi-uri "requests-file" version))
14382 (sha256
14383 (base32
14384 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
14385 (build-system python-build-system)
14386 (propagated-inputs
14387 `(("python-requests" ,python-requests)
14388 ("python-six" ,python-six)))
14389 (home-page
14390 "https://github.com/dashea/requests-file")
14391 (synopsis "File transport adapter for Requests")
14392 (description
14393 "Requests-File is a transport adapter for use with the Requests Python
14394library to allow local filesystem access via file:// URLs.")
14395 (license license:asl2.0)))
14396
14397(define-public python2-requests-file
14398 (package-with-python2 python-requests-file))
14399
14400(define-public python-tldextract
14401 (package
14402 (name "python-tldextract")
14403 (version "2.2.0")
14404 (source
14405 (origin
14406 (method url-fetch)
14407 (uri (pypi-uri "tldextract" version))
14408 (sha256
14409 (base32
14410 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
14411 (build-system python-build-system)
14412 (native-inputs
14413 `(("python-pytest" ,python-pytest)
14414 ("python-responses" ,python-responses)))
14415 (propagated-inputs
14416 `(("python-idna" ,python-idna)
14417 ("python-requests" ,python-requests)
14418 ("python-requests-file" ,python-requests-file)))
14419 (home-page
14420 "https://github.com/john-kurkowski/tldextract")
14421 (synopsis
14422 "Separate the TLD from the registered domain and subdomains of a URL")
14423 (description
14424 "TLDExtract accurately separates the TLD from the registered domain and
14425subdomains of a URL, using the Public Suffix List. By default, this includes
14426the public ICANN TLDs and their exceptions. It can optionally support the
14427Public Suffix List's private domains as well.")
14428 (license license:bsd-3)))
14429
14430(define-public python2-tldextract
14431 (package-with-python2 python-tldextract))
14432
14433(define-public python-pynamecheap
14434 (package
14435 (name "python-pynamecheap")
14436 (version "0.0.3")
14437 (source
14438 (origin
14439 (method url-fetch)
14440 (uri (pypi-uri "PyNamecheap" version))
14441 (sha256
14442 (base32
14443 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
14444 (build-system python-build-system)
14445 (propagated-inputs
14446 `(("python-requests" ,python-requests)))
14447 (home-page
14448 "https://github.com/Bemmu/PyNamecheap")
14449 (synopsis
14450 "Namecheap API client in Python")
14451 (description
14452 "PyNamecheap is a Namecheap API client in Python.")
14453 (license license:expat)))
14454
14455(define-public python2-pynamecheap
14456 (package-with-python2 python-pynamecheap))
14457
14458(define-public python-dns-lexicon
14459 (package
14460 (name "python-dns-lexicon")
14461 (version "2.4.0")
14462 (source
14463 (origin
14464 (method url-fetch)
14465 (uri (pypi-uri "dns-lexicon" version))
14466 (sha256
14467 (base32
14468 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
14469 (build-system python-build-system)
14470 (arguments
14471 `(#:tests? #f)) ;requires internet access
14472 (propagated-inputs
14473 `(("python-future" ,python-future)
14474 ("python-pynamecheap" ,python-pynamecheap)
14475 ("python-requests" ,python-requests)
14476 ("python-tldextract" ,python-tldextract)
14477 ("python-urllib3" ,python-urllib3)))
14478 (home-page "https://github.com/AnalogJ/lexicon")
14479 (synopsis
14480 "Manipulate DNS records on various DNS providers")
14481 (description
14482 "Lexicon provides a way to manipulate DNS records on multiple DNS
14483providers in a standardized way. It has a CLI but it can also be used as a
14484Python library. It was designed to be used in automation, specifically with
14485Let's Encrypt.")
14486 (license license:expat)))
14487
14488(define-public python2-dns-lexicon
14489 (package-with-python2 python-dns-lexicon))
14490
14491(define-public python-commandlines
14492 (package
14493 (name "python-commandlines")
14494 (version "0.4.1")
14495 (source
14496 (origin
14497 (method url-fetch)
14498 (uri (pypi-uri "commandlines" version))
14499 (sha256
14500 (base32
14501 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
14502 (build-system python-build-system)
14503 (home-page "https://github.com/chrissimpkins/commandlines")
14504 (synopsis "Command line argument to object parsing library")
14505 (description
14506 "@code{Commandlines} is a Python library for command line application
14507development that supports command line argument parsing, command string
14508validation testing and application logic.")
14509 (license license:expat)))
14510
14511;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
14512;; python-numba. They have a very unflexible relationship.
14513(define-public python-numba
14514 (package
14515 (name "python-numba")
7757e6d8 14516 (version "0.42.0")
44d10b1f
RW
14517 (source
14518 (origin
14519 (method url-fetch)
14520 (uri (pypi-uri "numba" version))
14521 (sha256
14522 (base32
7757e6d8 14523 "03rqdfx0512lcri2bcpngx5k3jwfbqnanqj3n19c7d6h6hqxvq9x"))))
44d10b1f
RW
14524 (build-system python-build-system)
14525 (arguments
14526 `(#:modules ((guix build utils)
14527 (guix build python-build-system)
14528 (ice-9 ftw)
14529 (srfi srfi-1)
14530 (srfi srfi-26))
14531 #:phases
14532 (modify-phases %standard-phases
14533 (add-after 'unpack 'disable-proprietary-features
14534 (lambda _
14535 (setenv "NUMBA_DISABLE_HSA" "1")
14536 (setenv "NUMBA_DISABLE_CUDA" "1")
14537 #t))
14538 (add-after 'unpack 'remove-failing-tests
14539 (lambda _
14540 ;; FIXME: these tests fail for unknown reasons:
14541 ;; test_non_writable_pycache, test_non_creatable_pycache, and
14542 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
14543 (substitute* "numba/tests/test_dispatcher.py"
14544 (("def test(_non_writable_pycache)" _ m)
14545 (string-append "def guix_skip" m))
14546 (("def test(_non_creatable_pycache)" _ m)
14547 (string-append "def guix_skip" m))
14548 (("def test(_frozen)" _ m)
14549 (string-append "def guix_skip" m)))
14550
14551 ;; These tests fail because we don't run the tests from the build
14552 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
14553 ;; They ar in numba.tests.test_pycc.TestDistutilsSupport.
14554 (substitute* "numba/tests/test_pycc.py"
14555 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
14556 (string-append "def guix_skip" m)))
14557 #t))
14558 (replace 'check
14559 (lambda _
14560 (let ((cwd (getcwd)))
14561 (setenv "PYTHONPATH"
14562 (string-append cwd "/build/"
14563 (find (cut string-prefix? "lib" <>)
14564 (scandir (string-append cwd "/build")))
14565 ":"
14566 (getenv "PYTHONPATH")))
14567 ;; Something is wrong with the PYTHONPATH when running the
14568 ;; tests from the build directory, as it complains about not being
14569 ;; able to import certain modules.
14570 (with-directory-excursion "/tmp"
14571 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
14572 #t)))))
14573 (propagated-inputs
14574 `(("python-llvmlite" ,python-llvmlite)
14575 ("python-numpy" ,python-numpy)
14576 ("python-singledispatch" ,python-singledispatch)))
14577 ;; Needed for tests.
14578 (inputs
14579 `(("python-jinja2" ,python-jinja2)
14580 ("python-pygments" ,python-pygments)))
14581 (home-page "https://numba.pydata.org")
14582 (synopsis "Compile Python code using LLVM")
14583 (description "Numba gives you the power to speed up your applications with
14584high performance functions written directly in Python. With a few
14585annotations, array-oriented and math-heavy Python code can be just-in-time
14586compiled to native machine instructions, similar in performance to C, C++ and
14587Fortran, without having to switch languages or Python interpreters.
14588
14589Numba works by generating optimized machine code using the LLVM compiler
14590infrastructure at import time, runtime, or statically (using the included pycc
14591tool).")
14592 (license license:bsd-3)))
14593
14594(define-public python-anndata
14595 (package
14596 (name "python-anndata")
14597 (version "0.6.9")
14598 (source
14599 (origin
14600 (method url-fetch)
14601 (uri (pypi-uri "anndata" version))
14602 (sha256
14603 (base32
14604 "1fh461xyyc7pcrjfgd013bdc2alf53r46ss3gfw3431mbb1gappi"))))
14605 (build-system python-build-system)
14606 (propagated-inputs
14607 `(("python-h5py" ,python-h5py)
14608 ("python-natsort" ,python-natsort)
14609 ("python-pandas" ,python-pandas)
14610 ("python-scipy" ,python-scipy)))
14611 (home-page "https://github.com/theislab/anndata")
14612 (synopsis "Annotated data for data analysis pipelines")
14613 (description "Anndata is a package for simple (functional) high-level APIs
14614for data analysis pipelines. In this context, it provides an efficient,
14615scalable way of keeping track of data together with learned annotations and
14616reduces the code overhead typically encountered when using a mostly
14617object-oriented library such as @code{scikit-learn}.")
14618 (license license:bsd-3)))
14619
14620(define-public python-dill
14621 (package
14622 (name "python-dill")
14623 (version "0.2.8.2")
14624 (source
14625 (origin
14626 (method url-fetch)
14627 (uri (pypi-uri "dill" version))
14628 (sha256
14629 (base32
14630 "1cymzn9fxwdy33h21zkk4gqgzvd25110hh3zdqnvnwa3p52c4kb2"))))
14631 (build-system python-build-system)
14632 ;; FIXME: The check phase fails with "don't know how to make test".
14633 (arguments '(#:tests? #f))
14634 (home-page "https://pypi.org/project/dill")
14635 (synopsis "Serialize all of Python")
14636 (description "Dill extends Python's @code{pickle} module for serializing
14637and de-serializing Python objects to the majority of the built-in Python
14638types. Dill provides the user the same interface as the @code{pickle} module,
14639and also includes some additional features. In addition to pickling Python
14640objects, @code{dill} provides the ability to save the state of an interpreter
14641session in a single command. Hence, it would be feasable to save a
14642interpreter session, close the interpreter, ship the pickled file to another
14643computer, open a new interpreter, unpickle the session and thus continue from
14644the saved state of the original interpreter session.")
14645 (license license:bsd-3)))
14646
14647(define-public python-multiprocess
14648 (package
14649 (name "python-multiprocess")
14650 (version "0.70.6.1")
14651 (source
14652 (origin
14653 (method url-fetch)
14654 (uri (pypi-uri "multiprocess" version))
14655 (sha256
14656 (base32
14657 "1ip5caz67b3q0553mr8gm8xwsb8x500jn8ml0gihgyfy52m2ypcq"))))
14658 (build-system python-build-system)
14659 (propagated-inputs
14660 `(("python-dill" ,python-dill)))
14661 (home-page "https://pypi.org/project/multiprocess")
14662 (synopsis "Multiprocessing and multithreading in Python")
14663 (description
14664 "This package is a fork of the multiprocessing Python package, a package
14665which supports the spawning of processes using the API of the standard
14666library's @code{threading} module.")
14667 (license license:bsd-3)))
14668
14669(define-public python-toolz
14670 (package
14671 (name "python-toolz")
14672 (version "0.9.0")
14673 (source
14674 (origin
14675 (method url-fetch)
14676 (uri (pypi-uri "toolz" version))
14677 (sha256
14678 (base32
14679 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
14680 (build-system python-build-system)
14681 ;; FIXME: tests cannot be computed: "Can't perform this operation for
14682 ;; unregistered loader type"
14683 (arguments '(#:tests? #f))
14684 (home-page "https://github.com/pytoolz/toolz/")
14685 (synopsis "List processing tools and functional utilities")
14686 (description
14687 "This package provides a set of utility functions for iterators,
14688functions, and dictionaries.")
14689 (license license:bsd-3)))
14690
14691(define-public python2-toolz
14692 (package-with-python2 python-toolz))
14693
14694(define-public python-cytoolz
14695 (package
14696 (name "python-cytoolz")
14697 (version "0.9.0.1")
14698 (source
14699 (origin
14700 (method url-fetch)
14701 (uri (pypi-uri "cytoolz" version))
14702 (sha256
14703 (base32
14704 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
14705 (build-system python-build-system)
14706 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
14707 ;; 'exceptions'"
14708 (arguments '(#:tests? #f))
14709 (propagated-inputs
14710 `(("python-toolz" ,python-toolz)))
14711 (native-inputs
14712 `(("python-cython" ,python-cython)))
14713 (home-page "https://github.com/pytoolz/cytoolz")
14714 (synopsis "High performance functional utilities")
14715 (description
14716 "The cytoolz package implements the same API as provided by toolz. The
14717main differences are that @code{cytoolz} is faster and cytoolz offers a C API
14718that is accessible to other projects developed in Cython.")
14719 (license license:bsd-3)))
14720
14721(define-public python-sortedcontainers
14722 (package
14723 (name "python-sortedcontainers")
14724 (version "2.0.4")
14725 (source
14726 (origin
14727 (method url-fetch)
14728 (uri (pypi-uri "sortedcontainers" version))
14729 (sha256
14730 (base32
14731 "10hrk2k0hbf9x78vd3f0lj277m1yzfhzzxr0hja718liwb398wk0"))))
14732 (build-system python-build-system)
14733 (native-inputs
14734 `(("python-tox" ,python-tox)))
14735 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
14736 (synopsis "Sorted List, Sorted Dict, Sorted Set")
14737 (description
14738 "This package provides a sorted collections library, written in
14739pure-Python.")
14740 (license license:asl2.0)))
14741
14742(define-public python-cloudpickle
14743 (package
14744 (name "python-cloudpickle")
14745 (version "0.6.1")
14746 (source
14747 (origin
14748 (method url-fetch)
14749 (uri (pypi-uri "cloudpickle" version))
14750 (sha256
14751 (base32
14752 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
14753 (build-system python-build-system)
14754 ;; FIXME: there are 5 errors in 122 tests:
14755 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
14756 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
14757 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
14758 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
14759 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
14760 ;; TypeError: cannot serialize '_io.BufferedRandom' object
14761 (arguments '(#:tests? #f))
14762 (native-inputs
14763 `(("python-pytest" ,python-pytest)
14764 ("python-mock" ,python-mock)
14765 ("python-tornado" ,python-tornado)))
14766 (home-page "https://github.com/cloudpipe/cloudpickle")
14767 (synopsis "Extended pickling support for Python objects")
14768 (description
14769 "Cloudpickle makes it possible to serialize Python constructs not
14770supported by the default pickle module from the Python standard library. It
14771is especially useful for cluster computing where Python expressions are
14772shipped over the network to execute on remote hosts, possibly close to the
14773data.")
14774 (license license:bsd-3)))
14775
14776(define-public python2-cloudpickle
14777 (package-with-python2 python-cloudpickle))
14778
14779(define-public python-locket
14780 (package
14781 (name "python-locket")
14782 (version "0.2.0")
14783 (source
14784 (origin
14785 (method url-fetch)
14786 (uri (pypi-uri "locket" version))
14787 (sha256
14788 (base32
14789 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
14790 (build-system python-build-system)
14791 (home-page "https://github.com/mwilliamson/locket.py")
14792 (synopsis "File-based locks for Python")
14793 (description
14794 "Locket implements a lock that can be used by multiple processes provided
14795they use the same path.")
14796 (license license:bsd-2)))
14797
14798(define-public python2-locket
14799 (package-with-python2 python-locket))
14800
14801(define-public python-blosc
14802 (package
14803 (name "python-blosc")
14804 (version "1.5.1")
14805 (source
14806 (origin
14807 (method url-fetch)
14808 (uri (pypi-uri "blosc" version))
14809 (sha256
14810 (base32
14811 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
14812 (build-system python-build-system)
14813 ;; FIXME: all tests pass, but then this error is printed:
14814 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
14815 (arguments '(#:tests? #f))
14816 (propagated-inputs
14817 `(("python-numpy" ,python-numpy)))
14818 (home-page "https://github.com/blosc/python-blosc")
14819 (synopsis "Python wrapper for the Blosc data compressor library")
14820 (description "Blosc is a high performance compressor optimized for binary
14821data. It has been designed to transmit data to the processor cache faster
14822than the traditional, non-compressed, direct memory fetch approach via a
14823@code{memcpy()} system call.
14824
14825Blosc works well for compressing numerical arrays that contains data with
14826relatively low entropy, like sparse data, time series, grids with
14827regular-spaced values, etc.
14828
14829This Python package wraps the Blosc library.")
14830 (license license:bsd-3)))
14831
14832(define-public python2-blosc
14833 (package-with-python2 python-blosc))
14834
14835(define-public python-partd
14836 (package
14837 (name "python-partd")
14838 (version "0.3.9")
14839 (source
14840 (origin
14841 (method url-fetch)
14842 (uri (pypi-uri "partd" version))
14843 (sha256
14844 (base32
14845 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
14846 (build-system python-build-system)
14847 (propagated-inputs
14848 `(("python-blosc" ,python-blosc)
14849 ("python-locket" ,python-locket)
14850 ("python-numpy" ,python-numpy)
14851 ("python-pandas" ,python-pandas)
14852 ("python-pyzmq" ,python-pyzmq)
14853 ("python-toolz" ,python-toolz)))
14854 (home-page "https://github.com/dask/partd/")
14855 (synopsis "Appendable key-value storage")
14856 (description "Partd stores key-value pairs. Values are raw bytes. We
14857append on old values. Partd excels at shuffling operations.")
14858 (license license:bsd-3)))
14859
14860(define-public python2-partd
14861 (package-with-python2 python-partd))
14862
14863(define-public python-dask
14864 (package
14865 (name "python-dask")
755226e9 14866 (version "1.1.4")
44d10b1f
RW
14867 (source
14868 (origin
14869 (method url-fetch)
14870 (uri (pypi-uri "dask" version))
14871 (sha256
14872 (base32
755226e9 14873 "1hrnfz4pzawikz9b622vjz2500n7hs25nz9msy1k8l4g7l2kr6ky"))))
44d10b1f
RW
14874 (build-system python-build-system)
14875 ;; A single test out of 5000+ fails. This test is marked as xfail when
14876 ;; pytest-xdist is used.
14877 (arguments
14878 `(#:phases
14879 (modify-phases %standard-phases
14880 (add-after 'unpack 'disable-broken-test
14881 (lambda _
14882 (substitute* "dask/tests/test_threaded.py"
14883 (("def test_interrupt\\(\\)" m)
14884 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
14885 m)))
14886 (when (which "python2")
14887 ;; This test fails with recent Pandas:
14888 ;; <https://github.com/dask/dask/issues/3794>.
14889 (substitute* "dask/dataframe/tests/test_dataframe.py"
14890 (("def test_info\\(\\)" m)
14891 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
14892 m))))
14893 #t))
14894 (replace 'check
14895 (lambda _ (invoke "pytest" "-vv"))))))
14896 (propagated-inputs
14897 `(("python-cloudpickle" ,python-cloudpickle)
14898 ("python-numpy" ,python-numpy)
14899 ("python-pandas" ,python-pandas)
14900 ("python-partd" ,python-partd)
14901 ("python-toolz" ,python-toolz)
14902 ("python-pyyaml" ,python-pyyaml)))
14903 (native-inputs
14904 `(("python-pytest" ,python-pytest)
14905 ("python-pytest-runner" ,python-pytest-runner)))
14906 (home-page "https://github.com/dask/dask/")
14907 (synopsis "Parallel computing with task scheduling")
14908 (description
14909 "Dask is a flexible parallel computing library for analytics. It
14910consists of two components: dynamic task scheduling optimized for computation,
14911and large data collections like parallel arrays, dataframes, and lists that
14912extend common interfaces like NumPy, Pandas, or Python iterators to
14913larger-than-memory or distributed environments. These parallel collections
14914run on top of the dynamic task schedulers. ")
14915 (license license:bsd-3)))
14916
14917(define-public python2-dask
14918 (package-with-python2 python-dask))
14919
14920(define-public python-ilinkedlist
14921 (package
14922 (name "python-ilinkedlist")
14923 (version "0.4.0")
14924 (source
14925 (origin
14926 (method url-fetch)
14927 (uri (pypi-uri "ilinkedlist" version))
14928 (sha256
14929 (base32
14930 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
14931 (build-system python-build-system)
14932 (native-inputs `(("python-pytest" ,python-pytest)))
14933 (inputs `(("python" ,python)))
14934 (home-page "https://github.com/luther9/ilinkedlist-py")
14935 (synopsis "Immutable linked list library")
14936 (description
14937 "This is a implementation of immutable linked lists for Python. It
14938contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
14939Since a linked list is treated as immutable, it is hashable, and its length
14940can be retrieved in constant time. Some of the terminology is inspired by
14941LISP. It is possible to create an improper list by creating a @code{Pair}
14942with a non-list @code{cdr}.")
14943 (license license:gpl3+)))
14944
14945(define-public python-readlike
14946 (package
14947 (name "python-readlike")
14948 (version "0.1.3")
14949 (source
14950 (origin
14951 (method url-fetch)
14952 (uri (pypi-uri "readlike" version))
14953 (sha256
14954 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
14955 (build-system python-build-system)
14956 (home-page "https://github.com/jangler/readlike")
14957 (synopsis "GNU Readline-like line editing module")
14958 (description
14959 "This Python module provides line editing functions similar to the default
14960Emacs-style ones of GNU Readline. Unlike the Python standard library's
14961@code{readline} package, this one allows access to those capabilties in settings
14962outside of a standard command-line interface. It is especially well-suited to
14963interfacing with Urwid, due to a shared syntax for describing key inputs.
14964
14965Currently, all stateless Readline commands are implemented. Yanking and history
14966are not supported.")
14967 (license license:expat)))
14968
14969(define-public python2-readlike
14970 (package-with-python2 python-readlike))
14971
14972(define-public python-reparser
14973 (package
14974 (name "python-reparser")
14975 (version "1.4.3")
14976 (source
14977 (origin
14978 (method url-fetch)
14979 (uri (pypi-uri "ReParser" version))
14980 (sha256
14981 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
14982 (build-system python-build-system)
14983 (home-page "https://github.com/xmikos/reparser")
14984 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
14985 (description
14986 "This Python library provides a simple lexer/parser for inline markup based
14987on regular expressions.")
14988 (license license:expat)))
14989
14990(define-public python2-reparser
14991 (let ((reparser (package-with-python2
14992 (strip-python2-variant python-reparser))))
14993 (package (inherit reparser)
14994 (propagated-inputs
14995 `(("python2-enum34" ,python2-enum34)
14996 ,@(package-propagated-inputs reparser))))))
14997
14998(define-public python-precis-i18n
14999 (package
15000 (name "python-precis-i18n")
15001 (version "1.0.0")
15002 (source
15003 (origin
15004 (method url-fetch)
15005 (uri (pypi-uri "precis_i18n" version))
15006 (sha256
15007 (base32
15008 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
15009 (build-system python-build-system)
15010 (home-page "https://github.com/byllyfish/precis_i18n")
15011 (synopsis "Implementation of the PRECIS framework")
15012 (description
15013 "This module implements the PRECIS Framework as described in RFC 8264,
15014RFC 8265 and RFC 8266.")
15015 (license license:expat)))
15016
d0446c4b
RW
15017(define-public python-absl-py
15018 (package
15019 (name "python-absl-py")
15020 (version "0.6.1")
15021 (source
15022 (origin
15023 (method url-fetch)
15024 (uri (pypi-uri "absl-py" version))
15025 (sha256
15026 (base32
15027 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
15028 (build-system python-build-system)
15029 (propagated-inputs
15030 `(("python-six" ,python-six)))
15031 (home-page "https://github.com/abseil/abseil-py")
15032 (synopsis "Abseil Python common libraries")
15033 (description
15034 "This package provides the Abseil Python Common Libraries, a collection
15035of Python libraries for building Python applications.")
15036 (license license:asl2.0)))
15037
81bed4e9
RW
15038(define-public python-astor
15039 (package
15040 (name "python-astor")
15041 (version "0.7.1")
15042 (source
15043 (origin
15044 (method url-fetch)
15045 (uri (pypi-uri "astor" version))
15046 (sha256
15047 (base32
15048 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
15049 (build-system python-build-system)
15050 ;; FIXME: There are two errors and two test failures.
15051 (arguments `(#:tests? #f))
15052 (home-page "https://github.com/berkerpeksag/astor")
39ee82ff 15053 (synopsis "Read and write Python ASTs")
81bed4e9 15054 (description "Astor is designed to allow easy manipulation of Python
39ee82ff 15055source via the Abstract Syntax Tree.")
81bed4e9
RW
15056 (license license:bsd-3)))
15057
39ee82ff
RW
15058(define-public python2-astor
15059 (package-with-python2 python-astor))
15060
22e623ae
RW
15061(define-public python-grpcio
15062 (package
15063 (name "python-grpcio")
15064 (version "1.17.1")
15065 (source
15066 (origin
15067 (method url-fetch)
15068 (uri (pypi-uri "grpcio" version))
15069 (sha256
15070 (base32
15071 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
15072 (build-system python-build-system)
15073 (propagated-inputs
15074 `(("python-six" ,python-six)))
15075 (home-page "https://grpc.io")
15076 (synopsis "HTTP/2-based RPC framework")
15077 (description "This package provides a Python library for communicating
15078with the HTTP/2-based RPC framework gRPC.")
15079 (license license:asl2.0)))
15080
79869f80
RW
15081(define-public python-astunparse
15082 (package
15083 (name "python-astunparse")
15084 (version "1.6.1")
15085 (source
15086 (origin
15087 (method url-fetch)
15088 (uri (pypi-uri "astunparse" version))
15089 (sha256
15090 (base32
15091 "1jhidwyrqn17avqh9xnnm3wd7q7aahaq009cba67g86y6gxicyyj"))))
15092 (build-system python-build-system)
15093 (arguments '(#:tests? #f)) ; there are none
15094 (propagated-inputs
15095 `(("python-six" ,python-six)
15096 ("python-wheel" ,python-wheel)))
15097 (home-page "https://github.com/simonpercivall/astunparse")
15098 (synopsis "AST unparser for Python")
15099 (description "This package provides an AST unparser for Python. It is a
15100factored out version of @code{unparse} found in the Python source
15101distribution.")
15102 (license license:bsd-3)))
15103
2884aac0
RW
15104(define-public python-gast
15105 (package
15106 (name "python-gast")
15107 (version "0.2.0")
15108 (source
15109 (origin
15110 (method url-fetch)
15111 (uri (pypi-uri "gast" version))
15112 (sha256
15113 (base32
15114 "0c296xm1vz9x4w4inmdl0k8mnc0i9arw94si2i7pglpc461r0s3h"))))
15115 (build-system python-build-system)
15116 (propagated-inputs
15117 `(("python-astunparse" ,python-astunparse)))
15118 (home-page "https://pypi.org/project/gast/")
15119 (synopsis "Generic Python AST that abstracts the underlying Python version")
15120 (description
15121 "GAST provides a compatibility layer between the AST of various Python
15122versions, as produced by @code{ast.parse} from the standard @code{ast}
15123module.")
15124 (license license:bsd-3)))
15125
44d10b1f
RW
15126(define-public python-wikidata
15127 (package
15128 (name "python-wikidata")
15129 (version "0.6.1")
15130 (source
15131 (origin
15132 (method url-fetch)
15133 (uri (pypi-uri "Wikidata" version))
15134 (sha256
15135 (base32
15136 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
15137 (build-system python-build-system)
15138 (propagated-inputs
15139 `(("python-babel" ,python-babel)))
15140 (home-page "https://github.com/dahlia/wikidata")
15141 (synopsis "Wikidata client library")
15142 (description
15143 "This package provides a Python interface to
15144@url{https://www.wikidata.org/, Wikidata}.")
15145 (properties '((upstream-name . "Wikidata")))
15146 (license license:gpl3+)))
15147
15148(define-public python-doctest-ignore-unicode
15149 (package
15150 (name "python-doctest-ignore-unicode")
15151 (version "0.1.2")
15152 (source
15153 (origin
15154 (method url-fetch)
15155 (uri (pypi-uri "doctest-ignore-unicode" version))
15156 (sha256
15157 (base32
15158 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
15159 (build-system python-build-system)
15160 (native-inputs
15161 `(("python-nose" ,python-nose)))
15162 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
15163 (synopsis "Ignore Unicode literal prefixes in doctests")
15164 (description
15165 "This package adds support for a flag to ignore Unicode literal prefixes
15166in doctests.")
15167 (license license:asl2.0)))
15168
15169(define-public python-attr
15170 (package
15171 (name "python-attr")
15172 (version "0.3.1")
15173 (source
15174 (origin
15175 (method url-fetch)
15176 (uri (pypi-uri "attr" version))
15177 (sha256
15178 (base32
15179 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
15180 (build-system python-build-system)
15181 (home-page "https://github.com/denis-ryzhkov/attr")
15182 (synopsis "Decorator for attributes of target function or class")
15183 (description "Simple decorator to set attributes of target function or
15184class in a @acronym{DRY, Don't Repeat Yourself} way.")
15185 (license license:expat)))
f98232a3
VC
15186
15187(define-public python-construct
15188 (package
15189 (name "python-construct")
15190 (version "2.9.45")
15191 (source
15192 (origin
15193 (method url-fetch)
15194 (uri (pypi-uri "construct" version))
15195 (sha256
15196 (base32
15197 "130iy05awzigm2xah2yvlmb08mac5bi4gzr5m3g7k1krs3ps0w92"))))
15198 (build-system python-build-system)
15199 (arguments
15200 `(#:tests? #f)) ; No tests exist.
15201 (propagated-inputs
15202 `(("python-extras" ,python-extras)
15203 ("python-arrow" ,python-arrow)
15204 ("python-numpy" ,python-numpy)
15205 ("python-ruamel.yaml" ,python-ruamel.yaml)))
15206 (home-page "http://construct.readthedocs.io")
15207 (synopsis "Declarative and symmetrical parser and builder for binary data")
15208 (description
15209 "This package provides both simple, atomic constructs (such as
15210integers of various sizes), as well as composite ones which allow you
15211form hierarchical and sequential structures of increasing complexity.
15212It features bit and byte granularity, easy debugging and testing, an
15213easy-to-extend subclass system, and lots of primitive constructs to
15214make your work easier.")
15215 (license license:expat)))
b742c006
LF
15216
15217(define-public python-humanize
15218 (package
15219 (name "python-humanize")
15220 (version "0.5.1")
15221 (source
15222 (origin
15223 (method url-fetch)
15224 (uri (pypi-uri "humanize" version))
15225 (sha256
15226 (base32
15227 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
15228 (arguments
15229 '(#:tests? #f)) ; tests not in pypi archive
15230 (build-system python-build-system)
15231 (home-page "https://github.com/jmoiron/humanize")
15232 (synopsis "Print numerical information in a human-readable form")
15233 (description "This package provides a Python module that displays numbers
15234and dates in \"human readable\" forms. For example, it would display
15235\"12345591313\" as \"12.3 billion\".")
15236 (license license:expat)))
d5bbf66d
LF
15237
15238(define-public python-txaio
15239 (package
15240 (name "python-txaio")
15241 (version "18.8.1")
15242 (source
15243 (origin
15244 (method url-fetch)
15245 (uri (pypi-uri "txaio" version))
15246 (sha256
15247 (base32
15248 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
15249 (build-system python-build-system)
15250 (propagated-inputs
15251 `(("python-twisted" ,python-twisted)
15252 ("python-six" ,python-six)))
15253 (home-page "https://github.com/crossbario/txaio")
15254 (synopsis "Compatibility layer between Python asyncio and Twisted")
15255 (description "Txaio provides a compatibility layer between the Python
15256@code{asyncio} module and @code{Twisted}.")
15257 (license license:expat)))
963dfd3a
RW
15258
15259(define-public python-toolshed
15260 (package
15261 (name "python-toolshed")
15262 (version "0.4.6")
15263 (source
15264 (origin
15265 (method url-fetch)
15266 (uri (pypi-uri "toolshed" version))
15267 (sha256
15268 (base32
15269 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
15270 (build-system python-build-system)
15271 (native-inputs
15272 `(("python-nose" ,python-nose)))
15273 (home-page "https://github.com/brentp/toolshed/")
15274 (synopsis "Collection of modules and functions for working with data")
15275 (description "This is a collection of well-tested, simple modules and
15276functions that aim to reduce boilerplate when working with data.")
15277 (license license:bsd-2)))