gnu: ghc-base64-bytestring: Update to 1.0.0.2.
[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>
26;;; Copyright © 2016, 2017 Nils Gillmann <ng0@n0.is>
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>
44d10b1f
RW
61;;;
62;;; This file is part of GNU Guix.
63;;;
64;;; GNU Guix is free software; you can redistribute it and/or modify it
65;;; under the terms of the GNU General Public License as published by
66;;; the Free Software Foundation; either version 3 of the License, or (at
67;;; your option) any later version.
68;;;
69;;; GNU Guix is distributed in the hope that it will be useful, but
70;;; WITHOUT ANY WARRANTY; without even the implied warranty of
71;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
72;;; GNU General Public License for more details.
73;;;
74;;; You should have received a copy of the GNU General Public License
75;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
76
77(define-module (gnu packages python-xyz)
78 #:use-module ((guix licenses) #:prefix license:)
79 #:use-module (gnu packages)
80 #:use-module (gnu packages algebra)
81 #:use-module (gnu packages adns)
82 #:use-module (gnu packages attr)
83 #:use-module (gnu packages backup)
84 #:use-module (gnu packages bash)
85 #:use-module (gnu packages check)
86 #:use-module (gnu packages compression)
87 #:use-module (gnu packages crypto)
88 #:use-module (gnu packages databases)
89 #:use-module (gnu packages file)
90 #:use-module (gnu packages fontutils)
91 #:use-module (gnu packages gcc)
92 #:use-module (gnu packages geo)
93 #:use-module (gnu packages ghostscript)
94 #:use-module (gnu packages gl)
95 #:use-module (gnu packages glib)
96 #:use-module (gnu packages graphviz)
97 #:use-module (gnu packages graphics)
98 #:use-module (gnu packages gstreamer)
99 #:use-module (gnu packages gtk)
100 #:use-module (gnu packages icu4c)
101 #:use-module (gnu packages image)
102 #:use-module (gnu packages imagemagick)
103 #:use-module (gnu packages libevent)
104 #:use-module (gnu packages libffi)
105 #:use-module (gnu packages linux)
106 #:use-module (gnu packages llvm)
107 #:use-module (gnu packages man)
108 #:use-module (gnu packages maths)
42f0b0c2 109 #:use-module (gnu packages monitoring)
44d10b1f
RW
110 #:use-module (gnu packages multiprecision)
111 #:use-module (gnu packages networking)
112 #:use-module (gnu packages ncurses)
113 #:use-module (gnu packages openstack)
114 #:use-module (gnu packages pcre)
115 #:use-module (gnu packages perl)
116 #:use-module (gnu packages pkg-config)
117 #:use-module (gnu packages python)
d362b11d 118 #:use-module (gnu packages python-check)
44d10b1f
RW
119 #:use-module (gnu packages python-crypto)
120 #:use-module (gnu packages python-web)
121 #:use-module (gnu packages qt)
122 #:use-module (gnu packages readline)
123 #:use-module (gnu packages sdl)
124 #:use-module (gnu packages search)
125 #:use-module (gnu packages shells)
126 #:use-module (gnu packages ssh)
127 #:use-module (gnu packages terminals)
128 #:use-module (gnu packages tex)
129 #:use-module (gnu packages texinfo)
130 #:use-module (gnu packages time)
131 #:use-module (gnu packages tls)
132 #:use-module (gnu packages version-control)
133 #:use-module (gnu packages video)
134 #:use-module (gnu packages web)
135 #:use-module (gnu packages base)
136 #:use-module (gnu packages xml)
137 #:use-module (gnu packages xorg)
138 #:use-module (gnu packages xdisorg)
139 #:use-module (gnu packages tcl)
140 #:use-module (gnu packages bdw-gc)
f98232a3 141 #:use-module (gnu packages serialization)
44d10b1f
RW
142 #:use-module (guix packages)
143 #:use-module (guix download)
144 #:use-module (guix git-download)
a042d348 145 #:use-module (guix hg-download)
44d10b1f
RW
146 #:use-module (guix utils)
147 #:use-module (guix build-system gnu)
148 #:use-module (guix build-system cmake)
149 #:use-module (guix build-system python)
150 #:use-module (guix build-system trivial)
151 #:use-module (srfi srfi-1)
152 #:use-module (srfi srfi-26))
153
154(define-public python-psutil
155 (package
156 (name "python-psutil")
157 (version "5.4.3")
158 (source
159 (origin
160 (method url-fetch)
161 (uri (pypi-uri "psutil" version))
162 (sha256
163 (base32
164 "063v69x7spyclyaxrd3gmzj3p16q5ayg97xqhwb1kyn22a9pwip2"))))
165 (build-system python-build-system)
166 (arguments
167 ;; FIXME: some tests does not return and times out.
168 '(#:tests? #f))
169 (home-page "https://www.github.com/giampaolo/psutil")
170 (synopsis "Library for retrieving information on running processes")
171 (description
172 "psutil (Python system and process utilities) is a library for retrieving
173information on running processes and system utilization (CPU, memory, disks,
174network) in Python. It is useful mainly for system monitoring, profiling and
175limiting process resources and management of running processes. It implements
176many functionalities offered by command line tools such as: ps, top, lsof,
177netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
178pidof, tty, taskset, pmap.")
179 (properties `((python2-variant . ,(delay python2-psutil))))
180 (license license:bsd-3)))
181
182(define-public python2-psutil
183 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
184 (package
185 (inherit base)
186 (propagated-inputs
187 `(("python2-enum34" ,python2-enum34) ;optional
188 ,@(package-propagated-inputs base))))))
189
190(define-public python-shapely
191 (package
192 (name "python-shapely")
193 (version "1.6.3")
194 (source
195 (origin
196 (method url-fetch)
197 (uri (pypi-uri "Shapely" version))
198 (sha256
199 (base32
200 "0svc58dzcw9gj92b4sgq35sdxkf85z0qwlzxarkzq4bp3h8jy58l"))))
201 (build-system python-build-system)
202 (native-inputs
203 `(("python-cython" ,python-cython)
204 ("python-matplotlib" ,python-matplotlib)
205 ("python-pytest" ,python-pytest)
206 ("python-pytest-cov" ,python-pytest-cov)))
207 (inputs
208 `(("geos" ,geos)))
209 (propagated-inputs
210 `(("python-numpy" ,python-numpy)))
211 (arguments
212 `(#:phases
213 (modify-phases %standard-phases
214 (add-after 'unpack 'patch-geos-path
215 (lambda* (#:key inputs #:allow-other-keys)
216 (let ((geos (assoc-ref inputs "geos"))
217 (glibc (assoc-ref inputs ,(if (%current-target-system)
218 "cross-libc" "libc"))))
219 (substitute* "shapely/geos.py"
220 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
221 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
222 geos "/lib/libgeos_c.so'])"))
223 (("free = load_dll\\('c'\\)\\.free")
224 (string-append "free = load_dll('c', fallbacks=['"
225 glibc "/lib/libc.so.6']).free"))))
226 #t)))))
227 (home-page "https://github.com/Toblerity/Shapely")
228 (synopsis "Library for the manipulation and analysis of geometric objects")
229 (description "Shapely is a Python package for manipulation and analysis of
230planar geometric objects. It is based on the @code{GEOS} library.")
231 (license license:bsd-3)))
232
233(define-public python-logwrap
234 (package
235 (name "python-logwrap")
236 (version "3.2.1")
237 (source
238 (origin
239 (method url-fetch)
240 (uri (pypi-uri "logwrap" version ".zip"))
241 (sha256
242 (base32
243 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
244 (build-system python-build-system)
245 (propagated-inputs
246 `(("python-six" ,python-six)
247 ("python-typing" ,python-typing)))
248 (native-inputs
249 `(("unzip" ,unzip)
250 ("python-cython" ,python-cython)
251 ("python-pytest" ,python-pytest)
252 ("python-pytest-cov" ,python-pytest-cov)
253 ("python-pytest-runner" ,python-pytest-runner)))
254 (home-page "https://github.com/penguinolog/logwrap")
255 (synopsis "Decorator for logging function arguments")
256 (description "This package provides a decorator to log function arguments
257and function call return values in a human-readable way.")
258 (license license:asl2.0)))
259
260(define-public python2-shapely
261 (package-with-python2 python-shapely))
262
263(define-public python-clyent
264 (package
265 (name "python-clyent")
266 (version "1.2.1")
267 (source
268 (origin
269 (method url-fetch)
270 (uri (pypi-uri "clyent" version))
271 (sha256
272 (base32
273 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
274 (build-system python-build-system)
275 (native-inputs
276 `(("python-mock" ,python-mock)))
277 (home-page "https://github.com/binstar/clyent")
278 (synopsis "Command line client library")
279 (description "Clyent is a Python command line utiliy library. It is used
280by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
281 (license license:bsd-3)))
282
283(define-public python2-clyent
284 (package-with-python2 python-clyent))
285
286(define-public python-babel
287 (package
288 (name "python-babel")
289 (version "2.6.0")
290 (source
291 (origin
292 (method url-fetch)
293 (uri (pypi-uri "Babel" version))
294 (sha256
295 (base32
296 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))
297 (build-system python-build-system)
298 (native-inputs
299 `(("python-freezegun" ,python-freezegun)
300 ("python-pytest" ,python-pytest)))
301 (propagated-inputs
302 `(("python-pytz" ,python-pytz)))
303 (arguments
304 `(#:phases (modify-phases %standard-phases
305 (replace 'check
306 (lambda _ (invoke "pytest" "-vv"))))))
307 (home-page "http://babel.pocoo.org/")
308 (synopsis
309 "Tools for internationalizing Python applications")
310 (description
311 "Babel is composed of two major parts:
312- tools to build and work with gettext message catalogs
313- a Python interface to the CLDR (Common Locale Data Repository), providing
314access to various locale display names, localized number and date formatting,
315etc. ")
316 (license license:bsd-3)))
317
318(define-public python2-babel
319 (package-with-python2 python-babel))
320
321(define-public python2-backport-ssl-match-hostname
322 (package
323 (name "python2-backport-ssl-match-hostname")
324 (version "3.5.0.1")
325 (source
326 (origin
327 (method url-fetch)
2c1f0d09 328 (uri (pypi-uri "backports.ssl_match_hostname" version))
44d10b1f
RW
329 (sha256
330 (base32
331 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
332 (build-system python-build-system)
333 (arguments
334 `(#:python ,python-2
335 #:tests? #f)) ; no test target
336 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
337 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
338 (description
339 "This backport brings the ssl.match_hostname() function to users of
340earlier versions of Python. The function checks the hostname in the
341certificate returned by the server to which a connection has been established,
342and verifies that it matches the intended target hostname.")
343 (license license:psfl)))
344
345(define-public python-hdf4
346 (package
347 (name "python-hdf4")
348 (version "0.9")
349 (source
350 (origin
351 (method url-fetch)
352 (uri (pypi-uri name version))
353 (sha256
354 (base32
355 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
356 (build-system python-build-system)
357 (native-inputs `(("nose" ,python-nose)))
358 (propagated-inputs `(("numpy" ,python-numpy)))
359 (inputs
360 `(("hdf4" ,hdf4)
361 ("libjpeg" ,libjpeg)
362 ("zlib" ,zlib)))
363 (arguments
364 `(#:phases
365 (modify-phases %standard-phases
366 (replace 'check
367 (lambda _
368 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
369 ;; on to import numpy. Somehow this works on their CI system.
370 ;; Let's just manage PYTHONPATH here instead.
371 (substitute* "runexamples.sh"
372 (("export PYTHONPATH=.*") ""))
373 (setenv "PYTHONPATH"
374 (string-append (getcwd) ":"
375 (getenv "PYTHONPATH")))
376 (invoke "./runexamples.sh")
377 (invoke "nosetests" "-v"))))))
378 (home-page "https://github.com/fhs/python-hdf4")
379 (synopsis "Python interface to the NCSA HDF4 library")
380 (description
381 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
382which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
383NetCDF files can also be read and modified. Python-HDF4 is a fork of
384@url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
385 (license license:expat)))
386
387(define-public python2-hdf4
388 (package-with-python2 python-hdf4))
389
390(define-public python-h5py
391 (package
392 (name "python-h5py")
393 (version "2.8.0")
394 (source
395 (origin
396 (method url-fetch)
397 (uri (pypi-uri "h5py" version))
398 (sha256
399 (base32
400 "0mdr6wrq02ac93m1aqx9kad0ppfzmm4imlxqgyy1x4l7hmdcc9p6"))))
401 (build-system python-build-system)
402 (arguments
403 `(#:tests? #f ; no test target
404 #:phases
405 (modify-phases %standard-phases
406 (add-after 'unpack 'fix-hdf5-paths
407 (lambda* (#:key inputs #:allow-other-keys)
408 (let ((prefix (assoc-ref inputs "hdf5")))
409 (substitute* "setup_build.py"
410 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
411 (string-append "['" prefix "/lib" "']"))
412 (("'/opt/local/include', '/usr/local/include'")
413 (string-append "'" prefix "/include" "'")))
414 (substitute* "setup_configure.py"
415 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
416 (string-append "['" prefix "/lib" "']")))
417 #t))))))
418 (propagated-inputs
419 `(("python-six" ,python-six)
420 ("python-numpy" ,python-numpy)))
421 (inputs
422 `(("hdf5" ,hdf5)))
423 (native-inputs
424 `(("python-cython" ,python-cython)
425 ("python-pkgconfig" ,python-pkgconfig)))
426 (home-page "http://www.h5py.org/")
427 (synopsis "Read and write HDF5 files from Python")
428 (description
429 "The h5py package provides both a high- and low-level interface to the
430HDF5 library from Python. The low-level interface is intended to be a
431complete wrapping of the HDF5 API, while the high-level component supports
432access to HDF5 files, datasets and groups using established Python and NumPy
433concepts.")
434 (license license:bsd-3)))
435
436(define-public python2-h5py
437 (package-with-python2 python-h5py))
438
8b89dedc
RW
439(define-public python-sh
440 (package
441 (name "python-sh")
442 (version "1.12.14")
443 (source
444 (origin
445 (method url-fetch)
446 (uri (pypi-uri "sh" version))
447 (sha256
448 (base32
449 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
450 (build-system python-build-system)
fd3638d8
EF
451 (arguments
452 '(#:phases
453 (modify-phases %standard-phases
454 (replace 'check
455 (lambda _
456 (invoke "python" "sh.py" "test"))))))
457 (native-inputs
458 `(("python-coverage" ,python-coverage)))
8b89dedc
RW
459 (home-page "https://github.com/amoffat/sh")
460 (synopsis "Python subprocess replacement")
461 (description "This package provides a replacement for Python's
462@code{subprocess} feature.")
463 (license license:expat)))
464
3869effd
RW
465(define-public python2-sh
466 (package-with-python2 python-sh))
467
d362b11d
RW
468(define-public python-cftime
469 (package
470 (name "python-cftime")
471 (version "1.0.3.4")
472 (source
473 (origin
474 (method url-fetch)
475 (uri (pypi-uri "cftime" version))
476 (sha256
477 (base32
478 "0362dhxbzk593walyjz30dll6y2y79wialik647cbwdsf3ad0x6x"))))
479 (build-system python-build-system)
480 (propagated-inputs
481 `(("python-numpy" ,python-numpy)))
482 (native-inputs
483 `(("python-coveralls" ,python-coveralls)
484 ("python-cython" ,python-cython)
485 ("python-pytest-cov" ,python-pytest-cov)))
486 (home-page "https://github.com/Unidata/cftime")
487 (synopsis "Library for time handling")
488 (description
489 "This package provides time-handling functionality that used to be part
490of the netcdf4 package before.")
491 ;; This package claims to include code under the GPLv3 but is released
492 ;; under ISC.
493 (license (list license:isc license:gpl3+))))
494
44d10b1f
RW
495(define-public python-netcdf4
496 (package
497 (name "python-netcdf4")
93e7b209 498 (version "1.4.2")
44d10b1f
RW
499 (source
500 (origin
501 (method url-fetch)
502 (uri (pypi-uri "netCDF4" version))
503 (sha256
504 (base32
93e7b209 505 "0c0sklgrmv15ygliin8qq0hp7vanmbi74m6zpi0r1ksr0hssyd5r"))))
44d10b1f 506 (build-system python-build-system)
93e7b209
RW
507 (arguments
508 '(#:phases
509 (modify-phases %standard-phases
510 (add-after 'unpack 'configure-locations
511 (lambda* (#:key inputs #:allow-other-keys)
512 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
513 #t)))))
44d10b1f
RW
514 (native-inputs
515 `(("python-cython" ,python-cython)))
516 (propagated-inputs
93e7b209
RW
517 `(("python-numpy" ,python-numpy)
518 ("python-cftime" ,python-cftime)))
44d10b1f
RW
519 (inputs
520 `(("netcdf" ,netcdf)
521 ("hdf4" ,hdf4)
522 ("hdf5" ,hdf5)))
93e7b209 523 (home-page "https://github.com/Unidata/netcdf4-python")
44d10b1f
RW
524 (synopsis "Python/numpy interface to the netCDF library")
525 (description "Netcdf4-python is a Python interface to the netCDF C
526library. netCDF version 4 has many features not found in earlier
527versions of the library and is implemented on top of HDF5. This module
528can read and write files in both the new netCDF 4 and the old netCDF 3
529format, and can create files that are readable by HDF5 clients. The
530API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
531to users of that module.")
532 ;; The software is mainly ISC, but includes some files covered
533 ;; by the Expat license.
534 (license (list license:isc license:expat))))
535
536(define-public python2-netcdf4
537 (package-with-python2 python-netcdf4))
538
539(define-public python-lockfile
540 (package
541 (name "python-lockfile")
542 (version "0.12.2")
543 (source
544 (origin
545 (method url-fetch)
8318bf07 546 (uri (pypi-uri "lockfile" version))
44d10b1f
RW
547 (sha256
548 (base32
549 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
550 (build-system python-build-system)
551 (arguments '(#:test-target "check"))
552 (native-inputs
553 `(("python-pbr" ,python-pbr)))
554 (home-page "https://launchpad.net/pylockfile")
555 (synopsis "Platform-independent file locking module")
556 (description
557 "The lockfile package exports a LockFile class which provides a simple
558API for locking files.")
559 (license license:expat)))
560
561(define-public python2-lockfile
562 (package-with-python2 python-lockfile))
563
564(define-public python-semantic-version
565 (package
566 (name "python-semantic-version")
567 (version "2.6.0")
568 (source
569 (origin
570 (method url-fetch)
571 (uri (pypi-uri "semantic_version" version))
572 (sha256
573 (base32
574 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
575 (build-system python-build-system)
576 (arguments
577 `(#:tests? #f)) ; PyPI tarball lacks tests
578 (home-page "https://github.com/rbarrois/python-semanticversion")
579 (synopsis "Semantic versioning module for Python")
580 (description
581 "The @code{semantic_version} class is a small library for handling
582@uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
583
584It can compare versions, generate a new version that represents a bump in one of
585the version levels, and check whether any given string is a proper semantic
586version identifier.")
587 (license license:bsd-3)))
588
589(define-public python2-semantic-version
590 (package-with-python2 python-semantic-version))
591
592(define-public python-serpent
593 (package
594 (name "python-serpent")
595 (version "1.27")
596 (source
597 (origin
598 (method url-fetch)
599 (uri (pypi-uri "serpent" version))
600 (sha256
601 (base32
602 "04p9dsrm5pv8vhk3flvih55kgvlzpi38hlaykdiakddmgwqw93bg"))))
603 (build-system python-build-system)
604 (home-page "https://github.com/irmen/Serpent")
605 (synopsis "Serializer for literal Python expressions")
606 (description
607 "Serpent provides ast.literal_eval() compatible object tree
608serialization. It serializes an object tree into bytes (utf-8 encoded string)
609that can be decoded and then passed as-is to ast.literal_eval() to rebuild it
610as the original object tree. As such it is safe to send serpent data to other
611machines over the network for instance (because only safe literals are
612encoded).")
613 (license license:expat)))
614
615(define-public python-setuptools
616 (package
617 (name "python-setuptools")
618 (version "40.0.0")
619 (source
620 (origin
621 (method url-fetch)
622 (uri (pypi-uri "setuptools" version ".zip"))
623 (sha256
624 (base32
625 "0pq116lr14gnc62v76nk0npkm6krb2mpp7p9ab369zgv4n7dnah1"))
626 (modules '((guix build utils)))
627 (snippet
628 '(begin
629 ;; Remove included binaries which are used to build self-extracting
630 ;; installers for Windows.
631 ;; TODO: Find some way to build them ourself so we can include them.
632 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
633 #t))))
634 (build-system python-build-system)
635 ;; FIXME: Tests require pytest, which itself relies on setuptools.
636 ;; One could bootstrap with an internal untested setuptools.
637 (arguments
638 `(#:tests? #f))
639 (home-page "https://pypi.python.org/pypi/setuptools")
640 (synopsis
641 "Library designed to facilitate packaging Python projects")
642 (description
643 "Setuptools is a fully-featured, stable library designed to facilitate
644packaging Python projects, where packaging includes:
645Python package and module definitions,
646distribution package metadata,
647test hooks,
648project installation,
649platform-specific details,
650Python 3 support.")
651 ;; TODO: setuptools now bundles the following libraries:
652 ;; packaging, pyparsing, six and appdirs. How to unbundle?
653 (license (list license:psfl ; setuptools itself
654 license:expat ; six, appdirs, pyparsing
655 license:asl2.0 ; packaging is dual ASL2/BSD-2
656 license:bsd-2))))
657
658(define-public python2-setuptools
659 (package-with-python2 python-setuptools))
660
661(define-public python-uniseg
662 (package
663 (name "python-uniseg")
664 (version "0.7.1")
665 (source
666 (origin
667 (method url-fetch)
668 (uri (pypi-uri "uniseg" version ".zip"))
669 (sha256
670 (base32
671 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
672 (build-system python-build-system)
673 (arguments
674 '(#:tests? #f)) ; The test suite requires network access.
675 (native-inputs
676 `(("unzip" ,unzip)))
677 (home-page
678 "https://bitbucket.org/emptypage/uniseg-python")
679 (synopsis
680 "Python library to determine Unicode text segmentations")
681 (description
682 "Uniseg is a Python package used to determine Unicode text segmentations.
683Supported segmentations include:
684@enumerate
685@item @dfn{Code point} (any value in the Unicode codespace)
686@item @dfn{Grapheme cluster} (user-perceived character made of a single or
687multiple Unicode code points, e.g. \"G\" + acute-accent)
688@item Word break
689@item Sentence break
690@item Line break
691@end enumerate")
692 (license license:expat)))
693
694(define-public python2-uniseg
695 (package-with-python2 python-uniseg))
696
697(define-public python-humanfriendly
698 (package
699 (name "python-humanfriendly")
700 (version "4.4.1")
701 (source
702 (origin
703 (method url-fetch)
704 (uri (pypi-uri "humanfriendly" version))
705 (sha256
706 (base32
707 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
708 (build-system python-build-system)
709 (arguments
710 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
711 #:tests? #f))
712 (propagated-inputs
713 `(("python-monotonic" ,python-monotonic)))
714 (home-page "https://humanfriendly.readthedocs.io")
715 (synopsis "Human-friendly input and output in Python")
716 (description
717 "The functions and classes in @code{humanfriendly} can be used to make
718text interfaces more user-friendly. It includes tools to parse and format
719numbers, file sizes, and timespans, timers for long-running operations, menus
720to allow the user to choose from a list of options, and terminal interaction
721helpers.")
722 (license license:expat)))
723
724(define-public python2-humanfriendly
725 (package-with-python2 python-humanfriendly))
726
727(define-public python-capturer
728 (package
729 (name "python-capturer")
730 (version "2.4")
731 (source
732 (origin
733 (method url-fetch)
734 (uri (pypi-uri "capturer" version))
735 (sha256
736 (base32
737 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
738 (build-system python-build-system)
739 (arguments
740 `(#:tests? #f))
741 (propagated-inputs
742 `(("python-humanfriendly" ,python-humanfriendly)))
743 (home-page "https://capturer.readthedocs.io")
744 (synopsis "Capture stdout and stderr streams of the current process")
745 (description
746 "The capturer package makes it easy to capture the stdout and stderr
747streams of the current process and subprocesses. Output can be relayed
748to the terminal in real time but is also available to the Python program
749for additional processing.")
750 (license license:expat)))
751
752(define-public python2-capturer
753 (package-with-python2 python-capturer))
754
755(define-public python-case
756 (package
757 (name "python-case")
758 (version "1.5.3")
759 (source
760 (origin
761 (method url-fetch)
762 (uri (pypi-uri "case" version))
763 (sha256
764 (base32
765 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
766 (build-system python-build-system)
767 (propagated-inputs
768 `(("python-mock" ,python-mock)
769 ("python-nose" ,python-nose)
770 ("python-six" ,python-six)
771 ("python-unittest2" ,python-unittest2)))
772 (native-inputs
773 `(("python-coverage" ,python-coverage)))
774 (home-page "https://github.com/celery/case")
775 (synopsis "Unittest utilities and convenience methods")
776 (description
777 "The @code{case} package provides utilities on top of unittest, including
778some helpful Python 2 compatibility convenience methods.")
779 (license license:bsd-3)))
780
781(define-public python-verboselogs
782 (package
783 (name "python-verboselogs")
784 (version "1.7")
785 (source
786 (origin
787 (method url-fetch)
788 (uri (pypi-uri "verboselogs" version))
789 (sha256
790 (base32
791 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
792 (build-system python-build-system)
793 (native-inputs
794 `(("python-mock" ,python-mock)
795 ("python-astroid" ,python-astroid)
796 ("python-pylint" ,python-pylint)))
797 (home-page "https://verboselogs.readthedocs.io")
798 (synopsis "Verbose logging level for Python's logging module")
799 (description
800 "The @code{verboselogs} package extends Python's @code{logging} module to
801add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
802 (license license:expat)))
803
804(define-public python2-verboselogs
805 (package-with-python2 python-verboselogs))
806
807(define-public python-coloredlogs
808 (package
809 (name "python-coloredlogs")
810 (version "7.3")
811 (source
812 (origin
813 (method url-fetch)
814 (uri (pypi-uri "coloredlogs" version))
815 (sha256
816 (base32
817 "1blcann6dyg5dhps9pg12rn0q0rjrlajpmmil0gy0j4cbvnl2il9"))))
818 (build-system python-build-system)
819 (arguments
820 `(;Tests require some updated modules
821 #:tests? #f))
822 (propagated-inputs
823 `(("python-capturer" ,python-capturer)))
824 (home-page "https://coloredlogs.readthedocs.io")
825 (synopsis "Colored stream handler for Python's logging module")
826 (description
827 "The @code{coloredlogs} package enables colored terminal output for
828Python's logging module. The @code{ColoredFormatter} class inherits from
829@code{logging.Formatter} and uses ANSI escape sequences to render your logging
830messages in color.")
831 (license license:expat)))
832
833(define-public python2-coloredlogs
834 (package-with-python2 python-coloredlogs))
835
4caf37b0
MC
836(define-public python-et-xmlfile
837 (package
838 (name "python-et-xmlfile")
839 (version "1.0.1")
840 (source
841 (origin
842 (method url-fetch)
843 (uri (pypi-uri "et_xmlfile" version))
844 (sha256
845 (base32
846 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
847 (build-system python-build-system)
848 (arguments
849 `(#:phases (modify-phases %standard-phases
850 (replace 'check
851 (lambda _
852 (invoke "pytest"))))))
853 (native-inputs
854 `(("python-pytest" ,python-pytest)
855 ("python-lxml" ,python-lxml))) ;used for the tests
856 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
857 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
858 (description "This Python library is based upon the @code{xmlfile} module
859from @code{lxml}. It aims to provide a low memory, compatible implementation
860of @code{xmlfile}.")
861 (license license:expat)))
862
863(define-public python2-et-xmlfile
864 (package-with-python2 python-et-xmlfile))
865
a042d348
MC
866(define-public python-openpyxl
867 (package
868 (name "python-openpyxl")
869 (version "2.6.0")
870 (source
871 (origin
872 ;; We use the upstream repository, as the tests are not included in the
873 ;; PyPI releases.
874 (method hg-fetch)
875 (uri (hg-reference
876 (url "https://bitbucket.org/openpyxl/openpyxl")
877 (changeset version)))
878 (file-name (string-append name "-" version "-checkout"))
879 (sha256
880 (base32
881 "1x47ngn7ybaqdbvg90c8h2x0j6yfdfj25gjfinp2w5rf62gsany7"))))
882 (build-system python-build-system)
883 (arguments
884 `(#:phases (modify-phases %standard-phases
885 (replace 'check
886 (lambda _
887 (invoke "pytest"))))))
888 (native-inputs
889 ;; For the test suite.
890 `(("python-lxml" ,python-lxml)
891 ("python-pillow" ,python-pillow)
892 ("python-pytest" ,python-pytest)))
893 (propagated-inputs
894 `(("python-et-xmlfile" ,python-et-xmlfile)
895 ("python-jdcal" ,python-jdcal)))
896 (home-page "https://openpyxl.readthedocs.io")
897 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
898 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
899XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
900standard.")
901 (license license:expat)))
902
44d10b1f
RW
903(define-public python-eventlet
904 (package
905 (name "python-eventlet")
906 (version "0.20.1")
907 (source
908 (origin
909 (method url-fetch)
910 (uri (pypi-uri "eventlet" version))
911 (sha256
912 (base32
913 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
914 (build-system python-build-system)
915 (propagated-inputs
916 `(("python-greenlet" ,python-greenlet)))
917 (arguments
918 ;; TODO: Requires unpackaged 'enum-compat'.
919 '(#:tests? #f))
920 (home-page "http://eventlet.net")
921 (synopsis "Concurrent networking library for Python")
922 (description
923 "Eventlet is a concurrent networking library for Python that
924allows you to change how you run your code, not how you write it.
925It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
926Coroutines ensure that the developer uses a blocking style of programming
927that is similar to threading, but provide the benefits of non-blocking I/O.
928The event dispatch is implicit, which means you can easily use @code{Eventlet}
929from the Python interpreter, or as a small part of a larger application.")
930 (license license:expat)))
931
932(define-public python2-eventlet
933 (let ((base (package-with-python2
934 (strip-python2-variant python-eventlet))))
935 (package (inherit base)
936 (propagated-inputs
937 `(("python2-enum34" ,python2-enum34)
938 ,@(package-propagated-inputs base))))))
939
940(define-public python-six
941 (package
942 (name "python-six")
943 (version "1.11.0")
944 (source
945 (origin
946 (method url-fetch)
947 (uri (pypi-uri "six" version))
948 (sha256
949 (base32
950 "1scqzwc51c875z23phj48gircqjgnn3af8zy2izjwmnlxrxsgs3h"))))
951 (build-system python-build-system)
952 (arguments
953 `(#:phases
954 (modify-phases %standard-phases
955 (replace 'check
956 (lambda _
957 (invoke "py.test" "-v"))))))
958 (native-inputs
959 `(("python-py" ,python-py)
960 ("python-pytest" ,python-pytest-bootstrap)))
961 (home-page "https://pypi.python.org/pypi/six/")
962 (synopsis "Python 2 and 3 compatibility utilities")
963 (description
964 "Six is a Python 2 and 3 compatibility library. It provides utility
965functions for smoothing over the differences between the Python versions with
966the goal of writing Python code that is compatible on both Python versions.
967Six supports every Python version since 2.5. It is contained in only one
968Python file, so it can be easily copied into your project.")
969 (license license:x11)))
970
971(define-public python2-six
972 (package-with-python2 python-six))
973
974(define-public python-six-bootstrap
975 (package
976 (inherit python-six)
977 (name "python-six-bootstrap")
978 (native-inputs `())
979 (arguments `(#:tests? #f))))
980
981(define-public python2-six-bootstrap
982 (package-with-python2 python-six-bootstrap))
983
984(define-public python-schedule
985 (package
986 (name "python-schedule")
987 (version "0.4.3")
988 (source
989 (origin
990 (method url-fetch)
991 (uri (pypi-uri "schedule" version))
992 (sha256
993 (base32
994 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
995 (build-system python-build-system)
996 (native-inputs
997 `(("python-pytest" ,python-pytest)
998 ("python-mock" ,python-mock)))
999 (home-page "https://github.com/dbader/schedule")
1000 (synopsis "Schedule periodic function calls in Python")
1001 (description
1002 "Schedule is an in-process scheduler for periodic jobs that uses the
1003builder pattern for configuration. Schedule lets you run Python functions (or
1004any other callable) periodically at pre-determined intervals using a simple,
1005human-friendly syntax.")
1006 (license license:expat)))
1007
1008(define-public python2-schedule
1009 (package-with-python2 python-schedule))
1010
1011(define-public python-pandas
1012 (package
1013 (name "python-pandas")
c0d43f62 1014 (version "0.24.2")
44d10b1f
RW
1015 (source
1016 (origin
1017 (method url-fetch)
1018 (uri (pypi-uri "pandas" version))
1019 (sha256
c0d43f62 1020 (base32 "18imlm8xbhcbwy4wa957a1fkamrcb0z988z006jpfda3ki09z4ag"))))
44d10b1f
RW
1021 (build-system python-build-system)
1022 (arguments
1023 `(#:modules ((guix build utils)
1024 (guix build python-build-system)
1025 (ice-9 ftw)
1026 (srfi srfi-26))
1027 #:phases (modify-phases %standard-phases
c0d43f62
MC
1028 (add-after 'unpack 'patch-which
1029 (lambda* (#:key inputs #:allow-other-keys)
1030 (let ((which (assoc-ref inputs "which")))
1031 (substitute* "pandas/io/clipboard/__init__.py"
1032 (("^CHECK_CMD = .*")
1033 (string-append "CHECK_CMD = \"" which "\"\n"))))
1034 #t))
44d10b1f
RW
1035 (replace 'check
1036 (lambda _
1037 (let ((build-directory
1038 (string-append
1039 (getcwd) "/build/"
1040 (car (scandir "build"
1041 (cut string-prefix? "lib." <>))))))
1042 ;; Disable the "strict data files" option which causes
c0d43f62
MC
1043 ;; the build to error out if required data files are
1044 ;; not available (as is the case with PyPI archives).
44d10b1f
RW
1045 (substitute* "setup.cfg"
1046 (("addopts = --strict-data-files") "addopts = "))
1047 (with-directory-excursion build-directory
c0d43f62
MC
1048 ;; Delete tests that require "moto" which is not yet
1049 ;; in Guix.
44d10b1f
RW
1050 (for-each delete-file
1051 '("pandas/tests/io/conftest.py"
1052 "pandas/tests/io/json/test_compression.py"
1053 "pandas/tests/io/parser/test_network.py"
44d10b1f
RW
1054 "pandas/tests/io/test_parquet.py"))
1055 (invoke "pytest" "-vv" "pandas" "--skip-slow"
1056 "--skip-network" "-k"
1057 ;; XXX: Due to the deleted tests above.
1058 "not test_read_s3_jsonl"))))))))
1059 (propagated-inputs
1060 `(("python-numpy" ,python-numpy)
667c6ef5 1061 ("python-openpyxl" ,python-openpyxl)
44d10b1f 1062 ("python-pytz" ,python-pytz)
667c6ef5
MC
1063 ("python-dateutil" ,python-dateutil)
1064 ("python-xlrd" ,python-xlrd)))
c0d43f62
MC
1065 (inputs
1066 `(("which" ,which)))
44d10b1f
RW
1067 (native-inputs
1068 `(("python-cython" ,python-cython)
1069 ("python-beautifulsoup4" ,python-beautifulsoup4)
1070 ("python-lxml" ,python-lxml)
1071 ("python-html5lib" ,python-html5lib)
1072 ("python-nose" ,python-nose)
c0d43f62
MC
1073 ("python-pytest" ,python-pytest)
1074 ("python-pytest-mock" ,python-pytest-mock)))
44d10b1f
RW
1075 (home-page "https://pandas.pydata.org")
1076 (synopsis "Data structures for data analysis, time series, and statistics")
1077 (description
1078 "Pandas is a Python package providing fast, flexible, and expressive data
1079structures designed to make working with structured (tabular,
1080multidimensional, potentially heterogeneous) and time series data both easy
1081and intuitive. It aims to be the fundamental high-level building block for
1082doing practical, real world data analysis in Python.")
1083 (license license:bsd-3)))
1084
1085(define-public python2-pandas
1086 (package-with-python2 python-pandas))
1087
1088(define-public python2-mechanize
1089 (package
1090 (name "python2-mechanize")
1091 (version "0.2.5")
1092 (source
1093 (origin
1094 (method url-fetch)
1cc184e6 1095 (uri (pypi-uri "mechanize" version))
44d10b1f
RW
1096 (sha256
1097 (base32
1098 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1099 (build-system python-build-system)
1100 (arguments
1101 `(#:python ,python-2 ; apparently incompatible with Python 3
1102 #:tests? #f))
1103 ;; test fails with message
1104 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1105 ;; (python-3.3.2) or
1106 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1107 ;; (python-2.7.5).
1108 ;; The source code is from March 2011 and probably not up-to-date
1109 ;; with respect to python unit tests.
1110 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1111 (synopsis
1112 "Stateful programmatic web browsing in Python")
1113 (description
1114 "Mechanize implements stateful programmatic web browsing in Python,
1115after Andy Lester’s Perl module WWW::Mechanize.")
1116 (license (license:non-copyleft
1117 "file://COPYING"
1118 "See COPYING in the distribution."))))
1119
1120
1121(define-public python-simplejson
1122 (package
1123 (name "python-simplejson")
1124 (version "3.14.0")
1125 (source
1126 (origin
1127 (method url-fetch)
1128 (uri (pypi-uri "simplejson" version))
1129 (sha256
1130 (base32
1131 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1132 (build-system python-build-system)
1133 (home-page "http://simplejson.readthedocs.org/en/latest/")
1134 (synopsis
1135 "Json library for Python")
1136 (description
1137 "JSON (JavaScript Object Notation) is a subset of JavaScript
1138syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1139format.
1140
1141Simplejson exposes an API familiar to users of the standard library marshal
1142and pickle modules. It is the externally maintained version of the json
1143library contained in Python 2.6, but maintains compatibility with Python 2.5
1144and (currently) has significant performance advantages, even without using
1145the optional C extension for speedups. Simplejson is also supported on
1146Python 3.3+.")
1147 (license license:x11)))
1148
1149(define-public python2-simplejson
1150 (package-with-python2 python-simplejson))
1151
1152
1153(define-public python-pyicu
1154 (package
1155 (name "python-pyicu")
1156 (version "2.2")
1157 (source
1158 (origin
1159 (method url-fetch)
1160 (uri (pypi-uri "PyICU" version))
1161 (sha256
1162 (base32
1163 "0wq9y5fi1ighgf5aws9nr87vi1w44p7q1k83rx2y3qj5d2xyhspa"))))
1164 (build-system python-build-system)
1165 (inputs
1166 `(("icu4c" ,icu4c)))
1167 (native-inputs
1168 `(("python-pytest" ,python-pytest)
1169 ("python-six" ,python-six)))
1170 (home-page "https://github.com/ovalhub/pyicu")
1171 (synopsis "Python extension wrapping the ICU C++ API")
1172 (description
1173 "PyICU is a python extension wrapping the ICU C++ API.")
1174 (properties `((python2-variant . ,(delay python2-pyicu))))
1175 (license license:x11)))
1176
1177(define-public python2-pyicu
1178 (let ((base (package-with-python2
1179 (strip-python2-variant python-pyicu))))
1180 (package
1181 (inherit base)
1182 (arguments
1183 `(,@(package-arguments base)
1184 #:phases
1185 (modify-phases %standard-phases
1186 (add-before 'check 'delete-failing-test
1187 (λ _
1188 ;; XXX: This fails due to Unicode issues unique to Python 2,
1189 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1190 (delete-file "test/test_Script.py")
1191 #t))))))))
1192
1193(define-public python2-dogtail
1194 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1195 ;; spaces in indentation" with Python 3.
1196 (package
1197 (name "python2-dogtail")
1198 (version "0.9.9")
1199 (source (origin
1200 (method url-fetch)
1201 (uri (pypi-uri "dogtail" version))
1202 (sha256
1203 (base32
1204 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1205 (build-system python-build-system)
1206 (arguments `(#:python ,python-2
1207 #:tests? #f)) ; invalid command "test"
1208 ;; Currently no offical homepage.
1209 (home-page "https://pypi.python.org/pypi/dogtail/")
1210 (synopsis "GUI test tool and automation framework written in Python")
1211 (description
1212 "Dogtail is a GUI test tool and automation framework written in Python.
1213It uses Accessibility (a11y) technologies to communicate with desktop
1214applications. dogtail scripts are written in Python and executed like any
1215other Python program.")
1216 (license license:gpl2+)))
1217
1218(define-public python-empy
1219 (package
1220 (name "python-empy")
0f6d5115 1221 (version "3.3.3")
44d10b1f
RW
1222 (source (origin
1223 (method url-fetch)
1224 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1225 version ".tar.gz"))
1226 (sha256
1227 (base32
0f6d5115 1228 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
44d10b1f
RW
1229 (build-system python-build-system)
1230 (arguments
0f6d5115 1231 `(#:tests? #f)) ; python2 only
44d10b1f
RW
1232 (home-page "http://www.alcyone.com/software/empy/")
1233 (synopsis "Templating system for Python")
1234 (description
1235 "EmPy is a system for embedding Python expressions and statements in
1236template text; it takes an EmPy source file, processes it, and produces
1237output. This is accomplished via expansions, which are special signals to the
1238EmPy system and are set off by a special prefix (by default the at sign, @@).
1239EmPy can expand arbitrary Python expressions and statements in this way, as
1240well as a variety of special forms. Textual data not explicitly delimited in
1241this way is sent unaffected to the output, allowing Python to be used in
1242effect as a markup language. Also supported are callbacks via hooks,
1243recording and playback via diversions, and dynamic, chainable filters. The
1244system is highly configurable via command line options and embedded
1245commands.")
1246 (license license:lgpl2.1+)))
1247
1248(define-public python2-empy
0f064242
TGR
1249 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
1250 (package
1251 (inherit base)
1252 (arguments `(,@(package-arguments base)
1253 #:tests? #t)))))
44d10b1f
RW
1254
1255(define-public python2-element-tree
1256 (package
1257 (name "python2-element-tree")
1258 (version "1.2.6")
1259 (source (origin
1260 (method url-fetch)
1261 (uri (string-append
1262 "http://effbot.org/media/downloads/elementtree-"
1263 version "-20050316.tar.gz"))
1264 (sha256
1265 (base32
1266 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1267 (build-system python-build-system)
1268 (arguments
1269 `(#:python ,python-2 ; seems to be part of Python 3
1270 #:tests? #f)) ; no 'test' sub-command
1271 (synopsis "Toolkit for XML processing in Python")
1272 (description
1273 "ElementTree is a Python library supporting lightweight XML processing.")
1274 (home-page "http://effbot.org/zone/element-index.htm")
1275 (license (license:x11-style
1276 "http://docs.python.org/2/license.html"
1277 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1278
1279(define-public python2-pybugz
1280 (package
1281 (name "python2-pybugz")
1282 (version "0.6.11")
1283 (source (origin
1284 (method url-fetch)
1285 (uri (string-append
1286 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1287 version ".tar.gz"))
1288 (sha256
1289 (base32
1290 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1291 (patches (search-patches "pybugz-stty.patch"
1292 "pybugz-encode-error.patch"))))
1293 (build-system python-build-system)
1294 (arguments
1295 `(#:python ,python-2 ; SyntaxError with Python 3
1296 #:tests? #f)) ; no 'test' sub-command
1297 (propagated-inputs
1298 `(("element-tree" ,python2-element-tree)))
1299 (synopsis "Python and command-line interface to Bugzilla")
1300 (description
1301 "PyBugz is a Python library and command-line tool to query the Bugzilla
1302bug tracking system. It is meant as an aid to speed up interaction with the
1303bug tracker.")
1304 (home-page "http://www.liquidx.net/pybugz/")
1305 (license license:gpl2)))
1306
1307(define-public python2-enum
1308 (package
1309 (name "python2-enum")
1310 (version "0.4.6")
1311 (source (origin
1312 (method url-fetch)
1313 (uri (pypi-uri "enum" version))
1314 (sha256
1315 (base32
1316 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1317 (build-system python-build-system)
1318 (arguments
1319 `(#:python ,python-2))
1320 (home-page "http://pypi.python.org/pypi/enum/")
1321 (synopsis "Robust enumerated type support in Python")
1322 (description
1323 "This provides a module for robust enumerations in Python. It has
1324been superseded by the Python standard library and is provided only for
1325compatibility.")
1326 ;; Choice of either license.
1327 (license (list license:gpl3+ license:psfl))))
1328
1329(define-public python-enum34
1330 (package
1331 (name "python-enum34")
1332 (version "1.1.6")
1333 (source
1334 (origin
1335 (method url-fetch)
1336 (uri (pypi-uri "enum34" version))
1337 (sha256
1338 (base32
1339 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1340 (build-system python-build-system)
1341 (home-page "https://pypi.python.org/pypi/enum34")
1342 (synopsis "Backported Python 3.4 Enum")
1343 (description
1344 "Enum34 is the new Python stdlib enum module available in Python 3.4
1345backported for previous versions of Python from 2.4 to 3.3.")
1346 (license license:bsd-3)))
1347
1348(define-public python2-enum34
1349 (package-with-python2 python-enum34))
1350
1351(define-public python-parse-type
1352 (package
1353 (name "python-parse-type")
1354 (version "0.4.2")
1355 (source
1356 (origin
1357 (method url-fetch)
1358 (uri (pypi-uri "parse_type" version))
1359 (sha256
1360 (base32
1361 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1362 (build-system python-build-system)
1363 (propagated-inputs
1364 `(("python-six" ,python-six)
1365 ("python-parse" ,python-parse)))
1366 (native-inputs
1367 `(("python-pytest" ,python-pytest)
1368 ("python-pytest-runner" ,python-pytest-runner)))
1369 (home-page "https://github.com/jenisys/parse_type")
1370 (synopsis "Extended parse module")
1371 (description
1372 "Parse_type extends the python parse module.")
1373 (properties
1374 `((python2-variant . ,(delay python2-parse-type))))
1375 (license license:bsd-3)))
1376
1377(define-public python2-parse-type
1378 (let ((base (package-with-python2
1379 (strip-python2-variant python-parse-type))))
1380 (package (inherit base)
1381 (propagated-inputs
1382 `(("python2-enum34" ,python2-enum34)
1383 ,@(package-propagated-inputs base))))))
1384
1385(define-public python-parse
1386 (package
1387 (name "python-parse")
1388 (version "1.8.4")
1389 (source
1390 (origin
1391 (method url-fetch)
1392 (uri (pypi-uri "parse" version))
1393 (sha256
1394 (base32
1395 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
1396 (build-system python-build-system)
1397 (arguments
1398 `(#:phases
1399 (modify-phases %standard-phases
1400 (replace 'check
1401 (lambda _ (invoke "python" "test_parse.py"))))))
1402 (home-page "https://github.com/r1chardj0n3s/parse")
1403 (synopsis "Parse strings")
1404 (description
1405 "Parse strings using a specification based on the Python @code{format()}
1406syntax.")
1407 (license license:x11)))
1408
1409(define-public python-polib
1410 (package
1411 (name "python-polib")
1412 (version "1.0.8")
1413 (source (origin
1414 (method url-fetch)
1415 (uri (pypi-uri "polib" version))
1416 (sha256
1417 (base32
1418 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1419 (build-system python-build-system)
1420 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1421 (synopsis "Manipulate, create and modify gettext files")
1422 (description "Polib can manipulate any gettext format (po, pot and mo)
1423files. It can be used to create po files from scratch or to modify
1424existing ones.")
1425 (license license:expat)))
1426
1427(define-public python2-polib
1428 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1429 (package
1430 (inherit base)
1431 (arguments `(,@(package-arguments base)
1432 ;; Tests don't work with python2.
1433 #:tests? #f)))))
1434
1435(define-public scons
1436 (package
1437 (name "scons")
05487ed8 1438 (version "3.0.4")
44d10b1f 1439 (source (origin
ad34338d
RW
1440 (method git-fetch)
1441 (uri (git-reference
1442 (url "https://github.com/SCons/scons.git")
1443 (commit version)))
1444 (file-name (git-file-name name version))
44d10b1f
RW
1445 (sha256
1446 (base32
05487ed8 1447 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
44d10b1f
RW
1448 (build-system python-build-system)
1449 (arguments
1450 `(#:use-setuptools? #f ; still relies on distutils
ad34338d
RW
1451 #:tests? #f ; no 'python setup.py test' command
1452 #:phases
1453 (modify-phases %standard-phases
1454 (add-before 'build 'bootstrap
1455 (lambda _
1456 (substitute* "src/engine/SCons/compat/__init__.py"
1457 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
1458 "sys.modules[new] = __import__(old)"))
05487ed8
RW
1459 (substitute* "src/engine/SCons/Platform/__init__.py"
1460 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
1461 "mod = __import__(full_name)"))
ad34338d
RW
1462 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
1463 (chdir "build/scons")
1464 #t)))))
44d10b1f
RW
1465 (home-page "http://scons.org/")
1466 (synopsis "Software construction tool written in Python")
1467 (description
1468 "SCons is a software construction tool. Think of SCons as an improved,
1469cross-platform substitute for the classic Make utility with integrated
1470functionality similar to autoconf/automake and compiler caches such as ccache.
1471In short, SCons is an easier, more reliable and faster way to build
1472software.")
1473 (license license:x11)))
1474
1475(define-public scons-python2
1476 (package
1477 (inherit (package-with-python2 scons))
1478 (name "scons-python2")))
1479
1480(define-public python-extras
1481 (package
1482 (name "python-extras")
1483 (version "1.0.0")
1484 (source
1485 (origin
1486 (method url-fetch)
1487 (uri (pypi-uri "extras" version))
1488 (sha256
1489 (base32
1490 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1491 (build-system python-build-system)
1492 (arguments
1493 ;; FIXME: Circular dependency on testtools.
1494 '(#:tests? #f))
1495 (home-page "https://github.com/testing-cabal/extras")
1496 (synopsis "Useful extensions to the Python standard library")
1497 (description
1498 "Extras is a set of extensions to the Python standard library.")
1499 (license license:expat)))
1500
1501(define-public python2-extras
1502 (package-with-python2 python-extras))
1503
1504(define-public python-mimeparse
1505 (package
1506 (name "python-mimeparse")
1507 (version "1.6.0")
1508 (source
1509 (origin
1510 (method url-fetch)
89bf667c 1511 (uri (pypi-uri "python-mimeparse" version))
44d10b1f
RW
1512 (sha256
1513 (base32
1514 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
1515 (build-system python-build-system)
1516 (arguments
1517 '(#:phases
1518 (modify-phases %standard-phases
1519 (replace 'check
1520 (lambda _
1521 (invoke "./mimeparse_test.py"))))))
1522 (home-page
1523 "https://github.com/dbtsai/python-mimeparse")
1524 (synopsis "Python library for parsing MIME types")
1525 (description
1526 "Mimeparse provides basic functions for parsing MIME type names and
1527matching them against a list of media-ranges.")
1528 (license license:expat)))
1529
1530(define-public python2-mimeparse
1531 (package-with-python2 python-mimeparse))
1532
1533(define-public python-miniboa
1534 (package
1535 (name "python-miniboa")
1536 (version "1.0.7")
1537 (source
1538 (origin
1539 (method url-fetch)
1540 (uri (pypi-uri "miniboa" version))
1541 (sha256
1542 (base32
1543 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
1544 (build-system python-build-system)
1545 (home-page "https://github.com/shmup/miniboa")
1546 (synopsis "Simple, single-threaded Telnet server")
1547 (description
1548 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
1549server.")
1550 (license license:asl2.0)))
1551
1552(define-public python2-miniboa
1553 (package-with-python2 python-miniboa))
1554
1555(define-public python-pafy
1556 (package
1557 (name "python-pafy")
1558 (version "0.5.3.1")
1559 (source
1560 (origin
1561 (method url-fetch)
1562 (uri (pypi-uri "pafy" version))
1563 (sha256
1564 (base32
1565 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1566 (build-system python-build-system)
1567 (arguments
1568 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1569 (propagated-inputs
1570 ;; Youtube-dl is a python package which is imported in the file
1571 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1572 `(("youtube-dl" ,youtube-dl)))
1573 (home-page "https://np1.github.io/pafy/")
1574 (synopsis "Retrieve YouTube content and metadata")
1575 (description
1576 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1577 (license license:lgpl3+)))
1578
1579(define-public python2-funcsigs
1580 (package
1581 (name "python2-funcsigs")
1582 (version "1.0.2")
1583 (source (origin
1584 (method url-fetch)
1585 (uri (pypi-uri "funcsigs" version))
1586 (sha256
1587 (base32
1588 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1589 (build-system python-build-system)
1590 (arguments
1591 `(#:python ,python-2))
1592 (native-inputs
1593 `(("python2-unittest2" ,python2-unittest2)))
1594 (home-page "http://funcsigs.readthedocs.org")
1595 (synopsis "Python function signatures from PEP362")
1596 (description
1597 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1598 (license license:asl2.0)))
1599
1600(define-public python2-funcsigs-bootstrap
1601 (package
1602 (inherit python2-funcsigs)
1603 (name "python2-funcsigs-bootstrap")
1604 (native-inputs `())
1605 (arguments
1606 `(#:tests? #f
1607 ,@(package-arguments python2-funcsigs)))))
1608
1609(define-public python-py
1610 (package
1611 (name "python-py")
1612 (version "1.5.4")
1613 (source
1614 (origin
1615 (method url-fetch)
1616 (uri (pypi-uri "py" version))
1617 (sha256
1618 (base32
1619 "1xxvwfn82457djf55f5n2c94699rfqnk43br8fif2r2q8gvrmm9z"))))
1620 (build-system python-build-system)
1621 (arguments
1622 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1623 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1624 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1625 ;; Is this module globally installed?"
1626 '(#:tests? #f))
1627 (native-inputs
1628 `(("python-setuptools-scm" ,python-setuptools-scm)))
1629 (home-page "https://github.com/pytest-dev/py")
1630 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1631 (description
1632 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1633code introspection, and logging.")
1634 (license license:expat)))
1635
1636(define-public python2-py
1637 (package-with-python2 python-py))
1638
1639;; Recent versions of python-fixtures and python-testrepository need
1640;; python-pbr for packaging, which itself needs these two packages for
1641;; testing.
1642;; To fix this circular dependency, we use a build of python-pbr, based on the
1643;; same source, just without any test dependencies and with tests disabled.
1644;; python-pbr-minmal is then used to package python-fixtures and
1645;; python-testrepository.
1646;; Strictly speaking we currently could remove the test-requirements from the
1647;; normal python-pbr package (and save this package) since test are disabled
1648;; there anyway. But this may change in future.
1649(define-public python-pbr-minimal
1650 (package
1651 (name "python-pbr-minimal")
1652 (version "3.0.1")
1653 (source
1654 (origin
1655 (method url-fetch)
1656 (uri (pypi-uri "pbr" version))
1657 (sha256
1658 (base32
1659 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1660 (build-system python-build-system)
1661 (arguments
1662 `(#:tests? #f))
1663 (home-page "http://docs.openstack.org/developer/pbr/")
1664 (synopsis "Minimal build of python-pbr used for bootstrapping")
1665 (description
1666 "Used only for bootstrapping python2-pbr, you should not need this.")
1667 (license license:asl2.0)))
1668
1669(define-public python2-pbr-minimal
1670 (package-with-python2 python-pbr-minimal))
1671
1672(define-public python-pbr
1673 (package
1674 (inherit python-pbr-minimal)
1675 (name "python-pbr")
1676 (arguments
1677 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1678 (propagated-inputs
1679 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1680 (native-inputs
1681 `(("python-fixtures" ,python-fixtures-bootstrap)
1682 ;; discover, coverage, hacking, subunit
1683 ("python-mock" ,python-mock)
1684 ("python-six" ,python-six)
1685 ("python-sphinx" ,python-sphinx)
1686 ("python-testrepository" ,python-testrepository-bootstrap)
1687 ("python-testresources" ,python-testresources-bootstrap)
1688 ("python-testscenarios" ,python-testscenarios-bootstrap)
1689 ("python-testtools" ,python-testtools-bootstrap)
1690 ("python-virtualenv" ,python-virtualenv)))
1691 (synopsis "Enhance the default behavior of Python’s setuptools")
1692 (description
1693 "Python Build Reasonableness (PBR) is a library that injects some useful
1694and sensible default behaviors into your setuptools run. It will set
1695versions, process requirements files and generate AUTHORS and ChangeLog file
1696from git information.
1697")))
1698
1699(define-public python2-pbr
1700 (package-with-python2 python-pbr))
1701
1702(define-public python-exif-read
1703 (package
1704 (name "python-exif-read")
1705 (version "2.1.2")
1706 (source (origin
1707 (method url-fetch)
1708 (uri (pypi-uri "ExifRead" version))
1709 (sha256
1710 (base32
1711 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
1712 (build-system python-build-system)
1713 (arguments `(#:tests? #f)) ; no tests
1714 (home-page "https://github.com/ianare/exif-py")
1715 (synopsis "Python library to extract EXIF data from image files")
1716 (description
1717 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1718files.")
1719 (license license:bsd-3)))
1720
1721(define-public python2-exif-read
1722 (package-with-python2 python-exif-read))
1723
1724(define-public python-pyld
1725 (package
1726 (name "python-pyld")
1727 (version "1.0.3")
1728 (source (origin
1729 (method url-fetch)
1730 (uri (pypi-uri "PyLD" version))
1731 (sha256
1732 (base32
1733 "12i2g6xdj30k7xxcibg3sc5y76snwq8l6n8fy9lyi577kgy0h2pm"))))
1734 (build-system python-build-system)
1735 (home-page "https://github.com/digitalbazaar/pyld")
1736 (synopsis "Python implementation of the JSON-LD specification")
1737 (description
1738 "PyLD is an implementation of the JSON-LD specification.")
1739 (license license:bsd-3)))
1740
1741(define-public python2-pyld
1742 (package-with-python2 python-pyld))
1743
1744(define-public python-click
1745 (package
1746 (name "python-click")
61984855 1747 (version "7.0")
44d10b1f
RW
1748 (source
1749 (origin
1750 (method url-fetch)
1751 (uri (pypi-uri "click" version))
1752 (sha256
1753 (base32
61984855 1754 "1mzjixd4vjbjvzb6vylki9w1556a9qmdh35kzmq6cign46av952v"))))
44d10b1f
RW
1755 (build-system python-build-system)
1756 (arguments
8d7e7ca6 1757 `(#:phases
44d10b1f
RW
1758 (modify-phases %standard-phases
1759 (add-after 'unpack 'fix-paths
1760 (lambda* (#:key inputs #:allow-other-keys)
1761 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
1762 "cross-libc" "libc"))))
1763 (substitute* "click/_unicodefun.py"
1764 (("'locale'")
1765 (string-append "'" glibc "/bin/locale'"))))
8d7e7ca6
EF
1766 #t))
1767 (replace 'check
1768 (lambda _
1769 (invoke "python" "-m" "pytest"))))))
44d10b1f
RW
1770 (native-inputs
1771 `(("python-pytest" ,python-pytest)))
61984855 1772 (home-page "https://palletsprojects.com/p/click/")
44d10b1f
RW
1773 (synopsis "Command line library for Python")
1774 (description
1775 "Click is a Python package for creating command line interfaces in a
1776composable way with as little code as necessary. Its name stands for
1777\"Command Line Interface Creation Kit\". It's highly configurable but comes
1778with sensible defaults out of the box.")
1779 (license license:bsd-3)))
1780
1781(define-public python2-click
1782 (package-with-python2 python-click))
1783
1784(define-public python-wheel
1785 (package
1786 (name "python-wheel")
746c074b 1787 (version "0.32.3")
44d10b1f
RW
1788 (source
1789 (origin
1790 (method url-fetch)
1791 (uri (pypi-uri "wheel" version))
1792 (sha256
1793 (base32
746c074b 1794 "1dhxl1bf18bx9szmqcnxbg6204hp3im8089q3hkwh5jfa6zh75q2"))))
44d10b1f
RW
1795 (build-system python-build-system)
1796 (native-inputs
1797 `(("python-jsonschema" ,python-jsonschema)
1798 ("python-pytest-cov" ,python-pytest-cov)))
1799 (home-page "https://bitbucket.org/pypa/wheel/")
1800 (synopsis "Format for built Python packages")
1801 (description
1802 "A wheel is a ZIP-format archive with a specially formatted filename and
1803the @code{.whl} extension. It is designed to contain all the files for a PEP
1804376 compatible install in a way that is very close to the on-disk format. Many
1805packages will be properly installed with only the @code{Unpack} step and the
1806unpacked archive preserves enough information to @code{Spread} (copy data and
1807scripts to their final locations) at any later time. Wheel files can be
1808installed with a newer @code{pip} or with wheel's own command line utility.")
1809 (license license:expat)
1810 (properties `((python2-variant . ,(delay python2-wheel))))))
1811
1812(define-public python2-wheel
1813 (let ((wheel (package-with-python2
1814 (strip-python2-variant python-wheel))))
1815 (package (inherit wheel)
1816 (native-inputs `(("python2-functools32" ,python2-functools32)
1817 ,@(package-native-inputs wheel))))))
1818
1819(define-public python-vcversioner
1820 (package
1821 (name "python-vcversioner")
1822 (version "2.16.0.0")
1823 (source
1824 (origin
1825 (method url-fetch)
1826 (uri (pypi-uri "vcversioner" version))
1827 (sha256
1828 (base32
1829 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
1830 (build-system python-build-system)
1831 (synopsis "Python library for version number discovery")
1832 (description "Vcversioner is a Python library that inspects tagging
1833information in a variety of version control systems in order to discover
1834version numbers.")
1835 (home-page "https://github.com/habnabit/vcversioner")
1836 (license license:isc)))
1837
1838(define-public python2-vcversioner
1839 (package-with-python2 python-vcversioner))
1840
5591fc4f
MC
1841(define-public python-jdcal
1842 (package
1843 (name "python-jdcal")
1844 (version "1.4")
1845 (source
1846 (origin
1847 (method url-fetch)
1848 (uri (pypi-uri "jdcal" version))
1849 (sha256
1850 (base32
1851 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
1852 (build-system python-build-system)
1853 (arguments
1854 `(#:phases (modify-phases %standard-phases
1855 (replace 'check
1856 (lambda _
1857 (invoke "pytest"))))))
1858 (native-inputs
1859 `(("python-pytest" ,python-pytest)))
1860 (home-page "https://github.com/phn/jdcal")
1861 (synopsis "Functions to convert between Julian dates Gregorian dates")
1862 (description "This Python library provides functions for converting
1863between Julian dates and Gregorian dates.")
1864 (license license:bsd-2)))
1865
1866(define-public python2-jdcal
1867 (package-with-python2 python-jdcal))
1868
44d10b1f
RW
1869(define-public python-jsonschema
1870 (package
1871 (name "python-jsonschema")
1872 (version "2.6.0")
1873 (source (origin
1874 (method url-fetch)
786ccb87 1875 (uri (pypi-uri "jsonschema" version))
44d10b1f
RW
1876 (sha256
1877 (base32
1878 "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg"))))
1879 (build-system python-build-system)
1880 (arguments
1881 '(#:phases
1882 (modify-phases %standard-phases
8d466799 1883 (replace 'check (lambda _ (invoke "nosetests"))))))
44d10b1f
RW
1884 (native-inputs
1885 `(("python-nose" ,python-nose)
1886 ("python-vcversioner" ,python-vcversioner)))
1887 (home-page "https://github.com/Julian/jsonschema")
1888 (synopsis "Implementation of JSON Schema for Python")
1889 (description
1890 "Jsonschema is an implementation of JSON Schema for Python.")
1891 (license license:expat)
1892 (properties `((python2-variant . ,(delay python2-jsonschema))))))
1893
1894(define-public python2-jsonschema
1895 (let ((jsonschema (package-with-python2
1896 (strip-python2-variant python-jsonschema))))
1897 (package (inherit jsonschema)
1898 (native-inputs
1899 `(("python2-mock" ,python2-mock)
1900 ,@(package-native-inputs jsonschema)))
1901 (propagated-inputs
1902 `(("python2-functools32" ,python2-functools32))))))
1903
1904(define-public python-schema
1905 (package
1906 (name "python-schema")
1907 (version "0.6.6")
1908 (source
1909 (origin
1910 (method url-fetch)
1911 (uri (pypi-uri "schema" version))
1912 (sha256
1913 (base32
1914 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
1915 (build-system python-build-system)
1916 (native-inputs
1917 `(("python-pytest" ,python-pytest)))
1918 (home-page "https://github.com/keleshev/schema")
1919 (synopsis "Simple data validation library")
1920 (description
1921 "@code{python-schema} is a library for validating Python data
1922structures, such as those obtained from config-files, forms, external
1923services or command-line parsing, converted from JSON/YAML (or
1924something else) to Python data-types.")
1925 (license license:psfl)))
1926
1927(define-public python2-schema
1928 (package-with-python2 python-schema))
1929
1930(define-public python-schema-0.5
1931 (package (inherit python-schema)
1932 (version "0.5.0")
1933 (source
1934 (origin
1935 (method url-fetch)
1936 (uri (pypi-uri "schema" version))
1937 (sha256
1938 (base32
1939 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
1940
1941(define-public python2-schema-0.5
1942 (package-with-python2 python-schema-0.5))
1943
1944(define-public python-kitchen
1945 (package
1946 (name "python-kitchen")
1947 (version "1.2.5")
1948 (source
1949 (origin
1950 (method url-fetch)
1951 (uri (pypi-uri "kitchen" version))
1952 (sha256
1953 (base32
1954 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
1955 (build-system python-build-system)
1956 (propagated-inputs
1957 `(("python-chardet" ,python-chardet)))
1958 (home-page "https://github.com/fedora-infra/kitchen")
1959 (synopsis "Python API for snippets")
1960 (description "@code{kitchen} module provides a python API for all sorts of
1961little useful snippets of code that everybody ends up writing for their projects
1962but never seem big enough to build an independent release. Use kitchen and stop
1963cutting and pasting that code over and over.")
1964 (license (list license:lgpl2.1+
1965 ;; subprocess.py, test_subprocess.py,
1966 ;; kitchen/pycompat25/defaultdict.py:
1967 license:psfl))))
1968
1969(define-public python2-kitchen
1970 (package-with-python2 python-kitchen))
1971
1972(define-public python-unidecode
1973 (package
1974 (name "python-unidecode")
1975 (version "1.0.23")
1976 (source (origin
1977 (method url-fetch)
1978 (uri (pypi-uri "Unidecode" version))
1979 (sha256
1980 (base32
1981 "1ysjbr3nqfqj97h8zyj3v9pya413vkv7a1mzml80w37xx15kb1cb"))))
1982 (build-system python-build-system)
1983 (home-page "https://pypi.python.org/pypi/Unidecode")
1984 (synopsis "ASCII transliterations of Unicode text")
1985 (description
1986 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
1987useful when integrating with legacy code that doesn't support Unicode, or for
1988ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
1989machine identifiers from human-readable Unicode strings that should still be
1990somewhat intelligible.")
1991 (license license:gpl2+)))
1992
1993(define-public python2-unidecode
1994 (package-with-python2 python-unidecode))
1995
1996(define-public python-pyjwt
1997 (package
1998 (name "python-pyjwt")
1999 (version "1.5.3")
2000 (source
2001 (origin
2002 (method url-fetch)
2003 (uri (pypi-uri "PyJWT" version))
2004 (sha256
2005 (base32
2006 "1rxsg14i33vm2i6lz0my628108c81k43v10n4h3p0gx62xdyf2sh"))
2007 (modules '((guix build utils)))
2008 (snippet
2009 '(begin
2010 (for-each delete-file-recursively
2011 (find-files "." "\\.pyc$"))
2012 #t))))
2013 (build-system python-build-system)
2014 (native-inputs
2015 `(("python-pytest" ,python-pytest)
2016 ("python-pytest-cov" ,python-pytest-cov)
2017 ("python-pytest-runner" ,python-pytest-runner)))
2018 (home-page "https://github.com/progrium/pyjwt")
2019 (synopsis "JSON Web Token implementation in Python")
2020 (description
2021 "PyJWT is a JSON Web Token implementation written in Python.")
2022 (license license:expat)))
2023
2024(define-public python2-pyjwt
2025 (package-with-python2 python-pyjwt))
2026
2027(define-public python-pykka
2028 (package
2029 (name "python-pykka")
2030 (version "1.2.1")
2031 (source
2032 (origin
2033 (method url-fetch)
2034 (uri (pypi-uri "Pykka" version))
2035 (sha256
2036 (base32
2037 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2038 (build-system python-build-system)
2039 (native-inputs
2040 `(("python-mock" ,python-mock)
2041 ("python-nose" ,python-nose)
2042 ("python-gevent" ,python-gevent)
2043 ("python-eventlet" ,python-eventlet)))
2044 (home-page "https://www.pykka.org/")
2045 (synopsis "Pykka is a Python implementation of the actor model")
2046 (description
2047 "Pykka is a Python implementation of the actor model.
2048The actor model introduces some simple rules to control the sharing
2049of state and cooperation between execution units, which makes it
2050easier to build concurrent applications.")
2051 (license license:asl2.0)))
2052
2053(define-public python2-pykka
2054 (package-with-python2 python-pykka))
2055
8d22f7e3
VC
2056(define-public python-pymsgbox
2057 (package
2058 (name "python-pymsgbox")
2059 (version "1.0.6")
2060 (source
2061 (origin
2062 (method git-fetch)
2063 (uri (git-reference
2064 ;; LICENSE.txt is not present on pypi
2065 (url "https://github.com/asweigart/PyMsgBox")
2066 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
2067 (file-name (git-file-name name version))
2068 (sha256
2069 (base32
2070 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
2071 (arguments
2072 ;; Circular dependency to run tests:
2073 ;; Tests need pyautogui, which depends on pymsgbox.
2074 '(#:tests? #f))
2075 (build-system python-build-system)
2076 (home-page "https://github.com/asweigart/PyMsgBox")
2077 (synopsis "Python module for JavaScript-like message boxes")
2078 (description
2079 "PyMsgBox is a simple, cross-platform, pure Python module for
2080JavaScript-like message boxes. Types of dialog boxes include:
2081@enumerate
2082@item alert
2083@item confirm
2084@item prompt
2085@item password
2086@end enumerate
2087")
2088 (license license:bsd-3)))
2089
44d10b1f
RW
2090(define-public python-pympler
2091 (package
2092 (name "python-pympler")
2093 (home-page "https://pythonhosted.org/Pympler/")
2094 (version "0.5")
2095 (source (origin
2096 (method url-fetch)
2097 (uri (pypi-uri "Pympler" version))
2098 (sha256
2099 (base32
2100 "03qwsbilqgvnbl3a1jmpgixbr2kq6m3fvdlzyr3wdp01bwlc85kx"))))
2101 (build-system python-build-system)
2102 (arguments
2103 `(#:phases (modify-phases %standard-phases
2104 (delete 'check)
2105 (add-after 'install 'check
2106 (lambda* (#:key inputs outputs #:allow-other-keys)
2107 (add-installed-pythonpath inputs outputs)
2108 (invoke "python" "setup.py" "test"))))))
2109 (synopsis "Measure, monitor and analyze memory behavior")
2110 (description
2111 "Pympler is a development tool to measure, monitor and analyze
2112the memory behavior of Python objects in a running Python application.
2113
2114By pympling a Python application, detailed insight in the size and the
2115lifetime of Python objects can be obtained. Undesirable or unexpected
2116runtime behavior like memory bloat and other @samp{pymples} can easily
2117be identified.
2118
2119A web profiling frontend exposes process statistics, garbage
2120visualisation and class tracker statistics.")
2121 (license license:asl2.0)))
2122
2123(define-public python2-pympler
2124 (package-with-python2 python-pympler))
2125
2126(define-public python-itsdangerous
2127 (package
2128 (name "python-itsdangerous")
acfcf2ed 2129 (version "1.1.0")
44d10b1f
RW
2130 (source
2131 (origin
2132 (method url-fetch)
acfcf2ed 2133 (uri (pypi-uri "itsdangerous" version))
44d10b1f
RW
2134 (sha256
2135 (base32
acfcf2ed 2136 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
44d10b1f 2137 (build-system python-build-system)
acfcf2ed 2138 (home-page "https://palletsprojects.com/p/itsdangerous/")
44d10b1f
RW
2139 (synopsis "Python library for passing data to/from untrusted environments")
2140 (description
2141 "Itsdangerous provides various helpers to pass trusted data to untrusted
2142environments and back.")
2143 (license license:bsd-3)))
2144
2145(define-public python2-itsdangerous
2146 (package-with-python2 python-itsdangerous))
2147
2148(define-public python-pyyaml
2149 (package
2150 (name "python-pyyaml")
2151 (version "3.13")
2152 (source
2153 (origin
2154 (method url-fetch)
2155 (uri (pypi-uri "PyYAML" version))
2156 (sha256
2157 (base32
2158 "1gx603g484z46cb74j9rzr6sjlh2vndxayicvlyhxdz98lhhkwry"))))
2159 (build-system python-build-system)
2160 (inputs
2161 `(("libyaml" ,libyaml)))
2162 (home-page "http://pyyaml.org/wiki/PyYAML")
2163 (synopsis "YAML parser and emitter for Python")
2164 (description
2165 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2166complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2167API, and sensible error messages. PyYAML supports standard YAML tags and
2168provides Python-specific tags that allow to represent an arbitrary Python
2169object.")
2170 (license license:expat)))
2171
2172(define-public python2-pyyaml
2173 (package-with-python2 python-pyyaml))
2174
2175(define-public python-vine
2176 (package
2177 (name "python-vine")
2178 (version "1.1.4")
2179 (source
2180 (origin
2181 (method url-fetch)
2182 (uri (pypi-uri "vine" version))
2183 (sha256
2184 (base32
2185 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
2186 (build-system python-build-system)
2187 (native-inputs
2188 `(("python-pytest" ,python-pytest)
2189 ("python-case" ,python-case)))
2190 (home-page "https://github.com/celery/vine")
2191 (synopsis "Promises for Python")
2192 (description
2193 "@code{vine} provides a special implementation of promises in that it can
2194be used both for \"promise of a value\" and lazy evaluation. The biggest
2195upside for this is that everything in a promise can also be a promise,
2196e.g. filters, callbacks and errbacks can all be promises.")
2197 (license license:bsd-3)))
2198
2199(define-public python-virtualenv
2200 (package
2201 (name "python-virtualenv")
2782bd51 2202 (version "16.1.0")
44d10b1f
RW
2203 (source
2204 (origin
2205 (method url-fetch)
2206 (uri (pypi-uri "virtualenv" version))
2207 (sha256
2208 (base32
2782bd51 2209 "0242cg3hdq3qdvx5flyrki8lpwlgwf5k45c21ks5049fv7ygm6gq"))))
44d10b1f
RW
2210 (build-system python-build-system)
2211 (arguments
2212 `(#:phases
2213 (modify-phases %standard-phases
2782bd51 2214 (add-before 'check 'disable-failing-test
44d10b1f
RW
2215 (lambda _
2216 ;; Disable failing test. See upstream bug report
2217 ;; https://github.com/pypa/virtualenv/issues/957
2218 (substitute* "tests/test_virtualenv.py"
2219 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2782bd51 2220 #t)))))
44d10b1f
RW
2221 (native-inputs
2222 `(("python-mock" ,python-mock)
2223 ("python-pytest" ,python-pytest)))
2224 (home-page "https://virtualenv.pypa.io/")
2225 (synopsis "Virtual Python environment builder")
2226 (description
2227 "Virtualenv is a tool to create isolated Python environments.")
2228 (license license:expat)))
2229
2230(define-public python2-virtualenv
2231 (package-with-python2 python-virtualenv))
2232
2233(define-public python-markupsafe
2234 (package
2235 (name "python-markupsafe")
2236 (version "1.0")
2237 (source
2238 (origin
2239 (method url-fetch)
5182927c 2240 (uri (pypi-uri "MarkupSafe" version))
44d10b1f
RW
2241 (sha256
2242 (base32
2243 "0rdn1s8x9ni7ss8rfiacj7x1085lx8mh2zdwqslnw8xc3l4nkgm6"))))
2244 (build-system python-build-system)
2245 (home-page "https://github.com/mitsuhiko/markupsafe")
2246 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2247 (description
2248 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2249for Python.")
2250 (license license:bsd-3)))
2251
2252(define-public python2-markupsafe
2253 (package-with-python2 python-markupsafe))
2254
2255(define-public python-jinja2
2256 (package
2257 (name "python-jinja2")
2258 (version "2.10")
2259 (source
2260 (origin
2261 (method url-fetch)
2262 (uri (pypi-uri "Jinja2" version))
2263 (sha256
2264 (base32
2265 "190l36hfw3wb2n3n68yacjabxyb1pnxwn7vjx96cmjj002xy2jzq"))))
2266 (build-system python-build-system)
2267 (propagated-inputs
2268 `(("python-markupsafe" ,python-markupsafe)))
2269 (home-page "http://jinja.pocoo.org/")
2270 (synopsis "Python template engine")
2271 (description
2272 "Jinja2 is a small but fast and easy to use stand-alone template engine
2273written in pure Python.")
2274 (license license:bsd-3)))
2275
2276(define-public python2-jinja2
2277 (package-with-python2 python-jinja2))
2278
2279(define-public python-pystache
2280 (package
2281 (name "python-pystache")
2282 (version "0.5.4")
2283 (source (origin
2284 (method url-fetch)
2285 (uri (pypi-uri "pystache" version))
2286 (sha256
2287 (base32
2288 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2289 (build-system python-build-system)
2290 (arguments
2291 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2292 (home-page "http://defunkt.io/pystache/")
2293 (synopsis "Python logic-less template engine")
2294 (description
2295 "Pystache is a Python implementation of the framework agnostic,
2296logic-free templating system Mustache.")
2297 (license license:expat)
2298 (properties `((python2-variant . ,(delay python2-pystache))))))
2299
2300(define-public python2-pystache
2301 (package (inherit (package-with-python2
2302 (strip-python2-variant python-pystache)))
2303 (arguments
2304 `(#:python ,python-2
2305 #:phases
2306 (modify-phases %standard-phases
2307 (replace 'check
2308 (lambda _
dfafc29b 2309 (invoke "python" "test_pystache.py"))))))))
44d10b1f
RW
2310
2311(define-public python-joblib
2312 (package
2313 (name "python-joblib")
2314 (version "0.13.0")
2315 (source (origin
2316 (method url-fetch)
2317 (uri (pypi-uri "joblib" version))
2318 (sha256
2319 (base32
2320 "0612nazad8dxmn3xghfrmjax6456l4xy6hn9cngs7vydi14ds7v5"))))
2321 (build-system python-build-system)
2322 (arguments
2323 `(#:phases
2324 (modify-phases %standard-phases
2325 (replace 'check
2326 (lambda _ (invoke "pytest" "-v" "joblib"))))))
2327 (native-inputs
2328 `(("python-pytest" ,python-pytest)))
2329 (home-page "https://joblib.readthedocs.io/")
2330 (synopsis "Using Python functions as pipeline jobs")
2331 (description
2332 "Joblib is a set of tools to provide lightweight pipelining in Python.
2333In particular, joblib offers: transparent disk-caching of the output values
2334and lazy re-evaluation (memoize pattern), easy simple parallel computing
2335logging and tracing of the execution.")
2336 (license license:bsd-3)))
2337
2338(define-public python2-joblib
2339 (package-with-python2 python-joblib))
2340
a3363341
VC
2341(define-public python-daemon
2342 (package
2343 (name "python-daemon")
2344 (version "2.2.3")
2345 (source
2346 (origin
2347 (method url-fetch)
2348 (uri (pypi-uri "python-daemon" version))
2349 (sha256
2350 (base32
2351 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
2352 (build-system python-build-system)
2353 (arguments
2354 `(#:phases
2355 (modify-phases %standard-phases
2356 (add-before 'check 'disable-tests
2357 (lambda _
2358 ;; FIXME: Determine why test fails
2359 (substitute* "test/test_daemon.py"
2360 (("test_detaches_process_context")
2361 "skip_test_detaches_process_context"))
2362 #t)))))
2363 (propagated-inputs
2364 `(("python-lockfile" ,python-lockfile)))
2365 (native-inputs
2366 `(("python-unittest2" ,python-unittest2)
2367 ("python-testtools" ,python-testtools)
2368 ("python-testscenarios" ,python-testscenarios)
2369 ("python-mock" ,python-mock)
2370 ("python-docutils" ,python-docutils)))
2371 (home-page "https://pagure.io/python-daemon/")
2372 (synopsis "Python library for making a Unix daemon process")
2373 (description "Python-daemon is a library that assists a Python program to
2374turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
2375
2376This library provides a @code{DaemonContext} class that manages the following
2377important tasks for becoming a daemon process:
2378@enumerate
2379@item Detach the process into its own process group.
2380@item Set process environment appropriate for running inside a chroot.
2381@item Renounce suid and sgid privileges.
2382@item Close all open file descriptors.
2383@item Change the working directory, uid, gid, and umask.
2384@item Set appropriate signal handlers.
2385@item Open new file descriptors for stdin, stdout, and stderr.
2386@item Manage a specified PID lock file.
2387@item Register cleanup functions for at-exit processing.
2388@end enumerate")
2389 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
2390 (license (list license:asl2.0 license:gpl3+))))
2391
44d10b1f
RW
2392(define-public python-docutils
2393 (package
2394 (name "python-docutils")
2395 (version "0.14")
2396 (source
2397 (origin
2398 (method url-fetch)
2399 (uri (pypi-uri "docutils" version))
2400 (sha256
2401 (base32
2402 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2403 (build-system python-build-system)
2404 (arguments
2405 '(#:tests? #f)) ; no setup.py test command
2406 (home-page "http://docutils.sourceforge.net/")
2407 (synopsis "Python Documentation Utilities")
2408 (description
2409 "Docutils is a modular system for processing documentation into useful
2410formats, such as HTML, XML, and LaTeX. For input Docutils supports
2411reStructuredText.")
2412 ;; Most of the source code is public domain, but some source files are
2413 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2414 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2415
2416(define-public python2-docutils
2417 (package-with-python2 python-docutils))
2418
2419(define-public python-pygments
2420 (package
2421 (name "python-pygments")
2422 (version "2.2.0")
2423 (source
2424 (origin
2425 (method url-fetch)
2426 (uri (pypi-uri "Pygments" version))
2427 (sha256
2428 (base32
2429 "1k78qdvir1yb1c634nkv6rbga8wv4289xarghmsbbvzhvr311bnv"))))
2430 (build-system python-build-system)
2431 (arguments
2432 ;; FIXME: Tests require sphinx, which depends on this.
2433 '(#:tests? #f))
2434 (home-page "http://pygments.org/")
2435 (synopsis "Syntax highlighting")
2436 (description
2437 "Pygments is a syntax highlighting package written in Python.")
2438 (license license:bsd-2)))
2439
2440(define-public python2-pygments
2441 (package-with-python2 python-pygments))
2442
2443(define-public python-sphinxcontrib-websupport
2444 (package
2445 (name "python-sphinxcontrib-websupport")
2446 (version "1.1.0")
2447 (source (origin
2448 (method url-fetch)
2449 (uri (pypi-uri "sphinxcontrib-websupport" version))
2450 (sha256
2451 (base32
2452 "1ff3ix76xi1y6m99qxhaq5161ix9swwzydilvdya07mgbcvpzr4x"))))
2453 (build-system python-build-system)
2454 (arguments
2455 ;; FIXME: Tests depend on Sphinx, which depends on this.
2456 `(#:tests? #f))
2457 (home-page "http://sphinx-doc.org/")
2458 (synopsis "Sphinx API for web applications")
2459 (description "This package provides a Python API to easily integrate
2460Sphinx documentation into your web application. It provides tools to
2461integrate Sphinx documents in web templates and to handle searches.")
2462 (license license:bsd-3)))
2463
2464(define-public python2-sphinxcontrib-websupport
2465 (package-with-python2 python-sphinxcontrib-websupport))
2466
2467(define-public python-sphinx
2468 (package
2469 (name "python-sphinx")
2470 (version "1.7.7")
2471 (source
2472 (origin
2473 (method url-fetch)
2474 (uri (pypi-uri "Sphinx" version))
2475 (sha256
2476 (base32
2477 "0pkkbfj7cl157q550gcs45am5y78ps0h7q6455d64s1zmw01jlvi"))))
2478 (build-system python-build-system)
2479 (arguments
2480 `(#:phases
2481 (modify-phases %standard-phases
2482 (replace 'check
2483 (lambda _
2484 ;; Requires Internet access.
2485 (delete-file "tests/test_build_linkcheck.py")
2486 (substitute* "tests/test_build_latex.py"
2487 (("@pytest.mark.sphinx\\('latex', testroot='images'\\)")
2488 "@pytest.mark.skip()"))
2489 (when (which "python")
2490 ;; XXX: These tests are broken when using Python2:
2491 ;; <https://github.com/sphinx-doc/sphinx/issues/4710>.
2492 (delete-file "tests/test_api_translator.py")
2493 (delete-file "tests/test_setup_command.py"))
2494 (invoke "make" "test"))))))
2495 (propagated-inputs
2496 `(("python-imagesize" ,python-imagesize)
2497 ("python-sphinx-alabaster-theme"
2498 ,python-sphinx-alabaster-theme)
2499 ("python-babel" ,python-babel)
2500 ("python-snowballstemmer" ,python-snowballstemmer)
2501 ("python-docutils" ,python-docutils)
2502 ("python-jinja2" ,python-jinja2)
2503 ("python-packaging" ,python-packaging)
2504 ("python-pygments" ,python-pygments)
2505 ("python-requests" ,python-requests)
2506 ("python-six" ,python-six)
2507 ("python-sphinxcontrib-websupport" ,python-sphinxcontrib-websupport)))
2508 (native-inputs
2509 `(("graphviz" ,graphviz)
2510 ("imagemagick" ,imagemagick) ;for "convert"
2511 ("python-html5lib" ,python-html5lib)
2512 ("python-mock" ,python-mock)
2513 ("python-nose" ,python-nose)
2514 ("python-pytest" ,python-pytest)))
2515 (home-page "http://sphinx-doc.org/")
2516 (synopsis "Python documentation generator")
2517 (description "Sphinx is a tool that makes it easy to create documentation
2518for Python projects or other documents consisting of multiple reStructuredText
2519sources.")
2520 (license license:bsd-3)
2521 (properties `((python2-variant . ,(delay python2-sphinx))))))
2522
2523(define-public python2-sphinx
2524 (let ((base (package-with-python2 (strip-python2-variant python-sphinx))))
2525 (package
2526 (inherit base)
2527 (native-inputs `(("python2-mock" ,python2-mock)
2528 ("python2-enum34" ,python2-enum34)
2529 ,@(package-native-inputs base)))
2530 (propagated-inputs `(("python2-pytz" ,python2-pytz)
2531 ("python2-typing" ,python2-typing)
2532 ,@(package-propagated-inputs base))))))
2533
2534(define-public python-sphinx-gallery
2535 (package
2536 (name "python-sphinx-gallery")
2537 (version "0.1.13")
2538 (source (origin
2539 (method url-fetch)
2540 (uri (string-append "https://github.com/sphinx-gallery/sphinx-gallery"
2541 "/archive/v" version ".tar.gz"))
2542 (file-name (string-append name "-" version ".tar.gz"))
2543 (sha256
2544 (base32
2545 "03fs99mcb1r7qp0xixqv07vcz98sk21yq19ffdysi0infdcpzfkd"))))
2546 (build-system python-build-system)
2547 (arguments
2548 ;; FIXME: Tests attempt to download <https://docs.python.org/3/objects.inv>,
2549 ;; <https://docs.scipy.org/doc/numpy/objects.inv>, and
2550 ;; <https://matplotlib.org/objects.inv>.
2551 `(#:tests? #f))
2552 (native-inputs
2553 `(("python-pytest-runner" ,python-pytest-runner)))
2554 (home-page "https://sphinx-gallery.github.io/")
2555 (synopsis "Generate an examples gallery automatically")
2556 (description
2557 "@code{sphinx_gallery} is a Sphinx extension that builds an HTML version
2558from any set of Python scripts and puts it into an examples gallery.")
2559 (license license:bsd-3)))
2560
2561(define-public python2-sphinx-gallery
2562 (package-with-python2 python-sphinx-gallery))
2563
2564(define-public python-sphinx-rtd-theme
2565 (package
2566 (name "python-sphinx-rtd-theme")
2567 (version "0.2.4")
2568 (source
2569 (origin
2570 (method url-fetch)
2571 (uri (pypi-uri "sphinx_rtd_theme" version))
2572 (sha256
2573 (base32
2574 "05rlhjzdyapr2w74jjs7mrm8hi69qskcr5vya9f9drpsys7lpxrd"))))
2575 (build-system python-build-system)
2576 (arguments '(#:tests? #f)) ; No tests.
2577 (propagated-inputs
2578 `(("python-sphinx" ,python-sphinx)))
2579 (home-page "https://github.com/snide/sphinx_rtd_theme/")
2580 (synopsis "ReadTheDocs.org theme for Sphinx")
2581 (description "A theme for Sphinx used by ReadTheDocs.org.")
2582 (license license:expat)))
2583
2584(define-public python2-sphinx-rtd-theme
2585 (package-with-python2 python-sphinx-rtd-theme))
2586
2587(define-public python-guzzle-sphinx-theme
2588 (package
2589 (name "python-guzzle-sphinx-theme")
2590 (version "0.7.11")
2591 (source
2592 (origin
2593 (method url-fetch)
2594 (uri (pypi-uri "guzzle_sphinx_theme" version))
2595 (sha256
2596 (base32
2597 "1rnkzrrsbnifn3vsb4pfaia3nlvgvw6ndpxp7lzjrh23qcwid34v"))))
2598 (build-system python-build-system)
2599 (propagated-inputs
2600 `(("python-sphinx" ,python-sphinx)))
2601 (home-page "https://github.com/guzzle/guzzle_sphinx_theme")
2602 (synopsis "Sphinx theme used by Guzzle")
2603 (description "This package provides guzzle_sphinx_theme, a theme for the
2604Sphinx documentation system, used by @uref{http://docs.guzzlephp.org, Guzzle}
2605and several other projects.")
2606 (license license:expat)))
2607
2608(define-public python2-guzzle-sphinx-theme
2609 (package-with-python2 python-guzzle-sphinx-theme))
2610
2611(define-public python-rst.linker
2612 (package
2613 (name "python-rst.linker")
2614 (version "1.10")
2615 (source
2616 (origin
2617 (method url-fetch)
2618 (uri (pypi-uri "rst.linker" version))
2619 (sha256
2620 (base32
2621 "0iqaacp7pj1s8avs4kc0qg0r7dscywaq37y6l9j14glqdikk0wdj"))))
2622 (build-system python-build-system)
2623 (propagated-inputs
2624 `(("python-dateutil" ,python-dateutil)
2625 ("python-six" ,python-six)))
2626 (native-inputs
2627 `(("python-setuptools-scm" ,python-setuptools-scm)))
2628 ;; Test would require path.py, which would introduce a cyclic dependence.
2629 (arguments `(#:tests? #f))
2630 ;; Note: As of version 1.7 the documentation is not worth building.
2631 (home-page "https://github.com/jaraco/rst.linker")
2632 (synopsis "Sphinx plugin to add links and timestamps")
2633 (description "rst.linker allows to automatically replace text by a
2634reStructuredText external reference or timestamps. It's primary purpose is to
2635augment the changelog, but it can be used for other documents, too.")
2636 (license license:expat)))
2637
2638(define-public python2-rst.linker
2639 (package-with-python2 python-rst.linker))
2640
2641(define-public python-feedgenerator
2642 (package
2643 (name "python-feedgenerator")
2644 (version "1.9")
2645 (source
2646 (origin
2647 (method url-fetch)
2648 (uri (pypi-uri "feedgenerator" version))
2649 (sha256
2650 (base32
2651 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
2652 (modules '((guix build utils)))
2653 (snippet
2654 '(begin
2655 ;; Remove pre-compiled .pyc files from source.
2656 (for-each delete-file-recursively
2657 (find-files "." "__pycache__" #:directories? #t))
2658 (for-each delete-file (find-files "." "\\.pyc$"))
2659 #t))))
2660 (build-system python-build-system)
2661 (propagated-inputs
2662 `(("python-pytz" ,python-pytz)
2663 ("python-six" ,python-six)))
2664 (home-page "https://github.com/getpelican/feedgenerator")
2665 (synopsis
2666 "Standalone version of Django's Atom/RSS feed generator")
2667 (description
2668 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2669which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
2670 (license license:bsd-3)))
2671
2672(define-public python2-feedgenerator
2673 (package-with-python2 python-feedgenerator))
2674
2675(define-public python-toml
2676 (package
2677 (name "python-toml")
2678 (version "0.9.4")
2679 (source
2680 (origin
2681 (method url-fetch)
2682 (uri (pypi-uri "toml" version))
2683 (sha256
2684 (base32
2685 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
2686 (build-system python-build-system)
2687 (arguments
2688 `(#:tests? #f)) ;no tests suite in release
2689 (home-page "https://github.com/uiri/toml")
2690 (synopsis "Library for TOML")
2691 (description
2692 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
2693Language (TOML) configuration files.")
2694 (license license:expat)))
2695
346c8752
BG
2696(define-public python-jsonrpc-server
2697 (package
2698 (name "python-jsonrpc-server")
2699 (version "0.1.2")
2700 (source
2701 (origin
2702 (method url-fetch)
2703 (uri (pypi-uri "python-jsonrpc-server" version))
2704 (sha256
2705 (base32
2706 "0m4ykpcdy52x37n1ikysp07j7p8ialcdvvvsrjp3545sn7iiid09"))))
2707 (build-system python-build-system)
2708 (propagated-inputs
2709 `(("python-future" ,python-future)
2710 ("python-mock" ,python-mock)
2711 ("python-pytest" ,python-pytest)))
2712 (home-page
2713 "https://github.com/palantir/python-jsonrpc-server")
2714 (synopsis "JSON RPC 2.0 server library")
2715 (description
2716 "This packages provides a JSON RPC 2.0 server library for Python.")
2717 (license license:expat)))
2718
56f4ad47
BG
2719(define-public python-pydocstyle
2720 (package
2721 (name "python-pydocstyle")
2722 (version "3.0.0")
2723 (source
2724 (origin
2725 (method url-fetch)
2726 (uri (pypi-uri "pydocstyle" version))
2727 (sha256
2728 (base32
2729 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
2730 (build-system python-build-system)
2731 (propagated-inputs
2732 `(("python-six" ,python-six)
2733 ("python-snowballstemmer" ,python-snowballstemmer)))
2734 (home-page
2735 "https://github.com/PyCQA/pydocstyle/")
2736 (synopsis "Python docstring style checker")
2737 (description
2738 "This package provides a style checker for the Python Language
2739Server (PLS).")
2740 (license license:expat)))
2741
be4d840c
BG
2742(define-public python-language-server
2743 (package
2744 (name "python-language-server")
fe4a4bd2 2745 (version "0.25.0")
be4d840c
BG
2746 (source
2747 (origin
2748 (method url-fetch)
2749 (uri (pypi-uri "python-language-server" version))
2750 (sha256
2751 (base32
fe4a4bd2 2752 "1xabnaqd4n72myrc3mxl2y33vr2p7c9c5a87n77p9k327ckvdx01"))))
be4d840c
BG
2753 (build-system python-build-system)
2754 (propagated-inputs
2755 `(("python-pluggy" ,python-pluggy)
2756 ("python-jsonrpc-server" ,python-jsonrpc-server)
2757 ("python-jedi" ,python-jedi)
2758 ("python-yapf" ,python-yapf)
2759 ("python-pyflakes" ,python-pyflakes)
2760 ("python-pydocstyle" ,python-pydocstyle)
2761 ("python-pycodestyle" ,python-pycodestyle)
2762 ("python-mccabe" ,python-mccabe)
2763 ("python-rope" ,python-rope)
fe4a4bd2
BG
2764 ("python-autopep8" ,python-autopep8)
2765 ("python-pylint" ,python-pylint)))
be4d840c
BG
2766 (home-page "https://github.com/palantir/python-language-server")
2767 (synopsis "Python implementation of the Language Server Protocol")
2768 (description
2769 "The Python Language Server (pyls) is an implementation of the Python 3
2770language specification for the Language Server Protocol (LSP). This tool is
2771used in text editing environments to provide a complete and integrated
2772feature-set for programming Python effectively.")
2773 (license license:expat)))
2774
44d10b1f
RW
2775(define-public python-black
2776 (package
2777 (name "python-black")
2778 (version "18.6b4")
2779 (source
2780 (origin
2781 (method url-fetch)
2782 (uri (pypi-uri "black" version))
2783 (sha256
2784 (base32
2785 "0i4sfqgz6w15vd50kbhi7g7rifgqlf8yfr8y78rypd56q64qn592"))))
2786 (build-system python-build-system)
2787 (arguments
2788 `(#:phases
2789 (modify-phases %standard-phases
2790 (add-after 'patch-source-shebangs 'patch-extra-shebangs
2791 (lambda _
2792 (let ((python3 (which "python3")))
2793 (substitute* '("tests/data/fmtonoff.py"
2794 "tests/data/string_prefixes.py"
2795 "tests/data/function.py")
2796 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
2797 (string-append "#!" python3 (if (string? minor-version)
2798 minor-version
2799 ""))))))))))
2800 (propagated-inputs
2801 `(("python-click" ,python-click)
2802 ("python-attrs" ,python-attrs)
2803 ("python-appdirs" ,python-appdirs)
2804 ("python-toml" ,python-toml)))
2805 (home-page "https://github.com/ambv/black")
2806 (synopsis "The uncompromising code formatter")
2807 (description "Black is the uncompromising Python code formatter.")
2808 (license license:expat)))
2809
2810(define-public python-blinker
2811 (package
2812 (name "python-blinker")
2813 (version "1.4")
2814 (source
2815 (origin
2816 (method url-fetch)
2817 (uri (pypi-uri "blinker" version))
2818 (sha256
2819 (base32
2820 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
2821 (build-system python-build-system)
2822 (home-page "http://pythonhosted.org/blinker/")
2823 (synopsis "Fast, simple object-to-object and broadcast signaling")
2824 (description
2825 "Blinker provides a fast dispatching system that allows any number of
2826interested parties to subscribe to events, or \"signals\".")
2827 (license license:expat)))
2828
2829(define-public python2-blinker
2830 (package-with-python2 python-blinker))
2831
2832(define-public pelican
2833 (package
2834 (name "pelican")
aa71b690 2835 (version "4.0.1")
44d10b1f
RW
2836 (source
2837 (origin
2838 (method url-fetch)
2839 (uri (pypi-uri "pelican" version))
2840 (sha256
2841 (base32
aa71b690 2842 "05yda7n6r0ll18fpdjzkzyr0ls8hbb86fnjyb33k9jvv5avah2lr"))))
44d10b1f
RW
2843 (build-system python-build-system)
2844 (propagated-inputs
2845 `(("python-feedgenerator" ,python-feedgenerator)
2846 ("python-jinja2" ,python-jinja2)
2847 ("python-pygments" ,python-pygments)
2848 ("python-docutils" ,python-docutils)
2849 ("python-pytz" ,python-pytz)
2850 ("python-blinker" ,python-blinker)
2851 ("python-unidecode" ,python-unidecode)
2852 ("python-six" ,python-six)
2853 ("python-dateutil" ,python-dateutil)
2854 ("python-markdown" ,python-markdown)))
2855 (home-page "https://getpelican.com/")
2856 (arguments
2857 `(;; XXX Requires a lot more packages to do unit tests :P
2858 #:tests? #f
2859 #:phases (modify-phases %standard-phases
2860 (add-before
2861 'install 'adjust-requires
2862 ;; Since feedgenerator is installed from git, it doesn't
2863 ;; conform to the version requirements.
2864 ;;
2865 ;; We *do have* "feedgenerator >= 1.6", but strip off the
2866 ;; version requirement so setuptools doesn't get confused.
2867 (lambda _
2868 (substitute* "setup.py"
2869 (("['\"]feedgenerator.*?['\"]")
2870 "'feedgenerator'")))))))
2871 (synopsis "Python-based static site publishing system")
2872 (description
2873 "Pelican is a tool to generate a static blog from reStructuredText,
2874Markdown input files, and more. Pelican uses Jinja2 for templating
2875and is very extensible.")
2876 (license license:agpl3+)))
2877
2878(define-public python-scikit-image
2879 (package
2880 (name "python-scikit-image")
9ff04084 2881 (version "0.14.2")
44d10b1f
RW
2882 (source
2883 (origin
2884 (method url-fetch)
2885 (uri (pypi-uri "scikit-image" version))
2886 (sha256
9ff04084 2887 (base32 "07qchljkyxvg5nrm12fvszi7pmjk4m01qp0w0z8syxzxxs20pz8s"))))
44d10b1f
RW
2888 (build-system python-build-system)
2889 (arguments
2890 ;; TODO: Some tests require running X11 server. Disable them?
2891 '(#:tests? #f))
2892 ;; See DEPENDS.txt for the list of build and run time requiremnts
2893 (propagated-inputs
2894 `(("python-cloudpickle" ,python-cloudpickle)
2895 ("python-dask" ,python-dask)
2896 ("python-matplotlib" ,python-matplotlib)
2897 ("python-networkx" ,python-networkx)
2898 ("python-numpy" ,python-numpy)
2899 ("python-pillow" ,python-pillow)
2900 ("python-pywavelets" ,python-pywavelets)
2901 ("python-scipy" ,python-scipy)
2902 ("python-six" ,python-six)))
2903 (native-inputs
2904 `(("python-cython" ,python-cython)))
2905 (home-page "http://scikit-image.org/")
2906 (synopsis "Image processing in Python")
2907 (description
2908 "Scikit-image is a collection of algorithms for image processing.")
2909 (license license:bsd-3)))
2910
2911(define-public python2-scikit-image
2912 (package-with-python2 python-scikit-image))
2913
2914(define-public python-cython
2915 (package
2916 (name "python-cython")
fa8ffaa0 2917 (version "0.29.5")
44d10b1f
RW
2918 (source
2919 (origin
2920 (method url-fetch)
2921 (uri (pypi-uri "Cython" version))
2922 (sha256
2923 (base32
fa8ffaa0 2924 "1wfb68g115gmf3mv23w0hh972b0ll85gpb92ci28x6h997br0llx"))))
44d10b1f
RW
2925 (build-system python-build-system)
2926 ;; we need the full python package and not just the python-wrapper
2927 ;; because we need libpython3.3m.so
2928 (inputs
2929 `(("python" ,python)))
2930 (arguments
2931 `(#:phases
2932 (modify-phases %standard-phases
2933 (add-before 'check 'set-HOME
2934 ;; some tests require access to "$HOME/.cython"
2935 (lambda _ (setenv "HOME" "/tmp") #t))
2936
2937 ;; FIXME: These tests started failing on armhf after the 0.28 update
2938 ;; (commit c69d11c5930), both with an error such as this:
2939 ;; compiling (cpp) and running dictcomp ...
2940 ;; === C/C++ compiler error output: ===
2941 ;; ‘
2942 ;; dictcomp.cpp:5221: confused by earlier errors, bailing out
2943 ;; See <https://hydra.gnu.org/build/2948724> for logs.
2944 ,@(if (target-arm32?)
2945 `((add-before 'check 'disable-failing-tests
2946 (lambda _
2947 (let ((disabled-tests (open-file "tests/bugs.txt" "a")))
2948 (for-each (lambda (test)
2949 (format disabled-tests "~a\n" test))
2950 '("memslice" "dictcomp"))
2951 (close-port disabled-tests)))))
2952 '())
2953
2954 (replace 'check
2955 (lambda _
2956 ;; The "with_outer_raising" test fails with Python 3.7. See
2957 ;; https://github.com/cython/cython/issues/2454
2958 (delete-file "tests/run/generators_py.py")
2959 (invoke "python" "runtests.py" "-vv"))))))
2960 (home-page "http://cython.org/")
2961 (synopsis "C extensions for Python")
2962 (description "Cython is an optimising static compiler for both the Python
2963programming language and the extended Cython programming language. It makes
2964writing C extensions for Python as easy as Python itself.")
2965 (license license:asl2.0)
2966 (properties `((python2-variant . ,(delay python2-cython))))))
2967
2968(define-public python2-cython
2969 (package (inherit (package-with-python2
2970 (strip-python2-variant python-cython)))
2971 (name "python2-cython")
2972 (inputs
2973 `(("python-2" ,python-2))))) ; this is not automatically changed
2974
2975;; The RPython toolchain currently does not support Python 3.
2976(define-public python2-rpython
2977 (package
2978 (name "python2-rpython")
2979 (version "0.2.1")
2980 (source
2981 (origin
2982 (method url-fetch)
2983 (uri (pypi-uri "rpython" version))
2984 (sha256
2985 (base32
2986 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
2987 (build-system python-build-system)
2988 (arguments `(#:python ,python-2))
2989 (native-inputs
2990 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
2991 (home-page "https://rpython.readthedocs.org")
2992 (synopsis "Framework for implementing interpreters and virtual machines")
2993 (description "RPython is a translation and support framework for
2994producing implementations of dynamic languages, emphasizing a clean separation
2995between language specification and implementation aspects.")
2996 (license license:expat)))
2997
2998;; NOTE: when upgrading numpy please make sure that python-pandas and
2999;; python-scipy still build, as these three packages are often used together.
3000(define-public python-numpy
3001 (package
3002 (name "python-numpy")
3003 (version "1.15.4")
3004 (source
3005 (origin
3006 (method url-fetch)
3007 (uri (string-append
3008 "https://github.com/numpy/numpy/releases/download/v"
3009 version "/numpy-" version ".tar.gz"))
3010 (sha256
3011 (base32
3012 "102vcl2qq4pjbm7a3d67vkkvn4466ngia1d8wi5avqwqh8j0jvkn"))))
3013 (build-system python-build-system)
3014 (inputs
3015 `(("openblas" ,openblas)
3016 ("lapack" ,lapack)))
3017 (native-inputs
3018 `(("python-cython" ,python-cython)
3019 ("python-pytest" ,python-pytest)
3020 ("gfortran" ,gfortran)))
3021 (arguments
3022 `(#:phases
3023 (modify-phases %standard-phases
3024 (add-before 'build 'configure-blas-lapack
3025 (lambda* (#:key inputs #:allow-other-keys)
3026 (call-with-output-file "site.cfg"
3027 (lambda (port)
3028 (format port
3029 "[openblas]
3030libraries = openblas
3031library_dirs = ~a/lib
3032include_dirs = ~a/include
3033
3034# backslash-n to make emacs happy
3035\n[lapack]
3036lapack_libs = lapack
3037library_dirs = ~a/lib
3038include_dirs = ~a/include
3039"
3040 (assoc-ref inputs "openblas")
3041 (assoc-ref inputs "openblas")
3042 (assoc-ref inputs "lapack")
3043 (assoc-ref inputs "lapack"))))
3044 #t))
3045 (add-before 'build 'fix-executable-paths
3046 (lambda* (#:key inputs #:allow-other-keys)
3047 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
3048 ;; instead of /bin/sh.
3049 (substitute* "numpy/distutils/exec_command.py"
3050 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
3051 (string-append match-start (assoc-ref inputs "bash") match-end)))
3052 ;; Use "gcc" executable, not "cc".
3053 (substitute* "numpy/distutils/system_info.py"
3054 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3055 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3056 #t))
3057 ;; Tests can only be run after the library has been installed and not
3058 ;; within the source directory.
3059 (delete 'check)
3060 (add-after 'install 'check
3061 (lambda* (#:key outputs inputs #:allow-other-keys)
3062 ;; Make installed package available for running the tests
3063 (add-installed-pythonpath inputs outputs)
3064 ;; Make sure "f2py" etc is found.
3065 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
3066 ":" (getenv "PATH")))
3067 (with-directory-excursion "/tmp"
3068 (invoke "python" "-c"
3069 "import numpy; numpy.test(verbose=2)")))))))
3070 (home-page "http://www.numpy.org/")
3071 (synopsis "Fundamental package for scientific computing with Python")
3072 (description "NumPy is the fundamental package for scientific computing
3073with Python. It contains among other things: a powerful N-dimensional array
3074object, sophisticated (broadcasting) functions, tools for integrating C/C++
3075and Fortran code, useful linear algebra, Fourier transform, and random number
3076capabilities.")
3077 (license license:bsd-3)))
3078
3079(define-public python2-numpy
3080 (package-with-python2 python-numpy))
3081
3082;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
3083;; interest only for legacy code going back to NumPy's predecessor
3084;; Numeric.
3085(define-public python2-numpy-1.8
3086 (package (inherit python2-numpy)
3087 (version "1.8.2")
3088 (source
3089 (origin
3090 (method url-fetch)
3091 (uri (string-append
3092 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
3093 (file-name (string-append "python2-numpy-" version ".tar.gz"))
3094 (sha256
3095 (base32
3096 "0sc20gz1b17xnyrkp5frca3ql5qfalpv916hfg2kqxpwr6jg0f1g"))))
3097 (arguments
3098 (substitute-keyword-arguments (package-arguments python2-numpy)
3099 ((#:phases phases)
3100 `(modify-phases ,phases
3101 (replace 'configure-blas-lapack
3102 (lambda* (#:key inputs #:allow-other-keys)
3103 (call-with-output-file "site.cfg"
3104 (lambda (port)
3105 (format port
3106 "[openblas]
3107libraries = openblas,lapack
3108library_dirs = ~a/lib:~a/lib
3109include_dirs = ~a/include:~a/include
3110"
3111 (assoc-ref inputs "openblas")
3112 (assoc-ref inputs "lapack")
3113 (assoc-ref inputs "openblas")
3114 (assoc-ref inputs "lapack"))))
3115 #t))))))
3116 (native-inputs
3117 `(("python2-nose" ,python2-nose)))
3118 (description "NumPy is the fundamental package for scientific computing
3119with Python. It contains among other things: a powerful N-dimensional array
3120object, sophisticated (broadcasting) functions, tools for integrating C/C++
3121and Fortran code, useful linear algebra, Fourier transform, and random number
3122capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
3123that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
3124Numeric.")
3125 (license license:bsd-3)))
3126
3127(define-public python-munch
3128 (package
3129 (name "python-munch")
3130 (version "2.0.4")
3131 (source
3132 (origin
3133 (method url-fetch)
3134 (uri (pypi-uri "munch" version))
3135 (sha256
3136 (base32
3137 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3138 (build-system python-build-system)
3139 (home-page "https://github.com/Infinidat/munch")
3140 (synopsis "Dot-accessible dictionary")
3141 (description "Munch is a dot-accessible dictionary similar to JavaScript
3142objects.")
3143 (license license:expat)))
3144
3145(define-public python2-munch
3146 (package-with-python2 python-munch))
3147
3148(define-public python-colormath
3149 (package
3150 (name "python-colormath")
3151 (version "3.0.0")
3152 (source
3153 (origin
3154 (method url-fetch)
3155 (uri (pypi-uri "colormath" version))
3156 (sha256
3157 (base32
3158 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3159 (build-system python-build-system)
3160 (propagated-inputs
3161 `(("python-networkx" ,python-networkx)
3162 ("python-numpy" ,python-numpy)))
3163 (home-page "https://github.com/gtaylor/python-colormath")
3164 (synopsis "Color math and conversion library")
3165 (description
3166 "This is a Python library for color math and conversions.")
3167 (license license:bsd-3)))
3168
3169(define-public python2-colormath
3170 (package-with-python2 python-colormath))
3171
3172(define-public python-spectra
3173 (package
3174 (name "python-spectra")
3175 (version "0.0.11")
3176 (source
3177 (origin
3178 (method url-fetch)
3179 (uri (pypi-uri "spectra" version))
3180 (sha256
3181 (base32
3182 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3183 (build-system python-build-system)
3184 (arguments
3185 `(#:phases
3186 (modify-phases %standard-phases
3187 (replace 'check
38ec0f6a 3188 (lambda _ (invoke "nosetests" "-v"))))))
44d10b1f
RW
3189 (propagated-inputs
3190 `(("python-colormath" ,python-colormath)))
3191 (native-inputs
3192 `(("python-nose" ,python-nose)))
3193 (home-page "https://github.com/jsvine/spectra")
3194 (synopsis "Color scales and color conversion")
3195 (description
3196 "This package provides a Python library intended to make color math,
3197color scales, and color space conversion easy. It has support for:
3198
3199@enumerate
3200@item Color scales
3201@item Color ranges
3202@item Color blending
3203@item Brightening/darkening colors
3204@item Saturating/desaturating colors
3205@item Conversion to/from multiple color spaces.
3206@end enumerate\n")
3207 (license license:expat)))
3208
3209(define-public python2-spectra
3210 (package-with-python2 python-spectra))
3211
3212(define-public python-numpy-documentation
3213 (package
3214 (name "python-numpy-documentation")
3215 (version (package-version python-numpy))
3216 (source (package-source python-numpy))
3217 (build-system python-build-system)
3218 (native-inputs
3219 `(("python-matplotlib" ,python-matplotlib)
3220 ("python-numpy" ,python-numpy)
3221 ("pkg-config" ,pkg-config)
3222 ("python-sphinx" ,python-sphinx)
3223 ("python-numpydoc" ,python-numpydoc)
3224 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
3225 texlive-fonts-cm-super
3226 texlive-fonts-ec
3227 texlive-generic-ifxetex
3228 texlive-generic-pdftex
3229 texlive-latex-amsfonts
3230 texlive-latex-capt-of
3231 texlive-latex-cmap
3232 texlive-latex-environ
3233 texlive-latex-eqparbox
3234 texlive-latex-etoolbox
3235 texlive-latex-expdlist
3236 texlive-latex-fancyhdr
3237 texlive-latex-fancyvrb
3238 texlive-latex-fncychap
3239 texlive-latex-float
3240 texlive-latex-framed
3241 texlive-latex-geometry
3242 texlive-latex-graphics
3243 texlive-latex-hyperref
3244 texlive-latex-mdwtools
3245 texlive-latex-multirow
3246 texlive-latex-needspace
3247 texlive-latex-oberdiek
3248 texlive-latex-parskip
3249 texlive-latex-preview
3250 texlive-latex-tabulary
3251 texlive-latex-threeparttable
3252 texlive-latex-titlesec
3253 texlive-latex-trimspaces
3254 texlive-latex-ucs
3255 texlive-latex-upquote
3256 texlive-latex-url
3257 texlive-latex-varwidth
3258 texlive-latex-wrapfig)))
3259 ("texinfo" ,texinfo)
3260 ("perl" ,perl)
3261 ("scipy-sphinx-theme"
3262 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3263 (method git-fetch)
3264 (uri (git-reference
3265 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3266 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3267 (sha256
3268 (base32
3269 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3270 ,@(package-native-inputs python-numpy)))
3271 (arguments
3272 `(#:tests? #f ; we're only generating the documentation
3273 #:phases
3274 (modify-phases %standard-phases
3275 (delete 'build)
3276 (replace 'install
3277 (lambda* (#:key inputs outputs #:allow-other-keys)
3278 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3279 (doc (string-append
3280 data "/doc/" ,name "-"
3281 ,(package-version python-numpy)))
3282 (info-reader (string-append data "/info"))
3283 (html (string-append doc "/html"))
3284 (scipy-sphinx-theme "scipy-sphinx-theme")
3285 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3286 (pyver ,(string-append "PYVER=")))
3287
3288 ;; FIXME: this is needed to for texlive-union to generate
3289 ;; fonts, which are not found.
3290 (setenv "HOME" "/tmp")
3291
3292 (with-directory-excursion "doc"
3293 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3294 (mkdir-p html)
4fc898da
RW
3295 (invoke "make" "html" pyver)
3296 (invoke "make" "latex" "PAPER=a4" pyver)
3297 (invoke "make" "-C" "build/latex"
44d10b1f
RW
3298 "all-pdf" "PAPER=a4" pyver)
3299 ;; FIXME: Generation of the info file fails.
4fc898da 3300 ;; (invoke "make" "info" pyver)
44d10b1f
RW
3301 ;; (mkdir-p info)
3302 ;; (copy-file "build/texinfo/numpy.info"
3303 ;; (string-append info "/numpy.info"))
3304 (for-each (lambda (file)
3305 (copy-file (string-append "build/latex" file)
3306 (string-append doc file)))
3307 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3308 (with-directory-excursion "build/html"
3309 (for-each (lambda (file)
3310 (let* ((dir (dirname file))
3311 (tgt-dir (string-append html "/" dir)))
3312 (unless (equal? "." dir)
3313 (mkdir-p tgt-dir))
3314 (install-file file html)))
3315 (find-files "." ".*")))))
3316 #t)))))
3317 (home-page (package-home-page python-numpy))
3318 (synopsis "Documentation for the python-numpy package")
3319 (description (package-description python-numpy))
3320 (license (package-license python-numpy))))
3321
3322(define-public python2-numpy-documentation
3323 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3324 (package
3325 (inherit numpy-documentation)
3326 (native-inputs `(("python2-functools32" ,python2-functools32)
3327 ,@(package-native-inputs numpy-documentation))))))
3328
3329(define-public python-pygit2
3330 (package
3331 (name "python-pygit2")
2ffec22e 3332 (version "0.27.4")
44d10b1f
RW
3333 (source
3334 (origin
3335 (method url-fetch)
3336 (uri (pypi-uri "pygit2" version))
3337 (sha256
3338 (base32
2ffec22e 3339 "15c1mhwwjc7nr8hn5gm21hcfhw61jmwb0vngpjhlm3y5565wg2pz"))))
44d10b1f
RW
3340 (build-system python-build-system)
3341 (arguments
2ffec22e
JL
3342 '(#:tests? #f; tests don't run correctly in our environment
3343 #:phases
44d10b1f 3344 (modify-phases %standard-phases
44d10b1f
RW
3345 (add-after 'unpack 'fix-dependency-versioning
3346 (lambda _
3347 (substitute* "setup.py"
3348 (("<") "<="))
3349 #t)))))
3350 (propagated-inputs
3351 `(("python-six" ,python-six)
3352 ("python-cffi" ,python-cffi)
3353 ("libgit2" ,libgit2)
3354 ("python-tox" ,python-tox)))
3355 (native-inputs
3356 `(("python-pytest" ,python-pytest)))
3357 (home-page "https://github.com/libgit2/pygit2")
3358 (synopsis "Python bindings for libgit2")
3359 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3360library, libgit2 implements Git plumbing.")
3361 ;; GPL2.0 only, with linking exception.
3362 (license license:gpl2)))
3363
3364(define-public python2-pygit2
3365 (package-with-python2 python-pygit2))
3366
3367(define-public python-pyparsing
3368 (package
3369 (name "python-pyparsing")
3370 (version "2.2.1")
3371 (source
3372 (origin
3373 (method url-fetch)
3374 (uri (pypi-uri "pyparsing" version))
3375 (sha256
3376 (base32 "06dgd0iilvf8m0ssmfpcbh8l6jf0zkp8adbb84llksg17crfx4zl"))))
3377 (build-system python-build-system)
3378 (outputs '("out" "doc"))
3379 (arguments
3380 `(#:tests? #f ; no test target
3381 #:phases
3382 (modify-phases %standard-phases
3383 (add-after 'install 'install-doc
3384 (lambda* (#:key outputs #:allow-other-keys)
3385 (let* ((doc (string-append (assoc-ref outputs "doc")
3386 "/share/doc/" ,name "-" ,version))
3387 (html-doc (string-append doc "/html"))
3388 (examples (string-append doc "/examples")))
3389 (mkdir-p html-doc)
3390 (mkdir-p examples)
3391 (for-each
3392 (lambda (dir tgt)
3393 (map (lambda (file)
3394 (install-file file tgt))
3395 (find-files dir ".*")))
3396 (list "docs" "htmldoc" "examples")
3397 (list doc html-doc examples))
3398 #t))))))
3399 (home-page "https://github.com/pyparsing/pyparsing")
3400 (synopsis "Python parsing class library")
3401 (description
3402 "The pyparsing module is an alternative approach to creating and
3403executing simple grammars, vs. the traditional lex/yacc approach, or the use
3404of regular expressions. The pyparsing module provides a library of classes
3405that client code uses to construct the grammar directly in Python code.")
3406 (license license:expat)))
3407
3408(define-public python2-pyparsing
3409 (package-with-python2 python-pyparsing))
3410
3411(define-public python-numpydoc
3412 (package
3413 (name "python-numpydoc")
3414 (version "0.8.0")
3415 (source
3416 (origin
3417 (method url-fetch)
3418 (uri (pypi-uri "numpydoc" version))
3419 (sha256
3420 (base32
3421 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
3422 (build-system python-build-system)
3423 (propagated-inputs
3424 `(("python-sphinx" ,python-sphinx)))
3425 (native-inputs
3426 `(("python-nose" ,python-nose)))
3427 (home-page "https://pypi.python.org/pypi/numpydoc")
3428 (synopsis
3429 "Numpy's Sphinx extensions")
3430 (description
3431 "Sphinx extension to support docstrings in Numpy format.")
3432 (license license:bsd-2)))
3433
3434(define-public python2-numpydoc
3435 (package-with-python2 python-numpydoc))
3436
3437(define-public python-numexpr
3438 (package
3439 (name "python-numexpr")
3440 (version "2.6.5")
3441 (source
3442 (origin
3443 (method url-fetch)
3444 (uri (pypi-uri "numexpr" version))
3445 (sha256
3446 (base32
3447 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3448 (build-system python-build-system)
3449 (arguments `(#:tests? #f)) ; no tests included
3450 (propagated-inputs
3451 `(("python-numpy" ,python-numpy)))
3452 (home-page "https://github.com/pydata/numexpr")
3453 (synopsis "Fast numerical expression evaluator for NumPy")
3454 (description
3455 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3456expressions that operate on arrays are accelerated and use less memory than
3457doing the same calculation in Python. In addition, its multi-threaded
3458capabilities can make use of all your cores, which may accelerate
3459computations, most specially if they are not memory-bounded (e.g. those using
3460transcendental functions).")
3461 (license license:expat)))
3462
3463(define-public python2-numexpr
3464 (package-with-python2 python-numexpr))
3465
3466(define-public python-cycler
3467 (package
3468 (name "python-cycler")
3469 (version "0.10.0")
3470 (source (origin
3471 (method url-fetch)
3472 (uri (pypi-uri "cycler" version))
3473 (sha256
3474 (base32
3475 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3476 (build-system python-build-system)
3477 (arguments
3478 ;; XXX: The current version requires 'coveralls' which we don't have.
3479 ;; Enable this for the next release which uses 'python-pytest'.
3480 '(#:tests? #f))
3481 (propagated-inputs
3482 `(("python-six" ,python-six)))
3483 (home-page "http://matplotlib.org/cycler/")
3484 (synopsis "Composable keyword argument iterator")
3485 (description
3486 "When using @code{matplotlib} and plotting more than one line, it is
3487common to want to be able to want to be able to cycle over one or more artist
3488styles; but the plotting logic can quickly become involved.
3489To address this and enable easy cycling over arbitrary @code{kwargs}, the
3490@code{Cycler} class was developed.")
3491 (license license:bsd-3)))
3492
3493(define-public python2-cycler
3494 (package-with-python2 python-cycler))
3495
3496(define-public python-colorspacious
3497 (package
3498 (name "python-colorspacious")
3499 (version "1.1.0")
3500 (source
3501 (origin
3502 (method url-fetch)
3503 (uri (string-append "https://github.com/njsmith/colorspacious/archive/v"
3504 version ".tar.gz"))
3505 (file-name (string-append name "-" version))
3506 (sha256
3507 (base32 "1vflh5jm32qb0skza2i8pjacv09w6gq84fqpp2nj77s0rbmzgr4k"))))
3508 (build-system python-build-system)
3509 (propagated-inputs
3510 `(("python-numpy" ,python-numpy)))
3511 (native-inputs
3512 `(("python-nose" ,python-nose)))
3513 (arguments
3514 `(#:phases
3515 (modify-phases %standard-phases
3516 (replace 'check
3517 (lambda _
c988afda 3518 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
44d10b1f
RW
3519 (home-page "https://github.com/njsmith/colorspacious")
3520 (synopsis "Python library for colorspace conversions")
3521 (description "@code{colorspacious} is a Python library that lets you
3522convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3523 (license license:expat)))
3524
3525(define-public python2-colorspacious
3526 (package-with-python2 python-colorspacious))
3527
3528(define-public python-matplotlib
3529 (package
3530 (name "python-matplotlib")
3531 (version "2.2.3")
3532 (source
3533 (origin
3534 (method url-fetch)
3535 (uri (pypi-uri "matplotlib" version))
3536 (sha256
3537 (base32
3538 "1rcc7x9ig3hpchkc4cwdvym3y451w74275fxr455zkfagrsvymbk"))))
3539 (build-system python-build-system)
3540 (propagated-inputs ; the following packages are all needed at run time
3541 `(("python-cycler" ,python-cycler)
3542 ("python-kiwisolver" ,python-kiwisolver)
3543 ("python-pyparsing" ,python-pyparsing)
3544 ("python-pygobject" ,python-pygobject)
3545 ("gobject-introspection" ,gobject-introspection)
3546 ("python-tkinter" ,python "tk")
3547 ("python-dateutil" ,python-dateutil)
3548 ("python-numpy" ,python-numpy)
3549 ("python-pillow" ,python-pillow)
3550 ("python-pytz" ,python-pytz)
3551 ("python-six" ,python-six)
3552 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3553 ;; from 'gtk+') provides the required 'typelib' files used by
3554 ;; 'gobject-introspection'. The location of these files is set with the
3555 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3556 ;; is done automatically by a 'native-search-path' procedure. However,
3557 ;; at run-time the user must set this variable as follows:
3558 ;;
3559 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
3560 ("gtk+" ,gtk+)
3561 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3562 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3563 ;; object. For this reason we need to import both libraries.
3564 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3565 ("python-pycairo" ,python-pycairo)
3566 ;; XXX: qtwebkit cannot be built reliably.
3567 ("python-pyqt" ,python-pyqt-without-qtwebkit)
3568 ("python-cairocffi" ,python-cairocffi)))
3569 (inputs
3570 `(("libpng" ,libpng)
3571 ("imagemagick" ,imagemagick)
3572 ("freetype" ,freetype)
3573 ("cairo" ,cairo)
3574 ("glib" ,glib)
3575 ;; FIXME: Add backends when available.
3576 ;("python-wxpython" ,python-wxpython)
3577 ("tcl" ,tcl)
3578 ("tk" ,tk)))
3579 (native-inputs
3580 `(("pkg-config" ,pkg-config)
3581 ("python-nose" ,python-nose)
3582 ("python-mock" ,python-mock)))
3583 (arguments
3584 `(#:phases
3585 (modify-phases %standard-phases
3586 (add-before 'build 'configure-environment
3587 (lambda* (#:key outputs inputs #:allow-other-keys)
3588 (let ((cairo (assoc-ref inputs "cairo"))
3589 (gtk+ (assoc-ref inputs "gtk+")))
3590 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3591 ;; has not effect.
3592 (setenv "LD_LIBRARY_PATH"
3593 (string-append cairo "/lib:" gtk+ "/lib"))
3594 (setenv "HOME" (getcwd))
3595 (call-with-output-file "setup.cfg"
3596 (lambda (port)
3597 (format port "[directories]~%
3598basedirlist = ~a,~a~%
3599 [rc_options]~%
3600backend = TkAgg~%"
3601 (assoc-ref inputs "tcl")
3602 (assoc-ref inputs "tk")))))
3603 #t)))))
3604 (home-page "http://matplotlib.org")
3605 (synopsis "2D plotting library for Python")
3606 (description
3607 "Matplotlib is a Python 2D plotting library which produces publication
3608quality figures in a variety of hardcopy formats and interactive environments
3609across platforms. Matplotlib can be used in Python scripts, the python and
3610ipython shell, web application servers, and six graphical user interface
3611toolkits.")
3612 (license license:psfl)
3613 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3614
3615(define-public python2-matplotlib
3616 (let ((matplotlib (package-with-python2
3617 (strip-python2-variant python-matplotlib))))
3618 (package (inherit matplotlib)
3619 ;; Make sure to use special packages for Python 2 instead
3620 ;; of those automatically rewritten by package-with-python2.
3621 (propagated-inputs
3622 `(("python2-pycairo" ,python2-pycairo)
3623 ("python2-backports-functools-lru-cache"
3624 ,python2-backports-functools-lru-cache)
3625 ("python2-functools32" ,python2-functools32)
3626 ("python2-pygobject-2" ,python2-pygobject-2)
3627 ("python2-subprocess32" ,python2-subprocess32)
3628 ("python2-tkinter" ,python-2 "tk")
3629 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3630 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
3631
3632(define-public python-matplotlib-documentation
3633 (package
3634 (name "python-matplotlib-documentation")
3635 (version (package-version python-matplotlib))
3636 (source (package-source python-matplotlib))
3637 (build-system python-build-system)
3638 (native-inputs
3639 `(("python-matplotlib" ,python-matplotlib)
3640 ("python-colorspacious" ,python-colorspacious)
3641 ("python-sphinx" ,python-sphinx)
3642 ("python-sphinx-gallery" ,python-sphinx-gallery)
3643 ("python-numpydoc" ,python-numpydoc)
3644 ("python-ipython" ,python-ipython)
e7a53914 3645 ("python-ipykernel" ,python-ipykernel)
44d10b1f
RW
3646 ("python-mock" ,python-mock)
3647 ("graphviz" ,graphviz)
e7a53914
RW
3648 ("texlive" ,(texlive-union (list texlive-latex-amsfonts
3649 texlive-latex-amsmath
3650 texlive-latex-enumitem
3651 texlive-latex-expdlist
3652 texlive-latex-geometry
3653 texlive-latex-preview
3654 texlive-latex-type1cm
3655 texlive-latex-ucs
3656
3657 texlive-generic-pdftex
3658
3659 texlive-fonts-amsfonts
3660 texlive-fonts-ec
3661 texlive-fonts-adobe-times
3662 texlive-fonts-txfonts)))
44d10b1f
RW
3663 ("texinfo" ,texinfo)
3664 ,@(package-native-inputs python-matplotlib)))
3665 (arguments
3666 `(#:tests? #f ; we're only generating documentation
3667 #:phases
3668 (modify-phases %standard-phases
3669 (replace 'build
3670 (lambda _
3671 (chdir "doc")
e7a53914
RW
3672 (setenv "PYTHONPATH"
3673 (string-append (getenv "PYTHONPATH")
3674 ":" (getcwd) "/../examples/units"))
44d10b1f 3675 (substitute* "conf.py"
e7a53914
RW
3676 ;; Don't use git.
3677 (("^SHA = check_output.*")
3678 (string-append "SHA = \"" ,version "\"\n"))
3679 ;; Don't fetch intersphinx files from the Internet
3680 (("^explicit_order_folders" m)
3681 (string-append "intersphinx_mapping = {}\n" m))
3682 (("'sphinx.ext.intersphinx',") "")
3683 ;; Disable URL embedding which requires internet access.
3684 (("'https://docs.scipy.org/doc/numpy'") "None")
3685 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
3686 (invoke "make"
3687 "SPHINXBUILD=sphinx-build"
3688 "SPHINXOPTS=" ; don't abort on warnings
3689 "html" "texinfo")))
44d10b1f
RW
3690 (replace 'install
3691 (lambda* (#:key inputs outputs #:allow-other-keys)
3692 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3693 (doc (string-append data "/doc/python-matplotlib-" ,version))
3694 (info (string-append data "/info"))
3695 (html (string-append doc "/html")))
3696 (mkdir-p html)
3697 (mkdir-p info)
3698 (copy-recursively "build/html" html)
3699 (symlink (string-append html "/_images")
3700 (string-append info "/matplotlib-figures"))
3701 (with-directory-excursion "build/texinfo"
3702 (substitute* "matplotlib.texi"
3703 (("@image\\{([^,]*)" all file)
3704 (string-append "@image{matplotlib-figures/" file)))
3705 (symlink (string-append html "/_images")
3706 "./matplotlib-figures")
e7a53914
RW
3707 (invoke "makeinfo" "--no-split"
3708 "-o" "matplotlib.info" "matplotlib.texi"))
3709 (install-file "build/texinfo/matplotlib.info" info))
44d10b1f
RW
3710 #t)))))
3711 (home-page (package-home-page python-matplotlib))
3712 (synopsis "Documentation for the python-matplotlib package")
3713 (description (package-description python-matplotlib))
3714 (license (package-license python-matplotlib))))
3715
3716(define-public python2-matplotlib-documentation
3717 (package-with-python2 python-matplotlib-documentation))
3718
3719(define-public python2-pysnptools
3720 (package
3721 (name "python2-pysnptools")
5d1ade85 3722 (version "0.3.13")
44d10b1f
RW
3723 (source
3724 (origin
3725 (method url-fetch)
5d1ade85 3726 (uri (pypi-uri "pysnptools" version))
44d10b1f
RW
3727 (sha256
3728 (base32
5d1ade85 3729 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
44d10b1f
RW
3730 (build-system python-build-system)
3731 (arguments
5d1ade85
RW
3732 `(#:python ,python-2 ; only Python 2.7 is supported
3733 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
44d10b1f
RW
3734 (propagated-inputs
3735 `(("python2-numpy" ,python2-numpy)
3736 ("python2-scipy" ,python2-scipy)
3737 ("python2-pandas" ,python2-pandas)))
44d10b1f 3738 (native-inputs
5d1ade85 3739 `(("python2-cython" ,python2-cython)))
1b66989b 3740 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
44d10b1f
RW
3741 (synopsis "Library for reading and manipulating genetic data")
3742 (description
3743 "PySnpTools is a library for reading and manipulating genetic data. It
3744can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
3745those files. It can also efficiently manipulate ranges of integers using set
3746operators such as union, intersection, and difference.")
3747 (license license:asl2.0)))
3748
3749(define-public python-scipy
3750 (package
3751 (name "python-scipy")
3752 (version "1.1.0")
3753 (source
3754 (origin
3755 (method url-fetch)
3756 (uri (pypi-uri "scipy" version))
3757 (sha256
3758 (base32
3759 "1lfg686w6vv2m2dfs8v9d0bf2i18z7wz5vgzjnkgmpr4hi0550w7"))))
3760 (build-system python-build-system)
3761 (propagated-inputs
3762 `(("python-numpy" ,python-numpy)
3763 ("python-matplotlib" ,python-matplotlib)
3764 ("python-pyparsing" ,python-pyparsing)))
3765 (inputs
3766 `(("lapack" ,lapack)
3767 ("openblas" ,openblas)))
3768 (native-inputs
3769 `(("python-cython" ,python-cython)
3770 ("python-pytest" ,python-pytest)
3771 ("python-sphinx" ,python-sphinx)
3772 ("python-numpydoc" ,python-numpydoc)
3773 ("gfortran" ,gfortran)
3774 ("perl" ,perl)
3775 ("which" ,which)))
3776 (outputs '("out" "doc"))
3777 (arguments
3778 `(#:phases
3779 (modify-phases %standard-phases
3780 (add-after 'unpack 'disable-broken-tests
3781 (lambda _
3782 (substitute* "scipy/sparse/linalg/dsolve/tests/test_linsolve.py"
3783 (("^( +)def test_threads_parallel\\(self\\):" m indent)
3784 (string-append indent
3785 "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
3786 m)))
3787 (substitute* "scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py"
3788 (("^def test_parallel_threads\\(\\):" m)
3789 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
3790 m)))
3791 #t))
3792 (add-before 'build 'configure-openblas
3793 (lambda* (#:key inputs #:allow-other-keys)
3794 (call-with-output-file "site.cfg"
3795 (lambda (port)
3796 (format port
3797 "[blas]
3798libraries = openblas
3799library_dirs = ~a/lib
3800include_dirs = ~a/include
3801
3802# backslash-n to make emacs happy
3803\n[atlas]
3804library_dirs = ~a/lib
3805atlas_libs = openblas
3806"
3807 (assoc-ref inputs "openblas")
3808 (assoc-ref inputs "openblas")
3809 (assoc-ref inputs "openblas"))))
3810 #t))
3811 (add-after 'install 'install-doc
3812 (lambda* (#:key inputs outputs #:allow-other-keys)
3813 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3814 (doc (string-append data "/doc/" ,name "-" ,version))
3815 (html (string-append doc "/html"))
3816 (pyver ,(string-append "PYVER=" (version-major+minor
3817 (package-version python))))
3818 ;; By default it tries to run sphinx-build through the Python
3819 ;; interpreter which won't work with our shell wrapper.
3820 (sphinxbuild "SPHINXBUILD=LANG=C sphinx-build"))
3821 ;; Make installed package available for building the
3822 ;; documentation
3823 (add-installed-pythonpath inputs outputs)
3824 (with-directory-excursion "doc"
3825 ;; Fix generation of images for mathematical expressions.
3826 (substitute* (find-files "source" "conf\\.py")
3827 (("pngmath_use_preview = True")
3828 "pngmath_use_preview = False"))
3829 (mkdir-p html)
3830 (invoke "make" "html" pyver sphinxbuild)
3831 (with-directory-excursion "build/html"
3832 (for-each (lambda (file)
3833 (let* ((dir (dirname file))
3834 (tgt-dir (string-append html "/" dir)))
3835 (install-file file html)))
3836 (find-files "." ".*")))))
3837 #t))
3838 ;; Tests can only be run after the library has been installed and not
3839 ;; within the source directory.
3840 (delete 'check)
3841 (add-after 'install 'check
3842 (lambda* (#:key inputs outputs #:allow-other-keys)
3843 (add-installed-pythonpath inputs outputs)
3844 (with-directory-excursion "/tmp"
3845 (invoke "python" "-c"
3846 "import scipy; scipy.test(verbose=2)")))))))
3847 (home-page "https://www.scipy.org/")
3848 (synopsis "The Scipy library provides efficient numerical routines")
3849 (description "The SciPy library is one of the core packages that make up
3850the SciPy stack. It provides many user-friendly and efficient numerical
3851routines such as routines for numerical integration and optimization.")
3852 (properties `((python2-variant . ,(delay python2-scipy))))
3853 (license license:bsd-3)))
3854
3855(define-public python2-scipy
3856 (package-with-python2
3857 (strip-python2-variant python-scipy)))
3858
3859(define-public python-socksipy-branch
3860 (package
3861 (name "python-socksipy-branch")
3862 (version "1.01")
3863 (source
3864 (origin
3865 (method url-fetch)
3866 (uri (pypi-uri "SocksiPy-branch" version))
3867 (sha256
3868 (base32
3869 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
3870 (build-system python-build-system)
3871 (arguments
3872 `(#:tests? #f)) ; There are no tests
3873 (home-page "https://code.google.com/archive/p/socksipy-branch/")
3874 (synopsis "Python SOCKS module")
3875 (description
3876 "SocksiPy - A Python SOCKS client module. It provides a
3877socket-like interface that supports connections to any TCP
3878service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
3879The original version was developed by Dan Haim, this is a
3880branch created by Mario Vilas to address some open issues,
3881as the original project seems to have been abandoned circa 2007.")
3882 (license license:bsd-3)))
3883
3884(define-public python2-socksipy-branch
3885 (package-with-python2 python-socksipy-branch))
3886
3887(define-public python-pycodestyle
3888 (package
3889 (name "python-pycodestyle")
3890 (version "2.4.0")
3891 (source
3892 (origin
3893 (method url-fetch)
3894 (uri (pypi-uri "pycodestyle" version))
3895 (sha256
3896 (base32
3897 "0fhy4vnlgpjq4qd1wdnl6pvdw7rah0ypmn8c9mkhz8clsndskz6b"))))
3898 (build-system python-build-system)
3899 (home-page "https://pycodestyle.readthedocs.io/")
3900 (synopsis "Python style guide checker")
3901 (description "@code{pycodestyle} (formerly pep8) is a tool to check
3902Python code against some of the style conventions in
3903@url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
3904 (license license:expat)))
3905
3906(define-public python2-pycodestyle
3907 (package-with-python2 python-pycodestyle))
3908
3909(define-public python-multidict
3910 (package
3911 (name "python-multidict")
3912 (version "4.2.0")
3913 (source
3914 (origin
3915 (method url-fetch)
3916 (uri (pypi-uri "multidict" version))
3917 (sha256
3918 (base32
3919 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
3920 (build-system python-build-system)
3921 (native-inputs
3922 `(("python-pytest" ,python-pytest)
3923 ("python-pytest-runner" ,python-pytest-runner)))
3924 (home-page "https://github.com/aio-libs/multidict/")
3925 (synopsis "Multidict implementation")
3926 (description "Multidict is dict-like collection of key-value pairs
3927where key might be occurred more than once in the container.")
3928 (license license:asl2.0)))
3929
3930(define-public python-orderedmultidict
3931 (package
3932 (name "python-orderedmultidict")
3933 (version "0.7.11")
3934 (source
3935 (origin
3936 (method url-fetch)
3937 (uri (pypi-uri "orderedmultidict" version))
3938 (sha256
3939 (base32
3940 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
3941 (build-system python-build-system)
3942 (arguments
3943 `(#:phases
3944 (modify-phases %standard-phases
3945 (add-after 'unpack 'fix-tests
3946 (lambda _
3947 ;; The package uses nosetest for running the tests.
3948 ;; Adding this initfile allows to run the test suite
3949 ;; without requiring nosetest.
d1c4f329
RW
3950 (with-output-to-file "tests/__init__.py" newline)
3951 #t)))))
44d10b1f
RW
3952 (propagated-inputs
3953 `(("python-six" ,python-six)))
3954 (native-inputs
3955 `(("python-pycodestyle" ,python-pycodestyle)))
3956 (home-page "https://github.com/gruns/orderedmultidict")
3957 (synopsis "Python Ordered Multivalue Dictionary - omdict")
3958 (description "This package contains a library for ordered multivalue
3959dictionaries. A multivalue dictionary is a dictionary that can store
3960multiple values for the same key. An ordered multivalue dictionary is a
3961multivalue dictionary that retains the order of insertions and deletions.")
3962 (license license:unlicense)))
3963
3964(define-public python2-orderedmultidict
3965 (package-with-python2 python-orderedmultidict))
3966
3967(define-public python-autopep8
3968 (package
3969 (name "python-autopep8")
3970 (version "1.3.5")
3971 (source
3972 (origin
3973 (method url-fetch)
3974 (uri (pypi-uri "autopep8" version))
3975 (sha256
3976 (base32
3977 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
3978 (build-system python-build-system)
3979 (propagated-inputs
3980 `(("python-pycodestyle" ,python-pycodestyle)))
3981 (home-page "https://github.com/hhatto/autopep8")
3982 (synopsis "Format Python code according to the PEP 8 style guide")
3983 (description
3984 "@code{autopep8} automatically formats Python code to conform to
3985the PEP 8 style guide. It uses the pycodestyle utility to determine
3986what parts of the code needs to be formatted. @code{autopep8} is
3987capable of fixing most of the formatting issues that can be reported
3988by pycodestyle.")
3989 (license (license:non-copyleft
3990 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
3991
3992(define-public python2-autopep8
3993 (package-with-python2 python-autopep8))
3994
3995(define-public python-distutils-extra
3996 (package
3997 (name "python-distutils-extra")
3998 (version "2.38")
3999 (source
4000 (origin
4001 (method url-fetch)
4002 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4003 version "/+download/python-distutils-extra-"
4004 version ".tar.gz"))
4005 (sha256
4006 (base32
4007 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4008 (build-system python-build-system)
4009 (home-page "https://launchpad.net/python-distutils-extra/")
4010 (synopsis "Enhancements to Python's distutils")
4011 (description
4012 "The python-distutils-extra module enables you to easily integrate
4013gettext support, themed icons, and scrollkeeper-based documentation into
4014Python's distutils.")
4015 (license license:gpl2)))
4016
4017(define-public python2-distutils-extra
4018 (package-with-python2 python-distutils-extra))
4019
4020(define-public python2-elib.intl
4021 (package
4022 (name "python2-elib.intl")
4023 (version "0.0.3")
4024 (source
4025 (origin
4026 ;; This project doesn't tag releases or publish tarballs, so we take
4027 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4028 (method git-fetch)
4029 (uri (git-reference
4030 (url "https://github.com/dieterv/elib.intl.git")
4031 (commit "d09997cfef")))
4032 (file-name (string-append name "-" version "-checkout"))
4033 (sha256
4034 (base32
4035 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4036 (build-system python-build-system)
4037 (arguments
4038 ;; incompatible with Python 3 (exception syntax)
4039 `(#:python ,python-2
4040 #:tests? #f))
4041 (home-page "https://github.com/dieterv/elib.intl")
4042 (synopsis "Enhanced internationalization for Python")
4043 (description
4044 "The elib.intl module provides enhanced internationalization (I18N)
4045services for your Python modules and applications.")
4046 (license license:lgpl3+)))
4047
4048(define-public python-olefile
4049 (package
4050 (name "python-olefile")
4051 (version "0.45.1")
4052 (source
4053 (origin
4054 (method url-fetch)
4055 (uri (string-append "https://github.com/decalage2/olefile/archive/v"
4056 version ".tar.gz"))
4057 (file-name (string-append name "-" version ".tar.gz"))
4058 (sha256
4059 (base32
4060 "18ai19zwagm6nli14k8bii31ipbab2rp7plrvsm6gmfql551a8ai"))))
4061 (build-system python-build-system)
4062 (home-page
4063 "https://www.decalage.info/python/olefileio")
4064 (synopsis "Read and write Microsoft OLE2 files.")
4065 (description
4066 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
4067Storage or Compound Document, Microsoft Office). It is an improved version of
4068the OleFileIO module from PIL, the Python Image Library.")
4069 (license license:bsd-3)))
4070
4071(define-public python2-olefile
4072 (package-with-python2 python-olefile))
4073
4074(define-public python-pillow
4075 (package
4076 (name "python-pillow")
4077 (version "5.4.1")
4078 (source
4079 (origin
4080 (method url-fetch)
4081 (uri (pypi-uri "Pillow" version))
4082 (sha256
4083 (base32
4084 "17waygkhhzjd75kajlfw9v57mbb41lcpg6cvkdijqd7smm76ccsj"))))
4085 (build-system python-build-system)
4086 (native-inputs
4087 `(("python-pytest" ,python-pytest)))
4088 (inputs
4089 `(("freetype" ,freetype)
4090 ("lcms" ,lcms)
4091 ("zlib" ,zlib)
4092 ("libjpeg" ,libjpeg)
4093 ("openjpeg" ,openjpeg)
4094 ("libtiff" ,libtiff)
4095 ("libwebp" ,libwebp)))
4096 (propagated-inputs
4097 `(("python-olefile" ,python-olefile)))
4098 (arguments
4099 `(#:phases
4100 (modify-phases %standard-phases
4101 (add-after 'unpack 'patch-ldconfig
4102 (lambda _
4103 (substitute* "setup.py"
4104 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
4105 (delete 'check) ; We must run checks after python-pillow is installed.
4106 (add-after 'install 'check-installed
4107 (lambda* (#:key outputs inputs #:allow-other-keys)
4108 (begin
4109 (setenv "HOME" (getcwd))
4110 ;; Make installed package available for running the tests.
4111 (add-installed-pythonpath inputs outputs)
4112 (invoke "python" "selftest.py" "--installed")
4113 (invoke "python" "-m" "pytest" "-vv")))))))
4114 (home-page "https://python-pillow.org")
4115 (synopsis "Fork of the Python Imaging Library")
4116 (description
4117 "The Python Imaging Library adds image processing capabilities to your
4118Python interpreter. This library provides extensive file format support, an
4119efficient internal representation, and fairly powerful image processing
4120capabilities. The core image library is designed for fast access to data
4121stored in a few basic pixel formats. It should provide a solid foundation for
4122a general image processing tool.")
4123 (license (license:x11-style
4124 "http://www.pythonware.com/products/pil/license.htm"
4125 "The PIL Software License"))))
4126
4127(define-public python2-pillow
4128 (package-with-python2 python-pillow))
4129
4130(define-public python-pycparser
4131 (package
4132 (name "python-pycparser")
4133 (version "2.18")
4134 (source
4135 (origin
4136 (method url-fetch)
4137 (uri (pypi-uri "pycparser" version))
4138 (sha256
4139 (base32
4140 "09mjyw82ibqzl449g7swy8bfxnfpmas0815d2rkdjlcqw81wma4r"))))
4141 (outputs '("out" "doc"))
4142 (build-system python-build-system)
4143 (native-inputs
4144 `(("pkg-config" ,pkg-config)))
4145 (arguments
4146 `(#:phases
4147 (modify-phases %standard-phases
4148 (replace 'check
4149 (lambda _
4150 (with-directory-excursion "tests"
acb75c03
RW
4151 (invoke "python" "all_tests.py"))
4152 #t))
44d10b1f
RW
4153 (add-after 'install 'install-doc
4154 (lambda* (#:key outputs #:allow-other-keys)
4155 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4156 (doc (string-append data "/doc/" ,name "-" ,version))
4157 (examples (string-append doc "/examples")))
4158 (mkdir-p examples)
4159 (for-each (lambda (file)
4160 (copy-file (string-append "." file)
4161 (string-append doc file)))
4162 '("/README.rst" "/CHANGES" "/LICENSE"))
4163 (copy-recursively "examples" examples)))))))
4164 (home-page "https://github.com/eliben/pycparser")
4165 (synopsis "C parser in Python")
4166 (description
4167 "Pycparser is a complete parser of the C language, written in pure Python
4168using the PLY parsing library. It parses C code into an AST and can serve as
4169a front-end for C compilers or analysis tools.")
4170 (license license:bsd-3)))
4171
4172(define-public python2-pycparser
4173 (package-with-python2 python-pycparser))
4174
4175(define-public python-pywavelets
4176 (package
4177 (name "python-pywavelets")
4178 (version "1.0.1")
4179 (home-page "https://github.com/PyWavelets/pywt")
4180 (source (origin
4181 (method url-fetch)
4182 (uri (pypi-uri "PyWavelets" version))
4183 (sha256
4184 (base32
4185 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
4186 (build-system python-build-system)
4187 (arguments
4188 '(#:modules ((ice-9 ftw)
4189 (srfi srfi-1)
4190 (srfi srfi-26)
4191 (guix build utils)
4192 (guix build python-build-system))
4193 #:phases (modify-phases %standard-phases
4194 (replace 'check
4195 (lambda _
4196 (let ((cwd (getcwd))
4197 (libdir (find (cut string-prefix? "lib." <>)
4198 (scandir "build"))))
4199 (with-directory-excursion (string-append cwd "/build/" libdir)
4200 (invoke "nosetests" "-v" "."))))))))
4201 (native-inputs
4202 `(("python-matplotlib" ,python-matplotlib) ;for tests
4203 ("python-nose" ,python-nose)))
4204 (propagated-inputs
4205 `(("python-numpy" ,python-numpy)))
4206 (synopsis "Wavelet transforms in Python")
4207 (description
4208 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
4209mathematical basis functions that are localized in both time and frequency.
4210Wavelet transforms are time-frequency transforms employing wavelets. They are
4211similar to Fourier transforms, the difference being that Fourier transforms are
4212localized only in frequency instead of in time and frequency.")
4213 (license license:expat)))
4214
4215(define-public python2-pywavelets
4216 (package-with-python2 python-pywavelets))
4217
4218(define-public python-xcffib
4219 (package
4220 (name "python-xcffib")
4221 (version "0.6.0")
4222 (source
4223 (origin
4224 (method url-fetch)
4225 (uri (pypi-uri "xcffib" version))
4226 (sha256
4227 (base32
4228 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
4229 (build-system python-build-system)
4230 (inputs
4231 `(("libxcb" ,libxcb)))
4232 (propagated-inputs
4233 `(("python-cffi" ,python-cffi) ; used at run time
4234 ("python-six" ,python-six)))
4235 (arguments
4236 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4237 #:tests? #f
4238 #:phases
4239 (modify-phases %standard-phases
4240 (add-after 'unpack 'fix-libxcb-path
4241 (lambda* (#:key inputs #:allow-other-keys)
4242 (let ((libxcb (assoc-ref inputs "libxcb")))
4243 (substitute* '("xcffib/__init__.py")
4244 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4245 #t)))
4246 (add-after 'install 'install-doc
4247 (lambda* (#:key outputs #:allow-other-keys)
4248 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4249 "/doc/" ,name "-" ,version)))
4250 (mkdir-p doc)
4251 (copy-file "README.md"
4252 (string-append doc "/README.md"))
4253 #t))))))
4254 (home-page "https://github.com/tych0/xcffib")
4255 (synopsis "XCB Python bindings")
4256 (description
4257 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4258support for Python 3 and PyPy. It is based on cffi.")
4259 (license license:expat)))
4260
4261(define-public python2-xcffib
4262 (package-with-python2 python-xcffib))
4263
4264(define-public python-cairocffi
4265 (package
4266 (name "python-cairocffi")
4267 (version "0.9.0")
4268 (source
4269 (origin
4270 (method url-fetch)
4271 (uri (pypi-uri "cairocffi" version))
4272 (sha256
4273 (base32
4274 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
4275 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
4276 (build-system python-build-system)
4277 (outputs '("out" "doc"))
4278 (inputs
4279 `(("glib" ,glib)
4280 ("gtk+" ,gtk+)
4281 ("gdk-pixbuf" ,gdk-pixbuf)
4282 ("cairo" ,cairo)
4283 ("pango" ,pango)))
4284 (native-inputs
4285 `(("pkg-config" ,pkg-config)
4286 ("python-pytest" ,python-pytest)
4287 ("python-pytest-cov" ,python-pytest-cov)
4288 ("python-pytest-runner" ,python-pytest-runner)
4289 ("python-sphinx" ,python-sphinx)
4290 ("python-docutils" ,python-docutils)))
4291 (propagated-inputs
4292 `(("python-xcffib" ,python-xcffib))) ; used at run time
4293 (arguments
4294 `(#:phases
4295 (modify-phases %standard-phases
4296 (add-after 'unpack 'patch-paths
4297 (lambda* (#:key inputs outputs #:allow-other-keys)
4298 (substitute* (find-files "." "\\.py$")
4299 (("dlopen\\(ffi, 'cairo'")
4300 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
4301 "/lib/libcairo.so.2'"))
4302 (("dlopen\\(ffi, 'gdk-3'")
4303 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
4304 "/lib/libgtk-3.so.0'"))
4305 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
4306 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
4307 "/lib/libgdk_pixbuf-2.0.so.0'"))
4308 (("dlopen\\(ffi, 'glib-2.0'")
4309 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4310 "/lib/libglib-2.0.so.0'"))
4311 (("dlopen\\(ffi, 'gobject-2.0'")
4312 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4313 "/lib/libgobject-2.0.so.0'"))
4314 (("dlopen\\(ffi, 'pangocairo-1.0'")
4315 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4316 "/lib/libpangocairo-1.0.so.0'"))
4317 (("dlopen\\(ffi, 'pango-1.0'")
4318 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4319 "/lib/libpango-1.0.so.0'")))
4320 #t))
4321 (add-after 'install 'install-doc
4322 (lambda* (#:key inputs outputs #:allow-other-keys)
4323 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4324 (doc (string-append data "/doc/" ,name "-" ,version))
4325 (html (string-append doc "/html")))
4326 (setenv "LD_LIBRARY_PATH"
4327 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4328 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4329 (setenv "LANG" "en_US.UTF-8")
4330 (mkdir-p html)
4331 (for-each (lambda (file)
4332 (copy-file (string-append "." file)
4333 (string-append doc file)))
4334 '("/README.rst" "/CHANGES" "/LICENSE"))
4335 (system* "python" "setup.py" "build_sphinx")
4336 (copy-recursively "docs/_build/html" html)
4337 #t))))))
4338 (home-page "https://github.com/Kozea/cairocffi")
4339 (synopsis "Python bindings and object-oriented API for Cairo")
4340 (description
4341 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4342Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4343graphics library with support for multiple backends including image buffers,
4344PNG, PostScript, PDF, and SVG file output.")
4345 (license license:bsd-3)))
4346
4347(define-public python2-cairocffi
4348 (package-with-python2 python-cairocffi))
4349
4350(define-public python-decorator
4351 (package
4352 (name "python-decorator")
4353 (version "4.3.0")
4354 (source
4355 (origin
4356 (method url-fetch)
4357 (uri (pypi-uri "decorator" version))
4358 (sha256
4359 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4360 (build-system python-build-system)
4361 (home-page "https://pypi.python.org/pypi/decorator/")
4362 (synopsis "Python module to simplify usage of decorators")
4363 (description
4364 "The aim of the decorator module is to simplify the usage of decorators
4365for the average programmer, and to popularize decorators usage giving examples
4366of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4367etc. The core of this module is a decorator factory.")
4368 (license license:expat)))
4369
4370(define-public python2-decorator
4371 (package-with-python2 python-decorator))
4372
4373(define-public python-drmaa
4374 (package
4375 (name "python-drmaa")
4376 (version "0.7.7")
4377 (source
4378 (origin
4379 (method url-fetch)
4380 (uri (pypi-uri "drmaa" version))
4381 (sha256
4382 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4383 (build-system python-build-system)
4384 ;; The test suite requires libdrmaa which is provided by the cluster
4385 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4386 ;; should be set to the path of the libdrmaa library.
4387 (arguments '(#:tests? #f))
4388 (native-inputs
4389 `(("python-nose" ,python-nose)))
4390 (home-page "https://pypi.python.org/pypi/drmaa")
4391 (synopsis "Python bindings for the DRMAA library")
4392 (description
4393 "A Python package for Distributed Resource Management (DRM) job
4394submission and control. This package is an implementation of the DRMAA 1.0
4395Python language binding specification.")
4396 (license license:bsd-3)))
4397
4398(define-public python2-drmaa
4399 (package-with-python2 python-drmaa))
4400
4401(define-public python-grako
4402 (package
4403 (name "python-grako")
4404 (version "3.99.9")
4405 (source
4406 (origin
4407 (method url-fetch)
4408 (uri
4409 (pypi-uri "grako" version ".zip"))
4410 (sha256
4411 (base32
4412 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4413 (build-system python-build-system)
4414 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4415 (native-inputs
4416 `(("unzip" ,unzip)
4417 ("python-pytest" ,python-pytest)
4418 ("python-pytest-runner" ,python-pytest-runner)))
4419 (home-page "https://bitbucket.org/neogeny/grako")
4420 (synopsis "EBNF parser generator")
4421 (description
4422 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4423memoizing PEG/Packrat parser in Python.")
4424 (license license:bsd-3)))
4425
4426(define-public python2-grako
4427 (package-with-python2 python-grako))
4428
4429(define-public python-gridmap
4430 (package
4431 (name "python-gridmap")
4432 (version "0.13.0")
4433 (source
4434 (origin
4435 (method url-fetch)
4436 (uri (string-append
4437 "https://github.com/pygridtools/gridmap/archive/v"
4438 version ".tar.gz"))
4439 (file-name (string-append name "-" version ".tar.gz"))
4440 (sha256
4441 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
4442 (build-system python-build-system)
4443 (arguments
4444 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4445 (propagated-inputs
4446 `(("python-psutil" ,python-psutil)
4447 ("python-drmaa" ,python-drmaa)
4448 ("python-pyzmq" ,python-pyzmq)))
4449 (home-page "https://github.com/pygridtools/gridmap")
4450 (synopsis "Create jobs on a cluster directly from Python")
4451 (description
4452 "Gridmap is a Python package to allow you to easily create jobs on the
4453cluster directly from Python. You can directly map Python functions onto the
4454cluster without needing to write any wrapper code yourself.")
4455 (license license:gpl3+)))
4456
4457(define-public python2-gridmap
4458 (package-with-python2 python-gridmap))
4459
4460(define-public python-honcho
4461 (package
4462 (name "python-honcho")
4463 (version "1.0.1")
4464 (source
4465 (origin
4466 (method url-fetch)
4467 (uri (string-append
4468 "https://github.com/nickstenning/honcho/archive/v"
4469 version ".tar.gz"))
4470 (file-name (string-append name "-" version ".tar.gz"))
4471 (sha256
4472 (base32 "0zizn61n5z5hq421hkypk9pw8s6fpxw30f4hsg7k4ivwzy3gjw9j"))))
4473 (build-system python-build-system)
4474 (native-inputs
4475 `(("python-pytest" ,python-pytest)
4476 ("python-mock" ,python-mock)
4477 ("python-tox" ,python-tox)
4478 ("which" ,which))) ;for tests
4479 (propagated-inputs
4480 `(("python-jinja2" ,python-jinja2)))
4481 (arguments
4482 `(#:phases
4483 (modify-phases %standard-phases
4484 (delete 'check)
4485 (add-after 'install 'check
4486 (lambda* (#:key outputs inputs #:allow-other-keys)
4487 ;; fix honcho path in testsuite
4488 (substitute* "tests/conftest.py"
4489 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4490 "/bin/honcho" "'")))
4491 ;; It's easier to run tests after install.
4492 ;; Make installed package available for running the tests
4493 (add-installed-pythonpath inputs outputs)
95b707fb 4494 (invoke "py.test" "-v"))))))
44d10b1f
RW
4495 (home-page "https://github.com/nickstenning/honcho")
4496 (synopsis "Manage Procfile-based applications")
4497 (description
4498 "A Procfile is a file which describes how to run an application
4499consisting of serveral processes. honcho starts all listed processes.
4500The output of all running processes is collected by honcho and
4501displayed.")
4502 (license license:expat)))
4503
4504(define-public python2-honcho
4505 (package-with-python2 python-honcho))
4506
4507(define-public python-pexpect
4508 (package
4509 (name "python-pexpect")
4510 (version "4.6.0")
4511 (source
4512 (origin
4513 (method url-fetch)
4514 (uri (pypi-uri "pexpect" version))
4515 (sha256
4516 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
4517 (build-system python-build-system)
4518 (arguments
4519 `(#:phases
4520 (modify-phases %standard-phases
4521 (add-before 'check 'prepare-tests
4522 (lambda _
4523 (substitute* (find-files "tests")
4524 (("/bin/ls") (which "ls"))
4525 (("/bin/echo") (which "echo"))
4526 (("/bin/which") (which "which"))
4527 ;; Many tests try to use the /bin directory which
4528 ;; is not present in the build environment.
4529 ;; Use one that's non-empty and unlikely to change.
4530 (("/bin'") "/dev'"))
4531 ;; XXX: Socket connection test gets "Connection reset by peer".
4532 ;; Why does it not work? Delete for now.
4533 (delete-file "tests/test_socket.py")
4534 #t))
4535 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
4536 (native-inputs
4537 `(("python-nose" ,python-nose)
4538 ("python-pytest" ,python-pytest)
4539 ("man-db" ,man-db)
4540 ("which" ,which)
4541 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
4542 (propagated-inputs
4543 `(("python-ptyprocess" ,python-ptyprocess)))
4544 (home-page "http://pexpect.readthedocs.org/")
4545 (synopsis "Controlling interactive console applications")
4546 (description
4547 "Pexpect is a pure Python module for spawning child applications;
4548controlling them; and responding to expected patterns in their output.
4549Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4550child application and control it as if a human were typing commands.")
4551 (license license:isc)))
4552
4553(define-public python2-pexpect
4554 (package-with-python2 python-pexpect))
4555
4556(define-public python-setuptools-scm
4557 (package
4558 (name "python-setuptools-scm")
4559 (version "3.1.0")
4560 (source (origin
4561 (method url-fetch)
4562 (uri (pypi-uri "setuptools_scm" version))
4563 (sha256
4564 (base32
4565 "0h4bglwfz8b9prqljv8z3w9rgydfyxzaj05bm1y6zs5m6shz548i"))))
4566 (build-system python-build-system)
4567 (home-page "https://github.com/pypa/setuptools_scm/")
4568 (synopsis "Manage Python package versions in SCM metadata")
4569 (description
4570 "Setuptools_scm handles managing your Python package versions in
4571@dfn{software configuration management} (SCM) metadata instead of declaring
4572them as the version argument or in a SCM managed file.")
4573 (license license:expat)))
4574
4575(define-public python2-setuptools-scm
4576 (package-with-python2 python-setuptools-scm))
4577
4578(define-public python-pathpy
4579 (package
4580 (name "python-pathpy")
4581 (version "11.0.1")
4582 (source
4583 (origin
4584 (method url-fetch)
4585 (uri (pypi-uri "path.py" version))
4586 (sha256
4587 (base32 "07x15v8c7ry9bvycw294c9yq6ky9v2b0dalvgi6rn38ilh69vsz7"))))
4588 ;; (outputs '("out" "doc"))
4589 (build-system python-build-system)
4590 (propagated-inputs
4591 `(("python-appdirs" ,python-appdirs)))
4592 (native-inputs
4593 `(("python-setuptools-scm" ,python-setuptools-scm)
4594 ("python-sphinx" ,python-sphinx)
4595 ("python-rst.linker" ,python-rst.linker)
4596 ("python-pytest" ,python-pytest)
4597 ("python-pytest-runner" ,python-pytest-runner)))
4598 (arguments
4599 ;; FIXME: Documentation and tests require "jaraco.packaging".
4600 `(#:tests? #f))
4601 ;; #:phases
4602 ;; (modify-phases %standard-phases
4603 ;; (add-after 'build 'build-doc
4604 ;; (lambda _
4605 ;; (setenv "LANG" "en_US.UTF-8")
4606 ;; (zero? (system* "python" "setup.py" "build_sphinx"))))
4607 ;; (add-after 'install 'install-doc
4608 ;; (lambda* (#:key outputs #:allow-other-keys)
4609 ;; (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4610 ;; (doc (string-append data "/doc/" ,name "-" ,version))
4611 ;; (html (string-append doc "/html")))
4612 ;; (mkdir-p html)
4613 ;; (for-each (lambda (file)
4614 ;; (copy-file file (string-append doc "/" file)))
4615 ;; '("README.rst" "CHANGES.rst"))
4616 ;; (copy-recursively "build/sphinx/html" html)))))))
4617 (home-page "https://github.com/jaraco/path.py")
4618 (synopsis "Python module wrapper for built-in os.path")
4619 (description
4620 "@code{path.py} implements path objects as first-class entities, allowing
4621common operations on files to be invoked on those path objects directly.")
4622 (license license:expat)))
4623
4624(define-public python2-pathpy
4625 (package-with-python2 python-pathpy))
4626
4627(define-public python-simplegeneric
4628 (package
4629 (name "python-simplegeneric")
4630 (version "0.8.1")
4631 (source
4632 (origin
4633 (method url-fetch)
6c8c3980 4634 (uri (pypi-uri "simplegeneric" version ".zip"))
44d10b1f
RW
4635 (sha256
4636 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4637 (build-system python-build-system)
4638 (native-inputs
4639 `(("unzip" ,unzip)))
4640 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
4641 (synopsis "Python module for simple generic functions")
4642 (description
4643 "The simplegeneric module lets you define simple single-dispatch generic
4644functions, akin to Python’s built-in generic functions like @code{len()},
4645@code{iter()} and so on. However, instead of using specially-named methods,
4646these generic functions use simple lookup tables, akin to those used by
4647e.g. @code{pickle.dump()} and other generic functions found in the Python
4648standard library.")
4649 (license license:zpl2.1)))
4650
4651(define-public python2-simplegeneric
4652 (package-with-python2 python-simplegeneric))
4653
4654(define-public python-ipython-genutils
4655 ;; TODO: This package is retired, check if can be removed, see description.
4656 (package
4657 (name "python-ipython-genutils")
4658 (version "0.1.0")
4659 (source
4660 (origin
4661 (method url-fetch)
c9671d4b 4662 (uri (pypi-uri "ipython_genutils" version))
44d10b1f
RW
4663 (sha256
4664 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
4665 (build-system python-build-system)
4666 (arguments `(#:tests? #f)) ; no tests
4667 (home-page "https://ipython.org")
4668 (synopsis "Vestigial utilities from IPython")
4669 (description
4670 "This package provides retired utilities from IPython. No packages
4671outside IPython/Jupyter should depend on it.
4672
4673This package shouldn't exist. It contains some common utilities shared by
4674Jupyter and IPython projects during The Big Split. As soon as possible, those
4675packages will remove their dependency on this, and this package will go
4676away.")
4677 (license license:bsd-3)))
4678
4679(define-public python2-ipython-genutils
4680 (package-with-python2 python-ipython-genutils))
4681
4682(define-public python-traitlets
4683 (package
4684 (name "python-traitlets")
4685 (version "4.3.2")
4686 (source
4687 (origin
4688 (method url-fetch)
4689 (uri (pypi-uri "traitlets" version))
4690 (sha256
4691 (base32
4692 "0dbq7sx26xqz5ixs711k5nc88p8a0nqyz6162pwks5dpcz9d4jww"))))
4693 (build-system python-build-system)
4694 (arguments
4695 `(#:phases
4696 (modify-phases %standard-phases
4697 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
4698 (propagated-inputs
4699 `(("python-ipython-genutils" ,python-ipython-genutils)
4700 ("python-decorator" ,python-decorator))) ;not needed for >4.3.2
4701 (native-inputs
4702 `(("python-pytest" ,python-pytest)))
4703 (properties `((python2-variant . ,(delay python2-traitlets))))
4704 (home-page "https://ipython.org")
4705 (synopsis "Configuration system for Python applications")
4706 (description
4707 "Traitlets is a framework that lets Python classes have attributes with
4708type checking, dynamically calculated default values, and ‘on change’
4709callbacks. The package also includes a mechanism to use traitlets for
4710configuration, loading values from files or from command line arguments. This
4711is a distinct layer on top of traitlets, so you can use traitlets in your code
4712without using the configuration machinery.")
4713 (license license:bsd-3)))
4714
4715(define-public python2-traitlets
4716 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
4717 (package
4718 (inherit traitlets)
4719 (propagated-inputs
4720 `(("python2-enum34" ,python2-enum34)
4721 ,@(package-propagated-inputs traitlets))))))
4722
4723(define-public python-jupyter-core
4724 (package
4725 (name "python-jupyter-core")
4726 (version "4.4.0")
4727 (source
4728 (origin
4729 (method url-fetch)
4730 (uri (string-append (pypi-uri "jupyter_core" version)))
4731 (sha256
4732 (base32
4733 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
4734 (build-system python-build-system)
4735 ;; FIXME: not sure how to run the tests
4736 (arguments `(#:tests? #f))
4737 (propagated-inputs
4738 `(("python-traitlets" ,python-traitlets)))
4739 (home-page "http://jupyter.org/")
4740 (synopsis "Jupyter base package")
4741 (description
4742 "Jupyter core is the base package on which Jupyter projects rely.")
4743 (license license:bsd-3)))
4744
4745(define-public python2-jupyter-core
4746 (package-with-python2 python-jupyter-core))
4747
4748(define-public python-jupyter-client
4749 (package
4750 (name "python-jupyter-client")
4751 (version "5.2.4")
4752 (source
4753 (origin
4754 (method url-fetch)
4755 (uri (pypi-uri "jupyter_client" version))
4756 (sha256
4757 (base32
4758 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
4759 (build-system python-build-system)
4760 ;; Tests fail because of missing native python kernel which I assume is
4761 ;; provided by the ipython package, which we cannot use because it would
4762 ;; cause a dependency cycle.
4763 (arguments `(#:tests? #f))
4764 (propagated-inputs
4765 `(("python-pyzmq" ,python-pyzmq)
4766 ("python-traitlets" ,python-traitlets)
4767 ("python-jupyter-core" ,python-jupyter-core)))
4768 (home-page "http://jupyter.org/")
4769 (synopsis "Jupyter protocol implementation and client libraries")
4770 (description
4771 "The @code{jupyter_client} package contains the reference implementation
4772of the Jupyter protocol. It also provides client and kernel management APIs
4773for working with kernels, and the @code{jupyter kernelspec} entrypoint for
4774installing @code{kernelspec}s for use with Jupyter frontends.")
4775 (license license:bsd-3)))
4776
4777(define-public python2-jupyter-client
4778 (package-with-python2 python-jupyter-client))
4779
4780(define-public python-ipykernel
4781 (package
4782 (name "python-ipykernel")
4783 (version "5.1.0")
4784 (source
4785 (origin
4786 (method url-fetch)
4787 (uri (pypi-uri "ipykernel" version))
4788 (sha256
4789 (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g"))))
4790 (build-system python-build-system)
4791 (arguments
4792 `(#:phases
4793 (modify-phases %standard-phases
4794 (replace 'check
4795 (lambda _
4796 (setenv "HOME" "/tmp")
4797 (invoke "pytest" "-v")
4798 #t)))))
4799 (propagated-inputs
4800 `(("python-ipython" ,python-ipython)
4801 ;; imported at runtime during connect
4802 ("python-jupyter-client" ,python-jupyter-client)))
4803 (native-inputs
4804 `(("python-pytest" ,python-pytest)
4805 ("python-nose" ,python-nose)))
4806 (home-page "https://ipython.org")
4807 (synopsis "IPython Kernel for Jupyter")
4808 (description
4809 "This package provides the IPython kernel for Jupyter.")
4810 (license license:bsd-3)))
4811
4812(define-public python2-ipykernel
4813 (package-with-python2 python-ipykernel))
4814
966aa714
AE
4815(define-public python-pari-jupyter
4816 (package
4817 (name "python-pari-jupyter")
4818 (version "1.3.2")
4819 (source
4820 (origin
4821 (method url-fetch)
4822 (uri (pypi-uri "pari_jupyter" version))
4823 (sha256
4824 (base32
4825 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
4826 (build-system python-build-system)
4827 (propagated-inputs
4828 `(("python-ipykernel" ,python-ipykernel)))
4829 (inputs
4830 `(("pari-gp" ,pari-gp)
4831 ("readline" ,readline)))
4832 (arguments
4833 `(#:tests? #f)) ; no test suite
4834 (home-page
4835 "https://github.com/jdemeyer/pari_jupyter")
4836 (synopsis "A Jupyter kernel for PARI/GP")
4837 (description "The package provides a PARI/GP kernel for Jupyter.")
4838 (license license:gpl3+)))
4839
44d10b1f
RW
4840;; This is the latest release of the LTS version of ipython with support for
4841;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
4842;; dropped support for Python 2.7. We may want to rename this package.
4843(define-public python-ipython
4844 (package
4845 (name "python-ipython")
4846 (version "5.8.0")
4847 (source
4848 (origin
4849 (method url-fetch)
4850 (uri (pypi-uri "ipython" version ".tar.gz"))
4851 (sha256
4852 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
4853 (build-system python-build-system)
4854 (outputs '("out" "doc"))
4855 (propagated-inputs
4856 `(("python-pyzmq" ,python-pyzmq)
4857 ("python-prompt-toolkit" ,python-prompt-toolkit-1)
4858 ("python-terminado" ,python-terminado)
4859 ("python-matplotlib" ,python-matplotlib)
4860 ("python-numpy" ,python-numpy)
4861 ("python-numpydoc" ,python-numpydoc)
4862 ("python-jinja2" ,python-jinja2)
4863 ("python-mistune" ,python-mistune)
4864 ("python-pexpect" ,python-pexpect)
4865 ("python-pickleshare" ,python-pickleshare)
4866 ("python-simplegeneric" ,python-simplegeneric)
4867 ("python-jsonschema" ,python-jsonschema)
4868 ("python-traitlets" ,python-traitlets)
4869 ("python-nbformat" ,python-nbformat)
4870 ("python-pygments" ,python-pygments)))
4871 (inputs
4872 `(("readline" ,readline)
4873 ("which" ,which)))
4874 (native-inputs
4875 `(("graphviz" ,graphviz)
4876 ("pkg-config" ,pkg-config)
4877 ("python-requests" ,python-requests) ;; for tests
4878 ("python-testpath" ,python-testpath)
4879 ("python-nose" ,python-nose)
4880 ("python-sphinx" ,python-sphinx)
4881 ("python-shpinx-rtd-theme" ,python-sphinx-rtd-theme)
4882 ;; FIXME: It's possible that a smaller union would work just as well.
4883 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
4884 texlive-fonts-ec
4885 texlive-generic-ifxetex
4886 texlive-generic-pdftex
4887 texlive-latex-amsfonts
4888 texlive-latex-capt-of
4889 texlive-latex-cmap
4890 texlive-latex-environ
4891 texlive-latex-eqparbox
4892 texlive-latex-etoolbox
4893 texlive-latex-expdlist
4894 texlive-latex-fancyhdr
4895 texlive-latex-fancyvrb
4896 texlive-latex-fncychap
4897 texlive-latex-float
4898 texlive-latex-framed
4899 texlive-latex-geometry
4900 texlive-latex-graphics
4901 texlive-latex-hyperref
4902 texlive-latex-mdwtools
4903 texlive-latex-multirow
4904 texlive-latex-oberdiek
4905 texlive-latex-parskip
4906 texlive-latex-preview
4907 texlive-latex-tabulary
4908 texlive-latex-threeparttable
4909 texlive-latex-titlesec
4910 texlive-latex-trimspaces
4911 texlive-latex-ucs
4912 texlive-latex-upquote
4913 texlive-latex-url
4914 texlive-latex-varwidth
4915 texlive-latex-wrapfig)))
4916 ("texinfo" ,texinfo)))
4917 (arguments
4918 `(#:phases
4919 (modify-phases %standard-phases
4920 (add-after 'install 'install-doc
4921 (lambda* (#:key inputs outputs #:allow-other-keys)
4922 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4923 (doc (string-append data "/doc/" ,name "-" ,version))
4924 (html (string-append doc "/html"))
4925 (man1 (string-append data "/man/man1"))
4926 (info (string-append data "/info"))
4927 (examples (string-append doc "/examples"))
4928 (python-arg (string-append "PYTHON=" (which "python"))))
4929 (setenv "LANG" "en_US.utf8")
4930 ;; Make installed package available for running the tests
4931 (add-installed-pythonpath inputs outputs)
4932 (with-directory-excursion "docs"
4933 ;; FIXME: pdf fails to build
4934 ;;(system* "make" "pdf" "PAPER=a4")
4935 (system* "make" python-arg "html")
4936 (system* "make" python-arg "info"))
4937 (copy-recursively "docs/man" man1)
4938 (copy-recursively "examples" examples)
4939 (copy-recursively "docs/build/html" html)
4940 ;; (copy-file "docs/build/latex/ipython.pdf"
4941 ;; (string-append doc "/ipython.pdf"))
4942 (mkdir-p info)
4943 (copy-file "docs/build/texinfo/ipython.info"
4944 (string-append info "/ipython.info"))
4945 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
4946 #t))
4947 ;; Tests can only be run after the library has been installed and not
4948 ;; within the source directory.
4949 (delete 'check)
4950 (add-after 'install 'check
4951 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
4952 (if tests?
4953 (begin
4954 ;; Make installed package available for running the tests
4955 (add-installed-pythonpath inputs outputs)
4956 (setenv "HOME" "/tmp/") ;; required by a test
4957 ;; We only test the core because one of the other tests
4958 ;; tries to import ipykernel.
4959 (invoke "python" "IPython/testing/iptest.py"
4960 "-v" "IPython/core/tests"))
4961 #t)))
4962 (add-before 'check 'fix-tests
4963 (lambda* (#:key inputs #:allow-other-keys)
4964 (substitute* "./IPython/utils/_process_posix.py"
4965 (("/usr/bin/env', 'which") (which "which")))
4966 (substitute* "./IPython/core/tests/test_inputtransformer.py"
4967 (("#!/usr/bin/env python")
4968 (string-append "#!" (which "python"))))
4969 ;; Disable 1 failing test
4970 (substitute* "./IPython/core/tests/test_magic.py"
4971 (("def test_dirops\\(\\):" all)
4972 (string-append "@dec.skipif(True)\n" all)))
4973 ;; This test introduces a circular dependency on ipykernel
4974 ;; (which depends on ipython).
4975 (delete-file "IPython/core/tests/test_display.py")
4976 ;; These tests throw errors for unknown reasons.
4977 (delete-file "IPython/extensions/tests/test_storemagic.py")
4978 (delete-file "IPython/core/tests/test_displayhook.py")
4979 (delete-file "IPython/core/tests/test_interactiveshell.py")
4980 (delete-file "IPython/core/tests/test_pylabtools.py")
4981 (delete-file "IPython/core/tests/test_paths.py")
4982 #t)))))
4983 (home-page "https://ipython.org")
4984 (synopsis "IPython is a tool for interactive computing in Python")
4985 (description
4986 "IPython provides a rich architecture for interactive computing with:
4987Powerful interactive shells, a browser-based notebook, support for interactive
4988data visualization, embeddable interpreters and tools for parallel
4989computing.")
4990 (license license:bsd-3)
4991 (properties `((python2-variant . ,(delay python2-ipython))))))
4992
4993(define-public python2-ipython
4994 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
4995 (package
4996 (inherit ipython)
4997 ;; FIXME: add pyreadline once available.
4998 (propagated-inputs
4999 `(("python2-backports-shutil-get-terminal-size"
5000 ,python2-backports-shutil-get-terminal-size)
5001 ("python2-pathlib2" ,python2-pathlib2)
5002 ,@(package-propagated-inputs ipython)))
5003 (native-inputs
5004 `(("python2-mock" ,python2-mock)
5005 ,@(package-native-inputs ipython))))))
5006
5007(define-public python-urwid
5008 (package
5009 (name "python-urwid")
5010 (version "2.0.1")
5011 (source
5012 (origin
5013 (method url-fetch)
5014 (uri (pypi-uri "urwid" version))
5015 (sha256
5016 (base32
5017 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
5018 (build-system python-build-system)
5019 (home-page "http://urwid.org")
5020 (synopsis "Console user interface library for Python")
5021 (description
5022 "Urwid is a curses-based UI/widget library for Python. It includes many
5023features useful for text console applications.")
5024 (license license:lgpl2.1+)))
5025
5026(define-public python2-urwid
5027 (package-with-python2 python-urwid))
5028
5029(define-public python-urwidtrees
5030 (package
5031 (name "python-urwidtrees")
5032 (version "1.0.2")
5033 (source
5034 (origin
5035 (method url-fetch)
5036 ;; package author intends on distributing via github rather than pypi:
5037 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5038 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5039 version ".tar.gz"))
5040 (file-name (string-append name "-" version ".tar.gz"))
5041 (sha256
5042 (base32
5043 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
5044 (build-system python-build-system)
5045 (arguments
5046 '(#:tests? #f)) ; no tests
5047 (propagated-inputs `(("python-urwid" ,python-urwid)))
5048 (home-page "https://github.com/pazz/urwidtrees")
5049 (synopsis "Tree widgets for urwid")
5050 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5051toolkit. Use it to build trees of widgets.")
5052 (license license:gpl3+)))
5053
5054(define-public python2-urwidtrees
5055 (package-with-python2 python-urwidtrees))
5056
5057(define-public python-ua-parser
5058 (package
5059 (name "python-ua-parser")
5060 (version "0.8.0")
5061 (source
5062 (origin
5063 (method url-fetch)
5064 (uri (pypi-uri "ua-parser" version))
5065 (sha256
5066 (base32
5067 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
5068 (build-system python-build-system)
5069 (arguments
5070 `(#:tests? #f)) ;no test suite in release
5071 (native-inputs
5072 `(("python-pyyaml" ,python-pyyaml)))
5073 (home-page "https://github.com/ua-parser/uap-python")
5074 (synopsis "User agent parser")
5075 (description
5076 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
5077 (license license:asl2.0)))
5078
5079(define-public python2-ua-parser
5080 (package-with-python2 python-ua-parser))
5081
5082(define-public python-user-agents
5083 (package
5084 (name "python-user-agents")
5085 (version "1.1.0")
5086 (source
5087 (origin
5088 (method url-fetch)
5089 (uri (pypi-uri "user-agents" version))
5090 (sha256
5091 (base32
5092 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
5093 (build-system python-build-system)
5094 (arguments
5095 `(#:tests? #f)) ;missing devices.json test file in release
5096 (propagated-inputs
5097 `(("python-ua-parser" ,python-ua-parser)))
5098 (home-page "https://github.com/selwin/python-user-agents")
5099 (synopsis "User Agent strings parsing library")
5100 (description
5101 "A library to identify devices (phones, tablets) and their capabilities by
5102parsing (browser/HTTP) user agent strings.")
5103 (license license:expat)))
5104
5105(define-public python2-user-agents
5106 (package-with-python2 python-user-agents))
5107
5108(define-public python-dbus
5109 (package
5110 (name "python-dbus")
5111 (version "1.2.8")
5112 (source
5113 (origin
5114 (method url-fetch)
5115 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
5116 "dbus-python-" version ".tar.gz"))
5117 (sha256
5118 (base32
5119 "0vvvjmiwnc9cjlks3gcdk43ap7llhlpz7cm1wbw0nc2yfsxjpwdb"))))
5120 (build-system gnu-build-system)
5121 (arguments
5122 '(#:phases
5123 (modify-phases %standard-phases
5124 (add-before
5125 'check 'pre-check
5126 (lambda _
5127 ;; XXX: For the missing '/etc/machine-id'.
5128 (substitute* "test/run-test.sh"
5129 (("DBUS_FATAL_WARNINGS=1")
5130 "DBUS_FATAL_WARNINGS=0"))
5131 #t)))))
5132 (native-inputs
5133 `(("pkg-config" ,pkg-config)))
5134 (inputs
5135 `(("python" ,python-wrapper)
5136 ("dbus-glib" ,dbus-glib)))
5137 (synopsis "Python bindings for D-bus")
5138 (description "python-dbus provides bindings for libdbus, the reference
5139implementation of D-Bus.")
5140 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
5141 (license license:expat)))
5142
5143(define-public python2-dbus
5144 (package (inherit python-dbus)
5145 (name "python2-dbus")
5146 (inputs `(("python" ,python-2)
5147 ,@(alist-delete "python"
5148 (package-inputs python-dbus)
5149 equal?)))
5150 ;; FIXME: on Python 2, the test_utf8 fails with:
5151 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5152 (arguments `(#:tests? #f))))
5153
5154(define-public python-lxml
5155 (package
5156 (name "python-lxml")
5157 (version "4.2.5")
5158 (source
5159 (origin
5160 (method url-fetch)
5161 (uri (pypi-uri "lxml" version))
5162 (sha256
5163 (base32
5164 "0zw0y9hs0nflxhl9cs6ipwwh53szi3w2x06wl0k9cylyqac0cwin"))))
5165 (build-system python-build-system)
5166 (inputs
5167 `(("libxml2" ,libxml2)
5168 ("libxslt" ,libxslt)))
5169 (home-page "http://lxml.de/")
5170 (synopsis
5171 "Python XML processing library")
5172 (description
5173 "The lxml XML toolkit is a Pythonic binding for the C libraries
5174libxml2 and libxslt.")
5175 (license license:bsd-3))) ; and a few more, see LICENSES.txt
5176
5177(define-public python2-lxml
5178 (package-with-python2 python-lxml))
5179
5180;; beautifulsoup4 has a totally different namespace than 3.x,
5181;; and pypi seems to put it under its own name, so I guess we should too
5182(define-public python-beautifulsoup4
5183 (package
5184 (name "python-beautifulsoup4")
5185 (version "4.6.3")
5186 (source
5187 (origin
5188 (method url-fetch)
5189 (uri (pypi-uri "beautifulsoup4" version))
5190 (sha256
5191 (base32
5192 "041dhalzjciw6qyzzq7a2k4h1yvyk76xigp35hv5ibnn448ydy4h"))))
5193 (build-system python-build-system)
5194 (arguments
5195 `(#:phases
5196 (modify-phases %standard-phases
5197 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5198 ;; must use this conversion script when building with Python 3. The
5199 ;; conversion script also runs the tests.
5200 ;; For more information, see the file 'convert-py3k' in the source
5201 ;; distribution.
5202 (replace 'check
dff0197e 5203 (lambda _ (invoke "./convert-py3k"))))))
44d10b1f
RW
5204 (home-page
5205 "https://www.crummy.com/software/BeautifulSoup/bs4/")
5206 (synopsis
5207 "Python screen-scraping library")
5208 (description
5209 "Beautiful Soup is a Python library designed for rapidly setting up
5210screen-scraping projects. It offers Pythonic idioms for navigating,
5211searching, and modifying a parse tree, providing a toolkit for
5212dissecting a document and extracting what you need. It automatically
5213converts incoming documents to Unicode and outgoing documents to UTF-8.")
5214 (license license:expat)
5215 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5216
5217(define-public python2-beautifulsoup4
5218 (package
5219 (inherit (package-with-python2
5220 (strip-python2-variant python-beautifulsoup4)))
5221 (arguments `(#:python ,python-2))))
5222
5223(define-public python-netifaces
5224 (package
5225 (name "python-netifaces")
5226 (version "0.10.7")
5227 (source
5228 (origin
5229 (method url-fetch)
5230 (uri (pypi-uri "netifaces" version))
5231 (sha256
5232 (base32
5233 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
5234 (build-system python-build-system)
5235 (home-page "https://github.com/al45tair/netifaces")
5236 (synopsis
5237 "Python module for portable network interface information")
5238 (description
5239 "Netifaces is a Python module providing information on network
5240interfaces in an easy and portable manner.")
5241 (license license:expat)))
5242
5243(define-public python2-netifaces
5244 (package-with-python2 python-netifaces))
5245
5246(define-public python-networkx
5247 (package
5248 (name "python-networkx")
5249 (version "2.2")
5250 (source
5251 (origin
5252 (method url-fetch)
5253 (uri (pypi-uri "networkx" version ".zip"))
5254 (sha256
5255 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
5256 (build-system python-build-system)
5257 ;; python-decorator is needed at runtime.
5258 (propagated-inputs
5259 `(("python-decorator" ,python-decorator)))
5260 (native-inputs
5261 `(("python-nose" ,python-nose)
5262 ("unzip" ,unzip)))
5263 (home-page "https://networkx.github.io/")
5264 (synopsis "Python module for creating and manipulating graphs and networks")
5265 (description
5266 "NetworkX is a Python package for the creation, manipulation, and study
5267of the structure, dynamics, and functions of complex networks.")
5268 (license license:bsd-3)))
5269
5270(define-public python2-networkx
5271 (package-with-python2 python-networkx))
5272
5273(define-public python-datrie
5274 (package
5275 (name "python-datrie")
5276 (version "0.7.1")
5277 (source
5278 (origin
5279 (method url-fetch)
5280 (uri (pypi-uri "datrie" version))
5281 (sha256
5282 (base32
5283 "08r0if7dry2q7p34gf7ffyrlnf4bdvnprxgydlfxgfnvq8f3f4bs"))))
5284 (build-system python-build-system)
5285 (arguments
5286 `(#:phases (modify-phases %standard-phases
5287 (add-before 'build 'cythonize
5288 (lambda _
5289 ;; Regenerate Cython classes to solve ABI issues with Python
5290 ;; 3.7.0. See <https://github.com/pytries/datrie/issues/52>.
5291 (invoke "cython" "src/datrie.pyx" "src/cdatrie.pxd"
5292 "src/stdio_ext.pxd" "-a"))))))
5293 (native-inputs
5294 `(("python-cython" ,python-cython)
5295 ("python-hypothesis" ,python-hypothesis)
5296 ("python-pytest" ,python-pytest)
5297 ("python-pytest-runner" ,python-pytest-runner)))
5298 (home-page "https://github.com/kmike/datrie")
5299 (synopsis "Fast, efficiently stored trie for Python")
5300 (description
5301 "This package provides a fast, efficiently stored trie implementation for
5302Python.")
5303 (license license:lgpl2.1+)))
5304
5305(define-public snakemake
5306 (package
5307 (name "snakemake")
5308 (version "5.2.4")
5309 (source
5310 (origin
5311 (method url-fetch)
5312 (uri (pypi-uri "snakemake" version))
5313 (sha256
5314 (base32 "0gj0xxgiq3mp9qyyrbfzldiaq1giliqw0in64nqiz7vx49myqj7z"))))
5315 (build-system python-build-system)
5316 (arguments
5317 ;; TODO: Package missing test dependencies.
5318 '(#:tests? #f
5319 #:phases
5320 (modify-phases %standard-phases
5321 ;; For cluster execution Snakemake will call Python. Since there is
5322 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
5323 ;; this by calling the snakemake wrapper instead.
5324 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
5325 (lambda* (#:key outputs #:allow-other-keys)
5326 (substitute* "snakemake/executors.py"
5327 (("\\{sys.executable\\} -m snakemake")
5328 (string-append (assoc-ref outputs "out")
5329 "/bin/snakemake")))
5330 #t)))))
5331 (propagated-inputs
5332 `(("python-gitpython" ,python-gitpython)
5333 ("python-wrapt" ,python-wrapt)
5334 ("python-requests" ,python-requests)
5335 ("python-appdirs" ,python-appdirs)
5336 ("python-configargparse" ,python-configargparse)
5337 ("python-datrie" ,python-datrie)
5338 ("python-docutils" ,python-docutils)
5339 ("python-jinja2" ,python-jinja2)
5340 ("python-jsonschema" ,python-jsonschema)
5341 ("python-networkx" ,python-networkx)
5342 ("python-pyyaml" ,python-pyyaml)
5343 ("python-ratelimiter" ,python-ratelimiter)))
5344 (home-page "https://snakemake.readthedocs.io")
5345 (synopsis "Python-based execution environment for make-like workflows")
5346 (description
5347 "Snakemake aims to reduce the complexity of creating workflows by
5348providing a clean and modern domain specific specification language (DSL) in
5349Python style, together with a fast and comfortable execution environment.")
5350 (license license:expat)))
5351
5352;; This is currently needed for the pigx-* packages.
5353(define-public snakemake-4
5354 (package (inherit snakemake)
5355 (version "4.4.0")
5356 (source
5357 (origin
5358 (method url-fetch)
5359 (uri (pypi-uri "snakemake" version))
5360 (sha256
5361 (base32 "0g0paia4z7w3srnqdmavq3hrb2x7qnpf81jx50njl0p7y4y0j8jv"))))
5362 (propagated-inputs
5363 `(("python-wrapt" ,python-wrapt)
5364 ("python-requests" ,python-requests)
5365 ("python-appdirs" ,python-appdirs)
5366 ("python-configargparse" ,python-configargparse)
5367 ("python-pyyaml" ,python-pyyaml)
5368 ("python-ratelimiter" ,python-ratelimiter)))))
5369
5370(define-public python-pyqrcode
5371 (package
5372 (name "python-pyqrcode")
5373 (version "1.2.1")
5374 (source
5375 (origin
5376 (method url-fetch)
5377 (uri (pypi-uri "PyQRCode" version))
5378 (sha256
5379 (base32
5380 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
5381 (build-system python-build-system)
5382 (home-page
5383 "https://github.com/mnooner256/pyqrcode")
5384 (synopsis "QR code generator")
5385 (description
5386 "Pyqrcode is a QR code generator written purely in Python with
5387SVG, EPS, PNG and terminal output.")
5388 (license license:bsd-3)))
5389
5390(define-public python-seaborn
5391 (package
5392 (name "python-seaborn")
5393 (version "0.9.0")
5394 (source
5395 (origin
5396 (method url-fetch)
5397 (uri (pypi-uri "seaborn" version))
5398 (sha256
5399 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))))
5400 (build-system python-build-system)
5401 (arguments
5402 `(#:phases
5403 (modify-phases %standard-phases
5404 (add-before 'check 'start-xserver
5405 (lambda* (#:key inputs #:allow-other-keys)
5406 (let ((xorg-server (assoc-ref inputs "xorg-server")))
5407 ;; There must be a running X server and make check doesn't
5408 ;; start one. Therefore we must do it.
5409 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
5410 (setenv "DISPLAY" ":1")
5411 #t)))
5412 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
5413 (propagated-inputs
5414 `(("python-pandas" ,python-pandas)
5415 ("python-matplotlib" ,python-matplotlib)
5416 ("python-numpy" ,python-numpy)
5417 ("python-scipy" ,python-scipy)))
5418 (native-inputs
5419 `(("python-pytest" ,python-pytest)
5420 ("xorg-server" ,xorg-server)))
5421 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5422 (synopsis "Statistical data visualization")
5423 (description
5424 "Seaborn is a library for making attractive and informative statistical
5425graphics in Python. It is built on top of matplotlib and tightly integrated
5426with the PyData stack, including support for numpy and pandas data structures
5427and statistical routines from scipy and statsmodels.")
5428 (license license:bsd-3)))
5429
5430(define-public python2-seaborn
5431 (package-with-python2 python-seaborn))
5432
5433(define-public python-mpmath
5434 (package
5435 (name "python-mpmath")
5436 (version "0.19")
5437 (source (origin
5438 (method url-fetch)
5439 (uri (string-append "http://mpmath.org/files/mpmath-"
5440 version ".tar.gz"))
5441 (sha256
5442 (base32
5443 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
5444 (build-system python-build-system)
5445 (arguments
5446 '(#:phases
5447 (modify-phases %standard-phases
5448 (replace 'check
5449 (lambda _
5d7a6f1c 5450 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
44d10b1f
RW
5451 (home-page "http://mpmath.org")
5452 (synopsis "Arbitrary-precision floating-point arithmetic in python")
5453 (description
5454 "@code{mpmath} can be used as an arbitrary-precision substitute for
5455Python's float/complex types and math/cmath modules, but also does much
5456more advanced mathematics.")
5457 (license license:bsd-3)))
5458
5459(define-public python2-mpmath
5460 (package-with-python2 python-mpmath))
5461
5462(define-public python-bigfloat
5463 (package
5464 (name "python-bigfloat")
5465 (version "0.3.0")
5466 (source
5467 (origin
5468 (method url-fetch)
5469 (uri (pypi-uri "bigfloat" version))
5470 (sha256
5471 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
5472 (build-system python-build-system)
5473 (inputs
5474 `(("mpfr" ,mpfr)))
5475 (home-page "https://github.com/mdickinson/bigfloat")
5476 (synopsis "Arbitrary precision floating-point arithmetic for Python")
5477 (description
5478 "This packages provides a Python interface to the MPFR library for
5479multiprecision arithmetic.")
5480 (license license:lgpl3+)))
5481
5482(define-public python2-bigfloat
5483 (package-with-python2 python-bigfloat))
5484
5485(define-public python-sympy
5486 (package
5487 (name "python-sympy")
5488 (version "1.1.1")
5489 (source
5490 (origin
5491 (method url-fetch)
5492 (uri (string-append
5493 "https://github.com/sympy/sympy/releases/download/sympy-"
5494 version "/sympy-" version ".tar.gz"))
5495 (sha256
5496 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
5497 (build-system python-build-system)
5498 (arguments
5499 `(#:phases
5500 (modify-phases %standard-phases
5501 ;; Run the core tests after installation. By default it would run
5502 ;; *all* tests, which take a very long time to complete and are known
5503 ;; to be flaky.
5504 (delete 'check)
5505 (add-after 'install 'check
5506 (lambda* (#:key outputs #:allow-other-keys)
5507 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
5508 #t)))))
5509 (propagated-inputs
5510 `(("python-mpmath" ,python-mpmath)))
5511 (home-page "http://www.sympy.org/")
5512 (synopsis "Python library for symbolic mathematics")
5513 (description
5514 "SymPy is a Python library for symbolic mathematics. It aims to become a
5515full-featured computer algebra system (CAS) while keeping the code as simple
5516as possible in order to be comprehensible and easily extensible.")
5517 (license license:bsd-3)))
5518
5519(define-public python2-sympy
5520 (package
5521 (inherit (package-with-python2 python-sympy))
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 "python" "-c" "import sympy; sympy.test(\"/core\")")
5532 #t)))))))
5533
5534(define-public python-q
5535 (package
5536 (name "python-q")
5537 (version "2.6")
5538 (source
5539 (origin
5540 (method url-fetch)
5541 (uri (pypi-uri "q" version))
5542 (sha256
5543 (base32
5544 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
5545 (build-system python-build-system)
5546 (home-page "https://github.com/zestyping/q")
5547 (synopsis "Quick-and-dirty debugging output for tired programmers")
5548 (description
5549 "q is a Python module for \"print\" style of debugging Python code. It
5550provides convenient short API for print out of values, tracebacks, and
5551falling into the Python interpreter.")
5552 (license license:asl2.0)))
5553
5554(define-public python2-q
5555 (package-with-python2 python-q))
5556
5557(define-public python2-xlib
5558 (package
5559 (name "python2-xlib")
5560 (version "0.14")
5561 (source (origin
5562 (method url-fetch)
5563 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
5564 "/" version "/"
5565 "python-xlib-" version ".tar.gz"))
5566 (sha256
5567 (base32
5568 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
5569 (build-system python-build-system)
5570 (arguments
5571 `(#:python ,python-2 ;Python 2 only
5572 #:tests? #f)) ;no tests
5573 (home-page "http://python-xlib.sourceforge.net/")
5574 (synopsis "Python X11 client library")
5575 (description
5576 "The Python X Library is intended to be a fully functional X client
5577library for Python programs. It is useful to implement low-level X clients.
5578It is written entirely in Python.")
5579 (license license:gpl2+)))
5580
5581(define-public python-singledispatch
5582 (package
5583 (name "python-singledispatch")
5584 (version "3.4.0.3")
5585 (source
5586 (origin
5587 (method url-fetch)
5588 (uri (pypi-uri "singledispatch" version))
5589 (sha256
5590 (base32
5591 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
5592 (build-system python-build-system)
5593 (native-inputs
5594 `(("python-six" ,python-six))) ; required for conversion, not at run-time
5595 (home-page
5596 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
5597 (synopsis "Backport of singledispatch feature from Python 3.4")
5598 (description
5599 "This library brings functools.singledispatch from Python 3.4 to Python
56002.6-3.3.")
5601 (license license:expat)))
5602
5603(define-public python2-singledispatch
5604 (package-with-python2 python-singledispatch))
5605
5606;; the python- version can be removed with python-3.5
5607(define-public python-backports-abc
5608 (package
5609 (name "python-backports-abc")
5610 (version "0.5")
5611 (source
5612 (origin
5613 (method url-fetch)
5614 (uri (pypi-uri "backports_abc" version))
5615 (sha256
5616 (base32
5617 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
5618 (build-system python-build-system)
5619 (home-page "https://github.com/cython/backports_abc")
5620 (synopsis "Backport of additions to the 'collections.abc' module")
5621 (description
5622 "Python-backports-abc provides a backport of additions to the
5623'collections.abc' module in Python-3.5.")
5624 (license license:psfl)))
5625
5626(define-public python2-backports-abc
5627 (package-with-python2 python-backports-abc))
5628
5629(define-public python-backports-csv
5630 (package
5631 (name "python-backports-csv")
5632 (version "1.0.5")
5633 (source
5634 (origin
5635 (method url-fetch)
5636 (uri (pypi-uri "backports.csv" version))
5637 (sha256
5638 (base32
5639 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
5640 (build-system python-build-system)
5641 (home-page "https://github.com/ryanhiebert/backports.csv")
5642 (synopsis "Backport of Python 3's csv module for Python 2")
5643 (description
5644 "Provides a backport of Python 3's @code{csv} module for parsing
5645comma separated values. The API of the @code{csv} module in Python 2
5646is drastically different from the @code{csv} module in Python 3.
5647This is due, for the most part, to the difference between str in
5648Python 2 and Python 3.")
5649 (license license:psfl)))
5650
5651(define-public python2-backports-csv
5652 (package-with-python2 python-backports-csv))
5653
5654(define-public python2-backports-shutil-get-terminal-size
5655 (package
5656 (name "python2-backports-shutil-get-terminal-size")
5657 (version "1.0.0")
5658 (source
5659 (origin
5660 (method url-fetch)
5661 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
5662 (sha256
5663 (base32
5664 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
5665 (build-system python-build-system)
5666 (arguments
5667 `(#:python ,python-2
5668 #:phases
5669 (modify-phases %standard-phases
5670 (replace 'check
5671 (lambda _
4a4a7d9a 5672 (invoke "py.test" "-v"))))))
44d10b1f
RW
5673 (native-inputs
5674 `(("python2-pytest" ,python2-pytest)))
5675 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
5676 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
5677 (description
5678 "This package provides a backport of the @code{get_terminal_size
5679function} from Python 3.3's @code{shutil}.
5680Unlike the original version it is written in pure Python rather than C,
5681so it might be a tiny bit slower.")
5682 (license license:expat)))
5683
5684(define-public python-waf
5685 (package
5686 (name "python-waf")
5687 (version "2.0.11")
5688 (source (origin
5689 (method url-fetch)
5690 (uri (string-append "https://waf.io/"
5691 "waf-" version ".tar.bz2"))
5692 (sha256
5693 (base32
5694 "13zrniwkmfqgsgzi9v5m1367fppp9yzrz6z2ny6hy8dmpb8mj4z4"))))
5695 (build-system python-build-system)
5696 (arguments
5697 '(#:phases
5698 (modify-phases %standard-phases
5699 (replace 'build
5700 (lambda _
5701 (invoke "python" "waf-light" "configure" "build")))
5702 (replace 'check
5703 (lambda _
5704 (invoke "python" "waf" "--version")))
5705 (replace 'install
5706 (lambda* (#:key outputs #:allow-other-keys)
5707 (let ((out (assoc-ref outputs "out")))
5708 (install-file "waf" (string-append out "/bin")))
5709 #t))
5710 ;; waf breaks when it is wrapped.
5711 (delete 'wrap))))
5712 (home-page "https://waf.io/")
5713 (synopsis "Python-based build system")
5714 (description
5715 "Waf is a Python-based framework for configuring, compiling and installing
5716applications.")
5717 (license license:bsd-3)))
5718
5719(define-public python2-waf
5720 (package-with-python2 python-waf))
5721
5722(define-public python-pyzmq
5723 (package
5724 (name "python-pyzmq")
5725 (version "17.1.2")
5726 (source
5727 (origin
5728 (method url-fetch)
5729 (uri (pypi-uri "pyzmq" version))
5730 (sha256
5731 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
5732 (build-system python-build-system)
5733 (arguments
5734 `(#:configure-flags
5735 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
5736 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
5737 ;; --inplace' for 'python setup.py test' to work.
5738 #:tests? #f))
5739 (inputs
5740 `(("zeromq" ,zeromq)))
5741 (native-inputs
5742 `(("pkg-config" ,pkg-config)
5743 ("python-nose" ,python-nose)))
5744 (home-page "https://github.com/zeromq/pyzmq")
5745 (synopsis "Python bindings for 0MQ")
5746 (description
5747 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
5748 (license license:bsd-4)))
5749
5750(define-public python2-pyzmq
5751 (package-with-python2 python-pyzmq))
5752
5753(define-public python-pep8
5754 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
5755 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
5756 ;; some dependents' test suites, and nothing more.
5757 (package
5758 (name "python-pep8")
5759 (version "1.7.0")
5760 (source
5761 (origin
5762 (method url-fetch)
5763 (uri (pypi-uri "pep8" version))
5764 (sha256
5765 (base32
5766 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
5767 (build-system python-build-system)
5768 (home-page "https://pep8.readthedocs.org/")
5769 (synopsis "Python style guide checker")
5770 (description
5771 "This tools checks Python code against some of the style conventions in
5772PEP 8.")
5773 (license license:expat)))
5774
5775(define-public python2-pep8
5776 (package-with-python2 python-pep8))
5777
5778(define-public python-pyflakes
5779 (package
5780 (name "python-pyflakes")
5781 (version "2.0.0")
5782 (source
5783 (origin
5784 (method url-fetch)
5785 (uri (pypi-uri "pyflakes" version))
5786 (sha256
5787 (base32
5788 "0jba28czyvimdc72llms3f17swp3i8jdcabf5w0j00adfbn64xls"))))
5789 (build-system python-build-system)
5790 (home-page
5791 "https://github.com/pyflakes/pyflakes")
5792 (synopsis "Passive checker of Python programs")
5793 (description
5794 "Pyflakes statically checks Python source code for common errors.")
5795 (license license:expat)))
5796
5797(define-public python2-pyflakes
5798 (package-with-python2 python-pyflakes))
5799
5800(define-public python-mccabe
5801 (package
5802 (name "python-mccabe")
5803 (version "0.6.1")
5804 (source
5805 (origin
5806 (method url-fetch)
5807 (uri (pypi-uri "mccabe" version))
5808 (sha256
5809 (base32
5810 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
5811 (build-system python-build-system)
5812 (native-inputs
5813 `(("python-pytest" ,python-pytest-bootstrap)
5814 ("python-pytest-runner" ,python-pytest-runner)))
5815 (home-page "https://github.com/flintwork/mccabe")
5816 (synopsis "McCabe checker, plugin for flake8")
5817 (description
5818 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
5819complexity of Python source code.")
5820 (license license:expat)))
5821
5822(define-public python2-mccabe
5823 (package-with-python2 python-mccabe))
5824
5825(define-public python-mccabe-0.2.1
5826 (package (inherit python-mccabe)
5827 (version "0.2.1")
5828 (source
5829 (origin
5830 (method url-fetch)
5831 (uri (pypi-uri "mccabe" version))
5832 (sha256
5833 (base32
5834 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
5835
5836(define-public python2-mccabe-0.2.1
5837 (package-with-python2 python-mccabe-0.2.1))
5838
5839;; Flake8 2.4.1 requires an older version of pep8.
5840;; This should be removed ASAP.
5841(define-public python-pep8-1.5.7
5842 (package (inherit python-pep8)
5843 (version "1.5.7")
5844 (source
f3576970
RW
5845 (origin
5846 (method url-fetch)
5847 (uri (pypi-uri "pep8" version))
5848 (sha256
5849 (base32
5850 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
44d10b1f
RW
5851 (arguments
5852 ;; XXX Tests not compatible with Python 3.5.
5853 '(#:tests? #f))))
5854
5855(define-public python2-pep8-1.5.7
5856 (package-with-python2 python-pep8-1.5.7))
5857
5858;; Flake8 2.4.1 requires an older version of pyflakes.
5859;; This should be removed ASAP.
5860(define-public python-pyflakes-0.8.1
5861 (package (inherit python-pyflakes)
5862 (version "0.8.1")
5863 (source
8c4dffb5
RW
5864 (origin
5865 (method url-fetch)
5866 (uri (pypi-uri "pyflakes" version))
5867 (sha256
5868 (base32
5869 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
44d10b1f
RW
5870 (arguments
5871 ;; XXX Tests not compatible with Python 3.5.
5872 '(#:tests? #f))))
5873
5874(define-public python2-pyflakes-0.8.1
5875 (package-with-python2 python-pyflakes-0.8.1))
5876
5877;; This package is used by hypothesis which has thousands of dependent packages.
5878;; FIXME: Consolidate this with "python-flake8" below in the next rebuild cycle.
5879(define-public python-flake8-3.5
5880 (package
5881 (name "python-flake8")
5882 (version "3.5.0")
5883 (source
5884 (origin
5885 (method url-fetch)
5886 (uri (pypi-uri "flake8" version))
5887 (sha256
5888 (base32
5889 "184b33grvvjmiwlv9kyd7yng9qv5ld24154j70z332xxg9gjclvj"))))
5890 (build-system python-build-system)
5891 (arguments
5892 `(#:phases
5893 (modify-phases %standard-phases
5894 ;; Two errors don't seem to have assigned codes.
5895 (add-after 'unpack 'delete-broken-test
5896 (lambda _ (delete-file "tests/unit/test_pyflakes_codes.py") #t))
5897 (add-after 'unpack 'fix-problem-with-pycodestyle
5898 (lambda _
5899 ;; See https://gitlab.com/pycqa/flake8/merge_requests/230
5900 ;; This should no longer be needed with the next release.
5901 (substitute* "setup.py"
5902 (("PEP8_PLUGIN\\('break_around_binary_operator'\\),")
5903 "PEP8_PLUGIN('break_after_binary_operator'),\
5904PEP8_PLUGIN('break_before_binary_operator'),"))
5905 #t))
5906 (delete 'check)
5907 (add-after 'install 'check
5908 (lambda* (#:key inputs outputs #:allow-other-keys)
5909 (add-installed-pythonpath inputs outputs)
5910 (invoke "pytest" "-v")
5911 #t)))))
5912 (propagated-inputs
5913 `(("python-pycodestyle" ,python-pycodestyle)
5914 ("python-pyflakes" ,python-pyflakes)
5915 ("python-mccabe" ,python-mccabe)))
5916 (native-inputs
5917 `(("python-mock" ,python-mock)
5918 ("python-pytest" ,python-pytest-bootstrap)
5919 ("python-pytest-runner" ,python-pytest-runner)))
5920 (home-page "https://gitlab.com/pycqa/flake8")
5921 (synopsis
5922 "The modular source code checker: pep8, pyflakes and co")
5923 (description
5924 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
5925 (properties `((python2-variant . ,(delay python2-flake8-3.5))))
5926 (license license:expat)))
5927
5928(define-public python2-flake8-3.5
5929 (let ((base (package-with-python2 (strip-python2-variant python-flake8-3.5))))
5930 (package (inherit base)
5931 (propagated-inputs
5932 `(("python2-configparser" ,python2-configparser)
5933 ("python2-enum34" ,python2-enum34)
5934 ,@(package-propagated-inputs base))))))
5935
5936;; Version 3.5.0 has compatibility issues with Pyflakes 2.0, so we need
5937;; this newer version. Keep it as a separate variable for now to avoid
5938;; rebuilding "python-hypothesis"; this should be removed in the next
5939;; rebuild cycle.
5940(define-public python-flake8
5941 (package
5942 (inherit python-flake8-3.5)
5943 (version "3.6.0")
5944 (source (origin
5945 (method url-fetch)
5946 (uri (pypi-uri "flake8" version))
5947 (sha256
5948 (base32
5949 "0w0nprx22rbvrrkbfx9v5jc5gskbm08g219l7r8wai8zfswgadba"))))
5950 (arguments
5951 (substitute-keyword-arguments (package-arguments python-flake8-3.5)
5952 ((#:phases phases)
5953 `(modify-phases ,phases
5954 (delete 'delete-broken-test)
5955 (delete 'fix-problem-with-pycodestyle)))))
5956 (properties `((python2-variant . ,(delay python2-flake8))))))
5957
5958(define-public python2-flake8
5959 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
5960 (package (inherit base)
5961 (propagated-inputs
5962 (package-propagated-inputs python2-flake8-3.5)))))
5963
5964;; python-hacking requires flake8 <2.6.0.
5965(define-public python-flake8-2.5
5966 (package
5967 (inherit python-flake8)
5968 (version "2.5.5")
5969 (source (origin
5970 (method url-fetch)
5971 (uri (pypi-uri "flake8" version))
5972 (sha256
5973 (base32
5974 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
5975 (propagated-inputs
5976 `(("python-pep8" ,python-pep8)
5977 ,@(package-propagated-inputs python-flake8)))
5978 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
5979
5980(define-public python2-flake8-2.5
5981 (package
5982 (inherit python2-flake8)
5983 (version (package-version python-flake8-2.5))
5984 (source (origin
5985 (inherit (package-source python-flake8-2.5))))
5986 (propagated-inputs
5987 `(("python2-pep8" ,python2-pep8)
5988 ,@(package-propagated-inputs python2-flake8)))))
5989
5990(define-public python-flake8-polyfill
5991 (package
5992 (name "python-flake8-polyfill")
5993 (version "1.0.2")
5994 (source
5995 (origin
5996 (method url-fetch)
5997 (uri (pypi-uri "flake8-polyfill" version))
5998 (sha256
5999 (base32
6000 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
6001 (build-system python-build-system)
6002 (arguments
6003 '(#:phases
6004 (modify-phases %standard-phases
6005 (replace 'check
6006 (lambda _
6007 (setenv "PYTHONPATH"
6008 (string-append (getcwd) "/build/lib:"
6009 (getenv "PYTHONPATH")))
4f0a0894 6010 (invoke "py.test" "-v"))))))
44d10b1f
RW
6011 (native-inputs
6012 `(("python-flake8" ,python-flake8)
6013 ("python-mock" ,python-mock)
6014 ("python-pep8" ,python-pep8)
6015 ("python-pycodestyle" ,python-pycodestyle)
6016 ("python-pytest" ,python-pytest)))
6017 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6018 (synopsis "Polyfill package for Flake8 plugins")
6019 (description
6020 "This package that provides some compatibility helpers for Flake8
6021plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6022 (license license:expat)))
6023
6024(define-public python2-flake8-polyfill
6025 (package-with-python2 python-flake8-polyfill))
6026
6027(define-public python-mistune
6028 (package
6029 (name "python-mistune")
6030 (version "0.8.4")
6031 (source
6032 (origin
6033 (method url-fetch)
6034 (uri (pypi-uri "mistune" version))
6035 (sha256
6036 (base32
6037 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
6038 (build-system python-build-system)
6039 (native-inputs
6040 `(("python-nose" ,python-nose)
6041 ("python-cython" ,python-cython)))
6042 (home-page "https://github.com/lepture/mistune")
6043 (synopsis "Markdown parser in pure Python")
6044 (description "This package provides a fast markdown parser in pure
6045Python.")
6046 (license license:bsd-3)))
6047
6048(define-public python2-mistune
6049 (package-with-python2 python-mistune))
6050
6051(define-public python-markdown
6052 (package
6053 (name "python-markdown")
6054 (version "3.0.1")
6055 (source
6056 (origin
6057 (method url-fetch)
6058 (uri (pypi-uri "Markdown" version))
6059 (sha256
6060 (base32
6061 "0z6v8649sr434d5r5zmrhydka7v7f9yas4bwcgkcs0650jdhybnh"))))
6062 (build-system python-build-system)
6063 (native-inputs
6064 `(("python-nose" ,python-nose)
6065 ("python-pyyaml" ,python-pyyaml)))
6066 (home-page "https://python-markdown.github.io/")
6067 (synopsis "Python implementation of Markdown")
6068 (description
6069 "This package provides a Python implementation of John Gruber's
6070Markdown. The library features international input, various Markdown
6071extensions, and several HTML output formats. A command line wrapper
6072markdown_py is also provided to convert Markdown files to HTML.")
6073 (license license:bsd-3)))
6074
6075(define-public python2-markdown
6076 (package-with-python2 python-markdown))
6077
6078(define-public python-ptyprocess
6079 (package
6080 (name "python-ptyprocess")
6081 (version "0.5.2")
6082 (source
6083 (origin
6084 (method url-fetch)
6085 (uri (pypi-uri "ptyprocess" version))
6086 (sha256
6087 (base32
6088 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
6089 (build-system python-build-system)
6090 (native-inputs
6091 `(("python-nose" ,python-nose)))
6092 (arguments
6093 `(#:phases
6094 (modify-phases %standard-phases
6095 (replace 'check
7904d6fa 6096 (lambda _ (invoke "nosetests"))))))
44d10b1f
RW
6097 (home-page "https://github.com/pexpect/ptyprocess")
6098 (synopsis "Run a subprocess in a pseudo terminal")
6099 (description
6100 "This package provides a Python library used to launch a subprocess in a
6101pseudo terminal (pty), and interact with both the process and its pty.")
6102 (license license:isc)))
6103
6104(define-public python2-ptyprocess
6105 (package-with-python2 python-ptyprocess))
6106
6107(define-public python-cram
6108 (package
6109 (name "python-cram")
6110 (version "0.7")
6111 (home-page "https://bitheap.org/cram/")
6112 (source (origin
6113 (method url-fetch)
6114 (uri (list (string-append home-page "cram-"
6115 version ".tar.gz")
6116 (pypi-uri "cram" version)))
6117 (sha256
6118 (base32
6119 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6120 (arguments
6121 '(#:phases
6122 (modify-phases %standard-phases
6123 (add-after 'unpack 'patch-source
6124 (lambda _
6125 (substitute* (find-files "cram" ".*\\.py$")
6126 ;; Replace default shell path.
6127 (("/bin/sh") (which "sh")))
6128 (substitute* (find-files "tests" ".*\\.t$")
6129 (("md5") "md5sum")
6130 (("/bin/bash") (which "bash"))
6131 (("/bin/sh") (which "sh")))
6132 (substitute* "cram/_test.py"
6133 ;; This hack works around a bug triggered by substituting
6134 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6135 ;; "cram -h", which breaks the output at 80 characters. This
6136 ;; causes the line showing the default shell to break into two
6137 ;; lines, but the test expects a single line...
6138 (("env\\['COLUMNS'\\] = '80'")
6139 "env['COLUMNS'] = '160'"))
6140 #t))
6141 (delete 'check)
6142 (add-after 'install 'check
6143 ;; The test phase uses the built library and executable.
6144 ;; It's easier to run it after install since the build
6145 ;; directory contains version-specific PATH.
6146 (lambda* (#:key inputs outputs #:allow-other-keys)
6147 (add-installed-pythonpath inputs outputs)
6148 (setenv "PATH" (string-append (getenv "PATH") ":"
6149 (assoc-ref outputs "out") "/bin"))
2d7db192 6150 (invoke "make" "test"))))))
44d10b1f
RW
6151 (build-system python-build-system)
6152 (native-inputs
6153 `(("python-coverage" ,python-coverage)
6154 ("which" ,which)))
6155 (synopsis "Simple testing framework for command line applications")
6156 (description
6157 "Cram is a functional testing framework for command line applications.
6158Cram tests look like snippets of interactive shell sessions. Cram runs each
6159command and compares the command output in the test with the command’s actual
6160output.")
6161 (license license:gpl2+)))
6162
6163(define-public python2-cram
6164 (package-with-python2 python-cram))
6165
6166(define-public python-straight-plugin
6167 (package
6168 (name "python-straight-plugin")
6169 (version "1.4.1")
6170 (source
6171 (origin
6172 (method url-fetch)
6173 (uri (pypi-uri "straight.plugin" version))
6174 (sha256
6175 (base32
6176 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6177 (build-system python-build-system)
6178 (home-page "https://github.com/ironfroggy/straight.plugin")
6179 (synopsis "Simple namespaced plugin facility")
6180 (description "Straight Plugin provides a type of plugin you can create from
6181almost any existing Python modules, and an easy way for outside developers to
6182add functionality and customization to your projects with their own plugins.")
6183 (license license:expat)))
6184
6185(define-public python2-straight-plugin
6186 (package-with-python2 python-straight-plugin))
6187
6188(define-public python-fonttools
6189 (package
6190 (name "python-fonttools")
6191 (version "3.28.0")
6192 (source (origin
6193 (method url-fetch)
6194 (uri (pypi-uri "fonttools" version ".zip"))
6195 (sha256
6196 (base32
6197 "0vsvjhidpb5kywpjgz1j3fywzkddxkb0afqai18qa3h6lqjyxwpb"))))
6198 (build-system python-build-system)
6199 (native-inputs
6200 `(("unzip" ,unzip)
6201 ("python-pytest" ,python-pytest)
6202 ("python-pytest-runner" ,python-pytest-runner)))
6203 (home-page "https://github.com/behdad/fonttools")
6204 (synopsis "Tools to manipulate font files")
6205 (description
6206 "FontTools/TTX is a library to manipulate font files from Python. It
6207supports reading and writing of TrueType/OpenType fonts, reading and writing
6208of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6209also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6210from an XML-based format.")
6211 (license license:expat)))
6212
6213(define-public python2-fonttools
6214 (package-with-python2 python-fonttools))
6215
6216(define-public python-ly
6217 (package
6218 (name "python-ly")
6219 (version "0.9.5")
6220 (source
6221 (origin
6222 (method url-fetch)
6223 (uri (pypi-uri name version))
6224 (sha256
6225 (base32
6226 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
6227 (build-system python-build-system)
6228 (arguments
6229 ;; FIXME: Some tests need network access.
6230 '(#:tests? #f))
6231 (synopsis "Tool and library for manipulating LilyPond files")
6232 (description "This package provides a Python library to parse, manipulate
6233or create documents in LilyPond format. A command line program ly is also
6234provided that can be used to do various manipulations with LilyPond files.")
6235 (home-page "https://pypi.python.org/pypi/python-ly")
6236 (license license:gpl2+)))
6237
6238(define-public python-appdirs
6239 (package
6240 (name "python-appdirs")
6241 (version "1.4.3")
6242 (source
6243 (origin
6244 (method url-fetch)
6245 (uri (pypi-uri "appdirs" version))
6246 (sha256
6247 (base32
6248 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
6249 (build-system python-build-system)
6250 (home-page "https://github.com/ActiveState/appdirs")
6251 (synopsis
6252 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6253 (description
6254 "This module provides a portable way of finding out where user data
6255should be stored on various operating systems.")
6256 (license license:expat)))
6257
6258(define-public python2-appdirs
6259 (package-with-python2 python-appdirs))
6260
6261(define-public python-llfuse
6262 (package
6263 (name "python-llfuse")
6264 (version "1.3.5")
6265 (source (origin
6266 (method url-fetch)
6267 (uri (pypi-uri "llfuse" version ".tar.bz2"))
6268 (sha256
6269 (base32
6270 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
6271 (build-system python-build-system)
6272 (inputs
6273 `(("fuse" ,fuse)
6274 ("attr" ,attr)))
6275 (native-inputs
6276 `(("pkg-config" ,pkg-config)))
6277 (synopsis "Python bindings for FUSE")
6278 (description
6279 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6280 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
6281 (license license:lgpl2.0+)
6282 (properties `((python2-variant . ,(delay python2-llfuse))))))
6283
6284(define-public python2-llfuse
6285 (package (inherit (package-with-python2
6286 (strip-python2-variant python-llfuse)))
6287 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6288
6289;; For attic-0.16
6290(define-public python-llfuse-0.41
6291 (package (inherit python-llfuse)
6292 (version "0.41.1")
6293 (source (origin
6294 (method url-fetch)
6295 (uri (string-append
6296 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6297 "llfuse-" version ".tar.bz2"))
6298 (sha256
6299 (base32
6300 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
6301 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6302 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
6303 (license (list license:expat license:lgpl2.0+))))
6304
6305(define-public python-msgpack
6306 (package
6307 (name "python-msgpack")
6308 (version "0.5.6")
6309 (source (origin
6310 (method url-fetch)
6311 (uri (pypi-uri "msgpack" version))
6312 (sha256
6313 (base32
6314 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
6315 (build-system python-build-system)
6316 (arguments
6317 `(#:modules ((guix build utils)
6318 (guix build python-build-system)
6319 (ice-9 ftw)
6320 (srfi srfi-1)
6321 (srfi srfi-26))
6322 #:phases
6323 (modify-phases %standard-phases
6324 (replace 'check
6325 (lambda _
6326 (let ((cwd (getcwd)))
6327 (setenv "PYTHONPATH"
6328 (string-append cwd "/build/"
6329 (find (cut string-prefix? "lib" <>)
6330 (scandir (string-append cwd "/build")))
6331 ":"
6332 (getenv "PYTHONPATH")))
6333 (invoke "pytest" "-v" "test")))))))
6334 (native-inputs
6335 `(("python-pytest" ,python-pytest)))
6336 (synopsis "MessagePack (de)serializer")
6337 (description "MessagePack is a fast, compact binary serialization format,
6338suitable for similar data to JSON. This package provides CPython bindings for
6339reading and writing MessagePack data.")
6340 (home-page "https://pypi.python.org/pypi/msgpack/")
6341 (license license:asl2.0)))
6342
6343;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
6344;; release 0.5. Some packages like borg still call it by the old name for now.
6345;; <https://bugs.gnu.org/30662>
6346(define-public python-msgpack-transitional
6347 (package
6348 (inherit python-msgpack)
6349 (name "python-msgpack-transitional")
6350 (arguments
6351 (substitute-keyword-arguments (package-arguments python-msgpack)
6352 ((#:phases phases)
6353 `(modify-phases ,phases
6354 (add-after 'unpack 'configure-transitional
6355 (lambda _
6356 ;; Keep using the old name.
6357 (substitute* "setup.py"
6358 (("TRANSITIONAL = False")
6359 "TRANSITIONAL = 1"))
6360 #t))))))))
6361
6362(define-public python2-msgpack
6363 (package-with-python2 python-msgpack))
6364
6365(define-public python-netaddr
6366 (package
6367 (name "python-netaddr")
6368 (version "0.7.19")
6369 (source
6370 (origin
6371 (method url-fetch)
6372 (uri (pypi-uri "netaddr" version))
6373 (sha256
6374 (base32
6375 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
6376 (build-system python-build-system)
6377 (arguments `(#:tests? #f)) ;; No tests.
6378 (home-page "https://github.com/drkjam/netaddr/")
6379 (synopsis "Pythonic manipulation of network addresses")
6380 (description
6381 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6382and MAC network addresses.")
6383 (license license:bsd-3)))
6384
6385(define-public python2-netaddr
6386 (package-with-python2 python-netaddr))
6387
6388(define-public python-wrapt
6389 (package
6390 (name "python-wrapt")
dddd7a75 6391 (version "1.11.1")
44d10b1f
RW
6392 (source
6393 (origin
6394 (method url-fetch)
6395 (uri (pypi-uri "wrapt" version))
6396 (sha256
6397 (base32
dddd7a75 6398 "0cqmysny1pz01jw26q48q5zasvns6507rwhgm6wcw743f0r01sja"))))
44d10b1f
RW
6399 (build-system python-build-system)
6400 (arguments
6401 ;; Tests are not included in the tarball, they are only available in the
6402 ;; git repository.
6403 `(#:tests? #f))
6404 (home-page "https://github.com/GrahamDumpleton/wrapt")
6405 (synopsis "Module for decorators, wrappers and monkey patching")
6406 (description
6407 "The aim of the wrapt module is to provide a transparent object proxy for
6408 Python, which can be used as the basis for the construction of function
6409 wrappers and decorator functions.")
6410 (license license:bsd-2)))
6411
6412(define-public python2-wrapt
6413 (package-with-python2 python-wrapt))
6414
6415(define-public python-xlrd
6416 (package
6417 (name "python-xlrd")
6418 (version "1.0.0")
6419 (source (origin
6420 (method url-fetch)
6421 (uri (pypi-uri "xlrd" version))
6422 (sha256
6423 (base32
6424 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
6425 (build-system python-build-system)
6426 (arguments
6427 `(#:phases
6428 (modify-phases %standard-phases
6429 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
6430 ;; run tests instead for now.
45fd0081 6431 (replace 'check (lambda _ (invoke "nosetests"))))))
44d10b1f
RW
6432 (native-inputs `(("python-nose" ,python-nose)))
6433 (home-page "http://www.python-excel.org/")
6434 (synopsis "Library for extracting data from Excel files")
6435 (description "This packages provides a library to extract data from
6436spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
6437@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
6438Unicode-aware. It is not intended as an end-user tool.")
6439 (license license:bsd-3)))
6440
6441(define-public python2-xlrd
6442 (package-with-python2 python-xlrd))
6443
6444(define-public python-prettytable
6445 (package
6446 (name "python-prettytable")
6447 (version "0.7.2")
6448 (source
6449 (origin
6450 (method url-fetch)
337c3a1e 6451 (uri (pypi-uri "prettytable" version ".tar.bz2"))
44d10b1f
RW
6452 (sha256
6453 (base32
6454 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
6455 (build-system python-build-system)
6456 (home-page "http://code.google.com/p/prettytable/")
6457 (synopsis "Display tabular data in an ASCII table format")
6458 (description
6459 "A library designed to represent tabular data in visually appealing ASCII
6460tables. PrettyTable allows for selection of which columns are to be printed,
6461independent alignment of columns (left or right justified or centred) and
6462printing of sub-tables by specifying a row range.")
6463 (license license:bsd-3)))
6464
6465(define-public python2-prettytable
6466 (package-with-python2 python-prettytable))
6467
6468(define-public python-tables
6469 (package
6470 (name "python-tables")
6471 (version "3.4.4")
6472 (source
6473 (origin
6474 (method url-fetch)
6475 (uri (pypi-uri "tables" version))
6476 (sha256
6477 (base32
6478 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
6479 (modules '((guix build utils)))
6480 (snippet
6481 '(begin
6482 ;; Remove pre-compiled .pyc files from source.
6483 (for-each delete-file-recursively
6484 (find-files "." "__pycache__" #:directories? #t))
6485 (for-each delete-file (find-files "." "\\.pyc$"))
6486 #t))))
6487 (build-system python-build-system)
6488 (arguments
6489 `(;; FIXME: python-build-system does not pass configure-flags to "build"
6490 ;; or "check", so we must override the build and check phases.
6491 #:phases
6492 (modify-phases %standard-phases
6493 (add-after 'unpack 'use-gcc
6494 (lambda _
6495 (substitute* "setup.py"
6496 (("compiler = new_compiler\\(\\)" line)
6497 (string-append line
6498 "\ncompiler.set_executables(compiler='gcc',"
6499 "compiler_so='gcc',"
6500 "linker_exe='gcc',"
6501 "linker_so='gcc -shared')")))
6502 #t))
6503 (replace 'build
6504 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
6505 (invoke "python" "setup.py" "build"
6506 (string-append "--hdf5="
6507 (assoc-ref inputs "hdf5")))))
44d10b1f
RW
6508 (replace 'check
6509 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
6510 (invoke "python" "setup.py" "check"
6511 (string-append "--hdf5="
6512 (assoc-ref inputs "hdf5"))))))))
44d10b1f
RW
6513 (propagated-inputs
6514 `(("python-numexpr" ,python-numexpr)
6515 ("python-numpy" ,python-numpy)))
6516 (native-inputs
6517 `(("python-cython" ,python-cython)
6518 ("pkg-config" ,pkg-config)))
6519 (inputs
6520 `(("hdf5" ,hdf5)
6521 ("bzip2" ,bzip2)
6522 ("zlib" ,zlib)))
6523 (home-page "http://www.pytables.org/")
6524 (synopsis "Hierarchical datasets for Python")
6525 (description "PyTables is a package for managing hierarchical datasets and
6526designed to efficiently cope with extremely large amounts of data.")
6527 (license license:bsd-3)))
6528
6529(define-public python2-tables
6530 (package-with-python2 python-tables))
6531
6532(define-public python-pyasn1
6533 (package
6534 (name "python-pyasn1")
6535 (version "0.4.3")
6536 (source
6537 (origin
6538 (method url-fetch)
6539 (uri (pypi-uri "pyasn1" version))
6540 (sha256
6541 (base32
6542 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
6543 (build-system python-build-system)
6544 (home-page "http://pyasn1.sourceforge.net/")
6545 (synopsis "ASN.1 types and codecs")
6546 (description
6547 "This is an implementation of ASN.1 types and codecs in Python. It is
6548suitable for a wide range of protocols based on the ASN.1 specification.")
6549 (license license:bsd-2)))
6550
6551(define-public python2-pyasn1
6552 (package-with-python2 python-pyasn1))
6553
6554(define-public python-pyasn1-modules
6555 (package
6556 (name "python-pyasn1-modules")
6557 (version "0.2.2")
6558 (source
6559 (origin
6560 (method url-fetch)
6561 (uri (pypi-uri "pyasn1-modules" version))
6562 (sha256
6563 (base32
6564 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
6565 (build-system python-build-system)
6566 (propagated-inputs
6567 `(("python-pyasn1" ,python-pyasn1)))
6568 (home-page "https://sourceforge.net/projects/pyasn1/")
6569 (synopsis "ASN.1 codec implementations")
6570 (description
6571 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
6572implementations of ASN.1-based codecs and protocols.")
6573 (license license:bsd-3)))
6574
6575(define-public python2-pyasn1-modules
6576 (package-with-python2 python-pyasn1-modules))
6577
6578(define-public python-ipaddress
6579 (package
6580 (name "python-ipaddress")
6581 (version "1.0.22")
6582 (source (origin
6583 (method url-fetch)
6584 (uri (pypi-uri "ipaddress" version))
6585 (sha256
6586 (base32
6587 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
6588 (build-system python-build-system)
6589 (home-page "https://github.com/phihag/ipaddress")
6590 (synopsis "IP address manipulation library")
6591 (description
6592 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
6593 in Python. This library is used to create, poke at, and manipulate IPv4 and
6594 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
6595 module to older versions of Python.")
6596 (license license:psfl)))
6597
6598(define-public python2-ipaddress
6599 (package-with-python2 python-ipaddress))
6600
6601(define-public python2-ipaddr
6602 (package
6603 (name "python2-ipaddr")
6604 (version "2.1.11")
6605 (source
6606 (origin
6607 (method url-fetch)
6608 (uri (pypi-uri "ipaddr" version))
6609 (sha256
6610 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
6611 (build-system python-build-system)
6612 (arguments
6613 `(#:python ,python-2 ;version 2 only
6614 #:phases
6615 (modify-phases %standard-phases
6616 (replace 'check
40b8c4e3 6617 (lambda _ (invoke "python" "ipaddr_test.py"))))))
44d10b1f
RW
6618 (home-page "https://github.com/google/ipaddr-py")
6619 (synopsis "IP address manipulation library")
6620 (description
6621 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
6622IPv6 addresses and networks.
6623
6624For new implementations you may prefer to use the standard module
6625@code{ipaddress}, which was introduced in Python 3.3 and backported to older
6626versions of Python.")
6627 (license license:asl2.0)))
6628
6629(define-public python-idna
6630 (package
6631 (name "python-idna")
6632 (version "2.7")
6633 (source
6634 (origin
6635 (method url-fetch)
6636 (uri (pypi-uri "idna" version))
6637 (sha256
6638 (base32
6639 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))
6640 (build-system python-build-system)
6641 (home-page "https://github.com/kjd/idna")
6642 (synopsis "Internationalized domain names in applications")
6643 (description
6644 "This is a library to support the Internationalised Domain Names in
6645Applications (IDNA) protocol as specified in RFC 5891. This version of the
6646protocol is often referred to as “IDNA2008” and can produce different results
6647from the earlier standard from 2003. The library is also intended to act as a
6648suitable drop-in replacement for the “encodings.idna” module that comes with
6649the Python standard library but currently only supports the older 2003
6650specification.")
6651 (license license:bsd-4)))
6652
6653(define-public python2-idna
6654 (package-with-python2 python-idna))
6655
6656(define-public python-idna-ssl
6657 (package
6658 (name "python-idna-ssl")
6659 (version "1.0.1")
6660 (source
6661 (origin
6662 (method url-fetch)
6663 (uri (pypi-uri "idna-ssl" version))
6664 (sha256
6665 (base32
6666 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
6667 (build-system python-build-system)
6668 (arguments
6669 `(#:tests? #f)) ;circular dependency with python-aiohttp
6670 (home-page "https://github.com/aio-libs/idna-ssl")
6671 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
6672 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
6673domains support.")
6674 (license license:expat)))
6675
6676(define-public python-pretend
6677 (package
6678 (name "python-pretend")
6679 (version "1.0.9")
6680 (source
6681 (origin
6682 (method url-fetch)
9f1f22ee 6683 (uri (pypi-uri "pretend" version))
44d10b1f
RW
6684 (sha256
6685 (base32
6686 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
6687 (build-system python-build-system)
6688 (home-page "https://github.com/alex/pretend")
6689 (synopsis "Library for stubbing in Python")
6690 (description
6691 "Pretend is a library to make stubbing with Python easier. Stubbing is a
6692technique for writing tests. You may hear the term mixed up with mocks,
6693fakes, or doubles. Basically, a stub is an object that returns pre-canned
6694responses, rather than doing any computation.")
6695 (license license:bsd-3)))
6696
6697(define-public python2-pretend
6698 (package-with-python2 python-pretend))
6699
6700(define-public python-pip
6701 (package
6702 (name "python-pip")
6703 (version "18.1")
6704 (source
6705 (origin
6706 (method url-fetch)
6707 (uri (pypi-uri "pip" version))
6708 (sha256
6709 (base32
6710 "188fclay154s520n43s7cxxlhdaiysvxf19zk8vr1xbyjyyr58n0"))))
6711 (build-system python-build-system)
6712 (arguments
6713 '(#:tests? #f)) ; there are no tests in the pypi archive.
6714 (home-page "https://pip.pypa.io/")
6715 (synopsis "Package manager for Python software")
6716 (description
6717 "Pip is a package manager for Python software, that finds packages on the
6718Python Package Index (PyPI).")
6719 (license license:expat)))
6720
6721(define-public python2-pip
6722 (package-with-python2 python-pip))
6723
6724(define-public python-tlsh
6725 (package
6726 (name "python-tlsh")
6727 (version "3.4.5")
6728 (home-page "https://github.com/trendmicro/tlsh")
6729 (source (origin
6730 (method url-fetch)
6731 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
6732 version ".tar.gz"))
6733 (sha256
6734 (base32
6735 "1x1vahd4zg5kpyr9h9hs3fvh460p25rjy4cclwdnbbw8x3vc30q3"))
6736 (file-name (string-append name "-" version ".tar.gz"))))
6737 (build-system cmake-build-system)
6738 (arguments
6739 '(#:out-of-source? #f
6740 #:phases (modify-phases %standard-phases
6741 (replace
6742 'install
6743 (lambda* (#:key outputs #:allow-other-keys)
6744 ;; Build and install the Python bindings. The underlying
6745 ;; C++ library is apparently not meant to be installed.
6746 (let ((out (assoc-ref outputs "out")))
6747 (with-directory-excursion "py_ext"
6748 (and (system* "python" "setup.py" "build")
6749 (system* "python" "setup.py" "install"
6750 (string-append "--prefix=" out))))))))))
6751 (inputs `(("python" ,python-wrapper))) ;for the bindings
6752 (synopsis "Fuzzy matching library for Python")
6753 (description
6754 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
6755Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
6756value which can be used for similarity comparisons. Similar objects have
6757similar hash values, which allows for the detection of similar objects by
6758comparing their hash values. The byte stream should have a sufficient amount
6759of complexity; for example, a byte stream of identical bytes will not generate
6760a hash value.")
6761 (license license:asl2.0)))
6762
6763(define-public python2-tlsh
6764 (package
6765 (inherit python-tlsh)
6766 (name "python2-tlsh")
6767 (inputs `(("python" ,python-2)))))
6768
6769(define-public python-termcolor
6770 (package
6771 (name "python-termcolor")
6772 (version "1.1.0")
6773 (source
6774 (origin
6775 (method url-fetch)
6776 (uri (pypi-uri "termcolor" version))
6777 (sha256
6778 (base32
6779 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
6780 (build-system python-build-system)
6781 (arguments
6782 ;; There are no tests.
6783 `(#:tests? #f))
6784 (home-page "https://pypi.python.org/pypi/termcolor")
6785 (synopsis "ANSII Color formatting for terminal output")
6786 (description
6787 "This package provides ANSII Color formatting for output in terminals.")
6788 (license license:expat)))
6789
6790(define-public python2-termcolor
6791 (package-with-python2 python-termcolor))
6792
6793(define-public python-libarchive-c
6794 (package
6795 (name "python-libarchive-c")
6796 (version "2.8")
6797 (source (origin
6798 (method url-fetch)
6799 (uri (pypi-uri "libarchive-c" version))
6800 (sha256
6801 (base32
6802 "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06"))))
6803 (build-system python-build-system)
6804 (arguments
6805 '(#:phases (modify-phases %standard-phases
6806 (add-before
6807 'build 'reference-libarchive
6808 (lambda* (#:key inputs #:allow-other-keys)
6809 ;; Retain the absolute file name of libarchive.so.
6810 (let ((libarchive (assoc-ref inputs "libarchive")))
6811 (substitute* "libarchive/ffi.py"
6812 (("find_library\\('archive'\\)")
6813 (string-append "'" libarchive
6814 "/lib/libarchive.so'"))))))
6815 (replace 'check
6816 (lambda _ (invoke "pytest" "-vv"))))))
6817 (native-inputs
6818 `(("python-mock" ,python-mock)
6819 ("python-pytest" ,python-pytest)))
6820 (inputs
6821 `(("libarchive" ,libarchive)))
6822 (home-page "https://github.com/Changaco/python-libarchive-c")
6823 (synopsis "Python interface to libarchive")
6824 (description
6825 "This package provides Python bindings to libarchive, a C library to
6826access possibly compressed archives in many different formats. It uses
6827Python's @code{ctypes} foreign function interface (FFI).")
6828 (license license:lgpl2.0+)))
6829
6830(define-public python2-libarchive-c
6831 (package-with-python2 python-libarchive-c))
6832
6833(define-public python-file
6834 (package
6835 (inherit file)
6836 (name "python-file")
6837 (build-system python-build-system)
6838 (arguments
6839 '(#:tests? #f ;no tests
6840 #:configure-flags '("--single-version-externally-managed" "--root=/")
6841 #:phases (modify-phases %standard-phases
6842 (add-before 'build 'change-directory
6843 (lambda _
6844 (chdir "python")
6845 #t))
6846 (add-before 'build 'set-library-file-name
6847 (lambda* (#:key inputs #:allow-other-keys)
6848 (let ((file (assoc-ref inputs "file")))
6849 (substitute* "magic.py"
6850 (("find_library\\('magic'\\)")
6851 (string-append "'" file "/lib/libmagic.so'")))
6852 #t))))))
6853 (inputs `(("file" ,file)))
6854 (self-native-input? #f)
6855 (synopsis "Python bindings to the libmagic file type guesser. Note that
6856this module and the python-magic module both provide a \"magic.py\" file;
6857these two modules, which are different and were developed separately, both
6858serve the same purpose: provide Python bindings for libmagic.")))
6859
6860(define-public python2-file
6861 (package-with-python2 python-file))
6862
6863(define-public python-debian
6864 (package
6865 (name "python-debian")
6866 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
6867 (version "0.1.28")
6868 (source
6869 (origin
6870 (method url-fetch)
6871 (uri (pypi-uri name version))
6872 (sha256
6873 (base32
6874 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
6875 (build-system python-build-system)
6876 (propagated-inputs
6877 `(("python-six" ,python-six)))
6878 (synopsis "Debian package related modules")
6879 (description
6880 ;; XXX: Use @enumerate instead of @itemize to work around
6881 ;; <http://bugs.gnu.org/21772>.
6882 "This package provides Python modules that abstract many formats of
6883Debian-related files, such as:
6884
6885@enumerate
6886@item Debtags information;
6887@item @file{debian/changelog} files;
6888@item packages files, pdiffs;
6889@item control files of single or multiple RFC822-style paragraphs---e.g.
6890 @file{debian/control}, @file{.changes}, @file{.dsc};
6891@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
6892 contained files and meta-information.
6893@end enumerate\n")
6894
6895 ;; Modules are either GPLv2+ or GPLv3+.
6896 (license license:gpl3+)))
6897
6898(define-public python2-debian
6899 (package-with-python2 python-debian))
6900
6901(define-public python-nbformat
6902 (package
6903 (name "python-nbformat")
6904 (version "4.4.0")
6905 (source
6906 (origin
6907 (method url-fetch)
6908 (uri (pypi-uri "nbformat" version))
6909 (sha256
6910 (base32
6911 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
6912 (build-system python-build-system)
6913 (arguments `(#:tests? #f)) ; no test target
6914 (propagated-inputs
6915 `(("python-ipython-genutils" ,python-ipython-genutils)
6916 ("python-jsonschema" ,python-jsonschema)
6917 ("python-jupyter-core" ,python-jupyter-core)
6918 ("python-traitlets" ,python-traitlets)))
6919 (home-page "http://jupyter.org")
6920 (synopsis "Jupyter Notebook format")
6921 (description "This package provides the reference implementation of the
6922Jupyter Notebook format and Python APIs for working with notebooks.")
6923 (license license:bsd-3)))
6924
6925(define-public python2-nbformat
6926 (package-with-python2 python-nbformat))
6927
6928(define-public python-bleach
6929 (package
6930 (name "python-bleach")
6931 (version "1.4.3")
6932 (source
6933 (origin
6934 (method url-fetch)
6935 (uri (pypi-uri "bleach" version))
6936 (sha256
6937 (base32
6938 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
6939 (build-system python-build-system)
6940 (propagated-inputs
6941 `(("python-html5lib" ,python-html5lib-0.9)
6942 ("python-six" ,python-six)))
6943 (native-inputs
6944 `(("python-nose" ,python-nose)))
6945 (home-page "https://github.com/jsocol/bleach")
6946 (synopsis "Whitelist-based HTML-sanitizing tool")
6947 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
6948 (license license:asl2.0)))
6949
6950(define-public python2-bleach
6951 (package-with-python2 python-bleach))
6952
6953(define-public python-entrypoints
6954 (package
6955 (name "python-entrypoints")
a7f1b718 6956 (version "0.3")
44d10b1f
RW
6957 (source
6958 (origin
6959 (method url-fetch)
a7f1b718 6960 (uri (pypi-uri "entrypoints" version))
44d10b1f
RW
6961 (sha256
6962 (base32
a7f1b718 6963 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
44d10b1f
RW
6964 (build-system python-build-system)
6965 ;; The package does not come with a setup.py file, so we have to generate
6966 ;; one ourselves.
6967 (arguments
6968 `(#:tests? #f
6969 #:phases
6970 (modify-phases %standard-phases
6971 (add-after 'unpack 'create-setup.py
6972 (lambda _
6973 (call-with-output-file "setup.py"
6974 (lambda (port)
6975 (format port "\
6976from setuptools import setup
6977setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
6978" ,version))))))))
6979 (home-page "https://github.com/takluyver/entrypoints")
6980 (synopsis "Discover and load entry points from installed Python packages")
6981 (description "Entry points are a way for Python packages to advertise
6982objects with some common interface. The most common examples are
6983@code{console_scripts} entry points, which define shell commands by
6984identifying a Python function to run. The @code{entrypoints} module contains
6985functions to find and load entry points.")
6986 (license license:expat)))
6987
6988(define-public python2-entrypoints
6989 (package-with-python2 python-entrypoints))
6990
6991(define-public python-nbconvert
6992 (package
6993 (name "python-nbconvert")
6994 (version "5.0.0b1")
6995 (source
6996 (origin
6997 (method url-fetch)
6998 (uri (pypi-uri "nbconvert" version))
6999 (sha256
7000 (base32
7001 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7002 (build-system python-build-system)
7003 (arguments
7004 `(;; The "bdist_egg" target is disabled by default, causing the installation
7005 ;; to fail.
7006 #:configure-flags (list "bdist_egg")
7007 ;; FIXME: 5 failures, 40 errors.
7008 #:tests? #f))
7009 ;; #:phases
7010 ;; (modify-phases %standard-phases
7011 ;; (replace 'check
7012 ;; (lambda _
7013 ;; (zero? (system* "py.test" "-v")))))
7014 (native-inputs
7015 `(("python-pytest" ,python-pytest)))
7016 (propagated-inputs
7017 `(("python-bleach" ,python-bleach)
7018 ("python-entrypoints" ,python-entrypoints)
7019 ("python-jinja2" ,python-jinja2)
7020 ("python-jupyter-core" ,python-jupyter-core)
7021 ("python-mistune" ,python-mistune)
7022 ("python-nbformat" ,python-nbformat)
7023 ("python-pygments" ,python-pygments)
7024 ("python-traitlets" ,python-traitlets)))
7025 (home-page "http://jupyter.org")
7026 (synopsis "Converting Jupyter Notebooks")
7027 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7028notebooks to various other formats via Jinja templates. It allows you to
7029convert an @code{.ipynb} notebook file into various static formats including:
7030
7031@enumerate
7032@item HTML
7033@item LaTeX
7034@item PDF
7035@item Reveal JS
7036@item Markdown (md)
7037@item ReStructured Text (rst)
7038@item executable script
7039@end enumerate\n")
7040 (license license:bsd-3)))
7041
7042(define-public python2-nbconvert
7043 (package-with-python2 python-nbconvert))
7044
44d10b1f
RW
7045(define-public python-notebook
7046 (package
7047 (name "python-notebook")
7048 (version "5.7.4")
7049 (source (origin
7050 (method url-fetch)
7051 (uri (pypi-uri "notebook" version))
7052 (sha256
7053 (base32
7054 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
7055 (build-system python-build-system)
7056 (arguments
7057 `(#:phases
7058 (modify-phases %standard-phases
7059 (replace 'check
7060 (lambda _
7061 ;; These tests require a browser
7062 (delete-file-recursively "notebook/tests/selenium")
7063 ;; Some tests need HOME
7064 (setenv "HOME" "/tmp")
7065 ;; This file contains "warningfilters", which are not supported
7066 ;; by this version of nose.
7067 (delete-file "setup.cfg")
7068 (with-directory-excursion "/tmp"
7069 (invoke "nosetests" "-v"))
7070 #t)))))
7071 (propagated-inputs
7072 `(("python-jupyter-core" ,python-jupyter-core)
7073 ("python-nbformat" ,python-nbformat)
7074 ("python-nbconvert" ,python-nbconvert)
7075 ("python-prometheus-client" ,python-prometheus-client)
7076 ("python-send2trash" ,python-send2trash)
7077 ("python-terminado" ,python-terminado)))
7078 (native-inputs
7079 `(("python-nose" ,python-nose)
7080 ("python-sphinx" ,python-sphinx)
7081 ("python-requests" ,python-requests)))
7082 (home-page "http://jupyter.org/")
7083 (synopsis "Web-based notebook environment for interactive computing")
7084 (description
7085 "The Jupyter HTML notebook is a web-based notebook environment for
7086interactive computing.")
7087 (properties `((python2-variant . ,(delay python2-notebook))))
7088 (license license:bsd-3)))
7089
7090(define-public python2-notebook
7091 (let ((base (package-with-python2
7092 (strip-python2-variant python-notebook))))
7093 (package (inherit base)
7094 (native-inputs
7095 `(("python2-mock" ,python2-mock)
7096 ,@(package-native-inputs base)))
7097 (arguments
7098 (substitute-keyword-arguments (package-arguments base)
7099 ((#:phases phases)
7100 `(modify-phases ,phases
7101 (add-before 'check 'disable-test-case
7102 ;; The test requires network access to localhost. Curiously it
7103 ;; fails with Python 2 only. Simply make the test-case return
7104 ;; immediately.
7105 (lambda _
7106 (substitute*
7107 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7108 (("formats = self.nbconvert_api") "return #")))))))))))
7109
7110(define-public python-widgetsnbextension
7111 (package
7112 (name "python-widgetsnbextension")
7113 (version "3.4.2")
7114 (source
7115 (origin
7116 (method url-fetch)
7117 (uri (pypi-uri "widgetsnbextension" version))
7118 (sha256
7119 (base32
7120 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
7121 (build-system python-build-system)
7122 (propagated-inputs
7123 `(("python-ipykernel" ,python-ipykernel)
7124 ("python-notebook" ,python-notebook)))
7125 (native-inputs
7126 `(("python-certifi" ,python-certifi)
7127 ("python-nose" ,python-nose)))
7128 (home-page "https://ipython.org")
7129 (synopsis "IPython HTML widgets for Jupyter")
7130 (description "This package provides interactive HTML widgets for Jupyter
7131notebooks.")
7132 (license license:bsd-3)))
7133
7134(define-public python2-widgetsnbextension
7135 (package-with-python2 python-widgetsnbextension))
7136
7137(define-public python-ipywidgets
7138 (package
7139 (name "python-ipywidgets")
7140 (version "5.2.2")
7141 (source
7142 (origin
7143 (method url-fetch)
7144 (uri (pypi-uri "ipywidgets" version))
7145 (sha256
7146 (base32
7147 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7148 (build-system python-build-system)
7149 (propagated-inputs
7150 `(("python-ipython" ,python-ipython)
7151 ("python-traitlets" ,python-traitlets)
7152 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7153 (native-inputs
7154 `(("python-nose" ,python-nose)
7155 ("python-pytest" ,python-pytest)))
7156 (home-page "https://ipython.org")
7157 (synopsis "IPython HTML widgets for Jupyter")
7158 (description "Ipywidgets are interactive HTML widgets for Jupyter
7159notebooks and the IPython kernel. Notebooks come alive when interactive
7160widgets are used. Users gain control of their data and can visualize changes
7161in the data.")
7162 (license license:bsd-3)))
7163
7164(define-public python2-ipywidgets
7165 (package-with-python2 python-ipywidgets))
7166
7167(define-public python-jupyter-console
7168 (package
7169 (name "python-jupyter-console")
7170 (version "5.2.0")
7171 (source
7172 (origin
7173 (method url-fetch)
7174 (uri (pypi-uri "jupyter_console" version))
7175 (sha256
7176 (base32
7177 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
7178 (build-system python-build-system)
7179 ;; Tests only run in an TTY.
7180 (arguments `(#:tests? #f))
7181 (propagated-inputs
7182 `(("python-ipykernel" ,python-ipykernel)
7183 ("python-jupyter-client" ,python-jupyter-client)
7184 ("python-prompt-toolkit" ,python-prompt-toolkit-1)
7185 ("python-pygments" ,python-pygments)))
7186 (native-inputs
7187 `(("python-nose" ,python-nose)))
7188 (home-page "https://jupyter.org")
7189 (synopsis "Jupyter terminal console")
7190 (description "This package provides a terminal-based console frontend for
7191Jupyter kernels. It also allows for console-based interaction with non-Python
7192Jupyter kernels such as IJulia and IRKernel.")
7193 (license license:bsd-3)))
7194
7195(define-public python2-jupyter-console
7196 (package-with-python2 python-jupyter-console))
7197
7198;; The python-ipython and python-jupyter-console require each other. To get
7199;; the functionality in both packages working, strip down the
7200;; python-jupyter-console package when using it as an input to python-ipython.
7201(define python-jupyter-console-minimal
7202 (package
7203 (inherit python-jupyter-console)
7204 (name "python-jupyter-console-minimal")
7205 (arguments
7206 (substitute-keyword-arguments
7207 (package-arguments python-jupyter-console)
7208 ((#:phases phases)
7209 `(modify-phases ,phases
7210 (add-after 'install 'delete-bin
7211 (lambda* (#:key outputs #:allow-other-keys)
7212 ;; Delete the bin files, to avoid conflicts in profiles
7213 ;; where python-ipython and python-jupyter-console are
7214 ;; both present.
7215 (delete-file-recursively
7216 (string-append
7217 (assoc-ref outputs "out") "/bin"))))))))
7218 ;; Remove the python-ipython propagated input, to avoid the cycle
7219 (propagated-inputs
7220 (alist-delete
7221 "python-ipython"
7222 (package-propagated-inputs python-jupyter-console)))))
7223
7224(define-public python-qtconsole
7225 (package
7226 (name "python-qtconsole")
7227 (version "4.4.3")
7228 (source
7229 (origin
7230 (method url-fetch)
7231 (uri (pypi-uri "qtconsole" version))
7232 (sha256
7233 (base32
7234 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
7235 (build-system python-build-system)
7236 (arguments
7237 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
7238 ;; but we only have the LTS version 5.x. This means that there might be
7239 ;; runtime errors, but since this is a dependency of the Jupyter package,
7240 ;; and Jupyter can be used without the qtconsole we can overlook this for
7241 ;; now.
7242 `(#:tests? #f
7243 #:phases
7244 (modify-phases %standard-phases
7245 (add-before 'check 'pre-check
7246 (lambda _
7247 (setenv "QT_QPA_PLATFORM" "offscreen")
7248 #t)))))
7249 (propagated-inputs
7250 `(("python-ipykernel" ,python-ipykernel)
7251 ("python-ipython" ,python-ipython)))
7252 (native-inputs
7253 `(("python-pytest" ,python-pytest)))
7254 (home-page "http://jupyter.org")
7255 (synopsis "Jupyter Qt console")
7256 (description "This package provides a Qt-based console for Jupyter with
7257support for rich media output.")
7258 (license license:bsd-3)))
7259
7260(define-public jupyter
7261 (package
7262 (name "jupyter")
7263 (version "1.0.0")
7264 (source
7265 (origin
7266 (method url-fetch)
7267 (uri (pypi-uri "jupyter" version))
7268 (sha256
7269 (base32
7270 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
7271 (build-system python-build-system)
7272 (arguments '(#:tests? #f)) ; there are none.
7273 (propagated-inputs
7274 `(("python-ipykernel" ,python-ipykernel)
7275 ("python-ipywidgets" ,python-ipywidgets)
7276 ("python-jupyter-console" ,python-jupyter-console)
7277 ("python-nbconvert" ,python-nbconvert)
7278 ("python-notebook" ,python-notebook)
7279 ("python-qtconsole" ,python-qtconsole)))
7280 (native-search-paths
7281 (list (search-path-specification
7282 (variable "JUPYTER_PATH")
7283 (files '("share/jupyter")))))
7284 (home-page "https://jupyter.org")
7285 (synopsis "Web application for interactive documents")
7286 (description
7287 "The Jupyter Notebook is a web application that allows you to create and
7288share documents that contain live code, equations, visualizations and
7289explanatory text. Uses include: data cleaning and transformation, numerical
7290simulation, statistical modeling, machine learning and much more.")
7291 (license license:bsd-3)))
7292
7293(define-public python-chardet
7294 (package
7295 (name "python-chardet")
7296 (version "3.0.4")
7297 (source
7298 (origin
7299 (method url-fetch)
7300 (uri (pypi-uri "chardet" version))
7301 (sha256
7302 (base32
7303 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
7304 (native-inputs
7305 `(("python-hypothesis" ,python-hypothesis)
7306 ("python-pytest" ,python-pytest)
7307 ("python-pytest-runner" ,python-pytest-runner)))
7308 (build-system python-build-system)
7309 (home-page "https://github.com/chardet/chardet")
7310 (synopsis "Universal encoding detector for Python 2 and 3")
7311 (description
7312 "This package provides @code{chardet}, a Python module that can
7313automatically detect a wide range of file encodings.")
7314 (license license:lgpl2.1+)))
7315
7316(define-public python2-chardet
7317 (package-with-python2 python-chardet))
7318
7319(define-public python-docopt
7320 (package
7321 (name "python-docopt")
7322 (version "0.6.2")
7323 (source
7324 (origin
7325 (method url-fetch)
7326 ;; The release on PyPI does not include tests.
7327 (uri (string-append
7328 "https://github.com/docopt/docopt/archive/"
7329 version ".tar.gz"))
7330 (file-name (string-append name "-" version ".tar.gz"))
7331 (sha256
7332 (base32
7333 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
7334 (build-system python-build-system)
7335 (native-inputs
7336 `(("python-pytest" ,python-pytest)))
7337 (arguments
7338 `(#:phases
7339 (modify-phases %standard-phases
7340 (replace 'check
7341 (lambda _ (invoke "py.test"))))))
7342 (home-page "http://docopt.org")
7343 (synopsis "Command-line interface description language for Python")
7344 (description "This library allows the user to define a command-line
7345interface from a program's help message rather than specifying it
7346programatically with command-line parsers like @code{getopt} and
7347@code{argparse}.")
7348 (license license:expat)))
7349
7350(define-public python2-docopt
7351 (package-with-python2 python-docopt))
7352
7353(define-public python-pythondialog
7354 (package
7355 (name "python-pythondialog")
7356 (version "3.4.0")
7357 (source
7358 (origin
7359 (method url-fetch)
7360 (uri (pypi-uri "pythondialog" version))
7361 (sha256
7362 (base32
7363 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
7364 (build-system python-build-system)
7365 (arguments
7366 `(#:phases
7367 (modify-phases %standard-phases
7368 (add-after 'unpack 'patch-path
7369 (lambda* (#:key inputs #:allow-other-keys)
7370 (let* ((dialog (assoc-ref inputs "dialog")))
7371 ;; Since this library really wants to grovel the search path, we
7372 ;; must hardcode dialog's store path into it.
7373 (substitute* "dialog.py"
7374 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
7375 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
7376 #t))))
7377 #:tests? #f)) ; no test suite
7378 (propagated-inputs
7379 `(("dialog" ,dialog)))
7380 (home-page "http://pythondialog.sourceforge.net/")
7381 (synopsis "Python interface to the UNIX dialog utility")
7382 (description "A Python wrapper for the dialog utility. Its purpose is to
7383provide an easy to use, pythonic and comprehensive Python interface to dialog.
7384This allows one to make simple text-mode user interfaces on Unix-like systems")
7385 (license license:lgpl2.1)
7386 (properties `((python2-variant . ,(delay python2-pythondialog))))))
7387
7388(define-public python2-pythondialog
7389 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
7390 (package
7391 (inherit base)
7392 (version (package-version python-pythondialog))
7393 (source (origin
7394 (method url-fetch)
7395 (uri (pypi-uri "python2-pythondialog" version))
7396 (sha256
7397 (base32
7398 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
7399
7400(define-public python-configobj
7401 (package
7402 (name "python-configobj")
7403 (version "5.0.6")
7404 (source (origin
7405 (method url-fetch)
b0758fbb 7406 (uri (pypi-uri "configobj" version))
44d10b1f
RW
7407 (sha256
7408 (base32
7409 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
7410 ;; Patch setup.py so it looks for python-setuptools, which is
7411 ;; required to parse the keyword 'install_requires' in setup.py.
7412 (patches (search-patches "python-configobj-setuptools.patch"))))
7413 (build-system python-build-system)
7414 (propagated-inputs
7415 `(("python-six" ,python-six)))
7416 (synopsis "Config file reading, writing and validation")
7417 (description "ConfigObj is a simple but powerful config file reader and
7418writer: an ini file round tripper. Its main feature is that it is very easy to
7419use, with a straightforward programmer’s interface and a simple syntax for
7420config files.")
7421 (home-page "https://github.com/DiffSK/configobj")
7422 (license license:bsd-3)))
7423
7424(define-public python2-configobj
7425 (package-with-python2 python-configobj))
7426
7427(define-public python-configargparse
7428 (package
7429 (name "python-configargparse")
86ae491f 7430 (version "0.14.0")
44d10b1f
RW
7431 (source (origin
7432 (method url-fetch)
7433 (uri (pypi-uri "ConfigArgParse" version))
7434 (sha256
7435 (base32
86ae491f 7436 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
44d10b1f
RW
7437 (build-system python-build-system)
7438 (native-inputs
7439 `(("python-pyyaml" ,python-pyyaml)))
7440 (arguments
7441 `(#:phases
7442 (modify-phases %standard-phases
7443 (replace 'check
7444 (lambda _
7445 ;; Bypass setuptools-shim because one test relies on "setup.py"
7446 ;; being the first argument passed to the python call.
7447 ;;
7448 ;; NOTE: Many tests do not run because they rely on Python's
7449 ;; built-in test.test_argparse, but we remove the unit tests from
7450 ;; our Python installation.
7451 (invoke "python" "setup.py" "test"))))))
7452 (synopsis "Replacement for argparse")
7453 (description "A drop-in replacement for argparse that allows options to also
7454be set via config files and/or environment variables.")
7455 (home-page "https://github.com/bw2/ConfigArgParse")
7456 (license license:expat)))
7457
7458(define-public python2-configargparse
7459 (package-with-python2 python-configargparse))
7460
7461(define-public python-argparse-manpage
7462 (package
7463 (name "python-argparse-manpage")
7464 (version "1.1")
7465 (source
7466 (origin
7467 (method url-fetch)
7468 (uri (pypi-uri "argparse-manpage" version))
7469 (sha256
7470 (base32
7471 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
7472 (build-system python-build-system)
7473 (home-page "https://github.com/praiskup/argparse-manpage")
7474 (synopsis "Build manual page from Python's ArgumentParser object")
7475 (description
7476 "This package provides tools to build manual pages from Python's
7477@code{ArgumentParser} object.")
7478 (license license:asl2.0)))
7479
7480(define-public python2-contextlib2
7481 (package
7482 (name "python2-contextlib2")
7483 (version "0.5.5")
7484 (source
7485 (origin
7486 (method url-fetch)
7487 (uri (pypi-uri "contextlib2" version))
7488 (sha256
7489 (base32
7490 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
7491 (build-system python-build-system)
7492 (arguments
7493 `(#:python ,python-2
7494 #:phases
7495 (modify-phases %standard-phases
7496 (replace 'check
7497 (lambda _ (invoke "python" "test_contextlib2.py" "-v"))))))
7498 (native-inputs
7499 `(("python2-unittest2" ,python2-unittest2)))
7500 (home-page "http://contextlib2.readthedocs.org/")
7501 (synopsis "Tools for decorators and context managers")
7502 (description "This module is primarily a backport of the Python
75033.2 contextlib to earlier Python versions. Like contextlib, it
7504provides utilities for common tasks involving decorators and context
7505managers. It also contains additional features that are not part of
7506the standard library.")
7507 (license license:psfl)))
7508
7509(define-public python-texttable
7510 (package
7511 (name "python-texttable")
7512 (version "0.8.7")
7513 (source
7514 (origin
7515 (method url-fetch)
7516 (uri (pypi-uri "texttable" version))
7517 (sha256
7518 (base32
7519 "1liiiydgkg37i46a418aw19fyf6z3ds51wdwwpyjbs12x0phhf4a"))))
7520 (build-system python-build-system)
7521 (arguments '(#:tests? #f)) ; no tests
7522 (home-page "https://github.com/foutaise/texttable/")
7523 (synopsis "Python module for creating simple ASCII tables")
7524 (description "Texttable is a Python module for creating simple ASCII
7525tables.")
7526 (license license:lgpl2.1+)))
7527
7528(define-public python2-texttable
7529 (package-with-python2 python-texttable))
7530
7531(define-public python-atomicwrites
7532 (package
7533 (name "python-atomicwrites")
7534 (version "1.1.5")
7535 (source (origin
7536 (method url-fetch)
7537 (uri (pypi-uri "atomicwrites" version))
7538 (sha256
7539 (base32
7540 "11bm90fwm2avvf4f3ib8g925w7jr4m11vcsinn1bi6ns4bm32214"))))
7541 (build-system python-build-system)
7542 (synopsis "Atomic file writes in Python")
7543 (description "Library for atomic file writes using platform dependent tools
7544for atomic file system operations.")
7545 (home-page "https://github.com/untitaker/python-atomicwrites")
7546 (license license:expat)))
7547
7548(define-public python2-atomicwrites
7549 (package-with-python2 python-atomicwrites))
7550
7551(define-public python-click-threading
7552 (package
7553 (name "python-click-threading")
7554 (version "0.4.4")
7555 (source (origin
7556 (method url-fetch)
7557 (uri (pypi-uri "click-threading" version))
7558 (sha256
7559 (base32
7560 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
7561 (build-system python-build-system)
7562 (propagated-inputs
7563 `(("python-click" ,python-click)))
7564 (synopsis "Utilities for multithreading in Click")
7565 (description "This package provides utilities for multithreading in Click
7566applications.")
7567 (home-page "https://github.com/click-contrib/click-threading")
7568 (license license:expat)))
7569
7570(define-public python-click-log
7571 (package
7572 (name "python-click-log")
7573 (version "0.3.2")
7574 (source (origin
7575 (method url-fetch)
7576 (uri (pypi-uri "click-log" version))
7577 (sha256
7578 (base32
7579 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
7580 (build-system python-build-system)
7581 (propagated-inputs
7582 `(("python-click" ,python-click)))
7583 (synopsis "Logging for click applications")
7584 (description "This package provides a Python library for logging Click
7585applications.")
7586 (home-page "https://github.com/click-contrib/click-log")
7587 (license license:expat)))
7588
7589(define-public python-apipkg
7590 (package
7591 (name "python-apipkg")
7592 (version "1.4")
7593 (source (origin
7594 (method url-fetch)
7595 (uri (pypi-uri "apipkg" version))
7596 (sha256
7597 (base32
7598 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
7599 (build-system python-build-system)
7600 (native-inputs
7601 `(("python-pytest" ,python-pytest)))
7602 (synopsis "Namespace control and lazy-import mechanism")
7603 (description "With apipkg you can control the exported namespace of a Python
7604package and greatly reduce the number of imports for your users. It is a small
7605pure Python module that works on virtually all Python versions.")
7606 (home-page "https://github.com/pytest-dev/apipkg")
7607 (license license:expat)))
7608
7609(define-public python2-apipkg
7610 (package-with-python2 python-apipkg))
7611
7612(define-public python-execnet
7613 (package
7614 (name "python-execnet")
7615 (version "1.4.1")
7616 (source (origin
7617 (method url-fetch)
7618 (uri (pypi-uri "execnet" version))
7619 (sha256
7620 (base32
7621 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
7622 (build-system python-build-system)
7623 (arguments
7624 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
7625 ;; The two test failures are caused by the lack of an `ssh` executable.
7626 ;; The test suite can be run with pytest after the 'install' phase.
7627 #:tests? #f))
7628 (native-inputs
7629 `(("python-pytest" ,python-pytest)
7630 ("python-setuptools-scm" ,python-setuptools-scm)))
7631 (propagated-inputs
7632 `(("python-apipkg" ,python-apipkg)))
7633 (synopsis "Rapid multi-Python deployment")
7634 (description "Execnet provides a share-nothing model with
7635channel-send/receive communication for distributing execution across many
7636Python interpreters across version, platform and network barriers. It has a
7637minimal and fast API targeting the following uses:
7638@enumerate
7639@item distribute tasks to (many) local or remote CPUs
7640@item write and deploy hybrid multi-process applications
7641@item write scripts to administer multiple environments
7642@end enumerate")
7643 (home-page "http://codespeak.net/execnet/")
7644 (license license:expat)))
7645
7646(define-public python2-execnet
7647 (package-with-python2 python-execnet))
7648
7649(define-public python-icalendar
7650 (package
7651 (name "python-icalendar")
7652 (version "4.0.3")
7653 (source (origin
7654 (method url-fetch)
7655 (uri (pypi-uri "icalendar" version))
7656 (sha256
7657 (base32
7658 "0mk3dk1dxkcm46jy48v27j2w2349iv4sbimqj1yb5js43mx49hh7"))))
7659 (build-system python-build-system)
7660 (propagated-inputs
7661 `(("python-dateutil" ,python-dateutil)
7662 ("python-pytz" ,python-pytz)))
7663 (synopsis "Python library for parsing iCalendar files")
7664 (description "The icalendar package is a parser/generator of iCalendar
7665files for use with Python.")
7666 (home-page "https://github.com/collective/icalendar")
7667 (license license:bsd-2)))
7668
7669(define-public python-sphinxcontrib-newsfeed
7670 (package
7671 (name "python-sphinxcontrib-newsfeed")
7672 (version "0.1.4")
7673 (source (origin
7674 (method url-fetch)
7675 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
7676 (sha256
7677 (base32
7678 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
7679 (arguments '(#:tests? #f)) ; No tests.
7680 (build-system python-build-system)
7681 (propagated-inputs
7682 `(("python-sphinx" ,python-sphinx)))
7683 (synopsis "News Feed extension for Sphinx")
7684 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
7685Blog, News or Announcements section to a Sphinx website.")
7686 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
7687 (license license:bsd-2)))
7688
7689(define-public python-args
7690 (package
7691 (name "python-args")
7692 (version "0.1.0")
7693 (source (origin
7694 (method url-fetch)
7695 (uri (pypi-uri "args" version))
7696 (sha256
7697 (base32
7698 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
7699 (build-system python-build-system)
7700 (home-page "https://github.com/kennethreitz/args")
7701 (synopsis "Command-line argument parser")
7702 (description
7703 "This library provides a Python module to parse command-line arguments.")
7704 (license license:bsd-3)))
7705
7706(define-public python2-args
7707 (package-with-python2 python-args))
7708
7709(define-public python-clint
7710 (package
7711 (name "python-clint")
7712 (version "0.5.1")
7713 (source (origin
7714 (method url-fetch)
7715 (uri (pypi-uri "clint" version))
7716 (sha256
7717 (base32
7718 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
7719 (build-system python-build-system)
7720 (arguments
7721 '(#:phases
7722 (modify-phases %standard-phases
7723 (replace 'check
7724 (lambda _ (invoke "py.test" "-v"))))))
7725 (native-inputs
7726 `(("python-pytest" ,python-pytest)))
7727 (propagated-inputs
7728 `(("python-args" ,python-args)))
7729 (home-page "https://github.com/kennethreitz/clint")
7730 (synopsis "Command-line interface tools")
7731 (description
7732 "Clint is a Python module filled with a set of tools for developing
7733command-line applications, including tools for colored and indented
7734output, progress bar display, and pipes.")
7735 (license license:isc)))
7736
7737(define-public python2-clint
7738 (package-with-python2 python-clint))
7739
44d10b1f
RW
7740(define-public python-rply
7741 (package
7742 (name "python-rply")
7743 (version "0.7.5")
7744 (source (origin
7745 (method url-fetch)
7746 (uri (pypi-uri "rply" version))
7747 (sha256
7748 (base32
7749 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
7750 (build-system python-build-system)
7751 (propagated-inputs
7752 `(("python-appdirs" ,python-appdirs)))
7753 (home-page "https://github.com/alex/rply")
7754 (synopsis "Parser generator for Python")
7755 (description
7756 "This package provides a pure Python based parser generator, that also
7757works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
7758with a new public API, and RPython support.")
7759 (license license:bsd-3)))
7760
7761(define-public python2-rply
7762 (package-with-python2 python-rply))
7763
7764(define-public python-hy
7765 (package
7766 (name "python-hy")
7767 (version "0.13.0")
7768 (source (origin
7769 (method url-fetch)
7770 (uri (pypi-uri "hy" version))
7771 (sha256
7772 (base32
7773 "19sfymaksx9jhksfnb15ahid46mzrhdfzz6yy2craz2qnzvpmky8"))))
7774 (build-system python-build-system)
7775 (arguments
7776 '(#:phases
7777 (modify-phases %standard-phases
7778 (replace 'check
7779 (lambda _
7780 ;; Tests require write access to HOME.
7781 (setenv "HOME" "/tmp")
7782 (invoke "nosetests"))))))
7783 (native-inputs
7784 `(("python-coverage" ,python-coverage)
7785 ("python-nose" ,python-nose)))
7786 (propagated-inputs
7787 `(("python-astor" ,python-astor)
7788 ("python-clint" ,python-clint)
7789 ("python-rply" ,python-rply)))
7790 (home-page "http://hylang.org/")
7791 (synopsis "Lisp frontend to Python")
7792 (description
7793 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
7794its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
7795Python at your fingertips, in Lisp form.")
7796 (license license:expat)))
7797
7798(define-public python2-hy
7799 (package-with-python2 python-hy))
7800
7801(define-public python2-functools32
7802 (package
7803 (name "python2-functools32")
7804 (version "3.2.3-2")
7805 (source
7806 (origin
7807 (method url-fetch)
7808 (uri (pypi-uri "functools32" version))
7809 (sha256
7810 (base32
7811 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
7812 (build-system python-build-system)
7813 (arguments
7814 `(#:python ,python-2
7815 #:tests? #f)) ; no test target
7816 (home-page "https://github.com/MiCHiLU/python-functools32")
7817 (synopsis
7818 "Backport of the functools module from Python 3.2.3")
7819 (description
7820 "This package is a backport of the @code{functools} module from Python
78213.2.3 for use with older versions of Python and PyPy.")
7822 (license license:expat)))
7823
7824(define-public python2-subprocess32
7825 (package
7826 (name "python2-subprocess32")
7827 (version "3.2.7")
7828 (source (origin
7829 (method url-fetch)
7830 (uri (pypi-uri "subprocess32" version))
7831 (sha256
7832 (base32
7833 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
7834 (patches
7835 (search-patches "python2-subprocess32-disable-input-test.patch"))))
7836 (build-system python-build-system)
7837 (arguments
7838 `(#:python ,python-2
7839 ;; The test suite fails with Python > 2.7.13:
7840 ;; import test.support
7841 ;; ImportError: No module named support
7842 #:tests? #f
7843 #:phases
7844 (modify-phases %standard-phases
7845 (add-after 'unpack 'patch-/bin/sh
7846 (lambda _
7847 (substitute* '("subprocess32.py"
7848 "test_subprocess32.py")
7849 (("/bin/sh") (which "sh")))
7850 #t)))))
7851 (home-page "https://github.com/google/python-subprocess32")
7852 (synopsis "Backport of the subprocess module from Python 3.2")
7853 (description
7854 "This is a backport of the @code{subprocess} standard library module
7855from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
7856new features. On POSIX systems it is guaranteed to be reliable when used
7857in threaded applications. It includes timeout support from Python 3.3 but
7858otherwise matches 3.2’s API.")
7859 (license license:psfl)))
7860
7861(define-public python2-futures
7862 (package
7863 (name "python2-futures")
7864 (version "3.2.0")
7865 (source
7866 (origin
7867 (method url-fetch)
7868 (uri (pypi-uri "futures" version))
7869 (sha256
7870 (base32
7871 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
7872 (build-system python-build-system)
7873 (arguments `(#:python ,python-2
7874 ;; FIXME: Python 2.7.14 moved the test.support library,
7875 ;; but our package has not yet been adjusted. Enable
7876 ;; tests when the python2 package has been fixed.
7877 #:tests? #f))
7878 (home-page "https://github.com/agronholm/pythonfutures")
7879 (synopsis
7880 "Backport of the concurrent.futures package from Python 3.2")
7881 (description
7882 "The concurrent.futures module provides a high-level interface for
7883asynchronously executing callables. This package backports the
7884concurrent.futures package from Python 3.2")
7885 (license license:bsd-3)))
7886
7887(define-public python-promise
7888 (package
7889 (name "python-promise")
7890 (version "0.4.2")
7891 (source
7892 (origin
7893 (method url-fetch)
7894 (uri (pypi-uri "promise" version))
7895 (sha256
7896 (base32
7897 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
7898 (build-system python-build-system)
7899 ;; Tests wants python-futures, which is a python2 only program, and
7900 ;; can't be found by python-promise at test time.
7901 (arguments `(#:tests? #f))
7902 (home-page "https://github.com/syrusakbary/promise")
7903 (synopsis "Promises/A+ implementation for Python")
7904 (description
7905 "Promises/A+ implementation for Python")
7906 (properties `((python2-variant . ,(delay python2-promise))))
7907 (license license:expat)))
7908
7909(define-public python2-promise
7910 (let ((promise (package-with-python2
7911 (strip-python2-variant python-promise))))
7912 (package (inherit promise)
7913 (arguments (substitute-keyword-arguments (package-arguments promise)
7914 ((#:tests? _) #t)))
7915 (native-inputs
7916 `(("python2-futures" ,python2-futures)
7917 ("python2-pytest" ,python2-pytest)
7918 ,@(package-native-inputs promise))))))
7919
7920(define-public python-colorama
7921 (package
7922 (name "python-colorama")
7923 (version "0.3.9")
7924 (source
7925 (origin
7926 (method url-fetch)
7927 (uri (pypi-uri "colorama" version))
7928 (sha256
7929 (base32
7930 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
7931 (build-system python-build-system)
7932 (synopsis "Colored terminal text rendering for Python")
7933 (description "Colorama is a Python library for rendering colored terminal
7934text.")
7935 (home-page "https://pypi.python.org/pypi/colorama")
7936 (license license:bsd-3)))
7937
7938(define-public python2-colorama
7939 (package-with-python2 python-colorama))
7940
7941(define-public python-rsa
7942 (package
7943 (name "python-rsa")
7944 (version "3.4.2")
7945 (source
7946 (origin
7947 (method url-fetch)
7948 (uri (pypi-uri "rsa" version))
7949 (sha256
7950 (base32
7951 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
7952 (build-system python-build-system)
7953 (propagated-inputs
7954 `(("python-pyasn1" ,python-pyasn1)))
7955 (synopsis "Pure-Python RSA implementation")
7956 (description "Python-RSA is a pure-Python RSA implementation. It supports
7957encryption and decryption, signing and verifying signatures, and key
7958generation according to PKCS#1 version 1.5. It can be used as a Python
7959library as well as on the command line.")
7960 (home-page "https://stuvel.eu/rsa")
7961 (license license:asl2.0)))
7962
7963(define-public python2-rsa
7964 (package-with-python2 python-rsa))
7965
7966(define-public python-pluggy
7967 (package
7968 (name "python-pluggy")
7969 (version "0.7.1")
7970 (source
7971 (origin
7972 (method url-fetch)
7973 (uri (pypi-uri "pluggy" version))
7974 (sha256
7975 (base32
7976 "1qbn70mksmr03hac6jgp6fiqc4l7859z8dchx2x950vhlij87swm"))))
7977 (build-system python-build-system)
7978 (native-inputs
7979 `(("python-setuptools-scm" ,python-setuptools-scm)))
7980 (synopsis "Plugin and hook calling mechanism for Python")
7981 (description "Pluggy is an extraction of the plugin manager as used by
7982Pytest but stripped of Pytest specific details.")
7983 (home-page "https://pypi.python.org/pypi/pluggy")
7984 (license license:expat)))
7985
7986(define-public python2-pluggy
7987 (package-with-python2 python-pluggy))
7988
7989(define-public python-tox
7990 (package
7991 (name "python-tox")
7992 (version "2.8.1")
7993 (source
7994 (origin
7995 (method url-fetch)
7996 (uri (pypi-uri "tox" version))
7997 (sha256
7998 (base32
7999 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
8000 (build-system python-build-system)
8001 (arguments
8002 ;; FIXME: Tests require pytest-timeout, which itself requires
8003 ;; pytest>=2.8.0 for installation.
8004 '(#:tests? #f))
8005 (propagated-inputs
8006 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
8007 ("python-py" ,python-py)
8008 ("python-virtualenv" ,python-virtualenv)))
8009 (native-inputs
8010 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
8011 ("python-pytest" ,python-pytest) ; >= 2.3.5
8012 ("python-setuptools-scm" ,python-setuptools-scm)))
8013 (home-page "http://tox.testrun.org/")
8014 (synopsis "Virtualenv-based automation of test activities")
8015 (description "Tox is a generic virtualenv management and test command line
8016tool. It can be used to check that a package installs correctly with
8017different Python versions and interpreters, or run tests in each type of
8018supported environment, or act as a frontend to continuous integration
8019servers.")
8020 (license license:expat)))
8021
8022(define-public python2-tox
8023 (package-with-python2 python-tox))
8024
8025(define-public python-jmespath
8026 (package
8027 (name "python-jmespath")
8028 (version "0.9.3")
8029 (source
8030 (origin
8031 (method url-fetch)
8032 (uri (pypi-uri "jmespath" version))
8033 (sha256
8034 (base32
8035 "0r7wc7fsxmlwzxx9j1j7rms06c6xs6d4sysirdhz1jk2mb4x90ba"))))
8036 (build-system python-build-system)
8037 (native-inputs
8038 `(("python-nose" ,python-nose)))
8039 (synopsis "JSON Matching Expressions")
8040 (description "JMESPath (pronounced “james path”) is a Python library that
8041allows one to declaratively specify how to extract elements from a JSON
8042document.")
8043 (home-page "https://github.com/jmespath/jmespath.py")
8044 (license license:expat)))
8045
8046(define-public python2-jmespath
8047 (package-with-python2 python-jmespath))
8048
8049(define-public python-botocore
8050 (package
8051 (name "python-botocore")
8052 (version "1.8.43")
8053 (source
8054 (origin
8055 (method url-fetch)
8056 (uri (pypi-uri "botocore" version))
8057 (sha256
8058 (base32
8059 "12cqpbnz3vfv41mp9admvciw7bc7hz57sjpqs2bxaw9wnfmbw5lg"))))
8060 (build-system python-build-system)
8061 (arguments
8062 ;; FIXME: Many tests are failing.
8063 '(#:tests? #f))
8064 (propagated-inputs
8065 `(("python-dateutil" ,python-dateutil)
8066 ("python-docutils" ,python-docutils)
8067 ("python-jmespath" ,python-jmespath)))
8068 (native-inputs
8069 `(("python-mock" ,python-mock)
8070 ("python-nose" ,python-nose)
8071 ("behave" ,behave)
8072 ("python-tox" ,python-tox)
8073 ("python-wheel" ,python-wheel)))
8074 (home-page "https://github.com/boto/botocore")
8075 (synopsis "Low-level interface to AWS")
8076 (description "Botocore is a Python library that provides a low-level
8077interface to the Amazon Web Services (AWS) API.")
8078 (license license:asl2.0)))
8079
8080(define-public python2-botocore
8081 (package-with-python2 python-botocore))
8082
8083(define-public python-xdo
8084 (package
8085 (name "python-xdo")
8086 (version "0.3")
8087 (source (origin
8088 (method url-fetch)
8089 (uri (string-append
8090 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8091 "python-xdo_" version ".orig.tar.gz"))
8092 (sha256
8093 (base32
8094 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
8095 (build-system python-build-system)
8096 (arguments
8097 '(#:phases
8098 (modify-phases %standard-phases
8099 (add-before 'install 'patch-libxdo-path
8100 ;; Hardcode the path of dynamically loaded libxdo library.
8101 (lambda* (#:key inputs #:allow-other-keys)
8102 (let ((libxdo (string-append
8103 (assoc-ref inputs "xdotool")
8104 "/lib/libxdo.so")))
8105 (substitute* "xdo/_xdo.py"
8106 (("find_library\\(\"xdo\"\\)")
8107 (simple-format #f "\"~a\"" libxdo)))
8108 #t))))
8109 #:tests? #f)) ; no tests provided
8110 (propagated-inputs
8111 `(("python-six" ,python-six)))
8112 (inputs
8113 `(("xdotool" ,xdotool)
8114 ("libX11" ,libx11)))
8115 (home-page "https://tracker.debian.org/pkg/python-xdo")
8116 (synopsis "Python library for simulating X11 keyboard/mouse input")
8117 (description "Provides bindings to libxdo for manipulating X11 via simulated
8118input. (Note that this is mostly a legacy library; you may wish to look at
8119python-xdo for newer bindings.)")
8120 (license license:bsd-3)))
8121
8122(define-public python2-xdo
8123 (package-with-python2 python-xdo))
8124
8125(define-public python-mako
8126 (package
8127 (name "python-mako")
8128 (version "1.0.7")
8129 (source
8130 (origin
8131 (method url-fetch)
8132 (uri (pypi-uri "Mako" version))
8133 (sha256
8134 (base32
8135 "1bi5gnr8r8dva06qpyx4kgjc6spm2k1y908183nbbaylggjzs0jf"))))
8136 (build-system python-build-system)
8137 (propagated-inputs
8138 `(("python-markupsafe" ,python-markupsafe)))
8139 (native-inputs
8140 `(("python-mock" ,python-mock)
8141 ("python-nose" ,python-nose)
8142 ("python-pytest" ,python-pytest)))
7016e620 8143 (home-page "https://www.makotemplates.org/")
44d10b1f
RW
8144 (synopsis "Templating language for Python")
8145 (description "Mako is a templating language for Python that compiles
8146templates into Python modules.")
8147 (license license:expat)))
8148
8149(define-public python2-mako
8150 (package-with-python2 python-mako))
8151
8152(define-public python-waitress
8153 (package
8154 (name "python-waitress")
8155 (version "1.1.0")
8156 (source
8157 (origin
8158 (method url-fetch)
8159 (uri (pypi-uri "waitress" version))
8160 (patches (search-patches "python-waitress-fix-tests.patch"))
8161 (sha256
8162 (base32
8163 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
8164 (build-system python-build-system)
8165 (home-page "https://github.com/Pylons/waitress")
8166 (synopsis "Waitress WSGI server")
8167 (description "Waitress is meant to be a production-quality pure-Python WSGI
8168server with very acceptable performance.")
8169 (license license:zpl2.1)))
8170
8171(define-public python2-waitress
8172 (package-with-python2 python-waitress))
8173
8174(define-public python-pyquery
8175 (package
8176 (name "python-pyquery")
8177 (version "1.2.17")
8178 (source
8179 (origin
8180 (method url-fetch)
8181 (uri (pypi-uri "pyquery" version))
8182 (sha256
8183 (base32
8184 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
8185 (build-system python-build-system)
8186 (native-inputs
8187 `(("python-webob" ,python-webob)
8188 ("python-webtest" ,python-webtest)))
8189 (propagated-inputs
8190 `(("python-lxml" ,python-lxml)
8191 ("python-cssselect" ,python-cssselect)))
8192 (home-page "https://github.com/gawel/pyquery")
8193 (synopsis "Make jQuery-like queries on xml documents")
8194 (description "pyquery allows you to make jQuery queries on xml documents.
8195The API is as much as possible the similar to jQuery. pyquery uses lxml for
8196fast xml and html manipulation.")
8197 (license license:bsd-3)))
8198
44d10b1f
RW
8199(define-public python-anyjson
8200 (package
8201 (name "python-anyjson")
8202 (version "0.3.3")
8203 (source
8204 (origin
8205 (method url-fetch)
8206 (uri (pypi-uri "anyjson" version))
8207 (sha256
8208 (base32
8209 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
8210 (build-system python-build-system)
8211 (arguments
8212 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
8213 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
8214 ;; whatever) so this transformation needs to be done before the tests
8215 ;; can be run. Maybe we could add a build step to transform beforehand
8216 ;; but it could be annoying/difficult.
8217 ;; We can enable tests for the Python 2 version, though, and do below.
8218 #:tests? #f))
8219 (home-page "https://bitbucket.org/runeh/anyjson/")
8220 (synopsis
8221 "Wraps best available JSON implementation in a common interface")
8222 (description
8223 "Anyjson loads whichever is the fastest JSON module installed
8224and provides a uniform API regardless of which JSON implementation is used.")
8225 (license license:bsd-3)
8226 (properties `((python2-variant . ,(delay python2-anyjson))))))
8227
8228(define-public python2-anyjson
8229 (let ((anyjson (package-with-python2
8230 (strip-python2-variant python-anyjson))))
8231 (package
8232 (inherit anyjson)
8233 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
8234 #:tests? #t
8235 ,@(package-arguments anyjson)))
8236 (native-inputs `(("python2-nose" ,python2-nose))))))
8237
8238(define-public python-amqp
8239 (package
8240 (name "python-amqp")
8241 (version "2.3.2")
8242 (source
8243 (origin
8244 (method url-fetch)
8245 (uri (pypi-uri "amqp" version))
8246 (sha256
8247 (base32
8248 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
8249 (build-system python-build-system)
8250 (native-inputs
8251 `(("python-case" ,python-case)
8252 ("python-pytest-sugar" ,python-pytest-sugar)
8253 ("python-mock" ,python-mock)))
8254 (propagated-inputs
8255 `(("python-vine" ,python-vine)))
8256 (home-page "https://github.com/celery/py-amqp")
8257 (synopsis
8258 "Low-level AMQP client for Python (fork of amqplib)")
8259 (description
8260 "This is a fork of amqplib which was originally written by Barry Pederson.
8261It is maintained by the Celery project, and used by kombu as a pure python
8262alternative when librabbitmq is not available.")
8263 (license license:lgpl2.1+)
8264 (properties `((python2-variant . ,(delay python2-amqp))))))
8265
8266(define-public python2-amqp
8267 (let ((amqp (package-with-python2
8268 (strip-python2-variant python-amqp))))
8269 (package
8270 (inherit amqp)
8271 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
8272 ;; unmaintained. Weirdly, does not do this on the python 3
8273 ;; version?
8274 #:tests? #f
8275 ,@(package-arguments amqp))))))
8276
8277(define-public python-txamqp
8278 (package
8279 (name "python-txamqp")
8280 (version "0.8.2")
8281 (source
8282 (origin
8283 (method url-fetch)
8284 (uri (pypi-uri "txAMQP" version))
8285 (sha256
8286 (base32
8287 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
8288 (build-system python-build-system)
8289 (propagated-inputs
8290 `(("python-six" ,python-six)
8291 ("python-twisted" ,python-twisted)))
8292 (home-page "https://github.com/txamqp/txamqp")
8293 (synopsis "Communicate with AMQP peers and brokers using Twisted")
8294 (description
8295 "This package provides a Python library for communicating with AMQP peers
8296and brokers using the asynchronous networking framework Twisted. It contains
8297all the necessary code to connect, send and receive messages to/from an
8298AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
8299also includes support for using Thrift RPC over AMQP in Twisted
8300applications.")
8301 (license license:asl2.0)))
8302
8303(define-public python2-txamqp
8304 (package-with-python2 python-txamqp))
8305
8306(define-public python-kombu
8307 (package
8308 (name "python-kombu")
8309 (version "4.2.2")
8310 (source
8311 (origin
8312 (method url-fetch)
8313 (uri (pypi-uri "kombu" version))
8314 (sha256
8315 (base32
8316 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
8317 (build-system python-build-system)
8318 (native-inputs
8319 `(("python-mock" ,python-mock)
8320 ("python-case" ,python-case)
8321 ("python-pyro4" ,python-pyro4)
8322 ("python-pytest-sugar" ,python-pytest-sugar)
8323 ("python-pytz" ,python-pytz)))
8324 (propagated-inputs
8325 `(("python-anyjson" ,python-anyjson)
8326 ("python-amqp" ,python-amqp)
8327 ("python-redis" ,python-redis)))
8328 (home-page "https://kombu.readthedocs.io")
8329 (synopsis "Message passing library for Python")
8330 (description "The aim of Kombu is to make messaging in Python as easy as
8331possible by providing an idiomatic high-level interface for the AMQ protocol,
8332and also provide proven and tested solutions to common messaging problems.
8333AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
8334message orientation, queuing, routing, reliability and security, for which the
8335RabbitMQ messaging server is the most popular implementation.")
8336 (license license:bsd-3)
8337 (properties `((python2-variant . ,(delay python2-kombu))))))
8338
8339(define-public python2-kombu
8340 (let ((kombu (package-with-python2
8341 (strip-python2-variant python-kombu))))
8342 (package
8343 (inherit kombu)
8344 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
8345 ;; It works fine on the python3 variant.
8346 #:tests? #f
8347 ,@(package-arguments kombu)))
8348 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8349 ,@(package-native-inputs kombu))))))
8350
8351(define-public python-billiard
8352 (package
8353 (name "python-billiard")
8354 (version "3.5.0.5")
8355 (source
8356 (origin
8357 (method url-fetch)
8358 (uri (pypi-uri "billiard" version))
8359 (sha256
8360 (base32
8361 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
8362 (build-system python-build-system)
8363 (native-inputs
8364 `(("python-case" ,python-case)
8365 ("python-pytest" ,python-pytest)))
8366 (home-page "https://github.com/celery/billiard")
8367 (synopsis
8368 "Python multiprocessing fork with improvements and bugfixes")
8369 (description
8370 "Billiard is a fork of the Python 2.7 multiprocessing package. The
8371multiprocessing package itself is a renamed and updated version of R Oudkerk's
8372pyprocessing package. This standalone variant is intended to be compatible with
8373Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
8374 (license license:bsd-3)
8375 (properties `((python2-variant . ,(delay python2-billiard))))))
8376
8377(define-public python2-billiard
8378 (let ((billiard (package-with-python2
8379 (strip-python2-variant python-billiard))))
8380 (package
8381 (inherit billiard)
8382 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8383 ("python2-mock" ,python2-mock)
8384 ,@(package-native-inputs billiard))))))
8385
8386(define-public python-celery
8387 (package
8388 (name "python-celery")
8389 (version "4.2.1")
8390 (source
8391 (origin
8392 (method url-fetch)
8393 (uri (pypi-uri "celery" version))
8394 (sha256
8395 (base32
8396 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
8397 (build-system python-build-system)
8398 (arguments
8399 '(;; TODO The tests fail with Python 3.7
8400 ;; https://github.com/celery/celery/issues/4849
8401 #:tests? #f
8402 #:phases
8403 (modify-phases %standard-phases
8404 (add-after 'unpack 'patch-requirements
8405 (lambda _
8406 (substitute* "requirements/test.txt"
8407 (("pytest>=3\\.0,<3\\.3")
8408 "pytest>=3.0"))
8409 #t)))))
8410 (native-inputs
8411 `(("python-case" ,python-case)
8412 ("python-pytest" ,python-pytest)))
8413 (propagated-inputs
8414 `(("python-pytz" ,python-pytz)
8415 ("python-billiard" ,python-billiard)
8416 ("python-kombu" ,python-kombu)))
8417 (home-page "https://celeryproject.org")
8418 (synopsis "Distributed Task Queue")
8419 (description "Celery is an asynchronous task queue/job queue based on
8420distributed message passing. It is focused on real-time operation, but
8421supports scheduling as well. The execution units, called tasks, are executed
8422concurrently on a single or more worker servers using multiprocessing,
8423Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
8424synchronously (wait until ready).")
8425 (license license:bsd-3)
8426 (properties `((python2-variant . ,(delay python2-celery))))))
8427
8428(define-public python2-celery
8429 (let ((celery (package-with-python2
8430 (strip-python2-variant python-celery))))
8431 (package
8432 (inherit celery)
8433 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8434 ("python2-mock" ,python2-mock)
8435 ,@(package-native-inputs celery))))))
8436
8437(define-public python-translitcodec
8438 (package
8439 (name "python-translitcodec")
8440 (version "0.4.0")
8441 (source
8442 (origin
8443 (method url-fetch)
8444 (uri (pypi-uri "translitcodec" version))
8445 (sha256
8446 (base32
8447 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
8448 (build-system python-build-system)
8449 (arguments
8450 `(#:tests? #f)) ; no tests provided
8451 (home-page
8452 "https://github.com/claudep/translitcodec")
8453 (synopsis
8454 "Unicode to 8-bit charset transliteration codec")
8455 (description
8456 "This package contains codecs for transliterating ISO 10646 texts into
8457best-effort representations using smaller coded character sets (ASCII,
8458ISO 8859, etc.).")
8459 (license license:expat)))
8460
8461(define-public python2-translitcodec
8462 (package-with-python2 python-translitcodec))
8463
8464(define-public python-editor
8465 (package
8466 (name "python-editor")
8467 (version "0.5")
8468 (source
8469 (origin
8470 (method url-fetch)
8471 (uri (pypi-uri "python-editor" version))
8472 (sha256
8473 (base32
8474 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
8475 (build-system python-build-system)
8476 (home-page
8477 "https://github.com/fmoo/python-editor")
8478 (synopsis
8479 "Programmatically open an editor, capture the result")
8480 (description
8481 "python-editor is a library that provides the editor module for
8482programmatically interfacing with your system's $EDITOR.")
8483 (license license:asl2.0)))
8484
8485(define-public python2-editor
8486 (package-with-python2 python-editor))
8487
8488(define-public python-sphinxcontrib-programoutput
8489 (package
8490 (name "python-sphinxcontrib-programoutput")
8491 (version "0.10")
8492 (source (origin
8493 (method url-fetch)
8494 (uri (pypi-uri "sphinxcontrib-programoutput" version))
8495 (sha256
8496 (base32
8497 "153hhnlbx4688zj9wd64819ps5znc2jlyp5crkgzvn5hxgy99vpx"))))
8498 (build-system python-build-system)
8499 (arguments
8500 ;; FIXME: Many tests are failing and the upstream is gone.
8501 '(#:tests? #f))
8502 (propagated-inputs
8503 `(("python-sphinx" ,python-sphinx)))
8504 (synopsis "Sphinx extension to include program output")
8505 (description "A Sphinx extension to literally insert the output of arbitrary
8506commands into documents, helping you to keep your command examples up to date.")
8507 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
8508 (license license:bsd-2)))
8509
8510(define-public python2-sphinxcontrib-programoutput
8511 (package-with-python2 python-sphinxcontrib-programoutput))
8512
8513(define-public python-sphinx-repoze-autointerface
8514 (package
8515 (name "python-sphinx-repoze-autointerface")
8516 (version "0.8")
8517 (source (origin
8518 (method url-fetch)
8519 (uri (pypi-uri "repoze.sphinx.autointerface" version))
8520 (sha256
8521 (base32
8522 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
8523 (build-system python-build-system)
8524 (arguments '(#:tests? #f)) ; No tests.
8525 (propagated-inputs
8526 `(("python-sphinx" ,python-sphinx)
8527 ("python-zope-interface" ,python-zope-interface)))
8528 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
8529 (description "This package defines an extension for the Sphinx documentation
8530system. The extension allows generation of API documentation by
8531introspection of @code{zope.interface} instances in code.")
8532 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
8533 (license license:repoze)))
8534
8535(define-public python2-sphinx-repoze-autointerface
8536 (package-with-python2 python-sphinx-repoze-autointerface))
8537
8538(define-public python-vobject
8539 (package
8540 (name "python-vobject")
8541 (version "0.9.5")
8542 (source (origin
8543 (method url-fetch)
8544 (uri (pypi-uri "vobject" version))
8545 (sha256
8546 (base32
8547 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
8548 (build-system python-build-system)
8549 (arguments
8550 '(;; The test suite relies on some non-portable Windows interfaces.
8551 #:tests? #f))
8552 (propagated-inputs
8553 `(("python-dateutil" ,python-dateutil)
8554 ("python-pyicu" ,python-pyicu)))
8555 (synopsis "Parse and generate vCard and vCalendar files")
8556 (description "Vobject is intended to be a full featured Python package for
8557parsing and generating vCard and vCalendar files. Currently, iCalendar files
8558are supported and well tested. vCard 3.0 files are supported, and all data
8559should be imported, but only a few components are understood in a sophisticated
8560way.")
8561 (home-page "http://eventable.github.io/vobject/")
8562 (license license:asl2.0)))
8563
8564(define-public python2-vobject
8565 (package-with-python2 python-vobject))
8566
8567(define-public python-munkres
8568 (package
8569 (name "python-munkres")
8570 (version "1.0.8")
8571 (source (origin
8572 (method url-fetch)
8573 (uri (pypi-uri "munkres" version))
8574 (sha256
8575 (base32
8576 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
8577 (build-system python-build-system)
8578 (arguments
8579 '(#:tests? #f)) ; no test suite
8580 (home-page "http://software.clapper.org/munkres/")
8581 (synopsis "Implementation of the Munkres algorithm")
8582 (description "The Munkres module provides an implementation of the Munkres
8583algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
8584useful for solving the Assignment Problem.")
8585 (license license:bsd-3)))
8586
8587(define-public python2-munkres
8588 (package-with-python2 python-munkres))
8589
8590(define-public python-whoosh
8591 (package
8592 (name "python-whoosh")
8593 (version "2.7.4")
8594 (source
8595 (origin
8596 (method url-fetch)
8597 (uri (pypi-uri "Whoosh" version))
8598 (sha256
8599 (base32
8600 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
8601 (build-system python-build-system)
8602 (native-inputs
8603 `(("python-pytest" ,python-pytest)))
8604 (home-page "https://bitbucket.org/mchaput/whoosh")
8605 (synopsis "Full text indexing, search, and spell checking library")
8606 (description
8607 "Whoosh is a fast, pure-Python full text indexing, search, and spell
8608checking library.")
8609 (license license:bsd-2)))
8610
8611(define-public python2-whoosh
8612 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
8613 (package (inherit whoosh)
8614 (propagated-inputs
8615 `(("python2-backport-ssl-match-hostname"
8616 ,python2-backport-ssl-match-hostname)
8617 ,@(package-propagated-inputs whoosh))))))
8618
8619(define-public python-pathlib
8620 (package
8621 (name "python-pathlib")
8622 (version "1.0.1")
8623 (source (origin
8624 (method url-fetch)
8625 (uri (pypi-uri "pathlib" version))
8626 (sha256
8627 (base32
8628 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
8629 (build-system python-build-system)
8630 ;; The tests depend on the internal "test" module, which does not provide
8631 ;; a stable interface.
8632 (arguments `(#:tests? #f))
8633 (home-page "https://pathlib.readthedocs.org/")
8634 (synopsis "Object-oriented file system paths")
8635 (description "Pathlib offers a set of classes to handle file system paths.
8636It offers the following advantages over using string objects:
8637
8638@enumerate
8639@item No more cumbersome use of os and os.path functions. Everything can
8640be done easily through operators, attribute accesses, and method calls.
8641@item Embodies the semantics of different path types. For example,
8642comparing Windows paths ignores casing.
8643@item Well-defined semantics, eliminating any inconsistencies or
8644ambiguities (forward vs. backward slashes, etc.).
8645@end enumerate
8646
8647Note: In Python 3.4, pathlib is now part of the standard library. For other
8648Python versions please consider python-pathlib2 instead, which tracks the
8649standard library module. This module (python-pathlib) isn't maintained
8650anymore.")
8651 (license license:expat)))
8652
8653(define-public python2-pathlib
8654 (package-with-python2 python-pathlib))
8655
8656(define-public python2-pathlib2
8657 (package
8658 (name "python2-pathlib2")
8659 (version "2.3.2")
8660 (source (origin
8661 (method url-fetch)
8662 (uri (pypi-uri "pathlib2" version))
8663 (sha256
8664 (base32
8665 "10yb0iv5x2hs631rcppkhbddx799d3h8pcwmkbh2a66ns3w71ccf"))))
8666 (build-system python-build-system)
8667 ;; We only need the the Python 2 variant, since for Python 3 our minimum
8668 ;; version is 3.4 which already includes this package as part of the
8669 ;; standard library.
8670 (arguments
8671 `(#:python ,python-2))
8672 (propagated-inputs
8673 `(("python2-scandir" ,python2-scandir)
8674 ("python2-six" ,python2-six)))
8675 (home-page "https://pypi.python.org/pypi/pathlib2/")
8676 (synopsis "Object-oriented file system paths - backport of standard
8677pathlib module")
8678 (description "The goal of pathlib2 is to provide a backport of standard
8679pathlib module which tracks the standard library module, so all the newest
8680features of the standard pathlib can be used also on older Python versions.
8681
8682Pathlib offers a set of classes to handle file system paths. It offers the
8683following advantages over using string objects:
8684
8685@enumerate
8686@item No more cumbersome use of os and os.path functions. Everything can
8687be done easily through operators, attribute accesses, and method calls.
8688@item Embodies the semantics of different path types. For example,
8689comparing Windows paths ignores casing.
8690@item Well-defined semantics, eliminating any inconsistencies or
8691ambiguities (forward vs. backward slashes, etc.).
8692@end enumerate")
8693 (license license:expat)))
8694
8695(define-public python2-pathlib2-bootstrap
8696 (hidden-package
8697 (package
8698 (inherit python2-pathlib2)
8699 (name "python2-pathlib2-bootstrap")
8700 (propagated-inputs
8701 `(("python2-scandir" ,python2-scandir)
8702 ("python2-six" ,python2-six-bootstrap))))))
8703
8704(define-public python-jellyfish
8705 (package
8706 (name "python-jellyfish")
8707 (version "0.5.6")
8708 (source (origin
8709 (method url-fetch)
8710 (uri (pypi-uri "jellyfish" version))
8711 (sha256
8712 (base32
8713 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
8714 (build-system python-build-system)
8715 (native-inputs
8716 `(("python-pytest" ,python-pytest)))
8717 (home-page "https://github.com/jamesturk/jellyfish")
8718 (synopsis "Approximate and phonetic matching of strings")
8719 (description "Jellyfish uses a variety of string comparison and phonetic
8720encoding algorithms to do fuzzy string matching.")
8721 (license license:bsd-2)
8722 (properties `((python2-variant . ,(delay python2-jellyfish))))))
8723
8724(define-public python2-jellyfish
8725 (let ((jellyfish (package-with-python2
8726 (strip-python2-variant python-jellyfish))))
8727 (package (inherit jellyfish)
8728 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
8729 ,@(package-native-inputs jellyfish))))))
8730
8731(define-public python2-unicodecsv
8732 (package
8733 (name "python2-unicodecsv")
8734 (version "0.14.1")
8735 (source (origin
8736 (method url-fetch)
8737 ;; The test suite is not included in the PyPi release.
8738 ;; https://github.com/jdunck/python-unicodecsv/issues/19
8739 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
8740 "archive/" version ".tar.gz"))
8741 (file-name (string-append name "-" version ".tar.gz"))
8742 (sha256
8743 (base32
8744 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
8745 (build-system python-build-system)
8746 (arguments
8747 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
8748 #:python ,python-2))
8749 (native-inputs
8750 `(("python2-unittest2" ,python2-unittest2)))
8751 (home-page "https://github.com/jdunck/python-unicodecsv")
8752 (synopsis "Unicode CSV module for Python 2")
8753 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
8754module, adding support for Unicode strings.")
8755 (license license:bsd-2)))
8756
8757(define-public python-rarfile
8758 (package
8759 (name "python-rarfile")
8760 (version "2.8")
8761 (source (origin
8762 (method url-fetch)
8763 (uri (pypi-uri "rarfile" version))
8764 (sha256
8765 (base32
8766 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
8767 (build-system python-build-system)
8768 (arguments
8769 '(#:phases
8770 (modify-phases %standard-phases
8771 (replace 'check
8772 ;; Many tests fail, but the installation proceeds.
e59dd341 8773 (lambda _ (invoke "make" "-C" "test" "test"))))))
44d10b1f
RW
8774 (native-inputs
8775 `(("which" ,which))) ; required for tests
8776 (propagated-inputs
8777 `(("libarchive" ,libarchive)))
8778 (home-page "https://github.com/markokr/rarfile")
8779 (synopsis "RAR archive reader for Python")
8780 (description "This is Python module for RAR archive reading. The interface
8781is made as zipfile like as possible.")
8782 (license license:isc)))
8783
8784(define-public python2-rarfile
8785 (package-with-python2 python-rarfile))
8786
8787(define-public python-magic
8788 (package
8789 (name "python-magic")
8790 (version "0.4.15")
8791 (source
8792 (origin
8793 (method url-fetch)
8794 (uri (pypi-uri "python-magic" version))
8795 (sha256
8796 (base32
8797 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
8798 (file-name (string-append name "-" version "-checkout"))))
8799 (build-system python-build-system)
8800 (arguments
8801 ;; The tests are unreliable, so don't run them. The tests fail
8802 ;; under Python3 because they were written for Python2 and
8803 ;; contain import statements that do not work in Python3. One of
8804 ;; the tests fails under Python2 because its assertions are
8805 ;; overly stringent; it relies on comparing output strings which
8806 ;; are brittle and can change depending on the version of
8807 ;; libmagic being used and the system on which the test is
8808 ;; running. In my case, under GuixSD 0.10.0, only one test
8809 ;; failed, and it seems to have failed only because the version
8810 ;; of libmagic that is packaged in Guix outputs a slightly
8811 ;; different (but not wrong) string than the one that the test
8812 ;; expected.
8813 '(#:tests? #f
8814 #:phases (modify-phases %standard-phases
8815 ;; Replace a specific method call with a hard-coded
8816 ;; path to the necessary libmagic.so file in the
8817 ;; store. If we don't do this, then the method call
8818 ;; will fail to find the libmagic.so file, which in
8819 ;; turn will cause any application using
8820 ;; python-magic to fail.
8821 (add-before 'build 'hard-code-path-to-libmagic
8822 (lambda* (#:key inputs #:allow-other-keys)
8823 (let ((file (assoc-ref inputs "file")))
8824 (substitute* "magic.py"
8825 (("ctypes.util.find_library\\('magic'\\)")
8826 (string-append "'" file "/lib/libmagic.so'")))
8827 #t)))
8828 (add-before 'install 'disable-egg-compression
8829 (lambda _
8830 (let ((port (open-file "setup.cfg" "a")))
8831 (display "\n[easy_install]\nzip_ok = 0\n"
8832 port)
8833 (close-port port)
8834 #t))))))
8835 (inputs
8836 ;; python-magic needs to be able to find libmagic.so.
8837 `(("file" ,file)))
8838 (home-page
8839 "https://github.com/ahupp/python-magic")
8840 (synopsis
8841 "File type identification using libmagic")
8842 (description
8843 "This module uses ctypes to access the libmagic file type
8844identification library. It makes use of the local magic database and
8845supports both textual and MIME-type output. Note that this module and
8846the python-file module both provide a \"magic.py\" file; these two
8847modules, which are different and were developed separately, both serve
8848the same purpose: to provide Python bindings for libmagic.")
8849 (license license:expat)))
8850
8851(define-public python2-magic
8852 (package-with-python2 python-magic))
8853
8854(define-public python2-s3cmd
8855 (package
8856 (name "python2-s3cmd")
8857 (version "1.6.1")
8858 (source
8859 (origin
8860 (method url-fetch)
8861 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
8862 "s3cmd-" version ".tar.gz"))
8863 (sha256
8864 (base32
8865 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
8866 (build-system python-build-system)
8867 (arguments
8868 ;; s3cmd is written for python2 only and contains no tests.
8869 `(#:python ,python-2
8870 #:tests? #f))
8871 (propagated-inputs
8872 `(("python2-dateutil" ,python2-dateutil)
8873 ;; The python-file package also provides a magic.py module.
8874 ;; This is an unfortunate state of affairs; however, s3cmd
8875 ;; fails to install if it cannot find specifically the
8876 ;; python-magic package. Thus we include it, instead of using
8877 ;; python-file. Ironically, s3cmd sometimes works better
8878 ;; without libmagic bindings at all:
8879 ;; https://github.com/s3tools/s3cmd/issues/198
8880 ("python2-magic" ,python2-magic)))
8881 (home-page "http://s3tools.org/s3cmd")
8882 (synopsis "Command line tool for S3-compatible storage services")
8883 (description
8884 "S3cmd is a command line tool for uploading, retrieving and managing data
8885in storage services that are compatible with the Amazon Simple Storage
8886Service (S3) protocol, including S3 itself. It supports rsync-like backup,
8887GnuPG encryption, and more. It also supports management of Amazon's
8888CloudFront content delivery network.")
8889 (license license:gpl2+)))
8890
8891(define-public python-pkgconfig
8892 (package
8893 (name "python-pkgconfig")
8894 (version "1.3.1")
8895 (source
8896 (origin
8897 (method url-fetch)
8898 (uri (pypi-uri "pkgconfig" version))
8899 (sha256
8900 (base32
8901 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
8902 (build-system python-build-system)
8903 (native-inputs
8904 `(("python-nose" ,python-nose)))
8905 (inputs
8906 `(("pkg-config" ,pkg-config)))
8907 (arguments
8908 `(#:phases
8909 (modify-phases %standard-phases
8910 (add-before 'build 'patch
8911 ;; Hard-code the path to pkg-config.
8912 (lambda _
8913 (substitute* "pkgconfig/pkgconfig.py"
8914 (("cmd = 'pkg-config")
8915 (string-append "cmd = '" (which "pkg-config"))))
8916 #t))
8917 (replace 'check
8918 (lambda _
8919 (invoke "nosetests" "test.py"))))))
8920 (home-page "https://github.com/matze/pkgconfig")
8921 (synopsis "Python interface for pkg-config")
8922 (description "This module provides a Python interface to pkg-config. It
8923can be used to find all pkg-config packages, check if a package exists,
8924check if a package meets certain version requirements, query CFLAGS and
8925LDFLAGS and parse the output to build extensions with setup.py.")
8926 (license license:expat)))
8927
8928(define-public python2-pkgconfig
8929 (package-with-python2 python-pkgconfig))
8930
8931(define-public python-bz2file
8932 (package
8933 (name "python-bz2file")
8934 (version "0.98")
8935 (source
8936 (origin
8937 (method url-fetch)
8938 (uri (pypi-uri "bz2file" version))
8939 (sha256
8940 (base32
8941 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
8942 (build-system python-build-system)
8943 (arguments
8944 `(#:tests? #f)) ; Tests use deprecated python modules.
8945 (home-page "https://github.com/nvawda/bz2file")
8946 (synopsis "Read and write bzip2-compressed files")
8947 (description
8948 "Bz2file is a Python library for reading and writing bzip2-compressed
8949files. It contains a drop-in replacement for the I/O interface in the
8950standard library's @code{bz2} module, including features from the latest
8951development version of CPython that are not available in older releases.")
8952 (license license:asl2.0)))
8953
8954(define-public python2-bz2file
8955 (package-with-python2 python-bz2file))
8956
8957(define-public python-future
8958 (package
8959 (name "python-future")
8960 (version "0.16.0")
8961 (source
8962 (origin
8963 (method url-fetch)
8964 (uri (pypi-uri "future" version))
8965 (sha256
8966 (base32
8967 "1nzy1k4m9966sikp0qka7lirh8sqrsyainyf8rk97db7nwdfv773"))))
8968 (build-system python-build-system)
8969 ;; Many tests connect to the network or are otherwise flawed.
8970 ;; https://github.com/PythonCharmers/python-future/issues/210
8971 (arguments
8972 `(#:tests? #f))
8973 (home-page "http://python-future.org")
8974 (synopsis "Single-source support for Python 3 and 2")
8975 (description
8976 "@code{python-future} is the missing compatibility layer between Python 2 and
8977Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
8978to support both Python 2 and Python 3 with minimal overhead.")
8979 (license license:expat)))
8980
8981(define-public python2-future
8982 (package-with-python2 python-future))
8983
8984(define-public python-cysignals
8985 (package
8986 (name "python-cysignals")
8e3e51df 8987 (version "1.9.0")
44d10b1f
RW
8988 (source
8989 (origin
8990 (method url-fetch)
8e3e51df 8991 (uri (pypi-uri "cysignals" version))
44d10b1f
RW
8992 (sha256
8993 (base32
8e3e51df 8994 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
44d10b1f
RW
8995 (build-system python-build-system)
8996 (native-inputs
8997 `(("python-cython" ,python-cython)
8998 ("python-sphinx" ,python-sphinx)))
8999 (inputs
9000 `(("pari-gp" ,pari-gp)))
9001 (arguments
9002 `(#:modules ((guix build python-build-system)
9003 ((guix build gnu-build-system) #:prefix gnu:)
9004 (guix build utils))
9005 ;; FIXME: Tests are executed after installation and currently fail
9006 ;; when not installing into standard locations; the author is working
9007 ;; on a fix.
9008 #:tests? #f
9009 #:phases
9010 (modify-phases %standard-phases
9011 (add-before
9012 'build 'configure
9013 (assoc-ref gnu:%standard-phases 'configure)))))
9014 (home-page
9015 "https://github.com/sagemath/cysignals")
9016 (synopsis
9017 "Handling of interrupts and signals for Cython")
9018 (description
9019 "The cysignals package provides mechanisms to handle interrupts (and
9020other signals and errors) in Cython code, using two related approaches,
9021for mixed Cython/Python code or external C libraries and pure Cython code,
9022respectively.")
9023 (license license:lgpl3+)))
9024
9025(define-public python2-cysignals
9026 (package-with-python2 python-cysignals))
9027
9028(define-public python2-shedskin
9029 (package
9030 (name "python2-shedskin")
9031 (version "0.9.4")
9032 (source
9033 (origin
9034 (method url-fetch)
9035 (uri (string-append "https://github.com/shedskin/shedskin/"
9036 "releases/download/v" version
9037 "/shedskin-" version ".tgz"))
9038 (sha256
9039 (base32
9040 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9041 (build-system python-build-system)
9042 (arguments
9043 `(#:python ,python-2
9044 #:phases (modify-phases %standard-phases
9045 (add-after 'unpack 'fix-resulting-include-libs
9046 (lambda* (#:key inputs #:allow-other-keys)
9047 (let ((libgc (assoc-ref inputs "libgc"))
9048 (pcre (assoc-ref inputs "pcre")))
9049 (substitute* "shedskin/makefile.py"
9050 (("variable == 'CCFLAGS':[ ]*")
9051 (string-append "variable == 'CCFLAGS':\n"
9052 " line += ' -I " pcre "/include"
9053 " -I " libgc "/include'"))
9054 (("variable == 'LFLAGS':[ ]*")
9055 (string-append "variable == 'LFLAGS':\n"
9056 " line += ' -L" pcre "/lib"
9057 " -L " libgc "/lib'")))
9058 #t))))))
9059 (inputs `(("pcre" ,pcre)
9060 ("libgc" ,libgc)))
9061 (home-page "https://shedskin.github.io/")
9062 (synopsis "Experimental Python-2 to C++ Compiler")
9063 (description (string-append "This is an experimental compiler for a subset of
9064Python. It generates C++ code and a Makefile."))
9065 (license (list license:gpl3 license:bsd-3 license:expat))))
9066
9067(define-public python2-rope
9068 (package
9069 (name "python2-rope")
a9ba0a31 9070 (version "0.11.0")
44d10b1f
RW
9071 (source
9072 (origin
9073 (method url-fetch)
9074 (uri (pypi-uri "rope" version))
9075 (sha256
9076 (base32
a9ba0a31 9077 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
44d10b1f 9078 (arguments
afb29715 9079 ;; Rope has only partial python3 support, see `python-rope'
44d10b1f
RW
9080 `(#:python ,python-2))
9081 (build-system python-build-system)
9082 (native-inputs
9083 `(("python2-unittest2" ,python2-unittest2)))
9084 (home-page "https://github.com/python-rope/rope")
9085 (synopsis "Refactoring library for Python")
9086 (description "Rope is a refactoring library for Python. It facilitates
9087the renaming, moving and extracting of attributes, functions, modules, fields
9088and parameters in Python 2 source code. These refactorings can also be applied
9089to occurrences in strings and comments.")
9090 (license license:gpl2)))
9091
2c880ef4
LC
9092(define-public python-rope
9093 (package
9094 (inherit python2-rope)
9095 (name "python-rope")
9096 (arguments `(#:python ,python-wrapper
9097 ;; XXX: Only partial python3 support, results in some failing
9098 ;; tests: <https://github.com/python-rope/rope/issues/247>.
9099 #:tests? #f))
9100 (properties `((python2-variant . ,(delay python2-rope))))))
9101
44d10b1f
RW
9102(define-public python-py3status
9103 (package
9104 (name "python-py3status")
77f3d303 9105 (version "3.16")
44d10b1f
RW
9106 (source
9107 (origin
9108 (method url-fetch)
9109 (uri (pypi-uri "py3status" version))
9110 (sha256
9111 (base32
77f3d303 9112 "1xrfph277bgjln3jbpzpgkhxad04fjvj7s3xfil42q1sxi4s3q3g"))))
44d10b1f
RW
9113 (build-system python-build-system)
9114 (inputs
9115 `(("file" ,file)))
9116 (arguments
9117 '(#:phases
9118 (modify-phases %standard-phases
9119 ;; 'file' is used for detection of configuration file encoding
9120 ;; let's make link the dependency to particular input
9121 (add-before 'build 'patch-file-path
9122 (lambda* (#:key inputs #:allow-other-keys)
9123 (let ((file-path (assoc-ref inputs "file")))
9124 (substitute* "py3status/parse_config.py"
9125 (("\\['file', '-b'")
9126 (string-append "['" file-path "/bin/file', '-b'")))
9127 #t))))
9128 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
9129 (home-page "https://github.com/ultrabug/py3status")
9130 (synopsis "Extensible i3status wrapper written in Python")
9131 (description "py3status is an i3status wrapper which extends i3status
9132functionality in a modular way, allowing you to extend your panel with your
9133own code, responding to click events and updating clock every second.")
9134 (license license:bsd-3)))
9135
9136(define-public python-tblib
9137 (package
9138 (name "python-tblib")
9139 (version "1.3.2")
9140 (source (origin
9141 (method url-fetch)
9142 (uri (pypi-uri "tblib" version))
9143 (sha256 (base32
9144 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
9145 (build-system python-build-system)
9146 (arguments
9147 `(#:phases
9148 (modify-phases %standard-phases
9149 (add-before 'check 'adjust-tests
9150 (lambda _
9151 (when (which "python3")
9152 ;; Adjust the example output to match that of Python 3.7:
9153 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
9154 (substitute* "README.rst"
9155 (("Exception\\('fail',") "Exception('fail'"))
9156 #t)))
9157 (replace 'check
9158 (lambda _
9159 ;; Upstream runs tests after installation and the package itself
9160 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
9161 ;; found.
9162 (setenv "PYTHONPATH"
9163 (string-append (getcwd) "/build/lib:"
9164 (getenv "PYTHONPATH")))
9165 (invoke "py.test" "-vv" "tests" "README.rst"))))))
9166 (native-inputs
9167 `(("python-pytest" ,python-pytest)
9168 ("python-six" ,python-six)))
9169 (home-page "https://github.com/ionelmc/python-tblib")
9170 (synopsis "Traceback serialization library")
9171 (description
9172 "Traceback serialization allows you to:
9173
9174@enumerate
9175@item Pickle tracebacks and raise exceptions with pickled tracebacks in
9176different processes. This allows better error handling when running code over
9177multiple processes (imagine multiprocessing, billiard, futures, celery etc).
9178
9179@item Parse traceback strings and raise with the parsed tracebacks.
9180@end enumerate\n")
9181 (license license:bsd-3)))
9182
9183(define-public python2-tblib
9184 (package-with-python2 python-tblib))
9185
9186(define-public python-greenlet
9187 (package
9188 (name "python-greenlet")
9189 (version "0.4.15")
9190 (source (origin
9191 (method url-fetch)
9192 (uri (pypi-uri "greenlet" version))
9193 (sha256
9194 (base32
9195 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
9196 (build-system python-build-system)
9197 (home-page "https://greenlet.readthedocs.io/")
9198 (synopsis "Lightweight in-process concurrent programming")
9199 (description
9200 "Greenlet package is a spin-off of Stackless, a version of CPython
9201that supports micro-threads called \"tasklets\". Tasklets run
9202pseudo-concurrently (typically in a single or a few OS-level threads) and
9203are synchronized with data exchanges on \"channels\".")
9204 (license (list license:psfl license:expat))))
9205
9206(define-public python2-greenlet
9207 (package-with-python2 python-greenlet))
9208
9209(define-public python-objgraph
9210 (package
9211 (name "python-objgraph")
9212 (version "3.4.0")
9213 (source
9214 (origin
9215 (method url-fetch)
9216 (uri (pypi-uri "objgraph" version))
9217 (sha256
9218 (base32
9219 "184m09am5gpbqfaiy7l0hwh476mczbrly1dffs0rw2p1d1i2q32a"))))
9220 (build-system python-build-system)
9221 (propagated-inputs
9222 `(("python-graphviz" ,python-graphviz)))
9223 (native-inputs
9224 `(("python-mock" ,python-mock)
9225 ("graphviz" ,graphviz)))
9226 (home-page "https://mg.pov.lt/objgraph/")
9227 (synopsis "Draw Python object reference graphs with graphviz")
9228 (description
9229 "This package provides tools to draw Python object reference graphs with
9230graphviz.")
9231 (license license:expat)))
9232
9233(define-public python-gevent
9234 (package
9235 (name "python-gevent")
9236 (version "1.3.7")
9237 (source (origin
9238 (method url-fetch)
9239 (uri (pypi-uri "gevent" version))
9240 (sha256
9241 (base32
9242 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
9243 (modules '((guix build utils)))
9244 (snippet
9245 '(begin
9246 ;; unbunding libev and c-ares
9247 (delete-file-recursively "deps")
9248 #t))))
9249 (build-system python-build-system)
9250 (arguments
9251 `(#:modules ((ice-9 ftw)
9252 (ice-9 match)
9253 (srfi srfi-26)
9254 (guix build utils)
9255 (guix build python-build-system))
9256 #:phases (modify-phases %standard-phases
9257 (add-after 'unpack 'unpack-libev
9258 (lambda* (#:key inputs #:allow-other-keys)
9259 (mkdir-p "deps/libev")
9260 ;; FIXME: gevent requires building libev, even though
9261 ;; it only links against the proper one.
9262 (invoke "tar" "-xf" (assoc-ref inputs "libev-source")
9263 "--strip-components=1" "-C" "deps/libev")))
9264 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
9265 (lambda _
9266 (substitute* "src/gevent/subprocess.py"
9267 (("/bin/sh") (which "sh")))
9268 (for-each (lambda (file)
9269 (substitute* file
9270 (("/bin/sh") (which "sh"))
9271 (("/bin/true") (which "true"))))
9272 (find-files "src/greentest" "\\.py$"))
9273 #t))
9274 (add-before 'build 'do-not-use-bundled-sources
9275 (lambda* (#:key inputs #:allow-other-keys)
9276 (setenv "CONFIG_SHELL" (which "bash"))
9277 (setenv "LIBEV_EMBED" "false")
9278 (setenv "CARES_EMBED" "false")
9279 (setenv "EMBED" "false")
9280
9281 (let ((greenlet (string-append
9282 (assoc-ref inputs "python-greenlet")
9283 "/include")))
9284 (match (scandir greenlet
9285 (lambda (item)
9286 (string-prefix? "python" item)))
9287 ((python)
9288 (setenv "CPATH"
9289 (string-append greenlet "/" python)))))
9290 #t))
9291 (add-before 'check 'skip-timer-test
9292 (lambda _
9293 ;; XXX: Skip 'TestTimerResolution', which appears to be
9294 ;; unreliable.
9295 (substitute* "src/greentest/test__core_timer.py"
9296 (("not greentest.RUNNING_ON_CI") "False"))
9297 #t))
9298 (replace 'check
9299 (lambda _
9300 ;; Make sure the build directory is on PYTHONPATH.
9301 (setenv "PYTHONPATH"
9302 (string-append
9303 (getenv "PYTHONPATH") ":"
9304 (getcwd) "/build/"
9305 (car (scandir "build" (cut string-prefix? "lib." <>)))))
9306 (with-directory-excursion "src/greentest"
9307 ;; XXX: Many tests require network access. Instead we only
9308 ;; run known-good tests. Unfortunately we cannot use
9309 ;; recursion here since this directory also contains
9310 ;; Python-version-specific subfolders.
9311 (apply invoke "python" "testrunner.py" "--config"
9312 "known_failures.py"
9313 (scandir "." (cut regexp-exec
9314 (make-regexp "test_+(subprocess|core)")
9315 <>)))))))))
9316 (propagated-inputs
9317 `(("python-greenlet" ,python-greenlet)
9318 ("python-objgraph" ,python-objgraph)))
9319 (native-inputs
9320 `(("libev-source" ,(package-source libev))
9321 ("python-six" ,python-six)))
9322 (inputs
9323 `(("c-ares" ,c-ares)
9324 ("libev" ,libev)))
9325 (home-page "http://www.gevent.org/")
9326 (synopsis "Coroutine-based network library")
9327 (description
9328 "gevent is a coroutine-based Python networking library that uses greenlet
9329to provide a high-level synchronous API on top of the libev event loop.")
9330 (license license:expat)
9331 (properties `((python2-variant . ,(delay python2-gevent))))))
9332
9333(define-public python2-gevent
9334 (let ((base (package-with-python2
9335 (strip-python2-variant python-gevent))))
9336 (package
9337 (inherit base)
9338 (native-inputs `(,@(package-native-inputs python-gevent)
9339 ("python-mock" ,python2-mock))))))
9340
9341(define-public python-fastimport
9342 (package
9343 (name "python-fastimport")
9344 (version "0.9.6")
9345 (source
9346 (origin
9347 (method url-fetch)
9348 (uri (pypi-uri "fastimport" version))
9349 (sha256
9350 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
9351 (build-system python-build-system)
9352 (home-page "https://github.com/jelmer/python-fastimport")
9353 (synopsis "VCS fastimport parser and generator in Python")
9354 (description "This package provides a parser for and generator of the Git
9355@url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
9356format.")
9357 (license license:gpl2+)))
9358
9359(define-public python2-fastimport
9360 (package-with-python2 python-fastimport))
9361
9362(define-public python-twisted
9363 (package
9364 (name "python-twisted")
e5ba2fe3 9365 (version "17.5.0")
44d10b1f
RW
9366 (source (origin
9367 (method url-fetch)
9368 (uri (pypi-uri "Twisted" version ".tar.bz2"))
9369 (sha256
9370 (base32
e5ba2fe3 9371 "1sh2h23nnizcdyrl2rn7zxijglikxwz7z7grqpvq496zy2aa967i"))))
44d10b1f
RW
9372 (build-system python-build-system)
9373 (arguments
9374 '(#:tests? #f)) ; FIXME: Some tests are failing.
9375 ;; #:phases
9376 ;; (modify-phases %standard-phases
9377 ;; (replace 'check
9378 ;; (lambda _
9379 ;; (zero? (system* "./bin/trial" "twisted")))))
9380 (propagated-inputs
9381 `(("python-zope-interface" ,python-zope-interface)
9382 ("python-incremental" ,python-incremental)
e5ba2fe3 9383 ("python-hyperlink" ,python-hyperlink)
44d10b1f
RW
9384 ("python-constantly" ,python-constantly)
9385 ("python-automat" ,python-automat)))
9386 (home-page "https://twistedmatrix.com/")
9387 (synopsis "Asynchronous networking framework written in Python")
9388 (description
9389 "Twisted is an extensible framework for Python programming, with special
9390focus on event-based network programming and multiprotocol integration.")
9391 (license license:expat)))
9392
9393(define-public python2-twisted
9394 (package-with-python2 python-twisted))
9395
9396(define-public python-pika
9397 (package
9398 (name "python-pika")
9399 (version "0.12.0")
9400 (source
9401 (origin
9402 (method url-fetch)
9403 (uri (pypi-uri "pika" version))
9404 (sha256
9405 (base32
9406 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
9407 (build-system python-build-system)
9408 (native-inputs
9409 `(("python-pyev" ,python-pyev)
9410 ("python-tornado" ,python-tornado)
9411 ("python-twisted" ,python-twisted)))
9412 (home-page "https://pika.readthedocs.org")
9413 (synopsis "Pure Python AMQP Client Library")
9414 (description
9415 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
9416Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
9417network support library.")
9418 (license license:bsd-3)))
9419
9420(define-public python2-pika
9421 (package-with-python2 python-pika))
9422
9423(define-public python-ply
9424 (package
9425 (name "python-ply")
9426 (version "3.10")
9427 (source
9428 (origin
9429 (method url-fetch)
9430 (uri (pypi-uri "ply" version))
9431 (sha256
9432 (base32
9433 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
9434 (build-system python-build-system)
9435 (home-page "http://www.dabeaz.com/ply/")
9436 (synopsis "Python Lex & Yacc")
9437 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
9438It uses LR parsing and does extensive error checking.")
9439 (license license:bsd-3)))
9440
9441(define-public python2-ply
9442 (package-with-python2 python-ply))
9443
9444(define-public python-tabulate
9445 (package
9446 (name "python-tabulate")
9447 (version "0.7.7")
9448 (source (origin
9449 (method url-fetch)
9450 (uri (pypi-uri "tabulate" version))
9451 (sha256
9452 (base32
9453 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
9454 (build-system python-build-system)
9455 (arguments
9456 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
9457 ;; and the latest release is not tagged in the upstream repository.
9458 '(#:tests? #f))
9459 (home-page "https://bitbucket.org/astanin/python-tabulate")
9460 (synopsis "Pretty-print tabular data")
9461 (description
9462 "Tabulate is a library and command-line utility to pretty-print tabular
9463data in Python.")
9464 (license license:expat)))
9465
9466(define-public python2-tabulate
9467 (package-with-python2 python-tabulate))
9468
9469(define-public python-kazoo
9470 (package
9471 (name "python-kazoo")
9472 (version "2.4.0")
9473 (source
9474 (origin
9475 (method url-fetch)
9476 (uri (pypi-uri "kazoo" version))
9477 (sha256
9478 (base32
9479 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
9480 (build-system python-build-system)
9481 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
9482 (propagated-inputs
9483 `(("python-six" ,python-six)))
9484 (home-page "https://kazoo.readthedocs.org")
9485 (synopsis "High-level Zookeeper client library")
9486 (description
9487 "Kazoo is a Python client library for the Apache Zookeeper distributed
9488application service. It is designed to be easy to use and to avoid common
9489programming errors.")
9490 (license license:asl2.0)))
9491
9492(define-public python2-kazoo
9493 (package-with-python2 python-kazoo))
9494
9495(define-public python-pykafka
9496 (package
9497 (name "python-pykafka")
9498 (version "2.4.0")
9499 (source (origin
9500 (method url-fetch)
0ca1d040 9501 (uri (pypi-uri "pykafka" version))
44d10b1f
RW
9502 (sha256
9503 (base32
9504 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
9505 (build-system python-build-system)
9506 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
9507 (propagated-inputs
9508 `(("python-gevent" ,python-gevent)
9509 ("python-kazoo" ,python-kazoo)
9510 ("python-tabulate" ,python-tabulate)))
9511 (inputs
9512 `(("librdkafka" ,librdkafka)))
9513 (home-page "https://pykafka.readthedocs.io/")
9514 (synopsis "Apache Kafka client for Python")
9515 (description
9516 "PyKafka is a client for the Apache Kafka distributed messaging system.
9517It includes Python implementations of Kafka producers and consumers, which
9518are optionally backed by a C extension built on librdkafka.")
9519 (license license:asl2.0)))
9520
9521(define-public python2-pykafka
9522 (package-with-python2 python-pykafka))
9523
9524(define-public python-wcwidth
9525 (package
9526 (name "python-wcwidth")
9527 (version "0.1.7")
9528 (source
9529 (origin
9530 (method url-fetch)
9531 (uri (pypi-uri "wcwidth" version))
9532 (sha256
9533 (base32
9534 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
9535 (build-system python-build-system)
9536 (home-page "https://github.com/jquast/wcwidth")
9537 (synopsis "Measure number of terminal column cells of wide-character codes")
9538 (description "Wcwidth measures the number of terminal column cells of
9539wide-character codes. It is useful for those implementing a terminal emulator,
9540or programs that carefully produce output to be interpreted by one. It is a
9541Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
9542specified in POSIX.1-2001 and POSIX.1-2008.")
9543 (license license:expat)))
9544
9545(define-public python2-wcwidth
9546 (package-with-python2 python-wcwidth))
9547
9548(define-public python2-jsonrpclib
9549 (package
9550 (name "python2-jsonrpclib")
9551 (version "0.1.7")
9552 (source (origin
9553 (method url-fetch)
6571bba0 9554 (uri (pypi-uri "jsonrpclib" version))
44d10b1f
RW
9555 (sha256
9556 (base32
9557 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
9558 (build-system python-build-system)
9559 (arguments
9560 `(#:tests? #f
9561 #:python ,python-2))
9562 (home-page "https://github.com/joshmarshall/jsonrpclib/")
9563 (synopsis "Implementation of JSON-RPC specification for Python")
9564 (description
9565 "This library is an implementation of the JSON-RPC specification.
9566It supports both the original 1.0 specification, as well as the
9567new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
9568etc.")
9569 (license license:asl2.0)))
9570
9571(define-public python-chai
9572 (package
9573 (name "python-chai")
9574 (version "1.1.2")
9575 (source (origin
9576 (method url-fetch)
9577 (uri (pypi-uri "chai" version))
9578 (sha256
9579 (base32
9580 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
9581 (build-system python-build-system)
9582 (home-page "https://github.com/agoragames/chai")
9583 (synopsis "Mocking framework for Python")
9584 (description
9585 "Chai provides an api for mocking, stubbing and spying your python
9586objects, patterned after the Mocha library for Ruby.")
9587 (license license:bsd-3)))
9588
9589(define-public python2-chai
9590 (package-with-python2 python-chai))
9591
9592(define-public python-inflection
9593 (package
9594 (name "python-inflection")
9595 (version "0.3.1")
9596 (source
9597 (origin (method url-fetch)
9598 (uri (pypi-uri "inflection" version))
9599 (sha256
9600 (base32
9601 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
9602 (build-system python-build-system)
9603 (native-inputs
9604 `(("python-pytest" ,python-pytest)))
9605 (home-page "https://github.com/jpvanhal/inflection")
9606 (synopsis "Python string transformation library")
9607 (description
9608 "Inflection is a string transformation library. It singularizes
9609and pluralizes English words, and transforms strings from CamelCase to
9610underscored string.")
9611 (license license:expat)))
9612
9613(define-public python2-inflection
9614 (package-with-python2 python-inflection))
9615
9616(define-public python-pylev
9617 (package
9618 (name "python-pylev")
9619 (version "1.3.0")
9620 (source (origin
9621 (method url-fetch)
9622 (uri (pypi-uri "pylev" version))
9623 (sha256
9624 (base32
9625 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
9626 (build-system python-build-system)
9627 (home-page "https://github.com/toastdriven/pylev")
9628 (synopsis "Levenshtein distance implementation in Python")
9629 (description "Pure Python Levenshtein implementation, based off the
9630Wikipedia code samples at
9631@url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
9632 (license license:bsd-3)))
9633
9634(define-public python2-pylev
9635 (package-with-python2 python-pylev))
9636
9637(define-public python-cleo
9638 (package
9639 (name "python-cleo")
9640 (version "0.6.1")
9641 (source (origin
9642 (method url-fetch)
9643 (uri (pypi-uri "cleo" version))
9644 (sha256
9645 (base32
9646 "0q1cf0szr0d54am4pypzwdnm74zpladdsinad94c2fz5i06fdpf7"))))
9647 (build-system python-build-system)
9648 (native-inputs
9649 `(;; For testing
9650 ("python-mock" ,python-mock)
9651 ("python-pytest-mock" ,python-pytest-mock)
9652 ("python-pytest" ,python-pytest)))
9653 (propagated-inputs
9654 `(("python-backpack" ,python-backpack)
9655 ("python-pastel" ,python-pastel)
9656 ("python-pylev" ,python-pylev)))
9657 (home-page "https://github.com/sdispater/cleo")
9658 (synopsis "Command-line arguments library for Python")
9659 (description
9660 "Cleo allows you to create command-line commands with signature in
9661docstring and colored output.")
9662 (license license:expat)))
9663
9664(define-public python2-cleo
9665 (package-with-python2 python-cleo))
9666
9667(define-public python-lazy-object-proxy
9668 (package
9669 (name "python-lazy-object-proxy")
9670 (version "1.3.1")
9671 (source (origin
9672 (method url-fetch)
9673 (uri (pypi-uri "lazy-object-proxy" version))
9674 (sha256
9675 (base32
9676 "0yha7q9bhw857fwaby785d63mffhngl9npwzlk9i0pwlkwvbx4gb"))))
9677 (build-system python-build-system)
9678 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
9679 (synopsis "Lazy object proxy for python")
9680 (description
9681 "Lazy object proxy is an object that wraps a callable but defers the call
9682until the object is actually required, and caches the result of said call.")
9683 (license license:bsd-2)))
9684
9685(define-public python2-lazy-object-proxy
9686 (package-with-python2 python-lazy-object-proxy))
9687
9688(define-public python-dnspython
9689 (package
9690 (name "python-dnspython")
9691 (version "1.15.0")
9692 (source (origin
9693 (method url-fetch)
9694 (uri (string-append "http://www.dnspython.org/kits/"
9695 version "/dnspython-" version ".tar.gz"))
9696 (sha256
9697 (base32
9698 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
9699 (build-system python-build-system)
9700 (arguments '(#:tests? #f)) ; XXX: requires internet access
9701 (home-page "http://www.dnspython.org")
9702 (synopsis "DNS toolkit for Python")
9703 (description
9704 "dnspython is a DNS toolkit for Python. It supports almost all record
9705types. It can be used for queries, zone transfers, and dynamic updates.
9706It supports TSIG authenticated messages and EDNS0.")
9707 (license license:expat)))
9708
9709(define-public python2-dnspython
9710 (package-with-python2 python-dnspython))
9711
9712(define-public python-email-validator
9713 (package
9714 (name "python-email-validator")
9715 (version "1.0.2")
9716 (source
9717 (origin (method url-fetch)
9718 (uri (pypi-uri "email_validator" version))
9719 (sha256
9720 (base32
9721 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
9722 (build-system python-build-system)
9723 (arguments
9724 '(#:phases
9725 (modify-phases %standard-phases
9726 (add-before 'build 'use-dnspython
9727 (lambda _
9728 (substitute* "setup.py"
9729 (("dnspython3") "dnspython"))
9730 #t)))))
9731 (propagated-inputs
9732 `(("python-dnspython" ,python-dnspython)
9733 ("python-idna" ,python-idna)))
9734 (home-page "https://github.com/JoshData/python-email-validator")
9735 (synopsis "Email address validation library for Python")
9736 (description
9737 "This library validates email address syntax and deliverability.")
9738 (license license:cc0)))
9739
9740(define-public python2-email-validator
9741 (package-with-python2 python-email-validator))
9742
9743(define-public python-ukpostcodeparser
9744 (package
9745 (name "python-ukpostcodeparser")
9746 (version "1.0.3")
9747 (source (origin
9748 (method url-fetch)
9749 (uri (pypi-uri "UkPostcodeParser" version))
9750 (sha256
9751 (base32
9752 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
9753 (build-system python-build-system)
9754 (home-page "https://github.com/hamstah/ukpostcodeparser")
9755 (synopsis "UK Postcode parser for Python")
9756 (description
9757 "This library provides the @code{parse_uk_postcode} function for
9758parsing UK postcodes.")
9759 (license license:expat)))
9760
9761(define-public python2-ukpostcodeparser
9762 (package-with-python2 python-ukpostcodeparser))
9763
9764(define-public python-faker
9765 (package
9766 (name "python-faker")
9767 (version "0.7.9")
9768 (source (origin
9769 (method url-fetch)
9770 (uri (pypi-uri "Faker" version))
9771 (sha256
9772 (base32
9773 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
9774 (patches
9775 (search-patches "python-faker-fix-build-32bit.patch"))
9776 (modules '((guix build utils)))
9777 (snippet
9778 '(begin
9779 (for-each delete-file (find-files "." "\\.pyc$"))
9780 #t))))
9781 (build-system python-build-system)
9782 (arguments
9783 '(#:phases
9784 (modify-phases %standard-phases
9785 (replace 'check
49ff8827 9786 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
44d10b1f
RW
9787 (native-inputs
9788 `(;; For testing
9789 ("python-email-validator" ,python-email-validator)
9790 ("python-mock" ,python-mock)
9791 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
9792 (propagated-inputs
9793 `(("python-dateutil" ,python-dateutil)
9794 ("python-six" ,python-six)))
9795 (home-page "https://github.com/joke2k/faker")
9796 (synopsis "Python package that generates fake data")
9797 (description
9798 "Faker is a Python package that generates fake data such as names,
9799addresses, and phone numbers.")
9800 (license license:expat)
9801 (properties `((python2-variant . ,(delay python2-faker))))))
9802
9803(define-public python2-faker
9804 (let ((base (package-with-python2 (strip-python2-variant
9805 python-faker))))
9806 (package
9807 (inherit base)
9808 (propagated-inputs
9809 `(("python2-ipaddress" ,python2-ipaddress)
9810 ,@(package-propagated-inputs base))))))
9811
9812(define-public python-pyaml
9813 (package
9814 (name "python-pyaml")
9815 (version "18.11.0")
9816 (source (origin
9817 (method url-fetch)
9818 (uri (pypi-uri "pyaml" version))
9819 (sha256
9820 (base32
9821 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
9822 (build-system python-build-system)
9823 (native-inputs
9824 `(("python-unidecode" ,python-unidecode)))
9825 (propagated-inputs
9826 `(("python-pyyaml" ,python-pyyaml)))
9827 (home-page "https://github.com/mk-fg/pretty-yaml")
9828 (synopsis "YAML pretty-print library for Python")
9829 (description
9830 "pyaml is a PyYAML based python module to produce pretty and readable
9831YAML-serialized data.")
9832 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
9833
9834(define-public python2-pyaml
9835 (package-with-python2 python-pyaml))
9836
9837(define-public python-backpack
9838 (package
9839 (name "python-backpack")
9840 (version "0.1")
9841 (source
9842 (origin
9843 (method url-fetch)
9844 (uri (pypi-uri "backpack" version))
9845 (sha256
9846 (base32
9847 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
9848 (build-system python-build-system)
9849 (native-inputs
9850 `(("python-pytest" ,python-pytest)
9851 ("python-nose" ,python-nose)))
9852 (propagated-inputs
9853 `(("python-simplejson" ,python-simplejson)))
9854 (home-page "https://github.com/sdispater/backpack")
9855 (synopsis "Utilities for working with Python collections")
9856 (description "Backpack provides some useful utilities for working with
9857collections of data.")
9858 (license license:expat)))
9859
9860(define-public python2-backpack
9861 (package-with-python2 python-backpack))
9862
9863(define-public python-prompt-toolkit
9864 (package
9865 (name "python-prompt-toolkit")
9866 (version "2.0.7")
9867 (source
9868 (origin
9869 (method url-fetch)
9870 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
9871 (sha256
9872 (base32
9873 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
9874 (build-system python-build-system)
9875 (arguments
9876 `(#:phases
9877 (modify-phases %standard-phases
9878 (delete 'check)
9879 (add-after 'install 'post-install-check
9880 (lambda* (#:key inputs outputs #:allow-other-keys)
9881 ;; HOME is needed for the test
9882 ;; "test_pathcompleter_can_expanduser".
9883 (setenv "HOME" "/tmp")
9884 (add-installed-pythonpath inputs outputs)
9885 (invoke "py.test"))))))
9886 (propagated-inputs
9887 `(("python-wcwidth" ,python-wcwidth)
9888 ("python-six" ,python-six)
9889 ("python-pygments" ,python-pygments)))
9890 (native-inputs
9891 `(("python-pytest" ,python-pytest)))
9892 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
9893 (synopsis "Library for building command line interfaces in Python")
9894 (description
9895 "Prompt-Toolkit is a library for building interactive command line
9896interfaces in Python. It's like GNU Readline but it also features syntax
9897highlighting while typing, out-of-the-box multi-line input editing, advanced
9898code completion, incremental search, support for Chinese double-width
9899characters, mouse support, and auto suggestions.")
9900 (license license:bsd-3)))
9901
9902(define-public python2-prompt-toolkit
9903 (package-with-python2 python-prompt-toolkit))
9904
9905(define-public python-prompt-toolkit-1
9906 (package (inherit python-prompt-toolkit)
9907 (version "1.0.15")
9908 (source
9909 (origin
9910 (method url-fetch)
9911 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
9912 (sha256
9913 (base32
9914 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
9915
9916(define-public python2-prompt-toolkit-1
9917 (package-with-python2 python-prompt-toolkit-1))
9918
9919(define-public python-jedi
9920 (package
9921 (name "python-jedi")
40bd0aa3 9922 (version "0.13.2")
44d10b1f
RW
9923 (source
9924 (origin
9925 (method url-fetch)
9926 (uri (pypi-uri "jedi" version))
9927 (sha256
9928 (base32
40bd0aa3 9929 "1za944msp0f8x36qa8l309jhv0kzlsdh7r9nj3z12y8npnsh45sp"))))
44d10b1f
RW
9930 (build-system python-build-system)
9931 (arguments
40bd0aa3 9932 `( ;; Many tests are failing with Python 3.7.x as of version 0.13.2 (see:
44d10b1f
RW
9933 ;; https://github.com/davidhalter/jedi/issues/1263)
9934 #:tests? #f
9935 #:phases
9936 (modify-phases %standard-phases
9937 (replace 'check
9938 (lambda* (#:key tests? #:allow-other-keys)
9939 (when tests?
9940 (invoke "py.test" "-vv")))))))
9941 (native-inputs
9942 `(("python-pytest" ,python-pytest)
9943 ("python-docopt" ,python-docopt)))
9944 (propagated-inputs
9945 `(("python-parso" ,python-parso)))
9946 (home-page "https://github.com/davidhalter/jedi")
9947 (synopsis "Autocompletion and static analysis library for Python")
9948 (description
9949 "Jedi is a static analysis tool for Python that can be used in Integrated
9950Development Environments (@dfn{IDE}s) and text editors. It understands Python
9951on a deeper level than many other static analysis frameworks for Python.
9952
9953Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
9954well.")
9955 (license license:expat)))
9956
9957(define-public python2-jedi
9958 (package-with-python2 python-jedi))
9959
9960(define-public ptpython
9961 (package
9962 (name "ptpython")
9963 (version "0.34")
9964 (source (origin
9965 (method url-fetch)
9966 (uri (pypi-uri "ptpython" version))
9967 (sha256
9968 (base32
9969 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
9970 (build-system python-build-system)
9971 (arguments
9972 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
9973 (propagated-inputs
9974 `(("python-docopt" ,python-docopt)
9975 ("python-jedi" ,python-jedi)
9976 ("python-prompt-toolkit" ,python-prompt-toolkit)
9977 ("python-pygments" ,python-pygments)))
9978 (home-page "https://github.com/jonathanslenders/ptpython")
9979 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
9980 (description
9981 "ptpython is a Python read-eval-print loop with IDE-like features.
9982It supports syntax highlighting, multiline editing, autocompletion, mouse,
9983color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
9984etc.")
9985 (license license:bsd-3)
9986 (properties `((python2-variant . ,(delay ptpython-2))))))
9987
9988(define-public ptpython-2
9989 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
9990 (package
9991 (inherit base)
9992 (name "ptpython2"))))
9993
9994(define-public python-stem
9995 (package
9996 (name "python-stem")
9997 (version "1.7.0")
9998 (source
9999 (origin
10000 (method url-fetch)
10001 (uri (pypi-uri "stem" version))
10002 (sha256
10003 (base32
10004 "1awiglfiajnx2hva9aqpj3fmdvdb4qg7cwnlfyih827m68y3cq8v"))))
10005 (build-system python-build-system)
10006 (arguments
10007 `(#:phases
10008 (modify-phases %standard-phases
10009 (replace 'check
10010 (lambda _
10011 (invoke "./run_tests.py" "--unit")
10012 #t)))))
10013 (native-inputs
10014 `(("python-mock" ,python-mock)
10015 ("python-pycodestyle" ,python-pycodestyle)
10016 ("python-pyflakes" ,python-pyflakes)))
10017 (home-page "https://stem.torproject.org/")
10018 (synopsis
10019 "Python controller library that allows applications to interact with Tor")
10020 (description
10021 "Stem is a Python controller library for Tor. With it you can use Tor's
10022control protocol to script against the Tor process and read descriptor data
10023relays publish about themselves.")
10024 (license license:lgpl3)))
10025
10026(define-public python2-stem
10027 (package-with-python2 python-stem))
10028
10029(define-public python-pyserial
10030 (package
10031 (name "python-pyserial")
10032 (version "3.1.1")
10033 (source
10034 (origin
10035 (method url-fetch)
10036 (uri (pypi-uri "pyserial" version))
10037 (sha256
10038 (base32
10039 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
10040 (build-system python-build-system)
10041 (arguments
10042 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
10043 ;; #:phases
10044 ;; (modify-phases %standard-phases
10045 ;; (replace 'check
10046 ;; (lambda _
10047 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
10048 (home-page
10049 "https://github.com/pyserial/pyserial")
10050 (synopsis "Python Serial Port Bindings")
10051 (description "@code{pyserial} provide serial port bindings for Python. It
10052supports different byte sizes, stop bits, parity and flow control with RTS/CTS
10053and/or Xon/Xoff. The port is accessed in RAW mode.")
10054 (license license:bsd-3)))
10055
10056(define-public python2-pyserial
10057 (package-with-python2 python-pyserial))
10058
10059(define-public python-kivy
10060 (package
10061 (name "python-kivy")
10062 (version "1.10.1")
10063 (source
10064 (origin
10065 (method url-fetch)
10066 (uri (pypi-uri "Kivy" version))
10067 (file-name (string-append name "-" version ".tar.gz"))
10068 (sha256
10069 (base32
10070 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
10071 (build-system python-build-system)
10072 (arguments
10073 `(#:tests? #f ; Tests require many optional packages
10074 #:phases
10075 (modify-phases %standard-phases
10076 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
10077 (lambda* (#:key inputs #:allow-other-keys)
10078 (setenv "KIVY_SDL2_PATH"
10079 (string-append (assoc-ref inputs "sdl-union")
10080 "/include/SDL2"))
10081 #t)))))
10082 (native-inputs
10083 `(("git" ,git)
10084 ("pkg-config" ,pkg-config)
10085 ("python-cython" ,python-cython)))
10086 (inputs
10087 `(("gstreamer" ,gstreamer)
10088 ("mesa" ,mesa)
10089 ("sdl-union"
10090 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
10091 (home-page "http://kivy.org")
10092 (synopsis
10093 "Multitouch application framework")
10094 (description
10095 "A software library for rapid development of
10096hardware-accelerated multitouch applications.")
10097 (license license:expat)))
10098
10099(define-public python2-kivy
10100 (package-with-python2 python-kivy))
10101
10102(define-public python-kivy-next
10103 (deprecated-package "python-kivy-next" python-kivy))
10104
10105(define-public python2-kivy-next
10106 (deprecated-package "python2-kivy-next" python2-kivy))
10107
10108(define-public python-binaryornot
10109 (package
10110 (name "python-binaryornot")
10111 (version "0.4.4")
10112 (source (origin
10113 (method url-fetch)
10114 (uri (pypi-uri "binaryornot" version))
10115 (sha256
10116 (base32
10117 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
10118 (build-system python-build-system)
10119 (propagated-inputs
10120 `(("python-chardet" ,python-chardet)
10121 ("python-hypothesis" ,python-hypothesis)))
10122 (home-page "https://github.com/audreyr/binaryornot")
10123 (synopsis "Package to check if a file is binary or text")
10124 (description "Ultra-lightweight pure Python package to check if a file is
10125binary or text.")
10126 (license license:bsd-3)
10127 (properties `((python2-variant . ,(delay python2-binaryornot))))))
10128
10129(define-public python2-binaryornot
10130 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
10131 (package (inherit base)
10132 (propagated-inputs
10133 `(("python2-enum34" ,python2-enum34)
10134 ,@(package-propagated-inputs base))))))
10135
10136(define-public python-nltk
10137 (package
10138 (name "python-nltk")
10139 (version "3.2.1")
10140 (source (origin
10141 (method url-fetch)
10142 (uri (pypi-uri "nltk" version))
10143 (sha256
10144 (base32
10145 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
10146 (build-system python-build-system)
10147 (arguments
10148 '(;; The tests require some extra resources to be downloaded.
10149 ;; TODO Try packaging these resources.
10150 #:tests? #f))
10151 (home-page "http://nltk.org/")
10152 (synopsis "Natural Language Toolkit")
10153 (description "It provides interfaces to over 50 corpora and lexical
10154resources such as WordNet, along with a suite of text processing libraries
10155for classification, tokenization, stemming, tagging, parsing, and semantic
10156reasoning, wrappers for natural language processing libraries.")
10157 (license license:asl2.0)))
10158
10159(define-public python2-nltk
10160 (package-with-python2 python-nltk))
10161
10162(define-public python-pymongo
10163 (package
10164 (name "python-pymongo")
10165 (version "3.7.2")
10166 (source (origin
10167 (method url-fetch)
10168 (uri (pypi-uri "pymongo" version))
10169 (sha256
10170 (base32
10171 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
10172 (build-system python-build-system)
10173 (propagated-inputs
10174 `(("python-certifi" ,python-certifi)))
10175 (home-page "https://github.com/mongodb/mongo-python-driver")
10176 (synopsis "Python driver for MongoDB")
10177 (description "Python driver for MongoDB.")
10178 (license license:asl2.0)))
10179
10180(define-public python2-pymongo
10181 (package-with-python2 python-pymongo))
10182
44d10b1f
RW
10183(define-public python-consul
10184 (package
10185 (name "python-consul")
10186 (version "0.6.1")
10187 (source
10188 (origin
10189 (method url-fetch)
10190 (uri (pypi-uri "python-consul" version))
10191 (sha256
10192 (base32
10193 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
10194 (build-system python-build-system)
10195 (arguments
10196 '(#:tests? #f)) ; The tests are not distributed
10197 (propagated-inputs
10198 `(("python-requests" ,python-requests)
10199 ("python-six" ,python-six)))
10200 (home-page "https://github.com/cablehead/python-consul")
10201 (synopsis "Python client for Consul")
10202 (description
10203 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
10204discovery, monitoring and configuration.")
10205 (license license:expat)))
10206
10207(define-public python2-consul
10208 (package-with-python2 python-consul))
10209
10210(define-public python-schematics
10211 (package
10212 (name "python-schematics")
10213 (version "1.1.1")
10214 (source
10215 (origin
10216 (method url-fetch)
10217 (uri (string-append
10218 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
10219 (file-name (string-append name "-" version ".tar.gz"))
10220 (sha256
10221 (base32
10222 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
10223 (build-system python-build-system)
10224 (propagated-inputs
10225 `(("python-six" ,python-six)))
10226 (arguments
10227 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
10228 ; version requirements (eg python-coveralls)
10229 (home-page "https://github.com/schematics/schematics")
10230 (synopsis "Python Data Structures for Humans")
10231 (description "Python Data Structures for Humans.")
10232 (license license:bsd-3)))
10233
10234(define-public python2-schematics
10235 (package-with-python2 python-schematics))
10236
10237(define-public python-odfpy
10238 (package
10239 (name "python-odfpy")
10240 (version "1.3.3")
10241 (source (origin
10242 (method url-fetch)
10243 (uri (pypi-uri "odfpy" version))
10244 (sha256
10245 (base32
10246 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
10247 (arguments
10248 `(#:modules ((srfi srfi-1)
10249 (guix build python-build-system)
10250 (guix build utils))
10251 #:phases
10252 (modify-phases %standard-phases
10253 (replace 'check
10254 ;; The test runner invokes python2 and python3 for test*.py.
10255 ;; To avoid having both in inputs, we replicate it here.
10256 (lambda _
21ccc01d
RW
10257 (for-each (lambda (test-file) (invoke "python" test-file))
10258 (find-files "tests" "^test.*\\.py$"))
10259 #t)))))
44d10b1f
RW
10260 (build-system python-build-system)
10261 (home-page "https://github.com/eea/odfpy")
10262 (synopsis "Python API and tools to manipulate OpenDocument files")
10263 (description "Collection of libraries and utility programs written in
10264Python to manipulate OpenDocument 1.2 files.")
10265 (license
10266 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
10267 ;; number of files with other licenses.
10268 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
10269
10270(define-public python2-odfpy
10271 (package-with-python2 python-odfpy))
10272
10273(define-public python-natsort
10274 (package
10275 (name "python-natsort")
10276 (version "5.4.1")
10277 (source (origin
10278 (method url-fetch)
10279 (uri (pypi-uri "natsort" version))
10280 (sha256
10281 (base32
10282 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
10283 (build-system python-build-system)
10284 (arguments
10285 `(#:modules ((guix build utils)
10286 (guix build python-build-system)
10287 (srfi srfi-1)
10288 (srfi srfi-26)
10289 (ice-9 ftw))
10290 #:phases
10291 (modify-phases %standard-phases
10292 (add-before 'check 'set-cachedir
10293 ;; Tests require write access to $HOME by default
10294 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
10295 (replace 'check
10296 (lambda _
10297 (let ((cwd (getcwd)))
10298 (setenv "PYTHONPATH"
10299 (string-append
10300 cwd "/build/"
10301 (find (cut string-prefix? "lib" <>)
10302 (scandir (string-append cwd "/build")))
10303 ":"
10304 (getenv "PYTHONPATH")))
10305 (invoke "pytest" "-v")))))))
10306 (native-inputs
10307 `(("python-hypothesis" ,python-hypothesis)
10308 ("python-pytest-cov" ,python-pytest-cov)
10309 ("python-pytest-mock" ,python-pytest-mock)
10310 ("python-pytest" ,python-pytest)))
10311 (propagated-inputs ; TODO: Add python-fastnumbers.
10312 `(("python-pyicu" ,python-pyicu)))
10313 (home-page "https://github.com/SethMMorton/natsort")
10314 (synopsis "Natural sorting for python and shell")
10315 (description
10316 "Natsort lets you apply natural sorting on lists instead of
10317lexicographical. If you use the built-in @code{sorted} method in python
10318on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
10319returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
10320function @code{natsorted} that identifies numbers and sorts them separately
10321from strings. It can also sort version numbers, real numbers, mixed types
10322and more, and comes with a shell command @command{natsort} that exposes this
10323functionality in the command line.")
10324 (license license:expat)
10325 (properties `((python2-variant . ,(delay python2-natsort))))))
10326
10327(define-public python2-natsort
10328 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
10329 (package (inherit base)
10330 (native-inputs
10331 `(("python2-pathlib" ,python2-pathlib)
10332 ,@(package-native-inputs base))))))
10333
10334(define-public python-glances
10335 (package
10336 (name "python-glances")
10337 (version "3.0.2")
10338 (source
10339 (origin
10340 (method url-fetch)
10341 (uri (pypi-uri "Glances" version))
10342 (sha256
10343 (base32
10344 "09fxysfp1n16csqvzvawy74qm6a94nvwjf3vcf5gkqp4i6k4vjjy"))))
10345 (build-system python-build-system)
10346 (propagated-inputs
10347 `(("python-psutil" ,python-psutil)))
10348 (home-page
10349 "https://github.com/nicolargo/glances")
10350 (synopsis
10351 "A cross-platform curses-based monitoring tool")
10352 (description
10353 "Glances is a curses-based monitoring tool for a wide variety of platforms.
10354Glances uses the PsUtil library to get information from your system. It monitors
10355CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
10356 (license license:lgpl3+)))
10357
10358(define-public python2-glances
10359 (package-with-python2 python-glances))
10360
10361(define-public python-graphql-core
10362 (package
10363 (name "python-graphql-core")
10364 (version "0.5.3")
10365 (source
10366 (origin
10367 (method url-fetch)
10368 (uri (pypi-uri "graphql-core" version))
10369 (sha256
10370 (base32
10371 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
10372 (build-system python-build-system)
10373 (arguments
10374 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
10375 #:phases
10376 (modify-phases %standard-phases
10377 (add-after 'unpack 'patch-hardcoded-version
10378 (lambda _ (substitute*
10379 "setup.py"
10380 (("'gevent==1.1rc1'") "'gevent'"))
10381 #t)))))
10382 (native-inputs
10383 `(("python-gevent" ,python-gevent)
10384 ("python-mock" ,python-mock)
10385 ("python-pytest-mock" ,python-pytest-mock)))
10386 (propagated-inputs
10387 `(("python-promise" ,python-promise)
10388 ("python-six" ,python-six)))
10389 (home-page "https://github.com/graphql-python/graphql-core")
10390 (synopsis "GraphQL implementation for Python")
10391 (description
10392 "GraphQL implementation for Python. GraphQL is a data query language and
10393runtime designed and used to request and deliver data to mobile and web apps.
10394This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
10395to Python.")
10396 (license license:expat)))
10397
10398(define-public python2-graphql-core
10399 (package-with-python2 python-graphql-core))
10400
10401(define-public python-graphql-relay
10402 (package
10403 (name "python-graphql-relay")
10404 (version "0.4.5")
10405 (source
10406 (origin
10407 (method url-fetch)
10408 (uri (pypi-uri "graphql-relay" version))
10409 (sha256
10410 (base32
10411 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
10412 (build-system python-build-system)
10413 (arguments
10414 '(#:tests? #f)) ; The tests are not distributed
10415 (propagated-inputs
10416 `(("python-graphql-core" ,python-graphql-core)
10417 ("python-promise" ,python-promise)
10418 ("python-six" ,python-six)))
10419 (home-page "https://github.com/graphql-python/graphql-relay-py")
10420 (synopsis "Relay implementation for Python")
10421 (description
10422 "This is a library to allow the easy creation of Relay-compliant servers
10423using the GraphQL Python reference implementation of a GraphQL server. It
10424should be noted that the code is a exact port of the original
10425@url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
10426from Facebook.")
10427 (license license:expat)))
10428
10429(define-public python2-graphql-relay
10430 (package-with-python2 python-graphql-relay))
10431
10432(define-public python-graphene
10433 (package
10434 (name "python-graphene")
10435 (version "0.10.2")
10436 (source
10437 (origin
10438 (method url-fetch)
10439 (uri (pypi-uri "graphene" version))
10440 (sha256
10441 (base32
10442 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
10443 (build-system python-build-system)
10444 (propagated-inputs
10445 `(("python-graphql-core" ,python-graphql-core)
10446 ("python-graphql-relay" ,python-graphql-relay)
10447 ("python-iso8601" ,python-iso8601)
10448 ("python-promise" ,python-promise)
10449 ("python-six" ,python-six)))
10450 (arguments
10451 `(#:tests? #f)) ; no tests/ in the PyPI tarball
10452 (home-page "http://graphene-python.org/")
10453 (synopsis "GraphQL Framework for Python")
10454 (description
10455 "Graphene is a Python library for building GraphQL schemas/types.
10456A GraphQL schema describes your data model, and provides a GraphQL server
10457with an associated set of resolve methods that know how to fetch data.")
10458 (properties `((python2-variant . ,(delay python2-graphene))))
10459 (license license:expat)))
10460
10461(define-public python2-graphene
10462 (let ((base (package-with-python2
10463 (strip-python2-variant python-graphene))))
10464 (package (inherit base)
10465 (native-inputs
10466 `(("python2-sqlalchemy" ,python2-sqlalchemy)
10467 ,@(package-native-inputs base))))))
10468
10469(define-public python-nautilus
10470 (package
10471 (name "python-nautilus")
10472 (version "0.4.9")
10473 (source
10474 (origin
10475 (method url-fetch)
10476 (uri (pypi-uri "nautilus" version))
10477 (sha256
10478 (base32
10479 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
10480 (build-system python-build-system)
10481 (arguments `(#:tests? #f)) ; fails to import test modules
10482 (propagated-inputs
10483 `(("python-bcrypt" ,python-bcrypt)
10484 ("python-click" ,python-click)
10485 ("python-consul" ,python-consul)
10486 ("python-graphene" ,python-graphene)
10487 ("python-jinja2" ,python-jinja2)
10488 ("python-peewee" ,python-peewee)
10489 ("python-pika" ,python-pika)
10490 ("python-tornado" ,python-tornado)
10491 ("python-wtforms" ,python-wtforms)))
10492 (native-inputs
10493 `(("python-nose2" ,python-nose2)))
10494 (home-page "https://github.com/AlecAivazis/nautilus")
10495 (synopsis "Library for creating microservice applications")
10496 (description
10497 "Nautilus is a framework for flux based microservices that looks to
10498provide extendible implementations of common aspects of a cloud so that you can
10499focus on building massively scalable web applications.")
10500 (license license:expat)))
10501
10502(define-public python-snowballstemmer
10503 (package
10504 (name "python-snowballstemmer")
10505 (version "1.2.1")
10506 (source (origin
10507 (method url-fetch)
10508 (uri (pypi-uri "snowballstemmer" version))
10509 (sha256
10510 (base32
10511 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
10512 (build-system python-build-system)
10513 (arguments
10514 `(;; No tests exist
10515 #:tests? #f))
10516 (home-page "https://github.com/shibukawa/snowball_py")
10517 (synopsis "Snowball stemming library collection for Python")
10518 (description "This package provides 16 word stemmer algorithms generated
10519from Snowball algorithms. It includes the 15 original ones plus the Poerter
10520English stemmer.")
10521 (license license:bsd-3)))
10522
10523(define-public python2-snowballstemmer
10524 (package-with-python2 python-snowballstemmer))
10525
10526(define-public python-sphinx-cloud-sptheme
10527 (package
10528 (name "python-sphinx-cloud-sptheme")
10529 (version "1.8.0")
10530 (source (origin
10531 (method url-fetch)
10532 (uri (pypi-uri "cloud_sptheme" version))
10533 (sha256
10534 (base32
10535 "1dniqb6a39yh786f86c4jn666rwnyi1jvzn4616zhcchb7sfdshd"))))
10536 (build-system python-build-system)
10537 ;; FIXME: The 'pypi' release archive does not contain tests.
10538 (arguments '(#:tests? #f))
10539 (native-inputs
10540 `(("python-sphinx" ,python-sphinx)))
10541 (home-page "https://bitbucket.org/ecollins/cloud_sptheme")
10542 (synopsis "'Cloud' theme for Sphinx documenter")
10543 (description "This package contains the \"Cloud\" theme for Sphinx and some
10544related extensions.")
10545 (license license:bsd-3)))
10546
10547(define-public python2-sphinx-cloud-sptheme
10548 (package-with-python2 python-sphinx-cloud-sptheme))
10549
10550(define-public python-sphinx-alabaster-theme
10551 (package
10552 (name "python-sphinx-alabaster-theme")
10553 (version "0.7.12")
10554 (source (origin
10555 (method url-fetch)
10556 (uri (pypi-uri "alabaster" version))
10557 (sha256
10558 (base32
10559 "00nwwjj2d2ym4s2kk217x7jkx1hnczc3fvm8yxbqmsp6b0nxfqd6"))))
10560 (build-system python-build-system)
10561 (propagated-inputs
10562 `(("python-pygments" ,python-pygments)))
10563 (home-page "https://alabaster.readthedocs.io/")
10564 (synopsis "Configurable sidebar-enabled Sphinx theme")
10565 (description "Alabaster is a visually (c)lean, responsive, configurable
10566theme for the Sphinx documentation system. It's the default theme of Sphinx.")
10567 (license license:bsd-3)))
10568
10569(define-public python2-sphinx-alabaster-theme
10570 (package-with-python2 python-sphinx-alabaster-theme))
10571
10572(define-public python-setproctitle
10573(package
10574 (name "python-setproctitle")
10575 (version "1.1.10")
10576 (source
10577 (origin
10578 (method url-fetch)
10579 (uri (pypi-uri "setproctitle" version))
10580 (sha256
10581 (base32
10582 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
10583 (build-system python-build-system)
10584 (arguments
10585 '(#:phases
10586 (modify-phases %standard-phases
10587 (add-before 'check 'patch-Makefile
10588 ;; Stricly this is only required for the python2 variant.
10589 ;; But adding a phase in an inherited package seems to be
10590 ;; cumbersum. So we patch even for python3.
10591 (lambda _
10592 (let ((nose (assoc-ref %build-inputs "python2-nose")))
10593 (when nose
10594 (substitute* "Makefile"
10595 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
10596 (string-append nose "/bin/nosetests "))))
10597 #t)))
10598 (replace 'check
10599 (lambda _
10600 (setenv "PYTHON" (or (which "python3") (which "python")))
10601 (setenv "PYCONFIG" (or (which "python3-config")
10602 (which "python-config")))
10603 (setenv "CC" "gcc")
10604 ;; No need to extend PYTHONPATH to find the built package, since
10605 ;; the Makefile will build anyway
10606 (invoke "make" "check"))))))
10607 (native-inputs
10608 `(("procps" ,procps))) ; required for tests
10609 (home-page
10610 "https://github.com/dvarrazzo/py-setproctitle")
10611 (synopsis
10612 "Setproctitle implementation for Python to customize the process title")
10613 (description "The library allows a process to change its title (as displayed
10614by system tools such as ps and top).
10615
10616Changing the title is mostly useful in multi-process systems, for
10617example when a master process is forked: changing the children's title
10618allows to identify the task each process is busy with. The technique
10619is used by PostgreSQL and the OpenSSH Server for example.")
10620 (license license:bsd-3)
10621 (properties `((python2-variant . ,(delay python2-setproctitle))))))
10622
10623(define-public python2-setproctitle
10624 (let ((base (package-with-python2
10625 (strip-python2-variant python-setproctitle))))
10626 (package
10627 (inherit base)
10628 (native-inputs `(("python2-nose" ,python2-nose)
10629 ,@(package-native-inputs base))))))
10630
10631(define-public python-validictory
10632 (package
10633 (name "python-validictory")
10634 (version "1.0.1")
10635 (source
10636 (origin
10637 (method url-fetch)
10638 (uri (pypi-uri "validictory" version))
10639 (sha256
10640 (base32
10641 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
10642 (build-system python-build-system)
10643 (arguments
10644 '(#:phases
10645 (modify-phases %standard-phases
10646 (add-after 'unpack 'bootstrap
10647 ;; Move the tests out of the package directory to avoid
10648 ;; packaging them.
10649 (lambda* _
10650 (rename-file "validictory/tests" "tests")
10651 (delete-file "tests/__init__.py")))
10652 (replace 'check
10653 (lambda _
10654 ;; Extend PYTHONPATH so the built package will be found.
10655 (setenv "PYTHONPATH"
10656 (string-append (getcwd) "/build/lib:"
10657 (getenv "PYTHONPATH")))
6568bd5d 10658 (invoke "py.test" "-vv" ))))))
44d10b1f
RW
10659 (native-inputs
10660 `(("python-pytest" ,python-pytest)))
10661 (home-page
10662 "https://github.com/jamesturk/validictory")
10663 (synopsis "General purpose Python data validator")
10664 (description "It allows validation of arbitrary Python data structures.
10665
10666The schema format is based on the JSON Schema
10667proposal (http://json-schema.org), so combined with json the library is also
10668useful as a validator for JSON data.")
10669 (license license:expat)))
10670
10671(define-public python2-validictory
10672 (package-with-python2 python-validictory))
10673
10674(define-public python-pyelftools
10675 (package
10676 (name "python-pyelftools")
10677 (version "0.25")
10678 (source
10679 (origin
10680 (method url-fetch)
10681 (uri (pypi-uri "pyelftools" version))
10682 (sha256
10683 (base32
10684 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
10685 (build-system python-build-system)
10686 (arguments
10687 `(#:phases
10688 (modify-phases %standard-phases
10689 (add-before 'check 'set-pythonpath
10690 (lambda _
10691 (setenv "PYTHONPATH"
10692 (string-append
10693 (getcwd) "/test/"
10694 ":" (getenv "PYTHONPATH")))
10695 #t)))))
10696 (home-page
10697 "https://github.com/eliben/pyelftools")
10698 (synopsis
10699 "Analyze binary and library file information")
10700 (description "This Python library provides interfaces for parsing and
10701analyzing two binary and library file formats; the Executable and Linking
10702Format (ELF), and debugging information in the Debugging With Attributed
10703Record Format (DWARF).")
10704 (license license:public-domain)))
10705
10706(define-public python-pyev
10707 (package
10708 (name "python-pyev")
10709 (version "0.9.0")
10710 (source
10711 (origin
10712 (method url-fetch)
10713 (uri (pypi-uri "pyev" version))
10714 (sha256
10715 (base32
10716 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
10717 (build-system python-build-system)
10718 (arguments
10719 `(#:tests? #f ; no test suite
10720 #:phases
10721 (modify-phases %standard-phases
10722 (add-after 'unpack 'patch
10723 (lambda* (#:key inputs #:allow-other-keys)
10724 (let ((libev (string-append (assoc-ref inputs "libev")
10725 "/lib/libev.so.4")))
10726 (substitute* "setup.py"
10727 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
10728 (string-append "libev_dll_name = \"" libev "\"")))))))))
10729 (inputs
10730 `(("libev" ,libev)))
10731 (home-page "http://pythonhosted.org/pyev/")
10732 (synopsis "Python libev interface")
10733 (description "Pyev provides a Python interface to libev.")
10734 (license license:gpl3)))
10735
10736(define-public python2-pyev
10737 (package-with-python2 python-pyev))
10738
10739(define-public python-imagesize
10740 (package
10741 (name "python-imagesize")
10742 (version "1.1.0")
10743 (source
10744 (origin
10745 (method url-fetch)
10746 (uri (pypi-uri "imagesize" version))
10747 (sha256
10748 (base32
10749 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
10750 (build-system python-build-system)
10751 (home-page "https://github.com/shibukawa/imagesize_py")
10752 (synopsis "Gets image size of files in various formats in Python")
10753 (description
10754 "This package allows determination of image size from
10755PNG, JPEG, JPEG2000 and GIF files in pure Python.")
10756 (license license:expat)))
10757
10758(define-public python2-imagesize
10759 (package-with-python2 python-imagesize))
10760
10761(define-public python-termstyle
10762 (package
10763 (name "python-termstyle")
10764 (version "0.1.11")
10765 (source
10766 (origin
10767 (method url-fetch)
10768 (uri (pypi-uri "termstyle" version))
10769 (sha256
10770 (base32
10771 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
10772 (build-system python-build-system)
10773 (arguments
10774 '(#:phases
10775 (modify-phases %standard-phases
10776 (replace 'check
10777 (lambda _
831080a6 10778 (invoke "python" "test3.py"))))))
44d10b1f
RW
10779 (home-page "https://github.com/gfxmonk/termstyle")
10780 (synopsis "Console text coloring for Python")
10781 (description "This package provides console text coloring for Python.")
10782 (license license:bsd-3)))
10783
10784(define-public python-argcomplete
10785 (package
10786 (name "python-argcomplete")
10787 (version "1.7.0")
10788 (source
10789 (origin
10790 (method url-fetch)
10791 (uri (pypi-uri "argcomplete" version))
10792 (sha256
10793 (base32
10794 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
10795 (build-system python-build-system)
10796 (native-inputs
10797 `(("python-pexpect" ,python-pexpect)
10798 ("tcsh" ,tcsh)
10799 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
10800 (home-page "https://github.com/kislyuk/argcomplete")
10801 (synopsis "Shell tab completion for Python argparse")
10802 (description "argcomplete provides extensible command line tab completion
10803of arguments and options for Python scripts using @code{argparse}. It's
10804particularly useful for programs with many options or sub-parsers that can
10805dynamically suggest completions; for example, when browsing resources over the
10806network.")
10807 (license license:asl2.0)))
10808
10809(define-public python2-argcomplete
10810 (package-with-python2 python-argcomplete))
10811
10812(define-public python-xopen
10813 (package
10814 (name "python-xopen")
10815 (version "0.3.3")
10816 (source
10817 (origin
10818 (method url-fetch)
10819 (uri (pypi-uri "xopen" version))
10820 (sha256
10821 (base32
10822 "1a0wbil552wsmklwd89ssmgz3pjd86qa9i7jh8wqb9wslc8a2qjr"))
10823 (file-name (string-append name "-" version ".tar.gz"))))
10824 (build-system python-build-system)
10825 (home-page "https://github.com/marcelm/xopen/")
10826 (synopsis "Open compressed files transparently")
10827 (description "This module provides an @code{xopen} function that works like
10828Python's built-in @code{open} function, but can also deal with compressed files.
10829Supported compression formats are gzip, bzip2 and, xz, and are automatically
10830recognized by their file extensions. The focus is on being as efficient as
10831possible on all supported Python versions.")
10832 (license license:expat)))
10833
10834(define-public python2-xopen
10835 (let ((base (package-with-python2
10836 (strip-python2-variant python-xopen))))
10837 (package
10838 (inherit base)
10839 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
10840 ,@(package-propagated-inputs base))))))
10841
10842(define-public python-cheetah
10843 (package
10844 (name "python-cheetah")
10845 (version "3.1.0")
10846 (source
10847 (origin
10848 (method url-fetch)
10849 (uri (pypi-uri "Cheetah3" version))
10850 (sha256
10851 (base32
10852 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
10853 (build-system python-build-system)
10854 (arguments
10855 `(#:modules ((guix build utils)
10856 (guix build python-build-system)
10857 (ice-9 ftw)
10858 (srfi srfi-1)
10859 (srfi srfi-26))
10860 #:phases (modify-phases %standard-phases
10861 (add-after 'unpack 'use-absolute-python
10862 (lambda _
10863 (substitute* "Cheetah/CheetahWrapper.py"
10864 (("#!/usr/bin/env python")
10865 (string-append "#!" (which "python"))))
10866 #t))
10867 (replace 'check
10868 (lambda _
10869 (let ((cwd (getcwd)))
10870 (setenv "PYTHONPATH"
10871 (string-append
10872 cwd "/build/"
10873 (find (cut string-prefix? "lib" <>)
10874 (scandir (string-append cwd "/build")))
10875 ":" (getenv "PYTHONPATH")))
10876 (setenv "PATH"
10877 (string-append (getenv "PATH")
10878 ":" cwd "/bin"))
10879 (setenv "TMPDIR" "/tmp")
10880
10881 (substitute* "Cheetah/Tests/Test.py"
10882 (("unittest.TextTestRunner\\(\\)")
10883 "unittest.TextTestRunner(verbosity=2)"))
10884
10885 (invoke "python" "Cheetah/Tests/Test.py")))))))
10886 (propagated-inputs
10887 `(("python-markdown" ,python-markdown))) ;optional
10888 (home-page "http://cheetahtemplate.org/")
10889 (synopsis "Template engine")
10890 (description "Cheetah is a text-based template engine and Python code
10891generator.
10892
10893Cheetah can be used as a standalone templating utility or referenced as
10894a library from other Python applications. It has many potential uses,
10895but web developers looking for a viable alternative to ASP, JSP, PHP and
10896PSP are expected to be its principle user group.
10897
10898Features:
10899@enumerate
10900@item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
10901 text-based format.
10902@item Cleanly separates content, graphic design, and program code.
10903@item Blends the power and flexibility of Python with a simple template language
10904 that non-programmers can understand.
10905@item Gives template writers full access to any Python data structure, module,
10906 function, object, or method in their templates.
10907@item Makes code reuse easy by providing an object-orientated interface to
10908 templates that is accessible from Python code or other Cheetah templates.
10909 One template can subclass another and selectively reimplement sections of it.
10910@item Provides a simple, yet powerful, caching mechanism that can dramatically
10911 improve the performance of a dynamic website.
10912@item Compiles templates into optimized, yet readable, Python code.
10913@end enumerate")
10914 (license (license:x11-style "file://LICENSE"))))
10915
10916(define-public python2-cheetah
10917 (package-with-python2 python-cheetah))
10918
10919(define-public python-dulwich
10920 (package
10921 (name "python-dulwich")
10922 (version "0.18.6")
10923 (source
10924 (origin
10925 (method url-fetch)
10926 (uri (list (string-append "https://www.dulwich.io/releases/"
10927 "dulwich-" version ".tar.gz")
10928 (pypi-uri "dulwich" version)))
10929 (sha256
10930 (base32
10931 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
10932 (build-system python-build-system)
10933 (arguments
10934 `(#:phases
10935 (modify-phases %standard-phases
10936 (add-before 'check 'fix-tests
10937 (lambda* (#:key inputs #:allow-other-keys)
10938 ;; The tests use Popen with a custom environment which doesn't
10939 ;; include PATH.
10940 (substitute* "dulwich/tests/compat/utils.py"
10941 (("'git'") (string-append "'"
10942 (which "git")
10943 "'")))
10944 (substitute* '("dulwich/tests/test_repository.py"
10945 "dulwich/tests/test_hooks.py")
10946 (("#!/bin/sh") (string-append "#!" (which "sh"))))
10947 (setenv "TEST_RUNNER" "unittest")
10948 (setenv "PYTHONHASHSEED" "random")
10949 #t)))))
10950 (propagated-inputs
10951 `(("python-fastimport" ,python-fastimport)))
10952 (native-inputs
10953 `(("python-mock" ,python-mock)
10954 ("python-geventhttpclient" ,python-geventhttpclient)
10955 ("git" ,git)))
10956 (home-page "https://www.dulwich.io/")
10957 (synopsis "Git implementation in Python")
10958 (description "Dulwich is an implementation of the Git file formats and
10959protocols written in pure Python.")
10960 ;; Can be used with either license.
10961 (license (list license:asl2.0 license:gpl2+))))
10962
10963(define-public python2-dulwich
10964 (package-with-python2 python-dulwich))
10965
10966(define-public python-pbkdf2
10967 (package
10968 (name "python-pbkdf2")
10969 (version "1.3")
10970 (source
10971 (origin
10972 (method url-fetch)
10973 (uri (pypi-uri "pbkdf2" version))
10974 (sha256
10975 (base32
10976 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
10977 (build-system python-build-system)
10978 (arguments
10979 '(#:phases
10980 (modify-phases %standard-phases
10981 (replace 'check
10982 (lambda _
10983 (setenv "PYTHONPATH"
10984 (string-append (getcwd) "/build/lib:"
10985 (getenv "PYTHONPATH")))
ee2bb944 10986 (invoke "python" "test/test_pbkdf2.py"))))))
44d10b1f
RW
10987 (propagated-inputs
10988 `(("python-pycrypto" ,python-pycrypto))) ; optional
10989 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
10990 (synopsis "Password-based key derivation")
10991 (description "This module implements the password-based key derivation
10992function, PBKDF2, specified in RSA PKCS#5 v2.0.
10993
10994PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
10995is part of the RSA Public Key Cryptography Standards series. The provided
10996implementation takes a password or a passphrase and a salt value (and
10997optionally a iteration count, a digest module, and a MAC module) and provides
10998a file-like object from which an arbitrarly-sized key can be read.")
10999 (license license:expat)))
11000
11001(define-public python2-pbkdf2
11002 (package-with-python2 python-pbkdf2))
11003
11004(define-public python-qrcode
11005 (package
11006 (name "python-qrcode")
217ea1a1 11007 (version "6.1")
44d10b1f
RW
11008 (source
11009 (origin
11010 (method url-fetch)
11011 (uri (pypi-uri "qrcode" version))
11012 (sha256
217ea1a1 11013 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
44d10b1f
RW
11014 (build-system python-build-system)
11015 (arguments
11016 ;; FIXME: Tests require packaging 'pymaging'.
11017 '(#:tests? #f))
11018 (propagated-inputs
11019 `(("python-lxml" ,python-lxml) ; for SVG output
11020 ("python-pillow" ,python-pillow) ; for PNG output
11021 ("python-six" ,python-six)))
44d10b1f
RW
11022 (home-page "https://github.com/lincolnloop/python-qrcode")
11023 (synopsis "QR Code image generator")
11024 (description "This package provides a pure Python QR Code generator
11025module. It uses the Python Imaging Library (PIL) to allow for the generation
11026of QR Codes.
11027
11028In addition this package provides a command line tool to generate QR codes and
11029either write these QR codes to a file or do the output as ascii art at the
11030console.")
11031 (license license:bsd-3)))
11032
11033(define-public python2-qrcode
11034 (package-with-python2 python-qrcode))
11035
11036(define-public python-rst2ansi
11037 (package
11038 (name "python-rst2ansi")
11039 (version "0.1.5")
11040 (source
11041 (origin
11042 (method url-fetch)
11043 (uri (pypi-uri "rst2ansi" version))
11044 (sha256
11045 (base32
11046 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
11047 (build-system python-build-system)
11048 (propagated-inputs
11049 `(("python-docutils" ,python-docutils)))
11050 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
11051 (synopsis "Convert RST to ANSI-decorated console output")
11052 (description
11053 "Python module dedicated to rendering RST (reStructuredText) documents
11054to ansi-escaped strings suitable for display in a terminal.")
11055 (license license:expat)))
11056
11057(define-public python-ansi2html
11058 (package
11059 (name "python-ansi2html")
11060 (version "1.2.0")
11061 (source
11062 (origin
11063 (method url-fetch)
11064 (uri (pypi-uri "ansi2html" version))
11065 (sha256
11066 (base32
11067 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
11068 (build-system python-build-system)
11069 (native-inputs
11070 `(("python-mock" ,python-mock)
11071 ("python-nose" ,python-nose)))
11072 (propagated-inputs
11073 `(("python-six" ,python-six)))
11074 (home-page "https://github.com/ralphbean/ansi2html")
11075 (synopsis "Convert ANSI-decorated console output to HTML")
11076 (description
11077 "@command{ansi2html} is a Python library and command line utility for
11078convering text with ANSI color codes to HTML or LaTeX.")
11079 (license license:gpl3+)))
11080
11081(define-public python2-ansi2html
11082 (package-with-python2 python-ansi2html))
11083
11084(define-public python-ddt
11085 (package
11086 (name "python-ddt")
11087 (version "1.1.3")
11088 (source
11089 (origin
11090 (method url-fetch)
11091 (uri (pypi-uri "ddt" version))
11092 (sha256
11093 (base32
11094 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
11095 (build-system python-build-system)
11096 (native-inputs
11097 `(("python-mock" ,python-mock)
11098 ("python-nose" ,python-nose)))
11099 (propagated-inputs
11100 `(("python-six" ,python-six)
11101 ("python-pyyaml" ,python-pyyaml)))
11102 (home-page "https://github.com/txels/ddt")
11103 (synopsis "Data-Driven Tests")
11104 (description
11105 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
11106running it with different test data, and make it appear as multiple test
11107cases.")
11108 (license license:expat)))
11109
11110(define-public python2-ddt
11111 (package-with-python2 python-ddt))
11112
11113(define-public python-pycountry
11114 (package
11115 (name "python-pycountry")
11116 (version "18.5.26")
11117 (source
11118 (origin
11119 (method url-fetch)
11120 (uri (pypi-uri "pycountry" version))
11121 (sha256
11122 (base32
11123 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
11124 (build-system python-build-system)
11125 (home-page "https://bitbucket.org/flyingcircus/pycountry")
11126 (synopsis "ISO databases for languages, countries, currencies, etc.")
11127 (description
11128 "@code{pycountry} provides the ISO databases for the standards:
11129@enumerate
11130@item 639-3 (Languages)
11131@item 3166 (Countries)
11132@item 3166-3 (Deleted Countries)
11133@item 3166-2 (Subdivisions of countries)
11134@item 4217 (Currencies)
11135@item 15924 (Scripts)
11136@end enumerate
11137It includes a copy from Debian’s pkg-isocodes and makes the data accessible
11138through a Python API.")
11139 (license license:lgpl2.1+)))
11140
11141(define-public python2-pycountry
11142 (package-with-python2 python-pycountry))
11143
11144(define-public python-pycosat
11145 (package
11146 (name "python-pycosat")
11147 (version "0.6.1")
11148 (source
11149 (origin
11150 (method url-fetch)
11151 (uri (pypi-uri "pycosat" version))
11152 (sha256
11153 (base32
11154 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
11155 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
11156 (build-system python-build-system)
11157 (home-page "https://github.com/ContinuumIO/pycosat")
11158 (synopsis "Bindings to picosat (a SAT solver)")
11159 (description
11160 "This package provides efficient Python bindings to @code{picosat} on
11161the C level. When importing pycosat, the @code{picosat} solver becomes part
11162of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
11163Problem} (SAT) solver.")
11164 (license license:expat)))
11165
11166(define-public python2-pycosat
11167 (package-with-python2 python-pycosat))
11168
11169(define-public python2-ruamel.ordereddict
11170 (package
11171 (name "python2-ruamel.ordereddict")
11172 (version "0.4.9")
11173 (source
11174 (origin
11175 (method url-fetch)
11176 (uri (pypi-uri "ruamel.ordereddict" version))
11177 (sha256
11178 (base32
11179 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
11180 (build-system python-build-system)
11181 (arguments
11182 `(#:python ,python-2
11183 #:phases
11184 (modify-phases %standard-phases
11185 (delete 'check)
11186 (add-after 'install 'check
11187 (lambda* (#:key inputs outputs #:allow-other-keys)
11188 (add-installed-pythonpath inputs outputs)
f987ac30 11189 (invoke "python" "test/testordereddict.py"))))))
44d10b1f
RW
11190 (home-page "https://bitbucket.org/ruamel/ordereddict")
11191 (synopsis "Version of dict that keeps keys in insertion order")
11192 (description
11193 "This is an implementation of an ordered dictionary with @dfn{Key
11194Insertion Order} (KIO: updates of values do not affect the position of the
11195key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
11196removed and put at the back). The standard library module @code{OrderedDict},
11197implemented later, implements a subset of @code{ordereddict} functionality.
11198Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
11199Order} (KSO, no sorting function can be specified, but a transform can be
11200specified to apply on the key before comparison (e.g. @code{string.lower})).")
11201 (license license:expat)))
11202
11203(define-public python-pypeg2
11204 (package
11205 (name "python-pypeg2")
11206 (version "2.15.2")
11207 (source
11208 (origin
11209 (method url-fetch)
11210 (uri (pypi-uri "pyPEG2" version))
11211 (sha256
11212 (base32
11213 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
11214 (build-system python-build-system)
11215 (propagated-inputs `(("python-lxml" ,python-lxml)))
11216 (arguments
11217 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
11218 '(#:tests? #f))
11219 (home-page "https://fdik.org/pyPEG/")
11220 (synopsis "Parsering Expression Grammars in Python")
11221 (description "PyPEG is an intrinsic parser interpreter framework for
11222Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
11223parse many formal languages.")
11224 (license license:gpl2)))
11225
11226(define-public python-incremental
11227 (package
11228 (name "python-incremental")
11229 (version "17.5.0")
11230 (source
11231 (origin
11232 (method url-fetch)
11233 (uri (pypi-uri "incremental" version))
11234 (sha256
11235 (base32
11236 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
11237 (build-system python-build-system)
11238 (home-page "https://github.com/hawkowl/incremental")
11239 (synopsis "Library for versioning Python projects")
11240 (description "Incremental is a small library that versions your Python
11241projects.")
11242 (license license:expat)))
11243
11244(define-public python2-incremental
11245 (package-with-python2 python-incremental))
11246
11247(define-public python-invoke
11248 (package
11249 (name "python-invoke")
11250 (home-page "http://www.pyinvoke.org/")
11251 (version "1.1.0")
11252 (source (origin
11253 (method url-fetch)
11254 (uri (pypi-uri "invoke" version))
11255 (sha256
11256 (base32
11257 "0aiy1xvk1f91246zxd1zqrm679vdvd10h843a2na41cqr3cflpi6"))))
11258 (build-system python-build-system)
11259 (arguments
11260 ;; XXX: Requires many dependencies that are not yet in Guix.
11261 `(#:tests? #f))
11262 (synopsis "Pythonic task execution")
11263 (description
11264 "Invoke is a Python task execution tool and library, drawing inspiration
11265from various sources to arrive at a powerful and clean feature set. It is
11266evolved from the Fabric project, but focuses on local and abstract concerns
11267instead of servers and network commands.")
11268 (license license:bsd-3)))
11269
11270(define-public python2-invoke
11271 (package-with-python2 python-invoke))
11272
11273(define-public python-automat
11274 (package
11275 (name "python-automat")
11276 (version "0.6.0")
11277 (source (origin
11278 (method url-fetch)
11279 (uri (pypi-uri "Automat" version))
11280 (sha256
11281 (base32
11282 "1a7nsrljysfmdqmpn2apfa1gg6rfah4y9sizvns8gb08rx7d07rw"))))
11283 (build-system python-build-system)
11284 ;; We disable the tests because they require python-twisted, while
11285 ;; python-twisted depends on python-automat. Twisted is optional, but the
11286 ;; tests fail if it is not available. Also see
11287 ;; <https://github.com/glyph/automat/issues/71>.
11288 (arguments '(#:tests? #f))
11289 (native-inputs
11290 `(("python-m2r" ,python-m2r)
11291 ("python-setuptools-scm" ,python-setuptools-scm)
11292 ("python-graphviz" ,python-graphviz)))
11293 (propagated-inputs
11294 `(("python-six" ,python-six)
11295 ("python-attrs" ,python-attrs)))
11296 (home-page "https://github.com/glyph/Automat")
11297 (synopsis "Self-service finite-state machines")
11298 (description "Automat is a library for concise, idiomatic Python
11299expression of finite-state automata (particularly deterministic finite-state
11300transducers).")
11301 (license license:expat)))
11302
11303(define-public python2-automat
11304 (package-with-python2 python-automat))
11305
11306(define-public python-m2r
11307 (package
11308 (name "python-m2r")
11309 (version "0.1.12")
11310 (source (origin
11311 (method url-fetch)
11312 (uri (pypi-uri "m2r" version))
11313 (sha256
11314 (base32
11315 "1axrwnf425sz4qz3c0qc7yhhki4myzb8rki7pczcsgzznzmqdyxd"))))
11316 (build-system python-build-system)
11317 (propagated-inputs
11318 `(("python-docutils" ,python-docutils)
11319 ("python-mistune" ,python-mistune)))
11320 (native-inputs
11321 `(("python-pygments" ,python-pygments)
11322 ("python-mock" ,python-mock)))
11323 (home-page "https://github.com/miyakogi/m2r")
11324 (synopsis "Markdown to reStructuredText converter")
11325 (description "M2R converts a markdown file including reST markups to valid
11326reST format.")
11327 (license license:expat)))
11328
11329(define-public python2-m2r
11330 (package-with-python2 python-m2r))
11331
11332(define-public python-constantly
11333 (package
11334 (name "python-constantly")
11335 (version "15.1.0")
11336 (source (origin
11337 (method url-fetch)
11338 (uri (pypi-uri "constantly" version))
11339 (sha256
11340 (base32
11341 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
11342 (build-system python-build-system)
11343 (home-page "https://github.com/twisted/constantly")
11344 (synopsis "Symbolic constants in Python")
11345 (description "Constantly is a Python library that provides symbolic
11346constant support. It includes collections and constants with text, numeric,
11347and bit flag values.")
11348 (license license:expat)))
11349
11350(define-public python2-constantly
11351 (package-with-python2 python-constantly))
11352
11353(define-public python-attrs
11354 (package
11355 (name "python-attrs")
11356 (version "18.2.0")
11357 (source (origin
11358 (method url-fetch)
11359 (uri (pypi-uri "attrs" version))
11360 (sha256
11361 (base32
11362 "0s9ydh058wmmf5v391pym877x4ahxg45dw6a0w4c7s5wgpigdjqh"))))
11363 (build-system python-build-system)
11364 (arguments
11365 `(#:modules ((guix build utils)
11366 (guix build python-build-system)
11367 (ice-9 ftw)
11368 (srfi srfi-1)
11369 (srfi srfi-26))
11370 #:phases (modify-phases %standard-phases
11371 (replace 'check
11372 (lambda _
11373 (let ((cwd (getcwd)))
11374 (setenv "PYTHONPATH"
11375 (string-append
11376 cwd "/build/"
11377 (find (cut string-prefix? "lib" <>)
11378 (scandir (string-append cwd "/build")))
11379 ":"
11380 (getenv "PYTHONPATH")))
11381 (invoke "python" "-m" "pytest")))))))
11382 (native-inputs
11383 `(("python-coverage" ,python-coverage)
11384 ("python-hypothesis" ,python-hypothesis)
11385 ("python-pympler" ,python-pympler)
11386 ("python-pytest" ,python-pytest)
11387 ("python-six" ,python-six)
11388 ("python-sphinx" ,python-sphinx)
11389 ("python-zope-interface" ,python-zope-interface)))
11390 (home-page "https://github.com/python-attrs/attrs/")
11391 (synopsis "Attributes without boilerplate")
11392 (description "@code{attrs} is a Python package with class decorators that
11393ease the chores of implementing the most common attribute-related object
11394protocols.")
11395 (license license:expat)))
11396
11397(define-public python2-attrs
11398 (package-with-python2 python-attrs))
11399
11400(define-public python-attrs-bootstrap
11401 (package
11402 (inherit python-attrs)
11403 (name "python-attrs-bootstrap")
11404 ;; Keep this on a fixed version so python-attrs can be updated without
11405 ;; triggering a mass-rebuild. FIXME: Update this in the next rebuild cycle.
11406 (version "17.4.0")
11407 (source (origin
11408 (method url-fetch)
11409 (uri (pypi-uri "attrs" version))
11410 (sha256
11411 (base32
11412 "1jafnn1kzd6qhxgprhx6y6ik1r5m2rilx25syzcmq03azp660y8w"))))
11413 (native-inputs `())
11414 (arguments `(#:tests? #f))))
11415
11416(define-public python2-attrs-bootstrap
11417 (package-with-python2 python-attrs-bootstrap))
11418
11419(define-public python2-cliapp
11420 (package
11421 (name "python2-cliapp")
9064b84e 11422 (version "1.20180812.1")
44d10b1f
RW
11423 (source
11424 (origin
11425 (method url-fetch)
11426 (uri (string-append
11427 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
11428 version ".tar.gz"))
11429 (sha256
11430 (base32
9064b84e 11431 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
44d10b1f
RW
11432 (build-system python-build-system)
11433 (arguments
11434 `(#:python ,python-2
11435 #:phases
11436 (modify-phases %standard-phases
11437 ;; check phase needs to be run before the build phase. If not,
11438 ;; coverage-test-runner looks for tests for the built source files,
11439 ;; and fails.
11440 (delete 'check)
11441 (add-before 'build 'check
11442 (lambda _
11443 ;; Disable python3 tests
11444 (substitute* "check"
11445 (("python3") "# python3"))
6c826d32 11446 (invoke "./check"))))))
44d10b1f
RW
11447 (native-inputs
11448 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
11449 ("python2-pep8" ,python2-pep8)))
11450 (propagated-inputs
11451 `(("python2-pyaml" ,python2-pyaml)))
11452 (home-page "https://liw.fi/cliapp/")
11453 (synopsis "Python framework for command line programs")
11454 (description "@code{python2-cliapp} is a python framework for
11455command line programs. It contains the typical stuff such programs
11456need to do, such as parsing the command line for options, and
11457iterating over input files.")
11458 (license license:gpl2+)))
11459
11460(define-public python2-ttystatus
11461 (package
11462 (name "python2-ttystatus")
e516a9c2 11463 (version "0.36")
44d10b1f
RW
11464 (source
11465 (origin
11466 (method url-fetch)
11467 (uri (string-append
11468 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
11469 version ".tar.gz"))
11470 (sha256
11471 (base32
e516a9c2 11472 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
44d10b1f
RW
11473 (build-system python-build-system)
11474 (native-inputs
11475 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
11476 ("python2-pep8" ,python2-pep8)))
11477 (arguments
11478 `(#:python ,python-2
11479 #:phases
11480 (modify-phases %standard-phases
11481 ;; check phase needs to be run before the build phase. If not,
11482 ;; coverage-test-runner looks for tests for the built source files,
11483 ;; and fails.
11484 (delete 'check)
11485 (add-before 'build 'check
cbeee881 11486 (lambda _ (invoke "make" "check"))))))
44d10b1f
RW
11487 (home-page "https://liw.fi/ttystatus/")
11488 (synopsis "Python library for showing progress reporting and
11489status updates on terminals")
11490 (description "@code{python2-ttystatus} is a python library for
11491showing progress reporting and status updates on terminals, for
11492command line programs. Output is automatically adapted to the width
11493of the terminal: truncated if it does not fit, and resized if the
11494terminal size changes.")
11495 (license license:gpl3+)))
11496
11497(define-public python2-tracing
11498 (package
11499 (name "python2-tracing")
11500 (version "0.10")
11501 (source
11502 (origin
11503 (method url-fetch)
11504 (uri (string-append
11505 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
11506 version ".tar.gz"))
11507 (sha256
11508 (base32
11509 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
11510 (build-system python-build-system)
11511 (arguments
11512 `(#:python ,python-2))
11513 (home-page "https://liw.fi/tracing/")
11514 (synopsis "Python debug logging helper")
11515 (description "@code{python2-tracing} is a python library for
11516logging debug messages. It provides a way to turn debugging messages
11517on and off, based on the filename they occur in. It is much faster
11518than using @code{logging.Filter} to accomplish the same thing, which
11519matters when code is run in production mode. The actual logging still
11520happens using the @code{logging} library.")
11521 (license license:gpl3+)))
11522
11523(define-public python2-larch
11524 (package
11525 (name "python2-larch")
11526 (version "1.20151025")
11527 (source
11528 (origin
11529 (method url-fetch)
11530 (uri (string-append
11531 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
11532 version ".tar.gz"))
11533 (patches (search-patches
11534 "python2-larch-coverage-4.0a6-compatibility.patch"))
11535 (sha256
11536 (base32
11537 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
11538 (build-system python-build-system)
11539 (arguments
11540 `(#:python ,python-2
11541 #:phases
11542 (modify-phases %standard-phases
11543 ;; check phase needs to be run before the build phase. If not,
11544 ;; coverage-test-runner looks for tests for the built source files,
11545 ;; and fails.
11546 (delete 'check)
11547 (add-before 'build 'check
204ad455 11548 (lambda _ (invoke "make" "check"))))))
44d10b1f
RW
11549 (native-inputs
11550 `(("cmdtest" ,cmdtest)
11551 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
11552 (propagated-inputs
11553 `(("python2-tracing" ,python2-tracing)))
11554 (home-page "https://liw.fi/larch/")
11555 (synopsis "Python copy-on-write B-tree library")
11556 (description "@code{python2-larch} is an implementation of
11557particular kind of B-tree, based on research by Ohad Rodeh. See
11558@url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
11559on the data structure.
11560
11561The distinctive feature of this B-tree is that a node is never
11562(conceptually) modified. Instead, all updates are done by
11563copy-on-write. This makes it easy to clone a tree, and modify only the
11564clone, while other processes access the original tree.")
11565 (license license:gpl3+)))
11566
11567(define-public python-astroid
11568 (package
11569 (name "python-astroid")
11570 (version "2.1.0")
11571 (source
11572 (origin
11573 (method url-fetch)
11574 (uri (pypi-uri "astroid" version))
11575 (sha256
11576 (base32
11577 "08hz675knh4294bancdapql392fmbjyimhbyrmfkz1ka7l035c1m"))))
11578 (build-system python-build-system)
11579 (propagated-inputs
11580 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
11581 ("python-six" ,python-six)
11582 ("python-wrapt" ,python-wrapt)))
11583 (native-inputs
11584 `(("python-dateutil" ,python-dateutil)
11585 ("python-nose" ,python-nose)
11586 ("python-pytest" ,python-pytest)
11587 ("python-pytest-runner" ,python-pytest-runner)))
11588 (arguments
11589 `(#:phases
11590 (modify-phases %standard-phases
11591 (add-after 'unpack 'remove-spurious-test
11592 (lambda _
11593 ;; This can be removed after upgrading from python-3.7
11594 ;; https://github.com/PyCQA/astroid/issues/593
11595 ;; https://bugs.python.org/issue34056
11596 (delete-file "astroid/tests/unittest_modutils.py")
11597 #t))
11598 (replace 'check
11599 (lambda _
11600 (invoke "pytest" "astroid"))))))
11601 (home-page "https://github.com/PyCQA/astroid")
11602 (synopsis "Common base representation of python source code for pylint and
11603other projects")
11604 (description "@code{python-astroid} provides a common base representation
11605of python source code for projects such as pychecker, pyreverse, pylint, etc.
11606
11607It provides a compatible representation which comes from the _ast module. It
11608rebuilds the tree generated by the builtin _ast module by recursively walking
11609down the AST and building an extended ast. The new node classes have
11610additional methods and attributes for different usages. They include some
11611support for static inference and local name scopes. Furthermore, astroid
11612builds partial trees by inspecting living objects.")
11613 (license license:lgpl2.1+)
11614 (properties `((python2-variant . ,(delay python2-astroid))))))
11615
11616(define-public python2-astroid
11617 (let ((base (package-with-python2
11618 (strip-python2-variant python-astroid))))
11619 (package (inherit base)
11620 ;; Version 2.x removes python2 support.
11621 (version "1.6.5")
11622 (source
11623 (origin
11624 (method url-fetch)
11625 (uri (pypi-uri "astroid" version))
11626 (sha256
11627 (base32
11628 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
11629 (arguments
11630 (substitute-keyword-arguments (package-arguments base)
11631 ((#:phases phases)
11632 `(modify-phases ,phases
11633 (add-after 'unpack 'remove-spurious-test
11634 (lambda _
11635 ;; https://github.com/PyCQA/astroid/issues/276
11636 (delete-file "astroid/tests/unittest_brain.py")
11637 #t))
11638 (replace 'check
11639 (lambda _
11640 (invoke"python" "-m" "unittest" "discover"
11641 "-p" "unittest*.py")))))))
11642 (native-inputs `())
11643 (propagated-inputs
11644 `(("python2-backports-functools-lru-cache"
11645 ,python2-backports-functools-lru-cache)
11646 ("python2-enum34" ,python2-enum34)
11647 ("python2-singledispatch" ,python2-singledispatch)
11648 ,@(package-propagated-inputs base))))))
11649
11650(define-public python-isort
11651 (package
11652 (name "python-isort")
e2227b6a 11653 (version "4.3.4")
44d10b1f
RW
11654 (source
11655 (origin
e2227b6a
EF
11656 (method git-fetch)
11657 (uri (git-reference
11658 ;; Tests pass only from the Github sources
11659 (url "https://github.com/timothycrosley/isort")
11660 (commit version)))
11661 (file-name (git-file-name name version))
44d10b1f
RW
11662 (sha256
11663 (base32
e2227b6a 11664 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
44d10b1f
RW
11665 (build-system python-build-system)
11666 (native-inputs
11667 `(("python-mock" ,python-mock)
11668 ("python-pytest" ,python-pytest)))
11669 (home-page "https://github.com/timothycrosley/isort")
11670 (synopsis "Python utility/library to sort python imports")
11671 (description "@code{python-isort} is a python utility/library to sort
11672imports alphabetically, and automatically separated into sections. It
11673provides a command line utility, a python library and plugins for various
11674editors.")
e2227b6a
EF
11675 (license license:expat)
11676 (properties `((python2-variant . ,(delay python2-isort))))))
44d10b1f
RW
11677
11678(define-public python2-isort
e2227b6a
EF
11679 (let ((base (package-with-python2
11680 (strip-python2-variant python-isort))))
11681 (package (inherit base)
11682 (native-inputs
11683 `(("python2-futures" ,python2-futures)
11684 ,@(package-native-inputs base))))))
44d10b1f
RW
11685
11686(define-public python2-backports-functools-lru-cache
11687 (package
11688 (name "python2-backports-functools-lru-cache")
11689 (version "1.5")
11690 (source
11691 (origin
11692 (method url-fetch)
11693 ;; only the pypi tarballs contain the necessary metadata
11694 (uri (pypi-uri "backports.functools_lru_cache" version))
11695 (sha256
11696 (base32
11697 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
11698 (build-system python-build-system)
11699 (native-inputs
11700 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
11701 (arguments
11702 `(#:python ,python-2))
11703 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
11704 (synopsis "Backport of functools.lru_cache from Python 3.3")
11705 (description "@code{python2-backports-functools-lru-cache} is a backport
11706of @code{functools.lru_cache} from python 3.3.")
11707 (license license:expat)))
11708
11709(define-public python-configparser
11710 (package
11711 (name "python-configparser")
11712 (version "3.5.0")
11713 (source
11714 (origin
11715 (method url-fetch)
11716 (uri (string-append
11717 "https://bitbucket.org/ambv/configparser/get/"
11718 version ".tar.bz2"))
11719 (file-name (string-append name "-" version ".tar.gz"))
11720 (sha256
11721 (base32
11722 "0waq40as14abwzbb321hfz4vr1fi363nscy32ga14qvfygrg96wa"))))
11723 (build-system python-build-system)
809f003f 11724 (home-page "https://github.com/jaraco/configparser/")
44d10b1f
RW
11725 (synopsis "Backport of configparser from python 3.5")
11726 (description "@code{python-configparser} is a backport of
11727@code{configparser} from Python 3.5 so that it can be used directly
11728in other versions.")
11729 (license license:expat)))
11730
11731(define-public python2-configparser
11732 (package-with-python2 python-configparser))
11733
11734(define-public python-mando
11735 (package
11736 (name "python-mando")
11737 (version "0.6.4")
11738 (source (origin
11739 (method url-fetch)
11740 (uri (pypi-uri "mando" version))
11741 (sha256
11742 (base32
11743 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
11744 (build-system python-build-system)
11745 (propagated-inputs
11746 `(("python-rst2ansi" ,python-rst2ansi)
11747 ("python-six" ,python-six)))
11748 (native-inputs
11749 `(("python-pytest" ,python-pytest)))
11750 (home-page "https://mando.readthedocs.org/")
11751 (synopsis
11752 "Wrapper around argparse, allowing creation of complete CLI applications")
11753 (description
11754 "This package is a wrapper around argparse, allowing you to write complete CLI
11755applications in seconds while maintaining all the flexibility.")
11756 (license license:expat)))
11757
11758(define-public python2-mando
11759 (package-with-python2 python-mando))
11760
70daf82f
RW
11761(define-public python2-argparse
11762 (package
11763 (name "python2-argparse")
11764 (version "1.4.0")
11765 (source
11766 (origin
11767 (method url-fetch)
11768 (uri (pypi-uri "argparse" version))
11769 (sha256
11770 (base32
11771 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
11772 (build-system python-build-system)
11773 (arguments
11774 `(#:python ,python-2))
11775 (home-page "https://github.com/ThomasWaldmann/argparse/")
11776 (synopsis "Python command-line parsing library")
11777 (description
11778 "This package is mostly for people who want to have @code{argparse} on
11779older Pythons because it was not part of the standard library back then.")
11780 (license license:psfl)))
11781
44d10b1f
RW
11782(define-public python-fudge
11783 (package
11784 (name "python-fudge")
11785 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
11786 ;; package, which is currently the only use of this package.
11787 (version "0.9.6")
11788 (source
11789 (origin
11790 (method url-fetch)
11791 (uri (pypi-uri "fudge" version))
11792 (sha256
11793 (base32
11794 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
11795 (build-system python-build-system)
11796 (arguments
11797 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
11798 (home-page "https://github.com/fudge-py/fudge")
11799 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
11800 (description
11801 "Fudge is a Python module for using fake objects (mocks and stubs) to
11802test real ones.
11803
11804In readable Python code, you declare the methods available on your fake object
11805and how they should be called. Then you inject that into your application and
11806start testing. This declarative approach means you don’t have to record and
11807playback actions and you don’t have to inspect your fakes after running code.
11808If the fake object was used incorrectly then you’ll see an informative
11809exception message with a traceback that points to the culprit.")
11810 (license license:expat)))
11811
11812(define-public python2-fudge
11813 (package-with-python2 python-fudge))
11814
11815(define-public python-mwclient
11816 (package
11817 (name "python-mwclient")
11818 (version "0.8.4")
11819 (source
11820 (origin
11821 (method url-fetch)
11822 ;; The PyPI version wouldn't contain tests.
11823 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
11824 "v" version ".tar.gz"))
11825 (file-name (string-append name "-" version ".tar.gz"))
11826 (sha256
11827 (base32
11828 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
11829 (build-system python-build-system)
11830 (propagated-inputs
11831 `(("python-requests" ,python-requests)
11832 ("python-requests-oauthlib"
11833 ,python-requests-oauthlib)
11834 ("python-six" ,python-six)))
11835 (native-inputs
11836 `(("python-mock" ,python-mock)
11837 ("python-pytest" ,python-pytest)
11838 ("python-pytest-pep8" ,python-pytest-pep8)
11839 ("python-pytest-cache" ,python-pytest-cache)
11840 ("python-pytest-cov" ,python-pytest-cov)
11841 ("python-responses" ,python-responses)))
11842 (home-page "https://github.com/btongminh/mwclient")
11843 (synopsis "MediaWiki API client")
11844 (description "This package provides a MediaWiki API client.")
11845 (license license:expat)))
11846
11847(define-public python2-mwclient
11848 (package-with-python2 python-mwclient))
11849
11850(define-public python-utils
11851 (package
11852 (name "python-utils")
11853 (version "2.1.0")
11854 (source (origin
11855 (method url-fetch)
11856 (uri (pypi-uri "python-utils" version))
11857 (sha256
11858 (base32
11859 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
11860 (build-system python-build-system)
11861 (native-inputs
11862 `(("pytest-runner" ,python-pytest-runner)
11863 ("pytest" ,python-pytest)
11864 ("six" ,python-six)))
11865 (home-page "https://github.com/WoLpH/python-utils")
11866 (synopsis "Convenient utilities not included with the standard Python install")
11867 (description
11868 "Python Utils is a collection of small Python functions and classes which
11869make common patterns shorter and easier.")
11870 (license license:bsd-2)))
11871
11872(define-public python2-utils
11873 (package-with-python2 python-utils))
11874
11875(define-public python-sphinx-me
11876 (package
11877 (name "python-sphinx-me")
11878 (version "0.3")
11879 (source
11880 (origin
11881 (method url-fetch)
11882 (uri (pypi-uri "sphinx-me" version))
11883 (sha256
11884 (base32
11885 "06jzgp213zihnvpcy2y5jy3ykid3apc2ncp2pg6a2g05lhiziglq"))))
11886 (build-system python-build-system)
11887 (home-page "https://github.com/stephenmcd/sphinx-me")
11888 (synopsis "Create a Sphinx documentation shell")
11889 (description
11890 "Create a Sphinx documentation shell for your project and include the
11891README file as the documentation index. It handles extracting the required
11892meta data such as the project name, author and version from your project for
11893use in your Sphinx docs.")
11894 (license license:bsd-2)))
11895
11896(define-public python2-sphinx-me
11897 (package-with-python2 python-sphinx-me))
11898
11899(define-public python-diff-match-patch
11900 (package
11901 (name "python-diff-match-patch")
11902 (version "20121119")
11903 (source
11904 (origin
11905 (method url-fetch)
11906 (uri (pypi-uri "diff-match-patch" version))
11907 (sha256
11908 (base32
11909 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
11910 (build-system python-build-system)
11911 (home-page "https://code.google.com/p/google-diff-match-patch")
11912 (synopsis "Synchronize plain text")
11913 (description "Diff Match and Patch libraries offer robust algorithms to
11914perform the operations required for synchronizing plain text.")
11915 (license license:asl2.0)))
11916
11917(define-public python2-diff-match-patch
11918 (package-with-python2 python-diff-match-patch))
11919
11920(define-public python-dirsync
11921 (package
11922 (name "python-dirsync")
11923 (version "2.2.3")
11924 (source
11925 (origin
11926 (method url-fetch)
11927 (uri (pypi-uri "dirsync" version))
11928 (sha256
11929 (base32
11930 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
11931 (build-system python-build-system)
11932 (propagated-inputs
11933 `(("six" ,python-six)))
11934 (home-page "https://bitbucket.org/tkhyn/dirsync")
11935 (synopsis "Advanced directory tree synchronisation tool")
11936 (description "Advanced directory tree synchronisation tool.")
11937 (license license:expat)))
11938
11939(define-public python2-dirsync
11940 (package-with-python2 python-dirsync))
11941
11942(define-public python-levenshtein
11943 (package
11944 (name "python-levenshtein")
11945 (version "0.12.0")
11946 (source
11947 (origin
11948 (method url-fetch)
11949 (uri (pypi-uri "python-Levenshtein" version))
11950 (sha256
11951 (base32
11952 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
11953 (build-system python-build-system)
11954 (home-page "https://github.com/ztane/python-Levenshtein")
11955 (synopsis "Fast computation of Levenshtein distance and string similarity")
11956 (description
11957 "The Levenshtein Python C extension module contains functions for fast computation of
11958@enumerate
11959@item Levenshtein (edit) distance, and edit operations
11960@item string similarity
11961@item approximate median strings, and generally string averaging
11962@item string sequence and set similarity
11963@end enumerate
11964It supports both normal and Unicode strings.")
11965 (license license:gpl2+)))
11966
11967(define-public python2-levenshtein
11968 (package-with-python2 python-levenshtein))
11969
11970(define-public python-scandir
11971 (package
11972 (name "python-scandir")
11973 (version "1.9.0")
11974 (source
11975 (origin
11976 (method url-fetch)
11977 (uri (pypi-uri "scandir" version))
11978 (sha256
11979 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
11980 (build-system python-build-system)
11981 (arguments
11982 `(#:phases (modify-phases %standard-phases
11983 (replace 'check
11984 (lambda _
11985 (invoke "python" "test/run_tests.py"))))))
11986 (home-page "https://github.com/benhoyt/scandir")
11987 (synopsis "Directory iteration function")
11988 (description
11989 "Directory iteration function like os.listdir(), except that instead of
11990returning a list of bare filenames, it yields DirEntry objects that include
11991file type and stat information along with the name. Using scandir() increases
11992the speed of os.walk() by 2-20 times (depending on the platform and file
11993system) by avoiding unnecessary calls to os.stat() in most cases.
11994
11995This package is part of the Python standard library since version 3.5.")
11996 (license license:bsd-3)))
11997
11998(define-public python2-scandir
11999 (package-with-python2 python-scandir))
12000
12001(define-public python2-stemming
12002 (package
12003 (name "python2-stemming")
12004 (version "1.0.1")
12005 (source
12006 (origin
12007 (method url-fetch)
12008 (uri (pypi-uri "stemming" version))
12009 (sha256
12010 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
12011 (build-system python-build-system)
12012 (arguments
12013 `(#:python ,python-2))
12014 (home-page "https://bitbucket.org/mchaput/stemming/overview")
12015 (synopsis "Python implementations of various stemming algorithms")
12016 (description
12017 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
12018stemming algorithms for English. These implementations are straightforward and
12019efficient, unlike some Python versions of the same algorithms available on the
12020Web. This package is an extraction of the stemming code included in the Whoosh
12021search engine.")
12022 (license license:public-domain)))
12023
12024(define-public python-factory-boy
12025 (package
12026 (name "python-factory-boy")
12027 (version "2.8.1")
12028 (source
12029 (origin
12030 (method url-fetch)
12031 (uri (pypi-uri "factory_boy" version))
12032 (sha256
12033 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
12034 (build-system python-build-system)
12035 (arguments
12036 ;; Tests are not included in the tarball.
12037 `(#:tests? #f))
12038 (propagated-inputs
12039 `(("faker" ,python-faker)))
12040 (home-page "https://github.com/benhoyt/scandir")
12041 (synopsis "Versatile test fixtures replacement")
12042 (description
12043 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
12044
12045As a fixtures replacement tool, it aims to replace static, hard to maintain
12046fixtures with easy-to-use factories for complex object.
12047
12048Instead of building an exhaustive test setup with every possible combination
12049of corner cases, factory_boy allows you to use objects customized for the
12050current test, while only declaring the test-specific fields")
12051 (license license:expat)))
12052
12053(define-public python2-factory-boy
12054 (package-with-python2 python-factory-boy))
12055
12056(define-public python-translate-toolkit
12057 (package
12058 (name "python-translate-toolkit")
12059 (version "2.1.0")
12060 (source
12061 (origin
12062 (method url-fetch)
12063 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
12064 (sha256
12065 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
12066 (build-system python-build-system)
12067 (native-inputs
12068 `(("python-pytest" ,python-pytest)
12069 ("python-sphinx" ,python-sphinx)))
12070 (propagated-inputs
12071 `(("python-babel" ,python-babel)
12072 ("python-beautifulsoup4" ,python-beautifulsoup4)
12073 ("python-chardet" ,python-chardet)
12074 ("python-diff-match-patch" ,python-diff-match-patch)
12075 ("python-levenshtein" ,python-levenshtein)
12076 ("python-lxml" ,python-lxml)
12077 ("python-six" ,python-six)
12078 ("python-vobject" ,python-vobject)
12079 ("python-pyyaml" ,python-pyyaml)))
12080 (arguments
12081 ;; TODO: tests are not run, because they end with
12082 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
12083 ;; 'parse_funcs'
12084 ;; during test setup.
12085 `(#:tests? #f))
12086 (home-page "http://toolkit.translatehouse.org")
12087 (synopsis "Tools and API for translation and localization engineering")
12088 (description
12089 "Tools and API for translation and localization engineering. It contains
12090several utilities, as well as an API for building localization tools.")
12091 (license license:gpl2+)))
12092
12093(define-public python2-translate-toolkit
12094 (package-with-python2 python-translate-toolkit))
12095
12096(define-public python-packaging
12097 (package
12098 (name "python-packaging")
12099 (version "18.0")
12100 (source
12101 (origin
12102 (method url-fetch)
12103 (uri (pypi-uri "packaging" version))
12104 (sha256
12105 (base32
12106 "01wq9c53ix5rz6qg2c98gy8n4ff768rmanifm8m5jpjiaizj51h8"))))
12107 (build-system python-build-system)
12108 (arguments
12109 `(#:phases (modify-phases %standard-phases
12110 (replace 'check
12111 (lambda _ (invoke "py.test" "-vv"))))))
12112 (native-inputs
12113 `(("python-pretend" ,python-pretend)
12114 ("python-pytest" ,python-pytest)))
12115 (propagated-inputs
12116 `(("python-pyparsing" ,python-pyparsing)
12117 ("python-six" ,python-six)))
12118 (home-page "https://github.com/pypa/packaging")
12119 (synopsis "Core utilities for Python packages")
12120 (description "Packaging is a Python module for dealing with Python packages.
12121It offers an interface for working with package versions, names, and dependency
12122information.")
12123 ;; From 'LICENSE': This software is made available under the terms of
12124 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
12125 ;; Contributions to this software is made under the terms of *both* these
12126 ;; licenses.
12127 (license (list license:asl2.0 license:bsd-2))))
12128
12129(define-public python2-packaging
12130 (package-with-python2 python-packaging))
12131
12132(define-public python-relatorio
12133 (package
12134 (name "python-relatorio")
12135 (version "0.8.0")
12136 (source
12137 (origin
12138 (method url-fetch)
12139 (uri (pypi-uri "relatorio" version))
12140 (sha256
12141 (base32
12142 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
12143 (build-system python-build-system)
12144 (propagated-inputs
12145 `(("python-lxml" ,python-lxml)
12146 ("python-genshi" ,python-genshi)))
12147 (native-inputs
12148 `(("python-magic" ,python-magic)))
12149 (home-page "https://relatorio.tryton.org/")
12150 (synopsis "Templating library able to output ODT and PDF files")
12151 (description "Relatorio is a templating library which provides a way to
12152easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
12153for more filetypes can be easily added by creating plugins for them.")
12154 (license license:gpl3+)))
12155
12156(define-public python2-relatorio
12157 (package-with-python2 python-relatorio))
12158
12159(define-public python-radon
12160 (package
12161 (name "python-radon")
12162 (version "2.2.0")
12163 (source
12164 (origin
12165 (method url-fetch)
12166 (uri (pypi-uri "radon" version))
12167 (sha256
12168 (base32
12169 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
12170 (build-system python-build-system)
12171 (arguments
12172 `(#:phases (modify-phases %standard-phases
12173 (replace 'check
12174 (lambda _
12175 (invoke "python" "radon/tests/run.py"))))))
12176 (propagated-inputs
12177 `(("python-colorama" ,python-colorama)
12178 ("python-flake8-polyfill" ,python-flake8-polyfill)
12179 ("python-mando" ,python-mando)))
12180 (native-inputs
12181 `(("python-pytest" ,python-pytest)
12182 ("python-pytest-mock" ,python-pytest-mock)))
12183 (home-page "https://radon.readthedocs.org/")
12184 (synopsis "Code Metrics in Python")
12185 (description "Radon is a Python tool which computes various code metrics.
12186Supported metrics are:
12187@itemize @bullet
12188@item raw metrics: SLOC, comment lines, blank lines, &c.
12189@item Cyclomatic Complexity (i.e. McCabe’s Complexity)
12190@item Halstead metrics (all of them)
12191@item the Maintainability Index (a Visual Studio metric)
12192@end itemize")
12193 (license license:expat)))
12194
12195(define-public python2-radon
12196 (package-with-python2 python-radon))
12197
12198(define-public python-sure
12199 (package
12200 (name "python-sure")
12201 (version "1.4.11")
12202 (source
12203 (origin
12204 (method url-fetch)
12205 (uri (pypi-uri "sure" version))
12206 (sha256
12207 (base32
12208 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
12209 (build-system python-build-system)
12210 (propagated-inputs
12211 `(("python-mock" ,python-mock)
12212 ("python-six" ,python-six)))
12213 (native-inputs
12214 `(("python-nose" ,python-nose)))
12215 (home-page "https://github.com/gabrielfalcao/sure")
12216 (synopsis "Automated testing library in python for python")
12217 (description
12218 "Sure is a python library that leverages a DSL for writing assertions.
12219Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
12220 (license license:gpl3+)))
12221
12222(define-public python2-sure
12223 (package-with-python2 python-sure))
12224
12225(define-public python2-couleur
12226 ;; This package does not seem to support python3 at all, hence,
12227 ;; only the python2 variant definition is provided.
12228 (package
12229 (name "python2-couleur")
12230 (version "0.6.2")
12231 (source
12232 (origin
12233 (method url-fetch)
12234 (uri (pypi-uri "couleur" version))
12235 (sha256
12236 (base32
12237 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
12238 (build-system python-build-system)
12239 (arguments
12240 `(#:python ,python-2))
12241 (home-page "https://github.com/gabrielfalcao/couleur")
12242 (synopsis
12243 "ANSI terminal tool for python, colored shell and other handy fancy features")
12244 (description
12245 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
12246terminal such as coloured output in the shell, overwriting output, indentation, etc.")
12247 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
12248 ;; https://github.com/gabrielfalcao/couleur/issues/11
12249 (license license:lgpl3+)))
12250
12251(define-public python-misaka
12252 (package
12253 (name "python-misaka")
0dcb3412 12254 (version "2.1.1")
44d10b1f
RW
12255 (source
12256 (origin
12257 (method url-fetch)
12258 (uri (pypi-uri "misaka" version))
12259 (sha256
12260 (base32
0dcb3412 12261 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
44d10b1f
RW
12262 (build-system python-build-system)
12263 (arguments
12264 `(;; Line 37 of setup.py calls self.run_command('develop')
12265 ;; in the 'check' phase. This command seems to be trying
12266 ;; to write to
12267 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
12268 ;; for which it does not have the permission to write.
12269 #:tests? #f))
12270 (propagated-inputs
12271 `(("python-cffi" ,python-cffi)))
12272 (home-page "https://github.com/FSX/misaka")
12273 (synopsis "Python binding for Hoedown")
12274 (description
12275 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
12276library written in C. It features a fast HTML renderer and functionality to make custom
12277renderers (e.g. man pages or LaTeX).")
12278 (license license:expat)))
12279
12280(define-public python2-misaka
12281 (package-with-python2 python-misaka))
12282
12283(define-public python2-steadymark
12284 ;; This is forced into being a python2 only variant
12285 ;; due to its dependence on couleur that has no support
12286 ;; for python3
12287 (package
12288 (name "python2-steadymark")
12289 (version "0.7.3")
12290 (source
12291 (origin
12292 (method url-fetch)
12293 (uri (pypi-uri "steadymark" version))
12294 (sha256
12295 (base32
12296 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
12297 (build-system python-build-system)
12298 (native-inputs
12299 `(("python-couleur" ,python2-couleur)
12300 ("python-sure" ,python2-sure)
12301 ("python-misaka" ,python2-misaka)))
12302 (arguments
12303 `(#:python ,python-2
12304 #:phases
12305 (modify-phases %standard-phases
12306 (add-before 'build 'patch-setup-py
12307 (lambda _
12308 ;; Update requirements from dependency==version
12309 ;; to dependency>=version
12310 (substitute* "setup.py"
12311 (("==") ">="))
12312 #t)))))
12313 (home-page "https://github.com/gabrielfalcao/steadymark")
12314 (synopsis "Markdown-based test runner for python")
12315 (description
12316 "@code{Steadymark} allows documentation to be written in github-flavoured
12317markdown. The documentation may contain snippets of code surrounded by python
12318code blocks and @code{Steadymark} will find these snippets and run them, making
12319sure that there are no old malfunctional examples in the documentation examples.")
12320 (license license:expat)))
12321
12322(define-public python-jsonpointer
12323 (package
12324 (name "python-jsonpointer")
12325 (version "1.10")
12326 (source
12327 (origin
12328 (method url-fetch)
12329 (uri (pypi-uri "jsonpointer" version))
12330 (sha256
12331 (base32
12332 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
12333 (build-system python-build-system)
12334 (home-page "https://github.com/stefankoegl/python-json-pointer")
12335 (synopsis "Identify specific nodes in a JSON document")
12336 (description "@code{jsonpointer} allows you to access specific nodes
12337by path in a JSON document (see RFC 6901).")
12338 (license license:bsd-3)))
12339
12340(define-public python2-jsonpointer
12341 (package-with-python2 python-jsonpointer))
12342
12343(define-public python-jsonpatch
12344 (package
12345 (name "python-jsonpatch")
12346 (version "1.16")
12347 (source
12348 (origin
12349 (method url-fetch)
12350 ;; pypi version lacks tests.js
12351 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12352 "archive/v" version ".tar.gz"))
12353 (file-name (string-append name "-" version ".tar.gz"))
12354 (sha256
12355 (base32
12356 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
12357 (build-system python-build-system)
12358 (native-inputs
12359 `(("python-jsonpointer" ,python-jsonpointer)))
12360 (home-page "https://github.com/stefankoegl/python-json-patch")
12361 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
12362 (description "@code{jsonpatch} is a library and program that allows
12363applying JSON Patches according to RFC 6902.")
12364 (license license:bsd-3)))
12365
12366(define-public python2-jsonpatch
12367 (package-with-python2 python-jsonpatch))
12368
12369(define-public python-jsonpatch-0.4
12370 (package (inherit python-jsonpatch)
12371 (name "python-jsonpatch")
12372 (version "0.4")
12373 (source
12374 (origin
12375 (method url-fetch)
12376 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12377 "archive/v" version ".tar.gz"))
12378 (file-name (string-append name "-" version ".tar.gz"))
12379 (sha256
12380 (base32
12381 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
12382
12383(define-public python2-jsonpatch-0.4
12384 (package-with-python2 python-jsonpatch-0.4))
12385
12386(define-public python-rfc3986
12387 (package
12388 (name "python-rfc3986")
12389 (version "1.1.0")
12390 (source (origin
12391 (method url-fetch)
12392 (uri (pypi-uri "rfc3986" version))
12393 (sha256
12394 (base32
12395 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
12396 (build-system python-build-system)
12397 (arguments
12398 `(#:modules ((guix build utils)
12399 (guix build python-build-system)
12400 (ice-9 ftw)
12401 (srfi srfi-1)
12402 (srfi srfi-26))
12403 #:phases
12404 (modify-phases %standard-phases
12405 (replace 'check
12406 (lambda _
12407 (let ((cwd (getcwd)))
12408 (setenv "PYTHONPATH"
12409 (string-append cwd "/build/"
12410 (find (cut string-prefix? "lib" <>)
12411 (scandir (string-append cwd "/build")))
12412 ":"
12413 (getenv "PYTHONPATH")))
12414 (invoke "pytest" "-v")))))))
12415 (native-inputs
12416 `(("python-pytest" ,python-pytest)))
12417 (home-page "https://rfc3986.readthedocs.io/")
12418 (synopsis "Parse and validate URI references")
12419 (description
12420 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
12421validation and authority parsing. This module also supports RFC@tie{}6874
12422which adds support for zone identifiers to IPv6 addresses.")
12423 (license license:asl2.0)))
12424
12425(define-public python2-rfc3986
12426 (package-with-python2 python-rfc3986))
12427
12428(define-public python-rfc3987
12429 (package
12430 (name "python-rfc3987")
12431 (version "1.3.7")
12432 (source
12433 (origin
12434 (method url-fetch)
12435 (uri (pypi-uri "rfc3987" version))
12436 (sha256
12437 (base32
12438 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
12439 (build-system python-build-system)
12440 (home-page "https://pypi.python.org/pypi/rfc3987")
12441 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
12442 (description "@code{rfc3987} provides routines for parsing and
12443validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
12444 (license license:gpl3+)))
12445
12446(define-public python2-rfc3987
12447 (package-with-python2 python-rfc3987))
12448
12449(define-public python-validate-email
12450 (package
12451 (name "python-validate-email")
12452 (version "1.3")
12453 (source
12454 (origin
12455 (method url-fetch)
12456 (uri (pypi-uri "validate_email" version))
12457 (sha256
12458 (base32
12459 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
12460 (build-system python-build-system)
12461 (home-page "https://github.com/syrusakbary/validate_email")
12462 (synopsis "Verifies if an email address is valid and really exists")
12463 (description "@code{validate_email} can be used to verify if an email
12464address is valid and really exists.")
12465 (license license:lgpl3+)))
12466
12467(define-public python2-validate-email
12468 (package-with-python2 python-validate-email))
12469
12470(define-public python-flex
12471 (package
12472 (name "python-flex")
12473 (version "6.10.0")
12474 (source
12475 (origin
12476 (method url-fetch)
12477 (uri (pypi-uri "flex" version))
12478 (sha256
12479 (base32
12480 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
12481 (build-system python-build-system)
12482 (propagated-inputs
12483 `(("python-click" ,python-click)
12484 ("python-iso8601" ,python-iso8601)
12485 ("python-jsonpointer" ,python-jsonpointer)
12486 ("python-pyyaml" ,python-pyyaml)
12487 ("python-requests" ,python-requests)
12488 ("python-rfc3987" ,python-rfc3987)
12489 ("python-six" ,python-six)
12490 ("python-validate-email" ,python-validate-email)))
12491 (home-page "https://github.com/pipermerriam/flex")
12492 (synopsis "Validates Swagger schemata")
12493 (description "@code{flex} can be used to validate Swagger schemata.")
12494 (license license:bsd-3)))
12495
12496(define-public python2-flex
12497 (package-with-python2 python-flex))
12498
12499(define-public python-marshmallow
12500 (package
12501 (name "python-marshmallow")
12502 (version "3.0.0b14")
12503 (source
12504 (origin
12505 (method url-fetch)
12506 (uri (pypi-uri "marshmallow" version))
12507 (sha256
12508 (base32
12509 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
12510 (build-system python-build-system)
12511 (propagated-inputs
12512 `(("python-dateutil" ,python-dateutil)
12513 ("python-simplejson" ,python-simplejson)))
12514 (native-inputs
12515 `(("python-pytest" ,python-pytest)
12516 ("python-pytz" ,python-pytz)))
12517 (home-page "https://github.com/marshmallow-code/marshmallow")
12518 (synopsis "Convert complex datatypes to and from native
12519Python datatypes.")
12520 (description "@code{marshmallow} provides a library for converting
12521complex datatypes to and from native Python datatypes.")
12522 (license license:expat)))
12523
12524(define-public python2-marshmallow
12525 (package-with-python2 python-marshmallow))
12526
12527(define-public python-apispec
12528 (package
12529 (name "python-apispec")
12530 (version "0.25.3")
12531 (source
12532 (origin
12533 (method url-fetch)
12534 (uri (pypi-uri "apispec" version))
12535 (sha256
12536 (base32
12537 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
12538 (build-system python-build-system)
12539 (propagated-inputs
12540 `(("python-pyyaml" ,python-pyyaml)))
12541 (native-inputs
12542 `(("python-pytest" ,python-pytest)
12543 ("python-flask" ,python-flask)
12544 ("python-marshmallow" ,python-marshmallow)
12545 ("python-tornado" ,python-tornado)
12546 ("python-bottle" ,python-bottle)
12547 ("python-mock" ,python-mock)))
12548 (home-page "https://github.com/marshmallow-code/apispec")
12549 (synopsis "Swagger 2.0 API specification generator")
12550 (description "@code{python-apispec} is a pluggable API specification
12551generator. Currently supports the OpenAPI specification (f.k.a.
12552Swagger 2.0).")
12553 (license license:expat)))
12554
12555(define-public python2-apispec
12556 (package-with-python2 python-apispec))
12557
12558(define-public python-flasgger
12559 (package
12560 (name "python-flasgger")
12561 (version "0.6.3")
12562 (source
12563 (origin
12564 (method url-fetch)
12565 (uri (string-append "https://github.com/rochacbruno/flasgger/archive/"
12566 version ".tar.gz"))
12567 (file-name (string-append name "-" version ".tar.gz"))
12568 (sha256
12569 (base32
12570 "1gqzlm0rb55fdpsy5ipkganlx9cnpi454fqyycr03jm22zql14ay"))))
12571 (build-system python-build-system)
12572 (arguments
12573 `(#:phases
12574 (modify-phases %standard-phases
12575 (replace 'check
12576 (lambda* (#:key inputs outputs #:allow-other-keys)
12577 (substitute* "Makefile"
12578 (("flake8 flasgger --ignore=F403")
12579 "flake8 flasgger --ignore=E731,F403"))
12580 (setenv "PYTHONPATH" (string-append (getcwd)
12581 ":"
12582 (getenv "PYTHONPATH")))
ac599a09 12583 (invoke "py.test"))))))
44d10b1f
RW
12584 (propagated-inputs
12585 `(("python-flask" ,python-flask)
12586 ("python-pyyaml" ,python-pyyaml)
12587 ("python-jsonschema" ,python-jsonschema)
12588 ("python-mistune" ,python-mistune)
12589 ("python-six" ,python-six)))
12590 (native-inputs
12591 `(("python-decorator" ,python-decorator)
12592 ("python-flake8" ,python-flake8)
12593 ("python-flask-restful" ,python-flask-restful)
12594 ("python-flex" ,python-flex)
12595 ("python-pytest" ,python-pytest)
12596 ("python-pytest-cov" ,python-pytest-cov)
12597 ("python-marshmallow" ,python-marshmallow)
12598 ("python-apispec" ,python-apispec)))
12599 (home-page "https://github.com/rochacbruno/flasgger/")
12600 (synopsis "Extract Swagger specs from your Flask project")
12601 (description "@code{python-flasgger} allows extracting Swagger specs
12602from your Flask project. It is a fork of Flask-Swagger.")
12603 (license license:expat)))
12604
12605(define-public python2-flasgger
12606 (package-with-python2 python-flasgger))
12607
12608(define-public python-swagger-spec-validator
12609 (package
12610 (name "python-swagger-spec-validator")
12611 (version "2.1.0")
12612 (source
12613 (origin
12614 (method url-fetch)
12615 (uri (pypi-uri "swagger-spec-validator" version))
12616 (sha256
12617 (base32
12618 "13hkpn2lycwr0468yqhjb3kwszqf7hjwlq61w7vdxq1caz31k4nw"))))
12619 (build-system python-build-system)
12620 (propagated-inputs
12621 `(("python-jsonschema" ,python-jsonschema)
12622 ("python-six" ,python-six)))
12623 (home-page
12624 "https://github.com/Yelp/swagger_spec_validator")
12625 (synopsis "Validation of Swagger specifications")
12626 (description "@code{swagger_spec_validator} provides a library for
12627validating Swagger API specifications.")
12628 (license license:asl2.0)))
12629
12630(define-public python2-swagger-spec-validator
12631 (package-with-python2 python-swagger-spec-validator))
12632
12633(define-public python-apache-libcloud
12634 (package
12635 (name "python-apache-libcloud")
12636 (version "2.4.0")
12637 (source
12638 (origin
12639 (method url-fetch)
12640 (uri (pypi-uri "apache-libcloud" version))
12641 (sha256
12642 (base32
12643 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
12644 (build-system python-build-system)
12645 (arguments
12646 `(#:phases
12647 (modify-phases %standard-phases
12648 (add-after 'unpack 'patch-ssh
12649 (lambda* (#:key inputs #:allow-other-keys)
12650 (substitute* "libcloud/compute/ssh.py"
12651 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
12652 "/bin/ssh" "'")))
12653 #t))
12654 (add-after 'unpack 'patch-tests
12655 (lambda _
12656 (substitute* "./libcloud/test/test_file_fixtures.py"
12657 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
12658 (("def _ascii") "def _raw_data(self, method, url, body, headers):
12659 return (httplib.OK,
12660 \"1234abcd\",
12661 {\"test\": \"value\"},
12662 httplib.responses[httplib.OK])
12663 def _ascii"))
12664 (substitute* "libcloud/test/compute/test_ssh_client.py"
12665 (("class ShellOutSSHClientTests")
12666 "@unittest.skip(\"Guix container doesn't have ssh service\")
12667class ShellOutSSHClientTests")
12668 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
12669 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
12670 (("'.xF0', '.x90', '.x8D', '.x88'")
12671 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
12672 #t))
12673 (add-before 'check 'copy-secret
12674 (lambda _
12675 (copy-file "libcloud/test/secrets.py-dist"
12676 "libcloud/test/secrets.py")
12677 #t)))))
12678 (inputs
12679 `(("openssh" ,openssh)))
12680 (propagated-inputs
12681 `(("python-paramiko" ,python-paramiko)
12682 ("python-requests" ,python-requests)))
12683 (native-inputs
12684 `(("python-lockfile" ,python-lockfile)
12685 ("python-mock" ,python-mock)
12686 ("python-pytest" ,python-pytest)
12687 ("python-pytest-runner" ,python-pytest-runner)
12688 ("python-requests-mock" ,python-requests-mock)))
12689 (home-page "https://libcloud.apache.org/")
12690 (synopsis "Unified Cloud API")
12691 (description "@code{libcloud} is a Python library for interacting with
12692many of the popular cloud service providers using a unified API.")
12693 (license license:asl2.0)))
12694
12695(define-public python2-apache-libcloud
12696 (package-with-python2 python-apache-libcloud))
12697
12698(define-public python-smmap2
12699 (package
12700 (name "python-smmap2")
12701 (version "2.0.3")
12702 (source
12703 (origin
12704 (method url-fetch)
12705 (uri (pypi-uri "smmap2" version))
12706 (sha256
12707 (base32
12708 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
12709 (build-system python-build-system)
12710 (native-inputs
12711 `(("python-nosexcover" ,python-nosexcover)))
12712 (home-page "https://github.com/Byron/smmap")
12713 (synopsis "Python sliding window memory map manager")
12714 (description "@code{smmap2} is a pure Python implementation of a sliding
12715window memory map manager.")
12716 (license license:bsd-3)))
12717
12718(define-public python2-smmap2
12719 (package-with-python2 python-smmap2))
12720
12721(define-public python-regex
12722 (package
12723 (name "python-regex")
12724 (version "2017.06.07")
12725 (source (origin
12726 (method url-fetch)
12727 (uri (pypi-uri "regex" version))
12728 (sha256
12729 (base32
12730 "06r6b7yigikbj3a72whl85r2b64pj1r0ypmw9yalmkm0wnxq8mz4"))))
12731 (build-system python-build-system)
12732 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
12733 (synopsis "Alternative regular expression module")
12734 (description "This regular expression implementation is backwards-
12735compatible with the standard @code{re} module, but offers additional
12736functionality like full case-folding for case-insensitive matches in Unicode.")
12737 (license license:psfl)))
12738
12739(define-public python2-regex
12740 (package-with-python2 python-regex))
12741
12742(define-public python2-pyopengl
12743 (package
12744 (name "python2-pyopengl")
12745 (version "3.1.0")
12746 (source
12747 (origin
12748 (method url-fetch)
12749 (uri (pypi-uri "PyOpenGL" version))
12750 (sha256
12751 (base32
12752 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
12753 (arguments
12754 `(#:python ,python-2))
12755 (build-system python-build-system)
12756 (home-page "http://pyopengl.sourceforge.net")
12757 (synopsis "Standard OpenGL bindings for Python")
12758 (description
12759 "PyOpenGL is the most common cross platform Python binding to OpenGL and
12760related APIs. The binding is created using the standard @code{ctypes}
12761library.")
12762 (license license:bsd-3)))
12763
12764(define-public python2-pyopengl-accelerate
12765 (package
12766 (inherit python2-pyopengl)
12767 (name "python2-pyopengl-accelerate")
12768 (version "3.1.0")
12769 (source
12770 (origin
12771 (method url-fetch)
12772 (uri (pypi-uri "PyOpenGL-accelerate" version))
12773 (sha256
12774 (base32
12775 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
12776 (synopsis "Acceleration code for PyOpenGL")
12777 (description
12778 "This is the Cython-coded accelerator module for PyOpenGL.")))
12779
12780(define-public python-rencode
12781 (package
12782 (name "python-rencode")
12783 (version "1.0.5")
12784 (source
12785 (origin
12786 (method url-fetch)
12787 (uri (pypi-uri "rencode" version))
12788 (sha256
12789 (base32
12790 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
12791 (build-system python-build-system)
12792 (arguments
12793 `(#:phases
12794 (modify-phases %standard-phases
12795 (add-before 'check 'delete-bogus-test
12796 ;; This test requires /home/aresch/Downloads, which is not provided by
12797 ;; the build environment.
12798 (lambda _
12799 (delete-file "rencode/t.py")
12800 #t)))))
12801 (native-inputs `(("pkg-config" ,pkg-config)
12802 ("python-cython" ,python-cython)))
12803 (home-page "https://github.com/aresch/rencode")
12804 (synopsis "Serialization of heterogeneous data structures")
12805 (description
12806 "The @code{rencode} module is a data structure serialization library,
12807similar to @code{bencode} from the BitTorrent project. For complex,
12808heterogeneous data structures with many small elements, r-encoding stake up
12809significantly less space than b-encodings. This version of rencode is a
12810complete rewrite in Cython to attempt to increase the performance over the
12811pure Python module.")
12812 (license license:bsd-3)))
12813
12814(define-public python2-rencode
12815 (package-with-python2 python-rencode))
12816
12817(define-public python-xenon
12818 (package
12819 (name "python-xenon")
12820 (version "0.5.4")
12821 (source
12822 (origin
12823 (method url-fetch)
12824 (uri (pypi-uri "xenon" version))
12825 (sha256
12826 (base32
12827 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
12828 (build-system python-build-system)
12829 (native-inputs
12830 `(("python-pyyaml" ,python-pyyaml)
12831 ("python-radon" ,python-radon)
12832 ("python-requests" ,python-requests)
12833 ("python-flake8" ,python-flake8)
12834 ("python-tox" ,python-tox)))
12835 (arguments
12836 `(#:phases
12837 (modify-phases %standard-phases
12838 (add-before 'build 'patch-test-requirements
12839 (lambda _
12840 ;; Remove httpretty dependency for tests.
12841 (substitute* "setup.py"
12842 (("httpretty") ""))
12843 #t)))))
12844 (home-page "https://xenon.readthedocs.org/")
12845 (synopsis "Monitor code metrics for Python on your CI server")
12846 (description
12847 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
12848Ideally, @code{xenon} is run every time code is committed. Through command
12849line options, various thresholds can be set for the complexity of code. It
12850will fail (i.e. it will exit with a non-zero exit code) when any of these
12851requirements is not met.")
12852 (license license:expat)))
12853
12854(define-public python2-xenon
12855 (package-with-python2 python-xenon))
12856
12857(define-public python-pysocks
12858 (package
12859 (name "python-pysocks")
12860 (version "1.6.8")
12861 (source
12862 (origin
12863 (method url-fetch)
12864 (uri (pypi-uri "PySocks" version))
12865 (sha256
12866 (base32
12867 "0wn6xafwy9c1gamwljw3fyvih5w19qy9xp39zmv8c90ai5ajrr9z"))))
12868 (build-system python-build-system)
12869 (arguments `(#:tests? #f))
12870 (home-page "https://github.com/Anorov/PySocks")
12871 (synopsis "SOCKS client module")
12872 (description "@code{pysocks} is an updated and semi-actively maintained
12873version of @code{SocksiPy} with bug fixes and extra features.")
12874 (license license:bsd-3)))
12875
12876(define-public python2-pysocks
12877 (package-with-python2 python-pysocks))
12878
12879(define-public python-pydiff
12880 (package
12881 (name "python-pydiff")
12882 (version "0.2")
12883 (source
12884 (origin
12885 (method url-fetch)
12886 (uri (pypi-uri "pydiff" version))
12887 (sha256
12888 (base32
12889 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
12890 (build-system python-build-system)
12891 (home-page "https://github.com/myint/pydiff")
12892 (synopsis "Library to diff two Python files at the bytecode level")
12893 (description
12894 "@code{pydiff} makes it easy to look for actual code changes while
12895ignoring formatting changes.")
12896 (license license:expat)))
12897
12898(define-public python2-pydiff
12899 (package-with-python2 python-pydiff))
12900
12901(define-public python-tqdm
12902 (package
12903 (name "python-tqdm")
12904 (version "4.19.6")
12905 (source
12906 (origin
12907 (method url-fetch)
12908 (uri (pypi-uri "tqdm" version))
12909 (sha256
12910 (base32
12911 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
12912 (build-system python-build-system)
12913 (native-inputs
12914 `(("python-flake8" ,python-flake8)
12915 ("python-nose" ,python-nose)
12916 ("python-coverage" ,python-coverage)))
12917 (home-page "https://github.com/tqdm/tqdm")
12918 (synopsis "Fast, extensible progress meter")
12919 (description
12920 "Make loops show a progress bar on the console by just wrapping any
12921iterable with @code{|tqdm(iterable)|}. Offers many options to define
12922design and layout.")
12923 (license (list license:mpl2.0 license:expat))))
12924
12925(define-public python2-tqdm
12926 (package-with-python2 python-tqdm))
12927
12928(define-public python-pkginfo
12929 (package
12930 (name "python-pkginfo")
12931 (version "1.4.2")
12932 (source
12933 (origin
12934 (method url-fetch)
12935 (uri (pypi-uri "pkginfo" version))
12936 (sha256
12937 (base32
12938 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
12939 (build-system python-build-system)
12940 (arguments
12941 ;; The tests are broken upstream.
12942 '(#:tests? #f))
12943 (home-page
12944 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
12945 (synopsis
12946 "Query metadatdata from sdists, bdists, and installed packages")
12947 (description
12948 "API to query the distutils metadata written in @file{PKG-INFO} inside a
12949source distriubtion (an sdist) or a binary distribution (e.g., created by
12950running bdist_egg). It can also query the EGG-INFO directory of an installed
12951distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
12952created by running @code{python setup.py develop}).")
12953 (license license:expat)))
12954
12955(define-public python2-pkginfo
12956 (package-with-python2 python-pkginfo))
12957
12958(define-public python-twine
12959 (package
12960 (name "python-twine")
12961 (version "1.9.1")
12962 (source
12963 (origin
12964 (method url-fetch)
12965 (uri (pypi-uri "twine" version))
12966 (sha256
12967 (base32
12968 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
12969 (build-system python-build-system)
12970 (propagated-inputs
12971 `(("python-tqdm" ,python-tqdm)
12972 ("python-pkginfo" ,python-pkginfo)
12973 ("python-requests" ,python-requests)
12974 ("python-requests-toolbelt" ,python-requests-toolbelt)))
12975 (home-page "https://github.com/pypa/twine")
12976 (synopsis "Collection of utilities for interacting with PyPI")
12977 (description
12978 "@code{twine} currently supports registering projects and uploading
12979distributions. It authenticates the user over HTTPS, allows them to pre-sign
12980their files and supports any packaging format (including wheels).")
12981 (license license:asl2.0)))
12982
12983(define-public python2-twine
12984 (package-with-python2 python-twine))
12985
12986(define-public python-linecache2
12987 (package
12988 (name "python-linecache2")
12989 (version "1.0.0")
12990 (source
12991 (origin
12992 (method url-fetch)
12993 (uri (pypi-uri "linecache2" version))
12994 (sha256
12995 (base32
12996 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
12997 (build-system python-build-system)
12998 (arguments
12999 `(;; The tests depend on unittest2, and our version is a bit too old.
13000 #:tests? #f))
13001 (native-inputs
13002 `(("python-pbr" ,python-pbr-minimal)))
13003 (home-page
13004 "https://github.com/testing-cabal/linecache2")
13005 (synopsis "Backports of the linecache module")
13006 (description
13007 "The linecache module allows one to get any line from any file, while
13008attempting to optimize internally, using a cache, the common case where many
13009lines are read from a single file.")
13010 (license license:psfl)))
13011
13012(define-public python2-linecache2
13013 (package-with-python2 python-linecache2))
13014
13015(define-public python-traceback2
13016 (package
13017 (name "python-traceback2")
13018 (version "1.4.0")
13019 (source
13020 (origin
13021 (method url-fetch)
13022 (uri (pypi-uri "traceback2" version))
13023 (sha256
13024 (base32
13025 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
13026 (build-system python-build-system)
13027 (arguments
13028 `(;; python-traceback2 and python-unittest2 depend on one another.
13029 #:tests? #f))
13030 (native-inputs
13031 `(("python-pbr" ,python-pbr-minimal)))
13032 (propagated-inputs
13033 `(("python-linecache2" ,python-linecache2)))
13034 (home-page
13035 "https://github.com/testing-cabal/traceback2")
13036 (synopsis "Backports of the traceback module")
13037 (description
13038 "This module provides a standard interface to extract, format and print
13039stack traces of Python programs. It exactly mimics the behavior of the Python
13040interpreter when it prints a stack trace.")
13041 (license license:psfl)))
13042
13043(define-public python2-traceback2
13044 (package-with-python2 python-traceback2))
13045
13046(define-public python-ratelimiter
13047 (package
13048 (name "python-ratelimiter")
13049 (version "1.2.0")
13050 (source
13051 (origin
13052 (method url-fetch)
13053 (uri (pypi-uri "ratelimiter" version))
13054 (sha256
13055 (base32
13056 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
13057 (build-system python-build-system)
13058 (arguments
13059 '(#:tests? #f)) ; There are no tests in the pypi archive.
13060 (home-page "https://github.com/RazerM/ratelimiter")
13061 (synopsis "Simple rate limiting object")
13062 (description
13063 "The @code{ratelimiter} module ensures that an operation will not be
13064executed more than a given number of times during a given period.")
13065 (license license:asl2.0)))
13066
13067(define-public python2-ratelimiter
13068 (package-with-python2 python-ratelimiter))
13069
13070(define-public python-dukpy
13071 (package
13072 (name "python-dukpy")
13073 (version "0.3")
13074 (source
13075 (origin
13076 (method url-fetch)
13077 (uri (string-append "https://github.com/kovidgoyal/dukpy/archive/v"
13078 version ".tar.gz"))
13079 (file-name (string-append name "-" version ".tar.gz"))
13080 (sha256
13081 (base32
13082 "0pj39rfwlzivqm5hkrsza7gssg6ggpxlq5ivc8f3h7x5pfgc6y6c"))))
13083 (build-system python-build-system)
13084 (home-page "https://github.com/kovidgoyal/dukpy")
13085 (synopsis "Run JavaScript in python")
13086 (description
13087 "dukpy is a JavaScript runtime environment for Python using the duktape
13088embeddable JavaScript engine.")
13089 ;; Dukpy is licensed under MIT like the embedded duktape library,
13090 ;; with 'errors.c' as GPL3.
13091 (license (list license:expat license:gpl3))))
13092
13093(define-public python2-dukpy
13094 (package-with-python2 python-dukpy))
13095
13096(define-public python-jsonrpclib-pelix
13097 (package
13098 (name "python-jsonrpclib-pelix")
13099 (version "0.3.2")
13100 (source
13101 (origin
13102 (method url-fetch)
13103 (uri (pypi-uri "jsonrpclib-pelix" version))
13104 (sha256
13105 (base32
13106 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
13107 (build-system python-build-system)
13108 (arguments
13109 `(#:tests? #f)) ; no tests in PyPI tarball
13110 (home-page "https://github.com/tcalmant/jsonrpclib/")
13111 (synopsis "JSON-RPC 2.0 client library for Python")
13112 (description
13113 "This library implements the JSON-RPC v2.0
13114specification (backwards-compatible) as a client library for Python. This
13115version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
13116services.")
13117 (license license:asl2.0)))
13118
13119(define-public python2-jsonrpclib-pelix
13120 (package-with-python2 python-jsonrpclib-pelix))
13121
13122(define-public python-setuptools-scm-git-archive
13123 (package
13124 (name "python-setuptools-scm-git-archive")
13125 (version "1.0")
13126 (source
13127 (origin
13128 (method url-fetch)
13129 (uri (pypi-uri "setuptools_scm_git_archive" version))
13130 (sha256
13131 (base32
13132 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
13133 (build-system python-build-system)
13134 (native-inputs
13135 `(("python-pytest" ,python-pytest)))
13136 (propagated-inputs
13137 `(("python-setuptools-scm" ,python-setuptools-scm)))
13138 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
13139 (synopsis "Setuptools_scm plugin for git archives")
13140 (description
13141 "The setuptools_scm_git_archive package is a plugin to
13142setuptools_scm, which supports obtaining versions from git archives that
13143belong to tagged versions.")
13144 (license license:expat)))
13145
13146(define-public python2-setuptools-scm-git-archive
13147 (package-with-python2 python-setuptools-scm-git-archive))
13148
13149(define-public python-pyclipper
13150 (package
13151 (name "python-pyclipper")
13152 (version "1.1.0.post1")
13153 (source
13154 (origin
13155 (method url-fetch)
13156 (uri (pypi-uri "pyclipper" version ".zip"))
13157 (sha256
13158 (base32
13159 "0ldbkbnx94an4zzrwb1sxmg6k0jgk4cwmvcdyy8y5k1zslc612wa"))
13160 (modules '((guix build utils)))
13161 (snippet
13162 '(begin
13163 ;; This file is generated by Cython.
13164 (delete-file "pyclipper/pyclipper.cpp") #t))))
13165 (build-system python-build-system)
13166 (arguments
13167 `(#:phases
13168 (modify-phases %standard-phases
13169 (add-before 'build 'cythonize-sources
13170 (lambda _
13171 (with-directory-excursion "pyclipper"
13172 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
13173 (propagated-inputs
13174 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
13175 (native-inputs
13176 `(("python-cython" ,python-cython)
13177 ("python-pytest" ,python-pytest)
13178 ("python-pytest-runner" ,python-pytest-runner)
13179 ("python-unittest2" ,python-unittest2)
13180 ("unzip" ,unzip)))
13181 (home-page "https://github.com/greginvm/pyclipper")
13182 (synopsis "Wrapper for Angus Johnson's Clipper library")
13183 (description
13184 "Pyclipper is a Cython wrapper for the C++ translation of the
13185Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
13186 (license license:expat)))
13187
13188(define-public python2-pyclipper
13189 (package-with-python2 python-pyclipper))
13190
13191(define-public python2-booleanoperations
13192 (package
13193 (name "python2-booleanoperations")
13194 (version "0.7.1")
13195 (source
13196 (origin
13197 (method url-fetch)
13198 (uri (pypi-uri "booleanOperations" version ".zip"))
13199 (sha256
13200 (base32
13201 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
13202 (build-system python-build-system)
13203 (arguments
13204 `(#:python ,python-2))
13205 (native-inputs
13206 `(("unzip" ,unzip)
13207 ("python2-pytest" ,python2-pytest)
13208 ("python2-pytest-runner" ,python2-pytest-runner)))
13209 (propagated-inputs
13210 `(("python-fonttools" ,python2-fonttools)
13211 ("python-pyclipper" ,python2-pyclipper)
13212 ("python-ufolib" ,python2-ufolib)))
13213 (home-page "https://github.com/typemytype/booleanOperations")
13214 (synopsis "Boolean operations on paths")
13215 (description
13216 "BooleanOperations provides a Python library that enables
13217boolean operations on paths.")
13218 (license license:expat)))
13219
13220(define-public python-tempdir
13221 (package
13222 (name "python-tempdir")
13223 (version "0.7.1")
13224 (source
13225 (origin
13226 (method url-fetch)
13227 (uri (pypi-uri "tempdir" version))
13228 (sha256
13229 (base32
13230 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
13231 (build-system python-build-system)
13232 (home-page "https://pypi.org/project/tempdir/")
13233 (arguments
13234 ;; the package has no tests
13235 '(#:tests? #f))
13236 (synopsis "Python library for managing temporary directories")
13237 (description
13238 "This library manages temporary directories that are automatically
13239deleted with all their contents when they are no longer needed. It is
13240particularly convenient for use in tests.")
13241 (license license:expat)))
13242
13243(define-public python2-tempdir
13244 (package-with-python2 python-tempdir))
13245
13246(define-public python-activepapers
13247 (package
13248 (name "python-activepapers")
13249 (version "0.2.2")
13250 (source
13251 (origin
13252 (method url-fetch)
13253 (uri (pypi-uri "ActivePapers.Py" version))
13254 (sha256
13255 (base32
13256 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
13257 (build-system python-build-system)
13258 (arguments
13259 `(#:modules ((ice-9 ftw)
13260 (srfi srfi-1)
13261 (guix build utils)
13262 (guix build python-build-system))
13263
13264 #:phases
13265 (modify-phases %standard-phases
13266 (add-after 'unpack 'delete-python2-code
13267 (lambda _
13268 (for-each delete-file
13269 '("lib/activepapers/builtins2.py"
13270 "lib/activepapers/standardlib2.py"
13271 "lib/activepapers/utility2.py"))))
13272 (replace 'check
13273 (lambda _
13274 ;; Deactivate the test cases that download files
13275 (setenv "NO_NETWORK_ACCESS" "1")
13276 ;; For some strange reason, some tests fail if nosetests runs all
13277 ;; test modules in a single execution. They pass if each test
13278 ;; module is run individually.
13279 (for-each (lambda (filename)
13280 (invoke "nosetests"
13281 (string-append "tests/" filename)))
13282 (scandir "tests"
13283 (lambda (filename)
13284 (string-suffix? ".py" filename)))))))))
13285 (native-inputs
13286 `(("python-tempdir" ,python-tempdir)
13287 ("python-nose" ,python-nose)))
13288 (propagated-inputs
13289 `(("python-h5py" ,python-h5py)))
13290 (home-page "http://www.activepapers.org/")
13291 (synopsis "Executable papers for scientific computing")
13292 (description
13293 "ActivePapers is a tool for working with executable papers, which
13294combine data, code, and documentation in single-file packages,
13295suitable for publication as supplementary material or on repositories
13296such as figshare or Zenodo.")
13297 (properties `((python2-variant . ,(delay python2-activepapers))))
13298 (license license:bsd-3)))
13299
13300(define-public python2-activepapers
13301 (let ((base (package-with-python2
13302 (strip-python2-variant python-activepapers))))
13303 (package
13304 (inherit base)
13305 (arguments
13306 (substitute-keyword-arguments (package-arguments base)
13307 ((#:phases phases)
13308 `(modify-phases ,phases
13309 (delete 'delete-python2-code)
13310 (add-after 'unpack 'delete-python3-code
13311 (lambda _
13312 (for-each delete-file
13313 '("lib/activepapers/builtins3.py"
13314 "lib/activepapers/standardlib3.py"
13315 "lib/activepapers/utility3.py")))))))))))
13316
13317(define-public python-semver
13318 (package
13319 (name "python-semver")
13320 (version "2.7.9")
13321 (source
13322 (origin
13323 (method url-fetch)
13324 (uri (pypi-uri "semver" version))
13325 (sha256
13326 (base32
13327 "0hhgqppchv59rqj0yzi1prdg2nfsywqmjsqy2rycyxm0hvxmbyqz"))))
13328 (build-system python-build-system)
13329 (arguments
13330 `(#:phases
13331 (modify-phases %standard-phases
13332 (add-after 'unpack 'patch-test-requirements
13333 (lambda _
13334 (substitute* "setup.py"
13335 ;; Our Python is new enough.
13336 (("'virtualenv<14\\.0\\.0'") "'virtualenv'"))
13337 #t)))))
13338 (native-inputs
13339 `(("python-tox" ,python-tox)
13340 ("python-virtualenv" ,python-virtualenv)))
13341 (home-page "https://github.com/k-bx/python-semver")
13342 (synopsis "Python helper for Semantic Versioning")
13343 (description "This package provides a Python library for
13344@url{Semantic Versioning, http://semver.org/}.")
13345 (license license:bsd-3)))
13346
13347(define-public python2-semver
13348 (package-with-python2 python-semver))
13349
13350(define-public python-pyro4
13351 (package
13352 (name "python-pyro4")
13353 (version "4.74")
13354 (source
13355 (origin
13356 (method url-fetch)
13357 (uri (pypi-uri "Pyro4" version))
13358 (sha256
13359 (base32
13360 "0pzp7c6q3vvkxq0wy9lr6wd5wky40sajz69g697i5rb2q497pvc9"))))
13361 (build-system python-build-system)
13362 (propagated-inputs
13363 `(("python-serpent" ,python-serpent)))
13364 (home-page "https://pyro4.readthedocs.io")
13365 (synopsis "Distributed object middleware for Python")
13366 (description
13367 "Pyro enables you to build applications in which objects can talk to each
13368other over the network. You can just use normal Python method calls to call
13369objects on other machines, also known as remote procedure calls (RPC).")
13370 (license license:expat)))
13371
13372(define-public python2-pyro
13373 (package
13374 (name "python2-pyro")
13375 (version "3.16")
13376 (source
13377 (origin
13378 (method url-fetch)
13379 (uri (pypi-uri "Pyro" version))
13380 (file-name (string-append "Pyro-" version ".tar.gz"))
13381 (sha256
13382 (base32
13383 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
13384 (build-system python-build-system)
13385 (arguments
13386 ;; Pyro is not compatible with Python 3
13387 `(#:python ,python-2
13388 ;; Pyro has no test cases for automatic execution
13389 #:tests? #f))
13390 (home-page "http://pythonhosted.org/Pyro/")
13391 (synopsis "Distributed object manager for Python")
13392 (description "Pyro is a Distributed Object Technology system
13393written in Python that is designed to be easy to use. It resembles
13394Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
13395which is a system and language independent Distributed Object Technology
13396and has much more to offer than Pyro or RMI. Pyro 3.x is no
13397longer maintained. New projects should use Pyro4 instead, which
13398is the new Pyro version that is actively developed.")
13399 (license license:expat)))
13400
13401(define-public python2-scientific
13402 (package
13403 (name "python2-scientific")
13404 (version "2.9.4")
13405 (source
13406 (origin
13407 (method url-fetch)
13408 (uri (string-append "https://bitbucket.org/khinsen/"
13409 "scientificpython/downloads/ScientificPython-"
13410 version ".tar.gz"))
13411 (file-name (string-append "ScientificPython-" version ".tar.gz"))
13412 (sha256
13413 (base32
13414 "0fc69zhlsn9d2jvbzyjl9ah53vj598h84nkq230c83ahfvgzx5y3"))))
13415 (build-system python-build-system)
13416 (inputs
13417 `(("netcdf" ,netcdf)))
13418 (propagated-inputs
13419 `(("python-numpy" ,python2-numpy-1.8)
13420 ("python-pyro" ,python2-pyro)))
13421 (arguments
13422 ;; ScientificPython is not compatible with Python 3
13423 `(#:python ,python-2
13424 #:tests? #f ; No test suite
13425 #:phases
13426 (modify-phases %standard-phases
13427 (replace 'build
13428 (lambda* (#:key inputs #:allow-other-keys)
77e61e25
RW
13429 (invoke "python" "setup.py" "build"
13430 (string-append "--netcdf_prefix="
13431 (assoc-ref inputs "netcdf"))))))))
44d10b1f
RW
13432 (home-page "https://bitbucket.org/khinsen/scientificpython")
13433 (synopsis "Python modules for scientific computing")
13434 (description "ScientificPython is a collection of Python modules that are
13435useful for scientific computing. Most modules are rather general (Geometry,
13436physical units, automatic derivatives, ...) whereas others are more
13437domain-specific (e.g. netCDF and PDB support). The library is currently
13438not actively maintained and works only with Python 2 and NumPy < 1.9.")
13439 (license license:cecill-c)))
13440
13441(define-public python2-mmtk
13442 (package
13443 (name "python2-mmtk")
13444 (version "2.7.11")
13445 (source
13446 (origin
13447 (method url-fetch)
13448 (uri (string-append "https://bitbucket.org/khinsen/"
13449 "mmtk/downloads/MMTK-" version ".tar.gz"))
13450 (file-name (string-append "MMTK-" version ".tar.gz"))
13451 (sha256
13452 (base32
13453 "1d0nnjx4lwsvh8f99vv1r6gi50d93yba0adkz8b4zgv4za4c5862"))))
13454 (build-system python-build-system)
13455 (native-inputs
13456 `(("netcdf" ,netcdf)))
13457 (propagated-inputs
13458 `(("python-scientific" ,python2-scientific)
13459 ("python-tkinter" ,python-2 "tk")))
13460 (arguments
13461 `(#:python ,python-2
13462 #:tests? #f
13463 #:phases
13464 (modify-phases %standard-phases
13465 (add-before 'build 'includes-from-scientific
13466 (lambda* (#:key inputs #:allow-other-keys)
13467 (mkdir-p "Include/Scientific")
13468 (copy-recursively
13469 (string-append
13470 (assoc-ref inputs "python-scientific")
13471 "/include/python2.7/Scientific")
13472 "Include/Scientific"))))))
13473 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
13474 (synopsis "Python library for molecular simulation")
13475 (description "MMTK is a library for molecular simulations with an emphasis
13476on biomolecules. It provides widely used methods such as Molecular Dynamics
13477and normal mode analysis, but also basic routines for implementing new methods
13478for simulation and analysis. The library is currently not actively maintained
13479and works only with Python 2 and NumPy < 1.9.")
13480 (license license:cecill-c)))
13481
13482(define-public python-phonenumbers
13483 (package
13484 (name "python-phonenumbers")
13485 (version "8.9.1")
13486 (source
13487 (origin
13488 (method url-fetch)
13489 (uri (pypi-uri "phonenumbers" version))
13490 (sha256
13491 (base32
13492 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
13493 (build-system python-build-system)
13494 (home-page
13495 "https://github.com/daviddrysdale/python-phonenumbers")
13496 (synopsis
13497 "Python library for dealing with international phone numbers")
13498 (description
13499 "This package provides a Python port of Google's libphonenumber library.")
13500 (license license:asl2.0)))
13501
13502(define-public python2-phonenumbers
13503 (package-with-python2 python-phonenumbers))
13504
13505(define-public python-send2trash
13506 (package
13507 (name "python-send2trash")
d9b0216b 13508 (version "1.5.0")
44d10b1f 13509 (source
d9b0216b 13510 (origin (method git-fetch)
44d10b1f 13511 ;; Source tarball on PyPI doesn't include tests.
d9b0216b
RW
13512 (uri (git-reference
13513 (url "https://github.com/hsoft/send2trash.git")
13514 (commit version)))
13515 (file-name (git-file-name name version))
44d10b1f
RW
13516 (sha256
13517 (base32
d9b0216b 13518 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
44d10b1f
RW
13519 (build-system python-build-system)
13520 (arguments
13521 '(#:phases
13522 (modify-phases %standard-phases
13523 (add-before 'check 'pre-check
13524 (lambda _
13525 (mkdir-p "/tmp/foo")
13526 (setenv "HOME" "/tmp/foo")
13527 #t)))))
13528 (home-page "https://github.com/hsoft/send2trash")
13529 (synopsis "Send files to the user's @file{~/Trash} directory")
13530 (description "This package provides a Python library to send files to the
13531user's @file{~/Trash} directory.")
13532 (license license:bsd-3)))
13533
13534(define-public python2-send2trash
13535 (package
13536 (inherit (package-with-python2 python-send2trash))
13537 (arguments
13538 (substitute-keyword-arguments (package-arguments python-send2trash)
13539 ((#:phases phases)
13540 `(modify-phases ,phases
13541 (add-before 'check 'setenv
13542 (lambda _
13543 (setenv "PYTHONPATH"
13544 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
13545 #t))))))
13546 (properties `((python2-variant . ,(delay python-send2trash))))))
13547
13548(define-public python-yapf
13549 (package
13550 (name "python-yapf")
13551 (version "0.24.0")
13552 (source
13553 (origin
13554 (method url-fetch)
13555 (uri (pypi-uri "yapf" version))
13556 (sha256
13557 (base32
13558 "0anwby0ydmyzcsgjc5dn1ryddwvii4dq61vck447q0n96npnzfyf"))))
13559 (build-system python-build-system)
13560 (home-page "https://github.com/google/yapf")
13561 (synopsis "Formatter for Python code")
13562 (description "YAPF is a formatter for Python code. It's based off of
13563@dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
13564takes the code and reformats it to the best formatting that conforms to the
13565style guide, even if the original code didn't violate the style guide.")
13566 (license license:asl2.0)))
13567
13568(define-public python2-yapf
13569 (package-with-python2 python-yapf))
13570
13571(define-public python-gyp
13572 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
13573 (revision "0"))
13574 (package
13575 (name "python-gyp")
13576 ;; Google does not release versions,
13577 ;; based on second most recent commit date.
13578 (version (git-version "0.0.0" revision commit))
13579 (source
13580 (origin
13581 ;; Google does not release tarballs,
13582 ;; git checkout is needed.
13583 (method git-fetch)
13584 (uri (git-reference
13585 (url "https://chromium.googlesource.com/external/gyp")
13586 (commit commit)))
13587 (file-name (git-file-name name version))
13588 (sha256
13589 (base32
13590 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
13591 (build-system python-build-system)
13592 (home-page "https://gyp.gsrc.io/")
13593 (synopsis "GYP is a Meta-Build system")
13594 (description
13595 "GYP builds build systems for large, cross platform applications.
13596It can be used to generate XCode projects, Visual Studio projects, Ninja build
13597files, and Makefiles.")
13598 (license license:bsd-3))))
13599
13600(define-public python2-gyp
13601 (package-with-python2 python-gyp))
13602
13603(define-public python-whatever
13604 (package
13605 (name "python-whatever")
13606 (version "0.5")
13607 (source
13608 (origin
13609 (method url-fetch)
13610 (uri (string-append "https://github.com/Suor/whatever/archive/" version
13611 ".tar.gz"))
13612 (sha256
13613 (base32
13614 "1iqvnaf0zpc6b4rvbqq4xy45mszcscyzpzknv8wg6j84pbp22sap"))
13615 (file-name (string-append name "-" version ".tar.gz"))))
13616 (build-system python-build-system)
13617 (arguments
13618 `(#:phases
13619 (modify-phases %standard-phases
13620 (replace 'check
13621 (lambda _
13622 (invoke "py.test"))))))
13623 (native-inputs
13624 `(("python-pytest" ,python-pytest)))
13625 (home-page "http://github.com/Suor/whatever")
13626 (synopsis "Make anonymous functions by partial application of operators")
13627 (description "@code{whatever} provides an easy way to make anonymous
13628functions by partial application of operators.")
13629 (license license:bsd-3)))
13630
13631(define-public python2-whatever
13632 (package-with-python2 python-whatever))
13633
13634(define-public python-funcy
13635 (package
13636 (name "python-funcy")
9e396ab8 13637 (version "1.11")
44d10b1f
RW
13638 (source
13639 (origin
a85c6027
TGR
13640 (method git-fetch)
13641 (uri (git-reference
13642 (url "https://github.com/Suor/funcy.git")
13643 (commit version)))
44d10b1f 13644 (sha256
a85c6027
TGR
13645 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
13646 (file-name (git-file-name name version))))
44d10b1f
RW
13647 (build-system python-build-system)
13648 (arguments
13649 `(#:phases
13650 (modify-phases %standard-phases
13651 (replace 'check
13652 (lambda _
13653 (invoke "py.test"))))))
13654 (native-inputs
13655 `(("python-pytest" ,python-pytest)
13656 ("python-whatever" ,python-whatever)))
13657 (home-page "http://github.com/Suor/funcy")
13658 (synopsis "Functional tools")
13659 (description "@code{funcy} is a library that provides functional tools.
13660Examples are:
13661@enumerate
13662@item merge - Merges collections of the same type
13663@item walk - Type-preserving map
13664@item select - Selects a part of a collection
13665@item take - Takes the first n items of a collection
13666@item first - Takes the first item of a collection
13667@item remove - Predicated-removes items of a collection
13668@item concat - Concatenates two collections
13669@item flatten - Flattens a collection with subcollections
13670@item distinct - Returns only distinct items
13671@item split - Predicated-splits a collection
13672@item split_at - Splits a collection at a given item
13673@item group_by - Groups items by group
13674@item pairwise - Pairs off adjacent items
13675@item partial - Partially-applies a function
13676@item curry - Curries a function
13677@item compose - Composes functions
13678@item complement - Complements a predicate
13679@item all_fn - \"all\" with predicate
13680@end enumerate")
13681 (license license:bsd-3)))
13682
13683(define-public python2-funcy
13684 (package-with-python2 python-funcy))
13685
13686(define-public python-isoweek
13687 (package
13688 (name "python-isoweek")
13689 (version "1.3.3")
13690 (source
13691 (origin
13692 (method url-fetch)
13693 (uri (pypi-uri "isoweek" version))
13694 (sha256
13695 (base32
13696 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
13697 (build-system python-build-system)
13698 (home-page "https://github.com/gisle/isoweek")
13699 (synopsis "Objects representing a week")
13700 (description "The @code{isoweek} module provide the class Week that
13701implements the week definition of ISO 8601. This standard also defines
13702a notation for identifying weeks; yyyyWww (where the W is a literal).
13703Week instances stringify to this form.")
13704 (license license:bsd-3)))
13705
13706(define-public python2-isoweek
13707 (package-with-python2 python-isoweek))
13708
13709(define-public python-tokenize-rt
13710 (package
13711 (name "python-tokenize-rt")
13712 (version "2.0.1")
13713 (source
13714 (origin
13715 (method url-fetch)
13716 (uri (pypi-uri "tokenize-rt" version))
13717 (sha256
13718 (base32
13719 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
13720 (build-system python-build-system)
13721 (home-page "https://github.com/asottile/tokenize-rt")
13722 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
13723 (description
13724 "This Python library is a wrapper around @code{tokenize} from the Python
13725standard library. It provides two additional tokens @code{ESCAPED_NL} and
13726@code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
13727and @code{tokens_to_src} to roundtrip.")
13728 (license license:expat)))
13729
13730(define-public python-future-fstrings
13731 (package
13732 (name "python-future-fstrings")
13733 (version "0.4.1")
13734 (source
13735 (origin
13736 (method url-fetch)
13737 (uri (pypi-uri "future_fstrings" version))
13738 (sha256
13739 (base32
13740 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
13741 (build-system python-build-system)
13742 (propagated-inputs
13743 `(("python-tokenize-rt" ,python-tokenize-rt)))
13744 (home-page "https://github.com/asottile/future-fstrings")
13745 (synopsis "Backport of fstrings to Python < 3.6")
13746 (description
13747 "This package provides a UTF-8 compatible encoding
13748@code{future_fstrings}, which performs source manipulation. It decodes the
13749source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
13750@code{f} strings.")
13751 (license license:expat)))
13752
13753(define-public python-typing
13754 (package
13755 (name "python-typing")
13756 (version "3.6.6")
13757 (source
13758 (origin
13759 (method url-fetch)
13760 (uri (pypi-uri "typing" version))
13761 (sha256
13762 (base32
13763 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
13764 (build-system python-build-system)
13765 (home-page "https://docs.python.org/3/library/typing.html")
13766 (synopsis "Type hints for Python")
13767 (description "This is a backport of the standard library @code{typing}
13768module to Python versions older than 3.5. Typing defines a standard notation
13769for Python function and variable type annotations. The notation can be used
13770for documenting code in a concise, standard format, and it has been designed
13771to also be used by static and runtime type checkers, static analyzers, IDEs
13772and other tools.")
13773 (license license:psfl)))
13774
13775(define-public python2-typing
13776 (package-with-python2 python-typing))
13777
f89d443b
VC
13778(define-public python-typing-extensions
13779 (package
13780 (name "python-typing-extensions")
13781 (version "3.7.2")
13782 (source
13783 (origin
13784 (method url-fetch)
13785 (uri (pypi-uri "typing_extensions" version))
13786 (sha256
13787 (base32
13788 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
13789 (build-system python-build-system)
13790 (home-page
13791 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
13792 (synopsis "Experimental type hints for Python")
13793 (description
13794 "The typing_extensions module contains additional @code{typing} hints not
13795yet present in the of the @code{typing} standard library.
13796Included are implementations of:
13797@enumerate
13798@item ClassVar
13799@item ContextManager
13800@item Counter
13801@item DefaultDict
13802@item Deque
13803@item NewType
13804@item NoReturn
13805@item overload
13806@item Protocol
13807@item runtime
13808@item Text
13809@item Type
13810@item TYPE_CHECKING
13811@item AsyncGenerator
13812@end enumerate\n")
13813 (license license:psfl)))
13814
44d10b1f
RW
13815(define-public bpython
13816 (package
13817 (name "bpython")
13818 (version "0.17.1")
13819 (source
13820 (origin
13821 (method url-fetch)
13822 (uri (pypi-uri "bpython" version))
13823 (sha256
13824 (base32
13825 "0bxhxi5zxdkrf8b4gwn0d363kdz3qnypjwhm1aydki53ph8ca1w9"))))
13826 (build-system python-build-system)
13827 (arguments
13828 `(#:phases
13829 (modify-phases %standard-phases
13830 (add-after 'unpack 'remove-failing-test
13831 (lambda _
13832 ;; Remove failing test. FIXME: make it pass
13833 (delete-file "bpython/test/test_args.py")
13834 #t))
13835 (add-after 'wrap 'add-aliases
13836 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
13837 (lambda* (#:key outputs #:allow-other-keys)
13838 (let ((out (assoc-ref outputs "out")))
13839 (for-each
13840 (lambda (old new)
13841 (symlink old (string-append out "/bin/" new)))
13842 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
13843 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
13844 #t)))))
13845 (propagated-inputs
13846 `(("python-pygments" ,python-pygments)
13847 ("python-requests" ,python-requests)
13848 ("python-babel" ,python-babel) ; optional, for internationalization
13849 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
13850 ("python-greenlet" ,python-greenlet)
13851 ("python-urwid" ,python-urwid) ; for bpython-urwid only
13852 ("python-six" ,python-six)))
13853 (native-inputs
13854 `(("python-sphinx" ,python-sphinx)
13855 ("python-mock" ,python-mock)))
13856 (home-page "https://bpython-interpreter.org/")
13857 (synopsis "Fancy interface to the Python interpreter")
13858 (description "Bpython is a fancy interface to the Python
13859interpreter. bpython's main features are
13860
13861@enumerate
13862@item in-line syntax highlighting,
13863@item readline-like autocomplete with suggestions displayed as you type,
13864@item expected parameter list for any Python function,
13865@item \"rewind\" function to pop the last line of code from memory and
13866 re-evaluate,
13867@item send the code you've entered off to a pastebin,
13868@item save the code you've entered to a file, and
13869@item auto-indentation.
13870@end enumerate")
13871 (license license:expat)))
13872
13873(define-public bpython2
13874 (let ((base (package-with-python2
13875 (strip-python2-variant bpython))))
13876 (package (inherit base)
13877 (name "bpython2")
13878 (arguments
13879 `(#:python ,python-2
13880 #:phases
13881 (modify-phases %standard-phases
13882 (add-after 'unpack 'remove-failing-test
13883 (lambda _
13884 ;; Remove failing test. FIXME: make it pass
13885 (delete-file "bpython/test/test_args.py")
13886 ;; Disable failing test-cases (renaming inhibits they are
13887 ;; discovered)
13888 (substitute* "bpython/test/test_curtsies_repl.py"
13889 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
13890 (string-append a "xxx_off_" b))
13891 (("^(\\s*def )(test_complex\\W)" _ a b)
13892 (string-append a "xxx_off_" b)))
13893 #t))
13894 (add-before 'build 'rename-scripts
13895 ;; rename the scripts to bypthon2, bpdb2, etc.
13896 (lambda _
13897 (substitute* "setup.py"
13898 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
13899 (string-append name "2" rest "\n"))
13900 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
13901 (string-append name "2" (or sub "") rest "\n")))
13902 #t))))))))
13903
13904(define-public python-pyinotify
13905 (package
13906 (name "python-pyinotify")
13907 (version "0.9.6")
13908 (source (origin
13909 (method url-fetch)
13910 (uri (pypi-uri "pyinotify" version))
13911 (sha256
13912 (base32
13913 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
13914 (build-system python-build-system)
13915 (arguments `(#:tests? #f)) ;no tests
13916 (home-page "https://github.com/seb-m/pyinotify")
13917 (synopsis "Python library for monitoring inotify events")
13918 (description
13919 "@code{pyinotify} provides a Python interface for monitoring
13920file system events on Linux.")
13921 (license license:expat)))
13922
13923(define-public python2-pyinotify
13924 (package-with-python2 python-pyinotify))
13925
13926;; Ada parser uses this version.
13927(define-public python2-quex-0.67.3
13928 (package
13929 (name "python2-quex")
13930 (version "0.67.3")
13931 (source
13932 (origin
13933 (method url-fetch)
13934 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
13935 (version-major+minor version)
13936 "/quex-" version ".zip"))
13937 (sha256
13938 (base32
13939 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
13940 (build-system python-build-system)
13941 (native-inputs
13942 `(("unzip" ,unzip)))
13943 (arguments
13944 `(#:python ,python-2
13945 #:tests? #f
13946 #:phases
13947 (modify-phases %standard-phases
13948 (delete 'configure)
13949 (delete 'build)
13950 (replace 'install
13951 (lambda* (#:key outputs #:allow-other-keys)
13952 (let* ((out (assoc-ref outputs "out"))
13953 (share/quex (string-append out "/share/quex"))
13954 (bin (string-append out "/bin")))
13955 (copy-recursively "." share/quex)
13956 (mkdir-p bin)
13957 (symlink (string-append share/quex "/quex-exe.py")
13958 (string-append bin "/quex"))
13959 #t))))))
13960 (native-search-paths
13961 (list (search-path-specification
13962 (variable "QUEX_PATH")
13963 (files '("share/quex")))))
13964 (home-page "http://quex.sourceforge.net/")
13965 (synopsis "Lexical analyzer generator in Python")
13966 (description "@code{quex} is a lexical analyzer generator in Python.")
13967 (license license:lgpl2.1+))) ; Non-military
13968
13969(define-public python2-quex
13970 (package (inherit python2-quex-0.67.3)
13971 (name "python2-quex")
13972 (version "0.68.1")
13973 (source
13974 (origin
13975 (method url-fetch)
13976 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
13977 (sha256
13978 (base32
13979 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
13980 (file-name (string-append name "-" version ".tar.gz"))))))
13981
13982(define-public python-more-itertools
13983 (package
13984 (name "python-more-itertools")
13985 (version "4.3.0")
13986 (source
13987 (origin
13988 (method url-fetch)
13989 (uri (pypi-uri "more-itertools" version))
13990 (sha256
13991 (base32
13992 "17h3na0rdh8xq30w4b9pizgkdxmm51896bxw600x84jflg9vaxn4"))))
13993 (build-system python-build-system)
13994 (arguments
13995 `(,@(if (any (cute string-prefix? <> (or (%current-system)
13996 (%current-target-system)))
13997 '("armhf" "i686"))
13998 '(#:phases
13999 (modify-phases %standard-phases
14000 ;; This is required for 32-bit hardware.
14001 ;; TODO: Try to remove this when upgrading.
14002 (add-after 'unpack 'patch-test
14003 (lambda _
14004 (substitute* "more_itertools/tests/test_more.py"
14005 (("10 \\*\\* 10") "9 ** 9"))
14006 #t))))
14007 '())))
14008 (propagated-inputs
14009 `(("python-six" ,python-six-bootstrap)))
14010 (home-page "https://github.com/erikrose/more-itertools")
14011 (synopsis "More routines for operating on iterables, beyond itertools")
14012 (description "Python's built-in @code{itertools} module implements a
14013number of iterator building blocks inspired by constructs from APL, Haskell,
14014and SML. @code{more-itertools} includes additional building blocks for
14015working with iterables.")
14016 (license license:expat)))
14017
14018(define-public python2-more-itertools
14019 (package-with-python2 python-more-itertools))
14020
14021(define-public python-latexcodec
14022 (package
14023 (name "python-latexcodec")
14024 (version "1.0.5")
14025 (source
14026 (origin
14027 (method url-fetch)
14028 (uri (pypi-uri "latexcodec" version))
14029 (sha256
14030 (base32
14031 "0zdd1gf24i83ykadx0y30n3001j43scqr2saql3vckk5c39dj1wn"))))
14032 (build-system python-build-system)
14033 (inputs
14034 `(("python-six" ,python-six)))
14035 (home-page "https://readthedocs.org/projects/latexcodec/")
14036 (synopsis "Work with LaTeX code in Python")
14037 (description "Lexer and codec to work with LaTeX code in Python.")
14038 (license license:expat)))
14039
14040(define-public python-pybtex
14041 (package
14042 (name "python-pybtex")
14043 (version "0.21")
14044 (source
14045 (origin
14046 (method url-fetch)
14047 (uri (pypi-uri "pybtex" version))
14048 (sha256
14049 (base32
14050 "00300j8dn5pxq4ndxmfmbmycg2znawkqs49val2x6jlmfiy6r2mg"))))
14051 (build-system python-build-system)
14052 (native-inputs
14053 `(("python-nose" ,python-nose)))
14054 (inputs
14055 `(("python-latexcodec" ,python-latexcodec)
14056 ("python-pyyaml" ,python-pyyaml)
14057 ("python-six" ,python-six)))
14058 (arguments
14059 `(#:test-target "nosetests"))
14060 (home-page "https://pybtex.org/")
14061 (synopsis "BibTeX-compatible bibliography processor")
14062 (description "Pybtex is a BibTeX-compatible bibliography processor written
14063in Python. You can simply type pybtex instead of bibtex.")
14064 (license license:expat)))
14065
14066(define-public python-onetimepass
14067 (package
14068 (name "python-onetimepass")
14069 (version "1.0.1")
14070 (source
14071 (origin
14072 (method url-fetch)
14073 (uri (pypi-uri "onetimepass" version))
14074 (sha256
14075 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
14076 (build-system python-build-system)
14077 (propagated-inputs `(("python-six" ,python-six)))
14078 (home-page "https://github.com/tadeck/onetimepass/")
14079 (synopsis "One-time password library")
14080 (description "Python one-time password library for HMAC-based (HOTP) and
14081time-based (TOTP) passwords.")
14082 (license license:expat)))
14083
14084(define-public python-parso
14085 (package
14086 (name "python-parso")
14087 (version "0.3.1")
14088 (source
14089 (origin
14090 (method url-fetch)
14091 (uri (pypi-uri "parso" version))
14092 (sha256
14093 (base32
14094 "18p89iwcm8mnf380f92g9w0bhx5km8wxp392vvjcq4y1ld1llw1m"))))
14095 (native-inputs
14096 `(("python-pytest" ,python-pytest)))
14097 (build-system python-build-system)
14098 (home-page "https://github.com/davidhalter/parso")
14099 (synopsis "Python Parser")
14100 (description "Parso is a Python parser that supports error recovery and
14101round-trip parsing for different Python versions (in multiple Python versions).
14102Parso is also able to list multiple syntax errors in your Python file.")
14103 (license license:expat)))
14104
14105(define-public python2-parso
14106 (package-with-python2 python-parso))
14107
14108(define-public python-async-generator
14109 (package
14110 (name "python-async-generator")
94fcbf8d 14111 (version "1.10")
44d10b1f
RW
14112 (source
14113 (origin
14114 (method url-fetch)
14115 (uri (pypi-uri "async_generator" version))
14116 (sha256
14117 (base32
94fcbf8d 14118 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
44d10b1f
RW
14119 (build-system python-build-system)
14120 (native-inputs
14121 `(("python-pytest" ,python-pytest)))
14122 (home-page "https://github.com/python-trio/async_generator")
14123 (synopsis "Async generators and context managers for Python 3.5+")
14124 (description "@code{async_generator} back-ports Python 3.6's native async
14125generators and Python 3.7's context managers into Python 3.5.")
14126 ;; Dual licensed.
14127 (license (list license:expat license:asl2.0))))
14128
14129(define-public python-async-timeout
14130 (package
14131 (name "python-async-timeout")
14132 (version "3.0.1")
14133 (source
14134 (origin
14135 (method url-fetch)
14136 (uri (pypi-uri "async-timeout" version))
14137 (sha256
14138 (base32
14139 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
14140 (build-system python-build-system)
14141 (home-page "https://github.com/aio-libs/async_timeout/")
14142 (synopsis "Timeout context manager for asyncio programs")
14143 (description "@code{async-timeout} provides a timeout timeout context
14144manager compatible with @code{asyncio}.")
14145 (license license:asl2.0)))
14146
14147(define-public python-glob2
14148 (package
14149 (name "python-glob2")
14150 (version "0.6")
14151 (source (origin
14152 (method url-fetch)
14153 (uri (string-append
14154 "https://github.com/miracle2k/python-glob2/archive/"
14155 version
14156 ".tar.gz"))
14157 (sha256
14158 (base32
14159 "0ja168f0dz4kbz4m06dm0rd3acaypk6hjx2km541pw22y9s40mag"))
14160 (file-name (string-append name "-" version ".tar.gz"))))
14161 (build-system python-build-system)
14162 (home-page "https://github.com/miracle2k/python-glob2/")
14163 (synopsis "Extended Version of the python buildin glob module")
14164 (description "This is an extended version of the Python
14165@url{http://docs.python.org/library/glob.html, built-in glob module} which
14166adds:
14167
14168@itemize
14169@item The ability to capture the text matched by glob patterns, and return
14170those matches alongside the file names.
14171@item A recursive @code{**} globbing syntax, akin for example to the
14172@code{globstar} option of Bash.
14173@item The ability to replace the file system functions used, in order to glob
14174on virtual file systems.
14175@item Compatible with Python 2 and Python 3 (tested with 3.3).
14176@end itemize
14177
14178Glob2 currently based on the glob code from Python 3.3.1.")
14179 (license license:bsd-2)))
14180
14181(define-public python2-glob2
14182 (package-with-python2 python-glob2))
14183
14184(define-public python-gipc
14185 (package
14186 (name "python-gipc")
14187 (version "0.6.0")
14188 (source
14189 (origin
14190 (method url-fetch)
14191 (uri (pypi-uri "gipc" version ".zip"))
14192 (sha256
14193 (base32
14194 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
14195 (build-system python-build-system)
14196 (native-inputs
14197 `(("unzip" ,unzip)))
14198 (propagated-inputs
14199 `(("python-gevent" ,python-gevent)))
14200 (home-page "http://gehrcke.de/gipc")
14201 (synopsis "Child process management in the context of gevent")
14202 (description "Usage of Python's multiprocessing package in a
14203gevent-powered application may raise problems. With @code{gipc},
14204process-based child processes can safely be created anywhere within a
14205gevent-powered application.")
14206 (license license:expat)))
14207
14208(define-public python2-gipc
14209 (package-with-python2 python-gipc))
14210
14211(define-public python-fusepy
14212 (package
14213 (name "python-fusepy")
14214 (version "2.0.4")
14215 (source
14216 (origin
14217 (method url-fetch)
14218 (uri (pypi-uri "fusepy" version))
14219 (sha256
14220 (base32
14221 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
14222 (build-system python-build-system)
14223 (arguments
14224 `(#:phases
14225 (modify-phases %standard-phases
14226 (add-before 'build 'set-library-file-name
14227 (lambda* (#:key inputs #:allow-other-keys)
14228 (let ((fuse (assoc-ref inputs "fuse")))
14229 (substitute* "fuse.py"
14230 (("find_library\\('fuse'\\)")
14231 (string-append "'" fuse "/lib/libfuse.so'")))
14232 #t))))))
14233 (propagated-inputs
14234 `(("fuse" ,fuse)))
14235 (home-page "https://github.com/fusepy/fusepy")
14236 (synopsis "Simple ctypes bindings for FUSE")
14237 (description "Python module that provides a simple interface to FUSE and
14238MacFUSE. The binding is created using the standard @code{ctypes} library.")
14239 (license license:isc)))
14240
14241(define-public python2-fusepy
14242 (package-with-python2 python-fusepy))
14243
14244(define-public python2-gdrivefs
14245 (package
14246 (name "python2-gdrivefs")
14247 (version "0.14.9")
14248 (source
14249 (origin
14250 (method url-fetch)
14251 (uri (pypi-uri "gdrivefs" version))
14252 (sha256
14253 (base32
14254 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
14255 (build-system python-build-system)
14256 (arguments
14257 `(#:python ,python-2
14258 #:phases
14259 (modify-phases %standard-phases
14260 (add-before 'build 'patch-setup-py
14261 (lambda _
14262 ;; Update requirements from dependency==version
14263 ;; to dependency>=version
14264 (substitute* "gdrivefs/resources/requirements.txt"
14265 (("==") ">="))
14266 #t)))))
14267 (native-inputs
14268 `(("python2-gipc" ,python2-gipc)
14269 ("python2-gevent" ,python2-gevent)
14270 ("python2-greenlet" ,python2-greenlet)
14271 ("python2-httplib2" ,python2-httplib2)
14272 ("python2-uritemplate" ,python2-uritemplate)
14273 ("python2-oauth2client" ,python2-oauth2client)
14274 ("python2-six" ,python2-six)))
14275 (propagated-inputs
14276 `(("python2-dateutil" ,python2-dateutil)
14277 ("python2-fusepy" ,python2-fusepy)
14278 ("python2-google-api-client" ,python2-google-api-client)))
14279 (home-page "https://github.com/dsoprea/GDriveFS")
14280 (synopsis "Mount Google Drive as a local file system")
14281 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
14282under Python 2.7.")
14283 (license license:gpl2)))
14284
14285(define-public pybind11
14286 (package
14287 (name "pybind11")
14288 (version "2.2.4")
14289 (source (origin
14290 (method git-fetch)
14291 (uri (git-reference
14292 (url "https://github.com/pybind/pybind11.git")
14293 (commit (string-append "v" version))))
14294 (sha256
14295 (base32
14296 "0pa79ymcasv8br5ifbx7878id5py2jpjac3i20cqxr6gs9l6ivlv"))
14297 (file-name (git-file-name name version))))
14298 (build-system cmake-build-system)
14299 (native-inputs
14300 `(("python" ,python)
14301 ("python-pytest" ,python-pytest)))
14302 (arguments
14303 `(#:test-target "check"))
14304 (home-page "https://github.com/pybind/pybind11/")
14305 (synopsis "Seamless operability between C++11 and Python")
14306 (description "pybind11 is a lightweight header-only library that exposes
14307C++ types in Python and vice versa, mainly to create Python bindings of
14308existing C++ code. Its goals and syntax are similar to the excellent
14309Boost.Python library by David Abrahams: to minimize boilerplate code in
14310traditional extension modules by inferring type information using compile-time
14311introspection.")
14312 (license license:expat)))
14313
14314(define-public python-fasteners
14315 (package
14316 (name "python-fasteners")
14317 (version "0.14.1")
14318 (source
14319 (origin
14320 (method url-fetch)
14321 (uri (pypi-uri "fasteners" version))
14322 (sha256
14323 (base32
14324 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
14325 (build-system python-build-system)
14326 (propagated-inputs
14327 `(("python-monotonic" ,python-monotonic)
14328 ("python-six" ,python-six)
14329 ("python-testtools" ,python-testtools)))
14330 (home-page "https://github.com/harlowja/fasteners")
14331 (synopsis "Python package that provides useful locks")
14332 (description
14333 "This package provides a Python program that provides following locks:
14334
14335@itemize
14336@item Locking decorator
14337@item Reader-writer locks
14338@item Inter-process locks
14339@item Generic helpers
14340@end itemize\n")
14341 (properties `((python2-variant . ,(delay python2-fasteners))))
14342 (license license:asl2.0)))
14343
14344(define-public python2-fasteners
14345 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
14346 (package
14347 (inherit base)
14348 (propagated-inputs
14349 `(("python2-futures" ,python2-futures)
14350 ,@(package-propagated-inputs base))))))
14351
14352(define-public python-requests-file
14353 (package
14354 (name "python-requests-file")
14355 (version "1.4.3")
14356 (source
14357 (origin
14358 (method url-fetch)
14359 (uri (pypi-uri "requests-file" version))
14360 (sha256
14361 (base32
14362 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
14363 (build-system python-build-system)
14364 (propagated-inputs
14365 `(("python-requests" ,python-requests)
14366 ("python-six" ,python-six)))
14367 (home-page
14368 "https://github.com/dashea/requests-file")
14369 (synopsis "File transport adapter for Requests")
14370 (description
14371 "Requests-File is a transport adapter for use with the Requests Python
14372library to allow local filesystem access via file:// URLs.")
14373 (license license:asl2.0)))
14374
14375(define-public python2-requests-file
14376 (package-with-python2 python-requests-file))
14377
14378(define-public python-tldextract
14379 (package
14380 (name "python-tldextract")
14381 (version "2.2.0")
14382 (source
14383 (origin
14384 (method url-fetch)
14385 (uri (pypi-uri "tldextract" version))
14386 (sha256
14387 (base32
14388 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
14389 (build-system python-build-system)
14390 (native-inputs
14391 `(("python-pytest" ,python-pytest)
14392 ("python-responses" ,python-responses)))
14393 (propagated-inputs
14394 `(("python-idna" ,python-idna)
14395 ("python-requests" ,python-requests)
14396 ("python-requests-file" ,python-requests-file)))
14397 (home-page
14398 "https://github.com/john-kurkowski/tldextract")
14399 (synopsis
14400 "Separate the TLD from the registered domain and subdomains of a URL")
14401 (description
14402 "TLDExtract accurately separates the TLD from the registered domain and
14403subdomains of a URL, using the Public Suffix List. By default, this includes
14404the public ICANN TLDs and their exceptions. It can optionally support the
14405Public Suffix List's private domains as well.")
14406 (license license:bsd-3)))
14407
14408(define-public python2-tldextract
14409 (package-with-python2 python-tldextract))
14410
14411(define-public python-pynamecheap
14412 (package
14413 (name "python-pynamecheap")
14414 (version "0.0.3")
14415 (source
14416 (origin
14417 (method url-fetch)
14418 (uri (pypi-uri "PyNamecheap" version))
14419 (sha256
14420 (base32
14421 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
14422 (build-system python-build-system)
14423 (propagated-inputs
14424 `(("python-requests" ,python-requests)))
14425 (home-page
14426 "https://github.com/Bemmu/PyNamecheap")
14427 (synopsis
14428 "Namecheap API client in Python")
14429 (description
14430 "PyNamecheap is a Namecheap API client in Python.")
14431 (license license:expat)))
14432
14433(define-public python2-pynamecheap
14434 (package-with-python2 python-pynamecheap))
14435
14436(define-public python-dns-lexicon
14437 (package
14438 (name "python-dns-lexicon")
14439 (version "2.4.0")
14440 (source
14441 (origin
14442 (method url-fetch)
14443 (uri (pypi-uri "dns-lexicon" version))
14444 (sha256
14445 (base32
14446 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
14447 (build-system python-build-system)
14448 (arguments
14449 `(#:tests? #f)) ;requires internet access
14450 (propagated-inputs
14451 `(("python-future" ,python-future)
14452 ("python-pynamecheap" ,python-pynamecheap)
14453 ("python-requests" ,python-requests)
14454 ("python-tldextract" ,python-tldextract)
14455 ("python-urllib3" ,python-urllib3)))
14456 (home-page "https://github.com/AnalogJ/lexicon")
14457 (synopsis
14458 "Manipulate DNS records on various DNS providers")
14459 (description
14460 "Lexicon provides a way to manipulate DNS records on multiple DNS
14461providers in a standardized way. It has a CLI but it can also be used as a
14462Python library. It was designed to be used in automation, specifically with
14463Let's Encrypt.")
14464 (license license:expat)))
14465
14466(define-public python2-dns-lexicon
14467 (package-with-python2 python-dns-lexicon))
14468
14469(define-public python-commandlines
14470 (package
14471 (name "python-commandlines")
14472 (version "0.4.1")
14473 (source
14474 (origin
14475 (method url-fetch)
14476 (uri (pypi-uri "commandlines" version))
14477 (sha256
14478 (base32
14479 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
14480 (build-system python-build-system)
14481 (home-page "https://github.com/chrissimpkins/commandlines")
14482 (synopsis "Command line argument to object parsing library")
14483 (description
14484 "@code{Commandlines} is a Python library for command line application
14485development that supports command line argument parsing, command string
14486validation testing and application logic.")
14487 (license license:expat)))
14488
14489;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
14490;; python-numba. They have a very unflexible relationship.
14491(define-public python-numba
14492 (package
14493 (name "python-numba")
7757e6d8 14494 (version "0.42.0")
44d10b1f
RW
14495 (source
14496 (origin
14497 (method url-fetch)
14498 (uri (pypi-uri "numba" version))
14499 (sha256
14500 (base32
7757e6d8 14501 "03rqdfx0512lcri2bcpngx5k3jwfbqnanqj3n19c7d6h6hqxvq9x"))))
44d10b1f
RW
14502 (build-system python-build-system)
14503 (arguments
14504 `(#:modules ((guix build utils)
14505 (guix build python-build-system)
14506 (ice-9 ftw)
14507 (srfi srfi-1)
14508 (srfi srfi-26))
14509 #:phases
14510 (modify-phases %standard-phases
14511 (add-after 'unpack 'disable-proprietary-features
14512 (lambda _
14513 (setenv "NUMBA_DISABLE_HSA" "1")
14514 (setenv "NUMBA_DISABLE_CUDA" "1")
14515 #t))
14516 (add-after 'unpack 'remove-failing-tests
14517 (lambda _
14518 ;; FIXME: these tests fail for unknown reasons:
14519 ;; test_non_writable_pycache, test_non_creatable_pycache, and
14520 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
14521 (substitute* "numba/tests/test_dispatcher.py"
14522 (("def test(_non_writable_pycache)" _ m)
14523 (string-append "def guix_skip" m))
14524 (("def test(_non_creatable_pycache)" _ m)
14525 (string-append "def guix_skip" m))
14526 (("def test(_frozen)" _ m)
14527 (string-append "def guix_skip" m)))
14528
14529 ;; These tests fail because we don't run the tests from the build
14530 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
14531 ;; They ar in numba.tests.test_pycc.TestDistutilsSupport.
14532 (substitute* "numba/tests/test_pycc.py"
14533 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
14534 (string-append "def guix_skip" m)))
14535 #t))
14536 (replace 'check
14537 (lambda _
14538 (let ((cwd (getcwd)))
14539 (setenv "PYTHONPATH"
14540 (string-append cwd "/build/"
14541 (find (cut string-prefix? "lib" <>)
14542 (scandir (string-append cwd "/build")))
14543 ":"
14544 (getenv "PYTHONPATH")))
14545 ;; Something is wrong with the PYTHONPATH when running the
14546 ;; tests from the build directory, as it complains about not being
14547 ;; able to import certain modules.
14548 (with-directory-excursion "/tmp"
14549 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
14550 #t)))))
14551 (propagated-inputs
14552 `(("python-llvmlite" ,python-llvmlite)
14553 ("python-numpy" ,python-numpy)
14554 ("python-singledispatch" ,python-singledispatch)))
14555 ;; Needed for tests.
14556 (inputs
14557 `(("python-jinja2" ,python-jinja2)
14558 ("python-pygments" ,python-pygments)))
14559 (home-page "https://numba.pydata.org")
14560 (synopsis "Compile Python code using LLVM")
14561 (description "Numba gives you the power to speed up your applications with
14562high performance functions written directly in Python. With a few
14563annotations, array-oriented and math-heavy Python code can be just-in-time
14564compiled to native machine instructions, similar in performance to C, C++ and
14565Fortran, without having to switch languages or Python interpreters.
14566
14567Numba works by generating optimized machine code using the LLVM compiler
14568infrastructure at import time, runtime, or statically (using the included pycc
14569tool).")
14570 (license license:bsd-3)))
14571
14572(define-public python-anndata
14573 (package
14574 (name "python-anndata")
14575 (version "0.6.9")
14576 (source
14577 (origin
14578 (method url-fetch)
14579 (uri (pypi-uri "anndata" version))
14580 (sha256
14581 (base32
14582 "1fh461xyyc7pcrjfgd013bdc2alf53r46ss3gfw3431mbb1gappi"))))
14583 (build-system python-build-system)
14584 (propagated-inputs
14585 `(("python-h5py" ,python-h5py)
14586 ("python-natsort" ,python-natsort)
14587 ("python-pandas" ,python-pandas)
14588 ("python-scipy" ,python-scipy)))
14589 (home-page "https://github.com/theislab/anndata")
14590 (synopsis "Annotated data for data analysis pipelines")
14591 (description "Anndata is a package for simple (functional) high-level APIs
14592for data analysis pipelines. In this context, it provides an efficient,
14593scalable way of keeping track of data together with learned annotations and
14594reduces the code overhead typically encountered when using a mostly
14595object-oriented library such as @code{scikit-learn}.")
14596 (license license:bsd-3)))
14597
14598(define-public python-dill
14599 (package
14600 (name "python-dill")
14601 (version "0.2.8.2")
14602 (source
14603 (origin
14604 (method url-fetch)
14605 (uri (pypi-uri "dill" version))
14606 (sha256
14607 (base32
14608 "1cymzn9fxwdy33h21zkk4gqgzvd25110hh3zdqnvnwa3p52c4kb2"))))
14609 (build-system python-build-system)
14610 ;; FIXME: The check phase fails with "don't know how to make test".
14611 (arguments '(#:tests? #f))
14612 (home-page "https://pypi.org/project/dill")
14613 (synopsis "Serialize all of Python")
14614 (description "Dill extends Python's @code{pickle} module for serializing
14615and de-serializing Python objects to the majority of the built-in Python
14616types. Dill provides the user the same interface as the @code{pickle} module,
14617and also includes some additional features. In addition to pickling Python
14618objects, @code{dill} provides the ability to save the state of an interpreter
14619session in a single command. Hence, it would be feasable to save a
14620interpreter session, close the interpreter, ship the pickled file to another
14621computer, open a new interpreter, unpickle the session and thus continue from
14622the saved state of the original interpreter session.")
14623 (license license:bsd-3)))
14624
14625(define-public python-multiprocess
14626 (package
14627 (name "python-multiprocess")
14628 (version "0.70.6.1")
14629 (source
14630 (origin
14631 (method url-fetch)
14632 (uri (pypi-uri "multiprocess" version))
14633 (sha256
14634 (base32
14635 "1ip5caz67b3q0553mr8gm8xwsb8x500jn8ml0gihgyfy52m2ypcq"))))
14636 (build-system python-build-system)
14637 (propagated-inputs
14638 `(("python-dill" ,python-dill)))
14639 (home-page "https://pypi.org/project/multiprocess")
14640 (synopsis "Multiprocessing and multithreading in Python")
14641 (description
14642 "This package is a fork of the multiprocessing Python package, a package
14643which supports the spawning of processes using the API of the standard
14644library's @code{threading} module.")
14645 (license license:bsd-3)))
14646
14647(define-public python-toolz
14648 (package
14649 (name "python-toolz")
14650 (version "0.9.0")
14651 (source
14652 (origin
14653 (method url-fetch)
14654 (uri (pypi-uri "toolz" version))
14655 (sha256
14656 (base32
14657 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
14658 (build-system python-build-system)
14659 ;; FIXME: tests cannot be computed: "Can't perform this operation for
14660 ;; unregistered loader type"
14661 (arguments '(#:tests? #f))
14662 (home-page "https://github.com/pytoolz/toolz/")
14663 (synopsis "List processing tools and functional utilities")
14664 (description
14665 "This package provides a set of utility functions for iterators,
14666functions, and dictionaries.")
14667 (license license:bsd-3)))
14668
14669(define-public python2-toolz
14670 (package-with-python2 python-toolz))
14671
14672(define-public python-cytoolz
14673 (package
14674 (name "python-cytoolz")
14675 (version "0.9.0.1")
14676 (source
14677 (origin
14678 (method url-fetch)
14679 (uri (pypi-uri "cytoolz" version))
14680 (sha256
14681 (base32
14682 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
14683 (build-system python-build-system)
14684 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
14685 ;; 'exceptions'"
14686 (arguments '(#:tests? #f))
14687 (propagated-inputs
14688 `(("python-toolz" ,python-toolz)))
14689 (native-inputs
14690 `(("python-cython" ,python-cython)))
14691 (home-page "https://github.com/pytoolz/cytoolz")
14692 (synopsis "High performance functional utilities")
14693 (description
14694 "The cytoolz package implements the same API as provided by toolz. The
14695main differences are that @code{cytoolz} is faster and cytoolz offers a C API
14696that is accessible to other projects developed in Cython.")
14697 (license license:bsd-3)))
14698
14699(define-public python-sortedcontainers
14700 (package
14701 (name "python-sortedcontainers")
14702 (version "2.0.4")
14703 (source
14704 (origin
14705 (method url-fetch)
14706 (uri (pypi-uri "sortedcontainers" version))
14707 (sha256
14708 (base32
14709 "10hrk2k0hbf9x78vd3f0lj277m1yzfhzzxr0hja718liwb398wk0"))))
14710 (build-system python-build-system)
14711 (native-inputs
14712 `(("python-tox" ,python-tox)))
14713 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
14714 (synopsis "Sorted List, Sorted Dict, Sorted Set")
14715 (description
14716 "This package provides a sorted collections library, written in
14717pure-Python.")
14718 (license license:asl2.0)))
14719
14720(define-public python-cloudpickle
14721 (package
14722 (name "python-cloudpickle")
14723 (version "0.6.1")
14724 (source
14725 (origin
14726 (method url-fetch)
14727 (uri (pypi-uri "cloudpickle" version))
14728 (sha256
14729 (base32
14730 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
14731 (build-system python-build-system)
14732 ;; FIXME: there are 5 errors in 122 tests:
14733 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
14734 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
14735 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
14736 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
14737 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
14738 ;; TypeError: cannot serialize '_io.BufferedRandom' object
14739 (arguments '(#:tests? #f))
14740 (native-inputs
14741 `(("python-pytest" ,python-pytest)
14742 ("python-mock" ,python-mock)
14743 ("python-tornado" ,python-tornado)))
14744 (home-page "https://github.com/cloudpipe/cloudpickle")
14745 (synopsis "Extended pickling support for Python objects")
14746 (description
14747 "Cloudpickle makes it possible to serialize Python constructs not
14748supported by the default pickle module from the Python standard library. It
14749is especially useful for cluster computing where Python expressions are
14750shipped over the network to execute on remote hosts, possibly close to the
14751data.")
14752 (license license:bsd-3)))
14753
14754(define-public python2-cloudpickle
14755 (package-with-python2 python-cloudpickle))
14756
14757(define-public python-locket
14758 (package
14759 (name "python-locket")
14760 (version "0.2.0")
14761 (source
14762 (origin
14763 (method url-fetch)
14764 (uri (pypi-uri "locket" version))
14765 (sha256
14766 (base32
14767 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
14768 (build-system python-build-system)
14769 (home-page "https://github.com/mwilliamson/locket.py")
14770 (synopsis "File-based locks for Python")
14771 (description
14772 "Locket implements a lock that can be used by multiple processes provided
14773they use the same path.")
14774 (license license:bsd-2)))
14775
14776(define-public python2-locket
14777 (package-with-python2 python-locket))
14778
14779(define-public python-blosc
14780 (package
14781 (name "python-blosc")
14782 (version "1.5.1")
14783 (source
14784 (origin
14785 (method url-fetch)
14786 (uri (pypi-uri "blosc" version))
14787 (sha256
14788 (base32
14789 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
14790 (build-system python-build-system)
14791 ;; FIXME: all tests pass, but then this error is printed:
14792 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
14793 (arguments '(#:tests? #f))
14794 (propagated-inputs
14795 `(("python-numpy" ,python-numpy)))
14796 (home-page "https://github.com/blosc/python-blosc")
14797 (synopsis "Python wrapper for the Blosc data compressor library")
14798 (description "Blosc is a high performance compressor optimized for binary
14799data. It has been designed to transmit data to the processor cache faster
14800than the traditional, non-compressed, direct memory fetch approach via a
14801@code{memcpy()} system call.
14802
14803Blosc works well for compressing numerical arrays that contains data with
14804relatively low entropy, like sparse data, time series, grids with
14805regular-spaced values, etc.
14806
14807This Python package wraps the Blosc library.")
14808 (license license:bsd-3)))
14809
14810(define-public python2-blosc
14811 (package-with-python2 python-blosc))
14812
14813(define-public python-partd
14814 (package
14815 (name "python-partd")
14816 (version "0.3.9")
14817 (source
14818 (origin
14819 (method url-fetch)
14820 (uri (pypi-uri "partd" version))
14821 (sha256
14822 (base32
14823 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
14824 (build-system python-build-system)
14825 (propagated-inputs
14826 `(("python-blosc" ,python-blosc)
14827 ("python-locket" ,python-locket)
14828 ("python-numpy" ,python-numpy)
14829 ("python-pandas" ,python-pandas)
14830 ("python-pyzmq" ,python-pyzmq)
14831 ("python-toolz" ,python-toolz)))
14832 (home-page "https://github.com/dask/partd/")
14833 (synopsis "Appendable key-value storage")
14834 (description "Partd stores key-value pairs. Values are raw bytes. We
14835append on old values. Partd excels at shuffling operations.")
14836 (license license:bsd-3)))
14837
14838(define-public python2-partd
14839 (package-with-python2 python-partd))
14840
14841(define-public python-dask
14842 (package
14843 (name "python-dask")
755226e9 14844 (version "1.1.4")
44d10b1f
RW
14845 (source
14846 (origin
14847 (method url-fetch)
14848 (uri (pypi-uri "dask" version))
14849 (sha256
14850 (base32
755226e9 14851 "1hrnfz4pzawikz9b622vjz2500n7hs25nz9msy1k8l4g7l2kr6ky"))))
44d10b1f
RW
14852 (build-system python-build-system)
14853 ;; A single test out of 5000+ fails. This test is marked as xfail when
14854 ;; pytest-xdist is used.
14855 (arguments
14856 `(#:phases
14857 (modify-phases %standard-phases
14858 (add-after 'unpack 'disable-broken-test
14859 (lambda _
14860 (substitute* "dask/tests/test_threaded.py"
14861 (("def test_interrupt\\(\\)" m)
14862 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
14863 m)))
14864 (when (which "python2")
14865 ;; This test fails with recent Pandas:
14866 ;; <https://github.com/dask/dask/issues/3794>.
14867 (substitute* "dask/dataframe/tests/test_dataframe.py"
14868 (("def test_info\\(\\)" m)
14869 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
14870 m))))
14871 #t))
14872 (replace 'check
14873 (lambda _ (invoke "pytest" "-vv"))))))
14874 (propagated-inputs
14875 `(("python-cloudpickle" ,python-cloudpickle)
14876 ("python-numpy" ,python-numpy)
14877 ("python-pandas" ,python-pandas)
14878 ("python-partd" ,python-partd)
14879 ("python-toolz" ,python-toolz)
14880 ("python-pyyaml" ,python-pyyaml)))
14881 (native-inputs
14882 `(("python-pytest" ,python-pytest)
14883 ("python-pytest-runner" ,python-pytest-runner)))
14884 (home-page "https://github.com/dask/dask/")
14885 (synopsis "Parallel computing with task scheduling")
14886 (description
14887 "Dask is a flexible parallel computing library for analytics. It
14888consists of two components: dynamic task scheduling optimized for computation,
14889and large data collections like parallel arrays, dataframes, and lists that
14890extend common interfaces like NumPy, Pandas, or Python iterators to
14891larger-than-memory or distributed environments. These parallel collections
14892run on top of the dynamic task schedulers. ")
14893 (license license:bsd-3)))
14894
14895(define-public python2-dask
14896 (package-with-python2 python-dask))
14897
14898(define-public python-ilinkedlist
14899 (package
14900 (name "python-ilinkedlist")
14901 (version "0.4.0")
14902 (source
14903 (origin
14904 (method url-fetch)
14905 (uri (pypi-uri "ilinkedlist" version))
14906 (sha256
14907 (base32
14908 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
14909 (build-system python-build-system)
14910 (native-inputs `(("python-pytest" ,python-pytest)))
14911 (inputs `(("python" ,python)))
14912 (home-page "https://github.com/luther9/ilinkedlist-py")
14913 (synopsis "Immutable linked list library")
14914 (description
14915 "This is a implementation of immutable linked lists for Python. It
14916contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
14917Since a linked list is treated as immutable, it is hashable, and its length
14918can be retrieved in constant time. Some of the terminology is inspired by
14919LISP. It is possible to create an improper list by creating a @code{Pair}
14920with a non-list @code{cdr}.")
14921 (license license:gpl3+)))
14922
14923(define-public python-readlike
14924 (package
14925 (name "python-readlike")
14926 (version "0.1.3")
14927 (source
14928 (origin
14929 (method url-fetch)
14930 (uri (pypi-uri "readlike" version))
14931 (sha256
14932 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
14933 (build-system python-build-system)
14934 (home-page "https://github.com/jangler/readlike")
14935 (synopsis "GNU Readline-like line editing module")
14936 (description
14937 "This Python module provides line editing functions similar to the default
14938Emacs-style ones of GNU Readline. Unlike the Python standard library's
14939@code{readline} package, this one allows access to those capabilties in settings
14940outside of a standard command-line interface. It is especially well-suited to
14941interfacing with Urwid, due to a shared syntax for describing key inputs.
14942
14943Currently, all stateless Readline commands are implemented. Yanking and history
14944are not supported.")
14945 (license license:expat)))
14946
14947(define-public python2-readlike
14948 (package-with-python2 python-readlike))
14949
14950(define-public python-reparser
14951 (package
14952 (name "python-reparser")
14953 (version "1.4.3")
14954 (source
14955 (origin
14956 (method url-fetch)
14957 (uri (pypi-uri "ReParser" version))
14958 (sha256
14959 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
14960 (build-system python-build-system)
14961 (home-page "https://github.com/xmikos/reparser")
14962 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
14963 (description
14964 "This Python library provides a simple lexer/parser for inline markup based
14965on regular expressions.")
14966 (license license:expat)))
14967
14968(define-public python2-reparser
14969 (let ((reparser (package-with-python2
14970 (strip-python2-variant python-reparser))))
14971 (package (inherit reparser)
14972 (propagated-inputs
14973 `(("python2-enum34" ,python2-enum34)
14974 ,@(package-propagated-inputs reparser))))))
14975
14976(define-public python-precis-i18n
14977 (package
14978 (name "python-precis-i18n")
14979 (version "1.0.0")
14980 (source
14981 (origin
14982 (method url-fetch)
14983 (uri (pypi-uri "precis_i18n" version))
14984 (sha256
14985 (base32
14986 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
14987 (build-system python-build-system)
14988 (home-page "https://github.com/byllyfish/precis_i18n")
14989 (synopsis "Implementation of the PRECIS framework")
14990 (description
14991 "This module implements the PRECIS Framework as described in RFC 8264,
14992RFC 8265 and RFC 8266.")
14993 (license license:expat)))
14994
d0446c4b
RW
14995(define-public python-absl-py
14996 (package
14997 (name "python-absl-py")
14998 (version "0.6.1")
14999 (source
15000 (origin
15001 (method url-fetch)
15002 (uri (pypi-uri "absl-py" version))
15003 (sha256
15004 (base32
15005 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
15006 (build-system python-build-system)
15007 (propagated-inputs
15008 `(("python-six" ,python-six)))
15009 (home-page "https://github.com/abseil/abseil-py")
15010 (synopsis "Abseil Python common libraries")
15011 (description
15012 "This package provides the Abseil Python Common Libraries, a collection
15013of Python libraries for building Python applications.")
15014 (license license:asl2.0)))
15015
81bed4e9
RW
15016(define-public python-astor
15017 (package
15018 (name "python-astor")
15019 (version "0.7.1")
15020 (source
15021 (origin
15022 (method url-fetch)
15023 (uri (pypi-uri "astor" version))
15024 (sha256
15025 (base32
15026 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
15027 (build-system python-build-system)
15028 ;; FIXME: There are two errors and two test failures.
15029 (arguments `(#:tests? #f))
15030 (home-page "https://github.com/berkerpeksag/astor")
39ee82ff 15031 (synopsis "Read and write Python ASTs")
81bed4e9 15032 (description "Astor is designed to allow easy manipulation of Python
39ee82ff 15033source via the Abstract Syntax Tree.")
81bed4e9
RW
15034 (license license:bsd-3)))
15035
39ee82ff
RW
15036(define-public python2-astor
15037 (package-with-python2 python-astor))
15038
22e623ae
RW
15039(define-public python-grpcio
15040 (package
15041 (name "python-grpcio")
15042 (version "1.17.1")
15043 (source
15044 (origin
15045 (method url-fetch)
15046 (uri (pypi-uri "grpcio" version))
15047 (sha256
15048 (base32
15049 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
15050 (build-system python-build-system)
15051 (propagated-inputs
15052 `(("python-six" ,python-six)))
15053 (home-page "https://grpc.io")
15054 (synopsis "HTTP/2-based RPC framework")
15055 (description "This package provides a Python library for communicating
15056with the HTTP/2-based RPC framework gRPC.")
15057 (license license:asl2.0)))
15058
79869f80
RW
15059(define-public python-astunparse
15060 (package
15061 (name "python-astunparse")
15062 (version "1.6.1")
15063 (source
15064 (origin
15065 (method url-fetch)
15066 (uri (pypi-uri "astunparse" version))
15067 (sha256
15068 (base32
15069 "1jhidwyrqn17avqh9xnnm3wd7q7aahaq009cba67g86y6gxicyyj"))))
15070 (build-system python-build-system)
15071 (arguments '(#:tests? #f)) ; there are none
15072 (propagated-inputs
15073 `(("python-six" ,python-six)
15074 ("python-wheel" ,python-wheel)))
15075 (home-page "https://github.com/simonpercivall/astunparse")
15076 (synopsis "AST unparser for Python")
15077 (description "This package provides an AST unparser for Python. It is a
15078factored out version of @code{unparse} found in the Python source
15079distribution.")
15080 (license license:bsd-3)))
15081
2884aac0
RW
15082(define-public python-gast
15083 (package
15084 (name "python-gast")
15085 (version "0.2.0")
15086 (source
15087 (origin
15088 (method url-fetch)
15089 (uri (pypi-uri "gast" version))
15090 (sha256
15091 (base32
15092 "0c296xm1vz9x4w4inmdl0k8mnc0i9arw94si2i7pglpc461r0s3h"))))
15093 (build-system python-build-system)
15094 (propagated-inputs
15095 `(("python-astunparse" ,python-astunparse)))
15096 (home-page "https://pypi.org/project/gast/")
15097 (synopsis "Generic Python AST that abstracts the underlying Python version")
15098 (description
15099 "GAST provides a compatibility layer between the AST of various Python
15100versions, as produced by @code{ast.parse} from the standard @code{ast}
15101module.")
15102 (license license:bsd-3)))
15103
44d10b1f
RW
15104(define-public python-wikidata
15105 (package
15106 (name "python-wikidata")
15107 (version "0.6.1")
15108 (source
15109 (origin
15110 (method url-fetch)
15111 (uri (pypi-uri "Wikidata" version))
15112 (sha256
15113 (base32
15114 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
15115 (build-system python-build-system)
15116 (propagated-inputs
15117 `(("python-babel" ,python-babel)))
15118 (home-page "https://github.com/dahlia/wikidata")
15119 (synopsis "Wikidata client library")
15120 (description
15121 "This package provides a Python interface to
15122@url{https://www.wikidata.org/, Wikidata}.")
15123 (properties '((upstream-name . "Wikidata")))
15124 (license license:gpl3+)))
15125
15126(define-public python-doctest-ignore-unicode
15127 (package
15128 (name "python-doctest-ignore-unicode")
15129 (version "0.1.2")
15130 (source
15131 (origin
15132 (method url-fetch)
15133 (uri (pypi-uri "doctest-ignore-unicode" version))
15134 (sha256
15135 (base32
15136 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
15137 (build-system python-build-system)
15138 (native-inputs
15139 `(("python-nose" ,python-nose)))
15140 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
15141 (synopsis "Ignore Unicode literal prefixes in doctests")
15142 (description
15143 "This package adds support for a flag to ignore Unicode literal prefixes
15144in doctests.")
15145 (license license:asl2.0)))
15146
15147(define-public python-attr
15148 (package
15149 (name "python-attr")
15150 (version "0.3.1")
15151 (source
15152 (origin
15153 (method url-fetch)
15154 (uri (pypi-uri "attr" version))
15155 (sha256
15156 (base32
15157 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
15158 (build-system python-build-system)
15159 (home-page "https://github.com/denis-ryzhkov/attr")
15160 (synopsis "Decorator for attributes of target function or class")
15161 (description "Simple decorator to set attributes of target function or
15162class in a @acronym{DRY, Don't Repeat Yourself} way.")
15163 (license license:expat)))
f98232a3
VC
15164
15165(define-public python-construct
15166 (package
15167 (name "python-construct")
15168 (version "2.9.45")
15169 (source
15170 (origin
15171 (method url-fetch)
15172 (uri (pypi-uri "construct" version))
15173 (sha256
15174 (base32
15175 "130iy05awzigm2xah2yvlmb08mac5bi4gzr5m3g7k1krs3ps0w92"))))
15176 (build-system python-build-system)
15177 (arguments
15178 `(#:tests? #f)) ; No tests exist.
15179 (propagated-inputs
15180 `(("python-extras" ,python-extras)
15181 ("python-arrow" ,python-arrow)
15182 ("python-numpy" ,python-numpy)
15183 ("python-ruamel.yaml" ,python-ruamel.yaml)))
15184 (home-page "http://construct.readthedocs.io")
15185 (synopsis "Declarative and symmetrical parser and builder for binary data")
15186 (description
15187 "This package provides both simple, atomic constructs (such as
15188integers of various sizes), as well as composite ones which allow you
15189form hierarchical and sequential structures of increasing complexity.
15190It features bit and byte granularity, easy debugging and testing, an
15191easy-to-extend subclass system, and lots of primitive constructs to
15192make your work easier.")
15193 (license license:expat)))
b742c006
LF
15194
15195(define-public python-humanize
15196 (package
15197 (name "python-humanize")
15198 (version "0.5.1")
15199 (source
15200 (origin
15201 (method url-fetch)
15202 (uri (pypi-uri "humanize" version))
15203 (sha256
15204 (base32
15205 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
15206 (arguments
15207 '(#:tests? #f)) ; tests not in pypi archive
15208 (build-system python-build-system)
15209 (home-page "https://github.com/jmoiron/humanize")
15210 (synopsis "Print numerical information in a human-readable form")
15211 (description "This package provides a Python module that displays numbers
15212and dates in \"human readable\" forms. For example, it would display
15213\"12345591313\" as \"12.3 billion\".")
15214 (license license:expat)))
d5bbf66d
LF
15215
15216(define-public python-txaio
15217 (package
15218 (name "python-txaio")
15219 (version "18.8.1")
15220 (source
15221 (origin
15222 (method url-fetch)
15223 (uri (pypi-uri "txaio" version))
15224 (sha256
15225 (base32
15226 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
15227 (build-system python-build-system)
15228 (propagated-inputs
15229 `(("python-twisted" ,python-twisted)
15230 ("python-six" ,python-six)))
15231 (home-page "https://github.com/crossbario/txaio")
15232 (synopsis "Compatibility layer between Python asyncio and Twisted")
15233 (description "Txaio provides a compatibility layer between the Python
15234@code{asyncio} module and @code{Twisted}.")
15235 (license license:expat)))
963dfd3a
RW
15236
15237(define-public python-toolshed
15238 (package
15239 (name "python-toolshed")
15240 (version "0.4.6")
15241 (source
15242 (origin
15243 (method url-fetch)
15244 (uri (pypi-uri "toolshed" version))
15245 (sha256
15246 (base32
15247 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
15248 (build-system python-build-system)
15249 (native-inputs
15250 `(("python-nose" ,python-nose)))
15251 (home-page "https://github.com/brentp/toolshed/")
15252 (synopsis "Collection of modules and functions for working with data")
15253 (description "This is a collection of well-tested, simple modules and
15254functions that aim to reduce boilerplate when working with data.")
15255 (license license:bsd-2)))