gnu: Add opensmtpd-next.
[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>
57;;; Copyright © 2018 Maxim Cournoyer <maxim.cournoyer@gmail.com>
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)
145 #:use-module (guix utils)
146 #:use-module (guix build-system gnu)
147 #:use-module (guix build-system cmake)
148 #:use-module (guix build-system python)
149 #:use-module (guix build-system trivial)
150 #:use-module (srfi srfi-1)
151 #:use-module (srfi srfi-26))
152
153(define-public python-psutil
154 (package
155 (name "python-psutil")
156 (version "5.4.3")
157 (source
158 (origin
159 (method url-fetch)
160 (uri (pypi-uri "psutil" version))
161 (sha256
162 (base32
163 "063v69x7spyclyaxrd3gmzj3p16q5ayg97xqhwb1kyn22a9pwip2"))))
164 (build-system python-build-system)
165 (arguments
166 ;; FIXME: some tests does not return and times out.
167 '(#:tests? #f))
168 (home-page "https://www.github.com/giampaolo/psutil")
169 (synopsis "Library for retrieving information on running processes")
170 (description
171 "psutil (Python system and process utilities) is a library for retrieving
172information on running processes and system utilization (CPU, memory, disks,
173network) in Python. It is useful mainly for system monitoring, profiling and
174limiting process resources and management of running processes. It implements
175many functionalities offered by command line tools such as: ps, top, lsof,
176netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
177pidof, tty, taskset, pmap.")
178 (properties `((python2-variant . ,(delay python2-psutil))))
179 (license license:bsd-3)))
180
181(define-public python2-psutil
182 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
183 (package
184 (inherit base)
185 (propagated-inputs
186 `(("python2-enum34" ,python2-enum34) ;optional
187 ,@(package-propagated-inputs base))))))
188
189(define-public python-shapely
190 (package
191 (name "python-shapely")
192 (version "1.6.3")
193 (source
194 (origin
195 (method url-fetch)
196 (uri (pypi-uri "Shapely" version))
197 (sha256
198 (base32
199 "0svc58dzcw9gj92b4sgq35sdxkf85z0qwlzxarkzq4bp3h8jy58l"))))
200 (build-system python-build-system)
201 (native-inputs
202 `(("python-cython" ,python-cython)
203 ("python-matplotlib" ,python-matplotlib)
204 ("python-pytest" ,python-pytest)
205 ("python-pytest-cov" ,python-pytest-cov)))
206 (inputs
207 `(("geos" ,geos)))
208 (propagated-inputs
209 `(("python-numpy" ,python-numpy)))
210 (arguments
211 `(#:phases
212 (modify-phases %standard-phases
213 (add-after 'unpack 'patch-geos-path
214 (lambda* (#:key inputs #:allow-other-keys)
215 (let ((geos (assoc-ref inputs "geos"))
216 (glibc (assoc-ref inputs ,(if (%current-target-system)
217 "cross-libc" "libc"))))
218 (substitute* "shapely/geos.py"
219 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
220 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
221 geos "/lib/libgeos_c.so'])"))
222 (("free = load_dll\\('c'\\)\\.free")
223 (string-append "free = load_dll('c', fallbacks=['"
224 glibc "/lib/libc.so.6']).free"))))
225 #t)))))
226 (home-page "https://github.com/Toblerity/Shapely")
227 (synopsis "Library for the manipulation and analysis of geometric objects")
228 (description "Shapely is a Python package for manipulation and analysis of
229planar geometric objects. It is based on the @code{GEOS} library.")
230 (license license:bsd-3)))
231
232(define-public python-logwrap
233 (package
234 (name "python-logwrap")
235 (version "3.2.1")
236 (source
237 (origin
238 (method url-fetch)
239 (uri (pypi-uri "logwrap" version ".zip"))
240 (sha256
241 (base32
242 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
243 (build-system python-build-system)
244 (propagated-inputs
245 `(("python-six" ,python-six)
246 ("python-typing" ,python-typing)))
247 (native-inputs
248 `(("unzip" ,unzip)
249 ("python-cython" ,python-cython)
250 ("python-pytest" ,python-pytest)
251 ("python-pytest-cov" ,python-pytest-cov)
252 ("python-pytest-runner" ,python-pytest-runner)))
253 (home-page "https://github.com/penguinolog/logwrap")
254 (synopsis "Decorator for logging function arguments")
255 (description "This package provides a decorator to log function arguments
256and function call return values in a human-readable way.")
257 (license license:asl2.0)))
258
259(define-public python2-shapely
260 (package-with-python2 python-shapely))
261
262(define-public python-clyent
263 (package
264 (name "python-clyent")
265 (version "1.2.1")
266 (source
267 (origin
268 (method url-fetch)
269 (uri (pypi-uri "clyent" version))
270 (sha256
271 (base32
272 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
273 (build-system python-build-system)
274 (native-inputs
275 `(("python-mock" ,python-mock)))
276 (home-page "https://github.com/binstar/clyent")
277 (synopsis "Command line client library")
278 (description "Clyent is a Python command line utiliy library. It is used
279by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
280 (license license:bsd-3)))
281
282(define-public python2-clyent
283 (package-with-python2 python-clyent))
284
285(define-public python-babel
286 (package
287 (name "python-babel")
288 (version "2.6.0")
289 (source
290 (origin
291 (method url-fetch)
292 (uri (pypi-uri "Babel" version))
293 (sha256
294 (base32
295 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))
296 (build-system python-build-system)
297 (native-inputs
298 `(("python-freezegun" ,python-freezegun)
299 ("python-pytest" ,python-pytest)))
300 (propagated-inputs
301 `(("python-pytz" ,python-pytz)))
302 (arguments
303 `(#:phases (modify-phases %standard-phases
304 (replace 'check
305 (lambda _ (invoke "pytest" "-vv"))))))
306 (home-page "http://babel.pocoo.org/")
307 (synopsis
308 "Tools for internationalizing Python applications")
309 (description
310 "Babel is composed of two major parts:
311- tools to build and work with gettext message catalogs
312- a Python interface to the CLDR (Common Locale Data Repository), providing
313access to various locale display names, localized number and date formatting,
314etc. ")
315 (license license:bsd-3)))
316
317(define-public python2-babel
318 (package-with-python2 python-babel))
319
320(define-public python2-backport-ssl-match-hostname
321 (package
322 (name "python2-backport-ssl-match-hostname")
323 (version "3.5.0.1")
324 (source
325 (origin
326 (method url-fetch)
2c1f0d09 327 (uri (pypi-uri "backports.ssl_match_hostname" version))
44d10b1f
RW
328 (sha256
329 (base32
330 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
331 (build-system python-build-system)
332 (arguments
333 `(#:python ,python-2
334 #:tests? #f)) ; no test target
335 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
336 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
337 (description
338 "This backport brings the ssl.match_hostname() function to users of
339earlier versions of Python. The function checks the hostname in the
340certificate returned by the server to which a connection has been established,
341and verifies that it matches the intended target hostname.")
342 (license license:psfl)))
343
344(define-public python-hdf4
345 (package
346 (name "python-hdf4")
347 (version "0.9")
348 (source
349 (origin
350 (method url-fetch)
351 (uri (pypi-uri name version))
352 (sha256
353 (base32
354 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
355 (build-system python-build-system)
356 (native-inputs `(("nose" ,python-nose)))
357 (propagated-inputs `(("numpy" ,python-numpy)))
358 (inputs
359 `(("hdf4" ,hdf4)
360 ("libjpeg" ,libjpeg)
361 ("zlib" ,zlib)))
362 (arguments
363 `(#:phases
364 (modify-phases %standard-phases
365 (replace 'check
366 (lambda _
367 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
368 ;; on to import numpy. Somehow this works on their CI system.
369 ;; Let's just manage PYTHONPATH here instead.
370 (substitute* "runexamples.sh"
371 (("export PYTHONPATH=.*") ""))
372 (setenv "PYTHONPATH"
373 (string-append (getcwd) ":"
374 (getenv "PYTHONPATH")))
375 (invoke "./runexamples.sh")
376 (invoke "nosetests" "-v"))))))
377 (home-page "https://github.com/fhs/python-hdf4")
378 (synopsis "Python interface to the NCSA HDF4 library")
379 (description
380 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
381which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
382NetCDF files can also be read and modified. Python-HDF4 is a fork of
383@url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
384 (license license:expat)))
385
386(define-public python2-hdf4
387 (package-with-python2 python-hdf4))
388
389(define-public python-h5py
390 (package
391 (name "python-h5py")
392 (version "2.8.0")
393 (source
394 (origin
395 (method url-fetch)
396 (uri (pypi-uri "h5py" version))
397 (sha256
398 (base32
399 "0mdr6wrq02ac93m1aqx9kad0ppfzmm4imlxqgyy1x4l7hmdcc9p6"))))
400 (build-system python-build-system)
401 (arguments
402 `(#:tests? #f ; no test target
403 #:phases
404 (modify-phases %standard-phases
405 (add-after 'unpack 'fix-hdf5-paths
406 (lambda* (#:key inputs #:allow-other-keys)
407 (let ((prefix (assoc-ref inputs "hdf5")))
408 (substitute* "setup_build.py"
409 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
410 (string-append "['" prefix "/lib" "']"))
411 (("'/opt/local/include', '/usr/local/include'")
412 (string-append "'" prefix "/include" "'")))
413 (substitute* "setup_configure.py"
414 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
415 (string-append "['" prefix "/lib" "']")))
416 #t))))))
417 (propagated-inputs
418 `(("python-six" ,python-six)
419 ("python-numpy" ,python-numpy)))
420 (inputs
421 `(("hdf5" ,hdf5)))
422 (native-inputs
423 `(("python-cython" ,python-cython)
424 ("python-pkgconfig" ,python-pkgconfig)))
425 (home-page "http://www.h5py.org/")
426 (synopsis "Read and write HDF5 files from Python")
427 (description
428 "The h5py package provides both a high- and low-level interface to the
429HDF5 library from Python. The low-level interface is intended to be a
430complete wrapping of the HDF5 API, while the high-level component supports
431access to HDF5 files, datasets and groups using established Python and NumPy
432concepts.")
433 (license license:bsd-3)))
434
435(define-public python2-h5py
436 (package-with-python2 python-h5py))
437
8b89dedc
RW
438(define-public python-sh
439 (package
440 (name "python-sh")
441 (version "1.12.14")
442 (source
443 (origin
444 (method url-fetch)
445 (uri (pypi-uri "sh" version))
446 (sha256
447 (base32
448 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
449 (build-system python-build-system)
fd3638d8
EF
450 (arguments
451 '(#:phases
452 (modify-phases %standard-phases
453 (replace 'check
454 (lambda _
455 (invoke "python" "sh.py" "test"))))))
456 (native-inputs
457 `(("python-coverage" ,python-coverage)))
8b89dedc
RW
458 (home-page "https://github.com/amoffat/sh")
459 (synopsis "Python subprocess replacement")
460 (description "This package provides a replacement for Python's
461@code{subprocess} feature.")
462 (license license:expat)))
463
3869effd
RW
464(define-public python2-sh
465 (package-with-python2 python-sh))
466
d362b11d
RW
467(define-public python-cftime
468 (package
469 (name "python-cftime")
470 (version "1.0.3.4")
471 (source
472 (origin
473 (method url-fetch)
474 (uri (pypi-uri "cftime" version))
475 (sha256
476 (base32
477 "0362dhxbzk593walyjz30dll6y2y79wialik647cbwdsf3ad0x6x"))))
478 (build-system python-build-system)
479 (propagated-inputs
480 `(("python-numpy" ,python-numpy)))
481 (native-inputs
482 `(("python-coveralls" ,python-coveralls)
483 ("python-cython" ,python-cython)
484 ("python-pytest-cov" ,python-pytest-cov)))
485 (home-page "https://github.com/Unidata/cftime")
486 (synopsis "Library for time handling")
487 (description
488 "This package provides time-handling functionality that used to be part
489of the netcdf4 package before.")
490 ;; This package claims to include code under the GPLv3 but is released
491 ;; under ISC.
492 (license (list license:isc license:gpl3+))))
493
44d10b1f
RW
494(define-public python-netcdf4
495 (package
496 (name "python-netcdf4")
93e7b209 497 (version "1.4.2")
44d10b1f
RW
498 (source
499 (origin
500 (method url-fetch)
501 (uri (pypi-uri "netCDF4" version))
502 (sha256
503 (base32
93e7b209 504 "0c0sklgrmv15ygliin8qq0hp7vanmbi74m6zpi0r1ksr0hssyd5r"))))
44d10b1f 505 (build-system python-build-system)
93e7b209
RW
506 (arguments
507 '(#:phases
508 (modify-phases %standard-phases
509 (add-after 'unpack 'configure-locations
510 (lambda* (#:key inputs #:allow-other-keys)
511 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
512 #t)))))
44d10b1f
RW
513 (native-inputs
514 `(("python-cython" ,python-cython)))
515 (propagated-inputs
93e7b209
RW
516 `(("python-numpy" ,python-numpy)
517 ("python-cftime" ,python-cftime)))
44d10b1f
RW
518 (inputs
519 `(("netcdf" ,netcdf)
520 ("hdf4" ,hdf4)
521 ("hdf5" ,hdf5)))
93e7b209 522 (home-page "https://github.com/Unidata/netcdf4-python")
44d10b1f
RW
523 (synopsis "Python/numpy interface to the netCDF library")
524 (description "Netcdf4-python is a Python interface to the netCDF C
525library. netCDF version 4 has many features not found in earlier
526versions of the library and is implemented on top of HDF5. This module
527can read and write files in both the new netCDF 4 and the old netCDF 3
528format, and can create files that are readable by HDF5 clients. The
529API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
530to users of that module.")
531 ;; The software is mainly ISC, but includes some files covered
532 ;; by the Expat license.
533 (license (list license:isc license:expat))))
534
535(define-public python2-netcdf4
536 (package-with-python2 python-netcdf4))
537
538(define-public python-lockfile
539 (package
540 (name "python-lockfile")
541 (version "0.12.2")
542 (source
543 (origin
544 (method url-fetch)
8318bf07 545 (uri (pypi-uri "lockfile" version))
44d10b1f
RW
546 (sha256
547 (base32
548 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
549 (build-system python-build-system)
550 (arguments '(#:test-target "check"))
551 (native-inputs
552 `(("python-pbr" ,python-pbr)))
553 (home-page "https://launchpad.net/pylockfile")
554 (synopsis "Platform-independent file locking module")
555 (description
556 "The lockfile package exports a LockFile class which provides a simple
557API for locking files.")
558 (license license:expat)))
559
560(define-public python2-lockfile
561 (package-with-python2 python-lockfile))
562
563(define-public python-semantic-version
564 (package
565 (name "python-semantic-version")
566 (version "2.6.0")
567 (source
568 (origin
569 (method url-fetch)
570 (uri (pypi-uri "semantic_version" version))
571 (sha256
572 (base32
573 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
574 (build-system python-build-system)
575 (arguments
576 `(#:tests? #f)) ; PyPI tarball lacks tests
577 (home-page "https://github.com/rbarrois/python-semanticversion")
578 (synopsis "Semantic versioning module for Python")
579 (description
580 "The @code{semantic_version} class is a small library for handling
581@uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
582
583It can compare versions, generate a new version that represents a bump in one of
584the version levels, and check whether any given string is a proper semantic
585version identifier.")
586 (license license:bsd-3)))
587
588(define-public python2-semantic-version
589 (package-with-python2 python-semantic-version))
590
591(define-public python-serpent
592 (package
593 (name "python-serpent")
594 (version "1.27")
595 (source
596 (origin
597 (method url-fetch)
598 (uri (pypi-uri "serpent" version))
599 (sha256
600 (base32
601 "04p9dsrm5pv8vhk3flvih55kgvlzpi38hlaykdiakddmgwqw93bg"))))
602 (build-system python-build-system)
603 (home-page "https://github.com/irmen/Serpent")
604 (synopsis "Serializer for literal Python expressions")
605 (description
606 "Serpent provides ast.literal_eval() compatible object tree
607serialization. It serializes an object tree into bytes (utf-8 encoded string)
608that can be decoded and then passed as-is to ast.literal_eval() to rebuild it
609as the original object tree. As such it is safe to send serpent data to other
610machines over the network for instance (because only safe literals are
611encoded).")
612 (license license:expat)))
613
614(define-public python-setuptools
615 (package
616 (name "python-setuptools")
617 (version "40.0.0")
618 (source
619 (origin
620 (method url-fetch)
621 (uri (pypi-uri "setuptools" version ".zip"))
622 (sha256
623 (base32
624 "0pq116lr14gnc62v76nk0npkm6krb2mpp7p9ab369zgv4n7dnah1"))
625 (modules '((guix build utils)))
626 (snippet
627 '(begin
628 ;; Remove included binaries which are used to build self-extracting
629 ;; installers for Windows.
630 ;; TODO: Find some way to build them ourself so we can include them.
631 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
632 #t))))
633 (build-system python-build-system)
634 ;; FIXME: Tests require pytest, which itself relies on setuptools.
635 ;; One could bootstrap with an internal untested setuptools.
636 (arguments
637 `(#:tests? #f))
638 (home-page "https://pypi.python.org/pypi/setuptools")
639 (synopsis
640 "Library designed to facilitate packaging Python projects")
641 (description
642 "Setuptools is a fully-featured, stable library designed to facilitate
643packaging Python projects, where packaging includes:
644Python package and module definitions,
645distribution package metadata,
646test hooks,
647project installation,
648platform-specific details,
649Python 3 support.")
650 ;; TODO: setuptools now bundles the following libraries:
651 ;; packaging, pyparsing, six and appdirs. How to unbundle?
652 (license (list license:psfl ; setuptools itself
653 license:expat ; six, appdirs, pyparsing
654 license:asl2.0 ; packaging is dual ASL2/BSD-2
655 license:bsd-2))))
656
657(define-public python2-setuptools
658 (package-with-python2 python-setuptools))
659
660(define-public python-uniseg
661 (package
662 (name "python-uniseg")
663 (version "0.7.1")
664 (source
665 (origin
666 (method url-fetch)
667 (uri (pypi-uri "uniseg" version ".zip"))
668 (sha256
669 (base32
670 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
671 (build-system python-build-system)
672 (arguments
673 '(#:tests? #f)) ; The test suite requires network access.
674 (native-inputs
675 `(("unzip" ,unzip)))
676 (home-page
677 "https://bitbucket.org/emptypage/uniseg-python")
678 (synopsis
679 "Python library to determine Unicode text segmentations")
680 (description
681 "Uniseg is a Python package used to determine Unicode text segmentations.
682Supported segmentations include:
683@enumerate
684@item @dfn{Code point} (any value in the Unicode codespace)
685@item @dfn{Grapheme cluster} (user-perceived character made of a single or
686multiple Unicode code points, e.g. \"G\" + acute-accent)
687@item Word break
688@item Sentence break
689@item Line break
690@end enumerate")
691 (license license:expat)))
692
693(define-public python2-uniseg
694 (package-with-python2 python-uniseg))
695
696(define-public python-humanfriendly
697 (package
698 (name "python-humanfriendly")
699 (version "4.4.1")
700 (source
701 (origin
702 (method url-fetch)
703 (uri (pypi-uri "humanfriendly" version))
704 (sha256
705 (base32
706 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
707 (build-system python-build-system)
708 (arguments
709 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
710 #:tests? #f))
711 (propagated-inputs
712 `(("python-monotonic" ,python-monotonic)))
713 (home-page "https://humanfriendly.readthedocs.io")
714 (synopsis "Human-friendly input and output in Python")
715 (description
716 "The functions and classes in @code{humanfriendly} can be used to make
717text interfaces more user-friendly. It includes tools to parse and format
718numbers, file sizes, and timespans, timers for long-running operations, menus
719to allow the user to choose from a list of options, and terminal interaction
720helpers.")
721 (license license:expat)))
722
723(define-public python2-humanfriendly
724 (package-with-python2 python-humanfriendly))
725
726(define-public python-capturer
727 (package
728 (name "python-capturer")
729 (version "2.4")
730 (source
731 (origin
732 (method url-fetch)
733 (uri (pypi-uri "capturer" version))
734 (sha256
735 (base32
736 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
737 (build-system python-build-system)
738 (arguments
739 `(#:tests? #f))
740 (propagated-inputs
741 `(("python-humanfriendly" ,python-humanfriendly)))
742 (home-page "https://capturer.readthedocs.io")
743 (synopsis "Capture stdout and stderr streams of the current process")
744 (description
745 "The capturer package makes it easy to capture the stdout and stderr
746streams of the current process and subprocesses. Output can be relayed
747to the terminal in real time but is also available to the Python program
748for additional processing.")
749 (license license:expat)))
750
751(define-public python2-capturer
752 (package-with-python2 python-capturer))
753
754(define-public python-case
755 (package
756 (name "python-case")
757 (version "1.5.3")
758 (source
759 (origin
760 (method url-fetch)
761 (uri (pypi-uri "case" version))
762 (sha256
763 (base32
764 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
765 (build-system python-build-system)
766 (propagated-inputs
767 `(("python-mock" ,python-mock)
768 ("python-nose" ,python-nose)
769 ("python-six" ,python-six)
770 ("python-unittest2" ,python-unittest2)))
771 (native-inputs
772 `(("python-coverage" ,python-coverage)))
773 (home-page "https://github.com/celery/case")
774 (synopsis "Unittest utilities and convenience methods")
775 (description
776 "The @code{case} package provides utilities on top of unittest, including
777some helpful Python 2 compatibility convenience methods.")
778 (license license:bsd-3)))
779
780(define-public python-verboselogs
781 (package
782 (name "python-verboselogs")
783 (version "1.7")
784 (source
785 (origin
786 (method url-fetch)
787 (uri (pypi-uri "verboselogs" version))
788 (sha256
789 (base32
790 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
791 (build-system python-build-system)
792 (native-inputs
793 `(("python-mock" ,python-mock)
794 ("python-astroid" ,python-astroid)
795 ("python-pylint" ,python-pylint)))
796 (home-page "https://verboselogs.readthedocs.io")
797 (synopsis "Verbose logging level for Python's logging module")
798 (description
799 "The @code{verboselogs} package extends Python's @code{logging} module to
800add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
801 (license license:expat)))
802
803(define-public python2-verboselogs
804 (package-with-python2 python-verboselogs))
805
806(define-public python-coloredlogs
807 (package
808 (name "python-coloredlogs")
809 (version "7.3")
810 (source
811 (origin
812 (method url-fetch)
813 (uri (pypi-uri "coloredlogs" version))
814 (sha256
815 (base32
816 "1blcann6dyg5dhps9pg12rn0q0rjrlajpmmil0gy0j4cbvnl2il9"))))
817 (build-system python-build-system)
818 (arguments
819 `(;Tests require some updated modules
820 #:tests? #f))
821 (propagated-inputs
822 `(("python-capturer" ,python-capturer)))
823 (home-page "https://coloredlogs.readthedocs.io")
824 (synopsis "Colored stream handler for Python's logging module")
825 (description
826 "The @code{coloredlogs} package enables colored terminal output for
827Python's logging module. The @code{ColoredFormatter} class inherits from
828@code{logging.Formatter} and uses ANSI escape sequences to render your logging
829messages in color.")
830 (license license:expat)))
831
832(define-public python2-coloredlogs
833 (package-with-python2 python-coloredlogs))
834
835(define-public python-eventlet
836 (package
837 (name "python-eventlet")
838 (version "0.20.1")
839 (source
840 (origin
841 (method url-fetch)
842 (uri (pypi-uri "eventlet" version))
843 (sha256
844 (base32
845 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
846 (build-system python-build-system)
847 (propagated-inputs
848 `(("python-greenlet" ,python-greenlet)))
849 (arguments
850 ;; TODO: Requires unpackaged 'enum-compat'.
851 '(#:tests? #f))
852 (home-page "http://eventlet.net")
853 (synopsis "Concurrent networking library for Python")
854 (description
855 "Eventlet is a concurrent networking library for Python that
856allows you to change how you run your code, not how you write it.
857It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
858Coroutines ensure that the developer uses a blocking style of programming
859that is similar to threading, but provide the benefits of non-blocking I/O.
860The event dispatch is implicit, which means you can easily use @code{Eventlet}
861from the Python interpreter, or as a small part of a larger application.")
862 (license license:expat)))
863
864(define-public python2-eventlet
865 (let ((base (package-with-python2
866 (strip-python2-variant python-eventlet))))
867 (package (inherit base)
868 (propagated-inputs
869 `(("python2-enum34" ,python2-enum34)
870 ,@(package-propagated-inputs base))))))
871
872(define-public python-six
873 (package
874 (name "python-six")
875 (version "1.11.0")
876 (source
877 (origin
878 (method url-fetch)
879 (uri (pypi-uri "six" version))
880 (sha256
881 (base32
882 "1scqzwc51c875z23phj48gircqjgnn3af8zy2izjwmnlxrxsgs3h"))))
883 (build-system python-build-system)
884 (arguments
885 `(#:phases
886 (modify-phases %standard-phases
887 (replace 'check
888 (lambda _
889 (invoke "py.test" "-v"))))))
890 (native-inputs
891 `(("python-py" ,python-py)
892 ("python-pytest" ,python-pytest-bootstrap)))
893 (home-page "https://pypi.python.org/pypi/six/")
894 (synopsis "Python 2 and 3 compatibility utilities")
895 (description
896 "Six is a Python 2 and 3 compatibility library. It provides utility
897functions for smoothing over the differences between the Python versions with
898the goal of writing Python code that is compatible on both Python versions.
899Six supports every Python version since 2.5. It is contained in only one
900Python file, so it can be easily copied into your project.")
901 (license license:x11)))
902
903(define-public python2-six
904 (package-with-python2 python-six))
905
906(define-public python-six-bootstrap
907 (package
908 (inherit python-six)
909 (name "python-six-bootstrap")
910 (native-inputs `())
911 (arguments `(#:tests? #f))))
912
913(define-public python2-six-bootstrap
914 (package-with-python2 python-six-bootstrap))
915
916(define-public python-schedule
917 (package
918 (name "python-schedule")
919 (version "0.4.3")
920 (source
921 (origin
922 (method url-fetch)
923 (uri (pypi-uri "schedule" version))
924 (sha256
925 (base32
926 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
927 (build-system python-build-system)
928 (native-inputs
929 `(("python-pytest" ,python-pytest)
930 ("python-mock" ,python-mock)))
931 (home-page "https://github.com/dbader/schedule")
932 (synopsis "Schedule periodic function calls in Python")
933 (description
934 "Schedule is an in-process scheduler for periodic jobs that uses the
935builder pattern for configuration. Schedule lets you run Python functions (or
936any other callable) periodically at pre-determined intervals using a simple,
937human-friendly syntax.")
938 (license license:expat)))
939
940(define-public python2-schedule
941 (package-with-python2 python-schedule))
942
943(define-public python-pandas
944 (package
945 (name "python-pandas")
946 (version "0.23.4")
947 (source
948 (origin
949 (method url-fetch)
950 (uri (pypi-uri "pandas" version))
951 (sha256
952 (base32 "1x54pd7hr3y7qahx6b5bf2wzj54xvl8r3s1h4pl254pnmi3wl92v"))))
953 (build-system python-build-system)
954 (arguments
955 `(#:modules ((guix build utils)
956 (guix build python-build-system)
957 (ice-9 ftw)
958 (srfi srfi-26))
959 #:phases (modify-phases %standard-phases
960 (replace 'check
961 (lambda _
962 (let ((build-directory
963 (string-append
964 (getcwd) "/build/"
965 (car (scandir "build"
966 (cut string-prefix? "lib." <>))))))
967 ;; Disable the "strict data files" option which causes
968 ;; the build to error out if required data files are not
969 ;; available (as is the case with PyPI archives).
970 (substitute* "setup.cfg"
971 (("addopts = --strict-data-files") "addopts = "))
972 (with-directory-excursion build-directory
973 ;; Delete tests that require "moto" which is not yet in Guix.
974 (for-each delete-file
975 '("pandas/tests/io/conftest.py"
976 "pandas/tests/io/json/test_compression.py"
977 "pandas/tests/io/parser/test_network.py"
978 "pandas/tests/io/test_excel.py"
979 "pandas/tests/io/test_parquet.py"))
980 (invoke "pytest" "-vv" "pandas" "--skip-slow"
981 "--skip-network" "-k"
982 ;; XXX: Due to the deleted tests above.
983 "not test_read_s3_jsonl"))))))))
984 (propagated-inputs
985 `(("python-numpy" ,python-numpy)
986 ("python-pytz" ,python-pytz)
987 ("python-dateutil" ,python-dateutil)))
988 (native-inputs
989 `(("python-cython" ,python-cython)
990 ("python-beautifulsoup4" ,python-beautifulsoup4)
991 ("python-lxml" ,python-lxml)
992 ("python-html5lib" ,python-html5lib)
993 ("python-nose" ,python-nose)
994 ("python-pytest" ,python-pytest)))
995 (home-page "https://pandas.pydata.org")
996 (synopsis "Data structures for data analysis, time series, and statistics")
997 (description
998 "Pandas is a Python package providing fast, flexible, and expressive data
999structures designed to make working with structured (tabular,
1000multidimensional, potentially heterogeneous) and time series data both easy
1001and intuitive. It aims to be the fundamental high-level building block for
1002doing practical, real world data analysis in Python.")
1003 (license license:bsd-3)))
1004
1005(define-public python2-pandas
1006 (package-with-python2 python-pandas))
1007
1008(define-public python2-mechanize
1009 (package
1010 (name "python2-mechanize")
1011 (version "0.2.5")
1012 (source
1013 (origin
1014 (method url-fetch)
1cc184e6 1015 (uri (pypi-uri "mechanize" version))
44d10b1f
RW
1016 (sha256
1017 (base32
1018 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1019 (build-system python-build-system)
1020 (arguments
1021 `(#:python ,python-2 ; apparently incompatible with Python 3
1022 #:tests? #f))
1023 ;; test fails with message
1024 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1025 ;; (python-3.3.2) or
1026 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1027 ;; (python-2.7.5).
1028 ;; The source code is from March 2011 and probably not up-to-date
1029 ;; with respect to python unit tests.
1030 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1031 (synopsis
1032 "Stateful programmatic web browsing in Python")
1033 (description
1034 "Mechanize implements stateful programmatic web browsing in Python,
1035after Andy Lester’s Perl module WWW::Mechanize.")
1036 (license (license:non-copyleft
1037 "file://COPYING"
1038 "See COPYING in the distribution."))))
1039
1040
1041(define-public python-simplejson
1042 (package
1043 (name "python-simplejson")
1044 (version "3.14.0")
1045 (source
1046 (origin
1047 (method url-fetch)
1048 (uri (pypi-uri "simplejson" version))
1049 (sha256
1050 (base32
1051 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1052 (build-system python-build-system)
1053 (home-page "http://simplejson.readthedocs.org/en/latest/")
1054 (synopsis
1055 "Json library for Python")
1056 (description
1057 "JSON (JavaScript Object Notation) is a subset of JavaScript
1058syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1059format.
1060
1061Simplejson exposes an API familiar to users of the standard library marshal
1062and pickle modules. It is the externally maintained version of the json
1063library contained in Python 2.6, but maintains compatibility with Python 2.5
1064and (currently) has significant performance advantages, even without using
1065the optional C extension for speedups. Simplejson is also supported on
1066Python 3.3+.")
1067 (license license:x11)))
1068
1069(define-public python2-simplejson
1070 (package-with-python2 python-simplejson))
1071
1072
1073(define-public python-pyicu
1074 (package
1075 (name "python-pyicu")
1076 (version "2.2")
1077 (source
1078 (origin
1079 (method url-fetch)
1080 (uri (pypi-uri "PyICU" version))
1081 (sha256
1082 (base32
1083 "0wq9y5fi1ighgf5aws9nr87vi1w44p7q1k83rx2y3qj5d2xyhspa"))))
1084 (build-system python-build-system)
1085 (inputs
1086 `(("icu4c" ,icu4c)))
1087 (native-inputs
1088 `(("python-pytest" ,python-pytest)
1089 ("python-six" ,python-six)))
1090 (home-page "https://github.com/ovalhub/pyicu")
1091 (synopsis "Python extension wrapping the ICU C++ API")
1092 (description
1093 "PyICU is a python extension wrapping the ICU C++ API.")
1094 (properties `((python2-variant . ,(delay python2-pyicu))))
1095 (license license:x11)))
1096
1097(define-public python2-pyicu
1098 (let ((base (package-with-python2
1099 (strip-python2-variant python-pyicu))))
1100 (package
1101 (inherit base)
1102 (arguments
1103 `(,@(package-arguments base)
1104 #:phases
1105 (modify-phases %standard-phases
1106 (add-before 'check 'delete-failing-test
1107 (λ _
1108 ;; XXX: This fails due to Unicode issues unique to Python 2,
1109 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1110 (delete-file "test/test_Script.py")
1111 #t))))))))
1112
1113(define-public python2-dogtail
1114 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1115 ;; spaces in indentation" with Python 3.
1116 (package
1117 (name "python2-dogtail")
1118 (version "0.9.9")
1119 (source (origin
1120 (method url-fetch)
1121 (uri (pypi-uri "dogtail" version))
1122 (sha256
1123 (base32
1124 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1125 (build-system python-build-system)
1126 (arguments `(#:python ,python-2
1127 #:tests? #f)) ; invalid command "test"
1128 ;; Currently no offical homepage.
1129 (home-page "https://pypi.python.org/pypi/dogtail/")
1130 (synopsis "GUI test tool and automation framework written in Python")
1131 (description
1132 "Dogtail is a GUI test tool and automation framework written in Python.
1133It uses Accessibility (a11y) technologies to communicate with desktop
1134applications. dogtail scripts are written in Python and executed like any
1135other Python program.")
1136 (license license:gpl2+)))
1137
1138(define-public python-empy
1139 (package
1140 (name "python-empy")
0f6d5115 1141 (version "3.3.3")
44d10b1f
RW
1142 (source (origin
1143 (method url-fetch)
1144 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1145 version ".tar.gz"))
1146 (sha256
1147 (base32
0f6d5115 1148 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
44d10b1f
RW
1149 (build-system python-build-system)
1150 (arguments
0f6d5115 1151 `(#:tests? #f)) ; python2 only
44d10b1f
RW
1152 (home-page "http://www.alcyone.com/software/empy/")
1153 (synopsis "Templating system for Python")
1154 (description
1155 "EmPy is a system for embedding Python expressions and statements in
1156template text; it takes an EmPy source file, processes it, and produces
1157output. This is accomplished via expansions, which are special signals to the
1158EmPy system and are set off by a special prefix (by default the at sign, @@).
1159EmPy can expand arbitrary Python expressions and statements in this way, as
1160well as a variety of special forms. Textual data not explicitly delimited in
1161this way is sent unaffected to the output, allowing Python to be used in
1162effect as a markup language. Also supported are callbacks via hooks,
1163recording and playback via diversions, and dynamic, chainable filters. The
1164system is highly configurable via command line options and embedded
1165commands.")
1166 (license license:lgpl2.1+)))
1167
1168(define-public python2-empy
0f064242
TGR
1169 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
1170 (package
1171 (inherit base)
1172 (arguments `(,@(package-arguments base)
1173 #:tests? #t)))))
44d10b1f
RW
1174
1175(define-public python2-element-tree
1176 (package
1177 (name "python2-element-tree")
1178 (version "1.2.6")
1179 (source (origin
1180 (method url-fetch)
1181 (uri (string-append
1182 "http://effbot.org/media/downloads/elementtree-"
1183 version "-20050316.tar.gz"))
1184 (sha256
1185 (base32
1186 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1187 (build-system python-build-system)
1188 (arguments
1189 `(#:python ,python-2 ; seems to be part of Python 3
1190 #:tests? #f)) ; no 'test' sub-command
1191 (synopsis "Toolkit for XML processing in Python")
1192 (description
1193 "ElementTree is a Python library supporting lightweight XML processing.")
1194 (home-page "http://effbot.org/zone/element-index.htm")
1195 (license (license:x11-style
1196 "http://docs.python.org/2/license.html"
1197 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1198
1199(define-public python2-pybugz
1200 (package
1201 (name "python2-pybugz")
1202 (version "0.6.11")
1203 (source (origin
1204 (method url-fetch)
1205 (uri (string-append
1206 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1207 version ".tar.gz"))
1208 (sha256
1209 (base32
1210 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1211 (patches (search-patches "pybugz-stty.patch"
1212 "pybugz-encode-error.patch"))))
1213 (build-system python-build-system)
1214 (arguments
1215 `(#:python ,python-2 ; SyntaxError with Python 3
1216 #:tests? #f)) ; no 'test' sub-command
1217 (propagated-inputs
1218 `(("element-tree" ,python2-element-tree)))
1219 (synopsis "Python and command-line interface to Bugzilla")
1220 (description
1221 "PyBugz is a Python library and command-line tool to query the Bugzilla
1222bug tracking system. It is meant as an aid to speed up interaction with the
1223bug tracker.")
1224 (home-page "http://www.liquidx.net/pybugz/")
1225 (license license:gpl2)))
1226
1227(define-public python2-enum
1228 (package
1229 (name "python2-enum")
1230 (version "0.4.6")
1231 (source (origin
1232 (method url-fetch)
1233 (uri (pypi-uri "enum" version))
1234 (sha256
1235 (base32
1236 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1237 (build-system python-build-system)
1238 (arguments
1239 `(#:python ,python-2))
1240 (home-page "http://pypi.python.org/pypi/enum/")
1241 (synopsis "Robust enumerated type support in Python")
1242 (description
1243 "This provides a module for robust enumerations in Python. It has
1244been superseded by the Python standard library and is provided only for
1245compatibility.")
1246 ;; Choice of either license.
1247 (license (list license:gpl3+ license:psfl))))
1248
1249(define-public python-enum34
1250 (package
1251 (name "python-enum34")
1252 (version "1.1.6")
1253 (source
1254 (origin
1255 (method url-fetch)
1256 (uri (pypi-uri "enum34" version))
1257 (sha256
1258 (base32
1259 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1260 (build-system python-build-system)
1261 (home-page "https://pypi.python.org/pypi/enum34")
1262 (synopsis "Backported Python 3.4 Enum")
1263 (description
1264 "Enum34 is the new Python stdlib enum module available in Python 3.4
1265backported for previous versions of Python from 2.4 to 3.3.")
1266 (license license:bsd-3)))
1267
1268(define-public python2-enum34
1269 (package-with-python2 python-enum34))
1270
1271(define-public python-parse-type
1272 (package
1273 (name "python-parse-type")
1274 (version "0.4.2")
1275 (source
1276 (origin
1277 (method url-fetch)
1278 (uri (pypi-uri "parse_type" version))
1279 (sha256
1280 (base32
1281 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1282 (build-system python-build-system)
1283 (propagated-inputs
1284 `(("python-six" ,python-six)
1285 ("python-parse" ,python-parse)))
1286 (native-inputs
1287 `(("python-pytest" ,python-pytest)
1288 ("python-pytest-runner" ,python-pytest-runner)))
1289 (home-page "https://github.com/jenisys/parse_type")
1290 (synopsis "Extended parse module")
1291 (description
1292 "Parse_type extends the python parse module.")
1293 (properties
1294 `((python2-variant . ,(delay python2-parse-type))))
1295 (license license:bsd-3)))
1296
1297(define-public python2-parse-type
1298 (let ((base (package-with-python2
1299 (strip-python2-variant python-parse-type))))
1300 (package (inherit base)
1301 (propagated-inputs
1302 `(("python2-enum34" ,python2-enum34)
1303 ,@(package-propagated-inputs base))))))
1304
1305(define-public python-parse
1306 (package
1307 (name "python-parse")
1308 (version "1.8.4")
1309 (source
1310 (origin
1311 (method url-fetch)
1312 (uri (pypi-uri "parse" version))
1313 (sha256
1314 (base32
1315 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
1316 (build-system python-build-system)
1317 (arguments
1318 `(#:phases
1319 (modify-phases %standard-phases
1320 (replace 'check
1321 (lambda _ (invoke "python" "test_parse.py"))))))
1322 (home-page "https://github.com/r1chardj0n3s/parse")
1323 (synopsis "Parse strings")
1324 (description
1325 "Parse strings using a specification based on the Python @code{format()}
1326syntax.")
1327 (license license:x11)))
1328
1329(define-public python-polib
1330 (package
1331 (name "python-polib")
1332 (version "1.0.8")
1333 (source (origin
1334 (method url-fetch)
1335 (uri (pypi-uri "polib" version))
1336 (sha256
1337 (base32
1338 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1339 (build-system python-build-system)
1340 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1341 (synopsis "Manipulate, create and modify gettext files")
1342 (description "Polib can manipulate any gettext format (po, pot and mo)
1343files. It can be used to create po files from scratch or to modify
1344existing ones.")
1345 (license license:expat)))
1346
1347(define-public python2-polib
1348 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1349 (package
1350 (inherit base)
1351 (arguments `(,@(package-arguments base)
1352 ;; Tests don't work with python2.
1353 #:tests? #f)))))
1354
1355(define-public scons
1356 (package
1357 (name "scons")
ad34338d 1358 (version "3.0.3")
44d10b1f 1359 (source (origin
ad34338d
RW
1360 (method git-fetch)
1361 (uri (git-reference
1362 (url "https://github.com/SCons/scons.git")
1363 (commit version)))
1364 (file-name (git-file-name name version))
44d10b1f
RW
1365 (sha256
1366 (base32
ad34338d 1367 "1xizkjgrvydkjhpv7i5rx0mdkp3618sis7jsckjh57nxcynlk5dc"))))
44d10b1f
RW
1368 (build-system python-build-system)
1369 (arguments
1370 `(#:use-setuptools? #f ; still relies on distutils
ad34338d
RW
1371 #:tests? #f ; no 'python setup.py test' command
1372 #:phases
1373 (modify-phases %standard-phases
1374 (add-before 'build 'bootstrap
1375 (lambda _
1376 (substitute* "src/engine/SCons/compat/__init__.py"
1377 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
1378 "sys.modules[new] = __import__(old)"))
1379 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
1380 (chdir "build/scons")
1381 #t)))))
44d10b1f
RW
1382 (home-page "http://scons.org/")
1383 (synopsis "Software construction tool written in Python")
1384 (description
1385 "SCons is a software construction tool. Think of SCons as an improved,
1386cross-platform substitute for the classic Make utility with integrated
1387functionality similar to autoconf/automake and compiler caches such as ccache.
1388In short, SCons is an easier, more reliable and faster way to build
1389software.")
1390 (license license:x11)))
1391
1392(define-public scons-python2
1393 (package
1394 (inherit (package-with-python2 scons))
1395 (name "scons-python2")))
1396
1397(define-public python-extras
1398 (package
1399 (name "python-extras")
1400 (version "1.0.0")
1401 (source
1402 (origin
1403 (method url-fetch)
1404 (uri (pypi-uri "extras" version))
1405 (sha256
1406 (base32
1407 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1408 (build-system python-build-system)
1409 (arguments
1410 ;; FIXME: Circular dependency on testtools.
1411 '(#:tests? #f))
1412 (home-page "https://github.com/testing-cabal/extras")
1413 (synopsis "Useful extensions to the Python standard library")
1414 (description
1415 "Extras is a set of extensions to the Python standard library.")
1416 (license license:expat)))
1417
1418(define-public python2-extras
1419 (package-with-python2 python-extras))
1420
1421(define-public python-mimeparse
1422 (package
1423 (name "python-mimeparse")
1424 (version "1.6.0")
1425 (source
1426 (origin
1427 (method url-fetch)
89bf667c 1428 (uri (pypi-uri "python-mimeparse" version))
44d10b1f
RW
1429 (sha256
1430 (base32
1431 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
1432 (build-system python-build-system)
1433 (arguments
1434 '(#:phases
1435 (modify-phases %standard-phases
1436 (replace 'check
1437 (lambda _
1438 (invoke "./mimeparse_test.py"))))))
1439 (home-page
1440 "https://github.com/dbtsai/python-mimeparse")
1441 (synopsis "Python library for parsing MIME types")
1442 (description
1443 "Mimeparse provides basic functions for parsing MIME type names and
1444matching them against a list of media-ranges.")
1445 (license license:expat)))
1446
1447(define-public python2-mimeparse
1448 (package-with-python2 python-mimeparse))
1449
1450(define-public python-miniboa
1451 (package
1452 (name "python-miniboa")
1453 (version "1.0.7")
1454 (source
1455 (origin
1456 (method url-fetch)
1457 (uri (pypi-uri "miniboa" version))
1458 (sha256
1459 (base32
1460 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
1461 (build-system python-build-system)
1462 (home-page "https://github.com/shmup/miniboa")
1463 (synopsis "Simple, single-threaded Telnet server")
1464 (description
1465 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
1466server.")
1467 (license license:asl2.0)))
1468
1469(define-public python2-miniboa
1470 (package-with-python2 python-miniboa))
1471
1472(define-public python-pafy
1473 (package
1474 (name "python-pafy")
1475 (version "0.5.3.1")
1476 (source
1477 (origin
1478 (method url-fetch)
1479 (uri (pypi-uri "pafy" version))
1480 (sha256
1481 (base32
1482 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1483 (build-system python-build-system)
1484 (arguments
1485 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1486 (propagated-inputs
1487 ;; Youtube-dl is a python package which is imported in the file
1488 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1489 `(("youtube-dl" ,youtube-dl)))
1490 (home-page "https://np1.github.io/pafy/")
1491 (synopsis "Retrieve YouTube content and metadata")
1492 (description
1493 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1494 (license license:lgpl3+)))
1495
1496(define-public python2-funcsigs
1497 (package
1498 (name "python2-funcsigs")
1499 (version "1.0.2")
1500 (source (origin
1501 (method url-fetch)
1502 (uri (pypi-uri "funcsigs" version))
1503 (sha256
1504 (base32
1505 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1506 (build-system python-build-system)
1507 (arguments
1508 `(#:python ,python-2))
1509 (native-inputs
1510 `(("python2-unittest2" ,python2-unittest2)))
1511 (home-page "http://funcsigs.readthedocs.org")
1512 (synopsis "Python function signatures from PEP362")
1513 (description
1514 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1515 (license license:asl2.0)))
1516
1517(define-public python2-funcsigs-bootstrap
1518 (package
1519 (inherit python2-funcsigs)
1520 (name "python2-funcsigs-bootstrap")
1521 (native-inputs `())
1522 (arguments
1523 `(#:tests? #f
1524 ,@(package-arguments python2-funcsigs)))))
1525
1526(define-public python-py
1527 (package
1528 (name "python-py")
1529 (version "1.5.4")
1530 (source
1531 (origin
1532 (method url-fetch)
1533 (uri (pypi-uri "py" version))
1534 (sha256
1535 (base32
1536 "1xxvwfn82457djf55f5n2c94699rfqnk43br8fif2r2q8gvrmm9z"))))
1537 (build-system python-build-system)
1538 (arguments
1539 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1540 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1541 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1542 ;; Is this module globally installed?"
1543 '(#:tests? #f))
1544 (native-inputs
1545 `(("python-setuptools-scm" ,python-setuptools-scm)))
1546 (home-page "https://github.com/pytest-dev/py")
1547 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1548 (description
1549 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1550code introspection, and logging.")
1551 (license license:expat)))
1552
1553(define-public python2-py
1554 (package-with-python2 python-py))
1555
1556;; Recent versions of python-fixtures and python-testrepository need
1557;; python-pbr for packaging, which itself needs these two packages for
1558;; testing.
1559;; To fix this circular dependency, we use a build of python-pbr, based on the
1560;; same source, just without any test dependencies and with tests disabled.
1561;; python-pbr-minmal is then used to package python-fixtures and
1562;; python-testrepository.
1563;; Strictly speaking we currently could remove the test-requirements from the
1564;; normal python-pbr package (and save this package) since test are disabled
1565;; there anyway. But this may change in future.
1566(define-public python-pbr-minimal
1567 (package
1568 (name "python-pbr-minimal")
1569 (version "3.0.1")
1570 (source
1571 (origin
1572 (method url-fetch)
1573 (uri (pypi-uri "pbr" version))
1574 (sha256
1575 (base32
1576 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1577 (build-system python-build-system)
1578 (arguments
1579 `(#:tests? #f))
1580 (home-page "http://docs.openstack.org/developer/pbr/")
1581 (synopsis "Minimal build of python-pbr used for bootstrapping")
1582 (description
1583 "Used only for bootstrapping python2-pbr, you should not need this.")
1584 (license license:asl2.0)))
1585
1586(define-public python2-pbr-minimal
1587 (package-with-python2 python-pbr-minimal))
1588
1589(define-public python-pbr
1590 (package
1591 (inherit python-pbr-minimal)
1592 (name "python-pbr")
1593 (arguments
1594 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1595 (propagated-inputs
1596 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1597 (native-inputs
1598 `(("python-fixtures" ,python-fixtures-bootstrap)
1599 ;; discover, coverage, hacking, subunit
1600 ("python-mock" ,python-mock)
1601 ("python-six" ,python-six)
1602 ("python-sphinx" ,python-sphinx)
1603 ("python-testrepository" ,python-testrepository-bootstrap)
1604 ("python-testresources" ,python-testresources-bootstrap)
1605 ("python-testscenarios" ,python-testscenarios-bootstrap)
1606 ("python-testtools" ,python-testtools-bootstrap)
1607 ("python-virtualenv" ,python-virtualenv)))
1608 (synopsis "Enhance the default behavior of Python’s setuptools")
1609 (description
1610 "Python Build Reasonableness (PBR) is a library that injects some useful
1611and sensible default behaviors into your setuptools run. It will set
1612versions, process requirements files and generate AUTHORS and ChangeLog file
1613from git information.
1614")))
1615
1616(define-public python2-pbr
1617 (package-with-python2 python-pbr))
1618
1619(define-public python-exif-read
1620 (package
1621 (name "python-exif-read")
1622 (version "2.1.2")
1623 (source (origin
1624 (method url-fetch)
1625 (uri (pypi-uri "ExifRead" version))
1626 (sha256
1627 (base32
1628 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
1629 (build-system python-build-system)
1630 (arguments `(#:tests? #f)) ; no tests
1631 (home-page "https://github.com/ianare/exif-py")
1632 (synopsis "Python library to extract EXIF data from image files")
1633 (description
1634 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1635files.")
1636 (license license:bsd-3)))
1637
1638(define-public python2-exif-read
1639 (package-with-python2 python-exif-read))
1640
1641(define-public python-pyld
1642 (package
1643 (name "python-pyld")
1644 (version "1.0.3")
1645 (source (origin
1646 (method url-fetch)
1647 (uri (pypi-uri "PyLD" version))
1648 (sha256
1649 (base32
1650 "12i2g6xdj30k7xxcibg3sc5y76snwq8l6n8fy9lyi577kgy0h2pm"))))
1651 (build-system python-build-system)
1652 (home-page "https://github.com/digitalbazaar/pyld")
1653 (synopsis "Python implementation of the JSON-LD specification")
1654 (description
1655 "PyLD is an implementation of the JSON-LD specification.")
1656 (license license:bsd-3)))
1657
1658(define-public python2-pyld
1659 (package-with-python2 python-pyld))
1660
1661(define-public python-click
1662 (package
1663 (name "python-click")
61984855 1664 (version "7.0")
44d10b1f
RW
1665 (source
1666 (origin
1667 (method url-fetch)
1668 (uri (pypi-uri "click" version))
1669 (sha256
1670 (base32
61984855 1671 "1mzjixd4vjbjvzb6vylki9w1556a9qmdh35kzmq6cign46av952v"))))
44d10b1f
RW
1672 (build-system python-build-system)
1673 (arguments
8d7e7ca6 1674 `(#:phases
44d10b1f
RW
1675 (modify-phases %standard-phases
1676 (add-after 'unpack 'fix-paths
1677 (lambda* (#:key inputs #:allow-other-keys)
1678 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
1679 "cross-libc" "libc"))))
1680 (substitute* "click/_unicodefun.py"
1681 (("'locale'")
1682 (string-append "'" glibc "/bin/locale'"))))
8d7e7ca6
EF
1683 #t))
1684 (replace 'check
1685 (lambda _
1686 (invoke "python" "-m" "pytest"))))))
44d10b1f
RW
1687 (native-inputs
1688 `(("python-pytest" ,python-pytest)))
61984855 1689 (home-page "https://palletsprojects.com/p/click/")
44d10b1f
RW
1690 (synopsis "Command line library for Python")
1691 (description
1692 "Click is a Python package for creating command line interfaces in a
1693composable way with as little code as necessary. Its name stands for
1694\"Command Line Interface Creation Kit\". It's highly configurable but comes
1695with sensible defaults out of the box.")
1696 (license license:bsd-3)))
1697
1698(define-public python2-click
1699 (package-with-python2 python-click))
1700
1701(define-public python-wheel
1702 (package
1703 (name "python-wheel")
746c074b 1704 (version "0.32.3")
44d10b1f
RW
1705 (source
1706 (origin
1707 (method url-fetch)
1708 (uri (pypi-uri "wheel" version))
1709 (sha256
1710 (base32
746c074b 1711 "1dhxl1bf18bx9szmqcnxbg6204hp3im8089q3hkwh5jfa6zh75q2"))))
44d10b1f
RW
1712 (build-system python-build-system)
1713 (native-inputs
1714 `(("python-jsonschema" ,python-jsonschema)
1715 ("python-pytest-cov" ,python-pytest-cov)))
1716 (home-page "https://bitbucket.org/pypa/wheel/")
1717 (synopsis "Format for built Python packages")
1718 (description
1719 "A wheel is a ZIP-format archive with a specially formatted filename and
1720the @code{.whl} extension. It is designed to contain all the files for a PEP
1721376 compatible install in a way that is very close to the on-disk format. Many
1722packages will be properly installed with only the @code{Unpack} step and the
1723unpacked archive preserves enough information to @code{Spread} (copy data and
1724scripts to their final locations) at any later time. Wheel files can be
1725installed with a newer @code{pip} or with wheel's own command line utility.")
1726 (license license:expat)
1727 (properties `((python2-variant . ,(delay python2-wheel))))))
1728
1729(define-public python2-wheel
1730 (let ((wheel (package-with-python2
1731 (strip-python2-variant python-wheel))))
1732 (package (inherit wheel)
1733 (native-inputs `(("python2-functools32" ,python2-functools32)
1734 ,@(package-native-inputs wheel))))))
1735
1736(define-public python-vcversioner
1737 (package
1738 (name "python-vcversioner")
1739 (version "2.16.0.0")
1740 (source
1741 (origin
1742 (method url-fetch)
1743 (uri (pypi-uri "vcversioner" version))
1744 (sha256
1745 (base32
1746 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
1747 (build-system python-build-system)
1748 (synopsis "Python library for version number discovery")
1749 (description "Vcversioner is a Python library that inspects tagging
1750information in a variety of version control systems in order to discover
1751version numbers.")
1752 (home-page "https://github.com/habnabit/vcversioner")
1753 (license license:isc)))
1754
1755(define-public python2-vcversioner
1756 (package-with-python2 python-vcversioner))
1757
1758(define-public python-jsonschema
1759 (package
1760 (name "python-jsonschema")
1761 (version "2.6.0")
1762 (source (origin
1763 (method url-fetch)
786ccb87 1764 (uri (pypi-uri "jsonschema" version))
44d10b1f
RW
1765 (sha256
1766 (base32
1767 "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg"))))
1768 (build-system python-build-system)
1769 (arguments
1770 '(#:phases
1771 (modify-phases %standard-phases
8d466799 1772 (replace 'check (lambda _ (invoke "nosetests"))))))
44d10b1f
RW
1773 (native-inputs
1774 `(("python-nose" ,python-nose)
1775 ("python-vcversioner" ,python-vcversioner)))
1776 (home-page "https://github.com/Julian/jsonschema")
1777 (synopsis "Implementation of JSON Schema for Python")
1778 (description
1779 "Jsonschema is an implementation of JSON Schema for Python.")
1780 (license license:expat)
1781 (properties `((python2-variant . ,(delay python2-jsonschema))))))
1782
1783(define-public python2-jsonschema
1784 (let ((jsonschema (package-with-python2
1785 (strip-python2-variant python-jsonschema))))
1786 (package (inherit jsonschema)
1787 (native-inputs
1788 `(("python2-mock" ,python2-mock)
1789 ,@(package-native-inputs jsonschema)))
1790 (propagated-inputs
1791 `(("python2-functools32" ,python2-functools32))))))
1792
1793(define-public python-schema
1794 (package
1795 (name "python-schema")
1796 (version "0.6.6")
1797 (source
1798 (origin
1799 (method url-fetch)
1800 (uri (pypi-uri "schema" version))
1801 (sha256
1802 (base32
1803 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
1804 (build-system python-build-system)
1805 (native-inputs
1806 `(("python-pytest" ,python-pytest)))
1807 (home-page "https://github.com/keleshev/schema")
1808 (synopsis "Simple data validation library")
1809 (description
1810 "@code{python-schema} is a library for validating Python data
1811structures, such as those obtained from config-files, forms, external
1812services or command-line parsing, converted from JSON/YAML (or
1813something else) to Python data-types.")
1814 (license license:psfl)))
1815
1816(define-public python2-schema
1817 (package-with-python2 python-schema))
1818
1819(define-public python-schema-0.5
1820 (package (inherit python-schema)
1821 (version "0.5.0")
1822 (source
1823 (origin
1824 (method url-fetch)
1825 (uri (pypi-uri "schema" version))
1826 (sha256
1827 (base32
1828 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
1829
1830(define-public python2-schema-0.5
1831 (package-with-python2 python-schema-0.5))
1832
1833(define-public python-kitchen
1834 (package
1835 (name "python-kitchen")
1836 (version "1.2.5")
1837 (source
1838 (origin
1839 (method url-fetch)
1840 (uri (pypi-uri "kitchen" version))
1841 (sha256
1842 (base32
1843 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
1844 (build-system python-build-system)
1845 (propagated-inputs
1846 `(("python-chardet" ,python-chardet)))
1847 (home-page "https://github.com/fedora-infra/kitchen")
1848 (synopsis "Python API for snippets")
1849 (description "@code{kitchen} module provides a python API for all sorts of
1850little useful snippets of code that everybody ends up writing for their projects
1851but never seem big enough to build an independent release. Use kitchen and stop
1852cutting and pasting that code over and over.")
1853 (license (list license:lgpl2.1+
1854 ;; subprocess.py, test_subprocess.py,
1855 ;; kitchen/pycompat25/defaultdict.py:
1856 license:psfl))))
1857
1858(define-public python2-kitchen
1859 (package-with-python2 python-kitchen))
1860
1861(define-public python-unidecode
1862 (package
1863 (name "python-unidecode")
1864 (version "1.0.23")
1865 (source (origin
1866 (method url-fetch)
1867 (uri (pypi-uri "Unidecode" version))
1868 (sha256
1869 (base32
1870 "1ysjbr3nqfqj97h8zyj3v9pya413vkv7a1mzml80w37xx15kb1cb"))))
1871 (build-system python-build-system)
1872 (home-page "https://pypi.python.org/pypi/Unidecode")
1873 (synopsis "ASCII transliterations of Unicode text")
1874 (description
1875 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
1876useful when integrating with legacy code that doesn't support Unicode, or for
1877ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
1878machine identifiers from human-readable Unicode strings that should still be
1879somewhat intelligible.")
1880 (license license:gpl2+)))
1881
1882(define-public python2-unidecode
1883 (package-with-python2 python-unidecode))
1884
1885(define-public python-pyjwt
1886 (package
1887 (name "python-pyjwt")
1888 (version "1.5.3")
1889 (source
1890 (origin
1891 (method url-fetch)
1892 (uri (pypi-uri "PyJWT" version))
1893 (sha256
1894 (base32
1895 "1rxsg14i33vm2i6lz0my628108c81k43v10n4h3p0gx62xdyf2sh"))
1896 (modules '((guix build utils)))
1897 (snippet
1898 '(begin
1899 (for-each delete-file-recursively
1900 (find-files "." "\\.pyc$"))
1901 #t))))
1902 (build-system python-build-system)
1903 (native-inputs
1904 `(("python-pytest" ,python-pytest)
1905 ("python-pytest-cov" ,python-pytest-cov)
1906 ("python-pytest-runner" ,python-pytest-runner)))
1907 (home-page "https://github.com/progrium/pyjwt")
1908 (synopsis "JSON Web Token implementation in Python")
1909 (description
1910 "PyJWT is a JSON Web Token implementation written in Python.")
1911 (license license:expat)))
1912
1913(define-public python2-pyjwt
1914 (package-with-python2 python-pyjwt))
1915
1916(define-public python-pykka
1917 (package
1918 (name "python-pykka")
1919 (version "1.2.1")
1920 (source
1921 (origin
1922 (method url-fetch)
1923 (uri (pypi-uri "Pykka" version))
1924 (sha256
1925 (base32
1926 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
1927 (build-system python-build-system)
1928 (native-inputs
1929 `(("python-mock" ,python-mock)
1930 ("python-nose" ,python-nose)
1931 ("python-gevent" ,python-gevent)
1932 ("python-eventlet" ,python-eventlet)))
1933 (home-page "https://www.pykka.org/")
1934 (synopsis "Pykka is a Python implementation of the actor model")
1935 (description
1936 "Pykka is a Python implementation of the actor model.
1937The actor model introduces some simple rules to control the sharing
1938of state and cooperation between execution units, which makes it
1939easier to build concurrent applications.")
1940 (license license:asl2.0)))
1941
1942(define-public python2-pykka
1943 (package-with-python2 python-pykka))
1944
8d22f7e3
VC
1945(define-public python-pymsgbox
1946 (package
1947 (name "python-pymsgbox")
1948 (version "1.0.6")
1949 (source
1950 (origin
1951 (method git-fetch)
1952 (uri (git-reference
1953 ;; LICENSE.txt is not present on pypi
1954 (url "https://github.com/asweigart/PyMsgBox")
1955 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
1956 (file-name (git-file-name name version))
1957 (sha256
1958 (base32
1959 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
1960 (arguments
1961 ;; Circular dependency to run tests:
1962 ;; Tests need pyautogui, which depends on pymsgbox.
1963 '(#:tests? #f))
1964 (build-system python-build-system)
1965 (home-page "https://github.com/asweigart/PyMsgBox")
1966 (synopsis "Python module for JavaScript-like message boxes")
1967 (description
1968 "PyMsgBox is a simple, cross-platform, pure Python module for
1969JavaScript-like message boxes. Types of dialog boxes include:
1970@enumerate
1971@item alert
1972@item confirm
1973@item prompt
1974@item password
1975@end enumerate
1976")
1977 (license license:bsd-3)))
1978
44d10b1f
RW
1979(define-public python-pympler
1980 (package
1981 (name "python-pympler")
1982 (home-page "https://pythonhosted.org/Pympler/")
1983 (version "0.5")
1984 (source (origin
1985 (method url-fetch)
1986 (uri (pypi-uri "Pympler" version))
1987 (sha256
1988 (base32
1989 "03qwsbilqgvnbl3a1jmpgixbr2kq6m3fvdlzyr3wdp01bwlc85kx"))))
1990 (build-system python-build-system)
1991 (arguments
1992 `(#:phases (modify-phases %standard-phases
1993 (delete 'check)
1994 (add-after 'install 'check
1995 (lambda* (#:key inputs outputs #:allow-other-keys)
1996 (add-installed-pythonpath inputs outputs)
1997 (invoke "python" "setup.py" "test"))))))
1998 (synopsis "Measure, monitor and analyze memory behavior")
1999 (description
2000 "Pympler is a development tool to measure, monitor and analyze
2001the memory behavior of Python objects in a running Python application.
2002
2003By pympling a Python application, detailed insight in the size and the
2004lifetime of Python objects can be obtained. Undesirable or unexpected
2005runtime behavior like memory bloat and other @samp{pymples} can easily
2006be identified.
2007
2008A web profiling frontend exposes process statistics, garbage
2009visualisation and class tracker statistics.")
2010 (license license:asl2.0)))
2011
2012(define-public python2-pympler
2013 (package-with-python2 python-pympler))
2014
2015(define-public python-itsdangerous
2016 (package
2017 (name "python-itsdangerous")
acfcf2ed 2018 (version "1.1.0")
44d10b1f
RW
2019 (source
2020 (origin
2021 (method url-fetch)
acfcf2ed 2022 (uri (pypi-uri "itsdangerous" version))
44d10b1f
RW
2023 (sha256
2024 (base32
acfcf2ed 2025 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
44d10b1f 2026 (build-system python-build-system)
acfcf2ed 2027 (home-page "https://palletsprojects.com/p/itsdangerous/")
44d10b1f
RW
2028 (synopsis "Python library for passing data to/from untrusted environments")
2029 (description
2030 "Itsdangerous provides various helpers to pass trusted data to untrusted
2031environments and back.")
2032 (license license:bsd-3)))
2033
2034(define-public python2-itsdangerous
2035 (package-with-python2 python-itsdangerous))
2036
2037(define-public python-pyyaml
2038 (package
2039 (name "python-pyyaml")
2040 (version "3.13")
2041 (source
2042 (origin
2043 (method url-fetch)
2044 (uri (pypi-uri "PyYAML" version))
2045 (sha256
2046 (base32
2047 "1gx603g484z46cb74j9rzr6sjlh2vndxayicvlyhxdz98lhhkwry"))))
2048 (build-system python-build-system)
2049 (inputs
2050 `(("libyaml" ,libyaml)))
2051 (home-page "http://pyyaml.org/wiki/PyYAML")
2052 (synopsis "YAML parser and emitter for Python")
2053 (description
2054 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2055complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2056API, and sensible error messages. PyYAML supports standard YAML tags and
2057provides Python-specific tags that allow to represent an arbitrary Python
2058object.")
2059 (license license:expat)))
2060
2061(define-public python2-pyyaml
2062 (package-with-python2 python-pyyaml))
2063
2064(define-public python-vine
2065 (package
2066 (name "python-vine")
2067 (version "1.1.4")
2068 (source
2069 (origin
2070 (method url-fetch)
2071 (uri (pypi-uri "vine" version))
2072 (sha256
2073 (base32
2074 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
2075 (build-system python-build-system)
2076 (native-inputs
2077 `(("python-pytest" ,python-pytest)
2078 ("python-case" ,python-case)))
2079 (home-page "https://github.com/celery/vine")
2080 (synopsis "Promises for Python")
2081 (description
2082 "@code{vine} provides a special implementation of promises in that it can
2083be used both for \"promise of a value\" and lazy evaluation. The biggest
2084upside for this is that everything in a promise can also be a promise,
2085e.g. filters, callbacks and errbacks can all be promises.")
2086 (license license:bsd-3)))
2087
2088(define-public python-virtualenv
2089 (package
2090 (name "python-virtualenv")
2782bd51 2091 (version "16.1.0")
44d10b1f
RW
2092 (source
2093 (origin
2094 (method url-fetch)
2095 (uri (pypi-uri "virtualenv" version))
2096 (sha256
2097 (base32
2782bd51 2098 "0242cg3hdq3qdvx5flyrki8lpwlgwf5k45c21ks5049fv7ygm6gq"))))
44d10b1f
RW
2099 (build-system python-build-system)
2100 (arguments
2101 `(#:phases
2102 (modify-phases %standard-phases
2782bd51 2103 (add-before 'check 'disable-failing-test
44d10b1f
RW
2104 (lambda _
2105 ;; Disable failing test. See upstream bug report
2106 ;; https://github.com/pypa/virtualenv/issues/957
2107 (substitute* "tests/test_virtualenv.py"
2108 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2782bd51 2109 #t)))))
44d10b1f
RW
2110 (native-inputs
2111 `(("python-mock" ,python-mock)
2112 ("python-pytest" ,python-pytest)))
2113 (home-page "https://virtualenv.pypa.io/")
2114 (synopsis "Virtual Python environment builder")
2115 (description
2116 "Virtualenv is a tool to create isolated Python environments.")
2117 (license license:expat)))
2118
2119(define-public python2-virtualenv
2120 (package-with-python2 python-virtualenv))
2121
2122(define-public python-markupsafe
2123 (package
2124 (name "python-markupsafe")
2125 (version "1.0")
2126 (source
2127 (origin
2128 (method url-fetch)
5182927c 2129 (uri (pypi-uri "MarkupSafe" version))
44d10b1f
RW
2130 (sha256
2131 (base32
2132 "0rdn1s8x9ni7ss8rfiacj7x1085lx8mh2zdwqslnw8xc3l4nkgm6"))))
2133 (build-system python-build-system)
2134 (home-page "https://github.com/mitsuhiko/markupsafe")
2135 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2136 (description
2137 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2138for Python.")
2139 (license license:bsd-3)))
2140
2141(define-public python2-markupsafe
2142 (package-with-python2 python-markupsafe))
2143
2144(define-public python-jinja2
2145 (package
2146 (name "python-jinja2")
2147 (version "2.10")
2148 (source
2149 (origin
2150 (method url-fetch)
2151 (uri (pypi-uri "Jinja2" version))
2152 (sha256
2153 (base32
2154 "190l36hfw3wb2n3n68yacjabxyb1pnxwn7vjx96cmjj002xy2jzq"))))
2155 (build-system python-build-system)
2156 (propagated-inputs
2157 `(("python-markupsafe" ,python-markupsafe)))
2158 (home-page "http://jinja.pocoo.org/")
2159 (synopsis "Python template engine")
2160 (description
2161 "Jinja2 is a small but fast and easy to use stand-alone template engine
2162written in pure Python.")
2163 (license license:bsd-3)))
2164
2165(define-public python2-jinja2
2166 (package-with-python2 python-jinja2))
2167
2168(define-public python-pystache
2169 (package
2170 (name "python-pystache")
2171 (version "0.5.4")
2172 (source (origin
2173 (method url-fetch)
2174 (uri (pypi-uri "pystache" version))
2175 (sha256
2176 (base32
2177 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2178 (build-system python-build-system)
2179 (arguments
2180 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2181 (home-page "http://defunkt.io/pystache/")
2182 (synopsis "Python logic-less template engine")
2183 (description
2184 "Pystache is a Python implementation of the framework agnostic,
2185logic-free templating system Mustache.")
2186 (license license:expat)
2187 (properties `((python2-variant . ,(delay python2-pystache))))))
2188
2189(define-public python2-pystache
2190 (package (inherit (package-with-python2
2191 (strip-python2-variant python-pystache)))
2192 (arguments
2193 `(#:python ,python-2
2194 #:phases
2195 (modify-phases %standard-phases
2196 (replace 'check
2197 (lambda _
dfafc29b 2198 (invoke "python" "test_pystache.py"))))))))
44d10b1f
RW
2199
2200(define-public python-joblib
2201 (package
2202 (name "python-joblib")
2203 (version "0.13.0")
2204 (source (origin
2205 (method url-fetch)
2206 (uri (pypi-uri "joblib" version))
2207 (sha256
2208 (base32
2209 "0612nazad8dxmn3xghfrmjax6456l4xy6hn9cngs7vydi14ds7v5"))))
2210 (build-system python-build-system)
2211 (arguments
2212 `(#:phases
2213 (modify-phases %standard-phases
2214 (replace 'check
2215 (lambda _ (invoke "pytest" "-v" "joblib"))))))
2216 (native-inputs
2217 `(("python-pytest" ,python-pytest)))
2218 (home-page "https://joblib.readthedocs.io/")
2219 (synopsis "Using Python functions as pipeline jobs")
2220 (description
2221 "Joblib is a set of tools to provide lightweight pipelining in Python.
2222In particular, joblib offers: transparent disk-caching of the output values
2223and lazy re-evaluation (memoize pattern), easy simple parallel computing
2224logging and tracing of the execution.")
2225 (license license:bsd-3)))
2226
2227(define-public python2-joblib
2228 (package-with-python2 python-joblib))
2229
a3363341
VC
2230(define-public python-daemon
2231 (package
2232 (name "python-daemon")
2233 (version "2.2.3")
2234 (source
2235 (origin
2236 (method url-fetch)
2237 (uri (pypi-uri "python-daemon" version))
2238 (sha256
2239 (base32
2240 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
2241 (build-system python-build-system)
2242 (arguments
2243 `(#:phases
2244 (modify-phases %standard-phases
2245 (add-before 'check 'disable-tests
2246 (lambda _
2247 ;; FIXME: Determine why test fails
2248 (substitute* "test/test_daemon.py"
2249 (("test_detaches_process_context")
2250 "skip_test_detaches_process_context"))
2251 #t)))))
2252 (propagated-inputs
2253 `(("python-lockfile" ,python-lockfile)))
2254 (native-inputs
2255 `(("python-unittest2" ,python-unittest2)
2256 ("python-testtools" ,python-testtools)
2257 ("python-testscenarios" ,python-testscenarios)
2258 ("python-mock" ,python-mock)
2259 ("python-docutils" ,python-docutils)))
2260 (home-page "https://pagure.io/python-daemon/")
2261 (synopsis "Python library for making a Unix daemon process")
2262 (description "Python-daemon is a library that assists a Python program to
2263turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
2264
2265This library provides a @code{DaemonContext} class that manages the following
2266important tasks for becoming a daemon process:
2267@enumerate
2268@item Detach the process into its own process group.
2269@item Set process environment appropriate for running inside a chroot.
2270@item Renounce suid and sgid privileges.
2271@item Close all open file descriptors.
2272@item Change the working directory, uid, gid, and umask.
2273@item Set appropriate signal handlers.
2274@item Open new file descriptors for stdin, stdout, and stderr.
2275@item Manage a specified PID lock file.
2276@item Register cleanup functions for at-exit processing.
2277@end enumerate")
2278 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
2279 (license (list license:asl2.0 license:gpl3+))))
2280
44d10b1f
RW
2281(define-public python-docutils
2282 (package
2283 (name "python-docutils")
2284 (version "0.14")
2285 (source
2286 (origin
2287 (method url-fetch)
2288 (uri (pypi-uri "docutils" version))
2289 (sha256
2290 (base32
2291 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2292 (build-system python-build-system)
2293 (arguments
2294 '(#:tests? #f)) ; no setup.py test command
2295 (home-page "http://docutils.sourceforge.net/")
2296 (synopsis "Python Documentation Utilities")
2297 (description
2298 "Docutils is a modular system for processing documentation into useful
2299formats, such as HTML, XML, and LaTeX. For input Docutils supports
2300reStructuredText.")
2301 ;; Most of the source code is public domain, but some source files are
2302 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2303 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2304
2305(define-public python2-docutils
2306 (package-with-python2 python-docutils))
2307
2308(define-public python-pygments
2309 (package
2310 (name "python-pygments")
2311 (version "2.2.0")
2312 (source
2313 (origin
2314 (method url-fetch)
2315 (uri (pypi-uri "Pygments" version))
2316 (sha256
2317 (base32
2318 "1k78qdvir1yb1c634nkv6rbga8wv4289xarghmsbbvzhvr311bnv"))))
2319 (build-system python-build-system)
2320 (arguments
2321 ;; FIXME: Tests require sphinx, which depends on this.
2322 '(#:tests? #f))
2323 (home-page "http://pygments.org/")
2324 (synopsis "Syntax highlighting")
2325 (description
2326 "Pygments is a syntax highlighting package written in Python.")
2327 (license license:bsd-2)))
2328
2329(define-public python2-pygments
2330 (package-with-python2 python-pygments))
2331
2332(define-public python-sphinxcontrib-websupport
2333 (package
2334 (name "python-sphinxcontrib-websupport")
2335 (version "1.1.0")
2336 (source (origin
2337 (method url-fetch)
2338 (uri (pypi-uri "sphinxcontrib-websupport" version))
2339 (sha256
2340 (base32
2341 "1ff3ix76xi1y6m99qxhaq5161ix9swwzydilvdya07mgbcvpzr4x"))))
2342 (build-system python-build-system)
2343 (arguments
2344 ;; FIXME: Tests depend on Sphinx, which depends on this.
2345 `(#:tests? #f))
2346 (home-page "http://sphinx-doc.org/")
2347 (synopsis "Sphinx API for web applications")
2348 (description "This package provides a Python API to easily integrate
2349Sphinx documentation into your web application. It provides tools to
2350integrate Sphinx documents in web templates and to handle searches.")
2351 (license license:bsd-3)))
2352
2353(define-public python2-sphinxcontrib-websupport
2354 (package-with-python2 python-sphinxcontrib-websupport))
2355
2356(define-public python-sphinx
2357 (package
2358 (name "python-sphinx")
2359 (version "1.7.7")
2360 (source
2361 (origin
2362 (method url-fetch)
2363 (uri (pypi-uri "Sphinx" version))
2364 (sha256
2365 (base32
2366 "0pkkbfj7cl157q550gcs45am5y78ps0h7q6455d64s1zmw01jlvi"))))
2367 (build-system python-build-system)
2368 (arguments
2369 `(#:phases
2370 (modify-phases %standard-phases
2371 (replace 'check
2372 (lambda _
2373 ;; Requires Internet access.
2374 (delete-file "tests/test_build_linkcheck.py")
2375 (substitute* "tests/test_build_latex.py"
2376 (("@pytest.mark.sphinx\\('latex', testroot='images'\\)")
2377 "@pytest.mark.skip()"))
2378 (when (which "python")
2379 ;; XXX: These tests are broken when using Python2:
2380 ;; <https://github.com/sphinx-doc/sphinx/issues/4710>.
2381 (delete-file "tests/test_api_translator.py")
2382 (delete-file "tests/test_setup_command.py"))
2383 (invoke "make" "test"))))))
2384 (propagated-inputs
2385 `(("python-imagesize" ,python-imagesize)
2386 ("python-sphinx-alabaster-theme"
2387 ,python-sphinx-alabaster-theme)
2388 ("python-babel" ,python-babel)
2389 ("python-snowballstemmer" ,python-snowballstemmer)
2390 ("python-docutils" ,python-docutils)
2391 ("python-jinja2" ,python-jinja2)
2392 ("python-packaging" ,python-packaging)
2393 ("python-pygments" ,python-pygments)
2394 ("python-requests" ,python-requests)
2395 ("python-six" ,python-six)
2396 ("python-sphinxcontrib-websupport" ,python-sphinxcontrib-websupport)))
2397 (native-inputs
2398 `(("graphviz" ,graphviz)
2399 ("imagemagick" ,imagemagick) ;for "convert"
2400 ("python-html5lib" ,python-html5lib)
2401 ("python-mock" ,python-mock)
2402 ("python-nose" ,python-nose)
2403 ("python-pytest" ,python-pytest)))
2404 (home-page "http://sphinx-doc.org/")
2405 (synopsis "Python documentation generator")
2406 (description "Sphinx is a tool that makes it easy to create documentation
2407for Python projects or other documents consisting of multiple reStructuredText
2408sources.")
2409 (license license:bsd-3)
2410 (properties `((python2-variant . ,(delay python2-sphinx))))))
2411
2412(define-public python2-sphinx
2413 (let ((base (package-with-python2 (strip-python2-variant python-sphinx))))
2414 (package
2415 (inherit base)
2416 (native-inputs `(("python2-mock" ,python2-mock)
2417 ("python2-enum34" ,python2-enum34)
2418 ,@(package-native-inputs base)))
2419 (propagated-inputs `(("python2-pytz" ,python2-pytz)
2420 ("python2-typing" ,python2-typing)
2421 ,@(package-propagated-inputs base))))))
2422
2423(define-public python-sphinx-gallery
2424 (package
2425 (name "python-sphinx-gallery")
2426 (version "0.1.13")
2427 (source (origin
2428 (method url-fetch)
2429 (uri (string-append "https://github.com/sphinx-gallery/sphinx-gallery"
2430 "/archive/v" version ".tar.gz"))
2431 (file-name (string-append name "-" version ".tar.gz"))
2432 (sha256
2433 (base32
2434 "03fs99mcb1r7qp0xixqv07vcz98sk21yq19ffdysi0infdcpzfkd"))))
2435 (build-system python-build-system)
2436 (arguments
2437 ;; FIXME: Tests attempt to download <https://docs.python.org/3/objects.inv>,
2438 ;; <https://docs.scipy.org/doc/numpy/objects.inv>, and
2439 ;; <https://matplotlib.org/objects.inv>.
2440 `(#:tests? #f))
2441 (native-inputs
2442 `(("python-pytest-runner" ,python-pytest-runner)))
2443 (home-page "https://sphinx-gallery.github.io/")
2444 (synopsis "Generate an examples gallery automatically")
2445 (description
2446 "@code{sphinx_gallery} is a Sphinx extension that builds an HTML version
2447from any set of Python scripts and puts it into an examples gallery.")
2448 (license license:bsd-3)))
2449
2450(define-public python2-sphinx-gallery
2451 (package-with-python2 python-sphinx-gallery))
2452
2453(define-public python-sphinx-rtd-theme
2454 (package
2455 (name "python-sphinx-rtd-theme")
2456 (version "0.2.4")
2457 (source
2458 (origin
2459 (method url-fetch)
2460 (uri (pypi-uri "sphinx_rtd_theme" version))
2461 (sha256
2462 (base32
2463 "05rlhjzdyapr2w74jjs7mrm8hi69qskcr5vya9f9drpsys7lpxrd"))))
2464 (build-system python-build-system)
2465 (arguments '(#:tests? #f)) ; No tests.
2466 (propagated-inputs
2467 `(("python-sphinx" ,python-sphinx)))
2468 (home-page "https://github.com/snide/sphinx_rtd_theme/")
2469 (synopsis "ReadTheDocs.org theme for Sphinx")
2470 (description "A theme for Sphinx used by ReadTheDocs.org.")
2471 (license license:expat)))
2472
2473(define-public python2-sphinx-rtd-theme
2474 (package-with-python2 python-sphinx-rtd-theme))
2475
2476(define-public python-guzzle-sphinx-theme
2477 (package
2478 (name "python-guzzle-sphinx-theme")
2479 (version "0.7.11")
2480 (source
2481 (origin
2482 (method url-fetch)
2483 (uri (pypi-uri "guzzle_sphinx_theme" version))
2484 (sha256
2485 (base32
2486 "1rnkzrrsbnifn3vsb4pfaia3nlvgvw6ndpxp7lzjrh23qcwid34v"))))
2487 (build-system python-build-system)
2488 (propagated-inputs
2489 `(("python-sphinx" ,python-sphinx)))
2490 (home-page "https://github.com/guzzle/guzzle_sphinx_theme")
2491 (synopsis "Sphinx theme used by Guzzle")
2492 (description "This package provides guzzle_sphinx_theme, a theme for the
2493Sphinx documentation system, used by @uref{http://docs.guzzlephp.org, Guzzle}
2494and several other projects.")
2495 (license license:expat)))
2496
2497(define-public python2-guzzle-sphinx-theme
2498 (package-with-python2 python-guzzle-sphinx-theme))
2499
2500(define-public python-rst.linker
2501 (package
2502 (name "python-rst.linker")
2503 (version "1.10")
2504 (source
2505 (origin
2506 (method url-fetch)
2507 (uri (pypi-uri "rst.linker" version))
2508 (sha256
2509 (base32
2510 "0iqaacp7pj1s8avs4kc0qg0r7dscywaq37y6l9j14glqdikk0wdj"))))
2511 (build-system python-build-system)
2512 (propagated-inputs
2513 `(("python-dateutil" ,python-dateutil)
2514 ("python-six" ,python-six)))
2515 (native-inputs
2516 `(("python-setuptools-scm" ,python-setuptools-scm)))
2517 ;; Test would require path.py, which would introduce a cyclic dependence.
2518 (arguments `(#:tests? #f))
2519 ;; Note: As of version 1.7 the documentation is not worth building.
2520 (home-page "https://github.com/jaraco/rst.linker")
2521 (synopsis "Sphinx plugin to add links and timestamps")
2522 (description "rst.linker allows to automatically replace text by a
2523reStructuredText external reference or timestamps. It's primary purpose is to
2524augment the changelog, but it can be used for other documents, too.")
2525 (license license:expat)))
2526
2527(define-public python2-rst.linker
2528 (package-with-python2 python-rst.linker))
2529
2530(define-public python-feedgenerator
2531 (package
2532 (name "python-feedgenerator")
2533 (version "1.9")
2534 (source
2535 (origin
2536 (method url-fetch)
2537 (uri (pypi-uri "feedgenerator" version))
2538 (sha256
2539 (base32
2540 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
2541 (modules '((guix build utils)))
2542 (snippet
2543 '(begin
2544 ;; Remove pre-compiled .pyc files from source.
2545 (for-each delete-file-recursively
2546 (find-files "." "__pycache__" #:directories? #t))
2547 (for-each delete-file (find-files "." "\\.pyc$"))
2548 #t))))
2549 (build-system python-build-system)
2550 (propagated-inputs
2551 `(("python-pytz" ,python-pytz)
2552 ("python-six" ,python-six)))
2553 (home-page "https://github.com/getpelican/feedgenerator")
2554 (synopsis
2555 "Standalone version of Django's Atom/RSS feed generator")
2556 (description
2557 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2558which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
2559 (license license:bsd-3)))
2560
2561(define-public python2-feedgenerator
2562 (package-with-python2 python-feedgenerator))
2563
2564(define-public python-toml
2565 (package
2566 (name "python-toml")
2567 (version "0.9.4")
2568 (source
2569 (origin
2570 (method url-fetch)
2571 (uri (pypi-uri "toml" version))
2572 (sha256
2573 (base32
2574 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
2575 (build-system python-build-system)
2576 (arguments
2577 `(#:tests? #f)) ;no tests suite in release
2578 (home-page "https://github.com/uiri/toml")
2579 (synopsis "Library for TOML")
2580 (description
2581 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
2582Language (TOML) configuration files.")
2583 (license license:expat)))
2584
346c8752
BG
2585(define-public python-jsonrpc-server
2586 (package
2587 (name "python-jsonrpc-server")
2588 (version "0.1.2")
2589 (source
2590 (origin
2591 (method url-fetch)
2592 (uri (pypi-uri "python-jsonrpc-server" version))
2593 (sha256
2594 (base32
2595 "0m4ykpcdy52x37n1ikysp07j7p8ialcdvvvsrjp3545sn7iiid09"))))
2596 (build-system python-build-system)
2597 (propagated-inputs
2598 `(("python-future" ,python-future)
2599 ("python-mock" ,python-mock)
2600 ("python-pytest" ,python-pytest)))
2601 (home-page
2602 "https://github.com/palantir/python-jsonrpc-server")
2603 (synopsis "JSON RPC 2.0 server library")
2604 (description
2605 "This packages provides a JSON RPC 2.0 server library for Python.")
2606 (license license:expat)))
2607
56f4ad47
BG
2608(define-public python-pydocstyle
2609 (package
2610 (name "python-pydocstyle")
2611 (version "3.0.0")
2612 (source
2613 (origin
2614 (method url-fetch)
2615 (uri (pypi-uri "pydocstyle" version))
2616 (sha256
2617 (base32
2618 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
2619 (build-system python-build-system)
2620 (propagated-inputs
2621 `(("python-six" ,python-six)
2622 ("python-snowballstemmer" ,python-snowballstemmer)))
2623 (home-page
2624 "https://github.com/PyCQA/pydocstyle/")
2625 (synopsis "Python docstring style checker")
2626 (description
2627 "This package provides a style checker for the Python Language
2628Server (PLS).")
2629 (license license:expat)))
2630
be4d840c
BG
2631(define-public python-language-server
2632 (package
2633 (name "python-language-server")
9c7226df 2634 (version "0.24.0")
be4d840c
BG
2635 (source
2636 (origin
2637 (method url-fetch)
2638 (uri (pypi-uri "python-language-server" version))
2639 (sha256
2640 (base32
9c7226df 2641 "05zmv6jr7qbgnkz0lqh5pr7kr4lm12i8ljm2k5h5kz3q9m8d4mm0"))))
be4d840c
BG
2642 (build-system python-build-system)
2643 (propagated-inputs
2644 `(("python-pluggy" ,python-pluggy)
2645 ("python-jsonrpc-server" ,python-jsonrpc-server)
2646 ("python-jedi" ,python-jedi)
2647 ("python-yapf" ,python-yapf)
2648 ("python-pyflakes" ,python-pyflakes)
2649 ("python-pydocstyle" ,python-pydocstyle)
2650 ("python-pycodestyle" ,python-pycodestyle)
2651 ("python-mccabe" ,python-mccabe)
2652 ("python-rope" ,python-rope)
2653 ("python-autopep8" ,python-autopep8)))
2654 (home-page "https://github.com/palantir/python-language-server")
2655 (synopsis "Python implementation of the Language Server Protocol")
2656 (description
2657 "The Python Language Server (pyls) is an implementation of the Python 3
2658language specification for the Language Server Protocol (LSP). This tool is
2659used in text editing environments to provide a complete and integrated
2660feature-set for programming Python effectively.")
2661 (license license:expat)))
2662
44d10b1f
RW
2663(define-public python-black
2664 (package
2665 (name "python-black")
2666 (version "18.6b4")
2667 (source
2668 (origin
2669 (method url-fetch)
2670 (uri (pypi-uri "black" version))
2671 (sha256
2672 (base32
2673 "0i4sfqgz6w15vd50kbhi7g7rifgqlf8yfr8y78rypd56q64qn592"))))
2674 (build-system python-build-system)
2675 (arguments
2676 `(#:phases
2677 (modify-phases %standard-phases
2678 (add-after 'patch-source-shebangs 'patch-extra-shebangs
2679 (lambda _
2680 (let ((python3 (which "python3")))
2681 (substitute* '("tests/data/fmtonoff.py"
2682 "tests/data/string_prefixes.py"
2683 "tests/data/function.py")
2684 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
2685 (string-append "#!" python3 (if (string? minor-version)
2686 minor-version
2687 ""))))))))))
2688 (propagated-inputs
2689 `(("python-click" ,python-click)
2690 ("python-attrs" ,python-attrs)
2691 ("python-appdirs" ,python-appdirs)
2692 ("python-toml" ,python-toml)))
2693 (home-page "https://github.com/ambv/black")
2694 (synopsis "The uncompromising code formatter")
2695 (description "Black is the uncompromising Python code formatter.")
2696 (license license:expat)))
2697
2698(define-public python-blinker
2699 (package
2700 (name "python-blinker")
2701 (version "1.4")
2702 (source
2703 (origin
2704 (method url-fetch)
2705 (uri (pypi-uri "blinker" version))
2706 (sha256
2707 (base32
2708 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
2709 (build-system python-build-system)
2710 (home-page "http://pythonhosted.org/blinker/")
2711 (synopsis "Fast, simple object-to-object and broadcast signaling")
2712 (description
2713 "Blinker provides a fast dispatching system that allows any number of
2714interested parties to subscribe to events, or \"signals\".")
2715 (license license:expat)))
2716
2717(define-public python2-blinker
2718 (package-with-python2 python-blinker))
2719
2720(define-public pelican
2721 (package
2722 (name "pelican")
aa71b690 2723 (version "4.0.1")
44d10b1f
RW
2724 (source
2725 (origin
2726 (method url-fetch)
2727 (uri (pypi-uri "pelican" version))
2728 (sha256
2729 (base32
aa71b690 2730 "05yda7n6r0ll18fpdjzkzyr0ls8hbb86fnjyb33k9jvv5avah2lr"))))
44d10b1f
RW
2731 (build-system python-build-system)
2732 (propagated-inputs
2733 `(("python-feedgenerator" ,python-feedgenerator)
2734 ("python-jinja2" ,python-jinja2)
2735 ("python-pygments" ,python-pygments)
2736 ("python-docutils" ,python-docutils)
2737 ("python-pytz" ,python-pytz)
2738 ("python-blinker" ,python-blinker)
2739 ("python-unidecode" ,python-unidecode)
2740 ("python-six" ,python-six)
2741 ("python-dateutil" ,python-dateutil)
2742 ("python-markdown" ,python-markdown)))
2743 (home-page "https://getpelican.com/")
2744 (arguments
2745 `(;; XXX Requires a lot more packages to do unit tests :P
2746 #:tests? #f
2747 #:phases (modify-phases %standard-phases
2748 (add-before
2749 'install 'adjust-requires
2750 ;; Since feedgenerator is installed from git, it doesn't
2751 ;; conform to the version requirements.
2752 ;;
2753 ;; We *do have* "feedgenerator >= 1.6", but strip off the
2754 ;; version requirement so setuptools doesn't get confused.
2755 (lambda _
2756 (substitute* "setup.py"
2757 (("['\"]feedgenerator.*?['\"]")
2758 "'feedgenerator'")))))))
2759 (synopsis "Python-based static site publishing system")
2760 (description
2761 "Pelican is a tool to generate a static blog from reStructuredText,
2762Markdown input files, and more. Pelican uses Jinja2 for templating
2763and is very extensible.")
2764 (license license:agpl3+)))
2765
2766(define-public python-scikit-image
2767 (package
2768 (name "python-scikit-image")
9ff04084 2769 (version "0.14.2")
44d10b1f
RW
2770 (source
2771 (origin
2772 (method url-fetch)
2773 (uri (pypi-uri "scikit-image" version))
2774 (sha256
9ff04084 2775 (base32 "07qchljkyxvg5nrm12fvszi7pmjk4m01qp0w0z8syxzxxs20pz8s"))))
44d10b1f
RW
2776 (build-system python-build-system)
2777 (arguments
2778 ;; TODO: Some tests require running X11 server. Disable them?
2779 '(#:tests? #f))
2780 ;; See DEPENDS.txt for the list of build and run time requiremnts
2781 (propagated-inputs
2782 `(("python-cloudpickle" ,python-cloudpickle)
2783 ("python-dask" ,python-dask)
2784 ("python-matplotlib" ,python-matplotlib)
2785 ("python-networkx" ,python-networkx)
2786 ("python-numpy" ,python-numpy)
2787 ("python-pillow" ,python-pillow)
2788 ("python-pywavelets" ,python-pywavelets)
2789 ("python-scipy" ,python-scipy)
2790 ("python-six" ,python-six)))
2791 (native-inputs
2792 `(("python-cython" ,python-cython)))
2793 (home-page "http://scikit-image.org/")
2794 (synopsis "Image processing in Python")
2795 (description
2796 "Scikit-image is a collection of algorithms for image processing.")
2797 (license license:bsd-3)))
2798
2799(define-public python2-scikit-image
2800 (package-with-python2 python-scikit-image))
2801
2802(define-public python-cython
2803 (package
2804 (name "python-cython")
fa8ffaa0 2805 (version "0.29.5")
44d10b1f
RW
2806 (source
2807 (origin
2808 (method url-fetch)
2809 (uri (pypi-uri "Cython" version))
2810 (sha256
2811 (base32
fa8ffaa0 2812 "1wfb68g115gmf3mv23w0hh972b0ll85gpb92ci28x6h997br0llx"))))
44d10b1f
RW
2813 (build-system python-build-system)
2814 ;; we need the full python package and not just the python-wrapper
2815 ;; because we need libpython3.3m.so
2816 (inputs
2817 `(("python" ,python)))
2818 (arguments
2819 `(#:phases
2820 (modify-phases %standard-phases
2821 (add-before 'check 'set-HOME
2822 ;; some tests require access to "$HOME/.cython"
2823 (lambda _ (setenv "HOME" "/tmp") #t))
2824
2825 ;; FIXME: These tests started failing on armhf after the 0.28 update
2826 ;; (commit c69d11c5930), both with an error such as this:
2827 ;; compiling (cpp) and running dictcomp ...
2828 ;; === C/C++ compiler error output: ===
2829 ;; ‘
2830 ;; dictcomp.cpp:5221: confused by earlier errors, bailing out
2831 ;; See <https://hydra.gnu.org/build/2948724> for logs.
2832 ,@(if (target-arm32?)
2833 `((add-before 'check 'disable-failing-tests
2834 (lambda _
2835 (let ((disabled-tests (open-file "tests/bugs.txt" "a")))
2836 (for-each (lambda (test)
2837 (format disabled-tests "~a\n" test))
2838 '("memslice" "dictcomp"))
2839 (close-port disabled-tests)))))
2840 '())
2841
2842 (replace 'check
2843 (lambda _
2844 ;; The "with_outer_raising" test fails with Python 3.7. See
2845 ;; https://github.com/cython/cython/issues/2454
2846 (delete-file "tests/run/generators_py.py")
2847 (invoke "python" "runtests.py" "-vv"))))))
2848 (home-page "http://cython.org/")
2849 (synopsis "C extensions for Python")
2850 (description "Cython is an optimising static compiler for both the Python
2851programming language and the extended Cython programming language. It makes
2852writing C extensions for Python as easy as Python itself.")
2853 (license license:asl2.0)
2854 (properties `((python2-variant . ,(delay python2-cython))))))
2855
2856(define-public python2-cython
2857 (package (inherit (package-with-python2
2858 (strip-python2-variant python-cython)))
2859 (name "python2-cython")
2860 (inputs
2861 `(("python-2" ,python-2))))) ; this is not automatically changed
2862
2863;; The RPython toolchain currently does not support Python 3.
2864(define-public python2-rpython
2865 (package
2866 (name "python2-rpython")
2867 (version "0.2.1")
2868 (source
2869 (origin
2870 (method url-fetch)
2871 (uri (pypi-uri "rpython" version))
2872 (sha256
2873 (base32
2874 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
2875 (build-system python-build-system)
2876 (arguments `(#:python ,python-2))
2877 (native-inputs
2878 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
2879 (home-page "https://rpython.readthedocs.org")
2880 (synopsis "Framework for implementing interpreters and virtual machines")
2881 (description "RPython is a translation and support framework for
2882producing implementations of dynamic languages, emphasizing a clean separation
2883between language specification and implementation aspects.")
2884 (license license:expat)))
2885
2886;; NOTE: when upgrading numpy please make sure that python-pandas and
2887;; python-scipy still build, as these three packages are often used together.
2888(define-public python-numpy
2889 (package
2890 (name "python-numpy")
2891 (version "1.15.4")
2892 (source
2893 (origin
2894 (method url-fetch)
2895 (uri (string-append
2896 "https://github.com/numpy/numpy/releases/download/v"
2897 version "/numpy-" version ".tar.gz"))
2898 (sha256
2899 (base32
2900 "102vcl2qq4pjbm7a3d67vkkvn4466ngia1d8wi5avqwqh8j0jvkn"))))
2901 (build-system python-build-system)
2902 (inputs
2903 `(("openblas" ,openblas)
2904 ("lapack" ,lapack)))
2905 (native-inputs
2906 `(("python-cython" ,python-cython)
2907 ("python-pytest" ,python-pytest)
2908 ("gfortran" ,gfortran)))
2909 (arguments
2910 `(#:phases
2911 (modify-phases %standard-phases
2912 (add-before 'build 'configure-blas-lapack
2913 (lambda* (#:key inputs #:allow-other-keys)
2914 (call-with-output-file "site.cfg"
2915 (lambda (port)
2916 (format port
2917 "[openblas]
2918libraries = openblas
2919library_dirs = ~a/lib
2920include_dirs = ~a/include
2921
2922# backslash-n to make emacs happy
2923\n[lapack]
2924lapack_libs = lapack
2925library_dirs = ~a/lib
2926include_dirs = ~a/include
2927"
2928 (assoc-ref inputs "openblas")
2929 (assoc-ref inputs "openblas")
2930 (assoc-ref inputs "lapack")
2931 (assoc-ref inputs "lapack"))))
2932 #t))
2933 (add-before 'build 'fix-executable-paths
2934 (lambda* (#:key inputs #:allow-other-keys)
2935 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
2936 ;; instead of /bin/sh.
2937 (substitute* "numpy/distutils/exec_command.py"
2938 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
2939 (string-append match-start (assoc-ref inputs "bash") match-end)))
2940 ;; Use "gcc" executable, not "cc".
2941 (substitute* "numpy/distutils/system_info.py"
2942 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
2943 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
2944 #t))
2945 ;; Tests can only be run after the library has been installed and not
2946 ;; within the source directory.
2947 (delete 'check)
2948 (add-after 'install 'check
2949 (lambda* (#:key outputs inputs #:allow-other-keys)
2950 ;; Make installed package available for running the tests
2951 (add-installed-pythonpath inputs outputs)
2952 ;; Make sure "f2py" etc is found.
2953 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
2954 ":" (getenv "PATH")))
2955 (with-directory-excursion "/tmp"
2956 (invoke "python" "-c"
2957 "import numpy; numpy.test(verbose=2)")))))))
2958 (home-page "http://www.numpy.org/")
2959 (synopsis "Fundamental package for scientific computing with Python")
2960 (description "NumPy is the fundamental package for scientific computing
2961with Python. It contains among other things: a powerful N-dimensional array
2962object, sophisticated (broadcasting) functions, tools for integrating C/C++
2963and Fortran code, useful linear algebra, Fourier transform, and random number
2964capabilities.")
2965 (license license:bsd-3)))
2966
2967(define-public python2-numpy
2968 (package-with-python2 python-numpy))
2969
2970;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
2971;; interest only for legacy code going back to NumPy's predecessor
2972;; Numeric.
2973(define-public python2-numpy-1.8
2974 (package (inherit python2-numpy)
2975 (version "1.8.2")
2976 (source
2977 (origin
2978 (method url-fetch)
2979 (uri (string-append
2980 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
2981 (file-name (string-append "python2-numpy-" version ".tar.gz"))
2982 (sha256
2983 (base32
2984 "0sc20gz1b17xnyrkp5frca3ql5qfalpv916hfg2kqxpwr6jg0f1g"))))
2985 (arguments
2986 (substitute-keyword-arguments (package-arguments python2-numpy)
2987 ((#:phases phases)
2988 `(modify-phases ,phases
2989 (replace 'configure-blas-lapack
2990 (lambda* (#:key inputs #:allow-other-keys)
2991 (call-with-output-file "site.cfg"
2992 (lambda (port)
2993 (format port
2994 "[openblas]
2995libraries = openblas,lapack
2996library_dirs = ~a/lib:~a/lib
2997include_dirs = ~a/include:~a/include
2998"
2999 (assoc-ref inputs "openblas")
3000 (assoc-ref inputs "lapack")
3001 (assoc-ref inputs "openblas")
3002 (assoc-ref inputs "lapack"))))
3003 #t))))))
3004 (native-inputs
3005 `(("python2-nose" ,python2-nose)))
3006 (description "NumPy is the fundamental package for scientific computing
3007with Python. It contains among other things: a powerful N-dimensional array
3008object, sophisticated (broadcasting) functions, tools for integrating C/C++
3009and Fortran code, useful linear algebra, Fourier transform, and random number
3010capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
3011that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
3012Numeric.")
3013 (license license:bsd-3)))
3014
3015(define-public python-munch
3016 (package
3017 (name "python-munch")
3018 (version "2.0.4")
3019 (source
3020 (origin
3021 (method url-fetch)
3022 (uri (pypi-uri "munch" version))
3023 (sha256
3024 (base32
3025 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3026 (build-system python-build-system)
3027 (home-page "https://github.com/Infinidat/munch")
3028 (synopsis "Dot-accessible dictionary")
3029 (description "Munch is a dot-accessible dictionary similar to JavaScript
3030objects.")
3031 (license license:expat)))
3032
3033(define-public python2-munch
3034 (package-with-python2 python-munch))
3035
3036(define-public python-colormath
3037 (package
3038 (name "python-colormath")
3039 (version "3.0.0")
3040 (source
3041 (origin
3042 (method url-fetch)
3043 (uri (pypi-uri "colormath" version))
3044 (sha256
3045 (base32
3046 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3047 (build-system python-build-system)
3048 (propagated-inputs
3049 `(("python-networkx" ,python-networkx)
3050 ("python-numpy" ,python-numpy)))
3051 (home-page "https://github.com/gtaylor/python-colormath")
3052 (synopsis "Color math and conversion library")
3053 (description
3054 "This is a Python library for color math and conversions.")
3055 (license license:bsd-3)))
3056
3057(define-public python2-colormath
3058 (package-with-python2 python-colormath))
3059
3060(define-public python-spectra
3061 (package
3062 (name "python-spectra")
3063 (version "0.0.11")
3064 (source
3065 (origin
3066 (method url-fetch)
3067 (uri (pypi-uri "spectra" version))
3068 (sha256
3069 (base32
3070 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3071 (build-system python-build-system)
3072 (arguments
3073 `(#:phases
3074 (modify-phases %standard-phases
3075 (replace 'check
38ec0f6a 3076 (lambda _ (invoke "nosetests" "-v"))))))
44d10b1f
RW
3077 (propagated-inputs
3078 `(("python-colormath" ,python-colormath)))
3079 (native-inputs
3080 `(("python-nose" ,python-nose)))
3081 (home-page "https://github.com/jsvine/spectra")
3082 (synopsis "Color scales and color conversion")
3083 (description
3084 "This package provides a Python library intended to make color math,
3085color scales, and color space conversion easy. It has support for:
3086
3087@enumerate
3088@item Color scales
3089@item Color ranges
3090@item Color blending
3091@item Brightening/darkening colors
3092@item Saturating/desaturating colors
3093@item Conversion to/from multiple color spaces.
3094@end enumerate\n")
3095 (license license:expat)))
3096
3097(define-public python2-spectra
3098 (package-with-python2 python-spectra))
3099
3100(define-public python-numpy-documentation
3101 (package
3102 (name "python-numpy-documentation")
3103 (version (package-version python-numpy))
3104 (source (package-source python-numpy))
3105 (build-system python-build-system)
3106 (native-inputs
3107 `(("python-matplotlib" ,python-matplotlib)
3108 ("python-numpy" ,python-numpy)
3109 ("pkg-config" ,pkg-config)
3110 ("python-sphinx" ,python-sphinx)
3111 ("python-numpydoc" ,python-numpydoc)
3112 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
3113 texlive-fonts-cm-super
3114 texlive-fonts-ec
3115 texlive-generic-ifxetex
3116 texlive-generic-pdftex
3117 texlive-latex-amsfonts
3118 texlive-latex-capt-of
3119 texlive-latex-cmap
3120 texlive-latex-environ
3121 texlive-latex-eqparbox
3122 texlive-latex-etoolbox
3123 texlive-latex-expdlist
3124 texlive-latex-fancyhdr
3125 texlive-latex-fancyvrb
3126 texlive-latex-fncychap
3127 texlive-latex-float
3128 texlive-latex-framed
3129 texlive-latex-geometry
3130 texlive-latex-graphics
3131 texlive-latex-hyperref
3132 texlive-latex-mdwtools
3133 texlive-latex-multirow
3134 texlive-latex-needspace
3135 texlive-latex-oberdiek
3136 texlive-latex-parskip
3137 texlive-latex-preview
3138 texlive-latex-tabulary
3139 texlive-latex-threeparttable
3140 texlive-latex-titlesec
3141 texlive-latex-trimspaces
3142 texlive-latex-ucs
3143 texlive-latex-upquote
3144 texlive-latex-url
3145 texlive-latex-varwidth
3146 texlive-latex-wrapfig)))
3147 ("texinfo" ,texinfo)
3148 ("perl" ,perl)
3149 ("scipy-sphinx-theme"
3150 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3151 (method git-fetch)
3152 (uri (git-reference
3153 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3154 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3155 (sha256
3156 (base32
3157 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3158 ,@(package-native-inputs python-numpy)))
3159 (arguments
3160 `(#:tests? #f ; we're only generating the documentation
3161 #:phases
3162 (modify-phases %standard-phases
3163 (delete 'build)
3164 (replace 'install
3165 (lambda* (#:key inputs outputs #:allow-other-keys)
3166 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3167 (doc (string-append
3168 data "/doc/" ,name "-"
3169 ,(package-version python-numpy)))
3170 (info-reader (string-append data "/info"))
3171 (html (string-append doc "/html"))
3172 (scipy-sphinx-theme "scipy-sphinx-theme")
3173 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3174 (pyver ,(string-append "PYVER=")))
3175
3176 ;; FIXME: this is needed to for texlive-union to generate
3177 ;; fonts, which are not found.
3178 (setenv "HOME" "/tmp")
3179
3180 (with-directory-excursion "doc"
3181 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3182 (mkdir-p html)
4fc898da
RW
3183 (invoke "make" "html" pyver)
3184 (invoke "make" "latex" "PAPER=a4" pyver)
3185 (invoke "make" "-C" "build/latex"
44d10b1f
RW
3186 "all-pdf" "PAPER=a4" pyver)
3187 ;; FIXME: Generation of the info file fails.
4fc898da 3188 ;; (invoke "make" "info" pyver)
44d10b1f
RW
3189 ;; (mkdir-p info)
3190 ;; (copy-file "build/texinfo/numpy.info"
3191 ;; (string-append info "/numpy.info"))
3192 (for-each (lambda (file)
3193 (copy-file (string-append "build/latex" file)
3194 (string-append doc file)))
3195 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3196 (with-directory-excursion "build/html"
3197 (for-each (lambda (file)
3198 (let* ((dir (dirname file))
3199 (tgt-dir (string-append html "/" dir)))
3200 (unless (equal? "." dir)
3201 (mkdir-p tgt-dir))
3202 (install-file file html)))
3203 (find-files "." ".*")))))
3204 #t)))))
3205 (home-page (package-home-page python-numpy))
3206 (synopsis "Documentation for the python-numpy package")
3207 (description (package-description python-numpy))
3208 (license (package-license python-numpy))))
3209
3210(define-public python2-numpy-documentation
3211 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3212 (package
3213 (inherit numpy-documentation)
3214 (native-inputs `(("python2-functools32" ,python2-functools32)
3215 ,@(package-native-inputs numpy-documentation))))))
3216
3217(define-public python-pygit2
3218 (package
3219 (name "python-pygit2")
3220 (version "0.27.3")
3221 (source
3222 (origin
3223 (method url-fetch)
3224 (uri (pypi-uri "pygit2" version))
3225 (sha256
3226 (base32
3227 "046ahvsb7a20sgvscqfm3cb32sp3sii4gim9vz7zzrkf7yz16xlv"))))
3228 (build-system python-build-system)
3229 (arguments
3230 '(#:phases
3231 (modify-phases %standard-phases
3232 ;; Remove after the next update. See:
3233 ;; https://github.com/libgit2/pygit2/pull/851
3234 (add-after 'unpack 'compile-with-cffi
3235 (lambda _
3236 (substitute* "setup.py"
3237 (("install_requires")
3238 "setup_requires=['cffi'],\n install_requires"))
3239 #t))
3240 (add-after 'unpack 'fix-dependency-versioning
3241 (lambda _
3242 (substitute* "setup.py"
3243 (("<") "<="))
3244 #t)))))
3245 (propagated-inputs
3246 `(("python-six" ,python-six)
3247 ("python-cffi" ,python-cffi)
3248 ("libgit2" ,libgit2)
3249 ("python-tox" ,python-tox)))
3250 (native-inputs
3251 `(("python-pytest" ,python-pytest)))
3252 (home-page "https://github.com/libgit2/pygit2")
3253 (synopsis "Python bindings for libgit2")
3254 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3255library, libgit2 implements Git plumbing.")
3256 ;; GPL2.0 only, with linking exception.
3257 (license license:gpl2)))
3258
3259(define-public python2-pygit2
3260 (package-with-python2 python-pygit2))
3261
3262(define-public python-pyparsing
3263 (package
3264 (name "python-pyparsing")
3265 (version "2.2.1")
3266 (source
3267 (origin
3268 (method url-fetch)
3269 (uri (pypi-uri "pyparsing" version))
3270 (sha256
3271 (base32 "06dgd0iilvf8m0ssmfpcbh8l6jf0zkp8adbb84llksg17crfx4zl"))))
3272 (build-system python-build-system)
3273 (outputs '("out" "doc"))
3274 (arguments
3275 `(#:tests? #f ; no test target
3276 #:phases
3277 (modify-phases %standard-phases
3278 (add-after 'install 'install-doc
3279 (lambda* (#:key outputs #:allow-other-keys)
3280 (let* ((doc (string-append (assoc-ref outputs "doc")
3281 "/share/doc/" ,name "-" ,version))
3282 (html-doc (string-append doc "/html"))
3283 (examples (string-append doc "/examples")))
3284 (mkdir-p html-doc)
3285 (mkdir-p examples)
3286 (for-each
3287 (lambda (dir tgt)
3288 (map (lambda (file)
3289 (install-file file tgt))
3290 (find-files dir ".*")))
3291 (list "docs" "htmldoc" "examples")
3292 (list doc html-doc examples))
3293 #t))))))
3294 (home-page "https://github.com/pyparsing/pyparsing")
3295 (synopsis "Python parsing class library")
3296 (description
3297 "The pyparsing module is an alternative approach to creating and
3298executing simple grammars, vs. the traditional lex/yacc approach, or the use
3299of regular expressions. The pyparsing module provides a library of classes
3300that client code uses to construct the grammar directly in Python code.")
3301 (license license:expat)))
3302
3303(define-public python2-pyparsing
3304 (package-with-python2 python-pyparsing))
3305
3306(define-public python-numpydoc
3307 (package
3308 (name "python-numpydoc")
3309 (version "0.8.0")
3310 (source
3311 (origin
3312 (method url-fetch)
3313 (uri (pypi-uri "numpydoc" version))
3314 (sha256
3315 (base32
3316 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
3317 (build-system python-build-system)
3318 (propagated-inputs
3319 `(("python-sphinx" ,python-sphinx)))
3320 (native-inputs
3321 `(("python-nose" ,python-nose)))
3322 (home-page "https://pypi.python.org/pypi/numpydoc")
3323 (synopsis
3324 "Numpy's Sphinx extensions")
3325 (description
3326 "Sphinx extension to support docstrings in Numpy format.")
3327 (license license:bsd-2)))
3328
3329(define-public python2-numpydoc
3330 (package-with-python2 python-numpydoc))
3331
3332(define-public python-numexpr
3333 (package
3334 (name "python-numexpr")
3335 (version "2.6.5")
3336 (source
3337 (origin
3338 (method url-fetch)
3339 (uri (pypi-uri "numexpr" version))
3340 (sha256
3341 (base32
3342 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3343 (build-system python-build-system)
3344 (arguments `(#:tests? #f)) ; no tests included
3345 (propagated-inputs
3346 `(("python-numpy" ,python-numpy)))
3347 (home-page "https://github.com/pydata/numexpr")
3348 (synopsis "Fast numerical expression evaluator for NumPy")
3349 (description
3350 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3351expressions that operate on arrays are accelerated and use less memory than
3352doing the same calculation in Python. In addition, its multi-threaded
3353capabilities can make use of all your cores, which may accelerate
3354computations, most specially if they are not memory-bounded (e.g. those using
3355transcendental functions).")
3356 (license license:expat)))
3357
3358(define-public python2-numexpr
3359 (package-with-python2 python-numexpr))
3360
3361(define-public python-cycler
3362 (package
3363 (name "python-cycler")
3364 (version "0.10.0")
3365 (source (origin
3366 (method url-fetch)
3367 (uri (pypi-uri "cycler" version))
3368 (sha256
3369 (base32
3370 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3371 (build-system python-build-system)
3372 (arguments
3373 ;; XXX: The current version requires 'coveralls' which we don't have.
3374 ;; Enable this for the next release which uses 'python-pytest'.
3375 '(#:tests? #f))
3376 (propagated-inputs
3377 `(("python-six" ,python-six)))
3378 (home-page "http://matplotlib.org/cycler/")
3379 (synopsis "Composable keyword argument iterator")
3380 (description
3381 "When using @code{matplotlib} and plotting more than one line, it is
3382common to want to be able to want to be able to cycle over one or more artist
3383styles; but the plotting logic can quickly become involved.
3384To address this and enable easy cycling over arbitrary @code{kwargs}, the
3385@code{Cycler} class was developed.")
3386 (license license:bsd-3)))
3387
3388(define-public python2-cycler
3389 (package-with-python2 python-cycler))
3390
3391(define-public python-colorspacious
3392 (package
3393 (name "python-colorspacious")
3394 (version "1.1.0")
3395 (source
3396 (origin
3397 (method url-fetch)
3398 (uri (string-append "https://github.com/njsmith/colorspacious/archive/v"
3399 version ".tar.gz"))
3400 (file-name (string-append name "-" version))
3401 (sha256
3402 (base32 "1vflh5jm32qb0skza2i8pjacv09w6gq84fqpp2nj77s0rbmzgr4k"))))
3403 (build-system python-build-system)
3404 (propagated-inputs
3405 `(("python-numpy" ,python-numpy)))
3406 (native-inputs
3407 `(("python-nose" ,python-nose)))
3408 (arguments
3409 `(#:phases
3410 (modify-phases %standard-phases
3411 (replace 'check
3412 (lambda _
c988afda 3413 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
44d10b1f
RW
3414 (home-page "https://github.com/njsmith/colorspacious")
3415 (synopsis "Python library for colorspace conversions")
3416 (description "@code{colorspacious} is a Python library that lets you
3417convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3418 (license license:expat)))
3419
3420(define-public python2-colorspacious
3421 (package-with-python2 python-colorspacious))
3422
3423(define-public python-matplotlib
3424 (package
3425 (name "python-matplotlib")
3426 (version "2.2.3")
3427 (source
3428 (origin
3429 (method url-fetch)
3430 (uri (pypi-uri "matplotlib" version))
3431 (sha256
3432 (base32
3433 "1rcc7x9ig3hpchkc4cwdvym3y451w74275fxr455zkfagrsvymbk"))))
3434 (build-system python-build-system)
3435 (propagated-inputs ; the following packages are all needed at run time
3436 `(("python-cycler" ,python-cycler)
3437 ("python-kiwisolver" ,python-kiwisolver)
3438 ("python-pyparsing" ,python-pyparsing)
3439 ("python-pygobject" ,python-pygobject)
3440 ("gobject-introspection" ,gobject-introspection)
3441 ("python-tkinter" ,python "tk")
3442 ("python-dateutil" ,python-dateutil)
3443 ("python-numpy" ,python-numpy)
3444 ("python-pillow" ,python-pillow)
3445 ("python-pytz" ,python-pytz)
3446 ("python-six" ,python-six)
3447 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3448 ;; from 'gtk+') provides the required 'typelib' files used by
3449 ;; 'gobject-introspection'. The location of these files is set with the
3450 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3451 ;; is done automatically by a 'native-search-path' procedure. However,
3452 ;; at run-time the user must set this variable as follows:
3453 ;;
3454 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
3455 ("gtk+" ,gtk+)
3456 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3457 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3458 ;; object. For this reason we need to import both libraries.
3459 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3460 ("python-pycairo" ,python-pycairo)
3461 ;; XXX: qtwebkit cannot be built reliably.
3462 ("python-pyqt" ,python-pyqt-without-qtwebkit)
3463 ("python-cairocffi" ,python-cairocffi)))
3464 (inputs
3465 `(("libpng" ,libpng)
3466 ("imagemagick" ,imagemagick)
3467 ("freetype" ,freetype)
3468 ("cairo" ,cairo)
3469 ("glib" ,glib)
3470 ;; FIXME: Add backends when available.
3471 ;("python-wxpython" ,python-wxpython)
3472 ("tcl" ,tcl)
3473 ("tk" ,tk)))
3474 (native-inputs
3475 `(("pkg-config" ,pkg-config)
3476 ("python-nose" ,python-nose)
3477 ("python-mock" ,python-mock)))
3478 (arguments
3479 `(#:phases
3480 (modify-phases %standard-phases
3481 (add-before 'build 'configure-environment
3482 (lambda* (#:key outputs inputs #:allow-other-keys)
3483 (let ((cairo (assoc-ref inputs "cairo"))
3484 (gtk+ (assoc-ref inputs "gtk+")))
3485 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3486 ;; has not effect.
3487 (setenv "LD_LIBRARY_PATH"
3488 (string-append cairo "/lib:" gtk+ "/lib"))
3489 (setenv "HOME" (getcwd))
3490 (call-with-output-file "setup.cfg"
3491 (lambda (port)
3492 (format port "[directories]~%
3493basedirlist = ~a,~a~%
3494 [rc_options]~%
3495backend = TkAgg~%"
3496 (assoc-ref inputs "tcl")
3497 (assoc-ref inputs "tk")))))
3498 #t)))))
3499 (home-page "http://matplotlib.org")
3500 (synopsis "2D plotting library for Python")
3501 (description
3502 "Matplotlib is a Python 2D plotting library which produces publication
3503quality figures in a variety of hardcopy formats and interactive environments
3504across platforms. Matplotlib can be used in Python scripts, the python and
3505ipython shell, web application servers, and six graphical user interface
3506toolkits.")
3507 (license license:psfl)
3508 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3509
3510(define-public python2-matplotlib
3511 (let ((matplotlib (package-with-python2
3512 (strip-python2-variant python-matplotlib))))
3513 (package (inherit matplotlib)
3514 ;; Make sure to use special packages for Python 2 instead
3515 ;; of those automatically rewritten by package-with-python2.
3516 (propagated-inputs
3517 `(("python2-pycairo" ,python2-pycairo)
3518 ("python2-backports-functools-lru-cache"
3519 ,python2-backports-functools-lru-cache)
3520 ("python2-functools32" ,python2-functools32)
3521 ("python2-pygobject-2" ,python2-pygobject-2)
3522 ("python2-subprocess32" ,python2-subprocess32)
3523 ("python2-tkinter" ,python-2 "tk")
3524 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3525 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
3526
3527(define-public python-matplotlib-documentation
3528 (package
3529 (name "python-matplotlib-documentation")
3530 (version (package-version python-matplotlib))
3531 (source (package-source python-matplotlib))
3532 (build-system python-build-system)
3533 (native-inputs
3534 `(("python-matplotlib" ,python-matplotlib)
3535 ("python-colorspacious" ,python-colorspacious)
3536 ("python-sphinx" ,python-sphinx)
3537 ("python-sphinx-gallery" ,python-sphinx-gallery)
3538 ("python-numpydoc" ,python-numpydoc)
3539 ("python-ipython" ,python-ipython)
e7a53914 3540 ("python-ipykernel" ,python-ipykernel)
44d10b1f
RW
3541 ("python-mock" ,python-mock)
3542 ("graphviz" ,graphviz)
e7a53914
RW
3543 ("texlive" ,(texlive-union (list texlive-latex-amsfonts
3544 texlive-latex-amsmath
3545 texlive-latex-enumitem
3546 texlive-latex-expdlist
3547 texlive-latex-geometry
3548 texlive-latex-preview
3549 texlive-latex-type1cm
3550 texlive-latex-ucs
3551
3552 texlive-generic-pdftex
3553
3554 texlive-fonts-amsfonts
3555 texlive-fonts-ec
3556 texlive-fonts-adobe-times
3557 texlive-fonts-txfonts)))
44d10b1f
RW
3558 ("texinfo" ,texinfo)
3559 ,@(package-native-inputs python-matplotlib)))
3560 (arguments
3561 `(#:tests? #f ; we're only generating documentation
3562 #:phases
3563 (modify-phases %standard-phases
3564 (replace 'build
3565 (lambda _
3566 (chdir "doc")
e7a53914
RW
3567 (setenv "PYTHONPATH"
3568 (string-append (getenv "PYTHONPATH")
3569 ":" (getcwd) "/../examples/units"))
44d10b1f 3570 (substitute* "conf.py"
e7a53914
RW
3571 ;; Don't use git.
3572 (("^SHA = check_output.*")
3573 (string-append "SHA = \"" ,version "\"\n"))
3574 ;; Don't fetch intersphinx files from the Internet
3575 (("^explicit_order_folders" m)
3576 (string-append "intersphinx_mapping = {}\n" m))
3577 (("'sphinx.ext.intersphinx',") "")
3578 ;; Disable URL embedding which requires internet access.
3579 (("'https://docs.scipy.org/doc/numpy'") "None")
3580 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
3581 (invoke "make"
3582 "SPHINXBUILD=sphinx-build"
3583 "SPHINXOPTS=" ; don't abort on warnings
3584 "html" "texinfo")))
44d10b1f
RW
3585 (replace 'install
3586 (lambda* (#:key inputs outputs #:allow-other-keys)
3587 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3588 (doc (string-append data "/doc/python-matplotlib-" ,version))
3589 (info (string-append data "/info"))
3590 (html (string-append doc "/html")))
3591 (mkdir-p html)
3592 (mkdir-p info)
3593 (copy-recursively "build/html" html)
3594 (symlink (string-append html "/_images")
3595 (string-append info "/matplotlib-figures"))
3596 (with-directory-excursion "build/texinfo"
3597 (substitute* "matplotlib.texi"
3598 (("@image\\{([^,]*)" all file)
3599 (string-append "@image{matplotlib-figures/" file)))
3600 (symlink (string-append html "/_images")
3601 "./matplotlib-figures")
e7a53914
RW
3602 (invoke "makeinfo" "--no-split"
3603 "-o" "matplotlib.info" "matplotlib.texi"))
3604 (install-file "build/texinfo/matplotlib.info" info))
44d10b1f
RW
3605 #t)))))
3606 (home-page (package-home-page python-matplotlib))
3607 (synopsis "Documentation for the python-matplotlib package")
3608 (description (package-description python-matplotlib))
3609 (license (package-license python-matplotlib))))
3610
3611(define-public python2-matplotlib-documentation
3612 (package-with-python2 python-matplotlib-documentation))
3613
3614(define-public python2-pysnptools
3615 (package
3616 (name "python2-pysnptools")
5d1ade85 3617 (version "0.3.13")
44d10b1f
RW
3618 (source
3619 (origin
3620 (method url-fetch)
5d1ade85 3621 (uri (pypi-uri "pysnptools" version))
44d10b1f
RW
3622 (sha256
3623 (base32
5d1ade85 3624 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
44d10b1f
RW
3625 (build-system python-build-system)
3626 (arguments
5d1ade85
RW
3627 `(#:python ,python-2 ; only Python 2.7 is supported
3628 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
44d10b1f
RW
3629 (propagated-inputs
3630 `(("python2-numpy" ,python2-numpy)
3631 ("python2-scipy" ,python2-scipy)
3632 ("python2-pandas" ,python2-pandas)))
44d10b1f 3633 (native-inputs
5d1ade85 3634 `(("python2-cython" ,python2-cython)))
1b66989b 3635 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
44d10b1f
RW
3636 (synopsis "Library for reading and manipulating genetic data")
3637 (description
3638 "PySnpTools is a library for reading and manipulating genetic data. It
3639can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
3640those files. It can also efficiently manipulate ranges of integers using set
3641operators such as union, intersection, and difference.")
3642 (license license:asl2.0)))
3643
3644(define-public python-scipy
3645 (package
3646 (name "python-scipy")
3647 (version "1.1.0")
3648 (source
3649 (origin
3650 (method url-fetch)
3651 (uri (pypi-uri "scipy" version))
3652 (sha256
3653 (base32
3654 "1lfg686w6vv2m2dfs8v9d0bf2i18z7wz5vgzjnkgmpr4hi0550w7"))))
3655 (build-system python-build-system)
3656 (propagated-inputs
3657 `(("python-numpy" ,python-numpy)
3658 ("python-matplotlib" ,python-matplotlib)
3659 ("python-pyparsing" ,python-pyparsing)))
3660 (inputs
3661 `(("lapack" ,lapack)
3662 ("openblas" ,openblas)))
3663 (native-inputs
3664 `(("python-cython" ,python-cython)
3665 ("python-pytest" ,python-pytest)
3666 ("python-sphinx" ,python-sphinx)
3667 ("python-numpydoc" ,python-numpydoc)
3668 ("gfortran" ,gfortran)
3669 ("perl" ,perl)
3670 ("which" ,which)))
3671 (outputs '("out" "doc"))
3672 (arguments
3673 `(#:phases
3674 (modify-phases %standard-phases
3675 (add-after 'unpack 'disable-broken-tests
3676 (lambda _
3677 (substitute* "scipy/sparse/linalg/dsolve/tests/test_linsolve.py"
3678 (("^( +)def test_threads_parallel\\(self\\):" m indent)
3679 (string-append indent
3680 "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
3681 m)))
3682 (substitute* "scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py"
3683 (("^def test_parallel_threads\\(\\):" m)
3684 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
3685 m)))
3686 #t))
3687 (add-before 'build 'configure-openblas
3688 (lambda* (#:key inputs #:allow-other-keys)
3689 (call-with-output-file "site.cfg"
3690 (lambda (port)
3691 (format port
3692 "[blas]
3693libraries = openblas
3694library_dirs = ~a/lib
3695include_dirs = ~a/include
3696
3697# backslash-n to make emacs happy
3698\n[atlas]
3699library_dirs = ~a/lib
3700atlas_libs = openblas
3701"
3702 (assoc-ref inputs "openblas")
3703 (assoc-ref inputs "openblas")
3704 (assoc-ref inputs "openblas"))))
3705 #t))
3706 (add-after 'install 'install-doc
3707 (lambda* (#:key inputs outputs #:allow-other-keys)
3708 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3709 (doc (string-append data "/doc/" ,name "-" ,version))
3710 (html (string-append doc "/html"))
3711 (pyver ,(string-append "PYVER=" (version-major+minor
3712 (package-version python))))
3713 ;; By default it tries to run sphinx-build through the Python
3714 ;; interpreter which won't work with our shell wrapper.
3715 (sphinxbuild "SPHINXBUILD=LANG=C sphinx-build"))
3716 ;; Make installed package available for building the
3717 ;; documentation
3718 (add-installed-pythonpath inputs outputs)
3719 (with-directory-excursion "doc"
3720 ;; Fix generation of images for mathematical expressions.
3721 (substitute* (find-files "source" "conf\\.py")
3722 (("pngmath_use_preview = True")
3723 "pngmath_use_preview = False"))
3724 (mkdir-p html)
3725 (invoke "make" "html" pyver sphinxbuild)
3726 (with-directory-excursion "build/html"
3727 (for-each (lambda (file)
3728 (let* ((dir (dirname file))
3729 (tgt-dir (string-append html "/" dir)))
3730 (install-file file html)))
3731 (find-files "." ".*")))))
3732 #t))
3733 ;; Tests can only be run after the library has been installed and not
3734 ;; within the source directory.
3735 (delete 'check)
3736 (add-after 'install 'check
3737 (lambda* (#:key inputs outputs #:allow-other-keys)
3738 (add-installed-pythonpath inputs outputs)
3739 (with-directory-excursion "/tmp"
3740 (invoke "python" "-c"
3741 "import scipy; scipy.test(verbose=2)")))))))
3742 (home-page "https://www.scipy.org/")
3743 (synopsis "The Scipy library provides efficient numerical routines")
3744 (description "The SciPy library is one of the core packages that make up
3745the SciPy stack. It provides many user-friendly and efficient numerical
3746routines such as routines for numerical integration and optimization.")
3747 (properties `((python2-variant . ,(delay python2-scipy))))
3748 (license license:bsd-3)))
3749
3750(define-public python2-scipy
3751 (package-with-python2
3752 (strip-python2-variant python-scipy)))
3753
3754(define-public python-socksipy-branch
3755 (package
3756 (name "python-socksipy-branch")
3757 (version "1.01")
3758 (source
3759 (origin
3760 (method url-fetch)
3761 (uri (pypi-uri "SocksiPy-branch" version))
3762 (sha256
3763 (base32
3764 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
3765 (build-system python-build-system)
3766 (arguments
3767 `(#:tests? #f)) ; There are no tests
3768 (home-page "https://code.google.com/archive/p/socksipy-branch/")
3769 (synopsis "Python SOCKS module")
3770 (description
3771 "SocksiPy - A Python SOCKS client module. It provides a
3772socket-like interface that supports connections to any TCP
3773service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
3774The original version was developed by Dan Haim, this is a
3775branch created by Mario Vilas to address some open issues,
3776as the original project seems to have been abandoned circa 2007.")
3777 (license license:bsd-3)))
3778
3779(define-public python2-socksipy-branch
3780 (package-with-python2 python-socksipy-branch))
3781
3782(define-public python-pycodestyle
3783 (package
3784 (name "python-pycodestyle")
3785 (version "2.4.0")
3786 (source
3787 (origin
3788 (method url-fetch)
3789 (uri (pypi-uri "pycodestyle" version))
3790 (sha256
3791 (base32
3792 "0fhy4vnlgpjq4qd1wdnl6pvdw7rah0ypmn8c9mkhz8clsndskz6b"))))
3793 (build-system python-build-system)
3794 (home-page "https://pycodestyle.readthedocs.io/")
3795 (synopsis "Python style guide checker")
3796 (description "@code{pycodestyle} (formerly pep8) is a tool to check
3797Python code against some of the style conventions in
3798@url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
3799 (license license:expat)))
3800
3801(define-public python2-pycodestyle
3802 (package-with-python2 python-pycodestyle))
3803
3804(define-public python-multidict
3805 (package
3806 (name "python-multidict")
3807 (version "4.2.0")
3808 (source
3809 (origin
3810 (method url-fetch)
3811 (uri (pypi-uri "multidict" version))
3812 (sha256
3813 (base32
3814 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
3815 (build-system python-build-system)
3816 (native-inputs
3817 `(("python-pytest" ,python-pytest)
3818 ("python-pytest-runner" ,python-pytest-runner)))
3819 (home-page "https://github.com/aio-libs/multidict/")
3820 (synopsis "Multidict implementation")
3821 (description "Multidict is dict-like collection of key-value pairs
3822where key might be occurred more than once in the container.")
3823 (license license:asl2.0)))
3824
3825(define-public python-orderedmultidict
3826 (package
3827 (name "python-orderedmultidict")
3828 (version "0.7.11")
3829 (source
3830 (origin
3831 (method url-fetch)
3832 (uri (pypi-uri "orderedmultidict" version))
3833 (sha256
3834 (base32
3835 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
3836 (build-system python-build-system)
3837 (arguments
3838 `(#:phases
3839 (modify-phases %standard-phases
3840 (add-after 'unpack 'fix-tests
3841 (lambda _
3842 ;; The package uses nosetest for running the tests.
3843 ;; Adding this initfile allows to run the test suite
3844 ;; without requiring nosetest.
d1c4f329
RW
3845 (with-output-to-file "tests/__init__.py" newline)
3846 #t)))))
44d10b1f
RW
3847 (propagated-inputs
3848 `(("python-six" ,python-six)))
3849 (native-inputs
3850 `(("python-pycodestyle" ,python-pycodestyle)))
3851 (home-page "https://github.com/gruns/orderedmultidict")
3852 (synopsis "Python Ordered Multivalue Dictionary - omdict")
3853 (description "This package contains a library for ordered multivalue
3854dictionaries. A multivalue dictionary is a dictionary that can store
3855multiple values for the same key. An ordered multivalue dictionary is a
3856multivalue dictionary that retains the order of insertions and deletions.")
3857 (license license:unlicense)))
3858
3859(define-public python2-orderedmultidict
3860 (package-with-python2 python-orderedmultidict))
3861
3862(define-public python-autopep8
3863 (package
3864 (name "python-autopep8")
3865 (version "1.3.5")
3866 (source
3867 (origin
3868 (method url-fetch)
3869 (uri (pypi-uri "autopep8" version))
3870 (sha256
3871 (base32
3872 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
3873 (build-system python-build-system)
3874 (propagated-inputs
3875 `(("python-pycodestyle" ,python-pycodestyle)))
3876 (home-page "https://github.com/hhatto/autopep8")
3877 (synopsis "Format Python code according to the PEP 8 style guide")
3878 (description
3879 "@code{autopep8} automatically formats Python code to conform to
3880the PEP 8 style guide. It uses the pycodestyle utility to determine
3881what parts of the code needs to be formatted. @code{autopep8} is
3882capable of fixing most of the formatting issues that can be reported
3883by pycodestyle.")
3884 (license (license:non-copyleft
3885 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
3886
3887(define-public python2-autopep8
3888 (package-with-python2 python-autopep8))
3889
3890(define-public python-distutils-extra
3891 (package
3892 (name "python-distutils-extra")
3893 (version "2.38")
3894 (source
3895 (origin
3896 (method url-fetch)
3897 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
3898 version "/+download/python-distutils-extra-"
3899 version ".tar.gz"))
3900 (sha256
3901 (base32
3902 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
3903 (build-system python-build-system)
3904 (home-page "https://launchpad.net/python-distutils-extra/")
3905 (synopsis "Enhancements to Python's distutils")
3906 (description
3907 "The python-distutils-extra module enables you to easily integrate
3908gettext support, themed icons, and scrollkeeper-based documentation into
3909Python's distutils.")
3910 (license license:gpl2)))
3911
3912(define-public python2-distutils-extra
3913 (package-with-python2 python-distutils-extra))
3914
3915(define-public python2-elib.intl
3916 (package
3917 (name "python2-elib.intl")
3918 (version "0.0.3")
3919 (source
3920 (origin
3921 ;; This project doesn't tag releases or publish tarballs, so we take
3922 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
3923 (method git-fetch)
3924 (uri (git-reference
3925 (url "https://github.com/dieterv/elib.intl.git")
3926 (commit "d09997cfef")))
3927 (file-name (string-append name "-" version "-checkout"))
3928 (sha256
3929 (base32
3930 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
3931 (build-system python-build-system)
3932 (arguments
3933 ;; incompatible with Python 3 (exception syntax)
3934 `(#:python ,python-2
3935 #:tests? #f))
3936 (home-page "https://github.com/dieterv/elib.intl")
3937 (synopsis "Enhanced internationalization for Python")
3938 (description
3939 "The elib.intl module provides enhanced internationalization (I18N)
3940services for your Python modules and applications.")
3941 (license license:lgpl3+)))
3942
3943(define-public python-olefile
3944 (package
3945 (name "python-olefile")
3946 (version "0.45.1")
3947 (source
3948 (origin
3949 (method url-fetch)
3950 (uri (string-append "https://github.com/decalage2/olefile/archive/v"
3951 version ".tar.gz"))
3952 (file-name (string-append name "-" version ".tar.gz"))
3953 (sha256
3954 (base32
3955 "18ai19zwagm6nli14k8bii31ipbab2rp7plrvsm6gmfql551a8ai"))))
3956 (build-system python-build-system)
3957 (home-page
3958 "https://www.decalage.info/python/olefileio")
3959 (synopsis "Read and write Microsoft OLE2 files.")
3960 (description
3961 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
3962Storage or Compound Document, Microsoft Office). It is an improved version of
3963the OleFileIO module from PIL, the Python Image Library.")
3964 (license license:bsd-3)))
3965
3966(define-public python2-olefile
3967 (package-with-python2 python-olefile))
3968
3969(define-public python-pillow
3970 (package
3971 (name "python-pillow")
3972 (version "5.4.1")
3973 (source
3974 (origin
3975 (method url-fetch)
3976 (uri (pypi-uri "Pillow" version))
3977 (sha256
3978 (base32
3979 "17waygkhhzjd75kajlfw9v57mbb41lcpg6cvkdijqd7smm76ccsj"))))
3980 (build-system python-build-system)
3981 (native-inputs
3982 `(("python-pytest" ,python-pytest)))
3983 (inputs
3984 `(("freetype" ,freetype)
3985 ("lcms" ,lcms)
3986 ("zlib" ,zlib)
3987 ("libjpeg" ,libjpeg)
3988 ("openjpeg" ,openjpeg)
3989 ("libtiff" ,libtiff)
3990 ("libwebp" ,libwebp)))
3991 (propagated-inputs
3992 `(("python-olefile" ,python-olefile)))
3993 (arguments
3994 `(#:phases
3995 (modify-phases %standard-phases
3996 (add-after 'unpack 'patch-ldconfig
3997 (lambda _
3998 (substitute* "setup.py"
3999 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
4000 (delete 'check) ; We must run checks after python-pillow is installed.
4001 (add-after 'install 'check-installed
4002 (lambda* (#:key outputs inputs #:allow-other-keys)
4003 (begin
4004 (setenv "HOME" (getcwd))
4005 ;; Make installed package available for running the tests.
4006 (add-installed-pythonpath inputs outputs)
4007 (invoke "python" "selftest.py" "--installed")
4008 (invoke "python" "-m" "pytest" "-vv")))))))
4009 (home-page "https://python-pillow.org")
4010 (synopsis "Fork of the Python Imaging Library")
4011 (description
4012 "The Python Imaging Library adds image processing capabilities to your
4013Python interpreter. This library provides extensive file format support, an
4014efficient internal representation, and fairly powerful image processing
4015capabilities. The core image library is designed for fast access to data
4016stored in a few basic pixel formats. It should provide a solid foundation for
4017a general image processing tool.")
4018 (license (license:x11-style
4019 "http://www.pythonware.com/products/pil/license.htm"
4020 "The PIL Software License"))))
4021
4022(define-public python2-pillow
4023 (package-with-python2 python-pillow))
4024
4025(define-public python-pycparser
4026 (package
4027 (name "python-pycparser")
4028 (version "2.18")
4029 (source
4030 (origin
4031 (method url-fetch)
4032 (uri (pypi-uri "pycparser" version))
4033 (sha256
4034 (base32
4035 "09mjyw82ibqzl449g7swy8bfxnfpmas0815d2rkdjlcqw81wma4r"))))
4036 (outputs '("out" "doc"))
4037 (build-system python-build-system)
4038 (native-inputs
4039 `(("pkg-config" ,pkg-config)))
4040 (arguments
4041 `(#:phases
4042 (modify-phases %standard-phases
4043 (replace 'check
4044 (lambda _
4045 (with-directory-excursion "tests"
acb75c03
RW
4046 (invoke "python" "all_tests.py"))
4047 #t))
44d10b1f
RW
4048 (add-after 'install 'install-doc
4049 (lambda* (#:key outputs #:allow-other-keys)
4050 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4051 (doc (string-append data "/doc/" ,name "-" ,version))
4052 (examples (string-append doc "/examples")))
4053 (mkdir-p examples)
4054 (for-each (lambda (file)
4055 (copy-file (string-append "." file)
4056 (string-append doc file)))
4057 '("/README.rst" "/CHANGES" "/LICENSE"))
4058 (copy-recursively "examples" examples)))))))
4059 (home-page "https://github.com/eliben/pycparser")
4060 (synopsis "C parser in Python")
4061 (description
4062 "Pycparser is a complete parser of the C language, written in pure Python
4063using the PLY parsing library. It parses C code into an AST and can serve as
4064a front-end for C compilers or analysis tools.")
4065 (license license:bsd-3)))
4066
4067(define-public python2-pycparser
4068 (package-with-python2 python-pycparser))
4069
4070(define-public python-pywavelets
4071 (package
4072 (name "python-pywavelets")
4073 (version "1.0.1")
4074 (home-page "https://github.com/PyWavelets/pywt")
4075 (source (origin
4076 (method url-fetch)
4077 (uri (pypi-uri "PyWavelets" version))
4078 (sha256
4079 (base32
4080 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
4081 (build-system python-build-system)
4082 (arguments
4083 '(#:modules ((ice-9 ftw)
4084 (srfi srfi-1)
4085 (srfi srfi-26)
4086 (guix build utils)
4087 (guix build python-build-system))
4088 #:phases (modify-phases %standard-phases
4089 (replace 'check
4090 (lambda _
4091 (let ((cwd (getcwd))
4092 (libdir (find (cut string-prefix? "lib." <>)
4093 (scandir "build"))))
4094 (with-directory-excursion (string-append cwd "/build/" libdir)
4095 (invoke "nosetests" "-v" "."))))))))
4096 (native-inputs
4097 `(("python-matplotlib" ,python-matplotlib) ;for tests
4098 ("python-nose" ,python-nose)))
4099 (propagated-inputs
4100 `(("python-numpy" ,python-numpy)))
4101 (synopsis "Wavelet transforms in Python")
4102 (description
4103 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
4104mathematical basis functions that are localized in both time and frequency.
4105Wavelet transforms are time-frequency transforms employing wavelets. They are
4106similar to Fourier transforms, the difference being that Fourier transforms are
4107localized only in frequency instead of in time and frequency.")
4108 (license license:expat)))
4109
4110(define-public python2-pywavelets
4111 (package-with-python2 python-pywavelets))
4112
4113(define-public python-xcffib
4114 (package
4115 (name "python-xcffib")
4116 (version "0.6.0")
4117 (source
4118 (origin
4119 (method url-fetch)
4120 (uri (pypi-uri "xcffib" version))
4121 (sha256
4122 (base32
4123 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
4124 (build-system python-build-system)
4125 (inputs
4126 `(("libxcb" ,libxcb)))
4127 (propagated-inputs
4128 `(("python-cffi" ,python-cffi) ; used at run time
4129 ("python-six" ,python-six)))
4130 (arguments
4131 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4132 #:tests? #f
4133 #:phases
4134 (modify-phases %standard-phases
4135 (add-after 'unpack 'fix-libxcb-path
4136 (lambda* (#:key inputs #:allow-other-keys)
4137 (let ((libxcb (assoc-ref inputs "libxcb")))
4138 (substitute* '("xcffib/__init__.py")
4139 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4140 #t)))
4141 (add-after 'install 'install-doc
4142 (lambda* (#:key outputs #:allow-other-keys)
4143 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4144 "/doc/" ,name "-" ,version)))
4145 (mkdir-p doc)
4146 (copy-file "README.md"
4147 (string-append doc "/README.md"))
4148 #t))))))
4149 (home-page "https://github.com/tych0/xcffib")
4150 (synopsis "XCB Python bindings")
4151 (description
4152 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4153support for Python 3 and PyPy. It is based on cffi.")
4154 (license license:expat)))
4155
4156(define-public python2-xcffib
4157 (package-with-python2 python-xcffib))
4158
4159(define-public python-cairocffi
4160 (package
4161 (name "python-cairocffi")
4162 (version "0.9.0")
4163 (source
4164 (origin
4165 (method url-fetch)
4166 (uri (pypi-uri "cairocffi" version))
4167 (sha256
4168 (base32
4169 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
4170 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
4171 (build-system python-build-system)
4172 (outputs '("out" "doc"))
4173 (inputs
4174 `(("glib" ,glib)
4175 ("gtk+" ,gtk+)
4176 ("gdk-pixbuf" ,gdk-pixbuf)
4177 ("cairo" ,cairo)
4178 ("pango" ,pango)))
4179 (native-inputs
4180 `(("pkg-config" ,pkg-config)
4181 ("python-pytest" ,python-pytest)
4182 ("python-pytest-cov" ,python-pytest-cov)
4183 ("python-pytest-runner" ,python-pytest-runner)
4184 ("python-sphinx" ,python-sphinx)
4185 ("python-docutils" ,python-docutils)))
4186 (propagated-inputs
4187 `(("python-xcffib" ,python-xcffib))) ; used at run time
4188 (arguments
4189 `(#:phases
4190 (modify-phases %standard-phases
4191 (add-after 'unpack 'patch-paths
4192 (lambda* (#:key inputs outputs #:allow-other-keys)
4193 (substitute* (find-files "." "\\.py$")
4194 (("dlopen\\(ffi, 'cairo'")
4195 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
4196 "/lib/libcairo.so.2'"))
4197 (("dlopen\\(ffi, 'gdk-3'")
4198 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
4199 "/lib/libgtk-3.so.0'"))
4200 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
4201 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
4202 "/lib/libgdk_pixbuf-2.0.so.0'"))
4203 (("dlopen\\(ffi, 'glib-2.0'")
4204 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4205 "/lib/libglib-2.0.so.0'"))
4206 (("dlopen\\(ffi, 'gobject-2.0'")
4207 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4208 "/lib/libgobject-2.0.so.0'"))
4209 (("dlopen\\(ffi, 'pangocairo-1.0'")
4210 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4211 "/lib/libpangocairo-1.0.so.0'"))
4212 (("dlopen\\(ffi, 'pango-1.0'")
4213 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4214 "/lib/libpango-1.0.so.0'")))
4215 #t))
4216 (add-after 'install 'install-doc
4217 (lambda* (#:key inputs outputs #:allow-other-keys)
4218 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4219 (doc (string-append data "/doc/" ,name "-" ,version))
4220 (html (string-append doc "/html")))
4221 (setenv "LD_LIBRARY_PATH"
4222 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4223 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4224 (setenv "LANG" "en_US.UTF-8")
4225 (mkdir-p html)
4226 (for-each (lambda (file)
4227 (copy-file (string-append "." file)
4228 (string-append doc file)))
4229 '("/README.rst" "/CHANGES" "/LICENSE"))
4230 (system* "python" "setup.py" "build_sphinx")
4231 (copy-recursively "docs/_build/html" html)
4232 #t))))))
4233 (home-page "https://github.com/Kozea/cairocffi")
4234 (synopsis "Python bindings and object-oriented API for Cairo")
4235 (description
4236 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4237Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4238graphics library with support for multiple backends including image buffers,
4239PNG, PostScript, PDF, and SVG file output.")
4240 (license license:bsd-3)))
4241
4242(define-public python2-cairocffi
4243 (package-with-python2 python-cairocffi))
4244
4245(define-public python-decorator
4246 (package
4247 (name "python-decorator")
4248 (version "4.3.0")
4249 (source
4250 (origin
4251 (method url-fetch)
4252 (uri (pypi-uri "decorator" version))
4253 (sha256
4254 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4255 (build-system python-build-system)
4256 (home-page "https://pypi.python.org/pypi/decorator/")
4257 (synopsis "Python module to simplify usage of decorators")
4258 (description
4259 "The aim of the decorator module is to simplify the usage of decorators
4260for the average programmer, and to popularize decorators usage giving examples
4261of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4262etc. The core of this module is a decorator factory.")
4263 (license license:expat)))
4264
4265(define-public python2-decorator
4266 (package-with-python2 python-decorator))
4267
4268(define-public python-drmaa
4269 (package
4270 (name "python-drmaa")
4271 (version "0.7.7")
4272 (source
4273 (origin
4274 (method url-fetch)
4275 (uri (pypi-uri "drmaa" version))
4276 (sha256
4277 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4278 (build-system python-build-system)
4279 ;; The test suite requires libdrmaa which is provided by the cluster
4280 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4281 ;; should be set to the path of the libdrmaa library.
4282 (arguments '(#:tests? #f))
4283 (native-inputs
4284 `(("python-nose" ,python-nose)))
4285 (home-page "https://pypi.python.org/pypi/drmaa")
4286 (synopsis "Python bindings for the DRMAA library")
4287 (description
4288 "A Python package for Distributed Resource Management (DRM) job
4289submission and control. This package is an implementation of the DRMAA 1.0
4290Python language binding specification.")
4291 (license license:bsd-3)))
4292
4293(define-public python2-drmaa
4294 (package-with-python2 python-drmaa))
4295
4296(define-public python-grako
4297 (package
4298 (name "python-grako")
4299 (version "3.99.9")
4300 (source
4301 (origin
4302 (method url-fetch)
4303 (uri
4304 (pypi-uri "grako" version ".zip"))
4305 (sha256
4306 (base32
4307 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4308 (build-system python-build-system)
4309 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4310 (native-inputs
4311 `(("unzip" ,unzip)
4312 ("python-pytest" ,python-pytest)
4313 ("python-pytest-runner" ,python-pytest-runner)))
4314 (home-page "https://bitbucket.org/neogeny/grako")
4315 (synopsis "EBNF parser generator")
4316 (description
4317 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4318memoizing PEG/Packrat parser in Python.")
4319 (license license:bsd-3)))
4320
4321(define-public python2-grako
4322 (package-with-python2 python-grako))
4323
4324(define-public python-gridmap
4325 (package
4326 (name "python-gridmap")
4327 (version "0.13.0")
4328 (source
4329 (origin
4330 (method url-fetch)
4331 (uri (string-append
4332 "https://github.com/pygridtools/gridmap/archive/v"
4333 version ".tar.gz"))
4334 (file-name (string-append name "-" version ".tar.gz"))
4335 (sha256
4336 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
4337 (build-system python-build-system)
4338 (arguments
4339 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4340 (propagated-inputs
4341 `(("python-psutil" ,python-psutil)
4342 ("python-drmaa" ,python-drmaa)
4343 ("python-pyzmq" ,python-pyzmq)))
4344 (home-page "https://github.com/pygridtools/gridmap")
4345 (synopsis "Create jobs on a cluster directly from Python")
4346 (description
4347 "Gridmap is a Python package to allow you to easily create jobs on the
4348cluster directly from Python. You can directly map Python functions onto the
4349cluster without needing to write any wrapper code yourself.")
4350 (license license:gpl3+)))
4351
4352(define-public python2-gridmap
4353 (package-with-python2 python-gridmap))
4354
4355(define-public python-honcho
4356 (package
4357 (name "python-honcho")
4358 (version "1.0.1")
4359 (source
4360 (origin
4361 (method url-fetch)
4362 (uri (string-append
4363 "https://github.com/nickstenning/honcho/archive/v"
4364 version ".tar.gz"))
4365 (file-name (string-append name "-" version ".tar.gz"))
4366 (sha256
4367 (base32 "0zizn61n5z5hq421hkypk9pw8s6fpxw30f4hsg7k4ivwzy3gjw9j"))))
4368 (build-system python-build-system)
4369 (native-inputs
4370 `(("python-pytest" ,python-pytest)
4371 ("python-mock" ,python-mock)
4372 ("python-tox" ,python-tox)
4373 ("which" ,which))) ;for tests
4374 (propagated-inputs
4375 `(("python-jinja2" ,python-jinja2)))
4376 (arguments
4377 `(#:phases
4378 (modify-phases %standard-phases
4379 (delete 'check)
4380 (add-after 'install 'check
4381 (lambda* (#:key outputs inputs #:allow-other-keys)
4382 ;; fix honcho path in testsuite
4383 (substitute* "tests/conftest.py"
4384 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4385 "/bin/honcho" "'")))
4386 ;; It's easier to run tests after install.
4387 ;; Make installed package available for running the tests
4388 (add-installed-pythonpath inputs outputs)
95b707fb 4389 (invoke "py.test" "-v"))))))
44d10b1f
RW
4390 (home-page "https://github.com/nickstenning/honcho")
4391 (synopsis "Manage Procfile-based applications")
4392 (description
4393 "A Procfile is a file which describes how to run an application
4394consisting of serveral processes. honcho starts all listed processes.
4395The output of all running processes is collected by honcho and
4396displayed.")
4397 (license license:expat)))
4398
4399(define-public python2-honcho
4400 (package-with-python2 python-honcho))
4401
4402(define-public python-pexpect
4403 (package
4404 (name "python-pexpect")
4405 (version "4.6.0")
4406 (source
4407 (origin
4408 (method url-fetch)
4409 (uri (pypi-uri "pexpect" version))
4410 (sha256
4411 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
4412 (build-system python-build-system)
4413 (arguments
4414 `(#:phases
4415 (modify-phases %standard-phases
4416 (add-before 'check 'prepare-tests
4417 (lambda _
4418 (substitute* (find-files "tests")
4419 (("/bin/ls") (which "ls"))
4420 (("/bin/echo") (which "echo"))
4421 (("/bin/which") (which "which"))
4422 ;; Many tests try to use the /bin directory which
4423 ;; is not present in the build environment.
4424 ;; Use one that's non-empty and unlikely to change.
4425 (("/bin'") "/dev'"))
4426 ;; XXX: Socket connection test gets "Connection reset by peer".
4427 ;; Why does it not work? Delete for now.
4428 (delete-file "tests/test_socket.py")
4429 #t))
4430 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
4431 (native-inputs
4432 `(("python-nose" ,python-nose)
4433 ("python-pytest" ,python-pytest)
4434 ("man-db" ,man-db)
4435 ("which" ,which)
4436 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
4437 (propagated-inputs
4438 `(("python-ptyprocess" ,python-ptyprocess)))
4439 (home-page "http://pexpect.readthedocs.org/")
4440 (synopsis "Controlling interactive console applications")
4441 (description
4442 "Pexpect is a pure Python module for spawning child applications;
4443controlling them; and responding to expected patterns in their output.
4444Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4445child application and control it as if a human were typing commands.")
4446 (license license:isc)))
4447
4448(define-public python2-pexpect
4449 (package-with-python2 python-pexpect))
4450
4451(define-public python-setuptools-scm
4452 (package
4453 (name "python-setuptools-scm")
4454 (version "3.1.0")
4455 (source (origin
4456 (method url-fetch)
4457 (uri (pypi-uri "setuptools_scm" version))
4458 (sha256
4459 (base32
4460 "0h4bglwfz8b9prqljv8z3w9rgydfyxzaj05bm1y6zs5m6shz548i"))))
4461 (build-system python-build-system)
4462 (home-page "https://github.com/pypa/setuptools_scm/")
4463 (synopsis "Manage Python package versions in SCM metadata")
4464 (description
4465 "Setuptools_scm handles managing your Python package versions in
4466@dfn{software configuration management} (SCM) metadata instead of declaring
4467them as the version argument or in a SCM managed file.")
4468 (license license:expat)))
4469
4470(define-public python2-setuptools-scm
4471 (package-with-python2 python-setuptools-scm))
4472
4473(define-public python-pathpy
4474 (package
4475 (name "python-pathpy")
4476 (version "11.0.1")
4477 (source
4478 (origin
4479 (method url-fetch)
4480 (uri (pypi-uri "path.py" version))
4481 (sha256
4482 (base32 "07x15v8c7ry9bvycw294c9yq6ky9v2b0dalvgi6rn38ilh69vsz7"))))
4483 ;; (outputs '("out" "doc"))
4484 (build-system python-build-system)
4485 (propagated-inputs
4486 `(("python-appdirs" ,python-appdirs)))
4487 (native-inputs
4488 `(("python-setuptools-scm" ,python-setuptools-scm)
4489 ("python-sphinx" ,python-sphinx)
4490 ("python-rst.linker" ,python-rst.linker)
4491 ("python-pytest" ,python-pytest)
4492 ("python-pytest-runner" ,python-pytest-runner)))
4493 (arguments
4494 ;; FIXME: Documentation and tests require "jaraco.packaging".
4495 `(#:tests? #f))
4496 ;; #:phases
4497 ;; (modify-phases %standard-phases
4498 ;; (add-after 'build 'build-doc
4499 ;; (lambda _
4500 ;; (setenv "LANG" "en_US.UTF-8")
4501 ;; (zero? (system* "python" "setup.py" "build_sphinx"))))
4502 ;; (add-after 'install 'install-doc
4503 ;; (lambda* (#:key outputs #:allow-other-keys)
4504 ;; (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4505 ;; (doc (string-append data "/doc/" ,name "-" ,version))
4506 ;; (html (string-append doc "/html")))
4507 ;; (mkdir-p html)
4508 ;; (for-each (lambda (file)
4509 ;; (copy-file file (string-append doc "/" file)))
4510 ;; '("README.rst" "CHANGES.rst"))
4511 ;; (copy-recursively "build/sphinx/html" html)))))))
4512 (home-page "https://github.com/jaraco/path.py")
4513 (synopsis "Python module wrapper for built-in os.path")
4514 (description
4515 "@code{path.py} implements path objects as first-class entities, allowing
4516common operations on files to be invoked on those path objects directly.")
4517 (license license:expat)))
4518
4519(define-public python2-pathpy
4520 (package-with-python2 python-pathpy))
4521
4522(define-public python-simplegeneric
4523 (package
4524 (name "python-simplegeneric")
4525 (version "0.8.1")
4526 (source
4527 (origin
4528 (method url-fetch)
6c8c3980 4529 (uri (pypi-uri "simplegeneric" version ".zip"))
44d10b1f
RW
4530 (sha256
4531 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4532 (build-system python-build-system)
4533 (native-inputs
4534 `(("unzip" ,unzip)))
4535 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
4536 (synopsis "Python module for simple generic functions")
4537 (description
4538 "The simplegeneric module lets you define simple single-dispatch generic
4539functions, akin to Python’s built-in generic functions like @code{len()},
4540@code{iter()} and so on. However, instead of using specially-named methods,
4541these generic functions use simple lookup tables, akin to those used by
4542e.g. @code{pickle.dump()} and other generic functions found in the Python
4543standard library.")
4544 (license license:zpl2.1)))
4545
4546(define-public python2-simplegeneric
4547 (package-with-python2 python-simplegeneric))
4548
4549(define-public python-ipython-genutils
4550 ;; TODO: This package is retired, check if can be removed, see description.
4551 (package
4552 (name "python-ipython-genutils")
4553 (version "0.1.0")
4554 (source
4555 (origin
4556 (method url-fetch)
c9671d4b 4557 (uri (pypi-uri "ipython_genutils" version))
44d10b1f
RW
4558 (sha256
4559 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
4560 (build-system python-build-system)
4561 (arguments `(#:tests? #f)) ; no tests
4562 (home-page "https://ipython.org")
4563 (synopsis "Vestigial utilities from IPython")
4564 (description
4565 "This package provides retired utilities from IPython. No packages
4566outside IPython/Jupyter should depend on it.
4567
4568This package shouldn't exist. It contains some common utilities shared by
4569Jupyter and IPython projects during The Big Split. As soon as possible, those
4570packages will remove their dependency on this, and this package will go
4571away.")
4572 (license license:bsd-3)))
4573
4574(define-public python2-ipython-genutils
4575 (package-with-python2 python-ipython-genutils))
4576
4577(define-public python-traitlets
4578 (package
4579 (name "python-traitlets")
4580 (version "4.3.2")
4581 (source
4582 (origin
4583 (method url-fetch)
4584 (uri (pypi-uri "traitlets" version))
4585 (sha256
4586 (base32
4587 "0dbq7sx26xqz5ixs711k5nc88p8a0nqyz6162pwks5dpcz9d4jww"))))
4588 (build-system python-build-system)
4589 (arguments
4590 `(#:phases
4591 (modify-phases %standard-phases
4592 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
4593 (propagated-inputs
4594 `(("python-ipython-genutils" ,python-ipython-genutils)
4595 ("python-decorator" ,python-decorator))) ;not needed for >4.3.2
4596 (native-inputs
4597 `(("python-pytest" ,python-pytest)))
4598 (properties `((python2-variant . ,(delay python2-traitlets))))
4599 (home-page "https://ipython.org")
4600 (synopsis "Configuration system for Python applications")
4601 (description
4602 "Traitlets is a framework that lets Python classes have attributes with
4603type checking, dynamically calculated default values, and ‘on change’
4604callbacks. The package also includes a mechanism to use traitlets for
4605configuration, loading values from files or from command line arguments. This
4606is a distinct layer on top of traitlets, so you can use traitlets in your code
4607without using the configuration machinery.")
4608 (license license:bsd-3)))
4609
4610(define-public python2-traitlets
4611 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
4612 (package
4613 (inherit traitlets)
4614 (propagated-inputs
4615 `(("python2-enum34" ,python2-enum34)
4616 ,@(package-propagated-inputs traitlets))))))
4617
4618(define-public python-jupyter-core
4619 (package
4620 (name "python-jupyter-core")
4621 (version "4.4.0")
4622 (source
4623 (origin
4624 (method url-fetch)
4625 (uri (string-append (pypi-uri "jupyter_core" version)))
4626 (sha256
4627 (base32
4628 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
4629 (build-system python-build-system)
4630 ;; FIXME: not sure how to run the tests
4631 (arguments `(#:tests? #f))
4632 (propagated-inputs
4633 `(("python-traitlets" ,python-traitlets)))
4634 (home-page "http://jupyter.org/")
4635 (synopsis "Jupyter base package")
4636 (description
4637 "Jupyter core is the base package on which Jupyter projects rely.")
4638 (license license:bsd-3)))
4639
4640(define-public python2-jupyter-core
4641 (package-with-python2 python-jupyter-core))
4642
4643(define-public python-jupyter-client
4644 (package
4645 (name "python-jupyter-client")
4646 (version "5.2.4")
4647 (source
4648 (origin
4649 (method url-fetch)
4650 (uri (pypi-uri "jupyter_client" version))
4651 (sha256
4652 (base32
4653 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
4654 (build-system python-build-system)
4655 ;; Tests fail because of missing native python kernel which I assume is
4656 ;; provided by the ipython package, which we cannot use because it would
4657 ;; cause a dependency cycle.
4658 (arguments `(#:tests? #f))
4659 (propagated-inputs
4660 `(("python-pyzmq" ,python-pyzmq)
4661 ("python-traitlets" ,python-traitlets)
4662 ("python-jupyter-core" ,python-jupyter-core)))
4663 (home-page "http://jupyter.org/")
4664 (synopsis "Jupyter protocol implementation and client libraries")
4665 (description
4666 "The @code{jupyter_client} package contains the reference implementation
4667of the Jupyter protocol. It also provides client and kernel management APIs
4668for working with kernels, and the @code{jupyter kernelspec} entrypoint for
4669installing @code{kernelspec}s for use with Jupyter frontends.")
4670 (license license:bsd-3)))
4671
4672(define-public python2-jupyter-client
4673 (package-with-python2 python-jupyter-client))
4674
4675(define-public python-ipykernel
4676 (package
4677 (name "python-ipykernel")
4678 (version "5.1.0")
4679 (source
4680 (origin
4681 (method url-fetch)
4682 (uri (pypi-uri "ipykernel" version))
4683 (sha256
4684 (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g"))))
4685 (build-system python-build-system)
4686 (arguments
4687 `(#:phases
4688 (modify-phases %standard-phases
4689 (replace 'check
4690 (lambda _
4691 (setenv "HOME" "/tmp")
4692 (invoke "pytest" "-v")
4693 #t)))))
4694 (propagated-inputs
4695 `(("python-ipython" ,python-ipython)
4696 ;; imported at runtime during connect
4697 ("python-jupyter-client" ,python-jupyter-client)))
4698 (native-inputs
4699 `(("python-pytest" ,python-pytest)
4700 ("python-nose" ,python-nose)))
4701 (home-page "https://ipython.org")
4702 (synopsis "IPython Kernel for Jupyter")
4703 (description
4704 "This package provides the IPython kernel for Jupyter.")
4705 (license license:bsd-3)))
4706
4707(define-public python2-ipykernel
4708 (package-with-python2 python-ipykernel))
4709
966aa714
AE
4710(define-public python-pari-jupyter
4711 (package
4712 (name "python-pari-jupyter")
4713 (version "1.3.2")
4714 (source
4715 (origin
4716 (method url-fetch)
4717 (uri (pypi-uri "pari_jupyter" version))
4718 (sha256
4719 (base32
4720 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
4721 (build-system python-build-system)
4722 (propagated-inputs
4723 `(("python-ipykernel" ,python-ipykernel)))
4724 (inputs
4725 `(("pari-gp" ,pari-gp)
4726 ("readline" ,readline)))
4727 (arguments
4728 `(#:tests? #f)) ; no test suite
4729 (home-page
4730 "https://github.com/jdemeyer/pari_jupyter")
4731 (synopsis "A Jupyter kernel for PARI/GP")
4732 (description "The package provides a PARI/GP kernel for Jupyter.")
4733 (license license:gpl3+)))
4734
44d10b1f
RW
4735;; This is the latest release of the LTS version of ipython with support for
4736;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
4737;; dropped support for Python 2.7. We may want to rename this package.
4738(define-public python-ipython
4739 (package
4740 (name "python-ipython")
4741 (version "5.8.0")
4742 (source
4743 (origin
4744 (method url-fetch)
4745 (uri (pypi-uri "ipython" version ".tar.gz"))
4746 (sha256
4747 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
4748 (build-system python-build-system)
4749 (outputs '("out" "doc"))
4750 (propagated-inputs
4751 `(("python-pyzmq" ,python-pyzmq)
4752 ("python-prompt-toolkit" ,python-prompt-toolkit-1)
4753 ("python-terminado" ,python-terminado)
4754 ("python-matplotlib" ,python-matplotlib)
4755 ("python-numpy" ,python-numpy)
4756 ("python-numpydoc" ,python-numpydoc)
4757 ("python-jinja2" ,python-jinja2)
4758 ("python-mistune" ,python-mistune)
4759 ("python-pexpect" ,python-pexpect)
4760 ("python-pickleshare" ,python-pickleshare)
4761 ("python-simplegeneric" ,python-simplegeneric)
4762 ("python-jsonschema" ,python-jsonschema)
4763 ("python-traitlets" ,python-traitlets)
4764 ("python-nbformat" ,python-nbformat)
4765 ("python-pygments" ,python-pygments)))
4766 (inputs
4767 `(("readline" ,readline)
4768 ("which" ,which)))
4769 (native-inputs
4770 `(("graphviz" ,graphviz)
4771 ("pkg-config" ,pkg-config)
4772 ("python-requests" ,python-requests) ;; for tests
4773 ("python-testpath" ,python-testpath)
4774 ("python-nose" ,python-nose)
4775 ("python-sphinx" ,python-sphinx)
4776 ("python-shpinx-rtd-theme" ,python-sphinx-rtd-theme)
4777 ;; FIXME: It's possible that a smaller union would work just as well.
4778 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
4779 texlive-fonts-ec
4780 texlive-generic-ifxetex
4781 texlive-generic-pdftex
4782 texlive-latex-amsfonts
4783 texlive-latex-capt-of
4784 texlive-latex-cmap
4785 texlive-latex-environ
4786 texlive-latex-eqparbox
4787 texlive-latex-etoolbox
4788 texlive-latex-expdlist
4789 texlive-latex-fancyhdr
4790 texlive-latex-fancyvrb
4791 texlive-latex-fncychap
4792 texlive-latex-float
4793 texlive-latex-framed
4794 texlive-latex-geometry
4795 texlive-latex-graphics
4796 texlive-latex-hyperref
4797 texlive-latex-mdwtools
4798 texlive-latex-multirow
4799 texlive-latex-oberdiek
4800 texlive-latex-parskip
4801 texlive-latex-preview
4802 texlive-latex-tabulary
4803 texlive-latex-threeparttable
4804 texlive-latex-titlesec
4805 texlive-latex-trimspaces
4806 texlive-latex-ucs
4807 texlive-latex-upquote
4808 texlive-latex-url
4809 texlive-latex-varwidth
4810 texlive-latex-wrapfig)))
4811 ("texinfo" ,texinfo)))
4812 (arguments
4813 `(#:phases
4814 (modify-phases %standard-phases
4815 (add-after 'install 'install-doc
4816 (lambda* (#:key inputs outputs #:allow-other-keys)
4817 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4818 (doc (string-append data "/doc/" ,name "-" ,version))
4819 (html (string-append doc "/html"))
4820 (man1 (string-append data "/man/man1"))
4821 (info (string-append data "/info"))
4822 (examples (string-append doc "/examples"))
4823 (python-arg (string-append "PYTHON=" (which "python"))))
4824 (setenv "LANG" "en_US.utf8")
4825 ;; Make installed package available for running the tests
4826 (add-installed-pythonpath inputs outputs)
4827 (with-directory-excursion "docs"
4828 ;; FIXME: pdf fails to build
4829 ;;(system* "make" "pdf" "PAPER=a4")
4830 (system* "make" python-arg "html")
4831 (system* "make" python-arg "info"))
4832 (copy-recursively "docs/man" man1)
4833 (copy-recursively "examples" examples)
4834 (copy-recursively "docs/build/html" html)
4835 ;; (copy-file "docs/build/latex/ipython.pdf"
4836 ;; (string-append doc "/ipython.pdf"))
4837 (mkdir-p info)
4838 (copy-file "docs/build/texinfo/ipython.info"
4839 (string-append info "/ipython.info"))
4840 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
4841 #t))
4842 ;; Tests can only be run after the library has been installed and not
4843 ;; within the source directory.
4844 (delete 'check)
4845 (add-after 'install 'check
4846 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
4847 (if tests?
4848 (begin
4849 ;; Make installed package available for running the tests
4850 (add-installed-pythonpath inputs outputs)
4851 (setenv "HOME" "/tmp/") ;; required by a test
4852 ;; We only test the core because one of the other tests
4853 ;; tries to import ipykernel.
4854 (invoke "python" "IPython/testing/iptest.py"
4855 "-v" "IPython/core/tests"))
4856 #t)))
4857 (add-before 'check 'fix-tests
4858 (lambda* (#:key inputs #:allow-other-keys)
4859 (substitute* "./IPython/utils/_process_posix.py"
4860 (("/usr/bin/env', 'which") (which "which")))
4861 (substitute* "./IPython/core/tests/test_inputtransformer.py"
4862 (("#!/usr/bin/env python")
4863 (string-append "#!" (which "python"))))
4864 ;; Disable 1 failing test
4865 (substitute* "./IPython/core/tests/test_magic.py"
4866 (("def test_dirops\\(\\):" all)
4867 (string-append "@dec.skipif(True)\n" all)))
4868 ;; This test introduces a circular dependency on ipykernel
4869 ;; (which depends on ipython).
4870 (delete-file "IPython/core/tests/test_display.py")
4871 ;; These tests throw errors for unknown reasons.
4872 (delete-file "IPython/extensions/tests/test_storemagic.py")
4873 (delete-file "IPython/core/tests/test_displayhook.py")
4874 (delete-file "IPython/core/tests/test_interactiveshell.py")
4875 (delete-file "IPython/core/tests/test_pylabtools.py")
4876 (delete-file "IPython/core/tests/test_paths.py")
4877 #t)))))
4878 (home-page "https://ipython.org")
4879 (synopsis "IPython is a tool for interactive computing in Python")
4880 (description
4881 "IPython provides a rich architecture for interactive computing with:
4882Powerful interactive shells, a browser-based notebook, support for interactive
4883data visualization, embeddable interpreters and tools for parallel
4884computing.")
4885 (license license:bsd-3)
4886 (properties `((python2-variant . ,(delay python2-ipython))))))
4887
4888(define-public python2-ipython
4889 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
4890 (package
4891 (inherit ipython)
4892 ;; FIXME: add pyreadline once available.
4893 (propagated-inputs
4894 `(("python2-backports-shutil-get-terminal-size"
4895 ,python2-backports-shutil-get-terminal-size)
4896 ("python2-pathlib2" ,python2-pathlib2)
4897 ,@(package-propagated-inputs ipython)))
4898 (native-inputs
4899 `(("python2-mock" ,python2-mock)
4900 ,@(package-native-inputs ipython))))))
4901
4902(define-public python-urwid
4903 (package
4904 (name "python-urwid")
4905 (version "2.0.1")
4906 (source
4907 (origin
4908 (method url-fetch)
4909 (uri (pypi-uri "urwid" version))
4910 (sha256
4911 (base32
4912 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
4913 (build-system python-build-system)
4914 (home-page "http://urwid.org")
4915 (synopsis "Console user interface library for Python")
4916 (description
4917 "Urwid is a curses-based UI/widget library for Python. It includes many
4918features useful for text console applications.")
4919 (license license:lgpl2.1+)))
4920
4921(define-public python2-urwid
4922 (package-with-python2 python-urwid))
4923
4924(define-public python-urwidtrees
4925 (package
4926 (name "python-urwidtrees")
4927 (version "1.0.2")
4928 (source
4929 (origin
4930 (method url-fetch)
4931 ;; package author intends on distributing via github rather than pypi:
4932 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
4933 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
4934 version ".tar.gz"))
4935 (file-name (string-append name "-" version ".tar.gz"))
4936 (sha256
4937 (base32
4938 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
4939 (build-system python-build-system)
4940 (arguments
4941 '(#:tests? #f)) ; no tests
4942 (propagated-inputs `(("python-urwid" ,python-urwid)))
4943 (home-page "https://github.com/pazz/urwidtrees")
4944 (synopsis "Tree widgets for urwid")
4945 (description "Urwidtrees is a Widget Container API for the @code{urwid}
4946toolkit. Use it to build trees of widgets.")
4947 (license license:gpl3+)))
4948
4949(define-public python2-urwidtrees
4950 (package-with-python2 python-urwidtrees))
4951
4952(define-public python-ua-parser
4953 (package
4954 (name "python-ua-parser")
4955 (version "0.8.0")
4956 (source
4957 (origin
4958 (method url-fetch)
4959 (uri (pypi-uri "ua-parser" version))
4960 (sha256
4961 (base32
4962 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
4963 (build-system python-build-system)
4964 (arguments
4965 `(#:tests? #f)) ;no test suite in release
4966 (native-inputs
4967 `(("python-pyyaml" ,python-pyyaml)))
4968 (home-page "https://github.com/ua-parser/uap-python")
4969 (synopsis "User agent parser")
4970 (description
4971 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
4972 (license license:asl2.0)))
4973
4974(define-public python2-ua-parser
4975 (package-with-python2 python-ua-parser))
4976
4977(define-public python-user-agents
4978 (package
4979 (name "python-user-agents")
4980 (version "1.1.0")
4981 (source
4982 (origin
4983 (method url-fetch)
4984 (uri (pypi-uri "user-agents" version))
4985 (sha256
4986 (base32
4987 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
4988 (build-system python-build-system)
4989 (arguments
4990 `(#:tests? #f)) ;missing devices.json test file in release
4991 (propagated-inputs
4992 `(("python-ua-parser" ,python-ua-parser)))
4993 (home-page "https://github.com/selwin/python-user-agents")
4994 (synopsis "User Agent strings parsing library")
4995 (description
4996 "A library to identify devices (phones, tablets) and their capabilities by
4997parsing (browser/HTTP) user agent strings.")
4998 (license license:expat)))
4999
5000(define-public python2-user-agents
5001 (package-with-python2 python-user-agents))
5002
5003(define-public python-dbus
5004 (package
5005 (name "python-dbus")
5006 (version "1.2.8")
5007 (source
5008 (origin
5009 (method url-fetch)
5010 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
5011 "dbus-python-" version ".tar.gz"))
5012 (sha256
5013 (base32
5014 "0vvvjmiwnc9cjlks3gcdk43ap7llhlpz7cm1wbw0nc2yfsxjpwdb"))))
5015 (build-system gnu-build-system)
5016 (arguments
5017 '(#:phases
5018 (modify-phases %standard-phases
5019 (add-before
5020 'check 'pre-check
5021 (lambda _
5022 ;; XXX: For the missing '/etc/machine-id'.
5023 (substitute* "test/run-test.sh"
5024 (("DBUS_FATAL_WARNINGS=1")
5025 "DBUS_FATAL_WARNINGS=0"))
5026 #t)))))
5027 (native-inputs
5028 `(("pkg-config" ,pkg-config)))
5029 (inputs
5030 `(("python" ,python-wrapper)
5031 ("dbus-glib" ,dbus-glib)))
5032 (synopsis "Python bindings for D-bus")
5033 (description "python-dbus provides bindings for libdbus, the reference
5034implementation of D-Bus.")
5035 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
5036 (license license:expat)))
5037
5038(define-public python2-dbus
5039 (package (inherit python-dbus)
5040 (name "python2-dbus")
5041 (inputs `(("python" ,python-2)
5042 ,@(alist-delete "python"
5043 (package-inputs python-dbus)
5044 equal?)))
5045 ;; FIXME: on Python 2, the test_utf8 fails with:
5046 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5047 (arguments `(#:tests? #f))))
5048
5049(define-public python-lxml
5050 (package
5051 (name "python-lxml")
5052 (version "4.2.5")
5053 (source
5054 (origin
5055 (method url-fetch)
5056 (uri (pypi-uri "lxml" version))
5057 (sha256
5058 (base32
5059 "0zw0y9hs0nflxhl9cs6ipwwh53szi3w2x06wl0k9cylyqac0cwin"))))
5060 (build-system python-build-system)
5061 (inputs
5062 `(("libxml2" ,libxml2)
5063 ("libxslt" ,libxslt)))
5064 (home-page "http://lxml.de/")
5065 (synopsis
5066 "Python XML processing library")
5067 (description
5068 "The lxml XML toolkit is a Pythonic binding for the C libraries
5069libxml2 and libxslt.")
5070 (license license:bsd-3))) ; and a few more, see LICENSES.txt
5071
5072(define-public python2-lxml
5073 (package-with-python2 python-lxml))
5074
5075;; beautifulsoup4 has a totally different namespace than 3.x,
5076;; and pypi seems to put it under its own name, so I guess we should too
5077(define-public python-beautifulsoup4
5078 (package
5079 (name "python-beautifulsoup4")
5080 (version "4.6.3")
5081 (source
5082 (origin
5083 (method url-fetch)
5084 (uri (pypi-uri "beautifulsoup4" version))
5085 (sha256
5086 (base32
5087 "041dhalzjciw6qyzzq7a2k4h1yvyk76xigp35hv5ibnn448ydy4h"))))
5088 (build-system python-build-system)
5089 (arguments
5090 `(#:phases
5091 (modify-phases %standard-phases
5092 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5093 ;; must use this conversion script when building with Python 3. The
5094 ;; conversion script also runs the tests.
5095 ;; For more information, see the file 'convert-py3k' in the source
5096 ;; distribution.
5097 (replace 'check
dff0197e 5098 (lambda _ (invoke "./convert-py3k"))))))
44d10b1f
RW
5099 (home-page
5100 "https://www.crummy.com/software/BeautifulSoup/bs4/")
5101 (synopsis
5102 "Python screen-scraping library")
5103 (description
5104 "Beautiful Soup is a Python library designed for rapidly setting up
5105screen-scraping projects. It offers Pythonic idioms for navigating,
5106searching, and modifying a parse tree, providing a toolkit for
5107dissecting a document and extracting what you need. It automatically
5108converts incoming documents to Unicode and outgoing documents to UTF-8.")
5109 (license license:expat)
5110 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5111
5112(define-public python2-beautifulsoup4
5113 (package
5114 (inherit (package-with-python2
5115 (strip-python2-variant python-beautifulsoup4)))
5116 (arguments `(#:python ,python-2))))
5117
5118(define-public python-netifaces
5119 (package
5120 (name "python-netifaces")
5121 (version "0.10.7")
5122 (source
5123 (origin
5124 (method url-fetch)
5125 (uri (pypi-uri "netifaces" version))
5126 (sha256
5127 (base32
5128 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
5129 (build-system python-build-system)
5130 (home-page "https://github.com/al45tair/netifaces")
5131 (synopsis
5132 "Python module for portable network interface information")
5133 (description
5134 "Netifaces is a Python module providing information on network
5135interfaces in an easy and portable manner.")
5136 (license license:expat)))
5137
5138(define-public python2-netifaces
5139 (package-with-python2 python-netifaces))
5140
5141(define-public python-networkx
5142 (package
5143 (name "python-networkx")
5144 (version "2.2")
5145 (source
5146 (origin
5147 (method url-fetch)
5148 (uri (pypi-uri "networkx" version ".zip"))
5149 (sha256
5150 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
5151 (build-system python-build-system)
5152 ;; python-decorator is needed at runtime.
5153 (propagated-inputs
5154 `(("python-decorator" ,python-decorator)))
5155 (native-inputs
5156 `(("python-nose" ,python-nose)
5157 ("unzip" ,unzip)))
5158 (home-page "https://networkx.github.io/")
5159 (synopsis "Python module for creating and manipulating graphs and networks")
5160 (description
5161 "NetworkX is a Python package for the creation, manipulation, and study
5162of the structure, dynamics, and functions of complex networks.")
5163 (license license:bsd-3)))
5164
5165(define-public python2-networkx
5166 (package-with-python2 python-networkx))
5167
5168(define-public python-datrie
5169 (package
5170 (name "python-datrie")
5171 (version "0.7.1")
5172 (source
5173 (origin
5174 (method url-fetch)
5175 (uri (pypi-uri "datrie" version))
5176 (sha256
5177 (base32
5178 "08r0if7dry2q7p34gf7ffyrlnf4bdvnprxgydlfxgfnvq8f3f4bs"))))
5179 (build-system python-build-system)
5180 (arguments
5181 `(#:phases (modify-phases %standard-phases
5182 (add-before 'build 'cythonize
5183 (lambda _
5184 ;; Regenerate Cython classes to solve ABI issues with Python
5185 ;; 3.7.0. See <https://github.com/pytries/datrie/issues/52>.
5186 (invoke "cython" "src/datrie.pyx" "src/cdatrie.pxd"
5187 "src/stdio_ext.pxd" "-a"))))))
5188 (native-inputs
5189 `(("python-cython" ,python-cython)
5190 ("python-hypothesis" ,python-hypothesis)
5191 ("python-pytest" ,python-pytest)
5192 ("python-pytest-runner" ,python-pytest-runner)))
5193 (home-page "https://github.com/kmike/datrie")
5194 (synopsis "Fast, efficiently stored trie for Python")
5195 (description
5196 "This package provides a fast, efficiently stored trie implementation for
5197Python.")
5198 (license license:lgpl2.1+)))
5199
5200(define-public snakemake
5201 (package
5202 (name "snakemake")
5203 (version "5.2.4")
5204 (source
5205 (origin
5206 (method url-fetch)
5207 (uri (pypi-uri "snakemake" version))
5208 (sha256
5209 (base32 "0gj0xxgiq3mp9qyyrbfzldiaq1giliqw0in64nqiz7vx49myqj7z"))))
5210 (build-system python-build-system)
5211 (arguments
5212 ;; TODO: Package missing test dependencies.
5213 '(#:tests? #f
5214 #:phases
5215 (modify-phases %standard-phases
5216 ;; For cluster execution Snakemake will call Python. Since there is
5217 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
5218 ;; this by calling the snakemake wrapper instead.
5219 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
5220 (lambda* (#:key outputs #:allow-other-keys)
5221 (substitute* "snakemake/executors.py"
5222 (("\\{sys.executable\\} -m snakemake")
5223 (string-append (assoc-ref outputs "out")
5224 "/bin/snakemake")))
5225 #t)))))
5226 (propagated-inputs
5227 `(("python-gitpython" ,python-gitpython)
5228 ("python-wrapt" ,python-wrapt)
5229 ("python-requests" ,python-requests)
5230 ("python-appdirs" ,python-appdirs)
5231 ("python-configargparse" ,python-configargparse)
5232 ("python-datrie" ,python-datrie)
5233 ("python-docutils" ,python-docutils)
5234 ("python-jinja2" ,python-jinja2)
5235 ("python-jsonschema" ,python-jsonschema)
5236 ("python-networkx" ,python-networkx)
5237 ("python-pyyaml" ,python-pyyaml)
5238 ("python-ratelimiter" ,python-ratelimiter)))
5239 (home-page "https://snakemake.readthedocs.io")
5240 (synopsis "Python-based execution environment for make-like workflows")
5241 (description
5242 "Snakemake aims to reduce the complexity of creating workflows by
5243providing a clean and modern domain specific specification language (DSL) in
5244Python style, together with a fast and comfortable execution environment.")
5245 (license license:expat)))
5246
5247;; This is currently needed for the pigx-* packages.
5248(define-public snakemake-4
5249 (package (inherit snakemake)
5250 (version "4.4.0")
5251 (source
5252 (origin
5253 (method url-fetch)
5254 (uri (pypi-uri "snakemake" version))
5255 (sha256
5256 (base32 "0g0paia4z7w3srnqdmavq3hrb2x7qnpf81jx50njl0p7y4y0j8jv"))))
5257 (propagated-inputs
5258 `(("python-wrapt" ,python-wrapt)
5259 ("python-requests" ,python-requests)
5260 ("python-appdirs" ,python-appdirs)
5261 ("python-configargparse" ,python-configargparse)
5262 ("python-pyyaml" ,python-pyyaml)
5263 ("python-ratelimiter" ,python-ratelimiter)))))
5264
5265(define-public python-pyqrcode
5266 (package
5267 (name "python-pyqrcode")
5268 (version "1.2.1")
5269 (source
5270 (origin
5271 (method url-fetch)
5272 (uri (pypi-uri "PyQRCode" version))
5273 (sha256
5274 (base32
5275 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
5276 (build-system python-build-system)
5277 (home-page
5278 "https://github.com/mnooner256/pyqrcode")
5279 (synopsis "QR code generator")
5280 (description
5281 "Pyqrcode is a QR code generator written purely in Python with
5282SVG, EPS, PNG and terminal output.")
5283 (license license:bsd-3)))
5284
5285(define-public python-seaborn
5286 (package
5287 (name "python-seaborn")
5288 (version "0.9.0")
5289 (source
5290 (origin
5291 (method url-fetch)
5292 (uri (pypi-uri "seaborn" version))
5293 (sha256
5294 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))))
5295 (build-system python-build-system)
5296 (arguments
5297 `(#:phases
5298 (modify-phases %standard-phases
5299 (add-before 'check 'start-xserver
5300 (lambda* (#:key inputs #:allow-other-keys)
5301 (let ((xorg-server (assoc-ref inputs "xorg-server")))
5302 ;; There must be a running X server and make check doesn't
5303 ;; start one. Therefore we must do it.
5304 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
5305 (setenv "DISPLAY" ":1")
5306 #t)))
5307 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
5308 (propagated-inputs
5309 `(("python-pandas" ,python-pandas)
5310 ("python-matplotlib" ,python-matplotlib)
5311 ("python-numpy" ,python-numpy)
5312 ("python-scipy" ,python-scipy)))
5313 (native-inputs
5314 `(("python-pytest" ,python-pytest)
5315 ("xorg-server" ,xorg-server)))
5316 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5317 (synopsis "Statistical data visualization")
5318 (description
5319 "Seaborn is a library for making attractive and informative statistical
5320graphics in Python. It is built on top of matplotlib and tightly integrated
5321with the PyData stack, including support for numpy and pandas data structures
5322and statistical routines from scipy and statsmodels.")
5323 (license license:bsd-3)))
5324
5325(define-public python2-seaborn
5326 (package-with-python2 python-seaborn))
5327
5328(define-public python-mpmath
5329 (package
5330 (name "python-mpmath")
5331 (version "0.19")
5332 (source (origin
5333 (method url-fetch)
5334 (uri (string-append "http://mpmath.org/files/mpmath-"
5335 version ".tar.gz"))
5336 (sha256
5337 (base32
5338 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
5339 (build-system python-build-system)
5340 (arguments
5341 '(#:phases
5342 (modify-phases %standard-phases
5343 (replace 'check
5344 (lambda _
5d7a6f1c 5345 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
44d10b1f
RW
5346 (home-page "http://mpmath.org")
5347 (synopsis "Arbitrary-precision floating-point arithmetic in python")
5348 (description
5349 "@code{mpmath} can be used as an arbitrary-precision substitute for
5350Python's float/complex types and math/cmath modules, but also does much
5351more advanced mathematics.")
5352 (license license:bsd-3)))
5353
5354(define-public python2-mpmath
5355 (package-with-python2 python-mpmath))
5356
5357(define-public python-bigfloat
5358 (package
5359 (name "python-bigfloat")
5360 (version "0.3.0")
5361 (source
5362 (origin
5363 (method url-fetch)
5364 (uri (pypi-uri "bigfloat" version))
5365 (sha256
5366 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
5367 (build-system python-build-system)
5368 (inputs
5369 `(("mpfr" ,mpfr)))
5370 (home-page "https://github.com/mdickinson/bigfloat")
5371 (synopsis "Arbitrary precision floating-point arithmetic for Python")
5372 (description
5373 "This packages provides a Python interface to the MPFR library for
5374multiprecision arithmetic.")
5375 (license license:lgpl3+)))
5376
5377(define-public python2-bigfloat
5378 (package-with-python2 python-bigfloat))
5379
5380(define-public python-sympy
5381 (package
5382 (name "python-sympy")
5383 (version "1.1.1")
5384 (source
5385 (origin
5386 (method url-fetch)
5387 (uri (string-append
5388 "https://github.com/sympy/sympy/releases/download/sympy-"
5389 version "/sympy-" version ".tar.gz"))
5390 (sha256
5391 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
5392 (build-system python-build-system)
5393 (arguments
5394 `(#:phases
5395 (modify-phases %standard-phases
5396 ;; Run the core tests after installation. By default it would run
5397 ;; *all* tests, which take a very long time to complete and are known
5398 ;; to be flaky.
5399 (delete 'check)
5400 (add-after 'install 'check
5401 (lambda* (#:key outputs #:allow-other-keys)
5402 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
5403 #t)))))
5404 (propagated-inputs
5405 `(("python-mpmath" ,python-mpmath)))
5406 (home-page "http://www.sympy.org/")
5407 (synopsis "Python library for symbolic mathematics")
5408 (description
5409 "SymPy is a Python library for symbolic mathematics. It aims to become a
5410full-featured computer algebra system (CAS) while keeping the code as simple
5411as possible in order to be comprehensible and easily extensible.")
5412 (license license:bsd-3)))
5413
5414(define-public python2-sympy
5415 (package
5416 (inherit (package-with-python2 python-sympy))
5417 (arguments
5418 `(#:phases
5419 (modify-phases %standard-phases
5420 ;; Run the core tests after installation. By default it would run
5421 ;; *all* tests, which take a very long time to complete and are known
5422 ;; to be flaky.
5423 (delete 'check)
5424 (add-after 'install 'check
5425 (lambda* (#:key outputs #:allow-other-keys)
5426 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
5427 #t)))))))
5428
5429(define-public python-q
5430 (package
5431 (name "python-q")
5432 (version "2.6")
5433 (source
5434 (origin
5435 (method url-fetch)
5436 (uri (pypi-uri "q" version))
5437 (sha256
5438 (base32
5439 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
5440 (build-system python-build-system)
5441 (home-page "https://github.com/zestyping/q")
5442 (synopsis "Quick-and-dirty debugging output for tired programmers")
5443 (description
5444 "q is a Python module for \"print\" style of debugging Python code. It
5445provides convenient short API for print out of values, tracebacks, and
5446falling into the Python interpreter.")
5447 (license license:asl2.0)))
5448
5449(define-public python2-q
5450 (package-with-python2 python-q))
5451
5452(define-public python2-xlib
5453 (package
5454 (name "python2-xlib")
5455 (version "0.14")
5456 (source (origin
5457 (method url-fetch)
5458 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
5459 "/" version "/"
5460 "python-xlib-" version ".tar.gz"))
5461 (sha256
5462 (base32
5463 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
5464 (build-system python-build-system)
5465 (arguments
5466 `(#:python ,python-2 ;Python 2 only
5467 #:tests? #f)) ;no tests
5468 (home-page "http://python-xlib.sourceforge.net/")
5469 (synopsis "Python X11 client library")
5470 (description
5471 "The Python X Library is intended to be a fully functional X client
5472library for Python programs. It is useful to implement low-level X clients.
5473It is written entirely in Python.")
5474 (license license:gpl2+)))
5475
5476(define-public python-singledispatch
5477 (package
5478 (name "python-singledispatch")
5479 (version "3.4.0.3")
5480 (source
5481 (origin
5482 (method url-fetch)
5483 (uri (pypi-uri "singledispatch" version))
5484 (sha256
5485 (base32
5486 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
5487 (build-system python-build-system)
5488 (native-inputs
5489 `(("python-six" ,python-six))) ; required for conversion, not at run-time
5490 (home-page
5491 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
5492 (synopsis "Backport of singledispatch feature from Python 3.4")
5493 (description
5494 "This library brings functools.singledispatch from Python 3.4 to Python
54952.6-3.3.")
5496 (license license:expat)))
5497
5498(define-public python2-singledispatch
5499 (package-with-python2 python-singledispatch))
5500
5501;; the python- version can be removed with python-3.5
5502(define-public python-backports-abc
5503 (package
5504 (name "python-backports-abc")
5505 (version "0.5")
5506 (source
5507 (origin
5508 (method url-fetch)
5509 (uri (pypi-uri "backports_abc" version))
5510 (sha256
5511 (base32
5512 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
5513 (build-system python-build-system)
5514 (home-page "https://github.com/cython/backports_abc")
5515 (synopsis "Backport of additions to the 'collections.abc' module")
5516 (description
5517 "Python-backports-abc provides a backport of additions to the
5518'collections.abc' module in Python-3.5.")
5519 (license license:psfl)))
5520
5521(define-public python2-backports-abc
5522 (package-with-python2 python-backports-abc))
5523
5524(define-public python-backports-csv
5525 (package
5526 (name "python-backports-csv")
5527 (version "1.0.5")
5528 (source
5529 (origin
5530 (method url-fetch)
5531 (uri (pypi-uri "backports.csv" version))
5532 (sha256
5533 (base32
5534 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
5535 (build-system python-build-system)
5536 (home-page "https://github.com/ryanhiebert/backports.csv")
5537 (synopsis "Backport of Python 3's csv module for Python 2")
5538 (description
5539 "Provides a backport of Python 3's @code{csv} module for parsing
5540comma separated values. The API of the @code{csv} module in Python 2
5541is drastically different from the @code{csv} module in Python 3.
5542This is due, for the most part, to the difference between str in
5543Python 2 and Python 3.")
5544 (license license:psfl)))
5545
5546(define-public python2-backports-csv
5547 (package-with-python2 python-backports-csv))
5548
5549(define-public python2-backports-shutil-get-terminal-size
5550 (package
5551 (name "python2-backports-shutil-get-terminal-size")
5552 (version "1.0.0")
5553 (source
5554 (origin
5555 (method url-fetch)
5556 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
5557 (sha256
5558 (base32
5559 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
5560 (build-system python-build-system)
5561 (arguments
5562 `(#:python ,python-2
5563 #:phases
5564 (modify-phases %standard-phases
5565 (replace 'check
5566 (lambda _
4a4a7d9a 5567 (invoke "py.test" "-v"))))))
44d10b1f
RW
5568 (native-inputs
5569 `(("python2-pytest" ,python2-pytest)))
5570 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
5571 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
5572 (description
5573 "This package provides a backport of the @code{get_terminal_size
5574function} from Python 3.3's @code{shutil}.
5575Unlike the original version it is written in pure Python rather than C,
5576so it might be a tiny bit slower.")
5577 (license license:expat)))
5578
5579(define-public python-waf
5580 (package
5581 (name "python-waf")
5582 (version "2.0.11")
5583 (source (origin
5584 (method url-fetch)
5585 (uri (string-append "https://waf.io/"
5586 "waf-" version ".tar.bz2"))
5587 (sha256
5588 (base32
5589 "13zrniwkmfqgsgzi9v5m1367fppp9yzrz6z2ny6hy8dmpb8mj4z4"))))
5590 (build-system python-build-system)
5591 (arguments
5592 '(#:phases
5593 (modify-phases %standard-phases
5594 (replace 'build
5595 (lambda _
5596 (invoke "python" "waf-light" "configure" "build")))
5597 (replace 'check
5598 (lambda _
5599 (invoke "python" "waf" "--version")))
5600 (replace 'install
5601 (lambda* (#:key outputs #:allow-other-keys)
5602 (let ((out (assoc-ref outputs "out")))
5603 (install-file "waf" (string-append out "/bin")))
5604 #t))
5605 ;; waf breaks when it is wrapped.
5606 (delete 'wrap))))
5607 (home-page "https://waf.io/")
5608 (synopsis "Python-based build system")
5609 (description
5610 "Waf is a Python-based framework for configuring, compiling and installing
5611applications.")
5612 (license license:bsd-3)))
5613
5614(define-public python2-waf
5615 (package-with-python2 python-waf))
5616
5617(define-public python-pyzmq
5618 (package
5619 (name "python-pyzmq")
5620 (version "17.1.2")
5621 (source
5622 (origin
5623 (method url-fetch)
5624 (uri (pypi-uri "pyzmq" version))
5625 (sha256
5626 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
5627 (build-system python-build-system)
5628 (arguments
5629 `(#:configure-flags
5630 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
5631 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
5632 ;; --inplace' for 'python setup.py test' to work.
5633 #:tests? #f))
5634 (inputs
5635 `(("zeromq" ,zeromq)))
5636 (native-inputs
5637 `(("pkg-config" ,pkg-config)
5638 ("python-nose" ,python-nose)))
5639 (home-page "https://github.com/zeromq/pyzmq")
5640 (synopsis "Python bindings for 0MQ")
5641 (description
5642 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
5643 (license license:bsd-4)))
5644
5645(define-public python2-pyzmq
5646 (package-with-python2 python-pyzmq))
5647
5648(define-public python-pep8
5649 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
5650 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
5651 ;; some dependents' test suites, and nothing more.
5652 (package
5653 (name "python-pep8")
5654 (version "1.7.0")
5655 (source
5656 (origin
5657 (method url-fetch)
5658 (uri (pypi-uri "pep8" version))
5659 (sha256
5660 (base32
5661 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
5662 (build-system python-build-system)
5663 (home-page "https://pep8.readthedocs.org/")
5664 (synopsis "Python style guide checker")
5665 (description
5666 "This tools checks Python code against some of the style conventions in
5667PEP 8.")
5668 (license license:expat)))
5669
5670(define-public python2-pep8
5671 (package-with-python2 python-pep8))
5672
5673(define-public python-pyflakes
5674 (package
5675 (name "python-pyflakes")
5676 (version "2.0.0")
5677 (source
5678 (origin
5679 (method url-fetch)
5680 (uri (pypi-uri "pyflakes" version))
5681 (sha256
5682 (base32
5683 "0jba28czyvimdc72llms3f17swp3i8jdcabf5w0j00adfbn64xls"))))
5684 (build-system python-build-system)
5685 (home-page
5686 "https://github.com/pyflakes/pyflakes")
5687 (synopsis "Passive checker of Python programs")
5688 (description
5689 "Pyflakes statically checks Python source code for common errors.")
5690 (license license:expat)))
5691
5692(define-public python2-pyflakes
5693 (package-with-python2 python-pyflakes))
5694
5695(define-public python-mccabe
5696 (package
5697 (name "python-mccabe")
5698 (version "0.6.1")
5699 (source
5700 (origin
5701 (method url-fetch)
5702 (uri (pypi-uri "mccabe" version))
5703 (sha256
5704 (base32
5705 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
5706 (build-system python-build-system)
5707 (native-inputs
5708 `(("python-pytest" ,python-pytest-bootstrap)
5709 ("python-pytest-runner" ,python-pytest-runner)))
5710 (home-page "https://github.com/flintwork/mccabe")
5711 (synopsis "McCabe checker, plugin for flake8")
5712 (description
5713 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
5714complexity of Python source code.")
5715 (license license:expat)))
5716
5717(define-public python2-mccabe
5718 (package-with-python2 python-mccabe))
5719
5720(define-public python-mccabe-0.2.1
5721 (package (inherit python-mccabe)
5722 (version "0.2.1")
5723 (source
5724 (origin
5725 (method url-fetch)
5726 (uri (pypi-uri "mccabe" version))
5727 (sha256
5728 (base32
5729 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
5730
5731(define-public python2-mccabe-0.2.1
5732 (package-with-python2 python-mccabe-0.2.1))
5733
5734;; Flake8 2.4.1 requires an older version of pep8.
5735;; This should be removed ASAP.
5736(define-public python-pep8-1.5.7
5737 (package (inherit python-pep8)
5738 (version "1.5.7")
5739 (source
f3576970
RW
5740 (origin
5741 (method url-fetch)
5742 (uri (pypi-uri "pep8" version))
5743 (sha256
5744 (base32
5745 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
44d10b1f
RW
5746 (arguments
5747 ;; XXX Tests not compatible with Python 3.5.
5748 '(#:tests? #f))))
5749
5750(define-public python2-pep8-1.5.7
5751 (package-with-python2 python-pep8-1.5.7))
5752
5753;; Flake8 2.4.1 requires an older version of pyflakes.
5754;; This should be removed ASAP.
5755(define-public python-pyflakes-0.8.1
5756 (package (inherit python-pyflakes)
5757 (version "0.8.1")
5758 (source
8c4dffb5
RW
5759 (origin
5760 (method url-fetch)
5761 (uri (pypi-uri "pyflakes" version))
5762 (sha256
5763 (base32
5764 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
44d10b1f
RW
5765 (arguments
5766 ;; XXX Tests not compatible with Python 3.5.
5767 '(#:tests? #f))))
5768
5769(define-public python2-pyflakes-0.8.1
5770 (package-with-python2 python-pyflakes-0.8.1))
5771
5772;; This package is used by hypothesis which has thousands of dependent packages.
5773;; FIXME: Consolidate this with "python-flake8" below in the next rebuild cycle.
5774(define-public python-flake8-3.5
5775 (package
5776 (name "python-flake8")
5777 (version "3.5.0")
5778 (source
5779 (origin
5780 (method url-fetch)
5781 (uri (pypi-uri "flake8" version))
5782 (sha256
5783 (base32
5784 "184b33grvvjmiwlv9kyd7yng9qv5ld24154j70z332xxg9gjclvj"))))
5785 (build-system python-build-system)
5786 (arguments
5787 `(#:phases
5788 (modify-phases %standard-phases
5789 ;; Two errors don't seem to have assigned codes.
5790 (add-after 'unpack 'delete-broken-test
5791 (lambda _ (delete-file "tests/unit/test_pyflakes_codes.py") #t))
5792 (add-after 'unpack 'fix-problem-with-pycodestyle
5793 (lambda _
5794 ;; See https://gitlab.com/pycqa/flake8/merge_requests/230
5795 ;; This should no longer be needed with the next release.
5796 (substitute* "setup.py"
5797 (("PEP8_PLUGIN\\('break_around_binary_operator'\\),")
5798 "PEP8_PLUGIN('break_after_binary_operator'),\
5799PEP8_PLUGIN('break_before_binary_operator'),"))
5800 #t))
5801 (delete 'check)
5802 (add-after 'install 'check
5803 (lambda* (#:key inputs outputs #:allow-other-keys)
5804 (add-installed-pythonpath inputs outputs)
5805 (invoke "pytest" "-v")
5806 #t)))))
5807 (propagated-inputs
5808 `(("python-pycodestyle" ,python-pycodestyle)
5809 ("python-pyflakes" ,python-pyflakes)
5810 ("python-mccabe" ,python-mccabe)))
5811 (native-inputs
5812 `(("python-mock" ,python-mock)
5813 ("python-pytest" ,python-pytest-bootstrap)
5814 ("python-pytest-runner" ,python-pytest-runner)))
5815 (home-page "https://gitlab.com/pycqa/flake8")
5816 (synopsis
5817 "The modular source code checker: pep8, pyflakes and co")
5818 (description
5819 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
5820 (properties `((python2-variant . ,(delay python2-flake8-3.5))))
5821 (license license:expat)))
5822
5823(define-public python2-flake8-3.5
5824 (let ((base (package-with-python2 (strip-python2-variant python-flake8-3.5))))
5825 (package (inherit base)
5826 (propagated-inputs
5827 `(("python2-configparser" ,python2-configparser)
5828 ("python2-enum34" ,python2-enum34)
5829 ,@(package-propagated-inputs base))))))
5830
5831;; Version 3.5.0 has compatibility issues with Pyflakes 2.0, so we need
5832;; this newer version. Keep it as a separate variable for now to avoid
5833;; rebuilding "python-hypothesis"; this should be removed in the next
5834;; rebuild cycle.
5835(define-public python-flake8
5836 (package
5837 (inherit python-flake8-3.5)
5838 (version "3.6.0")
5839 (source (origin
5840 (method url-fetch)
5841 (uri (pypi-uri "flake8" version))
5842 (sha256
5843 (base32
5844 "0w0nprx22rbvrrkbfx9v5jc5gskbm08g219l7r8wai8zfswgadba"))))
5845 (arguments
5846 (substitute-keyword-arguments (package-arguments python-flake8-3.5)
5847 ((#:phases phases)
5848 `(modify-phases ,phases
5849 (delete 'delete-broken-test)
5850 (delete 'fix-problem-with-pycodestyle)))))
5851 (properties `((python2-variant . ,(delay python2-flake8))))))
5852
5853(define-public python2-flake8
5854 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
5855 (package (inherit base)
5856 (propagated-inputs
5857 (package-propagated-inputs python2-flake8-3.5)))))
5858
5859;; python-hacking requires flake8 <2.6.0.
5860(define-public python-flake8-2.5
5861 (package
5862 (inherit python-flake8)
5863 (version "2.5.5")
5864 (source (origin
5865 (method url-fetch)
5866 (uri (pypi-uri "flake8" version))
5867 (sha256
5868 (base32
5869 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
5870 (propagated-inputs
5871 `(("python-pep8" ,python-pep8)
5872 ,@(package-propagated-inputs python-flake8)))
5873 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
5874
5875(define-public python2-flake8-2.5
5876 (package
5877 (inherit python2-flake8)
5878 (version (package-version python-flake8-2.5))
5879 (source (origin
5880 (inherit (package-source python-flake8-2.5))))
5881 (propagated-inputs
5882 `(("python2-pep8" ,python2-pep8)
5883 ,@(package-propagated-inputs python2-flake8)))))
5884
5885(define-public python-flake8-polyfill
5886 (package
5887 (name "python-flake8-polyfill")
5888 (version "1.0.2")
5889 (source
5890 (origin
5891 (method url-fetch)
5892 (uri (pypi-uri "flake8-polyfill" version))
5893 (sha256
5894 (base32
5895 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
5896 (build-system python-build-system)
5897 (arguments
5898 '(#:phases
5899 (modify-phases %standard-phases
5900 (replace 'check
5901 (lambda _
5902 (setenv "PYTHONPATH"
5903 (string-append (getcwd) "/build/lib:"
5904 (getenv "PYTHONPATH")))
4f0a0894 5905 (invoke "py.test" "-v"))))))
44d10b1f
RW
5906 (native-inputs
5907 `(("python-flake8" ,python-flake8)
5908 ("python-mock" ,python-mock)
5909 ("python-pep8" ,python-pep8)
5910 ("python-pycodestyle" ,python-pycodestyle)
5911 ("python-pytest" ,python-pytest)))
5912 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
5913 (synopsis "Polyfill package for Flake8 plugins")
5914 (description
5915 "This package that provides some compatibility helpers for Flake8
5916plugins that intend to support Flake8 2.x and 3.x simultaneously.")
5917 (license license:expat)))
5918
5919(define-public python2-flake8-polyfill
5920 (package-with-python2 python-flake8-polyfill))
5921
5922(define-public python-mistune
5923 (package
5924 (name "python-mistune")
5925 (version "0.8.4")
5926 (source
5927 (origin
5928 (method url-fetch)
5929 (uri (pypi-uri "mistune" version))
5930 (sha256
5931 (base32
5932 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
5933 (build-system python-build-system)
5934 (native-inputs
5935 `(("python-nose" ,python-nose)
5936 ("python-cython" ,python-cython)))
5937 (home-page "https://github.com/lepture/mistune")
5938 (synopsis "Markdown parser in pure Python")
5939 (description "This package provides a fast markdown parser in pure
5940Python.")
5941 (license license:bsd-3)))
5942
5943(define-public python2-mistune
5944 (package-with-python2 python-mistune))
5945
5946(define-public python-markdown
5947 (package
5948 (name "python-markdown")
5949 (version "3.0.1")
5950 (source
5951 (origin
5952 (method url-fetch)
5953 (uri (pypi-uri "Markdown" version))
5954 (sha256
5955 (base32
5956 "0z6v8649sr434d5r5zmrhydka7v7f9yas4bwcgkcs0650jdhybnh"))))
5957 (build-system python-build-system)
5958 (native-inputs
5959 `(("python-nose" ,python-nose)
5960 ("python-pyyaml" ,python-pyyaml)))
5961 (home-page "https://python-markdown.github.io/")
5962 (synopsis "Python implementation of Markdown")
5963 (description
5964 "This package provides a Python implementation of John Gruber's
5965Markdown. The library features international input, various Markdown
5966extensions, and several HTML output formats. A command line wrapper
5967markdown_py is also provided to convert Markdown files to HTML.")
5968 (license license:bsd-3)))
5969
5970(define-public python2-markdown
5971 (package-with-python2 python-markdown))
5972
5973(define-public python-ptyprocess
5974 (package
5975 (name "python-ptyprocess")
5976 (version "0.5.2")
5977 (source
5978 (origin
5979 (method url-fetch)
5980 (uri (pypi-uri "ptyprocess" version))
5981 (sha256
5982 (base32
5983 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
5984 (build-system python-build-system)
5985 (native-inputs
5986 `(("python-nose" ,python-nose)))
5987 (arguments
5988 `(#:phases
5989 (modify-phases %standard-phases
5990 (replace 'check
7904d6fa 5991 (lambda _ (invoke "nosetests"))))))
44d10b1f
RW
5992 (home-page "https://github.com/pexpect/ptyprocess")
5993 (synopsis "Run a subprocess in a pseudo terminal")
5994 (description
5995 "This package provides a Python library used to launch a subprocess in a
5996pseudo terminal (pty), and interact with both the process and its pty.")
5997 (license license:isc)))
5998
5999(define-public python2-ptyprocess
6000 (package-with-python2 python-ptyprocess))
6001
6002(define-public python-cram
6003 (package
6004 (name "python-cram")
6005 (version "0.7")
6006 (home-page "https://bitheap.org/cram/")
6007 (source (origin
6008 (method url-fetch)
6009 (uri (list (string-append home-page "cram-"
6010 version ".tar.gz")
6011 (pypi-uri "cram" version)))
6012 (sha256
6013 (base32
6014 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6015 (arguments
6016 '(#:phases
6017 (modify-phases %standard-phases
6018 (add-after 'unpack 'patch-source
6019 (lambda _
6020 (substitute* (find-files "cram" ".*\\.py$")
6021 ;; Replace default shell path.
6022 (("/bin/sh") (which "sh")))
6023 (substitute* (find-files "tests" ".*\\.t$")
6024 (("md5") "md5sum")
6025 (("/bin/bash") (which "bash"))
6026 (("/bin/sh") (which "sh")))
6027 (substitute* "cram/_test.py"
6028 ;; This hack works around a bug triggered by substituting
6029 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6030 ;; "cram -h", which breaks the output at 80 characters. This
6031 ;; causes the line showing the default shell to break into two
6032 ;; lines, but the test expects a single line...
6033 (("env\\['COLUMNS'\\] = '80'")
6034 "env['COLUMNS'] = '160'"))
6035 #t))
6036 (delete 'check)
6037 (add-after 'install 'check
6038 ;; The test phase uses the built library and executable.
6039 ;; It's easier to run it after install since the build
6040 ;; directory contains version-specific PATH.
6041 (lambda* (#:key inputs outputs #:allow-other-keys)
6042 (add-installed-pythonpath inputs outputs)
6043 (setenv "PATH" (string-append (getenv "PATH") ":"
6044 (assoc-ref outputs "out") "/bin"))
2d7db192 6045 (invoke "make" "test"))))))
44d10b1f
RW
6046 (build-system python-build-system)
6047 (native-inputs
6048 `(("python-coverage" ,python-coverage)
6049 ("which" ,which)))
6050 (synopsis "Simple testing framework for command line applications")
6051 (description
6052 "Cram is a functional testing framework for command line applications.
6053Cram tests look like snippets of interactive shell sessions. Cram runs each
6054command and compares the command output in the test with the command’s actual
6055output.")
6056 (license license:gpl2+)))
6057
6058(define-public python2-cram
6059 (package-with-python2 python-cram))
6060
6061(define-public python-straight-plugin
6062 (package
6063 (name "python-straight-plugin")
6064 (version "1.4.1")
6065 (source
6066 (origin
6067 (method url-fetch)
6068 (uri (pypi-uri "straight.plugin" version))
6069 (sha256
6070 (base32
6071 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6072 (build-system python-build-system)
6073 (home-page "https://github.com/ironfroggy/straight.plugin")
6074 (synopsis "Simple namespaced plugin facility")
6075 (description "Straight Plugin provides a type of plugin you can create from
6076almost any existing Python modules, and an easy way for outside developers to
6077add functionality and customization to your projects with their own plugins.")
6078 (license license:expat)))
6079
6080(define-public python2-straight-plugin
6081 (package-with-python2 python-straight-plugin))
6082
6083(define-public python-fonttools
6084 (package
6085 (name "python-fonttools")
6086 (version "3.28.0")
6087 (source (origin
6088 (method url-fetch)
6089 (uri (pypi-uri "fonttools" version ".zip"))
6090 (sha256
6091 (base32
6092 "0vsvjhidpb5kywpjgz1j3fywzkddxkb0afqai18qa3h6lqjyxwpb"))))
6093 (build-system python-build-system)
6094 (native-inputs
6095 `(("unzip" ,unzip)
6096 ("python-pytest" ,python-pytest)
6097 ("python-pytest-runner" ,python-pytest-runner)))
6098 (home-page "https://github.com/behdad/fonttools")
6099 (synopsis "Tools to manipulate font files")
6100 (description
6101 "FontTools/TTX is a library to manipulate font files from Python. It
6102supports reading and writing of TrueType/OpenType fonts, reading and writing
6103of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6104also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6105from an XML-based format.")
6106 (license license:expat)))
6107
6108(define-public python2-fonttools
6109 (package-with-python2 python-fonttools))
6110
6111(define-public python-ly
6112 (package
6113 (name "python-ly")
6114 (version "0.9.5")
6115 (source
6116 (origin
6117 (method url-fetch)
6118 (uri (pypi-uri name version))
6119 (sha256
6120 (base32
6121 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
6122 (build-system python-build-system)
6123 (arguments
6124 ;; FIXME: Some tests need network access.
6125 '(#:tests? #f))
6126 (synopsis "Tool and library for manipulating LilyPond files")
6127 (description "This package provides a Python library to parse, manipulate
6128or create documents in LilyPond format. A command line program ly is also
6129provided that can be used to do various manipulations with LilyPond files.")
6130 (home-page "https://pypi.python.org/pypi/python-ly")
6131 (license license:gpl2+)))
6132
6133(define-public python-appdirs
6134 (package
6135 (name "python-appdirs")
6136 (version "1.4.3")
6137 (source
6138 (origin
6139 (method url-fetch)
6140 (uri (pypi-uri "appdirs" version))
6141 (sha256
6142 (base32
6143 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
6144 (build-system python-build-system)
6145 (home-page "https://github.com/ActiveState/appdirs")
6146 (synopsis
6147 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6148 (description
6149 "This module provides a portable way of finding out where user data
6150should be stored on various operating systems.")
6151 (license license:expat)))
6152
6153(define-public python2-appdirs
6154 (package-with-python2 python-appdirs))
6155
6156(define-public python-llfuse
6157 (package
6158 (name "python-llfuse")
6159 (version "1.3.5")
6160 (source (origin
6161 (method url-fetch)
6162 (uri (pypi-uri "llfuse" version ".tar.bz2"))
6163 (sha256
6164 (base32
6165 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
6166 (build-system python-build-system)
6167 (inputs
6168 `(("fuse" ,fuse)
6169 ("attr" ,attr)))
6170 (native-inputs
6171 `(("pkg-config" ,pkg-config)))
6172 (synopsis "Python bindings for FUSE")
6173 (description
6174 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6175 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
6176 (license license:lgpl2.0+)
6177 (properties `((python2-variant . ,(delay python2-llfuse))))))
6178
6179(define-public python2-llfuse
6180 (package (inherit (package-with-python2
6181 (strip-python2-variant python-llfuse)))
6182 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6183
6184;; For attic-0.16
6185(define-public python-llfuse-0.41
6186 (package (inherit python-llfuse)
6187 (version "0.41.1")
6188 (source (origin
6189 (method url-fetch)
6190 (uri (string-append
6191 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6192 "llfuse-" version ".tar.bz2"))
6193 (sha256
6194 (base32
6195 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
6196 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6197 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
6198 (license (list license:expat license:lgpl2.0+))))
6199
6200(define-public python-msgpack
6201 (package
6202 (name "python-msgpack")
6203 (version "0.5.6")
6204 (source (origin
6205 (method url-fetch)
6206 (uri (pypi-uri "msgpack" version))
6207 (sha256
6208 (base32
6209 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
6210 (build-system python-build-system)
6211 (arguments
6212 `(#:modules ((guix build utils)
6213 (guix build python-build-system)
6214 (ice-9 ftw)
6215 (srfi srfi-1)
6216 (srfi srfi-26))
6217 #:phases
6218 (modify-phases %standard-phases
6219 (replace 'check
6220 (lambda _
6221 (let ((cwd (getcwd)))
6222 (setenv "PYTHONPATH"
6223 (string-append cwd "/build/"
6224 (find (cut string-prefix? "lib" <>)
6225 (scandir (string-append cwd "/build")))
6226 ":"
6227 (getenv "PYTHONPATH")))
6228 (invoke "pytest" "-v" "test")))))))
6229 (native-inputs
6230 `(("python-pytest" ,python-pytest)))
6231 (synopsis "MessagePack (de)serializer")
6232 (description "MessagePack is a fast, compact binary serialization format,
6233suitable for similar data to JSON. This package provides CPython bindings for
6234reading and writing MessagePack data.")
6235 (home-page "https://pypi.python.org/pypi/msgpack/")
6236 (license license:asl2.0)))
6237
6238;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
6239;; release 0.5. Some packages like borg still call it by the old name for now.
6240;; <https://bugs.gnu.org/30662>
6241(define-public python-msgpack-transitional
6242 (package
6243 (inherit python-msgpack)
6244 (name "python-msgpack-transitional")
6245 (arguments
6246 (substitute-keyword-arguments (package-arguments python-msgpack)
6247 ((#:phases phases)
6248 `(modify-phases ,phases
6249 (add-after 'unpack 'configure-transitional
6250 (lambda _
6251 ;; Keep using the old name.
6252 (substitute* "setup.py"
6253 (("TRANSITIONAL = False")
6254 "TRANSITIONAL = 1"))
6255 #t))))))))
6256
6257(define-public python2-msgpack
6258 (package-with-python2 python-msgpack))
6259
6260(define-public python-netaddr
6261 (package
6262 (name "python-netaddr")
6263 (version "0.7.19")
6264 (source
6265 (origin
6266 (method url-fetch)
6267 (uri (pypi-uri "netaddr" version))
6268 (sha256
6269 (base32
6270 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
6271 (build-system python-build-system)
6272 (arguments `(#:tests? #f)) ;; No tests.
6273 (home-page "https://github.com/drkjam/netaddr/")
6274 (synopsis "Pythonic manipulation of network addresses")
6275 (description
6276 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6277and MAC network addresses.")
6278 (license license:bsd-3)))
6279
6280(define-public python2-netaddr
6281 (package-with-python2 python-netaddr))
6282
6283(define-public python-wrapt
6284 (package
6285 (name "python-wrapt")
dddd7a75 6286 (version "1.11.1")
44d10b1f
RW
6287 (source
6288 (origin
6289 (method url-fetch)
6290 (uri (pypi-uri "wrapt" version))
6291 (sha256
6292 (base32
dddd7a75 6293 "0cqmysny1pz01jw26q48q5zasvns6507rwhgm6wcw743f0r01sja"))))
44d10b1f
RW
6294 (build-system python-build-system)
6295 (arguments
6296 ;; Tests are not included in the tarball, they are only available in the
6297 ;; git repository.
6298 `(#:tests? #f))
6299 (home-page "https://github.com/GrahamDumpleton/wrapt")
6300 (synopsis "Module for decorators, wrappers and monkey patching")
6301 (description
6302 "The aim of the wrapt module is to provide a transparent object proxy for
6303 Python, which can be used as the basis for the construction of function
6304 wrappers and decorator functions.")
6305 (license license:bsd-2)))
6306
6307(define-public python2-wrapt
6308 (package-with-python2 python-wrapt))
6309
6310(define-public python-xlrd
6311 (package
6312 (name "python-xlrd")
6313 (version "1.0.0")
6314 (source (origin
6315 (method url-fetch)
6316 (uri (pypi-uri "xlrd" version))
6317 (sha256
6318 (base32
6319 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
6320 (build-system python-build-system)
6321 (arguments
6322 `(#:phases
6323 (modify-phases %standard-phases
6324 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
6325 ;; run tests instead for now.
45fd0081 6326 (replace 'check (lambda _ (invoke "nosetests"))))))
44d10b1f
RW
6327 (native-inputs `(("python-nose" ,python-nose)))
6328 (home-page "http://www.python-excel.org/")
6329 (synopsis "Library for extracting data from Excel files")
6330 (description "This packages provides a library to extract data from
6331spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
6332@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
6333Unicode-aware. It is not intended as an end-user tool.")
6334 (license license:bsd-3)))
6335
6336(define-public python2-xlrd
6337 (package-with-python2 python-xlrd))
6338
6339(define-public python-prettytable
6340 (package
6341 (name "python-prettytable")
6342 (version "0.7.2")
6343 (source
6344 (origin
6345 (method url-fetch)
337c3a1e 6346 (uri (pypi-uri "prettytable" version ".tar.bz2"))
44d10b1f
RW
6347 (sha256
6348 (base32
6349 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
6350 (build-system python-build-system)
6351 (home-page "http://code.google.com/p/prettytable/")
6352 (synopsis "Display tabular data in an ASCII table format")
6353 (description
6354 "A library designed to represent tabular data in visually appealing ASCII
6355tables. PrettyTable allows for selection of which columns are to be printed,
6356independent alignment of columns (left or right justified or centred) and
6357printing of sub-tables by specifying a row range.")
6358 (license license:bsd-3)))
6359
6360(define-public python2-prettytable
6361 (package-with-python2 python-prettytable))
6362
6363(define-public python-tables
6364 (package
6365 (name "python-tables")
6366 (version "3.4.4")
6367 (source
6368 (origin
6369 (method url-fetch)
6370 (uri (pypi-uri "tables" version))
6371 (sha256
6372 (base32
6373 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
6374 (modules '((guix build utils)))
6375 (snippet
6376 '(begin
6377 ;; Remove pre-compiled .pyc files from source.
6378 (for-each delete-file-recursively
6379 (find-files "." "__pycache__" #:directories? #t))
6380 (for-each delete-file (find-files "." "\\.pyc$"))
6381 #t))))
6382 (build-system python-build-system)
6383 (arguments
6384 `(;; FIXME: python-build-system does not pass configure-flags to "build"
6385 ;; or "check", so we must override the build and check phases.
6386 #:phases
6387 (modify-phases %standard-phases
6388 (add-after 'unpack 'use-gcc
6389 (lambda _
6390 (substitute* "setup.py"
6391 (("compiler = new_compiler\\(\\)" line)
6392 (string-append line
6393 "\ncompiler.set_executables(compiler='gcc',"
6394 "compiler_so='gcc',"
6395 "linker_exe='gcc',"
6396 "linker_so='gcc -shared')")))
6397 #t))
6398 (replace 'build
6399 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
6400 (invoke "python" "setup.py" "build"
6401 (string-append "--hdf5="
6402 (assoc-ref inputs "hdf5")))))
44d10b1f
RW
6403 (replace 'check
6404 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
6405 (invoke "python" "setup.py" "check"
6406 (string-append "--hdf5="
6407 (assoc-ref inputs "hdf5"))))))))
44d10b1f
RW
6408 (propagated-inputs
6409 `(("python-numexpr" ,python-numexpr)
6410 ("python-numpy" ,python-numpy)))
6411 (native-inputs
6412 `(("python-cython" ,python-cython)
6413 ("pkg-config" ,pkg-config)))
6414 (inputs
6415 `(("hdf5" ,hdf5)
6416 ("bzip2" ,bzip2)
6417 ("zlib" ,zlib)))
6418 (home-page "http://www.pytables.org/")
6419 (synopsis "Hierarchical datasets for Python")
6420 (description "PyTables is a package for managing hierarchical datasets and
6421designed to efficiently cope with extremely large amounts of data.")
6422 (license license:bsd-3)))
6423
6424(define-public python2-tables
6425 (package-with-python2 python-tables))
6426
6427(define-public python-pyasn1
6428 (package
6429 (name "python-pyasn1")
6430 (version "0.4.3")
6431 (source
6432 (origin
6433 (method url-fetch)
6434 (uri (pypi-uri "pyasn1" version))
6435 (sha256
6436 (base32
6437 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
6438 (build-system python-build-system)
6439 (home-page "http://pyasn1.sourceforge.net/")
6440 (synopsis "ASN.1 types and codecs")
6441 (description
6442 "This is an implementation of ASN.1 types and codecs in Python. It is
6443suitable for a wide range of protocols based on the ASN.1 specification.")
6444 (license license:bsd-2)))
6445
6446(define-public python2-pyasn1
6447 (package-with-python2 python-pyasn1))
6448
6449(define-public python-pyasn1-modules
6450 (package
6451 (name "python-pyasn1-modules")
6452 (version "0.2.2")
6453 (source
6454 (origin
6455 (method url-fetch)
6456 (uri (pypi-uri "pyasn1-modules" version))
6457 (sha256
6458 (base32
6459 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
6460 (build-system python-build-system)
6461 (propagated-inputs
6462 `(("python-pyasn1" ,python-pyasn1)))
6463 (home-page "https://sourceforge.net/projects/pyasn1/")
6464 (synopsis "ASN.1 codec implementations")
6465 (description
6466 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
6467implementations of ASN.1-based codecs and protocols.")
6468 (license license:bsd-3)))
6469
6470(define-public python2-pyasn1-modules
6471 (package-with-python2 python-pyasn1-modules))
6472
6473(define-public python-ipaddress
6474 (package
6475 (name "python-ipaddress")
6476 (version "1.0.22")
6477 (source (origin
6478 (method url-fetch)
6479 (uri (pypi-uri "ipaddress" version))
6480 (sha256
6481 (base32
6482 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
6483 (build-system python-build-system)
6484 (home-page "https://github.com/phihag/ipaddress")
6485 (synopsis "IP address manipulation library")
6486 (description
6487 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
6488 in Python. This library is used to create, poke at, and manipulate IPv4 and
6489 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
6490 module to older versions of Python.")
6491 (license license:psfl)))
6492
6493(define-public python2-ipaddress
6494 (package-with-python2 python-ipaddress))
6495
6496(define-public python2-ipaddr
6497 (package
6498 (name "python2-ipaddr")
6499 (version "2.1.11")
6500 (source
6501 (origin
6502 (method url-fetch)
6503 (uri (pypi-uri "ipaddr" version))
6504 (sha256
6505 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
6506 (build-system python-build-system)
6507 (arguments
6508 `(#:python ,python-2 ;version 2 only
6509 #:phases
6510 (modify-phases %standard-phases
6511 (replace 'check
40b8c4e3 6512 (lambda _ (invoke "python" "ipaddr_test.py"))))))
44d10b1f
RW
6513 (home-page "https://github.com/google/ipaddr-py")
6514 (synopsis "IP address manipulation library")
6515 (description
6516 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
6517IPv6 addresses and networks.
6518
6519For new implementations you may prefer to use the standard module
6520@code{ipaddress}, which was introduced in Python 3.3 and backported to older
6521versions of Python.")
6522 (license license:asl2.0)))
6523
6524(define-public python-idna
6525 (package
6526 (name "python-idna")
6527 (version "2.7")
6528 (source
6529 (origin
6530 (method url-fetch)
6531 (uri (pypi-uri "idna" version))
6532 (sha256
6533 (base32
6534 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))
6535 (build-system python-build-system)
6536 (home-page "https://github.com/kjd/idna")
6537 (synopsis "Internationalized domain names in applications")
6538 (description
6539 "This is a library to support the Internationalised Domain Names in
6540Applications (IDNA) protocol as specified in RFC 5891. This version of the
6541protocol is often referred to as “IDNA2008” and can produce different results
6542from the earlier standard from 2003. The library is also intended to act as a
6543suitable drop-in replacement for the “encodings.idna” module that comes with
6544the Python standard library but currently only supports the older 2003
6545specification.")
6546 (license license:bsd-4)))
6547
6548(define-public python2-idna
6549 (package-with-python2 python-idna))
6550
6551(define-public python-idna-ssl
6552 (package
6553 (name "python-idna-ssl")
6554 (version "1.0.1")
6555 (source
6556 (origin
6557 (method url-fetch)
6558 (uri (pypi-uri "idna-ssl" version))
6559 (sha256
6560 (base32
6561 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
6562 (build-system python-build-system)
6563 (arguments
6564 `(#:tests? #f)) ;circular dependency with python-aiohttp
6565 (home-page "https://github.com/aio-libs/idna-ssl")
6566 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
6567 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
6568domains support.")
6569 (license license:expat)))
6570
6571(define-public python-pretend
6572 (package
6573 (name "python-pretend")
6574 (version "1.0.9")
6575 (source
6576 (origin
6577 (method url-fetch)
9f1f22ee 6578 (uri (pypi-uri "pretend" version))
44d10b1f
RW
6579 (sha256
6580 (base32
6581 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
6582 (build-system python-build-system)
6583 (home-page "https://github.com/alex/pretend")
6584 (synopsis "Library for stubbing in Python")
6585 (description
6586 "Pretend is a library to make stubbing with Python easier. Stubbing is a
6587technique for writing tests. You may hear the term mixed up with mocks,
6588fakes, or doubles. Basically, a stub is an object that returns pre-canned
6589responses, rather than doing any computation.")
6590 (license license:bsd-3)))
6591
6592(define-public python2-pretend
6593 (package-with-python2 python-pretend))
6594
6595(define-public python-pip
6596 (package
6597 (name "python-pip")
6598 (version "18.1")
6599 (source
6600 (origin
6601 (method url-fetch)
6602 (uri (pypi-uri "pip" version))
6603 (sha256
6604 (base32
6605 "188fclay154s520n43s7cxxlhdaiysvxf19zk8vr1xbyjyyr58n0"))))
6606 (build-system python-build-system)
6607 (arguments
6608 '(#:tests? #f)) ; there are no tests in the pypi archive.
6609 (home-page "https://pip.pypa.io/")
6610 (synopsis "Package manager for Python software")
6611 (description
6612 "Pip is a package manager for Python software, that finds packages on the
6613Python Package Index (PyPI).")
6614 (license license:expat)))
6615
6616(define-public python2-pip
6617 (package-with-python2 python-pip))
6618
6619(define-public python-tlsh
6620 (package
6621 (name "python-tlsh")
6622 (version "3.4.5")
6623 (home-page "https://github.com/trendmicro/tlsh")
6624 (source (origin
6625 (method url-fetch)
6626 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
6627 version ".tar.gz"))
6628 (sha256
6629 (base32
6630 "1x1vahd4zg5kpyr9h9hs3fvh460p25rjy4cclwdnbbw8x3vc30q3"))
6631 (file-name (string-append name "-" version ".tar.gz"))))
6632 (build-system cmake-build-system)
6633 (arguments
6634 '(#:out-of-source? #f
6635 #:phases (modify-phases %standard-phases
6636 (replace
6637 'install
6638 (lambda* (#:key outputs #:allow-other-keys)
6639 ;; Build and install the Python bindings. The underlying
6640 ;; C++ library is apparently not meant to be installed.
6641 (let ((out (assoc-ref outputs "out")))
6642 (with-directory-excursion "py_ext"
6643 (and (system* "python" "setup.py" "build")
6644 (system* "python" "setup.py" "install"
6645 (string-append "--prefix=" out))))))))))
6646 (inputs `(("python" ,python-wrapper))) ;for the bindings
6647 (synopsis "Fuzzy matching library for Python")
6648 (description
6649 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
6650Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
6651value which can be used for similarity comparisons. Similar objects have
6652similar hash values, which allows for the detection of similar objects by
6653comparing their hash values. The byte stream should have a sufficient amount
6654of complexity; for example, a byte stream of identical bytes will not generate
6655a hash value.")
6656 (license license:asl2.0)))
6657
6658(define-public python2-tlsh
6659 (package
6660 (inherit python-tlsh)
6661 (name "python2-tlsh")
6662 (inputs `(("python" ,python-2)))))
6663
6664(define-public python-termcolor
6665 (package
6666 (name "python-termcolor")
6667 (version "1.1.0")
6668 (source
6669 (origin
6670 (method url-fetch)
6671 (uri (pypi-uri "termcolor" version))
6672 (sha256
6673 (base32
6674 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
6675 (build-system python-build-system)
6676 (arguments
6677 ;; There are no tests.
6678 `(#:tests? #f))
6679 (home-page "https://pypi.python.org/pypi/termcolor")
6680 (synopsis "ANSII Color formatting for terminal output")
6681 (description
6682 "This package provides ANSII Color formatting for output in terminals.")
6683 (license license:expat)))
6684
6685(define-public python2-termcolor
6686 (package-with-python2 python-termcolor))
6687
6688(define-public python-libarchive-c
6689 (package
6690 (name "python-libarchive-c")
6691 (version "2.8")
6692 (source (origin
6693 (method url-fetch)
6694 (uri (pypi-uri "libarchive-c" version))
6695 (sha256
6696 (base32
6697 "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06"))))
6698 (build-system python-build-system)
6699 (arguments
6700 '(#:phases (modify-phases %standard-phases
6701 (add-before
6702 'build 'reference-libarchive
6703 (lambda* (#:key inputs #:allow-other-keys)
6704 ;; Retain the absolute file name of libarchive.so.
6705 (let ((libarchive (assoc-ref inputs "libarchive")))
6706 (substitute* "libarchive/ffi.py"
6707 (("find_library\\('archive'\\)")
6708 (string-append "'" libarchive
6709 "/lib/libarchive.so'"))))))
6710 (replace 'check
6711 (lambda _ (invoke "pytest" "-vv"))))))
6712 (native-inputs
6713 `(("python-mock" ,python-mock)
6714 ("python-pytest" ,python-pytest)))
6715 (inputs
6716 `(("libarchive" ,libarchive)))
6717 (home-page "https://github.com/Changaco/python-libarchive-c")
6718 (synopsis "Python interface to libarchive")
6719 (description
6720 "This package provides Python bindings to libarchive, a C library to
6721access possibly compressed archives in many different formats. It uses
6722Python's @code{ctypes} foreign function interface (FFI).")
6723 (license license:lgpl2.0+)))
6724
6725(define-public python2-libarchive-c
6726 (package-with-python2 python-libarchive-c))
6727
6728(define-public python-file
6729 (package
6730 (inherit file)
6731 (name "python-file")
6732 (build-system python-build-system)
6733 (arguments
6734 '(#:tests? #f ;no tests
6735 #:configure-flags '("--single-version-externally-managed" "--root=/")
6736 #:phases (modify-phases %standard-phases
6737 (add-before 'build 'change-directory
6738 (lambda _
6739 (chdir "python")
6740 #t))
6741 (add-before 'build 'set-library-file-name
6742 (lambda* (#:key inputs #:allow-other-keys)
6743 (let ((file (assoc-ref inputs "file")))
6744 (substitute* "magic.py"
6745 (("find_library\\('magic'\\)")
6746 (string-append "'" file "/lib/libmagic.so'")))
6747 #t))))))
6748 (inputs `(("file" ,file)))
6749 (self-native-input? #f)
6750 (synopsis "Python bindings to the libmagic file type guesser. Note that
6751this module and the python-magic module both provide a \"magic.py\" file;
6752these two modules, which are different and were developed separately, both
6753serve the same purpose: provide Python bindings for libmagic.")))
6754
6755(define-public python2-file
6756 (package-with-python2 python-file))
6757
6758(define-public python-debian
6759 (package
6760 (name "python-debian")
6761 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
6762 (version "0.1.28")
6763 (source
6764 (origin
6765 (method url-fetch)
6766 (uri (pypi-uri name version))
6767 (sha256
6768 (base32
6769 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
6770 (build-system python-build-system)
6771 (propagated-inputs
6772 `(("python-six" ,python-six)))
6773 (synopsis "Debian package related modules")
6774 (description
6775 ;; XXX: Use @enumerate instead of @itemize to work around
6776 ;; <http://bugs.gnu.org/21772>.
6777 "This package provides Python modules that abstract many formats of
6778Debian-related files, such as:
6779
6780@enumerate
6781@item Debtags information;
6782@item @file{debian/changelog} files;
6783@item packages files, pdiffs;
6784@item control files of single or multiple RFC822-style paragraphs---e.g.
6785 @file{debian/control}, @file{.changes}, @file{.dsc};
6786@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
6787 contained files and meta-information.
6788@end enumerate\n")
6789
6790 ;; Modules are either GPLv2+ or GPLv3+.
6791 (license license:gpl3+)))
6792
6793(define-public python2-debian
6794 (package-with-python2 python-debian))
6795
6796(define-public python-nbformat
6797 (package
6798 (name "python-nbformat")
6799 (version "4.4.0")
6800 (source
6801 (origin
6802 (method url-fetch)
6803 (uri (pypi-uri "nbformat" version))
6804 (sha256
6805 (base32
6806 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
6807 (build-system python-build-system)
6808 (arguments `(#:tests? #f)) ; no test target
6809 (propagated-inputs
6810 `(("python-ipython-genutils" ,python-ipython-genutils)
6811 ("python-jsonschema" ,python-jsonschema)
6812 ("python-jupyter-core" ,python-jupyter-core)
6813 ("python-traitlets" ,python-traitlets)))
6814 (home-page "http://jupyter.org")
6815 (synopsis "Jupyter Notebook format")
6816 (description "This package provides the reference implementation of the
6817Jupyter Notebook format and Python APIs for working with notebooks.")
6818 (license license:bsd-3)))
6819
6820(define-public python2-nbformat
6821 (package-with-python2 python-nbformat))
6822
6823(define-public python-bleach
6824 (package
6825 (name "python-bleach")
6826 (version "1.4.3")
6827 (source
6828 (origin
6829 (method url-fetch)
6830 (uri (pypi-uri "bleach" version))
6831 (sha256
6832 (base32
6833 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
6834 (build-system python-build-system)
6835 (propagated-inputs
6836 `(("python-html5lib" ,python-html5lib-0.9)
6837 ("python-six" ,python-six)))
6838 (native-inputs
6839 `(("python-nose" ,python-nose)))
6840 (home-page "https://github.com/jsocol/bleach")
6841 (synopsis "Whitelist-based HTML-sanitizing tool")
6842 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
6843 (license license:asl2.0)))
6844
6845(define-public python2-bleach
6846 (package-with-python2 python-bleach))
6847
6848(define-public python-entrypoints
6849 (package
6850 (name "python-entrypoints")
a7f1b718 6851 (version "0.3")
44d10b1f
RW
6852 (source
6853 (origin
6854 (method url-fetch)
a7f1b718 6855 (uri (pypi-uri "entrypoints" version))
44d10b1f
RW
6856 (sha256
6857 (base32
a7f1b718 6858 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
44d10b1f
RW
6859 (build-system python-build-system)
6860 ;; The package does not come with a setup.py file, so we have to generate
6861 ;; one ourselves.
6862 (arguments
6863 `(#:tests? #f
6864 #:phases
6865 (modify-phases %standard-phases
6866 (add-after 'unpack 'create-setup.py
6867 (lambda _
6868 (call-with-output-file "setup.py"
6869 (lambda (port)
6870 (format port "\
6871from setuptools import setup
6872setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
6873" ,version))))))))
6874 (home-page "https://github.com/takluyver/entrypoints")
6875 (synopsis "Discover and load entry points from installed Python packages")
6876 (description "Entry points are a way for Python packages to advertise
6877objects with some common interface. The most common examples are
6878@code{console_scripts} entry points, which define shell commands by
6879identifying a Python function to run. The @code{entrypoints} module contains
6880functions to find and load entry points.")
6881 (license license:expat)))
6882
6883(define-public python2-entrypoints
6884 (package-with-python2 python-entrypoints))
6885
6886(define-public python-nbconvert
6887 (package
6888 (name "python-nbconvert")
6889 (version "5.0.0b1")
6890 (source
6891 (origin
6892 (method url-fetch)
6893 (uri (pypi-uri "nbconvert" version))
6894 (sha256
6895 (base32
6896 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
6897 (build-system python-build-system)
6898 (arguments
6899 `(;; The "bdist_egg" target is disabled by default, causing the installation
6900 ;; to fail.
6901 #:configure-flags (list "bdist_egg")
6902 ;; FIXME: 5 failures, 40 errors.
6903 #:tests? #f))
6904 ;; #:phases
6905 ;; (modify-phases %standard-phases
6906 ;; (replace 'check
6907 ;; (lambda _
6908 ;; (zero? (system* "py.test" "-v")))))
6909 (native-inputs
6910 `(("python-pytest" ,python-pytest)))
6911 (propagated-inputs
6912 `(("python-bleach" ,python-bleach)
6913 ("python-entrypoints" ,python-entrypoints)
6914 ("python-jinja2" ,python-jinja2)
6915 ("python-jupyter-core" ,python-jupyter-core)
6916 ("python-mistune" ,python-mistune)
6917 ("python-nbformat" ,python-nbformat)
6918 ("python-pygments" ,python-pygments)
6919 ("python-traitlets" ,python-traitlets)))
6920 (home-page "http://jupyter.org")
6921 (synopsis "Converting Jupyter Notebooks")
6922 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
6923notebooks to various other formats via Jinja templates. It allows you to
6924convert an @code{.ipynb} notebook file into various static formats including:
6925
6926@enumerate
6927@item HTML
6928@item LaTeX
6929@item PDF
6930@item Reveal JS
6931@item Markdown (md)
6932@item ReStructured Text (rst)
6933@item executable script
6934@end enumerate\n")
6935 (license license:bsd-3)))
6936
6937(define-public python2-nbconvert
6938 (package-with-python2 python-nbconvert))
6939
44d10b1f
RW
6940(define-public python-notebook
6941 (package
6942 (name "python-notebook")
6943 (version "5.7.4")
6944 (source (origin
6945 (method url-fetch)
6946 (uri (pypi-uri "notebook" version))
6947 (sha256
6948 (base32
6949 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
6950 (build-system python-build-system)
6951 (arguments
6952 `(#:phases
6953 (modify-phases %standard-phases
6954 (replace 'check
6955 (lambda _
6956 ;; These tests require a browser
6957 (delete-file-recursively "notebook/tests/selenium")
6958 ;; Some tests need HOME
6959 (setenv "HOME" "/tmp")
6960 ;; This file contains "warningfilters", which are not supported
6961 ;; by this version of nose.
6962 (delete-file "setup.cfg")
6963 (with-directory-excursion "/tmp"
6964 (invoke "nosetests" "-v"))
6965 #t)))))
6966 (propagated-inputs
6967 `(("python-jupyter-core" ,python-jupyter-core)
6968 ("python-nbformat" ,python-nbformat)
6969 ("python-nbconvert" ,python-nbconvert)
6970 ("python-prometheus-client" ,python-prometheus-client)
6971 ("python-send2trash" ,python-send2trash)
6972 ("python-terminado" ,python-terminado)))
6973 (native-inputs
6974 `(("python-nose" ,python-nose)
6975 ("python-sphinx" ,python-sphinx)
6976 ("python-requests" ,python-requests)))
6977 (home-page "http://jupyter.org/")
6978 (synopsis "Web-based notebook environment for interactive computing")
6979 (description
6980 "The Jupyter HTML notebook is a web-based notebook environment for
6981interactive computing.")
6982 (properties `((python2-variant . ,(delay python2-notebook))))
6983 (license license:bsd-3)))
6984
6985(define-public python2-notebook
6986 (let ((base (package-with-python2
6987 (strip-python2-variant python-notebook))))
6988 (package (inherit base)
6989 (native-inputs
6990 `(("python2-mock" ,python2-mock)
6991 ,@(package-native-inputs base)))
6992 (arguments
6993 (substitute-keyword-arguments (package-arguments base)
6994 ((#:phases phases)
6995 `(modify-phases ,phases
6996 (add-before 'check 'disable-test-case
6997 ;; The test requires network access to localhost. Curiously it
6998 ;; fails with Python 2 only. Simply make the test-case return
6999 ;; immediately.
7000 (lambda _
7001 (substitute*
7002 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7003 (("formats = self.nbconvert_api") "return #")))))))))))
7004
7005(define-public python-widgetsnbextension
7006 (package
7007 (name "python-widgetsnbextension")
7008 (version "3.4.2")
7009 (source
7010 (origin
7011 (method url-fetch)
7012 (uri (pypi-uri "widgetsnbextension" version))
7013 (sha256
7014 (base32
7015 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
7016 (build-system python-build-system)
7017 (propagated-inputs
7018 `(("python-ipykernel" ,python-ipykernel)
7019 ("python-notebook" ,python-notebook)))
7020 (native-inputs
7021 `(("python-certifi" ,python-certifi)
7022 ("python-nose" ,python-nose)))
7023 (home-page "https://ipython.org")
7024 (synopsis "IPython HTML widgets for Jupyter")
7025 (description "This package provides interactive HTML widgets for Jupyter
7026notebooks.")
7027 (license license:bsd-3)))
7028
7029(define-public python2-widgetsnbextension
7030 (package-with-python2 python-widgetsnbextension))
7031
7032(define-public python-ipywidgets
7033 (package
7034 (name "python-ipywidgets")
7035 (version "5.2.2")
7036 (source
7037 (origin
7038 (method url-fetch)
7039 (uri (pypi-uri "ipywidgets" version))
7040 (sha256
7041 (base32
7042 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7043 (build-system python-build-system)
7044 (propagated-inputs
7045 `(("python-ipython" ,python-ipython)
7046 ("python-traitlets" ,python-traitlets)
7047 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7048 (native-inputs
7049 `(("python-nose" ,python-nose)
7050 ("python-pytest" ,python-pytest)))
7051 (home-page "https://ipython.org")
7052 (synopsis "IPython HTML widgets for Jupyter")
7053 (description "Ipywidgets are interactive HTML widgets for Jupyter
7054notebooks and the IPython kernel. Notebooks come alive when interactive
7055widgets are used. Users gain control of their data and can visualize changes
7056in the data.")
7057 (license license:bsd-3)))
7058
7059(define-public python2-ipywidgets
7060 (package-with-python2 python-ipywidgets))
7061
7062(define-public python-jupyter-console
7063 (package
7064 (name "python-jupyter-console")
7065 (version "5.2.0")
7066 (source
7067 (origin
7068 (method url-fetch)
7069 (uri (pypi-uri "jupyter_console" version))
7070 (sha256
7071 (base32
7072 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
7073 (build-system python-build-system)
7074 ;; Tests only run in an TTY.
7075 (arguments `(#:tests? #f))
7076 (propagated-inputs
7077 `(("python-ipykernel" ,python-ipykernel)
7078 ("python-jupyter-client" ,python-jupyter-client)
7079 ("python-prompt-toolkit" ,python-prompt-toolkit-1)
7080 ("python-pygments" ,python-pygments)))
7081 (native-inputs
7082 `(("python-nose" ,python-nose)))
7083 (home-page "https://jupyter.org")
7084 (synopsis "Jupyter terminal console")
7085 (description "This package provides a terminal-based console frontend for
7086Jupyter kernels. It also allows for console-based interaction with non-Python
7087Jupyter kernels such as IJulia and IRKernel.")
7088 (license license:bsd-3)))
7089
7090(define-public python2-jupyter-console
7091 (package-with-python2 python-jupyter-console))
7092
7093;; The python-ipython and python-jupyter-console require each other. To get
7094;; the functionality in both packages working, strip down the
7095;; python-jupyter-console package when using it as an input to python-ipython.
7096(define python-jupyter-console-minimal
7097 (package
7098 (inherit python-jupyter-console)
7099 (name "python-jupyter-console-minimal")
7100 (arguments
7101 (substitute-keyword-arguments
7102 (package-arguments python-jupyter-console)
7103 ((#:phases phases)
7104 `(modify-phases ,phases
7105 (add-after 'install 'delete-bin
7106 (lambda* (#:key outputs #:allow-other-keys)
7107 ;; Delete the bin files, to avoid conflicts in profiles
7108 ;; where python-ipython and python-jupyter-console are
7109 ;; both present.
7110 (delete-file-recursively
7111 (string-append
7112 (assoc-ref outputs "out") "/bin"))))))))
7113 ;; Remove the python-ipython propagated input, to avoid the cycle
7114 (propagated-inputs
7115 (alist-delete
7116 "python-ipython"
7117 (package-propagated-inputs python-jupyter-console)))))
7118
7119(define-public python-qtconsole
7120 (package
7121 (name "python-qtconsole")
7122 (version "4.4.3")
7123 (source
7124 (origin
7125 (method url-fetch)
7126 (uri (pypi-uri "qtconsole" version))
7127 (sha256
7128 (base32
7129 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
7130 (build-system python-build-system)
7131 (arguments
7132 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
7133 ;; but we only have the LTS version 5.x. This means that there might be
7134 ;; runtime errors, but since this is a dependency of the Jupyter package,
7135 ;; and Jupyter can be used without the qtconsole we can overlook this for
7136 ;; now.
7137 `(#:tests? #f
7138 #:phases
7139 (modify-phases %standard-phases
7140 (add-before 'check 'pre-check
7141 (lambda _
7142 (setenv "QT_QPA_PLATFORM" "offscreen")
7143 #t)))))
7144 (propagated-inputs
7145 `(("python-ipykernel" ,python-ipykernel)
7146 ("python-ipython" ,python-ipython)))
7147 (native-inputs
7148 `(("python-pytest" ,python-pytest)))
7149 (home-page "http://jupyter.org")
7150 (synopsis "Jupyter Qt console")
7151 (description "This package provides a Qt-based console for Jupyter with
7152support for rich media output.")
7153 (license license:bsd-3)))
7154
7155(define-public jupyter
7156 (package
7157 (name "jupyter")
7158 (version "1.0.0")
7159 (source
7160 (origin
7161 (method url-fetch)
7162 (uri (pypi-uri "jupyter" version))
7163 (sha256
7164 (base32
7165 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
7166 (build-system python-build-system)
7167 (arguments '(#:tests? #f)) ; there are none.
7168 (propagated-inputs
7169 `(("python-ipykernel" ,python-ipykernel)
7170 ("python-ipywidgets" ,python-ipywidgets)
7171 ("python-jupyter-console" ,python-jupyter-console)
7172 ("python-nbconvert" ,python-nbconvert)
7173 ("python-notebook" ,python-notebook)
7174 ("python-qtconsole" ,python-qtconsole)))
7175 (native-search-paths
7176 (list (search-path-specification
7177 (variable "JUPYTER_PATH")
7178 (files '("share/jupyter")))))
7179 (home-page "https://jupyter.org")
7180 (synopsis "Web application for interactive documents")
7181 (description
7182 "The Jupyter Notebook is a web application that allows you to create and
7183share documents that contain live code, equations, visualizations and
7184explanatory text. Uses include: data cleaning and transformation, numerical
7185simulation, statistical modeling, machine learning and much more.")
7186 (license license:bsd-3)))
7187
7188(define-public python-chardet
7189 (package
7190 (name "python-chardet")
7191 (version "3.0.4")
7192 (source
7193 (origin
7194 (method url-fetch)
7195 (uri (pypi-uri "chardet" version))
7196 (sha256
7197 (base32
7198 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
7199 (native-inputs
7200 `(("python-hypothesis" ,python-hypothesis)
7201 ("python-pytest" ,python-pytest)
7202 ("python-pytest-runner" ,python-pytest-runner)))
7203 (build-system python-build-system)
7204 (home-page "https://github.com/chardet/chardet")
7205 (synopsis "Universal encoding detector for Python 2 and 3")
7206 (description
7207 "This package provides @code{chardet}, a Python module that can
7208automatically detect a wide range of file encodings.")
7209 (license license:lgpl2.1+)))
7210
7211(define-public python2-chardet
7212 (package-with-python2 python-chardet))
7213
7214(define-public python-docopt
7215 (package
7216 (name "python-docopt")
7217 (version "0.6.2")
7218 (source
7219 (origin
7220 (method url-fetch)
7221 ;; The release on PyPI does not include tests.
7222 (uri (string-append
7223 "https://github.com/docopt/docopt/archive/"
7224 version ".tar.gz"))
7225 (file-name (string-append name "-" version ".tar.gz"))
7226 (sha256
7227 (base32
7228 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
7229 (build-system python-build-system)
7230 (native-inputs
7231 `(("python-pytest" ,python-pytest)))
7232 (arguments
7233 `(#:phases
7234 (modify-phases %standard-phases
7235 (replace 'check
7236 (lambda _ (invoke "py.test"))))))
7237 (home-page "http://docopt.org")
7238 (synopsis "Command-line interface description language for Python")
7239 (description "This library allows the user to define a command-line
7240interface from a program's help message rather than specifying it
7241programatically with command-line parsers like @code{getopt} and
7242@code{argparse}.")
7243 (license license:expat)))
7244
7245(define-public python2-docopt
7246 (package-with-python2 python-docopt))
7247
7248(define-public python-pythondialog
7249 (package
7250 (name "python-pythondialog")
7251 (version "3.4.0")
7252 (source
7253 (origin
7254 (method url-fetch)
7255 (uri (pypi-uri "pythondialog" version))
7256 (sha256
7257 (base32
7258 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
7259 (build-system python-build-system)
7260 (arguments
7261 `(#:phases
7262 (modify-phases %standard-phases
7263 (add-after 'unpack 'patch-path
7264 (lambda* (#:key inputs #:allow-other-keys)
7265 (let* ((dialog (assoc-ref inputs "dialog")))
7266 ;; Since this library really wants to grovel the search path, we
7267 ;; must hardcode dialog's store path into it.
7268 (substitute* "dialog.py"
7269 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
7270 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
7271 #t))))
7272 #:tests? #f)) ; no test suite
7273 (propagated-inputs
7274 `(("dialog" ,dialog)))
7275 (home-page "http://pythondialog.sourceforge.net/")
7276 (synopsis "Python interface to the UNIX dialog utility")
7277 (description "A Python wrapper for the dialog utility. Its purpose is to
7278provide an easy to use, pythonic and comprehensive Python interface to dialog.
7279This allows one to make simple text-mode user interfaces on Unix-like systems")
7280 (license license:lgpl2.1)
7281 (properties `((python2-variant . ,(delay python2-pythondialog))))))
7282
7283(define-public python2-pythondialog
7284 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
7285 (package
7286 (inherit base)
7287 (version (package-version python-pythondialog))
7288 (source (origin
7289 (method url-fetch)
7290 (uri (pypi-uri "python2-pythondialog" version))
7291 (sha256
7292 (base32
7293 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
7294
7295(define-public python-configobj
7296 (package
7297 (name "python-configobj")
7298 (version "5.0.6")
7299 (source (origin
7300 (method url-fetch)
b0758fbb 7301 (uri (pypi-uri "configobj" version))
44d10b1f
RW
7302 (sha256
7303 (base32
7304 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
7305 ;; Patch setup.py so it looks for python-setuptools, which is
7306 ;; required to parse the keyword 'install_requires' in setup.py.
7307 (patches (search-patches "python-configobj-setuptools.patch"))))
7308 (build-system python-build-system)
7309 (propagated-inputs
7310 `(("python-six" ,python-six)))
7311 (synopsis "Config file reading, writing and validation")
7312 (description "ConfigObj is a simple but powerful config file reader and
7313writer: an ini file round tripper. Its main feature is that it is very easy to
7314use, with a straightforward programmer’s interface and a simple syntax for
7315config files.")
7316 (home-page "https://github.com/DiffSK/configobj")
7317 (license license:bsd-3)))
7318
7319(define-public python2-configobj
7320 (package-with-python2 python-configobj))
7321
7322(define-public python-configargparse
7323 (package
7324 (name "python-configargparse")
86ae491f 7325 (version "0.14.0")
44d10b1f
RW
7326 (source (origin
7327 (method url-fetch)
7328 (uri (pypi-uri "ConfigArgParse" version))
7329 (sha256
7330 (base32
86ae491f 7331 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
44d10b1f
RW
7332 (build-system python-build-system)
7333 (native-inputs
7334 `(("python-pyyaml" ,python-pyyaml)))
7335 (arguments
7336 `(#:phases
7337 (modify-phases %standard-phases
7338 (replace 'check
7339 (lambda _
7340 ;; Bypass setuptools-shim because one test relies on "setup.py"
7341 ;; being the first argument passed to the python call.
7342 ;;
7343 ;; NOTE: Many tests do not run because they rely on Python's
7344 ;; built-in test.test_argparse, but we remove the unit tests from
7345 ;; our Python installation.
7346 (invoke "python" "setup.py" "test"))))))
7347 (synopsis "Replacement for argparse")
7348 (description "A drop-in replacement for argparse that allows options to also
7349be set via config files and/or environment variables.")
7350 (home-page "https://github.com/bw2/ConfigArgParse")
7351 (license license:expat)))
7352
7353(define-public python2-configargparse
7354 (package-with-python2 python-configargparse))
7355
7356(define-public python-argparse-manpage
7357 (package
7358 (name "python-argparse-manpage")
7359 (version "1.1")
7360 (source
7361 (origin
7362 (method url-fetch)
7363 (uri (pypi-uri "argparse-manpage" version))
7364 (sha256
7365 (base32
7366 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
7367 (build-system python-build-system)
7368 (home-page "https://github.com/praiskup/argparse-manpage")
7369 (synopsis "Build manual page from Python's ArgumentParser object")
7370 (description
7371 "This package provides tools to build manual pages from Python's
7372@code{ArgumentParser} object.")
7373 (license license:asl2.0)))
7374
7375(define-public python2-contextlib2
7376 (package
7377 (name "python2-contextlib2")
7378 (version "0.5.5")
7379 (source
7380 (origin
7381 (method url-fetch)
7382 (uri (pypi-uri "contextlib2" version))
7383 (sha256
7384 (base32
7385 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
7386 (build-system python-build-system)
7387 (arguments
7388 `(#:python ,python-2
7389 #:phases
7390 (modify-phases %standard-phases
7391 (replace 'check
7392 (lambda _ (invoke "python" "test_contextlib2.py" "-v"))))))
7393 (native-inputs
7394 `(("python2-unittest2" ,python2-unittest2)))
7395 (home-page "http://contextlib2.readthedocs.org/")
7396 (synopsis "Tools for decorators and context managers")
7397 (description "This module is primarily a backport of the Python
73983.2 contextlib to earlier Python versions. Like contextlib, it
7399provides utilities for common tasks involving decorators and context
7400managers. It also contains additional features that are not part of
7401the standard library.")
7402 (license license:psfl)))
7403
7404(define-public python-texttable
7405 (package
7406 (name "python-texttable")
7407 (version "0.8.7")
7408 (source
7409 (origin
7410 (method url-fetch)
7411 (uri (pypi-uri "texttable" version))
7412 (sha256
7413 (base32
7414 "1liiiydgkg37i46a418aw19fyf6z3ds51wdwwpyjbs12x0phhf4a"))))
7415 (build-system python-build-system)
7416 (arguments '(#:tests? #f)) ; no tests
7417 (home-page "https://github.com/foutaise/texttable/")
7418 (synopsis "Python module for creating simple ASCII tables")
7419 (description "Texttable is a Python module for creating simple ASCII
7420tables.")
7421 (license license:lgpl2.1+)))
7422
7423(define-public python2-texttable
7424 (package-with-python2 python-texttable))
7425
7426(define-public python-atomicwrites
7427 (package
7428 (name "python-atomicwrites")
7429 (version "1.1.5")
7430 (source (origin
7431 (method url-fetch)
7432 (uri (pypi-uri "atomicwrites" version))
7433 (sha256
7434 (base32
7435 "11bm90fwm2avvf4f3ib8g925w7jr4m11vcsinn1bi6ns4bm32214"))))
7436 (build-system python-build-system)
7437 (synopsis "Atomic file writes in Python")
7438 (description "Library for atomic file writes using platform dependent tools
7439for atomic file system operations.")
7440 (home-page "https://github.com/untitaker/python-atomicwrites")
7441 (license license:expat)))
7442
7443(define-public python2-atomicwrites
7444 (package-with-python2 python-atomicwrites))
7445
7446(define-public python-click-threading
7447 (package
7448 (name "python-click-threading")
7449 (version "0.4.4")
7450 (source (origin
7451 (method url-fetch)
7452 (uri (pypi-uri "click-threading" version))
7453 (sha256
7454 (base32
7455 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
7456 (build-system python-build-system)
7457 (propagated-inputs
7458 `(("python-click" ,python-click)))
7459 (synopsis "Utilities for multithreading in Click")
7460 (description "This package provides utilities for multithreading in Click
7461applications.")
7462 (home-page "https://github.com/click-contrib/click-threading")
7463 (license license:expat)))
7464
7465(define-public python-click-log
7466 (package
7467 (name "python-click-log")
7468 (version "0.3.2")
7469 (source (origin
7470 (method url-fetch)
7471 (uri (pypi-uri "click-log" version))
7472 (sha256
7473 (base32
7474 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
7475 (build-system python-build-system)
7476 (propagated-inputs
7477 `(("python-click" ,python-click)))
7478 (synopsis "Logging for click applications")
7479 (description "This package provides a Python library for logging Click
7480applications.")
7481 (home-page "https://github.com/click-contrib/click-log")
7482 (license license:expat)))
7483
7484(define-public python-apipkg
7485 (package
7486 (name "python-apipkg")
7487 (version "1.4")
7488 (source (origin
7489 (method url-fetch)
7490 (uri (pypi-uri "apipkg" version))
7491 (sha256
7492 (base32
7493 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
7494 (build-system python-build-system)
7495 (native-inputs
7496 `(("python-pytest" ,python-pytest)))
7497 (synopsis "Namespace control and lazy-import mechanism")
7498 (description "With apipkg you can control the exported namespace of a Python
7499package and greatly reduce the number of imports for your users. It is a small
7500pure Python module that works on virtually all Python versions.")
7501 (home-page "https://github.com/pytest-dev/apipkg")
7502 (license license:expat)))
7503
7504(define-public python2-apipkg
7505 (package-with-python2 python-apipkg))
7506
7507(define-public python-execnet
7508 (package
7509 (name "python-execnet")
7510 (version "1.4.1")
7511 (source (origin
7512 (method url-fetch)
7513 (uri (pypi-uri "execnet" version))
7514 (sha256
7515 (base32
7516 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
7517 (build-system python-build-system)
7518 (arguments
7519 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
7520 ;; The two test failures are caused by the lack of an `ssh` executable.
7521 ;; The test suite can be run with pytest after the 'install' phase.
7522 #:tests? #f))
7523 (native-inputs
7524 `(("python-pytest" ,python-pytest)
7525 ("python-setuptools-scm" ,python-setuptools-scm)))
7526 (propagated-inputs
7527 `(("python-apipkg" ,python-apipkg)))
7528 (synopsis "Rapid multi-Python deployment")
7529 (description "Execnet provides a share-nothing model with
7530channel-send/receive communication for distributing execution across many
7531Python interpreters across version, platform and network barriers. It has a
7532minimal and fast API targeting the following uses:
7533@enumerate
7534@item distribute tasks to (many) local or remote CPUs
7535@item write and deploy hybrid multi-process applications
7536@item write scripts to administer multiple environments
7537@end enumerate")
7538 (home-page "http://codespeak.net/execnet/")
7539 (license license:expat)))
7540
7541(define-public python2-execnet
7542 (package-with-python2 python-execnet))
7543
7544(define-public python-icalendar
7545 (package
7546 (name "python-icalendar")
7547 (version "4.0.3")
7548 (source (origin
7549 (method url-fetch)
7550 (uri (pypi-uri "icalendar" version))
7551 (sha256
7552 (base32
7553 "0mk3dk1dxkcm46jy48v27j2w2349iv4sbimqj1yb5js43mx49hh7"))))
7554 (build-system python-build-system)
7555 (propagated-inputs
7556 `(("python-dateutil" ,python-dateutil)
7557 ("python-pytz" ,python-pytz)))
7558 (synopsis "Python library for parsing iCalendar files")
7559 (description "The icalendar package is a parser/generator of iCalendar
7560files for use with Python.")
7561 (home-page "https://github.com/collective/icalendar")
7562 (license license:bsd-2)))
7563
7564(define-public python-sphinxcontrib-newsfeed
7565 (package
7566 (name "python-sphinxcontrib-newsfeed")
7567 (version "0.1.4")
7568 (source (origin
7569 (method url-fetch)
7570 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
7571 (sha256
7572 (base32
7573 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
7574 (arguments '(#:tests? #f)) ; No tests.
7575 (build-system python-build-system)
7576 (propagated-inputs
7577 `(("python-sphinx" ,python-sphinx)))
7578 (synopsis "News Feed extension for Sphinx")
7579 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
7580Blog, News or Announcements section to a Sphinx website.")
7581 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
7582 (license license:bsd-2)))
7583
7584(define-public python-args
7585 (package
7586 (name "python-args")
7587 (version "0.1.0")
7588 (source (origin
7589 (method url-fetch)
7590 (uri (pypi-uri "args" version))
7591 (sha256
7592 (base32
7593 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
7594 (build-system python-build-system)
7595 (home-page "https://github.com/kennethreitz/args")
7596 (synopsis "Command-line argument parser")
7597 (description
7598 "This library provides a Python module to parse command-line arguments.")
7599 (license license:bsd-3)))
7600
7601(define-public python2-args
7602 (package-with-python2 python-args))
7603
7604(define-public python-clint
7605 (package
7606 (name "python-clint")
7607 (version "0.5.1")
7608 (source (origin
7609 (method url-fetch)
7610 (uri (pypi-uri "clint" version))
7611 (sha256
7612 (base32
7613 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
7614 (build-system python-build-system)
7615 (arguments
7616 '(#:phases
7617 (modify-phases %standard-phases
7618 (replace 'check
7619 (lambda _ (invoke "py.test" "-v"))))))
7620 (native-inputs
7621 `(("python-pytest" ,python-pytest)))
7622 (propagated-inputs
7623 `(("python-args" ,python-args)))
7624 (home-page "https://github.com/kennethreitz/clint")
7625 (synopsis "Command-line interface tools")
7626 (description
7627 "Clint is a Python module filled with a set of tools for developing
7628command-line applications, including tools for colored and indented
7629output, progress bar display, and pipes.")
7630 (license license:isc)))
7631
7632(define-public python2-clint
7633 (package-with-python2 python-clint))
7634
44d10b1f
RW
7635(define-public python-rply
7636 (package
7637 (name "python-rply")
7638 (version "0.7.5")
7639 (source (origin
7640 (method url-fetch)
7641 (uri (pypi-uri "rply" version))
7642 (sha256
7643 (base32
7644 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
7645 (build-system python-build-system)
7646 (propagated-inputs
7647 `(("python-appdirs" ,python-appdirs)))
7648 (home-page "https://github.com/alex/rply")
7649 (synopsis "Parser generator for Python")
7650 (description
7651 "This package provides a pure Python based parser generator, that also
7652works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
7653with a new public API, and RPython support.")
7654 (license license:bsd-3)))
7655
7656(define-public python2-rply
7657 (package-with-python2 python-rply))
7658
7659(define-public python-hy
7660 (package
7661 (name "python-hy")
7662 (version "0.13.0")
7663 (source (origin
7664 (method url-fetch)
7665 (uri (pypi-uri "hy" version))
7666 (sha256
7667 (base32
7668 "19sfymaksx9jhksfnb15ahid46mzrhdfzz6yy2craz2qnzvpmky8"))))
7669 (build-system python-build-system)
7670 (arguments
7671 '(#:phases
7672 (modify-phases %standard-phases
7673 (replace 'check
7674 (lambda _
7675 ;; Tests require write access to HOME.
7676 (setenv "HOME" "/tmp")
7677 (invoke "nosetests"))))))
7678 (native-inputs
7679 `(("python-coverage" ,python-coverage)
7680 ("python-nose" ,python-nose)))
7681 (propagated-inputs
7682 `(("python-astor" ,python-astor)
7683 ("python-clint" ,python-clint)
7684 ("python-rply" ,python-rply)))
7685 (home-page "http://hylang.org/")
7686 (synopsis "Lisp frontend to Python")
7687 (description
7688 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
7689its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
7690Python at your fingertips, in Lisp form.")
7691 (license license:expat)))
7692
7693(define-public python2-hy
7694 (package-with-python2 python-hy))
7695
7696(define-public python2-functools32
7697 (package
7698 (name "python2-functools32")
7699 (version "3.2.3-2")
7700 (source
7701 (origin
7702 (method url-fetch)
7703 (uri (pypi-uri "functools32" version))
7704 (sha256
7705 (base32
7706 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
7707 (build-system python-build-system)
7708 (arguments
7709 `(#:python ,python-2
7710 #:tests? #f)) ; no test target
7711 (home-page "https://github.com/MiCHiLU/python-functools32")
7712 (synopsis
7713 "Backport of the functools module from Python 3.2.3")
7714 (description
7715 "This package is a backport of the @code{functools} module from Python
77163.2.3 for use with older versions of Python and PyPy.")
7717 (license license:expat)))
7718
7719(define-public python2-subprocess32
7720 (package
7721 (name "python2-subprocess32")
7722 (version "3.2.7")
7723 (source (origin
7724 (method url-fetch)
7725 (uri (pypi-uri "subprocess32" version))
7726 (sha256
7727 (base32
7728 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
7729 (patches
7730 (search-patches "python2-subprocess32-disable-input-test.patch"))))
7731 (build-system python-build-system)
7732 (arguments
7733 `(#:python ,python-2
7734 ;; The test suite fails with Python > 2.7.13:
7735 ;; import test.support
7736 ;; ImportError: No module named support
7737 #:tests? #f
7738 #:phases
7739 (modify-phases %standard-phases
7740 (add-after 'unpack 'patch-/bin/sh
7741 (lambda _
7742 (substitute* '("subprocess32.py"
7743 "test_subprocess32.py")
7744 (("/bin/sh") (which "sh")))
7745 #t)))))
7746 (home-page "https://github.com/google/python-subprocess32")
7747 (synopsis "Backport of the subprocess module from Python 3.2")
7748 (description
7749 "This is a backport of the @code{subprocess} standard library module
7750from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
7751new features. On POSIX systems it is guaranteed to be reliable when used
7752in threaded applications. It includes timeout support from Python 3.3 but
7753otherwise matches 3.2’s API.")
7754 (license license:psfl)))
7755
7756(define-public python2-futures
7757 (package
7758 (name "python2-futures")
7759 (version "3.2.0")
7760 (source
7761 (origin
7762 (method url-fetch)
7763 (uri (pypi-uri "futures" version))
7764 (sha256
7765 (base32
7766 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
7767 (build-system python-build-system)
7768 (arguments `(#:python ,python-2
7769 ;; FIXME: Python 2.7.14 moved the test.support library,
7770 ;; but our package has not yet been adjusted. Enable
7771 ;; tests when the python2 package has been fixed.
7772 #:tests? #f))
7773 (home-page "https://github.com/agronholm/pythonfutures")
7774 (synopsis
7775 "Backport of the concurrent.futures package from Python 3.2")
7776 (description
7777 "The concurrent.futures module provides a high-level interface for
7778asynchronously executing callables. This package backports the
7779concurrent.futures package from Python 3.2")
7780 (license license:bsd-3)))
7781
7782(define-public python-promise
7783 (package
7784 (name "python-promise")
7785 (version "0.4.2")
7786 (source
7787 (origin
7788 (method url-fetch)
7789 (uri (pypi-uri "promise" version))
7790 (sha256
7791 (base32
7792 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
7793 (build-system python-build-system)
7794 ;; Tests wants python-futures, which is a python2 only program, and
7795 ;; can't be found by python-promise at test time.
7796 (arguments `(#:tests? #f))
7797 (home-page "https://github.com/syrusakbary/promise")
7798 (synopsis "Promises/A+ implementation for Python")
7799 (description
7800 "Promises/A+ implementation for Python")
7801 (properties `((python2-variant . ,(delay python2-promise))))
7802 (license license:expat)))
7803
7804(define-public python2-promise
7805 (let ((promise (package-with-python2
7806 (strip-python2-variant python-promise))))
7807 (package (inherit promise)
7808 (arguments (substitute-keyword-arguments (package-arguments promise)
7809 ((#:tests? _) #t)))
7810 (native-inputs
7811 `(("python2-futures" ,python2-futures)
7812 ("python2-pytest" ,python2-pytest)
7813 ,@(package-native-inputs promise))))))
7814
7815(define-public python-colorama
7816 (package
7817 (name "python-colorama")
7818 (version "0.3.9")
7819 (source
7820 (origin
7821 (method url-fetch)
7822 (uri (pypi-uri "colorama" version))
7823 (sha256
7824 (base32
7825 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
7826 (build-system python-build-system)
7827 (synopsis "Colored terminal text rendering for Python")
7828 (description "Colorama is a Python library for rendering colored terminal
7829text.")
7830 (home-page "https://pypi.python.org/pypi/colorama")
7831 (license license:bsd-3)))
7832
7833(define-public python2-colorama
7834 (package-with-python2 python-colorama))
7835
7836(define-public python-rsa
7837 (package
7838 (name "python-rsa")
7839 (version "3.4.2")
7840 (source
7841 (origin
7842 (method url-fetch)
7843 (uri (pypi-uri "rsa" version))
7844 (sha256
7845 (base32
7846 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
7847 (build-system python-build-system)
7848 (propagated-inputs
7849 `(("python-pyasn1" ,python-pyasn1)))
7850 (synopsis "Pure-Python RSA implementation")
7851 (description "Python-RSA is a pure-Python RSA implementation. It supports
7852encryption and decryption, signing and verifying signatures, and key
7853generation according to PKCS#1 version 1.5. It can be used as a Python
7854library as well as on the command line.")
7855 (home-page "https://stuvel.eu/rsa")
7856 (license license:asl2.0)))
7857
7858(define-public python2-rsa
7859 (package-with-python2 python-rsa))
7860
7861(define-public python-pluggy
7862 (package
7863 (name "python-pluggy")
7864 (version "0.7.1")
7865 (source
7866 (origin
7867 (method url-fetch)
7868 (uri (pypi-uri "pluggy" version))
7869 (sha256
7870 (base32
7871 "1qbn70mksmr03hac6jgp6fiqc4l7859z8dchx2x950vhlij87swm"))))
7872 (build-system python-build-system)
7873 (native-inputs
7874 `(("python-setuptools-scm" ,python-setuptools-scm)))
7875 (synopsis "Plugin and hook calling mechanism for Python")
7876 (description "Pluggy is an extraction of the plugin manager as used by
7877Pytest but stripped of Pytest specific details.")
7878 (home-page "https://pypi.python.org/pypi/pluggy")
7879 (license license:expat)))
7880
7881(define-public python2-pluggy
7882 (package-with-python2 python-pluggy))
7883
7884(define-public python-tox
7885 (package
7886 (name "python-tox")
7887 (version "2.8.1")
7888 (source
7889 (origin
7890 (method url-fetch)
7891 (uri (pypi-uri "tox" version))
7892 (sha256
7893 (base32
7894 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
7895 (build-system python-build-system)
7896 (arguments
7897 ;; FIXME: Tests require pytest-timeout, which itself requires
7898 ;; pytest>=2.8.0 for installation.
7899 '(#:tests? #f))
7900 (propagated-inputs
7901 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
7902 ("python-py" ,python-py)
7903 ("python-virtualenv" ,python-virtualenv)))
7904 (native-inputs
7905 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
7906 ("python-pytest" ,python-pytest) ; >= 2.3.5
7907 ("python-setuptools-scm" ,python-setuptools-scm)))
7908 (home-page "http://tox.testrun.org/")
7909 (synopsis "Virtualenv-based automation of test activities")
7910 (description "Tox is a generic virtualenv management and test command line
7911tool. It can be used to check that a package installs correctly with
7912different Python versions and interpreters, or run tests in each type of
7913supported environment, or act as a frontend to continuous integration
7914servers.")
7915 (license license:expat)))
7916
7917(define-public python2-tox
7918 (package-with-python2 python-tox))
7919
7920(define-public python-jmespath
7921 (package
7922 (name "python-jmespath")
7923 (version "0.9.3")
7924 (source
7925 (origin
7926 (method url-fetch)
7927 (uri (pypi-uri "jmespath" version))
7928 (sha256
7929 (base32
7930 "0r7wc7fsxmlwzxx9j1j7rms06c6xs6d4sysirdhz1jk2mb4x90ba"))))
7931 (build-system python-build-system)
7932 (native-inputs
7933 `(("python-nose" ,python-nose)))
7934 (synopsis "JSON Matching Expressions")
7935 (description "JMESPath (pronounced “james path”) is a Python library that
7936allows one to declaratively specify how to extract elements from a JSON
7937document.")
7938 (home-page "https://github.com/jmespath/jmespath.py")
7939 (license license:expat)))
7940
7941(define-public python2-jmespath
7942 (package-with-python2 python-jmespath))
7943
7944(define-public python-botocore
7945 (package
7946 (name "python-botocore")
7947 (version "1.8.43")
7948 (source
7949 (origin
7950 (method url-fetch)
7951 (uri (pypi-uri "botocore" version))
7952 (sha256
7953 (base32
7954 "12cqpbnz3vfv41mp9admvciw7bc7hz57sjpqs2bxaw9wnfmbw5lg"))))
7955 (build-system python-build-system)
7956 (arguments
7957 ;; FIXME: Many tests are failing.
7958 '(#:tests? #f))
7959 (propagated-inputs
7960 `(("python-dateutil" ,python-dateutil)
7961 ("python-docutils" ,python-docutils)
7962 ("python-jmespath" ,python-jmespath)))
7963 (native-inputs
7964 `(("python-mock" ,python-mock)
7965 ("python-nose" ,python-nose)
7966 ("behave" ,behave)
7967 ("python-tox" ,python-tox)
7968 ("python-wheel" ,python-wheel)))
7969 (home-page "https://github.com/boto/botocore")
7970 (synopsis "Low-level interface to AWS")
7971 (description "Botocore is a Python library that provides a low-level
7972interface to the Amazon Web Services (AWS) API.")
7973 (license license:asl2.0)))
7974
7975(define-public python2-botocore
7976 (package-with-python2 python-botocore))
7977
7978(define-public python-xdo
7979 (package
7980 (name "python-xdo")
7981 (version "0.3")
7982 (source (origin
7983 (method url-fetch)
7984 (uri (string-append
7985 "http://http.debian.net/debian/pool/main/p/python-xdo/"
7986 "python-xdo_" version ".orig.tar.gz"))
7987 (sha256
7988 (base32
7989 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
7990 (build-system python-build-system)
7991 (arguments
7992 '(#:phases
7993 (modify-phases %standard-phases
7994 (add-before 'install 'patch-libxdo-path
7995 ;; Hardcode the path of dynamically loaded libxdo library.
7996 (lambda* (#:key inputs #:allow-other-keys)
7997 (let ((libxdo (string-append
7998 (assoc-ref inputs "xdotool")
7999 "/lib/libxdo.so")))
8000 (substitute* "xdo/_xdo.py"
8001 (("find_library\\(\"xdo\"\\)")
8002 (simple-format #f "\"~a\"" libxdo)))
8003 #t))))
8004 #:tests? #f)) ; no tests provided
8005 (propagated-inputs
8006 `(("python-six" ,python-six)))
8007 (inputs
8008 `(("xdotool" ,xdotool)
8009 ("libX11" ,libx11)))
8010 (home-page "https://tracker.debian.org/pkg/python-xdo")
8011 (synopsis "Python library for simulating X11 keyboard/mouse input")
8012 (description "Provides bindings to libxdo for manipulating X11 via simulated
8013input. (Note that this is mostly a legacy library; you may wish to look at
8014python-xdo for newer bindings.)")
8015 (license license:bsd-3)))
8016
8017(define-public python2-xdo
8018 (package-with-python2 python-xdo))
8019
8020(define-public python-mako
8021 (package
8022 (name "python-mako")
8023 (version "1.0.7")
8024 (source
8025 (origin
8026 (method url-fetch)
8027 (uri (pypi-uri "Mako" version))
8028 (sha256
8029 (base32
8030 "1bi5gnr8r8dva06qpyx4kgjc6spm2k1y908183nbbaylggjzs0jf"))))
8031 (build-system python-build-system)
8032 (propagated-inputs
8033 `(("python-markupsafe" ,python-markupsafe)))
8034 (native-inputs
8035 `(("python-mock" ,python-mock)
8036 ("python-nose" ,python-nose)
8037 ("python-pytest" ,python-pytest)))
7016e620 8038 (home-page "https://www.makotemplates.org/")
44d10b1f
RW
8039 (synopsis "Templating language for Python")
8040 (description "Mako is a templating language for Python that compiles
8041templates into Python modules.")
8042 (license license:expat)))
8043
8044(define-public python2-mako
8045 (package-with-python2 python-mako))
8046
8047(define-public python-waitress
8048 (package
8049 (name "python-waitress")
8050 (version "1.1.0")
8051 (source
8052 (origin
8053 (method url-fetch)
8054 (uri (pypi-uri "waitress" version))
8055 (patches (search-patches "python-waitress-fix-tests.patch"))
8056 (sha256
8057 (base32
8058 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
8059 (build-system python-build-system)
8060 (home-page "https://github.com/Pylons/waitress")
8061 (synopsis "Waitress WSGI server")
8062 (description "Waitress is meant to be a production-quality pure-Python WSGI
8063server with very acceptable performance.")
8064 (license license:zpl2.1)))
8065
8066(define-public python2-waitress
8067 (package-with-python2 python-waitress))
8068
8069(define-public python-pyquery
8070 (package
8071 (name "python-pyquery")
8072 (version "1.2.17")
8073 (source
8074 (origin
8075 (method url-fetch)
8076 (uri (pypi-uri "pyquery" version))
8077 (sha256
8078 (base32
8079 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
8080 (build-system python-build-system)
8081 (native-inputs
8082 `(("python-webob" ,python-webob)
8083 ("python-webtest" ,python-webtest)))
8084 (propagated-inputs
8085 `(("python-lxml" ,python-lxml)
8086 ("python-cssselect" ,python-cssselect)))
8087 (home-page "https://github.com/gawel/pyquery")
8088 (synopsis "Make jQuery-like queries on xml documents")
8089 (description "pyquery allows you to make jQuery queries on xml documents.
8090The API is as much as possible the similar to jQuery. pyquery uses lxml for
8091fast xml and html manipulation.")
8092 (license license:bsd-3)))
8093
44d10b1f
RW
8094(define-public python-anyjson
8095 (package
8096 (name "python-anyjson")
8097 (version "0.3.3")
8098 (source
8099 (origin
8100 (method url-fetch)
8101 (uri (pypi-uri "anyjson" version))
8102 (sha256
8103 (base32
8104 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
8105 (build-system python-build-system)
8106 (arguments
8107 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
8108 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
8109 ;; whatever) so this transformation needs to be done before the tests
8110 ;; can be run. Maybe we could add a build step to transform beforehand
8111 ;; but it could be annoying/difficult.
8112 ;; We can enable tests for the Python 2 version, though, and do below.
8113 #:tests? #f))
8114 (home-page "https://bitbucket.org/runeh/anyjson/")
8115 (synopsis
8116 "Wraps best available JSON implementation in a common interface")
8117 (description
8118 "Anyjson loads whichever is the fastest JSON module installed
8119and provides a uniform API regardless of which JSON implementation is used.")
8120 (license license:bsd-3)
8121 (properties `((python2-variant . ,(delay python2-anyjson))))))
8122
8123(define-public python2-anyjson
8124 (let ((anyjson (package-with-python2
8125 (strip-python2-variant python-anyjson))))
8126 (package
8127 (inherit anyjson)
8128 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
8129 #:tests? #t
8130 ,@(package-arguments anyjson)))
8131 (native-inputs `(("python2-nose" ,python2-nose))))))
8132
8133(define-public python-amqp
8134 (package
8135 (name "python-amqp")
8136 (version "2.3.2")
8137 (source
8138 (origin
8139 (method url-fetch)
8140 (uri (pypi-uri "amqp" version))
8141 (sha256
8142 (base32
8143 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
8144 (build-system python-build-system)
8145 (native-inputs
8146 `(("python-case" ,python-case)
8147 ("python-pytest-sugar" ,python-pytest-sugar)
8148 ("python-mock" ,python-mock)))
8149 (propagated-inputs
8150 `(("python-vine" ,python-vine)))
8151 (home-page "https://github.com/celery/py-amqp")
8152 (synopsis
8153 "Low-level AMQP client for Python (fork of amqplib)")
8154 (description
8155 "This is a fork of amqplib which was originally written by Barry Pederson.
8156It is maintained by the Celery project, and used by kombu as a pure python
8157alternative when librabbitmq is not available.")
8158 (license license:lgpl2.1+)
8159 (properties `((python2-variant . ,(delay python2-amqp))))))
8160
8161(define-public python2-amqp
8162 (let ((amqp (package-with-python2
8163 (strip-python2-variant python-amqp))))
8164 (package
8165 (inherit amqp)
8166 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
8167 ;; unmaintained. Weirdly, does not do this on the python 3
8168 ;; version?
8169 #:tests? #f
8170 ,@(package-arguments amqp))))))
8171
8172(define-public python-txamqp
8173 (package
8174 (name "python-txamqp")
8175 (version "0.8.2")
8176 (source
8177 (origin
8178 (method url-fetch)
8179 (uri (pypi-uri "txAMQP" version))
8180 (sha256
8181 (base32
8182 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
8183 (build-system python-build-system)
8184 (propagated-inputs
8185 `(("python-six" ,python-six)
8186 ("python-twisted" ,python-twisted)))
8187 (home-page "https://github.com/txamqp/txamqp")
8188 (synopsis "Communicate with AMQP peers and brokers using Twisted")
8189 (description
8190 "This package provides a Python library for communicating with AMQP peers
8191and brokers using the asynchronous networking framework Twisted. It contains
8192all the necessary code to connect, send and receive messages to/from an
8193AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
8194also includes support for using Thrift RPC over AMQP in Twisted
8195applications.")
8196 (license license:asl2.0)))
8197
8198(define-public python2-txamqp
8199 (package-with-python2 python-txamqp))
8200
8201(define-public python-kombu
8202 (package
8203 (name "python-kombu")
8204 (version "4.2.2")
8205 (source
8206 (origin
8207 (method url-fetch)
8208 (uri (pypi-uri "kombu" version))
8209 (sha256
8210 (base32
8211 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
8212 (build-system python-build-system)
8213 (native-inputs
8214 `(("python-mock" ,python-mock)
8215 ("python-case" ,python-case)
8216 ("python-pyro4" ,python-pyro4)
8217 ("python-pytest-sugar" ,python-pytest-sugar)
8218 ("python-pytz" ,python-pytz)))
8219 (propagated-inputs
8220 `(("python-anyjson" ,python-anyjson)
8221 ("python-amqp" ,python-amqp)
8222 ("python-redis" ,python-redis)))
8223 (home-page "https://kombu.readthedocs.io")
8224 (synopsis "Message passing library for Python")
8225 (description "The aim of Kombu is to make messaging in Python as easy as
8226possible by providing an idiomatic high-level interface for the AMQ protocol,
8227and also provide proven and tested solutions to common messaging problems.
8228AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
8229message orientation, queuing, routing, reliability and security, for which the
8230RabbitMQ messaging server is the most popular implementation.")
8231 (license license:bsd-3)
8232 (properties `((python2-variant . ,(delay python2-kombu))))))
8233
8234(define-public python2-kombu
8235 (let ((kombu (package-with-python2
8236 (strip-python2-variant python-kombu))))
8237 (package
8238 (inherit kombu)
8239 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
8240 ;; It works fine on the python3 variant.
8241 #:tests? #f
8242 ,@(package-arguments kombu)))
8243 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8244 ,@(package-native-inputs kombu))))))
8245
8246(define-public python-billiard
8247 (package
8248 (name "python-billiard")
8249 (version "3.5.0.5")
8250 (source
8251 (origin
8252 (method url-fetch)
8253 (uri (pypi-uri "billiard" version))
8254 (sha256
8255 (base32
8256 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
8257 (build-system python-build-system)
8258 (native-inputs
8259 `(("python-case" ,python-case)
8260 ("python-pytest" ,python-pytest)))
8261 (home-page "https://github.com/celery/billiard")
8262 (synopsis
8263 "Python multiprocessing fork with improvements and bugfixes")
8264 (description
8265 "Billiard is a fork of the Python 2.7 multiprocessing package. The
8266multiprocessing package itself is a renamed and updated version of R Oudkerk's
8267pyprocessing package. This standalone variant is intended to be compatible with
8268Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
8269 (license license:bsd-3)
8270 (properties `((python2-variant . ,(delay python2-billiard))))))
8271
8272(define-public python2-billiard
8273 (let ((billiard (package-with-python2
8274 (strip-python2-variant python-billiard))))
8275 (package
8276 (inherit billiard)
8277 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8278 ("python2-mock" ,python2-mock)
8279 ,@(package-native-inputs billiard))))))
8280
8281(define-public python-celery
8282 (package
8283 (name "python-celery")
8284 (version "4.2.1")
8285 (source
8286 (origin
8287 (method url-fetch)
8288 (uri (pypi-uri "celery" version))
8289 (sha256
8290 (base32
8291 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
8292 (build-system python-build-system)
8293 (arguments
8294 '(;; TODO The tests fail with Python 3.7
8295 ;; https://github.com/celery/celery/issues/4849
8296 #:tests? #f
8297 #:phases
8298 (modify-phases %standard-phases
8299 (add-after 'unpack 'patch-requirements
8300 (lambda _
8301 (substitute* "requirements/test.txt"
8302 (("pytest>=3\\.0,<3\\.3")
8303 "pytest>=3.0"))
8304 #t)))))
8305 (native-inputs
8306 `(("python-case" ,python-case)
8307 ("python-pytest" ,python-pytest)))
8308 (propagated-inputs
8309 `(("python-pytz" ,python-pytz)
8310 ("python-billiard" ,python-billiard)
8311 ("python-kombu" ,python-kombu)))
8312 (home-page "https://celeryproject.org")
8313 (synopsis "Distributed Task Queue")
8314 (description "Celery is an asynchronous task queue/job queue based on
8315distributed message passing. It is focused on real-time operation, but
8316supports scheduling as well. The execution units, called tasks, are executed
8317concurrently on a single or more worker servers using multiprocessing,
8318Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
8319synchronously (wait until ready).")
8320 (license license:bsd-3)
8321 (properties `((python2-variant . ,(delay python2-celery))))))
8322
8323(define-public python2-celery
8324 (let ((celery (package-with-python2
8325 (strip-python2-variant python-celery))))
8326 (package
8327 (inherit celery)
8328 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8329 ("python2-mock" ,python2-mock)
8330 ,@(package-native-inputs celery))))))
8331
8332(define-public python-translitcodec
8333 (package
8334 (name "python-translitcodec")
8335 (version "0.4.0")
8336 (source
8337 (origin
8338 (method url-fetch)
8339 (uri (pypi-uri "translitcodec" version))
8340 (sha256
8341 (base32
8342 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
8343 (build-system python-build-system)
8344 (arguments
8345 `(#:tests? #f)) ; no tests provided
8346 (home-page
8347 "https://github.com/claudep/translitcodec")
8348 (synopsis
8349 "Unicode to 8-bit charset transliteration codec")
8350 (description
8351 "This package contains codecs for transliterating ISO 10646 texts into
8352best-effort representations using smaller coded character sets (ASCII,
8353ISO 8859, etc.).")
8354 (license license:expat)))
8355
8356(define-public python2-translitcodec
8357 (package-with-python2 python-translitcodec))
8358
8359(define-public python-editor
8360 (package
8361 (name "python-editor")
8362 (version "0.5")
8363 (source
8364 (origin
8365 (method url-fetch)
8366 (uri (pypi-uri "python-editor" version))
8367 (sha256
8368 (base32
8369 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
8370 (build-system python-build-system)
8371 (home-page
8372 "https://github.com/fmoo/python-editor")
8373 (synopsis
8374 "Programmatically open an editor, capture the result")
8375 (description
8376 "python-editor is a library that provides the editor module for
8377programmatically interfacing with your system's $EDITOR.")
8378 (license license:asl2.0)))
8379
8380(define-public python2-editor
8381 (package-with-python2 python-editor))
8382
8383(define-public python-sphinxcontrib-programoutput
8384 (package
8385 (name "python-sphinxcontrib-programoutput")
8386 (version "0.10")
8387 (source (origin
8388 (method url-fetch)
8389 (uri (pypi-uri "sphinxcontrib-programoutput" version))
8390 (sha256
8391 (base32
8392 "153hhnlbx4688zj9wd64819ps5znc2jlyp5crkgzvn5hxgy99vpx"))))
8393 (build-system python-build-system)
8394 (arguments
8395 ;; FIXME: Many tests are failing and the upstream is gone.
8396 '(#:tests? #f))
8397 (propagated-inputs
8398 `(("python-sphinx" ,python-sphinx)))
8399 (synopsis "Sphinx extension to include program output")
8400 (description "A Sphinx extension to literally insert the output of arbitrary
8401commands into documents, helping you to keep your command examples up to date.")
8402 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
8403 (license license:bsd-2)))
8404
8405(define-public python2-sphinxcontrib-programoutput
8406 (package-with-python2 python-sphinxcontrib-programoutput))
8407
8408(define-public python-sphinx-repoze-autointerface
8409 (package
8410 (name "python-sphinx-repoze-autointerface")
8411 (version "0.8")
8412 (source (origin
8413 (method url-fetch)
8414 (uri (pypi-uri "repoze.sphinx.autointerface" version))
8415 (sha256
8416 (base32
8417 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
8418 (build-system python-build-system)
8419 (arguments '(#:tests? #f)) ; No tests.
8420 (propagated-inputs
8421 `(("python-sphinx" ,python-sphinx)
8422 ("python-zope-interface" ,python-zope-interface)))
8423 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
8424 (description "This package defines an extension for the Sphinx documentation
8425system. The extension allows generation of API documentation by
8426introspection of @code{zope.interface} instances in code.")
8427 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
8428 (license license:repoze)))
8429
8430(define-public python2-sphinx-repoze-autointerface
8431 (package-with-python2 python-sphinx-repoze-autointerface))
8432
8433(define-public python-vobject
8434 (package
8435 (name "python-vobject")
8436 (version "0.9.5")
8437 (source (origin
8438 (method url-fetch)
8439 (uri (pypi-uri "vobject" version))
8440 (sha256
8441 (base32
8442 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
8443 (build-system python-build-system)
8444 (arguments
8445 '(;; The test suite relies on some non-portable Windows interfaces.
8446 #:tests? #f))
8447 (propagated-inputs
8448 `(("python-dateutil" ,python-dateutil)
8449 ("python-pyicu" ,python-pyicu)))
8450 (synopsis "Parse and generate vCard and vCalendar files")
8451 (description "Vobject is intended to be a full featured Python package for
8452parsing and generating vCard and vCalendar files. Currently, iCalendar files
8453are supported and well tested. vCard 3.0 files are supported, and all data
8454should be imported, but only a few components are understood in a sophisticated
8455way.")
8456 (home-page "http://eventable.github.io/vobject/")
8457 (license license:asl2.0)))
8458
8459(define-public python2-vobject
8460 (package-with-python2 python-vobject))
8461
8462(define-public python-munkres
8463 (package
8464 (name "python-munkres")
8465 (version "1.0.8")
8466 (source (origin
8467 (method url-fetch)
8468 (uri (pypi-uri "munkres" version))
8469 (sha256
8470 (base32
8471 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
8472 (build-system python-build-system)
8473 (arguments
8474 '(#:tests? #f)) ; no test suite
8475 (home-page "http://software.clapper.org/munkres/")
8476 (synopsis "Implementation of the Munkres algorithm")
8477 (description "The Munkres module provides an implementation of the Munkres
8478algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
8479useful for solving the Assignment Problem.")
8480 (license license:bsd-3)))
8481
8482(define-public python2-munkres
8483 (package-with-python2 python-munkres))
8484
8485(define-public python-whoosh
8486 (package
8487 (name "python-whoosh")
8488 (version "2.7.4")
8489 (source
8490 (origin
8491 (method url-fetch)
8492 (uri (pypi-uri "Whoosh" version))
8493 (sha256
8494 (base32
8495 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
8496 (build-system python-build-system)
8497 (native-inputs
8498 `(("python-pytest" ,python-pytest)))
8499 (home-page "https://bitbucket.org/mchaput/whoosh")
8500 (synopsis "Full text indexing, search, and spell checking library")
8501 (description
8502 "Whoosh is a fast, pure-Python full text indexing, search, and spell
8503checking library.")
8504 (license license:bsd-2)))
8505
8506(define-public python2-whoosh
8507 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
8508 (package (inherit whoosh)
8509 (propagated-inputs
8510 `(("python2-backport-ssl-match-hostname"
8511 ,python2-backport-ssl-match-hostname)
8512 ,@(package-propagated-inputs whoosh))))))
8513
8514(define-public python-pathlib
8515 (package
8516 (name "python-pathlib")
8517 (version "1.0.1")
8518 (source (origin
8519 (method url-fetch)
8520 (uri (pypi-uri "pathlib" version))
8521 (sha256
8522 (base32
8523 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
8524 (build-system python-build-system)
8525 ;; The tests depend on the internal "test" module, which does not provide
8526 ;; a stable interface.
8527 (arguments `(#:tests? #f))
8528 (home-page "https://pathlib.readthedocs.org/")
8529 (synopsis "Object-oriented file system paths")
8530 (description "Pathlib offers a set of classes to handle file system paths.
8531It offers the following advantages over using string objects:
8532
8533@enumerate
8534@item No more cumbersome use of os and os.path functions. Everything can
8535be done easily through operators, attribute accesses, and method calls.
8536@item Embodies the semantics of different path types. For example,
8537comparing Windows paths ignores casing.
8538@item Well-defined semantics, eliminating any inconsistencies or
8539ambiguities (forward vs. backward slashes, etc.).
8540@end enumerate
8541
8542Note: In Python 3.4, pathlib is now part of the standard library. For other
8543Python versions please consider python-pathlib2 instead, which tracks the
8544standard library module. This module (python-pathlib) isn't maintained
8545anymore.")
8546 (license license:expat)))
8547
8548(define-public python2-pathlib
8549 (package-with-python2 python-pathlib))
8550
8551(define-public python2-pathlib2
8552 (package
8553 (name "python2-pathlib2")
8554 (version "2.3.2")
8555 (source (origin
8556 (method url-fetch)
8557 (uri (pypi-uri "pathlib2" version))
8558 (sha256
8559 (base32
8560 "10yb0iv5x2hs631rcppkhbddx799d3h8pcwmkbh2a66ns3w71ccf"))))
8561 (build-system python-build-system)
8562 ;; We only need the the Python 2 variant, since for Python 3 our minimum
8563 ;; version is 3.4 which already includes this package as part of the
8564 ;; standard library.
8565 (arguments
8566 `(#:python ,python-2))
8567 (propagated-inputs
8568 `(("python2-scandir" ,python2-scandir)
8569 ("python2-six" ,python2-six)))
8570 (home-page "https://pypi.python.org/pypi/pathlib2/")
8571 (synopsis "Object-oriented file system paths - backport of standard
8572pathlib module")
8573 (description "The goal of pathlib2 is to provide a backport of standard
8574pathlib module which tracks the standard library module, so all the newest
8575features of the standard pathlib can be used also on older Python versions.
8576
8577Pathlib offers a set of classes to handle file system paths. It offers the
8578following advantages over using string objects:
8579
8580@enumerate
8581@item No more cumbersome use of os and os.path functions. Everything can
8582be done easily through operators, attribute accesses, and method calls.
8583@item Embodies the semantics of different path types. For example,
8584comparing Windows paths ignores casing.
8585@item Well-defined semantics, eliminating any inconsistencies or
8586ambiguities (forward vs. backward slashes, etc.).
8587@end enumerate")
8588 (license license:expat)))
8589
8590(define-public python2-pathlib2-bootstrap
8591 (hidden-package
8592 (package
8593 (inherit python2-pathlib2)
8594 (name "python2-pathlib2-bootstrap")
8595 (propagated-inputs
8596 `(("python2-scandir" ,python2-scandir)
8597 ("python2-six" ,python2-six-bootstrap))))))
8598
8599(define-public python-jellyfish
8600 (package
8601 (name "python-jellyfish")
8602 (version "0.5.6")
8603 (source (origin
8604 (method url-fetch)
8605 (uri (pypi-uri "jellyfish" version))
8606 (sha256
8607 (base32
8608 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
8609 (build-system python-build-system)
8610 (native-inputs
8611 `(("python-pytest" ,python-pytest)))
8612 (home-page "https://github.com/jamesturk/jellyfish")
8613 (synopsis "Approximate and phonetic matching of strings")
8614 (description "Jellyfish uses a variety of string comparison and phonetic
8615encoding algorithms to do fuzzy string matching.")
8616 (license license:bsd-2)
8617 (properties `((python2-variant . ,(delay python2-jellyfish))))))
8618
8619(define-public python2-jellyfish
8620 (let ((jellyfish (package-with-python2
8621 (strip-python2-variant python-jellyfish))))
8622 (package (inherit jellyfish)
8623 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
8624 ,@(package-native-inputs jellyfish))))))
8625
8626(define-public python2-unicodecsv
8627 (package
8628 (name "python2-unicodecsv")
8629 (version "0.14.1")
8630 (source (origin
8631 (method url-fetch)
8632 ;; The test suite is not included in the PyPi release.
8633 ;; https://github.com/jdunck/python-unicodecsv/issues/19
8634 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
8635 "archive/" version ".tar.gz"))
8636 (file-name (string-append name "-" version ".tar.gz"))
8637 (sha256
8638 (base32
8639 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
8640 (build-system python-build-system)
8641 (arguments
8642 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
8643 #:python ,python-2))
8644 (native-inputs
8645 `(("python2-unittest2" ,python2-unittest2)))
8646 (home-page "https://github.com/jdunck/python-unicodecsv")
8647 (synopsis "Unicode CSV module for Python 2")
8648 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
8649module, adding support for Unicode strings.")
8650 (license license:bsd-2)))
8651
8652(define-public python-rarfile
8653 (package
8654 (name "python-rarfile")
8655 (version "2.8")
8656 (source (origin
8657 (method url-fetch)
8658 (uri (pypi-uri "rarfile" version))
8659 (sha256
8660 (base32
8661 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
8662 (build-system python-build-system)
8663 (arguments
8664 '(#:phases
8665 (modify-phases %standard-phases
8666 (replace 'check
8667 ;; Many tests fail, but the installation proceeds.
e59dd341 8668 (lambda _ (invoke "make" "-C" "test" "test"))))))
44d10b1f
RW
8669 (native-inputs
8670 `(("which" ,which))) ; required for tests
8671 (propagated-inputs
8672 `(("libarchive" ,libarchive)))
8673 (home-page "https://github.com/markokr/rarfile")
8674 (synopsis "RAR archive reader for Python")
8675 (description "This is Python module for RAR archive reading. The interface
8676is made as zipfile like as possible.")
8677 (license license:isc)))
8678
8679(define-public python2-rarfile
8680 (package-with-python2 python-rarfile))
8681
8682(define-public python-magic
8683 (package
8684 (name "python-magic")
8685 (version "0.4.15")
8686 (source
8687 (origin
8688 (method url-fetch)
8689 (uri (pypi-uri "python-magic" version))
8690 (sha256
8691 (base32
8692 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
8693 (file-name (string-append name "-" version "-checkout"))))
8694 (build-system python-build-system)
8695 (arguments
8696 ;; The tests are unreliable, so don't run them. The tests fail
8697 ;; under Python3 because they were written for Python2 and
8698 ;; contain import statements that do not work in Python3. One of
8699 ;; the tests fails under Python2 because its assertions are
8700 ;; overly stringent; it relies on comparing output strings which
8701 ;; are brittle and can change depending on the version of
8702 ;; libmagic being used and the system on which the test is
8703 ;; running. In my case, under GuixSD 0.10.0, only one test
8704 ;; failed, and it seems to have failed only because the version
8705 ;; of libmagic that is packaged in Guix outputs a slightly
8706 ;; different (but not wrong) string than the one that the test
8707 ;; expected.
8708 '(#:tests? #f
8709 #:phases (modify-phases %standard-phases
8710 ;; Replace a specific method call with a hard-coded
8711 ;; path to the necessary libmagic.so file in the
8712 ;; store. If we don't do this, then the method call
8713 ;; will fail to find the libmagic.so file, which in
8714 ;; turn will cause any application using
8715 ;; python-magic to fail.
8716 (add-before 'build 'hard-code-path-to-libmagic
8717 (lambda* (#:key inputs #:allow-other-keys)
8718 (let ((file (assoc-ref inputs "file")))
8719 (substitute* "magic.py"
8720 (("ctypes.util.find_library\\('magic'\\)")
8721 (string-append "'" file "/lib/libmagic.so'")))
8722 #t)))
8723 (add-before 'install 'disable-egg-compression
8724 (lambda _
8725 (let ((port (open-file "setup.cfg" "a")))
8726 (display "\n[easy_install]\nzip_ok = 0\n"
8727 port)
8728 (close-port port)
8729 #t))))))
8730 (inputs
8731 ;; python-magic needs to be able to find libmagic.so.
8732 `(("file" ,file)))
8733 (home-page
8734 "https://github.com/ahupp/python-magic")
8735 (synopsis
8736 "File type identification using libmagic")
8737 (description
8738 "This module uses ctypes to access the libmagic file type
8739identification library. It makes use of the local magic database and
8740supports both textual and MIME-type output. Note that this module and
8741the python-file module both provide a \"magic.py\" file; these two
8742modules, which are different and were developed separately, both serve
8743the same purpose: to provide Python bindings for libmagic.")
8744 (license license:expat)))
8745
8746(define-public python2-magic
8747 (package-with-python2 python-magic))
8748
8749(define-public python2-s3cmd
8750 (package
8751 (name "python2-s3cmd")
8752 (version "1.6.1")
8753 (source
8754 (origin
8755 (method url-fetch)
8756 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
8757 "s3cmd-" version ".tar.gz"))
8758 (sha256
8759 (base32
8760 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
8761 (build-system python-build-system)
8762 (arguments
8763 ;; s3cmd is written for python2 only and contains no tests.
8764 `(#:python ,python-2
8765 #:tests? #f))
8766 (propagated-inputs
8767 `(("python2-dateutil" ,python2-dateutil)
8768 ;; The python-file package also provides a magic.py module.
8769 ;; This is an unfortunate state of affairs; however, s3cmd
8770 ;; fails to install if it cannot find specifically the
8771 ;; python-magic package. Thus we include it, instead of using
8772 ;; python-file. Ironically, s3cmd sometimes works better
8773 ;; without libmagic bindings at all:
8774 ;; https://github.com/s3tools/s3cmd/issues/198
8775 ("python2-magic" ,python2-magic)))
8776 (home-page "http://s3tools.org/s3cmd")
8777 (synopsis "Command line tool for S3-compatible storage services")
8778 (description
8779 "S3cmd is a command line tool for uploading, retrieving and managing data
8780in storage services that are compatible with the Amazon Simple Storage
8781Service (S3) protocol, including S3 itself. It supports rsync-like backup,
8782GnuPG encryption, and more. It also supports management of Amazon's
8783CloudFront content delivery network.")
8784 (license license:gpl2+)))
8785
8786(define-public python-pkgconfig
8787 (package
8788 (name "python-pkgconfig")
8789 (version "1.3.1")
8790 (source
8791 (origin
8792 (method url-fetch)
8793 (uri (pypi-uri "pkgconfig" version))
8794 (sha256
8795 (base32
8796 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
8797 (build-system python-build-system)
8798 (native-inputs
8799 `(("python-nose" ,python-nose)))
8800 (inputs
8801 `(("pkg-config" ,pkg-config)))
8802 (arguments
8803 `(#:phases
8804 (modify-phases %standard-phases
8805 (add-before 'build 'patch
8806 ;; Hard-code the path to pkg-config.
8807 (lambda _
8808 (substitute* "pkgconfig/pkgconfig.py"
8809 (("cmd = 'pkg-config")
8810 (string-append "cmd = '" (which "pkg-config"))))
8811 #t))
8812 (replace 'check
8813 (lambda _
8814 (invoke "nosetests" "test.py"))))))
8815 (home-page "https://github.com/matze/pkgconfig")
8816 (synopsis "Python interface for pkg-config")
8817 (description "This module provides a Python interface to pkg-config. It
8818can be used to find all pkg-config packages, check if a package exists,
8819check if a package meets certain version requirements, query CFLAGS and
8820LDFLAGS and parse the output to build extensions with setup.py.")
8821 (license license:expat)))
8822
8823(define-public python2-pkgconfig
8824 (package-with-python2 python-pkgconfig))
8825
8826(define-public python-bz2file
8827 (package
8828 (name "python-bz2file")
8829 (version "0.98")
8830 (source
8831 (origin
8832 (method url-fetch)
8833 (uri (pypi-uri "bz2file" version))
8834 (sha256
8835 (base32
8836 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
8837 (build-system python-build-system)
8838 (arguments
8839 `(#:tests? #f)) ; Tests use deprecated python modules.
8840 (home-page "https://github.com/nvawda/bz2file")
8841 (synopsis "Read and write bzip2-compressed files")
8842 (description
8843 "Bz2file is a Python library for reading and writing bzip2-compressed
8844files. It contains a drop-in replacement for the I/O interface in the
8845standard library's @code{bz2} module, including features from the latest
8846development version of CPython that are not available in older releases.")
8847 (license license:asl2.0)))
8848
8849(define-public python2-bz2file
8850 (package-with-python2 python-bz2file))
8851
8852(define-public python-future
8853 (package
8854 (name "python-future")
8855 (version "0.16.0")
8856 (source
8857 (origin
8858 (method url-fetch)
8859 (uri (pypi-uri "future" version))
8860 (sha256
8861 (base32
8862 "1nzy1k4m9966sikp0qka7lirh8sqrsyainyf8rk97db7nwdfv773"))))
8863 (build-system python-build-system)
8864 ;; Many tests connect to the network or are otherwise flawed.
8865 ;; https://github.com/PythonCharmers/python-future/issues/210
8866 (arguments
8867 `(#:tests? #f))
8868 (home-page "http://python-future.org")
8869 (synopsis "Single-source support for Python 3 and 2")
8870 (description
8871 "@code{python-future} is the missing compatibility layer between Python 2 and
8872Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
8873to support both Python 2 and Python 3 with minimal overhead.")
8874 (license license:expat)))
8875
8876(define-public python2-future
8877 (package-with-python2 python-future))
8878
8879(define-public python-cysignals
8880 (package
8881 (name "python-cysignals")
8e3e51df 8882 (version "1.9.0")
44d10b1f
RW
8883 (source
8884 (origin
8885 (method url-fetch)
8e3e51df 8886 (uri (pypi-uri "cysignals" version))
44d10b1f
RW
8887 (sha256
8888 (base32
8e3e51df 8889 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
44d10b1f
RW
8890 (build-system python-build-system)
8891 (native-inputs
8892 `(("python-cython" ,python-cython)
8893 ("python-sphinx" ,python-sphinx)))
8894 (inputs
8895 `(("pari-gp" ,pari-gp)))
8896 (arguments
8897 `(#:modules ((guix build python-build-system)
8898 ((guix build gnu-build-system) #:prefix gnu:)
8899 (guix build utils))
8900 ;; FIXME: Tests are executed after installation and currently fail
8901 ;; when not installing into standard locations; the author is working
8902 ;; on a fix.
8903 #:tests? #f
8904 #:phases
8905 (modify-phases %standard-phases
8906 (add-before
8907 'build 'configure
8908 (assoc-ref gnu:%standard-phases 'configure)))))
8909 (home-page
8910 "https://github.com/sagemath/cysignals")
8911 (synopsis
8912 "Handling of interrupts and signals for Cython")
8913 (description
8914 "The cysignals package provides mechanisms to handle interrupts (and
8915other signals and errors) in Cython code, using two related approaches,
8916for mixed Cython/Python code or external C libraries and pure Cython code,
8917respectively.")
8918 (license license:lgpl3+)))
8919
8920(define-public python2-cysignals
8921 (package-with-python2 python-cysignals))
8922
8923(define-public python2-shedskin
8924 (package
8925 (name "python2-shedskin")
8926 (version "0.9.4")
8927 (source
8928 (origin
8929 (method url-fetch)
8930 (uri (string-append "https://github.com/shedskin/shedskin/"
8931 "releases/download/v" version
8932 "/shedskin-" version ".tgz"))
8933 (sha256
8934 (base32
8935 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
8936 (build-system python-build-system)
8937 (arguments
8938 `(#:python ,python-2
8939 #:phases (modify-phases %standard-phases
8940 (add-after 'unpack 'fix-resulting-include-libs
8941 (lambda* (#:key inputs #:allow-other-keys)
8942 (let ((libgc (assoc-ref inputs "libgc"))
8943 (pcre (assoc-ref inputs "pcre")))
8944 (substitute* "shedskin/makefile.py"
8945 (("variable == 'CCFLAGS':[ ]*")
8946 (string-append "variable == 'CCFLAGS':\n"
8947 " line += ' -I " pcre "/include"
8948 " -I " libgc "/include'"))
8949 (("variable == 'LFLAGS':[ ]*")
8950 (string-append "variable == 'LFLAGS':\n"
8951 " line += ' -L" pcre "/lib"
8952 " -L " libgc "/lib'")))
8953 #t))))))
8954 (inputs `(("pcre" ,pcre)
8955 ("libgc" ,libgc)))
8956 (home-page "https://shedskin.github.io/")
8957 (synopsis "Experimental Python-2 to C++ Compiler")
8958 (description (string-append "This is an experimental compiler for a subset of
8959Python. It generates C++ code and a Makefile."))
8960 (license (list license:gpl3 license:bsd-3 license:expat))))
8961
8962(define-public python2-rope
8963 (package
8964 (name "python2-rope")
a9ba0a31 8965 (version "0.11.0")
44d10b1f
RW
8966 (source
8967 (origin
8968 (method url-fetch)
8969 (uri (pypi-uri "rope" version))
8970 (sha256
8971 (base32
a9ba0a31 8972 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
44d10b1f 8973 (arguments
afb29715 8974 ;; Rope has only partial python3 support, see `python-rope'
44d10b1f
RW
8975 `(#:python ,python-2))
8976 (build-system python-build-system)
8977 (native-inputs
8978 `(("python2-unittest2" ,python2-unittest2)))
8979 (home-page "https://github.com/python-rope/rope")
8980 (synopsis "Refactoring library for Python")
8981 (description "Rope is a refactoring library for Python. It facilitates
8982the renaming, moving and extracting of attributes, functions, modules, fields
8983and parameters in Python 2 source code. These refactorings can also be applied
8984to occurrences in strings and comments.")
8985 (license license:gpl2)))
8986
2c880ef4
LC
8987(define-public python-rope
8988 (package
8989 (inherit python2-rope)
8990 (name "python-rope")
8991 (arguments `(#:python ,python-wrapper
8992 ;; XXX: Only partial python3 support, results in some failing
8993 ;; tests: <https://github.com/python-rope/rope/issues/247>.
8994 #:tests? #f))
8995 (properties `((python2-variant . ,(delay python2-rope))))))
8996
44d10b1f
RW
8997(define-public python-py3status
8998 (package
8999 (name "python-py3status")
9000 (version "3.7")
9001 (source
9002 (origin
9003 (method url-fetch)
9004 (uri (pypi-uri "py3status" version))
9005 (sha256
9006 (base32
9007 "0shxcfz4wcczj0mhwp4w0dvwd2fdd9bgprq8slim1519iiqzgwhq"))))
9008 (build-system python-build-system)
9009 (inputs
9010 `(("file" ,file)))
9011 (arguments
9012 '(#:phases
9013 (modify-phases %standard-phases
9014 ;; 'file' is used for detection of configuration file encoding
9015 ;; let's make link the dependency to particular input
9016 (add-before 'build 'patch-file-path
9017 (lambda* (#:key inputs #:allow-other-keys)
9018 (let ((file-path (assoc-ref inputs "file")))
9019 (substitute* "py3status/parse_config.py"
9020 (("\\['file', '-b'")
9021 (string-append "['" file-path "/bin/file', '-b'")))
9022 #t))))
9023 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
9024 (home-page "https://github.com/ultrabug/py3status")
9025 (synopsis "Extensible i3status wrapper written in Python")
9026 (description "py3status is an i3status wrapper which extends i3status
9027functionality in a modular way, allowing you to extend your panel with your
9028own code, responding to click events and updating clock every second.")
9029 (license license:bsd-3)))
9030
9031(define-public python-tblib
9032 (package
9033 (name "python-tblib")
9034 (version "1.3.2")
9035 (source (origin
9036 (method url-fetch)
9037 (uri (pypi-uri "tblib" version))
9038 (sha256 (base32
9039 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
9040 (build-system python-build-system)
9041 (arguments
9042 `(#:phases
9043 (modify-phases %standard-phases
9044 (add-before 'check 'adjust-tests
9045 (lambda _
9046 (when (which "python3")
9047 ;; Adjust the example output to match that of Python 3.7:
9048 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
9049 (substitute* "README.rst"
9050 (("Exception\\('fail',") "Exception('fail'"))
9051 #t)))
9052 (replace 'check
9053 (lambda _
9054 ;; Upstream runs tests after installation and the package itself
9055 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
9056 ;; found.
9057 (setenv "PYTHONPATH"
9058 (string-append (getcwd) "/build/lib:"
9059 (getenv "PYTHONPATH")))
9060 (invoke "py.test" "-vv" "tests" "README.rst"))))))
9061 (native-inputs
9062 `(("python-pytest" ,python-pytest)
9063 ("python-six" ,python-six)))
9064 (home-page "https://github.com/ionelmc/python-tblib")
9065 (synopsis "Traceback serialization library")
9066 (description
9067 "Traceback serialization allows you to:
9068
9069@enumerate
9070@item Pickle tracebacks and raise exceptions with pickled tracebacks in
9071different processes. This allows better error handling when running code over
9072multiple processes (imagine multiprocessing, billiard, futures, celery etc).
9073
9074@item Parse traceback strings and raise with the parsed tracebacks.
9075@end enumerate\n")
9076 (license license:bsd-3)))
9077
9078(define-public python2-tblib
9079 (package-with-python2 python-tblib))
9080
9081(define-public python-greenlet
9082 (package
9083 (name "python-greenlet")
9084 (version "0.4.15")
9085 (source (origin
9086 (method url-fetch)
9087 (uri (pypi-uri "greenlet" version))
9088 (sha256
9089 (base32
9090 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
9091 (build-system python-build-system)
9092 (home-page "https://greenlet.readthedocs.io/")
9093 (synopsis "Lightweight in-process concurrent programming")
9094 (description
9095 "Greenlet package is a spin-off of Stackless, a version of CPython
9096that supports micro-threads called \"tasklets\". Tasklets run
9097pseudo-concurrently (typically in a single or a few OS-level threads) and
9098are synchronized with data exchanges on \"channels\".")
9099 (license (list license:psfl license:expat))))
9100
9101(define-public python2-greenlet
9102 (package-with-python2 python-greenlet))
9103
9104(define-public python-objgraph
9105 (package
9106 (name "python-objgraph")
9107 (version "3.4.0")
9108 (source
9109 (origin
9110 (method url-fetch)
9111 (uri (pypi-uri "objgraph" version))
9112 (sha256
9113 (base32
9114 "184m09am5gpbqfaiy7l0hwh476mczbrly1dffs0rw2p1d1i2q32a"))))
9115 (build-system python-build-system)
9116 (propagated-inputs
9117 `(("python-graphviz" ,python-graphviz)))
9118 (native-inputs
9119 `(("python-mock" ,python-mock)
9120 ("graphviz" ,graphviz)))
9121 (home-page "https://mg.pov.lt/objgraph/")
9122 (synopsis "Draw Python object reference graphs with graphviz")
9123 (description
9124 "This package provides tools to draw Python object reference graphs with
9125graphviz.")
9126 (license license:expat)))
9127
9128(define-public python-gevent
9129 (package
9130 (name "python-gevent")
9131 (version "1.3.7")
9132 (source (origin
9133 (method url-fetch)
9134 (uri (pypi-uri "gevent" version))
9135 (sha256
9136 (base32
9137 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
9138 (modules '((guix build utils)))
9139 (snippet
9140 '(begin
9141 ;; unbunding libev and c-ares
9142 (delete-file-recursively "deps")
9143 #t))))
9144 (build-system python-build-system)
9145 (arguments
9146 `(#:modules ((ice-9 ftw)
9147 (ice-9 match)
9148 (srfi srfi-26)
9149 (guix build utils)
9150 (guix build python-build-system))
9151 #:phases (modify-phases %standard-phases
9152 (add-after 'unpack 'unpack-libev
9153 (lambda* (#:key inputs #:allow-other-keys)
9154 (mkdir-p "deps/libev")
9155 ;; FIXME: gevent requires building libev, even though
9156 ;; it only links against the proper one.
9157 (invoke "tar" "-xf" (assoc-ref inputs "libev-source")
9158 "--strip-components=1" "-C" "deps/libev")))
9159 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
9160 (lambda _
9161 (substitute* "src/gevent/subprocess.py"
9162 (("/bin/sh") (which "sh")))
9163 (for-each (lambda (file)
9164 (substitute* file
9165 (("/bin/sh") (which "sh"))
9166 (("/bin/true") (which "true"))))
9167 (find-files "src/greentest" "\\.py$"))
9168 #t))
9169 (add-before 'build 'do-not-use-bundled-sources
9170 (lambda* (#:key inputs #:allow-other-keys)
9171 (setenv "CONFIG_SHELL" (which "bash"))
9172 (setenv "LIBEV_EMBED" "false")
9173 (setenv "CARES_EMBED" "false")
9174 (setenv "EMBED" "false")
9175
9176 (let ((greenlet (string-append
9177 (assoc-ref inputs "python-greenlet")
9178 "/include")))
9179 (match (scandir greenlet
9180 (lambda (item)
9181 (string-prefix? "python" item)))
9182 ((python)
9183 (setenv "CPATH"
9184 (string-append greenlet "/" python)))))
9185 #t))
9186 (add-before 'check 'skip-timer-test
9187 (lambda _
9188 ;; XXX: Skip 'TestTimerResolution', which appears to be
9189 ;; unreliable.
9190 (substitute* "src/greentest/test__core_timer.py"
9191 (("not greentest.RUNNING_ON_CI") "False"))
9192 #t))
9193 (replace 'check
9194 (lambda _
9195 ;; Make sure the build directory is on PYTHONPATH.
9196 (setenv "PYTHONPATH"
9197 (string-append
9198 (getenv "PYTHONPATH") ":"
9199 (getcwd) "/build/"
9200 (car (scandir "build" (cut string-prefix? "lib." <>)))))
9201 (with-directory-excursion "src/greentest"
9202 ;; XXX: Many tests require network access. Instead we only
9203 ;; run known-good tests. Unfortunately we cannot use
9204 ;; recursion here since this directory also contains
9205 ;; Python-version-specific subfolders.
9206 (apply invoke "python" "testrunner.py" "--config"
9207 "known_failures.py"
9208 (scandir "." (cut regexp-exec
9209 (make-regexp "test_+(subprocess|core)")
9210 <>)))))))))
9211 (propagated-inputs
9212 `(("python-greenlet" ,python-greenlet)
9213 ("python-objgraph" ,python-objgraph)))
9214 (native-inputs
9215 `(("libev-source" ,(package-source libev))
9216 ("python-six" ,python-six)))
9217 (inputs
9218 `(("c-ares" ,c-ares)
9219 ("libev" ,libev)))
9220 (home-page "http://www.gevent.org/")
9221 (synopsis "Coroutine-based network library")
9222 (description
9223 "gevent is a coroutine-based Python networking library that uses greenlet
9224to provide a high-level synchronous API on top of the libev event loop.")
9225 (license license:expat)
9226 (properties `((python2-variant . ,(delay python2-gevent))))))
9227
9228(define-public python2-gevent
9229 (let ((base (package-with-python2
9230 (strip-python2-variant python-gevent))))
9231 (package
9232 (inherit base)
9233 (native-inputs `(,@(package-native-inputs python-gevent)
9234 ("python-mock" ,python2-mock))))))
9235
9236(define-public python-fastimport
9237 (package
9238 (name "python-fastimport")
9239 (version "0.9.6")
9240 (source
9241 (origin
9242 (method url-fetch)
9243 (uri (pypi-uri "fastimport" version))
9244 (sha256
9245 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
9246 (build-system python-build-system)
9247 (home-page "https://github.com/jelmer/python-fastimport")
9248 (synopsis "VCS fastimport parser and generator in Python")
9249 (description "This package provides a parser for and generator of the Git
9250@url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
9251format.")
9252 (license license:gpl2+)))
9253
9254(define-public python2-fastimport
9255 (package-with-python2 python-fastimport))
9256
9257(define-public python-twisted
9258 (package
9259 (name "python-twisted")
e5ba2fe3 9260 (version "17.5.0")
44d10b1f
RW
9261 (source (origin
9262 (method url-fetch)
9263 (uri (pypi-uri "Twisted" version ".tar.bz2"))
9264 (sha256
9265 (base32
e5ba2fe3 9266 "1sh2h23nnizcdyrl2rn7zxijglikxwz7z7grqpvq496zy2aa967i"))))
44d10b1f
RW
9267 (build-system python-build-system)
9268 (arguments
9269 '(#:tests? #f)) ; FIXME: Some tests are failing.
9270 ;; #:phases
9271 ;; (modify-phases %standard-phases
9272 ;; (replace 'check
9273 ;; (lambda _
9274 ;; (zero? (system* "./bin/trial" "twisted")))))
9275 (propagated-inputs
9276 `(("python-zope-interface" ,python-zope-interface)
9277 ("python-incremental" ,python-incremental)
e5ba2fe3 9278 ("python-hyperlink" ,python-hyperlink)
44d10b1f
RW
9279 ("python-constantly" ,python-constantly)
9280 ("python-automat" ,python-automat)))
9281 (home-page "https://twistedmatrix.com/")
9282 (synopsis "Asynchronous networking framework written in Python")
9283 (description
9284 "Twisted is an extensible framework for Python programming, with special
9285focus on event-based network programming and multiprotocol integration.")
9286 (license license:expat)))
9287
9288(define-public python2-twisted
9289 (package-with-python2 python-twisted))
9290
9291(define-public python-pika
9292 (package
9293 (name "python-pika")
9294 (version "0.12.0")
9295 (source
9296 (origin
9297 (method url-fetch)
9298 (uri (pypi-uri "pika" version))
9299 (sha256
9300 (base32
9301 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
9302 (build-system python-build-system)
9303 (native-inputs
9304 `(("python-pyev" ,python-pyev)
9305 ("python-tornado" ,python-tornado)
9306 ("python-twisted" ,python-twisted)))
9307 (home-page "https://pika.readthedocs.org")
9308 (synopsis "Pure Python AMQP Client Library")
9309 (description
9310 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
9311Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
9312network support library.")
9313 (license license:bsd-3)))
9314
9315(define-public python2-pika
9316 (package-with-python2 python-pika))
9317
9318(define-public python-ply
9319 (package
9320 (name "python-ply")
9321 (version "3.10")
9322 (source
9323 (origin
9324 (method url-fetch)
9325 (uri (pypi-uri "ply" version))
9326 (sha256
9327 (base32
9328 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
9329 (build-system python-build-system)
9330 (home-page "http://www.dabeaz.com/ply/")
9331 (synopsis "Python Lex & Yacc")
9332 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
9333It uses LR parsing and does extensive error checking.")
9334 (license license:bsd-3)))
9335
9336(define-public python2-ply
9337 (package-with-python2 python-ply))
9338
9339(define-public python-tabulate
9340 (package
9341 (name "python-tabulate")
9342 (version "0.7.7")
9343 (source (origin
9344 (method url-fetch)
9345 (uri (pypi-uri "tabulate" version))
9346 (sha256
9347 (base32
9348 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
9349 (build-system python-build-system)
9350 (arguments
9351 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
9352 ;; and the latest release is not tagged in the upstream repository.
9353 '(#:tests? #f))
9354 (home-page "https://bitbucket.org/astanin/python-tabulate")
9355 (synopsis "Pretty-print tabular data")
9356 (description
9357 "Tabulate is a library and command-line utility to pretty-print tabular
9358data in Python.")
9359 (license license:expat)))
9360
9361(define-public python2-tabulate
9362 (package-with-python2 python-tabulate))
9363
9364(define-public python-kazoo
9365 (package
9366 (name "python-kazoo")
9367 (version "2.4.0")
9368 (source
9369 (origin
9370 (method url-fetch)
9371 (uri (pypi-uri "kazoo" version))
9372 (sha256
9373 (base32
9374 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
9375 (build-system python-build-system)
9376 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
9377 (propagated-inputs
9378 `(("python-six" ,python-six)))
9379 (home-page "https://kazoo.readthedocs.org")
9380 (synopsis "High-level Zookeeper client library")
9381 (description
9382 "Kazoo is a Python client library for the Apache Zookeeper distributed
9383application service. It is designed to be easy to use and to avoid common
9384programming errors.")
9385 (license license:asl2.0)))
9386
9387(define-public python2-kazoo
9388 (package-with-python2 python-kazoo))
9389
9390(define-public python-pykafka
9391 (package
9392 (name "python-pykafka")
9393 (version "2.4.0")
9394 (source (origin
9395 (method url-fetch)
0ca1d040 9396 (uri (pypi-uri "pykafka" version))
44d10b1f
RW
9397 (sha256
9398 (base32
9399 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
9400 (build-system python-build-system)
9401 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
9402 (propagated-inputs
9403 `(("python-gevent" ,python-gevent)
9404 ("python-kazoo" ,python-kazoo)
9405 ("python-tabulate" ,python-tabulate)))
9406 (inputs
9407 `(("librdkafka" ,librdkafka)))
9408 (home-page "https://pykafka.readthedocs.io/")
9409 (synopsis "Apache Kafka client for Python")
9410 (description
9411 "PyKafka is a client for the Apache Kafka distributed messaging system.
9412It includes Python implementations of Kafka producers and consumers, which
9413are optionally backed by a C extension built on librdkafka.")
9414 (license license:asl2.0)))
9415
9416(define-public python2-pykafka
9417 (package-with-python2 python-pykafka))
9418
9419(define-public python-wcwidth
9420 (package
9421 (name "python-wcwidth")
9422 (version "0.1.7")
9423 (source
9424 (origin
9425 (method url-fetch)
9426 (uri (pypi-uri "wcwidth" version))
9427 (sha256
9428 (base32
9429 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
9430 (build-system python-build-system)
9431 (home-page "https://github.com/jquast/wcwidth")
9432 (synopsis "Measure number of terminal column cells of wide-character codes")
9433 (description "Wcwidth measures the number of terminal column cells of
9434wide-character codes. It is useful for those implementing a terminal emulator,
9435or programs that carefully produce output to be interpreted by one. It is a
9436Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
9437specified in POSIX.1-2001 and POSIX.1-2008.")
9438 (license license:expat)))
9439
9440(define-public python2-wcwidth
9441 (package-with-python2 python-wcwidth))
9442
9443(define-public python2-jsonrpclib
9444 (package
9445 (name "python2-jsonrpclib")
9446 (version "0.1.7")
9447 (source (origin
9448 (method url-fetch)
6571bba0 9449 (uri (pypi-uri "jsonrpclib" version))
44d10b1f
RW
9450 (sha256
9451 (base32
9452 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
9453 (build-system python-build-system)
9454 (arguments
9455 `(#:tests? #f
9456 #:python ,python-2))
9457 (home-page "https://github.com/joshmarshall/jsonrpclib/")
9458 (synopsis "Implementation of JSON-RPC specification for Python")
9459 (description
9460 "This library is an implementation of the JSON-RPC specification.
9461It supports both the original 1.0 specification, as well as the
9462new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
9463etc.")
9464 (license license:asl2.0)))
9465
9466(define-public python-chai
9467 (package
9468 (name "python-chai")
9469 (version "1.1.2")
9470 (source (origin
9471 (method url-fetch)
9472 (uri (pypi-uri "chai" version))
9473 (sha256
9474 (base32
9475 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
9476 (build-system python-build-system)
9477 (home-page "https://github.com/agoragames/chai")
9478 (synopsis "Mocking framework for Python")
9479 (description
9480 "Chai provides an api for mocking, stubbing and spying your python
9481objects, patterned after the Mocha library for Ruby.")
9482 (license license:bsd-3)))
9483
9484(define-public python2-chai
9485 (package-with-python2 python-chai))
9486
9487(define-public python-inflection
9488 (package
9489 (name "python-inflection")
9490 (version "0.3.1")
9491 (source
9492 (origin (method url-fetch)
9493 (uri (pypi-uri "inflection" version))
9494 (sha256
9495 (base32
9496 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
9497 (build-system python-build-system)
9498 (native-inputs
9499 `(("python-pytest" ,python-pytest)))
9500 (home-page "https://github.com/jpvanhal/inflection")
9501 (synopsis "Python string transformation library")
9502 (description
9503 "Inflection is a string transformation library. It singularizes
9504and pluralizes English words, and transforms strings from CamelCase to
9505underscored string.")
9506 (license license:expat)))
9507
9508(define-public python2-inflection
9509 (package-with-python2 python-inflection))
9510
9511(define-public python-pylev
9512 (package
9513 (name "python-pylev")
9514 (version "1.3.0")
9515 (source (origin
9516 (method url-fetch)
9517 (uri (pypi-uri "pylev" version))
9518 (sha256
9519 (base32
9520 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
9521 (build-system python-build-system)
9522 (home-page "https://github.com/toastdriven/pylev")
9523 (synopsis "Levenshtein distance implementation in Python")
9524 (description "Pure Python Levenshtein implementation, based off the
9525Wikipedia code samples at
9526@url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
9527 (license license:bsd-3)))
9528
9529(define-public python2-pylev
9530 (package-with-python2 python-pylev))
9531
9532(define-public python-cleo
9533 (package
9534 (name "python-cleo")
9535 (version "0.6.1")
9536 (source (origin
9537 (method url-fetch)
9538 (uri (pypi-uri "cleo" version))
9539 (sha256
9540 (base32
9541 "0q1cf0szr0d54am4pypzwdnm74zpladdsinad94c2fz5i06fdpf7"))))
9542 (build-system python-build-system)
9543 (native-inputs
9544 `(;; For testing
9545 ("python-mock" ,python-mock)
9546 ("python-pytest-mock" ,python-pytest-mock)
9547 ("python-pytest" ,python-pytest)))
9548 (propagated-inputs
9549 `(("python-backpack" ,python-backpack)
9550 ("python-pastel" ,python-pastel)
9551 ("python-pylev" ,python-pylev)))
9552 (home-page "https://github.com/sdispater/cleo")
9553 (synopsis "Command-line arguments library for Python")
9554 (description
9555 "Cleo allows you to create command-line commands with signature in
9556docstring and colored output.")
9557 (license license:expat)))
9558
9559(define-public python2-cleo
9560 (package-with-python2 python-cleo))
9561
9562(define-public python-lazy-object-proxy
9563 (package
9564 (name "python-lazy-object-proxy")
9565 (version "1.3.1")
9566 (source (origin
9567 (method url-fetch)
9568 (uri (pypi-uri "lazy-object-proxy" version))
9569 (sha256
9570 (base32
9571 "0yha7q9bhw857fwaby785d63mffhngl9npwzlk9i0pwlkwvbx4gb"))))
9572 (build-system python-build-system)
9573 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
9574 (synopsis "Lazy object proxy for python")
9575 (description
9576 "Lazy object proxy is an object that wraps a callable but defers the call
9577until the object is actually required, and caches the result of said call.")
9578 (license license:bsd-2)))
9579
9580(define-public python2-lazy-object-proxy
9581 (package-with-python2 python-lazy-object-proxy))
9582
9583(define-public python-dnspython
9584 (package
9585 (name "python-dnspython")
9586 (version "1.15.0")
9587 (source (origin
9588 (method url-fetch)
9589 (uri (string-append "http://www.dnspython.org/kits/"
9590 version "/dnspython-" version ".tar.gz"))
9591 (sha256
9592 (base32
9593 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
9594 (build-system python-build-system)
9595 (arguments '(#:tests? #f)) ; XXX: requires internet access
9596 (home-page "http://www.dnspython.org")
9597 (synopsis "DNS toolkit for Python")
9598 (description
9599 "dnspython is a DNS toolkit for Python. It supports almost all record
9600types. It can be used for queries, zone transfers, and dynamic updates.
9601It supports TSIG authenticated messages and EDNS0.")
9602 (license license:expat)))
9603
9604(define-public python2-dnspython
9605 (package-with-python2 python-dnspython))
9606
9607(define-public python-email-validator
9608 (package
9609 (name "python-email-validator")
9610 (version "1.0.2")
9611 (source
9612 (origin (method url-fetch)
9613 (uri (pypi-uri "email_validator" version))
9614 (sha256
9615 (base32
9616 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
9617 (build-system python-build-system)
9618 (arguments
9619 '(#:phases
9620 (modify-phases %standard-phases
9621 (add-before 'build 'use-dnspython
9622 (lambda _
9623 (substitute* "setup.py"
9624 (("dnspython3") "dnspython"))
9625 #t)))))
9626 (propagated-inputs
9627 `(("python-dnspython" ,python-dnspython)
9628 ("python-idna" ,python-idna)))
9629 (home-page "https://github.com/JoshData/python-email-validator")
9630 (synopsis "Email address validation library for Python")
9631 (description
9632 "This library validates email address syntax and deliverability.")
9633 (license license:cc0)))
9634
9635(define-public python2-email-validator
9636 (package-with-python2 python-email-validator))
9637
9638(define-public python-ukpostcodeparser
9639 (package
9640 (name "python-ukpostcodeparser")
9641 (version "1.0.3")
9642 (source (origin
9643 (method url-fetch)
9644 (uri (pypi-uri "UkPostcodeParser" version))
9645 (sha256
9646 (base32
9647 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
9648 (build-system python-build-system)
9649 (home-page "https://github.com/hamstah/ukpostcodeparser")
9650 (synopsis "UK Postcode parser for Python")
9651 (description
9652 "This library provides the @code{parse_uk_postcode} function for
9653parsing UK postcodes.")
9654 (license license:expat)))
9655
9656(define-public python2-ukpostcodeparser
9657 (package-with-python2 python-ukpostcodeparser))
9658
9659(define-public python-faker
9660 (package
9661 (name "python-faker")
9662 (version "0.7.9")
9663 (source (origin
9664 (method url-fetch)
9665 (uri (pypi-uri "Faker" version))
9666 (sha256
9667 (base32
9668 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
9669 (patches
9670 (search-patches "python-faker-fix-build-32bit.patch"))
9671 (modules '((guix build utils)))
9672 (snippet
9673 '(begin
9674 (for-each delete-file (find-files "." "\\.pyc$"))
9675 #t))))
9676 (build-system python-build-system)
9677 (arguments
9678 '(#:phases
9679 (modify-phases %standard-phases
9680 (replace 'check
49ff8827 9681 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
44d10b1f
RW
9682 (native-inputs
9683 `(;; For testing
9684 ("python-email-validator" ,python-email-validator)
9685 ("python-mock" ,python-mock)
9686 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
9687 (propagated-inputs
9688 `(("python-dateutil" ,python-dateutil)
9689 ("python-six" ,python-six)))
9690 (home-page "https://github.com/joke2k/faker")
9691 (synopsis "Python package that generates fake data")
9692 (description
9693 "Faker is a Python package that generates fake data such as names,
9694addresses, and phone numbers.")
9695 (license license:expat)
9696 (properties `((python2-variant . ,(delay python2-faker))))))
9697
9698(define-public python2-faker
9699 (let ((base (package-with-python2 (strip-python2-variant
9700 python-faker))))
9701 (package
9702 (inherit base)
9703 (propagated-inputs
9704 `(("python2-ipaddress" ,python2-ipaddress)
9705 ,@(package-propagated-inputs base))))))
9706
9707(define-public python-pyaml
9708 (package
9709 (name "python-pyaml")
9710 (version "18.11.0")
9711 (source (origin
9712 (method url-fetch)
9713 (uri (pypi-uri "pyaml" version))
9714 (sha256
9715 (base32
9716 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
9717 (build-system python-build-system)
9718 (native-inputs
9719 `(("python-unidecode" ,python-unidecode)))
9720 (propagated-inputs
9721 `(("python-pyyaml" ,python-pyyaml)))
9722 (home-page "https://github.com/mk-fg/pretty-yaml")
9723 (synopsis "YAML pretty-print library for Python")
9724 (description
9725 "pyaml is a PyYAML based python module to produce pretty and readable
9726YAML-serialized data.")
9727 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
9728
9729(define-public python2-pyaml
9730 (package-with-python2 python-pyaml))
9731
9732(define-public python-backpack
9733 (package
9734 (name "python-backpack")
9735 (version "0.1")
9736 (source
9737 (origin
9738 (method url-fetch)
9739 (uri (pypi-uri "backpack" version))
9740 (sha256
9741 (base32
9742 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
9743 (build-system python-build-system)
9744 (native-inputs
9745 `(("python-pytest" ,python-pytest)
9746 ("python-nose" ,python-nose)))
9747 (propagated-inputs
9748 `(("python-simplejson" ,python-simplejson)))
9749 (home-page "https://github.com/sdispater/backpack")
9750 (synopsis "Utilities for working with Python collections")
9751 (description "Backpack provides some useful utilities for working with
9752collections of data.")
9753 (license license:expat)))
9754
9755(define-public python2-backpack
9756 (package-with-python2 python-backpack))
9757
9758(define-public python-prompt-toolkit
9759 (package
9760 (name "python-prompt-toolkit")
9761 (version "2.0.7")
9762 (source
9763 (origin
9764 (method url-fetch)
9765 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
9766 (sha256
9767 (base32
9768 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
9769 (build-system python-build-system)
9770 (arguments
9771 `(#:phases
9772 (modify-phases %standard-phases
9773 (delete 'check)
9774 (add-after 'install 'post-install-check
9775 (lambda* (#:key inputs outputs #:allow-other-keys)
9776 ;; HOME is needed for the test
9777 ;; "test_pathcompleter_can_expanduser".
9778 (setenv "HOME" "/tmp")
9779 (add-installed-pythonpath inputs outputs)
9780 (invoke "py.test"))))))
9781 (propagated-inputs
9782 `(("python-wcwidth" ,python-wcwidth)
9783 ("python-six" ,python-six)
9784 ("python-pygments" ,python-pygments)))
9785 (native-inputs
9786 `(("python-pytest" ,python-pytest)))
9787 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
9788 (synopsis "Library for building command line interfaces in Python")
9789 (description
9790 "Prompt-Toolkit is a library for building interactive command line
9791interfaces in Python. It's like GNU Readline but it also features syntax
9792highlighting while typing, out-of-the-box multi-line input editing, advanced
9793code completion, incremental search, support for Chinese double-width
9794characters, mouse support, and auto suggestions.")
9795 (license license:bsd-3)))
9796
9797(define-public python2-prompt-toolkit
9798 (package-with-python2 python-prompt-toolkit))
9799
9800(define-public python-prompt-toolkit-1
9801 (package (inherit python-prompt-toolkit)
9802 (version "1.0.15")
9803 (source
9804 (origin
9805 (method url-fetch)
9806 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
9807 (sha256
9808 (base32
9809 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
9810
9811(define-public python2-prompt-toolkit-1
9812 (package-with-python2 python-prompt-toolkit-1))
9813
9814(define-public python-jedi
9815 (package
9816 (name "python-jedi")
40bd0aa3 9817 (version "0.13.2")
44d10b1f
RW
9818 (source
9819 (origin
9820 (method url-fetch)
9821 (uri (pypi-uri "jedi" version))
9822 (sha256
9823 (base32
40bd0aa3 9824 "1za944msp0f8x36qa8l309jhv0kzlsdh7r9nj3z12y8npnsh45sp"))))
44d10b1f
RW
9825 (build-system python-build-system)
9826 (arguments
40bd0aa3 9827 `( ;; Many tests are failing with Python 3.7.x as of version 0.13.2 (see:
44d10b1f
RW
9828 ;; https://github.com/davidhalter/jedi/issues/1263)
9829 #:tests? #f
9830 #:phases
9831 (modify-phases %standard-phases
9832 (replace 'check
9833 (lambda* (#:key tests? #:allow-other-keys)
9834 (when tests?
9835 (invoke "py.test" "-vv")))))))
9836 (native-inputs
9837 `(("python-pytest" ,python-pytest)
9838 ("python-docopt" ,python-docopt)))
9839 (propagated-inputs
9840 `(("python-parso" ,python-parso)))
9841 (home-page "https://github.com/davidhalter/jedi")
9842 (synopsis "Autocompletion and static analysis library for Python")
9843 (description
9844 "Jedi is a static analysis tool for Python that can be used in Integrated
9845Development Environments (@dfn{IDE}s) and text editors. It understands Python
9846on a deeper level than many other static analysis frameworks for Python.
9847
9848Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
9849well.")
9850 (license license:expat)))
9851
9852(define-public python2-jedi
9853 (package-with-python2 python-jedi))
9854
9855(define-public ptpython
9856 (package
9857 (name "ptpython")
9858 (version "0.34")
9859 (source (origin
9860 (method url-fetch)
9861 (uri (pypi-uri "ptpython" version))
9862 (sha256
9863 (base32
9864 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
9865 (build-system python-build-system)
9866 (arguments
9867 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
9868 (propagated-inputs
9869 `(("python-docopt" ,python-docopt)
9870 ("python-jedi" ,python-jedi)
9871 ("python-prompt-toolkit" ,python-prompt-toolkit)
9872 ("python-pygments" ,python-pygments)))
9873 (home-page "https://github.com/jonathanslenders/ptpython")
9874 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
9875 (description
9876 "ptpython is a Python read-eval-print loop with IDE-like features.
9877It supports syntax highlighting, multiline editing, autocompletion, mouse,
9878color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
9879etc.")
9880 (license license:bsd-3)
9881 (properties `((python2-variant . ,(delay ptpython-2))))))
9882
9883(define-public ptpython-2
9884 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
9885 (package
9886 (inherit base)
9887 (name "ptpython2"))))
9888
9889(define-public python-stem
9890 (package
9891 (name "python-stem")
9892 (version "1.7.0")
9893 (source
9894 (origin
9895 (method url-fetch)
9896 (uri (pypi-uri "stem" version))
9897 (sha256
9898 (base32
9899 "1awiglfiajnx2hva9aqpj3fmdvdb4qg7cwnlfyih827m68y3cq8v"))))
9900 (build-system python-build-system)
9901 (arguments
9902 `(#:phases
9903 (modify-phases %standard-phases
9904 (replace 'check
9905 (lambda _
9906 (invoke "./run_tests.py" "--unit")
9907 #t)))))
9908 (native-inputs
9909 `(("python-mock" ,python-mock)
9910 ("python-pycodestyle" ,python-pycodestyle)
9911 ("python-pyflakes" ,python-pyflakes)))
9912 (home-page "https://stem.torproject.org/")
9913 (synopsis
9914 "Python controller library that allows applications to interact with Tor")
9915 (description
9916 "Stem is a Python controller library for Tor. With it you can use Tor's
9917control protocol to script against the Tor process and read descriptor data
9918relays publish about themselves.")
9919 (license license:lgpl3)))
9920
9921(define-public python2-stem
9922 (package-with-python2 python-stem))
9923
9924(define-public python-pyserial
9925 (package
9926 (name "python-pyserial")
9927 (version "3.1.1")
9928 (source
9929 (origin
9930 (method url-fetch)
9931 (uri (pypi-uri "pyserial" version))
9932 (sha256
9933 (base32
9934 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
9935 (build-system python-build-system)
9936 (arguments
9937 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
9938 ;; #:phases
9939 ;; (modify-phases %standard-phases
9940 ;; (replace 'check
9941 ;; (lambda _
9942 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
9943 (home-page
9944 "https://github.com/pyserial/pyserial")
9945 (synopsis "Python Serial Port Bindings")
9946 (description "@code{pyserial} provide serial port bindings for Python. It
9947supports different byte sizes, stop bits, parity and flow control with RTS/CTS
9948and/or Xon/Xoff. The port is accessed in RAW mode.")
9949 (license license:bsd-3)))
9950
9951(define-public python2-pyserial
9952 (package-with-python2 python-pyserial))
9953
9954(define-public python-kivy
9955 (package
9956 (name "python-kivy")
9957 (version "1.10.1")
9958 (source
9959 (origin
9960 (method url-fetch)
9961 (uri (pypi-uri "Kivy" version))
9962 (file-name (string-append name "-" version ".tar.gz"))
9963 (sha256
9964 (base32
9965 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
9966 (build-system python-build-system)
9967 (arguments
9968 `(#:tests? #f ; Tests require many optional packages
9969 #:phases
9970 (modify-phases %standard-phases
9971 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
9972 (lambda* (#:key inputs #:allow-other-keys)
9973 (setenv "KIVY_SDL2_PATH"
9974 (string-append (assoc-ref inputs "sdl-union")
9975 "/include/SDL2"))
9976 #t)))))
9977 (native-inputs
9978 `(("git" ,git)
9979 ("pkg-config" ,pkg-config)
9980 ("python-cython" ,python-cython)))
9981 (inputs
9982 `(("gstreamer" ,gstreamer)
9983 ("mesa" ,mesa)
9984 ("sdl-union"
9985 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
9986 (home-page "http://kivy.org")
9987 (synopsis
9988 "Multitouch application framework")
9989 (description
9990 "A software library for rapid development of
9991hardware-accelerated multitouch applications.")
9992 (license license:expat)))
9993
9994(define-public python2-kivy
9995 (package-with-python2 python-kivy))
9996
9997(define-public python-kivy-next
9998 (deprecated-package "python-kivy-next" python-kivy))
9999
10000(define-public python2-kivy-next
10001 (deprecated-package "python2-kivy-next" python2-kivy))
10002
10003(define-public python-binaryornot
10004 (package
10005 (name "python-binaryornot")
10006 (version "0.4.4")
10007 (source (origin
10008 (method url-fetch)
10009 (uri (pypi-uri "binaryornot" version))
10010 (sha256
10011 (base32
10012 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
10013 (build-system python-build-system)
10014 (propagated-inputs
10015 `(("python-chardet" ,python-chardet)
10016 ("python-hypothesis" ,python-hypothesis)))
10017 (home-page "https://github.com/audreyr/binaryornot")
10018 (synopsis "Package to check if a file is binary or text")
10019 (description "Ultra-lightweight pure Python package to check if a file is
10020binary or text.")
10021 (license license:bsd-3)
10022 (properties `((python2-variant . ,(delay python2-binaryornot))))))
10023
10024(define-public python2-binaryornot
10025 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
10026 (package (inherit base)
10027 (propagated-inputs
10028 `(("python2-enum34" ,python2-enum34)
10029 ,@(package-propagated-inputs base))))))
10030
10031(define-public python-nltk
10032 (package
10033 (name "python-nltk")
10034 (version "3.2.1")
10035 (source (origin
10036 (method url-fetch)
10037 (uri (pypi-uri "nltk" version))
10038 (sha256
10039 (base32
10040 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
10041 (build-system python-build-system)
10042 (arguments
10043 '(;; The tests require some extra resources to be downloaded.
10044 ;; TODO Try packaging these resources.
10045 #:tests? #f))
10046 (home-page "http://nltk.org/")
10047 (synopsis "Natural Language Toolkit")
10048 (description "It provides interfaces to over 50 corpora and lexical
10049resources such as WordNet, along with a suite of text processing libraries
10050for classification, tokenization, stemming, tagging, parsing, and semantic
10051reasoning, wrappers for natural language processing libraries.")
10052 (license license:asl2.0)))
10053
10054(define-public python2-nltk
10055 (package-with-python2 python-nltk))
10056
10057(define-public python-pymongo
10058 (package
10059 (name "python-pymongo")
10060 (version "3.7.2")
10061 (source (origin
10062 (method url-fetch)
10063 (uri (pypi-uri "pymongo" version))
10064 (sha256
10065 (base32
10066 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
10067 (build-system python-build-system)
10068 (propagated-inputs
10069 `(("python-certifi" ,python-certifi)))
10070 (home-page "https://github.com/mongodb/mongo-python-driver")
10071 (synopsis "Python driver for MongoDB")
10072 (description "Python driver for MongoDB.")
10073 (license license:asl2.0)))
10074
10075(define-public python2-pymongo
10076 (package-with-python2 python-pymongo))
10077
44d10b1f
RW
10078(define-public python-consul
10079 (package
10080 (name "python-consul")
10081 (version "0.6.1")
10082 (source
10083 (origin
10084 (method url-fetch)
10085 (uri (pypi-uri "python-consul" version))
10086 (sha256
10087 (base32
10088 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
10089 (build-system python-build-system)
10090 (arguments
10091 '(#:tests? #f)) ; The tests are not distributed
10092 (propagated-inputs
10093 `(("python-requests" ,python-requests)
10094 ("python-six" ,python-six)))
10095 (home-page "https://github.com/cablehead/python-consul")
10096 (synopsis "Python client for Consul")
10097 (description
10098 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
10099discovery, monitoring and configuration.")
10100 (license license:expat)))
10101
10102(define-public python2-consul
10103 (package-with-python2 python-consul))
10104
10105(define-public python-schematics
10106 (package
10107 (name "python-schematics")
10108 (version "1.1.1")
10109 (source
10110 (origin
10111 (method url-fetch)
10112 (uri (string-append
10113 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
10114 (file-name (string-append name "-" version ".tar.gz"))
10115 (sha256
10116 (base32
10117 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
10118 (build-system python-build-system)
10119 (propagated-inputs
10120 `(("python-six" ,python-six)))
10121 (arguments
10122 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
10123 ; version requirements (eg python-coveralls)
10124 (home-page "https://github.com/schematics/schematics")
10125 (synopsis "Python Data Structures for Humans")
10126 (description "Python Data Structures for Humans.")
10127 (license license:bsd-3)))
10128
10129(define-public python2-schematics
10130 (package-with-python2 python-schematics))
10131
10132(define-public python-odfpy
10133 (package
10134 (name "python-odfpy")
10135 (version "1.3.3")
10136 (source (origin
10137 (method url-fetch)
10138 (uri (pypi-uri "odfpy" version))
10139 (sha256
10140 (base32
10141 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
10142 (arguments
10143 `(#:modules ((srfi srfi-1)
10144 (guix build python-build-system)
10145 (guix build utils))
10146 #:phases
10147 (modify-phases %standard-phases
10148 (replace 'check
10149 ;; The test runner invokes python2 and python3 for test*.py.
10150 ;; To avoid having both in inputs, we replicate it here.
10151 (lambda _
21ccc01d
RW
10152 (for-each (lambda (test-file) (invoke "python" test-file))
10153 (find-files "tests" "^test.*\\.py$"))
10154 #t)))))
44d10b1f
RW
10155 (build-system python-build-system)
10156 (home-page "https://github.com/eea/odfpy")
10157 (synopsis "Python API and tools to manipulate OpenDocument files")
10158 (description "Collection of libraries and utility programs written in
10159Python to manipulate OpenDocument 1.2 files.")
10160 (license
10161 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
10162 ;; number of files with other licenses.
10163 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
10164
10165(define-public python2-odfpy
10166 (package-with-python2 python-odfpy))
10167
10168(define-public python-natsort
10169 (package
10170 (name "python-natsort")
10171 (version "5.4.1")
10172 (source (origin
10173 (method url-fetch)
10174 (uri (pypi-uri "natsort" version))
10175 (sha256
10176 (base32
10177 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
10178 (build-system python-build-system)
10179 (arguments
10180 `(#:modules ((guix build utils)
10181 (guix build python-build-system)
10182 (srfi srfi-1)
10183 (srfi srfi-26)
10184 (ice-9 ftw))
10185 #:phases
10186 (modify-phases %standard-phases
10187 (add-before 'check 'set-cachedir
10188 ;; Tests require write access to $HOME by default
10189 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
10190 (replace 'check
10191 (lambda _
10192 (let ((cwd (getcwd)))
10193 (setenv "PYTHONPATH"
10194 (string-append
10195 cwd "/build/"
10196 (find (cut string-prefix? "lib" <>)
10197 (scandir (string-append cwd "/build")))
10198 ":"
10199 (getenv "PYTHONPATH")))
10200 (invoke "pytest" "-v")))))))
10201 (native-inputs
10202 `(("python-hypothesis" ,python-hypothesis)
10203 ("python-pytest-cov" ,python-pytest-cov)
10204 ("python-pytest-mock" ,python-pytest-mock)
10205 ("python-pytest" ,python-pytest)))
10206 (propagated-inputs ; TODO: Add python-fastnumbers.
10207 `(("python-pyicu" ,python-pyicu)))
10208 (home-page "https://github.com/SethMMorton/natsort")
10209 (synopsis "Natural sorting for python and shell")
10210 (description
10211 "Natsort lets you apply natural sorting on lists instead of
10212lexicographical. If you use the built-in @code{sorted} method in python
10213on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
10214returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
10215function @code{natsorted} that identifies numbers and sorts them separately
10216from strings. It can also sort version numbers, real numbers, mixed types
10217and more, and comes with a shell command @command{natsort} that exposes this
10218functionality in the command line.")
10219 (license license:expat)
10220 (properties `((python2-variant . ,(delay python2-natsort))))))
10221
10222(define-public python2-natsort
10223 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
10224 (package (inherit base)
10225 (native-inputs
10226 `(("python2-pathlib" ,python2-pathlib)
10227 ,@(package-native-inputs base))))))
10228
10229(define-public python-glances
10230 (package
10231 (name "python-glances")
10232 (version "3.0.2")
10233 (source
10234 (origin
10235 (method url-fetch)
10236 (uri (pypi-uri "Glances" version))
10237 (sha256
10238 (base32
10239 "09fxysfp1n16csqvzvawy74qm6a94nvwjf3vcf5gkqp4i6k4vjjy"))))
10240 (build-system python-build-system)
10241 (propagated-inputs
10242 `(("python-psutil" ,python-psutil)))
10243 (home-page
10244 "https://github.com/nicolargo/glances")
10245 (synopsis
10246 "A cross-platform curses-based monitoring tool")
10247 (description
10248 "Glances is a curses-based monitoring tool for a wide variety of platforms.
10249Glances uses the PsUtil library to get information from your system. It monitors
10250CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
10251 (license license:lgpl3+)))
10252
10253(define-public python2-glances
10254 (package-with-python2 python-glances))
10255
10256(define-public python-graphql-core
10257 (package
10258 (name "python-graphql-core")
10259 (version "0.5.3")
10260 (source
10261 (origin
10262 (method url-fetch)
10263 (uri (pypi-uri "graphql-core" version))
10264 (sha256
10265 (base32
10266 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
10267 (build-system python-build-system)
10268 (arguments
10269 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
10270 #:phases
10271 (modify-phases %standard-phases
10272 (add-after 'unpack 'patch-hardcoded-version
10273 (lambda _ (substitute*
10274 "setup.py"
10275 (("'gevent==1.1rc1'") "'gevent'"))
10276 #t)))))
10277 (native-inputs
10278 `(("python-gevent" ,python-gevent)
10279 ("python-mock" ,python-mock)
10280 ("python-pytest-mock" ,python-pytest-mock)))
10281 (propagated-inputs
10282 `(("python-promise" ,python-promise)
10283 ("python-six" ,python-six)))
10284 (home-page "https://github.com/graphql-python/graphql-core")
10285 (synopsis "GraphQL implementation for Python")
10286 (description
10287 "GraphQL implementation for Python. GraphQL is a data query language and
10288runtime designed and used to request and deliver data to mobile and web apps.
10289This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
10290to Python.")
10291 (license license:expat)))
10292
10293(define-public python2-graphql-core
10294 (package-with-python2 python-graphql-core))
10295
10296(define-public python-graphql-relay
10297 (package
10298 (name "python-graphql-relay")
10299 (version "0.4.5")
10300 (source
10301 (origin
10302 (method url-fetch)
10303 (uri (pypi-uri "graphql-relay" version))
10304 (sha256
10305 (base32
10306 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
10307 (build-system python-build-system)
10308 (arguments
10309 '(#:tests? #f)) ; The tests are not distributed
10310 (propagated-inputs
10311 `(("python-graphql-core" ,python-graphql-core)
10312 ("python-promise" ,python-promise)
10313 ("python-six" ,python-six)))
10314 (home-page "https://github.com/graphql-python/graphql-relay-py")
10315 (synopsis "Relay implementation for Python")
10316 (description
10317 "This is a library to allow the easy creation of Relay-compliant servers
10318using the GraphQL Python reference implementation of a GraphQL server. It
10319should be noted that the code is a exact port of the original
10320@url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
10321from Facebook.")
10322 (license license:expat)))
10323
10324(define-public python2-graphql-relay
10325 (package-with-python2 python-graphql-relay))
10326
10327(define-public python-graphene
10328 (package
10329 (name "python-graphene")
10330 (version "0.10.2")
10331 (source
10332 (origin
10333 (method url-fetch)
10334 (uri (pypi-uri "graphene" version))
10335 (sha256
10336 (base32
10337 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
10338 (build-system python-build-system)
10339 (propagated-inputs
10340 `(("python-graphql-core" ,python-graphql-core)
10341 ("python-graphql-relay" ,python-graphql-relay)
10342 ("python-iso8601" ,python-iso8601)
10343 ("python-promise" ,python-promise)
10344 ("python-six" ,python-six)))
10345 (arguments
10346 `(#:tests? #f)) ; no tests/ in the PyPI tarball
10347 (home-page "http://graphene-python.org/")
10348 (synopsis "GraphQL Framework for Python")
10349 (description
10350 "Graphene is a Python library for building GraphQL schemas/types.
10351A GraphQL schema describes your data model, and provides a GraphQL server
10352with an associated set of resolve methods that know how to fetch data.")
10353 (properties `((python2-variant . ,(delay python2-graphene))))
10354 (license license:expat)))
10355
10356(define-public python2-graphene
10357 (let ((base (package-with-python2
10358 (strip-python2-variant python-graphene))))
10359 (package (inherit base)
10360 (native-inputs
10361 `(("python2-sqlalchemy" ,python2-sqlalchemy)
10362 ,@(package-native-inputs base))))))
10363
10364(define-public python-nautilus
10365 (package
10366 (name "python-nautilus")
10367 (version "0.4.9")
10368 (source
10369 (origin
10370 (method url-fetch)
10371 (uri (pypi-uri "nautilus" version))
10372 (sha256
10373 (base32
10374 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
10375 (build-system python-build-system)
10376 (arguments `(#:tests? #f)) ; fails to import test modules
10377 (propagated-inputs
10378 `(("python-bcrypt" ,python-bcrypt)
10379 ("python-click" ,python-click)
10380 ("python-consul" ,python-consul)
10381 ("python-graphene" ,python-graphene)
10382 ("python-jinja2" ,python-jinja2)
10383 ("python-peewee" ,python-peewee)
10384 ("python-pika" ,python-pika)
10385 ("python-tornado" ,python-tornado)
10386 ("python-wtforms" ,python-wtforms)))
10387 (native-inputs
10388 `(("python-nose2" ,python-nose2)))
10389 (home-page "https://github.com/AlecAivazis/nautilus")
10390 (synopsis "Library for creating microservice applications")
10391 (description
10392 "Nautilus is a framework for flux based microservices that looks to
10393provide extendible implementations of common aspects of a cloud so that you can
10394focus on building massively scalable web applications.")
10395 (license license:expat)))
10396
10397(define-public python-snowballstemmer
10398 (package
10399 (name "python-snowballstemmer")
10400 (version "1.2.1")
10401 (source (origin
10402 (method url-fetch)
10403 (uri (pypi-uri "snowballstemmer" version))
10404 (sha256
10405 (base32
10406 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
10407 (build-system python-build-system)
10408 (arguments
10409 `(;; No tests exist
10410 #:tests? #f))
10411 (home-page "https://github.com/shibukawa/snowball_py")
10412 (synopsis "Snowball stemming library collection for Python")
10413 (description "This package provides 16 word stemmer algorithms generated
10414from Snowball algorithms. It includes the 15 original ones plus the Poerter
10415English stemmer.")
10416 (license license:bsd-3)))
10417
10418(define-public python2-snowballstemmer
10419 (package-with-python2 python-snowballstemmer))
10420
10421(define-public python-sphinx-cloud-sptheme
10422 (package
10423 (name "python-sphinx-cloud-sptheme")
10424 (version "1.8.0")
10425 (source (origin
10426 (method url-fetch)
10427 (uri (pypi-uri "cloud_sptheme" version))
10428 (sha256
10429 (base32
10430 "1dniqb6a39yh786f86c4jn666rwnyi1jvzn4616zhcchb7sfdshd"))))
10431 (build-system python-build-system)
10432 ;; FIXME: The 'pypi' release archive does not contain tests.
10433 (arguments '(#:tests? #f))
10434 (native-inputs
10435 `(("python-sphinx" ,python-sphinx)))
10436 (home-page "https://bitbucket.org/ecollins/cloud_sptheme")
10437 (synopsis "'Cloud' theme for Sphinx documenter")
10438 (description "This package contains the \"Cloud\" theme for Sphinx and some
10439related extensions.")
10440 (license license:bsd-3)))
10441
10442(define-public python2-sphinx-cloud-sptheme
10443 (package-with-python2 python-sphinx-cloud-sptheme))
10444
10445(define-public python-sphinx-alabaster-theme
10446 (package
10447 (name "python-sphinx-alabaster-theme")
10448 (version "0.7.12")
10449 (source (origin
10450 (method url-fetch)
10451 (uri (pypi-uri "alabaster" version))
10452 (sha256
10453 (base32
10454 "00nwwjj2d2ym4s2kk217x7jkx1hnczc3fvm8yxbqmsp6b0nxfqd6"))))
10455 (build-system python-build-system)
10456 (propagated-inputs
10457 `(("python-pygments" ,python-pygments)))
10458 (home-page "https://alabaster.readthedocs.io/")
10459 (synopsis "Configurable sidebar-enabled Sphinx theme")
10460 (description "Alabaster is a visually (c)lean, responsive, configurable
10461theme for the Sphinx documentation system. It's the default theme of Sphinx.")
10462 (license license:bsd-3)))
10463
10464(define-public python2-sphinx-alabaster-theme
10465 (package-with-python2 python-sphinx-alabaster-theme))
10466
10467(define-public python-setproctitle
10468(package
10469 (name "python-setproctitle")
10470 (version "1.1.10")
10471 (source
10472 (origin
10473 (method url-fetch)
10474 (uri (pypi-uri "setproctitle" version))
10475 (sha256
10476 (base32
10477 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
10478 (build-system python-build-system)
10479 (arguments
10480 '(#:phases
10481 (modify-phases %standard-phases
10482 (add-before 'check 'patch-Makefile
10483 ;; Stricly this is only required for the python2 variant.
10484 ;; But adding a phase in an inherited package seems to be
10485 ;; cumbersum. So we patch even for python3.
10486 (lambda _
10487 (let ((nose (assoc-ref %build-inputs "python2-nose")))
10488 (when nose
10489 (substitute* "Makefile"
10490 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
10491 (string-append nose "/bin/nosetests "))))
10492 #t)))
10493 (replace 'check
10494 (lambda _
10495 (setenv "PYTHON" (or (which "python3") (which "python")))
10496 (setenv "PYCONFIG" (or (which "python3-config")
10497 (which "python-config")))
10498 (setenv "CC" "gcc")
10499 ;; No need to extend PYTHONPATH to find the built package, since
10500 ;; the Makefile will build anyway
10501 (invoke "make" "check"))))))
10502 (native-inputs
10503 `(("procps" ,procps))) ; required for tests
10504 (home-page
10505 "https://github.com/dvarrazzo/py-setproctitle")
10506 (synopsis
10507 "Setproctitle implementation for Python to customize the process title")
10508 (description "The library allows a process to change its title (as displayed
10509by system tools such as ps and top).
10510
10511Changing the title is mostly useful in multi-process systems, for
10512example when a master process is forked: changing the children's title
10513allows to identify the task each process is busy with. The technique
10514is used by PostgreSQL and the OpenSSH Server for example.")
10515 (license license:bsd-3)
10516 (properties `((python2-variant . ,(delay python2-setproctitle))))))
10517
10518(define-public python2-setproctitle
10519 (let ((base (package-with-python2
10520 (strip-python2-variant python-setproctitle))))
10521 (package
10522 (inherit base)
10523 (native-inputs `(("python2-nose" ,python2-nose)
10524 ,@(package-native-inputs base))))))
10525
10526(define-public python-validictory
10527 (package
10528 (name "python-validictory")
10529 (version "1.0.1")
10530 (source
10531 (origin
10532 (method url-fetch)
10533 (uri (pypi-uri "validictory" version))
10534 (sha256
10535 (base32
10536 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
10537 (build-system python-build-system)
10538 (arguments
10539 '(#:phases
10540 (modify-phases %standard-phases
10541 (add-after 'unpack 'bootstrap
10542 ;; Move the tests out of the package directory to avoid
10543 ;; packaging them.
10544 (lambda* _
10545 (rename-file "validictory/tests" "tests")
10546 (delete-file "tests/__init__.py")))
10547 (replace 'check
10548 (lambda _
10549 ;; Extend PYTHONPATH so the built package will be found.
10550 (setenv "PYTHONPATH"
10551 (string-append (getcwd) "/build/lib:"
10552 (getenv "PYTHONPATH")))
6568bd5d 10553 (invoke "py.test" "-vv" ))))))
44d10b1f
RW
10554 (native-inputs
10555 `(("python-pytest" ,python-pytest)))
10556 (home-page
10557 "https://github.com/jamesturk/validictory")
10558 (synopsis "General purpose Python data validator")
10559 (description "It allows validation of arbitrary Python data structures.
10560
10561The schema format is based on the JSON Schema
10562proposal (http://json-schema.org), so combined with json the library is also
10563useful as a validator for JSON data.")
10564 (license license:expat)))
10565
10566(define-public python2-validictory
10567 (package-with-python2 python-validictory))
10568
10569(define-public python-pyelftools
10570 (package
10571 (name "python-pyelftools")
10572 (version "0.25")
10573 (source
10574 (origin
10575 (method url-fetch)
10576 (uri (pypi-uri "pyelftools" version))
10577 (sha256
10578 (base32
10579 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
10580 (build-system python-build-system)
10581 (arguments
10582 `(#:phases
10583 (modify-phases %standard-phases
10584 (add-before 'check 'set-pythonpath
10585 (lambda _
10586 (setenv "PYTHONPATH"
10587 (string-append
10588 (getcwd) "/test/"
10589 ":" (getenv "PYTHONPATH")))
10590 #t)))))
10591 (home-page
10592 "https://github.com/eliben/pyelftools")
10593 (synopsis
10594 "Analyze binary and library file information")
10595 (description "This Python library provides interfaces for parsing and
10596analyzing two binary and library file formats; the Executable and Linking
10597Format (ELF), and debugging information in the Debugging With Attributed
10598Record Format (DWARF).")
10599 (license license:public-domain)))
10600
10601(define-public python-pyev
10602 (package
10603 (name "python-pyev")
10604 (version "0.9.0")
10605 (source
10606 (origin
10607 (method url-fetch)
10608 (uri (pypi-uri "pyev" version))
10609 (sha256
10610 (base32
10611 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
10612 (build-system python-build-system)
10613 (arguments
10614 `(#:tests? #f ; no test suite
10615 #:phases
10616 (modify-phases %standard-phases
10617 (add-after 'unpack 'patch
10618 (lambda* (#:key inputs #:allow-other-keys)
10619 (let ((libev (string-append (assoc-ref inputs "libev")
10620 "/lib/libev.so.4")))
10621 (substitute* "setup.py"
10622 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
10623 (string-append "libev_dll_name = \"" libev "\"")))))))))
10624 (inputs
10625 `(("libev" ,libev)))
10626 (home-page "http://pythonhosted.org/pyev/")
10627 (synopsis "Python libev interface")
10628 (description "Pyev provides a Python interface to libev.")
10629 (license license:gpl3)))
10630
10631(define-public python2-pyev
10632 (package-with-python2 python-pyev))
10633
10634(define-public python-imagesize
10635 (package
10636 (name "python-imagesize")
10637 (version "1.1.0")
10638 (source
10639 (origin
10640 (method url-fetch)
10641 (uri (pypi-uri "imagesize" version))
10642 (sha256
10643 (base32
10644 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
10645 (build-system python-build-system)
10646 (home-page "https://github.com/shibukawa/imagesize_py")
10647 (synopsis "Gets image size of files in various formats in Python")
10648 (description
10649 "This package allows determination of image size from
10650PNG, JPEG, JPEG2000 and GIF files in pure Python.")
10651 (license license:expat)))
10652
10653(define-public python2-imagesize
10654 (package-with-python2 python-imagesize))
10655
10656(define-public python-termstyle
10657 (package
10658 (name "python-termstyle")
10659 (version "0.1.11")
10660 (source
10661 (origin
10662 (method url-fetch)
10663 (uri (pypi-uri "termstyle" version))
10664 (sha256
10665 (base32
10666 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
10667 (build-system python-build-system)
10668 (arguments
10669 '(#:phases
10670 (modify-phases %standard-phases
10671 (replace 'check
10672 (lambda _
831080a6 10673 (invoke "python" "test3.py"))))))
44d10b1f
RW
10674 (home-page "https://github.com/gfxmonk/termstyle")
10675 (synopsis "Console text coloring for Python")
10676 (description "This package provides console text coloring for Python.")
10677 (license license:bsd-3)))
10678
10679(define-public python-argcomplete
10680 (package
10681 (name "python-argcomplete")
10682 (version "1.7.0")
10683 (source
10684 (origin
10685 (method url-fetch)
10686 (uri (pypi-uri "argcomplete" version))
10687 (sha256
10688 (base32
10689 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
10690 (build-system python-build-system)
10691 (native-inputs
10692 `(("python-pexpect" ,python-pexpect)
10693 ("tcsh" ,tcsh)
10694 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
10695 (home-page "https://github.com/kislyuk/argcomplete")
10696 (synopsis "Shell tab completion for Python argparse")
10697 (description "argcomplete provides extensible command line tab completion
10698of arguments and options for Python scripts using @code{argparse}. It's
10699particularly useful for programs with many options or sub-parsers that can
10700dynamically suggest completions; for example, when browsing resources over the
10701network.")
10702 (license license:asl2.0)))
10703
10704(define-public python2-argcomplete
10705 (package-with-python2 python-argcomplete))
10706
10707(define-public python-xopen
10708 (package
10709 (name "python-xopen")
10710 (version "0.3.3")
10711 (source
10712 (origin
10713 (method url-fetch)
10714 (uri (pypi-uri "xopen" version))
10715 (sha256
10716 (base32
10717 "1a0wbil552wsmklwd89ssmgz3pjd86qa9i7jh8wqb9wslc8a2qjr"))
10718 (file-name (string-append name "-" version ".tar.gz"))))
10719 (build-system python-build-system)
10720 (home-page "https://github.com/marcelm/xopen/")
10721 (synopsis "Open compressed files transparently")
10722 (description "This module provides an @code{xopen} function that works like
10723Python's built-in @code{open} function, but can also deal with compressed files.
10724Supported compression formats are gzip, bzip2 and, xz, and are automatically
10725recognized by their file extensions. The focus is on being as efficient as
10726possible on all supported Python versions.")
10727 (license license:expat)))
10728
10729(define-public python2-xopen
10730 (let ((base (package-with-python2
10731 (strip-python2-variant python-xopen))))
10732 (package
10733 (inherit base)
10734 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
10735 ,@(package-propagated-inputs base))))))
10736
10737(define-public python-cheetah
10738 (package
10739 (name "python-cheetah")
10740 (version "3.1.0")
10741 (source
10742 (origin
10743 (method url-fetch)
10744 (uri (pypi-uri "Cheetah3" version))
10745 (sha256
10746 (base32
10747 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
10748 (build-system python-build-system)
10749 (arguments
10750 `(#:modules ((guix build utils)
10751 (guix build python-build-system)
10752 (ice-9 ftw)
10753 (srfi srfi-1)
10754 (srfi srfi-26))
10755 #:phases (modify-phases %standard-phases
10756 (add-after 'unpack 'use-absolute-python
10757 (lambda _
10758 (substitute* "Cheetah/CheetahWrapper.py"
10759 (("#!/usr/bin/env python")
10760 (string-append "#!" (which "python"))))
10761 #t))
10762 (replace 'check
10763 (lambda _
10764 (let ((cwd (getcwd)))
10765 (setenv "PYTHONPATH"
10766 (string-append
10767 cwd "/build/"
10768 (find (cut string-prefix? "lib" <>)
10769 (scandir (string-append cwd "/build")))
10770 ":" (getenv "PYTHONPATH")))
10771 (setenv "PATH"
10772 (string-append (getenv "PATH")
10773 ":" cwd "/bin"))
10774 (setenv "TMPDIR" "/tmp")
10775
10776 (substitute* "Cheetah/Tests/Test.py"
10777 (("unittest.TextTestRunner\\(\\)")
10778 "unittest.TextTestRunner(verbosity=2)"))
10779
10780 (invoke "python" "Cheetah/Tests/Test.py")))))))
10781 (propagated-inputs
10782 `(("python-markdown" ,python-markdown))) ;optional
10783 (home-page "http://cheetahtemplate.org/")
10784 (synopsis "Template engine")
10785 (description "Cheetah is a text-based template engine and Python code
10786generator.
10787
10788Cheetah can be used as a standalone templating utility or referenced as
10789a library from other Python applications. It has many potential uses,
10790but web developers looking for a viable alternative to ASP, JSP, PHP and
10791PSP are expected to be its principle user group.
10792
10793Features:
10794@enumerate
10795@item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
10796 text-based format.
10797@item Cleanly separates content, graphic design, and program code.
10798@item Blends the power and flexibility of Python with a simple template language
10799 that non-programmers can understand.
10800@item Gives template writers full access to any Python data structure, module,
10801 function, object, or method in their templates.
10802@item Makes code reuse easy by providing an object-orientated interface to
10803 templates that is accessible from Python code or other Cheetah templates.
10804 One template can subclass another and selectively reimplement sections of it.
10805@item Provides a simple, yet powerful, caching mechanism that can dramatically
10806 improve the performance of a dynamic website.
10807@item Compiles templates into optimized, yet readable, Python code.
10808@end enumerate")
10809 (license (license:x11-style "file://LICENSE"))))
10810
10811(define-public python2-cheetah
10812 (package-with-python2 python-cheetah))
10813
10814(define-public python-dulwich
10815 (package
10816 (name "python-dulwich")
10817 (version "0.18.6")
10818 (source
10819 (origin
10820 (method url-fetch)
10821 (uri (list (string-append "https://www.dulwich.io/releases/"
10822 "dulwich-" version ".tar.gz")
10823 (pypi-uri "dulwich" version)))
10824 (sha256
10825 (base32
10826 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
10827 (build-system python-build-system)
10828 (arguments
10829 `(#:phases
10830 (modify-phases %standard-phases
10831 (add-before 'check 'fix-tests
10832 (lambda* (#:key inputs #:allow-other-keys)
10833 ;; The tests use Popen with a custom environment which doesn't
10834 ;; include PATH.
10835 (substitute* "dulwich/tests/compat/utils.py"
10836 (("'git'") (string-append "'"
10837 (which "git")
10838 "'")))
10839 (substitute* '("dulwich/tests/test_repository.py"
10840 "dulwich/tests/test_hooks.py")
10841 (("#!/bin/sh") (string-append "#!" (which "sh"))))
10842 (setenv "TEST_RUNNER" "unittest")
10843 (setenv "PYTHONHASHSEED" "random")
10844 #t)))))
10845 (propagated-inputs
10846 `(("python-fastimport" ,python-fastimport)))
10847 (native-inputs
10848 `(("python-mock" ,python-mock)
10849 ("python-geventhttpclient" ,python-geventhttpclient)
10850 ("git" ,git)))
10851 (home-page "https://www.dulwich.io/")
10852 (synopsis "Git implementation in Python")
10853 (description "Dulwich is an implementation of the Git file formats and
10854protocols written in pure Python.")
10855 ;; Can be used with either license.
10856 (license (list license:asl2.0 license:gpl2+))))
10857
10858(define-public python2-dulwich
10859 (package-with-python2 python-dulwich))
10860
10861(define-public python-pbkdf2
10862 (package
10863 (name "python-pbkdf2")
10864 (version "1.3")
10865 (source
10866 (origin
10867 (method url-fetch)
10868 (uri (pypi-uri "pbkdf2" version))
10869 (sha256
10870 (base32
10871 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
10872 (build-system python-build-system)
10873 (arguments
10874 '(#:phases
10875 (modify-phases %standard-phases
10876 (replace 'check
10877 (lambda _
10878 (setenv "PYTHONPATH"
10879 (string-append (getcwd) "/build/lib:"
10880 (getenv "PYTHONPATH")))
ee2bb944 10881 (invoke "python" "test/test_pbkdf2.py"))))))
44d10b1f
RW
10882 (propagated-inputs
10883 `(("python-pycrypto" ,python-pycrypto))) ; optional
10884 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
10885 (synopsis "Password-based key derivation")
10886 (description "This module implements the password-based key derivation
10887function, PBKDF2, specified in RSA PKCS#5 v2.0.
10888
10889PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
10890is part of the RSA Public Key Cryptography Standards series. The provided
10891implementation takes a password or a passphrase and a salt value (and
10892optionally a iteration count, a digest module, and a MAC module) and provides
10893a file-like object from which an arbitrarly-sized key can be read.")
10894 (license license:expat)))
10895
10896(define-public python2-pbkdf2
10897 (package-with-python2 python-pbkdf2))
10898
10899(define-public python-qrcode
10900 (package
10901 (name "python-qrcode")
217ea1a1 10902 (version "6.1")
44d10b1f
RW
10903 (source
10904 (origin
10905 (method url-fetch)
10906 (uri (pypi-uri "qrcode" version))
10907 (sha256
217ea1a1 10908 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
44d10b1f
RW
10909 (build-system python-build-system)
10910 (arguments
10911 ;; FIXME: Tests require packaging 'pymaging'.
10912 '(#:tests? #f))
10913 (propagated-inputs
10914 `(("python-lxml" ,python-lxml) ; for SVG output
10915 ("python-pillow" ,python-pillow) ; for PNG output
10916 ("python-six" ,python-six)))
44d10b1f
RW
10917 (home-page "https://github.com/lincolnloop/python-qrcode")
10918 (synopsis "QR Code image generator")
10919 (description "This package provides a pure Python QR Code generator
10920module. It uses the Python Imaging Library (PIL) to allow for the generation
10921of QR Codes.
10922
10923In addition this package provides a command line tool to generate QR codes and
10924either write these QR codes to a file or do the output as ascii art at the
10925console.")
10926 (license license:bsd-3)))
10927
10928(define-public python2-qrcode
10929 (package-with-python2 python-qrcode))
10930
10931(define-public python-rst2ansi
10932 (package
10933 (name "python-rst2ansi")
10934 (version "0.1.5")
10935 (source
10936 (origin
10937 (method url-fetch)
10938 (uri (pypi-uri "rst2ansi" version))
10939 (sha256
10940 (base32
10941 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
10942 (build-system python-build-system)
10943 (propagated-inputs
10944 `(("python-docutils" ,python-docutils)))
10945 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
10946 (synopsis "Convert RST to ANSI-decorated console output")
10947 (description
10948 "Python module dedicated to rendering RST (reStructuredText) documents
10949to ansi-escaped strings suitable for display in a terminal.")
10950 (license license:expat)))
10951
10952(define-public python-ansi2html
10953 (package
10954 (name "python-ansi2html")
10955 (version "1.2.0")
10956 (source
10957 (origin
10958 (method url-fetch)
10959 (uri (pypi-uri "ansi2html" version))
10960 (sha256
10961 (base32
10962 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
10963 (build-system python-build-system)
10964 (native-inputs
10965 `(("python-mock" ,python-mock)
10966 ("python-nose" ,python-nose)))
10967 (propagated-inputs
10968 `(("python-six" ,python-six)))
10969 (home-page "https://github.com/ralphbean/ansi2html")
10970 (synopsis "Convert ANSI-decorated console output to HTML")
10971 (description
10972 "@command{ansi2html} is a Python library and command line utility for
10973convering text with ANSI color codes to HTML or LaTeX.")
10974 (license license:gpl3+)))
10975
10976(define-public python2-ansi2html
10977 (package-with-python2 python-ansi2html))
10978
10979(define-public python-ddt
10980 (package
10981 (name "python-ddt")
10982 (version "1.1.3")
10983 (source
10984 (origin
10985 (method url-fetch)
10986 (uri (pypi-uri "ddt" version))
10987 (sha256
10988 (base32
10989 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
10990 (build-system python-build-system)
10991 (native-inputs
10992 `(("python-mock" ,python-mock)
10993 ("python-nose" ,python-nose)))
10994 (propagated-inputs
10995 `(("python-six" ,python-six)
10996 ("python-pyyaml" ,python-pyyaml)))
10997 (home-page "https://github.com/txels/ddt")
10998 (synopsis "Data-Driven Tests")
10999 (description
11000 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
11001running it with different test data, and make it appear as multiple test
11002cases.")
11003 (license license:expat)))
11004
11005(define-public python2-ddt
11006 (package-with-python2 python-ddt))
11007
11008(define-public python-pycountry
11009 (package
11010 (name "python-pycountry")
11011 (version "18.5.26")
11012 (source
11013 (origin
11014 (method url-fetch)
11015 (uri (pypi-uri "pycountry" version))
11016 (sha256
11017 (base32
11018 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
11019 (build-system python-build-system)
11020 (home-page "https://bitbucket.org/flyingcircus/pycountry")
11021 (synopsis "ISO databases for languages, countries, currencies, etc.")
11022 (description
11023 "@code{pycountry} provides the ISO databases for the standards:
11024@enumerate
11025@item 639-3 (Languages)
11026@item 3166 (Countries)
11027@item 3166-3 (Deleted Countries)
11028@item 3166-2 (Subdivisions of countries)
11029@item 4217 (Currencies)
11030@item 15924 (Scripts)
11031@end enumerate
11032It includes a copy from Debian’s pkg-isocodes and makes the data accessible
11033through a Python API.")
11034 (license license:lgpl2.1+)))
11035
11036(define-public python2-pycountry
11037 (package-with-python2 python-pycountry))
11038
11039(define-public python-pycosat
11040 (package
11041 (name "python-pycosat")
11042 (version "0.6.1")
11043 (source
11044 (origin
11045 (method url-fetch)
11046 (uri (pypi-uri "pycosat" version))
11047 (sha256
11048 (base32
11049 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
11050 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
11051 (build-system python-build-system)
11052 (home-page "https://github.com/ContinuumIO/pycosat")
11053 (synopsis "Bindings to picosat (a SAT solver)")
11054 (description
11055 "This package provides efficient Python bindings to @code{picosat} on
11056the C level. When importing pycosat, the @code{picosat} solver becomes part
11057of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
11058Problem} (SAT) solver.")
11059 (license license:expat)))
11060
11061(define-public python2-pycosat
11062 (package-with-python2 python-pycosat))
11063
11064(define-public python2-ruamel.ordereddict
11065 (package
11066 (name "python2-ruamel.ordereddict")
11067 (version "0.4.9")
11068 (source
11069 (origin
11070 (method url-fetch)
11071 (uri (pypi-uri "ruamel.ordereddict" version))
11072 (sha256
11073 (base32
11074 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
11075 (build-system python-build-system)
11076 (arguments
11077 `(#:python ,python-2
11078 #:phases
11079 (modify-phases %standard-phases
11080 (delete 'check)
11081 (add-after 'install 'check
11082 (lambda* (#:key inputs outputs #:allow-other-keys)
11083 (add-installed-pythonpath inputs outputs)
f987ac30 11084 (invoke "python" "test/testordereddict.py"))))))
44d10b1f
RW
11085 (home-page "https://bitbucket.org/ruamel/ordereddict")
11086 (synopsis "Version of dict that keeps keys in insertion order")
11087 (description
11088 "This is an implementation of an ordered dictionary with @dfn{Key
11089Insertion Order} (KIO: updates of values do not affect the position of the
11090key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
11091removed and put at the back). The standard library module @code{OrderedDict},
11092implemented later, implements a subset of @code{ordereddict} functionality.
11093Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
11094Order} (KSO, no sorting function can be specified, but a transform can be
11095specified to apply on the key before comparison (e.g. @code{string.lower})).")
11096 (license license:expat)))
11097
11098(define-public python-pypeg2
11099 (package
11100 (name "python-pypeg2")
11101 (version "2.15.2")
11102 (source
11103 (origin
11104 (method url-fetch)
11105 (uri (pypi-uri "pyPEG2" version))
11106 (sha256
11107 (base32
11108 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
11109 (build-system python-build-system)
11110 (propagated-inputs `(("python-lxml" ,python-lxml)))
11111 (arguments
11112 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
11113 '(#:tests? #f))
11114 (home-page "https://fdik.org/pyPEG/")
11115 (synopsis "Parsering Expression Grammars in Python")
11116 (description "PyPEG is an intrinsic parser interpreter framework for
11117Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
11118parse many formal languages.")
11119 (license license:gpl2)))
11120
11121(define-public python-incremental
11122 (package
11123 (name "python-incremental")
11124 (version "17.5.0")
11125 (source
11126 (origin
11127 (method url-fetch)
11128 (uri (pypi-uri "incremental" version))
11129 (sha256
11130 (base32
11131 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
11132 (build-system python-build-system)
11133 (home-page "https://github.com/hawkowl/incremental")
11134 (synopsis "Library for versioning Python projects")
11135 (description "Incremental is a small library that versions your Python
11136projects.")
11137 (license license:expat)))
11138
11139(define-public python2-incremental
11140 (package-with-python2 python-incremental))
11141
11142(define-public python-invoke
11143 (package
11144 (name "python-invoke")
11145 (home-page "http://www.pyinvoke.org/")
11146 (version "1.1.0")
11147 (source (origin
11148 (method url-fetch)
11149 (uri (pypi-uri "invoke" version))
11150 (sha256
11151 (base32
11152 "0aiy1xvk1f91246zxd1zqrm679vdvd10h843a2na41cqr3cflpi6"))))
11153 (build-system python-build-system)
11154 (arguments
11155 ;; XXX: Requires many dependencies that are not yet in Guix.
11156 `(#:tests? #f))
11157 (synopsis "Pythonic task execution")
11158 (description
11159 "Invoke is a Python task execution tool and library, drawing inspiration
11160from various sources to arrive at a powerful and clean feature set. It is
11161evolved from the Fabric project, but focuses on local and abstract concerns
11162instead of servers and network commands.")
11163 (license license:bsd-3)))
11164
11165(define-public python2-invoke
11166 (package-with-python2 python-invoke))
11167
11168(define-public python-automat
11169 (package
11170 (name "python-automat")
11171 (version "0.6.0")
11172 (source (origin
11173 (method url-fetch)
11174 (uri (pypi-uri "Automat" version))
11175 (sha256
11176 (base32
11177 "1a7nsrljysfmdqmpn2apfa1gg6rfah4y9sizvns8gb08rx7d07rw"))))
11178 (build-system python-build-system)
11179 ;; We disable the tests because they require python-twisted, while
11180 ;; python-twisted depends on python-automat. Twisted is optional, but the
11181 ;; tests fail if it is not available. Also see
11182 ;; <https://github.com/glyph/automat/issues/71>.
11183 (arguments '(#:tests? #f))
11184 (native-inputs
11185 `(("python-m2r" ,python-m2r)
11186 ("python-setuptools-scm" ,python-setuptools-scm)
11187 ("python-graphviz" ,python-graphviz)))
11188 (propagated-inputs
11189 `(("python-six" ,python-six)
11190 ("python-attrs" ,python-attrs)))
11191 (home-page "https://github.com/glyph/Automat")
11192 (synopsis "Self-service finite-state machines")
11193 (description "Automat is a library for concise, idiomatic Python
11194expression of finite-state automata (particularly deterministic finite-state
11195transducers).")
11196 (license license:expat)))
11197
11198(define-public python2-automat
11199 (package-with-python2 python-automat))
11200
11201(define-public python-m2r
11202 (package
11203 (name "python-m2r")
11204 (version "0.1.12")
11205 (source (origin
11206 (method url-fetch)
11207 (uri (pypi-uri "m2r" version))
11208 (sha256
11209 (base32
11210 "1axrwnf425sz4qz3c0qc7yhhki4myzb8rki7pczcsgzznzmqdyxd"))))
11211 (build-system python-build-system)
11212 (propagated-inputs
11213 `(("python-docutils" ,python-docutils)
11214 ("python-mistune" ,python-mistune)))
11215 (native-inputs
11216 `(("python-pygments" ,python-pygments)
11217 ("python-mock" ,python-mock)))
11218 (home-page "https://github.com/miyakogi/m2r")
11219 (synopsis "Markdown to reStructuredText converter")
11220 (description "M2R converts a markdown file including reST markups to valid
11221reST format.")
11222 (license license:expat)))
11223
11224(define-public python2-m2r
11225 (package-with-python2 python-m2r))
11226
11227(define-public python-constantly
11228 (package
11229 (name "python-constantly")
11230 (version "15.1.0")
11231 (source (origin
11232 (method url-fetch)
11233 (uri (pypi-uri "constantly" version))
11234 (sha256
11235 (base32
11236 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
11237 (build-system python-build-system)
11238 (home-page "https://github.com/twisted/constantly")
11239 (synopsis "Symbolic constants in Python")
11240 (description "Constantly is a Python library that provides symbolic
11241constant support. It includes collections and constants with text, numeric,
11242and bit flag values.")
11243 (license license:expat)))
11244
11245(define-public python2-constantly
11246 (package-with-python2 python-constantly))
11247
11248(define-public python-attrs
11249 (package
11250 (name "python-attrs")
11251 (version "18.2.0")
11252 (source (origin
11253 (method url-fetch)
11254 (uri (pypi-uri "attrs" version))
11255 (sha256
11256 (base32
11257 "0s9ydh058wmmf5v391pym877x4ahxg45dw6a0w4c7s5wgpigdjqh"))))
11258 (build-system python-build-system)
11259 (arguments
11260 `(#:modules ((guix build utils)
11261 (guix build python-build-system)
11262 (ice-9 ftw)
11263 (srfi srfi-1)
11264 (srfi srfi-26))
11265 #:phases (modify-phases %standard-phases
11266 (replace 'check
11267 (lambda _
11268 (let ((cwd (getcwd)))
11269 (setenv "PYTHONPATH"
11270 (string-append
11271 cwd "/build/"
11272 (find (cut string-prefix? "lib" <>)
11273 (scandir (string-append cwd "/build")))
11274 ":"
11275 (getenv "PYTHONPATH")))
11276 (invoke "python" "-m" "pytest")))))))
11277 (native-inputs
11278 `(("python-coverage" ,python-coverage)
11279 ("python-hypothesis" ,python-hypothesis)
11280 ("python-pympler" ,python-pympler)
11281 ("python-pytest" ,python-pytest)
11282 ("python-six" ,python-six)
11283 ("python-sphinx" ,python-sphinx)
11284 ("python-zope-interface" ,python-zope-interface)))
11285 (home-page "https://github.com/python-attrs/attrs/")
11286 (synopsis "Attributes without boilerplate")
11287 (description "@code{attrs} is a Python package with class decorators that
11288ease the chores of implementing the most common attribute-related object
11289protocols.")
11290 (license license:expat)))
11291
11292(define-public python2-attrs
11293 (package-with-python2 python-attrs))
11294
11295(define-public python-attrs-bootstrap
11296 (package
11297 (inherit python-attrs)
11298 (name "python-attrs-bootstrap")
11299 ;; Keep this on a fixed version so python-attrs can be updated without
11300 ;; triggering a mass-rebuild. FIXME: Update this in the next rebuild cycle.
11301 (version "17.4.0")
11302 (source (origin
11303 (method url-fetch)
11304 (uri (pypi-uri "attrs" version))
11305 (sha256
11306 (base32
11307 "1jafnn1kzd6qhxgprhx6y6ik1r5m2rilx25syzcmq03azp660y8w"))))
11308 (native-inputs `())
11309 (arguments `(#:tests? #f))))
11310
11311(define-public python2-attrs-bootstrap
11312 (package-with-python2 python-attrs-bootstrap))
11313
11314(define-public python2-cliapp
11315 (package
11316 (name "python2-cliapp")
9064b84e 11317 (version "1.20180812.1")
44d10b1f
RW
11318 (source
11319 (origin
11320 (method url-fetch)
11321 (uri (string-append
11322 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
11323 version ".tar.gz"))
11324 (sha256
11325 (base32
9064b84e 11326 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
44d10b1f
RW
11327 (build-system python-build-system)
11328 (arguments
11329 `(#:python ,python-2
11330 #:phases
11331 (modify-phases %standard-phases
11332 ;; check phase needs to be run before the build phase. If not,
11333 ;; coverage-test-runner looks for tests for the built source files,
11334 ;; and fails.
11335 (delete 'check)
11336 (add-before 'build 'check
11337 (lambda _
11338 ;; Disable python3 tests
11339 (substitute* "check"
11340 (("python3") "# python3"))
6c826d32 11341 (invoke "./check"))))))
44d10b1f
RW
11342 (native-inputs
11343 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
11344 ("python2-pep8" ,python2-pep8)))
11345 (propagated-inputs
11346 `(("python2-pyaml" ,python2-pyaml)))
11347 (home-page "https://liw.fi/cliapp/")
11348 (synopsis "Python framework for command line programs")
11349 (description "@code{python2-cliapp} is a python framework for
11350command line programs. It contains the typical stuff such programs
11351need to do, such as parsing the command line for options, and
11352iterating over input files.")
11353 (license license:gpl2+)))
11354
11355(define-public python2-ttystatus
11356 (package
11357 (name "python2-ttystatus")
e516a9c2 11358 (version "0.36")
44d10b1f
RW
11359 (source
11360 (origin
11361 (method url-fetch)
11362 (uri (string-append
11363 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
11364 version ".tar.gz"))
11365 (sha256
11366 (base32
e516a9c2 11367 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
44d10b1f
RW
11368 (build-system python-build-system)
11369 (native-inputs
11370 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
11371 ("python2-pep8" ,python2-pep8)))
11372 (arguments
11373 `(#:python ,python-2
11374 #:phases
11375 (modify-phases %standard-phases
11376 ;; check phase needs to be run before the build phase. If not,
11377 ;; coverage-test-runner looks for tests for the built source files,
11378 ;; and fails.
11379 (delete 'check)
11380 (add-before 'build 'check
cbeee881 11381 (lambda _ (invoke "make" "check"))))))
44d10b1f
RW
11382 (home-page "https://liw.fi/ttystatus/")
11383 (synopsis "Python library for showing progress reporting and
11384status updates on terminals")
11385 (description "@code{python2-ttystatus} is a python library for
11386showing progress reporting and status updates on terminals, for
11387command line programs. Output is automatically adapted to the width
11388of the terminal: truncated if it does not fit, and resized if the
11389terminal size changes.")
11390 (license license:gpl3+)))
11391
11392(define-public python2-tracing
11393 (package
11394 (name "python2-tracing")
11395 (version "0.10")
11396 (source
11397 (origin
11398 (method url-fetch)
11399 (uri (string-append
11400 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
11401 version ".tar.gz"))
11402 (sha256
11403 (base32
11404 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
11405 (build-system python-build-system)
11406 (arguments
11407 `(#:python ,python-2))
11408 (home-page "https://liw.fi/tracing/")
11409 (synopsis "Python debug logging helper")
11410 (description "@code{python2-tracing} is a python library for
11411logging debug messages. It provides a way to turn debugging messages
11412on and off, based on the filename they occur in. It is much faster
11413than using @code{logging.Filter} to accomplish the same thing, which
11414matters when code is run in production mode. The actual logging still
11415happens using the @code{logging} library.")
11416 (license license:gpl3+)))
11417
11418(define-public python2-larch
11419 (package
11420 (name "python2-larch")
11421 (version "1.20151025")
11422 (source
11423 (origin
11424 (method url-fetch)
11425 (uri (string-append
11426 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
11427 version ".tar.gz"))
11428 (patches (search-patches
11429 "python2-larch-coverage-4.0a6-compatibility.patch"))
11430 (sha256
11431 (base32
11432 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
11433 (build-system python-build-system)
11434 (arguments
11435 `(#:python ,python-2
11436 #:phases
11437 (modify-phases %standard-phases
11438 ;; check phase needs to be run before the build phase. If not,
11439 ;; coverage-test-runner looks for tests for the built source files,
11440 ;; and fails.
11441 (delete 'check)
11442 (add-before 'build 'check
204ad455 11443 (lambda _ (invoke "make" "check"))))))
44d10b1f
RW
11444 (native-inputs
11445 `(("cmdtest" ,cmdtest)
11446 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
11447 (propagated-inputs
11448 `(("python2-tracing" ,python2-tracing)))
11449 (home-page "https://liw.fi/larch/")
11450 (synopsis "Python copy-on-write B-tree library")
11451 (description "@code{python2-larch} is an implementation of
11452particular kind of B-tree, based on research by Ohad Rodeh. See
11453@url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
11454on the data structure.
11455
11456The distinctive feature of this B-tree is that a node is never
11457(conceptually) modified. Instead, all updates are done by
11458copy-on-write. This makes it easy to clone a tree, and modify only the
11459clone, while other processes access the original tree.")
11460 (license license:gpl3+)))
11461
11462(define-public python-astroid
11463 (package
11464 (name "python-astroid")
11465 (version "2.1.0")
11466 (source
11467 (origin
11468 (method url-fetch)
11469 (uri (pypi-uri "astroid" version))
11470 (sha256
11471 (base32
11472 "08hz675knh4294bancdapql392fmbjyimhbyrmfkz1ka7l035c1m"))))
11473 (build-system python-build-system)
11474 (propagated-inputs
11475 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
11476 ("python-six" ,python-six)
11477 ("python-wrapt" ,python-wrapt)))
11478 (native-inputs
11479 `(("python-dateutil" ,python-dateutil)
11480 ("python-nose" ,python-nose)
11481 ("python-pytest" ,python-pytest)
11482 ("python-pytest-runner" ,python-pytest-runner)))
11483 (arguments
11484 `(#:phases
11485 (modify-phases %standard-phases
11486 (add-after 'unpack 'remove-spurious-test
11487 (lambda _
11488 ;; This can be removed after upgrading from python-3.7
11489 ;; https://github.com/PyCQA/astroid/issues/593
11490 ;; https://bugs.python.org/issue34056
11491 (delete-file "astroid/tests/unittest_modutils.py")
11492 #t))
11493 (replace 'check
11494 (lambda _
11495 (invoke "pytest" "astroid"))))))
11496 (home-page "https://github.com/PyCQA/astroid")
11497 (synopsis "Common base representation of python source code for pylint and
11498other projects")
11499 (description "@code{python-astroid} provides a common base representation
11500of python source code for projects such as pychecker, pyreverse, pylint, etc.
11501
11502It provides a compatible representation which comes from the _ast module. It
11503rebuilds the tree generated by the builtin _ast module by recursively walking
11504down the AST and building an extended ast. The new node classes have
11505additional methods and attributes for different usages. They include some
11506support for static inference and local name scopes. Furthermore, astroid
11507builds partial trees by inspecting living objects.")
11508 (license license:lgpl2.1+)
11509 (properties `((python2-variant . ,(delay python2-astroid))))))
11510
11511(define-public python2-astroid
11512 (let ((base (package-with-python2
11513 (strip-python2-variant python-astroid))))
11514 (package (inherit base)
11515 ;; Version 2.x removes python2 support.
11516 (version "1.6.5")
11517 (source
11518 (origin
11519 (method url-fetch)
11520 (uri (pypi-uri "astroid" version))
11521 (sha256
11522 (base32
11523 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
11524 (arguments
11525 (substitute-keyword-arguments (package-arguments base)
11526 ((#:phases phases)
11527 `(modify-phases ,phases
11528 (add-after 'unpack 'remove-spurious-test
11529 (lambda _
11530 ;; https://github.com/PyCQA/astroid/issues/276
11531 (delete-file "astroid/tests/unittest_brain.py")
11532 #t))
11533 (replace 'check
11534 (lambda _
11535 (invoke"python" "-m" "unittest" "discover"
11536 "-p" "unittest*.py")))))))
11537 (native-inputs `())
11538 (propagated-inputs
11539 `(("python2-backports-functools-lru-cache"
11540 ,python2-backports-functools-lru-cache)
11541 ("python2-enum34" ,python2-enum34)
11542 ("python2-singledispatch" ,python2-singledispatch)
11543 ,@(package-propagated-inputs base))))))
11544
11545(define-public python-isort
11546 (package
11547 (name "python-isort")
e2227b6a 11548 (version "4.3.4")
44d10b1f
RW
11549 (source
11550 (origin
e2227b6a
EF
11551 (method git-fetch)
11552 (uri (git-reference
11553 ;; Tests pass only from the Github sources
11554 (url "https://github.com/timothycrosley/isort")
11555 (commit version)))
11556 (file-name (git-file-name name version))
44d10b1f
RW
11557 (sha256
11558 (base32
e2227b6a 11559 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
44d10b1f
RW
11560 (build-system python-build-system)
11561 (native-inputs
11562 `(("python-mock" ,python-mock)
11563 ("python-pytest" ,python-pytest)))
11564 (home-page "https://github.com/timothycrosley/isort")
11565 (synopsis "Python utility/library to sort python imports")
11566 (description "@code{python-isort} is a python utility/library to sort
11567imports alphabetically, and automatically separated into sections. It
11568provides a command line utility, a python library and plugins for various
11569editors.")
e2227b6a
EF
11570 (license license:expat)
11571 (properties `((python2-variant . ,(delay python2-isort))))))
44d10b1f
RW
11572
11573(define-public python2-isort
e2227b6a
EF
11574 (let ((base (package-with-python2
11575 (strip-python2-variant python-isort))))
11576 (package (inherit base)
11577 (native-inputs
11578 `(("python2-futures" ,python2-futures)
11579 ,@(package-native-inputs base))))))
44d10b1f
RW
11580
11581(define-public python2-backports-functools-lru-cache
11582 (package
11583 (name "python2-backports-functools-lru-cache")
11584 (version "1.5")
11585 (source
11586 (origin
11587 (method url-fetch)
11588 ;; only the pypi tarballs contain the necessary metadata
11589 (uri (pypi-uri "backports.functools_lru_cache" version))
11590 (sha256
11591 (base32
11592 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
11593 (build-system python-build-system)
11594 (native-inputs
11595 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
11596 (arguments
11597 `(#:python ,python-2))
11598 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
11599 (synopsis "Backport of functools.lru_cache from Python 3.3")
11600 (description "@code{python2-backports-functools-lru-cache} is a backport
11601of @code{functools.lru_cache} from python 3.3.")
11602 (license license:expat)))
11603
11604(define-public python-configparser
11605 (package
11606 (name "python-configparser")
11607 (version "3.5.0")
11608 (source
11609 (origin
11610 (method url-fetch)
11611 (uri (string-append
11612 "https://bitbucket.org/ambv/configparser/get/"
11613 version ".tar.bz2"))
11614 (file-name (string-append name "-" version ".tar.gz"))
11615 (sha256
11616 (base32
11617 "0waq40as14abwzbb321hfz4vr1fi363nscy32ga14qvfygrg96wa"))))
11618 (build-system python-build-system)
809f003f 11619 (home-page "https://github.com/jaraco/configparser/")
44d10b1f
RW
11620 (synopsis "Backport of configparser from python 3.5")
11621 (description "@code{python-configparser} is a backport of
11622@code{configparser} from Python 3.5 so that it can be used directly
11623in other versions.")
11624 (license license:expat)))
11625
11626(define-public python2-configparser
11627 (package-with-python2 python-configparser))
11628
11629(define-public python-mando
11630 (package
11631 (name "python-mando")
11632 (version "0.6.4")
11633 (source (origin
11634 (method url-fetch)
11635 (uri (pypi-uri "mando" version))
11636 (sha256
11637 (base32
11638 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
11639 (build-system python-build-system)
11640 (propagated-inputs
11641 `(("python-rst2ansi" ,python-rst2ansi)
11642 ("python-six" ,python-six)))
11643 (native-inputs
11644 `(("python-pytest" ,python-pytest)))
11645 (home-page "https://mando.readthedocs.org/")
11646 (synopsis
11647 "Wrapper around argparse, allowing creation of complete CLI applications")
11648 (description
11649 "This package is a wrapper around argparse, allowing you to write complete CLI
11650applications in seconds while maintaining all the flexibility.")
11651 (license license:expat)))
11652
11653(define-public python2-mando
11654 (package-with-python2 python-mando))
11655
11656(define-public python-fudge
11657 (package
11658 (name "python-fudge")
11659 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
11660 ;; package, which is currently the only use of this package.
11661 (version "0.9.6")
11662 (source
11663 (origin
11664 (method url-fetch)
11665 (uri (pypi-uri "fudge" version))
11666 (sha256
11667 (base32
11668 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
11669 (build-system python-build-system)
11670 (arguments
11671 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
11672 (home-page "https://github.com/fudge-py/fudge")
11673 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
11674 (description
11675 "Fudge is a Python module for using fake objects (mocks and stubs) to
11676test real ones.
11677
11678In readable Python code, you declare the methods available on your fake object
11679and how they should be called. Then you inject that into your application and
11680start testing. This declarative approach means you don’t have to record and
11681playback actions and you don’t have to inspect your fakes after running code.
11682If the fake object was used incorrectly then you’ll see an informative
11683exception message with a traceback that points to the culprit.")
11684 (license license:expat)))
11685
11686(define-public python2-fudge
11687 (package-with-python2 python-fudge))
11688
11689(define-public python-mwclient
11690 (package
11691 (name "python-mwclient")
11692 (version "0.8.4")
11693 (source
11694 (origin
11695 (method url-fetch)
11696 ;; The PyPI version wouldn't contain tests.
11697 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
11698 "v" version ".tar.gz"))
11699 (file-name (string-append name "-" version ".tar.gz"))
11700 (sha256
11701 (base32
11702 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
11703 (build-system python-build-system)
11704 (propagated-inputs
11705 `(("python-requests" ,python-requests)
11706 ("python-requests-oauthlib"
11707 ,python-requests-oauthlib)
11708 ("python-six" ,python-six)))
11709 (native-inputs
11710 `(("python-mock" ,python-mock)
11711 ("python-pytest" ,python-pytest)
11712 ("python-pytest-pep8" ,python-pytest-pep8)
11713 ("python-pytest-cache" ,python-pytest-cache)
11714 ("python-pytest-cov" ,python-pytest-cov)
11715 ("python-responses" ,python-responses)))
11716 (home-page "https://github.com/btongminh/mwclient")
11717 (synopsis "MediaWiki API client")
11718 (description "This package provides a MediaWiki API client.")
11719 (license license:expat)))
11720
11721(define-public python2-mwclient
11722 (package-with-python2 python-mwclient))
11723
11724(define-public python-utils
11725 (package
11726 (name "python-utils")
11727 (version "2.1.0")
11728 (source (origin
11729 (method url-fetch)
11730 (uri (pypi-uri "python-utils" version))
11731 (sha256
11732 (base32
11733 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
11734 (build-system python-build-system)
11735 (native-inputs
11736 `(("pytest-runner" ,python-pytest-runner)
11737 ("pytest" ,python-pytest)
11738 ("six" ,python-six)))
11739 (home-page "https://github.com/WoLpH/python-utils")
11740 (synopsis "Convenient utilities not included with the standard Python install")
11741 (description
11742 "Python Utils is a collection of small Python functions and classes which
11743make common patterns shorter and easier.")
11744 (license license:bsd-2)))
11745
11746(define-public python2-utils
11747 (package-with-python2 python-utils))
11748
11749(define-public python-sphinx-me
11750 (package
11751 (name "python-sphinx-me")
11752 (version "0.3")
11753 (source
11754 (origin
11755 (method url-fetch)
11756 (uri (pypi-uri "sphinx-me" version))
11757 (sha256
11758 (base32
11759 "06jzgp213zihnvpcy2y5jy3ykid3apc2ncp2pg6a2g05lhiziglq"))))
11760 (build-system python-build-system)
11761 (home-page "https://github.com/stephenmcd/sphinx-me")
11762 (synopsis "Create a Sphinx documentation shell")
11763 (description
11764 "Create a Sphinx documentation shell for your project and include the
11765README file as the documentation index. It handles extracting the required
11766meta data such as the project name, author and version from your project for
11767use in your Sphinx docs.")
11768 (license license:bsd-2)))
11769
11770(define-public python2-sphinx-me
11771 (package-with-python2 python-sphinx-me))
11772
11773(define-public python-diff-match-patch
11774 (package
11775 (name "python-diff-match-patch")
11776 (version "20121119")
11777 (source
11778 (origin
11779 (method url-fetch)
11780 (uri (pypi-uri "diff-match-patch" version))
11781 (sha256
11782 (base32
11783 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
11784 (build-system python-build-system)
11785 (home-page "https://code.google.com/p/google-diff-match-patch")
11786 (synopsis "Synchronize plain text")
11787 (description "Diff Match and Patch libraries offer robust algorithms to
11788perform the operations required for synchronizing plain text.")
11789 (license license:asl2.0)))
11790
11791(define-public python2-diff-match-patch
11792 (package-with-python2 python-diff-match-patch))
11793
11794(define-public python-dirsync
11795 (package
11796 (name "python-dirsync")
11797 (version "2.2.3")
11798 (source
11799 (origin
11800 (method url-fetch)
11801 (uri (pypi-uri "dirsync" version))
11802 (sha256
11803 (base32
11804 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
11805 (build-system python-build-system)
11806 (propagated-inputs
11807 `(("six" ,python-six)))
11808 (home-page "https://bitbucket.org/tkhyn/dirsync")
11809 (synopsis "Advanced directory tree synchronisation tool")
11810 (description "Advanced directory tree synchronisation tool.")
11811 (license license:expat)))
11812
11813(define-public python2-dirsync
11814 (package-with-python2 python-dirsync))
11815
11816(define-public python-levenshtein
11817 (package
11818 (name "python-levenshtein")
11819 (version "0.12.0")
11820 (source
11821 (origin
11822 (method url-fetch)
11823 (uri (pypi-uri "python-Levenshtein" version))
11824 (sha256
11825 (base32
11826 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
11827 (build-system python-build-system)
11828 (home-page "https://github.com/ztane/python-Levenshtein")
11829 (synopsis "Fast computation of Levenshtein distance and string similarity")
11830 (description
11831 "The Levenshtein Python C extension module contains functions for fast computation of
11832@enumerate
11833@item Levenshtein (edit) distance, and edit operations
11834@item string similarity
11835@item approximate median strings, and generally string averaging
11836@item string sequence and set similarity
11837@end enumerate
11838It supports both normal and Unicode strings.")
11839 (license license:gpl2+)))
11840
11841(define-public python2-levenshtein
11842 (package-with-python2 python-levenshtein))
11843
11844(define-public python-scandir
11845 (package
11846 (name "python-scandir")
11847 (version "1.9.0")
11848 (source
11849 (origin
11850 (method url-fetch)
11851 (uri (pypi-uri "scandir" version))
11852 (sha256
11853 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
11854 (build-system python-build-system)
11855 (arguments
11856 `(#:phases (modify-phases %standard-phases
11857 (replace 'check
11858 (lambda _
11859 (invoke "python" "test/run_tests.py"))))))
11860 (home-page "https://github.com/benhoyt/scandir")
11861 (synopsis "Directory iteration function")
11862 (description
11863 "Directory iteration function like os.listdir(), except that instead of
11864returning a list of bare filenames, it yields DirEntry objects that include
11865file type and stat information along with the name. Using scandir() increases
11866the speed of os.walk() by 2-20 times (depending on the platform and file
11867system) by avoiding unnecessary calls to os.stat() in most cases.
11868
11869This package is part of the Python standard library since version 3.5.")
11870 (license license:bsd-3)))
11871
11872(define-public python2-scandir
11873 (package-with-python2 python-scandir))
11874
11875(define-public python2-stemming
11876 (package
11877 (name "python2-stemming")
11878 (version "1.0.1")
11879 (source
11880 (origin
11881 (method url-fetch)
11882 (uri (pypi-uri "stemming" version))
11883 (sha256
11884 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
11885 (build-system python-build-system)
11886 (arguments
11887 `(#:python ,python-2))
11888 (home-page "https://bitbucket.org/mchaput/stemming/overview")
11889 (synopsis "Python implementations of various stemming algorithms")
11890 (description
11891 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
11892stemming algorithms for English. These implementations are straightforward and
11893efficient, unlike some Python versions of the same algorithms available on the
11894Web. This package is an extraction of the stemming code included in the Whoosh
11895search engine.")
11896 (license license:public-domain)))
11897
11898(define-public python-factory-boy
11899 (package
11900 (name "python-factory-boy")
11901 (version "2.8.1")
11902 (source
11903 (origin
11904 (method url-fetch)
11905 (uri (pypi-uri "factory_boy" version))
11906 (sha256
11907 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
11908 (build-system python-build-system)
11909 (arguments
11910 ;; Tests are not included in the tarball.
11911 `(#:tests? #f))
11912 (propagated-inputs
11913 `(("faker" ,python-faker)))
11914 (home-page "https://github.com/benhoyt/scandir")
11915 (synopsis "Versatile test fixtures replacement")
11916 (description
11917 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
11918
11919As a fixtures replacement tool, it aims to replace static, hard to maintain
11920fixtures with easy-to-use factories for complex object.
11921
11922Instead of building an exhaustive test setup with every possible combination
11923of corner cases, factory_boy allows you to use objects customized for the
11924current test, while only declaring the test-specific fields")
11925 (license license:expat)))
11926
11927(define-public python2-factory-boy
11928 (package-with-python2 python-factory-boy))
11929
11930(define-public python-translate-toolkit
11931 (package
11932 (name "python-translate-toolkit")
11933 (version "2.1.0")
11934 (source
11935 (origin
11936 (method url-fetch)
11937 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
11938 (sha256
11939 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
11940 (build-system python-build-system)
11941 (native-inputs
11942 `(("python-pytest" ,python-pytest)
11943 ("python-sphinx" ,python-sphinx)))
11944 (propagated-inputs
11945 `(("python-babel" ,python-babel)
11946 ("python-beautifulsoup4" ,python-beautifulsoup4)
11947 ("python-chardet" ,python-chardet)
11948 ("python-diff-match-patch" ,python-diff-match-patch)
11949 ("python-levenshtein" ,python-levenshtein)
11950 ("python-lxml" ,python-lxml)
11951 ("python-six" ,python-six)
11952 ("python-vobject" ,python-vobject)
11953 ("python-pyyaml" ,python-pyyaml)))
11954 (arguments
11955 ;; TODO: tests are not run, because they end with
11956 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
11957 ;; 'parse_funcs'
11958 ;; during test setup.
11959 `(#:tests? #f))
11960 (home-page "http://toolkit.translatehouse.org")
11961 (synopsis "Tools and API for translation and localization engineering")
11962 (description
11963 "Tools and API for translation and localization engineering. It contains
11964several utilities, as well as an API for building localization tools.")
11965 (license license:gpl2+)))
11966
11967(define-public python2-translate-toolkit
11968 (package-with-python2 python-translate-toolkit))
11969
11970(define-public python-packaging
11971 (package
11972 (name "python-packaging")
11973 (version "18.0")
11974 (source
11975 (origin
11976 (method url-fetch)
11977 (uri (pypi-uri "packaging" version))
11978 (sha256
11979 (base32
11980 "01wq9c53ix5rz6qg2c98gy8n4ff768rmanifm8m5jpjiaizj51h8"))))
11981 (build-system python-build-system)
11982 (arguments
11983 `(#:phases (modify-phases %standard-phases
11984 (replace 'check
11985 (lambda _ (invoke "py.test" "-vv"))))))
11986 (native-inputs
11987 `(("python-pretend" ,python-pretend)
11988 ("python-pytest" ,python-pytest)))
11989 (propagated-inputs
11990 `(("python-pyparsing" ,python-pyparsing)
11991 ("python-six" ,python-six)))
11992 (home-page "https://github.com/pypa/packaging")
11993 (synopsis "Core utilities for Python packages")
11994 (description "Packaging is a Python module for dealing with Python packages.
11995It offers an interface for working with package versions, names, and dependency
11996information.")
11997 ;; From 'LICENSE': This software is made available under the terms of
11998 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
11999 ;; Contributions to this software is made under the terms of *both* these
12000 ;; licenses.
12001 (license (list license:asl2.0 license:bsd-2))))
12002
12003(define-public python2-packaging
12004 (package-with-python2 python-packaging))
12005
12006(define-public python-relatorio
12007 (package
12008 (name "python-relatorio")
12009 (version "0.8.0")
12010 (source
12011 (origin
12012 (method url-fetch)
12013 (uri (pypi-uri "relatorio" version))
12014 (sha256
12015 (base32
12016 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
12017 (build-system python-build-system)
12018 (propagated-inputs
12019 `(("python-lxml" ,python-lxml)
12020 ("python-genshi" ,python-genshi)))
12021 (native-inputs
12022 `(("python-magic" ,python-magic)))
12023 (home-page "https://relatorio.tryton.org/")
12024 (synopsis "Templating library able to output ODT and PDF files")
12025 (description "Relatorio is a templating library which provides a way to
12026easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
12027for more filetypes can be easily added by creating plugins for them.")
12028 (license license:gpl3+)))
12029
12030(define-public python2-relatorio
12031 (package-with-python2 python-relatorio))
12032
12033(define-public python-radon
12034 (package
12035 (name "python-radon")
12036 (version "2.2.0")
12037 (source
12038 (origin
12039 (method url-fetch)
12040 (uri (pypi-uri "radon" version))
12041 (sha256
12042 (base32
12043 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
12044 (build-system python-build-system)
12045 (arguments
12046 `(#:phases (modify-phases %standard-phases
12047 (replace 'check
12048 (lambda _
12049 (invoke "python" "radon/tests/run.py"))))))
12050 (propagated-inputs
12051 `(("python-colorama" ,python-colorama)
12052 ("python-flake8-polyfill" ,python-flake8-polyfill)
12053 ("python-mando" ,python-mando)))
12054 (native-inputs
12055 `(("python-pytest" ,python-pytest)
12056 ("python-pytest-mock" ,python-pytest-mock)))
12057 (home-page "https://radon.readthedocs.org/")
12058 (synopsis "Code Metrics in Python")
12059 (description "Radon is a Python tool which computes various code metrics.
12060Supported metrics are:
12061@itemize @bullet
12062@item raw metrics: SLOC, comment lines, blank lines, &c.
12063@item Cyclomatic Complexity (i.e. McCabe’s Complexity)
12064@item Halstead metrics (all of them)
12065@item the Maintainability Index (a Visual Studio metric)
12066@end itemize")
12067 (license license:expat)))
12068
12069(define-public python2-radon
12070 (package-with-python2 python-radon))
12071
12072(define-public python-sure
12073 (package
12074 (name "python-sure")
12075 (version "1.4.11")
12076 (source
12077 (origin
12078 (method url-fetch)
12079 (uri (pypi-uri "sure" version))
12080 (sha256
12081 (base32
12082 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
12083 (build-system python-build-system)
12084 (propagated-inputs
12085 `(("python-mock" ,python-mock)
12086 ("python-six" ,python-six)))
12087 (native-inputs
12088 `(("python-nose" ,python-nose)))
12089 (home-page "https://github.com/gabrielfalcao/sure")
12090 (synopsis "Automated testing library in python for python")
12091 (description
12092 "Sure is a python library that leverages a DSL for writing assertions.
12093Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
12094 (license license:gpl3+)))
12095
12096(define-public python2-sure
12097 (package-with-python2 python-sure))
12098
12099(define-public python2-couleur
12100 ;; This package does not seem to support python3 at all, hence,
12101 ;; only the python2 variant definition is provided.
12102 (package
12103 (name "python2-couleur")
12104 (version "0.6.2")
12105 (source
12106 (origin
12107 (method url-fetch)
12108 (uri (pypi-uri "couleur" version))
12109 (sha256
12110 (base32
12111 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
12112 (build-system python-build-system)
12113 (arguments
12114 `(#:python ,python-2))
12115 (home-page "https://github.com/gabrielfalcao/couleur")
12116 (synopsis
12117 "ANSI terminal tool for python, colored shell and other handy fancy features")
12118 (description
12119 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
12120terminal such as coloured output in the shell, overwriting output, indentation, etc.")
12121 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
12122 ;; https://github.com/gabrielfalcao/couleur/issues/11
12123 (license license:lgpl3+)))
12124
12125(define-public python-misaka
12126 (package
12127 (name "python-misaka")
0dcb3412 12128 (version "2.1.1")
44d10b1f
RW
12129 (source
12130 (origin
12131 (method url-fetch)
12132 (uri (pypi-uri "misaka" version))
12133 (sha256
12134 (base32
0dcb3412 12135 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
44d10b1f
RW
12136 (build-system python-build-system)
12137 (arguments
12138 `(;; Line 37 of setup.py calls self.run_command('develop')
12139 ;; in the 'check' phase. This command seems to be trying
12140 ;; to write to
12141 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
12142 ;; for which it does not have the permission to write.
12143 #:tests? #f))
12144 (propagated-inputs
12145 `(("python-cffi" ,python-cffi)))
12146 (home-page "https://github.com/FSX/misaka")
12147 (synopsis "Python binding for Hoedown")
12148 (description
12149 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
12150library written in C. It features a fast HTML renderer and functionality to make custom
12151renderers (e.g. man pages or LaTeX).")
12152 (license license:expat)))
12153
12154(define-public python2-misaka
12155 (package-with-python2 python-misaka))
12156
12157(define-public python2-steadymark
12158 ;; This is forced into being a python2 only variant
12159 ;; due to its dependence on couleur that has no support
12160 ;; for python3
12161 (package
12162 (name "python2-steadymark")
12163 (version "0.7.3")
12164 (source
12165 (origin
12166 (method url-fetch)
12167 (uri (pypi-uri "steadymark" version))
12168 (sha256
12169 (base32
12170 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
12171 (build-system python-build-system)
12172 (native-inputs
12173 `(("python-couleur" ,python2-couleur)
12174 ("python-sure" ,python2-sure)
12175 ("python-misaka" ,python2-misaka)))
12176 (arguments
12177 `(#:python ,python-2
12178 #:phases
12179 (modify-phases %standard-phases
12180 (add-before 'build 'patch-setup-py
12181 (lambda _
12182 ;; Update requirements from dependency==version
12183 ;; to dependency>=version
12184 (substitute* "setup.py"
12185 (("==") ">="))
12186 #t)))))
12187 (home-page "https://github.com/gabrielfalcao/steadymark")
12188 (synopsis "Markdown-based test runner for python")
12189 (description
12190 "@code{Steadymark} allows documentation to be written in github-flavoured
12191markdown. The documentation may contain snippets of code surrounded by python
12192code blocks and @code{Steadymark} will find these snippets and run them, making
12193sure that there are no old malfunctional examples in the documentation examples.")
12194 (license license:expat)))
12195
12196(define-public python-jsonpointer
12197 (package
12198 (name "python-jsonpointer")
12199 (version "1.10")
12200 (source
12201 (origin
12202 (method url-fetch)
12203 (uri (pypi-uri "jsonpointer" version))
12204 (sha256
12205 (base32
12206 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
12207 (build-system python-build-system)
12208 (home-page "https://github.com/stefankoegl/python-json-pointer")
12209 (synopsis "Identify specific nodes in a JSON document")
12210 (description "@code{jsonpointer} allows you to access specific nodes
12211by path in a JSON document (see RFC 6901).")
12212 (license license:bsd-3)))
12213
12214(define-public python2-jsonpointer
12215 (package-with-python2 python-jsonpointer))
12216
12217(define-public python-jsonpatch
12218 (package
12219 (name "python-jsonpatch")
12220 (version "1.16")
12221 (source
12222 (origin
12223 (method url-fetch)
12224 ;; pypi version lacks tests.js
12225 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12226 "archive/v" version ".tar.gz"))
12227 (file-name (string-append name "-" version ".tar.gz"))
12228 (sha256
12229 (base32
12230 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
12231 (build-system python-build-system)
12232 (native-inputs
12233 `(("python-jsonpointer" ,python-jsonpointer)))
12234 (home-page "https://github.com/stefankoegl/python-json-patch")
12235 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
12236 (description "@code{jsonpatch} is a library and program that allows
12237applying JSON Patches according to RFC 6902.")
12238 (license license:bsd-3)))
12239
12240(define-public python2-jsonpatch
12241 (package-with-python2 python-jsonpatch))
12242
12243(define-public python-jsonpatch-0.4
12244 (package (inherit python-jsonpatch)
12245 (name "python-jsonpatch")
12246 (version "0.4")
12247 (source
12248 (origin
12249 (method url-fetch)
12250 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12251 "archive/v" version ".tar.gz"))
12252 (file-name (string-append name "-" version ".tar.gz"))
12253 (sha256
12254 (base32
12255 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
12256
12257(define-public python2-jsonpatch-0.4
12258 (package-with-python2 python-jsonpatch-0.4))
12259
12260(define-public python-rfc3986
12261 (package
12262 (name "python-rfc3986")
12263 (version "1.1.0")
12264 (source (origin
12265 (method url-fetch)
12266 (uri (pypi-uri "rfc3986" version))
12267 (sha256
12268 (base32
12269 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
12270 (build-system python-build-system)
12271 (arguments
12272 `(#:modules ((guix build utils)
12273 (guix build python-build-system)
12274 (ice-9 ftw)
12275 (srfi srfi-1)
12276 (srfi srfi-26))
12277 #:phases
12278 (modify-phases %standard-phases
12279 (replace 'check
12280 (lambda _
12281 (let ((cwd (getcwd)))
12282 (setenv "PYTHONPATH"
12283 (string-append cwd "/build/"
12284 (find (cut string-prefix? "lib" <>)
12285 (scandir (string-append cwd "/build")))
12286 ":"
12287 (getenv "PYTHONPATH")))
12288 (invoke "pytest" "-v")))))))
12289 (native-inputs
12290 `(("python-pytest" ,python-pytest)))
12291 (home-page "https://rfc3986.readthedocs.io/")
12292 (synopsis "Parse and validate URI references")
12293 (description
12294 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
12295validation and authority parsing. This module also supports RFC@tie{}6874
12296which adds support for zone identifiers to IPv6 addresses.")
12297 (license license:asl2.0)))
12298
12299(define-public python2-rfc3986
12300 (package-with-python2 python-rfc3986))
12301
12302(define-public python-rfc3987
12303 (package
12304 (name "python-rfc3987")
12305 (version "1.3.7")
12306 (source
12307 (origin
12308 (method url-fetch)
12309 (uri (pypi-uri "rfc3987" version))
12310 (sha256
12311 (base32
12312 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
12313 (build-system python-build-system)
12314 (home-page "https://pypi.python.org/pypi/rfc3987")
12315 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
12316 (description "@code{rfc3987} provides routines for parsing and
12317validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
12318 (license license:gpl3+)))
12319
12320(define-public python2-rfc3987
12321 (package-with-python2 python-rfc3987))
12322
12323(define-public python-validate-email
12324 (package
12325 (name "python-validate-email")
12326 (version "1.3")
12327 (source
12328 (origin
12329 (method url-fetch)
12330 (uri (pypi-uri "validate_email" version))
12331 (sha256
12332 (base32
12333 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
12334 (build-system python-build-system)
12335 (home-page "https://github.com/syrusakbary/validate_email")
12336 (synopsis "Verifies if an email address is valid and really exists")
12337 (description "@code{validate_email} can be used to verify if an email
12338address is valid and really exists.")
12339 (license license:lgpl3+)))
12340
12341(define-public python2-validate-email
12342 (package-with-python2 python-validate-email))
12343
12344(define-public python-flex
12345 (package
12346 (name "python-flex")
12347 (version "6.10.0")
12348 (source
12349 (origin
12350 (method url-fetch)
12351 (uri (pypi-uri "flex" version))
12352 (sha256
12353 (base32
12354 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
12355 (build-system python-build-system)
12356 (propagated-inputs
12357 `(("python-click" ,python-click)
12358 ("python-iso8601" ,python-iso8601)
12359 ("python-jsonpointer" ,python-jsonpointer)
12360 ("python-pyyaml" ,python-pyyaml)
12361 ("python-requests" ,python-requests)
12362 ("python-rfc3987" ,python-rfc3987)
12363 ("python-six" ,python-six)
12364 ("python-validate-email" ,python-validate-email)))
12365 (home-page "https://github.com/pipermerriam/flex")
12366 (synopsis "Validates Swagger schemata")
12367 (description "@code{flex} can be used to validate Swagger schemata.")
12368 (license license:bsd-3)))
12369
12370(define-public python2-flex
12371 (package-with-python2 python-flex))
12372
12373(define-public python-marshmallow
12374 (package
12375 (name "python-marshmallow")
12376 (version "3.0.0b14")
12377 (source
12378 (origin
12379 (method url-fetch)
12380 (uri (pypi-uri "marshmallow" version))
12381 (sha256
12382 (base32
12383 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
12384 (build-system python-build-system)
12385 (propagated-inputs
12386 `(("python-dateutil" ,python-dateutil)
12387 ("python-simplejson" ,python-simplejson)))
12388 (native-inputs
12389 `(("python-pytest" ,python-pytest)
12390 ("python-pytz" ,python-pytz)))
12391 (home-page "https://github.com/marshmallow-code/marshmallow")
12392 (synopsis "Convert complex datatypes to and from native
12393Python datatypes.")
12394 (description "@code{marshmallow} provides a library for converting
12395complex datatypes to and from native Python datatypes.")
12396 (license license:expat)))
12397
12398(define-public python2-marshmallow
12399 (package-with-python2 python-marshmallow))
12400
12401(define-public python-apispec
12402 (package
12403 (name "python-apispec")
12404 (version "0.25.3")
12405 (source
12406 (origin
12407 (method url-fetch)
12408 (uri (pypi-uri "apispec" version))
12409 (sha256
12410 (base32
12411 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
12412 (build-system python-build-system)
12413 (propagated-inputs
12414 `(("python-pyyaml" ,python-pyyaml)))
12415 (native-inputs
12416 `(("python-pytest" ,python-pytest)
12417 ("python-flask" ,python-flask)
12418 ("python-marshmallow" ,python-marshmallow)
12419 ("python-tornado" ,python-tornado)
12420 ("python-bottle" ,python-bottle)
12421 ("python-mock" ,python-mock)))
12422 (home-page "https://github.com/marshmallow-code/apispec")
12423 (synopsis "Swagger 2.0 API specification generator")
12424 (description "@code{python-apispec} is a pluggable API specification
12425generator. Currently supports the OpenAPI specification (f.k.a.
12426Swagger 2.0).")
12427 (license license:expat)))
12428
12429(define-public python2-apispec
12430 (package-with-python2 python-apispec))
12431
12432(define-public python-flasgger
12433 (package
12434 (name "python-flasgger")
12435 (version "0.6.3")
12436 (source
12437 (origin
12438 (method url-fetch)
12439 (uri (string-append "https://github.com/rochacbruno/flasgger/archive/"
12440 version ".tar.gz"))
12441 (file-name (string-append name "-" version ".tar.gz"))
12442 (sha256
12443 (base32
12444 "1gqzlm0rb55fdpsy5ipkganlx9cnpi454fqyycr03jm22zql14ay"))))
12445 (build-system python-build-system)
12446 (arguments
12447 `(#:phases
12448 (modify-phases %standard-phases
12449 (replace 'check
12450 (lambda* (#:key inputs outputs #:allow-other-keys)
12451 (substitute* "Makefile"
12452 (("flake8 flasgger --ignore=F403")
12453 "flake8 flasgger --ignore=E731,F403"))
12454 (setenv "PYTHONPATH" (string-append (getcwd)
12455 ":"
12456 (getenv "PYTHONPATH")))
ac599a09 12457 (invoke "py.test"))))))
44d10b1f
RW
12458 (propagated-inputs
12459 `(("python-flask" ,python-flask)
12460 ("python-pyyaml" ,python-pyyaml)
12461 ("python-jsonschema" ,python-jsonschema)
12462 ("python-mistune" ,python-mistune)
12463 ("python-six" ,python-six)))
12464 (native-inputs
12465 `(("python-decorator" ,python-decorator)
12466 ("python-flake8" ,python-flake8)
12467 ("python-flask-restful" ,python-flask-restful)
12468 ("python-flex" ,python-flex)
12469 ("python-pytest" ,python-pytest)
12470 ("python-pytest-cov" ,python-pytest-cov)
12471 ("python-marshmallow" ,python-marshmallow)
12472 ("python-apispec" ,python-apispec)))
12473 (home-page "https://github.com/rochacbruno/flasgger/")
12474 (synopsis "Extract Swagger specs from your Flask project")
12475 (description "@code{python-flasgger} allows extracting Swagger specs
12476from your Flask project. It is a fork of Flask-Swagger.")
12477 (license license:expat)))
12478
12479(define-public python2-flasgger
12480 (package-with-python2 python-flasgger))
12481
12482(define-public python-swagger-spec-validator
12483 (package
12484 (name "python-swagger-spec-validator")
12485 (version "2.1.0")
12486 (source
12487 (origin
12488 (method url-fetch)
12489 (uri (pypi-uri "swagger-spec-validator" version))
12490 (sha256
12491 (base32
12492 "13hkpn2lycwr0468yqhjb3kwszqf7hjwlq61w7vdxq1caz31k4nw"))))
12493 (build-system python-build-system)
12494 (propagated-inputs
12495 `(("python-jsonschema" ,python-jsonschema)
12496 ("python-six" ,python-six)))
12497 (home-page
12498 "https://github.com/Yelp/swagger_spec_validator")
12499 (synopsis "Validation of Swagger specifications")
12500 (description "@code{swagger_spec_validator} provides a library for
12501validating Swagger API specifications.")
12502 (license license:asl2.0)))
12503
12504(define-public python2-swagger-spec-validator
12505 (package-with-python2 python-swagger-spec-validator))
12506
12507(define-public python-apache-libcloud
12508 (package
12509 (name "python-apache-libcloud")
12510 (version "2.4.0")
12511 (source
12512 (origin
12513 (method url-fetch)
12514 (uri (pypi-uri "apache-libcloud" version))
12515 (sha256
12516 (base32
12517 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
12518 (build-system python-build-system)
12519 (arguments
12520 `(#:phases
12521 (modify-phases %standard-phases
12522 (add-after 'unpack 'patch-ssh
12523 (lambda* (#:key inputs #:allow-other-keys)
12524 (substitute* "libcloud/compute/ssh.py"
12525 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
12526 "/bin/ssh" "'")))
12527 #t))
12528 (add-after 'unpack 'patch-tests
12529 (lambda _
12530 (substitute* "./libcloud/test/test_file_fixtures.py"
12531 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
12532 (("def _ascii") "def _raw_data(self, method, url, body, headers):
12533 return (httplib.OK,
12534 \"1234abcd\",
12535 {\"test\": \"value\"},
12536 httplib.responses[httplib.OK])
12537 def _ascii"))
12538 (substitute* "libcloud/test/compute/test_ssh_client.py"
12539 (("class ShellOutSSHClientTests")
12540 "@unittest.skip(\"Guix container doesn't have ssh service\")
12541class ShellOutSSHClientTests")
12542 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
12543 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
12544 (("'.xF0', '.x90', '.x8D', '.x88'")
12545 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
12546 #t))
12547 (add-before 'check 'copy-secret
12548 (lambda _
12549 (copy-file "libcloud/test/secrets.py-dist"
12550 "libcloud/test/secrets.py")
12551 #t)))))
12552 (inputs
12553 `(("openssh" ,openssh)))
12554 (propagated-inputs
12555 `(("python-paramiko" ,python-paramiko)
12556 ("python-requests" ,python-requests)))
12557 (native-inputs
12558 `(("python-lockfile" ,python-lockfile)
12559 ("python-mock" ,python-mock)
12560 ("python-pytest" ,python-pytest)
12561 ("python-pytest-runner" ,python-pytest-runner)
12562 ("python-requests-mock" ,python-requests-mock)))
12563 (home-page "https://libcloud.apache.org/")
12564 (synopsis "Unified Cloud API")
12565 (description "@code{libcloud} is a Python library for interacting with
12566many of the popular cloud service providers using a unified API.")
12567 (license license:asl2.0)))
12568
12569(define-public python2-apache-libcloud
12570 (package-with-python2 python-apache-libcloud))
12571
12572(define-public python-smmap2
12573 (package
12574 (name "python-smmap2")
12575 (version "2.0.3")
12576 (source
12577 (origin
12578 (method url-fetch)
12579 (uri (pypi-uri "smmap2" version))
12580 (sha256
12581 (base32
12582 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
12583 (build-system python-build-system)
12584 (native-inputs
12585 `(("python-nosexcover" ,python-nosexcover)))
12586 (home-page "https://github.com/Byron/smmap")
12587 (synopsis "Python sliding window memory map manager")
12588 (description "@code{smmap2} is a pure Python implementation of a sliding
12589window memory map manager.")
12590 (license license:bsd-3)))
12591
12592(define-public python2-smmap2
12593 (package-with-python2 python-smmap2))
12594
12595(define-public python-regex
12596 (package
12597 (name "python-regex")
12598 (version "2017.06.07")
12599 (source (origin
12600 (method url-fetch)
12601 (uri (pypi-uri "regex" version))
12602 (sha256
12603 (base32
12604 "06r6b7yigikbj3a72whl85r2b64pj1r0ypmw9yalmkm0wnxq8mz4"))))
12605 (build-system python-build-system)
12606 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
12607 (synopsis "Alternative regular expression module")
12608 (description "This regular expression implementation is backwards-
12609compatible with the standard @code{re} module, but offers additional
12610functionality like full case-folding for case-insensitive matches in Unicode.")
12611 (license license:psfl)))
12612
12613(define-public python2-regex
12614 (package-with-python2 python-regex))
12615
12616(define-public python2-pyopengl
12617 (package
12618 (name "python2-pyopengl")
12619 (version "3.1.0")
12620 (source
12621 (origin
12622 (method url-fetch)
12623 (uri (pypi-uri "PyOpenGL" version))
12624 (sha256
12625 (base32
12626 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
12627 (arguments
12628 `(#:python ,python-2))
12629 (build-system python-build-system)
12630 (home-page "http://pyopengl.sourceforge.net")
12631 (synopsis "Standard OpenGL bindings for Python")
12632 (description
12633 "PyOpenGL is the most common cross platform Python binding to OpenGL and
12634related APIs. The binding is created using the standard @code{ctypes}
12635library.")
12636 (license license:bsd-3)))
12637
12638(define-public python2-pyopengl-accelerate
12639 (package
12640 (inherit python2-pyopengl)
12641 (name "python2-pyopengl-accelerate")
12642 (version "3.1.0")
12643 (source
12644 (origin
12645 (method url-fetch)
12646 (uri (pypi-uri "PyOpenGL-accelerate" version))
12647 (sha256
12648 (base32
12649 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
12650 (synopsis "Acceleration code for PyOpenGL")
12651 (description
12652 "This is the Cython-coded accelerator module for PyOpenGL.")))
12653
12654(define-public python-rencode
12655 (package
12656 (name "python-rencode")
12657 (version "1.0.5")
12658 (source
12659 (origin
12660 (method url-fetch)
12661 (uri (pypi-uri "rencode" version))
12662 (sha256
12663 (base32
12664 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
12665 (build-system python-build-system)
12666 (arguments
12667 `(#:phases
12668 (modify-phases %standard-phases
12669 (add-before 'check 'delete-bogus-test
12670 ;; This test requires /home/aresch/Downloads, which is not provided by
12671 ;; the build environment.
12672 (lambda _
12673 (delete-file "rencode/t.py")
12674 #t)))))
12675 (native-inputs `(("pkg-config" ,pkg-config)
12676 ("python-cython" ,python-cython)))
12677 (home-page "https://github.com/aresch/rencode")
12678 (synopsis "Serialization of heterogeneous data structures")
12679 (description
12680 "The @code{rencode} module is a data structure serialization library,
12681similar to @code{bencode} from the BitTorrent project. For complex,
12682heterogeneous data structures with many small elements, r-encoding stake up
12683significantly less space than b-encodings. This version of rencode is a
12684complete rewrite in Cython to attempt to increase the performance over the
12685pure Python module.")
12686 (license license:bsd-3)))
12687
12688(define-public python2-rencode
12689 (package-with-python2 python-rencode))
12690
12691(define-public python-xenon
12692 (package
12693 (name "python-xenon")
12694 (version "0.5.4")
12695 (source
12696 (origin
12697 (method url-fetch)
12698 (uri (pypi-uri "xenon" version))
12699 (sha256
12700 (base32
12701 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
12702 (build-system python-build-system)
12703 (native-inputs
12704 `(("python-pyyaml" ,python-pyyaml)
12705 ("python-radon" ,python-radon)
12706 ("python-requests" ,python-requests)
12707 ("python-flake8" ,python-flake8)
12708 ("python-tox" ,python-tox)))
12709 (arguments
12710 `(#:phases
12711 (modify-phases %standard-phases
12712 (add-before 'build 'patch-test-requirements
12713 (lambda _
12714 ;; Remove httpretty dependency for tests.
12715 (substitute* "setup.py"
12716 (("httpretty") ""))
12717 #t)))))
12718 (home-page "https://xenon.readthedocs.org/")
12719 (synopsis "Monitor code metrics for Python on your CI server")
12720 (description
12721 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
12722Ideally, @code{xenon} is run every time code is committed. Through command
12723line options, various thresholds can be set for the complexity of code. It
12724will fail (i.e. it will exit with a non-zero exit code) when any of these
12725requirements is not met.")
12726 (license license:expat)))
12727
12728(define-public python2-xenon
12729 (package-with-python2 python-xenon))
12730
12731(define-public python-pysocks
12732 (package
12733 (name "python-pysocks")
12734 (version "1.6.8")
12735 (source
12736 (origin
12737 (method url-fetch)
12738 (uri (pypi-uri "PySocks" version))
12739 (sha256
12740 (base32
12741 "0wn6xafwy9c1gamwljw3fyvih5w19qy9xp39zmv8c90ai5ajrr9z"))))
12742 (build-system python-build-system)
12743 (arguments `(#:tests? #f))
12744 (home-page "https://github.com/Anorov/PySocks")
12745 (synopsis "SOCKS client module")
12746 (description "@code{pysocks} is an updated and semi-actively maintained
12747version of @code{SocksiPy} with bug fixes and extra features.")
12748 (license license:bsd-3)))
12749
12750(define-public python2-pysocks
12751 (package-with-python2 python-pysocks))
12752
12753(define-public python-pydiff
12754 (package
12755 (name "python-pydiff")
12756 (version "0.2")
12757 (source
12758 (origin
12759 (method url-fetch)
12760 (uri (pypi-uri "pydiff" version))
12761 (sha256
12762 (base32
12763 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
12764 (build-system python-build-system)
12765 (home-page "https://github.com/myint/pydiff")
12766 (synopsis "Library to diff two Python files at the bytecode level")
12767 (description
12768 "@code{pydiff} makes it easy to look for actual code changes while
12769ignoring formatting changes.")
12770 (license license:expat)))
12771
12772(define-public python2-pydiff
12773 (package-with-python2 python-pydiff))
12774
12775(define-public python-tqdm
12776 (package
12777 (name "python-tqdm")
12778 (version "4.19.6")
12779 (source
12780 (origin
12781 (method url-fetch)
12782 (uri (pypi-uri "tqdm" version))
12783 (sha256
12784 (base32
12785 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
12786 (build-system python-build-system)
12787 (native-inputs
12788 `(("python-flake8" ,python-flake8)
12789 ("python-nose" ,python-nose)
12790 ("python-coverage" ,python-coverage)))
12791 (home-page "https://github.com/tqdm/tqdm")
12792 (synopsis "Fast, extensible progress meter")
12793 (description
12794 "Make loops show a progress bar on the console by just wrapping any
12795iterable with @code{|tqdm(iterable)|}. Offers many options to define
12796design and layout.")
12797 (license (list license:mpl2.0 license:expat))))
12798
12799(define-public python2-tqdm
12800 (package-with-python2 python-tqdm))
12801
12802(define-public python-pkginfo
12803 (package
12804 (name "python-pkginfo")
12805 (version "1.4.2")
12806 (source
12807 (origin
12808 (method url-fetch)
12809 (uri (pypi-uri "pkginfo" version))
12810 (sha256
12811 (base32
12812 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
12813 (build-system python-build-system)
12814 (arguments
12815 ;; The tests are broken upstream.
12816 '(#:tests? #f))
12817 (home-page
12818 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
12819 (synopsis
12820 "Query metadatdata from sdists, bdists, and installed packages")
12821 (description
12822 "API to query the distutils metadata written in @file{PKG-INFO} inside a
12823source distriubtion (an sdist) or a binary distribution (e.g., created by
12824running bdist_egg). It can also query the EGG-INFO directory of an installed
12825distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
12826created by running @code{python setup.py develop}).")
12827 (license license:expat)))
12828
12829(define-public python2-pkginfo
12830 (package-with-python2 python-pkginfo))
12831
12832(define-public python-twine
12833 (package
12834 (name "python-twine")
12835 (version "1.9.1")
12836 (source
12837 (origin
12838 (method url-fetch)
12839 (uri (pypi-uri "twine" version))
12840 (sha256
12841 (base32
12842 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
12843 (build-system python-build-system)
12844 (propagated-inputs
12845 `(("python-tqdm" ,python-tqdm)
12846 ("python-pkginfo" ,python-pkginfo)
12847 ("python-requests" ,python-requests)
12848 ("python-requests-toolbelt" ,python-requests-toolbelt)))
12849 (home-page "https://github.com/pypa/twine")
12850 (synopsis "Collection of utilities for interacting with PyPI")
12851 (description
12852 "@code{twine} currently supports registering projects and uploading
12853distributions. It authenticates the user over HTTPS, allows them to pre-sign
12854their files and supports any packaging format (including wheels).")
12855 (license license:asl2.0)))
12856
12857(define-public python2-twine
12858 (package-with-python2 python-twine))
12859
12860(define-public python-linecache2
12861 (package
12862 (name "python-linecache2")
12863 (version "1.0.0")
12864 (source
12865 (origin
12866 (method url-fetch)
12867 (uri (pypi-uri "linecache2" version))
12868 (sha256
12869 (base32
12870 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
12871 (build-system python-build-system)
12872 (arguments
12873 `(;; The tests depend on unittest2, and our version is a bit too old.
12874 #:tests? #f))
12875 (native-inputs
12876 `(("python-pbr" ,python-pbr-minimal)))
12877 (home-page
12878 "https://github.com/testing-cabal/linecache2")
12879 (synopsis "Backports of the linecache module")
12880 (description
12881 "The linecache module allows one to get any line from any file, while
12882attempting to optimize internally, using a cache, the common case where many
12883lines are read from a single file.")
12884 (license license:psfl)))
12885
12886(define-public python2-linecache2
12887 (package-with-python2 python-linecache2))
12888
12889(define-public python-traceback2
12890 (package
12891 (name "python-traceback2")
12892 (version "1.4.0")
12893 (source
12894 (origin
12895 (method url-fetch)
12896 (uri (pypi-uri "traceback2" version))
12897 (sha256
12898 (base32
12899 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
12900 (build-system python-build-system)
12901 (arguments
12902 `(;; python-traceback2 and python-unittest2 depend on one another.
12903 #:tests? #f))
12904 (native-inputs
12905 `(("python-pbr" ,python-pbr-minimal)))
12906 (propagated-inputs
12907 `(("python-linecache2" ,python-linecache2)))
12908 (home-page
12909 "https://github.com/testing-cabal/traceback2")
12910 (synopsis "Backports of the traceback module")
12911 (description
12912 "This module provides a standard interface to extract, format and print
12913stack traces of Python programs. It exactly mimics the behavior of the Python
12914interpreter when it prints a stack trace.")
12915 (license license:psfl)))
12916
12917(define-public python2-traceback2
12918 (package-with-python2 python-traceback2))
12919
12920(define-public python-ratelimiter
12921 (package
12922 (name "python-ratelimiter")
12923 (version "1.2.0")
12924 (source
12925 (origin
12926 (method url-fetch)
12927 (uri (pypi-uri "ratelimiter" version))
12928 (sha256
12929 (base32
12930 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
12931 (build-system python-build-system)
12932 (arguments
12933 '(#:tests? #f)) ; There are no tests in the pypi archive.
12934 (home-page "https://github.com/RazerM/ratelimiter")
12935 (synopsis "Simple rate limiting object")
12936 (description
12937 "The @code{ratelimiter} module ensures that an operation will not be
12938executed more than a given number of times during a given period.")
12939 (license license:asl2.0)))
12940
12941(define-public python2-ratelimiter
12942 (package-with-python2 python-ratelimiter))
12943
12944(define-public python-dukpy
12945 (package
12946 (name "python-dukpy")
12947 (version "0.3")
12948 (source
12949 (origin
12950 (method url-fetch)
12951 (uri (string-append "https://github.com/kovidgoyal/dukpy/archive/v"
12952 version ".tar.gz"))
12953 (file-name (string-append name "-" version ".tar.gz"))
12954 (sha256
12955 (base32
12956 "0pj39rfwlzivqm5hkrsza7gssg6ggpxlq5ivc8f3h7x5pfgc6y6c"))))
12957 (build-system python-build-system)
12958 (home-page "https://github.com/kovidgoyal/dukpy")
12959 (synopsis "Run JavaScript in python")
12960 (description
12961 "dukpy is a JavaScript runtime environment for Python using the duktape
12962embeddable JavaScript engine.")
12963 ;; Dukpy is licensed under MIT like the embedded duktape library,
12964 ;; with 'errors.c' as GPL3.
12965 (license (list license:expat license:gpl3))))
12966
12967(define-public python2-dukpy
12968 (package-with-python2 python-dukpy))
12969
12970(define-public python-jsonrpclib-pelix
12971 (package
12972 (name "python-jsonrpclib-pelix")
12973 (version "0.3.2")
12974 (source
12975 (origin
12976 (method url-fetch)
12977 (uri (pypi-uri "jsonrpclib-pelix" version))
12978 (sha256
12979 (base32
12980 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
12981 (build-system python-build-system)
12982 (arguments
12983 `(#:tests? #f)) ; no tests in PyPI tarball
12984 (home-page "https://github.com/tcalmant/jsonrpclib/")
12985 (synopsis "JSON-RPC 2.0 client library for Python")
12986 (description
12987 "This library implements the JSON-RPC v2.0
12988specification (backwards-compatible) as a client library for Python. This
12989version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
12990services.")
12991 (license license:asl2.0)))
12992
12993(define-public python2-jsonrpclib-pelix
12994 (package-with-python2 python-jsonrpclib-pelix))
12995
12996(define-public python-setuptools-scm-git-archive
12997 (package
12998 (name "python-setuptools-scm-git-archive")
12999 (version "1.0")
13000 (source
13001 (origin
13002 (method url-fetch)
13003 (uri (pypi-uri "setuptools_scm_git_archive" version))
13004 (sha256
13005 (base32
13006 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
13007 (build-system python-build-system)
13008 (native-inputs
13009 `(("python-pytest" ,python-pytest)))
13010 (propagated-inputs
13011 `(("python-setuptools-scm" ,python-setuptools-scm)))
13012 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
13013 (synopsis "Setuptools_scm plugin for git archives")
13014 (description
13015 "The setuptools_scm_git_archive package is a plugin to
13016setuptools_scm, which supports obtaining versions from git archives that
13017belong to tagged versions.")
13018 (license license:expat)))
13019
13020(define-public python2-setuptools-scm-git-archive
13021 (package-with-python2 python-setuptools-scm-git-archive))
13022
13023(define-public python-pyclipper
13024 (package
13025 (name "python-pyclipper")
13026 (version "1.1.0.post1")
13027 (source
13028 (origin
13029 (method url-fetch)
13030 (uri (pypi-uri "pyclipper" version ".zip"))
13031 (sha256
13032 (base32
13033 "0ldbkbnx94an4zzrwb1sxmg6k0jgk4cwmvcdyy8y5k1zslc612wa"))
13034 (modules '((guix build utils)))
13035 (snippet
13036 '(begin
13037 ;; This file is generated by Cython.
13038 (delete-file "pyclipper/pyclipper.cpp") #t))))
13039 (build-system python-build-system)
13040 (arguments
13041 `(#:phases
13042 (modify-phases %standard-phases
13043 (add-before 'build 'cythonize-sources
13044 (lambda _
13045 (with-directory-excursion "pyclipper"
13046 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
13047 (propagated-inputs
13048 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
13049 (native-inputs
13050 `(("python-cython" ,python-cython)
13051 ("python-pytest" ,python-pytest)
13052 ("python-pytest-runner" ,python-pytest-runner)
13053 ("python-unittest2" ,python-unittest2)
13054 ("unzip" ,unzip)))
13055 (home-page "https://github.com/greginvm/pyclipper")
13056 (synopsis "Wrapper for Angus Johnson's Clipper library")
13057 (description
13058 "Pyclipper is a Cython wrapper for the C++ translation of the
13059Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
13060 (license license:expat)))
13061
13062(define-public python2-pyclipper
13063 (package-with-python2 python-pyclipper))
13064
13065(define-public python2-booleanoperations
13066 (package
13067 (name "python2-booleanoperations")
13068 (version "0.7.1")
13069 (source
13070 (origin
13071 (method url-fetch)
13072 (uri (pypi-uri "booleanOperations" version ".zip"))
13073 (sha256
13074 (base32
13075 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
13076 (build-system python-build-system)
13077 (arguments
13078 `(#:python ,python-2))
13079 (native-inputs
13080 `(("unzip" ,unzip)
13081 ("python2-pytest" ,python2-pytest)
13082 ("python2-pytest-runner" ,python2-pytest-runner)))
13083 (propagated-inputs
13084 `(("python-fonttools" ,python2-fonttools)
13085 ("python-pyclipper" ,python2-pyclipper)
13086 ("python-ufolib" ,python2-ufolib)))
13087 (home-page "https://github.com/typemytype/booleanOperations")
13088 (synopsis "Boolean operations on paths")
13089 (description
13090 "BooleanOperations provides a Python library that enables
13091boolean operations on paths.")
13092 (license license:expat)))
13093
13094(define-public python-tempdir
13095 (package
13096 (name "python-tempdir")
13097 (version "0.7.1")
13098 (source
13099 (origin
13100 (method url-fetch)
13101 (uri (pypi-uri "tempdir" version))
13102 (sha256
13103 (base32
13104 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
13105 (build-system python-build-system)
13106 (home-page "https://pypi.org/project/tempdir/")
13107 (arguments
13108 ;; the package has no tests
13109 '(#:tests? #f))
13110 (synopsis "Python library for managing temporary directories")
13111 (description
13112 "This library manages temporary directories that are automatically
13113deleted with all their contents when they are no longer needed. It is
13114particularly convenient for use in tests.")
13115 (license license:expat)))
13116
13117(define-public python2-tempdir
13118 (package-with-python2 python-tempdir))
13119
13120(define-public python-activepapers
13121 (package
13122 (name "python-activepapers")
13123 (version "0.2.2")
13124 (source
13125 (origin
13126 (method url-fetch)
13127 (uri (pypi-uri "ActivePapers.Py" version))
13128 (sha256
13129 (base32
13130 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
13131 (build-system python-build-system)
13132 (arguments
13133 `(#:modules ((ice-9 ftw)
13134 (srfi srfi-1)
13135 (guix build utils)
13136 (guix build python-build-system))
13137
13138 #:phases
13139 (modify-phases %standard-phases
13140 (add-after 'unpack 'delete-python2-code
13141 (lambda _
13142 (for-each delete-file
13143 '("lib/activepapers/builtins2.py"
13144 "lib/activepapers/standardlib2.py"
13145 "lib/activepapers/utility2.py"))))
13146 (replace 'check
13147 (lambda _
13148 ;; Deactivate the test cases that download files
13149 (setenv "NO_NETWORK_ACCESS" "1")
13150 ;; For some strange reason, some tests fail if nosetests runs all
13151 ;; test modules in a single execution. They pass if each test
13152 ;; module is run individually.
13153 (for-each (lambda (filename)
13154 (invoke "nosetests"
13155 (string-append "tests/" filename)))
13156 (scandir "tests"
13157 (lambda (filename)
13158 (string-suffix? ".py" filename)))))))))
13159 (native-inputs
13160 `(("python-tempdir" ,python-tempdir)
13161 ("python-nose" ,python-nose)))
13162 (propagated-inputs
13163 `(("python-h5py" ,python-h5py)))
13164 (home-page "http://www.activepapers.org/")
13165 (synopsis "Executable papers for scientific computing")
13166 (description
13167 "ActivePapers is a tool for working with executable papers, which
13168combine data, code, and documentation in single-file packages,
13169suitable for publication as supplementary material or on repositories
13170such as figshare or Zenodo.")
13171 (properties `((python2-variant . ,(delay python2-activepapers))))
13172 (license license:bsd-3)))
13173
13174(define-public python2-activepapers
13175 (let ((base (package-with-python2
13176 (strip-python2-variant python-activepapers))))
13177 (package
13178 (inherit base)
13179 (arguments
13180 (substitute-keyword-arguments (package-arguments base)
13181 ((#:phases phases)
13182 `(modify-phases ,phases
13183 (delete 'delete-python2-code)
13184 (add-after 'unpack 'delete-python3-code
13185 (lambda _
13186 (for-each delete-file
13187 '("lib/activepapers/builtins3.py"
13188 "lib/activepapers/standardlib3.py"
13189 "lib/activepapers/utility3.py")))))))))))
13190
13191(define-public python-semver
13192 (package
13193 (name "python-semver")
13194 (version "2.7.9")
13195 (source
13196 (origin
13197 (method url-fetch)
13198 (uri (pypi-uri "semver" version))
13199 (sha256
13200 (base32
13201 "0hhgqppchv59rqj0yzi1prdg2nfsywqmjsqy2rycyxm0hvxmbyqz"))))
13202 (build-system python-build-system)
13203 (arguments
13204 `(#:phases
13205 (modify-phases %standard-phases
13206 (add-after 'unpack 'patch-test-requirements
13207 (lambda _
13208 (substitute* "setup.py"
13209 ;; Our Python is new enough.
13210 (("'virtualenv<14\\.0\\.0'") "'virtualenv'"))
13211 #t)))))
13212 (native-inputs
13213 `(("python-tox" ,python-tox)
13214 ("python-virtualenv" ,python-virtualenv)))
13215 (home-page "https://github.com/k-bx/python-semver")
13216 (synopsis "Python helper for Semantic Versioning")
13217 (description "This package provides a Python library for
13218@url{Semantic Versioning, http://semver.org/}.")
13219 (license license:bsd-3)))
13220
13221(define-public python2-semver
13222 (package-with-python2 python-semver))
13223
13224(define-public python-pyro4
13225 (package
13226 (name "python-pyro4")
13227 (version "4.74")
13228 (source
13229 (origin
13230 (method url-fetch)
13231 (uri (pypi-uri "Pyro4" version))
13232 (sha256
13233 (base32
13234 "0pzp7c6q3vvkxq0wy9lr6wd5wky40sajz69g697i5rb2q497pvc9"))))
13235 (build-system python-build-system)
13236 (propagated-inputs
13237 `(("python-serpent" ,python-serpent)))
13238 (home-page "https://pyro4.readthedocs.io")
13239 (synopsis "Distributed object middleware for Python")
13240 (description
13241 "Pyro enables you to build applications in which objects can talk to each
13242other over the network. You can just use normal Python method calls to call
13243objects on other machines, also known as remote procedure calls (RPC).")
13244 (license license:expat)))
13245
13246(define-public python2-pyro
13247 (package
13248 (name "python2-pyro")
13249 (version "3.16")
13250 (source
13251 (origin
13252 (method url-fetch)
13253 (uri (pypi-uri "Pyro" version))
13254 (file-name (string-append "Pyro-" version ".tar.gz"))
13255 (sha256
13256 (base32
13257 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
13258 (build-system python-build-system)
13259 (arguments
13260 ;; Pyro is not compatible with Python 3
13261 `(#:python ,python-2
13262 ;; Pyro has no test cases for automatic execution
13263 #:tests? #f))
13264 (home-page "http://pythonhosted.org/Pyro/")
13265 (synopsis "Distributed object manager for Python")
13266 (description "Pyro is a Distributed Object Technology system
13267written in Python that is designed to be easy to use. It resembles
13268Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
13269which is a system and language independent Distributed Object Technology
13270and has much more to offer than Pyro or RMI. Pyro 3.x is no
13271longer maintained. New projects should use Pyro4 instead, which
13272is the new Pyro version that is actively developed.")
13273 (license license:expat)))
13274
13275(define-public python2-scientific
13276 (package
13277 (name "python2-scientific")
13278 (version "2.9.4")
13279 (source
13280 (origin
13281 (method url-fetch)
13282 (uri (string-append "https://bitbucket.org/khinsen/"
13283 "scientificpython/downloads/ScientificPython-"
13284 version ".tar.gz"))
13285 (file-name (string-append "ScientificPython-" version ".tar.gz"))
13286 (sha256
13287 (base32
13288 "0fc69zhlsn9d2jvbzyjl9ah53vj598h84nkq230c83ahfvgzx5y3"))))
13289 (build-system python-build-system)
13290 (inputs
13291 `(("netcdf" ,netcdf)))
13292 (propagated-inputs
13293 `(("python-numpy" ,python2-numpy-1.8)
13294 ("python-pyro" ,python2-pyro)))
13295 (arguments
13296 ;; ScientificPython is not compatible with Python 3
13297 `(#:python ,python-2
13298 #:tests? #f ; No test suite
13299 #:phases
13300 (modify-phases %standard-phases
13301 (replace 'build
13302 (lambda* (#:key inputs #:allow-other-keys)
77e61e25
RW
13303 (invoke "python" "setup.py" "build"
13304 (string-append "--netcdf_prefix="
13305 (assoc-ref inputs "netcdf"))))))))
44d10b1f
RW
13306 (home-page "https://bitbucket.org/khinsen/scientificpython")
13307 (synopsis "Python modules for scientific computing")
13308 (description "ScientificPython is a collection of Python modules that are
13309useful for scientific computing. Most modules are rather general (Geometry,
13310physical units, automatic derivatives, ...) whereas others are more
13311domain-specific (e.g. netCDF and PDB support). The library is currently
13312not actively maintained and works only with Python 2 and NumPy < 1.9.")
13313 (license license:cecill-c)))
13314
13315(define-public python2-mmtk
13316 (package
13317 (name "python2-mmtk")
13318 (version "2.7.11")
13319 (source
13320 (origin
13321 (method url-fetch)
13322 (uri (string-append "https://bitbucket.org/khinsen/"
13323 "mmtk/downloads/MMTK-" version ".tar.gz"))
13324 (file-name (string-append "MMTK-" version ".tar.gz"))
13325 (sha256
13326 (base32
13327 "1d0nnjx4lwsvh8f99vv1r6gi50d93yba0adkz8b4zgv4za4c5862"))))
13328 (build-system python-build-system)
13329 (native-inputs
13330 `(("netcdf" ,netcdf)))
13331 (propagated-inputs
13332 `(("python-scientific" ,python2-scientific)
13333 ("python-tkinter" ,python-2 "tk")))
13334 (arguments
13335 `(#:python ,python-2
13336 #:tests? #f
13337 #:phases
13338 (modify-phases %standard-phases
13339 (add-before 'build 'includes-from-scientific
13340 (lambda* (#:key inputs #:allow-other-keys)
13341 (mkdir-p "Include/Scientific")
13342 (copy-recursively
13343 (string-append
13344 (assoc-ref inputs "python-scientific")
13345 "/include/python2.7/Scientific")
13346 "Include/Scientific"))))))
13347 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
13348 (synopsis "Python library for molecular simulation")
13349 (description "MMTK is a library for molecular simulations with an emphasis
13350on biomolecules. It provides widely used methods such as Molecular Dynamics
13351and normal mode analysis, but also basic routines for implementing new methods
13352for simulation and analysis. The library is currently not actively maintained
13353and works only with Python 2 and NumPy < 1.9.")
13354 (license license:cecill-c)))
13355
13356(define-public python-phonenumbers
13357 (package
13358 (name "python-phonenumbers")
13359 (version "8.9.1")
13360 (source
13361 (origin
13362 (method url-fetch)
13363 (uri (pypi-uri "phonenumbers" version))
13364 (sha256
13365 (base32
13366 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
13367 (build-system python-build-system)
13368 (home-page
13369 "https://github.com/daviddrysdale/python-phonenumbers")
13370 (synopsis
13371 "Python library for dealing with international phone numbers")
13372 (description
13373 "This package provides a Python port of Google's libphonenumber library.")
13374 (license license:asl2.0)))
13375
13376(define-public python2-phonenumbers
13377 (package-with-python2 python-phonenumbers))
13378
13379(define-public python-send2trash
13380 (package
13381 (name "python-send2trash")
d9b0216b 13382 (version "1.5.0")
44d10b1f 13383 (source
d9b0216b 13384 (origin (method git-fetch)
44d10b1f 13385 ;; Source tarball on PyPI doesn't include tests.
d9b0216b
RW
13386 (uri (git-reference
13387 (url "https://github.com/hsoft/send2trash.git")
13388 (commit version)))
13389 (file-name (git-file-name name version))
44d10b1f
RW
13390 (sha256
13391 (base32
d9b0216b 13392 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
44d10b1f
RW
13393 (build-system python-build-system)
13394 (arguments
13395 '(#:phases
13396 (modify-phases %standard-phases
13397 (add-before 'check 'pre-check
13398 (lambda _
13399 (mkdir-p "/tmp/foo")
13400 (setenv "HOME" "/tmp/foo")
13401 #t)))))
13402 (home-page "https://github.com/hsoft/send2trash")
13403 (synopsis "Send files to the user's @file{~/Trash} directory")
13404 (description "This package provides a Python library to send files to the
13405user's @file{~/Trash} directory.")
13406 (license license:bsd-3)))
13407
13408(define-public python2-send2trash
13409 (package
13410 (inherit (package-with-python2 python-send2trash))
13411 (arguments
13412 (substitute-keyword-arguments (package-arguments python-send2trash)
13413 ((#:phases phases)
13414 `(modify-phases ,phases
13415 (add-before 'check 'setenv
13416 (lambda _
13417 (setenv "PYTHONPATH"
13418 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
13419 #t))))))
13420 (properties `((python2-variant . ,(delay python-send2trash))))))
13421
13422(define-public python-yapf
13423 (package
13424 (name "python-yapf")
13425 (version "0.24.0")
13426 (source
13427 (origin
13428 (method url-fetch)
13429 (uri (pypi-uri "yapf" version))
13430 (sha256
13431 (base32
13432 "0anwby0ydmyzcsgjc5dn1ryddwvii4dq61vck447q0n96npnzfyf"))))
13433 (build-system python-build-system)
13434 (home-page "https://github.com/google/yapf")
13435 (synopsis "Formatter for Python code")
13436 (description "YAPF is a formatter for Python code. It's based off of
13437@dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
13438takes the code and reformats it to the best formatting that conforms to the
13439style guide, even if the original code didn't violate the style guide.")
13440 (license license:asl2.0)))
13441
13442(define-public python2-yapf
13443 (package-with-python2 python-yapf))
13444
13445(define-public python-gyp
13446 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
13447 (revision "0"))
13448 (package
13449 (name "python-gyp")
13450 ;; Google does not release versions,
13451 ;; based on second most recent commit date.
13452 (version (git-version "0.0.0" revision commit))
13453 (source
13454 (origin
13455 ;; Google does not release tarballs,
13456 ;; git checkout is needed.
13457 (method git-fetch)
13458 (uri (git-reference
13459 (url "https://chromium.googlesource.com/external/gyp")
13460 (commit commit)))
13461 (file-name (git-file-name name version))
13462 (sha256
13463 (base32
13464 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
13465 (build-system python-build-system)
13466 (home-page "https://gyp.gsrc.io/")
13467 (synopsis "GYP is a Meta-Build system")
13468 (description
13469 "GYP builds build systems for large, cross platform applications.
13470It can be used to generate XCode projects, Visual Studio projects, Ninja build
13471files, and Makefiles.")
13472 (license license:bsd-3))))
13473
13474(define-public python2-gyp
13475 (package-with-python2 python-gyp))
13476
13477(define-public python-whatever
13478 (package
13479 (name "python-whatever")
13480 (version "0.5")
13481 (source
13482 (origin
13483 (method url-fetch)
13484 (uri (string-append "https://github.com/Suor/whatever/archive/" version
13485 ".tar.gz"))
13486 (sha256
13487 (base32
13488 "1iqvnaf0zpc6b4rvbqq4xy45mszcscyzpzknv8wg6j84pbp22sap"))
13489 (file-name (string-append name "-" version ".tar.gz"))))
13490 (build-system python-build-system)
13491 (arguments
13492 `(#:phases
13493 (modify-phases %standard-phases
13494 (replace 'check
13495 (lambda _
13496 (invoke "py.test"))))))
13497 (native-inputs
13498 `(("python-pytest" ,python-pytest)))
13499 (home-page "http://github.com/Suor/whatever")
13500 (synopsis "Make anonymous functions by partial application of operators")
13501 (description "@code{whatever} provides an easy way to make anonymous
13502functions by partial application of operators.")
13503 (license license:bsd-3)))
13504
13505(define-public python2-whatever
13506 (package-with-python2 python-whatever))
13507
13508(define-public python-funcy
13509 (package
13510 (name "python-funcy")
9e396ab8 13511 (version "1.11")
44d10b1f
RW
13512 (source
13513 (origin
a85c6027
TGR
13514 (method git-fetch)
13515 (uri (git-reference
13516 (url "https://github.com/Suor/funcy.git")
13517 (commit version)))
44d10b1f 13518 (sha256
a85c6027
TGR
13519 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
13520 (file-name (git-file-name name version))))
44d10b1f
RW
13521 (build-system python-build-system)
13522 (arguments
13523 `(#:phases
13524 (modify-phases %standard-phases
13525 (replace 'check
13526 (lambda _
13527 (invoke "py.test"))))))
13528 (native-inputs
13529 `(("python-pytest" ,python-pytest)
13530 ("python-whatever" ,python-whatever)))
13531 (home-page "http://github.com/Suor/funcy")
13532 (synopsis "Functional tools")
13533 (description "@code{funcy} is a library that provides functional tools.
13534Examples are:
13535@enumerate
13536@item merge - Merges collections of the same type
13537@item walk - Type-preserving map
13538@item select - Selects a part of a collection
13539@item take - Takes the first n items of a collection
13540@item first - Takes the first item of a collection
13541@item remove - Predicated-removes items of a collection
13542@item concat - Concatenates two collections
13543@item flatten - Flattens a collection with subcollections
13544@item distinct - Returns only distinct items
13545@item split - Predicated-splits a collection
13546@item split_at - Splits a collection at a given item
13547@item group_by - Groups items by group
13548@item pairwise - Pairs off adjacent items
13549@item partial - Partially-applies a function
13550@item curry - Curries a function
13551@item compose - Composes functions
13552@item complement - Complements a predicate
13553@item all_fn - \"all\" with predicate
13554@end enumerate")
13555 (license license:bsd-3)))
13556
13557(define-public python2-funcy
13558 (package-with-python2 python-funcy))
13559
13560(define-public python-isoweek
13561 (package
13562 (name "python-isoweek")
13563 (version "1.3.3")
13564 (source
13565 (origin
13566 (method url-fetch)
13567 (uri (pypi-uri "isoweek" version))
13568 (sha256
13569 (base32
13570 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
13571 (build-system python-build-system)
13572 (home-page "https://github.com/gisle/isoweek")
13573 (synopsis "Objects representing a week")
13574 (description "The @code{isoweek} module provide the class Week that
13575implements the week definition of ISO 8601. This standard also defines
13576a notation for identifying weeks; yyyyWww (where the W is a literal).
13577Week instances stringify to this form.")
13578 (license license:bsd-3)))
13579
13580(define-public python2-isoweek
13581 (package-with-python2 python-isoweek))
13582
13583(define-public python-tokenize-rt
13584 (package
13585 (name "python-tokenize-rt")
13586 (version "2.0.1")
13587 (source
13588 (origin
13589 (method url-fetch)
13590 (uri (pypi-uri "tokenize-rt" version))
13591 (sha256
13592 (base32
13593 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
13594 (build-system python-build-system)
13595 (home-page "https://github.com/asottile/tokenize-rt")
13596 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
13597 (description
13598 "This Python library is a wrapper around @code{tokenize} from the Python
13599standard library. It provides two additional tokens @code{ESCAPED_NL} and
13600@code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
13601and @code{tokens_to_src} to roundtrip.")
13602 (license license:expat)))
13603
13604(define-public python-future-fstrings
13605 (package
13606 (name "python-future-fstrings")
13607 (version "0.4.1")
13608 (source
13609 (origin
13610 (method url-fetch)
13611 (uri (pypi-uri "future_fstrings" version))
13612 (sha256
13613 (base32
13614 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
13615 (build-system python-build-system)
13616 (propagated-inputs
13617 `(("python-tokenize-rt" ,python-tokenize-rt)))
13618 (home-page "https://github.com/asottile/future-fstrings")
13619 (synopsis "Backport of fstrings to Python < 3.6")
13620 (description
13621 "This package provides a UTF-8 compatible encoding
13622@code{future_fstrings}, which performs source manipulation. It decodes the
13623source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
13624@code{f} strings.")
13625 (license license:expat)))
13626
13627(define-public python-typing
13628 (package
13629 (name "python-typing")
13630 (version "3.6.6")
13631 (source
13632 (origin
13633 (method url-fetch)
13634 (uri (pypi-uri "typing" version))
13635 (sha256
13636 (base32
13637 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
13638 (build-system python-build-system)
13639 (home-page "https://docs.python.org/3/library/typing.html")
13640 (synopsis "Type hints for Python")
13641 (description "This is a backport of the standard library @code{typing}
13642module to Python versions older than 3.5. Typing defines a standard notation
13643for Python function and variable type annotations. The notation can be used
13644for documenting code in a concise, standard format, and it has been designed
13645to also be used by static and runtime type checkers, static analyzers, IDEs
13646and other tools.")
13647 (license license:psfl)))
13648
13649(define-public python2-typing
13650 (package-with-python2 python-typing))
13651
f89d443b
VC
13652(define-public python-typing-extensions
13653 (package
13654 (name "python-typing-extensions")
13655 (version "3.7.2")
13656 (source
13657 (origin
13658 (method url-fetch)
13659 (uri (pypi-uri "typing_extensions" version))
13660 (sha256
13661 (base32
13662 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
13663 (build-system python-build-system)
13664 (home-page
13665 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
13666 (synopsis "Experimental type hints for Python")
13667 (description
13668 "The typing_extensions module contains additional @code{typing} hints not
13669yet present in the of the @code{typing} standard library.
13670Included are implementations of:
13671@enumerate
13672@item ClassVar
13673@item ContextManager
13674@item Counter
13675@item DefaultDict
13676@item Deque
13677@item NewType
13678@item NoReturn
13679@item overload
13680@item Protocol
13681@item runtime
13682@item Text
13683@item Type
13684@item TYPE_CHECKING
13685@item AsyncGenerator
13686@end enumerate\n")
13687 (license license:psfl)))
13688
44d10b1f
RW
13689(define-public bpython
13690 (package
13691 (name "bpython")
13692 (version "0.17.1")
13693 (source
13694 (origin
13695 (method url-fetch)
13696 (uri (pypi-uri "bpython" version))
13697 (sha256
13698 (base32
13699 "0bxhxi5zxdkrf8b4gwn0d363kdz3qnypjwhm1aydki53ph8ca1w9"))))
13700 (build-system python-build-system)
13701 (arguments
13702 `(#:phases
13703 (modify-phases %standard-phases
13704 (add-after 'unpack 'remove-failing-test
13705 (lambda _
13706 ;; Remove failing test. FIXME: make it pass
13707 (delete-file "bpython/test/test_args.py")
13708 #t))
13709 (add-after 'wrap 'add-aliases
13710 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
13711 (lambda* (#:key outputs #:allow-other-keys)
13712 (let ((out (assoc-ref outputs "out")))
13713 (for-each
13714 (lambda (old new)
13715 (symlink old (string-append out "/bin/" new)))
13716 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
13717 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
13718 #t)))))
13719 (propagated-inputs
13720 `(("python-pygments" ,python-pygments)
13721 ("python-requests" ,python-requests)
13722 ("python-babel" ,python-babel) ; optional, for internationalization
13723 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
13724 ("python-greenlet" ,python-greenlet)
13725 ("python-urwid" ,python-urwid) ; for bpython-urwid only
13726 ("python-six" ,python-six)))
13727 (native-inputs
13728 `(("python-sphinx" ,python-sphinx)
13729 ("python-mock" ,python-mock)))
13730 (home-page "https://bpython-interpreter.org/")
13731 (synopsis "Fancy interface to the Python interpreter")
13732 (description "Bpython is a fancy interface to the Python
13733interpreter. bpython's main features are
13734
13735@enumerate
13736@item in-line syntax highlighting,
13737@item readline-like autocomplete with suggestions displayed as you type,
13738@item expected parameter list for any Python function,
13739@item \"rewind\" function to pop the last line of code from memory and
13740 re-evaluate,
13741@item send the code you've entered off to a pastebin,
13742@item save the code you've entered to a file, and
13743@item auto-indentation.
13744@end enumerate")
13745 (license license:expat)))
13746
13747(define-public bpython2
13748 (let ((base (package-with-python2
13749 (strip-python2-variant bpython))))
13750 (package (inherit base)
13751 (name "bpython2")
13752 (arguments
13753 `(#:python ,python-2
13754 #:phases
13755 (modify-phases %standard-phases
13756 (add-after 'unpack 'remove-failing-test
13757 (lambda _
13758 ;; Remove failing test. FIXME: make it pass
13759 (delete-file "bpython/test/test_args.py")
13760 ;; Disable failing test-cases (renaming inhibits they are
13761 ;; discovered)
13762 (substitute* "bpython/test/test_curtsies_repl.py"
13763 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
13764 (string-append a "xxx_off_" b))
13765 (("^(\\s*def )(test_complex\\W)" _ a b)
13766 (string-append a "xxx_off_" b)))
13767 #t))
13768 (add-before 'build 'rename-scripts
13769 ;; rename the scripts to bypthon2, bpdb2, etc.
13770 (lambda _
13771 (substitute* "setup.py"
13772 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
13773 (string-append name "2" rest "\n"))
13774 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
13775 (string-append name "2" (or sub "") rest "\n")))
13776 #t))))))))
13777
13778(define-public python-pyinotify
13779 (package
13780 (name "python-pyinotify")
13781 (version "0.9.6")
13782 (source (origin
13783 (method url-fetch)
13784 (uri (pypi-uri "pyinotify" version))
13785 (sha256
13786 (base32
13787 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
13788 (build-system python-build-system)
13789 (arguments `(#:tests? #f)) ;no tests
13790 (home-page "https://github.com/seb-m/pyinotify")
13791 (synopsis "Python library for monitoring inotify events")
13792 (description
13793 "@code{pyinotify} provides a Python interface for monitoring
13794file system events on Linux.")
13795 (license license:expat)))
13796
13797(define-public python2-pyinotify
13798 (package-with-python2 python-pyinotify))
13799
13800;; Ada parser uses this version.
13801(define-public python2-quex-0.67.3
13802 (package
13803 (name "python2-quex")
13804 (version "0.67.3")
13805 (source
13806 (origin
13807 (method url-fetch)
13808 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
13809 (version-major+minor version)
13810 "/quex-" version ".zip"))
13811 (sha256
13812 (base32
13813 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
13814 (build-system python-build-system)
13815 (native-inputs
13816 `(("unzip" ,unzip)))
13817 (arguments
13818 `(#:python ,python-2
13819 #:tests? #f
13820 #:phases
13821 (modify-phases %standard-phases
13822 (delete 'configure)
13823 (delete 'build)
13824 (replace 'install
13825 (lambda* (#:key outputs #:allow-other-keys)
13826 (let* ((out (assoc-ref outputs "out"))
13827 (share/quex (string-append out "/share/quex"))
13828 (bin (string-append out "/bin")))
13829 (copy-recursively "." share/quex)
13830 (mkdir-p bin)
13831 (symlink (string-append share/quex "/quex-exe.py")
13832 (string-append bin "/quex"))
13833 #t))))))
13834 (native-search-paths
13835 (list (search-path-specification
13836 (variable "QUEX_PATH")
13837 (files '("share/quex")))))
13838 (home-page "http://quex.sourceforge.net/")
13839 (synopsis "Lexical analyzer generator in Python")
13840 (description "@code{quex} is a lexical analyzer generator in Python.")
13841 (license license:lgpl2.1+))) ; Non-military
13842
13843(define-public python2-quex
13844 (package (inherit python2-quex-0.67.3)
13845 (name "python2-quex")
13846 (version "0.68.1")
13847 (source
13848 (origin
13849 (method url-fetch)
13850 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
13851 (sha256
13852 (base32
13853 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
13854 (file-name (string-append name "-" version ".tar.gz"))))))
13855
13856(define-public python-more-itertools
13857 (package
13858 (name "python-more-itertools")
13859 (version "4.3.0")
13860 (source
13861 (origin
13862 (method url-fetch)
13863 (uri (pypi-uri "more-itertools" version))
13864 (sha256
13865 (base32
13866 "17h3na0rdh8xq30w4b9pizgkdxmm51896bxw600x84jflg9vaxn4"))))
13867 (build-system python-build-system)
13868 (arguments
13869 `(,@(if (any (cute string-prefix? <> (or (%current-system)
13870 (%current-target-system)))
13871 '("armhf" "i686"))
13872 '(#:phases
13873 (modify-phases %standard-phases
13874 ;; This is required for 32-bit hardware.
13875 ;; TODO: Try to remove this when upgrading.
13876 (add-after 'unpack 'patch-test
13877 (lambda _
13878 (substitute* "more_itertools/tests/test_more.py"
13879 (("10 \\*\\* 10") "9 ** 9"))
13880 #t))))
13881 '())))
13882 (propagated-inputs
13883 `(("python-six" ,python-six-bootstrap)))
13884 (home-page "https://github.com/erikrose/more-itertools")
13885 (synopsis "More routines for operating on iterables, beyond itertools")
13886 (description "Python's built-in @code{itertools} module implements a
13887number of iterator building blocks inspired by constructs from APL, Haskell,
13888and SML. @code{more-itertools} includes additional building blocks for
13889working with iterables.")
13890 (license license:expat)))
13891
13892(define-public python2-more-itertools
13893 (package-with-python2 python-more-itertools))
13894
13895(define-public python-latexcodec
13896 (package
13897 (name "python-latexcodec")
13898 (version "1.0.5")
13899 (source
13900 (origin
13901 (method url-fetch)
13902 (uri (pypi-uri "latexcodec" version))
13903 (sha256
13904 (base32
13905 "0zdd1gf24i83ykadx0y30n3001j43scqr2saql3vckk5c39dj1wn"))))
13906 (build-system python-build-system)
13907 (inputs
13908 `(("python-six" ,python-six)))
13909 (home-page "https://readthedocs.org/projects/latexcodec/")
13910 (synopsis "Work with LaTeX code in Python")
13911 (description "Lexer and codec to work with LaTeX code in Python.")
13912 (license license:expat)))
13913
13914(define-public python-pybtex
13915 (package
13916 (name "python-pybtex")
13917 (version "0.21")
13918 (source
13919 (origin
13920 (method url-fetch)
13921 (uri (pypi-uri "pybtex" version))
13922 (sha256
13923 (base32
13924 "00300j8dn5pxq4ndxmfmbmycg2znawkqs49val2x6jlmfiy6r2mg"))))
13925 (build-system python-build-system)
13926 (native-inputs
13927 `(("python-nose" ,python-nose)))
13928 (inputs
13929 `(("python-latexcodec" ,python-latexcodec)
13930 ("python-pyyaml" ,python-pyyaml)
13931 ("python-six" ,python-six)))
13932 (arguments
13933 `(#:test-target "nosetests"))
13934 (home-page "https://pybtex.org/")
13935 (synopsis "BibTeX-compatible bibliography processor")
13936 (description "Pybtex is a BibTeX-compatible bibliography processor written
13937in Python. You can simply type pybtex instead of bibtex.")
13938 (license license:expat)))
13939
13940(define-public python-onetimepass
13941 (package
13942 (name "python-onetimepass")
13943 (version "1.0.1")
13944 (source
13945 (origin
13946 (method url-fetch)
13947 (uri (pypi-uri "onetimepass" version))
13948 (sha256
13949 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
13950 (build-system python-build-system)
13951 (propagated-inputs `(("python-six" ,python-six)))
13952 (home-page "https://github.com/tadeck/onetimepass/")
13953 (synopsis "One-time password library")
13954 (description "Python one-time password library for HMAC-based (HOTP) and
13955time-based (TOTP) passwords.")
13956 (license license:expat)))
13957
13958(define-public python-parso
13959 (package
13960 (name "python-parso")
13961 (version "0.3.1")
13962 (source
13963 (origin
13964 (method url-fetch)
13965 (uri (pypi-uri "parso" version))
13966 (sha256
13967 (base32
13968 "18p89iwcm8mnf380f92g9w0bhx5km8wxp392vvjcq4y1ld1llw1m"))))
13969 (native-inputs
13970 `(("python-pytest" ,python-pytest)))
13971 (build-system python-build-system)
13972 (home-page "https://github.com/davidhalter/parso")
13973 (synopsis "Python Parser")
13974 (description "Parso is a Python parser that supports error recovery and
13975round-trip parsing for different Python versions (in multiple Python versions).
13976Parso is also able to list multiple syntax errors in your Python file.")
13977 (license license:expat)))
13978
13979(define-public python2-parso
13980 (package-with-python2 python-parso))
13981
13982(define-public python-async-generator
13983 (package
13984 (name "python-async-generator")
94fcbf8d 13985 (version "1.10")
44d10b1f
RW
13986 (source
13987 (origin
13988 (method url-fetch)
13989 (uri (pypi-uri "async_generator" version))
13990 (sha256
13991 (base32
94fcbf8d 13992 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
44d10b1f
RW
13993 (build-system python-build-system)
13994 (native-inputs
13995 `(("python-pytest" ,python-pytest)))
13996 (home-page "https://github.com/python-trio/async_generator")
13997 (synopsis "Async generators and context managers for Python 3.5+")
13998 (description "@code{async_generator} back-ports Python 3.6's native async
13999generators and Python 3.7's context managers into Python 3.5.")
14000 ;; Dual licensed.
14001 (license (list license:expat license:asl2.0))))
14002
14003(define-public python-async-timeout
14004 (package
14005 (name "python-async-timeout")
14006 (version "3.0.1")
14007 (source
14008 (origin
14009 (method url-fetch)
14010 (uri (pypi-uri "async-timeout" version))
14011 (sha256
14012 (base32
14013 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
14014 (build-system python-build-system)
14015 (home-page "https://github.com/aio-libs/async_timeout/")
14016 (synopsis "Timeout context manager for asyncio programs")
14017 (description "@code{async-timeout} provides a timeout timeout context
14018manager compatible with @code{asyncio}.")
14019 (license license:asl2.0)))
14020
14021(define-public python-glob2
14022 (package
14023 (name "python-glob2")
14024 (version "0.6")
14025 (source (origin
14026 (method url-fetch)
14027 (uri (string-append
14028 "https://github.com/miracle2k/python-glob2/archive/"
14029 version
14030 ".tar.gz"))
14031 (sha256
14032 (base32
14033 "0ja168f0dz4kbz4m06dm0rd3acaypk6hjx2km541pw22y9s40mag"))
14034 (file-name (string-append name "-" version ".tar.gz"))))
14035 (build-system python-build-system)
14036 (home-page "https://github.com/miracle2k/python-glob2/")
14037 (synopsis "Extended Version of the python buildin glob module")
14038 (description "This is an extended version of the Python
14039@url{http://docs.python.org/library/glob.html, built-in glob module} which
14040adds:
14041
14042@itemize
14043@item The ability to capture the text matched by glob patterns, and return
14044those matches alongside the file names.
14045@item A recursive @code{**} globbing syntax, akin for example to the
14046@code{globstar} option of Bash.
14047@item The ability to replace the file system functions used, in order to glob
14048on virtual file systems.
14049@item Compatible with Python 2 and Python 3 (tested with 3.3).
14050@end itemize
14051
14052Glob2 currently based on the glob code from Python 3.3.1.")
14053 (license license:bsd-2)))
14054
14055(define-public python2-glob2
14056 (package-with-python2 python-glob2))
14057
14058(define-public python-gipc
14059 (package
14060 (name "python-gipc")
14061 (version "0.6.0")
14062 (source
14063 (origin
14064 (method url-fetch)
14065 (uri (pypi-uri "gipc" version ".zip"))
14066 (sha256
14067 (base32
14068 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
14069 (build-system python-build-system)
14070 (native-inputs
14071 `(("unzip" ,unzip)))
14072 (propagated-inputs
14073 `(("python-gevent" ,python-gevent)))
14074 (home-page "http://gehrcke.de/gipc")
14075 (synopsis "Child process management in the context of gevent")
14076 (description "Usage of Python's multiprocessing package in a
14077gevent-powered application may raise problems. With @code{gipc},
14078process-based child processes can safely be created anywhere within a
14079gevent-powered application.")
14080 (license license:expat)))
14081
14082(define-public python2-gipc
14083 (package-with-python2 python-gipc))
14084
14085(define-public python-fusepy
14086 (package
14087 (name "python-fusepy")
14088 (version "2.0.4")
14089 (source
14090 (origin
14091 (method url-fetch)
14092 (uri (pypi-uri "fusepy" version))
14093 (sha256
14094 (base32
14095 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
14096 (build-system python-build-system)
14097 (arguments
14098 `(#:phases
14099 (modify-phases %standard-phases
14100 (add-before 'build 'set-library-file-name
14101 (lambda* (#:key inputs #:allow-other-keys)
14102 (let ((fuse (assoc-ref inputs "fuse")))
14103 (substitute* "fuse.py"
14104 (("find_library\\('fuse'\\)")
14105 (string-append "'" fuse "/lib/libfuse.so'")))
14106 #t))))))
14107 (propagated-inputs
14108 `(("fuse" ,fuse)))
14109 (home-page "https://github.com/fusepy/fusepy")
14110 (synopsis "Simple ctypes bindings for FUSE")
14111 (description "Python module that provides a simple interface to FUSE and
14112MacFUSE. The binding is created using the standard @code{ctypes} library.")
14113 (license license:isc)))
14114
14115(define-public python2-fusepy
14116 (package-with-python2 python-fusepy))
14117
14118(define-public python2-gdrivefs
14119 (package
14120 (name "python2-gdrivefs")
14121 (version "0.14.9")
14122 (source
14123 (origin
14124 (method url-fetch)
14125 (uri (pypi-uri "gdrivefs" version))
14126 (sha256
14127 (base32
14128 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
14129 (build-system python-build-system)
14130 (arguments
14131 `(#:python ,python-2
14132 #:phases
14133 (modify-phases %standard-phases
14134 (add-before 'build 'patch-setup-py
14135 (lambda _
14136 ;; Update requirements from dependency==version
14137 ;; to dependency>=version
14138 (substitute* "gdrivefs/resources/requirements.txt"
14139 (("==") ">="))
14140 #t)))))
14141 (native-inputs
14142 `(("python2-gipc" ,python2-gipc)
14143 ("python2-gevent" ,python2-gevent)
14144 ("python2-greenlet" ,python2-greenlet)
14145 ("python2-httplib2" ,python2-httplib2)
14146 ("python2-uritemplate" ,python2-uritemplate)
14147 ("python2-oauth2client" ,python2-oauth2client)
14148 ("python2-six" ,python2-six)))
14149 (propagated-inputs
14150 `(("python2-dateutil" ,python2-dateutil)
14151 ("python2-fusepy" ,python2-fusepy)
14152 ("python2-google-api-client" ,python2-google-api-client)))
14153 (home-page "https://github.com/dsoprea/GDriveFS")
14154 (synopsis "Mount Google Drive as a local file system")
14155 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
14156under Python 2.7.")
14157 (license license:gpl2)))
14158
14159(define-public pybind11
14160 (package
14161 (name "pybind11")
14162 (version "2.2.4")
14163 (source (origin
14164 (method git-fetch)
14165 (uri (git-reference
14166 (url "https://github.com/pybind/pybind11.git")
14167 (commit (string-append "v" version))))
14168 (sha256
14169 (base32
14170 "0pa79ymcasv8br5ifbx7878id5py2jpjac3i20cqxr6gs9l6ivlv"))
14171 (file-name (git-file-name name version))))
14172 (build-system cmake-build-system)
14173 (native-inputs
14174 `(("python" ,python)
14175 ("python-pytest" ,python-pytest)))
14176 (arguments
14177 `(#:test-target "check"))
14178 (home-page "https://github.com/pybind/pybind11/")
14179 (synopsis "Seamless operability between C++11 and Python")
14180 (description "pybind11 is a lightweight header-only library that exposes
14181C++ types in Python and vice versa, mainly to create Python bindings of
14182existing C++ code. Its goals and syntax are similar to the excellent
14183Boost.Python library by David Abrahams: to minimize boilerplate code in
14184traditional extension modules by inferring type information using compile-time
14185introspection.")
14186 (license license:expat)))
14187
14188(define-public python-fasteners
14189 (package
14190 (name "python-fasteners")
14191 (version "0.14.1")
14192 (source
14193 (origin
14194 (method url-fetch)
14195 (uri (pypi-uri "fasteners" version))
14196 (sha256
14197 (base32
14198 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
14199 (build-system python-build-system)
14200 (propagated-inputs
14201 `(("python-monotonic" ,python-monotonic)
14202 ("python-six" ,python-six)
14203 ("python-testtools" ,python-testtools)))
14204 (home-page "https://github.com/harlowja/fasteners")
14205 (synopsis "Python package that provides useful locks")
14206 (description
14207 "This package provides a Python program that provides following locks:
14208
14209@itemize
14210@item Locking decorator
14211@item Reader-writer locks
14212@item Inter-process locks
14213@item Generic helpers
14214@end itemize\n")
14215 (properties `((python2-variant . ,(delay python2-fasteners))))
14216 (license license:asl2.0)))
14217
14218(define-public python2-fasteners
14219 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
14220 (package
14221 (inherit base)
14222 (propagated-inputs
14223 `(("python2-futures" ,python2-futures)
14224 ,@(package-propagated-inputs base))))))
14225
14226(define-public python-requests-file
14227 (package
14228 (name "python-requests-file")
14229 (version "1.4.3")
14230 (source
14231 (origin
14232 (method url-fetch)
14233 (uri (pypi-uri "requests-file" version))
14234 (sha256
14235 (base32
14236 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
14237 (build-system python-build-system)
14238 (propagated-inputs
14239 `(("python-requests" ,python-requests)
14240 ("python-six" ,python-six)))
14241 (home-page
14242 "https://github.com/dashea/requests-file")
14243 (synopsis "File transport adapter for Requests")
14244 (description
14245 "Requests-File is a transport adapter for use with the Requests Python
14246library to allow local filesystem access via file:// URLs.")
14247 (license license:asl2.0)))
14248
14249(define-public python2-requests-file
14250 (package-with-python2 python-requests-file))
14251
14252(define-public python-tldextract
14253 (package
14254 (name "python-tldextract")
14255 (version "2.2.0")
14256 (source
14257 (origin
14258 (method url-fetch)
14259 (uri (pypi-uri "tldextract" version))
14260 (sha256
14261 (base32
14262 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
14263 (build-system python-build-system)
14264 (native-inputs
14265 `(("python-pytest" ,python-pytest)
14266 ("python-responses" ,python-responses)))
14267 (propagated-inputs
14268 `(("python-idna" ,python-idna)
14269 ("python-requests" ,python-requests)
14270 ("python-requests-file" ,python-requests-file)))
14271 (home-page
14272 "https://github.com/john-kurkowski/tldextract")
14273 (synopsis
14274 "Separate the TLD from the registered domain and subdomains of a URL")
14275 (description
14276 "TLDExtract accurately separates the TLD from the registered domain and
14277subdomains of a URL, using the Public Suffix List. By default, this includes
14278the public ICANN TLDs and their exceptions. It can optionally support the
14279Public Suffix List's private domains as well.")
14280 (license license:bsd-3)))
14281
14282(define-public python2-tldextract
14283 (package-with-python2 python-tldextract))
14284
14285(define-public python-pynamecheap
14286 (package
14287 (name "python-pynamecheap")
14288 (version "0.0.3")
14289 (source
14290 (origin
14291 (method url-fetch)
14292 (uri (pypi-uri "PyNamecheap" version))
14293 (sha256
14294 (base32
14295 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
14296 (build-system python-build-system)
14297 (propagated-inputs
14298 `(("python-requests" ,python-requests)))
14299 (home-page
14300 "https://github.com/Bemmu/PyNamecheap")
14301 (synopsis
14302 "Namecheap API client in Python")
14303 (description
14304 "PyNamecheap is a Namecheap API client in Python.")
14305 (license license:expat)))
14306
14307(define-public python2-pynamecheap
14308 (package-with-python2 python-pynamecheap))
14309
14310(define-public python-dns-lexicon
14311 (package
14312 (name "python-dns-lexicon")
14313 (version "2.4.0")
14314 (source
14315 (origin
14316 (method url-fetch)
14317 (uri (pypi-uri "dns-lexicon" version))
14318 (sha256
14319 (base32
14320 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
14321 (build-system python-build-system)
14322 (arguments
14323 `(#:tests? #f)) ;requires internet access
14324 (propagated-inputs
14325 `(("python-future" ,python-future)
14326 ("python-pynamecheap" ,python-pynamecheap)
14327 ("python-requests" ,python-requests)
14328 ("python-tldextract" ,python-tldextract)
14329 ("python-urllib3" ,python-urllib3)))
14330 (home-page "https://github.com/AnalogJ/lexicon")
14331 (synopsis
14332 "Manipulate DNS records on various DNS providers")
14333 (description
14334 "Lexicon provides a way to manipulate DNS records on multiple DNS
14335providers in a standardized way. It has a CLI but it can also be used as a
14336Python library. It was designed to be used in automation, specifically with
14337Let's Encrypt.")
14338 (license license:expat)))
14339
14340(define-public python2-dns-lexicon
14341 (package-with-python2 python-dns-lexicon))
14342
14343(define-public python-commandlines
14344 (package
14345 (name "python-commandlines")
14346 (version "0.4.1")
14347 (source
14348 (origin
14349 (method url-fetch)
14350 (uri (pypi-uri "commandlines" version))
14351 (sha256
14352 (base32
14353 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
14354 (build-system python-build-system)
14355 (home-page "https://github.com/chrissimpkins/commandlines")
14356 (synopsis "Command line argument to object parsing library")
14357 (description
14358 "@code{Commandlines} is a Python library for command line application
14359development that supports command line argument parsing, command string
14360validation testing and application logic.")
14361 (license license:expat)))
14362
14363;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
14364;; python-numba. They have a very unflexible relationship.
14365(define-public python-numba
14366 (package
14367 (name "python-numba")
14368 (version "0.39.0")
14369 (source
14370 (origin
14371 (method url-fetch)
14372 (uri (pypi-uri "numba" version))
14373 (sha256
14374 (base32
14375 "1bibvkwga1v8293i9ivl469d8bzgabn3vgr2ig7c1i68v8frsx07"))))
14376 (build-system python-build-system)
14377 (arguments
14378 `(#:modules ((guix build utils)
14379 (guix build python-build-system)
14380 (ice-9 ftw)
14381 (srfi srfi-1)
14382 (srfi srfi-26))
14383 #:phases
14384 (modify-phases %standard-phases
14385 (add-after 'unpack 'disable-proprietary-features
14386 (lambda _
14387 (setenv "NUMBA_DISABLE_HSA" "1")
14388 (setenv "NUMBA_DISABLE_CUDA" "1")
14389 #t))
14390 (add-after 'unpack 'remove-failing-tests
14391 (lambda _
14392 ;; FIXME: these tests fail for unknown reasons:
14393 ;; test_non_writable_pycache, test_non_creatable_pycache, and
14394 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
14395 (substitute* "numba/tests/test_dispatcher.py"
14396 (("def test(_non_writable_pycache)" _ m)
14397 (string-append "def guix_skip" m))
14398 (("def test(_non_creatable_pycache)" _ m)
14399 (string-append "def guix_skip" m))
14400 (("def test(_frozen)" _ m)
14401 (string-append "def guix_skip" m)))
14402
14403 ;; These tests fail because we don't run the tests from the build
14404 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
14405 ;; They ar in numba.tests.test_pycc.TestDistutilsSupport.
14406 (substitute* "numba/tests/test_pycc.py"
14407 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
14408 (string-append "def guix_skip" m)))
14409 #t))
14410 (replace 'check
14411 (lambda _
14412 (let ((cwd (getcwd)))
14413 (setenv "PYTHONPATH"
14414 (string-append cwd "/build/"
14415 (find (cut string-prefix? "lib" <>)
14416 (scandir (string-append cwd "/build")))
14417 ":"
14418 (getenv "PYTHONPATH")))
14419 ;; Something is wrong with the PYTHONPATH when running the
14420 ;; tests from the build directory, as it complains about not being
14421 ;; able to import certain modules.
14422 (with-directory-excursion "/tmp"
14423 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
14424 #t)))))
14425 (propagated-inputs
14426 `(("python-llvmlite" ,python-llvmlite)
14427 ("python-numpy" ,python-numpy)
14428 ("python-singledispatch" ,python-singledispatch)))
14429 ;; Needed for tests.
14430 (inputs
14431 `(("python-jinja2" ,python-jinja2)
14432 ("python-pygments" ,python-pygments)))
14433 (home-page "https://numba.pydata.org")
14434 (synopsis "Compile Python code using LLVM")
14435 (description "Numba gives you the power to speed up your applications with
14436high performance functions written directly in Python. With a few
14437annotations, array-oriented and math-heavy Python code can be just-in-time
14438compiled to native machine instructions, similar in performance to C, C++ and
14439Fortran, without having to switch languages or Python interpreters.
14440
14441Numba works by generating optimized machine code using the LLVM compiler
14442infrastructure at import time, runtime, or statically (using the included pycc
14443tool).")
14444 (license license:bsd-3)))
14445
14446(define-public python-anndata
14447 (package
14448 (name "python-anndata")
14449 (version "0.6.9")
14450 (source
14451 (origin
14452 (method url-fetch)
14453 (uri (pypi-uri "anndata" version))
14454 (sha256
14455 (base32
14456 "1fh461xyyc7pcrjfgd013bdc2alf53r46ss3gfw3431mbb1gappi"))))
14457 (build-system python-build-system)
14458 (propagated-inputs
14459 `(("python-h5py" ,python-h5py)
14460 ("python-natsort" ,python-natsort)
14461 ("python-pandas" ,python-pandas)
14462 ("python-scipy" ,python-scipy)))
14463 (home-page "https://github.com/theislab/anndata")
14464 (synopsis "Annotated data for data analysis pipelines")
14465 (description "Anndata is a package for simple (functional) high-level APIs
14466for data analysis pipelines. In this context, it provides an efficient,
14467scalable way of keeping track of data together with learned annotations and
14468reduces the code overhead typically encountered when using a mostly
14469object-oriented library such as @code{scikit-learn}.")
14470 (license license:bsd-3)))
14471
14472(define-public python-dill
14473 (package
14474 (name "python-dill")
14475 (version "0.2.8.2")
14476 (source
14477 (origin
14478 (method url-fetch)
14479 (uri (pypi-uri "dill" version))
14480 (sha256
14481 (base32
14482 "1cymzn9fxwdy33h21zkk4gqgzvd25110hh3zdqnvnwa3p52c4kb2"))))
14483 (build-system python-build-system)
14484 ;; FIXME: The check phase fails with "don't know how to make test".
14485 (arguments '(#:tests? #f))
14486 (home-page "https://pypi.org/project/dill")
14487 (synopsis "Serialize all of Python")
14488 (description "Dill extends Python's @code{pickle} module for serializing
14489and de-serializing Python objects to the majority of the built-in Python
14490types. Dill provides the user the same interface as the @code{pickle} module,
14491and also includes some additional features. In addition to pickling Python
14492objects, @code{dill} provides the ability to save the state of an interpreter
14493session in a single command. Hence, it would be feasable to save a
14494interpreter session, close the interpreter, ship the pickled file to another
14495computer, open a new interpreter, unpickle the session and thus continue from
14496the saved state of the original interpreter session.")
14497 (license license:bsd-3)))
14498
14499(define-public python-multiprocess
14500 (package
14501 (name "python-multiprocess")
14502 (version "0.70.6.1")
14503 (source
14504 (origin
14505 (method url-fetch)
14506 (uri (pypi-uri "multiprocess" version))
14507 (sha256
14508 (base32
14509 "1ip5caz67b3q0553mr8gm8xwsb8x500jn8ml0gihgyfy52m2ypcq"))))
14510 (build-system python-build-system)
14511 (propagated-inputs
14512 `(("python-dill" ,python-dill)))
14513 (home-page "https://pypi.org/project/multiprocess")
14514 (synopsis "Multiprocessing and multithreading in Python")
14515 (description
14516 "This package is a fork of the multiprocessing Python package, a package
14517which supports the spawning of processes using the API of the standard
14518library's @code{threading} module.")
14519 (license license:bsd-3)))
14520
14521(define-public python-toolz
14522 (package
14523 (name "python-toolz")
14524 (version "0.9.0")
14525 (source
14526 (origin
14527 (method url-fetch)
14528 (uri (pypi-uri "toolz" version))
14529 (sha256
14530 (base32
14531 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
14532 (build-system python-build-system)
14533 ;; FIXME: tests cannot be computed: "Can't perform this operation for
14534 ;; unregistered loader type"
14535 (arguments '(#:tests? #f))
14536 (home-page "https://github.com/pytoolz/toolz/")
14537 (synopsis "List processing tools and functional utilities")
14538 (description
14539 "This package provides a set of utility functions for iterators,
14540functions, and dictionaries.")
14541 (license license:bsd-3)))
14542
14543(define-public python2-toolz
14544 (package-with-python2 python-toolz))
14545
14546(define-public python-cytoolz
14547 (package
14548 (name "python-cytoolz")
14549 (version "0.9.0.1")
14550 (source
14551 (origin
14552 (method url-fetch)
14553 (uri (pypi-uri "cytoolz" version))
14554 (sha256
14555 (base32
14556 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
14557 (build-system python-build-system)
14558 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
14559 ;; 'exceptions'"
14560 (arguments '(#:tests? #f))
14561 (propagated-inputs
14562 `(("python-toolz" ,python-toolz)))
14563 (native-inputs
14564 `(("python-cython" ,python-cython)))
14565 (home-page "https://github.com/pytoolz/cytoolz")
14566 (synopsis "High performance functional utilities")
14567 (description
14568 "The cytoolz package implements the same API as provided by toolz. The
14569main differences are that @code{cytoolz} is faster and cytoolz offers a C API
14570that is accessible to other projects developed in Cython.")
14571 (license license:bsd-3)))
14572
14573(define-public python-sortedcontainers
14574 (package
14575 (name "python-sortedcontainers")
14576 (version "2.0.4")
14577 (source
14578 (origin
14579 (method url-fetch)
14580 (uri (pypi-uri "sortedcontainers" version))
14581 (sha256
14582 (base32
14583 "10hrk2k0hbf9x78vd3f0lj277m1yzfhzzxr0hja718liwb398wk0"))))
14584 (build-system python-build-system)
14585 (native-inputs
14586 `(("python-tox" ,python-tox)))
14587 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
14588 (synopsis "Sorted List, Sorted Dict, Sorted Set")
14589 (description
14590 "This package provides a sorted collections library, written in
14591pure-Python.")
14592 (license license:asl2.0)))
14593
14594(define-public python-cloudpickle
14595 (package
14596 (name "python-cloudpickle")
14597 (version "0.6.1")
14598 (source
14599 (origin
14600 (method url-fetch)
14601 (uri (pypi-uri "cloudpickle" version))
14602 (sha256
14603 (base32
14604 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
14605 (build-system python-build-system)
14606 ;; FIXME: there are 5 errors in 122 tests:
14607 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
14608 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
14609 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
14610 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
14611 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
14612 ;; TypeError: cannot serialize '_io.BufferedRandom' object
14613 (arguments '(#:tests? #f))
14614 (native-inputs
14615 `(("python-pytest" ,python-pytest)
14616 ("python-mock" ,python-mock)
14617 ("python-tornado" ,python-tornado)))
14618 (home-page "https://github.com/cloudpipe/cloudpickle")
14619 (synopsis "Extended pickling support for Python objects")
14620 (description
14621 "Cloudpickle makes it possible to serialize Python constructs not
14622supported by the default pickle module from the Python standard library. It
14623is especially useful for cluster computing where Python expressions are
14624shipped over the network to execute on remote hosts, possibly close to the
14625data.")
14626 (license license:bsd-3)))
14627
14628(define-public python2-cloudpickle
14629 (package-with-python2 python-cloudpickle))
14630
14631(define-public python-locket
14632 (package
14633 (name "python-locket")
14634 (version "0.2.0")
14635 (source
14636 (origin
14637 (method url-fetch)
14638 (uri (pypi-uri "locket" version))
14639 (sha256
14640 (base32
14641 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
14642 (build-system python-build-system)
14643 (home-page "https://github.com/mwilliamson/locket.py")
14644 (synopsis "File-based locks for Python")
14645 (description
14646 "Locket implements a lock that can be used by multiple processes provided
14647they use the same path.")
14648 (license license:bsd-2)))
14649
14650(define-public python2-locket
14651 (package-with-python2 python-locket))
14652
14653(define-public python-blosc
14654 (package
14655 (name "python-blosc")
14656 (version "1.5.1")
14657 (source
14658 (origin
14659 (method url-fetch)
14660 (uri (pypi-uri "blosc" version))
14661 (sha256
14662 (base32
14663 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
14664 (build-system python-build-system)
14665 ;; FIXME: all tests pass, but then this error is printed:
14666 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
14667 (arguments '(#:tests? #f))
14668 (propagated-inputs
14669 `(("python-numpy" ,python-numpy)))
14670 (home-page "https://github.com/blosc/python-blosc")
14671 (synopsis "Python wrapper for the Blosc data compressor library")
14672 (description "Blosc is a high performance compressor optimized for binary
14673data. It has been designed to transmit data to the processor cache faster
14674than the traditional, non-compressed, direct memory fetch approach via a
14675@code{memcpy()} system call.
14676
14677Blosc works well for compressing numerical arrays that contains data with
14678relatively low entropy, like sparse data, time series, grids with
14679regular-spaced values, etc.
14680
14681This Python package wraps the Blosc library.")
14682 (license license:bsd-3)))
14683
14684(define-public python2-blosc
14685 (package-with-python2 python-blosc))
14686
14687(define-public python-partd
14688 (package
14689 (name "python-partd")
14690 (version "0.3.9")
14691 (source
14692 (origin
14693 (method url-fetch)
14694 (uri (pypi-uri "partd" version))
14695 (sha256
14696 (base32
14697 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
14698 (build-system python-build-system)
14699 (propagated-inputs
14700 `(("python-blosc" ,python-blosc)
14701 ("python-locket" ,python-locket)
14702 ("python-numpy" ,python-numpy)
14703 ("python-pandas" ,python-pandas)
14704 ("python-pyzmq" ,python-pyzmq)
14705 ("python-toolz" ,python-toolz)))
14706 (home-page "https://github.com/dask/partd/")
14707 (synopsis "Appendable key-value storage")
14708 (description "Partd stores key-value pairs. Values are raw bytes. We
14709append on old values. Partd excels at shuffling operations.")
14710 (license license:bsd-3)))
14711
14712(define-public python2-partd
14713 (package-with-python2 python-partd))
14714
14715(define-public python-dask
14716 (package
14717 (name "python-dask")
5a222eba 14718 (version "1.1.3")
44d10b1f
RW
14719 (source
14720 (origin
14721 (method url-fetch)
14722 (uri (pypi-uri "dask" version))
14723 (sha256
14724 (base32
5a222eba 14725 "03ykmq46q2hh7mn68vcxkgylybjaj3r0kfspaiymdmqmjzpjivr5"))))
44d10b1f
RW
14726 (build-system python-build-system)
14727 ;; A single test out of 5000+ fails. This test is marked as xfail when
14728 ;; pytest-xdist is used.
14729 (arguments
14730 `(#:phases
14731 (modify-phases %standard-phases
14732 (add-after 'unpack 'disable-broken-test
14733 (lambda _
14734 (substitute* "dask/tests/test_threaded.py"
14735 (("def test_interrupt\\(\\)" m)
14736 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
14737 m)))
14738 (when (which "python2")
14739 ;; This test fails with recent Pandas:
14740 ;; <https://github.com/dask/dask/issues/3794>.
14741 (substitute* "dask/dataframe/tests/test_dataframe.py"
14742 (("def test_info\\(\\)" m)
14743 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
14744 m))))
14745 #t))
14746 (replace 'check
14747 (lambda _ (invoke "pytest" "-vv"))))))
14748 (propagated-inputs
14749 `(("python-cloudpickle" ,python-cloudpickle)
14750 ("python-numpy" ,python-numpy)
14751 ("python-pandas" ,python-pandas)
14752 ("python-partd" ,python-partd)
14753 ("python-toolz" ,python-toolz)
14754 ("python-pyyaml" ,python-pyyaml)))
14755 (native-inputs
14756 `(("python-pytest" ,python-pytest)
14757 ("python-pytest-runner" ,python-pytest-runner)))
14758 (home-page "https://github.com/dask/dask/")
14759 (synopsis "Parallel computing with task scheduling")
14760 (description
14761 "Dask is a flexible parallel computing library for analytics. It
14762consists of two components: dynamic task scheduling optimized for computation,
14763and large data collections like parallel arrays, dataframes, and lists that
14764extend common interfaces like NumPy, Pandas, or Python iterators to
14765larger-than-memory or distributed environments. These parallel collections
14766run on top of the dynamic task schedulers. ")
14767 (license license:bsd-3)))
14768
14769(define-public python2-dask
14770 (package-with-python2 python-dask))
14771
14772(define-public python-ilinkedlist
14773 (package
14774 (name "python-ilinkedlist")
14775 (version "0.4.0")
14776 (source
14777 (origin
14778 (method url-fetch)
14779 (uri (pypi-uri "ilinkedlist" version))
14780 (sha256
14781 (base32
14782 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
14783 (build-system python-build-system)
14784 (native-inputs `(("python-pytest" ,python-pytest)))
14785 (inputs `(("python" ,python)))
14786 (home-page "https://github.com/luther9/ilinkedlist-py")
14787 (synopsis "Immutable linked list library")
14788 (description
14789 "This is a implementation of immutable linked lists for Python. It
14790contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
14791Since a linked list is treated as immutable, it is hashable, and its length
14792can be retrieved in constant time. Some of the terminology is inspired by
14793LISP. It is possible to create an improper list by creating a @code{Pair}
14794with a non-list @code{cdr}.")
14795 (license license:gpl3+)))
14796
14797(define-public python-readlike
14798 (package
14799 (name "python-readlike")
14800 (version "0.1.3")
14801 (source
14802 (origin
14803 (method url-fetch)
14804 (uri (pypi-uri "readlike" version))
14805 (sha256
14806 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
14807 (build-system python-build-system)
14808 (home-page "https://github.com/jangler/readlike")
14809 (synopsis "GNU Readline-like line editing module")
14810 (description
14811 "This Python module provides line editing functions similar to the default
14812Emacs-style ones of GNU Readline. Unlike the Python standard library's
14813@code{readline} package, this one allows access to those capabilties in settings
14814outside of a standard command-line interface. It is especially well-suited to
14815interfacing with Urwid, due to a shared syntax for describing key inputs.
14816
14817Currently, all stateless Readline commands are implemented. Yanking and history
14818are not supported.")
14819 (license license:expat)))
14820
14821(define-public python2-readlike
14822 (package-with-python2 python-readlike))
14823
14824(define-public python-reparser
14825 (package
14826 (name "python-reparser")
14827 (version "1.4.3")
14828 (source
14829 (origin
14830 (method url-fetch)
14831 (uri (pypi-uri "ReParser" version))
14832 (sha256
14833 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
14834 (build-system python-build-system)
14835 (home-page "https://github.com/xmikos/reparser")
14836 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
14837 (description
14838 "This Python library provides a simple lexer/parser for inline markup based
14839on regular expressions.")
14840 (license license:expat)))
14841
14842(define-public python2-reparser
14843 (let ((reparser (package-with-python2
14844 (strip-python2-variant python-reparser))))
14845 (package (inherit reparser)
14846 (propagated-inputs
14847 `(("python2-enum34" ,python2-enum34)
14848 ,@(package-propagated-inputs reparser))))))
14849
14850(define-public python-precis-i18n
14851 (package
14852 (name "python-precis-i18n")
14853 (version "1.0.0")
14854 (source
14855 (origin
14856 (method url-fetch)
14857 (uri (pypi-uri "precis_i18n" version))
14858 (sha256
14859 (base32
14860 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
14861 (build-system python-build-system)
14862 (home-page "https://github.com/byllyfish/precis_i18n")
14863 (synopsis "Implementation of the PRECIS framework")
14864 (description
14865 "This module implements the PRECIS Framework as described in RFC 8264,
14866RFC 8265 and RFC 8266.")
14867 (license license:expat)))
14868
d0446c4b
RW
14869(define-public python-absl-py
14870 (package
14871 (name "python-absl-py")
14872 (version "0.6.1")
14873 (source
14874 (origin
14875 (method url-fetch)
14876 (uri (pypi-uri "absl-py" version))
14877 (sha256
14878 (base32
14879 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
14880 (build-system python-build-system)
14881 (propagated-inputs
14882 `(("python-six" ,python-six)))
14883 (home-page "https://github.com/abseil/abseil-py")
14884 (synopsis "Abseil Python common libraries")
14885 (description
14886 "This package provides the Abseil Python Common Libraries, a collection
14887of Python libraries for building Python applications.")
14888 (license license:asl2.0)))
14889
81bed4e9
RW
14890(define-public python-astor
14891 (package
14892 (name "python-astor")
14893 (version "0.7.1")
14894 (source
14895 (origin
14896 (method url-fetch)
14897 (uri (pypi-uri "astor" version))
14898 (sha256
14899 (base32
14900 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
14901 (build-system python-build-system)
14902 ;; FIXME: There are two errors and two test failures.
14903 (arguments `(#:tests? #f))
14904 (home-page "https://github.com/berkerpeksag/astor")
39ee82ff 14905 (synopsis "Read and write Python ASTs")
81bed4e9 14906 (description "Astor is designed to allow easy manipulation of Python
39ee82ff 14907source via the Abstract Syntax Tree.")
81bed4e9
RW
14908 (license license:bsd-3)))
14909
39ee82ff
RW
14910(define-public python2-astor
14911 (package-with-python2 python-astor))
14912
22e623ae
RW
14913(define-public python-grpcio
14914 (package
14915 (name "python-grpcio")
14916 (version "1.17.1")
14917 (source
14918 (origin
14919 (method url-fetch)
14920 (uri (pypi-uri "grpcio" version))
14921 (sha256
14922 (base32
14923 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
14924 (build-system python-build-system)
14925 (propagated-inputs
14926 `(("python-six" ,python-six)))
14927 (home-page "https://grpc.io")
14928 (synopsis "HTTP/2-based RPC framework")
14929 (description "This package provides a Python library for communicating
14930with the HTTP/2-based RPC framework gRPC.")
14931 (license license:asl2.0)))
14932
79869f80
RW
14933(define-public python-astunparse
14934 (package
14935 (name "python-astunparse")
14936 (version "1.6.1")
14937 (source
14938 (origin
14939 (method url-fetch)
14940 (uri (pypi-uri "astunparse" version))
14941 (sha256
14942 (base32
14943 "1jhidwyrqn17avqh9xnnm3wd7q7aahaq009cba67g86y6gxicyyj"))))
14944 (build-system python-build-system)
14945 (arguments '(#:tests? #f)) ; there are none
14946 (propagated-inputs
14947 `(("python-six" ,python-six)
14948 ("python-wheel" ,python-wheel)))
14949 (home-page "https://github.com/simonpercivall/astunparse")
14950 (synopsis "AST unparser for Python")
14951 (description "This package provides an AST unparser for Python. It is a
14952factored out version of @code{unparse} found in the Python source
14953distribution.")
14954 (license license:bsd-3)))
14955
2884aac0
RW
14956(define-public python-gast
14957 (package
14958 (name "python-gast")
14959 (version "0.2.0")
14960 (source
14961 (origin
14962 (method url-fetch)
14963 (uri (pypi-uri "gast" version))
14964 (sha256
14965 (base32
14966 "0c296xm1vz9x4w4inmdl0k8mnc0i9arw94si2i7pglpc461r0s3h"))))
14967 (build-system python-build-system)
14968 (propagated-inputs
14969 `(("python-astunparse" ,python-astunparse)))
14970 (home-page "https://pypi.org/project/gast/")
14971 (synopsis "Generic Python AST that abstracts the underlying Python version")
14972 (description
14973 "GAST provides a compatibility layer between the AST of various Python
14974versions, as produced by @code{ast.parse} from the standard @code{ast}
14975module.")
14976 (license license:bsd-3)))
14977
44d10b1f
RW
14978(define-public python-wikidata
14979 (package
14980 (name "python-wikidata")
14981 (version "0.6.1")
14982 (source
14983 (origin
14984 (method url-fetch)
14985 (uri (pypi-uri "Wikidata" version))
14986 (sha256
14987 (base32
14988 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
14989 (build-system python-build-system)
14990 (propagated-inputs
14991 `(("python-babel" ,python-babel)))
14992 (home-page "https://github.com/dahlia/wikidata")
14993 (synopsis "Wikidata client library")
14994 (description
14995 "This package provides a Python interface to
14996@url{https://www.wikidata.org/, Wikidata}.")
14997 (properties '((upstream-name . "Wikidata")))
14998 (license license:gpl3+)))
14999
15000(define-public python-doctest-ignore-unicode
15001 (package
15002 (name "python-doctest-ignore-unicode")
15003 (version "0.1.2")
15004 (source
15005 (origin
15006 (method url-fetch)
15007 (uri (pypi-uri "doctest-ignore-unicode" version))
15008 (sha256
15009 (base32
15010 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
15011 (build-system python-build-system)
15012 (native-inputs
15013 `(("python-nose" ,python-nose)))
15014 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
15015 (synopsis "Ignore Unicode literal prefixes in doctests")
15016 (description
15017 "This package adds support for a flag to ignore Unicode literal prefixes
15018in doctests.")
15019 (license license:asl2.0)))
15020
15021(define-public python-attr
15022 (package
15023 (name "python-attr")
15024 (version "0.3.1")
15025 (source
15026 (origin
15027 (method url-fetch)
15028 (uri (pypi-uri "attr" version))
15029 (sha256
15030 (base32
15031 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
15032 (build-system python-build-system)
15033 (home-page "https://github.com/denis-ryzhkov/attr")
15034 (synopsis "Decorator for attributes of target function or class")
15035 (description "Simple decorator to set attributes of target function or
15036class in a @acronym{DRY, Don't Repeat Yourself} way.")
15037 (license license:expat)))
f98232a3
VC
15038
15039(define-public python-construct
15040 (package
15041 (name "python-construct")
15042 (version "2.9.45")
15043 (source
15044 (origin
15045 (method url-fetch)
15046 (uri (pypi-uri "construct" version))
15047 (sha256
15048 (base32
15049 "130iy05awzigm2xah2yvlmb08mac5bi4gzr5m3g7k1krs3ps0w92"))))
15050 (build-system python-build-system)
15051 (arguments
15052 `(#:tests? #f)) ; No tests exist.
15053 (propagated-inputs
15054 `(("python-extras" ,python-extras)
15055 ("python-arrow" ,python-arrow)
15056 ("python-numpy" ,python-numpy)
15057 ("python-ruamel.yaml" ,python-ruamel.yaml)))
15058 (home-page "http://construct.readthedocs.io")
15059 (synopsis "Declarative and symmetrical parser and builder for binary data")
15060 (description
15061 "This package provides both simple, atomic constructs (such as
15062integers of various sizes), as well as composite ones which allow you
15063form hierarchical and sequential structures of increasing complexity.
15064It features bit and byte granularity, easy debugging and testing, an
15065easy-to-extend subclass system, and lots of primitive constructs to
15066make your work easier.")
15067 (license license:expat)))
b742c006
LF
15068
15069(define-public python-humanize
15070 (package
15071 (name "python-humanize")
15072 (version "0.5.1")
15073 (source
15074 (origin
15075 (method url-fetch)
15076 (uri (pypi-uri "humanize" version))
15077 (sha256
15078 (base32
15079 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
15080 (arguments
15081 '(#:tests? #f)) ; tests not in pypi archive
15082 (build-system python-build-system)
15083 (home-page "https://github.com/jmoiron/humanize")
15084 (synopsis "Print numerical information in a human-readable form")
15085 (description "This package provides a Python module that displays numbers
15086and dates in \"human readable\" forms. For example, it would display
15087\"12345591313\" as \"12.3 billion\".")
15088 (license license:expat)))
d5bbf66d
LF
15089
15090(define-public python-txaio
15091 (package
15092 (name "python-txaio")
15093 (version "18.8.1")
15094 (source
15095 (origin
15096 (method url-fetch)
15097 (uri (pypi-uri "txaio" version))
15098 (sha256
15099 (base32
15100 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
15101 (build-system python-build-system)
15102 (propagated-inputs
15103 `(("python-twisted" ,python-twisted)
15104 ("python-six" ,python-six)))
15105 (home-page "https://github.com/crossbario/txaio")
15106 (synopsis "Compatibility layer between Python asyncio and Twisted")
15107 (description "Txaio provides a compatibility layer between the Python
15108@code{asyncio} module and @code{Twisted}.")
15109 (license license:expat)))